locust 2.31.4.dev47__py3-none-any.whl → 2.31.5.dev78__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -224,11 +224,11 @@ PERFORMANCE OF THIS SOFTWARE.
224
224
 
225
225
  `:"<br/>",m=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],h,null,d)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Ie(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,d=u.getData(f),h=this._renderMode,p=r.positionDefault,v=_h([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,f),y=new H_;m.marker=y.makeTooltipMarker("item",Gu(m.color),h);var x=ZN(u.formatTooltip(c,!1,f)),S=v.get("order"),_=v.get("valueFormatter"),b=x.frag,w=b?r5(_?U({valueFormatter:_},b):b,y,h,S,a.get("useUTC"),v.get("textStyle")):x.text,C="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,w,m,C,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Ie(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(oe(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Ae(l),l.content=Tn(l.content));var f=[l],d=this._ecModel.getComponent(o.componentMainType,o.componentIndex);d&&f.push(d),f.push({formatter:l.content});var h=r.positionDefault,p=_h(f,this._tooltipModel,h?{position:h}:null),v=p.get("content"),g=Math.random()+"",m=new H_;this._showOrMove(p,function(){var y=Ae(p.get("formatterParams")||{});this._showTooltipContent(p,v,y,g,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var d=r.get("formatter");l=l||r.get("position");var h=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),v=p.color;if(d)if(oe(d)){var g=r.ecModel.get("useUTC"),m=q(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;h=d,y&&(h=yS(m.axisValue,h,g)),h=D8(h,i,!0)}else if(Se(d)){var x=ce(function(S,_){S===this._ticket&&(f.setContent(_,c,r,v,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,h=d(i,a,x)}else h=d;f.setContent(h,c,r,v,l),f.show(r,v),this._updatePosition(r,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||q(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!q(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),d=r.get("align"),h=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),Se(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),q(n))i=re(n[0],u),a=re(n[1],c);else if(Ce(n)){var v=n;v.width=f[0],v.height=f[1];var g=vr(v,{width:u,height:c});i=g.x,a=g.y,d=null,h=null}else if(oe(n)&&l){var m=XRe(n,p,f,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=URe(i,a,o,u,c,d?null:20,h?null:20);i=m[0],a=m[1]}if(d&&(i-=f4(d)?f[0]/2:d==="right"?f[0]:0),h&&(a-=f4(h)?f[1]/2:h==="bottom"?f[1]:0),qU(r)){var m=YRe(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&D(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&D(u,function(d,h){var p=f[h]||{},v=d.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&d.value===p.value&&d.axisType===p.axisType&&d.axisId===p.axisId&&v.length===g.length,o&&D(v,function(m,y){var x=g[y];o=o&&m.seriesIndex===x.seriesIndex&&m.dataIndex===x.dataIndex}),a&&D(d.seriesDataIndices,function(m){var y=m.seriesIndex,x=n[y],S=a[y];x&&S&&S.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ye.node||!n.getDom()||(wv(this,"_updatePosition"),this._tooltipContent.dispose(),SA("itemTooltip",n))},t.type="tooltip",t}(Vt);function _h(e,t,r){var n=t.ecModel,i;r?(i=new ht(r,n,n),i=new ht(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ht&&(o=o.get("tooltip",!0)),oe(o)&&(o={formatter:o}),o&&(i=new ht(o,i,n)))}return i}function c4(e,t){return e.dispatchAction||ce(t.dispatchAction,t)}function URe(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function YRe(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function XRe(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function f4(e){return e==="center"||e==="middle"}function qRe(e,t,r){var n=yI(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=cg(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Ie(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function ZRe(e){Ge(kg),e.registerComponentModel(RRe),e.registerComponentView(jRe),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ir),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ir)}var KRe=["rect","polygon","keep","clear"];function QRe(e,t){var r=St(e?e.brush:[]);if(r.length){var n=[];D(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;q(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),JRe(s),t&&!s.length&&s.push.apply(s,KRe)}}function JRe(e){var t={};D(e,function(r){t[r]=1}),e.length=0,D(t,function(r,n){e.push(n)})}var d4=D;function h4(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function AA(e,t,r){var n={};return d4(t,function(a){var o=n[a]=i();d4(e[a],function(s,l){if(br.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new br(u),l==="opacity"&&(u=Ae(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new br(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function JU(e,t,r){var n;D(r,function(i){t.hasOwnProperty(i)&&h4(t[i])&&(n=!0)}),n&&D(r,function(i){t.hasOwnProperty(i)&&h4(t[i])?e[i]=Ae(t[i]):delete e[i]})}function eEe(e,t,r,n,i,a){var o={};D(e,function(f){var d=br.prepareVisualTypes(t[f]);o[f]=d});var s;function l(f){return XI(r,s,f)}function u(f,d){S9(r,s,f,d)}r.each(c);function c(f,d){s=f;var h=r.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var p=n.call(i,f),v=t[p],g=o[p],m=0,y=g.length;m<y;m++){var x=g[m];v[x]&&v[x].applyVisual(f,l,u)}}}function tEe(e,t,r,n){var i={};return D(e,function(a){var o=br.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(_){return XI(s,f,_)}function c(_,b){S9(s,f,_,b)}for(var f,d=s.getStore();(f=o.next())!=null;){var h=s.getRawDataItem(f);if(!(h&&h.visualMap===!1))for(var p=n!=null?d.get(l,f):f,v=r(p),g=t[v],m=i[v],y=0,x=m.length;y<x;y++){var S=m[y];g[S]&&g[S].applyVisual(p,u,c)}}}}}function rEe(e){var t=e.brushType,r={point:function(n){return p4[t].point(n,r,e)},rect:function(n){return p4[t].rect(n,r,e)}};return r}var p4={lineX:v4(0),lineY:v4(1),rect:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])},rect:function(e,t,r){return e&&r.boundingRect.intersect(e)}},polygon:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])&&Kl(r.range,e[0],e[1])},rect:function(e,t,r){var n=r.range;if(!e||n.length<=1)return!1;var i=e.x,a=e.y,o=e.width,s=e.height,l=n[0];if(Kl(n,i,a)||Kl(n,i+o,a)||Kl(n,i,a+s)||Kl(n,i+o,a+s)||Ne.create(e).contain(l[0],l[1])||$h(i,a,i+o,a,n)||$h(i,a,i,a+s,n)||$h(i+o,a,i+o,a+s,n)||$h(i,a+s,i+o,a+s,n))return!0}}};function v4(e){var t=["x","y"],r=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[e];return wh(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[t[e]],n[t[e]]+n[r[e]]];return s[1]<s[0]&&s.reverse(),wh(s[0],o)||wh(s[1],o)||wh(o[0],s)||wh(o[1],s)}}}}function wh(e,t){return t[0]<=e&&e<=t[1]}var g4=["inBrush","outOfBrush"],aC="__ecBrushSelect",MA="__ecInBrushSelectEvent";function eY(e){e.eachComponent({mainType:"brush"},function(t){var r=t.brushTargetManager=new rD(t.option,e);r.setInputRanges(t.areas,e)})}function nEe(e,t,r){var n=[],i,a;e.eachComponent({mainType:"brush"},function(o){r&&r.type==="takeGlobalCursor"&&o.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),eY(e),e.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Ae(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],d=[],h=[],p=!1;s||(i=u.throttleType,a=u.throttleDelay);var v=Z(o.areas,function(_){var b=sEe[_.brushType],w=we({boundingRect:b?b(_):void 0},_);return w.selectors=rEe(w),w}),g=AA(o.option,g4,function(_){_.mappingMethod="fixed"});q(c)&&D(c,function(_){f[_]=1});function m(_){return c==="all"||!!f[_]}function y(_){return!!_.length}e.eachSeries(function(_,b){var w=h[b]=[];_.subType==="parallel"?x(_,b):S(_,b,w)});function x(_,b){var w=_.coordinateSystem;p=p||w.hasAxisBrushed(),m(b)&&w.eachActiveState(_.getData(),function(C,T){C==="active"&&(d[T]=1)})}function S(_,b,w){if(!(!_.brushSelector||oEe(o,b))&&(D(v,function(T){o.brushTargetManager.controlSeries(T,_,e)&&w.push(T),p=p||y(w)}),m(b)&&y(w))){var C=_.getData();C.each(function(T){m4(_,w,C,T)&&(d[T]=1)})}}e.eachSeries(function(_,b){var w={seriesId:_.id,seriesIndex:b,seriesName:_.name,dataIndex:[]};l.selected.push(w);var C=h[b],T=_.getData(),A=m(b)?function(M){return d[M]?(w.dataIndex.push(T.getRawIndex(M)),"inBrush"):"outOfBrush"}:function(M){return m4(_,C,T,M)?(w.dataIndex.push(T.getRawIndex(M)),"inBrush"):"outOfBrush"};(m(b)?p:y(C))&&eEe(g4,g,T,A)})}),iEe(t,i,a,n,r)}function iEe(e,t,r,n,i){if(i){var a=e.getZr();if(!a[MA]){a[aC]||(a[aC]=aEe);var o=Td(a,aC,r,t);o(e,n)}}}function aEe(e,t){if(!e.isDisposed()){var r=e.getZr();r[MA]=!0,e.dispatchAction({type:"brushSelect",batch:t}),r[MA]=!1}}function m4(e,t,r,n){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(e.brushSelector(n,r,o.selectors,o))return!0}}function oEe(e,t){var r=e.option.seriesIndex;return r!=null&&r!=="all"&&(q(r)?Ve(r,t)<0:t!==r)}var sEe={rect:function(e){return y4(e.range)},polygon:function(e){for(var t,r=e.range,n=0,i=r.length;n<i;n++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=r[n];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&y4(t)}};function y4(e){return new Ne(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var lEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new DP(n.getZr())).on("brush",ce(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){eY(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Ae(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Ae(i),$from:n})},t.type="brush",t}(Vt),uEe="#ddd",cEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&JU(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:uEe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=Z(r,function(n){return x4(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=x4(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.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},t}(Ze);function x4(e,t){return Oe({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new ht(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var fEe=["rect","polygon","lineX","lineY","keep","clear"],dEe=function(e){W(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,D(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return D(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:fEe.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:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(_i);function hEe(e){e.registerComponentView(lEe),e.registerComponentModel(cEe),e.registerPreprocessor(QRe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,nEe),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ir),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ir),Uc("brush",dEe)}var pEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={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"}},t}(Ze),vEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=Re(r.get("textBaseline"),r.get("textVerticalAlign")),c=new tt({style:Dt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),d=r.get("subtext"),h=new tt({style:Dt(s,{text:d,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),v=r.get("sublink"),g=r.get("triggerEvent",!0);c.silent=!p&&!g,h.silent=!v&&!g,p&&c.on("click",function(){r1(p,"_"+r.get("target"))}),v&&h.on("click",function(){r1(v,"_"+r.get("subtarget"))}),Ie(c).eventData=Ie(h).eventData=g?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),d&&a.add(h);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var x=vr(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),a.x=x.x,a.y=x.y,a.markRedraw();var S={align:l,verticalAlign:u};c.setStyle(S),h.setStyle(S),m=a.getBoundingRect();var _=x.margin,b=r.getItemStyle(["color","opacity"]);b.fill=r.get("backgroundColor");var w=new Qe({shape:{x:m.x-_[3],y:m.y-_[0],width:m.width+_[1]+_[3],height:m.height+_[0]+_[2],r:r.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});a.add(w)}},t.type="title",t}(Vt);function gEe(e){e.registerComponentModel(pEe),e.registerComponentView(vEe)}var S4=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],D(n,function(u,c){var f=pr(vd(u),""),d;Ce(u)?(d=Ae(u),d.value=c):d=c,o.push(d),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new fn([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={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:[]},t}(Ze),tY=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=ul(S4.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:[]}),t}(S4);cr(tY,TS.prototype);var mEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(Vt),yEe=function(e){W(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(ma),oC=Math.PI,b4=Je(),xEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return wr("nameValue",{noName:!0,value:c})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=bEe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":oe(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:oC/2},f=a==="vertical"?o.height:o.width,d=r.getModel("controlStyle"),h=d.get("show",!0),p=h?d.get("itemSize"):0,v=h?d.get("itemGap"):0,g=p+v,m=r.get(["label","rotate"])||0;m=m*oC/180;var y,x,S,_=d.get("position",!0),b=h&&d.get("showPlayBtn",!0),w=h&&d.get("showPrevBtn",!0),C=h&&d.get("showNextBtn",!0),T=0,A=f;_==="left"||_==="bottom"?(b&&(y=[0,0],T+=g),w&&(x=[T,0],T+=g),C&&(S=[A-p,0],A-=g)):(b&&(y=[A-p,0],A-=g),w&&(x=[0,0],T+=g),C&&(S=[A-p,0],A-=g));var M=[T,A];return r.get("inverse")&&M.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:m,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:x,nextBtnPosition:S,axisExtent:M,controlSize:p,controlGap:v}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=Qn(),l=o.x,u=o.y+o.height;to(s,s,[-l,-u]),Ju(s,s,-oC/2),to(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),f=y(i.getBoundingRect()),d=y(a.getBoundingRect()),h=[i.x,i.y],p=[a.x,a.y];p[0]=h[0]=c[0][0];var v=r.labelPosOpt;if(v==null||oe(v)){var g=v==="+"?0:1;x(h,f,c,1,g),x(p,d,c,1,1-g)}else{var g=v>=0?0:1;x(h,f,c,1,g),p[1]=h[1]+v}i.setPosition(h),a.setPosition(p),i.rotation=a.rotation=r.rotation,m(i),m(a);function m(S){S.originX=c[0][0]-S.x,S.originY=c[1][0]-S.y}function y(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function x(S,_,b,w,C){S[w]+=b[w][C]-_[w][C]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=SEe(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new yEe("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new ke;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new xr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:U({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new xr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:we({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],D(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),d=f.getModel("itemStyle"),h=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:ce(o._changeTimeline,o,u.value)},g=_4(f,d,n,v);g.ensureState("emphasis").style=h.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),bu(g);var m=Ie(g);f.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],D(u,function(c){var f=c.tickValue,d=l.getItemModel(f),h=d.getModel("label"),p=d.getModel(["emphasis","label"]),v=d.getModel(["progress","label"]),g=i.dataToCoord(c.tickValue),m=new tt({x:g,y:0,rotation:r.labelRotation-r.rotation,onclick:ce(o._changeTimeline,o,f),silent:!1,style:Dt(h,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});m.ensureState("emphasis").style=Dt(p),m.ensureState("progress").style=Dt(v),n.add(m),bu(m),b4(m).dataIndex=f,o._tickLabels.push(m)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);d(r.nextBtnPosition,"next",ce(this._changeTimeline,this,f?"-":"+")),d(r.prevBtnPosition,"prev",ce(this._changeTimeline,this,f?"+":"-")),d(r.playPosition,c?"stop":"play",ce(this._handlePlayClick,this,!c),!0);function d(h,p,v,g){if(h){var m=ha(Re(a.get(["controlStyle",p+"BtnSize"]),o),o),y=[0,-m/2,m,m],x=_Ee(a,p+"Icon",y,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:v});x.ensureState("emphasis").style=u,n.add(x),bu(x)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=ce(u._handlePointerDrag,u),f.ondragend=ce(u._handlePointerDragend,u),w4(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){w4(f,u._progressLine,s,i,a)}};this._currentPointer=_4(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Ai(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},t.prototype._doPlayStop=function(){var r=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=r.model;r._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(r){var n=this._mainGroup.getLocalTransform();return oa(r,n,!0)},t.prototype._findNearestTick=function(r){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-r);c<i&&(i=c,a=l)}),a},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(r){var n=this.model.getCurrentIndex();r==="+"?r=n+1:r==="-"&&(r=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:r,from:this.uid})},t.prototype._updateTicksStatus=function(){var r=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<r);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",b4(i[a]).dataIndex<=r)},t.type="timeline.slider",t}(mEe);function SEe(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new DS({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new nP({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new Vo}}function bEe(e,t){return vr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}function _Ee(e,t,r,n){var i=n.style,a=vg(e.get(["controlStyle",t]),n||{},new Ne(r[0],r[1],r[2],r[3]));return i&&a.setStyle(i),a}function _4(e,t,r,n,i,a){var o=t.get("color");if(i)i.setColor(o),r.add(i),a&&a.onUpdate(i);else{var s=e.get("symbol");i=ur(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),a&&a.onCreate(i)}var l=t.getItemStyle(["color"]);i.setStyle(l),n=Oe({rectHover:!0,z2:100},n,!0);var u=Ad(e.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=tc(e.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=e.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function w4(e,t,r,n,i,a){if(!e.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",r));if(a||!o.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}function wEe(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,r,n){var i=r.getComponent("timeline");return i&&t.currentIndex!=null&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),r.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),we({currentIndex:i.option.currentIndex},t)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,r){var n=r.getComponent("timeline");n&&t.playState!=null&&n.setPlayState(t.playState)})}function CEe(e){var t=e&&e.timeline;q(t)||(t=t?[t]:[]),D(t,function(r){r&&TEe(r)})}function TEe(e){var t=e.type,r={number:"value",time:"time"};if(r[t]&&(e.axisType=r[t],delete e.type),C4(e),eu(e,"controlPosition")){var n=e.controlStyle||(e.controlStyle={});eu(n,"position")||(n.position=e.controlPosition),n.position==="none"&&!eu(n,"show")&&(n.show=!1,delete n.position),delete e.controlPosition}D(e.data||[],function(i){Ce(i)&&!q(i)&&(!eu(i,"value")&&eu(i,"name")&&(i.value=i.name),C4(i))})}function C4(e){var t=e.itemStyle||(e.itemStyle={}),r=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};D(n,function(o,s){!a[s]&&!eu(i,s)&&(i[s]=o)}),r.label&&!eu(n,"emphasis")&&(n.emphasis=r.label,delete r.label)}function eu(e,t){return e.hasOwnProperty(t)}function AEe(e){e.registerComponentModel(tY),e.registerComponentView(xEe),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),wEe(e),e.registerPreprocessor(CEe)}function aD(e,t){if(!e)return!1;for(var r=q(e)?e:[e],n=0;n<r.length;n++)if(r[n]&&r[n][t])return!0;return!1}function sy(e){Bu(e,"label",["show"])}var ly=Je(),Ho=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.createdBySelf=!1,r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._mergeOption(r,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Ye.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},t.prototype.mergeOption=function(r,n){this._mergeOption(r,n,!1,!1)},t.prototype._mergeOption=function(r,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=ly(s)[o];if(!l||!l.data){ly(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&sy(l),D(l.data,function(c){c instanceof Array?(sy(c[0]),sy(c[1])):sy(c)}),u=this.createMarkerModelFromSeries(l,this,n),U(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),ly(s)[o]=u},this)},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return wr("section",{header:this.name,blocks:[wr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(r){this._data=r},t.prototype.getDataParams=function(r,n){var i=TS.prototype.getDataParams.call(this,r,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},t.getMarkerModelFromSeries=function(r,n){return ly(r)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Ze);cr(Ho,TS.prototype);var MEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(Ho);function kA(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function kEe(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function uy(e,t,r,n,i,a){var o=[],s=Qs(t,n),l=s?t.getCalculationInfo("stackResultDimension"):n,u=oD(t,l,e),c=t.indicesOfNearest(l,u)[0];o[i]=t.get(r,c),o[a]=t.get(l,c);var f=t.get(n,c),d=Ba(t.get(n,c));return d=Math.min(d,20),d>=0&&(o[a]=+o[a].toFixed(d)),[o,f]}var sC={min:Ee(uy,"min"),max:Ee(uy,"max"),average:Ee(uy,"average"),median:Ee(uy,"median")};function zv(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!kEe(t)&&!q(t.coord)&&q(i)){var a=rY(t,r,n,e);if(t=Ae(t),t.type&&sC[t.type]&&a.baseAxis&&a.valueAxis){var o=Ve(i,a.baseAxis.dim),s=Ve(i,a.valueAxis.dim),l=sC[t.type](r,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!q(i))t.coord=[];else for(var u=t.coord,c=0;c<2;c++)sC[u[c]]&&(u[c]=oD(r,r.mapDimension(i[c]),u[c]));return t}}function rY(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(IEe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function IEe(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function Bv(e,t){return e&&e.containData&&t.coord&&!kA(t)?e.containData(t.coord):!0}function PEe(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!kA(t)&&!kA(r)?e.containZone(t.coord,r.coord):!0}function nY(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return Vs(o,t[a])}:function(r,n,i,a){return Vs(r.value,t[a])}}function oD(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var lC=Je(),sD=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=ve()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){lC(s).keep=!1}),n.eachSeries(function(s){var l=Ho.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!lC(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(r){lC(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;D(r,function(a){var o=Ho.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?UW(l):TI(l))})}})},t.type="marker",t}(Vt);function T4(e,t,r){var n=t.coordinateSystem;e.each(function(i){var a=e.getItemModel(i),o,s=re(a.get("x"),r.getWidth()),l=re(a.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(n){var u=e.get(n.dimensions[0],i),c=e.get(n.dimensions[1],i);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(i,o)})}var DEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ho.getMarkerModelFromSeries(a,"markPoint");o&&(T4(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new bg),f=REe(o,r,n);n.setData(f),T4(n.getData(),r,a),f.each(function(d){var h=f.getItemModel(d),p=h.getShallow("symbol"),v=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),m=h.getShallow("symbolOffset"),y=h.getShallow("symbolKeepAspect");if(Se(p)||Se(v)||Se(g)||Se(m)){var x=n.getRawValue(d),S=n.getDataParams(d);Se(p)&&(p=p(x,S)),Se(v)&&(v=v(x,S)),Se(g)&&(g=g(x,S)),Se(m)&&(m=m(x,S))}var _=h.getModel("itemStyle").getItemStyle(),b=mg(l,"color");_.fill||(_.fill=b),f.setItemVisual(d,{symbol:p,symbolSize:v,symbolRotate:g,symbolOffset:m,symbolKeepAspect:y,style:_})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(d){d.traverse(function(h){Ie(h).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}(sD);function REe(e,t,r){var n;e?n=Z(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return U(U({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new fn(n,r),a=Z(r.get("data"),Ee(zv,t));e&&(a=yt(a,Ee(Bv,e)));var o=nY(!!e,n);return i.initData(a,null,o),i}function EEe(e){e.registerComponentModel(MEe),e.registerComponentView(DEe),e.registerPreprocessor(function(t){aD(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var LEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Ho),cy=Je(),OEe=function(e,t,r,n){var i=e.getData(),a;if(q(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=Mr(n.yAxis,n.xAxis);else{var u=rY(n,i,t,e);s=u.valueAxis;var c=q9(i,u.valueDataDim);l=oD(i,c,o)}var f=s.dim==="x"?0:1,d=1-f,h=Ae(n),p={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,p.coord[d]=1/0;var v=r.get("precision");v>=0&&nt(l)&&(l=+l.toFixed(Math.min(v,20))),h.coord[f]=p.coord[f]=l,a=[h,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var g=[zv(e,a[0]),zv(e,a[1]),U({},a[2])];return g[2].type=g[2].type||null,Oe(g[2],g[0]),Oe(g[2],g[1]),g};function k1(e){return!isNaN(e)&&!isFinite(e)}function A4(e,t,r,n){var i=1-e,a=n.dimensions[e];return k1(t[i])&&k1(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function NEe(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(A4(1,r,n,e)||A4(0,r,n,e)))return!0}return Bv(e,t[0])&&Bv(e,t[1])}function uC(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=re(o.get("x"),i.getWidth()),u=re(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,f=e.get(c[0],t),d=e.get(c[1],t);s=a.dataToPoint([f,d])}if(nc(a,"cartesian2d")){var h=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;k1(e.get(c[0],t))?s[0]=h.toGlobalCoord(h.getExtent()[r?0:1]):k1(e.get(c[1],t))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var zEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ho.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=cy(o).from,u=cy(o).to;l.each(function(c){uC(l,c,!0,a,i),uC(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new PP);this.group.add(c.group);var f=BEe(o,r,n),d=f.from,h=f.to,p=f.line;cy(n).from=d,cy(n).to=h,n.setData(p);var v=n.get("symbol"),g=n.get("symbolSize"),m=n.get("symbolRotate"),y=n.get("symbolOffset");q(v)||(v=[v,v]),q(g)||(g=[g,g]),q(m)||(m=[m,m]),q(y)||(y=[y,y]),f.from.each(function(S){x(d,S,!0),x(h,S,!1)}),p.each(function(S){var _=p.getItemModel(S).getModel("lineStyle").getLineStyle();p.setItemLayout(S,[d.getItemLayout(S),h.getItemLayout(S)]),_.stroke==null&&(_.stroke=d.getItemVisual(S,"style").fill),p.setItemVisual(S,{fromSymbolKeepAspect:d.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(S,"symbolOffset"),fromSymbolRotate:d.getItemVisual(S,"symbolRotate"),fromSymbolSize:d.getItemVisual(S,"symbolSize"),fromSymbol:d.getItemVisual(S,"symbol"),toSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(S,"symbolOffset"),toSymbolRotate:h.getItemVisual(S,"symbolRotate"),toSymbolSize:h.getItemVisual(S,"symbolSize"),toSymbol:h.getItemVisual(S,"symbol"),style:_})}),c.updateData(p),f.line.eachItemGraphicEl(function(S){Ie(S).dataModel=n,S.traverse(function(_){Ie(_).dataModel=n})});function x(S,_,b){var w=S.getItemModel(_);uC(S,_,b,r,a);var C=w.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=mg(l,"color")),S.setItemVisual(_,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Re(w.get("symbolOffset",!0),y[b?0:1]),symbolRotate:Re(w.get("symbolRotate",!0),m[b?0:1]),symbolSize:Re(w.get("symbolSize"),g[b?0:1]),symbol:Re(w.get("symbol",!0),v[b?0:1]),style:C})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}(sD);function BEe(e,t,r){var n;e?n=Z(e&&e.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return U(U({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new fn(n,r),a=new fn(n,r),o=new fn([],r),s=Z(r.get("data"),Ee(OEe,t,e,r));e&&(s=yt(s,Ee(NEe,e)));var l=nY(!!e,n);return i.initData(Z(s,function(u){return u[0]}),null,l),a.initData(Z(s,function(u){return u[1]}),null,l),o.initData(Z(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function FEe(e){e.registerComponentModel(LEe),e.registerComponentView(zEe),e.registerPreprocessor(function(t){aD(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var $Ee=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Ho),fy=Je(),VEe=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=zv(e,i),s=zv(e,a),l=o.coord,u=s.coord;l[0]=Mr(l[0],-1/0),l[1]=Mr(l[1],-1/0),u[0]=Mr(u[0],1/0),u[1]=Mr(u[1],1/0);var c=sI([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function I1(e){return!isNaN(e)&&!isFinite(e)}function M4(e,t,r,n){var i=1-e;return I1(t[i])&&I1(r[i])}function GEe(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return nc(e,"cartesian2d")?r&&n&&(M4(1,r,n)||M4(0,r,n))?!0:PEe(e,i,a):Bv(e,i)||Bv(e,a)}function k4(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=re(o.get(r[0]),i.getWidth()),u=re(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=e.getValues(["x0","y0"],t),f=e.getValues(["x1","y1"],t),d=a.clampData(c),h=a.clampData(f),p=[];r[0]==="x0"?p[0]=d[0]>h[0]?f[0]:c[0]:p[0]=d[0]>h[0]?c[0]:f[0],r[1]==="y0"?p[1]=d[1]>h[1]?f[1]:c[1]:p[1]=d[1]>h[1]?c[1]:f[1],s=n.getMarkerPosition(p,r,!0)}else{var v=e.get(r[0],t),g=e.get(r[1],t),m=[v,g];a.clampData&&a.clampData(m,m),s=a.dataToPoint(m,!0)}if(nc(a,"cartesian2d")){var y=a.getAxis("x"),x=a.getAxis("y"),v=e.get(r[0],t),g=e.get(r[1],t);I1(v)?s[0]=y.toGlobalCoord(y.getExtent()[r[0]==="x0"?0:1]):I1(g)&&(s[1]=x.toGlobalCoord(x.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var I4=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],HEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ho.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Z(I4,function(f){return k4(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new ke});this.group.add(c.group),this.markKeep(c);var f=WEe(o,r,n);n.setData(f),f.each(function(d){var h=Z(I4,function(C){return k4(f,d,C,r,a)}),p=o.getAxis("x").scale,v=o.getAxis("y").scale,g=p.getExtent(),m=v.getExtent(),y=[p.parse(f.get("x0",d)),p.parse(f.get("x1",d))],x=[v.parse(f.get("y0",d)),v.parse(f.get("y1",d))];Ai(y),Ai(x);var S=!(g[0]>y[1]||g[1]<y[0]||m[0]>x[1]||m[1]<x[0]),_=!S;f.setItemLayout(d,{points:h,allClipped:_});var b=f.getItemModel(d).getModel("itemStyle").getItemStyle(),w=mg(l,"color");b.fill||(b.fill=w,oe(b.fill)&&(b.fill=W0(b.fill,.4))),b.stroke||(b.stroke=w),f.setItemVisual(d,"style",b)}),f.diff(fy(c).data).add(function(d){var h=f.getItemLayout(d);if(!h.allClipped){var p=new gn({shape:{points:h.points}});f.setItemGraphicEl(d,p),c.group.add(p)}}).update(function(d,h){var p=fy(c).data.getItemGraphicEl(h),v=f.getItemLayout(d);v.allClipped?p&&c.group.remove(p):(p?at(p,{shape:{points:v.points}},n,d):p=new gn({shape:{points:v.points}}),f.setItemGraphicEl(d,p),c.group.add(p))}).remove(function(d){var h=fy(c).data.getItemGraphicEl(d);c.group.remove(h)}).execute(),f.eachItemGraphicEl(function(d,h){var p=f.getItemModel(h),v=f.getItemVisual(h,"style");d.useStyle(f.getItemVisual(h,"style")),Vr(d,_r(p),{labelFetcher:n,labelDataIndex:h,defaultText:f.getName(h)||"",inheritColor:oe(v.fill)?W0(v.fill,1):"#000"}),$r(d,p),Yt(d,null,null,p.get(["emphasis","disabled"])),Ie(d).dataModel=n}),fy(c).data=f,c.group.silent=n.get("silent")||r.get("silent")},t.type="markArea",t}(sD);function WEe(e,t,r){var n,i,a=["x0","y0","x1","y1"];if(e){var o=Z(e&&e.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return U(U({},f),{name:u,ordinalMeta:null})});i=Z(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new fn(i,r)}else i=[{name:"value",type:"float"}],n=new fn(i,r);var s=Z(r.get("data"),Ee(VEe,t,e,r));e&&(s=yt(s,Ee(GEe,e)));var l=e?function(u,c,f,d){var h=u.coord[Math.floor(d/2)][d%2];return Vs(h,i[d])}:function(u,c,f,d){return Vs(u.value,i[d])};return n.initData(s,null,l),n.hasItemOption=!0,n}function jEe(e){e.registerComponentModel($Ee),e.registerComponentView(HEe),e.registerPreprocessor(function(t){aD(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var UEe=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},IA=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),q(n)&&D(n,function(a,o){oe(a)&&(a={type:a}),n[o]=Oe(a,UEe(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&mI(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=ve(),s=Z(a,function(l){return(oe(l)||nt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new ht(l,this,this.ecModel))},this);this._data=yt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;D(a,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;D(r,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;D(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Ve(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(Ze),Oc=Ee,PA=D,dy=ke,iY=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new dy),this.group.add(this._selectorGroup=new dy),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=r.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},d=r.get("padding"),h=vr(c,f,d),p=this.layoutInner(r,o,h,a,l,u),v=vr(we({width:p.width,height:p.height},c),f,d);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=UU(p,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=ve(),f=n.get("selectedMode"),d=[];i.eachRawSeries(function(h){!h.get("legendHoverLink")&&d.push(h.id)}),PA(n.getData(),function(h,p){var v=h.get("name");if(!this.newlineDisabled&&(v===""||v===`
