!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){ey[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=qv.call(t);if("[object array]"===n){e=[];for(var o=0,a=t.length;o_y||t<-_y}function ft(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedtime=0,this._paused=!1}function gt(t){return(t=math.round(t))<0?0:t>255?255:t}function pt(t){return(t=math.round(t))<0?0:t>360?360:t}function mt(t){return t<0?0:t>1?1:t}function vt(t){return gt(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100*255:parseint(t,10))}function yt(t){return mt(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100:parsefloat(t))}function xt(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function _t(t,e,i){return t+(e-t)*i}function bt(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function wt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function st(t,e){py&&wt(py,e),py=ky.put(t,py||e.slice())}function mt(t,e){if(t){e=e||[];var i=ky.get(t);if(i)return wt(e,i);var n=(t+="").replace(/ /g,"").tolowercase();if(n in ly)return wt(e,ly[n]),st(t,e),e;if("#"!==n.charat(0)){var o=n.indexof("("),a=n.indexof(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void bt(e,0,0,0,1);l=yt(s.pop());case"rgb":return 3!==s.length?void bt(e,0,0,0,1):(bt(e,vt(s[0]),vt(s[1]),vt(s[2]),l),st(t,e),e);case"hsla":return 4!==s.length?void bt(e,0,0,0,1):(s[3]=yt(s[3]),it(s,e),st(t,e),e);case"hsl":return 3!==s.length?void bt(e,0,0,0,1):(it(s,e),st(t,e),e);default:return}}bt(e,0,0,0,1)}else{if(4===n.length)return(h=parseint(n.substr(1),16))>=0&&h<=4095?(bt(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),st(t,e),e):void bt(e,0,0,0,1);if(7===n.length){var h=parseint(n.substr(1),16);return h>=0&&h<=16777215?(bt(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),st(t,e),e):void bt(e,0,0,0,1)}}}}function it(t,e){var i=(parsefloat(t[0])%360+360)%360/360,n=yt(t[1]),o=yt(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],bt(e,gt(255*xt(r,a,i+1/3)),gt(255*xt(r,a,i)),gt(255*xt(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function tt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=math.min(n,o,a),s=math.max(n,o,a),l=s-r,h=(s+r)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+r):l/(2-s-r);var u=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+u-d:a===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}function at(t,e){var i=mt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return ot(i,4===i.length?"rgba":"rgb")}}function ct(t){var e=mt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1)}function dt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=math.floor(n),a=math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=gt(_t(r[0],s[0],l)),i[1]=gt(_t(r[1],s[1],l)),i[2]=gt(_t(r[2],s[2],l)),i[3]=mt(_t(r[3],s[3],l)),i}}function lt(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=math.floor(n),a=math.ceil(n),r=mt(e[o]),s=mt(e[a]),l=n-o,h=ot([gt(_t(r[0],s[0],l)),gt(_t(r[1],s[1],l)),gt(_t(r[2],s[2],l)),mt(_t(r[3],s[3],l))],"rgba");return i?{color:h,leftindex:o,rightindex:a,value:n}:h}}function kt(t,e,i,n){if(t=mt(t))return t=tt(t),null!=e&&(t[0]=pt(e)),null!=i&&(t[1]=yt(i)),null!=n&&(t[2]=yt(n)),ot(it(t),"rgba")}function pt(t,e){if((t=mt(t))&&null!=e)return t[3]=mt(e),ot(t,"rgba")}function ot(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function zt(t,e){return t[e]}function nt(t,e,i){t[e]=i}function et(t,e,i){return(e-t)*i+t}function rt(t,e,i){return i>.5?e:t}function vt(t,e,i,n,o){var a=t.length;if(1==o)for(s=0;so)t.length=o;else for(r=n;r=0&&!(m[i]<=e);i--);i=math.min(i,h-2)}else{for(i=l;ie);i++);i=math.min(i-1,h-2)}l=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(i=(e-m[i])/n,l)if(a=v[i],t=v[0===i?i:i-1],c=v[i>h-2?h-1:i+1],d=v[i>h-3?h-1:i+2],d)wt(t,a,c,d,i,i*i,i*i*i,r(t,o),p);else{if(f)a=wt(t,a,c,d,i,i*i,i*i*i,p,1),a=zt(p);else{if(g)return rt(a,c,i);a=ht(t,a,c,d,i,i*i,i*i*i)}s(t,o,a)}else if(d)vt(v[i],v[i+1],i,r(t,o),p);else{var a;if(f)vt(v[i],v[i+1],i,p,1),a=zt(p);else{if(g)return rt(v[i],v[i+1],i);a=et(v[i],v[i+1],i)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(o.easing=e),o}}}function jt(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function qt(t){for(var e=0;t>=qy;)e|=1&t,t>>=1;return t+e}function yt(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o=0;)o++;return o-e}function $t(t,e,i){for(i--;e>>1])<0?l=a:s=a+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=r}}function jt(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;ls&&(l=s);var h=r;r=o-l,l=o-h}for(r++;r>>1);a(t,e[i+u])>0?r=u+1:l=u}return l}function qt(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;ls&&(l=s);var h=r;r=o-l,l=o-h}else{for(s=n-o;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r>>1);a(t,e[i+u])<0?l=u:r=u+1}return l}function te(t,e){function i(i){var s=a[i],h=r[i],u=a[i+1],c=r[i+1];r[i]=h+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=qt(t[u],t,s,h,0,e);s+=d,0!==(h-=d)&&0!==(c=jt(t[s+h-1],t,u,c,c-1,e))&&(h<=c?n(s,h,u,c):o(s,h,u,c))}function n(i,n,o,a){var r=0;for(r=0;r=yy||f>=yy);if(g)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===n){for(r=0;r=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=h[u--],1==--a){v=!0;break}if(0!=(m=a-jt(t[l],h,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(u-=m)+1,r=0;r=yy||m>=yy);if(v)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=h[u]}else{if(0===a)throw new error;for(d=c-(a-1),r=0;r=0;r--)t[f+r]=t[d+r];t[c]=h[u]}else for(d=c-(a-1),r=0;r1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;i(t)}},this.forcemergeruns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]s&&(l=s),kt(t,i,i+l,i+a,e),a=l}r.pushrun(i,a),r.mergeruns(),o-=a,i+=a}while(0!==o);r.forcemergeruns()}}function ie(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function ne(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),t.createlineargradient(n,a,o,r)}function oe(t,e,i){var n=i.width,o=i.height,a=math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createradialgradient(r,s,0,r,s,l)}function ae(){return!1}function re(t,e,i){var n=iy(),o=e.getwidth(),a=e.getheight(),r=n.style;return r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.width=o*i,n.height=a*i,n.setattribute("data-zr-dom-id",t),n}function se(t){if("string"==typeof t){var e=ax.get(t);return e&&e.image}return t}function le(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!i)return e;var a=ax.get(t),r={hostel:i,cb:n,cbpayload:o};return a?!ue(e=a.image)&&a.pending.push(r):(!e&&(e=new image),e.onload=he,ax.put(t,e.__cachedimgobj={image:e,pending:[r]}),e.src=e.__zrimagesrc=t),e}return t}return e}function he(){var t=this.__cachedimgobj;this.onload=this.__cachedimgobj=null;for(var e=0;elx&&(sx=0,rx={}),sx++,rx[i]=o,o}function de(t,e,i,n,o,a,r){return a?ge(t,e,i,n,o,a,r):fe(t,e,i,n,o,r)}function fe(t,e,i,n,o,a){var r=me(t,e,o,a),s=ce(t,e);o&&(s+=o[1]+o[3]);var l=r.outerheight,h=new jt(pe(0,s,i),me(0,l,n),s,l);return h.lineheight=r.lineheight,h}function ge(t,e,i,n,o,a,r){var s=ie(t,{rich:a,truncate:r,font:e,textalign:i,textpadding:o}),l=s.outerwidth,h=s.outerheight;return new jt(pe(0,l,i),me(0,h,n),l,h)}function pe(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function me(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function ve(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",h="top";switch(t){case"left":n-=i,o+=s,l="right",h="middle";break;case"right":n+=i+r,o+=s,h="middle";break;case"top":n+=r/2,o-=i,l="center",h="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",h="middle";break;case"insideleft":n+=i,o+=s,h="middle";break;case"insideright":n+=r-i,o+=s,l="right",h="middle";break;case"insidetop":n+=r/2,o+=i,l="center";break;case"insidebottom":n+=r/2,o+=a-i,l="center",h="bottom";break;case"insidetopleft":n+=i,o+=i;break;case"insidetopright":n+=r-i,o+=i,l="right";break;case"insidebottomleft":n+=i,o+=a-i,h="bottom";break;case"insidebottomright":n+=r-i,o+=a-i,l="right",h="bottom"}return{x:n,y:o,textalign:l,textverticalalign:h}}function ye(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=xe(e,i,n,o);for(var r=0,s=a.length;r=r;l++)s-=r;var h=ce(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsiswidth=h,n.contentwidth=s,n.containerwidth=t,n}function _e(t,e){var i=e.containerwidth,n=e.font,o=e.contentwidth;if(!i)return"";var a=ce(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxiterations){t+=e.ellipsis;break}var s=0===r?be(t,o,e.asccharwidth,e.cncharwidth):a>0?math.floor(t.length*o/a):0;a=ce(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function be(t,e,i,n){for(var o=0,a=0,r=t.length;al)t="",a=[];else if(null!=h)for(var u=xe(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minchar:n.minchar,placeholder:n.placeholder}),c=0,d=a.length;co&&te(i,t.substring(o,a)),te(i,n[2],n[1]),o=hx.lastindex}of)return{lines:[],width:0,height:0};k.textwidth=ce(k.text,_);var w=y.textwidth,s=null==w||"auto"===w;if("string"==typeof w&&"%"===w.charat(w.length-1))k.percentwidth=w,h.push(k),w=0;else{if(s){w=k.textwidth;var m=y.textbackgroundcolor,i=m&&m.image;i&&ue(i=se(i))&&(w=math.max(w,i.width*b/i.height))}var c=x?x[1]+x[3]:0;w+=c;var d=null!=d?d-m:null;null!=d&&dl&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>h&&(n*=h/(c=n+o),o*=h/c),i+a>h&&(i*=h/(c=i+a),a*=h/c),t.moveto(r+i,s),t.lineto(r+l-n,s),0!==n&&t.quadraticcurveto(r+l,s,r+l,s+n),t.lineto(r+l,s+h-o),0!==o&&t.quadraticcurveto(r+l,s+h,r+l-o,s+h),t.lineto(r+a,s+h),0!==a&&t.quadraticcurveto(r,s+h,r,s+h-a),t.lineto(r,s+i),0!==i&&t.quadraticcurveto(r,s,r+i,s)}function de(t){return le(t),d(t.rich,le),t}function le(t){if(t){t.font=ae(t);var e=t.textalign;"middle"===e&&(e="center"),t.textalign=null==e||dx[e]?e:"left";var i=t.textverticalalign||t.textbaseline;"center"===i&&(i="middle"),t.textverticalalign=null==i||fx[i]?i:"top",t.textpadding&&(t.textpadding=d(t.textpadding))}}function ke(t,e,i,n,o){n.rich?oe(t,e,i,n,o):pe(t,e,i,n,o)}function pe(t,e,i,n,o){var a=we(e,"font",n.font||ux),r=n.textpadding,s=t.__textcotentblock;s&&!t.__dirty||(s=t.__textcotentblock=me(i,a,r,n.truncate));var l=s.outerheight,h=s.lines,u=s.lineheight,c=ge(l,n,o),d=c.basex,f=c.basey,g=c.textalign,p=c.textverticalalign;ne(e,n,o,d,f);var m=me(f,l,p),v=d,y=m,x=re(n);if(x||r){var _=ce(i,a);r&&(_+=r[1]+r[3]);var b=pe(d,_,g);x&&ve(t,e,n,b,m,_,l),r&&(v=ue(d,g,r),y+=r[0])}we(e,"textalign",g||"left"),we(e,"textbaseline","middle"),we(e,"shadowblur",n.textshadowblur||0),we(e,"shadowcolor",n.textshadowcolor||"transparent"),we(e,"shadowoffsetx",n.textshadowoffsetx||0),we(e,"shadowoffsety",n.textshadowoffsety||0),y+=u/2;var w=n.textstrokewidth,s=he(n.textstroke,w),m=fe(n.textfill);s&&(we(e,"linewidth",w),we(e,"strokestyle",s)),m&&we(e,"fillstyle",m);for(var i=0;i=0&&"right"===(_=w[d]).textalign;)ee(t,e,_,n,m,v,c,"right"),i-=_.width,c-=_.width,d--;for(a+=(a-(a-m)-(y-c)-i)/2;t<=d;)ee(t,e,_=w[t],n,m,v,a+_.width/2,"center"),a+=_.width,t++;v+=m}}function ne(t,e,i,n,o){if(i&&e.textrotation){var a=e.textorigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textrotation),t.translate(-n,-o)}}function ee(t,e,i,n,o,a,r,s){var l=n.rich[i.stylename]||{},h=i.textverticalalign,u=a+o/2;"top"===h?u=a+i.height/2:"bottom"===h&&(u=a+o-i.height/2),!i.islineholder&&re(l)&&ve(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,u-i.height/2,i.width,i.height);var c=i.textpadding;c&&(r=ue(r,s,c),u-=i.height/2-c[2]-i.textheight/2),we(e,"shadowblur",a(l.textshadowblur,n.textshadowblur,0)),we(e,"shadowcolor",l.textshadowcolor||n.textshadowcolor||"transparent"),we(e,"shadowoffsetx",a(l.textshadowoffsetx,n.textshadowoffsetx,0)),we(e,"shadowoffsety",a(l.textshadowoffsety,n.textshadowoffsety,0)),we(e,"textalign",s),we(e,"textbaseline","middle"),we(e,"font",i.font||ux);var d=he(l.textstroke||n.textstroke,g),f=fe(l.textfill||n.textfill),g=t(l.textstrokewidth,n.textstrokewidth);d&&(we(e,"linewidth",g),we(e,"strokestyle",d),e.stroketext(i.text,r,u)),f&&(we(e,"fillstyle",f),e.filltext(i.text,r,u))}function re(t){return t.textbackgroundcolor||t.textborderwidth&&t.textbordercolor}function ve(t,e,i,n,o,a,r){var s=i.textbackgroundcolor,l=i.textborderwidth,h=i.textbordercolor,u=_(s);if(we(e,"shadowblur",i.textboxshadowblur||0),we(e,"shadowcolor",i.textboxshadowcolor||"transparent"),we(e,"shadowoffsetx",i.textboxshadowoffsetx||0),we(e,"shadowoffsety",i.textboxshadowoffsety||0),u||l&&h){e.beginpath();var c=i.textborderradius;c?ce(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closepath()}if(u)we(e,"fillstyle",s),e.fill();else if(b(s)){var d=s.image;(d=le(d,null,t,be,s))&&ue(d)&&e.drawimage(d,n,o,a,r)}l&&h&&(we(e,"linewidth",l),we(e,"strokestyle",h),e.stroke())}function be(t,e){e.image=t}function ge(t,e,i){var n=e.x||0,o=e.y||0,a=e.textalign,r=e.textverticalalign;if(i){var s=e.textposition;if(s instanceof array)n=i.x+ze(s[0],i.width),o=i.y+ze(s[1],i.height);else{var l=ve(s,i,e.textdistance);n=l.x,o=l.y,a=a||l.textalign,r=r||l.textverticalalign}var h=e.textoffset;h&&(n+=h[0],o+=h[1])}return{basex:n,basey:o,textalign:a,textverticalalign:r}}function we(t,e,i){return t[e]=i,t[e]}function he(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorstops?"#000":t}function fe(t){return null==t||"none"===t?null:t.image||t.colorstops?"#000":t}function ze(t,e){return"string"==typeof t?t.lastindexof("%")>=0?parsefloat(t)/100*e:parsefloat(t):t}function ue(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function xe(t,e){return null!=t&&(t||e.textbackgroundcolor||e.textborderwidth&&e.textbordercolor||e.textpadding)}function je(t){t=t||{},fy.call(this,t);for(var e in t)t.hasownproperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new jy(t.style,this),this._rect=null,this.__clippaths=[]}function qe(t){je.call(this,t)}function ye(t){return parseint(t,10)}function $e(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function ke(t){t.__unusedcount++}function je(t){1==t.__unusedcount&&t.clear()}function qe(t,e,i){return mx.copy(t.getboundingrect()),t.transform&&mx.applytransform(t.transform),vx.width=e,vx.height=i,!mx.intersect(vx)}function ti(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0){var o="touchend"!=n?e.targettouches[0]:e.changedtouches[0];o&&oi(t,o,e,i)}else oi(t,e,e,i),e.zrdelta=e.wheeldelta?e.wheeldelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&_x.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function si(t,e,i){xx?t.addeventlistener(e,i):t.attachevent("on"+e,i)}function li(t,e,i){xx?t.removeeventlistener(e,i):t.detachevent("on"+e,i)}function hi(t){return t.which>1}function ui(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return math.sqrt(e*e+i*i)}function ci(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function di(t){return"mousewheel"===t&&uv.browser.firefox?"dommousescroll":t}function fi(t,e,i){var n=t._gesturemgr;"start"===i&&n.clear();var o=n.recognize(e,t.handler.findhover(e.zrx,e.zry,null).target,t.dom);if("end"===i&&n.clear(),o){var a=o.type;e.gestureevent=a,t.handler.dispatchtoelement({target:o.target},a,o.event)}}function gi(t){t._touching=!0,cleartimeout(t._touchtimer),t._touchtimer=settimeout(function(){t._touching=!1},700)}function pi(t){var e=t.pointertype;return"pen"===e||"touch"===e}function mi(t){function e(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}d(tx,function(e){t._handlers[e]=m(dx[e],t)}),d(cx,function(e){t._handlers[e]=m(dx[e],t)}),d(ix,function(i){t._handlers[i]=e(dx[i],t)})}function vi(t){function e(e,i){d(e,function(e){si(t,di(e),i._handlers[e])},i)}fy.call(this),this.dom=t,this._touching=!1,this._touchtimer,this._gesturemgr=new sx,this._handlers={},mi(this),uv.pointereventssupported?e(cx,this):(uv.toucheventssupported&&e(tx,this),e(ix,this))}function yi(t,e){var i=new zx(fv(),t,e);return ox[i.id]=i,i}function xi(t,e){px[t]=e}function _i(t){delete ox[t]}function bi(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function wi(t,e,i,n){var o=e[1]-e[0],a=i[1]-i[0];if(0===o)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(o>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function si(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?bi(t).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?nan:+t}function mi(t,e,i){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),i?t:+t}function ii(t){return t.sort(function(t,e){return t-e}),t}function ti(t){if(t=+t,isnan(t))return 0;for(var e=1,i=0;math.round(t*e)/e!==t;)e*=10,i++;return i}function ai(t){var e=t.tostring(),i=e.indexof("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexof(".");return o<0?0:e.length-1-o}function ci(t,e){var i=math.log,n=math.ln10,o=math.floor(i(t[1]-t[0])/n),a=math.round(i(math.abs(e[1]-e[0]))/n),r=math.min(math.max(-o+a,0),20);return isfinite(r)?r:20}function di(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isnan(e)?0:e)},0);if(0===n)return 0;for(var o=math.pow(10,i),a=f(t,function(t){return(isnan(t)?0:t)/n*o*100}),r=100*o,s=f(a,function(t){return math.floor(t)}),l=g(s,function(t,e){return t+e},0),h=f(a,function(t,e){return t-s[e]});lu&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/o}function li(t){var e=2*math.pi;return(t%e+e)%e}function ki(t){return t>-ex&&t=-20?+t.tofixed(n<0?-n:0):t}function ei(t){function e(t,i,n){return t.interval[n]=0}function vi(t){return isnan(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function bi(t,e){return t=(t||"").tolowercase().replace(/-(.)/g,function(t,e){return e.touppercase()}),e&&t&&(t=t.charat(0).touppercase()+t.slice(1)),t}function gi(t){return string(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function wi(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a':""}function zi(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="mm-dd\nyyyy");var n=pi(e),o=i?"utc":"",a=n["get"+o+"fullyear"](),r=n["get"+o+"month"]()+1,s=n["get"+o+"date"](),l=n["get"+o+"hours"](),h=n["get"+o+"minutes"](),u=n["get"+o+"seconds"]();return t=t.replace("mm",fx(r)).replace("m",r).replace("yyyy",a).replace("yy",a%100).replace("dd",fx(s)).replace("d",s).replace("hh",fx(l)).replace("h",l).replace("mm",fx(h)).replace("m",h).replace("ss",fx(u)).replace("s",u)}function ui(t){return t?t.charat(0).touppercase()+t.substr(1):t}function xi(t,e,i){return t[yx+e]=i}function ji(t,e){return t[yx+e]}function qi(t,e){return t.hasownproperty(yx+e)}function yi(t){var e={main:"",sub:""};return t&&(t=t.split(jx),e.main=t[0]||"",e.sub=t[1]||""),e}function $i(t){l(/^[a-za-z0-9_]+([.][a-za-z0-9_]+)?$/.test(t),'componenttype "'+t+'" illegal')}function ki(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(i.prototype,t),i.extend=this.extend,i.supercall=ji,i.superapply=qi,h(i,this),i.superclass=e,i}}function ji(t,e){var i=c(arguments,2);return this.superclass.prototype[e].apply(t,i)}function qi(t,e,i){return this.superclass.prototype[e].apply(t,i)}function tn(t,e){function i(t){var e=n[t.main];return e&&e[qx]||((e=n[t.main]={})[qx]=!0),e}e=e||{};var n={};if(t.registerclass=function(t,e){return e&&($i(e),(e=yi(e)).sub?e.sub!==qx&&(i(e)[e.sub]=t):n[e.main]=t),t},t.getclass=function(t,e,i){var o=n[t];if(o&&o[qx]&&(o=e?o[e]:null),i&&!o)throw new error(e?"component "+t+"."+(e||"")+" not exists. load it first.":t+".type should be specified.");return o},t.getclassesbymaintype=function(t){t=yi(t);var e=[],i=n[t.main];return i&&i[qx]?d(i,function(t,i){i!==qx&&e.push(t)}):e.push(i),e},t.hasclass=function(t){return t=yi(t),!!n[t.main]},t.getallclassmaintypes=function(){var t=[];return d(n,function(e,i){t.push(i)}),t},t.hassubtypes=function(t){t=yi(t);var e=n[t.main];return e&&e[qx]},t.parseclasstype=yi,e.registerwhenextend){var o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerclass(i,e.type)})}return t}function en(t){return t>-n_&&tn_||t<-n_}function on(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function an(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function rn(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-o,u=s*s-3*r*l,c=s*l-9*r*h,d=l*l-3*s*h,f=0;if(en(u)&&en(c))en(s)?a[0]=0:(m=-l/s)>=0&&m<=1&&(a[f++]=m);else{var g=c*c-4*u*d;if(en(g)){var p=c/u,m=-p/2;(m=-s/r+p)>=0&&m<=1&&(a[f++]=m),m>=0&&m<=1&&(a[f++]=m)}else if(g>0){var v=i_(g),y=u*s+1.5*r*(-c+v),x=u*s+1.5*r*(-c-v);(m=(-s-((y=y<0?-e_(-y,r_):e_(y,r_))+(x=x<0?-e_(-x,r_):e_(x,r_))))/(3*r))>=0&&m<=1&&(a[f++]=m)}else{var _=(2*u*s-3*r*c)/(2*i_(u*u*u)),b=math.acos(_)/3,w=i_(u),s=math.cos(b),m=(-s-2*w*s)/(3*r),m=(-s+w*(s+a_*math.sin(b)))/(3*r),i=(-s+w*(s-a_*math.sin(b)))/(3*r);m>=0&&m<=1&&(a[f++]=m),m>=0&&m<=1&&(a[f++]=m),i>=0&&i<=1&&(a[f++]=i)}}return f}function sn(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(en(r))nn(a)&&(c=-s/a)>=0&&c<=1&&(o[l++]=c);else{var h=a*a-4*r*s;if(en(h))o[0]=-a/(2*r);else if(h>0){var u=i_(h),c=(-a+u)/(2*r),d=(-a-u)/(2*r);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function ln(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,h=(s-r)*o+r,u=(l-s)*o+s,c=(u-h)*o+h;a[0]=t,a[1]=r,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n}function hn(t,e,i,n,o,a,r,s,l,h,u){var c,d,f,g,p,m=.005,v=1/0;s_[0]=l,s_[1]=h;for(var y=0;y<1;y+=.05)l_[0]=on(t,i,o,r,y),l_[1]=on(e,n,a,s,y),(g=uy(s_,l_))=0&&g=0&&c<=1&&(o[l++]=c);else{var h=r*r-4*a*s;if(en(h))(c=-r/(2*a))>=0&&c<=1&&(o[l++]=c);else if(h>0){var u=i_(h),c=(-r+u)/(2*a),d=(-r-u)/(2*a);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function fn(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function gn(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function pn(t,e,i,n,o,a,r,s,l){var h,u=.005,c=1/0;s_[0]=r,s_[1]=s;for(var d=0;d<1;d+=.05)l_[0]=un(t,i,o,d),l_[1]=un(e,n,a,d),(m=uy(s_,l_))=0&&m1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(p_[0]=f_(o)*i+t,p_[1]=d_(o)*n+e,m_[0]=f_(a)*i+t,m_[1]=d_(a)*n+e,h(s,p_,m_),u(l,p_,m_),(o%=g_)<0&&(o+=g_),(a%=g_)<0&&(a+=g_),o>a&&!r?a+=g_:oo&&(v_[0]=f_(f)*i+t,v_[1]=d_(f)*n+e,h(s,v_,s),u(l,v_,l))}function bn(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0,h=t;if(r>e+s&&r>n+s||rt+s&&a>i+s||ae+c&&u>n+c&&u>a+c&&u>s+c||ut+c&&h>i+c&&h>o+c&&h>r+c||he+h&&l>n+h&&l>a+h||lt+h&&s>i+h&&s>o+h||si||u+ho&&(o+=z_);var d=math.atan2(l,s);return d<0&&(d+=z_),d>=n&&d<=o||d+z_>=n&&d+z_<=o}function tn(t,e,i,n,o,a){if(a>e&&a>n||ao?r:0}function an(t,e){return math.abs(t-e)e&&h>n&&h>a&&h>s||h1&&cn(),c=on(e,n,a,s,b_[0]),g>1&&(d=on(e,n,a,s,b_[1]))),2==g?me&&s>n&&s>a||s=0&&h<=1){for(var u=0,c=un(e,n,a,h),d=0;di||s<-i)return 0;h=math.sqrt(i*i-s*s);v_[0]=-h,v_[1]=h;var l=math.abs(n-o);if(l<1e-4)return 0;if(l%e_<1e-4){n=0,o=e_;g=a?1:-1;return r>=v_[0]+t&&r<=v_[1]+t?g:0}if(a){var h=n;n=mn(o),o=mn(h)}else n=mn(n),o=mn(o);n>o&&(o+=e_);for(var u=0,c=0;c<2;c++){var d=v_[c];if(d+t>r){var f=math.atan2(s,d),g=a?1:-1;f<0&&(f=e_+f),(f>=n&&f<=o||f+e_>=n&&f+e_<=o)&&(f>math.pi/2&&f<1.5*math.pi&&(g=-g),u+=g)}}return u}function pn(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,h=0,u=0;u1&&(i||(a+=tn(r,s,l,h,n,o))),1==u&&(l=r=t[u],h=s=t[u+1]),c){case n_.m:r=l=t[u++],s=h=t[u++];break;case n_.l:if(i){if(bn(r,s,t[u],t[u+1],e,n,o))return!0}else a+=tn(r,s,t[u],t[u+1],n,o)||0;r=t[u++],s=t[u++];break;case n_.c:if(i){if(wn(r,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else a+=dn(r,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],n,o)||0;r=t[u++],s=t[u++];break;case n_.q:if(i){if(sn(r,s,t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else a+=ln(r,s,t[u++],t[u++],t[u],t[u+1],n,o)||0;r=t[u++],s=t[u++];break;case n_.a:var d=t[u++],f=t[u++],g=t[u++],p=t[u++],m=t[u++],v=t[u++],y=(t[u++],1-t[u++]),x=math.cos(m)*g+d,_=math.sin(m)*p+f;u>1?a+=tn(r,s,x,_,n,o):(l=x,h=_);var b=(n-d)*p/g+d;if(i){if(in(d,f,p,m,m+v,y,e,b,o))return!0}else a+=kn(d,f,p,m,m+v,y,b,o);r=math.cos(m+v)*g+d,s=math.sin(m+v)*p+f;break;case n_.r:l=r=t[u++],h=s=t[u++];var x=l+t[u++],_=h+t[u++];if(i){if(bn(l,h,x,h,e,n,o)||bn(x,h,x,_,e,n,o)||bn(x,_,l,_,e,n,o)||bn(l,_,l,h,e,n,o))return!0}else a+=tn(x,h,x,_,n,o),a+=tn(l,_,l,h,n,o);break;case n_.z:if(i){if(bn(r,s,l,h,e,n,o))return!0}else a+=tn(r,s,l,h,n,o);r=l,s=h}}return i||an(s,h)||(a+=tn(r,s,l,h,n,o)||0),0!==a}function on(t,e,i){return pn(t,0,!1,e,i)}function zn(t,e,i,n){return pn(t,e,!0,i,n)}function nn(t){je.call(this,t),this.path=null}function en(t,e,i,n,o,a,r,s,l,h,u){var c=l*(j_/180),d=k_(c)*(t-i)/2+$_(c)*(e-n)/2,f=-1*$_(c)*(t-i)/2+k_(c)*(e-n)/2,g=d*d/(r*r)+f*f/(s*s);g>1&&(r*=y_(g),s*=y_(g));var p=(o===a?-1:1)*y_((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=p*r*f/s,v=p*-s*d/r,y=(t+i)/2+k_(c)*m-$_(c)*v,x=(e+n)/2+$_(c)*m+k_(c)*v,_=eb([1,0],[(d-m)/r,(f-v)/s]),b=[(d-m)/r,(f-v)/s],w=[(-1*d-m)/r,(-1*f-v)/s],s=eb(b,w);tb(b,w)<=-1&&(s=j_),tb(b,w)>=1&&(s=0),0===a&&s>0&&(s-=2*j_),1===a&&s<0&&(s+=2*j_),u.adddata(h,y,x,r,s,_,s,c,a)}function rn(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===f[0]&&f.shift();for(var g=0;g=2){if(o&&"spline"!==o){var a=hb(n,o,i,e.smoothconstraint);t.moveto(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],h=a[2*s+1],u=n[(s+1)%r];t.beziercurveto(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===o&&(n=lb(n,i)),t.moveto(n[0][0],n[0][1]);for(var s=1,c=n.length;s=0)&&(n={textfill:null,textstroke:t.textstroke,textstrokewidth:t.textstrokewidth},t.textfill="#fff",null==t.textstroke&&(t.textstroke=i.autocolor,null==t.textstrokewidth&&(t.textstrokewidth=2))),n}function xo(t){var e=t.insiderollback;e&&(t.textfill=e.textfill,t.textstroke=e.textstroke,t.textstrokewidth=e.textstrokewidth)}function _o(t,e){var i=e||e.getmodel("textstyle");return[t.fontstyle||i&&i.getshallow("fontstyle")||"",t.fontweight||i&&i.getshallow("fontweight")||"",(t.fontsize||i&&i.getshallow("fontsize")||12)+"px",t.fontfamily||i&&i.getshallow("fontfamily")||"sans-serif"].join(" ")}function bo(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isanimationenabled()){var r=t?"update":"",s=n.getshallow("animationduration"+r),l=n.getshallow("animationeasing"+r),h=n.getshallow("animationdelay"+r);"function"==typeof h&&(h=h(o,n.getanimationdelayparams?n.getanimationdelayparams(e,o):null)),"function"==typeof s&&(s=s(o)),s>0?e.animateto(i,s,h||0,l,a,!!a):(e.stopanimation(),e.attr(i),a&&a())}else e.stopanimation(),e.attr(i),a&&a()}function wo(t,e,i,n,o){bo(!0,t,e,i,n,o)}function so(t,e,i,n,o){bo(!1,t,e,i,n,o)}function mo(t,e){for(var i=at([]);t&&t!==e;)st(i,t.getlocaltransform(),i),t=t.parent;return i}function io(t,e,i){return e&&!c(e)&&(e=by.getlocaltransform(e)),i&&(e=ct([],e)),$([],t,e)}function to(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=io(a,e,i),math.abs(a[0])>math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function ao(t,e,i,n){function o(t){var e={position:v(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=function(t){var e={};return t.traverse(function(t){!t.isgroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isgroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),wo(t,n,i,t.dataindex)}}})}}function co(t,e){return f(t,function(t){var i=t[0];i=wb(i,e.x),i=sb(i,e.x+e.width);var n=t[1];return n=wb(n,e.y),n=sb(n,e.y+e.height),[i,n]})}function do(t,e,i){var n=(e=a({recthover:!0},e)).style={strokenoscale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexof("image://")?(n.image=t.slice(8),r(n,i),new qe(e)):un(t.replace("path://",""),e,i,"center")}function lo(t,e,i){this.parentmodel=e,this.ecmodel=i,this.option=t}function ko(t,e,i){for(var n=0;n=i.length&&i.push({option:t})}}),i}function bo(t){var e=z();pb(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),pb(t,function(t,i){var n=t.option;l(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyinfo&&(t.keyinfo={})}),pb(t,function(t,i){var n=t.exist,o=t.option,a=t.keyinfo;if(ob(o)){if(a.name=null!=o.name?o.name+"":n?n.name:"\0-",n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else{var r=0;do{a.id="\0"+a.name+"\0"+r++}while(e.get(a.id))}e.set(a.id,t)}})}function go(t){return ob(t)&&t.id&&0===(t.id+"").indexof("\0_ec_\0")}function wo(t,e){function i(t,e,i){for(var n=0,o=t.length;nn||l.newline?(a=0,u=m,r+=s+i,s=f.height):s=math.max(s,f.height)}else{var v=f.height+(p?-p.y+f.y:0);(c=r+v)>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=u+i:r=c+i)})}function $o(t,e,i){var n=e.width,o=e.height,a=si(t.x,n),r=si(t.y,o),s=si(t.x2,n),l=si(t.y2,o);return(isnan(a)||isnan(parsefloat(t.x)))&&(a=0),(isnan(s)||isnan(parsefloat(t.x2)))&&(s=n),(isnan(r)||isnan(parsefloat(t.y)))&&(r=0),(isnan(l)||isnan(parsefloat(t.y2)))&&(l=o),i=gx(i||0),{width:math.max(s-a-i[1]-i[3],0),height:math.max(l-r-i[0]-i[2],0)}}function ko(t,e,i){i=gx(i||0);var n=e.width,o=e.height,a=si(t.left,n),r=si(t.top,o),s=si(t.right,n),l=si(t.bottom,o),h=si(t.width,n),u=si(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isnan(h)&&(h=n-s-d-a),isnan(u)&&(u=o-l-c-r),null!=f&&(isnan(h)&&isnan(u)&&(f>n/o?h=.8*n:u=.8*o),isnan(h)&&(h=f*u),isnan(u)&&(u=h/f)),isnan(a)&&(a=n-s-h-d),isnan(r)&&(r=o-l-u-c),t.left||t.right){case"center":a=n/2-h/2-i[3];break;case"right":a=n-h-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-u/2-i[0];break;case"bottom":r=o-u-c}a=a||0,r=r||0,isnan(h)&&(h=n-d-a-(s||0)),isnan(u)&&(u=o-c-r-(l||0));var g=new jt(a+i[3],r+i[0],h,u);return g.margin=i,g}function jo(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingmode||"all";if(a||s){var h;if("raw"===l)h="group"===t.type?new jt(0,0,+e.width||0,+e.height||0):t.getboundingrect();else if(h=t.getboundingrect(),t.needlocaltransform()){var u=t.getlocaltransform();(h=h.clone()).applytransform(u)}e=ko(r({width:h.width,height:h.height},e),i,n);var c=t.position,d=a?e.x-h.x:0,f=s?e.y-h.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function qo(t,e){return null!=t[wb[e][0]]||null!=t[wb[e][1]]&&null!=t[wb[e][2]]}function ta(t,e,i){function n(i,n){var r={},l=0,h={},u=0;if(bb(i,function(e){h[e]=t[e]}),bb(i,function(t){o(e,t)&&(r[t]=h[t]=e[t]),a(r,t)&&l++,a(h,t)&&u++}),s[n])return a(e,i[1])?h[i[2]]=null:a(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&l){if(l>=2)return r;for(var c=0;c=e:"max"===i?t<=e:t===e}function pa(t,e){return t.join(",")===e.join(",")}function ma(t,e){aw(e=e||{},function(e,i){if(null!=e){var n=t[i];if(ub.hasclass(i)){e=oo(e);var o=vo(n=oo(n),e);t[i]=sw(o,function(t){return t.option&&t.exist?lw(t.exist,t.option,!0):t.exist||t.option})}else t[i]=lw(n,e,!0)}})}function va(t){var e=t&&t.itemstyle;if(e)for(var i=0,o=dw.length;i=0?n():c=settimeout(n,-a),h=o};return d.clear=function(){c&&(cleartimeout(c),c=null)},d.debouncenextcall=function(t){l=t},d}function la(t,e,i,n){var o=t[e];if(o){var a=o[ww]||o,r=o[mw];if(o[sw]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=da(a,i,"debounce"===n))[ww]=a,o[mw]=n,o[sw]=i}return o}}function ka(t,e){var i=t[e];i&&i[ww]&&(t[e]=i[ww])}function pa(t){return function(e,i,n){e=e&&e.tolowercase(),fy.prototype[t].call(this,e,i,n)}}function oa(){fy.call(this)}function za(t,e,n){function o(t,e){return t.prio-e.prio}n=n||{},"string"==typeof e&&(e=uw[e]),this.id,this.group,this._dom=t;var a=this._zr=yi(t,{renderer:n.renderer||"canvas",devicepixelratio:n.devicepixelratio,width:n.width,height:n.height});this._throttledzrflush=da(m(a.flush,a),17),(e=i(e))&&vw(e,!0),this._theme=e,this._chartsviews=[],this._chartsmap={},this._componentsviews=[],this._componentsmap={},this._coordsysmgr=new ua,this._api=$a(this),fy.call(this),this._messagecenter=new oa,this._initevents(),this.resize=m(this.resize,this),this._pendingactions=[],ee(zw,o),ee(ww,o),a.animation.on("frame",this._onframe,this),k(this)}function na(t,e,i){var n,o=this._model,a=this._coordsysmgr.getcoordinatesystems();e=fo(o,e);for(var r=0;re.get("hoverlayerthreshold")&&!uv.node&&i.traverse(function(t){t.isgroup||(t.usehoverlayer=!0)})}function qa(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),o=i>t.get("progressivethreshold")&&n&&!uv.node;o&&e.group.traverse(function(t){t.isgroup||(t.progressive=o?math.floor(i++/n):-1,o&&t.stopanimation(!0))});var a=t.get("blendmode")||null;e.group.traverse(function(t){t.isgroup||t.setstyle("blend",a)})}function ya(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function $a(t){var e=t._coordsysmgr;return a(new ha(t),{getcoordinatesystems:m(e.getcoordinatesystems,e),getcomponentbyelement:function(e){for(;e;){var i=e.__eccomponentinfo;if(null!=i)return t._model.getcomponent(i.maintype,i.index);e=e.parent}}})}function ka(t){function e(t,e){for(var n=0;n=0?o[s]=new h.constructor(a[s].length):o[s]=a[s]}return n}function xr(t,e,n){function o(t,e,i){cs[e]?t.otherdims[e]=i:(t.coorddim=e,t.coorddimindex=i,h.set(e,!0))}function a(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}e=e||[],n=n||{},t=(t||[]).slice();var r=(n.dimsdef||[]).slice(),s=z(n.encodedef),l=z(),h=z(),u=[],c=n.dimcount;if(null==c){var d=_r(e[0]);c=math.max(y(d)&&d.length||1,t.length,r.length),ls(t,function(t){var e=t.dimsdef;e&&(c=math.max(c,e.length))})}for(var f=0;f=0&&wr(t)?function(t,e,i,n){return eo(t)&&(c.hasitemoption=!0),n===u?i:ro(no(t),h[n])}:function(t,e,i,n){var o=no(t),a=ro(o&&o[n],h[n]);eo(t)&&(c.hasitemoption=!0);var r=s&&s.categoryaxesmodels;return r&&r[e]&&"string"==typeof a&&(f[e]=f[e]||r[e].getcategories(),(a=l(f[e],a))<0&&!isnan(a)&&(a=+a)),a};return c.hasitemoption=!1,c.initdata(t,d,g),c}function mr(t){return"category"!==t&&"time"!==t}function ir(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function tr(t,e){var i,n=[],o=t&&t.dimensions[t.categoryindex];if(o&&(i=t.categoryaxesmodels[o.name]),i){var a=i.getcategories();if(a){var r=e.length;if(y(e[0])&&e[0].length>1){n=[];for(var s=0;sn&&(r=o.interval=n);var s=o.intervalprecision=dr(r);return kr(o.nicetickextent=[ms(math.ceil(t[0]/r)*r,s),ms(math.floor(t[1]/r)*r,s)],t),o}function dr(t){return ai(t)+2}function lr(t,e,i){t[e]=math.max(math.min(t[e],i[1]),i[0])}function kr(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),lr(t,0,e),lr(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function pr(t,e,i,n){var o=[];if(!t)return o;e[0]1e4)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function or(t,e){return cs(t,as(e))}function zr(t,e){var i,n,o,a=t.type,r=e.getmin(),s=e.getmax(),l=null!=r,h=null!=s,u=t.getextent();return"ordinal"===a?i=(e.get("data")||[]).length:(y(n=e.get("boundarygap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=si(n[0],1),n[1]=si(n[1],1),o=u[1]-u[0]||math.abs(u[0])),null==r&&(r="ordinal"===a?i?0:nan:u[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:nan:u[1]+n[1]*o),"datamin"===r?r=u[0]:"function"==typeof r&&(r=r({min:u[0],max:u[1]})),"datamax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==r||!isfinite(r))&&(r=nan),(null==s||!isfinite(s))&&(s=nan),t.setblank(m(r)||m(s)),e.getneedcrosszero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!h&&(s=0)),[r,s]}function nr(t,e){var i=zr(t,e),n=null!=e.getmin(),o=null!=e.getmax(),a=e.get("splitnumber");"log"===t.type&&(t.base=e.get("logbase"));var r=t.type;t.setextent(i[0],i[1]),t.niceextent({splitnumber:a,fixmin:n,fixmax:o,mininterval:"interval"===r||"time"===r?e.get("mininterval"):null,maxinterval:"interval"===r||"time"===r?e.get("maxinterval"):null});var s=e.get("interval");null!=s&&t.setinterval&&t.setinterval(s)}function er(t,e){if(e=e||t.get("type"))switch(e){case"category":return new ps(t.getcategories(),[1/0,-1/0]);case"value":return new ys;default:return(ar.getclass(e)||ys).create(t)}}function rr(t,e,i,n,o){var a,r=0,s=0,l=(n-o)/180*math.pi,h=1;e.length>40&&(h=math.floor(e.length/40));for(var u=0;u1?h:(r+1)*h-1}function vr(t,e){var i=t.scale,n=i.gettickslabels(),o=i.getticks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),f(n,e)):"function"==typeof e?f(o,function(i,n){return e(br(t,i),n)},this):n}function br(t,e){return"category"===t.type?t.scale.getlabel(e):e}function gr(t){return b(t)&&null!=t.value?t.value:t+""}function wr(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symboltype?i.stroke=t:this.__isemptybrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function hr(t,e,i,n,o,a,r){var s=0===t.indexof("empty");s&&(t=t.substr(5,1).tolowercase()+t.substr(6));var l;return l=0===t.indexof("image://")?xn(t.slice(8),new jt(e,i,n,o),r?"center":"cover"):0===t.indexof("path://")?un(t.slice(7),{},new jt(e,i,n,o),r?"center":"cover"):new ws({shape:{symboltype:t,x:e,y:i,width:n,height:o}}),l.__isemptybrush=s,l.setcolor=wr,l.setcolor(a),l}function fr(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function zr(t,e){return math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function yr(t){var e,i=xo(t,"label");if(i.length)e=i[0];else for(var n,o=t.dimensions.slice();o.length&&(e=o.pop(),"ordinal"===(n=t.getdimensioninfo(e).type)||"time"===n););return e}function $r(t,e){var i=t.getitemvisual(e,"symbolsize");return i instanceof array?i.slice():[+i,+i]}function kr(t){return[t[0]/2,t[1]/2]}function jr(t,e,i){jy.call(this),this.updatedata(t,e,i)}function qr(t,e){this.parent.drift(t,e)}function ts(t){this.group=new jy,this._symbolctor=t||jr}function es(t,e,i){var n=t.getitemlayout(e);return n&&!isnan(n[0])&&!isnan(n[1])&&!(i&&i(e))&&"none"!==t.getitemvisual(e,"symbol")}function is(t){return t>=0?1:-1}function ns(t,e,i){for(var n,o=t.getbaseaxis(),a=t.getotheraxis(o),r=o.onzero?0:a.scale.getextent()[0],s=a.dim,l="x"===s||"radius"===s?1:0,h=e.stackedon,u=e.get(s,i);h&&is(h.get(s,i))===is(u);){n=h;break}var c=[];return c[l]=e.get(o.dim,i),c[1-l]=n?n.get(s,i,!0):r,t.datatopoint(c)}function os(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function as(t){return isnan(t[0])||isnan(t[1])}function rs(t,e,i,n,o,a,r,s,l,h,u){for(var c=0,d=i,f=0;f=o||d<0)break;if(as(g)){if(u){d+=a;continue}break}if(d===i)t[a>0?"moveto":"lineto"](g[0],g[1]),am(sm,g);else if(l>0){var p=d+a,m=e[p];if(u)for(;m&&as(e[p]);)m=e[p+=a];var v=.5,y=e[c];if(!(m=e[p])||as(m))am(lm,g);else{as(m)&&!u&&(m=g),h(rm,m,y);var x,_;if("x"===h||"y"===h){var b="x"===h?0:1;x=math.abs(g[b]-y[b]),_=math.abs(g[b]-m[b])}else x=hy(g,y),_=hy(g,m);om(lm,g,rm,-l*(1-(v=_/(_+x))))}im(sm,sm,s),nm(sm,sm,r),im(lm,lm,s),nm(lm,lm,r),t.beziercurveto(sm[0],sm[1],lm[0],lm[1],g[0],g[1]),om(sm,g,rm,l*v)}else t.lineto(g[0],g[1]);c=d,d+=a}return f}function ss(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;on[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function ls(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function cs(t){return t>=0?1:-1}function ds(t,e){var i=t.getbaseaxis(),n=t.getotheraxis(i),o=0;if(!i.onzero){var a=n.scale.getextent();a[0]>0?o=a[0]:a[1]<0&&(o=a[1])}var r=n.dim,s="x"===r||"radius"===r?1:0;return e.maparray([r],function(n,a){for(var l,h=e.stackedon;h&&cs(h.get(r,a))===cs(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,a),u[1-s]=l?l.get(r,a,!0):o,t.datatopoint(u)},!0)}function fs(t,e,i){var n=us(t.getaxis("x")),o=us(t.getaxis("y")),a=t.getbaseaxis().ishorizontal(),r=math.min(n[0],n[1]),s=math.min(o[0],o[1]),l=math.max(n[0],n[1])-r,h=math.max(o[0],o[1])-s,u=i.get("linestyle.normal.width")||2,c=i.get("clipoverflow")?u/2:math.max(l,h);a?(s-=c,h+=2*c):(r-=c,l+=2*c);var d=new db({shape:{x:r,y:s,width:l,height:h}});return e&&(d.shape[a?"width":"height"]=0,so(d,{shape:{width:l,height:h}},i)),d}function gs(t,e,i){var n=t.getangleaxis(),o=t.getradiusaxis().getextent(),a=n.getextent(),r=math.pi/180,s=new rb({shape:{cx:t.cx,cy:t.cy,r0:o[0],r:o[1],startangle:-a[0]*r,endangle:-a[1]*r,clockwise:n.inverse}});return e&&(s.shape.endangle=-a[0]*r,so(s,{shape:{endangle:-a[1]*r}},i)),s}function ps(t,e,i){return"polar"===t.type?gs(t,e,i):fs(t,e,i)}function ms(t,e,i){for(var n=e.getbaseaxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r=0;o--)if(i[o].dimension<2){n=i[o];break}if(n&&"cartesian2d"===e.type){var a=n.dimension,r=t.dimensions[a],s=e.getaxis(r),l=f(n.stops,function(t){return{coord:s.toglobalcoord(s.datatocoord(t.value)),color:t.color}}),h=l.length,u=n.outercolors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=l[0].coord-10,g=l[h-1].coord+10,p=g-c;if(p<.001)return"transparent";d(l,function(t){t.offset=(t.coord-c)/p}),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var m=new xb(0,0,0,0,l,!0);return m[r]=c,m[r+"2"]=g,m}}}function ys(t){return this._axes[t]}function xs(t){pm.call(this,t)}function _s(t,e){return e.type||(e.data?"category":"value")}function bs(t,e,i){return t.getcoordsysmodel()===e}function ws(t,e){var i=e*math.pi/180,n=t.plain(),o=n.width,a=n.height,r=o*math.cos(i)+a*math.sin(i),s=o*math.sin(i)+a*math.cos(i);return new jt(n.x,n.y,r,s)}function ss(t){var e,i=t.model,n=i.getformattedlabels(),o=i.getmodel("axislabel"),a=1,r=n.length;r>40&&(a=math.ceil(r/40));for(var s=0;sn[1],l="start"===e&&!s||"start"!==e&&s;return ki(r-cm/2)?(a=l?"bottom":"top",o="center"):ki(r-1.5*cm)?(a=l?"top":"bottom",o="center"):(a="middle",o=r<1.5*cm&&r>cm/2?l?"left":"right":l?"right":"left"),{rotation:r,textalign:o,textverticalalign:a}}function ps(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerevent")||e&&e.show)}function os(t,e,i){var n=t.get("axislabel.showminlabel"),o=t.get("axislabel.showmaxlabel");e=e||[],i=i||[];var a=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(zs(a),zs(h)):ns(a,r)&&(n?(zs(r),zs(u)):(zs(a),zs(h))),!1===o?(zs(s),zs(c)):ns(l,s)&&(o?(zs(l),zs(d)):(zs(s),zs(c)))}function zs(t){t&&(t.ignore=!0)}function ns(t,e,i){var n=t&&t.getboundingrect().clone(),o=e&&e.getboundingrect().clone();if(n&&o){var a=at([]);return ht(a,a,-t.rotation),n.applytransform(st([],a,t.getlocaltransform())),o.applytransform(st([],a,e.getlocaltransform())),n.intersect(o)}}function es(t){return"middle"===t||"center"===t}function rs(t,e,i){var n=e.axis;if(e.get("axistick.show")&&!n.scale.isblank()){for(var o=e.getmodel("axistick"),a=o.getmodel("linestyle"),s=o.get("length"),l=om(o,i.labelinterval),h=n.gettickscoords(o.get("alignwithlabel")),u=n.scale.getticks(),c=e.get("axislabel.showminlabel"),d=e.get("axislabel.showmaxlabel"),f=[],g=[],p=t._transform,m=[],v=h.length,y=0;y=0||t===e}function us(t){var e=xs(t);if(e){var i=e.axispointermodel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=qs(i);null==a&&(o.status=s?"show":"hide");var l=n.getextent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=0?"p":"n",v=p[i],y=o[s][i][m],x=a[s][i][m];c.ishorizontal()?(n=y,r=v[1]+h,l=v[0]-x,g=u,a[s][i][m]+=l,math.abs(l)0?"bottom":"top":o.width>0?"left":"right";l||ol(t.style,d,n,h,a,i,g),uo(t,d)}function hl(t,e){var i=t.get(jm)||0;return math.min(i,math.abs(e.width),math.abs(e.height))}function ul(t,e,i,n){var o=e.getdata(),a=this.dataindex,r=o.getname(a),s=e.get("selectedoffset");n.dispatchaction({type:"pietoggleselect",from:t,name:r,seriesid:e.id}),o.each(function(t){cl(o.getitemgraphicel(t),o.getitemlayout(t),e.isselected(o.getname(t)),s,i)})}function cl(t,e,i,n,o){var a=(e.startangle+e.endangle)/2,r=math.cos(a),s=math.sin(a),l=i?n:0,h=[r*l,s*l];o?t.animate().when(200,{position:h}).start("bounceout"):t.attr("position",h)}function dl(t,e){function i(){a.ignore=a.hoverignore,r.ignore=r.hoverignore}function n(){a.ignore=a.normalignore,r.ignore=r.normalignore}jy.call(this);var o=new rb({z2:2}),a=new cb,r=new ib;this.add(o),this.add(a),this.add(r),this.updatedata(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function fl(t,e,i,n,o,a,r){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,o,a){for(var r=e?number.max_value:0,s=0,l=t.length;s=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=t.length,d=[],f=[],g=0;ge&&a+1t[a].y+t[a].height)return void s(a,n/2);s(i-1,n/2)}(g,c,-h),u=t[g].y+t[g].height;r-u<0&&s(c-1,u-r);for(g=0;g=i?f.push(t[g]):d.push(t[g]);l(d,!1,e,i,n,o),l(f,!0,e,i,n,o)}function gl(t,e,i,n,o,a){for(var r=[],s=[],l=0;l1?(g.width=l,g.height=l/d):(g.height=l,g.width=l*d),g.y=s[1]-g.height/2,g.x=s[0]-g.width/2}else(a=t.getboxlayoutparams()).aspect=d,g=ko(a,{width:h,height:u});this.setviewrect(g.x,g.y,g.width,g.height),this.setcenter(t.get("center")),this.setzoom(t.get("zoom"))}function tl(t,e){d(e.get("geocoord"),function(e,i){t.addgeocoord(i,e)})}function al(t,e,i){ll(t)[e]=i}function cl(t,e,i){var n=ll(t);n[e]===i&&(n[e]=null)}function dl(t,e){return!!ll(t)[e]}function ll(t){return t[bi]||(t[bi]={})}function kl(t){this.pointerchecker,this._zr=t,this._opt={};var e=m,n=e(pl,this),o=e(ol,this),a=e(zl,this),s=e(nl,this),l=e(el,this);fy.call(this),this.setpointerchecker=function(t){this.pointerchecker=t},this.enable=function(e,h){this.disable(),this._opt=r(i(h)||{},{zoomonmousewheel:!0,moveonmousemove:!0,preventdefaultmousemove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",o),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",o),t.off("mouseup",a),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isdragging=function(){return this._dragging},this.ispinching=function(){return this._pinching}}function pl(t){if(!(hi(t)||t.target&&t.target.draggable)){var e=t.offsetx,i=t.offsety;this.pointerchecker&&this.pointerchecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function ol(t){if(!hi(t)&&vl(this,"moveonmousemove",t)&&this._dragging&&"pinch"!==t.gestureevent&&!dl(this._zr,"globalpan")){var e=t.offsetx,i=t.offsety,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventdefaultmousemove&&bx(t.event),this.trigger("pan",a,r,n,o,e,i)}}function zl(t){hi(t)||(this._dragging=!1)}function nl(t){if(vl(this,"zoomonmousewheel",t)&&0!==t.wheeldelta){var e=t.wheeldelta>0?1.1:1/1.1;rl.call(this,t,e,t.offsetx,t.offsety)}}function el(t){if(!dl(this._zr,"globalpan")){var e=t.pinchscale>1?1.1:1/1.1;rl.call(this,t,e,t.pinchx,t.pinchy)}}function rl(t,e,i,n){this.pointerchecker&&this.pointerchecker(t,i,n)&&(bx(t.event),this.trigger("zoom",e,i,n))}function vl(t,e,i){var n=t._opt[e];return n&&(!_(n)||i.event[n+"key"])}function bl(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function gl(t,e,i,n){var o=t.target,a=t.zoomlimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var h=a.min||0,u=a.max||1/0;l=math.max(math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function wl(t,e,i){var n=e.getcomponentbyelement(t.toptarget),o=n&&n.coordinatesystem;return n&&n!==i&&!wi[n.maintype]&&o&&o.model!==i}function hl(t,e){var i=t.getitemstyle(),n=t.get("areacolor");return null!=n&&(i.fill=n),i}function fl(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedmode")&&(i.on("mousedown",function(){t._mousedownflag=!0}),i.on("click",function(a){if(t._mousedownflag){t._mousedownflag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.maintype?"geo":"map")+"toggleselect",batch:f(r.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.maintype+"id"]=e.id,n.dispatchaction(s),zl(e,i)}}}))}function zl(t,e){e.eachchild(function(e){d(e.__regions,function(i){e.trigger(t.isselected(i.name)?"emphasis":"normal")})})}function ul(t,e){var i=new jy;this._controller=new kl(t.getzr()),this._controllerhost={target:e?i:null},this.group=i,this._updategroup=e,this._mousedownflag}function xl(t,e,i){var n=t.getzoom(),o=t.getcenter(),a=e.zoom,r=t.datatopoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointtodata(r);t.setcenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=math.max(math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var h=t.position,u=(e.originx-h[0])*(a-1),c=(e.originy-h[1])*(a-1);h[0]-=u,h[1]-=c,t.updatetransform();o=t.pointtodata(r);t.setcenter(o),t.setzoom(a*n)}return{center:t.getcenter(),zoom:t.getzoom()}}function jl(t,e){var i={},n=["value"];return d(t,function(t){t.each(n,function(e,n){var o="ec-"+t.getname(n);i[o]=i[o]||[],isnan(e)||i[o].push(e)})}),t[0].map(n,function(n,o){for(var a="ec-"+t[0].getname(o),r=0,s=1/0,l=-1/0,h=i[a].length,u=0;u=0;o--){var a=i[o];a.hiernode={defaultancestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}function ah(t,e){var i=t.isexpand?t.children:[],n=t.parentnode.children,o=t.hiernode.i?n[t.hiernode.i-1]:null;if(i.length){uh(t);var a=(i[0].hiernode.prelim+i[i.length-1].hiernode.prelim)/2;o?(t.hiernode.prelim=o.hiernode.prelim+e(t,o),t.hiernode.modifier=t.hiernode.prelim-a):t.hiernode.prelim=a}else o&&(t.hiernode.prelim=o.hiernode.prelim+e(t,o));t.parentnode.hiernode.defaultancestor=ch(t,o,t.parentnode.hiernode.defaultancestor||n[0],e)}function rh(t){var e=t.hiernode.prelim+t.parentnode.hiernode.modifier;t.setlayout({x:e},!0),t.hiernode.modifier+=t.parentnode.hiernode.modifier}function sh(t){return arguments.length?t:mh}function lh(t,e){var i={};return t-=math.pi/2,i.x=e*math.cos(t),i.y=e*math.sin(t),i}function hh(t,e){return ko(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function uh(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var a=e[i];a.hiernode.prelim+=n,a.hiernode.modifier+=n,o+=a.hiernode.change,n+=a.hiernode.shift+o}}function ch(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentnode.children[0],s=e,l=o.hiernode.modifier,h=a.hiernode.modifier,u=r.hiernode.modifier,c=s.hiernode.modifier;s=dh(s),a=fh(a),s&&a;){o=dh(o),r=fh(r),o.hiernode.ancestor=t;var d=s.hiernode.prelim+c-a.hiernode.prelim-h+n(s,a);d>0&&(ph(gh(s,t,i),t,d),h+=d,l+=d),c+=s.hiernode.modifier,h+=a.hiernode.modifier,l+=o.hiernode.modifier,u+=r.hiernode.modifier}s&&!dh(o)&&(o.hiernode.thread=s,o.hiernode.modifier+=c-l),a&&!fh(r)&&(r.hiernode.thread=a,r.hiernode.modifier+=h-u,i=t)}return i}function dh(t){var e=t.children;return e.length&&t.isexpand?e[e.length-1]:t.hiernode.thread}function fh(t){var e=t.children;return e.length&&t.isexpand?e[0]:t.hiernode.thread}function gh(t,e,i){return t.hiernode.ancestor.parentnode===e.parentnode?t.hiernode.ancestor:i}function ph(t,e,i){var n=i/(e.hiernode.i-t.hiernode.i);e.hiernode.change-=n,e.hiernode.shift+=i,e.hiernode.modifier+=i,e.hiernode.prelim+=i,t.hiernode.change+=n}function mh(t,e){return t.parentnode===e.parentnode?1:2}function vh(t,e){var i=t.getitemlayout(e);return i&&!isnan(i.x)&&!isnan(i.y)&&"none"!==t.getitemvisual(e,"symbol")}function yh(t,e,i){return i.itemmodel=e,i.itemstyle=e.getmodel("itemstyle.normal").getitemstyle(),i.hoveritemstyle=e.getmodel("itemstyle.emphasis").getitemstyle(),i.linestyle=e.getmodel("linestyle.normal").getlinestyle(),i.labelmodel=e.getmodel("label.normal"),i.hoverlabelmodel=e.getmodel("label.emphasis"),!1===t.isexpand&&0!==t.children.length?i.symbolinnercolor=i.itemstyle.fill:i.symbolinnercolor="#fff",i}function xh(t,e,i,n,o,a){var s=!i,l=t.tree.getnodebydataindex(e),a=yh(l,l.getmodel(),a),h=t.tree.root,u=l.parentnode===h?l:l.parentnode||l,c=t.getitemgraphicel(u.dataindex),d=u.getlayout(),f=c?{x:c.position[0],y:c.position[1],rawx:c.__radialoldrawx,rawy:c.__radialoldrawy}:d,g=l.getlayout();s?(i=new jr(t,e,a)).attr("position",[f.x,f.y]):i.updatedata(t,e,a),i.__radialoldrawx=i.__radialrawx,i.__radialoldrawy=i.__radialrawy,i.__radialrawx=g.rawx,i.__radialrawy=g.rawy,n.add(i),t.setitemgraphicel(e,i),wo(i,{position:[g.x,g.y]},o);var p=i.getsymbolpath();if("radial"===a.layout){var m,v,y=h.children[0],x=y.getlayout(),_=y.children.length;if(g.x===x.x&&!0===l.isexpand){var b={};b.x=(y.children[0].getlayout().x+y.children[_-1].getlayout().x)/2,b.y=(y.children[0].getlayout().y+y.children[_-1].getlayout().y)/2,(m=math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*math.pi+m),(v=b.xx.x)||(m-=math.pi);var w=v?"left":"right";p.setstyle({textposition:w,textrotation:-m,textorigin:"center",verticalalign:"middle"})}if(l.parentnode&&l.parentnode!==h){var s=i.__edge;s||(s=i.__edge=new pb({shape:bh(a,f,f),style:r({opacity:0},a.linestyle)})),wo(s,{shape:bh(a,d,g),style:{opacity:1}},o),n.add(s)}}function _h(t,e,i,n,o,a){for(var r,s=t.tree.getnodebydataindex(e),l=t.tree.root,a=yh(s,s.getmodel(),a),h=s.parentnode===l?s:s.parentnode||s;null==(r=h.getlayout());)h=h.parentnode===l?h:h.parentnode||h;wo(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setitemgraphicel(e,null)}),i.fadeout(null,{keeplabel:!0});var u=i.__edge;u&&wo(u,{shape:bh(a,r,r),style:{opacity:0}},o,function(){n.remove(u)})}function bh(t,e,i){var n,o,a,r,s=t.orient;if("radial"===t.layout){var l=e.rawx,h=e.rawy,u=i.rawx,c=i.rawy,d=lh(l,h),f=lh(l,h+(c-h)*t.curvature),g=lh(u,c+(h-c)*t.curvature),p=lh(u,c);return{x1:d.x,y1:d.y,x2:p.x,y2:p.y,cpx1:f.x,cpy1:f.y,cpx2:g.x,cpy2:g.y}}var l=e.x,h=e.y,u=i.x,c=i.y;return"horizontal"===s&&(n=l+(u-l)*t.curvature,o=h,a=u+(l-u)*t.curvature,r=c),"vertical"===s&&(n=l,o=h+(c-h)*t.curvature,a=u,r=c+(h-c)*t.curvature),{x1:l,y1:h,x2:u,y2:c,cpx1:n,cpy1:o,cpx2:a,cpy2:r}}function wh(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isexpand){var r=n.children;if(r.length)for(var s=0;s=0;a--)n.push(o[a])}}function mh(t,e){if(t&&("treemapzoomtonode"===t.type||"treemaproottonode"===t.type)){var i=e.getdata().tree.root,n=t.targetnode;if(n&&i.contains(n))return{node:n};var o=t.targetnodeid;if(null!=o&&(n=i.getnodebyid(o)))return{node:n}}}function ih(t){for(var e=[];t;)(t=t.parentnode)&&e.push(t);return e.reverse()}function th(t,e){return l(ih(t),e)>=0}function ah(t,e){for(var i=[];t;){var n=t.dataindex;i.push({name:t.name,dataindex:n,value:e.getrawvalue(n)}),t=t.parentnode}return i.reverse(),i}function ch(t){var e=0;d(t.children,function(t){ch(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isnan(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function dh(t,e){var i=e.get("color");if(i){var n;return d(t=t||[],function(t){var e=new lo(t),i=e.get("color");(e.get("itemstyle.normal.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}}function lh(t){this.group=new jy,t.add(this.group)}function kh(t,e,i,n,o,a){var r=[[o?t:t-ci,e],[t+i,e],[t+i,e+n],[o?t:t-ci,e+n]];return!a&&r.splice(2,0,[t+i+ci,e+n/2]),!o&&r.push([t,e+n/2]),r}function ph(t,e,i){t.eventdata={componenttype:"series",componentsubtype:"treemap",seriesindex:e.componentindex,seriesname:e.name,seriestype:"treemap",selftype:"breadcrumb",nodedata:{dataindex:i&&i.dataindex,name:i&&i.name},treepathinfo:i&&ah(i,e)}}function oh(){var t,e=[],i={};return{add:function(t,n,o,a,r){return _(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function vh(t,e){var i=t.visual,n=[];b(i)?zi(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasownproperty(t.type)||(n[1]=n[0]),xh(t,n)}function bh(t){return{applyvisual:function(e,i,n){e=this.mapvaluetovisual(e),n("color",t(i("color"),e))},_domap:zh([0,1])}}function gh(t){var e=this.option.visual;return e[math.round(wi(t,[0,1],[0,e.length-1],!0))]||{}}function wh(t){return function(e,i,n){n(t,this.mapvaluetovisual(e))}}function hh(t){var e=this.option.visual;return e[this.option.loop&&t!==xi?t%e.length:t]}function fh(){return this.option.visual[0]}function zh(t){return{linear:function(e){return wi(e,t,this.option.visual,!0)},category:hh,piecewise:function(e,i){var n=uh.call(this,i);return null==n&&(n=wi(e,t,this.option.visual,!0)),n},fixed:fh}}function uh(t){var e=this.option,i=e.piecelist;if(e.hasspecialvisual){var n=i[ji.findpieceindex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function xh(t,e){return t.visual=e,"color"===t.type&&(t.parsedvisual=f(e,function(t){return mt(t)})),e}function jh(t,e,i){return t?e<=i:e=o.length||t===o[t.depth])&&qh(t,eu(r,u,t,e,p,a),i,n,o,a)})}else l=$h(u),t.setvisual("color",l)}}function yh(t,e,i,n){var o=a({},e);return d(["color","coloralpha","colorsaturation"],function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)}),o}function $h(t){var e=jh(t,"color");if(e){var i=jh(t,"coloralpha"),n=jh(t,"colorsaturation");return n&&(e=kt(e,null,null,n)),i&&(e=pt(e,i)),e}}function kh(t,e){return null!=e?kt(e,null,null,t):null}function jh(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function qh(t,e,i,n,o,a){if(a&&a.length){var r=tu(e,"color")||null!=o.color&&"none"!==o.color&&(tu(e,"coloralpha")||tu(e,"colorsaturation"));if(r){var s=e.get("visualmin"),l=e.get("visualmax"),h=i.dataextent.slice();null!=s&&sh[1]&&(h[1]=l);var u=e.get("colormappingby"),c={type:r.name,dataextent:h,visual:r.range};"color"!==c.type||"index"!==u&&"id"!==u?c.mappingmethod="linear":(c.mappingmethod="category",c.loop=!0);var d=new ji(c);return d.__drcolormappingby=u,d}}}function tu(t,e){var i=t.get(e);return $i(i)&&i.length?{name:e,range:i}:null}function eu(t,e,i,n,o,r){var s=a({},e);if(o){var l=o.type,h="color"===l&&o.__drcolormappingby,u="index"===h?n:"id"===h?r.mapidtoindex(i.getid()):i.getvalue(t.get("visualdimension"));s[l]=o.mapvaluetovisual(u)}return s}function iu(t,e,i,n){var o,a;if(!t.isremoved()){var r=t.getlayout();o=r.width,a=r.height;var s=(f=t.getmodel()).get(it),l=f.get(nt)/2,h=du(f),u=math.max(s,h),c=s-l,d=u-l,f=t.getmodel();t.setlayout({borderwidth:s,upperheight:u,upperlabelheight:h},!0);var g=(o=ji(o-2*c,0))*(a=ji(a-c-d,0)),p=nu(t,f,g,e,i,n);if(p.length){var m={x:c,y:d,width:o,height:a},v=qi(o,a),y=1/0,x=[];x.area=0;for(var _=0,b=p.length;_=0;l--){var h=o["asc"===n?r-l-1:l].getvalue();h/i*es[1]&&(s[1]=e)})}else s=[nan,nan];return{sum:n,dataextent:s}}function su(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;ro&&(o=n));var l=t.area*t.area,h=e*e*i;return l?ji(h*o/l,l/(h*a)):1/0}function lu(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],h=i[s[a]],u=e?t.area/e:0;(o||u>i[l[r]])&&(u=i[l[r]]);for(var c=0,d=t.length;crx&&(h=rx),a=s}h=0?n+=h:n-=h:g>=0?n-=h:n+=h}return n}function tu(t,e){return t.getvisual("opacity")||t.getmodel().get(e)}function au(t,e,i){var n=t.getgraphicel(),o=tu(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setstyle("opacity",o)})}function cu(t,e){var i=tu(t,e),n=t.getgraphicel();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setstyle("opacity",i)})}function du(t){return t instanceof array||(t=[t,t]),t}function lu(t){var e=t.coordinatesystem;if(!e||"view"===e.type){var i=t.getgraph();i.eachnode(function(t){var e=t.getmodel();t.setlayout([+e.get("x"),+e.get("y")])}),ku(i)}}function ku(t){t.eachedge(function(t){var e=t.getmodel().get("linestyle.normal.curveness")||0,i=v(t.node1.getlayout()),n=v(t.node2.getlayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setlayout(o)})}function pu(t){var e=t.coordinatesystem;if(!e||"view"===e.type){var i=e.getboundingrect(),n=t.getdata(),o=n.graph,a=0,r=n.getsum("value"),s=2*math.pi/(r||n.count()),l=i.width/2+i.x,h=i.height/2+i.y,u=math.min(i.width,i.height)/2;o.eachnode(function(t){var e=t.getvalue("value");a+=s*(r?e:1)/2,t.setlayout([u*math.cos(a)+l,u*math.sin(a)+h]),a+=s*(r?e:1)/2}),n.setlayout({cx:l,cy:h}),o.eachedge(function(t){var e,i=t.getmodel().get("linestyle.normal.curveness")||0,n=v(t.node1.getlayout()),o=v(t.node2.getlayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[l*(i*=3)+a*(1-i),h*i+r*(1-i)]),t.setlayout([n,o,e])})}}function ou(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l0?-1:i<0?1:e?-1:1}}function zu(t,e){return math.min(e[1],math.max(e[0],t))}function uu(t,e,i){this._axesmap=z(),this._axeslayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function xu(t,e){return nt(et(t,e[0]),e[1])}function ju(t,e){var i=e.layoutlength/(e.axiscount-1);return{position:i*t,axisnameavailablewidth:i,axislabelshow:!0}}function qu(t,e){var i,n,o=e.layoutlength,a=e.axisexpandwidth,r=e.axiscount,s=e.axiscollapsewidth,l=e.wininnerindices,h=s,u=!1;return t$t}function hc(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function uc(t,e,i,n){var o=new jy;return o.add(new db({name:"main",style:gc(i),silent:!0,draggable:!0,cursor:"move",drift:ft(t,e,o,"nswe"),ondragend:ft(sc,e,{isend:!0})})),zt(n,function(i){o.add(new db({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ft(t,e,o,i),ondragend:ft(sc,e,{isend:!0})}))}),o}function cc(t,e,i,n){var o=n.brushstyle.linewidth||0,a=jt(o,kt),r=i[0][0],s=i[1][0],l=r-o/2,h=s-o/2,u=i[0][1],c=i[1][1],d=u-a+o/2,f=c-a+o/2,g=u-r,p=c-s,m=g+o,v=p+o;fc(t,e,"main",r,s,g,p),n.transformable&&(fc(t,e,"w",l,h,a,v),fc(t,e,"e",d,h,a,v),fc(t,e,"n",l,h,m,a),fc(t,e,"s",l,f,m,a),fc(t,e,"nw",l,h,a,a),fc(t,e,"ne",d,h,a,a),fc(t,e,"sw",l,f,a,a),fc(t,e,"se",d,f,a,a))}function dc(t,e){var i=e.__brushoption,n=i.transformable,o=e.childat(0);o.usestyle(gc(i)),o.attr({silent:!n,cursor:n?"move":"default"}),zt(["w","e","n","s","se","sw","ne","nw"],function(i){var o=e.childofname(i),a=vc(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?ta[a]+"-resize":null})})}function fc(t,e,i,n,o,a,r){var s=e.childofname(i);s&&s.setshape(wc(bc(t,e,[[n,o],[n+a,o+r]])))}function gc(t){return r({strokenoscale:!0},t.brushstyle)}function pc(t,e,i,n){var o=[xt(t,i),xt(e,n)],a=[jt(t,i),jt(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function mc(t){return mo(t.group)}function vc(t,e){if(e.length>1)return("e"===(n=[vc(t,(e=e.split(""))[0]),vc(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},n=to({w:"left",e:"right",n:"top",s:"bottom"}[e],mc(t));return i[n]}function yc(t,e,i,n,o,a,r,s){var l=n.__brushoption,h=t(l.range),u=_c(i,a,r);zt(o.split(""),function(t){var e=qt[t];h[e[0]][e[1]]+=u[e[0]]}),l.range=e(pc(h[0][0],h[1][0],h[0][1],h[1][1])),ic(i,n),sc(i,{isend:!1})}function xc(t,e,i,n,o){var a=e.__brushoption.range,r=_c(t,i,n);zt(a,function(t){t[0]+=r[0],t[1]+=r[1]}),ic(t,e),sc(t,{isend:!1})}function _c(t,e,i){var n=t.group,o=n.transformcoordtolocal(e,i),a=n.transformcoordtolocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function bc(t,e,n){var o=ac(t,e);return o&&!0!==o?o.clippath(n,t._transform):i(n)}function wc(t){var e=xt(t[0][0],t[1][0]),i=xt(t[0][1],t[1][1]);return{x:e,y:i,width:jt(t[0][0],t[1][0])-e,height:jt(t[0][1],t[1][1])-i}}function sc(t,e,i){if(t._brushtype){var n=t._zr,o=t._covers,a=oc(t,e,i);if(!t._dragging)for(var r=0;r=0?e:nan}})}function bc(t){return+t.replace("dim","")}function gc(t,e){var i=0;d(t,function(t){var e=bc(t);e>i&&(i=e)});var n=e[0];n&&n.length-1>i&&(i=n.length-1);for(var o=[],a=0;a<=i;a++)o.push("dim"+a);return o}function wc(t,e,i){var n=t.model,o=t.getrect(),a=new db({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),r="horizontal"===n.get("layout")?"width":"height";return a.setshape(r,0),so(a,{shape:{width:o.width,height:o.height}},e,i),a}function hc(t,e,i,n){for(var o=[],a=0;a=i.length)return e;for(var o=-1,a=e.length,r=i[n++],s={},l={};++o=i.length)return t;var a=[],r=n[o++];return d(t,function(t,i){a.push({key:i,values:e(t,o)})}),r?a.sort(function(t,e){return r(t.key,e.key)}):a}var i=[],n=[];return{key:function(t){return i.push(t),this},sortkeys:function(t){return n[i.length-1]=t,this},entries:function(i){return e(t(i,0),0)}}}function qc(t,e){return ko(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function yc(t,e,i,n,o,a,r){kc(t,i,o),td(t,e,a,n,r),sd(t)}function $c(t){d(t,function(t){var e=ud(t.outedges,gd),i=ud(t.inedges,gd),n=math.max(e,i);t.setlayout({value:n},!0)})}function kc(t,e,i){for(var n=t,o=null,a=0;n.length;){o=[];for(var r=0,s=n.length;r0;o--)nd(a,r*=.99),id(a,n,i),ad(a,r),id(a,n,i)}function ed(t,e,i,n,o){var a=[];d(e,function(t){var e=t.length,i=0;d(t,function(t){i+=t.getlayout().value});var r=(n-(e-1)*o)/i;a.push(r)}),a.sort(function(t,e){return t-e});var r=a[0];d(e,function(t){d(t,function(t,e){t.setlayout({y:e},!0);var i=t.getlayout().value*r;t.setlayout({dy:i},!0)})}),d(i,function(t){var e=+t.getvalue()*r;t.setlayout({dy:e},!0)})}function id(t,e,i){d(t,function(t){var n,o,a,r=0,s=t.length;for(t.sort(dd),a=0;a0){l=n.getlayout().y+o;n.setlayout({y:l},!0)}r=n.getlayout().y+n.getlayout().dy+e}if((o=r-e-i)>0){var l=n.getlayout().y-o;for(n.setlayout({y:l},!0),r=n.getlayout().y,a=s-2;a>=0;--a)(o=(n=t[a]).getlayout().y+n.getlayout().dy+e-r)>0&&(l=n.getlayout().y-o,n.setlayout({y:l},!0)),r=n.getlayout().y}})}function nd(t,e){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outedges.length){var i=ud(t.outedges,od)/ud(t.outedges,gd),n=t.getlayout().y+(i-cd(t))*e;t.setlayout({y:n},!0)}})})}function od(t){return cd(t.node2)*t.getvalue()}function ad(t,e){d(t,function(t){d(t,function(t){if(t.inedges.length){var i=ud(t.inedges,rd)/ud(t.inedges,gd),n=t.getlayout().y+(i-cd(t))*e;t.setlayout({y:n},!0)}})})}function rd(t){return cd(t.node1)*t.getvalue()}function sd(t){d(t,function(t){t.outedges.sort(ld),t.inedges.sort(hd)}),d(t,function(t){var e=0,i=0;d(t.outedges,function(t){t.setlayout({sy:e},!0),e+=t.getlayout().dy}),d(t.inedges,function(t){t.setlayout({ty:i},!0),i+=t.getlayout().dy})})}function ld(t,e){return t.node2.getlayout().y-e.node2.getlayout().y}function hd(t,e){return t.node1.getlayout().y-e.node1.getlayout().y}function ud(t,e){for(var i=0,n=t.length,o=-1;++oe?1:t===e?0:nan}function gd(t){return t.getvalue()}function pd(t,e,i,n){jy.call(this),this.bodyindex,this.whiskerindex,this.styleupdater=i,this._createcontent(t,e,n),this.updatedata(t,e,n),this._seriesmodel}function md(t,e,i){return f(t,function(t){return t=t.slice(),t[e]=i.initbaseline,t})}function vd(t){var e={};return d(t,function(t,i){e["ends"+i]=t}),e}function yd(t){this.group=new jy,this.styleupdater=t}function xd(t,e,i){var n=e.getitemmodel(i),o=n.getmodel(ma),a=e.getitemvisual(i,"color"),r=o.getitemstyle(["bordercolor"]),s=t.childat(t.whiskerindex);s.style.set(r),s.style.stroke=a,s.dirty();var l=t.childat(t.bodyindex);l.style.set(r),l.style.stroke=a,l.dirty(),uo(t,n.getmodel(va).getitemstyle())}function _d(t){var e=[],i=[];return t.eachseriesbytype("boxplot",function(t){var n=t.getbaseaxis(),o=l(i,n);o<0&&(o=i.length,i[o]=n,e[o]={axis:n,seriesmodels:[]}),e[o].seriesmodels.push(t)}),e}function bd(t){var e,i,n=t.axis,o=t.seriesmodels,a=o.length,r=t.boxwidthlist=[],s=t.boxoffsetlist=[],l=[];if("category"===n.type)i=n.getbandwidth();else{var h=0;xa(o,function(t){h=math.max(h,t.getdata().count())}),e=n.getextent(),math.abs(e[1]-e[0])}xa(o,function(t){var e=t.get("boxwidth");y(e)||(e=[e,e]),l.push([si(e[0],i)||0,si(e[1],i)||0])});var u=.8*i-2,c=u/a*.3,d=(u-c*(a-1))/a,f=d/2-u/2;xa(o,function(t,e){s.push(f),f+=c+d,r.push(math.min(math.max(d,l[e][0]),l[e][1]))})}function wd(t,e,i){var n,o=t.coordinatesystem,a=t.getdata(),r=i/2,s=t.get("layout"),l="horizontal"===s?0:1,h=1-l,u=["x","y"],c=[];d(a.dimensions,function(t){var e=a.getdimensioninfo(t).coorddim;e===u[h]?c.push(t):e===u[l]&&(n=t)}),null==n||c.length<5||a.each([n].concat(c),function(){function t(t){var i=[];i[l]=d,i[h]=t;var n;return isnan(d)||isnan(t)?n=[nan,nan]:(n=o.datatopoint(i))[l]+=e,n}function i(t,e){var i=t.slice(),n=t.slice();i[l]+=r,n[l]-=r,e?y.push(i,n):y.push(n,i)}function n(t){var e=[t.slice(),t.slice()];e[0][l]-=r,e[1][l]+=r,v.push(e)}var u=arguments,d=u[0],f=u[c.length+1],g=t(u[3]),p=t(u[1]),m=t(u[5]),v=[[p,t(u[2])],[m,t(u[4])]];n(p),n(m),n(g);var y=[];i(v[0][1],0),i(v[1][1],1),a.setitemlayout(f,{chartlayout:s,initbaseline:g[h],median:g,bodyends:y,whiskerends:v})})}function sd(t,e,i){var n=e.getitemmodel(i),o=n.getmodel(_a),a=e.getitemvisual(i,"color"),r=e.getitemvisual(i,"bordercolor")||a,s=o.getitemstyle(["color","color0","bordercolor","bordercolor0"]),l=t.childat(t.whiskerindex);l.usestyle(s),l.style.stroke=r;var h=t.childat(t.bodyindex);h.usestyle(s),h.style.fill=a,h.style.stroke=r,uo(t,n.getmodel(ba).getitemstyle())}function md(t,e){var i,n=t.getbaseaxis(),o="category"===n.type?n.getbandwidth():(i=n.getextent(),math.abs(i[1]-i[0])/e.count()),a=si(ta(t.get("barmaxwidth"),o),o),r=si(ta(t.get("barminwidth"),1),o),s=t.get("barwidth");return null!=s?si(s,o):math.max(math.min(o/2,a),r)}function id(t){return y(t)||(t=[+t,+t]),t}function td(t,e){t.eachchild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushtype?e.color:null,fill:"fill"===e.brushtype?e.color:null}})})}function ad(t,e){jy.call(this);var i=new jr(t,e),n=new jy;this.add(i),this.add(n),n.beforeupdate=function(){this.attr(i.getscale())},this.updatedata(t,e)}function cd(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=f(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromname=t[0].name),t[1].name&&(e.toname=t[1].name),o([e,t[0],t[1]])}))}function dd(t,e,i){jy.call(this),this.add(this.createline(t,e,i)),this._updateeffectsymbol(t,e)}function ld(t,e,i){jy.call(this),this._createpolyline(t,e,i)}function kd(t,e,i){dd.call(this,t,e,i),this._lastframe=0,this._lastframepercent=0}function pd(){this.group=new jy,this._lineel=new pa}function od(t){return t instanceof array||(t=[t,t]),t}function zd(){var t=iy();this.canvas=t,this.blursize=30,this.pointsize=20,this.maxopacity=1,this.minopacity=0,this._gradientpixels={}}function nd(t,e,i){var n=t[1]-t[0],o=(e=f(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}})).length,a=0;return function(t){for(n=a;n=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){a=n;break}}return n>=0&&n=e[0]&&t<=e[1]}}function rd(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function vd(t,e,i,n){var o=t.getitemlayout(e),a=i.get("symbolrepeat"),r=i.get("symbolclip"),s=i.get("symbolposition")||"start",l=(i.get("symbolrotate")||0)*math.pi/180||0,h=i.get("symbolpatternsize")||2,u=i.isanimationenabled(),c={dataindex:e,layout:o,itemmodel:i,symboltype:t.getitemvisual(e,"symbol")||"circle",color:t.getitemvisual(e,"color"),symbolclip:r,symbolrepeat:a,symbolrepeatdirection:i.get("symbolrepeatdirection"),symbolpatternsize:h,rotation:l,animationmodel:u?i:null,hoveranimation:u&&i.get("hoveranimation"),z2:i.getshallow("z",!0)||0};bd(i,a,o,n,c),wd(t,e,o,a,r,c.boundinglength,c.pxsign,h,n,c),hd(i,c.symbolscale,l,n,c);var d=c.symbolsize,f=i.get("symboloffset");return y(f)&&(f=[si(f[0],d[0]),si(f[1],d[1])]),fd(i,d,o,a,r,f,s,c.valuelinewidth,c.boundinglength,c.repeatcutlength,n,c),c}function bd(t,e,i,n,o){var a,r=n.valuedim,s=t.get("symbolboundingdata"),l=n.coordsys.getotheraxis(n.coordsys.getbaseaxis()),h=l.toglobalcoord(l.datatocoord(0)),u=1-+(i[r.wh]<=0);if(y(s)){var c=[gd(l,s[0])-h,gd(l,s[1])-h];c[1]0?1:a<0?-1:0}function gd(t,e){return t.toglobalcoord(t.datatocoord(t.scale.parse(e)))}function wd(t,e,i,n,o,a,r,s,l,h){var u=l.valuedim,c=l.categorydim,d=math.abs(i[c.wh]),f=t.getitemvisual(e,"symbolsize");y(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=si(f[c.index],d),f[u.index]=si(f[u.index],n?d:math.abs(a)),h.symbolsize=f,(h.symbolscale=[f[0]/s,f[1]/s])[u.index]*=(l.ishorizontal?-1:1)*r}function hd(t,e,i,n,o){var a=t.get(na)||0;a&&(ra.attr({scale:e.slice(),rotation:i}),ra.updatetransform(),a/=ra.getlinescale(),a*=e[n.valuedim.index]),o.valuelinewidth=a}function fd(t,e,i,n,o,r,s,l,h,u,c,d){var f=c.categorydim,g=c.valuedim,p=d.pxsign,m=math.max(e[g.index]+l,0),v=m;if(n){var y=math.abs(h),x=i(t.get("symbolmargin"),"15%")+"",_=!1;x.lastindexof("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=si(x,e[g.index]);var b=math.max(m+2*x,0),w=_?0:2*x,s=ri(n),m=s?n:sf((y+w)/b);b=m+2*(x=(y-m*m)/2/(_?m:m-1)),w=_?0:2*x,s||"fixed"===n||(m=u?sf((math.abs(u)+w)/b):0),v=m*b-w,d.repeattimes=m,d.symbolmargin=x}var t=p*(v/2),a=d.pathposition=[];a[f.index]=i[f.wh]/2,a[g.index]="start"===s?t:"end"===s?h-t:h/2,r&&(a[0]+=r[0],a[1]+=r[1]);var c=d.bundleposition=[];c[f.index]=i[f.xy],c[g.index]=i[g.xy];var d=d.barrectshape=a({},i);d[g.wh]=p*math.max(math.abs(i[g.wh]),math.abs(a[g.index]+t)),d[f.wh]=i[f.wh];var l=d.clipshape={};l[f.xy]=-i[f.xy],l[f.wh]=c.ecsize[f.wh],l[g.xy]=0,l[g.wh]=i[g.wh]}function zd(t){var e=t.symbolpatternsize,i=hr(t.symboltype,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setstyle({strokenoscale:!0}),i}function ud(t,e,i,n){function o(t){var e=l.slice(),n=i.pxsign,o=t;return("start"===i.symbolrepeatdirection?n>0:n<0)&&(o=u-1-t),e[h.index]=d*(o-u/2+.5)+l[h.index],{position:e,scale:i.symbolscale.slice(),rotation:i.rotation}}var a=t.__pictorialbundle,r=i.symbolsize,s=i.valuelinewidth,l=i.pathposition,h=e.valuedim,u=i.repeattimes||0,c=0,d=r[e.valuedim.index]+s+2*i.symbolmargin;for(of(t,function(t){t.__pictorialanimationindex=c,t.__pictorialrepeattimes=u,c0)],d=t.__pictorialbarrect;ol(d.style,u,a,n,e.seriesmodel,o,c),uo(d,u)}function sf(t){var e=math.round(t);return math.abs(t-e)<1e-4?e:math.ceil(t)}function lf(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function hf(t,e){e=e||{};var i=t.coordinatesystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.getrect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],h={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?h.vertical[a]:l[0],"horizontal"===r?h.horizontal[a]:l[3]];var u={horizontal:0,vertical:1};o.rotation=math.pi/2*u[r];var c={top:-1,bottom:1,right:1,left:-1};o.labeldirection=o.tickdirection=o.namedirection=c[a],t.get("axistick.inside")&&(o.tickdirection=-o.tickdirection),i(e.labelinside,t.get("axislabel.inside"))&&(o.labeldirection=-o.labeldirection);var d=e.rotate;return null==d&&(d=t.get("axislabel.rotate")),o.labelrotation="top"===a?-d:d,o.labelinterval=n.getlabelinterval(),o.z2=1,o}function uf(t,e,i,n,o){var r=t.axis;if(!r.scale.isblank()&&r.containdata(e))if(t.involveseries){var s=cf(e,t),l=s.payloadbatch,h=s.snaptovalue;l[0]&&null==o.seriesindex&&a(o,l[0]),!n&&t.snap&&r.containdata(h)&&null!=h&&(e=h),i.showpointer(t,e,l,o),i.showtooltip(t,s,h)}else i.showpointer(t,e)}function cf(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=number.max_value,s=-1;return xa(e.seriesmodels,function(e,l){var h,u,c=e.coorddimtodatadim(n);if(e.getaxistooltipdata){var d=e.getaxistooltipdata(c,t,i);u=d.dataindices,h=d.nestestvalue}else{if(!(u=e.getdata().indicesofnearest(c[0],t,!1,"category"===i.type?.5:null)).length)return;h=e.getdata().get(c[0],u[0])}if(null!=h&&isfinite(h)){var f=t-h,g=math.abs(f);g<=r&&((g=0&&s<0)&&(r=g,s=f,o=h,a.length=0),xa(u,function(t){a.push({seriesindex:e.seriesindex,dataindexinside:t,dataindex:e.getdata().getrawindex(t)})}))}}),{payloadbatch:a,snaptovalue:o}}function df(t,e,i,n){t[e.key]={value:i,payloadbatch:n}}function ff(t,e,i,n){var o=i.payloadbatch,a=e.axis,r=a.model,s=e.axispointermodel;if(e.triggertooltip&&o.length){var l=e.coordsys.model,h=ys(l),u=t.map[h];u||(u=t.map[h]={coordsysid:l.id,coordsysindex:l.componentindex,coordsystype:l.type,coordsysmaintype:l.maintype,databyaxis:[]},t.list.push(u)),u.databyaxis.push({axisdim:a.dim,axisindex:r.componentindex,axistype:r.type,axisid:r.id,value:n,valuelabelopt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesdataindices:o.slice()})}}function gf(t,e,i){var n=i.axesinfo=[];xa(e,function(e,i){var o=e.axispointermodel.option,a=t[i];a?(!e.usehandle&&(o.status="show"),o.value=a.value,o.seriesdataindices=(a.payloadbatch||[]).slice()):!e.usehandle&&(o.status="hide"),"show"===o.status&&n.push({axisdim:e.axis.dim,axisindex:e.axis.model.componentindex,value:o.value})})}function pf(t,e,i,n){if(!xf(e)&&t.list.length){var o=((t.list[0].databyaxis[0]||{}).seriesdataindices||[])[0]||{};n({type:"showtip",escapeconnect:!0,x:e[0],y:e[1],tooltipoption:i.tooltipoption,position:i.position,dataindexinside:o.dataindexinside,dataindex:o.dataindex,seriesindex:o.seriesindex,databycoordsys:t.list})}else n({type:"hidetip"})}function mf(t,e,i){var n=i.getzr(),o=qa(n).axispointerlasthighlights||{},a=qa(n).axispointerlasthighlights={};xa(t,function(t,e){var i=t.axispointermodel.option;"show"===i.status&&xa(i.seriesdataindices,function(t){var e=t.seriesindex+" | "+t.dataindex;a[e]=t})});var r=[],s=[];d(o,function(t,e){!a[e]&&s.push(t)}),d(a,function(t,e){!o[e]&&r.push(t)}),s.length&&i.dispatchaction({type:"downplay",escapeconnect:!0,batch:s}),r.length&&i.dispatchaction({type:"highlight",escapeconnect:!0,batch:r})}function vf(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisdim&&e.axis.model.componentindex===n.axisindex)return n}}function yf(t){var e=t.axis.model,i={},n=i.axisdim=t.axis.dim;return i.axisindex=i[n+"axisindex"]=e.componentindex,i.axisname=i[n+"axisname"]=e.name,i.axisid=i[n+"axisid"]=e.id,i}function xf(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function _f(t,e,i){if(!uv.node){var n=e.getzr();ya(n).records||(ya(n).records={}),bf(n,e),(ya(n).records[t]||(ya(n).records[t]={})).handler=i}}function bf(t,e){function i(i,n){t.on(i,function(i){var o=if(e);$a(ya(t).records,function(t){t&&n(t,i,o.dispatchaction)}),wf(o.pendings,e)})}ya(t).initialized||(ya(t).initialized=!0,i("click",v(mf,"click")),i("mousemove",v(mf,"mousemove")),i("globalout",sf))}function wf(t,e){var i,n=t.showtip.length,o=t.hidetip.length;n?i=t.showtip[n-1]:o&&(i=t.hidetip[o-1]),i&&(i.dispatchaction=null,e.dispatchaction(i))}function sf(t,e,i){t.handler("leave",null,i)}function mf(t,e,i,n){e.handler(t,i,n)}function if(t){var e={showtip:[],hidetip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchaction=i,t.dispatchaction(n))};return{dispatchaction:i,pendings:e}}function tf(t,e){if(!uv.node){var i=e.getzr();(ya(i).records||{})[t]&&(ya(i).records[t]=null)}}function af(){}function cf(t,e,i,n){df(ja(i).lastprop,n)||(ja(i).lastprop=n,e?wo(i,n,t):(i.stopanimation(),i.attr(n)))}function df(t,e){if(b(t)&&b(e)){var i=!0;return d(e,function(e,n){i=i&&df(t[n],e)}),!!i}return t===e}function lf(t,e){t[e.get("label.show")?"show":"hide"]()}function kf(t){return{position:t.position.slice(),rotation:t.rotation||0}}function pf(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function of(t){var e,i=t.get("type"),n=t.getmodel(i+"style");return"line"===i?(e=n.getlinestyle()).fill=null:"shadow"===i&&((e=n.getareastyle()).stroke=null),e}function zf(t,e,i,n,o){var a=ef(i.get("value"),e.axis,e.ecmodel,i.get("seriesdataindices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getmodel("label"),s=gx(r.get("padding")||0),l=r.getfont(),h=de(a,l),u=o.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],f=o.align;"right"===f&&(u[0]-=c),"center"===f&&(u[0]-=c/2);var g=o.verticalalign;"bottom"===g&&(u[1]-=d),"middle"===g&&(u[1]-=d/2),nf(u,c,d,n);var p=r.get("backgroundcolor");p&&"auto"!==p||(p=e.get("axisline.linestyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderradius")},position:u.slice(),style:{text:a,textfont:l,textfill:r.gettextcolor(),textposition:"inside",fill:p,stroke:r.get("bordercolor")||"transparent",linewidth:r.get("borderwidth")||0,shadowblur:r.get("shadowblur"),shadowcolor:r.get("shadowcolor"),shadowoffsetx:r.get("shadowoffsetx"),shadowoffsety:r.get("shadowoffsety")},z2:10}}function nf(t,e,i,n){var o=n.getwidth(),a=n.getheight();t[0]=math.min(t[0]+e,o)-e,t[1]=math.min(t[1]+i,a)-i,t[0]=math.max(t[0],0),t[1]=math.max(t[1],0)}function ef(t,e,i,n,o){var a=e.scale.getlabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:br(e,t),seriesdata:[]};d(n,function(t){var e=i.getseriesbyindex(t.seriesindex),n=t.dataindexinside,o=e&&e.getdataparams(n);o&&s.seriesdata.push(o)}),_(r)?a=r.replace("{value}",a):x(r)&&(a=r(s))}return a}function rf(t,e,i){var n=ot();return ht(n,n,i.rotation),lt(n,n,i.position),io([t.datatocoord(e),(i.labeloffset||0)+(i.labeldirection||1)*(i.labelmargin||0)],n)}function vf(t,e,i,n,o,a){var r=dm.innertextlayout(i.rotation,0,i.labeldirection);i.labelmargin=o.get("label.margin"),zf(e,n,o,a,{position:rf(n.axis,t,i),align:r.textalign,verticalalign:r.textverticalalign})}function bf(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function gf(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function wf(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startangle:o,endangle:a,clockwise:!0}}function hf(t,e){var i={};return i[e.dim+"axisindex"]=e.index,t.getcartesian(i)}function ff(t){return"x"===t.dim?0:1}function zf(t){return t.ishorizontal()?0:1}function uf(t,e){var i=t.getrect();return[i[nc[e]],i[nc[e]]+i[oc[e]]]}function xf(t,e,i){var n=new db({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return so(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function jf(t,e,i){if(t.count())for(var n,o=e.coordinatesystem,a=e.getlayerseries(),r=f(a,function(e){return f(e.indices,function(e){var i=o.datatopoint(t.get("time",e));return i[1]=t.get("value",e),i})}),s=qf(r),l=s.y0,h=i/s.max,u=a.length,c=a[0].indices.length,d=0;da&&(a=h),n.push(h)}for(var u=0;ua&&(a=d)}return r.y0=o,r.max=a,r}function yf(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getaxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getbandwidth():math.abs(o.datatocoord(a-r)-o.datatocoord(a+r))},this)}function $f(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],math.abs(this.datatopoint(a)[i]-this.datatopoint(r)[i])},this)}function kf(t,e){var i=this.getaxis(),n=e instanceof array?e[0]:e,o=(t instanceof array?t[0]:t)/2;return"category"===i.type?i.getbandwidth():math.abs(i.datatocoord(n-o)-i.datatocoord(n+o))}function jf(t,e){return f(["radius","angle"],function(i,n){var o=this["get"+i+"axis"](),a=e[n],r=t[n]/2,s="datato"+i,l="category"===o.type?o.getbandwidth():math.abs(o[s](a-r)-o[s](a+r));return"angle"===i&&(l=l*math.pi/180),l},this)}function qf(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=un(n.pathdata,null,{x:n.x||0,y:n.y||0,width:n.width||0,height:n.height||0},"center")).__custompathdata=t.pathdata}else"image"===i?(e=new qe({})).__customimagepath=t.style.image:"text"===i?(e=new ib({})).__customtext=t.style.text:e=new(0,tb[i.charat(0).touppercase()+i.slice(1)]);return e.__customgraphictype=i,e.name=t.name,e}function tg(t,e,n,o,a,r){var s={},l=n.style||{};if(n.shape&&(s.shape=i(n.shape)),n.position&&(s.position=n.position.slice()),n.scale&&(s.scale=n.scale.slice()),n.origin&&(s.origin=n.origin.slice()),n.rotation&&(s.rotation=n.rotation),"image"===t.type&&n.style){h=s.style={};d(["x","y","width","height"],function(e){eg(e,h,l,t.style,r)})}if("text"===t.type&&n.style){var h=s.style={};d(["x","y"],function(e){eg(e,h,l,t.style,r)}),!l.hasownproperty("textfill")&&l.fill&&(l.textfill=l.fill),!l.hasownproperty("textstroke")&&l.stroke&&(l.textstroke=l.stroke)}if("group"!==t.type&&(t.usestyle(l),r)){t.style.opacity=0;var u=l.opacity;null==u&&(u=1),so(t,{style:{opacity:u}},o,e)}r?t.attr(s):wo(t,s,o,e),t.attr({z2:n.z2||0,silent:n.silent}),!1!==n.styleemphasis&&uo(t,n.styleemphasis)}function eg(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function ig(t,e,i,n){function o(t){null==t&&(t=u),y&&(c=e.getitemmodel(t),d=c.getmodel(uc),f=c.getmodel(cc),g=yr(e),p=e.getitemvisual(t,"color"),y=!1)}var s=t.get("renderitem"),l=t.coordinatesystem,h={};l&&(h=l.preparecustoms?l.preparecustoms():fc[l.type](l));var u,c,d,f,g,p,m=r({getwidth:n.getwidth,getheight:n.getheight,getzr:n.getzr,getdevicepixelratio:n.getdevicepixelratio,value:function(t,i){return null==i&&(i=u),e.get(e.getdimension(t||0),i)},style:function(i,n){null==n&&(n=u),o(n);var r=c.getmodel(lc).getitemstyle();null!=p&&(r.fill=p);var s=e.getitemvisual(n,"opacity");return null!=s&&(r.opacity=s),null!=g&&(fo(r,d,null,{autocolor:p,isrecttext:!0}),r.text=d.getshallow("show")?t(t.getformattedlabel(n,"normal"),e.get(g,n)):null),i&&a(r,i),r},styleemphasis:function(i,n){null==n&&(n=u),o(n);var r=c.getmodel(hc).getitemstyle();return null!=g&&(fo(r,f,null,{isrecttext:!0},!0),r.text=f.getshallow("show")?a(t.getformattedlabel(n,"emphasis"),t.getformattedlabel(n,"normal"),e.get(g,n)):null),i&&a(r,i),r},visual:function(t,i){return null==i&&(i=u),e.getitemvisual(i,t)},barlayout:function(t){if(l.getbaseaxis){var e=l.getbaseaxis();return nl.getlayoutonaxis(r({axis:e},t),n)}},currentseriesindices:function(){return i.getcurrentseriesindices()},font:function(t){return _o(t,i)}},h.api||{}),v={context:{},seriesid:t.id,seriesname:t.name,seriesindex:t.seriesindex,coordsys:h.coordsys,datainsidelength:e.count(),encode:ng(t.getdata())},y=!0;return function(t){return u=t,y=!0,s&&s(r({dataindexinside:t,dataindex:e.getrawindex(t)},v),m)||{}}}function ng(t){var e={};return d(t.dimensions,function(i,n){var o=t.getdimensioninfo(i);if(!o.isextracoord){var a=o.coorddim;(e[a]=e[a]||[])[o.coorddimindex]=n}}),e}function og(t,e,i,n,o,a){(t=ag(t,e,i,n,o,a))&&a.setitemgraphicel(e,t)}function ag(t,e,i,n,o,a){var r=i.type;if(!t||r===t.__customgraphictype||"path"===r&&i.pathdata===t.__custompathdata||"image"===r&&i.style.image===t.__customimagepath||"text"===r&&i.style.text===t.__customtext||(o.remove(t),t=null),null!=r){var s=!t;if(!t&&(t=qf(i)),tg(t,e,i,n,a,s),"group"===r){var l=t.children()||[],h=i.children||[];if(i.diffchildrenbyname)rg({oldchildren:l,newchildren:h,dataindex:e,animatablemodel:n,group:t,data:a});else{for(var u=0;un?t-=l+a:t+=a),null!=r&&(e+h+r>o?e-=h+r:e+=r),[t,e]}function kg(t,e,i,n,o){var a=pg(i),r=a.width,s=a.height;return t=math.min(t+r,n)-r,e=math.min(e+s,o)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}function pg(t){var e=t.clientwidth,i=t.clientheight;if(document.defaultview&&document.defaultview.getcomputedstyle){var n=document.defaultview.getcomputedstyle(t);n&&(e+=parseint(n.paddingleft,10)+parseint(n.paddingright,10)+parseint(n.borderleftwidth,10)+parseint(n.borderrightwidth,10),i+=parseint(n.paddingtop,10)+parseint(n.paddingbottom,10)+parseint(n.bordertopwidth,10)+parseint(n.borderbottomwidth,10))}return{width:e,height:i}}function og(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}function zg(t){return"center"===t||"middle"===t}function ng(t){return t.get("stack")||"__ec_stack_"+t.seriesindex}function eg(t){return t.dim}function rg(t,e){var i={};d(t,function(t,e){var n=t.getdata(),o=t.coordinatesystem.getbaseaxis(),a=o.getextent(),r="category"===o.type?o.getbandwidth():math.abs(a[1]-a[0])/n.count(),s=i[eg(o)]||{bandwidth:r,remainedwidth:r,autowidthcount:0,categorygap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[eg(o)]=s;var h=ng(t);l[h]||s.autowidthcount++,l[h]=l[h]||{width:0,maxwidth:0};var u=si(t.get("barwidth"),r),c=si(t.get("barmaxwidth"),r),d=t.get("bargap"),f=t.get("barcategorygap");u&&!l[h].width&&(u=math.min(s.remainedwidth,u),l[h].width=u,s.remainedwidth-=u),c&&(l[h].maxwidth=c),null!=d&&(s.gap=d),null!=f&&(s.categorygap=f)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,o=t.bandwidth,a=si(t.categorygap,o),r=si(t.gap,1),s=t.remainedwidth,l=t.autowidthcount,h=(s-a)/(l+(l-1)*r);h=math.max(h,0),d(i,function(t,e){var i=t.maxwidth;i&&ie[0]&&(e=e.slice().reverse());var n=t.coordtopoint([e[0],i]),o=t.coordtopoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function ug(t){return t.getradiusaxis().inverse?0:1}function xg(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*math.pi,labeldirection:-1,tickdirection:-1,namedirection:1,labelrotate:e.getmodel("axislabel").get("rotate"),z2:1}}function jg(t,e,i,n,o){var a=e.axis,r=a.datatocoord(t),s=n.getangleaxis().getextent()[0];s=s/180*math.pi;var l,h,u,c=n.getradiusaxis().getextent();if("radius"===a.dim){var d=ot();ht(d,d,s),lt(d,d,[n.cx,n.cy]),l=io([r,-o],d);var f=e.getmodel("axislabel").get("rotate")||0,g=dm.innertextlayout(s,f*math.pi/180,-1);h=g.textalign,u=g.textverticalalign}else{var p=c[1];l=n.coordtopoint([p+o,r]);var m=n.cx,v=n.cy;h=math.abs(l[0]-m)/p<.3?"center":l[0]>m?"left":"right",u=math.abs(l[1]-v)/p<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:h,verticalalign:u}}function qg(t,e){e.update="updateview",ir(e,function(e,i){var n={};return i.eachcomponent({maintype:"geo",query:e},function(i){i[t](e.name),d(i.coordinatesystem.regions,function(t){n[t.name]=i.isselected(t.name)||!1})}),{selected:n,name:e.name}})}function yg(t){var e={};d(t,function(t){e[t]=1}),t.length=0,d(e,function(e,i){t.push(i)})}function $g(t){if(t)for(var e in t)if(t.hasownproperty(e))return!0}function kg(t,e,n){function o(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return hc(e,function(e){var r=a[e]=o();hc(t[e],function(t,o){if(ji.isvalidtype(o)){var a={type:o,visual:t};n&&n(a,e),r[o]=new ji(a),"opacity"===o&&((a=i(a)).type="coloralpha",r.__hidden.__alphaforopacity=new ji(a))}})}),a}function jg(t,e,n){var o;d(n,function(t){e.hasownproperty(t)&&$g(e[t])&&(o=!0)}),o&&d(n,function(n){e.hasownproperty(n)&&$g(e[n])?t[n]=i(e[n]):delete t[n]})}function qg(t,e,i,n,o,a){function r(t){return i.getitemvisual(u,t)}function s(t,e){i.setitemvisual(u,t,e)}function l(t,l){u=null==a?t:l;var c=i.getrawdataitem(u);if(!c||!1!==c.visualmap)for(var d=n.call(o,t),f=e[d],g=h[d],p=0,m=g.length;p1)return!1;var u=ap(i-t,o-t,n-e,a-e)/l;return!(u<0||u>1)}function op(t){return t<=1e-6&&t>=-1e-6}function ap(t,e,i,n){return t*n-e*i}function rp(t,e,i){var n=this._targetinfolist=[],o={},a=lp(e,t);zc($c,function(t,e){(!i||!i.include||uc(i.include,e)>=0)&&t(a,n,o)})}function sp(t){return t[0]>t[1]&&t.reverse(),t}function lp(t,e){return fo(t,e,{includemaintypes:qc})}function hp(t,e,i,n){var o=i.getaxis(["x","y"][t]),a=sp(f([0,1],function(t){return e?o.coordtodata(o.tolocalcoord(n[t])):o.toglobalcoord(o.datatocoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[nan,nan],{values:a,xyminmax:r}}function up(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function cp(t,e){var i=dp(t),n=dp(e),o=[i[0]/n[0],i[1]/n[1]];return isnan(o[0])&&(o[0]=1),isnan(o[1])&&(o[1]=1),o}function dp(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[nan,nan]}function fp(t,e,i,n,o){if(o){var a=t.getzr();a[nd]||(a[id]||(a[id]=gp),la(a,id,i,e)(t,n))}}function gp(t,e){if(!t.isdisposed()){var i=t.getzr();i[nd]=!0,t.dispatchaction({type:"brushselect",batch:e}),i[nd]=!1}}function pp(t,e,i,n){for(var o=0,a=e.length;o=0}function dp(t,e,i){function n(t,e){return l(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){var r={nodes:[],records:{}};if(e(function(t){r.records[t.name]={}}),!i)return r;a(i,r);var s;do{s=!1,t(function(t){!n(t,r)&&o(t,r)&&(a(t,r),s=!0)})}while(s);return r}}function lp(t,e,i){var n=[1/0,-1/0];return md(i,function(t){var i=t.getdata();i&&md(t.coorddimtodatadim(e),function(t){var e=i.getdataextent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:nan);var r=i.getmax(!0);return null!=r&&"datamax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:nan),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function pp(t,e){var i=t.getaxismodel(),n=t._percentwindow,o=t._valuewindow;if(n){var a=ci(o,[0,500]);a=math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setrange(r?null:+o[0].tofixed(a),r?null:+o[1].tofixed(a))}}function op(t){var e=t._minmaxspan={},i=t._datazoommodel;md(["min","max"],function(n){e[n+"span"]=i.get(n+"span");var o=i.get(n+"valuespan");if(null!=o&&(e[n+"valuespan"]=o,null!=(o=t.getaxismodel().axis.scale.parse(o)))){var a=t._dataextent;e[n+"span"]=wi(a[0]+o,a,[0,100],!0)}})}function zp(t){var e={};return xd(["start","end","startvalue","endvalue","throttle"],function(i){t.hasownproperty(i)&&(e[i]=t[i])}),e}function np(t,e){var i=t._rangepropmode,n=t.get("rangemode");xd([["start","startvalue"],["end","endvalue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function ep(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function rp(t){return"vertical"===t?"ns-resize":"ew-resize"}function vp(t,e){var i=hp(t),n=e.datazoomid,o=e.coordid;d(i,function(t,i){var a=t.datazoominfos;a[n]&&l(e.allcoordids,o)<0&&(delete a[n],t.count--)}),zp(i);var a=i[o];a||((a=i[o]={coordid:o,datazoominfos:{},count:0}).controller=fp(t,a),a.dispatchaction=v(qp,t)),!a.datazoominfos[n]&&a.count++,a.datazoominfos[n]=e;var r=yp(a.datazoominfos);a.controller.enable(r.controltype,r.opt),a.controller.setpointerchecker(e.containspoint),la(a,"dispatchaction",e.throttlerate,"fixrate")}function bp(t,e){var i=hp(t);d(i,function(t){t.controller.dispose();var i=t.datazoominfos;i[e]&&(delete i[e],t.count--)}),zp(i)}function gp(t,e){if(t&&"datazoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;in[e]&&(e=o),a(i,t.roamcontrolleropt)}),{controltype:e,opt:i}}function $p(t,e,i){i.getaxisproxy(t.name,e).reset(i)}function kp(t,e,i){i.getaxisproxy(t.name,e).filterdata(i)}function jp(t,e){return t&&t.hasownproperty&&t.hasownproperty(e)}function qp(t,e){t.eachtargetseries(function(e){var i=e.getdata();qg(t.statelist,t.targetvisuals,i,t.getvaluestate,t,t.getdatadimension(i))})}function tm(t){t.eachseries(function(e){var i=e.getdata(),n=[];t.eachcomponent("visualmap",function(t){if(t.istargetseries(e)){var o=t.getvisualmeta(m(em,null,e,t))||{stops:[],outercolors:[]};o.dimension=t.getdatadimension(i),n.push(o)}}),e.getdata().setvisual("visualmeta",n)})}function em(t,e,i,n){for(var o=e.targetvisuals[n],a=ji.preparevisualtypes(o),r={color:t.getdata().getvisual("color")},s=0,l=a.length;s=0&&(r[a]=+r[a].tofixed(h)),r}function vm(t,e){var n=t.getdata(),o=t.coordinatesystem;if(e&&!gm(e)&&!y(e.coord)&&o){var a=o.dimensions,r=ym(e,n,o,t);if((e=i(e)).type&&fl[e.type]&&r.baseaxis&&r.valueaxis){var s=cl(a,r.baseaxis.dim),l=cl(a,r.valueaxis.dim);e.coord=fl[e.type](n,r.basedatadim,r.valuedatadim,s,l),e.value=e.coord[l]}else{for(var h=[null!=e.xaxis?e.xaxis:e.radiusaxis,null!=e.yaxis?e.yaxis:e.angleaxis],u=0;u<2;u++)if(fl[h[u]]){var c=t.coorddimtodatadim(a[u])[0];h[u]=bm(n,c,h[u])}e.coord=h}}return e}function ym(t,e,i,n){var o={};return null!=t.valueindex||null!=t.valuedim?(o.valuedatadim=null!=t.valueindex?e.getdimension(t.valueindex):t.valuedim,o.valueaxis=i.getaxis(n.datadimtocoorddim(o.valuedatadim)),o.baseaxis=i.getotheraxis(o.valueaxis),o.basedatadim=n.coorddimtodatadim(o.baseaxis.dim)[0]):(o.baseaxis=n.getbaseaxis(),o.valueaxis=i.getotheraxis(o.baseaxis),o.basedatadim=n.coorddimtodatadim(o.baseaxis.dim)[0],o.valuedatadim=n.coorddimtodatadim(o.valueaxis.dim)[0]),o}function xm(t,e){return!(t&&t.containdata&&e.coord&&!fm(e))||t.containdata(e.coord)}function _m(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function bm(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,function(t,e){isnan(t)||(n+=t,o++)},!0),n/o}return t.getdataextent(e,!0)["max"===i?1:0]}function wm(t,e,i){var n=e.coordinatesystem;t.each(function(o){var a,r=t.getitemmodel(o),s=si(r.get("x"),i.getwidth()),l=si(r.get("y"),i.getheight());if(isnan(s)||isnan(l)){if(e.getmarkerposition)a=e.getmarkerposition(t.getvalues(t.dimensions,o));else if(n){var h=t.get(n.dimensions[0],o),u=t.get(n.dimensions[1],o);a=n.datatopoint([h,u])}}else a=[s,l];isnan(s)||(a[0]=s),isnan(l)||(a[1]=l),t.setitemlayout(o,a)})}function sm(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.coorddimtodatadim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var o=new as(n,i),a=f(i.get("data"),v(vm,e));return t&&(a=p(a,v(xm,t))),o.initdata(a,null,t?_m:function(t){return t.value}),o}function mm(t){return!isnan(t)&&!isfinite(t)}function im(t,e,i,n){var o=1-t,a=n.dimensions[t];return mm(e[o])&&mm(i[o])&&e[t]===i[t]&&n.getaxis(a).containdata(e[t])}function tm(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(im(1,i,n,t)||im(0,i,n,t)))return!0}return xm(t,e[0])&&xm(t,e[1])}function am(t,e,i,n,o){var a,r=n.coordinatesystem,s=t.getitemmodel(e),l=si(s.get("x"),o.getwidth()),h=si(s.get("y"),o.getheight());if(isnan(l)||isnan(h)){if(n.getmarkerposition)a=n.getmarkerposition(t.getvalues(t.dimensions,e));else{var u=r.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);a=r.datatopoint([c,d])}if("cartesian2d"===r.type){var f=r.getaxis("x"),g=r.getaxis("y"),u=r.dimensions;mm(t.get(u[0],e))?a[0]=f.toglobalcoord(f.getextent()[i?0:1]):mm(t.get(u[1],e))&&(a[1]=g.toglobalcoord(g.getextent()[i?0:1]))}isnan(l)||(a[0]=l),isnan(h)||(a[1]=h)}else a=[l,h];t.setitemlayout(e,a)}function cm(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.coorddimtodatadim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var o=new as(n,i),a=new as(n,i),r=new as([],i),s=f(i.get("data"),v(pl,e,t,i));t&&(s=p(s,v(tm,t)));var l=t?_m:function(t){return t.value};return o.initdata(f(s,function(t){return t[0]}),null,l),a.initdata(f(s,function(t){return t[1]}),null,l),r.initdata(f(s,function(t){return t[2]})),r.hasitemoption=!0,{from:o,to:a,line:r}}function dm(t){return!isnan(t)&&!isfinite(t)}function lm(t,e,i,n){var o=1-t;return dm(e[o])&&dm(i[o])}function km(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!lm(1,i,n,t)&&!lm(0,i,n,t))||(xm(t,{coord:i,x:e.x0,y:e.y0})||xm(t,{coord:n,x:e.x1,y:e.y1}))}function pm(t,e,i,n,o){var a,r=n.coordinatesystem,s=t.getitemmodel(e),l=si(s.get(i[0]),o.getwidth()),h=si(s.get(i[1]),o.getheight());if(isnan(l)||isnan(h)){if(n.getmarkerposition)a=n.getmarkerposition(t.getvalues(i,e));else{var u=t.get(i[0],e),c=t.get(i[1],e);a=r.datatopoint([u,c],!0)}if("cartesian2d"===r.type){var d=r.getaxis("x"),f=r.getaxis("y"),u=t.get(i[0],e),c=t.get(i[1],e);dm(u)?a[0]=d.toglobalcoord(d.getextent()["x0"===i[0]?0:1]):dm(c)&&(a[1]=f.toglobalcoord(f.getextent()["y0"===i[1]?0:1]))}isnan(l)||(a[0]=l),isnan(h)||(a[1]=h)}else a=[l,h];return a}function om(t,e,i){var n,o,a=["x0","y0","x1","y1"];t?(n=f(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.coorddimtodatadim(t)[0])||{};return i.name=t,i}),o=new as(f(a,function(t,e){return{name:t,type:n[e%2].type}}),i)):o=new as(n=[{name:"value",type:"float"}],i);var r=f(i.get("data"),v(ml,e,t,i));t&&(r=p(r,v(km,t)));var s=t?function(t,e,i,n){return t.coord[math.floor(n/2)][n%2]}:function(t){return t.value};return o.initdata(r,null,s),o.hasitemoption=!0,o}function zm(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axistype=i[e],delete t.type),nm(t),em(t,"controlposition")){var n=t.controlstyle||(t.controlstyle={});em(n,"position")||(n.position=t.controlposition),"none"!==n.position||em(n,"show")||(n.show=!1,delete n.position),delete t.controlposition}d(t.data||[],function(t){b(t)&&!y(t)&&(!em(t,"value")&&em(t,"name")&&(t.value=t.name),nm(t))})}function nm(t){var e=t.itemstyle||(t.itemstyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};d(n,function(t,e){a[e]||em(o,e)||(o[e]=t)}),i.label&&!em(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function em(t,e){return t.hasownproperty(e)}function rm(t,e){return ko(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()},t.get("padding"))}function vm(t,e,n,o){return un(t.get(e).replace(/^path:\/\//,""),i(o||{}),new jt(n[0],n[1],n[2],n[3]),"center")}function bm(t,e,i,o,a,r){var s=e.get("color");a?(a.setcolor(s),i.add(a),r&&r.onupdate(a)):((a=hr(t.get("symbol"),-1,-1,2,2,s)).setstyle("strokenoscale",!0),i.add(a),r&&r.oncreate(a));var l=e.getitemstyle(["color","symbol","symbolsize"]);a.setstyle(l),o=n({recthover:!0,z2:100},o,!0);var h=t.get("symbolsize");(h=h instanceof array?h.slice():[+h,+h])[0]/=2,h[1]/=2,o.scale=h;var u=t.get("symboloffset");if(u){var c=o.position=o.position||[0,0];c[0]+=si(u[0],h[0]),c[1]+=si(u[1],h[1])}var d=t.get("symbolrotate");return o.rotation=(d||0)*math.pi/180||0,a.attr(o),a.updatetransform(),a}function gm(t,e,i,n,o){if(!t.dragging){var a=n.getmodel("checkpointstyle"),r=i.datatocoord(n.getdata().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopanimation(!0),t.animateto({position:[r,0]},a.get("animationduration",!0),a.get("animationeasing",!0)))}}function wm(t){return 0===t.indexof("my")}function hm(t){this.model=t}function fm(t){this.model=t}function zm(t){var e={},i=[],n=[];return t.eachrawseries(function(t){var o=t.coordinatesystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)i.push(t);else{var a=o.getbaseaxis();if("category"===a.type){var r=a.dim+"_"+a.index;e[r]||(e[r]={categoryaxis:a,valueaxis:o.getotheraxis(a),series:[]},n.push({axisdim:a.dim,axisindex:a.index})),e[r].series.push(t)}else i.push(t)}}),{seriesgroupbycategoryaxis:e,other:i,meta:n}}function um(t){var e=[];return d(t,function(t,i){var n=t.categoryaxis,o=t.valueaxis.dim,a=[" "].concat(f(t.series,function(t){return t.name})),r=[n.model.getcategories()];d(t.series,function(t){r.push(t.getrawdata().maparray(o,function(t){return t}))});for(var s=[a.join(pl)],l=0;l=0)return!0}function $m(t){for(var e=t.split(/\n+/g),i=[],n=f(qm(e.shift()).split(ol),function(t){return{name:t,data:[]}}),o=0;o=0&&!i[o][n];o--);if(o<0){var a=t.querycomponents({maintype:"datazoom",subtype:"select",id:n})[0];if(a){var r=a.getpercentrange();i[0][n]={datazoomid:n,start:r[0],end:r[1]}}}}),i.push(e)}function iv(t){var e=av(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return zl(i,function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}}),n}function nv(t){t[nl]=null}function ov(t){return av(t).length}function av(t){var e=t[nl];return e||(e=t[nl]=[{}]),e}function rv(t,e,i){(this._brushcontroller=new yu(i.getzr())).on("brush",m(this._onbrush,this)).mount(),this._iszoomactive}function sv(t){var e={};return d(["xaxisindex","yaxisindex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function lv(t,e){t.seticonstatus("back",ov(e)>1?"emphasis":"normal")}function hv(t,e,i,n,o){var a=i._iszoomactive;n&&"takeglobalcursor"===n.type&&(a="datazoomselect"===n.key&&n.datazoomselectactive),i._iszoomactive=a,t.seticonstatus("zoom",a?"emphasis":"normal");var r=new rp(sv(t.option),e,{include:["grid"]});i._brushcontroller.setpanels(r.makepanelopts(o,function(t){return t.xaxisdeclared&&!t.yaxisdeclared?"linex":!t.xaxisdeclared&&t.yaxisdeclared?"liney":"rect"})).enablebrush(!!a&&{brushtype:"auto",brushstyle:{linewidth:0,fill:"rgba(0,0,0,0.2)"}})}function uv(t){this.model=t}function cv(t){return hl(t)}function dv(){if(!ul&&xl){ul=!0;var t=xl.stylesheets;t.length<31?xl.createstylesheet().addrule(".zrvml","behavior:url(#default#vml)"):t[0].addrule(".zrvml","behavior:url(#default#vml)")}}function fv(t){return parseint(t,10)}function gv(t,e){dv(),this.root=t,this.storage=e;var i=document.createelement("div"),n=document.createelement("div");i.style.csstext="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.csstext="position:absolute;left:0;top:0;",t.appendchild(i),this._vmlroot=n,this._vmlviewport=i,this.resize();var o=e.delfromstorage,a=e.addtostorage;e.delfromstorage=function(t){o.call(e,t),t&&t.onremove&&t.onremove(n)},e.addtostorage=function(t){t.onadd&&t.onadd(n),a.call(e,t)},this._firstpaint=!0}function pv(t){return function(){wy('in ie8.0 vml mode painter not support method "'+t+'"')}}function mv(t){return document.createelementns(tk,t)}function vv(t){return lk(1e4*t)/1e4}function yv(t){return t-ek}function xv(t,e){var i=e?t.textfill:t.fill;return null!=i&&i!==dk}function _v(t,e){var i=e?t.textstroke:t.stroke;return null!=i&&i!==dk}function bv(t,e){e&&wv(t,"transform","matrix("+ck.call(e,",")+")")}function wv(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setattribute(e,i)}function sv(t,e,i){t.setattributens("http://www.w3.org/1999/xlink",e,i)}function mv(t,e,i){if(xv(e,i)){var n=i?e.textfill:e.fill;n="transparent"===n?dk:n,"none"!==t.getattribute("clip-path")&&n===dk&&(n="rgba(0, 0, 0, 0.002)"),wv(t,"fill",n),wv(t,"fill-opacity",e.opacity)}else wv(t,"fill",dk);if(_v(e,i)){var o=i?e.textstroke:e.stroke;wv(t,"stroke",o="transparent"===o?dk:o),wv(t,"stroke-width",(i?e.textstrokewidth:e.linewidth)/(e.strokenoscale?e.host.getlinescale():1)),wv(t,"paint-order","stroke"),wv(t,"stroke-opacity",e.opacity),e.linedash?(wv(t,"stroke-dasharray",e.linedash.join(",")),wv(t,"stroke-dashoffset",lk(e.linedashoffset||0))):wv(t,"stroke-dasharray",""),e.linecap&&wv(t,"stroke-linecap",e.linecap),e.linejoin&&wv(t,"stroke-linejoin",e.linejoin),e.miterlimit&&wv(t,"stroke-miterlimit",e.miterlimit)}else wv(t,"stroke",dk)}function iv(t){for(var e=[],i=t.data,n=t.len(),o=0;o=zk||!yv(p)&&(d>-ok&&d<0||d>ok)==!!g;var y=vv(s+h*pk(c)),x=vv(l+u*kk(c));m&&(d=g?zk-1e-4:1e-4-zk,v=!0,9===o&&e.push("m",y,x));var _=vv(s+h*pk(c+d)),b=vv(l+u*kk(c+d));e.push("a",vv(h),vv(u),lk(f*nk),+v,+g,_,b);break;case ak.z:a="z";break;case ak.r:var _=vv(i[o++]),b=vv(i[o++]),w=vv(i[o++]),s=vv(i[o++]);e.push("m",_,b,"l",_+w,b,"l",_+w,b+s,"l",_,b+s,"l",_,b)}a&&e.push(a);for(var m=0;m=11)}}(navigator.useragent),xv={"[object function]":1,"[object regexp]":1,"[object date]":1,"[object error]":1,"[object canvasgradient]":1,"[object canvaspattern]":1,"[object image]":1,"[object canvas]":1},jv={"[object int8array]":1,"[object uint8array]":1,"[object uint8clampedarray]":1,"[object int16array]":1,"[object uint16array]":1,"[object int32array]":1,"[object uint32array]":1,"[object float32array]":1,"[object float64array]":1},qv=object.prototype.tostring,yv=array.prototype,$v=yv.foreach,kv=yv.filter,jv=yv.slice,qv=yv.map,ty=yv.reduce,ey={},iy=function(){return ey.createcanvas()};ey.createcanvas=function(){return document.createelement("canvas")};var ny,oy="__ec_primitive__";o.prototype={constructor:o,get:function(t){return this["_ec_"+t]},set:function(t,e){return this["_ec_"+t]=e,e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var i in this)this.hasownproperty(i)&&t(this[i],i.slice(4))},removekey:function(t){delete this["_ec_"+t]}};var ay=(object.freeze||object)({$override:e,clone:i,merge:n,mergeall:o,extend:a,defaults:r,createcanvas:iy,getcontext:s,indexof:l,inherits:h,mixin:u,isarraylike:c,each:d,map:f,reduce:g,filter:p,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n3&&(e=dy.call(e,1));for(var n=this._$handlers[t],o=n.length,a=0;a4&&(e=dy.call(e,1,e.length-1));for(var n=e[e.length-1],o=this._$handlers[t],a=o.length,r=0;r=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=nt(n[a],t,e))&&(!o.toptarget&&(o.toptarget=n[a]),r!==gy)){o.target=n[a];break}}return o}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){my.prototype[t]=function(e){var i=this.findhover(e.zrx,e.zry),n=i.target;if("mousedown"===t)this._downel=n,this._downpoint=[e.zrx,e.zry],this._upel=n;else if("mosueup"===t)this._upel=n;else if("click"===t){if(this._downel!==this._upel||!this._downpoint||hy(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(i,t,e)}}),u(my,fy),u(my,q);var vy="undefined"==typeof float32array?array:float32array,yy=(object.freeze||object)({create:ot,identity:at,copy:rt,mul:st,translate:lt,rotate:ht,scale:ut,invert:ct}),xy=at,_y=5e-5,by=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},wy=by.prototype;wy.transform=null,wy.needlocaltransform=function(){return dt(this.rotation)||dt(this.position[0])||dt(this.position[1])||dt(this.scale[0]-1)||dt(this.scale[1]-1)},wy.updatetransform=function(){var t=this.parent,e=t&&t.transform,i=this.needlocaltransform(),n=this.transform;i||e?(n=n||ot(),i?this.getlocaltransform(n):xy(n),e&&(i?st(n,t.transform,n):rt(n,t.transform)),this.transform=n,this.invtransform=this.invtransform||ot(),ct(this.invtransform,n)):n&&xy(n)},wy.getlocaltransform=function(t){return by.getlocaltransform(this,t)},wy.settransform=function(t){var e=this.transform,i=t.dpr||1;e?t.settransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.settransform(i,0,0,i,0,0)},wy.restoretransform=function(t){var e=t.dpr||1;t.settransform(e,0,0,e,0,0)};var sy=[];wy.decomposetransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(st(sy,t.invtransform,e),e=sy);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],o=this.position,a=this.scale;dt(i-1)&&(i=math.sqrt(i)),dt(n-1)&&(n=math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),o[0]=e[4],o[1]=e[5],a[0]=i,a[1]=n,this.rotation=math.atan2(-e[1]/n,e[0]/i)}},wy.getglobalscale=function(){var t=this.transform;if(!t)return[1,1];var e=math.sqrt(t[0]*t[0]+t[1]*t[1]),i=math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},wy.transformcoordtolocal=function(t,e){var i=[t,e],n=this.invtransform;return n&&$(i,i,n),i},wy.transformcoordtoglobal=function(t,e){var i=[t,e],n=this.transform;return n&&$(i,i,n),i},by.getlocaltransform=function(t,e){xy(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ut(e,e,n),o&&ht(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var my={linear:function(t){return t},quadraticin:function(t){return t*t},quadraticout:function(t){return t*(2-t)},quadraticinout:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicin:function(t){return t*t*t},cubicout:function(t){return--t*t*t+1},cubicinout:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticin:function(t){return t*t*t*t},quarticout:function(t){return 1- --t*t*t*t},quarticinout:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticin:function(t){return t*t*t*t*t},quinticout:function(t){return--t*t*t*t*t+1},quinticinout:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalin:function(t){return 1-math.cos(t*math.pi/2)},sinusoidalout:function(t){return math.sin(t*math.pi/2)},sinusoidalinout:function(t){return.5*(1-math.cos(math.pi*t))},exponentialin:function(t){return 0===t?0:math.pow(1024,t-1)},exponentialout:function(t){return 1===t?1:1-math.pow(2,-10*t)},exponentialinout:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*math.pow(1024,t-1):.5*(2-math.pow(2,-10*(t-1)))},circularin:function(t){return 1-math.sqrt(1-t*t)},circularout:function(t){return math.sqrt(1- --t*t)},circularinout:function(t){return(t*=2)<1?-.5*(math.sqrt(1-t*t)-1):.5*(math.sqrt(1-(t-=2)*t)+1)},elasticin:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*math.asin(1/i)/(2*math.pi),-i*math.pow(2,10*(t-=1))*math.sin((t-e)*(2*math.pi)/.4))},elasticout:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*math.asin(1/i)/(2*math.pi),i*math.pow(2,-10*t)*math.sin((t-e)*(2*math.pi)/.4)+1)},elasticinout:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*math.asin(1/i)/(2*math.pi),(t*=2)<1?i*math.pow(2,10*(t-=1))*math.sin((t-e)*(2*math.pi)/.4)*-.5:i*math.pow(2,-10*(t-=1))*math.sin((t-e)*(2*math.pi)/.4)*.5+1)},backin:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backout:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backinout:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bouncein:function(t){return 1-my.bounceout(1-t)},bounceout:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceinout:function(t){return t<.5?.5*my.bouncein(2*t):.5*my.bounceout(2*t-1)+.5}};ft.prototype={constructor:ft,step:function(t,e){if(this._initialized||(this._starttime=t+this._delay,this._initialized=!0),this._paused)this._pausedtime+=e;else{var i=(t-this._starttime-this._pausedtime)/this._life;if(!(i<0)){i=math.min(i,1);var n=this.easing,o="string"==typeof n?my[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1==i?this.loop?(this.restart(t),"restart"):(this._needsremove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._starttime-this._pausedtime)%this._life;this._starttime=t-e+this.gap,this._pausedtime=0,this._needsremove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var iy=function(){this.head=null,this.tail=null,this._len=0},ty=iy.prototype;ty.insert=function(t){var e=new ay(t);return this.insertentry(e),e},ty.insertentry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},ty.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},ty.len=function(){return this._len},ty.clear=function(){this.head=this.tail=null,this._len=0};var ay=function(t){this.value=t,this.next,this.prev},cy=function(t){this._list=new iy,this._map={},this._maxsize=t||10,this._lastremovedentry=null},dy=cy.prototype;dy.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastremovedentry;if(a>=this._maxsize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastremovedentry=s}r?r.value=e:r=new ay(e),r.key=t,i.insertentry(r),n[t]=r}return o},dy.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertentry(e)),e.value},dy.clear=function(){this._list.clear(),this._map={}};var ly={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},ky=new cy(20),py=null,oy=dt,zy=lt,ny=(object.freeze||object)({parse:mt,lift:at,tohex:ct,fastlerp:dt,fastmaptocolor:oy,lerp:lt,maptocolor:zy,modifyhsl:kt,modifyalpha:pt,stringify:ot}),ey=array.prototype.slice,ry=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||zt,this._setter=n||nt,this._clipcount=0,this._delay=0,this._donelist=[],this._onframelist=[],this._cliplist=[]};ry.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasownproperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ft(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframelist.push(t),this},pause:function(){for(var t=0;t0&&this.animate(t,!1).when(null==n?500:n,a).delay(o||0),this}};var fy=function(t){by.call(this,t),fy.call(this,t),hy.call(this,t),this.id=t.id||fv()};fy.prototype={type:"element",name:"",__zr:null,ignore:!1,clippath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposetransform(),this.dirty(!1)},beforeupdate:function(){},afterupdate:function(){},update:function(){this.updatetransform()},traverse:function(t,e){},attrkv:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrkv(t,e);else if(b(t))for(var i in t)t.hasownproperty(i)&&this.attrkv(i,t[i]);return this.dirty(!1),this},setclippath:function(t){var e=this.__zr;e&&t.addselftozr(e),this.clippath&&this.clippath!==t&&this.removeclippath(),this.clippath=t,t.__zr=e,t.__cliptarget=this,this.dirty(!1)},removeclippath:function(){var t=this.clippath;t&&(t.__zr&&t.removeselffromzr(t.__zr),t.__zr=null,t.__cliptarget=null,this.clippath=null,this.dirty(!1))},addselftozr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new jt(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},jt.create=function(t){return new jt(t.x,t.y,t.width,t.height)};var jy=function(t){t=t||{},fy.call(this,t);for(var e in t)t.hasownproperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};jy.prototype={constructor:jy,isgroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childat:function(t){return this._children[t]},childofname:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doadd(t))}return this},_doadd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addtostorage(t),t instanceof jy&&t.addchildrentostorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=l(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&(i.delfromstorage(t),t instanceof jy&&t.delchildrenfromstorage(i)),e&&e.refresh(),this)},removeall:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&(this.delfromstorage(t),this._roots.splice(o,1),t instanceof jy&&t.delchildrenfromstorage(this))}},addtostorage:function(t){return t.__storage=this,t.dirty(!1),this},delfromstorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderlist=this._roots=null},displayablesortfunc:ie};var ky=[["shadowblur",0],["shadowoffsetx",0],["shadowoffsety",0],["shadowcolor","#000"],["linecap","butt"],["linejoin","miter"],["miterlimit",10]],jy=function(t,e){this.extendfrom(t,!1),this.host=e};jy.prototype={constructor:jy,host:null,fill:"#000",stroke:null,opacity:1,linedash:null,linedashoffset:0,shadowblur:0,shadowoffsetx:0,shadowoffsety:0,linewidth:1,strokenoscale:!1,text:null,font:null,textfont:null,fontstyle:null,fontweight:null,fontsize:null,fontfamily:null,texttag:null,textfill:"#000",textstroke:null,textwidth:null,textheight:null,textstrokewidth:0,textlineheight:null,textposition:"inside",textrect:null,textoffset:null,textalign:null,textverticalalign:null,textdistance:5,textshadowcolor:"transparent",textshadowblur:0,textshadowoffsetx:0,textshadowoffsety:0,textboxshadowcolor:"transparent",textboxshadowblur:0,textboxshadowoffsetx:0,textboxshadowoffsety:0,transformtext:!1,textrotation:0,textorigin:null,textbackgroundcolor:null,textbordercolor:null,textborderwidth:0,textborderradius:0,textpadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,o=i&&i.style,a=!o,r=0;r0},extendfrom:function(t,e){if(t)for(var i in t)!t.hasownproperty(i)||!0!==e&&(!1===e?this.hasownproperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendfrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendfrom(this,!0),t},getgradient:function(t,e,i){for(var n=("radial"===e.type?oe:ne)(t,e,i),o=e.colorstops,a=0;a=0&&i.splice(n,1),t.__hovermir=null},clearhover:function(t){for(var e=this._hoverelements,i=0;i=0){if(!s){if((s=this._progressivelayers[math.min(h++,4)]).ctx.save(),s.renderscope={},s&&s.__progress>s.__maxprogress){g=s.__nextidxnotprog-1;continue}l=s.__progress,s.__dirty||(f=l),s.__progress=f+1}y===f&&this._dopaintel(m,s,!0,s.renderscope)}else this._dopaintel(m,n,e,r);m.__dirty=!1}}s&&i(s),a&&a.restore(),this._furtherprogressive=!1,d(this._progressivelayers,function(t){t.__maxprogress>=t.__progress&&(this._furtherprogressive=!0)},this)},_dopaintel:function(t,e,i,n){var o=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!qe(t,this._width,this._height))){var r=t.__clippaths;(n.prevcliplayer!==e||ti(r,n.prevelclippaths))&&(n.prevelclippaths&&(n.prevcliplayer.ctx.restore(),n.prevcliplayer=n.prevelclippaths=null,n.prevel=null),r&&(o.save(),ei(r,o),n.prevcliplayer=e,n.prevelclippaths=r)),t.beforebrush&&t.beforebrush(o),t.brush(o,n.prevel||null),n.prevel=t,t.afterbrush&&t.afterbrush(o)}},getlayer:function(t){if(this._singlecanvas)return this._layers[0];var e=this._layers[t];return e||((e=new nx("zr_"+t,this,this.dpr)).__builtin__=!0,this._layerconfig[t]&&n(e,this._layerconfig[t],!0),this.insertlayer(t,e),e.initcontext()),e},insertlayer:function(t,e){var i=this._layers,n=this._zlevellist,o=n.length,a=null,r=-1,s=this._domroot;if(i[t])wy("zlevel "+t+" has been used already");else if($e(e)){if(o>0&&t>n[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextsibling?s.insertbefore(e.dom,l.nextsibling):s.appendchild(e.dom)}else s.firstchild?s.insertbefore(e.dom,s.firstchild):s.appendchild(e.dom)}else wy("layer of zlevel "+t+" is not valid")},eachlayer:function(t,e){var i,n,o=this._zlevellist;for(n=0;n=0){r!==g&&(r=g,l++);var p=c.__frame=l-1;if(!a){var m=math.min(s,4);(a=i[m])||(a=i[m]=new nx("progressive",this,this.dpr)).initcontext(),a.__maxprogress=0}a.__dirty=a.__dirty||c.__dirty,a.elcount++,a.__maxprogress=math.max(a.__maxprogress,p),a.__maxprogress>=a.__progress&&(f.__dirty=!0)}else c.__frame=-1,a&&(a.__nextidxnotprog=h,s++,a=null)}a&&(s++,a.__nextidxnotprog=h),this.eachbuiltinlayer(function(t,e){n[e]!==t.elcount&&(t.__dirty=!0)}),i.length=math.min(s,5),d(i,function(t,e){o[e]!==t.elcount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachbuiltinlayer(this._clearlayer),this},_clearlayer:function(t){t.clear()},configlayer:function(t,e){if(e){var i=this._layerconfig;i[t]?n(i[t],e,!0):i[t]=e;var o=this._layers[t];o&&n(o,i[t],!0)}},dellayer:function(t){var e=this._layers,i=this._zlevellist,n=e[t];n&&(n.dom.parentnode.removechild(n.dom),delete e[t],i.splice(l(i,t),1))},resize:function(t,e){var i=this._domroot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getsize(0),e=this._getsize(1),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var o in this._layers)this._layers.hasownproperty(o)&&this._layers[o].resize(t,e);d(this._progressivelayers,function(i){i.resize(t,e)}),this.refresh(!0)}return this._width=t,this._height=e,this},clearlayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerhtml="",this.root=this.storage=this._domroot=this._layers=null},getrenderedcanvas:function(t){function e(t,e){var n=r._zlevellist;null==t&&(t=-1/0);for(var o,a=0;at&&s=0&&this._clips.splice(e,1)},removeanimator:function(t){for(var e=t.getclips(),i=0;i1&&n&&n.length>1){var a=ui(n)/ui(o);!isfinite(a)&&(a=1),e.pinchscale=a;var r=ci(n);return e.pinchx=r[0],e.pinchy=r[1],{type:"pinch",target:t[0].target,event:e}}}}},ix=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],tx=["touchstart","touchend","touchmove"],ax={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},cx=f(ix,function(t){var e=t.replace("mouse","pointer");return ax[e]?e:t}),dx={mousemove:function(t){t=ri(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=ri(this.dom,t)).toelement||t.relatedtarget;if(e!=this.dom)for(;e&&9!=e.nodetype;){if(e===this.dom)return;e=e.parentnode}this.trigger("mouseout",t)},touchstart:function(t){(t=ri(this.dom,t)).zrbytouch=!0,this._lasttouchmoment=new date,fi(this,t,"start"),dx.mousemove.call(this,t),dx.mousedown.call(this,t),gi(this)},touchmove:function(t){(t=ri(this.dom,t)).zrbytouch=!0,fi(this,t,"change"),dx.mousemove.call(this,t),gi(this)},touchend:function(t){(t=ri(this.dom,t)).zrbytouch=!0,fi(this,t,"end"),dx.mouseup.call(this,t),+new date-this._lasttouchmoment<300&&dx.click.call(this,t),gi(this)},pointerdown:function(t){dx.mousedown.call(this,t)},pointermove:function(t){pi(t)||dx.mousemove.call(this,t)},pointerup:function(t){dx.mouseup.call(this,t)},pointerout:function(t){pi(t)||dx.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){dx[t]=function(e){e=ri(this.dom,e),this.trigger(t,e)}});var lx=vi.prototype;lx.dispose=function(){for(var t=ix.concat(tx),e=0;e=0||n&&l(n,r)<0)){var s=e.getshallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},kx=$x([["linewidth","width"],["stroke","color"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),jx={getlinestyle:function(t){var e=kx(this,t),i=this.getlinedash(e.linewidth);return i&&(e.linedash=i),e},getlinedash:function(t){null==t&&(t=1);var e=this.get("type"),i=math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},qx=$x([["fill","color"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["opacity"],["shadowcolor"]]),t_={getareastyle:function(t,e){return qx(this,t,e)}},e_=math.pow,i_=math.sqrt,n_=1e-8,o_=1e-4,a_=i_(3),r_=1/3,s_=e(),l_=e(),h_=e(),u_=math.min,c_=math.max,d_=math.sin,f_=math.cos,g_=2*math.pi,p_=e(),m_=e(),v_=e(),y_=[],x_=[],__={m:1,l:2,c:3,q:4,a:5,z:6,r:7},b_=[],w_=[],s_=[],m_=[],i_=math.min,t_=math.max,a_=math.cos,c_=math.sin,d_=math.sqrt,l_=math.abs,k_="undefined"!=typeof float32array,p_=function(t){this._savedata=!t,this._savedata&&(this.data=[]),this._ctx=null};p_.prototype={constructor:p_,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_linedash:null,_dashoffset:0,_dashidx:0,_dashsum:0,setscale:function(t,e){this._ux=l_(1/by/t)||0,this._uy=l_(1/by/e)||0},getcontext:function(){return this._ctx},beginpath:function(t){return this._ctx=t,t&&t.beginpath(),t&&(this.dpr=t.dpr),this._savedata&&(this._len=0),this._linedash&&(this._linedash=null,this._dashoffset=0),this},moveto:function(t,e){return this.adddata(__.m,t,e),this._ctx&&this._ctx.moveto(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineto:function(t,e){var i=l_(t-this._xi)>this._ux||l_(e-this._yi)>this._uy||this._len<5;return this.adddata(__.l,t,e),this._ctx&&i&&(this._needsdash()?this._dashedlineto(t,e):this._ctx.lineto(t,e)),i&&(this._xi=t,this._yi=e),this},beziercurveto:function(t,e,i,n,o,a){return this.adddata(__.c,t,e,i,n,o,a),this._ctx&&(this._needsdash()?this._dashedbezierto(t,e,i,n,o,a):this._ctx.beziercurveto(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticcurveto:function(t,e,i,n){return this.adddata(__.q,t,e,i,n),this._ctx&&(this._needsdash()?this._dashedquadraticto(t,e,i,n):this._ctx.quadraticcurveto(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.adddata(__.a,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=a_(o)*i+t,this._yi=c_(o)*i+t,this},arcto:function(t,e,i,n,o){return this._ctx&&this._ctx.arcto(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.adddata(__.r,t,e,i,n),this},closepath:function(){this.adddata(__.z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsdash()&&this._dashedlineto(e,i),t.closepath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.tostatic()},stroke:function(t){t&&t.stroke(),this.tostatic()},setlinedash:function(t){if(t instanceof array){this._linedash=t,this._dashidx=0;for(var e=0,i=0;ie.length&&(this._expanddata(),e=this.data);for(var i=0;i0&&f<=t||u<0&&f>=t||0==u&&(c>0&&g<=e||c<0&&g>=e);)f+=u*(i=r[n=this._dashidx]),g+=c*i,this._dashidx=(n+1)%p,u>0&&fl||c>0&&gh||s[n%2?"moveto":"lineto"](u>=0?i_(f,t):t_(f,t),c>=0?i_(g,e):t_(g,e));u=f-t,c=g-e,this._dashoffset=-d_(u*u+c*c)},_dashedbezierto:function(t,e,i,n,o,a){var r,s,l,h,u,c=this._dashsum,d=this._dashoffset,f=this._linedash,g=this._ctx,p=this._xi,m=this._yi,v=on,y=0,x=this._dashidx,_=f.length,b=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(p,t,i,o,r+.1)-v(p,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=d_(s*s+l*l);for(;x<_&&!((b+=f[x])>d);x++);for(r=(b-d)/y;r<=1;)h=v(p,t,i,o,r),u=v(m,e,n,a,r),x%2?g.moveto(h,u):g.lineto(h,u),r+=f[x]/y,x=(x+1)%_;x%2!=0&&g.lineto(o,a),s=o-h,l=a-u,this._dashoffset=-d_(s*s+l*l)},_dashedquadraticto:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedbezierto(t,e,i,n,o,a)},tostatic:function(){var t=this.data;t instanceof array&&(t.length=this._len,k_&&(this.data=new float32array(t)))},getboundingrect:function(){b_[0]=b_[1]=s_[0]=s_[1]=number.max_value,w_[0]=w_[1]=m_[0]=m_[1]=-number.max_value;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;al||l_(r-o)>h||c===u-1)&&(t.lineto(a,r),n=a,o=r);break;case __.c:t.beziercurveto(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case __.q:t.quadraticcurveto(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case __.a:var f=s[c++],g=s[c++],p=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],b=p>m?p:m,w=p>m?1:p/m,s=p>m?m/p:1,m=v+y;math.abs(p-m)>.001?(t.translate(f,g),t.rotate(x),t.scale(w,s),t.arc(0,0,b,v,m,1-_),t.scale(1/w,1/s),t.rotate(-x),t.translate(-f,-g)):t.arc(f,g,b,v,m,1-_),1==c&&(e=a_(v)*p+f,i=c_(v)*m+g),n=a_(m)*p+f,o=c_(m)*m+g;break;case __.r:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case __.z:t.closepath(),n=e,o=i}}}},p_.cmd=__;var o_=2*math.pi,z_=2*math.pi,n_=p_.cmd,e_=2*math.pi,r_=1e-4,v_=[-1,-1,-1],b_=[-1,-1],g_=ix.prototype.getcanvaspattern,w_=math.abs,h_=new p_(!0);nn.prototype={constructor:nn,type:"path",__dirtypath:!0,strokecontainthreshold:5,brush:function(t,e){var i=this.style,n=this.path||h_,o=i.hasstroke(),a=i.hasfill(),r=i.fill,s=i.stroke,l=a&&!!r.colorstops,h=o&&!!s.colorstops,u=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.settransform(t),this.__dirty){var d;l&&(d=d||this.getboundingrect(),this._fillgradient=i.getgradient(t,r,d)),h&&(d=d||this.getboundingrect(),this._strokegradient=i.getgradient(t,s,d))}l?t.fillstyle=this._fillgradient:u&&(t.fillstyle=g_.call(r,t)),h?t.strokestyle=this._strokegradient:c&&(t.strokestyle=g_.call(s,t));var f=i.linedash,g=i.linedashoffset,p=!!t.setlinedash,m=this.getglobalscale();n.setscale(m[0],m[1]),this.__dirtypath||f&&!p&&o?(n.beginpath(t),f&&!p&&(n.setlinedash(f),n.setlinedashoffset(g)),this.buildpath(n,this.shape,!1),this.path&&(this.__dirtypath=!1)):(t.beginpath(),this.path.rebuildpath(t)),a&&n.fill(t),f&&p&&(t.setlinedash(f),t.linedashoffset=g),o&&n.stroke(t),f&&p&&t.setlinedash([]),this.restoretransform(t),null!=i.text&&this.drawrecttext(t,this.getboundingrect())},buildpath:function(t,e,i){},createpathproxy:function(){this.path=new p_},getboundingrect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new p_),this.__dirtypath&&(n.beginpath(),this.buildpath(n,this.shape,!1)),t=n.getboundingrect()}if(this._rect=t,e.hasstroke()){var o=this._rectwithstroke||(this._rectwithstroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.linewidth,r=e.strokenoscale?this.getlinescale():1;e.hasfill()||(a=math.max(a,this.strokecontainthreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformcoordtolocal(t,e),n=this.getboundingrect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasstroke()){var r=o.linewidth,s=o.strokenoscale?this.getlinescale():1;if(s>1e-10&&(o.hasfill()||(r=math.max(r,this.strokecontainthreshold)),zn(a,r/s,t,e)))return!0}if(o.hasfill())return on(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtypath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__cliptarget&&this.__cliptarget.dirty()},animateshape:function(t){return this.animate("shape",t)},attrkv:function(t,e){"shape"===t?(this.setshape(e),this.__dirtypath=!0,this._rect=null):je.prototype.attrkv.call(this,t,e)},setshape:function(t,e){var i=this.shape;if(i){if(b(t))for(var n in t)t.hasownproperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getlinescale:function(){var t=this.transform;return t&&w_(t[0]-1)>1e-10&&w_(t[3]-1)>1e-10?math.sqrt(w_(t[0]*t[3]-t[2]*t[1])):1}},nn.extend=function(t){var e=function(e){nn.call(this,e),t.style&&this.style.extendfrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasownproperty(o)&&i.hasownproperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};h(e,nn);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(nn,je);var f_=p_.cmd,z_=[[],[],[]],u_=math.sqrt,x_=math.atan2,j_=function(t,e){var i,n,o,a,r,s,l=t.data,h=f_.m,u=f_.c,c=f_.l,d=f_.r,f=f_.a,g=f_.q;for(o=0,a=0;o=11?function(){var e,i=this.__clippaths,n=this.style;if(i)for(var o=0;oi-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var g=d*d,p=d*g;n.push([wn(s[0],f[0],l[0],h[0],d,g,p),wn(s[1],f[1],l[1],h[1],d,g,p)])}return n},hb=function(t,e,i,n){var o,a,r,s,l=[],h=[],u=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=i&&a>=o)return{x:i,y:o,width:n-i,height:a-o}},createicon:do,group:jy,image:qe,text:ib,circle:nb,sector:rb,ring:sb,polygon:ub,polyline:cb,rect:db,line:fb,beziercurve:pb,arc:mb,compoundpath:vb,lineargradient:xb,radialgradient:_b,boundingrect:jt}),ab=["textstyle","color"],cb={gettextcolor:function(t){var e=this.ecmodel;return this.getshallow("color")||(!t&&e?e.get(ab):null)},getfont:function(){return _o({fontstyle:this.getshallow("fontstyle"),fontweight:this.getshallow("fontweight"),fontsize:this.getshallow("fontsize"),fontfamily:this.getshallow("fontfamily")},this.ecmodel)},gettextrect:function(t){return de(t,this.getfont(),this.getshallow("align"),this.getshallow("verticalalign")||this.getshallow("baseline"),this.getshallow("padding"),this.getshallow("rich"),this.getshallow("truncatetext"))}},db=$x([["fill","color"],["stroke","bordercolor"],["linewidth","borderwidth"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"],["textposition"],["textalign"]]),lb={getitemstyle:function(t,e){var i=db(this,t,e),n=this.getborderlinedash();return n&&(i.linedash=n),i},getborderlinedash:function(){var t=this.get("bordertype");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},kb=u;lo.prototype={constructor:lo,init:null,mergeoption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:ko(this.option,this.parsepath(t),!e&&po(this,t))},getshallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&po(this,t);return null==n&&o&&(n=o.getshallow(t)),n},getmodel:function(t,e){var i,n=null==t?this.option:ko(this.option,t=this.parsepath(t));return e=e||(i=po(this,t))&&i.getmodel(t),new lo(n,e,this.ecmodel)},isempty:function(){return null==this.option},restoredata:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setreadonly:function(t){},parsepath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizegetparent:function(t){xi(this,"getparent",t)},isanimationenabled:function(){if(!uv.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentmodel)return this.parentmodel.isanimationenabled()}}},ki(lo),kb(lo,jx),kb(lo,t_),kb(lo,cb),kb(lo,lb);var pb=d,ob=b,zb=["fontstyle","fontweight","fontsize","fontfamily","rich","tag","color","textbordercolor","textborderwidth","width","height","lineheight","align","verticalalign","baseline","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety","textshadowcolor","textshadowblur","textshadowoffsetx","textshadowoffsety","backgroundcolor","bordercolor","borderwidth","borderradius","padding"],nb={getdataparams:function(t,e){var i=this.getdata(e),n=this.getrawvalue(t,e),o=i.getrawindex(t),a=i.getname(t,!0),r=i.getrawdataitem(t),s=i.getitemvisual(t,"color");return{componenttype:this.maintype,componentsubtype:this.subtype,seriestype:"series"===this.maintype?this.subtype:null,seriesindex:this.seriesindex,seriesid:this.id,seriesname:this.name,name:a,dataindex:o,data:r,datatype:e,value:n,color:s,marker:fi(s),$vars:["seriesname","name","value"]}},getformattedlabel:function(t,e,i,n,o){e=e||"normal";var a=this.getdata(i).getitemmodel(t),r=this.getdataparams(t,i);null!=n&&r.value instanceof array&&(r.value=r.value[n]);var s=a.get([o||"label",e,"formatter"]);return"function"==typeof s?(r.status=e,s(r)):"string"==typeof s?wi(s,r):void 0},getrawvalue:function(t,e){var i=this.getdata(e).getrawdataitem(t);if(null!=i)return!ob(i)||i instanceof array?i:i.value},formattooltip:n},eb=function(){var t=0;return function(){var e="\0__ec_prop_getter_"+t++;return function(t){return t[e]||(t[e]={})}}}(),rb=0,vb="_",bb=d,gb=["left","right","top","bottom","width","height"],wb=[["width","left","right"],["height","top","bottom"]],hb=yo,fb=(v(yo,"vertical"),v(yo,"horizontal"),{getboxlayoutparams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),zb=array.prototype.push,ub=lo.extend({type:"component",id:"",name:"",maintype:"",subtype:"",componentindex:0,defaultoption:null,ecmodel:null,dependentmodels:[],uid:null,layoutmode:null,$constructor:function(t,e,i,n){lo.call(this,t,e,i,n),this.uid=qo("componentmodel")},init:function(t,e,i,n){this.mergedefaultandtheme(t,i)},mergedefaultandtheme:function(t,e){var i=this.layoutmode,o=i?ea(t):{};n(t,e.gettheme().get(this.maintype)),n(t,this.getdefaultoption()),i&&ta(t,o,i)},mergeoption:function(t,e){n(this.option,t,!0);var i=this.layoutmode;i&&ta(this.option,t,i)},optionupdated:function(t,e){},getdefaultoption:function(){if(!qi(this,"__defaultoption")){for(var t=[],e=this.constructor;e;){var i=e.prototype.defaultoption;i&&t.push(i),e=e.superclass}for(var o={},a=t.length-1;a>=0;a--)o=n(o,t[a],!0);xi(this,"__defaultoption",o)}return ji(this,"__defaultoption")},getreferringcomponents:function(t){return this.ecmodel.querycomponents({maintype:t,index:this.get(t+"index",!0),id:this.get(t+"id",!0)})}});tn(ub,{registerwhenextend:!0}),function(t){var e={};t.registersubtypedefaulter=function(t,i){t=yi(t),e[t.main]=i},t.determinesubtype=function(i,n){var o=n.type;if(!o){var a=yi(i).main;t.hassubtypes(i)&&e[a]&&(o=e[a](n))}return o}}(ub),function(t,e){function i(t){var i={},a=[];return d(t,function(r){var s=n(i,r),h=o(s.originaldeps=e(r),t);s.entrycount=h.length,0===s.entrycount&&a.push(r),d(h,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noentrylist:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return d(t,function(t){l(e,t)>=0&&i.push(t)}),i}t.topologicaltravel=function(t,e,n,o){function a(t){s[t].entrycount--,0===s[t].entrycount&&l.push(t)}if(t.length){var r=i(e),s=r.graph,l=r.noentrylist,h={};for(d(t,function(t){h[t]=!0});l.length;){var u=l.pop(),c=s[u],f=!!h[u];f&&(n.call(o,u,c.originaldeps.slice()),delete h[u]),d(c.successor,f?function(t){h[t]=!0,a(t)}:a)}d(h,function(){throw new error("circle dependency may exists")})}}}(ub,function(t){var e=[];return d(ub.getclassesbymaintype(t),function(t){zb.apply(e,t.prototype.dependencies||[])}),f(e,function(t){return yi(t).main})}),u(ub,fb);var xb="";"undefined"!=typeof navigator&&(xb=navigator.platform||"");var jb={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textstyle:{fontfamily:xb.match(/^win/)?"microsoft yahei":"sans-serif",fontsize:12,fontstyle:"normal",fontweight:"normal"},blendmode:null,animation:"auto",animationduration:1e3,animationdurationupdate:300,animationeasing:"exponentialout",animationeasingupdate:"cubicout",animationthreshold:2e3,progressivethreshold:3e3,progressive:400,hoverlayerthreshold:3e3,useutc:!1},qb={clearcolorpalette:function(){xi(this,"coloridx",0),xi(this,"colornamemap",{})},getcolorfrompalette:function(t,e){var i=ji(e=e||this,"coloridx")||0,n=ji(e,"colornamemap")||xi(e,"colornamemap",{});if(n.hasownproperty(t))return n[t];var o=this.get("color",!0)||[];if(o.length){var a=o[i];return t&&(n[t]=a),xi(e,"coloridx",(i+1)%o.length),a}}},yb=d,$b=p,kb=f,jb=y,qb=l,tw=b,ew="\0_ec_inner",iw=lo.extend({constructor:iw,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new lo(i),this._optionmanager=n},setoption:function(t,e){l(!(ew in t),"please use chart.getoption()"),this._optionmanager.setoption(t,e),this.resetoption(null)},resetoption:function(t){var e=!1,i=this._optionmanager;if(!t||"recreate"===t){var n=i.mountoption("recreate"===t);this.option&&"recreate"!==t?(this.restoredata(),this.mergeoption(n)):oa.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoredata(),!t||"recreate"===t||"timeline"===t){var o=i.gettimelineoption(this);o&&(this.mergeoption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getmediaoption(this,this._api);a.length&&yb(a,function(t){this.mergeoption(t,e=!0)},this)}return e},mergeoption:function(t){var e=this.option,o=this._componentsmap,r=[];yb(t,function(t,o){null!=t&&(ub.hasclass(o)?r.push(o):e[o]=null==e[o]?i(t):n(e[o],t,!0))}),ub.topologicaltravel(r,ub.getallclassmaintypes(),function(i,n){var r=oo(t[i]),s=vo(o.get(i),r);bo(s),yb(s,function(t,e){var n=t.option;tw(n)&&(t.keyinfo.maintype=i,t.keyinfo.subtype=ra(i,n,t.exist))});var l=aa(o,n);e[i]=[],o.set(i,[]),yb(s,function(t,n){var r=t.exist,s=t.option;if(l(tw(s)||r,"empty component definition"),s){var h=ub.getclass(i,t.keyinfo.subtype,!0);if(r&&r instanceof h)r.name=t.keyinfo.name,r.mergeoption(s,this),r.optionupdated(s,!1);else{var u=a({dependentmodels:l,componentindex:n},t.keyinfo);a(r=new h(s,this,this,u),u),r.init(s,this,this,u),r.optionupdated(null,!0)}}else r.mergeoption({},this),r.optionupdated({},!1);o.get(i)[n]=r,e[i][n]=r.option},this),"series"===i&&(this._seriesindices=sa(o.get("series")))},this),this._seriesindices=this._seriesindices||[]},getoption:function(){var t=i(this.option);return yb(t,function(e,i){if(ub.hasclass(i)){for(var n=(e=oo(e)).length-1;n>=0;n--)go(e[n])&&e.splice(n,1);t[i]=e}}),delete t[ew],t},gettheme:function(){return this._theme},getcomponent:function(t,e){var i=this._componentsmap.get(t);if(i)return i[e||0]},querycomponents:function(t){var e=t.maintype;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsmap.get(e);if(!a||!a.length)return[];var r;if(null!=i)jb(i)||(i=[i]),r=$b(kb(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=jb(n);r=$b(a,function(t){return s&&qb(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var l=jb(o);r=$b(a,function(t){return l&&qb(o,t.name)>=0||!l&&t.name===o})}else r=a.slice();return la(r,t)},findcomponents:function(t){var e=t.query,i=t.maintype,n=function(t){var e=i+"index",n=i+"id",o=i+"name";return!t||null==t[e]&&null==t[n]&&null==t[o]?null:{maintype:i,index:t[e],id:t[n],name:t[o]}}(e);return function(e){return t.filter?$b(e,t.filter):e}(la(n?this.querycomponents(n):this._componentsmap.get(i),t))},eachcomponent:function(t,e,i){var n=this._componentsmap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){yb(t,function(t,o){e.call(i,n,t,o)})});else if(_(t))yb(n.get(t),e,i);else if(tw(t)){var o=this.findcomponents(t);yb(o,e,i)}},getseriesbyname:function(t){var e=this._componentsmap.get("series");return $b(e,function(e){return e.name===t})},getseriesbyindex:function(t){return this._componentsmap.get("series")[t]},getseriesbytype:function(t){var e=this._componentsmap.get("series");return $b(e,function(e){return e.subtype===t})},getseries:function(){return this._componentsmap.get("series").slice()},eachseries:function(t,e){yb(this._seriesindices,function(i){var n=this._componentsmap.get("series")[i];t.call(e,n,i)},this)},eachrawseries:function(t,e){yb(this._componentsmap.get("series"),t,e)},eachseriesbytype:function(t,e,i){yb(this._seriesindices,function(n){var o=this._componentsmap.get("series")[n];o.subtype===t&&e.call(i,o,n)},this)},eachrawseriesbytype:function(t,e,i){return yb(this.getseriesbytype(t),e,i)},isseriesfiltered:function(t){return l(this._seriesindices,t.componentindex)<0},getcurrentseriesindices:function(){return(this._seriesindices||[]).slice()},filterseries:function(t,e){var i=$b(this._componentsmap.get("series"),t,e);this._seriesindices=sa(i)},restoredata:function(){var t=this._componentsmap;this._seriesindices=sa(t.get("series"));var e=[];t.each(function(t,i){e.push(i)}),ub.topologicaltravel(e,ub.getallclassmaintypes(),function(e,i){yb(t.get(e),function(t){t.restoredata()})})}});u(iw,qb);var nw=["getdom","getzr","getwidth","getheight","getdevicepixelratio","dispatchaction","isdisposed","on","off","getdataurl","getconnecteddataurl","getmodel","getoption","getviewofcomponentmodel","getviewofseriesmodel"],ow={};ua.prototype={constructor:ua,create:function(t,e){var i=[];d(ow,function(n,o){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinatesystems=i},update:function(t,e){d(this._coordinatesystems,function(i){i.update&&i.update(t,e)})},getcoordinatesystems:function(){return this._coordinatesystems.slice()}},ua.register=function(t,e){ow[t]=e},ua.get=function(t){return ow[t]};var aw=d,rw=i,sw=f,lw=n,hw=/^(min|max)?(.+)$/;ca.prototype={constructor:ca,setoption:function(t,e){t=rw(t,!0);var i=this._optionbackup,n=da.call(this,t,e,!i);this._newbaseoption=n.baseoption,i?(ma(i.baseoption,n.baseoption),n.timelineoptions.length&&(i.timelineoptions=n.timelineoptions),n.medialist.length&&(i.medialist=n.medialist),n.mediadefault&&(i.mediadefault=n.mediadefault)):this._optionbackup=n},mountoption:function(t){var e=this._optionbackup;return this._timelineoptions=sw(e.timelineoptions,rw),this._medialist=sw(e.medialist,rw),this._mediadefault=rw(e.mediadefault),this._currentmediaindices=[],rw(t?e.baseoption:this._newbaseoption)},gettimelineoption:function(t){var e,i=this._timelineoptions;if(i.length){var n=t.getcomponent("timeline");n&&(e=rw(i[n.getcurrentindex()],!0))}return e},getmediaoption:function(t){var e=this._api.getwidth(),i=this._api.getheight(),n=this._medialist,o=this._mediadefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s":"")+r.join(a?"
":", ")}(o):gi(vi(o)),r=n.getname(t),s=n.getitemvisual(t,"color");b(s)&&s.colorstops&&(s=(s.colorstops[0]||{}).color);var l=fi(s=s||"transparent"),h=this.name;return"\0-"===h&&(h=""),h=h?gi(h)+(e?": ":"
"):"",e?l+h+a:h+l+(r?gi(r)+": "+a:a)},isanimationenabled:function(){if(uv.node)return!1;var t=this.getshallow("animation");return t&&this.getdata().count()>this.getshallow("animationthreshold")&&(t=!1),t},restoredata:function(){xi(this,"data",ji(this,"databeforeprocessed").cloneshallow())},getcolorfrompalette:function(t,e){var i=this.ecmodel,n=qb.getcolorfrompalette.call(this,t,e);return n||(n=i.getcolorfrompalette(t,e)),n},getaxistooltipdata:null,gettooltipposition:null});u(yw,nb),u(yw,qb);var xw=function(){this.group=new jy,this.uid=qo("viewcomponent")};xw.prototype={constructor:xw,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var _w=xw.prototype;_w.updateview=_w.updatelayout=_w.updatevisual=function(t,e,i,n){},ki(xw),tn(xw,{registerwhenextend:!0}),ta.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){ca(t.getdata(),n,"emphasis")},downplay:function(t,e,i,n){ca(t.getdata(),n,"normal")},remove:function(t,e){this.group.removeall()},dispose:function(){}};var bw=ta.prototype;bw.updateview=bw.updatelayout=bw.updatevisual=function(t,e,i,n){this.render(t,e,i,n)},ki(ta),tn(ta,{registerwhenextend:!0});var ww="\0__throttleoriginmethod",sw="\0__throttlerate",mw="\0__throttletype",iw=math.pi,tw=d,aw=ub.parseclasstype,cw={zrender:"3.7.3"},dw=1e3,lw=1e3,kw=3e3,pw={processor:{filter:dw,statistic:5e3},visual:{layout:lw,global:2e3,chart:kw,component:4e3,brush:5e3}},ow="__flaginmainprocess",zw="__optionupdated",nw=/^[a-za-z0-9_]+$/;oa.prototype.on=pa("on"),oa.prototype.off=pa("off"),oa.prototype.one=pa("one"),u(oa,fy);var ew=za.prototype;ew._onframe=function(){if(this[zw]){var t=this[zw].silent;this[ow]=!0,rw.prepareandupdate.call(this),this[ow]=!1,this[zw]=!1,va.call(this,t),ba.call(this,t)}},ew.getdom=function(){return this._dom},ew.getzr=function(){return this._zr},ew.setoption=function(t,e,i){var n;if(b(e)&&(i=e.lazyupdate,n=e.silent,e=e.notmerge),this[ow]=!0,!this._model||e){var o=new ca(this._api),a=this._theme;(this._model=new iw(null,null,a,o)).init(null,null,a,o)}this._model.setoption(t,hw),i?(this[zw]={silent:n},this[ow]=!1):(rw.prepareandupdate.call(this),this._zr.flush(),this[zw]=!1,this[ow]=!1,va.call(this,n),ba.call(this,n))},ew.settheme=function(){console.log("echarts#settheme() is deprecated in echarts 3.0")},ew.getmodel=function(){return this._model},ew.getoption=function(){return this._model&&this._model.getoption()},ew.getwidth=function(){return this._zr.getwidth()},ew.getheight=function(){return this._zr.getheight()},ew.getdevicepixelratio=function(){return this._zr.painter.dpr||window.devicepixelratio||1},ew.getrenderedcanvas=function(t){if(uv.canvassupported){(t=t||{}).pixelratio=t.pixelratio||1,t.backgroundcolor=t.backgroundcolor||this._model.get("backgroundcolor");var e=this._zr;return d(e.storage.getdisplaylist(),function(t){t.stopanimation(!0)}),e.painter.getrenderedcanvas(t)}},ew.getsvgdataurl=function(){if(uv.svgsupported){var t=this._zr;return d(t.storage.getdisplaylist(),function(t){t.stopanimation(!0)}),t.painter.pathtosvg()}},ew.getdataurl=function(t){var e=(t=t||{}).excludecomponents,i=this._model,n=[],o=this;tw(e,function(t){i.eachcomponent({maintype:t},function(t){var e=o._componentsmap[t.__viewid];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.getrenderedcanvas(t).todataurl("image/"+(t&&t.type||"png"));return tw(n,function(t){t.group.ignore=!1}),a},ew.getconnecteddataurl=function(t){if(uv.canvassupported){var e=this.group,n=math.min,o=math.max;if(qw[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,h=[],u=t&&t.pixelratio||1;d(jw,function(u,c){if(u.group===e){var d=u.getrenderedcanvas(i(t)),f=u.getdom().getboundingclientrect();a=n(f.left,a),r=n(f.top,r),s=o(f.right,s),l=o(f.bottom,l),h.push({dom:d,left:f.left,top:f.top})}});var c=(s*=u)-(a*=u),f=(l*=u)-(r*=u),g=iy();g.width=c,g.height=f;var p=yi(g);return tw(h,function(t){var e=new qe({style:{x:t.left*u-a,y:t.top*u-r,image:t.dom}});p.add(e)}),p.refreshimmediately(),g.todataurl("image/"+(t&&t.type||"png"))}return this.getdataurl(t)}},ew.converttopixel=v(na,"converttopixel"),ew.convertfrompixel=v(na,"convertfrompixel"),ew.containpixel=function(t,e){var i;return t=fo(this._model,t),d(t,function(t,n){n.indexof("models")>=0&&d(t,function(t){var o=t.coordinatesystem;if(o&&o.containpoint)i|=!!o.containpoint(e);else if("seriesmodels"===n){var a=this._chartsmap[t.__viewid];a&&a.containpoint&&(i|=a.containpoint(e,t))}},this)},this),!!i},ew.getvisual=function(t,e){var i=(t=fo(this._model,t,{defaultmaintype:"series"})).seriesmodel.getdata(),n=t.hasownproperty("dataindexinside")?t.dataindexinside:t.hasownproperty("dataindex")?i.indexofrawindex(t.dataindex):null;return null!=n?i.getitemvisual(n,e):i.getvisual(e)},ew.getviewofcomponentmodel=function(t){return this._componentsmap[t.__viewid]},ew.getviewofseriesmodel=function(t){return this._chartsmap[t.__viewid]};var rw={update:function(t){var e=this._model,i=this._api,n=this._coordsysmgr,o=this._zr;if(e){e.restoredata(),n.create(this._model,this._api),ha.call(this,e,i),fa.call(this,e),n.update(e,i),ua.call(this,e,t),xa.call(this,e,t);var a=e.get("backgroundcolor")||"transparent",r=o.painter;if(r.issinglecanvas&&r.issinglecanvas())o.configlayer(0,{clearcolor:a});else{if(!uv.canvassupported){var s=mt(a);a=ot(s,"rgb"),0===s[3]&&(a="transparent")}a.colorstops||a.image?(o.configlayer(0,{clearcolor:a}),this.__hasgradientorpatternbg=!0,this._dom.style.background="transparent"):(this.__hasgradientorpatternbg&&o.configlayer(0,{clearcolor:null}),this.__hasgradientorpatternbg=!1,this._dom.style.background=a)}tw(fw,function(t){t(e,i)})}},updateview:function(t){var e=this._model;e&&(e.eachseries(function(t){t.getdata().clearallvisual()}),ua.call(this,e,t),ga.call(this,"updateview",e,t))},updatevisual:function(t){var e=this._model;e&&(e.eachseries(function(t){t.getdata().clearallvisual()}),ua.call(this,e,t,!0),ga.call(this,"updatevisual",e,t))},updatelayout:function(t){var e=this._model;e&&(za.call(this,e,t),ga.call(this,"updatelayout",e,t))},prepareandupdate:function(t){var e=this._model;wa.call(this,"component",e),wa.call(this,"chart",e),rw.update.call(this,t)}};ew.resize=function(t){this[ow]=!0,this._zr.resize(t);var e=this._model&&this._model.resetoption("media");rw[e?"prepareandupdate":"update"].call(this),this._loadingfx&&this._loadingfx.resize(),this[ow]=!1;var i=t&&t.silent;va.call(this,i),ba.call(this,i)},ew.showloading=function(t,e){if(b(t)&&(e=t,t=""),t=t||"default",this.hideloading(),xw[t]){var i=xw[t](this._api,e),n=this._zr;this._loadingfx=i,n.add(i)}},ew.hideloading=function(){this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null},ew.makeactionfromevent=function(t){var e=a({},t);return e.type=gw[t.type],e},ew.dispatchaction=function(t,e){b(e)||(e={silent:!!e}),bw[t.type]&&this._model&&(this[ow]?this._pendingactions.push(t):(ra.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&uv.browser.wechat&&this._throttledzrflush(),va.call(this,e.silent),ba.call(this,e.silent)))},ew.on=pa("on"),ew.off=pa("off"),ew.one=pa("one");var vw=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];ew._initevents=function(){tw(vw,function(t){this._zr.on(t,function(e){var i,n=this.getmodel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataindex){var r=o.datamodel||n.getseriesbyindex(o.seriesindex);i=r&&r.getdataparams(o.dataindex,o.datatype)||{}}else o&&o.eventdata&&(i=a({},o.eventdata));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),tw(gw,function(t,e){this._messagecenter.on(e,function(t){this.trigger(e,t)},this)},this)},ew.isdisposed=function(){return this._disposed},ew.clear=function(){this.setoption({series:[]},!0)},ew.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;tw(this._componentsviews,function(i){i.dispose(e,t)}),tw(this._chartsviews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete jw[this.id]}},u(za,fy);var bw={},gw={},ww=[],hw=[],fw=[],zw=[],uw={},xw={},jw={},qw={},yw=new date-0,$w=new date-0,kw="_echarts_instance_",jw={},qw=ja;ar(2e3,function(t){t.eachrawseries(function(e){var i=(e.visualcoloraccesspath||"itemstyle.normal.color").split("."),n=e.getdata(),o=e.get(i)||e.getcolorfrompalette(e.get("name"));n.setvisual("color",o),t.isseriesfiltered(e)||("function"!=typeof o||o instanceof yb||n.each(function(t){n.setitemvisual(t,"color",o(e.getdataparams(t)))}),n.each(function(t){var e=n.getitemmodel(t).get(i,!0);null!=e&&n.setitemvisual(t,"color",e)}))})}),tr(vw),rr("default",function(t,e){r(e=e||{},{text:"loading",color:"#c23531",textcolor:"#000",maskcolor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new db({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4}),n=new mb({shape:{startangle:-iw/2,endangle:-iw/2+.1,r:10},style:{stroke:e.color,linecap:"round",linewidth:5},zlevel:e.zlevel,z:10001}),o=new db({style:{fill:"none",text:e.text,textposition:"right",textdistance:10,textfill:e.textcolor},zlevel:e.zlevel,z:10001});n.animateshape(!0).when(1e3,{endangle:3*iw/2}).start("circularinout"),n.animateshape(!0).when(1e3,{startangle:3*iw/2}).delay(300).start("circularinout");var a=new jy;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getwidth()/2,a=t.getheight()/2;n.setshape({cx:e,cy:a});var r=n.shape.r;o.setshape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setshape({x:0,y:0,width:t.getwidth(),height:t.getheight()})},a.resize(),a}),ir({type:"highlight",event:"highlight",update:"highlight"},n),ir({type:"downplay",event:"downplay",update:"downplay"},n);var ts={};fr.prototype={constructor:fr,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(gr(t,{},n,"_oldkeygetter",this),gr(e,i,o,"_newkeygetter",this),a=0;a0&&(_+="__ec__"+u[x]),u[x]++),_&&(h[v]=_)}this._namelist=e,this._idlist=h},rs.count=function(){return this.indices.length},rs.get=function(t,e,i){var n=this._storage,o=this.indices[e];if(null==o||!n[t])return nan;var a=n[t][o];if(i){var r=this._dimensioninfos[t];if(r&&r.stackable)for(var s=this.stackedon;s;){var l=s.get(t,e);(a>=0&&l>0||a<=0&&l<0)&&(a+=l),s=s.stackedon}}return a},rs.getvalues=function(t,e,i){var n=[];y(t)||(i=e,e=t,t=this.dimensions);for(var o=0,a=t.length;ol&&(l=a));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},rs.getsum=function(t,e){var i=0;if(this._storage[t])for(var n=0,o=this.count();nt))return a;o=a-1}}return-1},rs.indicesofnearest=function(t,e,i,n){var o=[];if(!this._storage[t])return o;null==n&&(n=1/0);for(var a=number.max_value,r=-1,s=0,l=this.count();s=0&&r<0)&&(a=u,r=h,o.length=0),o.push(s))}return o},rs.getrawindex=function(t){var e=this.indices[t];return null==e?-1:e},rs.getrawdataitem=function(t){return this._rawdata.getitem(this.getrawindex(t))},rs.getname=function(t){return this._namelist[this.indices[t]]||""},rs.getid=function(t){return this._idlist[this.indices[t]]||this.getrawindex(t)+""},rs.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var o=[],a=(t=f(vr(t),this.getdimension,this)).length,r=this.indices;n=n||this;for(var s=0;sf-g&&(c=f-g,h.length=c);for(var p=0;p=e[0]&&t<=e[1]},ar.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},ar.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},ar.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},ar.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getdataextent(e,!0))},ar.prototype.getextent=function(){return this._extent.slice()},ar.prototype.setextent=function(t,e){var i=this._extent;isnan(t)||(i[0]=t),isnan(e)||(i[1]=e)},ar.prototype.gettickslabels=function(){for(var t=[],e=this.getticks(),i=0;ie[1]&&(e[1]=t[1]),ys.prototype.setextent.call(this,e[0],e[1])},getinterval:function(){return this._interval},setinterval:function(t){this._interval=t,this._niceextent=this._extent.slice(),this._intervalprecision=dr(t)},getticks:function(){return pr(this._interval,this._extent,this._niceextent,this._intervalprecision)},gettickslabels:function(){for(var t=[],e=this.getticks(),i=0;i>>1;t[o][1]i&&(a=i);var r=ms.length,s=ws(ms,a,0,r),l=ms[math.min(s,r-1)],h=l[1];"year"===l[0]&&(h*=ni(o/h/t,!0));var u=this.getsetting("useutc")?0:60*new date(+n[0]||+n[1]).gettimezoneoffset()*1e3,c=[math.round(_s((n[0]-u)/h)*h+u),math.round(bs((n[1]-u)/h)*h+u)];kr(c,n),this._steplvl=l,this._interval=h,this._niceextent=c},parse:function(t){return+pi(t)}});d(["contain","normalize"],function(t){ss.prototype[t]=function(e){return xs[t].call(this,this.parse(e))}});var ms=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nmm-dd",6e4],["hh:mm\nmm-dd",3e5],["hh:mm\nmm-dd",6e5],["hh:mm\nmm-dd",9e5],["hh:mm\nmm-dd",18e5],["hh:mm\nmm-dd",36e5],["hh:mm\nmm-dd",72e5],["hh:mm\nmm-dd",216e5],["hh:mm\nmm-dd",432e5],["mm-dd\nyyyy",864e5],["mm-dd\nyyyy",1728e5],["mm-dd\nyyyy",2592e5],["mm-dd\nyyyy",3456e5],["mm-dd\nyyyy",432e6],["mm-dd\nyyyy",5184e5],["week",6048e5],["mm-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",36288e5],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];ss.create=function(t){return new ss({useutc:t.ecmodel.get("useutc")})};var is=ar.prototype,ts=ys.prototype,as=ai,cs=mi,ds=math.floor,ls=math.ceil,ks=math.pow,ps=math.log,os=ar.extend({type:"log",base:10,$constructor:function(){ar.apply(this,arguments),this._originalscale=new ys},getticks:function(){var t=this._originalscale,e=this._extent,i=t.getextent();return f(ts.getticks.call(this),function(n){var o=mi(ks(this.base,n));return o=n===e[0]&&t.__fixmin?or(o,i[0]):o,o=n===e[1]&&t.__fixmax?or(o,i[1]):o},this)},getlabel:ts.getlabel,scale:function(t){return t=is.scale.call(this,t),ks(this.base,t)},setextent:function(t,e){var i=this.base;t=ps(t)/ps(i),e=ps(e)/ps(i),ts.setextent.call(this,t,e)},getextent:function(){var t=this.base,e=is.getextent.call(this);e[0]=ks(t,e[0]),e[1]=ks(t,e[1]);var i=this._originalscale,n=i.getextent();return i.__fixmin&&(e[0]=or(e[0],n[0])),i.__fixmax&&(e[1]=or(e[1],n[1])),e},unionextent:function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=ps(t[0])/ps(e),t[1]=ps(t[1])/ps(e),is.unionextent.call(this,t)},unionextentfromdata:function(t,e){this.unionextent(t.getdataextent(e,!0,function(t){return t>0}))},niceticks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=oi(i);for(t/i*n<=.5&&(n*=10);!isnan(n)&&math.abs(n)<1&&math.abs(n)>0;)n*=10;var o=[mi(ls(e[0]/n)*n),mi(ds(e[1]/n)*n)];this._interval=n,this._niceextent=o}},niceextent:function(t){ts.niceextent.call(this,t);var e=this._originalscale;e.__fixmin=t.fixmin,e.__fixmax=t.fixmax}});d(["contain","normalize"],function(t){os.prototype[t]=function(e){return e=ps(e)/ps(this.base),is[t].call(this,e)}}),os.create=function(){return new os};var zs={getformattedlabels:function(){return vr(this.axis,this.get("axislabel.formatter"))},getcategories:function(){return"category"===this.get("type")&&f(this.get("data"),gr)},getmin:function(t){var e=this.option,i=t||null==e.rangestart?e.min:e.rangestart;return this.axis&&null!=i&&"datamin"!==i&&"function"!=typeof i&&!m(i)&&(i=this.axis.scale.parse(i)),i},getmax:function(t){var e=this.option,i=t||null==e.rangeend?e.max:e.rangeend;return this.axis&&null!=i&&"datamax"!==i&&"function"!=typeof i&&!m(i)&&(i=this.axis.scale.parse(i)),i},getneedcrosszero:function(){var t=this.option;return null==t.rangestart&&null==t.rangeend&&!t.scale},getcoordsysmodel:n,setrange:function(t,e){this.option.rangestart=t,this.option.rangeend=e},resetrange:function(){this.option.rangestart=this.option.rangeend=null}},ns=zn({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveto(i,n-a),t.lineto(i+o,n+a),t.lineto(i-o,n+a),t.closepath()}}),es=zn({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveto(i,n-a),t.lineto(i+o,n),t.lineto(i,n+a),t.lineto(i-o,n),t.closepath()}}),rs=zn({type:"pin",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,h=math.asin(s/r),u=math.cos(h)*r,c=math.sin(h),d=math.cos(h),f=.6*r,g=.7*r;t.moveto(i-u,l+s),t.arc(i,l,r,math.pi-h,2*math.pi+h),t.beziercurveto(i+u-c*f,l+s+d*f,i,n-g,i,n),t.beziercurveto(i,n-g,i-u+c*f,l+s+d*f,i-u,l+s),t.closepath()}}),vs=zn({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveto(o,a),t.lineto(o+r,a+i),t.lineto(o,a+i/4*3),t.lineto(o-r,a+i),t.lineto(o,a),t.closepath()}}),bs={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundrect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=math.min(i,n)/4},square:function(t,e,i,n,o){var a=math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},gs={};d({line:fb,rect:db,roundrect:db,square:db,circle:nb,diamond:es,pin:rs,arrow:vs,triangle:ns},function(t,e){gs[e]=new t});var ws=zn({type:"symbol",shape:{symboltype:"",x:0,y:0,width:0,height:0},beforebrush:function(){var t=this.style;"pin"===this.shape.symboltype&&"inside"===t.textposition&&(t.textposition=["50%","40%"],t.textalign="center",t.textverticalalign="middle")},buildpath:function(t,e,i){var n=e.symboltype,o=gs[n];"none"!==e.symboltype&&(o||(o=gs[n="rect"]),bs[n](e.x,e.y,e.width,e.height,o.shape),o.buildpath(t,o.shape,i))}}),hs=(object.freeze||object)({createlist:function(t){return sr(t.get("data"),t,t.ecmodel)},createscale:function(t,e){var i=e;e instanceof lo||u(i=new lo(e),zs);var n=er(i);return n.setextent(t[0],t[1]),nr(n,i),n},mixinaxismodelcommonmethods:function(t){u(t,zs)},completedimensions:xr,createsymbol:hr}),fs=wi,zs=[0,1],us=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onband=!1,this._labelinterval};us.prototype={constructor:us,contain:function(t){var e=this._extent,i=math.min(e[0],e[1]),n=math.max(e[0],e[1]);return t>=i&&t<=n},containdata:function(t){return this.contain(this.datatocoord(t))},getextent:function(){return this._extent.slice()},getpixelprecision:function(t){return ci(t||this.scale.getextent(),this._extent)},setextent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},datatocoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onband&&"ordinal"===n.type&&fr(i=i.slice(),n.count()),fs(t,zs,i,e)},coordtodata:function(t,e){var i=this._extent,n=this.scale;this.onband&&"ordinal"===n.type&&fr(i=i.slice(),n.count());var o=fs(t,i,zs,e);return this.scale.scale(o)},pointtodata:function(t,e){},gettickscoords:function(t){if(this.onband&&!t){for(var e=this.getbands(),i=[],n=0;n0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"multipolygon"===i.type&&d(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new xr(e.name,o,e.cp);return a.properties=e,a})},qs={};d(["map","each","filter","indexof","inherits","reduce","filter","bind","curry","isarray","isstring","isobject","isfunction","extend","defaults","clone","merge"],function(t){qs[t]=ay[t]}),yw.extend({type:"series.line",dependencies:["grid","polar"],getinitialdata:function(t,e){return sr(t.data,this,e)},defaultoption:{zlevel:0,z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,hoveranimation:!0,clipoverflow:!0,label:{normal:{position:"top"}},linestyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothmonotone:null,symbol:"emptycircle",symbolsize:4,symbolrotate:null,showsymbol:!0,showallsymbol:!1,connectnulls:!1,sampling:"none",animationeasing:"linear",progressive:0,hoverlayerthreshold:1/0}});var ys=jr.prototype;ys._createsymbol=function(t,e,i,n){this.removeall();var o=hr(t,-1,-1,2,2,e.getitemvisual(i,"color"));o.attr({z2:100,culling:!0,scale:kr(n)}),o.drift=qr,this._symboltype=t,this.add(o)},ys.stopsymbolanimation=function(t){this.childat(0).stopanimation(t)},ys.getsymbolpath=function(){return this.childat(0)},ys.getscale=function(){return this.childat(0).scale},ys.highlight=function(){this.childat(0).trigger("emphasis")},ys.downplay=function(){this.childat(0).trigger("normal")},ys.setz=function(t,e){var i=this.childat(0);i.zlevel=t,i.z=e},ys.setdraggable=function(t){var e=this.childat(0);e.draggable=t,e.cursor=t?"move":"pointer"},ys.updatedata=function(t,e,i){this.silent=!1;var n=t.getitemvisual(e,"symbol")||"circle",o=t.hostmodel,a=$r(t,e),r=n!==this._symboltype;if(r?this._createsymbol(n,t,e,a):((s=this.childat(0)).silent=!1,wo(s,{scale:kr(a)},o,e)),this._updatecommon(t,e,a,i),r){var s=this.childat(0),l=i&&i.fadein,h={scale:s.scale.slice()};l&&(h.style={opacity:s.style.opacity}),s.scale=[0,0],l&&(s.style.opacity=0),so(s,h,o,e)}this._seriesmodel=o};var $s=["itemstyle","normal"],ks=["itemstyle","emphasis"],js=["label","normal"],qs=["label","emphasis"];ys._updatecommon=function(t,e,i,n){var o=this.childat(0),r=t.hostmodel,s=t.getitemvisual(e,"color");"image"!==o.type&&o.usestyle({strokenoscale:!0});var l=n&&n.itemstyle,h=n&&n.hoveritemstyle,u=n&&n.symbolrotate,c=n&&n.symboloffset,d=n&&n.labelmodel,f=n&&n.hoverlabelmodel,g=n&&n.hoveranimation,p=n&&n.cursorstyle;if(!n||t.hasitemoption){var m=n&&n.itemmodel?n.itemmodel:t.getitemmodel(e);l=m.getmodel($s).getitemstyle(["color"]),h=m.getmodel(ks).getitemstyle(),u=m.getshallow("symbolrotate"),c=m.getshallow("symboloffset"),d=m.getmodel(js),f=m.getmodel(qs),g=m.getshallow("hoveranimation"),p=m.getshallow("cursor")}else h=a({},h);var v=o.style;o.attr("rotation",(u||0)*math.pi/180||0),c&&o.attr("position",[si(c[0],i[0]),si(c[1],i[1])]),p&&o.attr("cursor",p),o.setcolor(s,n&&n.symbolinnercolor),o.setstyle(l);var y=t.getitemvisual(e,"opacity");null!=y&&(v.opacity=y);var x=n&&n.usenamelabel,_=!x&&yr(t);(x||null!=_)&&co(v,h,d,f,{labelfetcher:r,labeldataindex:e,defaulttext:x?t.getname(e):t.get(_,e),isrecttext:!0,autocolor:s}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverstyle=h,uo(o);var b=kr(i);if(g&&r.isanimationenabled()){var w=function(){var t=b[1]/b[0];this.animateto({scale:[math.max(1.1*b[0],b[0]+3),math.max(1.1*b[1],b[1]+3*t)]},400,"elasticout")},s=function(){this.animateto({scale:b},400,"elasticout")};o.on("mouseover",w).on("mouseout",s).on("emphasis",w).on("normal",s)}},ys.fadeout=function(t,e){var i=this.childat(0);this.silent=i.silent=!0,!(e&&e.keeplabel)&&(i.style.text=null),wo(i,{style:{opacity:0},scale:[0,0]},this._seriesmodel,this.dataindex,t)},h(jr,jy);var tm=ts.prototype;tm.updatedata=function(t,e){var i=this.group,n=t.hostmodel,o=this._data,a=this._symbolctor,r={itemstyle:n.getmodel("itemstyle.normal").getitemstyle(["color"]),hoveritemstyle:n.getmodel("itemstyle.emphasis").getitemstyle(),symbolrotate:n.get("symbolrotate"),symboloffset:n.get("symboloffset"),hoveranimation:n.get("hoveranimation"),labelmodel:n.getmodel("label.normal"),hoverlabelmodel:n.getmodel("label.emphasis"),cursorstyle:n.get("cursor")};t.diff(o).add(function(n){var o=t.getitemlayout(n);if(es(t,n,e)){var s=new a(t,n,r);s.attr("position",o),t.setitemgraphicel(n,s),i.add(s)}}).update(function(s,l){var h=o.getitemgraphicel(l),u=t.getitemlayout(s);es(t,s,e)?(h?(h.updatedata(t,s,r),wo(h,{position:u},n)):(h=new a(t,s)).attr("position",u),i.add(h),t.setitemgraphicel(s,h)):i.remove(h)}).remove(function(t){var e=o.getitemgraphicel(t);e&&e.fadeout(function(){i.remove(e)})}).execute(),this._data=t},tm.updatelayout=function(){var t=this._data;t&&t.eachitemgraphicel(function(e,i){var n=t.getitemlayout(i);e.attr("position",n)})},tm.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachitemgraphicel(function(t){t.fadeout(function(){e.remove(t)})}):e.removeall())};var em=function(t,e,i,n,o,a){for(var r=os(t,e),s=[],l=[],h=[],u=[],c=[],d=[],f=[],g=a.dimensions,p=0;p0&&as(i[o-1]);o--);for(;n0&&as(i[a-1]);a--);for(;o=0){var r=o.getitemgraphicel(a);if(!r){var s=o.getitemlayout(a);if(!s)return;(r=new jr(o,a)).position=s,r.setz(t.get("zlevel"),t.get("z")),r.ignore=isnan(s[0])||isnan(s[1]),r.__temp=!0,o.setitemgraphicel(a,r),r.stopsymbolanimation(!0),this.group.add(r)}r.highlight()}else ta.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getdata(),a=ho(o,n);if(null!=a&&a>=0){var r=o.getitemgraphicel(a);r&&(r.__temp?(o.setitemgraphicel(a,null),this.group.remove(r)):r.downplay())}else ta.prototype.downplay.call(this,t,e,i,n)},_newpolyline:function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new hm({shape:{points:t},silent:!0,z2:10}),this._linegroup.add(e),this._polyline=e,e},_newpolygon:function(t,e){var i=this._polygon;return i&&this._linegroup.remove(i),i=new um({shape:{points:t,stackedonpoints:e},silent:!0}),this._linegroup.add(i),this._polygon=i,i},_getsymbolignorefunc:function(t,e){var i=e.getaxesbyscale("ordinal")[0];if(i&&i.islabelignored)return m(i.islabelignored,i)},_updateanimation:function(t,e,i,n,o){var a=this._polyline,r=this._polygon,s=t.hostmodel,l=em(this._data,t,this._stackedonpoints,e,this._coordsys,i),h=l.current,u=l.stackedoncurrent,c=l.next,d=l.stackedonnext;o&&(h=ms(l.current,i,o),u=ms(l.stackedoncurrent,i,o),c=ms(l.next,i,o),d=ms(l.stackedonnext,i,o)),a.shape.__points=l.current,a.shape.points=h,wo(a,{shape:{points:c}},s),r&&(r.setshape({points:h,stackedonpoints:u}),wo(r,{shape:{points:c,stackedonpoints:d}},s));for(var f=[],g=l.status,p=0;pe&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getotheraxis:function(){this.grid.getotheraxis()},islabelignored:function(t){if("category"===this.type){var e=this.getlabelinterval();return"function"==typeof e&&!e(t,this.scale.getlabel(t))||t%(e+1)}},pointtodata:function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},tolocalcoord:null,toglobalcoord:null},h(mm,us);var vm={show:!0,zlevel:0,z:0,inverse:!1,name:"",namelocation:"end",namerotate:null,nametruncate:{maxwidth:null,ellipsis:"...",placeholder:"."},nametextstyle:{},namegap:15,silent:!1,triggerevent:!1,tooltip:{show:!1},axispointer:{},axisline:{show:!0,onzero:!0,onzeroaxisindex:null,linestyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolsize:[10,15]},axistick:{show:!0,inside:!1,length:5,linestyle:{width:1}},axislabel:{show:!0,inside:!1,rotate:0,showminlabel:null,showmaxlabel:null,margin:8,fontsize:12},splitline:{show:!0,linestyle:{color:["#ccc"],width:1,type:"solid"}},splitarea:{show:!1,areastyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},ym={};ym.categoryaxis=n({boundarygap:!0,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},vm),ym.valueaxis=n({boundarygap:[0,0],splitnumber:5},vm),ym.timeaxis=r({scale:!0,min:"datamin",max:"datamax"},ym.valueaxis),ym.logaxis=r({scale:!0,logbase:10},ym.valueaxis);var xm=["value","category","time","log"],_m=function(t,e,i,a){d(xm,function(r){e.extend({type:t+"axis."+r,mergedefaultandtheme:function(e,o){var a=this.layoutmode,s=a?ea(e):{};n(e,o.gettheme().get(r+"axis")),n(e,this.getdefaultoption()),e.type=i(t,e),a&&ta(e,s,a)},defaultoption:o([{},ym[r+"axis"],a],!0)})}),ub.registersubtypedefaulter(t+"axis",v(i,t))},bm=ub.extend({type:"cartesian2daxis",axis:null,init:function(){bm.superapply(this,"init",arguments),this.resetrange()},mergeoption:function(){bm.superapply(this,"mergeoption",arguments),this.resetrange()},restoredata:function(){bm.superapply(this,"restoredata",arguments),this.resetrange()},getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"grid",index:this.option.gridindex,id:this.option.gridid})[0]}});n(bm.prototype,zs);var wm={offset:0};_m("x",bm,_s,wm),_m("y",bm,_s,wm),ub.extend({type:"grid",dependencies:["xaxis","yaxis"],layoutmode:"box",coordinatesystem:null,defaultoption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containlabel:!1,backgroundcolor:"rgba(0,0,0,0)",borderwidth:1,bordercolor:"#ccc"}});var sm=d,mm=function(t){var e=t.scale.getextent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},im=nr,tm=ms.prototype;tm.type="grid",tm.axispointerenabled=!0,tm.getrect=function(){return this._rect},tm.update=function(t,e){var i=this._axesmap;this._updatescale(t,this.model),sm(i.x,function(t){im(t.scale,t.model)}),sm(i.y,function(t){im(t.scale,t.model)}),sm(i.x,function(t){is(i,"y",t)}),sm(i.y,function(t){is(i,"x",t)}),this.resize(this.model,e)},tm.resize=function(t,e,i){function n(){sm(a,function(t){var e=t.ishorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setextent(i[n],i[1-n]),as(t,e?o.x:o.y)})}var o=ko(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()});this._rect=o;var a=this._axeslist;n(),!i&&t.get("containlabel")&&(sm(a,function(t){if(!t.model.get("axislabel.inside")){var e=ss(t);if(e){var i=t.ishorizontal()?"height":"width",n=t.model.get("axislabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},tm.getaxis=function(t,e){var i=this._axesmap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasownproperty(n))return i[n];return i[e]}},tm.getaxes=function(){return this._axeslist.slice()},tm.getcartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsmap[i]}b(t)&&(e=t.yaxisindex,t=t.xaxisindex);for(var n=0,o=this._coordslist;nh[1]?-1:1,c=["start"===o?h[0]-u*l:"end"===o?h[1]+u*l:(h[0]+h[1])/2,es(o)?t.labeloffset+r*l:0],d=e.get("namerotate");null!=d&&(d=d*cm/180);var f;es(o)?n=km(t.rotation,null!=d?d:t.rotation,r):(n=ks(t,o,d||0,h),null!=(f=t.axisnameavailablewidth)&&(f=math.abs(f/math.sin(n.rotation)),!isfinite(f)&&(f=null)));var g=s.getfont(),p=e.get("nametruncate",!0)||{},m=p.ellipsis,v=i(t.nametruncatemaxwidth,p.maxwidth,f),y=null!=m&&null!=v?zx(i,v,g,m,{minchar:2,placeholder:p.placeholder}):i,x=e.get("tooltip",!0),_=e.maintype,b={componenttype:_,name:i,$vars:["name"]};b[_+"index"]=e.componentindex;var w=new ib({anid:"name",__fulltext:i,__truncatedtext:y,position:c,rotation:n.rotation,silent:ps(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterparams:b},x):null});fo(w.style,s,{text:y,textfont:g,textfill:s.gettextcolor()||e.get("axisline.linestyle.color"),textalign:n.textalign,textverticalalign:n.textverticalalign}),e.get("triggerevent")&&(w.eventdata=ls(e),w.eventdata.targettype="axisname",w.eventdata.name=i),this._dumbgroup.add(w),w.updatetransform(),this.group.add(w),w.decomposetransform()}}},km=dm.innertextlayout=function(t,e,i){var n,o,a=li(e-t);return ki(a)?(o=i>0?"top":"bottom",n="center"):ki(a-cm)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&a0?"right":"left":i>0?"left":"right"),{rotation:a,textalign:n,textverticalalign:o}},pm=dm.ifignoreontick=function(t,e,i,n,o,a){if(0===e&&o||e===n-1&&a)return!1;var r,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?(r=s.getticks()[e],!i(r,s.getlabel(r))):e%(i+1))},om=dm.getinterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i},zm=d,nm=v,em=lr({type:"axis",_axispointer:null,axispointerclass:null,render:function(t,e,i,n){this.axispointerclass&&us(t),em.superapply(this,"render",arguments),$s(this,t,0,i,0,!0)},updateaxispointer:function(t,e,i,n,o){$s(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axispointer;i&&i.remove(e),em.superapply(this,"remove",arguments)},dispose:function(t,e){ks(this,e),em.superapply(this,"dispose",arguments)}}),rm=[];em.registeraxispointerclass=function(t,e){rm[t]=e},em.getaxispointerclass=function(t){return t&&rm[t]};var vm=dm.ifignoreontick,bm=dm.getinterval,gm=["axisline","axisticklabel","axisname"],wm=["splitarea","splitline"],hm=em.extend({type:"cartesianaxis",axispointerclass:"cartesianaxispointer",render:function(t,e,i,n){this.group.removeall();var o=this._axisgroup;if(this._axisgroup=new jy,this.group.add(this._axisgroup),t.get("show")){var a=t.getcoordsysmodel(),r=js(a,t),s=new dm(t,r);d(gm,s.add,s),this._axisgroup.add(s.getgroup()),d(wm,function(e){t.get(e+".show")&&this["_"+e](t,a,r.labelinterval)},this),ao(o,this._axisgroup,t),hm.supercall(this,"render",t,e,i,n)}},_splitline:function(t,e,i){var n=t.axis;if(!n.scale.isblank()){var o=t.getmodel("splitline"),a=o.getmodel("linestyle"),s=a.get("color"),l=bm(o,i);s=y(s)?s:[s];for(var h=e.coordinatesystem.getrect(),u=n.ishorizontal(),c=0,d=n.gettickscoords(),f=n.scale.getticks(),g=t.get("axislabel.showminlabel"),p=t.get("axislabel.showmaxlabel"),m=[],v=[],x=a.getlinestyle(),_=0;_1){var h;"string"==typeof i?h=fm[i]:"function"==typeof i&&(h=i),h&&(e=e.downsample(a.dim,1/l,h,gm),t.setdata(e))}}},this)},"line"));var fm="__ec_stack_";nl.getlayoutonaxis=function(t,e){var i=[],n=t.axis;if("category"===n.type){for(var o=n.getbandwidth(),a=0;a0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getitemlayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startangle:n.startangle,endangle:n.endangle}}};or(v(nl,"bar")),ar(function(t){t.eachseriesbytype("bar",function(t){t.getdata().setvisual("legendsymbol","roundrect")})});var $m={updateselectedmap:function(t){this._targetlist=t.slice(),this._selecttargetmap=g(t||[],function(t,e){return t.set(e.name,e),t},z())},select:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);"single"===this.get("selectedmode")&&this._selecttargetmap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unselect:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);i&&(i.selected=!1)},toggleselected:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);if(null!=i)return this[i.selected?"unselect":"select"](t,e),i.selected},isselected:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);return i&&i.selected}},km=hr({type:"series.pie",init:function(t){km.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()},this.updateselectedmap(t.data),this._defaultlabelline(t)},mergeoption:function(t){km.supercall(this,"mergeoption",t),this.updateselectedmap(this.option.data)},getinitialdata:function(t,e){var i=xr(["value"],t.data),n=new as(i,this);return n.initdata(t.data),n},getdataparams:function(t){var e=this.getdata(),i=km.supercall(this,"getdataparams",t),n=[];return e.each("value",function(t){n.push(t)}),i.percent=di(n,t,e.hostmodel.get("percentprecision")),i.$vars.push("percent"),i},_defaultlabelline:function(t){zo(t.labelline,["show"]);var e=t.labelline.normal,i=t.labelline.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultoption:{zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,selectedoffset:10,hoveroffset:10,avoidlabeloverlap:!0,percentprecision:2,stillshowzerosum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelline:{normal:{show:!0,length:15,length2:15,smooth:!1,linestyle:{width:1,type:"solid"}}},itemstyle:{normal:{borderwidth:1},emphasis:{}},animationtype:"expansion",animationeasing:"cubicout",data:[]}});u(km,$m);var jm=dl.prototype;jm.updatedata=function(t,e,i){function n(){s.stopanimation(!0),s.animateto({shape:{r:u.r+l.get("hoveroffset")}},300,"elasticout")}function o(){s.stopanimation(!0),s.animateto({shape:{r:u.r}},300,"elasticout")}var s=this.childat(0),l=t.hostmodel,h=t.getitemmodel(e),u=t.getitemlayout(e),c=a({},u);c.label=null,i?(s.setshape(c),"scale"===l.getshallow("animationtype")?(s.shape.r=u.r0,so(s,{shape:{r:u.r}},l,e)):(s.shape.endangle=u.startangle,wo(s,{shape:{endangle:u.endangle}},l,e))):wo(s,{shape:c},l,e);var d=h.getmodel("itemstyle"),f=t.getitemvisual(e,"color");s.usestyle(r({linejoin:"bevel",fill:f},d.getmodel("normal").getitemstyle())),s.hoverstyle=d.getmodel("emphasis").getitemstyle();var g=h.getshallow("cursor");g&&s.attr("cursor",g),cl(this,t.getitemlayout(e),h.get("selected"),l.get("selectedoffset"),l.get("animation")),s.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoveranimation")&&l.isanimationenabled()&&s.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updatelabel(t,e),uo(this)},jm._updatelabel=function(t,e){var i=this.childat(1),n=this.childat(2),o=t.hostmodel,a=t.getitemmodel(e),r=t.getitemlayout(e).label,s=t.getitemvisual(e,"color");wo(i,{shape:{points:r.linepoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),wo(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getmodel("label.normal"),h=a.getmodel("label.emphasis"),u=a.getmodel("labelline.normal"),c=a.getmodel("labelline.emphasis"),s=t.getitemvisual(e,"color");co(n.style,n.hoverstyle={},l,h,{labelfetcher:t.hostmodel,labeldataindex:e,defaulttext:t.getname(e),autocolor:s,useinsidestyle:!!r.inside},{textalign:r.textalign,textverticalalign:r.verticalalign,opacity:t.getitemvisual(e,"opacity")}),n.ignore=n.normalignore=!l.get("show"),n.hoverignore=!h.get("show"),i.ignore=i.normalignore=!u.get("show"),i.hoverignore=!c.get("show"),i.setstyle({stroke:s,opacity:t.getitemvisual(e,"opacity")}),i.setstyle(u.getmodel("linestyle").getlinestyle()),i.hoverstyle=c.getmodel("linestyle").getlinestyle();var d=u.get("smooth");d&&!0===d&&(d=.4),i.setshape({smooth:d})},h(dl,jy);ta.extend({type:"pie",init:function(){var t=new jy;this._sectorgroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getdata(),a=this._data,r=this.group,s=e.get("animation"),l=!a,h=t.get("animationtype"),u=v(ul,this.uid,t,s,i),c=t.get("selectedmode");if(o.diff(a).add(function(t){var e=new dl(o,t);l&&"scale"!==h&&e.eachchild(function(t){t.stopanimation(!0)}),c&&e.on("click",u),o.setitemgraphicel(t,e),r.add(e)}).update(function(t,e){var i=a.getitemgraphicel(e);i.updatedata(o,t),i.off("click"),c&&i.on("click",u),r.add(i),o.setitemgraphicel(t,i)}).remove(function(t){var e=a.getitemgraphicel(t);r.remove(e)}).execute(),s&&l&&o.count()>0&&"scale"!==h){var d=o.getitemlayout(0),f=math.max(i.getwidth(),i.getheight())/2,g=m(r.removeclippath,r);r.setclippath(this._createclippath(d.cx,d.cy,f,d.startangle,d.clockwise,g,t))}this._data=o}},dispose:function(){},_createclippath:function(t,e,i,n,o,a,r){var s=new rb({shape:{cx:t,cy:e,r0:0,r:i,startangle:n,endangle:n,clockwise:o}});return so(s,{shape:{endangle:n+(o?1:-1)*math.pi*2}},r,a),s},containpoint:function(t,e){var i=e.getdata().getitemlayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var qm=function(t,e){d(e,function(e){e.update="updateview",ir(e,function(i,n){var o={};return n.eachcomponent({maintype:"series",subtype:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataindex);var n=t.getdata();n.each(function(e){var i=n.getname(e);o[i]=t.isselected(i)||!1})}),{name:i.name,selected:o}})})},ti=function(t,e){var i={};e.eachrawseriesbytype(t,function(t){var n=t.getrawdata(),o={};if(!e.isseriesfiltered(t)){var a=t.getdata();a.each(function(t){var e=a.getrawindex(t);o[e]=t}),n.each(function(e){var r=o[e],s=null!=r&&a.getitemvisual(r,"color",!0);if(s)n.setitemvisual(e,"color",s);else{var l=n.getitemmodel(e).get("itemstyle.normal.color")||t.getcolorfrompalette(n.getname(e),i);n.setitemvisual(e,"color",l),null!=r&&a.setitemvisual(r,"color",l)}})}})},ei=function(t,e,i,n){var o,a,r=t.getdata(),s=[],l=!1;r.each(function(i){var n,h,u,c,d=r.getitemlayout(i),f=r.getitemmodel(i),g=f.getmodel("label.normal"),p=g.get("position")||f.get("label.emphasis.position"),m=f.getmodel("labelline.normal"),v=m.get("length"),y=m.get("length2"),x=(d.startangle+d.endangle)/2,_=math.cos(x),b=math.sin(x);o=d.cx,a=d.cy;var w="inside"===p||"inner"===p;if("center"===p)n=d.cx,h=d.cy,c="center";else{var s=(w?(d.r+d.r0)/2*_:d.r*_)+o,m=(w?(d.r+d.r0)/2*b:d.r*b)+a;if(n=s+3*_,h=m+3*b,!w){var i=s+_*(v+e-d.r),t=m+b*(v+e-d.r),a=i+(_<0?-1:1)*y,c=t;n=a+(_<0?-5:5),h=c,u=[[s,m],[i,t],[a,c]]}c=w?"center":_>0?"left":"right"}var d=g.getfont(),l=g.get("rotate")?_<0?-x+math.pi:-x:0,k=de(t.getformattedlabel(i,"normal")||r.getname(i),d,c,"top");l=!!l,d.label={x:n,y:h,position:p,height:k.height,len:v,len2:y,linepoints:u,textalign:c,verticalalign:"middle",rotation:l,inside:w},w||s.push(d.label)}),!l&&t.get("avoidlabeloverlap")&&gl(s,o,a,e,i,n)},ii=2*math.pi,ni=math.pi/180,oi=function(t,e){var i=e.findcomponents({maintype:"legend"});i&&i.length&&e.eachseriesbytype(t,function(t){var e=t.getdata();e.filterself(function(t){for(var n=e.getname(t),o=0;o=0;a--){var r=n[a],s=o[a],l=r[0]-s[0]/2,h=r[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return a}return-1}}),ri=pl.prototype;ri.updatedata=function(t){this.group.removeall();var e=this._symbolel,i=t.hostmodel;e.setshape({points:t.maparray(t.getitemlayout),sizes:t.maparray(function(e){var i=t.getitemvisual(e,"symbolsize");return i instanceof array||(i=[i,i]),i})}),e.symbolproxy=hr(t.getvisual("symbol"),0,0,0,0),e.setcolor=e.symbolproxy.setcolor,e.usestyle(i.getmodel("itemstyle.normal").getitemstyle(["color"]));var n=t.getvisual("color");n&&e.setcolor(n),e.seriesindex=i.seriesindex,e.on("mousemove",function(t){e.dataindex=null;var i=e.finddataindex(t.offsetx,t.offsety);i>=0&&(e.dataindex=i)}),this.group.add(e)},ri.updatelayout=function(t){var e=t.getdata();this._symbolel.setshape({points:e.maparray(e.getitemlayout)})},ri.remove=function(){this.group.removeall()},ur({type:"scatter",init:function(){this._normalsymboldraw=new ts,this._largesymboldraw=new pl},render:function(t,e,i){var n=t.getdata(),o=this._largesymboldraw,a=this._normalsymboldraw,r=this.group,s=t.get("large")&&n.count()>t.get("largethreshold")?o:a;this._symboldraw=s,s.updatedata(n),r.add(s.group),r.remove(s===o?a.group:o.group)},updatelayout:function(t){this._symboldraw.updatelayout(t)},remove:function(t,e){this._symboldraw&&this._symboldraw.remove(e,!0)},dispose:function(){}}),ar(v(cm,"scatter","circle",null)),or(v(dm,"scatter")),h(ml,us),vl.prototype.getindicatoraxes=function(){return this._indicatoraxes},vl.prototype.datatopoint=function(t,e){var i=this._indicatoraxes[e];return this.coordtopoint(i.datatocoord(t),e)},vl.prototype.coordtopoint=function(t,e){var i=this._indicatoraxes[e].angle;return[this.cx+t*math.cos(i),this.cy-t*math.sin(i)]},vl.prototype.pointtodata=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=math.atan2(-i,e),r=1/0,s=-1,l=0;ln[0]&&isfinite(c)&&isfinite(n[0]))}else{r.getticks().length-1>a&&(h=i(h));var d=math.round((n[0]+n[1])/2/h)*h,f=math.round(a/2);r.setextent(mi(d-f*h),mi(d+(a-f)*h)),r.setinterval(h)}})},vl.dimensions=[],vl.create=function(t,e){var i=[];return t.eachcomponent("radar",function(n){var o=new vl(n,t,e);i.push(o),n.coordinatesystem=o}),t.eachseriesbytype("radar",function(t){"radar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("radarindex")||0])}),i},ua.register("radar",vl);var si=ym.valueaxis,li=(sr({type:"radar",optionupdated:function(){var t=this.get("boundarygap"),e=this.get("splitnumber"),o=this.get("scale"),s=this.get("axisline"),l=this.get("axistick"),h=this.get("axislabel"),u=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),g=this.get("namegap"),p=this.get("triggerevent"),m=f(this.get("indicator")||[],function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var m=u;if(null!=f.color&&(m=r({color:f.color},u)),f=n(i(f),{boundarygap:t,splitnumber:e,scale:o,axisline:s,axistick:l,axislabel:h,name:f.text,namelocation:"end",namegap:g,nametextstyle:m,triggerevent:p},!1),c||(f.name=""),"string"==typeof d){var v=f.name;f.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(f.name=d(f.name,f));var y=a(new lo(f,null,this.ecmodel),zs);return y.maintype="radar",y.componentindex=this.componentindex,y},this);this.getindicatormodels=function(){return m}},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startangle:90,name:{show:!0},boundarygap:[0,0],splitnumber:5,namegap:15,scale:!1,shape:"polygon",axisline:n({linestyle:{color:"#bbb"}},si.axisline),axislabel:yl(si.axislabel,!1),axistick:yl(si.axistick,!1),splitline:yl(si.splitline,!0),splitarea:yl(si.splitarea,!0),indicator:[]}}),["axisline","axisticklabel","axisname"]);lr({type:"radar",render:function(t,e,i){this.group.removeall(),this._buildaxes(t),this._buildsplitlineandarea(t)},_buildaxes:function(t){var e=t.coordinatesystem;d(f(e.getindicatoraxes(),function(t){return new dm(t.model,{position:[e.cx,e.cy],rotation:t.angle,labeldirection:-1,tickdirection:-1,namedirection:1})}),function(t){d(li,t.add,t),this.group.add(t.getgroup())},this)},_buildsplitlineandarea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinatesystem,n=i.getindicatoraxes();if(n.length){var o=t.get("shape"),a=t.getmodel("splitline"),s=t.getmodel("splitarea"),l=a.getmodel("linestyle"),h=s.getmodel("areastyle"),u=a.get("show"),c=s.get("show"),g=l.get("color"),p=h.get("color");g=y(g)?g:[g],p=y(p)?p:[p];var m=[],v=[];if("circle"===o)for(var x=n[0].gettickscoords(),_=i.cx,b=i.cy,w=0;w"+f(i,function(t,i){return gi(t.name+" : "+e[i])}).join("
")},defaultoption:{zlevel:0,z:2,coordinatesystem:"radar",legendhoverlink:!0,radarindex:0,linestyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptycircle",symbolsize:4}});ur({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getitemvisual(e,"symbol")||"circle",n=t.getitemvisual(e,"color");if("none"!==i){var o=xl(t.getitemvisual(e,"symbolsize")),a=hr(i,-1,-1,2,2,n);return a.attr({style:{strokenoscale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeall();for(var l=0;l"+gi(n+" : "+i)},gettooltipposition:function(t){if(null!=t){var e=this.getdata().getname(t),i=this.coordinatesystem,n=i.getregion(e);return n&&i.datatopoint(n.center)}},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},defaultoption:{zlevel:0,z:2,coordinatesystem:"geo",map:"",left:"center",top:"center",aspectscale:.75,showlegendsymbol:!0,datarangehoverlink:!0,boundingcoords:null,center:null,zoom:1,scalelimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemstyle:{normal:{borderwidth:.5,bordercolor:"#444",areacolor:"#eee"},emphasis:{areacolor:"rgba(255,215,0,0.8)"}}}});u(_i,$m);var bi="\0_ec_interaction_mutex";ir({type:"takeglobalcursor",event:"globalcursortaken",update:"update"},function(){}),u(kl,fy);var wi={axispointer:1,tooltip:1,brush:1};ul.prototype={constructor:ul,draw:function(t,e,i,n,o){var a="geo"===t.maintype,r=t.getdata&&t.getdata();a&&e.eachcomponent({maintype:"series",subtype:"map"},function(e){r||e.gethostgeomodel()!==t||(r=e.getdata())});var s=t.coordinatesystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childat(0)||o?l.attr(u):wo(l,u,t),l.removeall();var c=["itemstyle","normal"],f=["itemstyle","emphasis"],g=["label","normal"],p=["label","emphasis"],m=z();d(s.regions,function(e){var i=m.get(e.name)||m.set(e.name,new jy),n=new vb({shape:{paths:[]}});i.add(n);var o,s=(d=t.getregionmodel(e.name)||t).getmodel(c),u=d.getmodel(f),v=hl(s),y=hl(u),x=d.getmodel(g),_=d.getmodel(p);if(r){o=r.indexofname(e.name);var b=r.getitemvisual(o,"color",!0);b&&(v.fill=b)}d(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new ub({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new ub({shape:{points:t.interiors[e]}}))}}),n.setstyle(v),n.style.strokenoscale=!0,n.culling=!0;var w=x.get("show"),s=_.get("show"),m=r&&isnan(r.get("value",o)),i=r&&r.getitemlayout(o);if(a||m&&(w||s)||i&&i.showlabel){var t,a=a?e.name:o;(!r||o>=0)&&(t=t);var c=new ib({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});co(c.style,c.hoverstyle={},x,_,{labelfetcher:t,labeldataindex:a,defaulttext:e.name,useinsidestyle:!1},{textalign:"center",textverticalalign:"middle"}),i.add(c)}if(r)r.setitemgraphicel(o,i);else{var d=t.getregionmodel(e.name);n.eventdata={componenttype:"geo",geoindex:t.componentindex,name:e.name,region:d&&d.option||{}}}(i.__regions||(i.__regions=[])).push(e),uo(i,y,{hoversilentontouch:!!t.get("selectedmode")}),l.add(i)}),this._updatecontroller(t,e,i),fl(this,t,l,i,n),zl(t,l)},remove:function(){this.group.removeall(),this._controller.dispose(),this._controllerhost={}},_updatecontroller:function(t,e,i){function n(){var e={type:"georoam",componenttype:l};return e[l+"id"]=t.id,e}var o=t.coordinatesystem,r=this._controller,s=this._controllerhost;s.zoomlimit=t.get("scalelimit"),s.zoom=o.getzoom(),r.enable(t.get("roam")||!1);var l=t.maintype;r.off("pan").on("pan",function(t,e){this._mousedownflag=!1,bl(s,t,e),i.dispatchaction(a(n(),{dx:t,dy:e}))},this),r.off("zoom").on("zoom",function(t,e,o){if(this._mousedownflag=!1,gl(s,t,e,o),i.dispatchaction(a(n(),{zoom:t,originx:e,originy:o})),this._updategroup){var r=this.group,l=r.scale;r.traverse(function(t){"text"===t.type&&t.attr("scale",[1/l[0],1/l[1]])})}},this),r.setpointerchecker(function(e,n,a){return o.getviewrectafterroam().contain(n,a)&&!wl(e,i,t)})}},ur({type:"map",render:function(t,e,i,n){if(!n||"maptoggleselect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeall(),!t.gethostgeomodel()){if(n&&"georoam"===n.type&&"series"===n.componenttype&&n.seriesid===t.id)(a=this._mapdraw)&&o.add(a.group);else if(t.needsdrawmap){var a=this._mapdraw||new ul(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapdraw=a}else this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null;t.get("showlegendsymbol")&&e.getcomponent("legend")&&this._rendersymbols(t,e,i)}}},remove:function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null,this.group.removeall()},dispose:function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null},_rendersymbols:function(t,e,i){var n=t.originaldata,o=this.group;n.each("value",function(e,i){if(!isnan(e)){var a=n.getitemlayout(i);if(a&&a.point){var r=a.point,s=a.offset,l=new nb({style:{fill:t.getdata().getvisual("color")},shape:{cx:r[0]+9*s,cy:r[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainseries.getdata(),u=n.getname(i),c=h.indexofname(u),d=n.getitemmodel(i),f=d.getmodel("label.normal"),g=d.getmodel("label.emphasis"),p=h.getitemgraphicel(c),m=t(t.getformattedlabel(i,"normal"),u),v=t(t.getformattedlabel(i,"emphasis"),m),y=function(){var t=fo({},g,{text:g.get("show")?v:null},{isrecttext:!0,useinsidestyle:!1},!0);l.style.extendfrom(t),l.__maporiginalz2=l.z2,l.z2+=1},x=function(){fo(l.style,f,{text:f.get("show")?m:null,textposition:f.getshallow("position")||"bottom"},{isrecttext:!0,useinsidestyle:!1}),null!=l.__maporiginalz2&&(l.z2=l.__maporiginalz2,l.__maporiginalz2=null)};p.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}o.add(l)}}})}}),ir({type:"georoam",event:"georoam",update:"updatelayout"},function(t,e){var i=t.componenttype||"series";e.eachcomponent({maintype:i,query:t},function(e){var n=e.coordinatesystem;if("geo"===n.type){var o=xl(n,t,e.get("scalelimit"));e.setcenter&&e.setcenter(o.center),e.setzoom&&e.setzoom(o.zoom),"series"===i&&d(e.seriesgroup,function(t){t.setcenter(o.center),t.setzoom(o.zoom)})}})});or(function(t){var e={};t.eachseriesbytype("map",function(i){var n=i.getmaptype();if(!i.gethostgeomodel()&&!e[n]){var o={};d(i.seriesgroup,function(e){var i=e.coordinatesystem,n=e.originaldata;e.get("showlegendsymbol")&&t.getcomponent("legend")&&n.each("value",function(t,e){var a=n.getname(e),r=i.getregion(a);if(r&&!isnan(t)){var s=o[a]||0,l=i.datatopoint(r.center);o[a]=s+1,n.setitemlayout(e,{point:l,offset:s})}})});var a=i.getdata();a.each(function(t){var e=a.getname(t),i=a.getitemlayout(t)||{};i.showlabel=!o[e],a.setitemlayout(t,i)}),e[n]=!0}})}),ar(function(t){t.eachseriesbytype("map",function(t){var e=t.get("color"),i=t.getmodel("itemstyle.normal"),n=i.get("areacolor"),o=i.get("color")||e[t.seriesindex%e.length];t.getdata().setvisual({areacolor:n,color:o})})}),er(pw.processor.statistic,function(t){var e={};t.eachseriesbytype("map",function(t){var i=t.gethostgeomodel(),n=i?"o"+i.id:"i"+t.getmaptype();(e[n]=e[n]||[]).push(t)}),d(e,function(t,e){for(var i=jl(f(t,function(t){return t.getdata()}),t[0].get("mapvaluecalculation")),n=0;ne&&(e=n.height)}this.height=e+1},getnodebyid:function(t){if(this.getid()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hosttree.data.setitemlayout(this.dataindex,t,e)},getlayout:function(){return this.hosttree.data.getitemlayout(this.dataindex)},getmodel:function(t){if(!(this.dataindex<0)){var e,i=this.hosttree,n=i.data.getitemmodel(this.dataindex),o=this.getlevelmodel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isexpand)||(e=this.getleavesmodel()),n.getmodel(t,(o||e||i.hostmodel).getmodel(t))}},getlevelmodel:function(){return(this.hosttree.levelmodels||[])[this.depth]},getleavesmodel:function(){return this.hosttree.leavesmodel},setvisual:function(t,e){this.dataindex>=0&&this.hosttree.data.setitemvisual(this.dataindex,t,e)},getvisual:function(t,e){return this.hosttree.data.getitemvisual(this.dataindex,t,e)},getrawindex:function(){return this.hosttree.data.getrawindex(this.dataindex)},getid:function(){return this.hosttree.data.getid(this.dataindex)}},ih.prototype={constructor:ih,type:"tree",eachnode:function(t,e,i){this.root.eachnode(t,e,i)},getnodebydataindex:function(t){var e=this.data.getrawindex(t);return this._nodes[e]},getnodebyname:function(t){return this.root.getnodebyname(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;ia&&(a=t.depth)});var r=t.expandandcollapse&&t.initialtreedepth>=0?t.initialtreedepth:a;return o.root.eachnode("preorder",function(t){var e=t.hosttree.data.getrawdataitem(t.dataindex);t.isexpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},formattooltip:function(t){for(var e=this.getdata().tree,i=e.root.children[0],n=e.getnodebydataindex(t),o=n.getvalue(),a=n.name;n&&n!==i;)a=n.parentnode.name+"."+a,n=n.parentnode;return gi(a+(isnan(o)||null==o?"":" : "+o))},defaultoption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",orient:"horizontal",symbol:"emptycircle",symbolsize:7,expandandcollapse:!0,initialtreedepth:2,linestyle:{normal:{color:"#ccc",width:1.5,curveness:.5}},itemstyle:{normal:{color:"lightsteelblue",bordercolor:"#c23531",borderwidth:1.5}},label:{normal:{show:!0,color:"#555"}},leaves:{label:{normal:{show:!0}}},animationeasing:"linear",animationduration:700,animationdurationupdate:1e3}}),ur({type:"tree",init:function(t,e){this._oldtree,this._maingroup=new jy,this.group.add(this._maingroup)},render:function(t,e,i,n){var o=t.getdata(),a=t.layoutinfo,r=this._maingroup,s=t.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]);var l=this._data,h={expandandcollapse:t.get("expandandcollapse"),layout:s,orient:t.get("orient"),curvature:t.get("linestyle.normal.curveness"),symbolrotate:t.get("symbolrotate"),symboloffset:t.get("symboloffset"),hoveranimation:t.get("hoveranimation"),usenamelabel:!0,fadein:!0};o.diff(l).add(function(e){vh(o,e)&&xh(o,e,null,r,t,h)}).update(function(e,i){var n=l.getitemgraphicel(i);vh(o,e)?xh(o,e,n,r,t,h):n&&_h(o,e,n,r,t,h)}).remove(function(e){var i=l.getitemgraphicel(e);_h(o,e,i,r,t,h)}).execute(),!0===h.expandandcollapse&&o.eachitemgraphicel(function(e,n){e.off("click").on("click",function(){i.dispatchaction({type:"treeexpandandcollapse",seriesid:t.id,dataindex:n})})}),this._data=o},dispose:function(){},remove:function(){this._maingroup.removeall(),this._data=null}}),ir({type:"treeexpandandcollapse",event:"treeexpandandcollapse",update:"update"},function(t,e){e.eachcomponent({maintype:"series",subtype:"tree",query:t},function(e){var i=t.dataindex,n=e.getdata().tree.getnodebydataindex(i);n.isexpand=!n.isexpand})});var ai=function(t,e){var i=hh(t,e);t.layoutinfo=i;var n=t.get("layout"),o=0,a=0,r=null;"radial"===n?(o=2*math.pi,a=math.min(i.height,i.width)/2,r=sh(function(t,e){return(t.parentnode===e.parentnode?1:2)/t.depth})):(o=i.width,a=i.height,r=sh());var s=t.getdata().tree.root,l=s.children[0];oh(s),wh(l,ah,r),s.hiernode.modifier=-l.hiernode.prelim,sh(l,rh);var h=l,u=l,c=l;sh(l,function(t){var e=t.getlayout().x;eu.getlayout().x&&(u=t),t.depth>c.depth&&(c=t)});var d=h===u?1:r(h,u)/2,f=d-h.getlayout().x,g=0,p=0,m=0,v=0;"radial"===n?(g=o/(u.getlayout().x+d+f),p=a/(c.depth-1||1),sh(l,function(t){m=(t.getlayout().x+f)*g,v=(t.depth-1)*p;var e=lh(m,v);t.setlayout({x:e.x,y:e.y,rawx:m,rawy:v},!0)})):"horizontal"===t.get("orient")?(p=a/(u.getlayout().x+d+f),g=o/(c.depth-1||1),sh(l,function(t){v=(t.getlayout().x+f)*p,m=(t.depth-1)*g,t.setlayout({x:m,y:v},!0)})):(g=o/(u.getlayout().x+d+f),p=a/(c.depth-1||1),sh(l,function(t){m=(t.getlayout().x+f)*g,v=(t.depth-1)*p,t.setlayout({x:m,y:v},!0)}))};ar(v(cm,"tree","circle",null)),or(function(t,e){t.eachseriesbytype("tree",function(t){ai(t,e)})}),or(function(t,e){t.eachseriesbytype("tree",function(t){ai(t,e)})}),yw.extend({type:"series.treemap",layoutmode:"box",dependencies:["grid","polar"],_viewroot:null,defaultoption:{progressive:0,hoverlayerthreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipwindow:"origin",squareratio:.5*(1+math.sqrt(5)),leafdepth:null,drilldownicon:"▶",zoomtonoderatio:.1024,roam:!0,nodeclick:"zoomtonode",animation:!0,animationdurationupdate:900,animationeasing:"quinticinout",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyitemwidth:25,itemstyle:{normal:{color:"rgba(0,0,0,0.7)",bordercolor:"rgba(255,255,255,0.7)",borderwidth:1,shadowcolor:"rgba(150,150,150,1)",shadowblur:3,shadowoffsetx:0,shadowoffsety:0,textstyle:{color:"#fff"}},emphasis:{textstyle:{}}}},label:{normal:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0}},upperlabel:{normal:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalalign:"middle"},emphasis:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalalign:"middle"}},itemstyle:{normal:{color:null,coloralpha:null,colorsaturation:null,borderwidth:0,gapwidth:0,bordercolor:"#fff",bordercolorsaturation:null},emphasis:{}},visualdimension:0,visualmin:null,visualmax:null,color:[],coloralpha:null,colorsaturation:null,colormappingby:"index",visiblemin:10,childrenvisiblemin:null,levels:[]},getinitialdata:function(t,e){var i={name:t.name,children:t.data};ch(i);var n=t.levels||[];n=t.levels=dh(n,e);var o={};return o.levels=n,ih.createtree(i,this,o).data},optionupdated:function(){this.resetviewroot()},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=vi(y(i)?i[0]:i);return gi(e.getname(t)+": "+n)},getdataparams:function(t){var e=yw.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(t);return e.treepathinfo=ah(i,this),e},setlayoutinfo:function(t){this.layoutinfo=this.layoutinfo||{},a(this.layoutinfo,t)},mapidtoindex:function(t){var e=this._idindexmap;e||(e=this._idindexmap=z(),this._idindexmapcount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idindexmapcount++),i},getviewroot:function(){return this._viewroot},resetviewroot:function(t){t?this._viewroot=t:t=this._viewroot;var e=this.getdata().tree.root;t&&(t===e||e.contains(t))||(this._viewroot=e)}});var ci=5;lh.prototype={constructor:lh,render:function(t,e,i,n){var o=t.getmodel("breadcrumb"),a=this.group;if(a.removeall(),o.get("show")&&i){var r=o.getmodel("itemstyle.normal"),s=r.getmodel("textstyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getwidth(),height:e.getheight()},emptyitemwidth:o.get("emptyitemwidth"),totalwidth:0,renderlist:[]};this._prepare(i,l,s),this._rendercontent(t,l,r,s,n),jo(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentnode){var o=n.getmodel().get("name"),a=i.gettextrect(o),r=math.max(a.width+16,e.emptyitemwidth);e.totalwidth+=r+8,e.renderlist.push({node:n,text:o,width:r})}},_rendercontent:function(t,e,i,n,o){for(var a=0,s=e.emptyitemwidth,l=t.get("breadcrumb.height"),h=$o(e.pos,e.box),u=e.totalwidth,c=e.renderlist,d=c.length-1;d>=0;d--){var f=c[d],g=f.node,p=f.width,m=f.text;u>h.width&&(u-=p-s,p=s,m=null);var y=new ub({shape:{points:kh(a,0,p,l,d===c.length-1,0===d)},style:r(i.getitemstyle(),{linejoin:"bevel",text:m,textfill:n.gettextcolor(),textfont:n.getfont()}),z:10,onclick:v(o,g)});this.group.add(y),ph(y,t,g),a+=p+8}},remove:function(){this.group.removeall()}};var di=m,li=jy,ki=db,pi=d,oi=["label","normal"],zi=["label","emphasis"],ni=["upperlabel","normal"],ei=["upperlabel","emphasis"],ri=10,vi=1,bi=2,gi=$x([["fill","color"],["stroke","strokecolor"],["linewidth","strokewidth"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),wi=function(t){var e=gi(t);return e.stroke=e.fill=e.linewidth=null,e};ur({type:"treemap",init:function(t,e){this._containergroup,this._storage={nodegroup:[],background:[],content:[]},this._oldtree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(l(e.findcomponents({maintype:"series",subtype:"treemap",query:n}),t)<0)){this.seriesmodel=t,this.api=i,this.ecmodel=e;var o=mh(n,t),a=n&&n.type,r=t.layoutinfo,s=!this._oldtree,h=this._storage,u="treemaproottonode"===a&&o&&h?{rootnodegroup:h.nodegroup[o.node.getrawindex()],direction:n.direction}:null,c=this._givecontainergroup(r),d=this._dorender(c,t,u);s||a&&"treemapzoomtonode"!==a&&"treemaproottonode"!==a?d.renderfinally():this._doanimation(c,d,t,u),this._resetcontroller(i),this._renderbreadcrumb(t,i,o)}},_givecontainergroup:function(t){var e=this._containergroup;return e||(e=this._containergroup=new li,this._initevents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_dorender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getid()}function s(r,s){var l=null!=r?t[r]:null,h=null!=s?e[s]:null,c=u(l,h,i,a);c&&n(l&&l.viewchildren||[],h&&h.viewchildren||[],c,o,a+1)}o?(e=t,pi(t,function(t,e){!t.isremoved()&&s(e,e)})):new fr(e,t,r,r).add(s).update(s).remove(v(s,null)).execute()}var o=e.getdata().tree,a=this._oldtree,r={nodegroup:[],background:[],content:[]},s={nodegroup:[],background:[],content:[]},l=this._storage,h=[],u=v(zh,e,s,l,i,r,h);n(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=function(t){var e={nodegroup:[],background:[],content:[]};return t&&pi(t,function(t,i){var n=e[i];pi(t,function(t){t&&(n.push(t),t.__tmwilldelete=1)})}),e}(l);return this._oldtree=o,this._storage=s,{lastsforanimation:r,willdeleteels:c,renderfinally:function(){pi(c,function(t){pi(t,function(t){t.parent&&t.parent.remove(t)})}),pi(h,function(t){t.invisible=!0,t.dirty()})}}},_doanimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationdurationupdate"),r=i.get("animationeasing"),s=oh();pi(e.willdeleteels,function(t,e){pi(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drilldown"===n.direction)a=l===n.rootnodegroup?{shape:{x:0,y:0,width:l.__tmnodewidth,height:l.__tmnodeheight},style:{opacity:0}}:{style:{opacity:0}};else{var h=0,u=0;l.__tmwilldelete||(h=l.__tmnodewidth/2,u=l.__tmnodeheight/2),a="nodegroup"===e?{position:[h,u],style:{opacity:0}}:{shape:{x:h,y:u,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,o,r)}})}),pi(this._storage,function(t,i){pi(t,function(t,n){var l=e.lastsforanimation[i][n],h={};l&&("nodegroup"===i?l.old&&(h.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(h.shape=a({},t.shape),t.setshape(l.old)),l.fadein?(t.setstyle("opacity",0),h.style={opacity:1}):1!==t.style.opacity&&(h.style={opacity:1})),s.add(t,h,o,r))})},this),this._state="animating",s.done(di(function(){this._state="ready",e.renderfinally()},this)).start()}},_resetcontroller:function(t){var e=this._controller;e||((e=this._controller=new kl(t.getzr())).enable(this.seriesmodel.get("roam")),e.on("pan",di(this._onpan,this)),e.on("zoom",di(this._onzoom,this)));var i=new jt(0,0,t.getwidth(),t.getheight());e.setpointerchecker(function(t,e,n){return i.contain(e,n)})},_clearcontroller:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onpan:function(t,e){if("animating"!==this._state&&(math.abs(t)>3||math.abs(e)>3)){var i=this.seriesmodel.getdata().tree.root;if(!i)return;var n=i.getlayout();if(!n)return;this.api.dispatchaction({type:"treemapmove",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onzoom:function(t,e,i){if("animating"!==this._state){var n=this.seriesmodel.getdata().tree.root;if(!n)return;var o=n.getlayout();if(!o)return;var a=new jt(o.x,o.y,o.width,o.height),r=this.seriesmodel.layoutinfo;e-=r.x,i-=r.y;var s=ot();lt(s,s,[-e,-i]),ut(s,s,[t,t]),lt(s,s,[e,i]),a.applytransform(s),this.api.dispatchaction({type:"treemaprender",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initevents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesmodel.get("nodeclick",!0);if(e){var i=this.findtarget(t.offsetx,t.offsety);if(i){var n=i.node;if(n.getlayout().isleafroot)this._roottonode(i);else if("zoomtonode"===e)this._zoomtonode(i);else if("link"===e){var o=n.hosttree.data.getitemmodel(n.dataindex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderbreadcrumb:function(t,e,i){i||(i=null!=t.get("leafdepth",!0)?{node:t.getviewroot()}:this.findtarget(e.getwidth()/2,e.getheight()/2))||(i={node:t.getdata().tree.root}),(this._breadcrumb||(this._breadcrumb=new lh(this.group))).render(t,e,i.node,di(function(e){"animating"!==this._state&&(th(t.getviewroot(),e)?this._roottonode({node:e}):this._zoomtonode({node:e}))},this))},remove:function(){this._clearcontroller(),this._containergroup&&this._containergroup.removeall(),this._storage={nodegroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearcontroller()},_zoomtonode:function(t){this.api.dispatchaction({type:"treemapzoomtonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},_roottonode:function(t){this.api.dispatchaction({type:"treemaproottonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},findtarget:function(t,e){var i;return this.seriesmodel.getviewroot().eachnode({attr:"viewchildren",order:"preorder"},function(n){var o=this._storage.background[n.getrawindex()];if(o){var a=o.transformcoordtolocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetx:a[0],offsety:a[1]}}},this),i}});for(var hi=["treemapzoomtonode","treemaprender","treemapmove"],fi=0;fi=0&&t.call(e,i[o],o)},st.eachedge=function(t,e){for(var i=this.edges,n=i.length,o=0;o=0&&i[o].node1.dataindex>=0&&i[o].node2.dataindex>=0&&t.call(e,i[o],o)},st.breadthfirsttraverse=function(t,e,i,n){if(e instanceof gu||(e=this._nodesmap[fu(e)]),e){for(var o="out"===i?"outedges":"in"===i?"inedges":"edges",a=0;a=0&&i.node2.dataindex>=0});for(var o=0,a=n.length;o=0&&this[t][e].setitemvisual(this.dataindex,i,n)},getvisual:function(i,n){return this[t][e].getitemvisual(this.dataindex,i,n)},setlayout:function(i,n){this.dataindex>=0&&this[t][e].setitemlayout(this.dataindex,i,n)},getlayout:function(){return this[t][e].getitemlayout(this.dataindex)},getgraphicel:function(){return this[t][e].getitemgraphicel(this.dataindex)},getrawindex:function(){return this[t][e].getrawindex(this.dataindex)}}};u(gu,lt("hostgraph","data")),u(pu,lt("hostgraph","edgedata")),rt.node=gu,rt.edge=pu;var ht=function(t,e,i,n,o){for(var a=new rt(n),r=0;r "+d)),h++)}var f,g=i.get("coordinatesystem");if("cartesian2d"===g||"polar"===g)f=sr(t,i,i.ecmodel);else{var p=ua.get(g),m=xr((p&&"view"!==p.type?p.dimensions||[]:[]).concat(["value"]),t);(f=new as(m,i)).initdata(t)}var v=new as(["value"],i);return v.initdata(l,s),o&&o(f,v),ql({maindata:f,struct:a,structattr:"graph",datas:{node:f,edge:v},datasattr:{node:"data",edge:"edgedata"}}),a.update(),a},ut=hr({type:"series.graph",init:function(t){ut.superapply(this,"init",arguments),this.legenddataprovider=function(){return this._categoriesdata},this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergeoption:function(t){ut.superapply(this,"mergeoption",arguments),this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergedefaultandtheme:function(t){ut.superapply(this,"mergedefaultandtheme",arguments),zo(t.edgelabel,["show"])},getinitialdata:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return ht(n,i,this,!0,function(t,i){function n(t){return(t=this.parsepath(t))&&"label"===t[0]?r:this.parentmodel}t.wrapmethod("getitemmodel",function(t){var e=o._categoriesmodels[t.getshallow("category")];return e&&(e.parentmodel=t.parentmodel,t.parentmodel=e),t});var a=o.getmodel("edgelabel"),r=new lo({label:a.option},a.parentmodel,e);i.wrapmethod("getitemmodel",function(t){return t.customizegetparent(n),t})}).data},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},getcategoriesdata:function(){return this._categoriesdata},formattooltip:function(t,e,i){if("edge"===i){var n=this.getdata(),o=this.getdataparams(t,i),a=n.graph.getedgebyindex(t),r=n.getname(a.node1.dataindex),s=n.getname(a.node2.dataindex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=gi(l.join(" > ")),o.value&&(l+=" : "+gi(o.value)),l}return ut.superapply(this,"formattooltip",arguments)},_updatecategoriesdata:function(){var t=f(this.option.categories||[],function(t){return null!=t.value?t:a({value:0},t)}),e=new as(["value"],this);e.initdata(t),this._categoriesdata=e,this._categoriesmodels=e.maparray(function(t){return e.getitemmodel(t,!0)})},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},isanimationenabled:function(){return ut.supercall(this,"isanimationenabled")&&!("force"===this.get("layout")&&this.get("force.layoutanimation"))},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",legendhoverlink:!0,hoveranimation:!0,layout:null,focusnodeadjacency:!1,circular:{rotatelabel:!1},force:{initlayout:null,repulsion:[0,50],gravity:.1,edgelength:30,layoutanimation:!0},left:"center",top:"center",symbol:"circle",symbolsize:10,edgesymbol:["none","none"],edgesymbolsize:10,edgelabel:{normal:{position:"middle"},emphasis:{}},draggable:!1,roam:!1,center:null,zoom:1,nodescaleratio:.6,label:{normal:{show:!1,formatter:"{b}"},emphasis:{show:!0}},itemstyle:{normal:{},emphasis:{}},linestyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}}),ct=fb.prototype,dt=pb.prototype,ft=zn({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildpath:function(t,e){(mu(e)?ct:dt).buildpath(t,e)},pointat:function(t){return mu(this.shape)?ct.pointat.call(this,t):dt.pointat.call(this,t)},tangentat:function(t){var e=this.shape,i=mu(e)?[e.x2-e.x1,e.y2-e.y1]:dt.tangentat.call(this,t);return x(i,i)}}),gt=["fromsymbol","tosymbol"],pt=bu.prototype;pt.beforeupdate=function(){var t=this,e=t.childofname("fromsymbol"),i=t.childofname("tosymbol"),n=t.childofname("label");if(e||i||!n.ignore){for(var o=1,a=this.parent;a;)a.scale&&(o/=a.scale[0]),a=a.parent;var r=t.childofname("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointat(0),h=r.pointat(s),u=h([],h,l);if(x(u,u),e&&(e.attr("position",l),c=r.tangentat(0),e.attr("rotation",math.pi/2-math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])),i){i.attr("position",h);var c=r.tangentat(1);i.attr("rotation",-math.pi/2-math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",h);var d,f,g,p=5*o;if("end"===n.__position)d=[u[0]*p+h[0],u[1]*p+h[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",g=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentat(m))[1],-c[0]],y=r.pointat(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*p,y[1]+v[1]*p],f="center",g="bottom";var x=-math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",g=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textverticalalign:n.__verticalalign||g,textalign:n.__textalign||f},position:d,scale:[o,o]})}}}},pt._createline=function(t,e,i){var n=t.hostmodel,o=xu(t.getitemlayout(e));o.shape.percent=0,so(o,{shape:{percent:1}},n,e),this.add(o);var a=new ib({name:"label"});this.add(a),d(gt,function(i){var n=yu(i,t,e);this.add(n),this[vu(i)]=t.getitemvisual(e,i)},this),this._updatecommonstl(t,e,i)},pt.updatedata=function(t,e,i){var n=t.hostmodel,o=this.childofname("line"),a=t.getitemlayout(e),r={shape:{}};_u(r.shape,a),wo(o,r,n,e),d(gt,function(i){var n=t.getitemvisual(e,i),o=vu(i);if(this[o]!==n){this.remove(this.childofname(i));var a=yu(i,t,e);this.add(a)}this[o]=n},this),this._updatecommonstl(t,e,i)},pt._updatecommonstl=function(t,e,i){var n=t.hostmodel,o=this.childofname("line"),a=i&&i.linestyle,s=i&&i.hoverlinestyle,l=i&&i.labelmodel,h=i&&i.hoverlabelmodel;if(!i||t.hasitemoption){var u=t.getitemmodel(e);a=u.getmodel("linestyle.normal").getlinestyle(),s=u.getmodel("linestyle.emphasis").getlinestyle(),l=u.getmodel("label.normal"),h=u.getmodel("label.emphasis")}var c=t.getitemvisual(e,"color"),f=a(t.getitemvisual(e,"opacity"),a.opacity,1);o.usestyle(r({strokenoscale:!0,fill:"none",stroke:c,opacity:f},a)),o.hoverstyle=s,d(gt,function(t){var e=this.childofname(t);e&&(e.setcolor(c),e.setstyle({opacity:f}))},this);var g,p,m,v,y=l.getshallow("show"),x=h.getshallow("show"),_=this.childofname("label");if(y||x){var b=n.getrawvalue(e);p=null==b?p=t.getname(e):isfinite(b)?mi(b):b,g=c||"#000",m=t(n.getformattedlabel(e,"normal",t.datatype),p),v=t(n.getformattedlabel(e,"emphasis",t.datatype),m)}if(y){var w=fo(_.style,l,{text:m},{autocolor:g});_.__textalign=w.textalign,_.__verticalalign=w.textverticalalign,_.__position=l.get("position")||"middle"}else _.setstyle("text",null);_.hoverstyle=x?{text:v,textfill:h.gettextcolor(!0),fontstyle:h.getshallow("fontstyle"),fontweight:h.getshallow("fontweight"),fontsize:h.getshallow("fontsize"),fontfamily:h.getshallow("fontfamily")}:{text:null},_.ignore=!y&&!x,uo(this)},pt.highlight=function(){this.trigger("emphasis")},pt.downplay=function(){this.trigger("normal")},pt.updatelayout=function(t,e){this.setlinepoints(t.getitemlayout(e))},pt.setlinepoints=function(t){var e=this.childofname("line");_u(e.shape,t),e.dirty()},h(bu,jy);var mt=mu.prototype;mt.updatedata=function(t){var e=this._linedata,i=this.group,n=this._ctor,o=t.hostmodel,a={linestyle:o.getmodel("linestyle.normal").getlinestyle(),hoverlinestyle:o.getmodel("linestyle.emphasis").getlinestyle(),labelmodel:o.getmodel("label.normal"),hoverlabelmodel:o.getmodel("label.emphasis")};t.diff(e).add(function(e){if(su(t.getitemlayout(e))){var o=new n(t,e,a);t.setitemgraphicel(e,o),i.add(o)}}).update(function(o,r){var s=e.getitemgraphicel(r);su(t.getitemlayout(o))?(s?s.updatedata(t,o,a):s=new n(t,o,a),t.setitemgraphicel(o,s),i.add(s)):i.remove(s)}).remove(function(t){i.remove(e.getitemgraphicel(t))}).execute(),this._linedata=t},mt.updatelayout=function(){var t=this._linedata;t.eachitemgraphicel(function(e,i){e.updatelayout(t,i)},this)},mt.remove=function(){this.group.removeall()};var vt=[],yt=[],xt=[],_t=un,bt=uy,wt=math.abs,st=function(t,e){function i(t){var e=t.getvisual("symbolsize");return e instanceof array&&(e=(e[0]+e[1])/2),e}var n=[],o=gn,a=[[],[],[]],r=[[],[]],s=[];e/=2,t.eachedge(function(t,l){var h=t.getlayout(),u=t.getvisual("fromsymbol"),c=t.getvisual("tosymbol");h.__original||(h.__original=[v(h[0]),v(h[1])],h[2]&&h.__original.push(v(h[2])));var d=h.__original;if(null!=h[2]){if(r(a[0],d[0]),r(a[1],d[2]),r(a[2],d[1]),u&&"none"!=u){var f=i(t.node1),g=iu(a,d[0],f*e);o(a[0][0],a[1][0],a[2][0],g,n),a[0][0]=n[3],a[1][0]=n[4],o(a[0][1],a[1][1],a[2][1],g,n),a[0][1]=n[3],a[1][1]=n[4]}if(c&&"none"!=c){var f=i(t.node2),g=iu(a,d[1],f*e);o(a[0][0],a[1][0],a[2][0],g,n),a[1][0]=n[1],a[2][0]=n[2],o(a[0][1],a[1][1],a[2][1],g,n),a[1][1]=n[1],a[2][1]=n[2]}r(h[0],a[0]),r(h[1],a[2]),r(h[2],a[1])}else{if(r(r[0],d[0]),r(r[1],d[1]),h(s,r[1],r[0]),x(s,s),u&&"none"!=u){f=i(t.node1);w(r[0],r[0],s,f*e)}if(c&&"none"!=c){f=i(t.node2);w(r[1],r[1],s,-f*e)}r(h[0],r[0]),r(h[1],r[1])}})},mt=["itemstyle","normal","opacity"],it=["linestyle","normal","opacity"];ur({type:"graph",init:function(t,e){var i=new ts,n=new mu,o=this.group;this._controller=new kl(e.getzr()),this._controllerhost={target:o},o.add(i.group),o.add(n.group),this._symboldraw=i,this._linedraw=n,this._firstrender=!0},render:function(t,e,i){var n=t.coordinatesystem;this._model=t,this._nodescaleratio=t.get("nodescaleratio");var o=this._symboldraw,a=this._linedraw,r=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstrender?r.attr(s):wo(r,s,t)}st(t.getgraph(),this._getnodeglobalscale(t));var l=t.getdata();o.updatedata(l);var h=t.getedgedata();a.updatedata(h),this._updatenodeandlinkscale(),this._updatecontroller(t,e,i),cleartimeout(this._layouttimeout);var u=t.forcelayout,c=t.get("force.layoutanimation");u&&this._startforcelayoutiteration(u,c),l.eachitemgraphicel(function(e,n){var o=l.getitemmodel(n);e.off("drag").off("dragend");var a=l.getitemmodel(n).get("draggable");a&&e.on("drag",function(){u&&(u.warmup(),!this._layouting&&this._startforcelayoutiteration(u,c),u.setfixed(n),l.setitemlayout(n,e.position))},this).on("dragend",function(){u&&u.setunfixed(n)},this),e.setdraggable(a&&u),e.off("mouseover",e.__focusnodeadjacency),e.off("mouseout",e.__unfocusnodeadjacency),o.get("focusnodeadjacency")&&(e.on("mouseover",e.__focusnodeadjacency=function(){i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,dataindex:e.dataindex})}),e.on("mouseout",e.__unfocusnodeadjacency=function(){i.dispatchaction({type:"unfocusnodeadjacency",seriesid:t.id})}))},this),l.graph.eachedge(function(e){var n=e.getgraphicel();n.off("mouseover",n.__focusnodeadjacency),n.off("mouseout",n.__unfocusnodeadjacency),e.getmodel().get("focusnodeadjacency")&&(n.on("mouseover",n.__focusnodeadjacency=function(){i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,edgedataindex:e.dataindex})}),n.on("mouseout",n.__unfocusnodeadjacency=function(){i.dispatchaction({type:"unfocusnodeadjacency",seriesid:t.id})}))});var d="circular"===t.get("layout")&&t.get("circular.rotatelabel"),f=l.getlayout("cx"),g=l.getlayout("cy");l.eachitemgraphicel(function(t,e){var i=t.getsymbolpath();if(d){var n=l.getitemlayout(e),o=math.atan2(n[1]-g,n[0]-f);o<0&&(o=2*math.pi+o);var a=n[0]=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-math.pi/2,t.moveto(s,l),t.lineto(e.x+i(r)*a,e.y+n(r)*a),t.lineto(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineto(e.x-i(r)*a,e.y-n(r)*a),t.lineto(s,l)}}),ct=2*math.pi,dt=(ta.extend({type:"gauge",render:function(t,e,i){this.group.removeall();var n=t.get("axisline.linestyle.color"),o=nu(t,i);this._rendermain(t,e,i,n,o)},dispose:function(){},_rendermain:function(t,e,i,n,o){for(var a=this.group,r=t.getmodel("axisline").getmodel("linestyle"),s=t.get("clockwise"),l=-t.get("startangle")/180*math.pi,h=-t.get("endangle")/180*math.pi,u=(h-l)%ct,c=l,d=r.get("width"),f=0;f=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textalign:a<-.4?"left":a>.4?"right":"center"},{autocolor:p}),silent:!0}))}if(p.get("show")&&t!==v){for(var o=0;o<=y;o++){var a=math.cos(b),c=math.sin(b),z=new fb({shape:{x1:a*c+h,y1:c*c+u,x2:a*(c-_)+h,y2:c*(c-_)+u},silent:!0,style:i});"auto"===i.stroke&&z.setstyle({stroke:n((t+o/y)/v)}),l.add(z),b+=s}b-=s}else b+=w}},_renderpointer:function(t,e,i,n,o,a,r,s){var l=this.group,h=this._data;if(t.get("pointer.show")){var u=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getdata();d.diff(h).add(function(e){var i=new at({shape:{angle:a}});so(i,{shape:{angle:wi(d.get("value",e),u,c,!0)}},t),l.add(i),d.setitemgraphicel(e,i)}).update(function(e,i){var n=h.getitemgraphicel(i);wo(n,{shape:{angle:wi(d.get("value",e),u,c,!0)}},t),l.add(n),d.setitemgraphicel(e,n)}).remove(function(t){var e=h.getitemgraphicel(t);l.remove(e)}).execute(),d.eachitemgraphicel(function(t,e){var i=d.getitemmodel(e),a=i.getmodel("pointer");t.setshape({x:o.cx,y:o.cy,width:si(a.get("width"),o.r),r:si(a.get("length"),o.r)}),t.usestyle(i.getmodel("itemstyle.normal").getitemstyle()),"auto"===t.style.fill&&t.setstyle("fill",n(wi(d.get("value",e),u,[0,1],!0))),uo(t,i.getmodel("itemstyle.emphasis").getitemstyle())}),this._data=d}else h&&h.eachitemgraphicel(function(t){l.remove(t)})},_rendertitle:function(t,e,i,n,o){var a=t.getmodel("title");if(a.get("show")){var r=a.get("offsetcenter"),s=o.cx+si(r[0],o.r),l=o.cy+si(r[1],o.r),h=+t.get("min"),u=+t.get("max"),c=n(wi(t.getdata().get("value",0),[h,u],[0,1],!0));this.group.add(new ib({silent:!0,style:fo({},a,{x:s,y:l,text:t.getdata().getname(0),textalign:"center",textverticalalign:"middle"},{autocolor:c,forcerich:!0})}))}},_renderdetail:function(t,e,i,n,o){var a=t.getmodel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetcenter"),h=o.cx+si(l[0],o.r),u=o.cy+si(l[1],o.r),c=si(a.get("width"),o.r),d=si(a.get("height"),o.r),f=t.getdata().get("value",0),g=n(wi(f,[r,s],[0,1],!0));this.group.add(new ib({silent:!0,style:fo({},a,{x:h,y:u,text:eu(f,a.get("formatter")),textwidth:isnan(c)?null:c,textheight:isnan(d)?null:d,textalign:"center",textverticalalign:"middle"},{autocolor:g,forcerich:!0})}))}}}),hr({type:"series.funnel",init:function(t){dt.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()},this._defaultlabelline(t)},getinitialdata:function(t,e){var i=xr(["value"],t.data),n=new as(i,this);return n.initdata(t.data),n},_defaultlabelline:function(t){zo(t.labelline,["show"]);var e=t.labelline.normal,i=t.labelline.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},getdataparams:function(t){var e=this.getdata(),i=dt.supercall(this,"getdataparams",t),n=e.getsum("value");return i.percent=n?+(e.get("value",t)/n*100).tofixed(2):0,i.$vars.push("percent"),i},defaultoption:{zlevel:0,z:2,legendhoverlink:!0,left:80,top:60,right:80,bottom:60,minsize:"0%",maxsize:"100%",sort:"descending",gap:0,funnelalign:"center",label:{normal:{show:!0,position:"outer"},emphasis:{show:!0}},labelline:{normal:{show:!0,length:20,linestyle:{width:1,type:"solid"}},emphasis:{}},itemstyle:{normal:{bordercolor:"#fff",borderwidth:1},emphasis:{}}}})),lt=ru.prototype,kt=["itemstyle","normal","opacity"];lt.updatedata=function(t,e,i){var n=this.childat(0),o=t.hostmodel,a=t.getitemmodel(e),s=t.getitemlayout(e),l=t.getitemmodel(e).get(kt);l=null==l?1:l,n.usestyle({}),i?(n.setshape({points:s.points}),n.setstyle({opacity:0}),so(n,{style:{opacity:l}},o,e)):wo(n,{style:{opacity:l},shape:{points:s.points}},o,e);var h=a.getmodel("itemstyle"),u=t.getitemvisual(e,"color");n.setstyle(r({linejoin:"round",fill:u},h.getmodel("normal").getitemstyle(["opacity"]))),n.hoverstyle=h.getmodel("emphasis").getitemstyle(),this._updatelabel(t,e),uo(this)},lt._updatelabel=function(t,e){var i=this.childat(1),n=this.childat(2),o=t.hostmodel,a=t.getitemmodel(e),r=t.getitemlayout(e).label,s=t.getitemvisual(e,"color");wo(i,{shape:{points:r.linepoints||r.linepoints}},o,e),wo(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getmodel("label.normal"),h=a.getmodel("label.emphasis"),u=a.getmodel("labelline.normal"),c=a.getmodel("labelline.emphasis"),s=t.getitemvisual(e,"color");co(n.style,n.hoverstyle={},l,h,{labelfetcher:t.hostmodel,labeldataindex:e,defaulttext:t.getname(e),autocolor:s,useinsidestyle:!!r.inside},{textalign:r.textalign,textverticalalign:r.verticalalign}),n.ignore=n.normalignore=!l.get("show"),n.hoverignore=!h.get("show"),i.ignore=i.normalignore=!u.get("show"),i.hoverignore=!c.get("show"),i.setstyle({stroke:s}),i.setstyle(u.getmodel("linestyle").getlinestyle()),i.hoverstyle=c.getmodel("linestyle").getlinestyle()},h(ru,jy);ta.extend({type:"funnel",render:function(t,e,i){var n=t.getdata(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new ru(n,t);n.setitemgraphicel(t,e),a.add(e)}).update(function(t,e){var i=o.getitemgraphicel(e);i.updatedata(n,t),a.add(i),n.setitemgraphicel(t,i)}).remove(function(t){var e=o.getitemgraphicel(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeall(),this._data=null},dispose:function(){}});ar(v(ti,"funnel")),or(function(t,e,i){t.eachseriesbytype("funnel",function(t){var i=t.getdata(),n=t.get("sort"),o=vu(t,e),a=bu(i,n),r=[si(t.get("minsize"),o.width),si(t.get("maxsize"),o.width)],s=i.getdataextent("value"),l=t.get("min"),h=t.get("max");null==l&&(l=math.min(s[0],0)),null==h&&(h=s[1]);var u=t.get("funnelalign"),c=t.get("gap"),d=(o.height-c*(i.count()-1))/i.count(),f=o.y,g=function(t,e){var n,a=wi(i.get("value",t)||0,[l,h],r,!0);switch(u){case"left":n=o.x;break;case"center":n=o.x+(o.width-a)/2;break;case"right":n=o.x+o.width-a}return[[n,e],[n+a,e]]};"ascending"===n&&(d=-d,c=-c,f+=o.height,a=a.reverse());for(var p=0;pa&&(e[1-n]=e[n]+u.sign*a),e},zt=d,nt=math.min,et=math.max,rt=math.floor,vt=math.ceil,bt=mi,gt=math.pi;uu.prototype={type:"parallel",constructor:uu,_init:function(t,e,i){var n=t.dimensions,o=t.parallelaxisindex;zt(n,function(t,i){var n=o[i],a=e.getcomponent("parallelaxis",n),r=this._axesmap.set(t,new pt(t,er(a),[0,0],a.get("type"),n)),s="category"===r.type;r.onband=s&&a.get("boundarygap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinatesystem=a.coordinatesystem=this},this)},update:function(t,e){this._updateaxesfromseries(this._model,t)},containpoint:function(t){var e=this._makelayoutinfo(),i=e.axisbase,n=e.layoutbase,o=e.pixeldimindex,a=t[1-o],r=t[o];return a>=i&&a<=i+e.axislength&&r>=n&&r<=n+e.layoutlength},getmodel:function(){return this._model},_updateaxesfromseries:function(t,e){e.eachseries(function(i){if(t.contains(i,e)){var n=i.getdata();zt(this.dimensions,function(t){var e=this._axesmap.get(t);e.scale.unionextentfromdata(n,t),nr(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ko(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()}),this._layoutaxes()},getrect:function(){return this._rect},_makelayoutinfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],h=this.dimensions.length,u=xu(e.get("axisexpandwidth"),l),c=xu(e.get("axisexpandcount")||0,[0,h]),d=e.get("axisexpandable")&&h>3&&h>c&&c>1&&u>0&&s>0,f=e.get("axisexpandwindow");f?(t=xu(f[1]-f[0],l),f[1]=f[0]+t):(t=xu(u*(c-1),l),(f=[u*(e.get("axisexpandcenter")||rt(h/2))-t/2])[1]=f[0]+t);var g=(s-t)/(h-c);g<3&&(g=0);var p=[rt(bt(f[0]/u,1))+1,vt(bt(f[1]/u,1))-1],m=g/u*f[0];return{layout:a,pixeldimindex:r,layoutbase:i[n[r]],layoutlength:s,axisbase:i[n[1-r]],axislength:i[o[1-r]],axisexpandable:d,axisexpandwidth:u,axiscollapsewidth:g,axisexpandwindow:f,axiscount:h,wininnerindices:p,axisexpandwindow0pos:m}},_layoutaxes:function(){var t=this._rect,e=this._axesmap,i=this.dimensions,n=this._makelayoutinfo(),o=n.layout;e.each(function(t){var e=[0,n.axislength],i=t.inverse?1:0;t.setextent(e[i],e[1-i])}),zt(i,function(i,a){var r=(n.axisexpandable?qu:ju)(a,n),s={horizontal:{x:r.position,y:n.axislength},vertical:{x:0,y:r.position}},l={horizontal:gt/2,vertical:0},h=[s[o].x+t.x,s[o].y+t.y],u=l[o],c=ot();ht(c,c,u),lt(c,c,h),this._axeslayout[i]={position:h,rotation:u,transform:c,axisnameavailablewidth:r.axisnameavailablewidth,axislabelshow:r.axislabelshow,nametruncatemaxwidth:r.nametruncatemaxwidth,tickdirection:1,labeldirection:1,labelinterval:e.get(i).getlabelinterval()}},this)},getaxis:function(t){return this._axesmap.get(t)},datatopoint:function(t,e){return this.axiscoordtopoint(this._axesmap.get(e).datatocoord(t),e)},eachactivestate:function(t,e,i){for(var n=this.dimensions,o=this._axesmap,a=this.hasaxisbrushed(),r=0,s=t.count();ro*(1-u[0])?(l="jump",r=s-o*(1-u[2])):(r=s-o*u[1])>=0&&(r=s-o*(1-u[1]))<=0&&(r=0),(r*=e.axisexpandwidth/h)?ot(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[et(0,a[1]*s/o-o/2)])[1]=nt(a[1],n[0]+o),n[0]=n[1]-o}return{axisexpandwindow:n,behavior:l}}},ua.register("parallel",{create:function(t,e){var i=[];return t.eachcomponent("parallel",function(n,o){var a=new uu(n,t,e);a.name="parallel_"+o,a.resize(n,e),n.coordinatesystem=a,a.model=n,i.push(a)}),t.eachseries(function(e){if("parallel"===e.get("coordinatesystem")){var i=t.querycomponents({maintype:"parallel",index:e.get("parallelindex"),id:e.get("parallelid")})[0];e.coordinatesystem=i.coordinatesystem}}),i}});var wt=ub.extend({type:"baseparallelaxis",axis:null,activeintervals:[],getareaselectstyle:function(){return $x([["fill","color"],["linewidth","borderwidth"],["stroke","bordercolor"],["width","width"],["opacity","opacity"]])(this.getmodel("areaselectstyle"))},setactiveintervals:function(t){var e=this.activeintervals=i(t);if(e)for(var n=e.length-1;n>=0;n--)ii(e[n])},getactivestate:function(t){var e=this.activeintervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;i5)return;var n=this._model.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]);"none"!==n.behavior&&this._dispatchexpand({axisexpandwindow:n.axisexpandwindow})}this._mousedownpoint=null},mousemove:function(t){if(!this._mousedownpoint&&rc(this,"mousemove")){var e=this._model,i=e.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]),n=i.behavior;"jump"===n&&this._throttleddispatchexpand.debouncenextcall(e.get("axisexpanddebounce")),this._throttleddispatchexpand("none"===n?null:{axisexpandwindow:i.axisexpandwindow,animation:"jump"===n&&null})}}};tr(function(t){wu(t),hu(t)}),yw.extend({type:"series.parallel",dependencies:["parallel"],visualcoloraccesspath:"linestyle.normal.color",getinitialdata:function(t,e){var i=e.getcomponent("parallel",this.get("parallelindex")),n=i.parallelaxisindex,o=t.data,a=i.dimensions,r=f(gc(a,o),function(t,i){var r=l(a,t),s=r>=0&&e.getcomponent("parallelaxis",n[r]);return s&&"category"===s.get("type")?(vc(s,t,o),{name:t,type:"ordinal"}):r<0&&xr.guessordinal(o,i)?{name:t,type:"ordinal"}:t}),s=new as(r,this);return s.initdata(o),this.option.progressive&&(this.option.animation=!1),s},getrawindicesbyactivestate:function(t){var e=this.coordinatesystem,i=this.getdata(),n=[];return e.eachactivestate(i,function(e,o){t===e&&n.push(i.getrawindex(o))}),n},defaultoption:{zlevel:0,z:2,coordinatesystem:"parallel",parallelindex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveopacity:.05,activeopacity:1,linestyle:{normal:{width:1,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationeasing:"linear"}});ta.extend({type:"parallel",init:function(){this._datagroup=new jy,this.group.add(this._datagroup),this._data},render:function(t,e,i,n){this._renderfornormal(t,n)},dispose:function(){},_renderfornormal:function(t,e){var i=this._datagroup,n=t.getdata(),o=this._data,a=t.coordinatesystem,r=a.dimensions,s=t.option.smooth?.3:null;if(n.diff(o).add(function(t){fc(n,i,t,r,a)}).update(function(i,s){var l=o.getitemgraphicel(s),h=hc(n,i,r,a);n.setitemgraphicel(i,l),wo(l,{shape:{points:h}},e&&!1===e.animation?null:t,i)}).remove(function(t){var e=o.getitemgraphicel(t);i.remove(e)}).execute(),zc(n,s),!this._data){var l=wc(a,t,function(){settimeout(function(){i.removeclippath()})});i.setclippath(l)}this._data=n},remove:function(){this._datagroup&&this._datagroup.removeall(),this._data=null}});var la=["linestyle","normal","opacity"];ar(function(t){t.eachseriesbytype("parallel",function(e){var i=e.getmodel("itemstyle.normal"),n=e.getmodel("linestyle.normal"),o=t.get("color"),a=n.get("color")||i.get("color")||o[e.seriesindex%o.length],r=e.get("inactiveopacity"),s=e.get("activeopacity"),l=e.getmodel("linestyle.normal").getlinestyle(),h=e.coordinatesystem,u=e.getdata(),c={normal:l.opacity,active:s,inactive:r};h.eachactivestate(u,function(t,e){var i=u.getitemmodel(e),n=c[t];if("normal"===t){var o=i.get(la,!0);null!=o&&(n=o)}u.setitemvisual(e,"opacity",n)}),u.setvisual("color",a)})});var ha=yw.extend({type:"series.sankey",layoutinfo:null,getinitialdata:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return ht(i,e,this,!0).data},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},formattooltip:function(t,e,i){if("edge"===i){var n=this.getdataparams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),gi(a)}return ha.supercall(this,"formattooltip",t,e)},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodewidth:20,nodegap:8,layoutiterations:32,label:{normal:{show:!0,position:"right",color:"#000",fontsize:12},emphasis:{show:!0}},itemstyle:{normal:{borderwidth:1,bordercolor:"#333"}},linestyle:{normal:{color:"#314656",opacity:.2,curveness:.5},emphasis:{opacity:.6}},animationeasing:"linear",animationduration:1e3}}),ua=zn({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildpath:function(t,e){var i=e.extent/2;t.moveto(e.x1,e.y1-i),t.beziercurveto(e.cpx1,e.cpy1-i,e.cpx2,e.cpy2-i,e.x2,e.y2-i),t.lineto(e.x2,e.y2+i),t.beziercurveto(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i),t.closepath()}});ur({type:"sankey",_model:null,render:function(t,e,i){var n=t.getgraph(),o=this.group,a=t.layoutinfo,r=t.getdata(),s=t.getdata("edge");this._model=t,o.removeall(),o.attr("position",[a.x,a.y]),n.eachedge(function(e){var i=new ua;i.dataindex=e.dataindex,i.seriesindex=t.seriesindex,i.datatype="edge";var n=e.getmodel("linestyle.normal"),a=n.get("curveness"),r=e.node1.getlayout(),l=e.node2.getlayout(),h=e.getlayout();i.shape.extent=math.max(1,h.dy);var u=r.x+r.dx,c=r.y+h.sy+h.dy/2,d=l.x,f=l.y+h.ty+h.dy/2,g=u*(1-a)+d*a,p=c,m=u*a+d*(1-a),v=f;switch(i.setshape({x1:u,y1:c,x2:d,y2:f,cpx1:g,cpy1:p,cpx2:m,cpy2:v}),i.setstyle(n.getitemstyle()),i.style.fill){case"source":i.style.fill=e.node1.getvisual("color");break;case"target":i.style.fill=e.node2.getvisual("color")}uo(i,e.getmodel("linestyle.emphasis").getitemstyle()),o.add(i),s.setitemgraphicel(e.dataindex,i)}),n.eachnode(function(e){var i=e.getlayout(),n=e.getmodel(),a=n.getmodel("label.normal"),s=n.getmodel("label.emphasis"),l=new db({shape:{x:i.x,y:i.y,width:e.getlayout().dx,height:e.getlayout().dy},style:n.getmodel("itemstyle.normal").getitemstyle()}),h=e.getmodel("itemstyle.emphasis").getitemstyle();co(l.style,h,a,s,{labelfetcher:t,labeldataindex:e.dataindex,defaulttext:e.id,isrecttext:!0}),l.setstyle("fill",e.getvisual("color")),uo(l,h),o.add(l),r.setitemgraphicel(e.dataindex,l),l.datatype="node"}),!this._data&&t.get("animation")&&o.setclippath(xc(o.getboundingrect(),t,function(){o.removeclippath()})),this._data=t.getdata()},dispose:function(){}});or(function(t,e,i){t.eachseriesbytype("sankey",function(t){var i=t.get("nodewidth"),n=t.get("nodegap"),o=qc(t,e);t.layoutinfo=o;var a=o.width,r=o.height,s=t.getgraph(),l=s.nodes,h=s.edges;$c(l),yc(l,h,i,n,a,r,0!==p(l,function(t){return 0===t.getlayout().value}).length?0:t.get("layoutiterations"))})}),ar(function(t,e){t.eachseriesbytype("sankey",function(t){var e=t.getgraph().nodes;e.sort(function(t,e){return t.getlayout().value-e.getlayout().value});var i=e[0].getlayout().value,n=e[e.length-1].getlayout().value;d(e,function(e){var o=new ji({type:"color",mappingmethod:"linear",dataextent:[i,n],visual:t.get("color")}).mapvaluetovisual(e.getlayout().value);e.setvisual("color",o);var a=e.getmodel().get("itemstyle.normal.color");null!=a&&e.setvisual("color",a)})})});var ca=nn.extend({type:"whiskerinbox",shape:{},buildpath:function(t,e){for(var i in e)if(e.hasownproperty(i)&&0===i.indexof("ends")){var n=e[i];t.moveto(n[0][0],n[0][1]),t.lineto(n[1][0],n[1][1])}}}),da=pd.prototype;da._createcontent=function(t,e,i){var n=t.getitemlayout(e),o="horizontal"===n.chartlayout?1:0,a=0;this.add(new ub({shape:{points:i?md(n.bodyends,o,n):n.bodyends},style:{strokenoscale:!0},z2:100})),this.bodyindex=a++;var r=f(n.whiskerends,function(t){return i?md(t,o,n):t});this.add(new ca({shape:vd(r),style:{strokenoscale:!0},z2:100})),this.whiskerindex=a++},da.updatedata=function(t,e,i){var n=this._seriesmodel=t.hostmodel,o=t.getitemlayout(e),a=tb[i?"initprops":"updateprops"];a(this.childat(this.bodyindex),{shape:{points:o.bodyends}},n,e),a(this.childat(this.whiskerindex),{shape:vd(o.whiskerends)},n,e),this.styleupdater.call(null,this,t,e)},h(pd,jy);var fa=yd.prototype;fa.updatedata=function(t){var e=this.group,i=this._data,n=this.styleupdater;t.diff(i).add(function(i){if(t.hasvalue(i)){var o=new pd(t,i,n,!0);t.setitemgraphicel(i,o),e.add(o)}}).update(function(o,a){var r=i.getitemgraphicel(a);t.hasvalue(o)?(r?r.updatedata(t,o):r=new pd(t,o,n),e.add(r),t.setitemgraphicel(o,r)):e.remove(r)}).remove(function(t){var n=i.getitemgraphicel(t);n&&e.remove(n)}).execute(),this._data=t},fa.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachitemgraphicel(function(e){e&&t.remove(e)})};var ga={_baseaxisdim:null,getinitialdata:function(t,e){var i,n,o=e.getcomponent("xaxis",this.get("xaxisindex")),a=e.getcomponent("yaxis",this.get("yaxisindex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getcategories(),n=!0):"category"===s?(t.layout="vertical",i=a.getcategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseaxisdim=l[h],c=l[1-h],f=t.data;n&&d(f,function(t,e){t.value&&y(t.value)?t.value.unshift(e):y(t)&&t.unshift(e)});var g=this.defaultvaluedimensions,p=[{name:u,otherdims:{tooltip:!1},dimsdef:["base"]},{name:c,dimsdef:g.slice()}];p=xr(p,f,{encodedef:this.get("encode"),dimsdef:this.get("dimensions"),dimcount:g.length+1});var m=new as(p,this);return m.initdata(f,i?i.slice():null),m},getbaseaxis:function(){var t=this._baseaxisdim;return this.ecmodel.getcomponent(t+"axis",this.get(t+"axisindex")).axis}},pa={init:function(){var t=this._whiskerboxdraw=new yd(this.getstyleupdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerboxdraw.updatedata(t.getdata())},remove:function(t){this._whiskerboxdraw.remove()}};u(yw.extend({type:"series.boxplot",dependencies:["xaxis","yaxis","grid"],defaultvaluedimensions:["min","q1","median","q3","max"],dimensions:null,defaultoption:{zlevel:0,z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,hoveranimation:!0,layout:null,boxwidth:[7,50],itemstyle:{normal:{color:"#fff",borderwidth:1},emphasis:{borderwidth:2,shadowblur:5,shadowoffsetx:2,shadowoffsety:2,shadowcolor:"rgba(0,0,0,0.4)"}},animationeasing:"elasticout",animationduration:800}}),ga,!0),u(ta.extend({type:"boxplot",getstyleupdater:function(){return xd},dispose:n}),pa,!0);var ma=["itemstyle","normal"],va=["itemstyle","emphasis"],ya=["itemstyle","normal","bordercolor"],xa=d;ar(function(t,e){var i=t.get("color");t.eachrawseriesbytype("boxplot",function(e){var n=i[e.seriesindex%i.length],o=e.getdata();o.setvisual({legendsymbol:"roundrect",color:e.get(ya)||n}),t.isseriesfiltered(e)||o.each(function(t){var e=o.getitemmodel(t);o.setitemvisual(t,{color:e.get(ya,!0)})})})}),or(function(t){var e=_d(t);xa(e,function(t){var e=t.seriesmodels;e.length&&(bd(t),xa(e,function(e,i){wd(e,t.boxoffsetlist[i],t.boxwidthlist[i])}))})}),u(yw.extend({type:"series.candlestick",dependencies:["xaxis","yaxis","grid"],defaultvaluedimensions:["open","close","lowest","highest"],dimensions:null,defaultoption:{zlevel:0,z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,hoveranimation:!0,layout:null,itemstyle:{normal:{color:"#c23531",color0:"#314656",borderwidth:1,bordercolor:"#c23531",bordercolor0:"#314656"},emphasis:{borderwidth:2}},barmaxwidth:null,barminwidth:null,barwidth:null,animationupdate:!1,animationeasing:"linear",animationduration:300},getshadowdim:function(){return"open"},brushselector:function(t,e,i){var n=e.getitemlayout(t);return i.rect(n.brushrect)}}),ga,!0),u(ta.extend({type:"candlestick",getstyleupdater:function(){return sd},dispose:n}),pa,!0);var _a=["itemstyle","normal"],ba=["itemstyle","emphasis"],wa=["itemstyle","normal","bordercolor"],sa=["itemstyle","normal","bordercolor0"],ma=["itemstyle","normal","color"],ia=["itemstyle","normal","color0"],ta=t;tr(function(t){t&&y(t.series)&&d(t.series,function(t){b(t)&&"k"===t.type&&(t.type="candlestick")})}),ar(function(t,e){t.eachrawseriesbytype("candlestick",function(e){var i=e.getdata();i.setvisual({legendsymbol:"roundrect"}),t.isseriesfiltered(e)||i.each(function(t){var e=i.getitemmodel(t),n=i.getitemlayout(t).sign;i.setitemvisual(t,{color:e.get(n>0?ma:ia),bordercolor:e.get(n>0?wa:sa)})})})}),or(function(t){t.eachseriesbytype("candlestick",function(t){var e,i=t.coordinatesystem,n=t.getdata(),o=md(t,n),a=t.get("layout"),r="horizontal"===a?0:1,s=1-r,l=["x","y"],h=[];if(d(n.dimensions,function(t){var i=n.getdimensioninfo(t).coorddim;i===l[s]?h.push(t):i===l[r]&&(e=t)}),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),function(){function t(t){var e=[];return e[r]=d,e[s]=t,isnan(d)||isnan(t)?[nan,nan]:i.datatopoint(e)}function e(t,e){var i=t.slice(),n=t.slice();i[r]=kn(i[r]+o/2,1,!1),n[r]=kn(n[r]-o/2,1,!0),e?m.push(i,n):m.push(n,i)}function l(t){return t[r]=kn(t[r],1),t}var c=arguments,d=c[0],f=c[h.length+1],g=c[1],p=c[2],m=c[3],v=c[4],y=math.min(g,p),x=math.max(g,p),_=t(y),b=t(x),w=t(m),s=[[l(t(v)),l(b)],[l(w),l(_)]],m=[];e(b,0),e(_,1);var i;i=g>p?-1:g0?n.getitemmodel(u-1).get()[2]<=p?1:-1:1,n.setitemlayout(f,{chartlayout:a,sign:i,initbaseline:g>p?b[s]:_[s],bodyends:m,whiskerends:s,brushrect:function(){var e=t(math.min(g,p,m,v)),i=t(math.max(g,p,m,v));return e[r]-=o/2,i[r]-=o/2,{x:e[0],y:e[1],width:s?o:i[0]-e[0],height:s?i[1]-e[1]:o}}()}),++u},!0)}})}),yw.extend({type:"series.effectscatter",dependencies:["grid","polar"],getinitialdata:function(t,e){return sr(t.data,this,e)},brushselector:"point",defaultoption:{coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0,effecttype:"ripple",progressive:0,showeffecton:"render",rippleeffect:{period:4,scale:2.5,brushtype:"fill"},symbolsize:10}});var aa=ad.prototype;aa.stopeffectanimation=function(){this.childat(1).removeall()},aa.starteffectanimation=function(t){for(var e=t.symboltype,i=t.color,n=this.childat(1),o=0;o<3;o++){var a=hr(e,-1,-1,2,2,i);a.attr({style:{strokenoscale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectoffset;a.animate("",!0).when(t.period,{scale:[t.ripplescale/2,t.ripplescale/2]}).delay(r).start(),a.animatestyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}td(n,t)},aa.updateeffectanimation=function(t){for(var e=this._effectcfg,i=this.childat(1),n=["symboltype","period","ripplescale"],o=0;o "))},defaultoption:{coordinatesystem:"geo",zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,xaxisindex:0,yaxisindex:0,symbol:["none","none"],symbolsize:[10,10],geoindex:0,effect:{show:!1,period:4,constantspeed:0,symbol:"circle",symbolsize:3,loop:!0,traillength:.2},large:!1,largethreshold:2e3,polyline:!1,label:{normal:{show:!1,position:"end"}},linestyle:{normal:{opacity:.5}}}}),da=dd.prototype;da.createline=function(t,e,i){return new bu(t,e,i)},da._updateeffectsymbol=function(t,e){var i=t.getitemmodel(e).getmodel("effect"),n=i.get("symbolsize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getitemvisual(e,"color"),r=this.childat(1);this._symboltype!==o&&(this.remove(r),(r=hr(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setstyle("shadowcolor",a),r.setstyle(i.getitemstyle(["color"])),r.attr("scale",n),r.setcolor(a),r.attr("scale",n),this._symboltype=o,this._updateeffectanimation(t,i,e))},da._updateeffectanimation=function(t,e,i){var n=this.childat(1);if(n){var o=this,a=t.getitemlayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantspeed"),h=i(e.get("delay"),function(e){return e/t.count()*r/3}),u="function"==typeof h;if(n.ignore=!0,this.updateanimationpoints(n,a),l>0&&(r=this.getlinelength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopanimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updatesymbolposition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},da.getlinelength=function(t){return hy(t.__p1,t.__cp1)+hy(t.__cp1,t.__p2)},da.updateanimationpoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},da.updatedata=function(t,e,i){this.childat(0).updatedata(t,e,i),this._updateeffectsymbol(t,e)},da.updatesymbolposition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=un,s=cn;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),h=s(e[1],n[1],i[1],o);t.rotation=-math.atan2(h,l)-math.pi/2,t.ignore=!1},da.updatelayout=function(t,e){this.childat(0).updatelayout(t,e);var i=t.getitemmodel(e).getmodel("effect");this._updateeffectanimation(t,i,e)},h(dd,jy);var la=ld.prototype;la._createpolyline=function(t,e,i){var n=t.getitemlayout(e),o=new cb({shape:{points:n}});this.add(o),this._updatecommonstl(t,e,i)},la.updatedata=function(t,e,i){var n=t.hostmodel;wo(this.childat(0),{shape:{points:t.getitemlayout(e)}},n,e),this._updatecommonstl(t,e,i)},la._updatecommonstl=function(t,e,i){var n=this.childat(0),o=t.getitemmodel(e),a=t.getitemvisual(e,"color"),s=i&&i.linestyle,l=i&&i.hoverlinestyle;i&&!t.hasitemoption||(s=o.getmodel("linestyle.normal").getlinestyle(),l=o.getmodel("linestyle.emphasis").getlinestyle()),n.usestyle(r({strokenoscale:!0,fill:"none",stroke:a},s)),n.hoverstyle=l,uo(this)},la.updatelayout=function(t,e){this.childat(0).setshape("points",t.getitemlayout(e))},h(ld,jy);var ka=kd.prototype;ka.createline=function(t,e,i){return new ld(t,e,i)},ka.updateanimationpoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=math.min(r,o-2)}else{for(var r=a;re);r++);r=math.min(r-1,o-2)}y(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-math.atan2(l,s)-math.pi/2,this._lastframe=r,this._lastframepercent=e,t.ignore=!1}},h(kd,dd);var pa=zn({shape:{polyline:!1,segs:[]},buildpath:function(t,e){for(var i=e.segs,n=e.polyline,o=0;o2?t.quadraticcurveto(a[2][0],a[2][1],a[1][0],a[1][1]):t.lineto(a[1][0],a[1][1])}},finddataindex:function(t,e){for(var i=this.shape,n=i.segs,o=i.polyline,a=math.max(this.style.linewidth,1),r=0;r2){if(sn(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],a,t,e))return r}else if(bn(s[0][0],s[0][1],s[1][0],s[1][1],a,t,e))return r}return-1}}),oa=pd.prototype;oa.updatedata=function(t){this.group.removeall();var e=this._lineel,i=t.hostmodel;e.setshape({segs:t.maparray(t.getitemlayout),polyline:i.get("polyline")}),e.usestyle(i.getmodel("linestyle.normal").getlinestyle());var n=t.getvisual("color");n&&e.setstyle("stroke",n),e.setstyle("fill"),e.seriesindex=i.seriesindex,e.on("mousemove",function(t){e.dataindex=null;var i=e.finddataindex(t.offsetx,t.offsety);i>0&&(e.dataindex=i)}),this.group.add(e)},oa.updatelayout=function(t){var e=t.getdata();this._lineel.setshape({segs:e.maparray(e.getitemlayout)})},oa.remove=function(){this.group.removeall()},ur({type:"lines",init:function(){},render:function(t,e,i){var n=t.getdata(),o=this._linedraw,a=t.get("effect.show"),r=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largethreshold");a===this._haseffet&&r===this._ispolyline&&s===this._islarge||(o&&o.remove(),o=this._linedraw=s?new pd:new mu(r?a?kd:ld:a?dd:bu),this._haseffet=a,this._ispolyline=r,this._islarge=s);var l=t.get("zlevel"),h=t.get("effect.traillength"),u=i.getzr(),c="svg"===u.painter.gettype();c||u.painter.getlayer(l).clear(!0),null==this._lastzlevel||c||u.configlayer(this._lastzlevel,{motionblur:!1}),a&&h&&(c||u.configlayer(l,{motionblur:!0,lastframealpha:math.max(math.min(h/10+.9,1),0)})),this.group.add(o.group),o.updatedata(n),this._lastzlevel=l},updatelayout:function(t,e,i){this._linedraw.updatelayout(t);var n=i.getzr();"svg"===n.painter.gettype()||n.painter.getlayer(this._lastzlevel).clear(!0)},remove:function(t,e){this._linedraw&&this._linedraw.remove(e,!0);var i=e.getzr();"svg"===i.painter.gettype()||i.painter.getlayer(this._lastzlevel).clear(!0)},dispose:function(){}});or(function(t){t.eachseriesbytype("lines",function(t){var e=t.coordinatesystem,i=t.getdata();i.each(function(n){var o=i.getitemmodel(n),a=o.option instanceof array?o.option:o.get("coords"),r=[];if(t.get("polyline"))for(var s=0;s0){var i=a(v)?s:l;v>0&&(v=v*s+w),x[_++]=i[m],x[_++]=i[m+1],x[_++]=i[m+2],x[_++]=i[m+3]*v*256}else _+=4}return c.putimagedata(y,0,0),u},_getbrush:function(){var t=this._brushcanvas||(this._brushcanvas=iy()),e=this.pointsize+this.blursize,i=2*e;t.width=i,t.height=i;var n=t.getcontext("2d");return n.clearrect(0,0,i,i),n.shadowoffsetx=i,n.shadowblur=this.blursize,n.shadowcolor="#000",n.beginpath(),n.arc(-e,e,this.pointsize,0,2*math.pi,!0),n.closepath(),n.fill(),t},_getgradient:function(t,e,i){for(var n=this._gradientpixels,o=n[i]||(n[i]=new uint8clampedarray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},ur({type:"heatmap",render:function(t,e,i){var n;e.eachcomponent("visualmap",function(e){e.eachtargetseries(function(i){i===t&&(n=e)})}),this.group.removeall();var o=t.coordinatesystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderoncartesianandcalendar(o,t,i):rd(o)&&this._renderongeo(o,t,n,i)},dispose:function(){},_renderoncartesianandcalendar:function(t,e,i){if("cartesian2d"===t.type)var n=t.getaxis("x"),o=t.getaxis("y"),r=n.getbandwidth(),s=o.getbandwidth();var l=this.group,h=e.getdata(),u=e.getmodel("itemstyle.normal").getitemstyle(["color"]),c=e.getmodel("itemstyle.emphasis").getitemstyle(),d=e.getmodel("label.normal"),f=e.getmodel("label.emphasis"),g=t.type,p="cartesian2d"===g?[e.coorddimtodatadim("x")[0],e.coorddimtodatadim("y")[0],e.coorddimtodatadim("value")[0]]:[e.coorddimtodatadim("time")[0],e.coorddimtodatadim("value")[0]];h.each(function(i){var n;if("cartesian2d"===g){if(isnan(h.get(p[2],i)))return;var o=t.datatopoint([h.get(p[0],i),h.get(p[1],i)]);n=new db({shape:{x:o[0]-r/2,y:o[1]-s/2,width:r,height:s},style:{fill:h.getitemvisual(i,"color"),opacity:h.getitemvisual(i,"opacity")}})}else{if(isnan(h.get(p[1],i)))return;n=new db({z2:1,shape:t.datatorect([h.get(p[0],i)]).contentshape,style:{fill:h.getitemvisual(i,"color"),opacity:h.getitemvisual(i,"opacity")}})}var m=h.getitemmodel(i);h.hasitemoption&&(u=m.getmodel("itemstyle.normal").getitemstyle(["color"]),c=m.getmodel("itemstyle.emphasis").getitemstyle(),d=m.getmodel("label.normal"),f=m.getmodel("label.emphasis"));var v=e.getrawvalue(i),y="-";v&&null!=v[2]&&(y=v[2]),co(u,c,d,f,{labelfetcher:e,labeldataindex:i,defaulttext:y,isrecttext:!0}),n.setstyle(u),uo(n,h.hasitemoption?c:a({},c)),l.add(n),h.setitemgraphicel(i,n)})},_renderongeo:function(t,e,i,n){var o=i.targetvisuals.inrange,a=i.targetvisuals.outofrange,r=e.getdata(),s=this._hmlayer||this._hmlayer||new zd;s.blursize=e.get("blursize"),s.pointsize=e.get("pointsize"),s.minopacity=e.get("minopacity"),s.maxopacity=e.get("maxopacity");var l=t.getviewrect().clone(),h=t.getroamtransform().transform;l.applytransform(h);var u=math.max(l.x,0),c=math.max(l.y,0),d=math.min(l.width+l.x,n.getwidth()),f=math.min(l.height+l.y,n.getheight()),g=d-u,p=f-c,m=r.maparray(["lng","lat","value"],function(e,i,n){var o=t.datatopoint([e,i]);return o[0]-=u,o[1]-=c,o.push(n),o}),v=i.getextent(),y="visualmap.continuous"===i.type?ed(v,i.option.range):nd(v,i.getpiecelist(),i.option.selected);s.update(m,g,p,o.color.getnormalizer(),{inrange:o.color.getcolormapper(),outofrange:a.color.getcolormapper()},y);var x=new qe({style:{width:g,height:p,x:u,y:c,image:s.canvas},silent:!0});this.group.add(x)}});var za=zm.extend({type:"series.pictorialbar",dependencies:["grid"],defaultoption:{symbol:"circle",symbolsize:null,symbolrotate:null,symbolposition:null,symboloffset:null,symbolmargin:null,symbolrepeat:!1,symbolrepeatdirection:"end",symbolclip:!1,symbolboundingdata:null,symbolpatternsize:400,bargap:"-100%",progressive:0,hoveranimation:!1},getinitialdata:function(t){return t.stack=null,za.superapply(this,"getinitialdata",arguments)}}),na=["itemstyle","normal","borderwidth"],ea=[{xy:"x",wh:"width",index:0,posdesc:["left","right"]},{xy:"y",wh:"height",index:1,posdesc:["top","bottom"]}],ra=new nb;ur({type:"pictorialbar",render:function(t,e,i){var n=this.group,o=t.getdata(),a=this._data,r=t.coordinatesystem,s=!!r.getbaseaxis().ishorizontal(),l=r.grid.getrect(),h={ecsize:{width:i.getwidth(),height:i.getheight()},seriesmodel:t,coordsys:r,coordsysextent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],ishorizontal:s,valuedim:ea[+s],categorydim:ea[1-s]};return o.diff(a).add(function(t){if(o.hasvalue(t)){var e=yd(o,t),i=vd(o,t,e,h),a=qd(o,h,i);o.setitemgraphicel(t,a),n.add(a),rf(a,h,i)}}).update(function(t,e){var i=a.getitemgraphicel(e);if(o.hasvalue(t)){var r=yd(o,t),s=vd(o,t,r,h),l=nf(o,s);i&&l!==i.__pictorialshapestr&&(n.remove(i),o.setitemgraphicel(t,null),i=null),i?tf(i,h,s):i=qd(o,h,s,!0),o.setitemgraphicel(t,i),i.__pictorialsymbolmeta=s,n.add(i),rf(i,h,s)}else n.remove(i)}).remove(function(t){var e=a.getitemgraphicel(t);e&&ef(a,t,e.__pictorialsymbolmeta.animationmodel,e)}).execute(),this._data=o,this.group},dispose:n,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachitemgraphicel(function(e){ef(n,e.dataindex,t,e)}):i.removeall()}});or(v(nl,"pictorialbar")),ar(v(cm,"pictorialbar","roundrect",null));var va=function(t,e,i,n,o){us.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null,this._labelinterval=null};va.prototype={constructor:va,model:null,ishorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointtodata:function(t,e){return this.coordinatesystem.pointtodata(t,e)[0]},toglobalcoord:null,tolocalcoord:null},h(va,us),lf.prototype={type:"singleaxis",axispointerenabled:!0,constructor:lf,_init:function(t,e,i){var n=this.dimension,o=new va(n,er(t),[0,0],t.get("type"),t.get("position")),a="category"===o.type;o.onband=a&&t.get("boundarygap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinatesystem=this,this._axis=o},update:function(t,e){t.eachseries(function(t){if(t.coordinatesystem===this){var e=t.getdata(),i=this.dimension;this._axis.scale.unionextentfromdata(e,t.coorddimtodatadim(i)),nr(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=ko({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getwidth(),height:e.getheight()}),this._adjustaxis()},getrect:function(){return this._rect},_adjustaxis:function(){var t=this._rect,e=this._axis,i=e.ishorizontal(),n=i?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setextent(n[o],n[1-o]),this._updateaxistransform(e,i?t.x:t.y)},_updateaxistransform:function(t,e){var i=t.getextent(),n=i[0]+i[1],o=t.ishorizontal();t.toglobalcoord=o?function(t){return t+e}:function(t){return n-t+e},t.tolocalcoord=o?function(t){return t-e}:function(t){return n-t+e}},getaxis:function(){return this._axis},getbaseaxis:function(){return this._axis},getaxes:function(){return[this._axis]},gettooltipaxes:function(){return{baseaxes:[this.getaxis()]}},containpoint:function(t){var e=this.getrect(),i=this.getaxis();return"horizontal"===i.orient?i.contain(i.tolocalcoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.tolocalcoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointtodata:function(t){var e=this.getaxis();return[e.coordtodata(e.tolocalcoord(t["horizontal"===e.orient?0:1]))]},datatopoint:function(t){var e=this.getaxis(),i=this.getrect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof array&&(t=t[0]),n[o]=e.toglobalcoord(e.datatocoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},ua.register("single",{create:function(t,e){var i=[];return t.eachcomponent("singleaxis",function(n,o){var a=new lf(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinatesystem=a,i.push(a)}),t.eachseries(function(e){if("singleaxis"===e.get("coordinatesystem")){var i=t.querycomponents({maintype:"singleaxis",index:e.get("singleaxisindex"),id:e.get("singleaxisid")})[0];e.coordinatesystem=i&&i.coordinatesystem}}),i},dimensions:lf.prototype.dimensions});var ba=dm.getinterval,ga=dm.ifignoreontick,wa=["axisline","axisticklabel","axisname"],ha=em.extend({type:"singleaxis",axispointerclass:"singleaxispointer",render:function(t,e,i,n){var o=this.group;o.removeall();var a=hf(t),r=new dm(t,a);d(wa,r.add,r),o.add(r.getgroup()),t.get("splitline.show")&&this._splitline(t,a.labelinterval),ha.supercall(this,"render",t,e,i,n)},_splitline:function(t,e){var i=t.axis;if(!i.scale.isblank()){var n=t.getmodel("splitline"),o=n.getmodel("linestyle"),a=o.get("width"),r=o.get("color"),s=ba(n,e);r=r instanceof array?r:[r];for(var l=t.coordinatesystem.getrect(),h=i.ishorizontal(),u=[],c=0,d=i.gettickscoords(),f=[],g=[],p=t.get("axislabel.showminlabel"),m=t.get("axislabel.showmaxlabel"),v=0;v=0)&&i({type:"updateaxispointer",currtrigger:t,x:e&&e.offsetx,y:e&&e.offsety})})},remove:function(t,e){tf(e.getzr(),"axispointer"),ka.superapply(this._model,"remove",arguments)},dispose:function(t,e){tf("axispointer",e),ka.superapply(this._model,"dispose",arguments)}}),ja=eb(),qa=i,tc=m;(af.prototype={_group:null,_lastgraphickey:null,_handle:null,_dragging:!1,_lastvalue:null,_laststatus:null,_payloadinfo:null,animationthreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axismodel=t,this._axispointermodel=e,this._api=i,n||this._lastvalue!==o||this._laststatus!==a){this._lastvalue=o,this._laststatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeeloption(l,o,t,e,i);var h=l.graphickey;h!==this._lastgraphickey&&this.clear(i),this._lastgraphickey=h;var u=this._moveanimation=this.determineanimation(t,e);if(r){var c=v(cf,e,u);this.updatepointerel(r,l,c,e),this.updatelabelel(r,l,c,e)}else r=this._group=new jy,this.createpointerel(r,l,t,e),this.createlabelel(r,l,t,e),i.getzr().add(r);pf(r,e,!0),this._renderhandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineanimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationthreshold;if(o&&n.getbandwidth()>r)return!0;if(a){var s=xs(t).seriesdatacount,l=n.getextent();return math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeeloption:function(t,e,i,n,o){},createpointerel:function(t,e,i,n){var o=e.pointer;if(o){var a=ja(t).pointerel=new tb[o.type](qa(e.pointer));t.add(a)}},createlabelel:function(t,e,i,n){if(e.label){var o=ja(t).labelel=new db(qa(e.label));t.add(o),lf(o,n)}},updatepointerel:function(t,e,i){var n=ja(t).pointerel;n&&(n.setstyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updatelabelel:function(t,e,i,n){var o=ja(t).labelel;o&&(o.setstyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),lf(o,n))},_renderhandle:function(t){if(!this._dragging&&this.updatehandletransform){var e=this._axispointermodel,i=this._api.getzr(),n=this._handle,o=e.getmodel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=do(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){bx(t.event)},onmousedown:tc(this._onhandledragmove,this,0,0),drift:tc(this._onhandledragmove,this),ondragend:tc(this._onhandledragend,this)}),i.add(n)),pf(n,e,!1);var s=["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"];n.setstyle(o.getitemstyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),la(this,"_dodispatchaxispointer",o.get("throttle")||0,"fixrate"),this._movehandletovalue(t,r)}},_movehandletovalue:function(t,e){cf(this._axispointermodel,!e&&this._moveanimation,this._handle,kf(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},_onhandledragmove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updatehandletransform(kf(i),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=n,i.stopanimation(),i.attr(kf(n)),ja(i).lastprop=null,this._dodispatchaxispointer()}},_dodispatchaxispointer:function(){if(this._handle){var t=this._payloadinfo,e=this._axismodel;this._api.dispatchaction({type:"updateaxispointer",x:t.cursorpoint[0],y:t.cursorpoint[1],tooltipoption:t.tooltipoption,axesinfo:[{axisdim:e.axis.dim,axisindex:e.componentindex}]})}},_onhandledragend:function(t){if(this._dragging=!1,this._handle){var e=this._axispointermodel.get("value");this._movehandletovalue(e),this._api.dispatchaction({type:"hidetip"})}},gethandletransform:null,updatehandletransform:null,clear:function(t){this._lastvalue=null,this._laststatus=null;var e=t.getzr(),i=this._group,n=this._handle;e&&i&&(this._lastgraphickey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadinfo=null)},doclear:function(){},buildlabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=af,ki(af);var ec=af.extend({makeeloption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=hf(r,a).getotheraxis(a).getglobalextent(),h=a.toglobalcoord(a.datatocoord(e,!0));if(s&&"none"!==s){var u=of(n),c=ic[s](a,h,l,u);c.style=u,t.graphickey=c.type,t.pointer=c}vf(e,t,js(r.model,i),i,n,o)},gethandletransform:function(t,e,i){var n=js(e.axis.grid.model,e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:rf(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getglobalextent(!0),s=hf(a,o).getotheraxis(o).getglobalextent(),l="x"===o.dim?0:1,h=t.position;h[l]+=e[l],h[l]=math.min(r[1],h[l]),h[l]=math.max(r[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];var d=[{verticalalign:"middle"},{align:"center"}];return{position:h,rotation:t.rotation,cursorpoint:c,tooltipoption:d[l]}}}),ic={line:function(t,e,i,n){var o=bf([e,i[0]],[e,i[1]],ff(t));return yn({shape:o,style:n}),{type:"line",shape:o}},shadow:function(t,e,i,n){var o=t.getbandwidth(),a=i[1]-i[0];return{type:"rect",shape:gf([e-o/2,i[0]],[o,a],ff(t))}}};em.registeraxispointerclass("cartesianaxispointer",ec),tr(function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!y(e)&&(t.axispointer.link=[e])}}),er(pw.processor.statistic,function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=bs(t,e)}),ir({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},function(t,e,i){var n=t.currtrigger,o=[t.x,t.y],a=t,r=t.dispatchaction||m(i.dispatchaction,i),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){xf(o)&&(o=ua({seriesindex:a.seriesindex,dataindex:a.dataindex},e).point);var l=xf(o),h=a.axesinfo,u=s.axesinfo,c="leave"===n||xf(o),d={},f={},g={list:[],map:{}},p={showpointer:ja(df,f),showtooltip:ja(ff,g)};xa(s.coordsysmap,function(t,e){var i=l||t.containpoint(o);xa(s.coordsysaxesinfo[e],function(t,e){var n=t.axis,a=vf(h,t);if(!c&&i&&(!h||a)){var r=a&&a.value;null!=r||l||(r=n.pointtodata(o)),null!=r&&uf(t,r,p,!1,d)}})});var v={};return xa(u,function(t,e){var i=t.linkgroup;i&&!f[e]&&xa(i.axesinfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,yf(e),yf(t)))),v[t.key]=a}})}),xa(v,function(t,e){uf(u[e],t,p,!0,d)}),gf(f,u,d),pf(g,o,t,r),mf(u,0,i),d}});var nc=["x","y"],oc=["width","height"],ac=af.extend({makeeloption:function(t,e,i,n,o){var a=i.axis,r=a.coordinatesystem,s=uf(r,1-zf(a)),l=r.datatopoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=of(n),c=rc[h](a,l,s,u);c.style=u,t.graphickey=c.type,t.pointer=c}vf(e,t,hf(i),i,n,o)},gethandletransform:function(t,e,i){var n=hf(e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:rf(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i,n){var o=i.axis,a=o.coordinatesystem,r=zf(o),s=uf(a,r),l=t.position;l[r]+=e[r],l[r]=math.min(s[1],l[r]),l[r]=math.max(s[0],l[r]);var h=uf(a,1-r),u=(h[1]+h[0])/2,c=[u,u];return c[r]=l[r],{position:l,rotation:t.rotation,cursorpoint:c,tooltipoption:{verticalalign:"middle"}}}}),rc={line:function(t,e,i,n){var o=bf([e,i[0]],[e,i[1]],zf(t));return yn({shape:o,style:n}),{type:"line",shape:o}},shadow:function(t,e,i,n){var o=t.getbandwidth(),a=i[1]-i[0];return{type:"rect",shape:gf([e-o/2,i[0]],[o,a],zf(t))}}};em.registeraxispointerclass("singleaxispointer",ac),lr({type:"single"});var sc=yw.extend({type:"series.themeriver",dependencies:["singleaxis"],namemap:null,init:function(t){sc.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()}},fixdata:function(t){for(var e=t.length,i=f(jc().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,datalist:t.values}}),n=i.length,o=-1,a=-1,r=0;ro&&(o=s,a=r)}for(var l=0;ln[1]&&n.reverse(),{coordsys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.datatoradius(n[0]),a=i.datatoangle(n[1]),r=t.coordtopoint([o,a]);return r.push(o,a*math.pi/180),r}),size:m(jf,t)}}},calendar:function(t){var e=t.getrect(),i=t.getrangeinfo();return{coordsys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellwidth:t.getcellwidth(),cellheight:t.getcellheight(),rangeinfo:{start:i.start,end:i.end,weeks:i.weeks,daycount:i.allday}},api:{coord:m(t.datatopoint,t)}}}};hr({type:"series.custom",dependencies:["grid","polar","geo","singleaxis","calendar"],defaultoption:{coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0},getinitialdata:function(t,e){return sr(t.data,this,e)}}),ur({type:"custom",_data:null,render:function(t,e,i){var n=this._data,o=t.getdata(),a=this.group,r=ig(t,o,e,i);o.diff(n).add(function(e){o.hasvalue(e)&&og(null,e,r(e),t,a,o)}).update(function(e,i){var s=n.getitemgraphicel(i);o.hasvalue(e)?og(s,e,r(e),t,a,o):s&&a.remove(s)}).remove(function(t){var e=n.getitemgraphicel(t);e&&a.remove(e)}).execute(),this._data=o},dispose:n}),tr(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var gc=sr({type:"graphic",defaultoption:{elements:[],parentid:null},_eloptionstoupdate:null,mergeoption:function(t){var e=this.option.elements;this.option.elements=null,gc.superapply(this,"mergeoption",arguments),this.option.elements=e},optionupdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=vo(o,a);bo(r);var s=this._eloptionstoupdate=[];d(r,function(t,e){var i=t.option;i&&(s.push(i),gg(t,i),pg(o,e,i),mg(o[e],i))},this);for(var l=o.length-1;l>=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentoption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useeloptionstoupdate:function(){var t=this._eloptionstoupdate;return this._eloptionstoupdate=null,t}});lr({type:"graphic",init:function(t,e){this._elmap=z(),this._lastgraphicmodel},render:function(t,e,i){t!==this._lastgraphicmodel&&this._clear(),this._lastgraphicmodel=t,this._updateelements(t,i),this._relocate(t,i)},_updateelements:function(t,e){var i=t.useeloptionstoupdate();if(i){var n=this._elmap,o=this.group;d(i,function(t){var e=t.$action,i=t.id,a=n.get(i),r=t.parentid,s=null!=r?n.get(r):o;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textverticalalign=l.textbaseline=null),!l.hasownproperty("textfill")&&l.fill&&(l.textfill=l.fill),!l.hasownproperty("textstroke")&&l.stroke&&(l.textstroke=l.stroke)}var h=dg(t);e&&"merge"!==e?"replace"===e?(cg(a,n),ug(i,s,h,n)):"remove"===e&&cg(a,n):a?a.attr(h):ug(i,s,h,n);var u=n.get(i);u&&(u.__ecgraphicwidth=t.width,u.__ecgraphicheight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elmap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;jo(s,r,l===n?{width:e.getwidth(),height:e.getheight()}:{width:l.__ecgraphicwidth||0,height:l.__ecgraphicheight||0},null,{hv:r.hv,boundingmode:r.bounding})}}},_clear:function(){var t=this._elmap;t.each(function(e){cg(e,t)}),this._elmap=z()},dispose:function(){this._clear()}});var pc=sr({type:"legend.plain",dependencies:["series"],layoutmode:{type:"box",ignoresize:!0},init:function(t,e,i){this.mergedefaultandtheme(t,i),t.selected=t.selected||{}},mergeoption:function(t){pc.supercall(this,"mergeoption",t)},optionupdated:function(){this._updatedata(this.ecmodel);var t=this._data;if(t[0]&&"single"===this.get("selectedmode")){for(var e=!1,i=0;i=0},defaultoption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderradius:0,borderwidth:0,padding:5,itemgap:10,itemwidth:25,itemheight:14,inactivecolor:"#ccc",textstyle:{color:"#333"},selectedmode:!0,tooltip:{show:!1}}});ir("legendtoggleselect","legendselectchanged",v(vg,"toggleselected")),ir("legendselect","legendselected",v(vg,"select")),ir("legendunselect","legendunselected",v(vg,"unselect"));var mc=v,vc=d,yc=jy,xc=lr({type:"legend.plain",newlinedisabled:!1,init:function(){this.group.add(this._contentgroup=new yc),this._backgroundel},getcontentgroup:function(){return this._contentgroup},render:function(t,e,i){if(this.resetinner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderinner(n,t,e,i);var o=t.getboxlayoutparams(),a={width:i.getwidth(),height:i.getheight()},s=t.get("padding"),l=ko(o,a,s),h=this.layoutinner(t,n,l),u=ko(r({width:h.width,height:h.height},o),a,s);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundel=xg(h,t))}},resetinner:function(){this.getcontentgroup().removeall(),this._backgroundel&&this.group.remove(this._backgroundel)},renderinner:function(t,e,i,n){var o=this.getcontentgroup(),a=z(),r=e.get("selectedmode");vc(e.getdata(),function(s,l){var h=s.get("name");if(this.newlinedisabled||""!==h&&"\n"!==h){var u=i.getseriesbyname(h)[0];if(!a.get(h))if(u){var c=u.getdata(),d=c.getvisual("color");"function"==typeof d&&(d=d(u.getdataparams(0)));var f=c.getvisual("legendsymbol")||"roundrect",g=c.getvisual("symbol");this._createitem(h,l,s,e,f,g,t,d,r).on("click",mc(_g,h,n)).on("mouseover",mc(bg,u,null,n)).on("mouseout",mc(wg,u,null,n)),a.set(h,!0)}else i.eachrawseries(function(i){if(!a.get(h)&&i.legenddataprovider){var o=i.legenddataprovider(),u=o.indexofname(h);if(u<0)return;var c=o.getitemvisual(u,"color");this._createitem(h,l,s,e,"roundrect",null,t,c,r).on("click",mc(_g,h,n)).on("mouseover",mc(bg,i,h,n)).on("mouseout",mc(wg,i,h,n)),a.set(h,!0)}},this)}else o.add(new yc({newline:!0}))},this)},_createitem:function(t,e,i,n,o,r,s,l,h){var u=n.get("itemwidth"),c=n.get("itemheight"),d=n.get("inactivecolor"),f=n.isselected(t),g=new yc,p=i.getmodel("textstyle"),m=i.get("icon"),v=i.getmodel("tooltip"),y=v.parentmodel;if(o=m||o,g.add(hr(o,0,0,u,c,f?l:d,!0)),!m&&r&&(r!==o||"none"==r)){var x=.8*c;"none"===r&&(r="circle"),g.add(hr(r,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,b=s,w=n.get("formatter"),s=t;"string"==typeof w&&w?s=w.replace("{name}",null!=t?t:""):"function"==typeof w&&(s=w(t)),g.add(new ib({style:fo({},p,{text:s,x:_,y:c/2,textfill:f?p.gettextcolor():d,textalign:b,textverticalalign:"middle"})}));var m=new db({shape:g.getboundingrect(),invisible:!0,tooltip:v.get("show")?a({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterparams:{componenttype:"legend",legendindex:n.componentindex,name:t,$vars:["name"]}},v.option):null});return g.add(m),g.eachchild(function(t){t.silent=!0}),m.silent=!h,this.getcontentgroup().add(g),uo(g),g.__legenddataindex=e,g},layoutinner:function(t,e,i){var n=this.getcontentgroup();hb(t.get("orient"),n,t.get("itemgap"),i.width,i.height);var o=n.getboundingrect();return n.attr("position",[-o.x,-o.y]),this.group.getboundingrect()}});er(function(t){var e=t.findcomponents({maintype:"legend"});e&&e.length&&t.filterseries(function(t){for(var i=0;ii[s],f=[-u.x,-u.y];f[r]=n.position[r];var g=[0,0],p=[-c.x,-c.y],m=t(t.get("pagebuttongap",!0),t.get("itemgap",!0));d&&("end"===t.get("pagebuttonposition",!0)?p[r]+=i[s]-c[s]:g[r]+=c[s]+m),p[1-r]+=u[l]/2-c[l]/2,n.attr("position",f),o.attr("position",g),a.attr("position",p);var v=this.group.getboundingrect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=math.max(u[l],c[l]),v[h]=math.min(0,c[h]+p[1-r]),o.__rectsize=i[s],d){var y={x:0,y:0};y[s]=math.max(i[s]-c[s]-m,0),y[l]=v[l],o.setclippath(new db({shape:y})),o.__rectsize=y[s]}else a.eachchild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getpageinfo(t);return null!=x.pageindex&&wo(n,{position:x.contentposition},!!d&&t),this._updatepageinfoview(t,x),v},_pagego:function(t,e,i){var n=this._getpageinfo(e)[t];null!=n&&i.dispatchaction({type:"legendscroll",scrolldataindex:n,legendid:e.id})},_updatepageinfoview:function(t,e){var i=this._controllergroup;d(["pageprev","pagenext"],function(n){var o=null!=e[n+"dataindex"],a=i.childofname(n);a&&(a.setstyle("fill",o?t.get("pageiconcolor",!0):t.get("pageiconinactivecolor",!0)),a.cursor=o?"pointer":"default")});var n=i.childofname("pagetext"),o=t.get("pageformatter"),a=e.pageindex,r=null!=a?a+1:0,s=e.pagecount;n&&o&&n.setstyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getpageinfo:function(t){function e(t){var e=t.getboundingrect().clone();return e[f]+=t.position[u],e}var i,n,o,a,r=t.get("scrolldataindex",!0),s=this.getcontentgroup(),l=s.getboundingrect(),h=this._containergroup.__rectsize,u=t.getorient().index,c=wc[u],d=wc[1-u],f=sc[u],g=s.position.slice();this._showcontroller?s.eachchild(function(t){t.__legenddataindex===r&&(a=t)}):a=s.childat(0);var p=h?math.ceil(l[c]/h):0;if(a){var m=a.getboundingrect(),v=a.position[u]+m[f];g[u]=-v-l[f],i=math.floor(p*(v+m[f]+h/2)/l[c]),i=l[c]&&p?math.max(0,math.min(p-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-g[u]-l[f];var x,_=s.children();if(s.eachchild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),o=t.__legenddataindex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(o=null)}),null!=x){var b=e(_[x]);if(y[f]=b[f]+b[c]-y[c],x<=0&&b[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legenddataindex}}}return{contentposition:g,pageindex:i,pagecount:p,pageprevdataindex:n,pagenextdataindex:o}}});ir("legendscroll","legendscroll",function(t,e){var i=t.scrolldataindex;null!=i&&e.eachcomponent({maintype:"legend",subtype:"scroll",query:t},function(t){t.setscrolldataindex(i)})}),sr({type:"tooltip",dependencies:["axispointer"],defaultoption:{zlevel:0,z:8,show:!0,showcontent:!0,trigger:"item",triggeron:"mousemove|click",alwaysshowcontent:!1,displaymode:"single",confine:!1,showdelay:0,hidedelay:100,transitionduration:.4,enterable:!1,backgroundcolor:"rgba(50,50,50,0.7)",bordercolor:"#333",borderradius:4,borderwidth:0,padding:5,extracsstext:"",axispointer:{type:"line",axis:"auto",animation:"auto",animationdurationupdate:200,animationeasingupdate:"exponentialout",crossstyle:{color:"#999",width:1,type:"dashed",textstyle:{}}},textstyle:{color:"#fff",fontsize:14}}});var ic=d,tc=bi,ac=["","-webkit-","-moz-","-o-"];ag.prototype={constructor:ag,_enterable:!0,update:function(){var t=this._container,e=t.currentstyle||document.defaultview.getcomputedstyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){cleartimeout(this._hidetimeout);var e=this.el;e.style.csstext="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+tg(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extracsstext")||""),e.style.display=e.innerhtml?"block":"none",this._show=!0},setcontent:function(t){this.el.innerhtml=null==t?"":t},setenterable:function(t){this._enterable=t},getsize:function(){var t=this.el;return[t.clientwidth,t.clientheight]},moveto:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getviewportrootoffset())&&(t+=i.offsetleft,e+=i.offsettop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hidelater:function(t){!this._show||this._incontent&&this._enterable||(t?(this._hidedelay=t,this._show=!1,this._hidetimeout=settimeout(m(this.hide,this),t)):this.hide())},isshow:function(){return this._show}};var cc=m,dc=d,lc=si,kc=new db({shape:{x:-1,y:-1,width:2,height:2}});lr({type:"tooltip",init:function(t,e){if(!uv.node){var i=new ag(e.getdom(),e);this._tooltipcontent=i}},render:function(t,e,i){if(!uv.node){this.group.removeall(),this._tooltipmodel=t,this._ecmodel=e,this._api=i,this._lastdatabycoordsys=null,this._alwaysshowcontent=t.get("alwaysshowcontent");var n=this._tooltipcontent;n.update(),n.setenterable(t.get("enterable")),this._initgloballistener(),this._keepshow()}},_initgloballistener:function(){var t=this._tooltipmodel.get("triggeron");_f("itemtooltip",this._api,cc(function(e,i,n){"none"!==t&&(t.indexof(e)>=0?this._tryshow(i,n):"leave"===e&&this._hide(n))},this))},_keepshow:function(){var t=this._tooltipmodel,e=this._ecmodel,i=this._api;if(null!=this._lastx&&null!=this._lasty&&"none"!==t.get("triggeron")){var n=this;cleartimeout(this._refreshupdatetimeout),this._refreshupdatetimeout=settimeout(function(){n.manuallyshowtip(t,e,i,{x:n._lastx,y:n._lasty})})}},manuallyshowtip:function(t,e,i,n){if(n.from!==this.uid&&!uv.node){var o=dg(n,i);this._ticket="";var a=n.databycoordsys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=kc;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryshow({offsetx:n.x,offsety:n.y,target:r},o)}else if(a)this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,event:{},databycoordsys:n.databycoordsys,tooltipoption:n.tooltipoption},o);else if(null!=n.seriesindex){if(this._manuallyaxisshowtip(t,e,i,n))return;var s=ua(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryshow({offsetx:l,offsety:h,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchaction({type:"updateaxispointer",x:n.x,y:n.y}),this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,target:i.getzr().findhover(n.x,n.y).target,event:{}},o))}},manuallyhidetip:function(t,e,i,n){var o=this._tooltipcontent;this._alwaysshowcontent||o.hidelater(this._tooltipmodel.get("hidedelay")),this._lastx=this._lasty=null,n.from!==this.uid&&this._hide(dg(n,i))},_manuallyaxisshowtip:function(t,e,i,n){var o=n.seriesindex,a=n.dataindex,r=e.getcomponent("axispointer").coordsysaxesinfo;if(null!=o&&null!=a&&null!=r){var s=e.getseriesbyindex(o);if(s&&"axis"===(t=cg([s.getdata().getitemmodel(a),s,(s.coordinatesystem||{}).model,t])).get("trigger"))return i.dispatchaction({type:"updateaxispointer",seriesindex:o,dataindex:a,position:n.position}),!0}},_tryshow:function(t,e){var i=t.target;if(this._tooltipmodel){this._lastx=t.offsetx,this._lasty=t.offsety;var n=t.databycoordsys;n&&n.length?this._showaxistooltip(n,t):i&&null!=i.dataindex?(this._lastdatabycoordsys=null,this._showseriesitemtooltip(t,i,e)):i&&i.tooltip?(this._lastdatabycoordsys=null,this._showcomponentitemtooltip(t,i,e)):(this._lastdatabycoordsys=null,this._hide(e))}},_showormove:function(t,e){var i=t.get("showdelay");e=m(e,this),cleartimeout(this._showtimout),i>0?this._showtimout=settimeout(e,i):e()},_showaxistooltip:function(t,e){var i=this._ecmodel,n=this._tooltipmodel,o=[e.offsetx,e.offsety],a=[],r=[],s=cg([e.tooltipoption,n]);dc(t,function(t){dc(t.databyaxis,function(t){var e=i.getcomponent(t.axisdim+"axis",t.axisindex),n=t.value,o=[];if(e&&null!=n){var s=ef(n,e.axis,i,t.seriesdataindices,t.valuelabelopt);d(t.seriesdataindices,function(a){var l=i.getseriesbyindex(a.seriesindex),h=a.dataindexinside,u=l&&l.getdataparams(h);u.axisdim=t.axisdim,u.axisindex=t.axisindex,u.axistype=t.axistype,u.axisid=t.axisid,u.axisvalue=br(e.axis,n),u.axisvaluelabel=s,u&&(r.push(u),o.push(l.formattooltip(h,!0)))});var l=s;a.push((l?gi(l)+"
":"")+o.join("
"))}})},this),a.reverse(),a=a.join("

");var l=e.position;this._showormove(s,function(){this._updatecontentnotchangedonaxis(t)?this._updateposition(s,l,o[0],o[1],this._tooltipcontent,r):this._showtooltipcontent(s,a,r,math.random(),o[0],o[1],l)})},_showseriesitemtooltip:function(t,e,i){var n=this._ecmodel,o=e.seriesindex,a=n.getseriesbyindex(o),r=e.datamodel||a,s=e.dataindex,l=e.datatype,h=r.getdata(),u=cg([h.getitemmodel(s),r,a&&(a.coordinatesystem||{}).model,this._tooltipmodel]),c=u.get("trigger");if(null==c||"item"===c){var d=r.getdataparams(s,l),f=r.formattooltip(s,!1,l),g="item_"+r.name+"_"+s;this._showormove(u,function(){this._showtooltipcontent(u,f,d,g,t.offsetx,t.offsety,t.position,t.target)}),i({type:"showtip",dataindexinside:s,dataindex:h.getrawindex(s),seriesindex:o,from:this.uid})}},_showcomponentitemtooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new lo(n,this._tooltipmodel,this._ecmodel),r=a.get("content"),s=math.random();this._showormove(a,function(){this._showtooltipcontent(a,r,a.get("formatterparams")||{},s,t.offsetx,t.offsety,t.position,e)}),i({type:"showtip",from:this.uid})},_showtooltipcontent:function(t,e,i,n,o,a,r,s){if(this._ticket="",t.get("showcontent")&&t.get("show")){var l=this._tooltipcontent,h=t.get("formatter");r=r||t.get("position");var u=e;if(h&&"string"==typeof h)u=wi(h,i,!0);else if("function"==typeof h){var c=cc(function(e,n){e===this._ticket&&(l.setcontent(n),this._updateposition(t,r,o,a,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setcontent(u),l.show(t),this._updateposition(t,r,o,a,l,i,s)}},_updateposition:function(t,e,i,n,o,a,r){var s=this._api.getwidth(),l=this._api.getheight();e=e||t.get("position");var h=o.getsize(),u=t.get("align"),c=t.get("verticalalign"),d=r&&r.getboundingrect().clone();if(r&&d.applytransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewsize:[s,l],contentsize:h.slice()})),y(e))i=lc(e[0],s),n=lc(e[1],l);else if(b(e)){e.width=h[0],e.height=h[1];var f=ko(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else"string"==typeof e&&r?(i=(g=og(e,d,h))[0],n=g[1]):(i=(g=lg(i,n,o.el,s,l,u?null:20,c?null:20))[0],n=g[1]);if(u&&(i-=zg(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=zg(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var g=kg(i,n,o.el,s,l);i=g[0],n=g[1]}o.moveto(i,n)},_updatecontentnotchangedonaxis:function(t){var e=this._lastdatabycoordsys,i=!!e&&e.length===t.length;return i&&dc(e,function(e,n){var o=e.databyaxis||{},a=(t[n]||{}).databyaxis||[];(i&=o.length===a.length)&&dc(o,function(t,e){var n=a[e]||{},o=t.seriesdataindices||[],r=n.seriesdataindices||[];(i&=t.value===n.value&&t.axistype===n.axistype&&t.axisid===n.axisid&&o.length===r.length)&&dc(o,function(t,e){var n=r[e];i&=t.seriesindex===n.seriesindex&&t.dataindex===n.dataindex})})}),this._lastdatabycoordsys=t,!!i},_hide:function(t){this._lastdatabycoordsys=null,t({type:"hidetip",from:this.uid})},dispose:function(t,e){uv.node||(this._tooltipcontent.hide(),tf("itemtooltip",e))}}),ir({type:"showtip",event:"showtip",update:"tooltip:manuallyshowtip"},function(){}),ir({type:"hidetip",event:"hidetip",update:"tooltip:manuallyhidetip"},function(){}),vg.prototype={constructor:vg,pointtodata:function(t,e){return this.polar.pointtodata(t,e)["radius"===this.dim?0:1]},datatoradius:us.prototype.datatocoord,radiustodata:us.prototype.coordtodata},h(vg,us),bg.prototype={constructor:bg,pointtodata:function(t,e){return this.polar.pointtodata(t,e)["radius"===this.dim?0:1]},datatoangle:us.prototype.datatocoord,angletodata:us.prototype.coordtodata},h(bg,us);var pc=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusaxis=new vg,this._angleaxis=new bg,this._radiusaxis.polar=this._angleaxis.polar=this};pc.prototype={type:"polar",axispointerenabled:!0,constructor:pc,dimensions:["radius","angle"],model:null,containpoint:function(t){var e=this.pointtocoord(t);return this._radiusaxis.contain(e[0])&&this._angleaxis.contain(e[1])},containdata:function(t){return this._radiusaxis.containdata(t[0])&&this._angleaxis.containdata(t[1])},getaxis:function(t){return this["_"+t+"axis"]},getaxes:function(){return[this._radiusaxis,this._angleaxis]},getaxesbyscale:function(t){var e=[],i=this._angleaxis,n=this._radiusaxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getangleaxis:function(){return this._angleaxis},getradiusaxis:function(){return this._radiusaxis},getotheraxis:function(t){var e=this._angleaxis;return t===e?this._radiusaxis:e},getbaseaxis:function(){return this.getaxesbyscale("ordinal")[0]||this.getaxesbyscale("time")[0]||this.getangleaxis()},gettooltipaxes:function(t){var e=null!=t&&"auto"!==t?this.getaxis(t):this.getbaseaxis();return{baseaxes:[e],otheraxes:[this.getotheraxis(e)]}},datatopoint:function(t,e){return this.coordtopoint([this._radiusaxis.datatoradius(t[0],e),this._angleaxis.datatoangle(t[1],e)])},pointtodata:function(t,e){var i=this.pointtocoord(t);return[this._radiusaxis.radiustodata(i[0],e),this._angleaxis.angletodata(i[1],e)]},pointtocoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getangleaxis(),o=n.getextent(),a=math.min(o[0],o[1]),r=math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=math.atan2(-i,e)/math.pi*180,h=lr;)l+=360*h;return[s,l]},coordtopoint:function(t){var e=t[0],i=t[1]/180*math.pi;return[math.cos(i)*e+this.cx,-math.sin(i)*e+this.cy]}};var oc=ub.extend({type:"polaraxis",axis:null,getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"polar",index:this.option.polarindex,id:this.option.polarid})[0]}});n(oc.prototype,zs);var zc={angle:{startangle:90,clockwise:!0,splitnumber:12,axislabel:{rotate:!1}},radius:{splitnumber:5}};_m("angle",oc,gg,zc.angle),_m("radius",oc,gg,zc.radius),sr({type:"polar",dependencies:["polaraxis","angleaxis"],coordinatesystem:null,findaxismodel:function(t){var e;return this.ecmodel.eachcomponent(t,function(t){t.getcoordsysmodel()===this&&(e=t)},this),e},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var nc={dimensions:pc.prototype.dimensions,create:function(t,e){var i=[];return t.eachcomponent("polar",function(t,n){var o=new pc(n);o.update=hg;var a=o.getradiusaxis(),r=o.getangleaxis(),s=t.findaxismodel("radiusaxis"),l=t.findaxismodel("angleaxis");fg(a,s),fg(r,l),wg(o,t,e),i.push(o),t.coordinatesystem=o,o.model=t}),t.eachseries(function(e){if("polar"===e.get("coordinatesystem")){var i=t.querycomponents({maintype:"polar",index:e.get("polarindex"),id:e.get("polarid")})[0];e.coordinatesystem=i.coordinatesystem}}),i}};ua.register("polar",nc);var ec=["axisline","axislabel","axistick","splitline","splitarea"];em.extend({type:"angleaxis",axispointerclass:"polaraxispointer",render:function(t,e){if(this.group.removeall(),t.get("show")){var i=t.axis,n=i.polar,o=n.getradiusaxis().getextent(),a=i.gettickscoords();"category"!==i.type&&a.pop(),d(ec,function(e){!t.get(e+".show")||i.scale.isblank()&&"axisline"!==e||this["_"+e](t,n,a,o)},this)}},_axisline:function(t,e,i,n){var o=t.getmodel("axisline.linestyle"),a=new nb({shape:{cx:e.cx,cy:e.cy,r:n[ug(e)]},style:o.getlinestyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axistick:function(t,e,i,n){var o=t.getmodel("axistick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[ug(e)],l=f(i,function(t){return new fb({shape:zg(e,[s,s+a],t)})});this.group.add(ib(l,{style:r(o.getmodel("linestyle").getlinestyle(),{stroke:t.get("axisline.linestyle.color")})}))},_axislabel:function(t,e,i,n){for(var o=t.axis,a=t.get("data"),r=t.getmodel("axislabel"),s=t.getformattedlabels(),l=r.get("margin"),h=o.getlabelscoords(),u=0;uf?"left":"right",m=math.abs(d[1]-g)/c<.3?"middle":d[1]>g?"top":"bottom";a&&a[u]&&a[u].textstyle&&(r=new lo(a[u].textstyle,r,r.ecmodel));var v=new ib({silent:!0});this.group.add(v),fo(v.style,r,{x:d[0],y:d[1],textfill:r.gettextcolor()||t.get("axisline.linestyle.color"),text:s[u],textalign:p,textverticalalign:m})}},_splitline:function(t,e,i,n){var o=t.getmodel("splitline").getmodel("linestyle"),a=o.get("color"),s=0;a=a instanceof array?a:[a];for(var l=[],h=0;h=0?"p":"n",s=i.pointtocoord(m[n]),i=r[u][n][p];if("radius"===g.dim)o=i,s=s[0],c=(h=(-s[1]+d)*math.pi/180)+f*math.pi/180,math.abs(s)0?c=a[1]:c===a[1]&&t<0&&(c=a[0]),r[u][n][p]=c}e.setitemlayout(n,{cx:m,cy:v,r0:o,r:s,startangle:h,endangle:c})}},!0)}},this)},"bar")),lr({type:"polar"}),u(ub.extend({type:"geo",coordinatesystem:null,layoutmode:"box",init:function(t){ub.prototype.init.apply(this,arguments),zo(t.label,["show"])},optionupdated:function(){var t=this.option,e=this;t.regions=xi.getfilledregions(t.regions,t.map,t.namemap),this._optionmodelmap=g(t.regions||[],function(t,i){return i.name&&t.set(i.name,new lo(i,e)),t},z()),this.updateselectedmap(t.regions)},defaultoption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectscale:.75,silent:!1,map:"",boundingcoords:null,center:null,zoom:1,scalelimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemstyle:{normal:{borderwidth:.5,bordercolor:"#444",color:"#eee"},emphasis:{color:"rgba(255,215,0,0.8)"}},regions:[]},getregionmodel:function(t){return this._optionmodelmap.get(t)||new lo(null,this,this.ecmodel)},getformattedlabel:function(t,e){var i=this.getregionmodel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t}}),$m),lr({type:"geo",init:function(t,e){var i=new ul(e,!0);this._mapdraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geotoggleselect"!==n.type||n.from!==this.uid){var o=this._mapdraw;t.get("show")?o.draw(t,e,i,this,n):this._mapdraw.group.removeall(),this.group.silent=t.get("silent")}},dispose:function(){this._mapdraw&&this._mapdraw.remove()}}),qg("toggleselected",{type:"geotoggleselect",event:"geoselectchanged"}),qg("select",{type:"geoselect",event:"geoselected"}),qg("unselect",{type:"geounselect",event:"geounselected"});var wc=["rect","polygon","keep","clear"],hc=d,fc={linex:tp(0),liney:tp(1),rect:{point:function(t,e,i){return t&&i.boundingrect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingrect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingrect.contain(t[0],t[1])&&ur(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return!!(ur(n,o,a)||ur(n,o+r,a)||ur(n,o,a+s)||ur(n,o+r,a+s)||jt.create(t).contain(l[0],l[1])||ip(o,a,o+r,a,n)||ip(o,a,o,a+s,n)||ip(o+r,a,o+r,a+s,n)||ip(o,a+s,o+r,a+s,n))||void 0}}},zc=d,uc=l,xc=v,jc=["datatopoint","pointtodata"],qc=["grid","xaxis","yaxis","geo","graph","polar","radiusaxis","angleaxis","bmap"],yc=rp.prototype;yc.setoutputranges=function(t,e){this.matchoutputranges(t,e,function(t,e,i){if((t.coordranges||(t.coordranges=[])).push(e),!t.coordrange){t.coordrange=e;var n=qc[t.brushtype](0,i,e);t.__rangeoffset={offset:td[t.brushtype](n.values,t.range,[1,1]),xyminmax:n.xyminmax}}})},yc.matchoutputranges=function(t,e,i){zc(t,function(t){var n=this.findtargetinfo(t,e);n&&!0!==n&&d(n.coordsyses,function(n){var o=qc[t.brushtype](1,n,t.range);i(t,o.values,n,e)})},this)},yc.setinputranges=function(t,e){zc(t,function(t){var i=this.findtargetinfo(t,e);if(t.range=t.range||[],i&&!0!==i){t.panelid=i.panelid;var n=qc[t.brushtype](0,i.coordsys,t.coordrange),o=t.__rangeoffset;t.range=o?td[t.brushtype](n.values,o.offset,cp(n.xyminmax,o.xyminmax)):n.values}},this)},yc.makepanelopts=function(t,e){return f(this._targetinfolist,function(i){var n=i.getpanelrect();return{panelid:i.panelid,defaultbrushtype:e&&e(i),clippath:lc(n),istargetbycursor:pc(n,t,i.coordsysmodel),getlinearbrushotherextent:kc(n)}})},yc.controlseries=function(t,e,i){var n=this.findtargetinfo(t,i);return!0===n||n&&uc(n.coordsyses,e.coordinatesystem)>=0},yc.findtargetinfo=function(t,e){for(var i=this._targetinfolist,n=lp(e,t),o=0;o=0||uc(n,t.getaxis("y").model)>=0)&&a.push(t)}),e.push({panelid:"grid--"+t.id,gridmodel:t,coordsysmodel:t,coordsys:a[0],coordsyses:a,getpanelrect:jc.grid,xaxisdeclared:r[t.id],yaxisdeclared:s[t.id]})}))},geo:function(t,e){zc(t.geomodels,function(t){var i=t.coordinatesystem;e.push({panelid:"geo--"+t.id,geomodel:t,coordsysmodel:t,coordsys:i,coordsyses:[i],getpanelrect:jc.geo})})}},kc=[function(t,e){var i=t.xaxismodel,n=t.yaxismodel,o=t.gridmodel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridmodel},function(t,e){var i=t.geomodel;return i&&i===e.geomodel}],jc={grid:function(){return this.coordsys.grid.getrect().clone()},geo:function(){var t=this.coordsys,e=t.getboundingrect().clone();return e.applytransform(mo(t)),e}},qc={linex:xc(hp,0),liney:xc(hp,1),rect:function(t,e,i){var n=e[jc[t]]([i[0][0],i[1][0]]),o=e[jc[t]]([i[0][1],i[1][1]]),a=[sp([n[0],o[0]]),sp([n[1],o[1]])];return{values:a,xyminmax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[jc[t]](i);return n[0][0]=math.min(n[0][0],o[0]),n[1][0]=math.min(n[1][0],o[1]),n[0][1]=math.max(n[0][1],o[0]),n[1][1]=math.max(n[1][1],o[1]),o}),xyminmax:n}}},td={linex:xc(up,0),liney:xc(up,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},ed=["inbrush","outofbrush"],id="__ecbrushselect",nd="__ecinbrushselectevent",od=pw.visual.brush;or(od,function(t,e,i){t.eachcomponent({maintype:"brush"},function(e){i&&"takeglobalcursor"===i.type&&e.setbrushoption("brush"===i.key?i.brushoption:{brushtype:!1}),(e.brushtargetmanager=new rp(e.option,t)).setinputranges(e.areas,t)})}),ar(od,function(t,e,n){var o,a,s=[];t.eachcomponent({maintype:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function h(t){return!!t.length}function u(t,e){var i=t.coordinatesystem;b|=i.hasaxisbrushed(),l(e)&&i.eachactivestate(t.getdata(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=mp(i);if(a&&!vp(e,n)&&(d(w,function(n){a[n.brushtype]&&e.brushtargetmanager.controlseries(n,i,t)&&o.push(n),b|=h(o)}),l(n)&&h(o))){var r=i.getdata();r.each(function(t){pp(a,o,r,t)&&(x[t]=1)})}}var g={brushid:e.id,brushindex:n,brushname:e.name,areas:i(e.areas),selected:[]};s.push(g);var p=e.option,m=p.brushlink,v=[],x=[],_=[],b=0;n||(o=p.throttletype,a=p.throttledelay);var w=f(e.areas,function(t){return yp(r({boundingrect:ad[t.brushtype](t)},t))}),s=kg(e.option,ed,function(t){t.mappingmethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachseries(function(t,e){var i=_[e]=[];"parallel"===t.subtype?u(t,e):c(t,e,i)}),t.eachseries(function(t,e){var i={seriesid:t.id,seriesindex:e,seriesname:t.name,dataindex:[]};g.selected.push(i);var n=mp(t),o=_[e],a=t.getdata(),r=l(e)?function(t){return x[t]?(i.dataindex.push(a.getrawindex(t)),"inbrush"):"outofbrush"}:function(t){return pp(n,o,a,t)?(i.dataindex.push(a.getrawindex(t)),"inbrush"):"outofbrush"};(l(e)?b:h(o))&&qg(ed,s,a,r)})}),fp(e,o,a,s,n)});var ad={linex:n,liney:n,rect:function(t){return xp(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&xp(e)}},rd=["#ddd"];sr({type:"brush",dependencies:["geo","grid","xaxis","yaxis","parallel","series"],defaultoption:{toolbox:null,brushlink:null,seriesindex:"all",geoindex:null,xaxisindex:null,yaxisindex:null,brushtype:"rect",brushmode:"single",transformable:!0,brushstyle:{borderwidth:1,color:"rgba(120,140,180,0.3)",bordercolor:"rgba(120,140,180,0.8)"},throttletype:"fixrate",throttledelay:0,removeonclick:!0,z:1e4},areas:[],brushtype:null,brushoption:{},coordinfolist:[],optionupdated:function(t,e){var i=this.option;!e&&jg(i,t,["inbrush","outofbrush"]),i.inbrush=i.inbrush||{},i.outofbrush=i.outofbrush||{color:rd}},setareas:function(t){t&&(this.areas=f(t,function(t){return _p(this.option,t)},this))},setbrushoption:function(t){this.brushoption=_p(this.option,t),this.brushtype=this.brushoption.brushtype}});lr({type:"brush",init:function(t,e){this.ecmodel=t,this.api=e,this.model,(this._brushcontroller=new yu(e.getzr())).on("brush",m(this._onbrush,this)).mount()},render:function(t){return this.model=t,bp.apply(this,arguments)},updateview:bp,updatelayout:bp,updatevisual:bp,dispose:function(){this._brushcontroller.dispose()},_onbrush:function(t,e){var n=this.model.id;this.model.brushtargetmanager.setoutputranges(t,this.ecmodel),(!e.isend||e.removeonclick)&&this.api.dispatchaction({type:"brush",brushid:n,areas:i(t),$from:n})}}),ir({type:"brush",event:"brush",update:"updateview"},function(t,e){e.eachcomponent({maintype:"brush",query:t},function(e){e.setareas(t.areas)})}),ir({type:"brushselect",event:"brushselected",update:"none"},function(){});var sd={},ld={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",linex:"横向选择",liney:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataview:{title:"数据视图",lang:["数据视图","关闭","刷新"]},datazoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magictype:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveasimage:{title:"保存为图片",lang:["右键另存为图片"]}}},hd=ld.toolbox.brush;mp.defaultoption={show:!0,type:["rect","polygon","linex","liney","keep","clear"],icon:{rect:"m7.3,34.7 m0.4,10v-0.2h9.8 m89.6,10v-0.2h-9.8 m0.4,60v10.2h9.8 m89.6,60v10.2h-9.8 m12.3,22.4v10.5h13.1 m33.6,10.5h7.8 m49.1,10.5h7.8 m77.5,22.4v10.5h-13 m12.3,31.1v8.2 m77.7,31.1v8.2 m12.3,47.6v11.9h13.1 m33.6,59.5h7.6 m49.1,59.5 h7.7 m77.5,47.6v11.9h-13",polygon:"m55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1s53.5,34.9,55.2,34.9z m50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 c47.3,52.4,48.7,51,50.4,51z m55.6,37.1l1.5-7.8 m60.1,13.5l1.6-8.7l-7.8,4 m59,19l-1,5.3 m24,16.1l6.4,4.9l6.4-3.3 m48.5,11.6 l-5.9,3.1 m19.1,12.8l9.7,5.1l1.1,7.7 m13.4,29.8l1,7.3l6.6,1.6 m11.6,18.4l1,6.1 m32.8,41.9 m26.6,40.4 m27.3,40.2l6.1,1.6 m49.9,52.1l-5.6-7.6l-4.9-1.2",linex:"m15.2,30 m19.7,15.6v1.9h29 m34.8,1.9h40.4 m55.3,15.6v1.9h45.9 m19.7,44.4v58.1h29 m34.8,58.1h40.4 m55.3,44.4 v58.1h45.9 m12.5,20.3l-9.4,9.6l9.6,9.8 m3.1,29.9h16.5 m62.5,20.3l9.4,9.6l62.3,39.7 m71.9,29.9h55.4",liney:"m38.8,7.7 m52.7,12h13.2v9 m65.9,26.6v32 m52.7,46.3h13.2v-9 m24.9,12h11.8v9 m11.8,26.6v32 m24.9,46.3h11.8v-9 m48.2,5.1l-9.3-9l-9.4,9.2 m38.9-3.9v12 m48.2,53.3l-9.3,9l-9.4-9.2 m38.9,62.3v46.4",keep:"m4,10.5v1h10.3 m20.7,1h6.1 m33,1h6.1 m55.4,10.5v1h45.2 m4,17.3v6.6 m55.6,17.3v6.6 m4,30.5v40h10.3 m20.7,40 h6.1 m33,40h6.1 m55.4,30.5v40h45.2 m21,18.9h62.9v48.6h21v18.9z",clear:"m22,14.7l30.9,31 m52.9,14.7l22,45.7 m4.7,16.8v4.2h13.1 m26,4.2h7.8 m41.6,4.2h7.8 m70.3,16.8v4.2h57.2 m4.7,25.9v8.6 m70.3,25.9v8.6 m4.7,43.2v12.6h13.1 m26,55.8h7.8 m41.6,55.8h7.8 m70.3,43.2v12.6h57.2"},title:i(hd.title)};var ud=mp.prototype;ud.render=ud.updateview=ud.updatelayout=function(t,e,i){var n,o,a;e.eachcomponent({maintype:"brush"},function(t){n=t.brushtype,o=t.brushoption.brushmode||"single",a|=t.areas.length}),this._brushtype=n,this._brushmode=o,d(t.get("type",!0),function(e){t.seticonstatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},ud.geticons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},ud.onclick=function(t,e,i){var n=this._brushtype,o=this._brushmode;"clear"===i?(e.dispatchaction({type:"axisareaselect",intervals:[]}),e.dispatchaction({type:"brush",command:"clear",areas:[]})):e.dispatchaction({type:"takeglobalcursor",key:"brush",brushoption:{brushtype:"keep"===i?n:n!==i&&i,brushmode:"keep"===i?"multiple"===o?"single":"multiple":o}})},wp("brush",mp),tr(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasownproperty("toolbox")?t.toolbox:[];e instanceof array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),yg(s),e&&!s.length&&s.push.apply(s,wc)}});ip.prototype={constructor:ip,type:"calendar",dimensions:["time","value"],getdimensionsinfo:function(){return[{name:"time",type:"time"}]},getrangeinfo:function(){return this._rangeinfo},getmodel:function(){return this._model},getrect:function(){return this._rect},getcellwidth:function(){return this._sw},getcellheight:function(){return this._sh},getorient:function(){return this._orient},getfirstdayofweek:function(){return this._firstdayofweek},getdateinfo:function(t){var e=(t=pi(t)).getfullyear(),i=t.getmonth()+1;i=i<10?"0"+i:i;var n=t.getdate();n=n<10?"0"+n:n;var o=t.getday();return o=math.abs((o+7-this.getfirstdayofweek())%7),{y:e,m:i,d:n,day:o,time:t.gettime(),formateddate:e+"-"+i+"-"+n,date:t}},getnextnday:function(t,e){return 0===(e=e||0)?this.getdateinfo(t):((t=new date(this.getdateinfo(t).time)).setdate(t.getdate()+e),this.getdateinfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstdayofweek=+this._model.getmodel("daylabel").get("firstday"),this._orient=this._model.get("orient"),this._linewidth=this._model.getmodel("itemstyle.normal").getitemstyle().linewidth||0,this._rangeinfo=this._getrangeinfo(this._initrangeoption());var n=this._rangeinfo.weeks||1,o=["width","height"],a=this._model.get("cellsize").slice(),r=this._model.getboxlayoutparams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getwidth(),height:e.getheight()},h=this._rect=ko(r,l);d([0,1],function(t){i(a,t)||(a[t]=h[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},datatopoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getdateinfo(t),n=this._rangeinfo,o=i.formateddate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[nan,nan];var a=i.day,r=this._getrangeinfo([n.start.time,o]).nthweek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointtodata:function(t){var e=this.pointtodate(t);return e&&e.time},datatorect:function(t,e){var i=this.datatopoint(t,e);return{contentshape:{x:i[0]-(this._sw-this._linewidth)/2,y:i[1]-(this._sh-this._linewidth)/2,width:this._sw-this._linewidth,height:this._sh-this._linewidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointtodate:function(t){var e=math.floor((t[0]-this._rect.x)/this._sw)+1,i=math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeinfo.range;return"vertical"===this._orient?this._getdatebyweeksandday(i,e-1,n):this._getdatebyweeksandday(e,i-1,n)},converttopixel:v(tp,"datatopoint"),convertfrompixel:v(tp,"pointtodata"),_initrangeoption:function(){var t=this._model.get("range"),e=t;if(y(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getdateinfo(e),n=i.date;n.setmonth(n.getmonth()+1);var o=this.getnextnday(n,-1);t=[i.formateddate,o.formateddate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getrangeinfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getrangeinfo:function(t){var e;(t=[this.getdateinfo(t[0]),this.getdateinfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=math.floor(t[1].time/864e5)-math.floor(t[0].time/864e5)+1,n=new date(t[0].time),o=n.getdate(),a=t[1].date.getdate();if(n.setdate(o+i-1),n.getdate()!==a)for(var r=n.gettime()-t[1].time>0?1:-1;n.getdate()!==a&&(n.gettime()-t[1].time)*r>0;)i-=r,n.setdate(o+i-1);var s=math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formateddate,t[1].formateddate],start:t[0],end:t[1],allday:i,weeks:s,nthweek:l,fweek:t[0].day,lweek:t[1].day}},_getdatebyweeksandday:function(t,e,i){var n=this._getrangeinfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new date(n.start.time);return a.setdate(n.start.d+o),this.getdateinfo(a)}},ip.dimensions=ip.prototype.dimensions,ip.getdimensionsinfo=ip.prototype.getdimensionsinfo,ip.create=function(t,e){var i=[];return t.eachcomponent("calendar",function(n){var o=new ip(n,t,e);i.push(o),n.coordinatesystem=o}),t.eachseries(function(t){"calendar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("calendarindex")||0])}),i},ua.register("calendar",ip);var cd=ub.extend({type:"calendar",coordinatesystem:null,defaultoption:{zlevel:0,z:2,left:80,top:60,cellsize:20,orient:"horizontal",splitline:{show:!0,linestyle:{color:"#000",width:1,type:"solid"}},itemstyle:{normal:{color:"#fff",borderwidth:1,bordercolor:"#ccc"}},daylabel:{show:!0,firstday:0,position:"start",margin:"50%",namemap:"en",color:"#000"},monthlabel:{show:!0,position:"start",margin:5,align:"center",namemap:"en",formatter:null,color:"#000"},yearlabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontfamily:"sans-serif",fontweight:"bolder",fontsize:20}},init:function(t,e,i,n){var o=ea(t);cd.superapply(this,"init",arguments),ap(t,o)},mergeoption:function(t,e){cd.superapply(this,"mergeoption",arguments),ap(this.option,t)}}),dd={en:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},fd={en:["s","m","t","w","t","f","s"],cn:["日","一","二","三","四","五","六"]};lr({type:"calendar",_tlpoints:null,_blpoints:null,_firstdayofmonth:null,_firstdaypoints:null,render:function(t,e,i){var n=this.group;n.removeall();var o=t.coordinatesystem,a=o.getrangeinfo(),r=o.getorient();this._renderdayrect(t,a,n),this._renderlines(t,a,r,n),this._renderyeartext(t,a,r,n),this._rendermonthtext(t,r,n),this._renderweektext(t,a,r,n)},_renderdayrect:function(t,e,i){for(var n=t.coordinatesystem,o=t.getmodel("itemstyle.normal").getitemstyle(),a=n.getcellwidth(),r=n.getcellheight(),s=e.start.time;s<=e.end.time;s=n.getnextnday(s,1).time){var l=n.datatorect([s],!1).tl,h=new db({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(h)}},_renderlines:function(t,e,i,n){function o(e){a._firstdayofmonth.push(r.getdateinfo(e)),a._firstdaypoints.push(r.datatorect([e],!1).tl);var o=a._getlinepointsofoneweek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawsplitline(o,s,n)}var a=this,r=t.coordinatesystem,s=t.getmodel("splitline.linestyle").getlinestyle(),l=t.get("splitline.show"),h=s.linewidth;this._tlpoints=[],this._blpoints=[],this._firstdayofmonth=[],this._firstdaypoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){o(u.formateddate),0===c&&(u=r.getdateinfo(e.start.y+"-"+e.start.m));var d=u.date;d.setmonth(d.getmonth()+1),u=r.getdateinfo(d)}o(r.getnextnday(e.end.time,1).formateddate),l&&this._drawsplitline(a._getedgespoints(a._tlpoints,h,i),s,n),l&&this._drawsplitline(a._getedgespoints(a._blpoints,h,i),s,n)},_getedgespoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawsplitline:function(t,e,i){var n=new cb({z2:20,shape:{points:t},style:e});i.add(n)},_getlinepointsofoneweek:function(t,e,i){var n=t.coordinatesystem;e=n.getdateinfo(e);for(var o=[],a=0;a<7;a++){var r=n.getnextnday(e.time,a),s=n.datatorect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterlabel:function(t,e){return"string"==typeof t&&t?hi(t,e):"function"==typeof t?t(e):e.namemap},_yeartextpositioncontrol:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=math.pi/2),{rotation:r,position:e,style:{textalign:a[0],textverticalalign:a[1]}}},_renderyeartext:function(t,e,i,n){var o=t.getmodel("yearlabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),g={start:e.start.y,end:e.end.y,namemap:d},p=this._formatterlabel(f,g),m=new ib({z2:30});fo(m.style,o,{text:p}),m.attr(this._yeartextpositioncontrol(m,c[r],i,r,a)),n.add(m)}},_monthtextpositioncontrol:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textalign:a,textverticalalign:r}},_rendermonthtext:function(t,e,i){var n=t.getmodel("monthlabel");if(n.get("show")){var o=n.get("namemap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),h=[this._tlpoints,this._blpoints];_(o)&&(o=dd[o.touppercase()]||[]);var u="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f=a[0]&&t<=a[1]}if(t===this._datazoommodel){var i=this._dimname,n=this.gettargetseriesmodels(),o=t.get("filtermode"),a=this._valuewindow;if("none"!==o){var r=this.getotheraxismodel();t.get("$fromtoolbox")&&r&&"category"===r.get("type")&&(o="empty"),md(n,function(t){var n=t.getdata(),r=t.coorddimtodatadim(i);"weakfilter"===o?n&&n.filterself(function(t){for(var e,i,o,s=0;sa[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(e=!0),c&&(i=!0)}return o&&e&&i}):n&&md(r,function(i){"empty"===o?t.setdata(n.map(i,function(t){return e(t)?t:nan})):n.filterself(i,e)})})}}}};var xd=d,_d=pd,bd=sr({type:"datazoom",dependencies:["xaxis","yaxis","zaxis","radiusaxis","angleaxis","singleaxis","series"],defaultoption:{zlevel:0,z:4,orient:null,xaxisindex:null,yaxisindex:null,filtermode:"filter",throttle:null,start:0,end:100,startvalue:null,endvalue:null,minspan:null,maxspan:null,minvaluespan:null,maxvaluespan:null,rangemode:null},init:function(t,e,i){this._dataintervalbyaxis={},this._datainfo={},this._axisproxies={},this.textstylemodel,this._autothrottle=!0,this._rangepropmode=["percent","percent"];var n=zp(t);this.mergedefaultandtheme(t,i),this.doinit(n)},mergeoption:function(t){var e=zp(t);n(this.option,t,!0),this.doinit(e)},doinit:function(t){var e=this.option;uv.canvassupported||(e.realtime=!1),this._setdefaultthrottle(t),np(this,t),xd([["start","startvalue"],["end","endvalue"]],function(t,i){"value"===this._rangepropmode[i]&&(e[t[0]]=null)},this),this.textstylemodel=this.getmodel("textstyle"),this._resettarget(),this._giveaxisproxies()},_giveaxisproxies:function(){var t=this._axisproxies;this.eachtargetaxis(function(e,i,n,o){var a=this.dependentmodels[e.axis][i],r=a.__dzaxisproxy||(a.__dzaxisproxy=new yd(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resettarget:function(){var t=this.option,e=this._judgeautomode();_d(function(e){var i=e.axisindex;t[i]=oo(t[i])},this),"axisindex"===e?this._autosetaxisindex():"orient"===e&&this._autosetorient()},_judgeautomode:function(){var t=this.option,e=!1;_d(function(i){null!=t[i.axisindex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisindex")},_autosetaxisindex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentmodels;if(t){var o="vertical"===e?"y":"x";n[o+"axis"].length?(i[o+"axisindex"]=[0],t=!1):xd(n.singleaxis,function(n){t&&n.get("orient",!0)===e&&(i.singleaxisindex=[n.componentindex],t=!1)})}t&&_d(function(e){if(t){var n=[],o=this.dependentmodels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a0?100:20}},getfirsttargetaxismodel:function(){var t;return _d(function(e){if(null==t){var i=this.get(e.axisindex);i.length&&(t=this.dependentmodels[e.axis][i[0]])}},this),t},eachtargetaxis:function(t,e){var i=this.ecmodel;_d(function(n){xd(this.get(n.axisindex),function(o){t.call(e,n,o,this,i)},this)},this)},getaxisproxy:function(t,e){return this._axisproxies[t+"_"+e]},getaxismodel:function(t,e){var i=this.getaxisproxy(t,e);return i&&i.getaxismodel()},setrawrange:function(t,e){var i=this.option;xd([["start","startvalue"],["end","endvalue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&np(this,t)},getpercentrange:function(){var t=this.findrepresentativeaxisproxy();if(t)return t.getdatapercentwindow()},getvaluerange:function(t,e){if(null!=t||null!=e)return this.getaxisproxy(t,e).getdatavaluewindow();var i=this.findrepresentativeaxisproxy();return i?i.getdatavaluewindow():void 0},findrepresentativeaxisproxy:function(t){if(t)return t.__dzaxisproxy;var e=this._axisproxies;for(var i in e)if(e.hasownproperty(i)&&e[i].hostedby(this))return e[i];for(var i in e)if(e.hasownproperty(i)&&!e[i].hostedby(this))return e[i]},getrangepropmode:function(){return this._rangepropmode.slice()}}),wd=xw.extend({type:"datazoom",render:function(t,e,i,n){this.datazoommodel=t,this.ecmodel=e,this.api=i},gettargetcoordinfo:function(){function t(t,e,i,n){for(var o,a=0;a0&&e%p)g+=f;else{var i=null==t||isnan(t)||""===t,n=i?0:md(t,a,h,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([g,0]),d.push([g,0])),c.push([g,n]),d.push([g,n]),g+=f,l=i}});var m=this.datazoommodel;this._displayables.bargroup.add(new ub({shape:{points:c},style:r({fill:m.get("databackgroundcolor")},m.getmodel("databackground.areastyle").getareastyle()),silent:!0,z2:-20})),this._displayables.bargroup.add(new cb({shape:{points:d},style:m.getmodel("databackground.linestyle").getlinestyle(),silent:!0,z2:-19}))}}},_preparedatashadowinfo:function(){var t=this.datazoommodel,e=t.get("showdatashadow");if(!1!==e){var i,n=this.ecmodel;return t.eachtargetaxis(function(o,a){d(t.getaxisproxy(o.name,a).gettargetseriesmodels(),function(t){if(!(i||!0!==e&&l(ld,t.get("type"))<0)){var r,s=n.getcomponent(o.axis,a).axis,h=ep(o.name),u=t.coordinatesystem;null!=h&&u.getotheraxis&&(r=u.getotheraxis(s).inverse),i={thisaxis:s,series:t,thisdim:o.name,otherdim:h,otheraxisinverse:r}}},this)},this),i}},_renderhandle:function(){var t=this._displayables,e=t.handles=[],i=t.handlelabels=[],n=this._displayables.bargroup,o=this._size,a=this.datazoommodel;n.add(t.filler=new sd({draggable:!0,cursor:rp(this._orient),drift:td(this._ondragmove,this,"all"),onmousemove:function(t){bx(t.event)},ondragstart:td(this._showdatainfo,this,!0),ondragend:td(this._ondragend,this),onmouseover:td(this._showdatainfo,this,!0),onmouseout:td(this._showdatainfo,this,!1),style:{fill:a.get("fillercolor"),textposition:"inside"}})),n.add(new sd($n({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("databackgroundcolor")||a.get("bordercolor"),linewidth:1,fill:"rgba(0,0,0,0)"}}))),ad([0,1],function(t){var o=do(a.get("handleicon"),{cursor:rp(this._orient),draggable:!0,drift:td(this._ondragmove,this,t),onmousemove:function(t){bx(t.event)},ondragend:td(this._ondragend,this),onmouseover:td(this._showdatainfo,this,!0),onmouseout:td(this._showdatainfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getboundingrect();this._handleheight=si(a.get("handlesize"),this._size[1]),this._handlewidth=r.width/r.height*this._handleheight,o.setstyle(a.getmodel("handlestyle").getitemstyle());var s=a.get("handlecolor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textstylemodel;this.group.add(i[t]=new ib({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textverticalalign:"middle",textalign:"center",textfill:l.gettextcolor(),textfont:l.getfont()},z2:10}))},this)},_resetinterval:function(){var t=this._range=this.datazoommodel.getpercentrange(),e=this._getviewextent();this._handleends=[md(t[0],[0,100],e,!0),md(t[1],[0,100],e,!0)]},_updateinterval:function(t,e){var i=this.datazoommodel,n=this._handleends,o=this._getviewextent(),a=i.findrepresentativeaxisproxy().getminmaxspan(),r=[0,100];ot(e,n,o,i.get("zoomlock")?"all":t,null!=a.minspan?md(a.minspan,r,o,!0):null,null!=a.maxspan?md(a.maxspan,r,o,!0):null),this._range=id([md(n[0],o,r,!0),md(n[1],o,r,!0)])},_updateview:function(t){var e=this._displayables,i=this._handleends,n=id(i.slice()),o=this._size;ad([0,1],function(t){var n=e.handles[t],a=this._handleheight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setshape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updatedatainfo(t)},_updatedatainfo:function(t){function e(t){var e=mo(n.handles[t].parent,this.group),i=to(0===t?"right":"left",e),s=this._handlewidth/2+dd,l=io([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setstyle({x:l[0],y:l[1],textverticalalign:a===cd?"middle":i,textalign:a===cd?i:"center",text:r[t]})}var i=this.datazoommodel,n=this._displayables,o=n.handlelabels,a=this._orient,r=["",""];if(i.get("showdetail")){var s=i.findrepresentativeaxisproxy();if(s){var l=s.getaxismodel().axis,h=this._range,u=t?s.calculatedatawindow({start:h[0],end:h[1]}).valuewindow:s.getdatavaluewindow();r=[this._formatlabel(u[0],l),this._formatlabel(u[1],l)]}}var c=id(this._handleends.slice());e.call(this,0),e.call(this,1)},_formatlabel:function(t,e){var i=this.datazoommodel,n=i.get("labelformatter"),o=i.get("labelprecision");null!=o&&"auto"!==o||(o=e.getpixelprecision());var a=null==t||isnan(t)?"":"category"===e.type||"time"===e.type?e.scale.getlabel(math.round(t)):t.tofixed(math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showdatainfo:function(t){t=this._dragging||t;var e=this._displayables.handlelabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_ondragmove:function(t,e,i){this._dragging=!0;var n=io([e,i],this._displayables.bargroup.getlocaltransform(),!0);this._updateinterval(t,n[0]);var o=this.datazoommodel.get("realtime");this._updateview(!o),o&&o&&this._dispatchzoomaction()},_ondragend:function(){this._dragging=!1,this._showdatainfo(!1),this._dispatchzoomaction()},_onclickpanelclick:function(t){var e=this._size,i=this._displayables.bargroup.transformcoordtolocal(t.offsetx,t.offsety);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleends,o=(n[0]+n[1])/2;this._updateinterval("all",i[0]-o),this._updateview(),this._dispatchzoomaction()}},_dispatchzoomaction:function(){var t=this._range;this.api.dispatchaction({type:"datazoom",from:this.uid,datazoomid:this.datazoommodel.id,start:t[0],end:t[1]})},_findcoordrect:function(){var t;if(ad(this.gettargetcoordinfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinatesystem;t=i.getrect&&i.getrect()}}),!t){var e=this.api.getwidth(),i=this.api.getheight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});bd.extend({type:"datazoom.inside",defaultoption:{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,preventdefaultmousemove:!0}});var pd=v,od="\0_ec_datazoom_roams",zd=m,nd=wd.extend({type:"datazoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){nd.superapply(this,"render",arguments),gp(n,t.id)&&(this._range=t.getpercentrange()),d(this.gettargetcoordinfo(),function(e,n){var o=f(e,function(t){return wp(t.model)});d(e,function(e){var a=e.model,r=t.option;vp(i,{coordid:wp(a),allcoordids:o,containspoint:function(t,e,i){return a.coordinatesystem.containpoint([e,i])},datazoomid:t.id,throttlerate:t.get("throttle",!0),pangetrange:zd(this._onpan,this,e,n),zoomgetrange:zd(this._onzoom,this,e,n),zoomlock:r.zoomlock,disabled:r.disabled,roamcontrolleropt:{zoomonmousewheel:r.zoomonmousewheel,moveonmousemove:r.moveonmousemove,preventdefaultmousemove:r.preventdefaultmousemove}})},this)},this)},dispose:function(){bp(this.api,this.datazoommodel.id),nd.superapply(this,"dispose",arguments),this._range=null},_onpan:function(t,e,i,n,o,a,r,s,l){var h=this._range.slice(),u=t.axismodels[0];if(u){var c=ed[e]([a,r],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixellength;return ot(d,h,[0,100],"all"),this._range=h}},_onzoom:function(t,e,i,n,o,a){var r=this._range.slice(),s=t.axismodels[0];if(s){var l=ed[e](null,[o,a],s,i,t),h=(l.signal>0?l.pixelstart+l.pixellength-l.pixel:l.pixel-l.pixelstart)/l.pixellength*(r[1]-r[0])+r[0];n=math.max(1/n,0),r[0]=(r[0]-h)*n+h,r[1]=(r[1]-h)*n+h;var u=this.datazoommodel.findrepresentativeaxisproxy().getminmaxspan();return ot(0,r,[0,100],0,u.minspan,u.maxspan),this._range=r}}}),ed={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinatesystem.getrect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixellength=s.width,r.pixelstart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixellength=s.height,r.pixelstart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinatesystem,l=s.getradiusaxis().getextent(),h=s.getangleaxis().getextent();return t=t?s.pointtocoord(t):[0,0],e=s.pointtocoord(e),"radiusaxis"===i.maintype?(r.pixel=e[0]-t[0],r.pixellength=l[1]-l[0],r.pixelstart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixellength=h[1]-h[0],r.pixelstart=h[0],r.signal=a.inverse?-1:1),r},singleaxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinatesystem.getrect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixellength=r.width,s.pixelstart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixellength=r.height,s.pixelstart=r.y,s.signal=a.inverse?-1:1),s}};er(function(t,e){t.eachcomponent("datazoom",function(t){t.eachtargetaxis($p),t.eachtargetaxis(kp)}),t.eachcomponent("datazoom",function(t){var e=t.findrepresentativeaxisproxy(),i=e.getdatapercentwindow(),n=e.getdatavaluewindow();t.setrawrange({start:i[0],end:i[1],startvalue:n[0],endvalue:n[1]},!0)})}),ir("datazoom",function(t,e){var i=dp(m(e.eachcomponent,e,"datazoom"),pd,function(t,e){return t.get(e.axisindex)}),n=[];e.eachcomponent({maintype:"datazoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setrawrange({start:t.start,end:t.end,startvalue:t.startvalue,endvalue:t.endvalue})})});var rd=d,vd=function(t){var e=t&&t.visualmap;y(e)||(e=e?[e]:[]),rd(e,function(t){if(t){jp(t,"splitlist")&&!jp(t,"pieces")&&(t.pieces=t.splitlist,delete t.splitlist);var e=t.pieces;e&&y(e)&&rd(e,function(t){b(t)&&(jp(t,"start")&&!jp(t,"min")&&(t.min=t.start),jp(t,"end")&&!jp(t,"max")&&(t.max=t.end))})}})};ub.registersubtypedefaulter("visualmap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitnumber>0)&&!t.calculable?"piecewise":"continuous"}),ar(pw.visual.component,function(t){t.eachcomponent("visualmap",function(t){qp(t)}),tm(t)});var bd={get:function(t,e,n){var o=i((gd[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},gd={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorhue:{active:[0,360],inactive:[0,0]},colorsaturation:{active:[.3,1],inactive:[0,0]},colorlightness:{active:[.9,.5],inactive:[0,0]},coloralpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundrect","diamond"],inactive:["none"]},symbolsize:{active:[10,50],inactive:[0,0]}},wd=ji.mapvisual,hd=ji.eachvisual,fd=y,zd=d,ud=ii,xd=wi,jd=n,qd=["#f6efa6","#d88273","#bf444c"],yd=sr({type:"visualmap",dependencies:["series"],statelist:["inrange","outofrange"],replacableoptionkeys:["inrange","outofrange","target","controller","color"],databound:[-1/0,1/0],layoutmode:{type:"box",ignoresize:!0},defaultoption:{show:!0,zlevel:0,z:4,seriesindex:"all",min:0,max:200,dimension:null,inrange:null,outofrange:null,left:0,right:null,top:null,bottom:0,itemwidth:null,itemheight:null,inverse:!1,orient:"vertical",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",contentcolor:"#5793f3",inactivecolor:"#aaa",borderwidth:0,padding:5,textgap:10,precision:0,color:null,formatter:null,text:null,textstyle:{color:"#333"}},init:function(t,e,i){this._dataextent,this.targetvisuals={},this.controllervisuals={},this.textstylemodel,this.itemsize,this.mergedefaultandtheme(t,i)},optionupdated:function(t,e){var i=this.option;uv.canvassupported||(i.realtime=!1),!e&&jg(i,t,this.replacableoptionkeys),this.textstylemodel=this.getmodel("textstyle"),this.resetitemsize(),this.completevisualoption()},resetvisual:function(t){var e=this.statelist;t=m(t,this),this.controllervisuals=kg(this.option.controller,e,t),this.targetvisuals=kg(this.option.target,e,t)},gettargetseriesindices:function(){var t=this.option.seriesindex,e=[];return null==t||"all"===t?this.ecmodel.eachseries(function(t,i){e.push(i)}):e=oo(t),e},eachtargetseries:function(t,e){d(this.gettargetseriesindices(),function(i){t.call(e,this.ecmodel.getseriesbyindex(i))},this)},istargetseries:function(t){var e=!1;return this.eachtargetseries(function(i){i===t&&(e=!0)}),e},formatvaluetext:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).tofixed(math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.databound,h=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(h)?h.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(h)?o?h(t[0],t[1]):h(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetextent:function(){var t=this.option,e=ud([t.min,t.max]);this._dataextent=e},getdatadimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getextent:function(){return this._dataextent.slice()},completevisualoption:function(){function t(t){fd(e.color)&&!t.inrange&&(t.inrange={color:e.color.slice().reverse()}),t.inrange=t.inrange||{color:qd},zd(this.statelist,function(e){var i=t[e];if(_(i)){var n=bd.get(i,"active",s);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.option,o={inrange:e.inrange,outofrange:e.outofrange},a=e.target||(e.target={}),r=e.controller||(e.controller={});n(a,o),n(r,o);var s=this.iscategory();t.call(this,a),t.call(this,r),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},zd(n,function(t,e){if(ji.isvalidtype(e)){var i=bd.get(e,"inactive",s);null!=i&&(o[e]=i,"color"!==e||o.hasownproperty("opacity")||o.hasownproperty("coloralpha")||(o.opacity=[0,0]))}}))}.call(this,a,"inrange","outofrange"),function(t){var e=(t.inrange||{}).symbol||(t.outofrange||{}).symbol,n=(t.inrange||{}).symbolsize||(t.outofrange||{}).symbolsize,o=this.get("inactivecolor");zd(this.statelist,function(a){var r=this.itemsize,l=t[a];l||(l=t[a]={color:s?o:[o]}),null==l.symbol&&(l.symbol=e&&i(e)||(s?"roundrect":["roundrect"])),null==l.symbolsize&&(l.symbolsize=n&&i(n)||(s?r[0]:[r[0],r[0]])),l.symbol=wd(l.symbol,function(t){return"none"===t||"square"===t?"roundrect":t});var h=l.symbolsize;if(null!=h){var u=-1/0;hd(h,function(t){t>u&&(u=t)}),l.symbolsize=wd(h,function(t){return xd(t,[0,u],[0,r[0]],!0)})}},this)}.call(this,r)},resetitemsize:function(){this.itemsize=[parsefloat(this.get("itemwidth")),parsefloat(this.get("itemheight"))]},iscategory:function(){return!!this.option.categories},setselected:jd,getvaluestate:jd,getvisualmeta:jd}),$d=[20,140],kd=yd.extend({type:"visualmap.continuous",defaultoption:{align:"auto",calculable:!1,range:null,realtime:!0,itemheight:null,itemwidth:null,hoverlink:!0,hoverlinkdatasize:null,hoverlinkonhandle:null},optionupdated:function(t,e){kd.superapply(this,"optionupdated",arguments),this.resetextent(),this.resetvisual(function(t){t.mappingmethod="linear",t.dataextent=this.getextent()}),this._resetrange()},resetitemsize:function(){kd.superapply(this,"resetitemsize",arguments);var t=this.itemsize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isnan(t[0]))&&(t[0]=$d[0]),(null==t[1]||isnan(t[1]))&&(t[1]=$d[1])},_resetrange:function(){var t=this.getextent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=math.max(e[0],t[0]),e[1]=math.min(e[1],t[1]))},completevisualoption:function(){yd.prototype.completevisualoption.apply(this,arguments),d(this.statelist,function(t){var e=this.option.controller[t].symbolsize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setselected:function(t){this.option.range=t.slice(),this._resetrange()},getselected:function(){var t=this.getextent(),e=ii((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(i){var n=[],o=i.getdata();o.each(this.getdatadimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},!0,this),e.push({seriesid:i.id,dataindex:n})},this),e},getvisualmeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=im(0,0,this.getextent()),n=im(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;rt[1])break;i.push({color:this.getcontrollervisual(a,"color",e),offset:o/100})}return i.push({color:this.getcontrollervisual(t[1],"color",e),offset:1}),i},_createbarpoints:function(t,e){var i=this.visualmapmodel.itemsize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createbargroup:function(t){var e=this._orient,i=this.visualmapmodel.get("inverse");return new jy("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-math.pi/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:math.pi/2})},_updatehandle:function(t,e){if(this._usehandle){var i=this._shapes,n=this.visualmapmodel,o=i.handlethumbs,a=i.handlelabels;tl([0,1],function(r){var s=o[r];s.setstyle("fill",e.handlescolor[r]),s.position[1]=t[r];var l=io(i.handlelabelpoints[r],mo(s,this.group));a[r].setstyle({x:l[0],y:l[1],text:n.formatvaluetext(this._datainterval[r]),textverticalalign:"middle",textalign:this._applytransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.bargroup)})},this)}},_showindicator:function(t,e,i,n){var o=this.visualmapmodel,a=o.getextent(),r=o.itemsize,s=[0,r[1]],l=qd(t,a,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setshape("points",sm(!!i,n,l,r[1]));var c={convertopacitytoalpha:!0},d=this.getcontrollervisual(t,"color",c);u.setstyle("fill",d);var f=io(h.indicatorlabelpoint,mo(u,this.group)),g=h.indicatorlabel;g.attr("invisible",!1);var p=this._applytransform("left",h.bargroup),m=this._orient;g.setstyle({text:(i||"")+o.formatvaluetext(e),textverticalalign:"horizontal"===m?p:"middle",textalign:"horizontal"===m?"center":p,x:f[0],y:f[1]})}},_enablehoverlinktoseries:function(){var t=this;this._shapes.bargroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualmapmodel.itemsize,n=t._applytransform([e.offsetx,e.offsety],t._shapes.bargroup,!0,!0);n[1]=el(il(0,n[1]),i[1]),t._dohoverlinktoseries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearhoverlinktoseries()})},_enablehoverlinkfromseries:function(){var t=this.api.getzr();this.visualmapmodel.option.hoverlink?(t.on("mouseover",this._hoverlinkfromseriesmouseover,this),t.on("mouseout",this._hideindicator,this)):this._clearhoverlinkfromseries()},_dohoverlinktoseries:function(t,e){var i=this.visualmapmodel,n=i.itemsize;if(i.option.hoverlink){var o=[0,n[1]],a=i.getextent();t=el(il(o[0],t),o[1]);var r=lm(i,a,o),s=[t-r,t+r],l=qd(t,o,a,!0),h=[qd(s[0],o,a,!0),qd(s[1],o,a,!0)];s[0]o[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showindicator(l,h[1],"< ",r):h[1]===1/0?this._showindicator(l,h[0],"> ",r):this._showindicator(l,l,"≈ ",r));var u=this._hoverlinkdataindices,c=[];(e||hm(i))&&(c=this._hoverlinkdataindices=i.findtargetdataindices(h));var d=wo(u,c);this._dispatchhighdown("downplay",om(d[0])),this._dispatchhighdown("highlight",om(d[1]))}},_hoverlinkfromseriesmouseover:function(t){var e=t.target,i=this.visualmapmodel;if(e&&null!=e.dataindex){var n=this.ecmodel.getseriesbyindex(e.seriesindex);if(i.istargetseries(n)){var o=n.getdata(e.datatype),a=o.getdimension(i.getdatadimension(o)),r=o.get(a,e.dataindex,!0);isnan(r)||this._showindicator(r,r)}}},_hideindicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorlabel&&t.indicatorlabel.attr("invisible",!0)},_clearhoverlinktoseries:function(){this._hideindicator();var t=this._hoverlinkdataindices;this._dispatchhighdown("downplay",om(t)),t.length=0},_clearhoverlinkfromseries:function(){this._hideindicator();var t=this.api.getzr();t.off("mouseover",this._hoverlinkfromseriesmouseover),t.off("mouseout",this._hideindicator)},_applytransform:function(t,e,i,n){var o=mo(e,n?null:this.group);return tb[y(t)?"applytransform":"transformdirection"](t,o,i)},_dispatchhighdown:function(t,e){e&&e.length&&this.api.dispatchaction({type:t,batch:e})},dispose:function(){this._clearhoverlinkfromseries(),this._clearhoverlinktoseries()},remove:function(){this._clearhoverlinkfromseries(),this._clearhoverlinktoseries()}});ir({type:"selectdatarange",event:"datarangeselected",update:"update"},function(t,e){e.eachcomponent({maintype:"visualmap",query:t},function(e){e.setselected(t.selected)})}),tr(vd);var rl=yd.extend({type:"visualmap.piecewise",defaultoption:{selected:null,minopen:!1,maxopen:!1,align:"auto",itemwidth:20,itemheight:14,itemsymbol:"roundrect",piecelist:null,categories:null,splitnumber:5,selectedmode:"multiple",itemgap:10,hoverlink:!0,showlabel:null},optionupdated:function(t,e){rl.superapply(this,"optionupdated",arguments),this._piecelist=[],this.resetextent();var n=this._mode=this._determinemode();sl[this._mode].call(this),this._resetselected(t,e);var o=this.option.categories;this.resetvisual(function(t,e){"categories"===n?(t.mappingmethod="category",t.categories=i(o)):(t.dataextent=this.getextent(),t.mappingmethod="piecewise",t.piecelist=f(this._piecelist,function(t){var t=i(t);return"inrange"!==e&&(t.visual=null),t}))})},completevisualoption:function(){function t(t,e,i){return t&&t[e]&&(b(t[e])?t[e].hasownproperty(i):t[e]===i)}var e=this.option,i={},n=ji.listvisualtypes(),o=this.iscategory();d(e.pieces,function(t){d(n,function(e){t.hasownproperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.statelist,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.statelist,function(t){(e[t]||(e[t]={}))[n]=bd.get(n,"inrange"===t?"active":"inactive",o)})},this),yd.prototype.completevisualoption.apply(this,arguments)},_resetselected:function(t,e){var i=this.option,n=this._piecelist,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getselectedmapkey(t);o.hasownproperty(i)||(o[i]=!0)},this),"single"===i.selectedmode){var a=!1;d(n,function(t,e){var i=this.getselectedmapkey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getselectedmapkey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getpiecelist:function(){return this._piecelist},_determinemode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitnumber"},setselected:function(t){this.option.selected=i(t)},getvaluestate:function(t){var e=ji.findpieceindex(t,this._piecelist);return null!=e&&this.option.selected[this.getselectedmapkey(this._piecelist[e])]?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(i){var n=[],o=i.getdata();o.each(this.getdatadimension(o),function(e,i){ji.findpieceindex(e,this._piecelist)===t&&n.push(i)},!0,this),e.push({seriesid:i.id,dataindex:n})},this),e},getrepresentvalue:function(t){var e;if(this.iscategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getvisualmeta:function(t){function e(e,a){var r=o.getrepresentvalue({interval:e});a||(a=o.getvaluestate(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.iscategory()){var i=[],n=[],o=this,a=this._piecelist.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outofrange"),e(i.slice()),s=i[1])},this),{stops:i,outercolors:n}}}}),sl={splitnumber:function(){var t=this.option,e=this._piecelist,i=math.min(t.precision,20),n=this.getextent(),o=t.splitnumber;o=math.max(parseint(o,10),1),t.splitnumber=o;for(var a=(n[1]-n[0])/o;+a.tofixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.tofixed(i);var r=0;t.minopen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatvaluetext(null!=t.value?t.value:t.interval,!1,i)},this)}};jd.extend({type:"visualmap.piecewise",dorender:function(){var t=this.group;t.removeall();var e=this.visualmapmodel,i=e.get("textgap"),n=e.textstylemodel,o=n.getfont(),a=n.gettextcolor(),r=this._getitemalign(),s=e.itemsize,l=this._getviewdata(),h=l.endstext,u=i(e.get("showlabel",!0),!h);h&&this._renderendstext(t,h[0],s,u,r),d(l.viewpiecelist,function(n){var l=n.piece,h=new jy;h.onclick=m(this._onitemclick,this,l),this._enablehoverlink(h,n.indexinmodelpiecelist);var c=e.getrepresentvalue(l);if(this._createitemsymbol(h,c,[0,0,s[0],s[1]]),u){var d=this.visualmapmodel.getvaluestate(c);h.add(new ib({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textverticalalign:"middle",textalign:r,textfont:o,textfill:a,opacity:"outofrange"===d?.5:1}}))}t.add(h)},this),h&&this._renderendstext(t,h[1],s,u,r),hb(e.get("orient"),t,e.get("itemgap")),this.renderbackground(t),this.positiongroup(t)},_enablehoverlink:function(t,e){function i(t){var i=this.visualmapmodel;i.option.hoverlink&&this.api.dispatchaction({type:t,batch:om(i.findtargetdataindices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getitemalign:function(){var t=this.visualmapmodel,e=t.option;if("vertical"===e.orient)return nm(t,this.api,t.itemsize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderendstext:function(t,e,i,n,o){if(e){var a=new jy,r=this.visualmapmodel.textstylemodel;a.add(new ib({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textverticalalign:"middle",textalign:n?o:"center",text:e,textfont:r.getfont(),textfill:r.gettextcolor()}})),t.add(a)}},_getviewdata:function(){var t=this.visualmapmodel,e=f(t.getpiecelist(),function(t,e){return{piece:t,indexinmodelpiecelist:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewpiecelist:e,endstext:i}},_createitemsymbol:function(t,e,i){t.add(hr(this.getcontrollervisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getcontrollervisual(e,"color")))},_onitemclick:function(t){var e=this.visualmapmodel,n=e.option,o=i(n.selected),a=e.getselectedmapkey(t);"single"===n.selectedmode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:o})}});tr(vd);var ll=vi,hl=gi,ul=sr({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergedefaultandtheme(t,i),this.mergeoption(t,i,n.createdbyself,!0)},isanimationenabled:function(){if(uv.node)return!1;var t=this.__hostseries;return this.getshallow("animation")&&t&&t.isanimationenabled()},mergeoption:function(t,e,i,n){var o=this.constructor,r=this.maintype+"model";i||e.eachseries(function(t){var i=t.get(this.maintype),s=t[r];i&&i.data?(s?s.mergeoption(i,e,!0):(n&&dm(i),d(i.data,function(t){t instanceof array?(dm(t[0]),dm(t[1])):dm(t)}),a(s=new o(i,this,e),{maintype:this.maintype,seriesindex:t.seriesindex,name:t.name,createdbyself:!0}),s.__hostseries=t),t[r]=s):t[r]=null},this)},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=y(i)?f(i,ll).join(", "):ll(i),o=e.getname(t),a=hl(this.name);return(null!=i||o)&&(a+="
"),o&&(a+=hl(o),null!=i&&(a+=" : ")),null!=i&&(a+=hl(n)),a},getdata:function(){return this._data},setdata:function(t){this._data=t}});u(ul,nb),ul.extend({type:"markpoint",defaultoption:{zlevel:0,z:5,symbol:"pin",symbolsize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemstyle:{normal:{borderwidth:2}}}});var cl=l,dl=v,fl={min:dl(mm,"min"),max:dl(mm,"max"),average:dl(mm,"average")},gl=lr({type:"marker",init:function(){this.markergroupmap=z()},render:function(t,e,i){var n=this.markergroupmap;n.each(function(t){t.__keep=!1});var o=this.type+"model";e.eachseries(function(t){var n=t[o];n&&this.renderseries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderseries:function(){}});gl.extend({type:"markpoint",updatelayout:function(t,e,i){e.eachseries(function(t){var e=t.markpointmodel;e&&(wm(e.getdata(),t,i),this.markergroupmap.get(t.id).updatelayout(e))},this)},renderseries:function(t,e,i,n){var o=t.coordinatesystem,a=t.id,r=t.getdata(),s=this.markergroupmap,l=s.get(a)||s.set(a,new ts),h=sm(o,t,e);e.setdata(h),wm(e.getdata(),t,n),h.each(function(t){var i=h.getitemmodel(t),n=i.getshallow("symbolsize");"function"==typeof n&&(n=n(e.getrawvalue(t),e.getdataparams(t))),h.setitemvisual(t,{symbolsize:n,color:i.get("itemstyle.normal.color")||r.getvisual("color"),symbol:i.getshallow("symbol")})}),l.updatedata(h),this.group.add(l.group),h.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markpoint=t.markpoint||{}}),ul.extend({type:"markline",defaultoption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolsize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},linestyle:{normal:{type:"dashed"},emphasis:{width:3}},animationeasing:"linear"}});var pl=function(t,e,o,r){var s=t.getdata(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||null!=r.xaxis||null!=r.yaxis)){var h,u;if(null!=r.yaxis||null!=r.xaxis)h=null!=r.yaxis?"y":"x",e.getaxis(h),u=i(r.yaxis,r.xaxis);else{var c=ym(r,s,e,t);h=c.valuedatadim,c.valueaxis,u=bm(s,h,l)}var d="x"===h?0:1,f=1-d,g=i(r),p={};g.type=null,g.coord=[],p.coord=[],g.coord[f]=-1/0,p.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof u&&(u=+u.tofixed(math.min(m,20))),g.coord[d]=p.coord[d]=u,r=[g,p,{type:l,valueindex:r.valueindex,value:u}]}return r=[vm(t,r[0]),vm(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};gl.extend({type:"markline",updatelayout:function(t,e,i){e.eachseries(function(t){var e=t.marklinemodel;if(e){var n=e.getdata(),o=e.__from,a=e.__to;o.each(function(e){am(o,e,!0,t,i),am(a,e,!1,t,i)}),n.each(function(t){n.setitemlayout(t,[o.getitemlayout(t),a.getitemlayout(t)])}),this.markergroupmap.get(t.id).updatelayout()}},this)},renderseries:function(t,e,i,n){function o(e,i,o){var a=e.getitemmodel(i);am(e,i,o,t,n),e.setitemvisual(i,{symbolsize:a.get("symbolsize")||p[o?0:1],symbol:a.get("symbol",!0)||g[o?0:1],color:a.get("itemstyle.normal.color")||s.getvisual("color")})}var a=t.coordinatesystem,r=t.id,s=t.getdata(),l=this.markergroupmap,h=l.get(r)||l.set(r,new mu);this.group.add(h.group);var u=cm(a,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setdata(f);var g=e.get("symbol"),p=e.get("symbolsize");y(g)||(g=[g,g]),"number"==typeof p&&(p=[p,p]),u.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getitemmodel(t).get("linestyle.normal.color");f.setitemvisual(t,{color:e||c.getitemvisual(t,"color")}),f.setitemlayout(t,[c.getitemlayout(t),d.getitemlayout(t)]),f.setitemvisual(t,{fromsymbolsize:c.getitemvisual(t,"symbolsize"),fromsymbol:c.getitemvisual(t,"symbol"),tosymbolsize:d.getitemvisual(t,"symbolsize"),tosymbol:d.getitemvisual(t,"symbol")})}),h.updatedata(f),u.line.eachitemgraphicel(function(t,i){t.traverse(function(t){t.datamodel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markline=t.markline||{}}),ul.extend({type:"markarea",defaultoption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemstyle:{normal:{borderwidth:0}}}});var ml=function(t,e,i,n){var a=vm(t,n[0]),r=vm(t,n[1]),s=i,l=a.coord,h=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=o([{},a,r]);return u.coord=[a.coord,r.coord],u.x0=a.x,u.y0=a.y,u.x1=r.x,u.y1=r.y,u},vl=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];gl.extend({type:"markarea",updatelayout:function(t,e,i){e.eachseries(function(t){var e=t.markareamodel;if(e){var n=e.getdata();n.each(function(e){var o=f(vl,function(o){return pm(n,e,o,t,i)});n.setitemlayout(e,o),n.getitemgraphicel(e).setshape("points",o)})}},this)},renderseries:function(t,e,i,n){var o=t.coordinatesystem,a=t.name,s=t.getdata(),l=this.markergroupmap,h=l.get(a)||l.set(a,{group:new jy});this.group.add(h.group),h.__keep=!0;var u=om(o,t,e);e.setdata(u),u.each(function(e){u.setitemlayout(e,f(vl,function(i){return pm(u,e,i,t,n)})),u.setitemvisual(e,{color:s.getvisual("color")})}),u.diff(h.__data).add(function(t){var e=new ub({shape:{points:u.getitemlayout(t)}});u.setitemgraphicel(t,e),h.group.add(e)}).update(function(t,i){var n=h.__data.getitemgraphicel(i);wo(n,{shape:{points:u.getitemlayout(t)}},e,t),h.group.add(n),u.setitemgraphicel(t,n)}).remove(function(t){var e=h.__data.getitemgraphicel(t);h.group.remove(e)}).execute(),u.eachitemgraphicel(function(t,i){var n=u.getitemmodel(i),o=n.getmodel("label.normal"),a=n.getmodel("label.emphasis"),s=u.getitemvisual(i,"color");t.usestyle(r(n.getmodel("itemstyle.normal").getitemstyle(),{fill:pt(s,.4),stroke:s})),t.hoverstyle=n.getmodel("itemstyle.emphasis").getitemstyle(),co(t.style,t.hoverstyle,o,a,{labelfetcher:e,labeldataindex:i,defaulttext:u.getname(i)||"",isrecttext:!0,autocolor:s}),uo(t,{}),t.datamodel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markarea=t.markarea||{}});ub.registersubtypedefaulter("timeline",function(){return"slider"}),ir({type:"timelinechange",event:"timelinechanged",update:"prepareandupdate"},function(t,e){var i=e.getcomponent("timeline");return i&&null!=t.currentindex&&(i.setcurrentindex(t.currentindex),!i.get("loop",!0)&&i.isindexmax()&&i.setplaystate(!1)),e.resetoption("timeline"),r({currentindex:i.option.currentindex},t)}),ir({type:"timelineplaychange",event:"timelineplaychanged",update:"update"},function(t,e){var i=e.getcomponent("timeline");i&&null!=t.playstate&&i.setplaystate(t.playstate)});var yl=ub.extend({type:"timeline",layoutmode:"box",defaultoption:{zlevel:0,z:4,show:!0,axistype:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlposition:"left",autoplay:!1,rewind:!1,loop:!0,playinterval:2e3,currentindex:0,itemstyle:{normal:{},emphasis:{}},label:{normal:{color:"#000"},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergedefaultandtheme(t,i),this._initdata()},mergeoption:function(t){yl.superapply(this,"mergeoption",arguments),this._initdata()},setcurrentindex:function(t){null==t&&(t=this.option.currentindex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentindex=t},getcurrentindex:function(){return this.option.currentindex},isindexmax:function(){return this.getcurrentindex()>=this._data.count()-1},setplaystate:function(t){this.option.autoplay=!!t},getplaystate:function(){return!!this.option.autoplay},_initdata:function(){var t=this.option,e=t.data||[],n=t.axistype,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=no(t);b(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isnan(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new as([{name:"value",type:r}],this)).initdata(e,o)},getdata:function(){return this._data},getcategories:function(){if("category"===this.get("axistype"))return this._names.slice()}});u(yl.extend({type:"timeline.slider",defaultoption:{backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderwidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptycircle",symbolsize:10,linestyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",normal:{show:!0,interval:"auto",rotate:0,color:"#304654"},emphasis:{show:!0,color:"#c23531"}},itemstyle:{normal:{color:"#304654",borderwidth:1},emphasis:{color:"#c23531"}},checkpointstyle:{symbol:"circle",symbolsize:13,color:"#c23531",borderwidth:5,bordercolor:"rgba(194,53,49, 0.5)",animation:!0,animationduration:300,animationeasing:"quinticinout"},controlstyle:{show:!0,showplaybtn:!0,showprevbtn:!0,shownextbtn:!0,itemsize:22,itemgap:12,position:"left",playicon:"path://m31.6,53c17.5,53,6,41.5,6,27.4s17.5,1.8,31.6,1.8c45.7,1.8,57.2,13.3,57.2,27.4s45.7,53,31.6,53z m31.6,3.3 c18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1c44.9,51.5,55.7,40.7,55.7,27.4c55.7,14.1,44.9,3.3,31.6,3.3z m24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2v21.3z",stopicon:"path://m30.9,53.2c16.8,53.2,5.3,41.7,5.3,27.6s16.8,2,30.9,2c45,2,56.4,13.5,56.4,27.6s45,53.2,30.9,53.2z m30.9,3.5c17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1c44.2,51.7,55,40.9,55,27.6c54.9,14.4,44.1,3.5,30.9,3.5z m36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h36c0.5,0,0.9,0.4,0.9,1v35.8z m27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h27c0.5,0,0.9,0.4,0.9,1l27.8,35.8l27.8,35.8z",nexticon:"path://m18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7l18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1l19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8c18.4,51.2,18.5,51,18.6,50.8z",previcon:"path://m43,52.8l20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7l42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3l18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1l41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8c43.2,53.2,43.1,53,43,52.8z",normal:{color:"#304654",bordercolor:"#304654",borderwidth:1},emphasis:{color:"#c23531",bordercolor:"#c23531",borderwidth:2}},data:[]}}),nb);var xl=xw.extend({type:"timeline"}),_l=function(t,e,i,n){us.call(this,t,e,i),this.type=n||"value",this._autolabelinterval,this.model=null};_l.prototype={constructor:_l,getlabelinterval:function(){var t=this.model,e=t.getmodel("label.normal"),i=e.get("interval");return null!=i&&"auto"!=i?i:((i=this._autolabelinterval)||(i=this._autolabelinterval=rr(f(this.scale.getticks(),this.datatocoord,this),vr(this,e.get("formatter")),e.getfont(),"horizontal"===t.get("orient")?0:90,e.get("rotate"))),i)},islabelignored:function(t){if("category"===this.type){var e=this.getlabelinterval();return"function"==typeof e&&!e(t,this.scale.getlabel(t))||t%(e+1)}}},h(_l,us);var bl=m,wl=d,sl=math.pi;xl.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewrect,this._timer,this._currentpointer,this._maingroup,this._labelgroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecmodel=e,this.group.removeall(),t.get("show",!0)){var o=this._layout(t,i),a=this._creategroup("maingroup"),r=this._creategroup("labelgroup"),s=this._axis=this._createaxis(o,t);t.formattooltip=function(t){return gi(s.scale.getlabel(t))},wl(["axisline","axistick","control","currentpointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderaxislabel(o,r,s,t),this._position(o,t)}this._doplaystop()},remove:function(){this._cleartimer(),this.group.removeall()},dispose:function(){this._cleartimer()},_layout:function(t,e){var i=t.get("label.normal.position"),n=t.get("orient"),o=rm(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:sl/2},l="vertical"===n?o.height:o.width,h=t.getmodel("controlstyle"),u=h.get("show"),c=u?h.get("itemsize"):0,d=u?h.get("itemgap"):0,f=c+d,g=t.get("label.normal.rotate")||0;g=g*sl/180;var p,m,v,y,x=h.get("position",!0),_=(u=h.get("show",!0))&&h.get("showplaybtn",!0),b=u&&h.get("showprevbtn",!0),w=u&&h.get("shownextbtn",!0),s=0,m=l;return"left"===x||"bottom"===x?(_&&(p=[0,0],s+=f),b&&(m=[s,0],s+=f),w&&(v=[m-c,0],m-=f)):(_&&(p=[m-c,0],m-=f),b&&(m=[0,0],s+=f),w&&(v=[m-c,0],m-=f)),y=[s,m],t.get("inverse")&&y.reverse(),{viewrect:o,mainlength:l,orient:n,rotation:s[n],labelrotation:g,labelposopt:i,labelalign:t.get("label.normal.align")||a[n],labelbaseline:t.get("label.normal.verticalalign")||t.get("label.normal.baseline")||r[n],playposition:p,prevbtnposition:m,nextbtnposition:v,axisextent:y,controlsize:c,controlgap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._maingroup,r=this._labelgroup,s=t.viewrect;if("vertical"===t.orient){var l=ot(),h=s.x,u=s.y+s.height;lt(l,l,[-h,-u]),ht(l,l,-sl/2),lt(l,l,[h,u]),(s=s.clone()).applytransform(l)}var c=n(s),d=n(a.getboundingrect()),f=n(r.getboundingrect()),g=a.position,p=r.position;p[0]=g[0]=c[0][0];var m=t.labelposopt;if(isnan(m))o(g,d,c,1,v="+"===m?0:1),o(p,f,c,1,1-v);else{var v=m>=0?0:1;o(g,d,c,1,v),p[1]=g[1]+m}a.attr("position",g),r.attr("position",p),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createaxis:function(t,e){var i=e.getdata(),n=e.get("axistype"),o=er(e,n),a=i.getdataextent("value");o.setextent(a[0],a[1]),this._customizescale(o,i),o.niceticks();var r=new _l("value",o,t.axisextent,n);return r.model=e,r},_customizescale:function(t,e){t.getticks=function(){return e.maparray(["value"],function(t){return t})},t.gettickslabels=function(){return f(this.getticks(),t.getlabel,t)}},_creategroup:function(t){var e=this["_"+t]=new jy;return this.group.add(e),e},_renderaxisline:function(t,e,i,n){var o=i.getextent();n.get("linestyle.show")&&e.add(new fb({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({linecap:"round"},n.getmodel("linestyle").getlinestyle()),silent:!0,z2:1}))},_renderaxistick:function(t,e,i,n){var o=n.getdata(),a=i.scale.getticks();wl(a,function(t,a){var r=i.datatocoord(t),s=o.getitemmodel(a),l=s.getmodel("itemstyle.normal"),h=s.getmodel("itemstyle.emphasis"),u={position:[r,0],onclick:bl(this._changetimeline,this,a)},c=bm(s,l,e,u);uo(c,h.getitemstyle()),s.get("tooltip")?(c.dataindex=a,c.datamodel=n):c.dataindex=c.datamodel=null},this)},_renderaxislabel:function(t,e,i,n){var o=n.getmodel("label.normal");if(o.get("show")){var a=n.getdata(),r=i.scale.getticks(),s=vr(i,o.get("formatter")),l=i.getlabelinterval();wl(r,function(n,o){if(!i.islabelignored(o,l)){var r=a.getitemmodel(o),h=r.getmodel("label.normal"),u=r.getmodel("label.emphasis"),c=i.datatocoord(n),d=new ib({position:[c,0],rotation:t.labelrotation-t.rotation,onclick:bl(this._changetimeline,this,o),silent:!1});fo(d.style,h,{text:s[o],textalign:t.labelalign,textverticalalign:t.labelbaseline}),e.add(d),uo(d,fo({},u))}},this)}},_rendercontrol:function(t,e,i,n){function o(t,i,o,u){if(t){var c=vm(n,i,h,{position:t,origin:[a/2,0],rotation:u?-r:0,recthover:!0,style:s,onclick:o});e.add(c),uo(c,l)}}var a=t.controlsize,r=t.rotation,s=n.getmodel("controlstyle.normal").getitemstyle(),l=n.getmodel("controlstyle.emphasis").getitemstyle(),h=[0,-a/2,a,a],u=n.getplaystate(),c=n.get("inverse",!0);o(t.nextbtnposition,"controlstyle.nexticon",bl(this._changetimeline,this,c?"-":"+")),o(t.prevbtnposition,"controlstyle.previcon",bl(this._changetimeline,this,c?"+":"-")),o(t.playposition,"controlstyle."+(u?"stopicon":"playicon"),bl(this._handleplayclick,this,!u),!0)},_rendercurrentpointer:function(t,e,i,n){var o=n.getdata(),a=n.getcurrentindex(),r=o.getitemmodel(a).getmodel("checkpointstyle"),s=this,l={oncreate:function(t){t.draggable=!0,t.drift=bl(s._handlepointerdrag,s),t.ondragend=bl(s._handlepointerdragend,s),gm(t,a,i,n,!0)},onupdate:function(t){gm(t,a,i,n)}};this._currentpointer=bm(r,r,this._maingroup,{},this._currentpointer,l)},_handleplayclick:function(t){this._cleartimer(),this.api.dispatchaction({type:"timelineplaychange",playstate:t,from:this.uid})},_handlepointerdrag:function(t,e,i){this._cleartimer(),this._pointerchangetimeline([i.offsetx,i.offsety])},_handlepointerdragend:function(t){this._pointerchangetimeline([t.offsetx,t.offsety],!0)},_pointerchangetimeline:function(t,e){var i=this._toaxiscoord(t)[0],n=ii(this._axis.getextent().slice());i>n[1]&&(i=n[1]),ii.getheight()&&(n.textposition="top",l=!0);var h=l?-5-o.height:s+8;a+o.width/2>i.getwidth()?(n.textposition=["100%",h],n.textalign="right"):a-o.width/2<0&&(n.textposition=[0,h],n.textalign="left")}})}},updateview:function(t,e,i,n){d(this._features,function(t){t.updateview&&t.updateview(t.model,e,i,n)})},updatelayout:function(t,e,i,n){d(this._features,function(t){t.updatelayout&&t.updatelayout(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeall()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var il=ld.toolbox.saveasimage;hm.defaultoption={show:!0,icon:"m4.7,22.9l29.3,45.5l54.7,23.4m4.6,43.6l4.6,58l53.8,58l53.8,43.6m29.2,45.1l29.2,0",title:il.title,type:"png",name:"",excludecomponents:["toolbox"],pixelratio:1,lang:il.lang.slice()},hm.prototype.unusable=!uv.canvassupported,hm.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createelement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getconnecteddataurl({type:a,backgroundcolor:i.get("backgroundcolor",!0)||t.get("backgroundcolor")||"#fff",excludecomponents:i.get("excludecomponents"),pixelratio:i.get("pixelratio")});if(o.href=r,"function"!=typeof mouseevent||uv.browser.ie||uv.browser.edge)if(window.navigator.mssaveoropenblob){for(var s=atob(r.split(",")[1]),l=s.length,h=new uint8array(l);l--;)h[l]=s.charcodeat(l);var u=new blob([h]);window.navigator.mssaveoropenblob(u,n+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=new mouseevent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchevent(f)}},wp("saveasimage",hm);var tl=ld.toolbox.magictype;fm.defaultoption={show:!0,type:[],icon:{line:"m4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9m4.1,58h51.4",bar:"m6.7,22.9h10v48h-10v22.9zm24.9,13h10v35h-10v13zm43.2,2h10v46h-10v2zm3.1,58h53.7",stack:"m8.2,38.4l-8.4,4.1l30.6,15.3l60,42.5l-8.1-4.1l-21.5,11l8.2,38.4z m51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9l8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2l51.9,30z m51.9,21.7l-8.1,4.2l35.7,30l-5.3,2.8l24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2l8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1l51.9,21.7zm30.4,2.2l-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1l30.4,2.2z",tiled:"m2.3,2.2h22.8v25h2.3v2.2z m35,2.2h22.8v25h35v2.2zm2.3,35h22.8v22.8h2.3v35z m35,35h22.8v22.8h35v35z"},title:i(tl.title),option:{},seriesindex:{}};var al=fm.prototype;al.geticons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var cl={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magictype_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},dl=[["line","bar"],["stack","tiled"]];al.onclick=function(t,e,i){var n=this.model,o=n.get("seriesindex."+i);if(cl[i]){var a={series:[]};d(dl,function(t){l(t,i)>=0&&d(t,function(t){n.seticonstatus(t,"normal")})}),n.seticonstatus(i,"emphasis"),t.eachcomponent({maintype:"series",query:null==o?null:{seriesindex:o}},function(e){var o=e.subtype,s=e.id,l=cl[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var h=e.coordinatesystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getaxesbyscale("ordinal")[0];if(u){var c=u.dim+"axis",d=t.querycomponents({maintype:c,index:e.get(name+"index"),id:e.get(name+"id")})[0].componentindex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundarygap="bar"===i}}}),e.dispatchaction({type:"changemagictype",currenttype:i,newoption:a})}},ir({type:"changemagictype",event:"magictypechanged",update:"prepareandupdate"},function(t,e){e.mergeoption(t.newoption)}),wp("magictype",fm);var ll=ld.toolbox.dataview,kl=new array(60).join("-"),pl="\t",ol=new regexp("["+pl+"]+","g");qm.defaultoption={show:!0,readonly:!1,optiontocontent:null,contenttooption:null,icon:"m17.5,17.3h33 m17.5,17.3h33 m45.4,29.5h-28 m11.5,2v56h51v14.8l38.4,2h11.5z m38.4,2.2v12.7h51 m45.4,41.7h-28",title:i(ll.title),lang:i(ll.lang),backgroundcolor:"#fff",textcolor:"#000",textareacolor:"#fff",textareabordercolor:"#333",buttoncolor:"#c23531",buttontextcolor:"#fff"},qm.prototype.onclick=function(t,e){function i(){n.removechild(a),x._dom=null}var n=e.getdom(),o=this.model;this._dom&&n.removechild(this._dom);var a=document.createelement("div");a.style.csstext="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundcolor=o.get("backgroundcolor")||"#fff";var r=document.createelement("h4"),s=o.get("lang")||[];r.innerhtml=s[0]||o.get("title"),r.style.csstext="margin: 10px 20px;",r.style.color=o.get("textcolor");var l=document.createelement("div"),h=document.createelement("textarea");l.style.csstext="display:block;width:100%;overflow:auto;";var u=o.get("optiontocontent"),c=o.get("contenttooption"),d=jm(t);if("function"==typeof u){var f=u(e.getoption());"string"==typeof f?l.innerhtml=f:s(f)&&l.appendchild(f)}else l.appendchild(h),h.readonly=o.get("readonly"),h.style.csstext="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=o.get("textcolor"),h.style.bordercolor=o.get("textareabordercolor"),h.style.backgroundcolor=o.get("textareacolor"),h.value=d.value;var g=d.meta,p=document.createelement("div");p.style.csstext="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createelement("div"),y=document.createelement("div");m+=";background-color:"+o.get("buttoncolor"),m+=";color:"+o.get("buttontextcolor");var x=this;si(v,"click",i),si(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getoption()):jm(h.value,g)}catch(t){throw i(),new error("data view format error "+t)}t&&e.dispatchaction({type:"changedataview",newoption:t}),i()}),v.innerhtml=s[1],y.innerhtml=s[2],y.style.csstext=m,v.style.csstext=m,!o.get("readonly")&&p.appendchild(y),p.appendchild(v),si(h,"keydown",function(t){if(9===(t.keycode||t.which)){var e=this.value,i=this.selectionstart,n=this.selectionend;this.value=e.substring(0,i)+pl+e.substring(n),this.selectionstart=this.selectionend=i+1,bx(t)}}),a.appendchild(r),a.appendchild(l),a.appendchild(p),l.style.height=n.clientheight-80+"px",n.appendchild(a),this._dom=a},qm.prototype.remove=function(t,e){this._dom&&e.getdom().removechild(this._dom)},qm.prototype.dispose=function(t,e){this.remove(t,e)},wp("dataview",qm),ir({type:"changedataview",event:"dataviewchanged",update:"prepareandupdate"},function(t,e){var i=[];d(t.newoption.series,function(t){var n=e.getseriesbyname(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:tv(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeoption(r({series:i},t.newoption))});var zl=d,nl="\0_ec_hist_store";bd.extend({type:"datazoom.select"}),wd.extend({type:"datazoom.select"});var el=ld.toolbox.datazoom,rl=d,vl="\0_ec_\0toolbox-datazoom_";rv.defaultoption={show:!0,icon:{zoom:"m0,13.5h26.9 m13.5,26.9v0 m32.1,13.5h58v58h13.5 v32.1",back:"m22,1.4l9.9,13.5l12.3,12.3 m10.3,13.5h54.9v44.6 h10.3v-26"},title:i(el.title)};var bl=rv.prototype;bl.render=function(t,e,i,n){this.model=t,this.ecmodel=e,this.api=i,hv(t,e,this,n,i),lv(t,e)},bl.onclick=function(t,e,i){gl[i].call(this)},bl.remove=function(t,e){this._brushcontroller.unmount()},bl.dispose=function(t,e){this._brushcontroller.dispose()};var gl={zoom:function(){var t=!this._iszoomactive;this.api.dispatchaction({type:"takeglobalcursor",key:"datazoomselect",datazoomselectactive:t})},back:function(){this._dispatchzoomaction(iv(this.ecmodel))}};bl._onbrush=function(t,e){function i(t,e,i){var r=e.getaxis(t),s=r.model,l=n(t,s,a),h=l.findrepresentativeaxisproxy(s).getminmaxspan();null==h.minvaluespan&&null==h.maxvaluespan||(i=ot(0,i.slice(),r.scale.getextent(),0,h.minvaluespan,h.maxvaluespan)),l&&(o[l.id]={datazoomid:l.id,startvalue:i[0],endvalue:i[1]})}function n(t,e,i){var n;return i.eachcomponent({maintype:"datazoom",subtype:"select"},function(i){i.getaxismodel(t,e.componentindex)&&(n=i)}),n}if(e.isend&&t.length){var o={},a=this.ecmodel;this._brushcontroller.updatecovers([]),new rp(sv(this.model.option),a,{include:["grid"]}).matchoutputranges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushtype;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({linex:"x",liney:"y"}[o],n,e)}}),ev(a,o),this._dispatchzoomaction(o)}},bl._dispatchzoomaction=function(t){var e=[];rl(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchaction({type:"datazoom",from:this.uid,batch:e})},wp("datazoom",rv),tr(function(t){function e(t,e){if(e){var o=t+"index",a=e[o];null==a||"all"==a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"==a||-1!==l(a,i)){var r={type:"select",$fromtoolbox:!0,id:vl+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),rl(n,i)}if(t){var n=t.datazoom||(t.datazoom=[]);y(n)||(t.datazoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.datazoom;e("xaxis",a),e("yaxis",a)}}});var wl=ld.toolbox.restore;uv.defaultoption={show:!0,icon:"m3.8,33.4 m47,18.9h9.8v8.7 m56.3,20.1 c52.1,9,40.5,0.6,26.8,2.1c12.6,3.7,1.6,16.2,2.1,30.6 m13,41.1h3.1v10.2 m3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:wl.title},uv.prototype.onclick=function(t,e,i){nv(t),e.dispatchaction({type:"restore",from:this.uid})},wp("restore",uv),ir({type:"restore",event:"restore",update:"prepareandupdate"},function(t,e){e.resetoption("recreate")});var hl,fl="urn:schemas-microsoft-com:vml",zl="undefined"==typeof window?null:window,ul=!1,xl=zl&&zl.document;if(xl&&!uv.canvassupported)try{!xl.namespaces.zrvml&&xl.namespaces.add("zrvml",fl),hl=function(t){return xl.createelement("')}}catch(t){hl=function(t){return xl.createelement("<"+t+' xmlns="'+fl+'" class="zrvml">')}}var jl=p_.cmd,ql=math.round,yl=math.sqrt,$l=math.abs,kl=math.cos,jl=math.sin,ql=math.max;if(!uv.canvassupported){var tk=21600,ek=tk/2,ik=function(t){t.style.csstext="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=tk+","+tk,t.coordorigin="0,0"},nk=function(t){return string(t).replace(/&/g,"&").replace(/"/g,""")},ok=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},ak=function(t,e){e&&t&&e.parentnode!==t&&t.appendchild(e)},rk=function(t,e){e&&t&&e.parentnode===t&&t.removechild(e)},sk=function(t,e,i){return 1e5*(parsefloat(t)||0)+1e3*(parsefloat(e)||0)+i},lk=function(t,e){return"string"==typeof t?t.lastindexof("%")>=0?parsefloat(t)/100*e:parsefloat(t):t},hk=function(t,e,i){var n=mt(e);i=+i,isnan(i)&&(i=1),n&&(t.color=ok(n[0],n[1],n[2]),t.opacity=i*n[3])},uk=function(t){var e=mt(t);return[ok(e[0],e[1],e[2]),e[3]]},ck=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof yb){var o,a=0,r=[0,0],s=0,l=1,h=i.getboundingrect(),u=h.width,c=h.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*u,n.y*c],g=[n.x2*u,n.y2*c];d&&($(f,f,d),$(g,g,d));var p=g[0]-f[0],m=g[1]-f[1];(a=180*math.atan2(p,m)/math.pi)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*u,n.y*c],d=i.transform,v=i.scale,y=u,x=c;r=[(f[0]-h.x)/y,(f[1]-h.y)/x],d&&$(f,f,d),y/=v[0]*tk,x/=v[1]*tk;var _=ql(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorstops.slice();b.sort(function(t,e){return t.offset-e.offset});for(var w=b.length,s=[],m=[],i=0;i=2){var c=s[0][0],d=s[1][0],l=s[0][1]*e.opacity,k=s[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=c,t.color2=d,t.colors=m.join(","),t.opacity=k,t.opacity2=l}"radial"===o&&(t.focusposition=r.join(","))}else hk(t,n,e.opacity)},dk=function(t,e){null!=e.linedash&&(t.dashstyle=e.linedash.join(" ")),null==e.stroke||e.stroke instanceof yb||hk(t,e.stroke,e.opacity)},fk=function(t,e,i,n){var o="fill"==e,a=t.getelementsbytagname(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.linewidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof yb&&rk(t,a),a||(a=cv(e)),o?ck(a,i,n):dk(a,i),ak(t,a)):(t[o?"filled":"stroked"]="false",rk(t,a))},gk=[[],[],[]],pk=function(t,e){var i,n,o,a,r,s,l=jl.m,h=jl.c,u=jl.l,c=jl.a,d=jl.q,f=[],g=t.data,p=t.len();for(a=0;a.01?o&&(z+=.0125):math.abs(n-c)<1e-4?o&&za?x-=.0125:x+=.0125:o&&nc?y+=.0125:y-=.0125),f.push(e,ql(((a-d)*m+w)*tk-ek),",",ql(((c-l)*i+s)*tk-ek),",",ql(((a+d)*m+w)*tk-ek),",",ql(((c+l)*i+s)*tk-ek),",",ql((z*m+w)*tk-ek),",",ql((n*i+s)*tk-ek),",",ql((y*m+w)*tk-ek),",",ql((x*i+s)*tk-ek)),r=y,s=x;break;case jl.r:var r=gk[0],v=gk[1];r[0]=g[a++],r[1]=g[a++],v[0]=r[0]+g[a++],v[1]=r[1]+g[a++],e&&($(r,r,e),$(v,v,e)),r[0]=ql(r[0]*tk-ek),v[0]=ql(v[0]*tk-ek),r[1]=ql(r[1]*tk-ek),v[1]=ql(v[1]*tk-ek),f.push(" m ",r[0],",",r[1]," l ",v[0],",",r[1]," l ",v[0],",",v[1]," l ",r[0],",",v[1]);break;case jl.z:f.push(" x ")}if(i>0){f.push(n);for(var b=0;b100&&(xk=0,yk={});var i,n=_k.style;try{n.font=t,i=n.fontfamily.split(",")[0]}catch(t){}e={style:n.fontstyle||"normal",variant:n.fontvariant||"normal",weight:n.fontweight||"normal",size:0|parsefloat(n.fontsize||12),family:i||"microsoft yahei"},yk[t]=e,xk++}return e};!function(t,e){cx[t]=e}("measuretext",function(t,e){var i=xl;vk||((vk=i.createelement("div")).style.csstext="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",xl.body.appendchild(vk));try{vk.style.font=e}catch(t){}return vk.innerhtml="",vk.appendchild(i.createtextnode(t)),{width:vk.offsetwidth}});for(var wk=new jt,sk=[px,je,qe,nn,ib],mk=0;mk=o&&h+1>=a){for(var u=[],c=0;c=o&&c+1>=a)return cv(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushcomponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractcommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newpos,s=r-n,l=0;r+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},lv.prototype.update=function(t,e){if(t){var i=this.getdefs(!1);if(t._dom&&i.contains(t._dom))"function"==typeof e&&e();else{var n=this.add(t);n&&(t._dom=n)}}},lv.prototype.adddom=function(t){this.getdefs(!0).appendchild(t)},lv.prototype.removedom=function(t){this.getdefs(!1).removechild(t._dom)},lv.prototype.getdoms=function(){var t=this.getdefs(!1);if(!t)return[];var e=[];return d(this._tagnames,function(i){var n=t.getelementsbytagname(i);e=e.concat([].slice.call(n))}),e},lv.prototype.markallunused=function(){var t=this;d(this.getdoms(),function(e){e[t._marklabel]="0"})},lv.prototype.markused=function(t){t&&(t[this._marklabel]="1")},lv.prototype.removeunused=function(){var t=this.getdefs(!1);if(t){var e=this;d(this.getdoms(),function(i){"1"!==i[e._marklabel]&&t.removechild(i)})}},lv.prototype.getsvgproxy=function(t){return t instanceof nn?rk:t instanceof qe?vk:t instanceof ib?bk:rk},lv.prototype.gettextsvgelement=function(t){return t.__textsvgel},lv.prototype.getsvgelement=function(t){return t.__svgel},h(kv,lv),kv.prototype.addwithoutupdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getdefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.adddom(o)):o=i.add(a),i.markused(e);var s=o.getattribute("id");t.setattribute(n,"url(#"+s+")")}})}},kv.prototype.add=function(t){var e;if("linear"===t.type)e=this.createelement("lineargradient");else{if("radial"!==t.type)return wy("illegal gradient type."),null;e=this.createelement("radialgradient")}return t.id=t.id||this.nextid++,e.setattribute("id","zr-gradient-"+t.id),this.updatedom(t,e),this.adddom(e),e},kv.prototype.update=function(t){var e=this;lv.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagname;"linear"===i&&"lineargradient"===n||"radial"===i&&"radialgradient"===n?e.updatedom(t,t._dom):(e.removedom(t),e.add(t))})},kv.prototype.updatedom=function(t,e){if("linear"===t.type)e.setattribute("x1",t.x),e.setattribute("y1",t.y),e.setattribute("x2",t.x2),e.setattribute("y2",t.y2);else{if("radial"!==t.type)return void wy("illegal gradient type.");e.setattribute("cx",t.x),e.setattribute("cy",t.y),e.setattribute("r",t.r)}t.global?e.setattribute("gradientunits","userspaceonuse"):e.setattribute("gradientunits","objectboundingbox"),e.innerhtml="";for(var i=t.colorstops,n=0,o=i.length;n0){var n,o,a=this.getdefs(!0),r=e[0],s=i?"_textdom":"_dom";r[s]?(o=r[s].getattribute("id"),n=r[s],a.contains(n)||a.appendchild(n)):(o="zr-clip-"+this.nextid,++this.nextid,(n=this.createelement("clippath")).setattribute("id",o),a.appendchild(n),r[s]=n);var l=this.getsvgproxy(r);if(r.transform&&r.parent.invtransform&&!i){var h=array.prototype.slice.call(r.transform);st(r.transform,r.parent.invtransform,r.transform),l.brush(r),r.transform=h}else l.brush(r);var u=this.getsvgelement(r);n.appendchild(u.clonenode()),t.setattribute("clip-path","url(#"+o+")"),e.length>1&&this.updatedom(n,e.slice(1),i)}else t&&t.setattribute("clip-path","none")},pv.prototype.markused=function(t){var e=this;t.__clippaths&&t.__clippaths.length>0&&d(t.__clippaths,function(t){t._dom&&lv.prototype.markused.call(e,t._dom),t._textdom&&lv.prototype.markused.call(e,t._textdom)})};var zk=function(t,e){this.root=t,this.storage=e;var i=mv("svg");i.setattribute("xmlns","http://www.w3.org/2000/svg"),i.setattribute("version","1.1"),i.setattribute("baseprofile","full"),i.style["user-select"]="none",this.gradientmanager=new kv(i),this.clippathmanager=new pv(i);var n=document.createelement("div");n.style.csstext="overflow: hidden;",this._svgroot=i,this._viewport=n,t.appendchild(n),n.appendchild(i),this.resize(),this._visiblelist=[]};zk.prototype={constructor:zk,gettype:function(){return"svg"},getviewportroot:function(){return this._viewport},getviewportrootoffset:function(){var t=this.getviewportroot();if(t)return{offsetleft:t.offsetleft||0,offsettop:t.offsettop||0}},refresh:function(){var t=this.storage.getdisplaylist(!0);this._paintlist(t)},_paintlist:function(t){this.gradientmanager.markallunused(),this.clippathmanager.markallunused();var e,i=this._svgroot,n=this._visiblelist,o=t.length,a=[];for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(){var t=this._getwidth(),e=this._getheight();if(this._width!==t&&this._height!==e){this._width=t,this._height=e;var i=this._viewport.style;i.width=t+"px",i.height=e+"px";var n=this._svgroot;n.setattribute("width",t),n.setattribute("height",e)}},getwidth:function(){return this._getwidth()},getheight:function(){return this._getheight()},_getwidth:function(){var t=this.root,e=document.defaultview.getcomputedstyle(t);return(t.clientwidth||ov(e.width))-ov(e.paddingleft)-ov(e.paddingright)|0},_getheight:function(){var t=this.root,e=document.defaultview.getcomputedstyle(t);return(t.clientheight||ov(e.height))-ov(e.paddingtop)-ov(e.paddingbottom)|0},dispose:function(){this.root.innerhtml="",this._svgroot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removechild(this._viewport)},pathtosvg:function(){this.refresh();var t=this._svgroot.outerhtml;return"data:img/svg+xml;utf-8,"+unescape(t)}},d(["getlayer","insertlayer","eachlayer","eachbuiltinlayer","eachotherlayer","getlayers","modlayer","dellayer","clearlayer","todataurl","pathtoimage"],function(t){zk.prototype[t]=wv(t)}),xi("svg",zk),t.version="3.8.4",t.dependencies=cw,t.priority=pw,t.init=function(t,e,i){var n=qa(t);if(n)return n;var o=new za(t,e,i);return o.id="ec_"+yw++,jw[o.id]=o,t.setattribute?t.setattribute(kw,o.id):t[kw]=o.id,ka(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,d(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+$w++,d(e,function(e){e.group=t})}return qw[t]=!0,t},t.disconnect=ja,t.disconnect=qw,t.dispose=function(t){"string"==typeof t?t=jw[t]:t instanceof za||(t=qa(t)),t instanceof za&&!t.isdisposed()&&t.dispose()},t.getinstancebydom=qa,t.getinstancebyid=function(t){return jw[t]},t.registertheme=function(t,e){uw[t]=e},t.registerpreprocessor=tr,t.registerprocessor=er,t.registerpostupdate=function(t){fw.push(t)},t.registeraction=ir,t.registercoordinatesystem=nr,t.getcoordinatesystemdimensions=function(t){var e=ua.get(t);if(e)return e.getdimensionsinfo?e.getdimensionsinfo():e.dimensions.slice()},t.registerlayout=or,t.registervisual=ar,t.registerloading=rr,t.extendcomponentmodel=sr,t.extendcomponentview=lr,t.extendseriesmodel=hr,t.extendchartview=ur,t.setcanvascreator=function(t){e("createcanvas",t)},t.registermap=function(t,e,i){e.geojson&&!e.features&&(i=e.specialareas,e=e.geojson),"string"==typeof e&&(e="undefined"!=typeof json&&json.parse?json.parse(e):new function("return ("+e+");")()),jw[t]={geojson:e,specialareas:i}},t.getmap=cr,t.datatool=ts,t.zrender=nx,t.graphic=tb,t.number=bx,t.format=xx,t.throttle=da,t.helper=hs,t.matrix=yy,t.vector=cy,t.color=ny,t.util=qs,t.list=as,t.model=lo,t.axis=us,t.env=uv,t.parsegeojson=js});