function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var h=function(){return(h=Object.assign||function(t){for(var e,n=1,i=arguments.length;n>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",o[u]+":0",i[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,r),r,o);if(o)return o(t,n,i),!0}return!1}function jt(t){return"CANVAS"===t.nodeName.toUpperCase()}var qt="undefined"!=typeof window&&!!window.addEventListener,Kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$t=[];function Jt(t,e,n,i){return n=n||{},i||!w.canvasSupported?Qt(t,e,n):w.browser.firefox&&w.browser.version<"39"&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Qt(t,e,n),n}function Qt(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i=e.clientX,o=e.clientY;if(jt(t)){e=t.getBoundingClientRect();return n.zrX=i-e.left,void(n.zrY=o-e.top)}if(Zt($t,t,i,o))return n.zrX=$t[0],void(n.zrY=$t[1])}n.zrX=n.zrY=0}function te(t){return t||window.event}function ee(t,e,n){if(null!=(e=te(e)).zrX)return e;var i=e.type;i&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Jt(t,i,e,n):(Jt(t,e,e,n),o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,t=t.deltaY;return null!=n&&null!=t?3*(0!==t?Math.abs(t):Math.abs(n))*(0t.getWidth()||n<0||n>t.getHeight()}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){me.prototype[a]=function(t){var e,n,i=t.zrX,o=t.zrY,r=_e(this,i,o);if("mouseup"===a&&r||(n=(e=this.findHover(i,o)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?l=r:s=1+r;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);r(t,e[n+h])<0?l=h:a=h+1}return l}function Te(f,g){var r,a,y=be,s=0,m=(f.length,[]);function e(t){var e=r[t],n=a[t],i=r[t+1],o=a[t+1];a[t]=n+o,t===s-3&&(r[t+1]=r[t+2],a[t+1]=a[t+2]),s--;t=Ie(f[i],f,e,n,0,g);e+=t,0!=(n-=t)&&0!==(o=Me(f[e+n-1],f,i,o,o-1,g))&&(n<=o?function(t,e,n,i){var o=0;for(o=0;oa[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(o);do{}while((r=we(t,n,i,e))=this._maxSize&&0>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),en(t,e),e):void $e(e,0,0,0,1):7===o||9===o?0<=(r=parseInt(i.slice(1,7),16))&&r<=16777215?($e(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),en(t,e),e):void $e(e,0,0,0,1):void 0;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===o){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return 3===a.length?$e(e,+a[0],+a[1],+a[2],1):$e(e,0,0,0,1);s=je(a.pop());case"rgb":return 3!==a.length?void $e(e,0,0,0,1):($e(e,Ze(a[0]),Ze(a[1]),Ze(a[2]),s),en(t,e),e);case"hsla":return 4!==a.length?void $e(e,0,0,0,1):(a[3]=je(a[3]),on(a,e),en(t,e),e);case"hsl":return 3!==a.length?void $e(e,0,0,0,1):(on(a,e),en(t,e),e);default:return}}$e(e,0,0,0,1)}}function on(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=je(t[1]),o=je(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return $e(e=e||[],Ye(255*qe(o,i,n+1/3)),Ye(255*qe(o,i,n)),Ye(255*qe(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function rn(t,e){var n=nn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(k(e)){var o,r=k((r=e)&&r[0])?2:1;if(0e);u++);u=Math.min(u-1,r-2)}var h,c,p,d,f,g,y,m=o[u+1],v=o[u];v&&m&&(this._lastFrame=u,this._lastFramePercent=e,0!=(g=m.percent-v.percent)&&(h=(e-v.percent)/g,c=n?this._additiveValue:l?Mn:t[a],(0=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},Pi.prototype.clone=function(){return new Pi(this.x,this.y,this.width,this.height)},Pi.prototype.copy=function(t){Pi.copy(this,t)},Pi.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Pi.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Pi.prototype.isZero=function(){return 0===this.width||0===this.height},Pi.create=function(t){return new Pi(t.x,t.y,t.width,t.height)},Pi.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Pi.applyTransform=function(t,e,n){if(n){if(n[1]<1e-5&&-1e-5this._sleepAfterStill&&this.animation.stop())},uo.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},uo.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},uo.prototype.addHover=function(t){},uo.prototype.removeHover=function(t){},uo.prototype.clearHover=function(){},uo.prototype.refreshHover=function(){this._needsRefreshHover=!0},uo.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},uo.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},uo.prototype.clearAnimation=function(){this.animation.clear()},uo.prototype.getWidth=function(){return this.painter.getWidth()},uo.prototype.getHeight=function(){return this.painter.getHeight()},uo.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},uo.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},uo.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},uo.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},uo.prototype.off=function(t,e){this.handler.off(t,e)},uo.prototype.trigger=function(t,e){this.handler.trigger(t,e)},uo.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;eu&&(u=l[c],h=c);++a[h],l[h]=0,++s}return a[e]/o}var Mo=9007199254740991;function Io(t){var e=2*Math.PI;return(t%e+e)%e}function To(t){return-fo=e.maxIterations){t+=e.ellipsis;break}var a=0===r?function(t,e,n,i){for(var o=0,r=0,a=t.length;rr){0i.width&&(r=e.split("\n"),p=!0),i.accumWidth=s):(s=Zr(e,c,i.width,i.breakAll,i.accumWidth),i.accumWidth=s.accumWidth+n,a=s.linesWidths,r=s.lines)):r=e.split("\n");for(var d=0;dthis._ux||i>this._uy;return this.addData(Ba.L,t,e),this._ctx&&o&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(i=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=i),this},os.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this._drawPendingPt(),this.addData(Ba.C,t,e,n,i,o,r),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,o,r):this._ctx.bezierCurveTo(t,e,n,i,o,r)),this._xi=o,this._yi=r,this},os.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Ba.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},os.prototype.arc=function(t,e,n,i,o,r){this._drawPendingPt(),ts[0]=i,ts[1]=o,ns(ts,r),i=ts[0];var a=(o=ts[1])-i;return this.addData(Ba.A,t,e,n,n,i,a,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Za(o)*n+t,this._yi=ja(o)*n+e,this},os.prototype.arcTo=function(t,e,n,i,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},os.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ba.R,t,e,n,i),this},os.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ba.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},os.prototype.fill=function(t){t&&t.fill(),this.toStatic()},os.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},os.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;hn||Ka(y)>i||c===e-1)&&(f=Math.sqrt(C*C+y*y),o=g,r=_);break;case Ba.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],b=t[c++],f=function(t,e,n,i,o,r,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=ga(t,n,o,a,f),y=ga(e,i,r,s,f),m=g-u,f=y-h;c+=Math.sqrt(m*m+f*f),u=g,h=y}return c}(o,r,m,v,g,_,x,b,10),o=x,r=b;break;case Ba.Q:f=function(t,e,n,i,o,r,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=ba(t,n,o,p),f=ba(e,i,r,p),g=d-s,p=f-l;u+=Math.sqrt(g*g+p*p),s=d,l=f}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),o=g,r=_;break;case Ba.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],x=t[c++],b=x+T;c+=1;t[c++];d&&(a=Za(T)*M+w,s=ja(T)*I+S),f=Xa(M,I)*Ya(Ja,Math.abs(x)),o=Za(b)*M+w,r=ja(b)*I+S;break;case Ba.R:a=o=t[c++],s=r=t[c++];f=2*t[c++]+2*t[c++];break;case Ba.Z:var C=a-o,y=s-r;f=Math.sqrt(C*C+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},os.prototype.rebuildPath=function(t,e){var n,i,o,r,a,s,l,u,h=this.data,c=this._ux,p=this._uy,d=this._len,f=e<1,g=0,y=0,m=0;if(!f||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var v=0;v=fs[i=0]+t&&a<=fs[1]+t?l:0}oMath.PI/2&&c<1.5*Math.PI?-l:l))}return u}(y,m,_,x,x+b,w,I,o);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case cs.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],n){if(rs(c,p,S,p,e,i,o)||rs(S,p,S,M,e,i,o)||rs(S,M,c,M,e,i,o)||rs(c,M,c,p,e,i,o))return!0}else l+=hs(S,p,S,M,i,o),l+=hs(c,M,c,p,i,o);break;case cs.Z:if(n){if(rs(u,h,c,p,e,i,o))return!0}else l+=hs(u,h,c,p,i,o);u=c,h=p}}return n||(r=h,t=p,Math.abs(r-t)i.len()&&(uMath.abs(o[1])?0"'])/g,Yp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xp(t){return null==t?"":(t+"").replace(Up,function(t,e){return Yp[e]})}function Zp(t,e,n){function i(t){return t&&rt(t)?t:"-"}function o(t){return null!=t&&!isNaN(t)&&isFinite(t)}var r="time"===e,a=t instanceof Date;if(r||a){r=r?Do(t):t;if(!isNaN(+r))return Ip(r,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return W(t)?i(t):U(t)&&o(t)?t+"":"-";e=Ro(t);return o(e)?Fp(e):W(t)?i(t):"boolean"==typeof t?t+"":"-"}function jp(t,e){return"{"+t+(null==e?"":e)+"}"}var qp=["a","b","c","d","e","f","g"];function Kp(t,e,n){var i=(e=!G(e)?[e]:e).length;if(!i)return"";for(var o=e[0].$vars||[],r=0;r':'':{renderMode:t,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Jp(t,e){return e=e||"transparent",H(t)?t:Y(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Qp(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var td=E,ed=["left","right","top","bottom","width","height"],nd=[["width","left","right"],["height","top","bottom"]];function id(a,s,l,u,h){var c=0,p=0;null==u&&(u=1/0),null==h&&(h=1/0);var d=0;s.eachChild(function(t,e){var n,i,o=t.getBoundingRect(),r=s.childAt(e+1),e=r&&r.getBoundingRect();d="horizontal"===a?(r=o.width+(e?-e.x+o.x:0),u<(n=c+r)||t.newline?(c=0,n=r,p+=d+l,o.height):Math.max(d,o.height)):(e=o.height+(e?-e.y+o.y:0),h<(i=p+e)||t.newline?(c+=d+l,p=0,i=e,o.width):Math.max(d,o.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}var od=id;V(id,"vertical"),V(id,"horizontal");function rd(t,e,n){n=Wp(n||0);var i=e.width,o=e.height,r=mo(t.left,i),a=mo(t.top,o),s=mo(t.right,i),l=mo(t.bottom,o),u=mo(t.width,i),h=mo(t.height,o),c=n[2]+n[0],p=n[1]+n[3],e=t.aspect;switch(isNaN(u)&&(u=i-s-p-r),isNaN(h)&&(h=o-l-c-a),null!=e&&(isNaN(u)&&isNaN(h)&&(i/oe)return t[i];return t[n-1]}(i,a):n;if((a=a||n)&&a.length){n=a[t];return o&&(r[o]=n),e.paletteIdx=(t+1)%a.length,n}}var Zd="\0_ec_inner",jd={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},qd={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Kd={};var $d,Jd=(u(Qd,$d=ep),Qd.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new ep(i),this._locale=new ep(o),this._optionManager=r},Qd.prototype.setOption=function(t,e,n){ot(null!=t,"option is null/undefined"),ot(1!==t[Zd],"please use chart.getOption()");e=nf(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},Qd.prototype.resetOption=function(t,e){return this._resetOption(t,nf(e))},Qd.prototype._resetOption=function(t,e){var n,i=!1,o=this._optionManager;return t&&"recreate"!==t||(n=o.mountOption("recreate"===t),E(n,function(t,e){var n;yd.hasClass(e)||(n=jd[e])&&!Kd[n]&&(Ho("Component "+e+" is used but not imported.\nimport { "+n+" } from 'echarts/components';\necharts.use(["+n+"]);"),Kd[n]=!0)}),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Gd(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=o.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(o=o.getMediaOption(this)).length&&E(o,function(t){i=!0,this._mergeOption(t,e)},this),i},Qd.prototype.mergeOption=function(t){this._mergeOption(t,null)},Qd.prototype._mergeOption=function(i,t){var o=this.option,r=this._componentsMap,a=this._componentsCount,n=[],s=ct(),c=t&&t.replaceMergeMainTypeMap;Ld(this).datasetMap=ct(),E(i,function(t,e){null!=t&&(yd.hasClass(e)?e&&(n.push(e),s.set(e,!0)):o[e]=null==o[e]?S(t):b(o[e],t,!0))}),c&&c.each(function(t,e){yd.hasClass(e)&&!s.get(e)&&(n.push(e),s.set(e,!0))}),yd.topologicalTravel(n,yd.getAllClassMainTypes(),function(s){var t=function(t,e,n){if(!(e=zd.get(e)))return n;var i=e(t);if(!i)return n;for(var o=0;o=this._outputDueEnd),this._outputDueEnd=d}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},og.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},og.prototype._doProgress=function(t,e,n,i,o){cg.reset(e,n,i,o),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:cg.next},this.context)},og.prototype._doReset=function(t){var e;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((n=this._reset(this.context))&&n.progress&&(e=n.forceFirstProgress,n=n.progress),G(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),e},og.prototype.unfinished=function(){return this._progress&&this._dueIndex", "<=", ">=" can only be number in filter.'),this._opFn=mg[t],this._rvalFloat=Ro(e)}var xg=(bg.prototype.evaluate=function(t,e){var n=_typeof(t),i=_typeof(e),o="number"===n?t:Ro(t),r="number"===i?e:Ro(e),a=isNaN(o),s=isNaN(r);return a&&(o=this._incomparable),s&&(r=this._incomparable),a&&s&&(i="string"===i,(n="string"===n)&&(o=i?t:0),i&&(r=n?e:0)),og[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},Wg.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=L(r,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},Wg.prototype.count=function(){return this._count},Wg.prototype.get=function(t,e){if(!(0<=e&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return r;o=r-1}}return-1},Wg.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],o=[];if(!i)return o;null==n&&(n=1/0);for(var r=1/0,a=-1,s=0,l=0,u=this.count();lt[S][1])&&(b=!1)}b&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}}},Wg.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),o=i._chunks[t],r=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(Vg(this._rawCount))(Math.ceil(r/s)+2);u[a++]=l;for(var h=1;hh[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o._updateGetRawIdx(),o},Wg.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,o=0,r=this.count();o'+Xp(e)+""+a,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var o=t.renderMode,r=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=e.value,h=t.useUTC;if(!r||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",o),p=r?"":Zp(l,"ordinal",h),d=e.valueType,f=a?[]:G(u)?L(u,function(t,e){return Zp(t,G(d)?d[e]:d,h)}):[Zp(u,G(d)?d[0]:d,h)],l=!s||!r,e=!s&&r,u=$g(i,o),i=u.nameStyle,u=u.valueStyle;return"richText"===o?(s?"":c)+(r?"":ay(t,p,i))+(a?"":function(t,e,n,i,o){o=[o],i=i?10:20;return n&&o.push({padding:[0,0,0,i],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,f,l,e,u)):ry((s?"":c)+(r?"":''+Xp(p)+"")+(a?"":function(t,e,n,i){n=n?"10px":"20px";return''+L(t,Xp).join("  ")+""}(f,l,e,u)),n)}}}};function iy(t,e,n,i,o,r){if(t){var a=ey(t);a.planLayout(t);e={useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e};return a.build(e,t,0,r)}}function oy(t){t=t.__gapLevelBetweenSubBlocks;return{html:Jg[t],richText:Qg[t]}}function ry(t,e){return'
'+t+'
'}function ay(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function sy(t,e){return Jp(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function ly(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}var uy=(hy.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},hy.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,n=$p({color:e,type:t,renderMode:n,markerId:i});return H(n)?n:(ot(i),this.richTextStyles[i]=n.style,n.content)},hy.prototype.wrapRichTextStyle=function(t,e){var n={};G(e)?E(e,function(t){return P(n,t)}):P(n,e);e=this._generateStyleName();return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"},hy);function hy(){this.richTextStyles={},this._nextStyleNameId=Eo()}function cy(t){var e,n,i,o,r,a,s,l,u,h,c,p=t.series,d=t.dataIndex,f=t.multipleSeries,g=p.getData(),y=g.mapDimensionsAll("defaultedTooltip"),m=y.length,v=p.getRawValue(d),_=G(v),t=sy(p,d);function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(ty("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1this.getShallow("animationThreshold")?!1:t)},my.prototype.restoreData=function(){this.dataTask.dirty()},my.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Wd.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},my.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},my.prototype.getProgressive=function(){return this.get("progressive")},my.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},my.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},my.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),o=0;oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function wy(e,n){E(pt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,V(Sy,n))})}function Sy(t,e){t=My(t);return t&&t.setOutputEnd((e||this).count()),e}function My(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){e=n.currentTask;return!e||(n=e.agentStubMap)&&(e=n.get(t.uid)),e}}T(yy,Jn),T(yy,Wd),Mr(yy,yd);var Iy=(Ty.prototype.init=function(t,e){},Ty.prototype.render=function(t,e,n,i){},Ty.prototype.dispose=function(t,e){},Ty.prototype.updateView=function(t,e,n,i){},Ty.prototype.updateLayout=function(t,e,n,i){},Ty.prototype.updateVisual=function(t,e,n,i){},Ty.prototype.blurSeries=function(t,e){},Ty);function Ty(){this.group=new io,this.uid=op("viewComponent")}function Cy(){var r=ur();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,o=!!e.progressiveRender,t=e.large=!(!n||!n.large),n=e.progressiveRender=!(!n||!n.progressiveRender);return!(i==t&&o==n)&&"reset"}}Sr(Iy),Dr(Iy);var Dy=ur(),Ay=Cy(),ky=(Ly.prototype.init=function(t,e){},Ly.prototype.render=function(t,e,n,i){},Ly.prototype.highlight=function(t,e,n,i){Oy(t.getData(),i,"emphasis")},Ly.prototype.downplay=function(t,e,n,i){Oy(t.getData(),i,"normal")},Ly.prototype.remove=function(t,e){this.group.removeAll()},Ly.prototype.dispose=function(t,e){},Ly.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Ly.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Ly.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Ly.markUpdateMethod=function(t,e){Dy(t).updateMethod=e},Ly.protoInitialize=void(Ly.prototype.type="chart"),Ly);function Ly(){this.group=new io,this.uid=op("viewChart"),this.renderTask=ng({plan:Ry,reset:Ny}),this.renderTask.context={view:this}}function Py(t,e,n){t&&("emphasis"===e?zl:Bl)(t,n)}function Oy(e,t,n){var i,o=lr(e,t),r=t&&null!=t.highlightKey?(i=t.highlightKey,t=null==(t=rl[i])&&ol<=32?rl[i]=ol++:t):null;null!=o?E(qo(o),function(t){Py(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){Py(t,n,r)})}function Ry(t){return Ay(t.model)}function Ny(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,a=t.view,t=o&&Dy(o).updateMethod,t=r?"incrementalPrepareRender":t&&a[t]?t:"render";return"render"!==t&&a[t](e,n,i,o),Ey[t]}Sr(ky,["dispose"]),Dr(ky);var Ey={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},zy="\0__throttleOriginMethod",By="\0__throttleRate",Vy="\0__throttleType";function Gy(t,o,r){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}o=o||0;function e(){for(var t=[],e=0;en.blockIndex?n.step:null,i=i&&i.modDataCount;return{step:n,modBy:null!=i?Math.ceil(i/n):null,modDataCount:i}}},$y.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},$y.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,e=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:i,large:e}},$y.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=ct();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},$y.prototype.prepareStageTasks=function(){var i=this._stageTaskMap,o=this.api.getModel(),r=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,{}),n="",n='"reset" and "overallReset" must not be both specified.';ot(!(t.reset&&t.overallReset),n),t.reset&&this._createSeriesStageTask(t,e,o,r),t.overallReset&&this._createOverallStageTask(t,e,o,r)},this)},$y.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},$y.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},$y.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},$y.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}E(t,function(i,t){var e,n,o,r,a;u.visualType&&u.visualType!==i.visualType||(e=(r=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=r.overallTask)?((r=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),r.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},$y.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},$y.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},$y.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},$y.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=ct(),e=n.seriesType,t=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||ng({plan:nm,reset:im,count:am}));e.context={model:t,ecModel:i,api:o,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:r},r._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):e?i.eachRawSeriesByType(e,l):t&&t(i,o).each(l)},$y.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||ng({reset:Jy});r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o};var a=r.agentStubMap,s=r.agentStubMap=ct(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,e="";function p(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(c=!0,ng({reset:Qy,onDirty:em})));e.context={model:t,overallProgress:h},e.agent=r,e.__block=h,o._pipe(t,e)}e='"createOnAllSeries" do not supported for "overallReset", becuase it will block all streams.',ot(!t.createOnAllSeries,e),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(h=!1,E(n.getSeries(),p)),c&&r.dirty()},$y.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},$y.wrapStageHandler=function(t,e){return(t=F(t)?{overallReset:t,seriesType:function(t){sm=null;try{t(lm,um)}catch(t){}return sm}(t)}:t).uid=op("stageHandler"),e&&(t.visualType=e),t},$y);function $y(t,e,n,i){this._stageTaskMap=ct(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Jy(t){t.overallReset(t.ecModel,t.api,t.payload)}function Qy(t){return t.overallProgress&&tm}function tm(){this.agent.dirty(),this.getDownstream().dirty()}function em(){this.agent&&this.agent.dirty()}function nm(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function im(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=qo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1C.maxTileWidth&&r("maxTileWidth"),o>C.maxTileHeight&&r("maxTileHeight")}return{width:Math.max(1,Math.min(t,C.maxTileWidth)),height:Math.max(1,Math.min(o,C.maxTileHeight))}}();b&&(b.width=S.width*M,b.height=S.height*M,y=b.getContext("2d"));(function(){y&&(y.clearRect(0,0,b.width,b.height),C.backgroundColor&&(y.fillStyle=C.backgroundColor,y.fillRect(0,0,b.width,b.height)));for(var t=0,e=0;e>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),o=s+=o,r=l+=r;i.push([s/n,l/n])}return i}function Hv(t,o){return L(R((t=function(t){if(!t.UTF8Encoding)return t;var e=(t=t).UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()}return i.connectedBackgroundColor&&f.add(new Fs({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),E(p,function(t){t=new Ps({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png"))}return this.getDataURL(i)}},z_.prototype.convertToPixel=function(t,e){return x_(this,"convertToPixel",t,e)},z_.prototype.convertFromPixel=function(t,e){return x_(this,"convertFromPixel",t,e)},z_.prototype.containPixel=function(t,i){var o;if(!this._disposed)return E(cr(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?o=o||!!e.containPoint(i):"seriesModels"===n?(e=this._chartsMap[t.__viewId])&&e.containPoint?o=o||e.containPoint(i,t):console.warn(n+": "+(e?"The found component do not support containPoint.":"No view mapping to the found component.")):console.warn(n+": containPoint is not supported")},this)},this),!!o;W_(this.id)},z_.prototype.getVisual=function(t,e){var n=cr(this._model,t,{defaultMainType:"series"}),t=n.seriesModel;t||console.warn("There is no specified seires model");t=t.getData(),n=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?t.indexOfRawIndex(n.dataIndex):null;return null!=n?fm(t,n,e):gm(t,e)},z_.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},z_.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},z_.prototype._initEvents=function(){var t,n,i,l=this;E(H_,function(s){function t(t){var n,e,i,o=l.getModel(),r=t.target,a="globalout"===s;a?n={}:r&&_m(r,function(t){var e=il(t);if(e&&null!=e.dataIndex){t=e.dataModel||o.getSeriesByIndex(e.seriesIndex);return n=t&&t.getDataParams(e.dataIndex,e.dataType)||{},1}return e.eventData&&(n=P({},e.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&o.getComponent(e,i))&&l["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],a||e&&i||console.warn("model or view can not be found by params"),n.event=t,n.type=s,l._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:e,view:i},l.trigger(s,n))}t.zrEventfulCallAtLast=!0,l._zr.on(s,t,l)}),E(Y_,function(t,e){l._messageCenter.on(e,function(t){this.trigger(e,t)},l)}),E(["selectchanged"],function(e){l._messageCenter.on(e,function(t){this.trigger(e,t)},l)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(vm("map","selectchanged",n,e,t),vm("pie","selectchanged",n,e,t)):"select"===t.fromAction?(vm("map","selected",n,e,t),vm("pie","selected",n,e,t)):"unselect"===t.fromAction&&(vm("map","unselected",n,e,t),vm("pie","unselected",n,e,t))})},z_.prototype.isDisposed=function(){return this._disposed},z_.prototype.clear=function(){this._disposed?W_(this.id):this.setOption({series:[]},!0)},z_.prototype.dispose=function(){var t,e,n;this._disposed?W_(this.id):(this._disposed=!0,yr(this.getDom(),ex,""),e=(t=this)._api,n=t._model,E(t._componentsViews,function(t){t.dispose(n,e)}),E(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete $_[t.id])},z_.prototype.resize=function(t){var e,n;ot(!this[r_],"`resize` should not be called during main process."),this._disposed?W_(this.id):(this._zr.resize(t),n=this._model,this._loadingFX&&this._loadingFX.resize(),n&&(e=n.resetOption("media"),n=t&&t.silent,this[a_]&&(null==n&&(n=this[a_].silent),e=!0,this[a_]=null),this[r_]=!0,e&&y_(this),__.update.call(this,{type:"resize",animation:P({duration:0},t&&t.animation)}),this[r_]=!1,S_.call(this,n),M_.call(this,n)))},z_.prototype.showLoading=function(t,e){var n;this._disposed?W_(this.id):(Y(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),K_[t]?(n=K_[t](this._api,e),e=this._zr,this._loadingFX=n,e.add(n)):console.warn("Loading effects "+t+" not exists."))},z_.prototype.hideLoading=function(){this._disposed?W_(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},z_.prototype.makeActionFromEvent=function(t){var e=P({},t);return e.type=Y_[t.type],e},z_.prototype.dispatchAction=function(t,e){var n;this._disposed?W_(this.id):(Y(e)||(e={silent:!!e}),U_[t.type]&&this._model&&(this[r_]?this._pendingActions.push(t):(n=e.silent,w_.call(this,t,n),(e=e.flush)?this._zr.flush():!1!==e&&w.browser.weChat&&this._throttledZrFlush(),S_.call(this,n),M_.call(this,n))))},z_.prototype.updateLabelLayout=function(){i_.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},z_.prototype.appendData=function(t){var e;this._disposed?W_(this.id):(e=t.seriesIndex,e=this.getModel().getSeriesByIndex(e),ot(t.data&&e),e.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},z_.internalField=(y_=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),m_(t,!0),m_(t,!1),e.plan()},m_=function(t,r){for(var a=t._model,s=t._scheduler,l=r?t._componentsViews:t._chartsViews,u=r?t._componentsMap:t._chartsMap,h=t._zr,c=t._api,e=0;el.get("hoverLayerThreshold")&&!w.node&&!w.worker&&l.eachSeries(function(t){t.preventUsingHoverLayer||(t=s._chartsMap[t.__viewId]).__alive&&t.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),i_.trigger("series:afterupdate",t,e,n)},O_=function(t){t[s_]=!0,t.getZr().wakeUp()},R_=function(t){t[s_]&&(t.getZr().storage.traverse(function(t){Jh(t)||B_(t)}),t[s_]=!1)},L_=function(n){return u(t,e=of),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){zl(t,e),O_(n)},t.prototype.leaveEmphasis=function(t,e){Bl(t,e),O_(n)},t.prototype.enterBlur=function(t){Vl(t),O_(n)},t.prototype.leaveBlur=function(t){Gl(t),O_(n)},t.prototype.enterSelect=function(t){Fl(t),O_(n)},t.prototype.leaveSelect=function(t){Hl(t),O_(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(P_=function(i){function o(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},lb.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},lb.prototype.getExtent=function(){return this._extent.slice()},lb.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},lb.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},lb.prototype.isBlank=function(){return this._isBlank},lb.prototype.setBlank=function(t){this._isBlank=t},lb);function lb(t){this._setting=t||{},this._extent=[1/0,-1/0]}Dr(sb);var ub=0,hb=(cb.createByAxisModel=function(t){var e=t.option,t=e.data,t=t&&L(t,pb);return new cb({categories:t,needCollect:!t,deduplication:!1!==e.dedplication})},cb.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},cb.prototype.parseAndCollect=function(t){var e=this._needCollect;if("string"!=typeof t&&!e)return t;if(e&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,n;var n,i=this._getOrCreateMap();return null==(n=i.get(t))&&(e?(n=this.categories.length,this.categories[n]=t,i.set(t,n)):n=NaN),n},cb.prototype._getOrCreateMap=function(){return this._map||(this._map=ct(this.categories))},cb);function cb(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++ub}function pb(t){return Y(t)&&null!=t.value?t.value:t+""}var db=vo;function fb(t,e,n,i){var o={},r=t[1]-t[0],e=o.interval=Lo(r/e,!0);null!=n&&ei[1]&&(i[0]=i[1]),o}function gb(t){return xo(t)+2}function yb(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function mb(t,e){return t>=e[0]&&t<=e[1]}function vb(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function _b(t,e){return t*(e[1]-e[0])+e[0]}var xb,bb=(u(wb,xb=sb),wb.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},wb.prototype.contain=function(t){return mb(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},wb.prototype.normalize=function(t){return vb(t=this._getTickNumber(this.parse(t)),this._extent)},wb.prototype.scale=function(t){return t=Math.round(_b(t,this._extent)),this.getRawOrdinalNumber(t)},wb.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},wb.prototype.getMinorTicks=function(t){},wb.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o=t},wb.prototype.getOrdinalMeta=function(){return this._ordinalMeta},wb.prototype.niceTicks=function(){},wb.prototype.niceExtent=function(){},wb.type="ordinal",wb);function wb(t){var e=xb.call(this,t)||this;e.type="ordinal";t=e.getSetting("ordinalMeta");return G(t=t||new hb({}))&&(t=new hb({categories:L(t,function(t){return Y(t)?t.value:t})})),e._ordinalMeta=t,e._extent=e.getSetting("extent")||[0,t.categories.length-1],e}sb.registerClass(bb);var Sb,Mb=vo,Ib=(u(Tb,Sb=sb),Tb.prototype.parse=function(t){return t},Tb.prototype.contain=function(t){return mb(t,this._extent)},Tb.prototype.normalize=function(t){return vb(t,this._extent)},Tb.prototype.scale=function(t){return _b(t,this._extent)},Tb.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Tb.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Tb.prototype.getInterval=function(){return this._interval},Tb.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=gb(t)},Tb.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(!e)return r;n[0]s&&(t?r.push({value:Mb(s+e,o)}):r.push({value:n[1]})),r},Tb.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&h=g[0]&&y<=g[1]&&a++)}h=(g[1]-g[0])/d;if(1.5*h=g[0]&&t.value<=g[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n);n=Wb.length,n=Math.min(function(t,e,n,i){for(;n>>1;t[o][1]a[1];u(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift());i&&u(a[0],e[0].coord)&&e.unshift({coord:a[0]});u(a[1],r.coord)&&(i?r.coord=a[1]:e.pop());i&&u(r.coord,a[1])&&e.push({coord:a[1]});function u(t,e){return t=vo(t),e=vo(e),l?e=h&&c<=e+1){for(var n=[],i=0;i=h&&c<=o+1)return function(t){for(var e=0,n=t.length,i=0,o=0;e\n\r<"))},sM);function sM(t,e,n,i){this.type="svg",this.refreshHover=lM("refreshHover"),this.pathToImage=lM("pathToImage"),this.configLayer=lM("configLayer"),this.root=t,this.storage=e,this._opts=n=P({},n||{});var o=cS("svg");o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var r=cS("g");o.appendChild(r);e=cS("g");o.appendChild(e),this._gradientManager=new GS(i,e),this._patternManager=new YS(i,e),this._clipPathManager=new qS(i,e),this._shadowManager=new JS(i,e);i=document.createElement("div");i.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=e,this._backgroundRoot=r,this._viewport=i,t.appendChild(i),i.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]}function lM(t){return function(){x('In SVG mode painter not support method "'+t+'"')}}function uM(){return!1}function hM(t,e,n){var i=D(),o=e.getWidth(),r=e.getHeight(),e=i.style;return e&&(e.position="absolute",e.left="0",e.top="0",e.width=o+"px",e.height=r+"px",i.setAttribute("data-zr-dom-id",t)),i.width=o*n,i.height=r*n,i}var cM,pM=(u(dM,cM=Gt),dM.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},dM.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},dM.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},dM.prototype.setUnpainted=function(){this.__firstTimePaint=!0},dM.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=hM("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},dM.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var l=[],u=this.maxRepaintRectCount,h=!1,c=new Li(0,0,0,0);function o(t){if(t.isFinite()&&!t.isZero())if(0===l.length)(e=new Li(0,0,0,0)).copy(t),l.push(e);else{for(var e,n=!1,i=1/0,o=0,r=0;r=u}}for(var r,a=this.__startIndex;ao[0]){for(l=0;lt);l++);s=i[o[l]]}o.splice(l+1,0,t),(i[t]=e).virtual||(s?(s=s.dom).nextSibling?a.insertBefore(e.dom,s.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.__painter=this}else x("Layer of zlevel "+t+" is not valid")},mM.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;iu[h-1].coord&&(u.reverse(),c.reverse());e=function(t,e){var n,i,o=[],r=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:ln((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return!1;return!0}(o,e))){var r=e.mapDimension(o.dim),a={};return E(o.getViewLabels(),function(t){t=o.scale.getRawOrdinalNumber(t.tickValue);a[t]=1}),function(t){return!a.hasOwnProperty(e.get(r,t))}}}}function lI(t){for(var e,n,i=t.length/2;0e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?0<=o.height?"bottom":"top":0<=o.width?"right":"left",u=Oc(i);Pc(t,u,{labelFetcher:r,labelDataIndex:n,defaultText:bM(r.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});l=t.getTextContent();s&&l&&(s=i.get(["label","position"]),t.textConfig.inside="middle"===s||null,function(t,e,n,i){if("number"!=typeof i)if(G(e))t.setTextConfig({rotation:0});else{var o,r=t.shape,a=r.clockwise?r.startAngle:r.endAngle,s=r.clockwise?r.endAngle:r.startAngle,l=(a+s)/2,n=n(e);switch(n){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=l;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:return t.setTextConfig({rotation:0})}e=1.5*Math.PI-o;"middle"===n&&e>Math.PI/2&&e<1.5*Math.PI&&(e-=Math.PI),t.setTextConfig({rotation:e})}else t.setTextConfig({rotation:i})}(t,"outside"===s?h:s,UI(a),i.get(["label","rotate"]))),Hc(l,u,r.getRawValue(n),function(t){return wM(e,t)});n=i.getModel(["emphasis"]);ql(t,n.get("focus"),n.get("blurScope")),Ql(t,i),null!=(o=o).startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(t.style.fill="none",t.style.stroke="none",E(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var XI,ZI=function(){},jI=(u(qI,XI=Ss),qI.prototype.getDefaultShape=function(){return new ZI},qI.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,o=this.__baseDimIdx,r=0;rh?s:a,(i=Math.abs(e.label.y-h))>n.maxY&&(o=e.label.x-u-e.len2*p,r=c+e.len,r=Math.abs(o)Math.PI/2&&(h-=Math.PI):h=0),k=!!h,f.x=r,f.y=a,f.rotation=h,f.setStyle({verticalAlign:"middle"}),i?(f.setStyle({align:l}),(c=f.states.select)&&(c.x+=f.x,c.y+=f.y)):((h=f.getBoundingRect().clone()).applyTransform(f.getComputedTransform()),c=(f.style.margin||0)+2.1,h.y-=c/2,h.height+=c,A.push({label:f,labelLine:g,position:v,len:M,len2:I,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new bi(e,n),linePoints:s,textAlign:l,labelDistance:_,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:h})),p.setTextConfig({inside:i}))}),!k&&t.get("avoidLabelOverlap")&&function(t,e,n,i,o,r,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p=n.r0}},gT.type="pie",gT);function gT(){var t=null!==dT&&dT.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}function yT(t,e,n){e=G(e)?{coordDimensions:e}:P({encodeDefine:t.getEncode()},e);var i=t.getSource(),e=Qx(i,e).dimensions,t=new $x(e,t);return t.initData(i,n),t}var mT=(vT.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},vT.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},vT.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},vT.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},vT);function vT(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var _T,xT=(u(bT,_T=yy),bT.prototype.init=function(t){_T.prototype.init.apply(this,arguments),this.legendVisualProvider=new mT(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(t)},bT.prototype.mergeOption=function(){_T.prototype.mergeOption.apply(this,arguments)},bT.prototype.getInitialData=function(){return yT(this,{coordDimensions:["value"],encodeDefaulter:V(Od,this)})},bT.prototype.getDataParams=function(t){var e=this.getData(),n=_T.prototype.getDataParams.call(this,t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=So(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},bT.prototype._defaultLabelLine=function(t){Ko(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},bT.type="series.pie",bT.defaultOption={zlevel:0,z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},bT);function bT(){return null!==_T&&_T.apply(this,arguments)||this}var wT,ST=(u(MT,wT=yy),MT.prototype.getInitialData=function(t,e){return ab(null,this,{useEncodeDefaulter:!0})},MT.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},MT.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},MT.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},MT.type="series.scatter",MT.dependencies=["grid","polar","geo","singleAxis","calendar"],MT.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},MT);function MT(){var t=null!==wT&&wT.apply(this,arguments)||this;return t.type=MT.type,t.hasSymbolVisual=!0,t}var IT,TT=function(){},CT=(u(DT,IT=Ss),DT.prototype.getDefaultShape=function(){return new TT},DT.prototype.buildPath=function(t,e){var n=e.points,i=e.size,o=this.symbolProxy,r=o.shape,e=t.getContext?t.getContext():t;if(e&&i[0]<4)this._ctx=e;else{this._ctx=null;for(var a=0;ae[1]&&e.reverse(),e},JT.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},JT.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},JT);function JT(t,e,n,i,o){n=KT.call(this,t,e,n)||this;return n.index=0,n.type=i||"value",n.position=o||"bottom",n}function QT(t,e,n){n=n||{};var i=t.coordinateSystem,o=e.axis,r={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,h=i.getRect(),t=[h.x,h.x+h.width,h.y,h.y+h.height],o={left:0,right:1,top:0,bottom:1,onZero:2},i=e.get("offset")||0,h="x"===u?[t[2]-i,t[3]+i]:[t[0]-i,t[1]+i];a&&(i=a.toGlobalCoord(a.dataToCoord(0)),h[o.onZero]=Math.max(Math.min(i,h[1]),h[0])),r.position=["y"===u?h[o[l]]:t[0],"x"===u?h[o[l]]:t[3]],r.rotation=Math.PI/2*("x"===u?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=a?h[o[s]]-h[o.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Q(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);e=e.get(["axisLabel","rotate"]);return r.labelRotate="top"===l?-e:e,r.z2=1,r}function tC(t){return"cartesian2d"===t.get("coordinateSystem")}function eC(o){var r={xAxisModel:null,yAxisModel:null};return E(r,function(t,e){var n=e.replace(/Model$/,""),i=o.getReferringComponents(n,dr).models[0];if(1,!i)throw new Error(n+' "'+et(o.get(n+"Index"),o.get(n+"Id"),0)+'" not found');r[e]=i}),r}var nC=(iC.prototype.getRect=function(){return this._rect},iC.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),E(n.x,function(t){uw(t.scale,t.model)}),E(n.y,function(t){uw(t.scale,t.model)});var i={};E(n.x,function(t){rC(n,"y",t,i)}),E(n.y,function(t){rC(n,"x",t,i)}),this.resize(this.model,e)},iC.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),t=!n&&t.get("containLabel"),a=rd(i,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var o=this._axesList;function r(){E(o,function(t){var e,n,i=t.isHorizontal(),o=i?[0,a.width]:[0,a.height],r=t.inverse?1:0;t.setExtent(o[r],o[1-r]),t=t,e=i?a.x:a.y,i=t.getExtent(),n=i[0]+i[1],t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}})}r(),t&&(E(o,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=dw(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]),a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i))}),r()),E(this._coordsList,function(t){t.calcAffineTransform()})},iC.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},iC.prototype.getAxes=function(){return this._axesList.slice()},iC.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}Y(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;iu[1]?-1:1,a=["start"===s?u[0]-a*l:"end"===s?u[1]+a*l:(u[0]+u[1])/2,dC(s)?t.labelOffset+o*l:0],null!=(l=e.get("nameRotate"))&&(l=l*sC/180),dC(s)?c=lC.innerTextLayout(t.rotation,null!=l?l:t.rotation,o):(c=function(t,e,n,i){var o,t=Io(n-t),i=i[0]>i[1],i="start"===e&&!i||"start"!==e&&i;i=To(t-sC/2)?(o=i?"bottom":"top","center"):To(t-1.5*sC)?(o=i?"top":"bottom","center"):(o="middle",t<1.5*sC&&sC/2l[1]&&l.reverse(),(o=null==o||o>l[1]?l[1]:o)n[0]&&isFinite(u)&&isFinite(n[0]););else{i=o.getTicks().length-1;hp.x)||(u-=Math.PI)),r=t?"left":"right",p=(m=(y=s.getModel("label")).get("rotate"))*(Math.PI/180),(t=l.getTextContent())&&(l.setTextConfig({position:y.get("position")||r,rotation:null==m?-u:p,origin:"center"}),t.setStyle("verticalAlign","middle")));s=s.get(["emphasis","focus"]),s="ancestor"===s?a.getAncestorsIndices():"descendant"===s?a.getDescendantIndices():null;s&&(il(i).focus=s),function(t,e,n,i,o,r,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&Kh(g=g||(i.__edge=new xh({shape:OA(h,c,p,o,o)})),{shape:OA(h,c,p,r,a)},t);else if("polyline"===u){if("orthogonal"!==h)throw new Error("The polyline edgeShape can only be used in orthogonal layout");if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,m=[],v=0;ve&&(e=i.height)}this.height=e+1},UA.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;er&&(r=t.depth)});var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:r;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),o.data},tk.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},tk.prototype.setZoom=function(t){this.option.zoom=t},tk.prototype.setCenter=function(t){this.option.center=t},tk.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,o=i.root.children[0],r=i.getNodeByDataIndex(t),t=r.getValue(),a=r.name;r&&r!==o;)a=r.parentNode.name+"."+a,r=r.parentNode;return ty("nameValue",{name:a,value:t,noValue:isNaN(t)||null==t})},tk.prototype.getDataParams=function(t){var e=JA.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treeAncestors=$A(t,this),e},tk.type="series.tree",tk.layoutMode="box",tk.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},tk);function tk(){var t=null!==JA&&JA.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}function ek(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var r=o.length-1;0<=r;r--)i.push(o[r])}}function nk(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),o=0,r=0,a=null;a="radial"===i?(o=2*Math.PI,r=Math.min(n.height,n.width)/2,yA(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=n.width,r=n.height,yA());e=t.getData().tree.root,n=e.children[0];{var s,l,u,h,c,p,d,f,g;n&&(function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,i=[t];e=i.pop();)if(n=e.children,e.isExpand&&n.length)for(var o=n.length-1;0<=o;o--){var r=n[o];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(r)}}(e),function(t,e,n){for(var i,o=[t],r=[];i=o.pop();)if(r.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sl.getLayout().x&&(l=t),t.depth>u.depth&&(u=t)}),a=s===l?1:a(s,l)/2,h=a-s.getLayout().x,f=d=p=c=0,"radial"===i?(c=o/(l.getLayout().x+a+h),p=r/(u.depth-1||1),ek(n,function(t){d=(t.getLayout().x+h)*c,f=(t.depth-1)*p;var e=mA(d,f);t.setLayout({x:e.x,y:e.y,rawX:d,rawY:f},!0)})):"RL"===(g=t.getOrient())||"LR"===g?(p=r/(l.getLayout().x+a+h),c=o/(u.depth-1||1),ek(n,function(t){f=(t.getLayout().x+h)*p,d="LR"===g?(t.depth-1)*c:o-(t.depth-1)*c,t.setLayout({x:d,y:f},!0)})):"TB"!==g&&"BT"!==g||(c=o/(l.getLayout().x+a+h),p=r/(u.depth-1||1),ek(n,function(t){d=(t.getLayout().x+h)*c,f="TB"===g?(t.depth-1)*p:r-(t.depth-1)*p,t.setLayout({x:d,y:f},!0)})))}}(t,e)})}function ik(t){t.eachSeriesByType("tree",function(t){var n=t.getData();n.tree.eachNode(function(t){var e=t.getModel().getModel("itemStyle").getItemStyle();P(n.ensureUniqueItemVisual(t.dataIndex,"style"),e)})})}var ok=function(){},rk=["treemapZoomToNode","treemapRender","treemapMove"];function ak(t){for(var e=0;e=i.length||t===i[t.depth])&&(e=eL(r,u,t,e,p,o),n(t,e,i,o))})):(c=Kk(u),h.fill=c)}}(e,{},t.getViewRoot().getAncestors(),t)}};function qk(n,i,t){var o=P({},i),r=t.designatedVisualItemStyle;return E(["color","colorAlpha","colorSaturation"],function(t){r[t]=i[t];var e=n.get(t);(r[t]=null)!=e&&(o[t]=e)}),o}function Kk(t){var e=Jk(t,"color");if(e){var n=Jk(t,"colorAlpha"),t=Jk(t,"colorSaturation");return t&&(e=un(e,null,null,t)),e=n?hn(e,n):e}}function $k(t,e){return null!=e?un(e,null,null,t):null}function Jk(t,e){e=t[e];if(null!=e&&"none"!==e)return e}function Qk(t,e,n,i,o,r){if(r&&r.length){var a=tL(e,"color")||null!=o.color&&"none"!==o.color&&(tL(e,"colorAlpha")||tL(e,"colorSaturation"));if(a){r=e.get("visualMin"),o=e.get("visualMax"),n=n.dataExtent.slice();null!=r&&rn[1]&&(n[1]=o);e=e.get("colorMappingBy"),a={type:a.name,dataExtent:n,visual:a.range};"color"!==a.type||"index"!==e&&"id"!==e?a.mappingMethod="linear":(a.mappingMethod="category",a.loop=!0);a=new Ok(a);return Zk(a).drColorMappingBy=e,a}}}function tL(t,e){t=t.get(e);return G(t)&&t.length?{name:e,range:t}:null}function eL(t,e,n,i,o,r){var a,s=P({},e);return o&&(t="index"===(e="color"===(a=o.type)&&Zk(o).drColorMappingBy)?i:"id"===e?r.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension")),s[a]=o.mapValueToVisual(t)),s}var nL=Math.max,iL=Math.min,oL=Q,rL=E,aL=["itemStyle","borderWidth"],sL=["itemStyle","gapWidth"],lL=["upperLabel","show"],uL=["upperLabel","height"],hL={seriesType:"treemap",reset:function(t,e,n,i){var o,r=n.getWidth(),a=n.getHeight(),s=t.option,l=rd(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),u=s.size||[],h=mo(oL(l.width,u[0]),r),c=mo(oL(l.height,u[1]),a),n=i&&i.type,u=jA(i,["treemapZoomToNode","treemapRootToNode"],t),i="treemapRender"===n||"treemapMove"===n?i.rootRect:null,p=t.getViewRoot(),d=qA(p);"treemapMove"!==n&&(c="treemapZoomToNode"===n?function(t,e,n,i,o){var r,a=(e||{}).node,s=[i,o];if(!a||a===n)return s;var n=i*o,l=n*t.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var u=0,h=r.children,c=0,p=h.length;ca[1]&&(a[1]=t)})):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(!i)return n;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;0<=l;l--){var u=o["asc"===i?a-l-1:l].getValue();u/n*en[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;c "+p)),u++)}var d,i=n.get("coordinateSystem");"cartesian2d"===i||"polar"===i?d=ab(t,n):(C(i=(i=sf.get(i))&&i.dimensions||[],"value")<0&&i.concat(["value"]),i=Qx(t,{coordDimensions:i,encodeDefine:n.getEncode()}).dimensions,(d=new $x(i,n)).initData(t));n=new $x(["value"],n);return n.initData(l,s),o&&o(d,n),NA({mainData:d,struct:r,structAttr:"graph",datas:{node:d,edge:n},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}T(SP,CP("hostGraph","data")),T(IP,CP("hostGraph","edgeData"));var AP,kP=(u(LP,AP=yy),LP.prototype.init=function(t){AP.prototype.init.apply(this,arguments);var e=this;function n(){return e._categoriesData}this.legendVisualProvider=new mT(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},LP.prototype.mergeOption=function(t){AP.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},LP.prototype.mergeDefaultAndTheme=function(t){AP.prototype.mergeDefaultAndTheme.apply(this,arguments),Ko(t,"edgeLabel",["show"])},LP.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[],r=this;if(i&&n){xL(t=this)&&(t.__curvenessList=[],t.__edgeMap={},bL(t));n=DP(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=ep.prototype.getModel;function i(t,e){e=n.call(this,t,e);return e.resolveParentPath=o,e}function o(t){if(!t||"label"!==t[0]&&"label"!==t[1])return t;var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=o,t.getModel=i,t})});return E(n.edges,function(t){var e,n,i;e=t.node1,n=t.node2,i=this,t=t.dataIndex,xL(i)&&(e=wL(e,n,i),i=(n=i.__edgeMap)[SL(e)],n[e]&&!i?n[e].isForward=!0:i&&n[e]&&(i.isForward=!0,n[e].isForward=!1),n[e]=n[e]||[],n[e].push(t))},this),n.data}},LP.prototype.getGraph=function(){return this.getData().graph},LP.prototype.getEdgeData=function(){return this.getGraph().edgeData},LP.prototype.getCategoriesData=function(){return this._categoriesData},LP.prototype.formatTooltip=function(t,e,n){if("edge"!==n)return cy({series:this,dataIndex:t,multipleSeries:e});var i=this.getData(),e=this.getDataParams(t,n),n=i.graph.getEdgeByIndex(t),t=i.getName(n.node1.dataIndex),i=i.getName(n.node2.dataIndex),n=[];return null!=t&&n.push(t),null!=i&&n.push(i),ty("nameValue",{name:n.join(" > "),value:e.value,noValue:null==e.value})},LP.prototype._updateCategoriesData=function(){var t=L(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new $x(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},LP.prototype.setZoom=function(t){this.option.zoom=t},LP.prototype.setCenter=function(t){this.option.center=t},LP.prototype.isAnimationEnabled=function(){return AP.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},LP.type="series.graph",LP.dependencies=["grid","polar","geo","singleAxis","calendar"],LP.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},LP);function LP(){var t=null!==AP&&AP.apply(this,arguments)||this;return t.type=LP.type,t.hasSymbolVisual=!0,t}var PP={type:"graphRoam",event:"graphRoam",update:"none"};var OP,RP=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},NP=(u(EP,OP=Ss),EP.prototype.getDefaultShape=function(){return new RP},EP.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-n(a)*r*(o/3<=r?1:2),l=e.y-i(a)*r*(o/3<=r?1:2),a=e.angle-Math.PI/2;t.moveTo(s,l),t.lineTo(e.x+n(a)*r,e.y+i(a)*r),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(a)*r,e.y-i(a)*r),t.lineTo(s,l)},EP);function EP(t){t=OP.call(this,t)||this;return t.type="pointer",t}function zP(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var BP,VP=2*Math.PI,GP=(u(FP,BP=ky),FP.prototype.render=function(t,e,n){this.group.removeAll();var i,o,r,a,s,l=t.get(["axisLine","lineStyle","color"]),s=(o=n,r=(i=t).get("center"),a=o.getWidth(),s=o.getHeight(),s=Math.min(a,s),{cx:mo(r[0],o.getWidth()),cy:mo(r[1],o.getHeight()),r:mo(i.get("radius"),s/2)});this._renderMain(t,e,n,l,s),this._data=t.getData()},FP.prototype.dispose=function(){},FP.prototype._renderMain=function(t,e,n,i,o){for(var r=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?TI:qu,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=(l-s)%VP||l===s?(l-s)%VP:VP,g=s,y=0;c&&y=t&&(0===e?0:i[e-1][0])r&&(e[1-i]=e[i]+n.sign*r),e}function DO(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0o*(1-t[0])?(l="jump",a=s-o*(1-t[2])):0<=(a=s-o*t[1])&&(a=s-o*(1-t[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?CO(a,i,r,"all"):l="none"):(a=i[1]-i[0],(i=[PO(0,r[1]*s/a-a/2)])[1]=LO(r[1],i[0]+a),i[0]=i[1]-a),{axisExpandWindow:i,behavior:l}},BO);function BO(t,e,n){this.type="parallel",this._axesMap=ct(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}function VO(t,e){return LO(PO(t,e[0]),e[1])}var GO,FO={create:function(i,o){var r=[];return i.eachComponent("parallel",function(t,e){var n=new zO(t,i,o);n.name="parallel_"+e,n.resize(t,o),(t.coordinateSystem=n).model=t,r.push(n)}),i.eachSeries(function(t){var e;"parallel"===t.get("coordinateSystem")&&(e=t.getReferringComponents("parallel",dr).models[0],t.coordinateSystem=e.coordinateSystem)}),r}},HO=(u(WO,GO=yd),WO.prototype.getAreaSelectStyle=function(){return Ar([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},WO.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=S(t);if(e)for(var n=e.length-1;0<=n;n--)_o(e[n])},WO.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;it.getWidth()||n<0||n>t.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=cR(t,e,n);if(!t._dragging)for(var a=0;ad&&(d=y.depth),g.setLayout({depth:m?y.depth:c},!0),"vertical"===r?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var v=0;ve);a++);a=Math.min(a-1,o-2)}var s=(e-i[a])/(i[a+1]-i[a]),r=n[a],n=n[a+1];r&&n&&(t.x=r[0]*(1-s)+s*n[0],t.y=r[1]*(1-s)+s*n[1],s=n[0]-r[0],r=n[1]-r[1],t.rotation=-Math.atan2(r,s)-Math.PI/2,this._lastFrame=a,this._lastFramePercent=e,t.ignore=!1)}},ME);function ME(){var t=null!==wE&&wE.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}var IE,TE=function(){this.polyline=!1,this.curveness=0,this.segs=[]},CE=(u(DE,IE=Ss),DE.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},DE.prototype.getDefaultShape=function(){return new TE},DE.prototype.buildPath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var o=0;o ")})},GE.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},GE.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},GE.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},GE.type="series.lines",GE.dependencies=["grid","polar","geo","calendar"],GE.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},GE);function GE(){var t=null!==BE&&BE.apply(this,arguments)||this;return t.type=GE.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}function FE(t){return t=!(t instanceof Array)?[t,t]:t}var HE={seriesType:"lines",reset:function(t){var e=FE(t.get("symbol")),n=FE(t.get("symbolSize")),t=t.getData();return t.setVisual("fromSymbol",e&&e[0]),t.setVisual("toSymbol",e&&e[1]),t.setVisual("fromSymbolSize",n&&n[0]),t.setVisual("toSymbolSize",n&&n[1]),{dataEach:t.hasItemOption?function(t,e){var n=FE((i=t.getItemModel(e)).getShallow("symbol",!0)),i=FE(i.getShallow("symbolSize",!0));n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),i[0]&&t.setItemVisual(e,"fromSymbolSize",i[0]),i[1]&&t.setItemVisual(e,"toSymbolSize",i[1])}:null}}};var WE=(UE.prototype.update=function(t,e,n,i,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,o=this.canvas,h=o.getContext("2d"),c=t.length;o.width=e,o.height=n;for(var p=0;ps[1]||Il[1])continue;I=u.dataToPoint([M,I]),w=new Fs({shape:{x:Math.floor(Math.round(I[0])-r/2),y:Math.floor(Math.round(I[1])-a/2),width:Math.ceil(r),height:Math.ceil(a)},style:S})}else{if(isNaN(d.get(x[1],b)))continue;w=new Fs({z2:1,shape:u.dataToRect([d.get(x[0],b)]).contentShape,style:S})}I=d.getItemModel(b);d.hasItemOption&&(f=(T=I.getModel("emphasis")).getModel("itemStyle").getItemStyle(),g=I.getModel(["blur","itemStyle"]).getItemStyle(),y=I.getModel(["select","itemStyle"]).getItemStyle(),v=T.get("focus"),_=T.get("blurScope"),m=Oc(I));var T=t.getRawValue(b),I="-";T&&null!=T[2]&&(I=T[2]+""),Pc(w,m,{labelFetcher:t,labelDataIndex:b,defaultOpacity:S.opacity,defaultText:I}),w.ensureState("emphasis").style=f,w.ensureState("blur").style=g,w.ensureState("select").style=y,ql(w,v,_),(w.incremental=o)&&(w.states.emphasis.hoverLayer=!0),p.add(w),d.setItemGraphicEl(b,w)}},jE.prototype._renderOnGeo=function(i,t,e,n){var o=e.targetVisuals.inRange,r=e.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new WE;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=i.getViewRect().clone(),u=i.getRoamTransform();l.applyTransform(u);var h,c,p,d,f,g,y,m=Math.max(l.x,0),v=Math.max(l.y,0),_=Math.min(l.width+l.x,n.getWidth()),t=Math.min(l.height+l.y,n.getHeight()),u=_-m,l=t-v,n=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],_=a.mapArray(n,function(t,e,n){e=i.dataToPoint([t,e]);return e[0]-=m,e[1]-=v,e.push(n),e}),t=e.getExtent(),e="visualMap.continuous"===e.type?(a=t,y=e.option.range,n=a[1]-a[0],y=[(y[0]-a[0])/n,(y[1]-a[0])/n],function(t){return t>=y[0]&&t<=y[1]}):(h=t,c=e.getPieceList(),p=e.option.selected,d=h[1]-h[0],f=(c=L(c,function(t){return{interval:[(t.interval[0]-h[0])/d,(t.interval[1]-h[0])/d]}})).length,g=0,function(t){for(var e,n=g;nMath.PI/2?"right":"left"):t&&"center"!==t?"left"===t?(r=u.r0+n,h>Math.PI/2&&(t="right")):"right"===t&&(r=u.r-n,h>Math.PI/2&&(t="left")):(r=(u.r+u.r0)/2,t="center"),i.style.align=t,i.style.verticalAlign=y(e,"verticalAlign")||"middle",i.x=r*c+u.cx,i.y=r*p+u.cy;var r=y(e,"rotate"),e=0;"radial"===r?(e=-h)<-Math.PI/2&&(e+=Math.PI):"tangential"===r?(e=Math.PI/2-h)>Math.PI/2?e-=Math.PI:e<-Math.PI/2&&(e+=Math.PI):"number"==typeof r&&(e=r*Math.PI/180),i.rotation=e}),f.dirtyStyle()},Rz);function Rz(t,e,n,i){var o=Pz.call(this)||this;o.z2=2,o.textConfig={inside:!0},il(o).seriesIndex=e.seriesIndex;var r=new Xs({z2:4,silent:t.getModel().get(["label","silent"])});return o.setTextContent(r),o.updateData(!0,t,e,n,i),o}var Nz="sunburstRootToNode",Ez="sunburstHighlight",zz="sunburstUnhighlight";function Bz(t){t.registerAction({type:Nz,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n=jA(o,[Nz],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=KA(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})}),t.registerAction({type:Ez,update:"none"},function(e,t,n){e=P({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t){t=jA(e,[Ez],t);t&&(e.dataIndex=t.node.dataIndex)}),Uo("highlight","sunburstHighlight"),n.dispatchAction(P(e,{type:"highlight"}))}),t.registerAction({type:zz,update:"updateView"},function(t,e,n){t=P({},t),Uo("downplay","sunburstUnhighlight"),n.dispatchAction(P(t,{type:"downplay"}))})}var Vz,Gz=(u(Fz,Vz=ky),Fz.prototype.render=function(o,r,a,t){var e=this;this.seriesModel=o,this.api=a,this.ecModel=r;var s=o.getData(),l=s.tree.root,n=o.getViewRoot(),u=this.group,h=o.get("renderLabelForZeroData"),i=[];n.eachNode(function(t){i.push(t)});var c,p,d=this._oldChildren||[];!function(n,i){if(0===n.length&&0===i.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){h||!t||t.getValue()||(t=null);t!==l&&e!==l&&(e&&e.piece?t?(e.piece.updateData(!1,t,o,r,a),s.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(u.remove(t.piece),t.piece=null)}(e):t&&(e=new Oz(t,o,r,a),u.add(e),s.setItemGraphicEl(t.dataIndex,e)))}(null==t?null:n[t],null==e?null:i[e])}new Mx(i,n,t,t).add(e).update(e).remove(V(e,null)).execute()}(i,d),c=l,0<(p=n).depth?(e.virtualPiece?e.virtualPiece.updateData(!1,c,o,r,a):(e.virtualPiece=new Oz(c,o,r,a),u.add(e.virtualPiece)),p.piece.off("click"),e.virtualPiece.on("click",function(t){e._rootToNode(p.parentNode)})):e.virtualPiece&&(u.remove(e.virtualPiece),e.virtualPiece=null),this._initEvents(),this._oldChildren=i},Fz.prototype._initEvents=function(){var o=this;this.group.off("click"),this.group.on("click",function(n){var i=!1;o.seriesModel.getViewRoot().eachNode(function(t){var e;!i&&t.piece&&t.piece===n.target&&("rootToNode"===(e=t.getModel().get("nodeClick"))?o._rootToNode(t):"link"!==e||(t=(e=t.getModel()).get("link"))&&Qp(t,e.get("target",!0)||"_blank"),i=!0)})})},Fz.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Nz,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},Fz.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){e=t[0]-n.cx,t=t[1]-n.cy,t=Math.sqrt(e*e+t*t);return t<=n.r&&t>=n.r0}},Fz.type="sunburst",Fz);function Fz(){var t=null!==Vz&&Vz.apply(this,arguments)||this;return t.type=Fz.type,t}var Hz,Wz=(u(Uz,Hz=yy),Uz.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};!function e(t){var n=0;E(t.children,function(t){e(t);var t=t.value;G(t)&&(t=t[0]),n+=t});var i=t.value;G(i)&&(i=i[0]);null!=i&&!isNaN(i)||(i=n);i<0&&(i=0);G(t.value)?t.value[0]=i:t.value=i}(n);var i=this._levelModels=L(t.levels||[],function(t){return new ep(t,this,e)},this),o=YA.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){e=o.getNodeByDataIndex(e),e=i[e.depth];return e&&(t.parentModel=e),t})});return o.data},Uz.prototype.optionUpdated=function(){this.resetViewRoot()},Uz.prototype.getDataParams=function(t){var e=Hz.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=$A(t,this),e},Uz.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},Uz.prototype.getViewRoot=function(){return this._viewRoot},Uz.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},Uz.prototype.enableAriaDecal=function(){sk(this)},Uz.type="series.sunburst",Uz.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},Uz);function Uz(){var t=null!==Hz&&Hz.apply(this,arguments)||this;return t.type=Uz.type,t.ignoreStyleOnData=!0,t}var Yz=Math.PI/180;function Xz(t,e,a){e.eachSeriesByType(t,function(c){var t=c.get("center"),e=c.get("radius");G(e)||(e=[0,e]),G(t)||(t=[t,t]);var n=a.getWidth(),i=a.getHeight(),p=Math.min(n,i),d=mo(t[0],n),f=mo(t[1],i),g=mo(e[0],p/2),o=mo(e[1],p/2),n=-c.get("startAngle")*Yz,y=c.get("minAngle")*Yz,m=c.getData().tree.root,t=c.getViewRoot(),v=t.depth,i=c.get("sort");null!=i&&!function e(t,n){var i=t.children||[];t.children=Zz(i,n);i.length&&E(t.children,function(t){e(t,n)})}(t,i);var r=0;E(t.children,function(t){isNaN(t.getValue())||r++});var _=t.getValue(),x=Math.PI/(_||r)*2,b=0t[1]&&t.reverse(),{coordSys:{type:"polar",cx:i.cx,cy:i.cy,r:t[1],r0:t[0]},api:{coord:function(t){var e,n=o.dataToRadius(t[0]),t=r.dataToAngle(t[1]);return(e=i.coordToPoint([n,t])).push(n,t*Math.PI/180),e},size:B(rB,i)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}};function LB(t){return t instanceof Ss}function PB(t){return t instanceof ta}var OB,RB=(u(NB,OB=ky),NB.prototype.render=function(n,t,i,o){var r=this._data,a=n.getData(),s=this.group,l=UB(n,a,t,i);r||s.removeAll(),a.diff(r).add(function(t){YB(i,null,t,l(t,o),n,s,a)}).remove(function(t){tV(r.getItemGraphicEl(t),n,s)}).update(function(t,e){e=r.getItemGraphicEl(e);YB(i,e,t,l(t,o),n,s,a)}).execute();t=n.get("clip",!0)?QM(n.coordinateSystem,!1,n):null;t?s.setClipPath(t):s.removeClipPath(),this._data=a},NB.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},NB.prototype.incrementalRender=function(t,e,n,i,o){var r=e.getData(),a=UB(e,r,n,i);function s(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var l=t.start;ln)return!0;if(e){t=mC(t).seriesDataCount,i=i.getExtent();return Math.abs(i[0]-i[1])/t>n}return!1},rV.prototype.makeElOption=function(t,e,n,i,o){},rV.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(e=nV(t).pointerEl=new Dc[o.type](iV(e.pointer)),t.add(e))},rV.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=nV(t).labelEl=new Xs(iV(e.label)),t.add(e),sV(e,i))},rV.prototype.updatePointerEl=function(t,e,n){t=nV(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},rV.prototype.updateLabelEl=function(t,e,n,i){t=nV(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),sV(t,i))},rV.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status");if(!r.get("show")||!a||"hide"===a)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=Mc(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ie(t.event)},onmousedown:oV(this._onHandleDragMove,this,0,0),drift:oV(this._onHandleDragMove,this),ondragend:oV(this._onHandleDragEnd,this)}),i.add(o)),uV(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));n=r.get("size");G(n)||(n=[n,n]),o.scaleX=n[0]/2,o.scaleY=n[1]/2,Fy(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},rV.prototype._moveHandleToValue=function(t,e){aV(this._axisPointerModel,!e&&this._moveAnimation,this._handle,lV(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},rV.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,e=this.updateHandleTransform(lV(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=e,n.stopAnimation(),n.attr(lV(e)),nV(n).lastProp=null,this._doDispatchAxisPointer())},rV.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(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}]}))},rV.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},rV.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,t=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),t&&e.remove(t),this._group=null,this._handle=null,this._payloadInfo=null)},rV.prototype.doClear=function(){},rV.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},rV);function rV(){this._dragging=!1,this.animationThreshold=15}function aV(t,e,n,i){!function n(i,t){{if(Y(i)&&Y(t)){var o=!0;return E(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}}(nV(n).lastProp,i)&&(nV(n).lastProp=i,e?Kh(n,i,t):(n.stopAnimation(),n.attr(i)))}function sV(t,e){t[e.get(["label","show"])?"show":"hide"]()}function lV(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function uV(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function hV(t){var e,n=t.get("type"),t=t.getModel(n+"Style");return"line"===n?(e=t.getLineStyle()).fill=null:"shadow"===n&&((e=t.getAreaStyle()).stroke=null),e}function cV(t,e,n,i,o){var r=pV(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Wp(a.get("padding")||0),l=a.getFont(),u=Gi(r,l),h=o.position,c=u.width+s[1]+s[3],n=u.height+s[0]+s[2],u=o.align;"right"===u&&(h[0]-=c),"center"===u&&(h[0]-=c/2);u=o.verticalAlign;"bottom"===u&&(h[1]-=n),"middle"===u&&(h[1]-=n/2),o=h,u=c,c=n,i=(n=i).getWidth(),n=n.getHeight(),o[0]=Math.min(o[0]+u,i)-u,o[1]=Math.min(o[1]+c,n)-c,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0);o=a.get("backgroundColor");o&&"auto"!==o||(o=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:Rc(a,{text:r,font:l,fill:a.getTextColor(),padding:s,backgroundColor:o}),z2:10}}function pV(t,e,n,i,o){t=e.scale.parse(t);var r,a=e.scale.getLabel({value:t},{precision:o.precision}),o=o.formatter;return o&&(r={value:pw(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},E(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,t=e&&e.getDataParams(t);t&&r.seriesData.push(t)}),H(o)?a=o.replace("{value}",a):F(o)&&(a=o(r))),a}function dV(t,e,n){var i=ni();return si(i,i,n.rotation),ai(i,i,n.position),vc([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function fV(t,e,n,i,o,r){var a=lC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),cV(e,i,o,r,{position:dV(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function gV(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function yV(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function mV(t,e,n,i,o,r){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:r,clockwise:!0}}var vV,_V=(u(xV,vV=Zy),xV.prototype.makeElOption=function(t,e,n,i,o){var r,a=n.axis,s=a.grid,l=i.get("type"),u=bV(s,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));l&&"none"!==l&&(r=hV(i),(u=wV[l](a,h,u)).style=r,t.graphicKey=u.type,t.pointer=u),fV(e,t,QT(s.model,n),n,i,o)},xV.prototype.getHandleTransform=function(t,e,n){var i=QT(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);t=dV(e.axis,t,i);return{x:t[0],y:t[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},xV.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),n=bV(r,o).getOtherAxis(o).getGlobalExtent(),r="x"===o.dim?0:1,o=[t.x,t.y];o[r]+=e[r],o[r]=Math.min(a[1],o[r]),o[r]=Math.max(a[0],o[r]);n=(n[1]+n[0])/2,n=[n,n];n[r]=o[r];return{x:o[0],y:o[1],rotation:t.rotation,cursorPoint:n,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][r]}},xV);function xV(){return null!==vV&&vV.apply(this,arguments)||this}function bV(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var wV={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:gV([e,n[0]],[e,n[1]],SV(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:yV([e-i/2,n[0]],[i,o],SV(t))}}};function SV(t){return"x"===t.dim?0:1}var MV,IV=(u(TV,MV=yd),TV.type="axisPointer",TV.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},TV);function TV(){var t=null!==MV&&MV.apply(this,arguments)||this;return t.type=TV.type,t}var CV=ur(),DV=E;function AV(t,e,n){var i;w.node||(i=e.getZr(),CV(i).records||(CV(i).records={}),function(a,s){if(CV(a).initialized)return;function t(t,r){a.on(t,function(e){var i,o,n=(i=s,{dispatchAction:function t(e){var n=o[e.type];n?n.push(e):(e.dispatchAction=t,i.dispatchAction(e))},pendings:o={showTip:[],hideTip:[]}});DV(CV(a).records,function(t){t&&r(t,e,n.dispatchAction)}),function(t,e){var n,i=t.showTip.length,o=t.hideTip.length;i?n=t.showTip[i-1]:o&&(n=t.hideTip[o-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(n.pendings,s)})}CV(a).initialized=!0,t("click",V(LV,"click")),t("mousemove",V(LV,"mousemove")),t("globalout",kV)}(i,e),(CV(i).records[t]||(CV(i).records[t]={})).handler=n)}function kV(t,e,n){t.handler("leave",null,n)}function LV(t,e,n,i){e.handler(t,n,i)}function PV(t,e){w.node||(e=e.getZr(),(CV(e).records||{})[t]&&(CV(e).records[t]=null))}var OV,RV=(u(NV,OV=Iy),NV.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";AV("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},NV.prototype.remove=function(t,e){PV("axisPointer",e)},NV.prototype.dispose=function(t,e){PV("axisPointer",e)},NV.type="axisPointer",NV);function NV(){var t=null!==OV&&OV.apply(this,arguments)||this;return t.type=NV.type,t}function EV(t,e){var n=[],i=t.seriesIndex;if(null==i||!(a=e.getSeriesByIndex(i)))return{point:[]};var o=a.getData(),r=lr(o,t);if(null==r||r<0||G(r))return{point:[]};var a,s=o.getItemGraphicEl(r),e=a.coordinateSystem;return a.getTooltipPosition?n=a.getTooltipPosition(r)||[]:e&&e.dataToPoint?n=t.isStacked?(i=e.getBaseAxis(),a=e.getOtherAxis(i).dim,t=i.dim,i="x"===a||"radius"===a?1:0,a=o.mapDimension(t),(t=[])[i]=o.get(a,r),t[1-i]=o.get(o.getCalculationInfo("stackResultDimension"),r),e.dataToPoint(t)||[]):e.dataToPoint(o.getValues(L(e.dimensions,function(t){return o.mapDimension(t)}),r))||[]:s&&((r=s.getBoundingRect().clone()).applyTransform(s.transform),n=[r.x+r.width/2,r.y+r.height/2]),{point:n,el:s}}var zV=ur();function BV(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||B(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){WV(r)&&(r=EV({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=WV(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||WV(r),p={},d={},o={list:[],map:{}},f={showPointer:V(GV,d),showTooltip:V(FV,o)};E(s.coordSysMap,function(t,e){var o=l||t.containPoint(r);E(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);c||!o||u&&!i||null!=(i=null==(i=i&&i.value)&&!l?n.pointToData(r):i)&&VV(t,i,f,!1,p)})});var g,y,m={};return E(h,function(n,t){var i=n.linkGroup;i&&!d[t]&&E(i.axesInfo,function(t,e){e=d[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,HV(t),HV(n)))),m[n.key]=e)})}),E(m,function(t,e){VV(h[e],t,f,!0,p)}),g=d,i=h,y=p.axesInfo=[],E(i,function(t,e){var n=t.axisPointerModel.option,e=g[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&y.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),function(t,e,n,i){if(WV(e)||!t.list.length)return i({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(o,r,t,a),function(t,e){var n=e.getZr(),i="axisPointerLastHighlights",o=zV(n)[i]||{},r=zV(n)[i]={};E(t,function(t,e){t=t.axisPointerModel.option;"show"===t.status&&E(t.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var a=[],s=[];E(o,function(t,e){r[e]||s.push(t)}),E(r,function(t,e){o[e]||a.push(t)}),s.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),a.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:a})}(h,n),p}}function VV(t,e,n,i,o){var r,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(f=(r=(a=e,s=(d=t).axis,l=s.dim,u=a,h=[],c=Number.MAX_VALUE,p=-1,E(d.seriesModels,function(e,t){var n=e.getData().mapDimensionsAll(l);if(e.getAxisTooltipData)var i=e.getAxisTooltipData(n,a,s),o=i.dataIndices,r=i.nestestValue;else{if(!(o=e.getData().indicesOfNearest(n[0],a,"category"===s.type?.5:null)).length)return;r=e.getData().get(n[0],o[0])}null!=r&&isFinite(r)&&(i=a-r,(n=Math.abs(i))<=c&&((nr?"left":"right",Math.abs(s[1]-u)/t<.3?"middle":s[1]>u?"top":"bottom")}return{position:s,align:l,verticalAlign:u}}(e,n,s,c))},ZV);function ZV(){return null!==YV&&YV.apply(this,arguments)||this}var jV,qV={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:gV(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:mV(e.cx,e.cy,i[0],i[1],(-n-o/2)*r,(o/2-n)*r)}:{type:"Sector",shape:mV(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}},KV=(u($V,jV=yd),$V.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},$V.type="polar",$V.dependencies=["radiusAxis","angleAxis"],$V.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},$V);function $V(){var t=null!==jV&&jV.apply(this,arguments)||this;return t.type=$V.type,t}var JV,jc=(u(QV,JV=yd),QV.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",dr).models[0]},QV.type="polarAxis",QV);function QV(){return null!==JV&&JV.apply(this,arguments)||this}T(jc,mw);var tG,eG=(u(nG,tG=jc),nG.type="angleAxis",nG);function nG(){var t=null!==tG&&tG.apply(this,arguments)||this;return t.type=nG.type,t}var iG,oG=(u(rG,iG=jc),rG.type="radiusAxis",rG);function rG(){var t=null!==iG&&iG.apply(this,arguments)||this;return t.type=rG.type,t}var aG,sG=(u(lG,aG=vp),lG.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},lG);function lG(t,e){return aG.call(this,"radius",t,e)||this}sG.prototype.dataToRadius=vp.prototype.dataToCoord,sG.prototype.radiusToData=vp.prototype.coordToData;var uG,hG=ur(),cG=(u(pG,uG=vp),pG.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},pG.prototype.calculateCategoryInterval=function(){var t=this.getLabelModel(),e=this.scale,n=e.getExtent(),i=e.count();if(n[1]-n[0]<1)return 0;var o=n[0],e=this.dataToCoord(o+1)-this.dataToCoord(o),n=Math.abs(e),e=Gi(null==o?"":o+"",t.getFont(),"center","top"),o=Math.max(e.height,7)/n;isNaN(o)&&(o=1/0);t=Math.max(0,Math.floor(o)),e=hG(this.model),n=e.lastAutoInterval,o=e.lastTickCount;return null!=n&&null!=o&&Math.abs(n-t)<=1&&Math.abs(o-i)<=1&&te[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,t=e-this.cy,e=n*n+t*t,n=this.r,t=this.r0;return e<=n*n&&t*t<=e}}},gG.prototype.convertToPixel=function(t,e,n){return yG(e)===this?this.dataToPoint(n):null},gG.prototype.convertFromPixel=function(t,e,n){return yG(e)===this?this.pointToData(n):null},gG);function gG(t){this.dimensions=dG,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new sG,this._angleAxis=new cG,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}function yG(t){var e=t.seriesModel,t=t.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function mG(t,e){var n,i=this,o=i.getAngleAxis(),r=i.getRadiusAxis();o.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){var e;t.coordinateSystem===i&&(E(yw(e=t.getData(),"radius"),function(t){r.scale.unionExtentFromData(e,t)}),E(yw(e,"angle"),function(t){o.scale.unionExtentFromData(e,t)}))}),uw(o.scale,o.model),uw(r.scale,r.model),"category"!==o.type||o.onBand||(n=o.getExtent(),t=360/o.scale.count(),o.inverse?n[1]+=t:n[1]-=t,o.setExtent(n[0],n[1]))}function vG(t,e){var n;t.type=e.get("type"),t.scale=hw(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType&&(t.inverse=t.inverse!==e.get("clockwise"),n=e.get("startAngle"),t.setExtent(n,n+(t.inverse?-360:360))),(e.axis=t).model=e}var _G={dimensions:dG,create:function(t,s){var l=[];return t.eachComponent("polar",function(t,e){var n=new fG(e+"");n.update=mG;var i=n.getRadiusAxis(),o=n.getAngleAxis(),r=t.findAxisModel("radiusAxis"),a=t.findAxisModel("angleAxis");vG(i,r),vG(o,a),e=n,i=s,o=(r=t).get("center"),a=i.getWidth(),i=i.getHeight(),e.cx=mo(o[0],a),e.cy=mo(o[1],i),e=e.getRadiusAxis(),i=Math.min(a,i)/2,null==(r=r.get("radius"))?r=[0,"100%"]:G(r)||(r=[0,r]),i=[mo(r[0],i),mo(r[1],i)],e.inverse?e.setExtent(i[1],i[0]):e.setExtent(i[0],i[1]),l.push(n),(t.coordinateSystem=n).model=t}),t.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",dr).models[0];if(1,!e)throw new Error('Polar "'+Q(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}}),l}},xG=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function bG(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),n=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function wG(t){return t.getRadiusAxis().inverse?0:1}function SG(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var MG,IG=(u(TG,MG=wC),TG.prototype.render=function(e,t){var n,i,o,r,a,s;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),r=n.getTicksCoords(),a=n.getMinorTicksCoords(),SG(s=L(n.getViewLabels(),function(t){t=S(t);var e=n.scale,e="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(e),t})),SG(r),E(xG,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||DG[t](this.group,e,i,r,a,o,s)},this))},TG.type="angleAxis",TG);function TG(){var t=null!==MG&&MG.apply(this,arguments)||this;return t.type=TG.type,t.axisPointerClass="PolarAxisPointer",t}var CG,DG={axisLine:function(t,e,n,i,o,r){var a=e.getModel(["axisLine","lineStyle"]),s=wG(n),e=s?0:1,a=0===r[e]?new Du({shape:{cx:n.cx,cy:n.cy,r:r[s]},style:a.getLineStyle(),z2:1,silent:!0}):new Qu({shape:{cx:n.cx,cy:n.cy,r:r[s],r0:r[e]},style:a.getLineStyle(),z2:1,silent:!0});a.style.fill=null,t.add(a)},axisTick:function(t,e,n,i,o,r){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=r[wG(n)],i=L(i,function(t){return new fh({shape:bG(n,[l,l+s],t.coord)})});t.add(fc(i,{style:A(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[wG(n)],h=[],c=0;ca?"left":"right",s=Math.abs(r[1]-s)/o<.3?"middle":r[1]>s?"top":"bottom";p&&p[i]&&(Y(i=p[i])&&i.textStyle&&(n=new ep(i.textStyle,d,d.ecModel)));a=new Xs({silent:lC.isLabelSilent(u),style:Rc(n,{x:r[0],y:r[1],fill:n.getTextColor()||u.get(["axisLine","lineStyle","color"]),text:t.formattedLabel,align:a,verticalAlign:s})});l.add(a),g&&((s=lC.makeAxisEventDataBase(u)).targetType="axisLabel",s.value=t.rawLabel,il(a).eventData=s)},this)},splitLine:function(t,e,n,i,o,r){for(var a=e.getModel("splitLine").getModel("lineStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=0;h=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},iF.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},iF.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0==o?n.y+n.height/2:n.x+n.width/2,i},iF.prototype.convertToPixel=function(t,e,n){return oF(e)===this?this.dataToPoint(n):null},iF.prototype.convertFromPixel=function(t,e,n){return oF(e)===this?this.pointToData(n):null},iF);function iF(t,e,n){this.type="single",this.dimension="single",this.dimensions=eF,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}function oF(t){var e=t.seriesModel,t=t.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var rF,aF={create:function(i,o){var r=[];return i.eachComponent("singleAxis",function(t,e){var n=new nF(t,i,o);n.name="single_"+e,n.resize(t,o),t.coordinateSystem=n,r.push(n)}),i.eachSeries(function(t){var e;"singleAxis"===t.get("coordinateSystem")&&(e=t.getReferringComponents("singleAxis",dr).models[0],t.coordinateSystem=e&&e.coordinateSystem)}),r},dimensions:eF},sF=["x","y"],lF=["width","height"],uF=(u(hF,rF=Zy),hF.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.coordinateSystem,s=dF(a,1-pF(r)),l=a.dataToPoint(e)[0],u=i.get("type");u&&"none"!==u&&(a=hV(i),(s=cF[u](r,l,s)).style=a,t.graphicKey=s.type,t.pointer=s),fV(e,t,HG(n),n,i,o)},hF.prototype.getHandleTransform=function(t,e,n){var i=HG(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);t=dV(e.axis,t,i);return{x:t[0],y:t[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},hF.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.coordinateSystem,a=pF(o),n=dF(r,a),o=[t.x,t.y];o[a]+=e[a],o[a]=Math.min(n[1],o[a]),o[a]=Math.max(n[0],o[a]);r=dF(r,1-a),r=(r[1]+r[0])/2,r=[r,r];return r[a]=o[a],{x:o[0],y:o[1],rotation:t.rotation,cursorPoint:r,tooltipOption:{verticalAlign:"middle"}}},hF);function hF(){return null!==rF&&rF.apply(this,arguments)||this}var cF={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:gV([e,n[0]],[e,n[1]],pF(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:yV([e-i/2,n[0]],[i,o],pF(t))}}};function pF(t){return t.isHorizontal()?0:1}function dF(t,e){t=t.getRect();return[t[sF[e]],t[sF[e]]+t[lF[e]]]}var fF,gF=(u(yF,fF=Iy),yF.type="single",yF);function yF(){var t=null!==fF&&fF.apply(this,arguments)||this;return t.type=yF.type,t}var mF,vF=(u(_F,mF=yd),_F.prototype.init=function(t,e,n){var i=ud(t);mF.prototype.init.apply(this,arguments),xF(t,i)},_F.prototype.mergeOption=function(t){mF.prototype.mergeOption.apply(this,arguments),xF(this.option,t)},_F.prototype.getCellSize=function(){return this.option.cellSize},_F.type="calendar",_F.defaultOption={zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},_F);function _F(){var t=null!==mF&&mF.apply(this,arguments)||this;return t.type=_F.type,t}function xF(t,i){var e=t.cellSize,o=G(e)?e:t.cellSize=[e,e];1===o.length&&(o[1]=o[0]);e=L([0,1],function(t){var e,n;return(null!=(e=i)[nd[n=t][0]]||null!=e[nd[n][1]]&&null!=e[nd[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t]});ld(t,i,{type:"box",ignoreSize:e})}var bF,wF=(u(SF,bF=Iy),SF.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),o=o.getOrient(),e=e.getLocaleModel();this._renderDayRect(t,r,i),this._renderLines(t,r,o,i),this._renderYearText(t,r,o,i),this._renderMonthText(t,e,o,i),this._renderWeekText(t,e,r,o,i)},SF.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,l=new Fs({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});n.add(l)}},SF.prototype._renderLines=function(e,t,n,i){var o=this,r=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){p(u.formatedDate);var c=(u=0===h?r.getDateInfo(t.start.y+"-"+t.start.m):u).date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function p(t){o._firstDayOfMonth.push(r.getDateInfo(t)),o._firstDayPoints.push(r.dataToRect([t],!1).tl);t=o._getLinePointsOfOneWeek(e,t,n);o._tlpoints.push(t[0]),o._blpoints.push(t[t.length-1]),s&&o._drawSplitline(t,a,i)}p(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,i),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,i)},SF.prototype._getEdgesPoints=function(t,e,n){t=[t[0].slice(),t[t.length-1].slice()],n="horizontal"===n?0:1;return t[0][n]=t[0][n]-e/2,t[1][n]=t[1][n]+e/2,t},SF.prototype._drawSplitline=function(t,e,n){e=new uh({z2:20,shape:{points:t},style:e});n.add(e)},SF.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,o=i.getDateInfo(e),r=[],a=0;a<7;a++){var s=i.getNextNDay(o.time,a),l=i.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return r},SF.prototype._formatterLabel=function(t,e){return"string"==typeof t&&t?(n=t,E(e,function(t,e){n=n.replace("{"+e+"}",i?Xp(t):t)}),n):"function"==typeof t?t(e):e.nameMap;var n,i},SF.prototype._yearTextPositionControl=function(t,e,n,i,o){var r=e[0],a=e[1],e=["center","bottom"];"bottom"===i?(a+=o,e=["center","top"]):"left"===i?r-=o:"right"===i?(r+=o,e=["center","top"]):a-=o;o=0;return{rotation:o="left"===i||"right"===i?Math.PI/2:o,x:r,y:a,style:{align:e[0],verticalAlign:e[1]}}},SF.prototype._renderYearText=function(t,e,n,i){var o,r,a,s,l,u=t.getModel("yearLabel");u.get("show")&&(o=u.get("margin"),r=(r=u.get("position"))||("horizontal"!==n?"top":"left"),a=((s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,s={top:[a,s[t="horizontal"===n?0:1][1]],bottom:[a,s[1-t][1]],left:[s[1-t][0],l],right:[s[t][0],l]},t=e.start.y,+e.end.y>+e.start.y&&(t=t+"-"+e.end.y),l=u.get("formatter"),t={start:e.start.y,end:e.end.y,nameMap:t},t=this._formatterLabel(l,t),(t=new Xs({z2:30,style:Rc(u,{text:t})})).attr(this._yearTextPositionControl(t,s[r],n,r,o)),i.add(t))},SF.prototype._monthTextPositionControl=function(t,e,n,i,o){var r="left",a="top",s=t[0],t=t[1];return"horizontal"===n?(t+=o,e&&(r="center"),"start"===i&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===i&&(r="right")),{x:s,y:t,align:r,verticalAlign:a}},SF.prototype._renderMonthText=function(t,e,n,i){var o=t.getModel("monthLabel");if(o.get("show")){var r=o.get("nameMap"),a=o.get("margin"),s=o.get("position"),t=o.get("align"),l=[this._tlpoints,this._blpoints];r&&!H(r)||(r=(e=r?dp(r)||e:e).get(["time","monthAbbr"])||[]);for(var u="start"===s?0:1,h="horizontal"===n?0:1,a="start"===s?-a:a,c="center"===t,p=0;p=i.start.time&&n.timeo.end.time&&i.reverse(),i},IF.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/864e5)-Math.floor(n[0].time/864e5)+1,o=new Date(n[0].time),r=o.getDate(),a=n[1].date.getDate();o.setDate(r+i-1);var s=o.getDate();if(s!==a)for(var l=0n.weeks||0===t&&en.lweek)return null;t=7*(t-1)-n.fweek+e,e=new Date(n.start.time);return e.setDate(+n.start.d+t),this.getDateInfo(e)},IF.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new IF(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},IF.dimensions=["time","value"],IF);function IF(t,e,n){this.type="calendar",this.dimensions=IF.dimensions,this.getDimensionsInfo=IF.getDimensionsInfo,this._model=t}function TF(t){var e=t.calendarModel,t=t.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem:null}function CF(t){var e=t.graphic;G(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}var DF,AF=ur(),kF={path:null,compoundPath:null,group:io,image:Ps,text:Xs},LF=(u(PF,DF=yd),PF.prototype.mergeOption=function(t,e){var n=this.option.elements;this.option.elements=null,DF.prototype.mergeOption.call(this,t,e),this.option.elements=n},PF.prototype.optionUpdated=function(t,e){var n=this.option,t=(e?n:t).elements,i=n.elements=e?[]:n.elements,n=[];this._flatten(t,n,null);var n=Qo(i,n,"normalMerge"),o=this._elOptionsToUpdate=[];E(n,function(t,e){var n=t.newOption;ot(Y(n)||t.existing,"Empty graphic option definition"),n&&(o.push(n),function(t,e){var n=t.existing;e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId&&((t=e.parentOption)?e.parentId=t.id:n&&(e.parentId=n.parentId));e.parentOption=null}(t,n),function(t,e,n){var i=P({},n),o=t[e],r=n.$action||"merge";{var a;"merge"===r?o?(ot(!(a=n.type)||o.type===a,'Please set $action: "replace" to change `type`'),b(o,i,!0),ld(o,i,{ignoreSize:!0}),hd(n,o)):t[e]=i:"replace"===r?t[e]=i:"remove"===r&&o&&(t[e]=null)}}(i,e,n),function(t,e){if(!t)return;t.hv=e.hv=[BF(e,["left","right"]),BF(e,["top","bottom"])],"group"===t.type&&(e=e,null==(t=t).width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}(i[e],n))},this);for(var r=i.length-1;0<=r;r--)null==i[r]?i.splice(r,1):delete i[r].$action},PF.prototype._flatten=function(t,n,i){E(t,function(t){var e;t&&(i&&(t.parentOption=i),n.push(t),e=t.children,"group"===t.type&&e&&this._flatten(e,n,t),delete t.children)},this)},PF.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},PF.type="graphic",PF.defaultOption={elements:[]},PF);function PF(){var t=null!==DF&&DF.apply(this,arguments)||this;return t.type=PF.type,t.preventAutoZ=!0,t}var OF,RF=(u(NF,OF=Iy),NF.prototype.init=function(){this._elMap=ct()},NF.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},NF.prototype._updateElements=function(h){var c,p,t=h.useElOptionsToUpdate();t&&(c=this._elMap,p=this.group,E(t,function(t){var e=nr(t.id,null),n=null!=e?c.get(e):null,i=nr(t.parentId,null),o=null!=i?c.get(i):p,r=t.type,a=t.style;"text"===r&&a&&t.hv&&t.hv[1]&&(a.textVerticalAlign=a.textBaseline=a.verticalAlign=a.align=null);var s=t.textContent,i=t.textConfig;a&&sB(a,r,!!i,!!s)&&(u=lB(a,r,!0),!i&&u.textConfig&&(i=t.textConfig=u.textConfig),!s&&u.textContent&&(s=u.textContent));var l,i=(l=P({},l=t),E(["id","parentId","$action","hv","bounding","textContent"].concat(ed),function(t){delete l[t]}),l);n&&ot(o===n.parent,"Changing parent is not supported.");var u=t.$action||"merge";"merge"===u?n?n.attr(i):EF(e,o,i,c):"replace"===u?(zF(n,c),EF(e,o,i,c)):"remove"===u&&zF(n,c);n=c.get(e);n&&s&&("merge"===u?(e=n.getTextContent())?e.attr(s):n.setTextContent(new Xs(s)):"replace"===u&&n.setTextContent(new Xs(s))),n&&((s=AF(n)).__ecGraphicWidthOption=t.width,s.__ecGraphicHeightOption=t.height,function(t,e,n){var i=il(t).eventData;t.silent||t.ignore||i||(i=il(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(n,h,t),Cc({el:n,componentModel:h,itemName:n.name,itemTooltipOption:t.tooltip}))}))},NF.prototype._relocate=function(t,e){for(var n,i,o=t.option.elements,r=this.group,a=this._elMap,s=e.getWidth(),l=e.getHeight(),u=0;ue[1]&&(e[1]=t[1])})});t=t.getAxisModel(),t=aw(t.axis.scale,t,o).calculate();return[t.min,t.max]}(this,this._dimName,e),this._updateMinMaxSpan(),t=this.calculateDataWindow(t.settledOption),this._valueWindow=t.valueWindow,this._percentWindow=t.percentWindow,this._setAxisModel())},aH.prototype.filterData=function(t,e){var o,n,r,c;t===this._dataZoomModel&&(o=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),c=this._valueWindow,"none"!==r&&iH(n,function(n){var l,u,i=n.getData(),h=i.mapDimensionsAll(o);h.length&&("weakFilter"===r?(l=i.getStore(),u=L(h,function(t){return i.getDimensionIndex(t)},i),i.filterSelf(function(t){for(var e,n,i,o=0;oc[1];if(a&&!s&&!r)return!0;a&&(i=!0),s&&(e=!0),r&&(n=!0)}return i&&e&&n})):iH(h,function(t){var e;"empty"===r?n.setData(i=i.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,i.selectRange(e))}),iH(h,function(t){i.setApproximateExtent(c,t)}))}))},aH.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;iH(["min","max"],function(t){var e=o.get(t+"Span"),n=o.get(t+"ValueSpan");null!=(n=null!=n?this.getAxisModel().axis.scale.parse(n):n)?e=yo(r[0]+n,r,[0,100],!0):null!=e&&(n=yo(e,[0,100],r,!0)-r[0]),i[t+"Span"]=e,i[t+"ValueSpan"]=n},this)},aH.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=wo(i,[0,500]),t=Math.min(t,20),e=e.axis.scale.rawExtentInfo,0!==n[0]&&e.setDeterminedMinMax("min",+i[0].toFixed(t)),100!==n[1]&&e.setDeterminedMinMax("max",+i[1].toFixed(t)),e.freeze())},aH);function aH(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}var sH={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(FF(t),e);o(t,e,n,i)})})}t(function(t,e,n,i){n.__dzAxisProxy=null});var o=[];t(function(t,e,n,i){n.__dzAxisProxy||(n.__dzAxisProxy=new rH(t,e,i,r),o.push(n.__dzAxisProxy))});var e=ct();return E(o,function(t){E(t.getTargetSeriesModels(),function(t){e.set(t.uid,t)})}),e},overallReset:function(t,i){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).reset(n)}),n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e,n=t.findRepresentativeAxisProxy();n&&(e=n.getDataPercentWindow(),n=n.getDataValueWindow(),t.setCalculatedRange({start:e[0],end:e[1],startValue:n[0],endValue:n[1]}))})}};var lH=!1;function uH(t){lH||(lH=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,sH),t.registerAction("dataZoom",function(e,t){E(HF(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function hH(t){t.registerComponentModel(KF),t.registerComponentView(eH),uH(t)}function cH(){}var pH={};function dH(t,e){pH[t]=e}function fH(t){return pH[t]}var gH,yH=(u(mH,gH=yd),mH.prototype.optionUpdated=function(){gH.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;E(this.option.feature,function(t,e){e=fH(e);e&&(e.getDefaultOption&&(e.defaultOption=e.getDefaultOption(n)),b(t,e.defaultOption))})},mH.type="toolbox",mH.layoutMode={type:"box",ignoreSize:!0},mH.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},mH);function mH(){var t=null!==gH&&gH.apply(this,arguments)||this;return t.type=mH.type,t}function vH(t,e){var n=Wp(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Fs({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var _H,xH=(u(bH,_H=Iy),bH.prototype.render=function(h,c,p,a){var d,s,l,u,t,e,n,i,o,r,f=this.group;function g(t,e){var n,i=u[t],o=u[e],t=s[i],e=new ep(t,h,h.ecModel);if(a&&null!=a.newTitle&&a.featureName===i&&(t.title=a.newTitle),i&&!o){if(0===i.indexOf("my"))n={onclick:e.option.onclick,featureName:i};else{var r=fH(i);if(!r)return;n=new r}l[i]=n}else if(!(n=l[o]))return;n.uid=op("toolbox-feature"),n.model=e,n.ecModel=c,n.api=p;r=n instanceof cH;i||!o?!e.get("show")||r&&n.unusable?r&&n.remove&&n.remove(c,p):(function(o,r,t){var e,a,s=o.getModel("iconStyle"),l=o.getModel(["emphasis","iconStyle"]),n=r instanceof cH&&r.getIcons?r.getIcons():o.get("icon"),i=o.get("title")||{};"string"==typeof n?(e={})[t]=n:e=n;"string"==typeof i?(a={})[t]=i:a=i;var u=o.iconPaths={};E(e,function(t,e){var n=Mc(t,{},{x:-d/2,y:-d/2,width:d,height:d});n.setStyle(s.getItemStyle()),n.ensureState("emphasis").style=l.getItemStyle();var i=new Xs({style:{text:a[e],align:l.get("textAlign"),borderRadius:l.get("textBorderRadius"),padding:l.get("textPadding"),fill:null},ignore:!0});n.setTextContent(i),Cc({el:n,componentModel:h,itemName:e,formatterParamsExtra:{title:a[e]}}),n.__title=a[e],n.on("mouseover",function(){var t=l.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({fill:l.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:l.get("textBackgroundColor")}),n.setTextConfig({position:l.get("textPosition")||e}),i.ignore=!h.get("showTitle"),zl(this)}).on("mouseout",function(){"emphasis"!==o.get(["iconStatus",e])&&Bl(this),i.hide()}),("emphasis"===o.get(["iconStatus",e])?zl:Bl)(n),f.add(n),n.on("click",B(r.onclick,r,c,p,e)),u[e]=n})}(e,n,i),e.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?zl:Bl)(i[t])},n instanceof cH&&n.render&&n.render(e,c,p,a)):r&&n.dispose&&n.dispose(c,p)}f.removeAll(),h.get("show")&&(d=+h.get("itemSize"),s=h.get("feature")||{},l=this._features||(this._features={}),u=[],E(s,function(t,e){u.push(e)}),new Mx(this._featureNames||[],u).add(g).update(g).remove(V(g,null)).execute(),this._featureNames=u,t=f,n=p,i=(e=h).getBoxLayoutParams(),o=e.get("padding"),r={width:n.getWidth(),height:n.getHeight()},n=rd(i,r,o),od(e.get("orient"),t,e.get("itemGap"),n.width,n.height),ad(t,i,r,o),f.add(vH(f.getBoundingRect(),h)),f.eachChild(function(t){var e=t.__title,n=t.ensureState("emphasis"),i=n.textConfig||(n.textConfig={}),o=t.getTextContent(),r=o&&o.states.emphasis;r&&!F(r)&&e&&(n=r.style||(r.style={}),o=Gi(e,Xs.makeFont(n)),r=t.x+f.x,e=!1,t.y+f.y+d+o.height>p.getHeight()&&(i.position="top",e=!0),e=e?-5-o.height:d+8,r+o.width/2>p.getWidth()?(i.position=["100%",e],n.align="right"):r-o.width/2<0&&(i.position=[0,e],n.align="left"))}))},bH.prototype.updateView=function(t,e,n,i){E(this._features,function(t){t instanceof cH&&t.updateView&&t.updateView(t.model,e,n,i)})},bH.prototype.remove=function(e,n){E(this._features,function(t){t instanceof cH&&t.remove&&t.remove(e,n)}),this.group.removeAll()},bH.prototype.dispose=function(e,n){E(this._features,function(t){t instanceof cH&&t.dispose&&t.dispose(e,n)})},bH.type="toolbox",bH);function bH(){return null!==_H&&_H.apply(this,arguments)||this}var wH,SH=(u(MH,wH=cH),MH.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!w.browser.newEdge&&(w.browser.ie||w.browser.edge))if(window.navigator.msSaveOrOpenBlob||o){var e=a.split(","),t=-1',c=window.open();c.document.write(n),c.document.title=i}else{c=document.createElement("a");c.download=i+"."+r,c.target="_blank",c.href=a;a=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(a)}},MH.getDefaultOption=function(t){return{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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},MH);function MH(){return null!==wH&&wH.apply(this,arguments)||this}SH.prototype.unusable=!w.canvasSupported;var IH,TH="__ec_magicType_stack__",CH=[["line","bar"],["stack"]],DH=(u(AH,IH=cH),AH.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return E(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},AH.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},AH.prototype.onclick=function(t,e,a){var s,n,l=this.model,i=l.get(["seriesIndex",a]);kH[a]&&(s={series:[]},E(CH,function(t){0<=C(t,a)&&E(t,function(t){l.setIconStatus(t,"normal")})}),l.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},function(t){var e=t.subType,n=t.id,n=kH[a](e,n,t,l);n&&(A(n,t.option),s.series.push(n));n=t.coordinateSystem;if(n&&"cartesian2d"===n.type&&("line"===a||"bar"===a)){n=n.getAxesByScale("ordinal")[0];if(n){var i=n.dim+"Axis",o=t.getReferringComponents(i,dr).models[0].componentIndex;s[i]=s[i]||[];for(var r=0;r<=o;r++)s[i][o]=s[i][o]||{};s[i][o].boundaryGap="bar"===a}}}),"stack"===(i=a)&&(n=b({stack:l.option.title.tiled,tiled:l.option.title.stack},l.option.title),"emphasis"!==l.get(["iconStatus",a])&&(i="tiled")),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:s,newTitle:n,featureName:"magicType"}))},AH);function AH(){return null!==IH&&IH.apply(this,arguments)||this}var kH={line:function(t,e,n,i){if("bar"===t)return b({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return b({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){n=n.get("stack")===TH;if("line"===t||"bar"===t)return i.setIconStatus("stack",n?"normal":"emphasis"),b({id:e,stack:n?"":TH},i.get(["option","stack"])||{},!0)}};hx({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var LH=new Array(60).join("-"),PH="\t";function OH(t){var o,r,a,h,t=(o={},r=[],a=[],t.eachRawSeries(function(t){var e,n,i=t.coordinateSystem;i&&("cartesian2d"===i.type||"polar"===i.type)&&"category"===(e=i.getBaseAxis()).type?(n=e.dim+"_"+e.index,o[n]||(o[n]={categoryAxis:e,valueAxis:i.getOtherAxis(e),series:[]},a.push({axisDim:e.dim,axisIndex:e.index})),o[n].series.push(t)):r.push(t)}),{seriesGroupByCategoryAxis:o,other:r,meta:a});return{value:R([(h=[],E(t.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(L(t.series,function(t){return t.name})),r=[n.model.getCategories()];E(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(i),function(t){return t}))});for(var a=[o.join(PH)],s=0;st[1]&&t.reverse(),t}function KH(t,e){return cr(t,e,{includeMainTypes:XH})}var $H={grid:function(t,i){var o=t.xAxisModels,r=t.yAxisModels,t=t.gridModels,e=ct(),a={},s={};(o||r||t)&&(E(o,function(t){t=t.axis.grid.model;e.set(t.id,t),a[t.id]=!0}),E(r,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),E(t,function(t){e.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),e.each(function(t){var e=t.coordinateSystem,n=[];E(e.getCartesians(),function(t,e){(0<=C(o,t.getAxis("x").model)||0<=C(r,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:QH.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){E(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:QH.geo})})}},JH=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,t=t.gridModel;return(t=!(t=!t&&n?n.axis.grid.model:t)&&i?i.axis.grid.model:t)&&t===e.gridModel},function(t,e){t=t.geoModel;return t&&t===e.geoModel}],QH={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(mc(t)),e}},tW={lineX:V(eW,0),lineY:V(eW,1),rect:function(t,e,n,i){var o=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),i=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),i=[qH([o[0],i[0]]),qH([o[1],i[1]])];return{values:i,xyMinMax:i}},polygon:function(e,n,t,i){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:L(t,function(t){t=e?n.pointToData(t,i):n.dataToPoint(t,i);return o[0][0]=Math.min(o[0][0],t[0]),o[1][0]=Math.min(o[1][0],t[1]),o[0][1]=Math.max(o[0][1],t[0]),o[1][1]=Math.max(o[1][1],t[1]),t}),xyMinMax:o}}};function eW(t,e,n,i){ot("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var o=n.getAxis(["x","y"][t]),r=qH(L([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t]),!0):o.toGlobalCoord(o.dataToCoord(i[t]))})),n=[];return n[t]=r,n[1-t]=[NaN,NaN],{values:r,xyMinMax:n}}var nW={lineX:V(iW,0),lineY:V(iW,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return L(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function iW(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function oW(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var rW,aW=E,sW=jo+"toolbox-dataZoom_",lW=(u(uW,rW=cH),uW.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new iR(n.getZr()),this._brushController.on("brush",B(this._onBrush,this)).mount()),function(t,e,n,i,o){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");o=new ZH(dW(t),e,{include:["grid"]}).makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(o).enableBrush(!(!r||!o.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),e=e,t.setIconStatus("back",1'}(n,i,o)),H(t))r.innerHTML=t+a;else if(t){r.innerHTML="",G(t)||(t=[t]);for(var s=0;s",a=p.join(e);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t,h)?this._updatePosition(o,r,i[0],i[1],this._tooltipContent,h):this._showTooltipContent(o,a,h,Math.random()+"",i[0],i[1],r,null,d)})},GW.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s=this._ecModel,l=il(e),u=l.seriesIndex,h=s.getSeriesByIndex(u),c=l.dataModel||h,p=l.dataIndex,d=l.dataType,f=c.getData(d),e=this._renderMode,l=t.positionDefault,g=FW([f.getItemModel(p),c,h&&(h.coordinateSystem||{}).model],this._tooltipModel,l?{position:l}:null),l=g.get("trigger");null!=l&&"item"!==l||(i=c.getDataParams(p,d),o=new uy,i.marker=o.makeTooltipMarker("item",Jp(i.color),e),l=eg(c.formatTooltip(p,!1,d)),d=g.get("order"),r=l.markupFragment?iy(l.markupFragment,o,e,d,s.get("useUTC"),g.get("textStyle")):l.markupText,a="item_"+c.name+"_"+p,this._showOrMove(g,function(){this._showTooltipContent(g,r,i,a,t.offsetX,t.offsetY,t.position,t.target,o)}),n({type:"showTip",dataIndexInside:p,dataIndex:f.getRawIndex(p),seriesIndex:u,from:this.uid}))},GW.prototype._showComponentItemTooltip=function(e,n,t){var i=il(n),o=i.tooltipConfig.option||{},r=[o=H(o)?{content:o,formatter:o}:o],i=this._ecModel.getComponent(i.componentMainType,i.componentIndex);i&&r.push(i),r.push({formatter:o.content});var o=e.positionDefault,a=FW(r,this._tooltipModel,o?{position:o}:null),s=a.get("content"),l=Math.random()+"",u=new uy;this._showOrMove(a,function(){var t=S(a.get("formatterParams")||{});this._showTooltipContent(a,s,t,l,e.offsetX,e.offsetY,e.position,n,u)}),t({type:"showTip",from:this.uid})},GW.prototype._showTooltipContent=function(n,t,i,e,o,r,a,s,l){var u,h,c,p,d;this._ticket="",n.get("showContent")&&n.get("show")&&(u=this._tooltipContent,h=n.get("formatter"),a=a||n.get("position"),p=t,c=this._getNearestPoint([o,r],i,n.get("trigger"),n.get("borderColor")).color,h&&(p=H(h)?(d=n.ecModel.get("useUTC"),p=h,Kp(p=(t=G(i)?i[0]:i)&&t.axisType&&0<=t.axisType.indexOf("time")?Ip(t.axisValue,p,d):p,i,!0)):F(h)?(d=NW(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c,a),this._updatePosition(n,a,o,r,u,i,s))},this),this._ticket=e,h(i,e,d)):h),u.setContent(p,l,n,c,a),u.show(n,c),this._updatePosition(n,a,o,r,u,i,s))},GW.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||G(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:G(e)?void 0:{color:i||e.color||e.borderColor}},GW.prototype._doUpdatePosition=function(t,e,n,i,o,r,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u,h=o.getSize(),c=t.get("align"),p=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();a&&d.applyTransform(a.transform),G(e=F(e)?e([n,i],r,o.el,d,{viewSize:[s,l],contentSize:h.slice()}):e)?(n=zW(e[0],s),i=zW(e[1],l)):Y(e)?((r=e).width=h[0],r.height=h[1],n=(r=rd(r,{width:s,height:l})).x,i=r.y,p=c=null):i=(n=(u=H(e)&&a?function(t,e,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-o/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+h+a;break;case"left":s=e.x-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+a,l=e.y+h/2-r/2}return[s,l]}(e,d,h,t.get("borderWidth")):function(t,e,n,i,o,r,a){var s=n.getSize(),n=s[0],s=s[1];null!=r&&(io[0][1]&&(o[0][1]=r[0]),r[1]o[1][1]&&(o[1][1]=r[1])}return o&&sU(o)}};function sU(t){return new Li(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var lU,uU=(u(hU,lU=Iy),hU.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new iR(e.getZr())).on("brush",B(this._onBrush,this)).mount()},hU.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},hU.prototype.updateTransform=function(t,e,n,i){nU(e),this._updateController(t,e,n,i)},hU.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},hU.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},hU.prototype._updateController=function(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},hU.prototype.dispose=function(){this._brushController.dispose()},hU.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);t.isEnd&&!t.removeOnClick||this.api.dispatchAction({type:"brush",brushId:e,areas:S(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:S(n),$from:e})},hU.type="brush",hU);function hU(){var t=null!==lU&&lU.apply(this,arguments)||this;return t.type=hU.type,t}var cU,pU=(u(dU,cU=yd),dU.prototype.optionUpdated=function(t,e){var n=this.option;e||qW(n,t,["inBrush","outOfBrush"]);t=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},t.hasOwnProperty("liftZ")||(t.liftZ=5)},dU.prototype.setAreas=function(t){ot(G(t)),E(t,function(t){ot(t.brushType,"Illegal areas")}),t&&(this.areas=L(t,function(t){return fU(this.option,t)},this))},dU.prototype.setBrushOption=function(t){this.brushOption=fU(this.option,t),this.brushType=this.brushOption.brushType},dU.type="brush",dU.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],dU.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},dU);function dU(){var t=null!==cU&&cU.apply(this,arguments)||this;return t.type=dU.type,t.areas=[],t.brushOption={},t}function fU(t,e){return b({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ep(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var gU,yU=["rect","polygon","lineX","lineY","keep","clear"],mU=(u(vU,gU=cH),vU.prototype.render=function(e,t,n){var i,o,r;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length}),this._brushType=i,this._brushMode=o,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?r:t===i)?"emphasis":"normal")})},vU.prototype.updateView=function(t,e,n){this.render(t,e,n)},vU.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return E(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},vU.prototype.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},vU.getDefaultOption=function(t){return{show:!0,type:yU.slice(),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:t.getLocaleModel().get(["toolbox","brush","title"])}},vU);function vU(){return null!==gU&&gU.apply(this,arguments)||this}var _U,xU=(u(bU,_U=yd),bU.type="title",bU.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},bU);function bU(){var t=null!==_U&&_U.apply(this,arguments)||this;return t.type=bU.type,t.layoutMode={type:"box",ignoreSize:!0},t}var wU,SU=(u(MU,wU=Iy),MU.prototype.render=function(t,e,n){var i,o,r,a,s,l,u,h,c;this.group.removeAll(),t.get("show")&&(i=this.group,u=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),c=tt(t.get("textBaseline"),t.get("textVerticalAlign")),h=(r=new Xs({style:Rc(u,{text:t.get("text"),fill:u.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),u=t.get("subtext"),a=new Xs({style:Rc(a,{text:u,fill:a.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),s=t.get("link"),l=t.get("sublink"),h=t.get("triggerEvent",!0),r.silent=!s&&!h,a.silent=!l&&!h,s&&r.on("click",function(){Qp(s,"_"+t.get("target"))}),l&&a.on("click",function(){Qp(l,"_"+t.get("subtarget"))}),il(r).eventData=il(a).eventData=h?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(r),u&&i.add(a),h=i.getBoundingRect(),(u=t.getBoxLayoutParams()).width=h.width,u.height=h.height,n=rd(u,{width:n.getWidth(),height:n.getHeight()},t.get("padding")),o||("right"===(o="middle"===(o=t.get("left")||t.get("right"))?"center":o)?n.x+=n.width:"center"===o&&(n.x+=n.width/2)),c||("bottom"===(c="center"===(c=t.get("top")||t.get("bottom"))?"middle":c)?n.y+=n.height:"middle"===c&&(n.y+=n.height/2),c=c||"top"),i.x=n.x,i.y=n.y,i.markRedraw(),c={align:o,verticalAlign:c},r.setStyle(c),a.setStyle(c),h=i.getBoundingRect(),c=n.margin,(n=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),n=new Fs({shape:{x:h.x-c[3],y:h.y-c[0],width:h.width+c[1]+c[3],height:h.height+c[0]+c[2],r:t.get("borderRadius")},style:n,subPixelOptimize:!0,silent:!0}),i.add(n))},MU.type="title",MU);function MU(){var t=null!==wU&&wU.apply(this,arguments)||this;return t.type=MU.type,t}var IU,Zy=(u(TU,IU=yd),TU.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},TU.prototype.mergeOption=function(t){IU.prototype.mergeOption.apply(this,arguments),this._initData()},TU.prototype.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},TU.prototype.getCurrentIndex=function(){return this.option.currentIndex},TU.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},TU.prototype.setPlayState=function(t){this.option.autoPlay=!!t},TU.prototype.getPlayState=function(){return!!this.option.autoPlay},TU.prototype._initData=function(){var o,t=this.option,e=t.data||[],t=t.axisType,r=this._names=[];"category"===t?(o=[],E(e,function(t,e){var n,i=nr(Jo(t),"");Y(t)?(n=S(t)).value=e:n=e,o.push(n),r.push(i)})):o=e;t={category:"ordinal",time:"time",value:"number"}[t]||"number";(this._data=new $x([{name:"value",type:t}],this)).initData(o,r)},TU.prototype.getData=function(){return this._data},TU.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},TU.type="timeline",TU.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},TU);function TU(){var t=null!==IU&&IU.apply(this,arguments)||this;return t.type=TU.type,t.layoutMode="box",t}var CU,DU=(u(AU,CU=Zy),AU.type="timeline.slider",AU.defaultOption=rp(Zy.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,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:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),AU);function AU(){var t=null!==CU&&CU.apply(this,arguments)||this;return t.type=AU.type,t}T(DU,Jn.prototype);var kU,Zy=(u(LU,kU=Iy),LU.type="timeline",LU);function LU(){var t=null!==kU&&kU.apply(this,arguments)||this;return t.type=LU.type,t}var PU,OU=(u(RU,PU=vp),RU.prototype.getLabelModel=function(){return this.model.getModel("label")},RU.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},RU);function RU(t,e,n,i){n=PU.call(this,t,e,n)||this;return n.type=i||"value",n}var NU,EU=Math.PI,zU=ur(),BU=(u(VU,NU=Zy),VU.prototype.init=function(t,e){this.api=e},VU.prototype.render=function(e,t,n){var i,o,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("_mainGroup"),n=this._createGroup("_labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return ty("nameValue",{noName:!0,value:r.scale.getLabel({value:t})})},E(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,n,r,e),this._position(i,e)),this._doPlayStop(),this._updateTicksStatus()},VU.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},VU.prototype.dispose=function(){this._clearTimer()},VU.prototype._layout=function(t,e){var n,i,o,r=t.get(["label","position"]),a=t.get("orient"),s=(_=e,rd((x=t).getBoxLayoutParams(),{width:_.getWidth(),height:_.getHeight()},x.get("padding"))),l=null==r||"auto"===r?"horizontal"===a?s.y+s.height/2t[1]?t[1]:n)n[1]||o[1]i[1]||r[1]n[o],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],e=[-p.x,-p.y],s=tt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?e[i]+=n[o]-p[o]:g[i]+=p[o]+s),e[1-i]+=c[r]/2-p[r]/2,l.setPosition(f),u.setPosition(g),h.setPosition(e);g={x:0,y:0};g[o]=(d?n:c)[o],g[r]=Math.max(c[r],p[r]),g[a]=Math.min(0,p[a]+e[1-i]),u.__rectSize=n[o],d?((i={x:0,y:0})[o]=Math.max(n[o]-p[o]-s,0),i[r]=g[r],u.setClipPath(new Fs({shape:i})),u.__rectSize=i[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})});h=this._getPageInfo(t);return null!=h.pageIndex&&Kh(l,{x:h.contentPosition[0],y:h.contentPosition[1]},d?t:null),this._updatePageInfoView(t,h),g},hX.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},hX.prototype._updatePageInfoView=function(n,i){var o=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=o.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")});var t=o.childOfName("pageText"),e=n.get("pageFormatter"),r=i.pageIndex,a=null!=r?r+1:0,r=i.pageCount;t&&e&&t.setStyle("text",H(e)?e.replace("{current}",null==a?"":a+"").replace("{total}",null==r?"":r+""):e({current:a,total:r}))},hX.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,r=sX[o],a=lX[o],s=this._findTargetItemIndex(e),l=n.children(),t=l[s],u=l.length,e=u?1:0,h={contentPosition:[n.x,n.y],pageCount:e,pageIndex:e-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!t)return h;t=g(t);h.contentPosition[o]=-t.s;for(var c=s+1,p=t,d=t,f=null;c<=u;++c)(!(f=g(l[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=s-1,p=t,d=t,f=null;-1<=c;--c)(f=g(l[c]))&&y(d,f.s)||!(p.i=e&&t.s<=e+i}},hX.prototype._findTargetItemIndex=function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==o&&null!=t&&(o=e),t===n&&(i=e)}),null!=i?i:o):0;var i,o},hX.type="legend.scroll",hX);function hX(){var t=null!==rX&&rX.apply(this,arguments)||this;return t.type=hX.type,t.newlineDisabled=!0,t._currentIndex=0,t}function cX(t){xx(tX),t.registerComponentModel(nX),t.registerComponentView(uX),t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})}var pX,dX=(u(fX,pX=n),fX.type="dataZoom.inside",fX.defaultOption=rp(n.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),fX);function fX(){var t=null!==pX&&pX.apply(this,arguments)||this;return t.type=fX.type,t}var gX=ur();function yX(t,e){e&&(t.removeKey(e.model.uid),(e=e.controller)&&e.dispose())}function mX(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function vX(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function _X(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,a){var e=gX(a),l=e.coordSysRecordMap||(e.coordSysRecordMap=ct());l.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(o){E(WF(o).infoList,function(t){var e,r,n,i=t.model.uid,e=l.get(i)||l.set(i,(e=a,i=t.model,r={model:i,containsPoint:V(vX,i),dispatchAction:V(mX,e),dataZoomInfoMap:null,controller:null},n=r.controller=new mD(e.getZr()),E(["pan","zoom","scrollMove"],function(o){n.on(o,function(n){var i=[];r.dataZoomInfoMap.each(function(t){var e;n.isAvailableBehavior(t.model.option)&&(e=(e=(t.getRange||{})[o])&&e(t.dzReferCoordSysInfo,r.model.mainType,r.controller,n),!t.model.get("disabled",!0)&&e&&i.push({dataZoomId:t.model.id,start:e[0],end:e[1]}))}),i.length&&r.dispatchAction(i)})}),r));(e.dataZoomInfoMap||(e.dataZoomInfoMap=ct())).set(o.uid,{dzReferCoordSysInfo:t,model:o,getRange:null})})}),l.each(function(t){var e,n,i,o,r,a=t.controller,s=t.dataZoomInfoMap;!s||null!=(n=s.keys()[0])&&(e=s.get(n)),e?(o={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0,s.each(function(t){var e=t.model,t=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+i]e[0]||t[1]<0||t[1]>e[1]||(e=((e=this._handleEnds)[0]+e[1])/2,e=this._updateInterval("all",t[0]-e),this._updateView(),e&&this._dispatchZoomAction(!1))},zX.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new bi(e,t),this._brushing=!0,this._brushStartTime=+new Date},zX.prototype._onBrushEnd=function(t){var e,n,i;this._brushing&&(i=this._displayables.brushRect,this._brushing=!1,i&&(i.attr("ignore",!0),e=i.shape,+new Date-this._brushStartTime<200&&Math.abs(e.width)<5||(n=this._getViewExtent(),i=[0,100],this._range=_o([yo(e.x,n,i,!0),yo(e.x+e.width,n,i,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1))))},zX.prototype._onBrush=function(t){this._brushing&&(ie(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},zX.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new LX({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);i=this._brushStart,n=this._displayables.sliderGroup,e=n.transformCoordToLocal(t,e),n=n.transformCoordToLocal(i.x,i.y),i=this._size;e[0]=Math.max(Math.min(i[0],e[0]),0),o.setShape({x:n[0],y:0,width:e[0]-n[0],height:i[1]})},zX.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?NX:null,start:e[0],end:e[1]})},zX.prototype._findCoordRect=function(){var t,e,n=WF(this.dataZoomModel).infoList;return t=!(t=!t&&n.length?(e=n[0].model.coordinateSystem).getRect&&e.getRect():t)?{x:.2*(n=this.api.getWidth()),y:.2*(e=this.api.getHeight()),width:.6*n,height:.6*e}:t},zX.type="dataZoom.slider",zX);function zX(){var t=null!==kX&&kX.apply(this,arguments)||this;return t.type=zX.type,t._displayables={},t}function BX(t){return"vertical"===t?"ns-resize":"ew-resize"}function VX(t){t.registerComponentModel(DX),t.registerComponentView(EX),uH(t)}var GX,FX=function(t,e,n){e=S((HX[t]||{})[e]);return n&&G(e)?e[e.length-1]:e},HX={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]}},WX=Ok.mapVisual,UX=Ok.eachVisual,YX=G,XX=E,ZX=_o,jX=yo,n=(u(qX,GX=yd),qX.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},qX.prototype.optionUpdated=function(t,e){var n=this.option;w.canvasSupported||(n.realtime=!1),e||qW(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},qX.prototype.resetVisual=function(t){var e=this.stateList;t=B(t,this),this.controllerVisuals=jW(this.option.controller,e,t),this.targetVisuals=jW(this.option.target,e,t)},qX.prototype.getItemSymbol=function(){return null},qX.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){n.push(e)}):n=qo(t),n},qX.prototype.eachTargetSeries=function(e,n){E(this.getTargetSeriesIndices(),function(t){t=this.ecModel.getSeriesByIndex(t);t&&e.call(n,t)},this)},qX.prototype.isTargetSeries=function(e){var n=!1;return this.eachTargetSeries(function(t){t===e&&(n=!0)}),n},qX.prototype.formatValueText=function(t,e,n){var i,o=this.option,r=o.precision,a=this.dataBound,o=o.formatter;n=n||["<",">"],G(t)&&(t=t.slice(),i=!0);e=e?t:i?[s(t[0]),s(t[1])]:s(t);return H(o)?o.replace("{value}",i?e[0]:e).replace("{value2}",i?e[1]:e):F(o)?i?o(t[0],t[1]):o(t):i?t[0]===a[0]?n[0]+" "+e[1]:t[1]===a[1]?n[1]+" "+e[0]:e[0]+" - "+e[1]:e;function s(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},qX.prototype.resetExtent=function(){var t=this.option,t=ZX([t.min,t.max]);this._dataExtent=t},qX.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;0<=i;i--){var o=n[i],o=t.getDimensionInfo(o);if(!o.isCalculationCoord)return o.storeDimIndex}},qX.prototype.getExtent=function(){return this._dataExtent.slice()},qX.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,t={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});b(i,t),b(o,t);var u=this.isCategory();function r(t){YX(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")}}r.call(this,i),r.call(this,o),function(t,e,n){var e=t[e],i=t[n];e&&!i&&(i=t[n]={},XX(e,function(t,e){var n;!Ok.isValidType(e)||null!=(n=FX(e,"inactive",u))&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(o){var r=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,a=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,s=this.get("inactiveColor"),l=this.getItemSymbol()||"roundRect";XX(this.stateList,function(t){var e=this.itemSize,n=o[t];null==(n=n||(o[t]={color:u?s:[s]})).symbol&&(n.symbol=r&&S(r)||(u?l:[l])),null==n.symbolSize&&(n.symbolSize=a&&S(a)||(u?e[0]:[e[0],e[0]])),n.symbol=WX(n.symbol,function(t){return"none"===t?l:t});var i,t=n.symbolSize;null!=t&&(i=-1/0,UX(t,function(t){ie[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},QX.prototype.completeVisualOption=function(){KX.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){t=this.option.controller[t].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},QX.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},QX.prototype.getSelected=function(){var t=this.getExtent(),e=_o((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},QX.prototype.findTargetDataIndices=function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimensionIndex(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},QX.prototype.getVisualMeta=function(n){var t=tZ(0,0,this.getExtent()),e=tZ(0,0,this.option.range.slice()),i=[];function o(t,e){i.push({value:t,color:n(t,e)})}for(var r=0,a=0,s=e.length,l=t.length;at[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},pZ.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},pZ.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new io("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},pZ.prototype._updateHandle=function(i,o){var r,a,s,l,u,h;this._useHandle&&(r=this._shapes,a=this.visualMapModel,s=r.handleThumbs,l=r.handleLabels,u=a.itemSize,h=a.getExtent(),lZ([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.y=i[t];var n=sZ(i[t],[0,u[1]],h,!0),n=this.getControllerVisual(n,"symbolSize");e.scaleX=e.scaleY=n/u[0],e.x=u[0]-n/2;e=vc(r.handleLabelPoints[t],mc(e,this.group));l[t].setStyle({x:e[0],y:e[1],text:a.formatValueText(this._dataInterval[t]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",r.mainGroup):"center"})},this))},pZ.prototype._showIndicator=function(t,e,n,i){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=sZ(t,r,s,!0),t=a[0]-c/2,r={x:u.x,y:u.y};u.y=p,u.x=t;s=vc(l.indicatorLabelPoint,mc(u,this.group)),a=l.indicatorLabel;a.attr("invisible",!1);c=this._applyTransform("left",l.mainGroup),l="horizontal"===this._orient;a.setStyle({text:(n||"")+o.formatValueText(e),verticalAlign:l?c:"middle",align:l?"center":c});h={x:t,y:p,style:{fill:h}},s={style:{x:s[0],y:s[1]}};o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator?(o={duration:100,easing:"cubicInOut",additive:!0},u.x=r.x,u.y=r.y,u.animateTo(h,o),a.animateTo(s,o)):(u.attr(h),a.attr(s)),this._firstShowIndicator=!1;var d=this._shapes.handleLabels;if(d)for(var f=0;f ",o):this._showIndicator(t,t,"≈ ",o)),t=this._hoverLinkDataIndices,o=[],(e||fZ(r))&&(o=this._hoverLinkDataIndices=r.findTargetDataIndices(i)),i=o,o={},s(t||[],t={}),s(i||[],o,t),o=[l(t),l(o)],this._dispatchHighDown("downplay",rZ(o[0],r)),this._dispatchHighDown("highlight",rZ(o[1],r)))},pZ.prototype._hoverLinkFromSeriesMouseOver=function(t){var e=t.target,n=this.visualMapModel;e&&null!=il(e).dataIndex&&(t=il(e),e=this.ecModel.getSeriesByIndex(t.seriesIndex),n.isTargetSeries(e)&&(t=(e=e.getData(t.dataType)).getStore().get(n.getDataDimensionIndex(e),t.dataIndex),isNaN(t)||this._showIndicator(t,t)))},pZ.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;nn&&s([n,t[0]],"outOfRange"),s(t.slice()),n=t[1])},this),{stops:o,outerColors:r}}function s(t,e){var n=a.getRepresentValue({interval:t});e=e||a.getValueState(n);e=i(n,e);t[0]===-1/0?r[0]=e:t[1]===1/0?r[1]=e:o.push({value:t[0],color:e},{value:t[1],color:e})}},DZ.type="visualMap.piecewise",DZ.defaultOption=rp(n.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),DZ);function DZ(){var t=null!==TZ&&TZ.apply(this,arguments)||this;return t.type=DZ.type,t._pieceList=[],t}var AZ={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var r=(i[1]-i[0])/o;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];ao[1]&&console.warn("Piece "+e+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&r[0]&&r[1]&&(n.value=o[0])}n.visual=Ok.retrieveVisuals(t),p.push(n)},this),kZ(t,p),Oo(p),E(p,function(t){var e=t.close,e=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,e)},this)}};function kZ(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var LZ,PZ=(u(OZ,LZ=jc),OZ.prototype.doRender=function(){var i=this.group;i.removeAll();var o=this.visualMapModel,r=o.get("textGap"),t=o.textStyleModel,a=t.getFont(),s=t.getTextColor(),l=this._getItemAlign(),u=o.itemSize,e=this._getViewData(),t=e.endsText,h=Q(o.get("showLabel",!0),!t);t&&this._renderEndsText(i,t[0],u,h,l),E(e.viewPieceList,function(t){var e=t.piece,n=new io;n.onclick=B(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList);t=o.getRepresentValue(e);this._createItemSymbol(n,t,[0,0,u[0],u[1]]),h&&(t=this.visualMapModel.getValueState(t),n.add(new Xs({style:{x:"right"===l?-r:u[0]+r,y:u[1]/2,text:e.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:"outOfRange"===t?.5:1}}))),i.add(n)},this),t&&this._renderEndsText(i,t[1],u,h,l),od(o.get("orient"),i,o.get("itemGap")),this.renderBackground(i),this.positionGroup(i)},OZ.prototype._enableHoverLink=function(t,n){var i=this;t.on("mouseover",function(){return e("highlight")}).on("mouseout",function(){return e("downplay")});var e=function(t){var e=i.visualMapModel;e.option.hoverLink&&i.api.dispatchAction({type:t,batch:rZ(e.findTargetDataIndices(n),e)})}},OZ.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return oZ(t,this.api,t.itemSize);e=e.align;return e=!e||"auto"===e?"left":e},OZ.prototype._renderEndsText=function(t,e,n,i,o){var r,a;e&&(r=new io,a=this.visualMapModel.textStyleModel,r.add(new Xs({style:{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:e,font:a.getFont(),fill:a.getTextColor()}})),t.add(r))},OZ.prototype._getViewData=function(){var t=this.visualMapModel,e=L(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),t=t.get("inverse");return("horizontal"===i?t:!t)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},OZ.prototype._createItemSymbol=function(t,e,n){t.add(Cm(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},OZ.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=S(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,E(i,function(t,e){i[e]=e===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},OZ.type="visualMap.piecewise",OZ);function OZ(){var t=null!==LZ&&LZ.apply(this,arguments)||this;return t.type=OZ.type,t}function RZ(t){t.registerComponentModel(CZ),t.registerComponentView(PZ),MZ(t)}var NZ={label:{enabled:!0},decal:{show:!1}},EZ=ur(),zZ={};function BZ(g,o){var t,r=g.getModel("aria");function y(t,e){if("string"!=typeof t)return t;var n=t;return E(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}r.get("enabled")&&(b((t=S(NZ)).label,g.getLocaleModel().get("aria"),!1),b(r.option,t,!1),function(){{var n;r.getModel("decal").get("show")&&(n=ct(),g.eachSeries(function(t){var e;t.isColorBySeries()||((e=n.get(t.type))||(e={},n.set(t.type,e)),EZ(t).scope=e)}),g.eachRawSeries(function(i){var o,t,e,r,a,s,l;function u(t,e){e=t?P(P({},e),t):e;return e.dirty=!0,e}g.isSeriesFiltered(i)||("function"!=typeof i.enableAriaDecal?(o=i.getData(),i.isColorBySeries()?(t=Yd(i.ecModel,i.name,zZ,g.getSeriesCount()),e=o.getVisual("decal"),o.setVisual("decal",u(e,t))):(r=i.getRawData(),a={},s=EZ(i).scope,o.each(function(t){var e=o.getRawIndex(t);a[e]=t}),l=r.count(),r.each(function(t){var e=a[t],n=r.getName(t)||t+"",t=Yd(i.ecModel,n,s,l),n=o.getItemVisual(e,"decal");o.setItemVisual(e,"decal",u(n,t))}))):i.enableAriaDecal())}))}}(),function(){var t=g.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=A(h.option,t),!h.get("enabled"))return;var e=o.getZr().dom;if(h.get("description"))return e.setAttribute("aria-label",h.get("description"));var c=g.getSeriesCount(),p=h.get(["data","maxCount"])||10,n=h.get(["series","maxCount"])||10,d=Math.min(c,n);{var f,i;c<1||(i=function(){var t=g.get("title");t&&t.length&&(t=t[0]);return t&&t.text}(),t=i?y(h.get(["general","withTitle"]),{title:i}):h.get(["general","withoutTitle"]),f=[],n=1p?n+=y(h.get(["data","partialData"]),{displayCnt:p}):n+=h.get(["data","allData"]);for(var o,r,a,s=h.get(["data","separator","middle"]),t=h.get(["data","separator","end"]),l=[],u=0;u":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},FZ=(HZ.prototype.evaluate=function(t){var e=_typeof(t);return"string"===e?this._condVal.test(t):"number"===e&&this._condVal.test(t+"")},HZ);function HZ(t){null==(this._condVal=H(t)?new RegExp(t):$(t)?t:null)&&Xo(Yo("Illegal regexp",t,"in"))}var WZ=(UZ.prototype.evaluate=function(){return this.value},UZ);function UZ(){}var YZ=(XZ.prototype.evaluate=function(){for(var t=this.children,e=0;eMath.abs(l),h=mj([a,l],u?0:1,e),c=(u?s:l)/h.length,p=0;pe.length,s=o?Fj(r,o):Fj(a?e:t,[a?t:e]),l=0,u=0;uYj)Fo("Universal transition is disabled on large data > 10k.");else for(var n=e.getIndices(),i=function(t){for(var e=t.dimensions,n=0;n