226
226
  `)){var g=new dy;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(v)[0];if(!c.get(v))if(m){var y=m.getData(),x=y.getVisual("legendLineStyle")||{},S=y.getVisual("legendIcon"),_=y.getVisual("style"),b=this._createItem(m,v,p,h,n,r,x,_,S,f,a);b.on("click",Oc(P4,v,null,a,d)).on("mouseover",Oc(DA,m.name,null,a,d)).on("mouseout",Oc(RA,m.name,null,a,d)),i.ssr&&b.eachChild(function(w){var C=Ie(w);C.seriesIndex=m.seriesIndex,C.dataIndex=p,C.ssrType="legend"}),c.set(v,!0)}else i.eachRawSeries(function(w){if(!c.get(v)&&w.legendVisualProvider){var C=w.legendVisualProvider;if(!C.containName(v))return;var T=C.indexOfName(v),A=C.getItemVisual(T,"style"),M=C.getItemVisual(T,"legendIcon"),k=Jn(A.fill);k&&k[3]===0&&(k[3]=.2,A=U(U({},A),{fill:Ao(k,"rgba")}));var I=this._createItem(w,v,p,h,n,r,{},A,M,f,a);I.on("click",Oc(P4,null,v,a,d)).on("mouseover",Oc(DA,null,v,a,d)).on("mouseout",Oc(RA,null,v,a,d)),i.ssr&&I.eachChild(function(R){var E=Ie(R);E.seriesIndex=w.seriesIndex,E.dataIndex=p,E.ssrType="legend"}),c.set(v,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();PA(r,function(u){var c=u.type,f=new tt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);Vr(f,{normal:d,emphasis:h},{defaultText:u.title}),bu(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,d){var h=r.visualDrawType,p=o.get("itemWidth"),v=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),x=a.get("icon");c=x||c||"roundRect";var S=YEe(c,a,l,u,h,g,d),_=new dy,b=a.getModel("textStyle");if(Se(r.getLegendIcon)&&(!x||x==="inherit"))_.add(r.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:m,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}));else{var w=x==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;_.add(XEe({itemWidth:p,itemHeight:v,icon:c,iconRotate:w,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?p+5:-5,T=s,A=o.get("formatter"),M=n;oe(A)&&A?M=A.replace("{name}",n??""):Se(A)&&(M=A(n));var k=g?b.getTextColor():a.get("inactiveColor");_.add(new tt({style:Dt(b,{text:M,x:C,y:v/2,fill:k,align:T,verticalAlign:"middle"},{inheritColor:k})}));var I=new Qe({shape:_.getBoundingRect(),style:{fill:"transparent"}}),R=a.getModel("tooltip");return R.get("show")&&yd({el:I,componentModel:o,itemName:n,itemTooltipOption:R.option}),_.add(I),_.eachChild(function(E){E.silent=!0}),I.silent=!f,this.getContentGroup().add(_),bu(_),_.__legendDataIndex=i,_},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();wu(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){wu("horizontal",u,r.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],p=r.get("selectorButtonGap",!0),v=r.getOrient().index,g=v===0?"width":"height",m=v===0?"height":"width",y=v===0?"y":"x";s==="end"?h[v]+=c[g]+p:f[v]+=d[g]+p,h[1-v]+=c[m]/2-d[m]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var x={x:0,y:0};return x[g]=c[g]+p+d[g],x[m]=Math.max(c[m],d[m]),x[y]=Math.min(0,d[y]+h[1-v]),x}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Vt);function YEe(e,t,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),PA(g,function(y,x){g[x]==="inherit"&&(g[x]=m[x])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:Jf(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var d=t.getModel("lineStyle"),h=d.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var p=t.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&v?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function XEe(e){var t=e.icon||"roundRect",r=ur(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function P4(e,t,r,n){RA(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),DA(e,t,r,n)}function aY(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function DA(e,t,r,n){aY(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function RA(e,t,r,n){aY(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function qEe(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function Ch(e,t,r){var n={},i=e==="toggleSelected",a;return r.eachComponent("legend",function(o){i&&a!=null?o[a?"select":"unSelect"](t.name):e==="allSelect"||e==="inverseSelect"?o[e]():(o[e](t.name),a=o.isSelected(t.name));var s=o.getData();D(s,function(l){var u=l.get("name");if(!(u===`
227
- `||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function ZEe(e){e.registerAction("legendToggleSelect","legendselectchanged",Ee(Ch,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Ee(Ch,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Ee(Ch,"inverseSelect")),e.registerAction("legendSelect","legendselected",Ee(Ch,"select")),e.registerAction("legendUnSelect","legendunselected",Ee(Ch,"unSelect"))}function oY(e){e.registerComponentModel(IA),e.registerComponentView(iY),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,qEe),e.registerSubTypeDefaulter("legend",function(){return"plain"}),ZEe(e)}var KEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=_d(r);e.prototype.init.call(this,r,n,i),D4(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),D4(this,this.option,r)},t.type="legend.scroll",t.defaultOption=ul(IA.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(IA);function D4(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Ks(t,r,{type:"box",ignoreSize:!!i})}var R4=ke,cC=["width","height"],fC=["x","y"],QEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new R4),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new R4)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=q(f)?f:[f,f];p("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new tt({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var m=v+"DataIndex",y=vg(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:ce(u._pageGo,u,m,n,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=v,c.add(y)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=cC[u],f=fC[u],d=cC[1-u],h=fC[1-u];o&&wu("horizontal",l,r.get("selectorItemGap",!0));var p=r.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],m=Ae(i);o&&(m[c]=i[c]-v[c]-p);var y=this._layoutContentAndController(r,a,m,u,c,d,h,f);if(o){if(s==="end")g[u]+=y[c]+p;else{var x=v[c]+p;g[u]-=x,y[f]-=x}y[c]+=v[c]+p,g[1-u]+=y[h]+y[d]/2-v[d]/2,y[d]=Math.max(y[d],v[d]),y[h]=Math.min(y[h],v[h]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;wu(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),wu("horizontal",d,r.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),p=d.getBoundingRect(),v=this._showController=h[o]>i[o],g=[-h.x,-h.y];n||(g[a]=c[u]);var m=[0,0],y=[-p.x,-p.y],x=Re(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(v){var S=r.get("pageButtonPosition",!0);S==="end"?y[a]+=i[o]-p[o]:m[a]+=p[o]+x}y[1-a]+=h[s]/2-p[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(y);var _={x:0,y:0};if(_[o]=v?i[o]:h[o],_[s]=Math.max(h[s],p[s]),_[l]=Math.min(0,p[l]+y[1-a]),f.__rectSize=i[o],v){var b={x:0,y:0};b[o]=Math.max(i[o]-p[o]-x,0),b[s]=_[s],f.setClipPath(new Qe({shape:b})),f.__rectSize=b[o]}else d.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(r);return w.pageIndex!=null&&at(c,{x:w.contentPosition[0],y:w.contentPosition[1]},v?r:null),this._updatePageInfoView(r,w),_},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",oe(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=cC[o],l=fC[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],d=c.length,h=d?1:0,p={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var v=S(f);p.contentPosition[o]=-v.s;for(var g=u+1,m=v,y=v,x=null;g<=d;++g)x=S(c[g]),(!x&&y.e>m.s+a||x&&!_(x,m.s))&&(y.i>m.i?m=y:m=x,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=x;for(var g=u-1,m=v,y=v,x=null;g>=-1;--g)x=S(c[g]),(!x||!_(y,x.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=x;return p;function S(b){if(b){var w=b.getBoundingRect(),C=w[l]+b[l];return{s:C,e:C+w[s],i:b.__legendDataIndex}}}function _(b,w){return b.e>=w&&b.s<=w+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(iY);function JEe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function eLe(e){Ge(oY),e.registerComponentModel(KEe),e.registerComponentView(QEe),JEe(e)}function tLe(e){Ge(oY),Ge(eLe)}var rLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=ul(Nv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Nv),lD=Je();function nLe(e,t,r){lD(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function iLe(e,t){for(var r=lD(e).coordSysRecordMap,n=r.keys(),i=0;i<n.length;i++){var a=n[i],o=r.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||sY(r,o))}}}function sY(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function aLe(e,t){var r={model:t,containsPoint:Ee(sLe,t),dispatchAction:Ee(oLe,e),dataZoomInfoMap:null,controller:null},n=r.controller=new Ag(e.getZr());return D(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];r.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,r.model.mainType,r.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&r.dispatchAction(o)})}),r}function oLe(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function sLe(e,t,r,n){return e.coordinateSystem.containPoint([r,n])}function lLe(e){var t,r="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[r+s]>n[r+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function uLe(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=lD(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=ve());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=HU(a);D(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,aLe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ve());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){sY(i,a);return}var c=lLe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),Td(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var cLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),nLe(i,r,{pan:ce(dC.pan,this),zoom:ce(dC.zoom,this),scrollMove:ce(dC.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){iLe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(JP),dC={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=hC[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ac(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:E4(function(e,t,r,n,i,a){var o=hC[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:E4(function(e,t,r,n,i,a){var o=hC[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function E4(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(ac(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var hC={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function lY(e){eD(e),e.registerComponentModel(rLe),e.registerComponentView(cLe),uLe(e)}var fLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ul(Nv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(Nv),Th=Qe,L4=7,dLe=1,pC=30,hLe=7,Ah="horizontal",O4="vertical",pLe=5,vLe=["line","bar","candlestick","scatter"],gLe={easing:"cubicOut",duration:100,delay:0},mLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=ce(this._onBrush,this),this._onBrushEnd=ce(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),Td(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){wv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new ke;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?hLe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Ah?{right:s.width-o.x-o.width,top:s.height-pC-L4-a,width:o.width,height:pC}:{right:L4,top:o.y,width:pC,height:o.height},u=_d(r.option);D(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=vr(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===O4&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Ah&&!o?{scaleY:l?1:-1,scaleX:1}:i===Ah&&o?{scaleY:l?1:-1,scaleX:-1}:i===O4&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Th({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Th({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ce(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(l),d=(f[1]-f[0])*.3;f=[f[0]-d,f[1]+d];var h=[0,n[1]],p=[0,n[0]],v=[[n[0],0],[0,0]],g=[],m=p[1]/(o.count()-1),y=0,x=Math.round(o.count()/n[0]),S;o.each([l],function(T,A){if(x>0&&A%x){y+=m;return}var M=T==null||isNaN(T)||T==="",k=M?0:gt(T,f,h,!0);M&&!S&&A?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&S&&(v.push([y,0]),g.push([y,0])),v.push([y,k]),g.push([y,k]),y+=m,S=M}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var _=this.dataZoomModel;function b(T){var A=_.getModel(T?"selectedDataBackground":"dataBackground"),M=new ke,k=new gn({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Sn({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(k),M.add(I),M}for(var w=0;w<3;w++){var C=b(w===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!i&&!(n!==!0&&Ve(vLe,u.get("type"))<0)){var c=a.getComponent(Is(o),s).axis,f=yLe(o),d,h=u.coordinateSystem;f!=null&&h.getOtherAxis&&(d=h.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),i={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:d}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),d=n.filler=new Th({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new Th({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:dLe,fill:"rgba(0,0,0,0)"}})),D([0,1],function(x){var S=l.get("handleIcon");!a1[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var _=ur(S,-1,0,2,2,null,!0);_.attr({cursor:N4(this._orient),draggable:!0,drift:ce(this._onDragMove,this,x),ondragend:ce(this._onDragEnd,this),onmouseover:ce(this._showDataInfo,this,!0),onmouseout:ce(this._showDataInfo,this,!1),z2:5});var b=_.getBoundingRect(),w=l.get("handleSize");this._handleHeight=re(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,_.setStyle(l.getModel("handleStyle").getItemStyle()),_.style.strokeNoScale=!0,_.rectHover=!0,_.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),bu(_);var C=l.get("handleColor");C!=null&&(_.style.fill=C),o.add(i[x]=_);var T=l.getModel("textStyle");r.add(a[x]=new tt({silent:!0,invisible:!0,style:Dt(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var h=d;if(f){var p=re(l.get("moveHandleSize"),s[1]),v=n.moveHandle=new Qe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,m=n.moveHandleIcon=ur(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=s[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(p,10));h=n.moveZone=new Qe({invisible:!0,shape:{y:s[1]-y,height:p+y}}),h.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(m),o.add(h)}h.attr({draggable:!0,cursor:N4(this._orient),drift:ce(this._onDragMove,this,"all"),ondragstart:ce(this._showDataInfo,this,!0),ondragend:ce(this._onDragEnd,this),onmouseover:ce(this._showDataInfo,this,!0),onmouseout:ce(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[gt(r[0],[0,100],n,!0),gt(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ac(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?gt(s.minSpan,l,o,!0):null,s.maxSpan!=null?gt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ai([gt(a[0],o,l,!0),gt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Ai(i.slice()),o=this._size;D([0,1],function(h){var p=n.handles[h],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:i[h]+(h?-1:1),y:o[1]/2-v/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],d=f.getClipPath();d||(d=new Qe,f.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(r)},t.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=r?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var d=Ai(this._handleEnds.slice());h.call(this,0),h.call(this,1);function h(p){var v=_u(i.handles[p].parent,this.group),g=gS(p===0?"right":"left",v),m=this._handleWidth/2+pLe,y=oa([d[p]+(p===0?-m:m),this._size[1]/2],v);a[p].setStyle({x:y[0],y:y[1],verticalAlign:o===Ah?"middle":g,align:o===Ah?g:"center",text:s[p]})}},t.prototype._formatLabel=function(r,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=r==null||isNaN(r)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(o,20));return Se(a)?a(r,s):oe(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(r){r=this._dragging||r;var n=this._displayables,i=n.handleLabels;i[0].attr("invisible",!r),i[1].attr("invisible",!r),n.moveHandle&&this.api[r?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},t.prototype._onDragMove=function(r,n,i,a){this._dragging=!0,No(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=oa([n,i],o,!0),l=this._updateInterval(r,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(r){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Le(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Ai([gt(i.x,o,s,!0),gt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(No(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Th({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?gLe:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=HU(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(JP);function yLe(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function N4(e){return e==="vertical"?"ns-resize":"ew-resize"}function uY(e){e.registerComponentModel(fLe),e.registerComponentView(mLe),eD(e)}function xLe(e){Ge(lY),Ge(uY)}var cY={get:function(e,t,r){var n=Ae((SLe[e]||{})[t]);return r&&q(n)?n[n.length-1]:n}},SLe={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]}},z4=br.mapVisual,bLe=br.eachVisual,_Le=q,B4=D,wLe=Ai,CLe=gt,P1=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&JU(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=ce(r,this),this.controllerVisuals=AA(this.option.controller,n,r),this.targetVisuals=AA(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=St(r),n},t.prototype.eachTargetSeries=function(r,n){D(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],q(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(oe(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Se(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(d){return d===s[0]?"min":d===s[1]?"max":(+d).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=wLe([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Oe(a,i),Oe(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){_Le(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,d,h){var p=f[d],v=f[h];p&&!v&&(v=f[h]={},B4(p,function(g,m){if(br.isValidType(m)){var y=cY.get(m,"inactive",s);y!=null&&(v[m]=y,m==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(f){var d=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,h=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";B4(this.stateList,function(m){var y=this.itemSize,x=f[m];x||(x=f[m]={color:s?p:[p]}),x.symbol==null&&(x.symbol=d&&Ae(d)||(s?g:[g])),x.symbolSize==null&&(x.symbolSize=h&&Ae(h)||(s?y[0]:[y[0],y[0]])),x.symbol=z4(x.symbol,function(b){return b==="none"?g:b});var S=x.symbolSize;if(S!=null){var _=-1/0;bLe(S,function(b){b>_&&(_=b)}),x.symbolSize=z4(S,function(b){return CLe(b,[0,_],[0,y[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Ze),F4=[20,140],TLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=F4[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=F4[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):q(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=Ai((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},t.prototype.getValueState=function(r){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=r)&&(n[1]>=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=$4(this,"outOfRange",this.getExtent()),i=$4(this,"inRange",this.option.range.slice()),a=[];function o(h,p){a.push({value:h,color:r(h,p)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&o(a[a.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var d=a.length;return{stops:a,outerColors:[d?a[0].color:"transparent",d?a[d-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=ul(P1.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(P1);function $4(e,t,r){if(r[0]===r[1])return r.slice();for(var n=200,i=(r[1]-r[0])/n,a=r[0],o=[],s=0;s<=n&&a<r[1];s++)o.push(a),a+=i;return o.push(r[1]),o}var fY=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n},t.prototype.render=function(r,n,i,a){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,i,a)},t.prototype.renderBackground=function(r){var n=this.visualMapModel,i=bd(n.get("padding")||0),a=r.getBoundingRect();r.add(new Qe({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(r,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(h){return s[h]}function c(h,p){s[h]=p}var f=o.controllerVisuals[a||o.getValueState(r)],d=br.prepareVisualTypes(f);return D(d,function(h){var p=f[h];i.convertOpacityToAlpha&&h==="opacity"&&(h="colorAlpha",p=f.__alphaForOpacity),br.dependsOn(h,n)&&p&&p.applyVisual(r,u,c)}),s[n]},t.prototype.positionGroup=function(r){var n=this.visualMapModel,i=this.api;wS(r,n.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},t.prototype.doRender=function(r,n,i,a){},t.type="visualMap",t}(Vt),V4=[["left","right","width"],["top","bottom","height"]];function dY(e,t,r){var n=e.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=n.orient==="horizontal"?1:0,s=V4[o],l=[0,null,10],u={},c=0;c<3;c++)u[V4[1-o][c]]=l[c],u[s[c]]=c===2?r[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],d=vr(u,a,n.padding);return s[(d.margin[f[2]]||0)+d[f[0]]+d[f[1]]*.5<a[f[1]]*.5?0:1]}function Ky(e,t){return D(e||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var Aa=gt,ALe=D,G4=Math.min,vC=Math.max,MLe=12,kLe=6,ILe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return t.prototype.init=function(r,n){e.prototype.init.call(this,r,n),this._hoverLinkFromSeriesMouseOver=ce(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ce(this._hideIndicator,this)},t.prototype.doRender=function(r,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var i=r.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(r,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),d=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new tt({style:Dt(h,{x:c[0],y:c[1],verticalAlign:d==="horizontal"?"middle":f,align:d==="horizontal"?f:"center",text:a})}))}},t.prototype._renderBar=function(r){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=dY(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new ke;u.add(c),c.add(i.outOfRange=H4()),c.add(i.inRange=H4(null,s?j4(this._orient):null,ce(this._dragHandle,this,"all",!1),ce(this._dragHandle,this,"all",!0))),c.setClipPath(new Qe({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),d=vC(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,d,o),this._createHandle(n,u,1,a,d,o)),this._createIndicator(n,u,a,d,o),r.add(u)},t.prototype._createHandle=function(r,n,i,a,o,s){var l=ce(this._dragHandle,this,i,!1),u=ce(this._dragHandle,this,i,!0),c=ha(r.get("handleSize"),a[0]),f=ur(r.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=j4(this._orient);f.attr({cursor:d,draggable:!0,drift:l,ondragend:u,onmousemove:function(m){No(m.event)}}),f.x=a[0]/2,f.useStyle(r.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),lu(f,!0),n.add(f);var h=this.visualMapModel.textStyleModel,p=new tt({cursor:d,draggable:!0,drift:l,onmousemove:function(m){No(m.event)},ondragend:u,style:Dt(h,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],g=this._shapes;g.handleThumbs[i]=f,g.handleLabelPoints[i]=v,g.handleLabels[i]=p},t.prototype._createIndicator=function(r,n,i,a,o){var s=ha(r.get("indicatorSize"),i[0]),l=ur(r.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof Pr){var c=l.style;l.useStyle(U({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,d=new tt({silent:!0,invisible:!0,style:Dt(f,{x:0,y:0,text:""})});this.group.add(d);var h=[(o==="horizontal"?a/2:kLe)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=d,p.indicatorLabelPoint=h,this._firstShowIndicator=!0},t.prototype._dragHandle=function(r,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():W4(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},t.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),i=r.getExtent(),a=[0,r.itemSize[1]];this._handleEnds=[Aa(n[0],i,a,!0),Aa(n[1],i,a,!0)]},t.prototype._updateInterval=function(r,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];ac(n,a,o,r,0);var s=i.getExtent();this._dataInterval=[Aa(a[0],o,s,!0),Aa(a[1],o,s,!0)]},t.prototype._updateView=function(r){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=r?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(r,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(r,o),l=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new hg(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(r,n){var i=100,a=[],o=(r[1]-r[0])/i;a.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=r[0]+o*s;if(l>r[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new ke(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();ALe([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=r[c];var d=Aa(r[c],[0,l[1]],u,!0),h=this.getControllerVisual(d,"symbolSize");f.scaleX=f.scaleY=h/l[0],f.x=l[0]-h/2;var p=oa(i.handleLabelPoints[c],_u(f,this.group));s[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var d={convertOpacityToAlpha:!0},h=this.getControllerVisual(r,"color",d),p=this.getControllerVisual(r,"symbolSize"),v=Aa(r,s,u,!0),g=l[0]-p/2,m={x:f.x,y:f.y};f.y=v,f.x=g;var y=oa(c.indicatorLabelPoint,_u(f,this.group)),x=c.indicatorLabel;x.attr("invisible",!1);var S=this._applyTransform("left",c.mainGroup),_=this._orient,b=_==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:b?S:"middle",align:b?"center":S});var w={x:g,y:v,style:{fill:h}},C={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};f.x=m.x,f.y=m.y,f.animateTo(w,T),x.animateTo(C,T)}else f.attr(w),x.attr(C);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this.api.enterBlur(A[M])}},t.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=G4(vC(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=G4(vC(o[0],r),o[1]);var l=PLe(i,s,o),u=[r-l,r+l],c=Aa(r,o,s,!0),f=[Aa(u[0],o,s,!0),Aa(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var d=this._hoverLinkDataIndices,h=[];(n||W4(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=Pye(d,h);this._dispatchHighDown("downplay",Ky(p[0],i)),this._dispatchHighDown("highlight",Ky(p[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(cu(r.target,function(l){var u=Ie(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this.api.leaveBlur(n[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Ky(r,this.visualMapModel)),r.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(r,n,i,a){var o=_u(n,a?null:this.group);return q(r)?oa(r,o,i):gS(r,o,i)},t.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(fY);function H4(e,t,r,n){return new gn({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(i){No(i.event)},ondragend:n})}function PLe(e,t,r){var n=MLe/2,i=e.get("hoverLinkDataSize");return i&&(n=Aa(i,t,r,!0)/2),n}function W4(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function j4(e){return e==="vertical"?"ns-resize":"ew-resize"}var DLe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},RLe=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(r){r.setSelected(e.selected)})},ELe=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",function(n){var i=e.pipelineContext;!n.isTargetSeries(e)||i&&i.large||r.push(tEe(n.stateList,n.targetVisuals,ce(n.getValueState,n),n.getDataDimensionIndex(e.getData())))}),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(e)){var a=i.getVisualMeta(ce(LLe,null,e,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(r);o>=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function LLe(e,t,r,n){for(var i=t.targetVisuals[n],a=br.prepareVisualTypes(i),o={color:mg(e.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(r,f,d)}return o.color;function f(h){return o[h]}function d(h,p){o[h]=p}}var U4=D;function OLe(e){var t=e&&e.visualMap;q(t)||(t=t?[t]:[]),U4(t,function(r){if(r){Nc(r,"splitList")&&!Nc(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&q(n)&&U4(n,function(i){Ce(i)&&(Nc(i,"start")&&!Nc(i,"min")&&(i.min=i.start),Nc(i,"end")&&!Nc(i,"max")&&(i.max=i.end))})}})}function Nc(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var Y4=!1;function hY(e){Y4||(Y4=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(DLe,RLe),D(ELe,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(OLe))}function pY(e){e.registerComponentModel(TLe),e.registerComponentView(ILe),hY(e)}var NLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],zLe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=Ae(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Z(this._pieceList,function(l){return l=Ae(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=br.listVisualTypes(),a=this.isCategory();D(r.pieces,function(s){D(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),D(n,function(s,l){var u=!1;D(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&D(this.stateList,function(c){(r[c]||(r[c]={}))[l]=cY.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,D(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;D(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=Ae(r)},t.prototype.getValueState=function(r){var n=br.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=br.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var d=a.getRepresentValue({interval:c});f||(f=a.getValueState(d));var h=r(d,f);c[0]===-1/0?i[0]=h:c[1]===1/0?i[1]=h:n.push({value:c[0],color:h},{value:c[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=ul(P1.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}),t}(P1),zLe={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),GO(e),D(e,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(e){var t=this.option;D(t.categories,function(r){e.push({text:this.formatValueText(r,!0),value:r})},this),X4(t,e)},pieces:function(e){var t=this.option;D(t.pieces,function(r,n){Ce(r)||(r={value:r});var i={text:"",index:n};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var a=i.value=r.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var d=[["gte","gt","min"],["lte","lt","max"]][f],h=0;h<3&&o[f]==null;h++)o[f]=r[d[h]],s[f]=l[h],c[f]=h===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=br.retrieveVisuals(r),e.push(i)},this),X4(t,e),GO(e),D(e,function(r){var n=r.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function X4(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var BLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,d=Mr(n.get("showLabel",!0),!f);f&&this._renderEndsText(r,f[0],u,d,l),D(c.viewPieceList,function(h){var p=h.piece,v=new ke;v.onclick=ce(this._onItemClick,this,p),this._enableHoverLink(v,h.indexInModelPieceList);var g=n.getRepresentValue(p);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]]),d){var m=this.visualMapModel.getValueState(g);v.add(new tt({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1}}))}r.add(v)},this),f&&this._renderEndsText(r,f[1],u,d,l),wu(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Ky(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return dY(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new ke,l=this.visualMapModel.textStyleModel;s.add(new tt({style:Dt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=Z(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i){r.add(ur(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=Ae(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(fY);function vY(e){e.registerComponentModel(NLe),e.registerComponentView(BLe),hY(e)}function FLe(e){Ge(pY),Ge(vY)}var $Le={label:{enabled:!0},decal:{show:!1}},q4=Je(),VLe={};function GLe(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=Ae($Le);Oe(n.label,e.getLocaleModel().get("aria"),!1),Oe(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=ve();e.eachSeries(function(d){if(!d.isColorBySeries()){var h=f.get(d.type);h||(h={},f.set(d.type,h)),q4(d).scope=h}}),e.eachRawSeries(function(d){if(e.isSeriesFiltered(d))return;if(Se(d.enableAriaDecal)){d.enableAriaDecal();return}var h=d.getData();if(d.isColorBySeries()){var y=R2(d.ecModel,d.name,VLe,e.getSeriesCount()),x=h.getVisual("decal");h.setVisual("decal",S(x,y))}else{var p=d.getRawData(),v={},g=q4(d).scope;h.each(function(_){var b=h.getRawIndex(_);v[b]=_});var m=p.count();p.each(function(_){var b=v[_],w=p.getName(_)||_+"",C=R2(d.ecModel,w,g,m),T=h.getItemVisual(b,"decal");h.setItemVisual(b,"decal",S(T,C))})}function S(_,b){var w=_?U(U({},b),_):b;return w.dirty=!0,w}})}}function a(){var u=t.getZr().dom;if(u){var c=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=we(f.option,c),!!f.get("enabled")){if(f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var d=e.getSeriesCount(),h=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,v=Math.min(d,p),g;if(!(d<1)){var m=s();if(m){var y=f.get(["general","withTitle"]);g=o(y,{title:m})}else g=f.get(["general","withoutTitle"]);var x=[],S=d>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(S,{seriesCount:d}),e.eachSeries(function(C,T){if(T<v){var A=void 0,M=C.get("name"),k=M?"withName":"withoutName";A=d>1?f.get(["series","multiple",k]):f.get(["series","single",k]),A=o(A,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var I=C.getData();if(I.count()>h){var R=f.get(["data","partialData"]);A+=o(R,{displayCnt:h})}else A+=f.get(["data","allData"]);for(var E=f.get(["data","separator","middle"]),N=f.get(["data","separator","end"]),$=[],z=0;z<I.count();z++)if(z<h){var V=I.getName(z),L=I.getValues(z),G=f.get(["data",V?"withName":"withoutName"]);$.push(o(G,{name:V,value:L.join(E)}))}A+=$.join(E)+N,x.push(A)}});var _=f.getModel(["series","multiple","separator"]),b=_.get("middle"),w=_.get("end");g+=x.join(b)+w,u.setAttribute("aria-label",g)}}}}function o(u,c){if(!oe(u))return u;var f=u;return D(c,function(d,h){f=f.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),d)}),f}function s(){var u=e.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=e.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function HLe(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},D(["description","general","series","data"],function(r){t[r]!=null&&(t.label[r]=t[r])})}}function WLe(e){e.registerPreprocessor(HLe),e.registerVisual(e.PRIORITY.VISUAL.ARIA,GLe)}var Z4={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},jLe=function(){function e(t){var r=this._condVal=oe(t)?new RegExp(t):Zge(t)?t:null;if(r==null){var n="";ft(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return oe(r)?this._condVal.test(t):nt(r)?this._condVal.test(t+""):!1},e}(),ULe=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),YLe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(!t[r].evaluate())return!1;return!0},e}(),XLe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(t[r].evaluate())return!0;return!1},e}(),qLe=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),ZLe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=t?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?i:n))return!1;return!0},e}();function uD(e,t){if(e===!0||e===!1){var r=new ULe;return r.value=e,r}var n="";return gY(e)||ft(n),e.and?K4("and",e,t):e.or?K4("or",e,t):e.not?KLe(e,t):QLe(e,t)}function K4(e,t,r){var n=t[e],i="";q(n)||ft(i),n.length||ft(i);var a=e==="and"?new YLe:new XLe;return a.children=Z(n,function(o){return uD(o,r)}),a.children.length||ft(i),a}function KLe(e,t){var r=e.not,n="";gY(r)||ft(n);var i=new qLe;return i.child=uD(r,t),i.child||ft(n),i}function QLe(e,t){for(var r="",n=t.prepareGetValue(e),i=[],a=Ke(e),o=e.parser,s=o?K8(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var c=fe(Z4,u)?Z4[u]:u,f=e[u],d=s?s(f):f,h=zxe(c,d)||c==="reg"&&new jLe(d);h||ft(r),i.push(h)}}i.length||ft(r);var p=new ZLe;return p.valueGetterParam=n,p.valueParser=s,p.getValue=t.getValue,p.subCondList=i,p}function gY(e){return Ce(e)&&!Jr(e)}var JLe=function(){function e(t,r){this._cond=uD(t,r)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function eOe(e,t){return new JLe(e,t)}var tOe={type:"echarts:filter",transform:function(e){for(var t=e.upstream,r,n=eOe(e.config,{valueGetterAttrMap:ve({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;fe(s,"dimension")||ft(l);var c=t.getDimensionInfo(u);return c||ft(l),{dimIdx:c.index}},getValue:function(s){return t.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)r=t.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},rOe={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,n="",i=St(r);i.length||ft(n);var a=[];D(i,function(c){var f=c.dimension,d=c.order,h=c.parser,p=c.incomparable;if(f==null&&ft(n),d!=="asc"&&d!=="desc"&&ft(n),p&&p!=="min"&&p!=="max"){var v="";ft(v)}if(d!=="asc"&&d!=="desc"){var g="";ft(g)}var m=t.getDimensionInfo(f);m||ft(n);var y=h?K8(h):null;h&&!y&&ft(n),a.push({dimIdx:m.index,parser:y,comparator:new J8(d,p)})});var o=t.sourceFormat;o!==en&&o!==Vi&&ft(n);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,f){for(var d=0;d<a.length;d++){var h=a[d],p=t.retrieveValueFromItem(c,h.dimIdx),v=t.retrieveValueFromItem(f,h.dimIdx);h.parser&&(p=h.parser(p),v=h.parser(v));var g=h.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:s}}};function nOe(e){e.registerTransform(tOe),e.registerTransform(rOe)}var iOe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new n9(this),e5(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),e5(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:qa},t}(Ze),aOe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(Vt);function oOe(e){e.registerComponentModel(iOe),e.registerComponentView(aOe)}var Ca=io.CMD;function df(e,t){return Math.abs(e-t)<1e-5}function EA(e){var t=e.data,r=e.len(),n=[],i,a=0,o=0,s=0,l=0;function u(I,R){i&&i.length>2&&n.push(i),i=[I,R]}function c(I,R,E,N){df(I,E)&&df(R,N)||i.push(I,R,E,N,E,N)}function f(I,R,E,N,$,z){var V=Math.abs(R-I),L=Math.tan(V/4)*4/3,G=R<I?-1:1,H=Math.cos(I),F=Math.sin(I),Y=Math.cos(R),J=Math.sin(R),j=H*$+E,ee=F*z+N,Q=Y*$+E,te=J*z+N,ae=$*L*G,K=z*L*G;i.push(j-ae*F,ee+K*H,Q+ae*J,te-K*Y,Q,te)}for(var d,h,p,v,g=0;g<r;){var m=t[g++],y=g===1;switch(y&&(a=t[g],o=t[g+1],s=a,l=o,(m===Ca.L||m===Ca.C||m===Ca.Q)&&(i=[s,l])),m){case Ca.M:a=s=t[g++],o=l=t[g++],u(s,l);break;case Ca.L:d=t[g++],h=t[g++],c(a,o,d,h),a=d,o=h;break;case Ca.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case Ca.Q:d=t[g++],h=t[g++],p=t[g++],v=t[g++],i.push(a+2/3*(d-a),o+2/3*(h-o),p+2/3*(d-p),v+2/3*(h-v),p,v),a=p,o=v;break;case Ca.A:var x=t[g++],S=t[g++],_=t[g++],b=t[g++],w=t[g++],C=t[g++]+w;g+=1;var T=!t[g++];d=Math.cos(w)*_+x,h=Math.sin(w)*b+S,y?(s=d,l=h,u(s,l)):c(a,o,d,h),a=Math.cos(C)*_+x,o=Math.sin(C)*b+S;for(var A=(T?-1:1)*Math.PI/2,M=w;T?M>C:M<C;M+=A){var k=T?Math.max(M+A,C):Math.min(M+A,C);f(M,k,x,S,_,b)}break;case Ca.R:s=a=t[g++],l=o=t[g++],d=s+t[g++],h=l+t[g++],u(d,l),c(d,l,d,h),c(d,h,s,h),c(s,h,s,l),c(s,l,d,l);break;case Ca.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function LA(e,t,r,n,i,a,o,s,l,u){if(df(e,r)&&df(t,n)&&df(i,o)&&df(a,s)){l.push(o,s);return}var c=2/u,f=c*c,d=o-e,h=s-t,p=Math.sqrt(d*d+h*h);d/=p,h/=p;var v=r-e,g=n-t,m=i-o,y=a-s,x=v*v+g*g,S=m*m+y*y;if(x<f&&S<f){l.push(o,s);return}var _=d*v+h*g,b=-d*m-h*y,w=x-_*_,C=S-b*b;if(w<f&&_>=0&&C<f&&b>=0){l.push(o,s);return}var T=[],A=[];qs(e,r,i,o,.5,T),qs(t,n,a,s,.5,A),LA(T[0],A[0],T[1],A[1],T[2],A[2],T[3],A[3],l,u),LA(T[4],A[4],T[5],A[5],T[6],A[6],T[7],A[7],l,u)}function sOe(e,t){var r=EA(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],f=a[u++],d=a[u++],h=a[u++],p=a[u++],v=a[u++];LA(s,l,c,f,d,h,p,v,o,t),s=p,l=v}n.push(o)}return n}function mY(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=r-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function Q4(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),f=mY([l,u],c?0:1,t),d=(c?s:u)/f.length,h=0;h<f.length;h++)for(var p=(c?u:s)/f[h],v=0;v<f[h];v++){var g={};c?(g.startAngle=a+d*h,g.endAngle=a+d*(h+1),g.r0=n+p*v,g.r=n+p*(v+1)):(g.startAngle=a+p*v,g.endAngle=a+p*(v+1),g.r0=n+d*h,g.r=n+d*(h+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,r.push(g)}}function lOe(e,t,r){for(var n=e.width,i=e.height,a=n>i,o=mY([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=e[s]/o.length,d=0;d<o.length;d++)for(var h=e[l]/o[d],p=0;p<o[d];p++){var v={};v[u]=d*f,v[c]=p*h,v[s]=f,v[l]=h,v.x+=e.x,v.y+=e.y,r.push(v)}}function J4(e,t,r,n){return e*n-r*t}function uOe(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,d=J4(c,f,l,u);if(Math.abs(d)<1e-6)return null;var h=e-i,p=t-a,v=J4(h,p,c,f)/d;return v<0||v>1?null:new Le(v*l+e,v*u+t)}function cOe(e,t,r){var n=new Le;Le.sub(n,r,t),n.normalize();var i=new Le;Le.sub(i,e,t);var a=i.dot(n);return a}function zc(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function fOe(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var o=e[a],s=e[(a+1)%n],l=uOe(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:cOe(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(g,m){return g.projPt-m.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var d=[u.pt.x,u.pt.y],h=[c.pt.x,c.pt.y],p=[d],v=[h],a=u.idx+1;a<=c.idx;a++)zc(p,e[a].slice());zc(p,h),zc(p,d);for(var a=c.idx+1;a<=u.idx+n;a++)zc(v,e[a%n].slice());return zc(v,d),zc(v,h),[{points:p},{points:v}]}function eF(e){var t=e.points,r=[],n=[];cS(t,r,n);var i=new Ne(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new Le,c=new Le;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),fOe(t,u,c)}function D1(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);D1(e,a[0],i,n),D1(e,a[1],r-i,n)}return n}function dOe(e,t){for(var r=[],n=0;n<t;n++)r.push(MI(e));return r}function hOe(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function pOe(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function vOe(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":lOe(n,t,r),i=Qe;break;case"sector":Q4(n,t,r),i=vn;break;case"circle":Q4({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=vn;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=Z(sOe(e.getUpdatedPathProxy(),o),function(m){return pOe(m)}),l=s.length;if(l===0)D1(eF,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,f=Z(s,function(m){var y=[],x=[];cS(m,y,x);var S=(x[1]-y[1])*(x[0]-y[0]);return c+=S,{poly:m,area:S}});f.sort(function(m,y){return y.area-m.area});for(var d=t,u=0;u<l;u++){var h=f[u];if(d<=0)break;var p=u===l-1?d:Math.ceil(h.area/c*t);p<0||(D1(eF,{points:h.poly},p,r),d-=p)}}i=gn;break}if(!i)return dOe(e,t);for(var v=[],u=0;u<r.length;u++){var g=new i;g.setShape(r[u]),hOe(e,g),v.push(g)}return v}function gOe(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],o=r<n?e:t,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],d=l,h=2;h<s;){var p=o[h-2],v=o[h-1],g=o[h++],m=o[h++],y=o[h++],x=o[h++],S=o[h++],_=o[h++];if(d<=0){f.push(g,m,y,x,S,_);continue}for(var b=Math.min(d,c-1)+1,w=1;w<=b;w++){var C=w/b;qs(p,g,y,S,C,i),qs(v,m,x,_,C,a),p=i[3],v=a[3],f.push(i[1],a[1],i[2],a[2],p,v),g=i[5],m=a[5],y=i[6],x=a[6]}d-=b-1}return o===e?[f,t]:[e,f]}function tF(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function mOe(e,t){for(var r,n,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,f=void 0;l?u?(r=gOe(l,u),c=r[0],f=r[1],n=c,i=f):(f=tF(i||l,l),c=l):(c=tF(n||u,u),f=u),a.push(c),o.push(f)}return[a,o]}function rF(e){for(var t=0,r=0,n=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],l=e[o+1],u=e[a],c=e[a+1],f=s*c-u*l;t+=f,r+=(s+u)*f,n+=(l+c)*f}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function yOe(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,d=0;d<s;d+=2){var h=d===0?c:(c+d-2)%l+2,p=e[h]-r[0],v=e[h+1]-r[1],g=t[d]-n[0],m=t[d+1]-n[1],y=g-p,x=m-v;f+=y*y+x*x}f<a&&(a=f,o=u)}return o}function xOe(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function SOe(e,t,r,n){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],l=t[o],u=rF(s),c=rF(l);a==null&&(a=u[2]<0!=c[2]<0);var f=[],d=[],h=0,p=1/0,v=[],g=s.length;a&&(s=xOe(s));for(var m=yOe(s,l,u,c)*6,y=g-2,x=0;x<y;x+=2){var S=(m+x)%y+2;f[x+2]=s[S]-u[0],f[x+3]=s[S+1]-u[1]}f[0]=s[m]-u[0],f[1]=s[m+1]-u[1];for(var _=n/r,b=-n/2;b<=n/2;b+=_){for(var w=Math.sin(b),C=Math.cos(b),T=0,x=0;x<s.length;x+=2){var A=f[x],M=f[x+1],k=l[x]-c[0],I=l[x+1]-c[1],R=k*C-I*w,E=k*w+I*C;v[x]=R,v[x+1]=E;var N=R-A,$=E-M;T+=N*N+$*$}if(T<p){p=T,h=b;for(var z=0;z<v.length;z++)d[z]=v[z]}}i.push({from:f,to:d,fromCp:u,toCp:c,rotation:-h})}return i}function R1(e){return e.__isCombineMorphing}var yY="__mOriginal_";function E1(e,t,r){var n=yY+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function Ip(e,t){var r=yY+t;e[r]&&(e[t]=e[r],e[r]=null)}function nF(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function xY(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=mOe(EA(r),EA(n)),a=i[0],o=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&nF(a,s),l&&nF(o,l),E1(t,"updateTransform",{replace:u}),t.transform=null;var c=SOe(a,o,10,Math.PI),f=[];E1(t,"buildPath",{replace:function(d){for(var h=t.__morphT,p=1-h,v=[],g=0;g<c.length;g++){var m=c[g],y=m.from,x=m.to,S=m.rotation*h,_=m.fromCp,b=m.toCp,w=Math.sin(S),C=Math.cos(S);Ey(v,_,b,h);for(var T=0;T<y.length;T+=2){var A=y[T],M=y[T+1],k=x[T],I=x[T+1],R=A*p+k*h,E=M*p+I*h;f[T]=R*C-E*w+v[0],f[T+1]=R*w+E*C+v[1]}var N=f[0],$=f[1];d.moveTo(N,$);for(var T=2;T<y.length;){var k=f[T++],I=f[T++],z=f[T++],V=f[T++],L=f[T++],G=f[T++];N===k&&$===I&&z===L&&V===G?d.lineTo(L,G):d.bezierCurveTo(k,I,z,V,L,G),N=L,$=G}}}})}function cD(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;xY(e,t),t.__morphT=0;function a(){Ip(t,"buildPath"),Ip(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},we({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),t}function bOe(e,t,r,n,i,a){var o=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(e&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function L1(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=Z(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=Z(a,function(s,l){return{cp:s,z:bOe(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function SY(e){return vOe(e.path,e.count)}function OA(){return{fromIndividuals:[],toIndividuals:[],count:0}}function _Oe(e,t,r){var n=[];function i(_){for(var b=0;b<_.length;b++){var w=_[b];R1(w)?i(w.childrenRef()):w instanceof He&&n.push(w)}}i(e);var a=n.length;if(!a)return OA();var o=r.dividePath||SY,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),OA();n=L1(n),s=L1(s);for(var l=r.done,u=r.during,c=r.individualDelay,f=new bo,d=0;d<a;d++){var h=n[d],p=s[d];p.parent=t,p.copyTransform(f),c||xY(h,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function v(_){for(var b=0;b<s.length;b++)s[b].addSelfToZr(_)}E1(t,"addSelfToZr",{after:function(_){v(_)}}),E1(t,"removeSelfFromZr",{after:function(_){for(var b=0;b<s.length;b++)s[b].removeSelfFromZr(_)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,Ip(t,"addSelfToZr"),Ip(t,"removeSelfFromZr")}var m=s.length;if(c)for(var y=m,x=function(){y--,y===0&&(g(),l&&l())},d=0;d<m;d++){var S=c?we({delay:(r.delay||0)+c(d,m,n[d],s[d]),done:x},r):r;cD(n[d],s[d],S)}else t.__morphT=0,t.animateTo({__morphT:1},we({during:function(_){for(var b=0;b<m;b++){var w=s[b];w.__morphT=t.__morphT,w.dirtyShape()}u&&u(_)},done:function(){g();for(var _=0;_<e.length;_++)Ip(e[_],"updateTransform");l&&l()}},r));return t.__zr&&v(t.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function wOe(e,t,r){var n=t.length,i=[],a=r.dividePath||SY;function o(h){for(var p=0;p<h.length;p++){var v=h[p];R1(v)?o(v.childrenRef()):v instanceof He&&i.push(v)}}if(R1(e)){o(e.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(MI(i[l++%s]));i.length=n}else{i=a({path:e,count:n});for(var c=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),OA()}i=L1(i),t=L1(t);for(var f=r.individualDelay,u=0;u<n;u++){var d=f?we({delay:(r.delay||0)+f(u,n,i[u],t[u])},r):r;cD(i[u],t[u],d)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function iF(e){return q(e[0])}function aF(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var COe={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=MI(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function gC(e,t,r,n,i,a){if(!e.length||!t.length)return;var o=md("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;iF(e)&&(u=e,c=t),iF(t)&&(u=t,c=e);function f(m,y,x,S,_){var b=m.many,w=m.one;if(b.length===1&&!_){var C=y?b[0]:w,T=y?w:b[0];if(R1(C))f({many:[C],one:T},!0,x,S,!0);else{var A=s?we({delay:s(x,S)},l):l;cD(C,T,A),a(C,T,C,T,A)}}else for(var M=we({dividePath:COe[r],individualDelay:s&&function($,z,V,L){return s($+x,S)}},l),k=y?_Oe(b,w,M):wOe(w,b,M),I=k.fromIndividuals,R=k.toIndividuals,E=I.length,N=0;N<E;N++){var A=s?we({delay:s(N,E)},l):l;a(I[N],R[N],y?b[N]:m.one,y?m.one:b[N],A)}}for(var d=u?u===e:e.length>t.length,h=u?aF(c,u):aF(d?t:e,[d?e:t]),p=0,v=0;v<h.length;v++)p+=h[v].many.length;for(var g=0,v=0;v<h.length;v++)f(h[v],d,g,p),g+=h[v].many.length}function Yl(e){if(!e)return[];if(q(e)){for(var t=[],r=0;r<e.length;r++)t.push(Yl(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof He&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var bY=1e4,TOe=0,oF=1,sF=2,AOe=Je();function MOe(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function kOe(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function lF(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=MOe(e,i);if(a){var o=kOe(e,t,a);return o}var s=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||e.getId(t)}function uF(e){var t=[];return D(e,function(r){var n=r.data,i=r.dataGroupId;if(!(n.count()>bY))for(var a=n.getIndices(),o=0;o<a.length;o++)t.push({data:n,groupId:lF(n,o,i,!1),childGroupId:lF(n,o,i,!0),divide:r.divide,dataIndex:o})}),t}function mC(e,t,r){e.traverse(function(n){n instanceof He&&zt(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function yC(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function Bc(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function IOe(e,t,r){var n=md("update",r,t);n&&e.traverse(function(i){if(i instanceof Li){var a=S1e(i);a&&i.animateFrom({style:a},n)}})}function POe(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function _Y(e,t,r){var n=uF(e),i=uF(t);function a(x,S,_,b,w){(_||x)&&S.animateFrom({style:_&&_!==x?U(U({},_.style),x.style):x.style},w)}var o=!1,s=TOe,l=ve(),u=ve();n.forEach(function(x){x.groupId&&l.set(x.groupId,!0),x.childGroupId&&u.set(x.childGroupId,!0)});for(var c=0;c<i.length;c++){var f=i[c].groupId;if(u.get(f)){s=oF;break}var d=i[c].childGroupId;if(d&&l.get(d)){s=sF;break}}function h(x,S){return function(_){var b=_.data,w=_.dataIndex;return S?b.getId(w):x?s===oF?_.childGroupId:_.groupId:s===sF?_.childGroupId:_.groupId}}var p=POe(n,i),v={};if(!p)for(var c=0;c<i.length;c++){var g=i[c],m=g.data.getItemGraphicEl(g.dataIndex);m&&(v[m.id]=!0)}function y(x,S){var _=n[S],b=i[x],w=b.data.hostModel,C=_.data.getItemGraphicEl(_.dataIndex),T=b.data.getItemGraphicEl(b.dataIndex);if(C===T){T&&IOe(T,b.dataIndex,w);return}C&&v[C.id]||T&&(Bc(T),C?(Bc(C),yC(C),o=!0,gC(Yl(C),Yl(T),b.divide,w,x,a)):mC(T,w,x))}new $o(n,i,h(!0,p),h(!1,p),null,"multiple").update(y).updateManyToOne(function(x,S){var _=i[x],b=_.data,w=b.hostModel,C=b.getItemGraphicEl(_.dataIndex),T=yt(Z(S,function(A){return n[A].data.getItemGraphicEl(n[A].dataIndex)}),function(A){return A&&A!==C&&!v[A.id]});C&&(Bc(C),T.length?(D(T,function(A){Bc(A),yC(A)}),o=!0,gC(Yl(T),Yl(C),_.divide,w,x,a)):mC(C,w,_.dataIndex))}).updateOneToMany(function(x,S){var _=n[S],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&v[b.id])){var w=yt(Z(x,function(T){return i[T].data.getItemGraphicEl(i[T].dataIndex)}),function(T){return T&&T!==b}),C=i[x[0]].data.hostModel;w.length&&(D(w,function(T){return Bc(T)}),b?(Bc(b),yC(b),o=!0,gC(Yl(b),Yl(w),_.divide,C,x[0],a)):D(w,function(T){return mC(T,C,x[0])}))}}).updateManyToMany(function(x,S){new $o(S,x,function(_){return n[_].data.getId(n[_].dataIndex)},function(_){return i[_].data.getId(i[_].dataIndex)}).update(function(_,b){y(x[_],S[b])}).execute()}).execute(),o&&D(t,function(x){var S=x.data,_=S.hostModel,b=_&&r.getViewOfSeriesModel(_),w=md("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(C){C instanceof He&&!C.animators.length&&C.animateFrom({style:{opacity:0}},w)})})}function cF(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function fF(e){return q(e)?e.sort().join(","):e}function vs(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function DOe(e,t){var r=ve(),n=ve(),i=ve();return D(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],l=e.oldData[o],u=cF(a),c=fF(u);n.set(c,{dataGroupId:s,data:l}),q(u)&&D(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),D(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=cF(a),u=fF(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:vs(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:vs(s),data:s}]});else if(q(l)){var f=[];D(l,function(p){var v=n.get(p);v.data&&f.push({dataGroupId:v.dataGroupId,divide:vs(v.data),data:v.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:vs(s)}]})}else{var d=i.get(l);if(d){var h=r.get(d.key);h||(h={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:vs(d.data)}],newSeries:[]},r.set(d.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:vs(s)})}}}}),r}function dF(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function ROe(e,t,r,n){var i=[],a=[];D(St(e.from),function(o){var s=dF(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:vs(t.oldData[s]),groupIdDim:o.dimension})}),D(St(e.to),function(o){var s=dF(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:vs(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&_Y(i,a,n)}function EOe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){D(St(n.seriesTransition),function(i){D(St(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Wy]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=AOe(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)D(St(a),function(h){ROe(h,i,n,r)});else{var o=DOe(i,n);D(o.keys(),function(h){var p=o.get(h);_Y(p.oldSeries,p.newSeries,r)})}D(n.updatedSeries,function(h){h[Wy]&&(h[Wy]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var d=s[f].getData();d.count()<bY&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(d))}})}Ge([Gwe]);Ge([zwe]);Ge([lCe,wCe,ECe,dTe,wTe,u2e,z2e,SAe,GAe,XAe,nMe,KMe,_ke,Eke,qke,Jke,uIe,gIe,MIe,EIe,HIe,APe]);Ge(jPe);Ge(yDe);Ge(S7);Ge(DDe);Ge(aU);Ge(ODe);Ge(WDe);Ge(DRe);Ge(ZRe);Ge(kg);Ge(hEe);Ge(gEe);Ge(AEe);Ge(EEe);Ge(FEe);Ge(jEe);Ge(tLe);Ge(xLe);Ge(lY);Ge(uY);Ge(FLe);Ge(pY);Ge(vY);Ge(WLe);Ge(nOe);Ge(oOe);Ge(EOe);Ge(nwe);const O1={DARK:{textColor:"#b3c3bc",axisColor:"#5b6f66",backgroundColor:"#27272a",splitLine:"#4c4c52"},LIGHT:{textColor:"#000",axisColor:"#000",backgroundColor:"#fff",splitLine:"#ddd"}},LOe=e=>!isNaN(new Date(e).getTime()),OOe=e=>e&&LOe(e)?new Date(e).toLocaleString():"",wY=({charts:e,lines:t,scatterplot:r})=>t.map(({key:n,name:i})=>({symbolSize:4,type:r?"scatter":"line",name:i,data:e[n]})),hF={type:"value",boundaryGap:[0,"5%"]},NOe=({splitAxis:e,yAxisLabels:t})=>e&&(!t||Array.isArray(t))?Array(2).fill(hF).map((r,n)=>({...r,...t?{name:t[n]}:{}})):{...hF,...t?{name:t}:{}},zOe=e=>{const t=new Date(e);return[qb(t.getHours(),2),qb(t.getMinutes(),2),qb(t.getSeconds(),2)].join(":")},BOe=({chartValueFormatter:e,value:t})=>e?e(t):Array.isArray(t)?t[1]:t,FOe=({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s})=>({title:{text:t},dataZoom:[{type:"inside",start:0,end:100}],tooltip:{trigger:"axis",formatter:l=>Array.isArray(l)&&l.length>0&&l.some(u=>!!u.value)?l.reduce((u,{axisValue:c,color:f,seriesName:d,value:h},p)=>`
227
+ `||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function ZEe(e){e.registerAction("legendToggleSelect","legendselectchanged",Ee(Ch,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Ee(Ch,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Ee(Ch,"inverseSelect")),e.registerAction("legendSelect","legendselected",Ee(Ch,"select")),e.registerAction("legendUnSelect","legendunselected",Ee(Ch,"unSelect"))}function oY(e){e.registerComponentModel(IA),e.registerComponentView(iY),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,qEe),e.registerSubTypeDefaulter("legend",function(){return"plain"}),ZEe(e)}var KEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=_d(r);e.prototype.init.call(this,r,n,i),D4(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),D4(this,this.option,r)},t.type="legend.scroll",t.defaultOption=ul(IA.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(IA);function D4(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Ks(t,r,{type:"box",ignoreSize:!!i})}var R4=ke,cC=["width","height"],fC=["x","y"],QEe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new R4),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new R4)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=q(f)?f:[f,f];p("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new tt({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var m=v+"DataIndex",y=vg(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:ce(u._pageGo,u,m,n,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=v,c.add(y)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=cC[u],f=fC[u],d=cC[1-u],h=fC[1-u];o&&wu("horizontal",l,r.get("selectorItemGap",!0));var p=r.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],m=Ae(i);o&&(m[c]=i[c]-v[c]-p);var y=this._layoutContentAndController(r,a,m,u,c,d,h,f);if(o){if(s==="end")g[u]+=y[c]+p;else{var x=v[c]+p;g[u]-=x,y[f]-=x}y[c]+=v[c]+p,g[1-u]+=y[h]+y[d]/2-v[d]/2,y[d]=Math.max(y[d],v[d]),y[h]=Math.min(y[h],v[h]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;wu(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),wu("horizontal",d,r.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),p=d.getBoundingRect(),v=this._showController=h[o]>i[o],g=[-h.x,-h.y];n||(g[a]=c[u]);var m=[0,0],y=[-p.x,-p.y],x=Re(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(v){var S=r.get("pageButtonPosition",!0);S==="end"?y[a]+=i[o]-p[o]:m[a]+=p[o]+x}y[1-a]+=h[s]/2-p[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(y);var _={x:0,y:0};if(_[o]=v?i[o]:h[o],_[s]=Math.max(h[s],p[s]),_[l]=Math.min(0,p[l]+y[1-a]),f.__rectSize=i[o],v){var b={x:0,y:0};b[o]=Math.max(i[o]-p[o]-x,0),b[s]=_[s],f.setClipPath(new Qe({shape:b})),f.__rectSize=b[o]}else d.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(r);return w.pageIndex!=null&&at(c,{x:w.contentPosition[0],y:w.contentPosition[1]},v?r:null),this._updatePageInfoView(r,w),_},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",oe(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=cC[o],l=fC[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],d=c.length,h=d?1:0,p={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var v=S(f);p.contentPosition[o]=-v.s;for(var g=u+1,m=v,y=v,x=null;g<=d;++g)x=S(c[g]),(!x&&y.e>m.s+a||x&&!_(x,m.s))&&(y.i>m.i?m=y:m=x,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=x;for(var g=u-1,m=v,y=v,x=null;g>=-1;--g)x=S(c[g]),(!x||!_(y,x.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=x;return p;function S(b){if(b){var w=b.getBoundingRect(),C=w[l]+b[l];return{s:C,e:C+w[s],i:b.__legendDataIndex}}}function _(b,w){return b.e>=w&&b.s<=w+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(iY);function JEe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function eLe(e){Ge(oY),e.registerComponentModel(KEe),e.registerComponentView(QEe),JEe(e)}function tLe(e){Ge(oY),Ge(eLe)}var rLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=ul(Nv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Nv),lD=Je();function nLe(e,t,r){lD(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function iLe(e,t){for(var r=lD(e).coordSysRecordMap,n=r.keys(),i=0;i<n.length;i++){var a=n[i],o=r.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||sY(r,o))}}}function sY(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function aLe(e,t){var r={model:t,containsPoint:Ee(sLe,t),dispatchAction:Ee(oLe,e),dataZoomInfoMap:null,controller:null},n=r.controller=new Ag(e.getZr());return D(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];r.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,r.model.mainType,r.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&r.dispatchAction(o)})}),r}function oLe(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function sLe(e,t,r,n){return e.coordinateSystem.containPoint([r,n])}function lLe(e){var t,r="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[r+s]>n[r+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function uLe(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=lD(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=ve());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=HU(a);D(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,aLe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ve());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){sY(i,a);return}var c=lLe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),Td(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var cLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),nLe(i,r,{pan:ce(dC.pan,this),zoom:ce(dC.zoom,this),scrollMove:ce(dC.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){iLe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(JP),dC={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=hC[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ac(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:E4(function(e,t,r,n,i,a){var o=hC[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:E4(function(e,t,r,n,i,a){var o=hC[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function E4(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(ac(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var hC={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function lY(e){eD(e),e.registerComponentModel(rLe),e.registerComponentView(cLe),uLe(e)}var fLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ul(Nv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(Nv),Th=Qe,L4=7,dLe=1,pC=30,hLe=7,Ah="horizontal",O4="vertical",pLe=5,vLe=["line","bar","candlestick","scatter"],gLe={easing:"cubicOut",duration:100,delay:0},mLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=ce(this._onBrush,this),this._onBrushEnd=ce(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),Td(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){wv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new ke;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?hLe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Ah?{right:s.width-o.x-o.width,top:s.height-pC-L4-a,width:o.width,height:pC}:{right:L4,top:o.y,width:pC,height:o.height},u=_d(r.option);D(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=vr(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===O4&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Ah&&!o?{scaleY:l?1:-1,scaleX:1}:i===Ah&&o?{scaleY:l?1:-1,scaleX:-1}:i===O4&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Th({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Th({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ce(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(l),d=(f[1]-f[0])*.3;f=[f[0]-d,f[1]+d];var h=[0,n[1]],p=[0,n[0]],v=[[n[0],0],[0,0]],g=[],m=p[1]/(o.count()-1),y=0,x=Math.round(o.count()/n[0]),S;o.each([l],function(T,A){if(x>0&&A%x){y+=m;return}var M=T==null||isNaN(T)||T==="",k=M?0:gt(T,f,h,!0);M&&!S&&A?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&S&&(v.push([y,0]),g.push([y,0])),v.push([y,k]),g.push([y,k]),y+=m,S=M}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var _=this.dataZoomModel;function b(T){var A=_.getModel(T?"selectedDataBackground":"dataBackground"),M=new ke,k=new gn({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Sn({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(k),M.add(I),M}for(var w=0;w<3;w++){var C=b(w===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!i&&!(n!==!0&&Ve(vLe,u.get("type"))<0)){var c=a.getComponent(Is(o),s).axis,f=yLe(o),d,h=u.coordinateSystem;f!=null&&h.getOtherAxis&&(d=h.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),i={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:d}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),d=n.filler=new Th({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new Th({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:dLe,fill:"rgba(0,0,0,0)"}})),D([0,1],function(x){var S=l.get("handleIcon");!a1[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var _=ur(S,-1,0,2,2,null,!0);_.attr({cursor:N4(this._orient),draggable:!0,drift:ce(this._onDragMove,this,x),ondragend:ce(this._onDragEnd,this),onmouseover:ce(this._showDataInfo,this,!0),onmouseout:ce(this._showDataInfo,this,!1),z2:5});var b=_.getBoundingRect(),w=l.get("handleSize");this._handleHeight=re(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,_.setStyle(l.getModel("handleStyle").getItemStyle()),_.style.strokeNoScale=!0,_.rectHover=!0,_.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),bu(_);var C=l.get("handleColor");C!=null&&(_.style.fill=C),o.add(i[x]=_);var T=l.getModel("textStyle");r.add(a[x]=new tt({silent:!0,invisible:!0,style:Dt(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var h=d;if(f){var p=re(l.get("moveHandleSize"),s[1]),v=n.moveHandle=new Qe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,m=n.moveHandleIcon=ur(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=s[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(p,10));h=n.moveZone=new Qe({invisible:!0,shape:{y:s[1]-y,height:p+y}}),h.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(m),o.add(h)}h.attr({draggable:!0,cursor:N4(this._orient),drift:ce(this._onDragMove,this,"all"),ondragstart:ce(this._showDataInfo,this,!0),ondragend:ce(this._onDragEnd,this),onmouseover:ce(this._showDataInfo,this,!0),onmouseout:ce(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[gt(r[0],[0,100],n,!0),gt(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ac(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?gt(s.minSpan,l,o,!0):null,s.maxSpan!=null?gt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ai([gt(a[0],o,l,!0),gt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Ai(i.slice()),o=this._size;D([0,1],function(h){var p=n.handles[h],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:i[h]+(h?-1:1),y:o[1]/2-v/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],d=f.getClipPath();d||(d=new Qe,f.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(r)},t.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=r?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var d=Ai(this._handleEnds.slice());h.call(this,0),h.call(this,1);function h(p){var v=_u(i.handles[p].parent,this.group),g=gS(p===0?"right":"left",v),m=this._handleWidth/2+pLe,y=oa([d[p]+(p===0?-m:m),this._size[1]/2],v);a[p].setStyle({x:y[0],y:y[1],verticalAlign:o===Ah?"middle":g,align:o===Ah?g:"center",text:s[p]})}},t.prototype._formatLabel=function(r,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=r==null||isNaN(r)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(o,20));return Se(a)?a(r,s):oe(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(r){r=this._dragging||r;var n=this._displayables,i=n.handleLabels;i[0].attr("invisible",!r),i[1].attr("invisible",!r),n.moveHandle&&this.api[r?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},t.prototype._onDragMove=function(r,n,i,a){this._dragging=!0,No(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=oa([n,i],o,!0),l=this._updateInterval(r,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(r){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Le(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Ai([gt(i.x,o,s,!0),gt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(No(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Th({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?gLe:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=HU(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(JP);function yLe(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function N4(e){return e==="vertical"?"ns-resize":"ew-resize"}function uY(e){e.registerComponentModel(fLe),e.registerComponentView(mLe),eD(e)}function xLe(e){Ge(lY),Ge(uY)}var cY={get:function(e,t,r){var n=Ae((SLe[e]||{})[t]);return r&&q(n)?n[n.length-1]:n}},SLe={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]}},z4=br.mapVisual,bLe=br.eachVisual,_Le=q,B4=D,wLe=Ai,CLe=gt,P1=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&JU(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=ce(r,this),this.controllerVisuals=AA(this.option.controller,n,r),this.targetVisuals=AA(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=St(r),n},t.prototype.eachTargetSeries=function(r,n){D(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],q(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(oe(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Se(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(d){return d===s[0]?"min":d===s[1]?"max":(+d).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=wLe([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Oe(a,i),Oe(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){_Le(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,d,h){var p=f[d],v=f[h];p&&!v&&(v=f[h]={},B4(p,function(g,m){if(br.isValidType(m)){var y=cY.get(m,"inactive",s);y!=null&&(v[m]=y,m==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(f){var d=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,h=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";B4(this.stateList,function(m){var y=this.itemSize,x=f[m];x||(x=f[m]={color:s?p:[p]}),x.symbol==null&&(x.symbol=d&&Ae(d)||(s?g:[g])),x.symbolSize==null&&(x.symbolSize=h&&Ae(h)||(s?y[0]:[y[0],y[0]])),x.symbol=z4(x.symbol,function(b){return b==="none"?g:b});var S=x.symbolSize;if(S!=null){var _=-1/0;bLe(S,function(b){b>_&&(_=b)}),x.symbolSize=z4(S,function(b){return CLe(b,[0,_],[0,y[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Ze),F4=[20,140],TLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=F4[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=F4[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):q(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=Ai((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},t.prototype.getValueState=function(r){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=r)&&(n[1]>=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=$4(this,"outOfRange",this.getExtent()),i=$4(this,"inRange",this.option.range.slice()),a=[];function o(h,p){a.push({value:h,color:r(h,p)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&o(a[a.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var d=a.length;return{stops:a,outerColors:[d?a[0].color:"transparent",d?a[d-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=ul(P1.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(P1);function $4(e,t,r){if(r[0]===r[1])return r.slice();for(var n=200,i=(r[1]-r[0])/n,a=r[0],o=[],s=0;s<=n&&a<r[1];s++)o.push(a),a+=i;return o.push(r[1]),o}var fY=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n},t.prototype.render=function(r,n,i,a){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,i,a)},t.prototype.renderBackground=function(r){var n=this.visualMapModel,i=bd(n.get("padding")||0),a=r.getBoundingRect();r.add(new Qe({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(r,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(h){return s[h]}function c(h,p){s[h]=p}var f=o.controllerVisuals[a||o.getValueState(r)],d=br.prepareVisualTypes(f);return D(d,function(h){var p=f[h];i.convertOpacityToAlpha&&h==="opacity"&&(h="colorAlpha",p=f.__alphaForOpacity),br.dependsOn(h,n)&&p&&p.applyVisual(r,u,c)}),s[n]},t.prototype.positionGroup=function(r){var n=this.visualMapModel,i=this.api;wS(r,n.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},t.prototype.doRender=function(r,n,i,a){},t.type="visualMap",t}(Vt),V4=[["left","right","width"],["top","bottom","height"]];function dY(e,t,r){var n=e.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=n.orient==="horizontal"?1:0,s=V4[o],l=[0,null,10],u={},c=0;c<3;c++)u[V4[1-o][c]]=l[c],u[s[c]]=c===2?r[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],d=vr(u,a,n.padding);return s[(d.margin[f[2]]||0)+d[f[0]]+d[f[1]]*.5<a[f[1]]*.5?0:1]}function Ky(e,t){return D(e||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var Aa=gt,ALe=D,G4=Math.min,vC=Math.max,MLe=12,kLe=6,ILe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return t.prototype.init=function(r,n){e.prototype.init.call(this,r,n),this._hoverLinkFromSeriesMouseOver=ce(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ce(this._hideIndicator,this)},t.prototype.doRender=function(r,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var i=r.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(r,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),d=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new tt({style:Dt(h,{x:c[0],y:c[1],verticalAlign:d==="horizontal"?"middle":f,align:d==="horizontal"?f:"center",text:a})}))}},t.prototype._renderBar=function(r){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=dY(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new ke;u.add(c),c.add(i.outOfRange=H4()),c.add(i.inRange=H4(null,s?j4(this._orient):null,ce(this._dragHandle,this,"all",!1),ce(this._dragHandle,this,"all",!0))),c.setClipPath(new Qe({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),d=vC(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,d,o),this._createHandle(n,u,1,a,d,o)),this._createIndicator(n,u,a,d,o),r.add(u)},t.prototype._createHandle=function(r,n,i,a,o,s){var l=ce(this._dragHandle,this,i,!1),u=ce(this._dragHandle,this,i,!0),c=ha(r.get("handleSize"),a[0]),f=ur(r.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=j4(this._orient);f.attr({cursor:d,draggable:!0,drift:l,ondragend:u,onmousemove:function(m){No(m.event)}}),f.x=a[0]/2,f.useStyle(r.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),lu(f,!0),n.add(f);var h=this.visualMapModel.textStyleModel,p=new tt({cursor:d,draggable:!0,drift:l,onmousemove:function(m){No(m.event)},ondragend:u,style:Dt(h,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],g=this._shapes;g.handleThumbs[i]=f,g.handleLabelPoints[i]=v,g.handleLabels[i]=p},t.prototype._createIndicator=function(r,n,i,a,o){var s=ha(r.get("indicatorSize"),i[0]),l=ur(r.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof Pr){var c=l.style;l.useStyle(U({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,d=new tt({silent:!0,invisible:!0,style:Dt(f,{x:0,y:0,text:""})});this.group.add(d);var h=[(o==="horizontal"?a/2:kLe)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=d,p.indicatorLabelPoint=h,this._firstShowIndicator=!0},t.prototype._dragHandle=function(r,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():W4(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},t.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),i=r.getExtent(),a=[0,r.itemSize[1]];this._handleEnds=[Aa(n[0],i,a,!0),Aa(n[1],i,a,!0)]},t.prototype._updateInterval=function(r,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];ac(n,a,o,r,0);var s=i.getExtent();this._dataInterval=[Aa(a[0],o,s,!0),Aa(a[1],o,s,!0)]},t.prototype._updateView=function(r){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=r?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(r,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(r,o),l=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new hg(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(r,n){var i=100,a=[],o=(r[1]-r[0])/i;a.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=r[0]+o*s;if(l>r[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new ke(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();ALe([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=r[c];var d=Aa(r[c],[0,l[1]],u,!0),h=this.getControllerVisual(d,"symbolSize");f.scaleX=f.scaleY=h/l[0],f.x=l[0]-h/2;var p=oa(i.handleLabelPoints[c],_u(f,this.group));s[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var d={convertOpacityToAlpha:!0},h=this.getControllerVisual(r,"color",d),p=this.getControllerVisual(r,"symbolSize"),v=Aa(r,s,u,!0),g=l[0]-p/2,m={x:f.x,y:f.y};f.y=v,f.x=g;var y=oa(c.indicatorLabelPoint,_u(f,this.group)),x=c.indicatorLabel;x.attr("invisible",!1);var S=this._applyTransform("left",c.mainGroup),_=this._orient,b=_==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:b?S:"middle",align:b?"center":S});var w={x:g,y:v,style:{fill:h}},C={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};f.x=m.x,f.y=m.y,f.animateTo(w,T),x.animateTo(C,T)}else f.attr(w),x.attr(C);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this.api.enterBlur(A[M])}},t.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=G4(vC(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=G4(vC(o[0],r),o[1]);var l=PLe(i,s,o),u=[r-l,r+l],c=Aa(r,o,s,!0),f=[Aa(u[0],o,s,!0),Aa(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var d=this._hoverLinkDataIndices,h=[];(n||W4(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=Pye(d,h);this._dispatchHighDown("downplay",Ky(p[0],i)),this._dispatchHighDown("highlight",Ky(p[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(cu(r.target,function(l){var u=Ie(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this.api.leaveBlur(n[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Ky(r,this.visualMapModel)),r.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(r,n,i,a){var o=_u(n,a?null:this.group);return q(r)?oa(r,o,i):gS(r,o,i)},t.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(fY);function H4(e,t,r,n){return new gn({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(i){No(i.event)},ondragend:n})}function PLe(e,t,r){var n=MLe/2,i=e.get("hoverLinkDataSize");return i&&(n=Aa(i,t,r,!0)/2),n}function W4(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function j4(e){return e==="vertical"?"ns-resize":"ew-resize"}var DLe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},RLe=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(r){r.setSelected(e.selected)})},ELe=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",function(n){var i=e.pipelineContext;!n.isTargetSeries(e)||i&&i.large||r.push(tEe(n.stateList,n.targetVisuals,ce(n.getValueState,n),n.getDataDimensionIndex(e.getData())))}),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(e)){var a=i.getVisualMeta(ce(LLe,null,e,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(r);o>=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function LLe(e,t,r,n){for(var i=t.targetVisuals[n],a=br.prepareVisualTypes(i),o={color:mg(e.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(r,f,d)}return o.color;function f(h){return o[h]}function d(h,p){o[h]=p}}var U4=D;function OLe(e){var t=e&&e.visualMap;q(t)||(t=t?[t]:[]),U4(t,function(r){if(r){Nc(r,"splitList")&&!Nc(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&q(n)&&U4(n,function(i){Ce(i)&&(Nc(i,"start")&&!Nc(i,"min")&&(i.min=i.start),Nc(i,"end")&&!Nc(i,"max")&&(i.max=i.end))})}})}function Nc(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var Y4=!1;function hY(e){Y4||(Y4=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(DLe,RLe),D(ELe,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(OLe))}function pY(e){e.registerComponentModel(TLe),e.registerComponentView(ILe),hY(e)}var NLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],zLe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=Ae(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Z(this._pieceList,function(l){return l=Ae(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=br.listVisualTypes(),a=this.isCategory();D(r.pieces,function(s){D(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),D(n,function(s,l){var u=!1;D(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&D(this.stateList,function(c){(r[c]||(r[c]={}))[l]=cY.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,D(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;D(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=Ae(r)},t.prototype.getValueState=function(r){var n=br.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=br.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var d=a.getRepresentValue({interval:c});f||(f=a.getValueState(d));var h=r(d,f);c[0]===-1/0?i[0]=h:c[1]===1/0?i[1]=h:n.push({value:c[0],color:h},{value:c[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=ul(P1.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}),t}(P1),zLe={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),GO(e),D(e,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(e){var t=this.option;D(t.categories,function(r){e.push({text:this.formatValueText(r,!0),value:r})},this),X4(t,e)},pieces:function(e){var t=this.option;D(t.pieces,function(r,n){Ce(r)||(r={value:r});var i={text:"",index:n};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var a=i.value=r.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var d=[["gte","gt","min"],["lte","lt","max"]][f],h=0;h<3&&o[f]==null;h++)o[f]=r[d[h]],s[f]=l[h],c[f]=h===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=br.retrieveVisuals(r),e.push(i)},this),X4(t,e),GO(e),D(e,function(r){var n=r.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function X4(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var BLe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,d=Mr(n.get("showLabel",!0),!f);f&&this._renderEndsText(r,f[0],u,d,l),D(c.viewPieceList,function(h){var p=h.piece,v=new ke;v.onclick=ce(this._onItemClick,this,p),this._enableHoverLink(v,h.indexInModelPieceList);var g=n.getRepresentValue(p);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]]),d){var m=this.visualMapModel.getValueState(g);v.add(new tt({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1}}))}r.add(v)},this),f&&this._renderEndsText(r,f[1],u,d,l),wu(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Ky(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return dY(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new ke,l=this.visualMapModel.textStyleModel;s.add(new tt({style:Dt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=Z(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i){r.add(ur(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=Ae(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(fY);function vY(e){e.registerComponentModel(NLe),e.registerComponentView(BLe),hY(e)}function FLe(e){Ge(pY),Ge(vY)}var $Le={label:{enabled:!0},decal:{show:!1}},q4=Je(),VLe={};function GLe(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=Ae($Le);Oe(n.label,e.getLocaleModel().get("aria"),!1),Oe(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=ve();e.eachSeries(function(d){if(!d.isColorBySeries()){var h=f.get(d.type);h||(h={},f.set(d.type,h)),q4(d).scope=h}}),e.eachRawSeries(function(d){if(e.isSeriesFiltered(d))return;if(Se(d.enableAriaDecal)){d.enableAriaDecal();return}var h=d.getData();if(d.isColorBySeries()){var y=R2(d.ecModel,d.name,VLe,e.getSeriesCount()),x=h.getVisual("decal");h.setVisual("decal",S(x,y))}else{var p=d.getRawData(),v={},g=q4(d).scope;h.each(function(_){var b=h.getRawIndex(_);v[b]=_});var m=p.count();p.each(function(_){var b=v[_],w=p.getName(_)||_+"",C=R2(d.ecModel,w,g,m),T=h.getItemVisual(b,"decal");h.setItemVisual(b,"decal",S(T,C))})}function S(_,b){var w=_?U(U({},b),_):b;return w.dirty=!0,w}})}}function a(){var u=t.getZr().dom;if(u){var c=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=we(f.option,c),!!f.get("enabled")){if(f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var d=e.getSeriesCount(),h=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,v=Math.min(d,p),g;if(!(d<1)){var m=s();if(m){var y=f.get(["general","withTitle"]);g=o(y,{title:m})}else g=f.get(["general","withoutTitle"]);var x=[],S=d>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(S,{seriesCount:d}),e.eachSeries(function(C,T){if(T<v){var A=void 0,M=C.get("name"),k=M?"withName":"withoutName";A=d>1?f.get(["series","multiple",k]):f.get(["series","single",k]),A=o(A,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var I=C.getData();if(I.count()>h){var R=f.get(["data","partialData"]);A+=o(R,{displayCnt:h})}else A+=f.get(["data","allData"]);for(var E=f.get(["data","separator","middle"]),N=f.get(["data","separator","end"]),$=[],z=0;z<I.count();z++)if(z<h){var V=I.getName(z),L=I.getValues(z),G=f.get(["data",V?"withName":"withoutName"]);$.push(o(G,{name:V,value:L.join(E)}))}A+=$.join(E)+N,x.push(A)}});var _=f.getModel(["series","multiple","separator"]),b=_.get("middle"),w=_.get("end");g+=x.join(b)+w,u.setAttribute("aria-label",g)}}}}function o(u,c){if(!oe(u))return u;var f=u;return D(c,function(d,h){f=f.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),d)}),f}function s(){var u=e.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=e.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function HLe(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},D(["description","general","series","data"],function(r){t[r]!=null&&(t.label[r]=t[r])})}}function WLe(e){e.registerPreprocessor(HLe),e.registerVisual(e.PRIORITY.VISUAL.ARIA,GLe)}var Z4={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},jLe=function(){function e(t){var r=this._condVal=oe(t)?new RegExp(t):Zge(t)?t:null;if(r==null){var n="";ft(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return oe(r)?this._condVal.test(t):nt(r)?this._condVal.test(t+""):!1},e}(),ULe=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),YLe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(!t[r].evaluate())return!1;return!0},e}(),XLe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(t[r].evaluate())return!0;return!1},e}(),qLe=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),ZLe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=t?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?i:n))return!1;return!0},e}();function uD(e,t){if(e===!0||e===!1){var r=new ULe;return r.value=e,r}var n="";return gY(e)||ft(n),e.and?K4("and",e,t):e.or?K4("or",e,t):e.not?KLe(e,t):QLe(e,t)}function K4(e,t,r){var n=t[e],i="";q(n)||ft(i),n.length||ft(i);var a=e==="and"?new YLe:new XLe;return a.children=Z(n,function(o){return uD(o,r)}),a.children.length||ft(i),a}function KLe(e,t){var r=e.not,n="";gY(r)||ft(n);var i=new qLe;return i.child=uD(r,t),i.child||ft(n),i}function QLe(e,t){for(var r="",n=t.prepareGetValue(e),i=[],a=Ke(e),o=e.parser,s=o?K8(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var c=fe(Z4,u)?Z4[u]:u,f=e[u],d=s?s(f):f,h=zxe(c,d)||c==="reg"&&new jLe(d);h||ft(r),i.push(h)}}i.length||ft(r);var p=new ZLe;return p.valueGetterParam=n,p.valueParser=s,p.getValue=t.getValue,p.subCondList=i,p}function gY(e){return Ce(e)&&!Jr(e)}var JLe=function(){function e(t,r){this._cond=uD(t,r)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function eOe(e,t){return new JLe(e,t)}var tOe={type:"echarts:filter",transform:function(e){for(var t=e.upstream,r,n=eOe(e.config,{valueGetterAttrMap:ve({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;fe(s,"dimension")||ft(l);var c=t.getDimensionInfo(u);return c||ft(l),{dimIdx:c.index}},getValue:function(s){return t.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)r=t.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},rOe={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,n="",i=St(r);i.length||ft(n);var a=[];D(i,function(c){var f=c.dimension,d=c.order,h=c.parser,p=c.incomparable;if(f==null&&ft(n),d!=="asc"&&d!=="desc"&&ft(n),p&&p!=="min"&&p!=="max"){var v="";ft(v)}if(d!=="asc"&&d!=="desc"){var g="";ft(g)}var m=t.getDimensionInfo(f);m||ft(n);var y=h?K8(h):null;h&&!y&&ft(n),a.push({dimIdx:m.index,parser:y,comparator:new J8(d,p)})});var o=t.sourceFormat;o!==en&&o!==Vi&&ft(n);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,f){for(var d=0;d<a.length;d++){var h=a[d],p=t.retrieveValueFromItem(c,h.dimIdx),v=t.retrieveValueFromItem(f,h.dimIdx);h.parser&&(p=h.parser(p),v=h.parser(v));var g=h.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:s}}};function nOe(e){e.registerTransform(tOe),e.registerTransform(rOe)}var iOe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new n9(this),e5(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),e5(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:qa},t}(Ze),aOe=function(e){W(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(Vt);function oOe(e){e.registerComponentModel(iOe),e.registerComponentView(aOe)}var Ca=io.CMD;function df(e,t){return Math.abs(e-t)<1e-5}function EA(e){var t=e.data,r=e.len(),n=[],i,a=0,o=0,s=0,l=0;function u(I,R){i&&i.length>2&&n.push(i),i=[I,R]}function c(I,R,E,N){df(I,E)&&df(R,N)||i.push(I,R,E,N,E,N)}function f(I,R,E,N,$,z){var V=Math.abs(R-I),L=Math.tan(V/4)*4/3,G=R<I?-1:1,H=Math.cos(I),F=Math.sin(I),Y=Math.cos(R),J=Math.sin(R),j=H*$+E,ee=F*z+N,Q=Y*$+E,te=J*z+N,ae=$*L*G,K=z*L*G;i.push(j-ae*F,ee+K*H,Q+ae*J,te-K*Y,Q,te)}for(var d,h,p,v,g=0;g<r;){var m=t[g++],y=g===1;switch(y&&(a=t[g],o=t[g+1],s=a,l=o,(m===Ca.L||m===Ca.C||m===Ca.Q)&&(i=[s,l])),m){case Ca.M:a=s=t[g++],o=l=t[g++],u(s,l);break;case Ca.L:d=t[g++],h=t[g++],c(a,o,d,h),a=d,o=h;break;case Ca.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case Ca.Q:d=t[g++],h=t[g++],p=t[g++],v=t[g++],i.push(a+2/3*(d-a),o+2/3*(h-o),p+2/3*(d-p),v+2/3*(h-v),p,v),a=p,o=v;break;case Ca.A:var x=t[g++],S=t[g++],_=t[g++],b=t[g++],w=t[g++],C=t[g++]+w;g+=1;var T=!t[g++];d=Math.cos(w)*_+x,h=Math.sin(w)*b+S,y?(s=d,l=h,u(s,l)):c(a,o,d,h),a=Math.cos(C)*_+x,o=Math.sin(C)*b+S;for(var A=(T?-1:1)*Math.PI/2,M=w;T?M>C:M<C;M+=A){var k=T?Math.max(M+A,C):Math.min(M+A,C);f(M,k,x,S,_,b)}break;case Ca.R:s=a=t[g++],l=o=t[g++],d=s+t[g++],h=l+t[g++],u(d,l),c(d,l,d,h),c(d,h,s,h),c(s,h,s,l),c(s,l,d,l);break;case Ca.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function LA(e,t,r,n,i,a,o,s,l,u){if(df(e,r)&&df(t,n)&&df(i,o)&&df(a,s)){l.push(o,s);return}var c=2/u,f=c*c,d=o-e,h=s-t,p=Math.sqrt(d*d+h*h);d/=p,h/=p;var v=r-e,g=n-t,m=i-o,y=a-s,x=v*v+g*g,S=m*m+y*y;if(x<f&&S<f){l.push(o,s);return}var _=d*v+h*g,b=-d*m-h*y,w=x-_*_,C=S-b*b;if(w<f&&_>=0&&C<f&&b>=0){l.push(o,s);return}var T=[],A=[];qs(e,r,i,o,.5,T),qs(t,n,a,s,.5,A),LA(T[0],A[0],T[1],A[1],T[2],A[2],T[3],A[3],l,u),LA(T[4],A[4],T[5],A[5],T[6],A[6],T[7],A[7],l,u)}function sOe(e,t){var r=EA(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],f=a[u++],d=a[u++],h=a[u++],p=a[u++],v=a[u++];LA(s,l,c,f,d,h,p,v,o,t),s=p,l=v}n.push(o)}return n}function mY(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=r-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function Q4(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),f=mY([l,u],c?0:1,t),d=(c?s:u)/f.length,h=0;h<f.length;h++)for(var p=(c?u:s)/f[h],v=0;v<f[h];v++){var g={};c?(g.startAngle=a+d*h,g.endAngle=a+d*(h+1),g.r0=n+p*v,g.r=n+p*(v+1)):(g.startAngle=a+p*v,g.endAngle=a+p*(v+1),g.r0=n+d*h,g.r=n+d*(h+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,r.push(g)}}function lOe(e,t,r){for(var n=e.width,i=e.height,a=n>i,o=mY([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=e[s]/o.length,d=0;d<o.length;d++)for(var h=e[l]/o[d],p=0;p<o[d];p++){var v={};v[u]=d*f,v[c]=p*h,v[s]=f,v[l]=h,v.x+=e.x,v.y+=e.y,r.push(v)}}function J4(e,t,r,n){return e*n-r*t}function uOe(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,d=J4(c,f,l,u);if(Math.abs(d)<1e-6)return null;var h=e-i,p=t-a,v=J4(h,p,c,f)/d;return v<0||v>1?null:new Le(v*l+e,v*u+t)}function cOe(e,t,r){var n=new Le;Le.sub(n,r,t),n.normalize();var i=new Le;Le.sub(i,e,t);var a=i.dot(n);return a}function zc(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function fOe(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var o=e[a],s=e[(a+1)%n],l=uOe(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:cOe(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(g,m){return g.projPt-m.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var d=[u.pt.x,u.pt.y],h=[c.pt.x,c.pt.y],p=[d],v=[h],a=u.idx+1;a<=c.idx;a++)zc(p,e[a].slice());zc(p,h),zc(p,d);for(var a=c.idx+1;a<=u.idx+n;a++)zc(v,e[a%n].slice());return zc(v,d),zc(v,h),[{points:p},{points:v}]}function eF(e){var t=e.points,r=[],n=[];cS(t,r,n);var i=new Ne(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new Le,c=new Le;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),fOe(t,u,c)}function D1(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);D1(e,a[0],i,n),D1(e,a[1],r-i,n)}return n}function dOe(e,t){for(var r=[],n=0;n<t;n++)r.push(MI(e));return r}function hOe(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function pOe(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function vOe(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":lOe(n,t,r),i=Qe;break;case"sector":Q4(n,t,r),i=vn;break;case"circle":Q4({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=vn;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=Z(sOe(e.getUpdatedPathProxy(),o),function(m){return pOe(m)}),l=s.length;if(l===0)D1(eF,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,f=Z(s,function(m){var y=[],x=[];cS(m,y,x);var S=(x[1]-y[1])*(x[0]-y[0]);return c+=S,{poly:m,area:S}});f.sort(function(m,y){return y.area-m.area});for(var d=t,u=0;u<l;u++){var h=f[u];if(d<=0)break;var p=u===l-1?d:Math.ceil(h.area/c*t);p<0||(D1(eF,{points:h.poly},p,r),d-=p)}}i=gn;break}if(!i)return dOe(e,t);for(var v=[],u=0;u<r.length;u++){var g=new i;g.setShape(r[u]),hOe(e,g),v.push(g)}return v}function gOe(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],o=r<n?e:t,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],d=l,h=2;h<s;){var p=o[h-2],v=o[h-1],g=o[h++],m=o[h++],y=o[h++],x=o[h++],S=o[h++],_=o[h++];if(d<=0){f.push(g,m,y,x,S,_);continue}for(var b=Math.min(d,c-1)+1,w=1;w<=b;w++){var C=w/b;qs(p,g,y,S,C,i),qs(v,m,x,_,C,a),p=i[3],v=a[3],f.push(i[1],a[1],i[2],a[2],p,v),g=i[5],m=a[5],y=i[6],x=a[6]}d-=b-1}return o===e?[f,t]:[e,f]}function tF(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function mOe(e,t){for(var r,n,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,f=void 0;l?u?(r=gOe(l,u),c=r[0],f=r[1],n=c,i=f):(f=tF(i||l,l),c=l):(c=tF(n||u,u),f=u),a.push(c),o.push(f)}return[a,o]}function rF(e){for(var t=0,r=0,n=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],l=e[o+1],u=e[a],c=e[a+1],f=s*c-u*l;t+=f,r+=(s+u)*f,n+=(l+c)*f}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function yOe(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,d=0;d<s;d+=2){var h=d===0?c:(c+d-2)%l+2,p=e[h]-r[0],v=e[h+1]-r[1],g=t[d]-n[0],m=t[d+1]-n[1],y=g-p,x=m-v;f+=y*y+x*x}f<a&&(a=f,o=u)}return o}function xOe(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function SOe(e,t,r,n){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],l=t[o],u=rF(s),c=rF(l);a==null&&(a=u[2]<0!=c[2]<0);var f=[],d=[],h=0,p=1/0,v=[],g=s.length;a&&(s=xOe(s));for(var m=yOe(s,l,u,c)*6,y=g-2,x=0;x<y;x+=2){var S=(m+x)%y+2;f[x+2]=s[S]-u[0],f[x+3]=s[S+1]-u[1]}f[0]=s[m]-u[0],f[1]=s[m+1]-u[1];for(var _=n/r,b=-n/2;b<=n/2;b+=_){for(var w=Math.sin(b),C=Math.cos(b),T=0,x=0;x<s.length;x+=2){var A=f[x],M=f[x+1],k=l[x]-c[0],I=l[x+1]-c[1],R=k*C-I*w,E=k*w+I*C;v[x]=R,v[x+1]=E;var N=R-A,$=E-M;T+=N*N+$*$}if(T<p){p=T,h=b;for(var z=0;z<v.length;z++)d[z]=v[z]}}i.push({from:f,to:d,fromCp:u,toCp:c,rotation:-h})}return i}function R1(e){return e.__isCombineMorphing}var yY="__mOriginal_";function E1(e,t,r){var n=yY+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function Ip(e,t){var r=yY+t;e[r]&&(e[t]=e[r],e[r]=null)}function nF(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function xY(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=mOe(EA(r),EA(n)),a=i[0],o=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&nF(a,s),l&&nF(o,l),E1(t,"updateTransform",{replace:u}),t.transform=null;var c=SOe(a,o,10,Math.PI),f=[];E1(t,"buildPath",{replace:function(d){for(var h=t.__morphT,p=1-h,v=[],g=0;g<c.length;g++){var m=c[g],y=m.from,x=m.to,S=m.rotation*h,_=m.fromCp,b=m.toCp,w=Math.sin(S),C=Math.cos(S);Ey(v,_,b,h);for(var T=0;T<y.length;T+=2){var A=y[T],M=y[T+1],k=x[T],I=x[T+1],R=A*p+k*h,E=M*p+I*h;f[T]=R*C-E*w+v[0],f[T+1]=R*w+E*C+v[1]}var N=f[0],$=f[1];d.moveTo(N,$);for(var T=2;T<y.length;){var k=f[T++],I=f[T++],z=f[T++],V=f[T++],L=f[T++],G=f[T++];N===k&&$===I&&z===L&&V===G?d.lineTo(L,G):d.bezierCurveTo(k,I,z,V,L,G),N=L,$=G}}}})}function cD(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;xY(e,t),t.__morphT=0;function a(){Ip(t,"buildPath"),Ip(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},we({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),t}function bOe(e,t,r,n,i,a){var o=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(e&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function L1(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=Z(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=Z(a,function(s,l){return{cp:s,z:bOe(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function SY(e){return vOe(e.path,e.count)}function OA(){return{fromIndividuals:[],toIndividuals:[],count:0}}function _Oe(e,t,r){var n=[];function i(_){for(var b=0;b<_.length;b++){var w=_[b];R1(w)?i(w.childrenRef()):w instanceof He&&n.push(w)}}i(e);var a=n.length;if(!a)return OA();var o=r.dividePath||SY,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),OA();n=L1(n),s=L1(s);for(var l=r.done,u=r.during,c=r.individualDelay,f=new bo,d=0;d<a;d++){var h=n[d],p=s[d];p.parent=t,p.copyTransform(f),c||xY(h,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function v(_){for(var b=0;b<s.length;b++)s[b].addSelfToZr(_)}E1(t,"addSelfToZr",{after:function(_){v(_)}}),E1(t,"removeSelfFromZr",{after:function(_){for(var b=0;b<s.length;b++)s[b].removeSelfFromZr(_)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,Ip(t,"addSelfToZr"),Ip(t,"removeSelfFromZr")}var m=s.length;if(c)for(var y=m,x=function(){y--,y===0&&(g(),l&&l())},d=0;d<m;d++){var S=c?we({delay:(r.delay||0)+c(d,m,n[d],s[d]),done:x},r):r;cD(n[d],s[d],S)}else t.__morphT=0,t.animateTo({__morphT:1},we({during:function(_){for(var b=0;b<m;b++){var w=s[b];w.__morphT=t.__morphT,w.dirtyShape()}u&&u(_)},done:function(){g();for(var _=0;_<e.length;_++)Ip(e[_],"updateTransform");l&&l()}},r));return t.__zr&&v(t.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function wOe(e,t,r){var n=t.length,i=[],a=r.dividePath||SY;function o(h){for(var p=0;p<h.length;p++){var v=h[p];R1(v)?o(v.childrenRef()):v instanceof He&&i.push(v)}}if(R1(e)){o(e.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(MI(i[l++%s]));i.length=n}else{i=a({path:e,count:n});for(var c=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),OA()}i=L1(i),t=L1(t);for(var f=r.individualDelay,u=0;u<n;u++){var d=f?we({delay:(r.delay||0)+f(u,n,i[u],t[u])},r):r;cD(i[u],t[u],d)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function iF(e){return q(e[0])}function aF(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var COe={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=MI(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function gC(e,t,r,n,i,a){if(!e.length||!t.length)return;var o=md("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;iF(e)&&(u=e,c=t),iF(t)&&(u=t,c=e);function f(m,y,x,S,_){var b=m.many,w=m.one;if(b.length===1&&!_){var C=y?b[0]:w,T=y?w:b[0];if(R1(C))f({many:[C],one:T},!0,x,S,!0);else{var A=s?we({delay:s(x,S)},l):l;cD(C,T,A),a(C,T,C,T,A)}}else for(var M=we({dividePath:COe[r],individualDelay:s&&function($,z,V,L){return s($+x,S)}},l),k=y?_Oe(b,w,M):wOe(w,b,M),I=k.fromIndividuals,R=k.toIndividuals,E=I.length,N=0;N<E;N++){var A=s?we({delay:s(N,E)},l):l;a(I[N],R[N],y?b[N]:m.one,y?m.one:b[N],A)}}for(var d=u?u===e:e.length>t.length,h=u?aF(c,u):aF(d?t:e,[d?e:t]),p=0,v=0;v<h.length;v++)p+=h[v].many.length;for(var g=0,v=0;v<h.length;v++)f(h[v],d,g,p),g+=h[v].many.length}function Yl(e){if(!e)return[];if(q(e)){for(var t=[],r=0;r<e.length;r++)t.push(Yl(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof He&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var bY=1e4,TOe=0,oF=1,sF=2,AOe=Je();function MOe(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function kOe(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function lF(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=MOe(e,i);if(a){var o=kOe(e,t,a);return o}var s=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||e.getId(t)}function uF(e){var t=[];return D(e,function(r){var n=r.data,i=r.dataGroupId;if(!(n.count()>bY))for(var a=n.getIndices(),o=0;o<a.length;o++)t.push({data:n,groupId:lF(n,o,i,!1),childGroupId:lF(n,o,i,!0),divide:r.divide,dataIndex:o})}),t}function mC(e,t,r){e.traverse(function(n){n instanceof He&&zt(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function yC(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function Bc(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function IOe(e,t,r){var n=md("update",r,t);n&&e.traverse(function(i){if(i instanceof Li){var a=S1e(i);a&&i.animateFrom({style:a},n)}})}function POe(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function _Y(e,t,r){var n=uF(e),i=uF(t);function a(x,S,_,b,w){(_||x)&&S.animateFrom({style:_&&_!==x?U(U({},_.style),x.style):x.style},w)}var o=!1,s=TOe,l=ve(),u=ve();n.forEach(function(x){x.groupId&&l.set(x.groupId,!0),x.childGroupId&&u.set(x.childGroupId,!0)});for(var c=0;c<i.length;c++){var f=i[c].groupId;if(u.get(f)){s=oF;break}var d=i[c].childGroupId;if(d&&l.get(d)){s=sF;break}}function h(x,S){return function(_){var b=_.data,w=_.dataIndex;return S?b.getId(w):x?s===oF?_.childGroupId:_.groupId:s===sF?_.childGroupId:_.groupId}}var p=POe(n,i),v={};if(!p)for(var c=0;c<i.length;c++){var g=i[c],m=g.data.getItemGraphicEl(g.dataIndex);m&&(v[m.id]=!0)}function y(x,S){var _=n[S],b=i[x],w=b.data.hostModel,C=_.data.getItemGraphicEl(_.dataIndex),T=b.data.getItemGraphicEl(b.dataIndex);if(C===T){T&&IOe(T,b.dataIndex,w);return}C&&v[C.id]||T&&(Bc(T),C?(Bc(C),yC(C),o=!0,gC(Yl(C),Yl(T),b.divide,w,x,a)):mC(T,w,x))}new $o(n,i,h(!0,p),h(!1,p),null,"multiple").update(y).updateManyToOne(function(x,S){var _=i[x],b=_.data,w=b.hostModel,C=b.getItemGraphicEl(_.dataIndex),T=yt(Z(S,function(A){return n[A].data.getItemGraphicEl(n[A].dataIndex)}),function(A){return A&&A!==C&&!v[A.id]});C&&(Bc(C),T.length?(D(T,function(A){Bc(A),yC(A)}),o=!0,gC(Yl(T),Yl(C),_.divide,w,x,a)):mC(C,w,_.dataIndex))}).updateOneToMany(function(x,S){var _=n[S],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&v[b.id])){var w=yt(Z(x,function(T){return i[T].data.getItemGraphicEl(i[T].dataIndex)}),function(T){return T&&T!==b}),C=i[x[0]].data.hostModel;w.length&&(D(w,function(T){return Bc(T)}),b?(Bc(b),yC(b),o=!0,gC(Yl(b),Yl(w),_.divide,C,x[0],a)):D(w,function(T){return mC(T,C,x[0])}))}}).updateManyToMany(function(x,S){new $o(S,x,function(_){return n[_].data.getId(n[_].dataIndex)},function(_){return i[_].data.getId(i[_].dataIndex)}).update(function(_,b){y(x[_],S[b])}).execute()}).execute(),o&&D(t,function(x){var S=x.data,_=S.hostModel,b=_&&r.getViewOfSeriesModel(_),w=md("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(C){C instanceof He&&!C.animators.length&&C.animateFrom({style:{opacity:0}},w)})})}function cF(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function fF(e){return q(e)?e.sort().join(","):e}function vs(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function DOe(e,t){var r=ve(),n=ve(),i=ve();return D(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],l=e.oldData[o],u=cF(a),c=fF(u);n.set(c,{dataGroupId:s,data:l}),q(u)&&D(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),D(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=cF(a),u=fF(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:vs(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:vs(s),data:s}]});else if(q(l)){var f=[];D(l,function(p){var v=n.get(p);v.data&&f.push({dataGroupId:v.dataGroupId,divide:vs(v.data),data:v.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:vs(s)}]})}else{var d=i.get(l);if(d){var h=r.get(d.key);h||(h={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:vs(d.data)}],newSeries:[]},r.set(d.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:vs(s)})}}}}),r}function dF(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function ROe(e,t,r,n){var i=[],a=[];D(St(e.from),function(o){var s=dF(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:vs(t.oldData[s]),groupIdDim:o.dimension})}),D(St(e.to),function(o){var s=dF(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:vs(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&_Y(i,a,n)}function EOe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){D(St(n.seriesTransition),function(i){D(St(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Wy]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=AOe(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)D(St(a),function(h){ROe(h,i,n,r)});else{var o=DOe(i,n);D(o.keys(),function(h){var p=o.get(h);_Y(p.oldSeries,p.newSeries,r)})}D(n.updatedSeries,function(h){h[Wy]&&(h[Wy]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var d=s[f].getData();d.count()<bY&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(d))}})}Ge([Gwe]);Ge([zwe]);Ge([lCe,wCe,ECe,dTe,wTe,u2e,z2e,SAe,GAe,XAe,nMe,KMe,_ke,Eke,qke,Jke,uIe,gIe,MIe,EIe,HIe,APe]);Ge(jPe);Ge(yDe);Ge(S7);Ge(DDe);Ge(aU);Ge(ODe);Ge(WDe);Ge(DRe);Ge(ZRe);Ge(kg);Ge(hEe);Ge(gEe);Ge(AEe);Ge(EEe);Ge(FEe);Ge(jEe);Ge(tLe);Ge(xLe);Ge(lY);Ge(uY);Ge(FLe);Ge(pY);Ge(vY);Ge(WLe);Ge(nOe);Ge(oOe);Ge(EOe);Ge(nwe);const O1={DARK:{textColor:"#b3c3bc",axisColor:"#5b6f66",backgroundColor:"#27272a",splitLine:"#4c4c52"},LIGHT:{textColor:"#000",axisColor:"#000",backgroundColor:"#fff",splitLine:"#ddd"}},LOe=e=>!isNaN(new Date(e).getTime()),OOe=e=>e&&LOe(e)?new Date(e).toLocaleString():"",wY=({charts:e,lines:t,scatterplot:r})=>t.map(({key:n,name:i})=>({symbolSize:4,type:r?"scatter":"line",name:i,data:e[n]})),hF={type:"value",boundaryGap:[0,"5%"]},NOe=({splitAxis:e,yAxisLabels:t})=>e&&(!t||Array.isArray(t))?Array(2).fill(hF).map((r,n)=>({...r,...t?{name:t[n]}:{}})):{...hF,...t?{name:t}:{}},zOe=e=>{const t=new Date(e);return[qb(t.getHours(),2),qb(t.getMinutes(),2),qb(t.getSeconds(),2)].join(":")},BOe=({chartValueFormatter:e,value:t})=>e?e(t):Array.isArray(t)?t[1]:t,FOe=({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s})=>({title:{text:t},tooltip:{trigger:"axis",formatter:l=>Array.isArray(l)&&l.length>0&&l.some(u=>!!u.value)?l.reduce((u,{axisValue:c,color:f,seriesName:d,value:h},p)=>`
228
228
  ${p===0?OOe(c):""}
229
229
  ${u}
230
230
  <br>
231
231
  <span style="color:${f};">
232
232
  ${d}:&nbsp${BOe({chartValueFormatter:i,value:h})}
233
233
  </span>
234
- `,""):"No data",borderWidth:0},xAxis:{type:"time",startValue:(e.time||[""])[0],axisLabel:{formatter:zOe}},grid:{left:60,right:40},yAxis:NOe({splitAxis:a,yAxisLabels:o}),series:wY({charts:e,lines:r,scatterplot:s}),color:n,toolbox:{right:10,feature:{dataZoom:{show:!0,title:{zoom:"Zoom Select",back:"Zoom Reset"}},saveAsImage:{name:t.replace(/\s+/g,"_").toLowerCase()+"_"+new Date().getTime()/1e3,title:"Download as PNG",emphasis:{iconStyle:{textPosition:"left"}}}}}}),$Oe=(e,t)=>({symbol:"none",label:{formatter:r=>`Run #${r.dataIndex+1}`,padding:[0,0,8,0]},lineStyle:{color:t?O1.DARK.axisColor:O1.LIGHT.axisColor},data:(e.markers||[]).map(r=>({xAxis:r}))}),VOe=e=>t=>{const{batch:r}=t;if(!r)return;const[{start:n,end:i}]=r,a=n>0&&i<100;e.setOption({dataZoom:[{type:"inside",start:n,end:i},{type:"slider",show:a,start:n,end:i}]})};function GOe({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s}){const[l,u]=O.useState(null),c=zi(({theme:{isDarkMode:d}})=>d),f=O.useRef(null);return O.useEffect(()=>{if(!f.current)return;const d=Tbe(f.current);d.setOption(FOe({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s})),d.on("datazoom",VOe(d));const h=()=>d.resize();return window.addEventListener("resize",h),d.group="swarmCharts",Abe("swarmCharts"),u(d),()=>{Mbe(d),window.removeEventListener("resize",h)}},[f]),O.useEffect(()=>{const d=r.every(({key:h})=>!!e[h]);l&&d&&l.setOption({series:r.map(({key:h,yAxisIndex:p,...v},g)=>({...v,data:e[h],...a?{yAxisIndex:p||g}:{},...g===0?{markLine:$Oe(e,c)}:{}}))})},[e,l,r,c]),O.useEffect(()=>{if(l){const{textColor:d,axisColor:h,backgroundColor:p,splitLine:v}=c?O1.DARK:O1.LIGHT;l.setOption({backgroundColor:p,textStyle:{color:d},title:{textStyle:{color:d}},legend:{icon:"circle",inactiveColor:d,textStyle:{color:d}},tooltip:{backgroundColor:p,textStyle:{color:d}},xAxis:{axisLine:{lineStyle:{color:h}}},yAxis:{axisLine:{lineStyle:{color:h}},splitLine:{lineStyle:{color:v}}}})}},[l,c]),O.useEffect(()=>{l&&l.setOption({series:wY({charts:e,lines:r,scatterplot:s})})},[r]),P.jsx("div",{ref:f,style:{width:"100%",height:"300px"}})}const HOe=Ya.percentilesToChart?Ya.percentilesToChart.map(e=>({name:`${e*100}th percentile`,key:`responseTimePercentile${e}`})):[],WOe=["#ff9f00","#9966CC","#8A2BE2","#8E4585","#E0B0FF","#C8A2C8","#E6E6FA"],jOe=[{title:"Total Requests per Second",lines:[{name:"RPS",key:"currentRps"},{name:"Failures/s",key:"currentFailPerSec"}],colors:["#00ca5a","#ff6d6d"]},{title:"Response Times (ms)",lines:HOe,colors:WOe},{title:"Number of Users",lines:[{name:"Number of Users",key:"userCount"}],colors:["#0099ff"]}];function UOe({charts:e}){return P.jsx("div",{children:jOe.map((t,r)=>P.jsx(GOe,{...t,charts:e},`swarm-chart-${r}`))})}const YOe=({ui:{charts:e}})=>({charts:e}),XOe=$n(YOe)(UOe);function qOe(e){return(e*100).toFixed(1)+"%"}function NA({classRatio:e}){return P.jsx("ul",{children:Object.entries(e).map(([t,{ratio:r,tasks:n}])=>P.jsxs("li",{children:[`${qOe(r)} ${t}`,n&&P.jsx(NA,{classRatio:n})]},`nested-ratio-${t}`))})}function ZOe({ratios:{perClass:e,total:t}}){return!e&&!t?null:P.jsxs("div",{children:[e&&P.jsxs(P.Fragment,{children:[P.jsx("h3",{children:"Ratio Per Class"}),P.jsx(NA,{classRatio:e})]}),t&&P.jsxs(P.Fragment,{children:[P.jsx("h3",{children:"Total Ratio"}),P.jsx(NA,{classRatio:t})]})]})}const KOe=({ui:{ratios:e}})=>({ratios:e}),QOe=$n(KOe)(ZOe),JOe=[{key:"id",title:"Worker"},{key:"state",title:"State"},{key:"userCount",title:"# users"},{key:"cpuUsage",title:"CPU usage"},{key:"memoryUsage",title:"Memory usage",formatter:xQ}];function eNe({workers:e=[]}){return P.jsx(sg,{defaultSortKey:"id",rows:e,structure:JOe})}const tNe=({ui:{workers:e}})=>({workers:e}),rNe=$n(tNe)(eNe),ls={stats:{component:Ege,key:"stats",title:"Statistics"},charts:{component:XOe,key:"charts",title:"Charts"},failures:{component:gge,key:"failures",title:"Failures"},exceptions:{component:dge,key:"exceptions",title:"Exceptions"},ratios:{component:QOe,key:"ratios",title:"Current Ratio"},reports:{component:_ge,key:"reports",title:"Download Data"},logs:{component:xge,key:ZG,title:"Logs"},workers:{component:rNe,key:"workers",title:"Workers",shouldDisplayTab:e=>e.swarm.isDistributed}},nNe=[ls.stats,ls.charts,ls.failures,ls.exceptions,ls.ratios,ls.reports,ls.logs,ls.workers],iNe=e=>{const t=new URL(window.location.href);for(const[r,n]of Object.entries(e))t.searchParams.set(r,n);window.history.pushState(null,"",t)},aNe=()=>window.location.search?yQ(window.location.search):null,oNe={query:aNe()},CY=xi({name:"url",initialState:oNe,reducers:{setUrl:ig}}),sNe=CY.actions,lNe=CY.reducer;function uNe({hasNotification:e,title:t}){return P.jsxs(Pt,{sx:{display:"flex",alignItems:"center"},children:[e&&P.jsx(Hk,{color:"secondary"}),P.jsx("span",{children:t})]})}function cNe({currentTabIndexFromQuery:e,notification:t,setNotification:r,setUrl:n,tabs:i}){const[a,o]=O.useState(e),s=(l,u)=>{const c=i[u].key;t[c]&&r({[c]:!1}),iNe({tab:c}),n({query:{tab:c}}),o(u)};return O.useEffect(()=>{o(e)},[e]),P.jsxs(ng,{maxWidth:"xl",children:[P.jsx(Pt,{sx:{mb:2},children:P.jsx(wue,{onChange:s,value:a,children:i.map(({key:l,title:u},c)=>P.jsx(wle,{label:P.jsx(uNe,{hasNotification:t[l],title:u})},`tab-${c}`))})}),i.map(({component:l=lge},u)=>a===u&&P.jsx(l,{},`tabpabel-${u}`))]})}const fNe=(e,{tabs:t,extendedTabs:r})=>{const{notification:n,swarm:{extendedTabs:i},url:{query:a}}=e,s=(t||[...nNe,...r||i||[]]).filter(({shouldDisplayTab:u})=>!u||u&&u(e)),l=a&&a.tab?s.findIndex(({key:u})=>u===a.tab):0;return{notification:n,tabs:s,currentTabIndexFromQuery:l>-1?l:0}},dNe={setNotification:QG.setNotification,setUrl:sNe.setUrl},hNe=$n(fNe,dNe)(cNe);var gF;const pNe={totalRps:0,failRatio:0,startTime:"",stats:[],errors:[],exceptions:[],charts:(gF=Ya.history)==null?void 0:gF.reduce(Xx,{}),ratios:{},userCount:0};var mF;const vNe=(mF=Ya.percentilesToChart)==null?void 0:mF.reduce((e,t)=>({...e,[`responseTimePercentile${t}`]:{value:null}}),{}),gNe=e=>Xx(e,{...vNe,currentRps:{value:null},currentFailPerSec:{value:null},totalAvgResponseTime:{value:null},userCount:{value:null},time:""}),TY=xi({name:"ui",initialState:pNe,reducers:{setUi:ig,updateCharts:(e,{payload:t})=>({...e,charts:Xx(e.charts,t)}),updateChartMarkers:(e,{payload:t})=>({...e,charts:{...gNe(e.charts),markers:e.charts.markers?[...e.charts.markers,t]:[(e.charts.time||[""])[0],t]}})}}),Pp=TY.actions,mNe=TY.reducer,yNe=ex({[O0.reducerPath]:O0.reducer,logViewer:Lfe,notification:Pfe,swarm:Jce,theme:EG,ui:mNe,url:lNe}),xNe=HV({reducer:yNe,middleware:e=>e().concat(O0.middleware)});function SNe(){const{data:e,refetch:t}=Xce(),r=So(Pp.setUi),n=zi(({swarm:a})=>a.state),i=n===Zr.SPAWNING||n==Zr.RUNNING;O.useEffect(()=>{e&&r({ratios:e})},[e]),cv(t,5e3,{shouldRunInterval:i})}const pF=2e3;function bNe(){const e=So(qx.setSwarm),t=So(Pp.setUi),r=So(Pp.updateCharts),n=So(Pp.updateChartMarkers),i=zi(({swarm:h})=>h),a=O.useRef(i.state),o=O.useRef(!1),[s,l]=O.useState(!1),{data:u,refetch:c}=Yce(),f=i.state===Zr.SPAWNING||i.state==Zr.RUNNING,d=()=>{if(!u)return;const{currentResponseTimePercentiles:h,extendedStats:p,stats:v,errors:g,totalRps:m,totalFailPerSec:y,failRatio:x,workers:S,userCount:_,totalAvgResponseTime:b}=u,w=new Date().toISOString();s&&(l(!1),n(w));const C=Oh(m,2),T=Oh(y,2),A=Oh(x*100),k={...Object.entries(h).reduce((I,[R,E])=>({...I,[R]:[w,E]}),{}),currentRps:[w,C],currentFailPerSec:[w,T],totalAvgResponseTime:[w,Oh(b,2)],userCount:[w,_],time:w};t({extendedStats:p,stats:v,errors:g,totalRps:C,failRatio:A,workers:S,userCount:_}),r(k)};O.useEffect(()=>{u&&e({state:u.state})},[u&&u.state]),O.useEffect(()=>{u&&(o.current||d(),o.current=!0)},[u]),cv(d,pF,{shouldRunInterval:!!u&&f}),cv(c,pF,{shouldRunInterval:f}),O.useEffect(()=>{i.state===Zr.RUNNING&&a.current===Zr.STOPPED&&l(!0),a.current=i.state},[i.state,a])}function _Ne(){const{data:e,refetch:t}=qce(),r=So(Pp.setUi),n=zi(({swarm:a})=>a.state),i=n===Zr.SPAWNING||n==Zr.RUNNING;O.useEffect(()=>{e&&r({exceptions:e.exceptions})},[e]),cv(t,5e3,{shouldRunInterval:i})}function wNe({swarmState:e,tabs:t,extendedTabs:r}){bNe(),_Ne(),SNe(),Nfe();const n=OG();return P.jsxs(H6,{theme:n,children:[P.jsx(uG,{}),P.jsx(kfe,{children:e===Zr.READY?P.jsx(XG,{}):P.jsx(hNe,{extendedTabs:r,tabs:t})})]})}const CNe=({swarm:{state:e}})=>({swarmState:e}),TNe=$n(CNe)(wNe);function ANe(){if(qR){const e=HV({reducer:ex({theme:EG})});return P.jsx(YR,{store:e,children:P.jsx(Hue,{...qR})})}else return P.jsx(YR,{store:xNe,children:P.jsx(TNe,{})})}function MNe({error:e}){return P.jsxs("div",{role:"alert",children:[P.jsx("p",{children:"Something went wrong"}),e.message&&P.jsx("pre",{style:{color:"red"},children:e.message}),"If the issue persists, please consider opening an"," ",P.jsx("a",{href:"https://github.com/locustio/locust/issues/new?assignees=&labels=bug&projects=&template=bug.yml",children:"issue"})]})}const kNe=xC.createRoot(document.getElementById("root"));kNe.render(P.jsx(fZ,{fallbackRender:MNe,children:P.jsx(ANe,{})}));
234
+ `,""):"No data",borderWidth:0},xAxis:{type:"time",startValue:(e.time||[""])[0],axisLabel:{formatter:zOe}},grid:{left:60,right:40},yAxis:NOe({splitAxis:a,yAxisLabels:o}),series:wY({charts:e,lines:r,scatterplot:s}),color:n,toolbox:{right:10,feature:{dataZoom:{title:{zoom:"Zoom Select",back:"Zoom Reset"},yAxisIndex:!1},saveAsImage:{name:t.replace(/\s+/g,"_").toLowerCase()+"_"+new Date().getTime()/1e3,title:"Download as PNG",emphasis:{iconStyle:{textPosition:"left"}}}}}}),$Oe=(e,t)=>({symbol:"none",label:{formatter:r=>`Run #${r.dataIndex+1}`,padding:[0,0,8,0]},lineStyle:{color:t?O1.DARK.axisColor:O1.LIGHT.axisColor},data:(e.markers||[]).map(r=>({xAxis:r}))}),VOe=e=>t=>{const{batch:r}=t;if(!r)return;const[{start:n,startValue:i,end:a}]=r,o=n>0&&a<=100||i>0;e.setOption({dataZoom:[{type:"slider",show:o}]})};function GOe({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s}){const[l,u]=O.useState(null),c=zi(({theme:{isDarkMode:d}})=>d),f=O.useRef(null);return O.useEffect(()=>{if(!f.current)return;const d=Tbe(f.current);d.setOption(FOe({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s})),d.on("datazoom",VOe(d));const h=()=>d.resize();return window.addEventListener("resize",h),d.group="swarmCharts",Abe("swarmCharts"),u(d),()=>{Mbe(d),window.removeEventListener("resize",h)}},[f]),O.useEffect(()=>{const d=r.every(({key:h})=>!!e[h]);l&&d&&l.setOption({series:r.map(({key:h,yAxisIndex:p,...v},g)=>({...v,data:e[h],...a?{yAxisIndex:p||g}:{},...g===0?{markLine:$Oe(e,c)}:{}}))})},[e,l,r,c]),O.useEffect(()=>{if(l){const{textColor:d,axisColor:h,backgroundColor:p,splitLine:v}=c?O1.DARK:O1.LIGHT;l.setOption({backgroundColor:p,textStyle:{color:d},title:{textStyle:{color:d}},legend:{icon:"circle",inactiveColor:d,textStyle:{color:d}},tooltip:{backgroundColor:p,textStyle:{color:d}},xAxis:{axisLine:{lineStyle:{color:h}}},yAxis:{axisLine:{lineStyle:{color:h}},splitLine:{lineStyle:{color:v}}}})}},[l,c]),O.useEffect(()=>{l&&l.setOption({series:wY({charts:e,lines:r,scatterplot:s})})},[r]),P.jsx("div",{ref:f,style:{width:"100%",height:"300px"}})}const HOe=Ya.percentilesToChart?Ya.percentilesToChart.map(e=>({name:`${e*100}th percentile`,key:`responseTimePercentile${e}`})):[],WOe=["#ff9f00","#9966CC","#8A2BE2","#8E4585","#E0B0FF","#C8A2C8","#E6E6FA"],jOe=[{title:"Total Requests per Second",lines:[{name:"RPS",key:"currentRps"},{name:"Failures/s",key:"currentFailPerSec"}],colors:["#00ca5a","#ff6d6d"]},{title:"Response Times (ms)",lines:HOe,colors:WOe},{title:"Number of Users",lines:[{name:"Number of Users",key:"userCount"}],colors:["#0099ff"]}];function UOe({charts:e}){return P.jsx("div",{children:jOe.map((t,r)=>P.jsx(GOe,{...t,charts:e},`swarm-chart-${r}`))})}const YOe=({ui:{charts:e}})=>({charts:e}),XOe=$n(YOe)(UOe);function qOe(e){return(e*100).toFixed(1)+"%"}function NA({classRatio:e}){return P.jsx("ul",{children:Object.entries(e).map(([t,{ratio:r,tasks:n}])=>P.jsxs("li",{children:[`${qOe(r)} ${t}`,n&&P.jsx(NA,{classRatio:n})]},`nested-ratio-${t}`))})}function ZOe({ratios:{perClass:e,total:t}}){return!e&&!t?null:P.jsxs("div",{children:[e&&P.jsxs(P.Fragment,{children:[P.jsx("h3",{children:"Ratio Per Class"}),P.jsx(NA,{classRatio:e})]}),t&&P.jsxs(P.Fragment,{children:[P.jsx("h3",{children:"Total Ratio"}),P.jsx(NA,{classRatio:t})]})]})}const KOe=({ui:{ratios:e}})=>({ratios:e}),QOe=$n(KOe)(ZOe),JOe=[{key:"id",title:"Worker"},{key:"state",title:"State"},{key:"userCount",title:"# users"},{key:"cpuUsage",title:"CPU usage"},{key:"memoryUsage",title:"Memory usage",formatter:xQ}];function eNe({workers:e=[]}){return P.jsx(sg,{defaultSortKey:"id",rows:e,structure:JOe})}const tNe=({ui:{workers:e}})=>({workers:e}),rNe=$n(tNe)(eNe),ls={stats:{component:Ege,key:"stats",title:"Statistics"},charts:{component:XOe,key:"charts",title:"Charts"},failures:{component:gge,key:"failures",title:"Failures"},exceptions:{component:dge,key:"exceptions",title:"Exceptions"},ratios:{component:QOe,key:"ratios",title:"Current Ratio"},reports:{component:_ge,key:"reports",title:"Download Data"},logs:{component:xge,key:ZG,title:"Logs"},workers:{component:rNe,key:"workers",title:"Workers",shouldDisplayTab:e=>e.swarm.isDistributed}},nNe=[ls.stats,ls.charts,ls.failures,ls.exceptions,ls.ratios,ls.reports,ls.logs,ls.workers],iNe=e=>{const t=new URL(window.location.href);for(const[r,n]of Object.entries(e))t.searchParams.set(r,n);window.history.pushState(null,"",t)},aNe=()=>window.location.search?yQ(window.location.search):null,oNe={query:aNe()},CY=xi({name:"url",initialState:oNe,reducers:{setUrl:ig}}),sNe=CY.actions,lNe=CY.reducer;function uNe({hasNotification:e,title:t}){return P.jsxs(Pt,{sx:{display:"flex",alignItems:"center"},children:[e&&P.jsx(Hk,{color:"secondary"}),P.jsx("span",{children:t})]})}function cNe({currentTabIndexFromQuery:e,notification:t,setNotification:r,setUrl:n,tabs:i}){const[a,o]=O.useState(e),s=(l,u)=>{const c=i[u].key;t[c]&&r({[c]:!1}),iNe({tab:c}),n({query:{tab:c}}),o(u)};return O.useEffect(()=>{o(e)},[e]),P.jsxs(ng,{maxWidth:"xl",children:[P.jsx(Pt,{sx:{mb:2},children:P.jsx(wue,{onChange:s,value:a,children:i.map(({key:l,title:u},c)=>P.jsx(wle,{label:P.jsx(uNe,{hasNotification:t[l],title:u})},`tab-${c}`))})}),i.map(({component:l=lge},u)=>a===u&&P.jsx(l,{},`tabpabel-${u}`))]})}const fNe=(e,{tabs:t,extendedTabs:r})=>{const{notification:n,swarm:{extendedTabs:i},url:{query:a}}=e,s=(t||[...nNe,...r||i||[]]).filter(({shouldDisplayTab:u})=>!u||u&&u(e)),l=a&&a.tab?s.findIndex(({key:u})=>u===a.tab):0;return{notification:n,tabs:s,currentTabIndexFromQuery:l>-1?l:0}},dNe={setNotification:QG.setNotification,setUrl:sNe.setUrl},hNe=$n(fNe,dNe)(cNe);var gF;const pNe={totalRps:0,failRatio:0,startTime:"",stats:[],errors:[],exceptions:[],charts:(gF=Ya.history)==null?void 0:gF.reduce(Xx,{}),ratios:{},userCount:0};var mF;const vNe=(mF=Ya.percentilesToChart)==null?void 0:mF.reduce((e,t)=>({...e,[`responseTimePercentile${t}`]:{value:null}}),{}),gNe=e=>Xx(e,{...vNe,currentRps:{value:null},currentFailPerSec:{value:null},totalAvgResponseTime:{value:null},userCount:{value:null},time:""}),TY=xi({name:"ui",initialState:pNe,reducers:{setUi:ig,updateCharts:(e,{payload:t})=>({...e,charts:Xx(e.charts,t)}),updateChartMarkers:(e,{payload:t})=>({...e,charts:{...gNe(e.charts),markers:e.charts.markers?[...e.charts.markers,t]:[(e.charts.time||[""])[0],t]}})}}),Pp=TY.actions,mNe=TY.reducer,yNe=ex({[O0.reducerPath]:O0.reducer,logViewer:Lfe,notification:Pfe,swarm:Jce,theme:EG,ui:mNe,url:lNe}),xNe=HV({reducer:yNe,middleware:e=>e().concat(O0.middleware)});function SNe(){const{data:e,refetch:t}=Xce(),r=So(Pp.setUi),n=zi(({swarm:a})=>a.state),i=n===Zr.SPAWNING||n==Zr.RUNNING;O.useEffect(()=>{e&&r({ratios:e})},[e]),cv(t,5e3,{shouldRunInterval:i})}const pF=2e3;function bNe(){const e=So(qx.setSwarm),t=So(Pp.setUi),r=So(Pp.updateCharts),n=So(Pp.updateChartMarkers),i=zi(({swarm:d})=>d),a=O.useRef(i.state),[o,s]=O.useState(!1),{data:l,refetch:u}=Yce(),c=i.state===Zr.SPAWNING||i.state==Zr.RUNNING,f=()=>{if(!l)return;const{currentResponseTimePercentiles:d,extendedStats:h,stats:p,errors:v,totalRps:g,totalFailPerSec:m,failRatio:y,workers:x,userCount:S,totalAvgResponseTime:_}=l,b=new Date().toISOString();o&&(s(!1),n(b));const w=Oh(g,2),C=Oh(m,2),T=Oh(y*100),M={...Object.entries(d).reduce((k,[I,R])=>({...k,[I]:[b,R]}),{}),currentRps:[b,w],currentFailPerSec:[b,C],totalAvgResponseTime:[b,Oh(_,2)],userCount:[b,S],time:b};t({extendedStats:h,stats:p,errors:v,totalRps:w,failRatio:T,workers:x,userCount:S}),r(M)};O.useEffect(()=>{l&&e({state:l.state})},[l&&l.state]),cv(f,pF,{shouldRunInterval:!!l&&c}),cv(u,pF,{shouldRunInterval:c}),O.useEffect(()=>{i.state===Zr.RUNNING&&a.current===Zr.STOPPED&&s(!0),a.current=i.state},[i.state,a])}function _Ne(){const{data:e,refetch:t}=qce(),r=So(Pp.setUi),n=zi(({swarm:a})=>a.state),i=n===Zr.SPAWNING||n==Zr.RUNNING;O.useEffect(()=>{e&&r({exceptions:e.exceptions})},[e]),cv(t,5e3,{shouldRunInterval:i})}function wNe({swarmState:e,tabs:t,extendedTabs:r}){bNe(),_Ne(),SNe(),Nfe();const n=OG();return P.jsxs(H6,{theme:n,children:[P.jsx(uG,{}),P.jsx(kfe,{children:e===Zr.READY?P.jsx(XG,{}):P.jsx(hNe,{extendedTabs:r,tabs:t})})]})}const CNe=({swarm:{state:e}})=>({swarmState:e}),TNe=$n(CNe)(wNe);function ANe(){if(qR){const e=HV({reducer:ex({theme:EG})});return P.jsx(YR,{store:e,children:P.jsx(Hue,{...qR})})}else return P.jsx(YR,{store:xNe,children:P.jsx(TNe,{})})}function MNe({error:e}){return P.jsxs("div",{role:"alert",children:[P.jsx("p",{children:"Something went wrong"}),e.message&&P.jsx("pre",{style:{color:"red"},children:e.message}),"If the issue persists, please consider opening an"," ",P.jsx("a",{href:"https://github.com/locustio/locust/issues/new?assignees=&labels=bug&projects=&template=bug.yml",children:"issue"})]})}const kNe=xC.createRoot(document.getElementById("root"));kNe.render(P.jsx(fZ,{fallbackRender:MNe,children:P.jsx(ANe,{})}));