hydro-graph 1.0.25 → 1.0.26

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.
@@ -38,7 +38,7 @@ echarts.use([`+I+"]);":"Unknown series "+E))}return}if(f==="tooltip"){if(m){proc
38
38
  `,`
39
39
 
40
40
 
41
- `];function Ao(A,e){return e.type=A,e}function tv(A){return A.type==="section"}function Nm(A){return tv(A)?$U:jU}function Pm(A){if(tv(A)){var e=0,t=A.blocks.length,r=t>1||t>0&&!A.noHeader;return b(A.blocks,function(n){var i=Pm(n);i>=e&&(e=i+ +(r&&(!i||tv(n)&&!n.noHeader)))}),e}return 0}function $U(A,e,t,r){var n=e.noHeader,i=eI(Pm(e)),a=[],o=e.blocks||[];fe(!o||ae(o)),o=o||[];var s=A.orderMode;if(e.sortBlocks&&s){o=o.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(mA(l,s)){var u=new MU(l[s],null);o.sort(function(d,g){return u.evaluate(d.sortParam,g.sortParam)})}else s==="seriesDesc"&&o.reverse()}b(o,function(d,g){var p=e.valueFormatter,B=Nm(d)(p?Y(Y({},A),{valueFormatter:p}):A,d,g>0?i.html:0,r);B!=null&&a.push(B)});var f=A.renderMode==="richText"?a.join(i.richText):Av(r,a.join(""),n?t:i.html);if(n)return f;var c=Hh(e.header,"ordinal",A.useUTC),h=Rm(r,A.renderMode).nameStyle,v=Om(r);return A.renderMode==="richText"?Vm(A,c,h)+i.richText+f:Av(r,'<div style="'+h+";"+v+';">'+Vt(c)+"</div>"+f,t)}function jU(A,e,t,r){var n=A.renderMode,i=e.noName,a=e.noValue,o=!e.markerType,s=e.name,l=A.useUTC,u=e.valueFormatter||A.valueFormatter||function(y){return y=ae(y)?y:[y],Be(y,function(_,C){return Hh(_,ae(h)?h[C]:h,l)})};if(!(i&&a)){var f=o?"":A.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||oe.color.secondary,n),c=i?"":Hh(s,"ordinal",l),h=e.valueType,v=a?[]:u(e.value,e.dataIndex),d=!o||!i,g=!o&&i,p=Rm(r,n),B=p.nameStyle,m=p.valueStyle;return n==="richText"?(o?"":f)+(i?"":Vm(A,c,B))+(a?"":rI(A,v,d,g,m)):Av(r,(o?"":f)+(i?"":tI(c,!o,B))+(a?"":AI(v,d,g,m)),t)}}function km(A,e,t,r,n,i){if(A){var a=Nm(A),o={useUTC:n,renderMode:t,orderMode:r,markupStyleCreator:e,valueFormatter:A.valueFormatter};return a(o,A,0,i)}}function eI(A){return{html:JU[A],richText:qU[A]}}function Av(A,e,t){var r='<div style="clear:both"></div>',n="margin: "+t+"px 0 0",i=Om(A);return'<div style="'+n+";"+i+';">'+e+r+"</div>"}function tI(A,e,t){var r=e?"margin-left:2px":"";return'<span style="'+t+";"+r+'">'+Vt(A)+"</span>"}function AI(A,e,t,r){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return A=ae(A)?A:[A],'<span style="'+i+";"+r+'">'+Be(A,function(a){return Vt(a)}).join("&nbsp;&nbsp;")+"</span>"}function Vm(A,e,t){return A.markupStyleCreator.wrapRichTextStyle(e,t)}function rI(A,e,t,r,n){var i=[n],a=r?10:20;return t&&i.push({padding:[0,0,0,a],align:"right"}),A.markupStyleCreator.wrapRichTextStyle(ae(e)?e.join(" "):e,i)}function nI(A,e){var t=A.getData().getItemVisual(e,"style"),r=t[A.visualDrawType];return Dn(r)}function Km(A,e){var t=A.get("padding");return t??(e==="richText"?[8,10]:10)}var rv=(function(){function A(){this.richTextStyles={},this._nextStyleNameId=Kg()}return A.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},A.prototype.makeTooltipMarker=function(e,t,r){var n=r==="richText"?this._generateStyleName():null,i=HS({color:t,type:e,renderMode:r,markerId:n});return le(i)?i:(process.env.NODE_ENV!=="production"&&fe(n),this.richTextStyles[n]=i.style,i.content)},A.prototype.wrapRichTextStyle=function(e,t){var r={};ae(t)?b(t,function(i){return Y(r,i)}):Y(r,t);var n=this._generateStyleName();return this.richTextStyles[n]=r,"{"+n+"|"+e+"}"},A})();function iI(A){var e=A.series,t=A.dataIndex,r=A.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),a=i.length,o=e.getRawValue(t),s=ae(o),l=nI(e,t),u,f,c,h;if(a>1||s&&!a){var v=aI(o,e,t,i,l);u=v.inlineValues,f=v.inlineValueTypes,c=v.blocks,h=v.inlineValues[0]}else if(a){var d=n.getDimensionInfo(i[0]);h=u=ki(n,t,i[0]),f=d.type}else h=u=s?o[0]:o;var g=Sc(e),p=g&&e.name||"",B=n.getName(t),m=r?p:B;return Ao("section",{header:p,noHeader:r||!g,sortParam:h,blocks:[Ao("nameValue",{markerType:"item",markerColor:l,name:m,noName:!LA(m),value:u,valueType:f,dataIndex:t})].concat(c||[])})}function aI(A,e,t,r,n){var i=e.getData(),a=ni(A,function(f,c,h){var v=i.getDimensionInfo(h);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),o=[],s=[],l=[];r.length?b(r,function(f){u(ki(i,t,f),f)}):b(A,u);function u(f,c){var h=i.getDimensionInfo(c);!h||h.otherDims.tooltip===!1||(a?l.push(Ao("nameValue",{markerType:"subItem",markerColor:n,name:h.displayName,value:f,valueType:h.type})):(o.push(f),s.push(h.type)))}return{inlineValues:o,inlineValueTypes:s,blocks:l}}var Hr=ze();function Rl(A,e){return A.getName(e)||A.getId(e)}var oI="__universalTransitionEnabled",JA=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,r,n){this.seriesIndex=this.componentIndex,this.dataTask=eo({count:lI,reset:uI}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=Hr(this).sourceManager=new XU(this);i.prepareSource();var a=this.getInitialData(t,n);zm(a,this),this.dataTask.context.data=a,process.env.NODE_ENV!=="production"&&fe(a,"getInitialData returned invalid data."),Hr(this).dataBeforeProcessed=a,Gm(this),this._initSelectedMapFromData(a)},e.prototype.mergeDefaultAndTheme=function(t,r){var n=Za(this),i=n?Ni(t):{},a=this.subType;Re.hasClass(a)&&(a+="Series"),Oe(t,r.getTheme().get(this.subType)),Oe(t,this.getDefaultOption()),Jg(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Mr(t,i,n)},e.prototype.mergeOption=function(t,r){t=Oe(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Za(this);n&&Mr(this.option,t,n);var i=Hr(this).sourceManager;i.dirty(),i.prepareSource();var a=this.getInitialData(t,r);zm(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,Hr(this).dataBeforeProcessed=a,Gm(this),this._initSelectedMapFromData(a)},e.prototype.fillDataTextStyle=function(t){if(t&&!Tt(t))for(var r=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Jg(t[n],"label",r)},e.prototype.getInitialData=function(t,r){},e.prototype.appendData=function(t){var r=this.getRawData();r.appendData(t.data)},e.prototype.getData=function(t){var r=nv(this);if(r){var n=r.context.data;return t==null||!n.getLinkedData?n:n.getLinkedData(t)}else return Hr(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var r=nv(this);if(r){var n=r.context;n.outputData=t,r!==this.dataTask&&(n.data=t)}Hr(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return we(t)},e.prototype.getSourceManager=function(){return Hr(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Hr(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.indicesOfNearest=function(t,r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o&&o.getAxis(t);if(!o||!s)return[];var l=s.dataToCoord(n);i==null&&(i=1/0);var u=[],f=1/0,c=-1,h=0;return a.each(r,function(v,d){var g=s.dataToCoord(v),p=l-g,B=Math.abs(p);B<=i&&((B<f||B===f&&p>=0&&c<0)&&(f=B,c=p,h=0),p===c&&(u[h++]=d))}),u.length=h,u},e.prototype.formatTooltip=function(t,r,n){return iI({series:this,dataIndex:t,multipleSeries:r})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(_e.node&&!(t&&t.ssr))return!1;var r=this.getShallow("animation");return r&&this.getData().count()>this.getShallow("animationThreshold")&&(r=!1),!!r},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,r,n){var i=this.ecModel,a=Gh.prototype.getColorFromPalette.call(this,t,r,n);return a||(a=i.getColorFromPalette(t,r,n)),a},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,r){this._innerSelect(this.getData(r),t)},e.prototype.unselect=function(t,r){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,a=this.getData(r);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o<t.length;o++){var s=t[o],l=Rl(a,s);n[l]=!1,this._selectedDataIndicesMap[l]=-1}}},e.prototype.toggleSelect=function(t,r){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],r)?this.unselect(n,r):this.select(n,r)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,r=Xe(t),n=[],i=0;i<r.length;i++){var a=t[r[i]];a>=0&&n.push(a)}return n},e.prototype.isSelected=function(t,r){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(r);return(n==="all"||n[Rl(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[oI])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,r){var n,i,a=this.option,o=a.selectedMode,s=r.length;if(!(!o||!s)){if(o==="series")a.selectedMap="all";else if(o==="multiple"){he(a.selectedMap)||(a.selectedMap={});for(var l=a.selectedMap,u=0;u<s;u++){var f=r[u],c=Rl(t,f);l[c]=!0,this._selectedDataIndicesMap[c]=t.getRawIndex(f)}}else if(o==="single"||o===!0){var h=r[s-1],c=Rl(t,h);a.selectedMap=(n={},n[c]=!0,n),this._selectedDataIndicesMap=(i={},i[c]=t.getRawIndex(h),i)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var r=[];t.hasItemOption&&t.each(function(n){var i=t.getRawDataItem(n);i&&i.selected&&r.push(n)}),r.length>0&&this._innerSelect(t,r)}},e.registerClass=function(t){return Re.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(Re);DA(JA,DU),DA(JA,Gh),n0(JA,Re);function Gm(A){var e=A.name;Sc(A)||(A.name=sI(A)||e)}function sI(A){var e=A.getRawData(),t=e.mapDimensionsAll("seriesName"),r=[];return b(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&r.push(i.displayName)}),r.join(" ")}function lI(A){return A.model.getRawData().count()}function uI(A){var e=A.model;return e.setData(e.getRawData().cloneShallow()),fI}function fI(A,e){e.outputData&&A.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function zm(A,e){b(ux(A.CHANGABLE_METHODS,A.DOWNSAMPLE_METHODS),function(t){A.wrapMethod(t,nt(cI,e))})}function cI(A,e){var t=nv(A);return t&&t.setOutputEnd((e||this).count()),e}function nv(A){var e=(A.ecModel||{}).scheduler,t=e&&e.getPipeline(A.uid);if(t){var r=t.currentTask;if(r){var n=r.agentStubMap;n&&(r=n.get(A.uid))}return r}}var xA=(function(){function A(){this.group=new lt,this.uid=Bl("viewComponent")}return A.prototype.init=function(e,t){},A.prototype.render=function(e,t,r,n){},A.prototype.dispose=function(e,t){},A.prototype.updateView=function(e,t,r,n){},A.prototype.updateLayout=function(e,t,r,n){},A.prototype.updateVisual=function(e,t,r,n){},A.prototype.toggleBlurSeries=function(e,t,r){},A.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},A})();Tc(xA),Hs(xA);function iv(){var A=ze();return function(e){var t=A(e),r=e.pipelineContext,n=!!t.large,i=!!t.progressiveRender,a=t.large=!!(r&&r.large),o=t.progressiveRender=!!(r&&r.progressiveRender);return(n!==a||i!==o)&&"reset"}}var Wm=ze(),hI=iv(),FA=(function(){function A(){this.group=new lt,this.uid=Bl("viewChart"),this.renderTask=eo({plan:vI,reset:dI}),this.renderTask.context={view:this}}return A.prototype.init=function(e,t){},A.prototype.render=function(e,t,r,n){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},A.prototype.highlight=function(e,t,r,n){var i=e.getData(n&&n.dataType);if(!i){process.env.NODE_ENV!=="production"&&Ge("Unknown dataType "+n.dataType);return}Xm(i,n,"emphasis")},A.prototype.downplay=function(e,t,r,n){var i=e.getData(n&&n.dataType);if(!i){process.env.NODE_ENV!=="production"&&Ge("Unknown dataType "+n.dataType);return}Xm(i,n,"normal")},A.prototype.remove=function(e,t){this.group.removeAll()},A.prototype.dispose=function(e,t){},A.prototype.updateView=function(e,t,r,n){this.render(e,t,r,n)},A.prototype.updateLayout=function(e,t,r,n){this.render(e,t,r,n)},A.prototype.updateVisual=function(e,t,r,n){this.render(e,t,r,n)},A.prototype.eachRendered=function(e){hl(this.group,e)},A.markUpdateMethod=function(e,t){Wm(e).updateMethod=t},A.protoInitialize=(function(){var e=A.prototype;e.type="chart"})(),A})();function Ym(A,e,t){A&&Si(A)&&(e==="emphasis"?Js:qs)(A,t)}function Xm(A,e,t){var r=pn(A,e),n=e&&e.highlightKey!=null?vb(e.highlightKey):null;r!=null?b(Lt(r),function(i){Ym(A.getItemGraphicEl(i),t,n)}):A.eachItemGraphicEl(function(i){Ym(i,t,n)})}Tc(FA,["dispose"]),Hs(FA);function vI(A){return hI(A.model)}function dI(A){var e=A.model,t=A.ecModel,r=A.api,n=A.payload,i=e.pipelineContext.progressiveRender,a=A.view,o=n&&Wm(n).updateMethod,s=i?"incrementalPrepareRender":o&&a[o]?o:"render";return s!=="render"&&a[s](e,t,r,n),pI[s]}var pI={incrementalPrepareRender:{progress:function(A,e){e.view.incrementalRender(A,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(A,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Nl="\0__throttleOriginMethod",Zm="\0__throttleRate",Jm="\0__throttleType";function av(A,e,t){var r,n=0,i=0,a=null,o,s,l,u;e=e||0;function f(){i=new Date().getTime(),a=null,A.apply(s,l||[])}var c=function(){for(var h=[],v=0;v<arguments.length;v++)h[v]=arguments[v];r=new Date().getTime(),s=this,l=h;var d=u||e,g=u||t;u=null,o=r-(g?n:i)-d,clearTimeout(a),g?a=setTimeout(f,d):o>=0?f():a=setTimeout(f,-o),n=r};return c.clear=function(){a&&(clearTimeout(a),a=null)},c.debounceNextCall=function(h){u=h},c}function Pl(A,e,t,r){var n=A[e];if(n){var i=n[Nl]||n,a=n[Jm],o=n[Zm];if(o!==t||a!==r){if(t==null||!r)return A[e]=i;n=A[e]=av(i,t,r==="debounce"),n[Nl]=i,n[Jm]=r,n[Zm]=t}return n}}function kl(A,e){var t=A[e];t&&t[Nl]&&(t.clear&&t.clear(),A[e]=t[Nl])}var qm=ze(),$m={itemStyle:La(TB,!0),lineStyle:La(IB,!0)},gI={lineStyle:"stroke",itemStyle:"fill"};function jm(A,e){var t=A.visualStyleMapper||$m[e];return t||(console.warn("Unknown style type '"+e+"'."),$m.itemStyle)}function ey(A,e){var t=A.visualDrawType||gI[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var BI={createOnAllSeries:!0,performRawSeries:!0,reset:function(A,e){var t=A.getData(),r=A.visualStyleAccessPath||"itemStyle",n=A.getModel(r),i=jm(A,r),a=i(n),o=n.getShallow("decal");o&&(t.setVisual("decal",o),o.dirty=!0);var s=ey(A,r),l=a[s],u=me(l)?l:null,f=a.fill==="auto"||a.stroke==="auto";if(!a[s]||u||f){var c=A.getColorFromPalette(A.name,null,e.getSeriesCount());a[s]||(a[s]=c,t.setVisual("colorFromPalette",!0)),a.fill=a.fill==="auto"||me(a.fill)?c:a.fill,a.stroke=a.stroke==="auto"||me(a.stroke)?c:a.stroke}if(t.setVisual("style",a),t.setVisual("drawType",s),!e.isSeriesFiltered(A)&&u)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var d=A.getDataParams(v),g=Y({},a);g[s]=u(d),h.setItemVisual(v,"style",g)}}}},ro=new et,mI={createOnAllSeries:!0,performRawSeries:!0,reset:function(A,e){if(!(A.ignoreStyleOnData||e.isSeriesFiltered(A))){var t=A.getData(),r=A.visualStyleAccessPath||"itemStyle",n=jm(A,r),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(a,o){var s=a.getRawDataItem(o);if(s&&s[r]){ro.option=s[r];var l=n(ro),u=a.ensureUniqueItemVisual(o,"style");Y(u,l),ro.option.decal&&(a.setItemVisual(o,"decal",ro.option.decal),ro.option.decal.dirty=!0),i in l&&a.setItemVisual(o,"colorFromPalette",!1)}}:null}}}},yI={performRawSeries:!0,overallReset:function(A){var e=we();A.eachSeries(function(t){var r=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+r,i=e.get(n);i||(i={},e.set(n,i)),qm(t).scope=i}}),A.eachSeries(function(t){if(!(t.isColorBySeries()||A.isSeriesFiltered(t))){var r=t.getRawData(),n={},i=t.getData(),a=qm(t).scope,o=t.visualStyleAccessPath||"itemStyle",s=ey(t,o);i.each(function(l){var u=i.getRawIndex(l);n[u]=l}),r.each(function(l){var u=n[l],f=i.getItemVisual(u,"colorFromPalette");if(f){var c=i.ensureUniqueItemVisual(u,"style"),h=r.getName(l)||l+"",v=r.count();c[s]=t.getColorFromPalette(h,a,v)}})}})}},Vl=Math.PI;function wI(A,e){e=e||{},Ne(e,{text:"loading",textColor:oe.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:oe.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new lt,r=new qe({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(r);var n=new Ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new qe({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var a;return e.showSpinner&&(a=new il({shape:{startAngle:-Vl/2,endAngle:-Vl/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),a.animateShape(!0).when(1e3,{endAngle:Vl*3/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:Vl*3/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var o=n.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(A.getWidth()-s*2-(e.showSpinner&&o?10:0)-o)/2-(e.showSpinner&&o?0:5+o/2)+(e.showSpinner?0:o/2)+(o?0:s),u=A.getHeight()/2;e.showSpinner&&a.setShape({cx:l,cy:u}),i.setShape({x:l-s,y:u-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:A.getWidth(),height:A.getHeight()})},t.resize(),t}var ty=(function(){function A(e,t,r,n){this._stageTaskMap=we(),this.ecInstance=e,this.api=t,r=this._dataProcessorHandlers=r.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=r.concat(n)}return A.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(r){var n=r.overallTask;n&&n.dirty()})},A.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var r=this._pipelineMap.get(e.__pipeline.id),n=r.context,i=!t&&r.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>r.blockIndex,a=i?r.step:null,o=n&&n.modDataCount,s=o!=null?Math.ceil(o/a):null;return{step:a,modBy:s,modDataCount:o}}},A.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},A.prototype.updateStreamModes=function(e,t){var r=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),a=r.progressiveEnabled&&t.incrementalPrepareRender&&i>=r.threshold,o=e.get("large")&&i>=e.get("largeThreshold"),s=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=r.context={progressiveRender:a,modDataCount:s,large:o}},A.prototype.restorePipelines=function(e){var t=this,r=t._pipelineMap=we();e.eachSeries(function(n){var i=n.getProgressive(),a=n.uid;r.set(a,{id:a,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(n,n.dataTask)})},A.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),r=this.api;b(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),a="";process.env.NODE_ENV!=="production"&&(a='"reset" and "overallReset" must not be both specified.'),fe(!(n.reset&&n.overallReset),a),n.reset&&this._createSeriesStageTask(n,i,t,r),n.overallReset&&this._createOverallStageTask(n,i,t,r)},this)},A.prototype.prepareView=function(e,t,r,n){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=r,a.api=n,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},A.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},A.prototype.performVisualTasks=function(e,t,r){this._performStageTasks(this._visualHandlers,e,t,r)},A.prototype._performStageTasks=function(e,t,r,n){n=n||{};var i=!1,a=this;b(e,function(s,l){if(!(n.visualType&&n.visualType!==s.visualType)){var u=a._stageTaskMap.get(s.uid),f=u.seriesTaskMap,c=u.overallTask;if(c){var h,v=c.agentStubMap;v.each(function(g){o(n,g)&&(g.dirty(),h=!0)}),h&&c.dirty(),a.updatePayload(c,r);var d=a.getPerformArgs(c,n.block);v.each(function(g){g.perform(d)}),c.perform(d)&&(i=!0)}else f&&f.each(function(g,p){o(n,g)&&g.dirty();var B=a.getPerformArgs(g,n.block);B.skip=!s.performRawSeries&&t.isSeriesFiltered(g.context.model),a.updatePayload(g,r),g.perform(B)&&(i=!0)})}});function o(s,l){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(l.__pipeline.id))}this.unfinished=i||this.unfinished},A.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(r){t=r.dataTask.perform()||t}),this.unfinished=t||this.unfinished},A.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},A.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},A.prototype._createSeriesStageTask=function(e,t,r,n){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=we(),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?r.eachRawSeries(u):s?r.eachRawSeriesByType(s,u):l&&l(r,n).each(u);function u(f){var c=f.uid,h=o.set(c,a&&a.get(c)||eo({plan:FI,reset:EI,count:SI}));h.context={model:f,ecModel:r,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,h)}},A.prototype._createOverallStageTask=function(e,t,r,n){var i=this,a=t.overallTask=t.overallTask||eo({reset:CI});a.context={ecModel:r,api:n,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=we(),l=e.seriesType,u=e.getTargetSeries,f=!0,c=!1,h="";process.env.NODE_ENV!=="production"&&(h='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),fe(!e.createOnAllSeries,h),l?r.eachRawSeriesByType(l,v):u?u(r,n).each(v):(f=!1,b(r.getSeries(),v));function v(d){var g=d.uid,p=s.set(g,o&&o.get(g)||(c=!0,eo({reset:_I,onDirty:xI})));p.context={model:d,overallProgress:f},p.agent=a,p.__block=f,i._pipe(d,p)}c&&a.dirty()},A.prototype._pipe=function(e,t){var r=e.uid,n=this._pipelineMap.get(r);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},A.wrapStageHandler=function(e,t){return me(e)&&(e={overallReset:e,seriesType:UI(e)}),e.uid=Bl("stageHandler"),t&&(e.visualType=t),e},A})();function CI(A){A.overallReset(A.ecModel,A.api,A.payload)}function _I(A){return A.overallProgress&&QI}function QI(){this.agent.dirty(),this.getDownstream().dirty()}function xI(){this.agent&&this.agent.dirty()}function FI(A){return A.plan?A.plan(A.model,A.ecModel,A.api,A.payload):null}function EI(A){A.useClearVisual&&A.data.clearAllVisual();var e=A.resetDefines=Lt(A.reset(A.model,A.ecModel,A.api,A.payload));return e.length>1?Be(e,function(t,r){return Ay(r)}):bI}var bI=Ay(0);function Ay(A){return function(e,t){var r=t.data,n=t.resetDefines[A];if(n&&n.dataEach)for(var i=e.start;i<e.end;i++)n.dataEach(r,i);else n&&n.progress&&n.progress(e,r)}}function SI(A){return A.data.count()}function UI(A){Kl=null;try{A(no,ry)}catch{}return Kl}var no={},ry={},Kl;ny(no,Wh),ny(ry,sm),no.eachSeriesByType=no.eachRawSeriesByType=function(A){Kl=A},no.eachComponent=function(A){A.mainType==="series"&&A.subType&&(Kl=A.subType)};function ny(A,e){for(var t in e.prototype)A[t]=Dt}var $=oe.darkColor,II=$.background,io=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},iy={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},ay={darkMode:!0,color:$.theme,backgroundColor:II,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:iy,y:iy,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:io(),logAxis:io(),valueAxis:io(),categoryAxis:io(),line:{symbol:"circle"},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:$.background}},radar:(function(){var A=io();return A.axisName={color:$.axisLabel},A.axisLine.lineStyle.color=$.neutral20,A})(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};ay.categoryAxis.splitLine.show=!1;var TI=(function(){function A(){}return A.prototype.normalizeQuery=function(e){var t={},r={},n={};if(le(e)){var i=VA(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};b(e,function(s,l){for(var u=!1,f=0;f<a.length;f++){var c=a[f],h=l.lastIndexOf(c);if(h>0&&h===l.length-c.length){var v=l.slice(0,h);v!=="data"&&(t.mainType=v,t[c.toLowerCase()]=s,u=!0)}}o.hasOwnProperty(l)&&(r[l]=s,u=!0),u||(n[l]=s)})}return{cptQuery:t,dataQuery:r,otherQuery:n}},A.prototype.filter=function(e,t){var r=this.eventInfo;if(!r)return!0;var n=r.targetEl,i=r.packedEvent,a=r.model,o=r.view;if(!a||!o)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,a,"mainType")&&u(s,a,"subType")&&u(s,a,"index","componentIndex")&&u(s,a,"name")&&u(s,a,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,n,i));function u(f,c,h,v){return f[h]==null||c[v||h]===f[h]}},A.prototype.afterTrigger=function(){this.eventInfo=null},A})(),ov=["symbol","symbolSize","symbolRotate","symbolOffset"],oy=ov.concat(["symbolKeepAspect"]),DI={createOnAllSeries:!0,performRawSeries:!0,reset:function(A,e){var t=A.getData();if(A.legendIcon&&t.setVisual("legendIcon",A.legendIcon),!A.hasSymbolVisual)return;for(var r={},n={},i=!1,a=0;a<ov.length;a++){var o=ov[a],s=A.get(o);me(s)?(i=!0,n[o]=s):r[o]=s}if(r.symbol=r.symbol||A.defaultSymbol,t.setVisual(Y({legendIcon:A.legendIcon||r.symbol,symbolKeepAspect:A.get("symbolKeepAspect")},r)),e.isSeriesFiltered(A))return;var l=Xe(n);function u(f,c){for(var h=A.getRawValue(c),v=A.getDataParams(c),d=0;d<l.length;d++){var g=l[d];f.setItemVisual(c,g,n[g](h,v))}}return{dataEach:i?u:null}}},LI={createOnAllSeries:!0,performRawSeries:!0,reset:function(A,e){if(!A.hasSymbolVisual||e.isSeriesFiltered(A))return;var t=A.getData();function r(n,i){for(var a=n.getItemModel(i),o=0;o<oy.length;o++){var s=oy[o],l=a.getShallow(s,!0);l!=null&&n.setItemVisual(i,s,l)}}return{dataEach:t.hasItemOption?r:null}}};function MI(A,e,t){switch(t){case"color":var r=A.getItemVisual(e,"style");return r[A.getVisual("drawType")];case"opacity":return A.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return A.getItemVisual(e,t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function HI(A,e){switch(e){case"color":var t=A.getVisual("style");return t[A.getVisual("drawType")];case"opacity":return A.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return A.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function Gi(A,e,t,r,n){var i=A+e;t.isSilent(i)||(process.env.NODE_ENV!=="production"&&PA("event "+i+" is deprecated."),r.eachComponent({mainType:"series",subType:"pie"},function(a){for(var o=a.seriesIndex,s=a.option.selectedMap,l=n.selected,u=0;u<l.length;u++)if(l[u].seriesIndex===o){var f=a.getData(),c=pn(f,n.fromActionPayload);t.trigger(i,{type:i,seriesId:a.id,name:ae(c)?f.getName(c[0]):f.getName(c),selected:le(s)?s:Y({},s)})}}))}function OI(A,e,t){A.on("selectchanged",function(r){var n=t.getModel();r.isFromClick?(Gi("map","selectchanged",e,n,r),Gi("pie","selectchanged",e,n,r)):r.fromAction==="select"?(Gi("map","selected",e,n,r),Gi("pie","selected",e,n,r)):r.fromAction==="unselect"&&(Gi("map","unselected",e,n,r),Gi("pie","unselected",e,n,r))})}function ao(A,e,t){for(var r;A&&!(e(A)&&(r=A,t));)A=A.__hostTarget||A.parent;return r}var RI=Math.round(Math.random()*9),NI=typeof Object.defineProperty=="function",PI=(function(){function A(){this._id="__ec_inner_"+RI++}return A.prototype.get=function(e){return this._guard(e)[this._id]},A.prototype.set=function(e,t){var r=this._guard(e);return NI?Object.defineProperty(r,this._id,{value:t,enumerable:!1,configurable:!0}):r[this._id]=t,this},A.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},A.prototype.has=function(e){return!!this._guard(e)[this._id]},A.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},A})(),kI=ke.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(A,e){var t=e.cx,r=e.cy,n=e.width/2,i=e.height/2;A.moveTo(t,r-i),A.lineTo(t+n,r+i),A.lineTo(t-n,r+i),A.closePath()}}),VI=ke.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(A,e){var t=e.cx,r=e.cy,n=e.width/2,i=e.height/2;A.moveTo(t,r-i),A.lineTo(t+n,r),A.lineTo(t,r+i),A.lineTo(t-n,r),A.closePath()}}),KI=ke.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(A,e){var t=e.x,r=e.y,n=e.width/5*3,i=Math.max(n,e.height),a=n/2,o=a*a/(i-a),s=r-i+a+o,l=Math.asin(o/a),u=Math.cos(l)*a,f=Math.sin(l),c=Math.cos(l),h=a*.6,v=a*.7;A.moveTo(t-u,s+o),A.arc(t,s,a,Math.PI-l,Math.PI*2+l),A.bezierCurveTo(t+u-f*h,s+o+c*h,t,r-v,t,r),A.bezierCurveTo(t,r-v,t-u+f*h,s+o+c*h,t-u,s+o),A.closePath()}}),GI=ke.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(A,e){var t=e.height,r=e.width,n=e.x,i=e.y,a=r/3*2;A.moveTo(n,i),A.lineTo(n+a,i+t),A.lineTo(n,i+t/4*3),A.lineTo(n-a,i+t),A.lineTo(n,i),A.closePath()}}),zI={line:Tr,rect:qe,roundRect:qe,square:qe,circle:Al,diamond:VI,pin:KI,arrow:GI,triangle:kI},WI={line:function(A,e,t,r,n){n.x1=A,n.y1=e+r/2,n.x2=A+t,n.y2=e+r/2},rect:function(A,e,t,r,n){n.x=A,n.y=e,n.width=t,n.height=r},roundRect:function(A,e,t,r,n){n.x=A,n.y=e,n.width=t,n.height=r,n.r=Math.min(t,r)/4},square:function(A,e,t,r,n){var i=Math.min(t,r);n.x=A,n.y=e,n.width=i,n.height=i},circle:function(A,e,t,r,n){n.cx=A+t/2,n.cy=e+r/2,n.r=Math.min(t,r)/2},diamond:function(A,e,t,r,n){n.cx=A+t/2,n.cy=e+r/2,n.width=t,n.height=r},pin:function(A,e,t,r,n){n.x=A+t/2,n.y=e+r/2,n.width=t,n.height=r},arrow:function(A,e,t,r,n){n.x=A+t/2,n.y=e+r/2,n.width=t,n.height=r},triangle:function(A,e,t,r,n){n.cx=A+t/2,n.cy=e+r/2,n.width=t,n.height=r}},Gl={};b(zI,function(A,e){Gl[e]=new A});var YI=ke.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(A,e,t){var r=bs(A,e,t),n=this.shape;return n&&n.symbolType==="pin"&&e.position==="inside"&&(r.y=t.y+t.height*.4),r},buildPath:function(A,e,t){var r=e.symbolType;if(r!=="none"){var n=Gl[r];n||(r="rect",n=Gl[r]),WI[r](e.x,e.y,e.width,e.height,n.shape),n.buildPath(A,n.shape,t)}}});function XI(A,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=A,t.fill=e||oe.color.neutral00,t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=A:t.fill=A,this.markRedraw()}}function Or(A,e,t,r,n,i,a){var o=A.indexOf("empty")===0;o&&(A=A.substr(5,1).toLowerCase()+A.substr(6));var s;return A.indexOf("image://")===0?s=vB(A.slice(8),new Fe(e,t,r,n),a?"center":"cover"):A.indexOf("path://")===0?s=ph(A.slice(7),{},new Fe(e,t,r,n),a?"center":"cover"):s=new YI({shape:{symbolType:A,x:e,y:t,width:r,height:n}}),s.__isEmptyBrush=o,s.setColor=XI,i&&s.setColor(i),s}function ZI(A){return ae(A)||(A=[+A,+A]),[A[0]||0,A[1]||0]}function sy(A,e){if(A!=null)return ae(A)||(A=[A,A]),[ht(A[0],e[0])||0,ht(ve(A[1],A[0]),e[1])||0]}function Pn(A){return isFinite(A)}function JI(A,e,t){var r=e.x==null?0:e.x,n=e.x2==null?1:e.x2,i=e.y==null?0:e.y,a=e.y2==null?0:e.y2;e.global||(r=r*t.width+t.x,n=n*t.width+t.x,i=i*t.height+t.y,a=a*t.height+t.y),r=Pn(r)?r:0,n=Pn(n)?n:1,i=Pn(i)?i:0,a=Pn(a)?a:0;var o=A.createLinearGradient(r,i,n,a);return o}function qI(A,e,t){var r=t.width,n=t.height,i=Math.min(r,n),a=e.x==null?.5:e.x,o=e.y==null?.5:e.y,s=e.r==null?.5:e.r;e.global||(a=a*r+t.x,o=o*n+t.y,s=s*i),a=Pn(a)?a:.5,o=Pn(o)?o:.5,s=s>=0&&Pn(s)?s:.5;var l=A.createRadialGradient(a,o,0,a,o,s);return l}function sv(A,e,t){for(var r=e.type==="radial"?qI(A,e,t):JI(A,e,t),n=e.colorStops,i=0;i<n.length;i++)r.addColorStop(n[i].offset,n[i].color);return r}function $I(A,e){if(A===e||!A&&!e)return!1;if(!A||!e||A.length!==e.length)return!0;for(var t=0;t<A.length;t++)if(A[t]!==e[t])return!0;return!1}function zl(A){return parseInt(A,10)}function Wl(A,e,t){var r=["width","height"][e],n=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(t[r]!=null&&t[r]!=="auto")return parseFloat(t[r]);var o=document.defaultView.getComputedStyle(A);return(A[n]||zl(o[r])||zl(A.style[r]))-(zl(o[i])||0)-(zl(o[a])||0)|0}function jI(A,e){return!A||A==="solid"||!(e>0)?null:A==="dashed"?[4*e,2*e]:A==="dotted"?[e]:Ye(A)?[A]:ae(A)?A:null}function ly(A){var e=A.style,t=e.lineDash&&e.lineWidth>0&&jI(e.lineDash,e.lineWidth),r=e.lineDashOffset;if(t){var n=e.strokeNoScale&&A.getLineScale?A.getLineScale():1;n&&n!==1&&(t=Be(t,function(i){return i/n}),r/=n)}return[t,r]}var eT=new Sr(!0);function Yl(A){var e=A.stroke;return!(e==null||e==="none"||!(A.lineWidth>0))}function uy(A){return typeof A=="string"&&A!=="none"}function Xl(A){var e=A.fill;return e!=null&&e!=="none"}function fy(A,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=A.globalAlpha;A.globalAlpha=e.fillOpacity*e.opacity,A.fill(),A.globalAlpha=t}else A.fill()}function cy(A,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=A.globalAlpha;A.globalAlpha=e.strokeOpacity*e.opacity,A.stroke(),A.globalAlpha=t}else A.stroke()}function lv(A,e,t){var r=i0(e.image,e.__image,t);if(Os(r)){var n=A.createPattern(r,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*fx),i.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(i)}return n}}function tT(A,e,t,r){var n,i=Yl(t),a=Xl(t),o=t.strokePercent,s=o<1,l=!e.path;(!e.silent||s)&&l&&e.createPathProxy();var u=e.path||eT,f=e.__dirty;if(!r){var c=t.fill,h=t.stroke,v=a&&!!c.colorStops,d=i&&!!h.colorStops,g=a&&!!c.image,p=i&&!!h.image,B=void 0,m=void 0,y=void 0,_=void 0,C=void 0;(v||d)&&(C=e.getBoundingRect()),v&&(B=f?sv(A,c,C):e.__canvasFillGradient,e.__canvasFillGradient=B),d&&(m=f?sv(A,h,C):e.__canvasStrokeGradient,e.__canvasStrokeGradient=m),g&&(y=f||!e.__canvasFillPattern?lv(A,c,e):e.__canvasFillPattern,e.__canvasFillPattern=y),p&&(_=f||!e.__canvasStrokePattern?lv(A,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),v?A.fillStyle=B:g&&(y?A.fillStyle=y:a=!1),d?A.strokeStyle=m:p&&(_?A.strokeStyle=_:i=!1)}var Q=e.getGlobalScale();u.setScale(Q[0],Q[1],e.segmentIgnoreThreshold);var x,F;A.setLineDash&&t.lineDash&&(n=ly(e),x=n[0],F=n[1]);var S=!0;(l||f&pi)&&(u.setDPR(A.dpr),s?u.setContext(null):(u.setContext(A),S=!1),u.reset(),e.buildPath(u,e.shape,r),u.toStatic(),e.pathUpdated()),S&&u.rebuildPath(A,s?o:1),x&&(A.setLineDash(x),A.lineDashOffset=F),r||(t.strokeFirst?(i&&cy(A,t),a&&fy(A,t)):(a&&fy(A,t),i&&cy(A,t))),x&&A.setLineDash([])}function AT(A,e,t){var r=e.__image=i0(t.image,e.__image,e,e.onload);if(!(!r||!Os(r))){var n=t.x||0,i=t.y||0,a=e.getWidth(),o=e.getHeight(),s=r.width/r.height;if(a==null&&o!=null?a=o*s:o==null&&a!=null?o=a/s:a==null&&o==null&&(a=r.width,o=r.height),t.sWidth&&t.sHeight){var l=t.sx||0,u=t.sy||0;A.drawImage(r,l,u,t.sWidth,t.sHeight,n,i,a,o)}else if(t.sx&&t.sy){var l=t.sx,u=t.sy,f=a-l,c=o-u;A.drawImage(r,l,u,f,c,n,i,a,o)}else A.drawImage(r,n,i,a,o)}}function rT(A,e,t){var r,n=t.text;if(n!=null&&(n+=""),n){A.font=t.font||wr,A.textAlign=t.textAlign,A.textBaseline=t.textBaseline;var i=void 0,a=void 0;A.setLineDash&&t.lineDash&&(r=ly(e),i=r[0],a=r[1]),i&&(A.setLineDash(i),A.lineDashOffset=a),t.strokeFirst?(Yl(t)&&A.strokeText(n,t.x,t.y),Xl(t)&&A.fillText(n,t.x,t.y)):(Xl(t)&&A.fillText(n,t.x,t.y),Yl(t)&&A.strokeText(n,t.x,t.y)),i&&A.setLineDash([])}}var hy=["shadowBlur","shadowOffsetX","shadowOffsetY"],vy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function dy(A,e,t,r,n){var i=!1;if(!r&&(t=t||{},e===t))return!1;if(r||e.opacity!==t.opacity){zt(A,n),i=!0;var a=Math.max(Math.min(e.opacity,1),0);A.globalAlpha=isNaN(a)?Bn.opacity:a}(r||e.blend!==t.blend)&&(i||(zt(A,n),i=!0),A.globalCompositeOperation=e.blend||Bn.blend);for(var o=0;o<hy.length;o++){var s=hy[o];(r||e[s]!==t[s])&&(i||(zt(A,n),i=!0),A[s]=A.dpr*(e[s]||0))}return(r||e.shadowColor!==t.shadowColor)&&(i||(zt(A,n),i=!0),A.shadowColor=e.shadowColor||Bn.shadowColor),i}function py(A,e,t,r,n){var i=oo(e,n.inHover),a=r?null:t&&oo(t,n.inHover)||{};if(i===a)return!1;var o=dy(A,i,a,r,n);if((r||i.fill!==a.fill)&&(o||(zt(A,n),o=!0),uy(i.fill)&&(A.fillStyle=i.fill)),(r||i.stroke!==a.stroke)&&(o||(zt(A,n),o=!0),uy(i.stroke)&&(A.strokeStyle=i.stroke)),(r||i.opacity!==a.opacity)&&(o||(zt(A,n),o=!0),A.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var s=i.lineWidth,l=s/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);A.lineWidth!==l&&(o||(zt(A,n),o=!0),A.lineWidth=l)}for(var u=0;u<vy.length;u++){var f=vy[u],c=f[0];(r||i[c]!==a[c])&&(o||(zt(A,n),o=!0),A[c]=i[c]||f[1])}return o}function nT(A,e,t,r,n){return dy(A,oo(e,n.inHover),t&&oo(t,n.inHover),r,n)}function gy(A,e){var t=e.transform,r=A.dpr||1;t?A.setTransform(r*t[0],r*t[1],r*t[2],r*t[3],r*t[4],r*t[5]):A.setTransform(r,0,0,r,0,0)}function iT(A,e,t){for(var r=!1,n=0;n<A.length;n++){var i=A[n];r=r||i.isZeroArea(),gy(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=r}function aT(A,e){return A&&e?A[0]!==e[0]||A[1]!==e[1]||A[2]!==e[2]||A[3]!==e[3]||A[4]!==e[4]||A[5]!==e[5]:!(!A&&!e)}var By=1,my=2,yy=3,wy=4;function oT(A){var e=Xl(A),t=Yl(A);return!(A.lineDash||!(+e^+t)||e&&typeof A.fill!="string"||t&&typeof A.stroke!="string"||A.strokePercent<1||A.strokeOpacity<1||A.fillOpacity<1)}function zt(A,e){e.batchFill&&A.fill(),e.batchStroke&&A.stroke(),e.batchFill="",e.batchStroke=""}function oo(A,e){return e&&A.__hoverStyle||A.style}function Cy(A,e){kn(A,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function kn(A,e,t,r){var n=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~Zt,e.__isRendered=!1;return}var i=e.__clipPaths,a=t.prevElClipPaths,o=!1,s=!1;if((!a||$I(i,a))&&(a&&a.length&&(zt(A,t),A.restore(),s=o=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(zt(A,t),A.save(),iT(i,A,t),o=!0),t.prevElClipPaths=i),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var l=t.prevEl;l||(s=o=!0);var u=e instanceof ke&&e.autoBatch&&oT(e.style);o||aT(n,l.transform)?(zt(A,t),gy(A,e)):u||zt(A,t);var f=oo(e,t.inHover);e instanceof ke?(t.lastDrawType!==By&&(s=!0,t.lastDrawType=By),py(A,e,l,s,t),(!u||!t.batchFill&&!t.batchStroke)&&A.beginPath(),tT(A,e,f,u),u&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Vs?(t.lastDrawType!==yy&&(s=!0,t.lastDrawType=yy),py(A,e,l,s,t),rT(A,e,f)):e instanceof Ir?(t.lastDrawType!==my&&(s=!0,t.lastDrawType=my),nT(A,e,l,s,t),AT(A,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==wy&&(s=!0,t.lastDrawType=wy),sT(A,e,t)),u&&r&&zt(A,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function sT(A,e,t){var r=e.getDisplayables(),n=e.getTemporalDisplayables();A.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},a,o;for(a=e.getCursor(),o=r.length;a<o;a++){var s=r[a];s.beforeBrush&&s.beforeBrush(),s.innerBeforeBrush(),kn(A,s,i,a===o-1),s.innerAfterBrush(),s.afterBrush&&s.afterBrush(),i.prevEl=s}for(var l=0,u=n.length;l<u;l++){var s=n[l];s.beforeBrush&&s.beforeBrush(),s.innerBeforeBrush(),kn(A,s,i,l===u-1),s.innerAfterBrush(),s.afterBrush&&s.afterBrush(),i.prevEl=s}e.clearTemporalDisplayables(),e.notClear=!0,A.restore()}var uv=new PI,_y=new Bi(100),Qy=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function fv(A,e){if(A==="none")return null;var t=e.getDevicePixelRatio(),r=e.getZr(),n=r.painter.type==="svg";A.dirty&&uv.delete(A);var i=uv.get(A);if(i)return i;var a=Ne(A,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});a.backgroundColor==="none"&&(a.backgroundColor=null);var o={repeat:"repeat"};return s(o),o.rotation=a.rotation,o.scaleX=o.scaleY=n?1:1/t,uv.set(A,o),A.dirty=!1,o;function s(l){for(var u=[t],f=!0,c=0;c<Qy.length;++c){var h=a[Qy[c]];if(h!=null&&!ae(h)&&!le(h)&&!Ye(h)&&typeof h!="boolean"){f=!1;break}u.push(h)}var v;if(f){v=u.join(",")+(n?"-svg":"");var d=_y.get(v);d&&(n?l.svgElement=d:l.image=d)}var g=Fy(a.dashArrayX),p=lT(a.dashArrayY),B=xy(a.symbol),m=uT(g),y=Ey(p),_=!n&&rr.createCanvas(),C=n&&{tag:"g",attrs:{},key:"dcl",children:[]},Q=F(),x;_&&(_.width=Q.width*t,_.height=Q.height*t,x=_.getContext("2d")),S(),f&&_y.put(v,_||C),l.image=_,l.svgElement=C,l.svgWidth=Q.width,l.svgHeight=Q.height;function F(){for(var E=1,I=0,U=m.length;I<U;++I)E=zg(E,m[I]);for(var T=1,I=0,U=B.length;I<U;++I)T=zg(T,B[I].length);E*=T;var L=y*m.length*B.length;if(process.env.NODE_ENV!=="production"){var P=function(Z){console.warn("Calculated decal size is greater than "+Z+" due to decal option settings so "+Z+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+Z+" to be larger to avoid incontinuity.")};E>a.maxTileWidth&&P("maxTileWidth"),L>a.maxTileHeight&&P("maxTileHeight")}return{width:Math.max(1,Math.min(E,a.maxTileWidth)),height:Math.max(1,Math.min(L,a.maxTileHeight))}}function S(){x&&(x.clearRect(0,0,_.width,_.height),a.backgroundColor&&(x.fillStyle=a.backgroundColor,x.fillRect(0,0,_.width,_.height)));for(var E=0,I=0;I<p.length;++I)E+=p[I];if(E<=0)return;for(var U=-y,T=0,L=0,P=0;U<Q.height;){if(T%2===0){for(var Z=L/2%B.length,V=0,X=0,ee=0;V<Q.width*2;){for(var te=0,I=0;I<g[P].length;++I)te+=g[P][I];if(te<=0)break;if(X%2===0){var D=(1-a.symbolSize)*.5,M=V+g[P][X]*D,H=U+p[T]*D,K=g[P][X]*a.symbolSize,N=p[T]*a.symbolSize,ue=ee/2%B[Z].length;ie(M,H,K,N,B[Z][ue])}V+=g[P][X],++ee,++X,X===g[P].length&&(X=0)}++P,P===g.length&&(P=0)}U+=p[T],++L,++T,T===p.length&&(T=0)}function ie(Se,He,G,de,De){var st=n?1:t,tr=Or(De,Se*st,He*st,G*st,de*st,a.color,a.symbolKeepAspect);if(n){var nn=r.painter.renderOneToVNode(tr);nn&&C.children.push(nn)}else Cy(x,tr)}}}}function xy(A){if(!A||A.length===0)return[["rect"]];if(le(A))return[[A]];for(var e=!0,t=0;t<A.length;++t)if(!le(A[t])){e=!1;break}if(e)return xy([A]);for(var r=[],t=0;t<A.length;++t)le(A[t])?r.push([A[t]]):r.push(A[t]);return r}function Fy(A){if(!A||A.length===0)return[[0,0]];if(Ye(A)){var e=Math.ceil(A);return[[e,e]]}for(var t=!0,r=0;r<A.length;++r)if(!Ye(A[r])){t=!1;break}if(t)return Fy([A]);for(var n=[],r=0;r<A.length;++r)if(Ye(A[r])){var e=Math.ceil(A[r]);n.push([e,e])}else{var e=Be(A[r],function(o){return Math.ceil(o)});e.length%2===1?n.push(e.concat(e)):n.push(e)}return n}function lT(A){if(!A||typeof A=="object"&&A.length===0)return[0,0];if(Ye(A)){var e=Math.ceil(A);return[e,e]}var t=Be(A,function(r){return Math.ceil(r)});return A.length%2?t.concat(t):t}function uT(A){return Be(A,function(e){return Ey(e)})}function Ey(A){for(var e=0,t=0;t<A.length;++t)e+=A[t];return A.length%2===1?e*2:e}function fT(A,e){A.eachRawSeries(function(t){if(!A.isSeriesFiltered(t)){var r=t.getData();r.hasItemVisual()&&r.each(function(a){var o=r.getItemVisual(a,"decal");if(o){var s=r.ensureUniqueItemVisual(a,"style");s.decal=fv(o,e)}});var n=r.getVisual("decal");if(n){var i=r.getVisual("style");i.decal=fv(n,e)}}})}var EA=new yA,Zl={};function cT(A,e){process.env.NODE_ENV!=="production"&&Zl[A]&&Ge("Already has an implementation of "+A+"."),Zl[A]=e}function hT(A){return process.env.NODE_ENV!=="production"&&(Zl[A]||Ge("Implementation of "+A+" doesn't exists.")),Zl[A]}var vT=1,dT=800,pT=900,gT=1e3,BT=2e3,mT=5e3,by=1e3,yT=1100,cv=2e3,Sy=3e3,wT=4e3,Jl=4500,CT=4600,_T=5e3,QT=6e3,Uy=7e3,xT={PROCESSOR:{FILTER:gT,SERIES_FILTER:dT,STATISTIC:mT},VISUAL:{LAYOUT:by,PROGRESSIVE_LAYOUT:yT,GLOBAL:cv,CHART:Sy,POST_CHART_LAYOUT:CT,COMPONENT:wT,BRUSH:_T,CHART_ITEM:Jl,ARIA:QT,DECAL:Uy}},ut="__flagInMainProcess",ql="__mainProcessVersion",Bt="__pendingUpdate",hv="__needsUpdateStatus",Iy=/^[a-zA-Z0-9_]+$/,vv="__connectUpdateStatus",Ty=0,FT=1,ET=2;function Dy(A){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){Wt(this.id);return}return My(this,A,e)}}function Ly(A){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return My(this,A,e)}}function My(A,e,t){return t[0]=t[0]&&t[0].toLowerCase(),yA.prototype[e].apply(A,t)}var Hy=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e})(yA),Oy=Hy.prototype;Oy.on=Ly("on"),Oy.off=Ly("off");var Vn,dv,$l,hr,jl,pv,gv,zi,Wi,Ry,Ny,Bv,Py,eu,ky,Vy,hA,Ky,Yi,Gy=(function(A){J(e,A);function e(t,r,n){var i=A.call(this,new TI)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},i._dom=t;var a="canvas",o="auto",s=!1;if(i[ql]=1,process.env.NODE_ENV!=="production"){var l=_e.hasGlobalWindow?window:global;l&&(a=ve(l.__ECHARTS__DEFAULT__RENDERER__,a),o=ve(l.__ECHARTS__DEFAULT__COARSE_POINTER,o),s=ve(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,s))}n.ssr;var u=i._zr=Hg(t,{renderer:n.renderer||a,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:ve(n.useDirtyRect,s),useCoarsePointer:ve(n.useCoarsePointer,o),pointerSize:n.pointerSize});i._ssr=n.ssr,i._throttledZrFlush=av(ye(u.flush,u),17),i._updateTheme(r),i._locale=_S(n.locale||DB),i._coordSysMgr=new Nh;var f=i._api=ky(i);function c(h,v){return h.__prio-v.__prio}return as(ru,c),as(wv,c),i._scheduler=new ty(i,f,wv,ru),i._messageCenter=new Hy,i._initEvents(),i.resize=ye(i.resize,i),u.animation.on("frame",i._onframe,i),Ry(u,i),Ny(u,i),Tf(i),i}return e.prototype._onframe=function(){if(!this._disposed){Ky(this);var t=this._scheduler;if(this[Bt]){var r=this[Bt].silent;this[ut]=!0,Yi(this);try{Vn(this),hr.update.call(this,null,this[Bt].updateParams)}catch(s){throw this[ut]=!1,this[Bt]=null,s}this._zr.flush(),this[ut]=!1,this[Bt]=null,zi.call(this,r),Wi.call(this,r)}else if(t.unfinished){var n=vT,i=this._model,a=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),pv(this,i),t.performVisualTasks(i),eu(this,this._model,a,"remain",{}),n-=+new Date-o}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,r,n){if(this[ut]){process.env.NODE_ENV!=="production"&&Ge("`setOption` should not be called during main process.");return}if(this._disposed){Wt(this.id);return}var i,a,o;if(he(r)&&(n=r.lazyUpdate,i=r.silent,a=r.replaceMerge,o=r.transition,r=r.notMerge),this[ut]=!0,Yi(this),!this._model||r){var s=new fU(this._api),l=this._theme,u=this._model=new Wh;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:a},Cv);var f={seriesTransition:o,optionChanged:!0};if(n)this[Bt]={silent:i,updateParams:f},this[ut]=!1,this.getZr().wakeUp();else{try{Vn(this),hr.update.call(this,null,f)}catch(c){throw this[Bt]=null,this[ut]=!1,c}this._ssr||this._zr.flush(),this[Bt]=null,this[ut]=!1,zi.call(this,i),Wi.call(this,i)}},e.prototype.setTheme=function(t,r){if(this[ut]){process.env.NODE_ENV!=="production"&&Ge("`setTheme` should not be called during main process.");return}if(this._disposed){Wt(this.id);return}var n=this._model;if(n){var i=r&&r.silent,a=null;this[Bt]&&(i==null&&(i=this[Bt].silent),a=this[Bt].updateParams,this[Bt]=null),this[ut]=!0,Yi(this);try{this._updateTheme(t),n.setTheme(this._theme),Vn(this),hr.update.call(this,{type:"setTheme"},a)}catch(o){throw this[ut]=!1,o}this[ut]=!1,zi.call(this,i),Wi.call(this,i)}},e.prototype._updateTheme=function(t){le(t)&&(t=zy[t]),t&&(t=Ue(t),t&&dm(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||_e.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return process.env.NODE_ENV!=="production"&&pt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var r=this._zr.painter;if(process.env.NODE_ENV!=="production"&&r.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return r.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var r=this._zr.painter;if(process.env.NODE_ENV!=="production"&&r.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return r.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,r=t.storage.getDisplayList();return b(r,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){Wt(this.id);return}t=t||{};var r=t.excludeComponents,n=this._model,i=[],a=this;b(r,function(s){n.eachComponent({mainType:s},function(l){var u=a._componentsMap[l.__viewId];u.group.ignore||(i.push(u),u.group.ignore=!0)})});var o=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return b(i,function(s){s.group.ignore=!1}),o},e.prototype.getConnectedDataURL=function(t){if(this._disposed){Wt(this.id);return}var r=t.type==="svg",n=this.group,i=Math.min,a=Math.max,o=1/0;if(Wy[n]){var s=o,l=o,u=-o,f=-o,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();b(so,function(m,y){if(m.group===n){var _=r?m.getZr().painter.getSvgDom().innerHTML:m.renderToCanvas(Ue(t)),C=m.getDom().getBoundingClientRect();s=i(C.left,s),l=i(C.top,l),u=a(C.right,u),f=a(C.bottom,f),c.push({dom:_,left:C.left,top:C.top})}}),s*=h,l*=h,u*=h,f*=h;var v=u-s,d=f-l,g=rr.createCanvas(),p=Hg(g,{renderer:r?"svg":"canvas"});if(p.resize({width:v,height:d}),r){var B="";return b(c,function(m){var y=m.left-s,_=m.top-l;B+='<g transform="translate('+y+","+_+')">'+m.dom+"</g>"}),p.painter.getSvgRoot().innerHTML=B,t.connectedBackgroundColor&&p.painter.setBackgroundColor(t.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}else return t.connectedBackgroundColor&&p.add(new qe({shape:{x:0,y:0,width:v,height:d},style:{fill:t.connectedBackgroundColor}})),b(c,function(m){var y=new Ir({style:{x:m.left*h-s,y:m.top*h-l,image:m.dom}});p.add(y)}),p.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,r,n){return jl(this,"convertToPixel",t,r,n)},e.prototype.convertToLayout=function(t,r,n){return jl(this,"convertToLayout",t,r,n)},e.prototype.convertFromPixel=function(t,r,n){return jl(this,"convertFromPixel",t,r,n)},e.prototype.containPixel=function(t,r){if(this._disposed){Wt(this.id);return}var n=this._model,i,a=Uc(n,t);return b(a,function(o,s){s.indexOf("Models")>=0&&b(o,function(l){var u=l.coordinateSystem;if(u&&u.containPoint)i=i||!!u.containPoint(r);else if(s==="seriesModels"){var f=this._chartsMap[l.__viewId];f&&f.containPoint?i=i||f.containPoint(r,l):process.env.NODE_ENV!=="production"&&xt(s+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&xt(s+": containPoint is not supported")},this)},this),!!i},e.prototype.getVisual=function(t,r){var n=this._model,i=Uc(n,t,{defaultMainType:"series"}),a=i.seriesModel;process.env.NODE_ENV!=="production"&&(a||xt("There is no specified series model"));var o=a.getData(),s=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?o.indexOfRawIndex(i.dataIndex):null;return s!=null?MI(o,s,r):HI(o,r)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;b(bT,function(n){var i=function(a){var o=t.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&ao(s,function(d){var g=Le(d);if(g&&g.dataIndex!=null){var p=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=p&&p.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=Y({},g.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),v=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!u&&!(h&&v)&&xt("model or view can not be found by params"),l.event=a,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:v},t.trigger(n,l)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)});var r=this._messageCenter;b(yv,function(n,i){r.on(i,function(a){t.trigger(i,a)})}),OI(r,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Wt(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Wt(this.id);return}this._disposed=!0;var t=this.getDom();t&&t0(this.getDom(),Qv,"");var r=this,n=r._api,i=r._model;b(r._componentsViews,function(a){a.dispose(i,n)}),b(r._chartsViews,function(a){a.dispose(i,n)}),r._zr.dispose(),r._dom=r._model=r._chartsMap=r._componentsMap=r._chartsViews=r._componentsViews=r._scheduler=r._api=r._zr=r._throttledZrFlush=r._theme=r._coordSysMgr=r._messageCenter=null,delete so[r.id]},e.prototype.resize=function(t){if(this[ut]){process.env.NODE_ENV!=="production"&&Ge("`resize` should not be called during main process.");return}if(this._disposed){Wt(this.id);return}this._zr.resize(t);var r=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!r){var n=r.resetOption("media"),i=t&&t.silent;this[Bt]&&(i==null&&(i=this[Bt].silent),n=!0,this[Bt]=null),this[ut]=!0,Yi(this);try{n&&Vn(this),hr.update.call(this,{type:"resize",animation:Y({duration:0},t&&t.animation)})}catch(a){throw this[ut]=!1,a}this[ut]=!1,zi.call(this,i),Wi.call(this,i)}},e.prototype.showLoading=function(t,r){if(this._disposed){Wt(this.id);return}if(he(t)&&(r=t,t=""),t=t||"default",this.hideLoading(),!_v[t]){process.env.NODE_ENV!=="production"&&xt("Loading effects "+t+" not exists.");return}var n=_v[t](this._api,r),i=this._zr;this._loadingFX=n,i.add(n)},e.prototype.hideLoading=function(){if(this._disposed){Wt(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var r=Y({},t);return r.type=Au[t.type],r},e.prototype.dispatchAction=function(t,r){if(this._disposed){Wt(this.id);return}if(he(r)||(r={silent:!!r}),!!tu[t.type]&&this._model){if(this[ut]){this._pendingActions.push(t);return}var n=r.silent;gv.call(this,t,n);var i=r.flush;i?this._zr.flush():i!==!1&&_e.browser.weChat&&this._throttledZrFlush(),zi.call(this,n),Wi.call(this,n)}},e.prototype.updateLabelLayout=function(){EA.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){Wt(this.id);return}var r=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(r);process.env.NODE_ENV!=="production"&&fe(t.data&&i),i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){Vn=function(f){var c=f._scheduler;c.restorePipelines(f._model),c.prepareStageTasks(),dv(f,!0),dv(f,!1),c.plan()},dv=function(f,c){for(var h=f._model,v=f._scheduler,d=c?f._componentsViews:f._chartsViews,g=c?f._componentsMap:f._chartsMap,p=f._zr,B=f._api,m=0;m<d.length;m++)d[m].__alive=!1;c?h.eachComponent(function(C,Q){C!=="series"&&y(Q)}):h.eachSeries(y);function y(C){var Q=C.__requireNewView;C.__requireNewView=!1;var x="_ec_"+C.id+"_"+C.type,F=!Q&&g[x];if(!F){var S=VA(C.type),E=c?xA.getClass(S.main,S.sub):FA.getClass(S.sub);process.env.NODE_ENV!=="production"&&fe(E,S.sub+" does not exist."),F=new E,F.init(h,B),g[x]=F,d.push(F),p.add(F.group)}C.__viewId=F.__id=x,F.__alive=!0,F.__model=C,F.group.__ecComponentInfo={mainType:C.mainType,index:C.componentIndex},!c&&v.prepareView(F,C,h,B)}for(var m=0;m<d.length;){var _=d[m];_.__alive?m++:(!c&&_.renderTask.dispose(),p.remove(_.group),_.dispose(h,B),d.splice(m,1),g[_.__id]===_&&delete g[_.__id],_.__id=_.group.__ecComponentInfo=null)}},$l=function(f,c,h,v,d){var g=f._model;if(g.setUpdatePayload(h),!v){b([].concat(f._componentsViews).concat(f._chartsViews),_);return}var p={};p[v+"Id"]=h[v+"Id"],p[v+"Index"]=h[v+"Index"],p[v+"Name"]=h[v+"Name"];var B={mainType:v,query:p};d&&(B.subType=d);var m=h.excludeSeriesId,y;m!=null&&(y=we(),b(Lt(m),function(C){var Q=kA(C,null);Q!=null&&y.set(Q,!0)})),g&&g.eachComponent(B,function(C){var Q=y&&y.get(C.id)!=null;if(!Q)if(q0(h))if(C instanceof JA)h.type===En&&!h.notBlur&&!C.get(["emphasis","disabled"])&&ab(C,h,f._api);else{var x=nh(C.mainType,C.componentIndex,h.name,f._api),F=x.focusSelf,S=x.dispatchers;h.type===En&&F&&!h.notBlur&&rh(C.mainType,C.componentIndex,f._api),S&&b(S,function(E){h.type===En?Js(E):qs(E)})}else ah(h)&&C instanceof JA&&(lb(C,h,f._api),X0(C),hA(f))},f),g&&g.eachComponent(B,function(C){var Q=y&&y.get(C.id)!=null;Q||_(f[v==="series"?"_chartsMap":"_componentsMap"][C.__viewId])},f);function _(C){C&&C.__alive&&C[c]&&C[c](C.__model,g,f._api,h)}},hr={prepareAndUpdate:function(f){Vn(this),hr.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,c){var h=this._model,v=this._api,d=this._zr,g=this._coordSysMgr,p=this._scheduler;if(h){h.setUpdatePayload(f),p.restoreData(h,f),p.performSeriesTasks(h),g.create(h,v),p.performDataProcessorTasks(h,f),pv(this,h),g.update(h,v),r(h),p.performVisualTasks(h,f);var B=h.get("backgroundColor")||"transparent";d.setBackgroundColor(B);var m=h.get("darkMode");m!=null&&m!=="auto"&&d.setDarkMode(m),Bv(this,h,v,f,c),EA.trigger("afterupdate",h,v)}},updateTransform:function(f){var c=this,h=this._model,v=this._api;if(h){h.setUpdatePayload(f);var d=[];h.eachComponent(function(p,B){if(p!=="series"){var m=c.getViewOfComponentModel(B);if(m&&m.__alive)if(m.updateTransform){var y=m.updateTransform(B,h,v,f);y&&y.update&&d.push(m)}else d.push(m)}});var g=we();h.eachSeries(function(p){var B=c._chartsMap[p.__viewId];if(B.updateTransform){var m=B.updateTransform(p,h,v,f);m&&m.update&&g.set(p.uid,1)}else g.set(p.uid,1)}),r(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:g}),eu(this,h,v,f,{},g),EA.trigger("afterupdate",h,v)}},updateView:function(f){var c=this._model;c&&(c.setUpdatePayload(f),FA.markUpdateMethod(f,"updateView"),r(c),this._scheduler.performVisualTasks(c,f,{setDirty:!0}),Bv(this,c,this._api,f,{}),EA.trigger("afterupdate",c,this._api))},updateVisual:function(f){var c=this,h=this._model;h&&(h.setUpdatePayload(f),h.eachSeries(function(v){v.getData().clearAllVisual()}),FA.markUpdateMethod(f,"updateVisual"),r(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(v,d){if(v!=="series"){var g=c.getViewOfComponentModel(d);g&&g.__alive&&g.updateVisual(d,h,c._api,f)}}),h.eachSeries(function(v){var d=c._chartsMap[v.__viewId];d.updateVisual(v,h,c._api,f)}),EA.trigger("afterupdate",h,this._api))},updateLayout:function(f){hr.update.call(this,f)}};function t(f,c,h,v,d){if(f._disposed){Wt(f.id);return}for(var g=f._model,p=f._coordSysMgr.getCoordinateSystems(),B,m=Uc(g,h),y=0;y<p.length;y++){var _=p[y];if(_[c]&&(B=_[c](g,m,v,d))!=null)return B}process.env.NODE_ENV!=="production"&&xt("No coordinate system that supports "+c+" found by the given finder.")}jl=t,pv=function(f,c){var h=f._chartsMap,v=f._scheduler;c.eachSeries(function(d){v.updateStreamModes(d,h[d.__viewId])})},gv=function(f,c){var h=this,v=this.getModel(),d=f.type,g=f.escapeConnect,p=tu[d],B=(p.update||"update").split(":"),m=B.pop(),y=B[0]!=null&&VA(B[0]);this[ut]=!0,Yi(this);var _=[f],C=!1;f.batch&&(C=!0,_=Be(f.batch,function(P){return P=Ne(Y({},P),f),P.batch=null,P}));var Q=[],x,F=[],S=p.nonRefinedEventType,E=ah(f),I=q0(f);if(I&&Y0(this._api),b(_,function(P){var Z=p.action(P,v,h._api);if(p.refineEvent?F.push(Z):x=Z,x=x||Y({},P),x.type=S,Q.push(x),I){var V=Ic(f),X=V.queryOptionMap,ee=V.mainTypeSpecified,te=ee?X.keys()[0]:"series";$l(h,m,P,te),hA(h)}else E?($l(h,m,P,"series"),hA(h)):y&&$l(h,m,P,y.main,y.sub)}),m!=="none"&&!I&&!E&&!y)try{this[Bt]?(Vn(this),hr.update.call(this,f),this[Bt]=null):hr[m].call(this,f)}catch(P){throw this[ut]=!1,P}if(C?x={type:S,escapeConnect:g,batch:Q}:x=Q[0],this[ut]=!1,!c){var U=void 0;if(p.refineEvent){var T=p.refineEvent(F,f,v,this._api).eventContent;fe(he(T)),U=Ne({type:p.refinedEventType},T),U.fromAction=f.type,U.fromActionPayload=f,U.escapeConnect=!0}var L=this._messageCenter;L.trigger(x.type,x),U&&L.trigger(U.type,U)}},zi=function(f){for(var c=this._pendingActions;c.length;){var h=c.shift();gv.call(this,h,f)}},Wi=function(f){!f&&this.trigger("updated")},Ry=function(f,c){f.on("rendered",function(h){c.trigger("rendered",h),f.animation.isFinished()&&!c[Bt]&&!c._scheduler.unfinished&&!c._pendingActions.length&&c.trigger("finished")})},Ny=function(f,c){f.on("mouseover",function(h){var v=h.target,d=ao(v,Si);d&&(ob(d,h,c._api),hA(c))}).on("mouseout",function(h){var v=h.target,d=ao(v,Si);d&&(sb(d,h,c._api),hA(c))}).on("click",function(h){var v=h.target,d=ao(v,function(B){return Le(B).dataIndex!=null},!0);if(d){var g=d.selected?"unselect":"select",p=Le(d);c._api.dispatchAction({type:g,dataType:p.dataType,dataIndexInside:p.dataIndex,seriesIndex:p.seriesIndex,isFromClick:!0})}})};function r(f){f.clearColorPalette(),f.eachSeries(function(c){c.clearColorPalette()})}function n(f){var c=[],h=[],v=!1;if(f.eachComponent(function(B,m){var y=m.get("zlevel")||0,_=m.get("z")||0,C=m.getZLevelKey();v=v||!!C,(B==="series"?h:c).push({zlevel:y,z:_,idx:m.componentIndex,type:B,key:C})}),v){var d=c.concat(h),g,p;as(d,function(B,m){return B.zlevel===m.zlevel?B.z-m.z:B.zlevel-m.zlevel}),b(d,function(B){var m=f.getComponent(B.type,B.idx),y=B.zlevel,_=B.key;g!=null&&(y=Math.max(g,y)),_?(y===g&&_!==p&&y++,p=_):p&&(y===g&&y++,p=""),g=y,m.setZLevel(y)})}}Bv=function(f,c,h,v,d){n(c),Py(f,c,h,v,d),b(f._chartsViews,function(g){g.__alive=!1}),eu(f,c,h,v,d),b(f._chartsViews,function(g){g.__alive||g.remove(c,h)})},Py=function(f,c,h,v,d,g){b(g||f._componentsViews,function(p){var B=p.__model;l(B,p),p.render(B,c,h,v),s(B,p),u(B,p)})},eu=function(f,c,h,v,d,g){var p=f._scheduler;d=Y(d||{},{updatedSeries:c.getSeries()}),EA.trigger("series:beforeupdate",c,h,d);var B=!1;c.eachSeries(function(m){var y=f._chartsMap[m.__viewId];y.__alive=!0;var _=y.renderTask;p.updatePayload(_,v),l(m,y),g&&g.get(m.uid)&&_.dirty(),_.perform(p.getPerformArgs(_))&&(B=!0),y.group.silent=!!m.get("silent"),o(m,y),X0(m)}),p.unfinished=B||p.unfinished,EA.trigger("series:layoutlabels",c,h,d),EA.trigger("series:transition",c,h,d),c.eachSeries(function(m){var y=f._chartsMap[m.__viewId];s(m,y),u(m,y)}),a(f,c),EA.trigger("series:afterupdate",c,h,d)},hA=function(f){f[hv]=!0,f.getZr().wakeUp()},Yi=function(f){f[ql]=(f[ql]+1)%1e3},Ky=function(f){f[hv]&&(f.getZr().storage.traverse(function(c){Di(c)||i(c)}),f[hv]=!1)};function i(f){for(var c=[],h=f.currentStates,v=0;v<h.length;v++){var d=h[v];d==="emphasis"||d==="blur"||d==="select"||c.push(d)}f.selected&&f.states.select&&c.push("select"),f.hoverState===Gs&&f.states.emphasis?c.push("emphasis"):f.hoverState===Ks&&f.states.blur&&c.push("blur"),f.useStates(c)}function a(f,c){var h=f._zr,v=h.storage,d=0;v.traverse(function(g){g.isGroup||d++}),d>c.get("hoverLayerThreshold")&&!_e.node&&!_e.worker&&c.eachSeries(function(g){if(!g.preventUsingHoverLayer){var p=f._chartsMap[g.__viewId];p.__alive&&p.eachRendered(function(B){B.states.emphasis&&(B.states.emphasis.hoverLayer=!0)})}})}function o(f,c){var h=f.get("blendMode")||null;c.eachRendered(function(v){v.isGroup||(v.style.blend=h)})}function s(f,c){if(!f.preventAutoZ){var h=za(f);c.eachRendered(function(v){return _B(v,h.z,h.zlevel),!0})}}function l(f,c){c.eachRendered(function(h){if(!Di(h)){var v=h.getTextContent(),d=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function u(f,c){var h=f.getModel("stateAnimation"),v=f.isAnimationEnabled(),d=h.get("duration"),g=d>0?{duration:d,delay:h.get("delay"),easing:h.get("easing")}:null;c.eachRendered(function(p){if(p.states&&p.states.emphasis){if(Di(p))return;if(p instanceof ke&&db(p),p.__dirty){var B=p.prevStates;B&&p.useStates(B)}if(v){p.stateTransition=g;var m=p.getTextContent(),y=p.getTextGuideLine();m&&(m.stateTransition=g),y&&(y.stateTransition=g)}p.__dirty&&i(p)}})}ky=function(f){return new((function(c){J(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(v){for(;v;){var d=v.__ecComponentInfo;if(d!=null)return f._model.getComponent(d.mainType,d.index);v=v.parent}},h.prototype.enterEmphasis=function(v,d){Js(v,d),hA(f)},h.prototype.leaveEmphasis=function(v,d){qs(v,d),hA(f)},h.prototype.enterBlur=function(v){ib(v),hA(f)},h.prototype.leaveBlur=function(v){K0(v),hA(f)},h.prototype.enterSelect=function(v){G0(v),hA(f)},h.prototype.leaveSelect=function(v){z0(v),hA(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},h.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},h.prototype.getMainProcessVersion=function(){return f[ql]},h})(sm))(f)},Vy=function(f){function c(h,v){for(var d=0;d<h.length;d++){var g=h[d];g[vv]=v}}b(Au,function(h,v){f._messageCenter.on(v,function(d){if(Wy[f.group]&&f[vv]!==Ty){if(d&&d.escapeConnect)return;var g=f.makeActionFromEvent(d),p=[];b(so,function(B){B!==f&&B.group===f.group&&p.push(B)}),c(p,Ty),b(p,function(B){B[vv]!==FT&&B.dispatchAction(g)}),c(p,ET)}})})}})(),e})(yA),mv=Gy.prototype;mv.on=Dy("on"),mv.off=Dy("off"),mv.one=function(A,e,t){var r=this;PA("ECharts#one is deprecated.");function n(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];e&&e.apply&&e.apply(this,i),r.off(A,n)}this.on.call(this,A,n,t)};var bT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Wt(A){process.env.NODE_ENV!=="production"&&xt("Instance "+A+" has been disposed")}var tu={},Au={},yv={},wv=[],Cv=[],ru=[],zy={},_v={},so={},Wy={},ST=+new Date-0,Qv="_echarts_instance_";function UT(A,e,t){{if(process.env.NODE_ENV!=="production"&&!A)throw new Error("Initialize failed: invalid dom.");var r=IT(A);if(r)return process.env.NODE_ENV!=="production"&&xt("There is a chart instance already initialized on the dom."),r;process.env.NODE_ENV!=="production"&&ii(A)&&A.nodeName.toUpperCase()!=="CANVAS"&&(!A.clientWidth&&!t||!A.clientHeight&&!t)&&xt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var n=new Gy(A,e,t);return n.id="ec_"+ST++,so[n.id]=n,t0(A,Qv,n.id),Vy(n),EA.trigger("afterinit",n),n}function IT(A){return so[XF(A,Qv)]}function Yy(A,e){zy[A]=e}function Xy(A){Te(Cv,A)<0&&Cv.push(A)}function Zy(A,e){Fv(wv,A,e,BT)}function TT(A){xv("afterinit",A)}function DT(A){xv("afterupdate",A)}function xv(A,e){EA.on(A,e)}function Kn(A,e,t){var r,n,i,a,o;me(e)&&(t=e,e=""),he(A)?(r=A.type,n=A.event,a=A.update,o=A.publishNonRefinedEvent,t||(t=A.action),i=A.refineEvent):(r=A,n=e);function s(u){return u.toLowerCase()}n=s(n||r);var l=i?s(r):n;tu[r]||(fe(Iy.test(r)&&Iy.test(n)),i&&fe(n!==r),tu[r]={actionType:r,refinedEventType:n,nonRefinedEventType:l,update:a,action:t,refineEvent:i},yv[n]=1,i&&o&&(yv[l]=1),process.env.NODE_ENV!=="production"&&Au[l]&&Ge(l+' must not be shared; use "refineEvent" if you intend to share an event name.'),Au[l]=r)}function LT(A,e){Nh.register(A,e)}function MT(A,e){Fv(ru,A,e,by,"layout")}function Gn(A,e){Fv(ru,A,e,Sy,"visual")}var Jy=[];function Fv(A,e,t,r,n){if((me(e)||he(e))&&(t=e,e=r),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");b(A,function(a){fe(a.__raw!==t)})}if(!(Te(Jy,t)>=0)){Jy.push(t);var i=ty.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,A.push(i)}}function qy(A,e){_v[A]=e}function HT(A,e,t){var r=hT("registerMap");r&&r(A,e,t)}var OT=VU;Gn(cv,BI),Gn(Jl,mI),Gn(Jl,yI),Gn(cv,DI),Gn(Jl,LI),Gn(Uy,fT),Xy(dm),Zy(pT,_U),qy("default",wI),Kn({type:En,event:En,update:En},Dt),Kn({type:Ws,event:Ws,update:Ws},Dt),Kn({type:Ys,event:jc,update:Ys,action:Dt,refineEvent:Ev,publishNonRefinedEvent:!0}),Kn({type:$c,event:jc,update:$c,action:Dt,refineEvent:Ev,publishNonRefinedEvent:!0}),Kn({type:Xs,event:jc,update:Xs,action:Dt,refineEvent:Ev,publishNonRefinedEvent:!0});function Ev(A,e,t,r){return{eventContent:{selected:ub(t),isFromClick:e.isFromClick||!1}}}Yy("default",{}),Yy("dark",ay);function lo(A){return A==null?0:A.length||1}function $y(A){return A}var RT=(function(){function A(e,t,r,n,i,a){this._old=e,this._new=t,this._oldKeyGetter=r||$y,this._newKeyGetter=n||$y,this.context=i,this._diffModeMultiple=a==="multiple"}return A.prototype.add=function(e){return this._add=e,this},A.prototype.update=function(e){return this._update=e,this},A.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},A.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},A.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},A.prototype.remove=function(e){return this._remove=e,this},A.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},A.prototype._executeOneToOne=function(){var e=this._old,t=this._new,r={},n=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,r,i,"_newKeyGetter");for(var a=0;a<e.length;a++){var o=n[a],s=r[o],l=lo(s);if(l>1){var u=s.shift();s.length===1&&(r[o]=s[0]),this._update&&this._update(u,a)}else l===1?(r[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,r)},A.prototype._executeMultiple=function(){var e=this._old,t=this._new,r={},n={},i=[],a=[];this._initIndexMap(e,r,i,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var o=0;o<i.length;o++){var s=i[o],l=r[s],u=n[s],f=lo(l),c=lo(u);if(f>1&&c===1)this._updateManyToOne&&this._updateManyToOne(u,l),n[s]=null;else if(f===1&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),n[s]=null;else if(f===1&&c===1)this._update&&this._update(u,l),n[s]=null;else if(f>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),n[s]=null;else if(f>1)for(var h=0;h<f;h++)this._remove&&this._remove(l[h]);else this._remove&&this._remove(l)}this._performRestAdd(a,n)},A.prototype._performRestAdd=function(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=t[n],a=lo(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[n]=null}},A.prototype._initIndexMap=function(e,t,r,n){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o="_ec_"+this[n](e[a],a);if(i||(r[a]=o),!!t){var s=t[o],l=lo(s);l===0?(t[o]=a,i&&r.push(o)):l===1?t[o]=[s,a]:s.push(a)}}},A})(),NT=(function(){function A(e,t){this._encode=e,this._schema=t}return A.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},A.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},A})();function PT(A,e){var t={},r=t.encode={},n=we(),i=[],a=[],o={};b(A.dimensions,function(c){var h=A.getDimensionInfo(c),v=h.coordDim;if(v){process.env.NODE_ENV!=="production"&&fe(Kh.get(v)==null);var d=h.coordDimIndex;bv(r,v)[d]=c,h.isExtraCoord||(n.set(v,1),VT(h.type)&&(i[0]=c),bv(o,v)[d]=A.getDimensionIndex(h.name)),h.defaultTooltip&&a.push(c)}Kh.each(function(g,p){var B=bv(r,p),m=h.otherDims[p];m!=null&&m!==!1&&(B[m]=h.name)})});var s=[],l={};n.each(function(c,h){var v=r[h];l[h]=v[0],s=s.concat(v)}),t.dataDimsOnCoord=s,t.dataDimIndicesOnCoord=Be(s,function(c){return A.getDimensionInfo(c).storeDimIndex}),t.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(i=u.slice());var f=r.tooltip;return f&&f.length?a=f.slice():a.length||(a=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=a,t.userOutput=new NT(o,e),t}function bv(A,e){return A.hasOwnProperty(e)||(A[e]=[]),A[e]}function kT(A){return A==="category"?"ordinal":A==="time"?"time":"float"}function VT(A){return!(A==="ordinal"||A==="time")}var nu=(function(){function A(e){this.otherDims={},e!=null&&Y(this,e)}return A})(),KT=ze(),GT={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},jy=(function(){function A(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return A.prototype.isDimensionOmitted=function(){return this._dimOmitted},A.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Aw(this.source)))},A.prototype.getSourceDimensionIndex=function(e){return ve(this._dimNameMap.get(e),-1)},A.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},A.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=ym(this.source),r=!rw(e),n="",i=[],a=0,o=0;a<e;a++){var s=void 0,l=void 0,u=void 0,f=this.dimensions[o];if(f&&f.storeDimIndex===a)s=t?f.name:null,l=f.type,u=f.ordinalMeta,o++;else{var c=this.getSourceDimension(a);c&&(s=t?c.name:null,l=c.type)}i.push({property:s,type:l,ordinalMeta:u}),t&&s!=null&&(!f||!f.isCalculationCoord)&&(n+=r?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),n+="$",n+=GT[l]||"f",u&&(n+=u.uid),n+="$"}var h=this.source,v=[h.seriesLayoutBy,h.startIndex,n].join("$$");return{dimensions:i,hash:v}},A.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,r=0;t<this._fullDimCount;t++){var n=void 0,i=this.dimensions[r];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(n=i.name),r++;else{var a=this.getSourceDimension(t);a&&(n=a.name)}e.push(n)}return e},A.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},A})();function ew(A){return A instanceof jy}function tw(A){for(var e=we(),t=0;t<(A||[]).length;t++){var r=A[t],n=he(r)?r.name:r;n!=null&&e.get(n)==null&&e.set(n,t)}return e}function Aw(A){var e=KT(A);return e.dimNameMap||(e.dimNameMap=tw(A.dimensionsDefine))}function rw(A){return A>30}var uo=he,Rr=Be,zT=typeof Int32Array>"u"?Array:Int32Array,WT="e\0\0",nw=-1,YT=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],XT=["_approximateExtent"],iw,iu,fo,Xi,Sv,co,Uv,ZT=(function(){function A(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r,n=!1;ew(e)?(r=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,r=e),r=r||["x","y"];for(var i={},a=[],o={},s=!1,l={},u=0;u<r.length;u++){var f=r[u],c=le(f)?new nu({name:f}):f instanceof nu?f:new nu(f),h=c.name;c.type=c.type||"float",c.coordDim||(c.coordDim=h,c.coordDimIndex=0);var v=c.otherDims=c.otherDims||{};a.push(h),i[h]=c,l[h]!=null&&(s=!0),c.createInvertedIndices&&(o[h]=[]);var d=u;Ye(c.storeDimIndex)&&(d=c.storeDimIndex),v.itemName===0&&(this._nameDimIdx=d),v.itemId===0&&(this._idDimIdx=d),process.env.NODE_ENV!=="production"&&fe(n||c.storeDimIndex>=0),n&&(c.storeDimIndex=u)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var g=this._dimIdxToName=we();b(a,function(p){g.set(i[p].storeDimIndex,p)})}}return A.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var r=this._dimIdxToName.get(t);if(r!=null)return r;var n=this._schema.getSourceDimension(t);if(n)return n.name},A.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var r=this._getDimInfo(e);return r?r.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},A.prototype._recognizeDimIndex=function(e){if(Ye(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},A.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&t==null)throw new Error("Unknown dimension "+e);return t},A.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},A.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(r){return t.hasOwnProperty(r)?t[r]:void 0}:function(r){return t[r]}},A.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},A.prototype.mapDimension=function(e,t){var r=this._dimSummary;if(t==null)return r.encodeFirstDimNotExtra[e];var n=r.encode[e];return n?n[t]:null},A.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,r=t.encode[e];return(r||[]).slice()},A.prototype.getStore=function(){return this._store},A.prototype.initData=function(e,t,r){var n=this,i;if(e instanceof ev&&(i=e),!i){var a=this.dimensions,o=Zh(e)||kt(e)?new _m(e,a.length):e;i=new ev;var s=Rr(a,function(l){return{type:n._dimInfos[l].type,property:l}});i.initData(o,s,r)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=PT(this,this._schema),this.userOutput=this._dimSummary.userOutput},A.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},A.prototype.appendValues=function(e,t){var r=this._store.appendValues(e,t&&t.length),n=r.start,i=r.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=n;o<i;o++){var s=o-n;this._nameList[o]=t[s],a&&Uv(this,o)}},A.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,r=0;r<t.length;r++){var n=this._dimInfos[t[r]];n.ordinalMeta&&e.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},A.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==fr&&!e.fillStorage},A.prototype._doInit=function(e,t){if(!(e>=t)){var r=this._store,n=r.getProvider();this._updateOrdinalMeta();var i=this._nameList,a=this._idList,o=n.getSource().sourceFormat,s=o===qt;if(s&&!n.pure)for(var l=[],u=e;u<t;u++){var f=n.getItem(u,l);if(!this.hasItemOption&&HF(f)&&(this.hasItemOption=!0),f){var c=f.name;i[u]==null&&c!=null&&(i[u]=kA(c,null));var h=f.id;a[u]==null&&h!=null&&(a[u]=kA(h,null))}}if(this._shouldMakeIdFromName())for(var u=e;u<t;u++)Uv(this,u);iw(this)}},A.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},A.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},A.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},A.prototype.setCalculationInfo=function(e,t){uo(e)?Y(this._calculationInfo,e):this._calculationInfo[e]=t},A.prototype.getName=function(e){var t=this.getRawIndex(e),r=this._nameList[t];return r==null&&this._nameDimIdx!=null&&(r=fo(this,this._nameDimIdx,t)),r==null&&(r=""),r},A.prototype._getCategory=function(e,t){var r=this._store.get(e,t),n=this._store.getOrdinalMeta(e);return n?n.categories[r]:r},A.prototype.getId=function(e){return iu(this,this.getRawIndex(e))},A.prototype.count=function(){return this._store.count()},A.prototype.get=function(e,t){var r=this._store,n=this._dimInfos[e];if(n)return r.get(n.storeDimIndex,t)},A.prototype.getByRawIndex=function(e,t){var r=this._store,n=this._dimInfos[e];if(n)return r.getByRawIndex(n.storeDimIndex,t)},A.prototype.getIndices=function(){return this._store.getIndices()},A.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},A.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},A.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},A.prototype.getValues=function(e,t){var r=this,n=this._store;return ae(e)?n.getValues(Rr(e,function(i){return r._getStoreDimIndex(i)}),t):n.getValues(e)},A.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,r=0,n=t.length;r<n;r++)if(isNaN(this._store.get(t[r],e)))return!1;return!0},A.prototype.indexOfName=function(e){for(var t=0,r=this._store.count();t<r;t++)if(this.getName(t)===e)return t;return-1},A.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},A.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},A.prototype.rawIndexOf=function(e,t){var r=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!r)throw new Error("Do not supported yet");var n=r&&r[t];return n==null||isNaN(n)?nw:n},A.prototype.each=function(e,t,r){me(e)&&(r=t,t=e,e=[]);var n=r||this,i=Rr(Xi(e),this._getStoreDimIndex,this);this._store.each(i,n?ye(t,n):t)},A.prototype.filterSelf=function(e,t,r){me(e)&&(r=t,t=e,e=[]);var n=r||this,i=Rr(Xi(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,n?ye(t,n):t),this},A.prototype.selectRange=function(e){var t=this,r={},n=Xe(e);return b(n,function(i){var a=t._getStoreDimIndex(i);r[a]=e[i]}),this._store=this._store.selectRange(r),this},A.prototype.mapArray=function(e,t,r){me(e)&&(r=t,t=e,e=[]),r=r||this;var n=[];return this.each(e,function(){n.push(t&&t.apply(this,arguments))},r),n},A.prototype.map=function(e,t,r,n){var i=r||n||this,a=Rr(Xi(e),this._getStoreDimIndex,this),o=co(this);return o._store=this._store.map(a,i?ye(t,i):t),o},A.prototype.modify=function(e,t,r,n){var i=this,a=r||n||this;process.env.NODE_ENV!=="production"&&b(Xi(e),function(s){var l=i.getDimensionInfo(s);l.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var o=Rr(Xi(e),this._getStoreDimIndex,this);this._store.modify(o,a?ye(t,a):t)},A.prototype.downSample=function(e,t,r,n){var i=co(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,r,n),i},A.prototype.minmaxDownSample=function(e,t){var r=co(this);return r._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),r},A.prototype.lttbDownSample=function(e,t){var r=co(this);return r._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),r},A.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},A.prototype.getItemModel=function(e){var t=this.hostModel,r=this.getRawDataItem(e);return new et(r,t,t&&t.ecModel)},A.prototype.diff=function(e){var t=this;return new RT(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(r){return iu(e,r)},function(r){return iu(t,r)})},A.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},A.prototype.setVisual=function(e,t){this._visual=this._visual||{},uo(e)?Y(this._visual,e):this._visual[e]=t},A.prototype.getItemVisual=function(e,t){var r=this._itemVisuals[e],n=r&&r[t];return n??this.getVisual(t)},A.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},A.prototype.ensureUniqueItemVisual=function(e,t){var r=this._itemVisuals,n=r[e];n||(n=r[e]={});var i=n[t];return i==null&&(i=this.getVisual(t),ae(i)?i=i.slice():uo(i)&&(i=Y({},i)),n[t]=i),i},A.prototype.setItemVisual=function(e,t,r){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,uo(t)?Y(n,t):n[t]=r},A.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},A.prototype.setLayout=function(e,t){uo(e)?Y(this._layout,e):this._layout[e]=t},A.prototype.getLayout=function(e){return this._layout[e]},A.prototype.getItemLayout=function(e){return this._itemLayouts[e]},A.prototype.setItemLayout=function(e,t,r){this._itemLayouts[e]=r?Y(this._itemLayouts[e]||{},t):t},A.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},A.prototype.setItemGraphicEl=function(e,t){var r=this.hostModel&&this.hostModel.seriesIndex;ZE(r,this.dataType,e,t),this._graphicEls[e]=t},A.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},A.prototype.eachItemGraphicEl=function(e,t){b(this._graphicEls,function(r,n){r&&e&&e.call(t,r,n)})},A.prototype.cloneShallow=function(e){return e||(e=new A(this._schema?this._schema:Rr(this.dimensions,this._getDimInfo,this),this.hostModel)),Sv(e,this),e._store=this._store,e},A.prototype.wrapMethod=function(e,t){var r=this[e];me(r)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=r.apply(this,arguments);return t.apply(this,[n].concat(Uf(arguments)))})},A.internalField=(function(){iw=function(e){var t=e._invertedIndicesMap;b(t,function(r,n){var i=e._dimInfos[n],a=i.ordinalMeta,o=e._store;if(a){r=t[n]=new zT(a.categories.length);for(var s=0;s<r.length;s++)r[s]=nw;for(var s=0;s<o.count();s++)r[o.get(i.storeDimIndex,s)]=s}})},fo=function(e,t,r){return kA(e._getCategory(t,r),null)},iu=function(e,t){var r=e._idList[t];return r==null&&e._idDimIdx!=null&&(r=fo(e,e._idDimIdx,t)),r==null&&(r=WT+t),r},Xi=function(e){return ae(e)||(e=e!=null?[e]:[]),e},co=function(e){var t=new A(e._schema?e._schema:Rr(e.dimensions,e._getDimInfo,e),e.hostModel);return Sv(t,e),t},Sv=function(e,t){b(YT.concat(t.__wrappedMethods||[]),function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e.__wrappedMethods=t.__wrappedMethods,b(XT,function(r){e[r]=Ue(t[r])}),e._calculationInfo=Y({},t._calculationInfo)},Uv=function(e,t){var r=e._nameList,n=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=r[t],s=n[t];if(o==null&&i!=null&&(r[t]=o=fo(e,i,t)),s==null&&a!=null&&(n[t]=s=fo(e,a,t)),s==null&&o!=null){var l=e._nameRepeatCount,u=l[o]=(l[o]||0)+1;s=o,u>1&&(s+="__ec__"+u),n[t]=s}}})(),A})();function JT(A,e){Zh(A)||(A=pm(A)),e=e||{};var t=e.coordDimensions||[],r=e.dimensionsDefine||A.dimensionsDefine||[],n=we(),i=[],a=$T(A,t,r,e.dimensionsCount),o=e.canOmitUnusedDimensions&&rw(a),s=r===A.dimensionsDefine,l=s?Aw(A):tw(r),u=e.encodeDefine;!u&&e.encodeDefaulter&&(u=e.encodeDefaulter(A,a));for(var f=we(u),c=new Tm(a),h=0;h<c.length;h++)c[h]=-1;function v(F){var S=c[F];if(S<0){var E=r[F],I=he(E)?E:{name:E},U=new nu,T=I.name;T!=null&&l.get(T)!=null&&(U.name=U.displayName=T),I.type!=null&&(U.type=I.type),I.displayName!=null&&(U.displayName=I.displayName);var L=i.length;return c[F]=L,U.storeDimIndex=F,i.push(U),U}return i[S]}if(!o)for(var h=0;h<a;h++)v(h);f.each(function(F,S){var E=Lt(F).slice();if(E.length===1&&!le(E[0])&&E[0]<0){f.set(S,!1);return}var I=f.set(S,[]);b(E,function(U,T){var L=le(U)?l.get(U):U;L!=null&&L<a&&(I[T]=L,g(v(L),S,T))})});var d=0;b(t,function(F){var S,E,I,U;if(le(F))S=F,U={};else{U=F,S=U.name;var T=U.ordinalMeta;U.ordinalMeta=null,U=Y({},U),U.ordinalMeta=T,E=U.dimsDef,I=U.otherDims,U.name=U.coordDim=U.coordDimIndex=U.dimsDef=U.otherDims=null}var L=f.get(S);if(L!==!1){if(L=Lt(L),!L.length)for(var P=0;P<(E&&E.length||1);P++){for(;d<a&&v(d).coordDim!=null;)d++;d<a&&L.push(d++)}b(L,function(Z,V){var X=v(Z);if(s&&U.type!=null&&(X.type=U.type),g(Ne(X,U),S,V),X.name==null&&E){var ee=E[V];!he(ee)&&(ee={name:ee}),X.name=X.displayName=ee.name,X.defaultTooltip=ee.defaultTooltip}I&&Ne(X.otherDims,I)})}});function g(F,S,E){Kh.get(S)!=null?F.otherDims[S]=E:(F.coordDim=S,F.coordDimIndex=E,n.set(S,!0))}var p=e.generateCoord,B=e.generateCoordCount,m=B!=null;B=p?B||1:0;var y=p||"value";function _(F){F.name==null&&(F.name=F.coordDim)}if(o)b(i,function(F){_(F)}),i.sort(function(F,S){return F.storeDimIndex-S.storeDimIndex});else for(var C=0;C<a;C++){var Q=v(C),x=Q.coordDim;x==null&&(Q.coordDim=jT(y,n,m),Q.coordDimIndex=0,(!p||B<=0)&&(Q.isExtraCoord=!0),B--),_(Q),Q.type==null&&(tm(A,C)===$t.Must||Q.isExtraCoord&&(Q.otherDims.itemName!=null||Q.otherDims.seriesName!=null))&&(Q.type="ordinal")}return qT(i),new jy({source:A,dimensions:i,fullDimensionCount:a,dimensionOmitted:o})}function qT(A){for(var e=we(),t=0;t<A.length;t++){var r=A[t],n=r.name,i=e.get(n)||0;i>0&&(r.name=n+(i-1)),i++,e.set(n,i)}}function $T(A,e,t,r){var n=Math.max(A.dimensionsDetectedCount||1,e.length,t.length,r||0);return b(e,function(i){var a;he(i)&&(a=i.dimsDef)&&(n=Math.max(n,a.length))}),n}function jT(A,e,t){if(t||e.hasKey(A)){for(var r=0;e.hasKey(A+r);)r++;A+=r}return e.set(A,!0),A}var eD=(function(){function A(e){this.coordSysDims=[],this.axisMap=we(),this.categoryAxisMap=we(),this.coordSysName=e}return A})();function tD(A){var e=A.get("coordinateSystem"),t=new eD(e),r=AD[e];if(r)return r(A,t,t.axisMap,t.categoryAxisMap),t}var AD={cartesian2d:function(A,e,t,r){var n=A.getReferringComponents("xAxis",Mt).models[0],i=A.getReferringComponents("yAxis",Mt).models[0];if(process.env.NODE_ENV!=="production"){if(!n)throw new Error('xAxis "'+oi(A.get("xAxisIndex"),A.get("xAxisId"),0)+'" not found');if(!i)throw new Error('yAxis "'+oi(A.get("xAxisIndex"),A.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),Zi(n)&&(r.set("x",n),e.firstCategoryDimIndex=0),Zi(i)&&(r.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(A,e,t,r){var n=A.getReferringComponents("singleAxis",Mt).models[0];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],t.set("single",n),Zi(n)&&(r.set("single",n),e.firstCategoryDimIndex=0)},polar:function(A,e,t,r){var n=A.getReferringComponents("polar",Mt).models[0],i=n.findAxisModel("radiusAxis"),a=n.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!a)throw new Error("angleAxis option not found");if(!i)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",a),Zi(i)&&(r.set("radius",i),e.firstCategoryDimIndex=0),Zi(a)&&(r.set("angle",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(A,e,t,r){e.coordSysDims=["lng","lat"]},parallel:function(A,e,t,r){var n=A.ecModel,i=n.getComponent("parallel",A.get("parallelIndex")),a=e.coordSysDims=i.dimensions.slice();b(i.parallelAxisIndex,function(o,s){var l=n.getComponent("parallelAxis",o),u=a[s];t.set(u,l),Zi(l)&&(r.set(u,l),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=s))})},matrix:function(A,e,t,r){var n=A.getReferringComponents("matrix",Mt).models[0];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("matrix coordinate system should be specified.");e.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),a=n.getDimensionModel("y");t.set("x",i),t.set("y",a),r.set("x",i),r.set("y",a)}};function Zi(A){return A.get("type")==="category"}function rD(A,e,t){t=t||{};var r=t.byIndex,n=t.stackedCoordDimension,i,a,o;nD(e)?i=e:(a=e.schema,i=a.dimensions,o=e.store);var s=!!(A&&A.get("stack")),l,u,f,c;if(b(i,function(B,m){le(B)&&(i[m]=B={name:B}),s&&!B.isExtraCoord&&(!r&&!l&&B.ordinalMeta&&(l=B),!u&&B.type!=="ordinal"&&B.type!=="time"&&(!n||n===B.coordDim)&&(u=B))}),u&&!r&&!l&&(r=!0),u){f="__\0ecstackresult_"+A.id,c="__\0ecstackedover_"+A.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,v=u.type,d=0;b(i,function(B){B.coordDim===h&&d++});var g={name:f,coordDim:h,coordDimIndex:d,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},p={name:c,coordDim:c,coordDimIndex:d+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};a?(o&&(g.storeDimIndex=o.ensureCalculationDimension(c,v),p.storeDimIndex=o.ensureCalculationDimension(f,v)),a.appendCalculationDimension(g),a.appendCalculationDimension(p)):(i.push(g),i.push(p))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:c,stackResultDimension:f}}function nD(A){return!ew(A.schema)}function Ji(A,e){return!!e&&e===A.getCalculationInfo("stackedDimension")}function iD(A,e){return Ji(A,e)?A.getCalculationInfo("stackResultDimension"):e}function aD(A,e){var t=A.get("coordinateSystem"),r=Nh.get(t),n;return e&&e.coordSysDims&&(n=Be(e.coordSysDims,function(i){var a={name:i},o=e.axisMap.get(i);if(o){var s=o.get("type");a.type=kT(s)}return a})),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}function oD(A,e,t){var r,n;return t&&b(A,function(i,a){var o=i.coordDim,s=t.categoryAxisMap.get(o);s&&(r==null&&(r=a),i.ordinalMeta=s.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&r!=null&&(A[r].otherDims.itemName=0),r}function Iv(A,e,t){t=t||{};var r=e.getSourceManager(),n,i=!1;n=r.getSource(),i=n.sourceFormat===qt;var a=tD(e),o=aD(e,a),s=t.useEncodeDefaulter,l=me(s)?s:s?nt(JS,o,e):null,u={coordDimensions:o,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!i},f=JT(n,u),c=oD(f.dimensions,t.createInvertedIndices,a),h=i?null:r.getSharedDataStore(f),v=rD(e,{schema:f,store:h}),d=new ZT(f,e);d.setCalculationInfo(v);var g=c!=null&&sD(n)?function(p,B,m,y){return y===c?m:this.defaultDimValueGetter(p,B,m,y)}:null;return d.hasItemOption=!1,d.initData(i?n:h,null,g),d}function sD(A){if(A.sourceFormat===qt){var e=lD(A.data||[]);return!ae(Ia(e))}}function lD(A){for(var e=0;e<A.length&&A[e]==null;)e++;return A[e]}function uD(A){var e=Math.pow(10,Ts(Math.abs(A))),t=Math.abs(A/e);return t===0||t===1||t===2||t===3||t===5}function Tv(A){return A.type==="interval"||A.type==="log"}function fD(A,e,t,r,n){var i={},a=i.interval=kg(e/t);r!=null&&a<r&&(a=i.interval=r),n!=null&&a>n&&(a=i.interval=n);var o=i.intervalPrecision=ho(a),s=i.niceTickExtent=[wt(Math.ceil(A[0]/a)*a,o),wt(Math.floor(A[1]/a)*a,o)];return cD(s,A),i}function Dv(A){var e=Math.pow(10,Ts(A)),t=A/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,wt(t*e)}function ho(A){return ar(A)+2}function aw(A,e,t){A[e]=Math.max(Math.min(A[e],t[1]),t[0])}function cD(A,e){!isFinite(A[0])&&(A[0]=e[0]),!isFinite(A[1])&&(A[1]=e[1]),aw(A,0,e),aw(A,1,e),A[0]>A[1]&&(A[0]=A[1])}function Lv(A,e){return A>=e[0]&&A<=e[1]}var hD=(function(){function A(){this.normalize=ow,this.scale=sw}return A.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ye(e.normalize,e),this.scale=ye(e.scale,e)):(this.normalize=ow,this.scale=sw)},A})();function ow(A,e){return e[1]===e[0]?.5:(A-e[0])/(e[1]-e[0])}function sw(A,e){return A*(e[1]-e[0])+e[0]}function Mv(A,e,t){var r=Math.log(A);return[Math.log(t?e[0]:Math.max(0,e[0]))/r,Math.log(t?e[1]:Math.max(0,e[1]))/r]}var Nr=(function(){function A(e){this._calculator=new hD,this._setting=e||{},this._extent=[1/0,-1/0]}return A.prototype.getSetting=function(e){return this._setting[e]},A.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},A.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},A.prototype.getExtent=function(){return this._extent.slice()},A.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},A.prototype._innerSetExtent=function(e,t){var r=this._extent;isNaN(e)||(r[0]=e),isNaN(t)||(r[1]=t),this._brkCtx&&this._brkCtx.update(r)},A.prototype.setBreaksFromOption=function(e){},A.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},A.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},A.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},A.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},A.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},A.prototype.isBlank=function(){return this._isBlank},A.prototype.setBlank=function(e){this._isBlank=e},A})();Hs(Nr);var vD=0,Hv=(function(){function A(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++vD,this._onCollect=e.onCollect}return A.createByAxisModel=function(e){var t=e.option,r=t.data,n=r&&Be(r,dD);return new A({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},A.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},A.prototype.parseAndCollect=function(e){var t,r=this._needCollect;if(!le(e)&&!r)return e;if(r&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(r?(t=this.categories.length,this.categories[t]=e,n.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},A.prototype._getOrCreateMap=function(){return this._map||(this._map=we(this.categories))},A})();function dD(A){return he(A)&&A.value!=null?A.value:A+""}var lw=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;r.type="ordinal";var n=r.getSetting("ordinalMeta");return n||(n=new Hv({})),ae(n)&&(n=new Hv({categories:Be(n,function(i){return he(i)?i.value:i})})),r._ordinalMeta=n,r._extent=r.getSetting("extent")||[0,n.categories.length-1],r}return e.prototype.parse=function(t){return t==null?NaN:le(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Lv(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],r=this._extent,n=r[0];n<=r[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var r=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],a=0,o=this._ordinalMeta.categories.length,s=Math.min(o,r.length);a<s;++a){var l=r[a];n[a]=l,i[l]=a}for(var u=0;a<o;++a){for(;i[u]!=null;)u++;n.push(u),i[u]=a}},e.prototype._getTickNumber=function(t){var r=this._ticksByOrdinalNumber;return r&&t>=0&&t<r.length?r[t]:t},e.prototype.getRawOrdinalNumber=function(t){var r=this._ordinalNumbersByTick;return r&&t>=0&&t<r.length?r[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var r=this.getRawOrdinalNumber(t.value),n=this._ordinalMeta.categories[r];return n==null?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(Nr);Nr.registerClass(lw);var Pr=wt,qi=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return Lv(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ho(t)},e.prototype.getTicks=function(t){t=t||{};var r=this._interval,n=this._extent,i=this._niceExtent,a=this._intervalPrecision,o=Cl(),s=[];if(!r)return s;t.breakTicks;var l=1e4;n[0]<i[0]&&(t.expandToNicedExtent?s.push({value:Pr(i[0]-r,a)}):s.push({value:n[0]}));for(var u=function(v,d){return Math.round((d-v)/r)},f=i[0];f<=i[1];){if(s.push({value:f}),f=Pr(f+r,a),this._brkCtx){var c=this._brkCtx.calcNiceTickMultiple(f,u);c>=0&&(f=Pr(f+c*r,a))}if(s.length>0&&f===s[s.length-1].value)break;if(s.length>l)return[]}var h=s.length?s[s.length-1].value:i[1];return n[1]>h&&(t.expandToNicedExtent?s.push({value:Pr(h+r,a)}):s.push({value:n[1]})),t.breakTicks,s},e.prototype.getMinorTicks=function(t){for(var r=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),a=1;a<r.length;a++){var o=r[a],s=r[a-1];if(!(s.break||o.break)){for(var l=0,u=[],f=o.value-s.value,c=f/t,h=ho(c);l<t-1;){var v=Pr(s.value+(l+1)*c,h);v>i[0]&&v<i[1]&&u.push(v),l++}var d=Cl();d&&d.pruneTicksByBreak("auto",u,this._getNonTransBreaks(),function(g){return g},this._interval,i),n.push(u)}}return n},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,r){if(t==null)return"";var n=r&&r.precision;n==null?n=ar(t.value)||0:n==="auto"&&(n=this._intervalPrecision);var i=Pr(t.value,n,!0);return GB(i)},e.prototype.calcNiceTicks=function(t,r,n){t=t||5;var i=this._extent.slice(),a=this._getExtentSpanWithBreaks();if(isFinite(a)){a<0&&(a=-a,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var o=fD(i,a,t,r,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var r=this._extent.slice();if(r[0]===r[1])if(r[0]!==0){var n=Math.abs(r[0]);t.fixMax||(r[1]+=n/2),r[0]-=n/2}else r[1]=1;var i=r[1]-r[0];isFinite(i)||(r[0]=0,r[1]=1),this._innerSetExtent(r[0],r[1]),r=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval,o=this._intervalPrecision;t.fixMin||(r[0]=Pr(Math.floor(r[0]/a)*a,o)),t.fixMax||(r[1]=Pr(Math.ceil(r[1]/a)*a,o)),this._innerSetExtent(r[0],r[1])},e.prototype.setNiceExtent=function(t,r){this._niceExtent=[t,r]},e.type="interval",e})(Nr);Nr.registerClass(qi);var uw=typeof Float32Array<"u",pD=uw?Float32Array:Array;function vr(A){return ae(A)?uw?new Float32Array(A):A:new pD(A)}var gD="__ec_stack_";function fw(A){return A.get("stack")||gD+A.seriesIndex}function Ov(A){return A.dim+A.index}function cw(A,e){var t=[];return e.eachSeriesByType(A,function(r){vw(r)&&t.push(r)}),t}function BD(A){var e={};b(A,function(s){var l=s.coordinateSystem,u=l.getBaseAxis();if(!(u.type!=="time"&&u.type!=="value"))for(var f=s.getData(),c=u.dim+"_"+u.index,h=f.getDimensionIndex(f.mapDimension(u.dim)),v=f.getStore(),d=0,g=v.count();d<g;++d){var p=v.get(h,d);e[c]?e[c].push(p):e[c]=[p]}});var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(n){n.sort(function(s,l){return s-l});for(var i=null,a=1;a<n.length;++a){var o=n[a]-n[a-1];o>0&&(i=i===null?o:Math.min(i,o))}t[r]=i}}return t}function hw(A){var e=BD(A),t=[];return b(A,function(r){var n=r.coordinateSystem,i=n.getBaseAxis(),a=i.getExtent(),o;if(i.type==="category")o=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var s=i.dim+"_"+i.index,l=e[s],u=Math.abs(a[1]-a[0]),f=i.scale.getExtent(),c=Math.abs(f[1]-f[0]);o=l?u/c*l:u}else{var h=r.getData();o=Math.abs(a[1]-a[0])/h.count()}var v=ht(r.get("barWidth"),o),d=ht(r.get("barMaxWidth"),o),g=ht(r.get("barMinWidth")||(dw(r)?.5:1),o),p=r.get("barGap"),B=r.get("barCategoryGap"),m=r.get("defaultBarGap");t.push({bandWidth:o,barWidth:v,barMaxWidth:d,barMinWidth:g,barGap:p,barCategoryGap:B,defaultBarGap:m,axisKey:Ov(i),stackId:fw(r)})}),mD(t)}function mD(A){var e={};b(A,function(r,n){var i=r.axisKey,a=r.bandWidth,o=e[i]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:null,gap:r.defaultBarGap||0,stacks:{}},s=o.stacks;e[i]=o;var l=r.stackId;s[l]||o.autoWidthCount++,s[l]=s[l]||{width:0,maxWidth:0};var u=r.barWidth;u&&!s[l].width&&(s[l].width=u,u=Math.min(o.remainedWidth,u),o.remainedWidth-=u);var f=r.barMaxWidth;f&&(s[l].maxWidth=f);var c=r.barMinWidth;c&&(s[l].minWidth=c);var h=r.barGap;h!=null&&(o.gap=h);var v=r.barCategoryGap;v!=null&&(o.categoryGap=v)});var t={};return b(e,function(r,n){t[n]={};var i=r.stacks,a=r.bandWidth,o=r.categoryGap;if(o==null){var s=Xe(i).length;o=Math.max(35-s*4,15)+"%"}var l=ht(o,a),u=ht(r.gap,1),f=r.remainedWidth,c=r.autoWidthCount,h=(f-l)/(c+(c-1)*u);h=Math.max(h,0),b(i,function(p){var B=p.maxWidth,m=p.minWidth;if(p.width){var y=p.width;B&&(y=Math.min(y,B)),m&&(y=Math.max(y,m)),p.width=y,f-=y+u*y,c--}else{var y=h;B&&B<y&&(y=Math.min(B,f)),m&&m>y&&(y=m),y!==h&&(p.width=y,f-=y+u*y,c--)}}),h=(f-l)/(c+(c-1)*u),h=Math.max(h,0);var v=0,d;b(i,function(p,B){p.width||(p.width=h),d=p,v+=p.width*(1+u)}),d&&(v-=d.width*u);var g=-v/2;b(i,function(p,B){t[n][B]=t[n][B]||{bandWidth:a,offset:g,width:p.width},g+=p.width*(1+u)})}),t}function yD(A,e,t){if(A&&e){var r=A[Ov(e)];return r}}function wD(A,e){var t=cw(A,e),r=hw(t);b(t,function(n){var i=n.getData(),a=n.coordinateSystem,o=a.getBaseAxis(),s=fw(n),l=r[Ov(o)][s],u=l.offset,f=l.width;i.setLayout({bandWidth:l.bandWidth,offset:u,size:f})})}function CD(A){return{seriesType:A,plan:iv(),reset:function(e){if(vw(e)){var t=e.getData(),r=e.coordinateSystem,n=r.getBaseAxis(),i=r.getOtherAxis(n),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(n.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),f=Ji(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),c=i.isHorizontal(),h=_D(n,i),v=dw(e),d=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),p=t.getLayout("size"),B=t.getLayout("offset");return{progress:function(m,y){for(var _=m.count,C=v&&vr(_*3),Q=v&&s&&vr(_*3),x=v&&vr(_),F=r.master.getRect(),S=c?F.width:F.height,E,I=y.getStore(),U=0;(E=m.next())!=null;){var T=I.get(f?g:a,E),L=I.get(o,E),P=h,Z=void 0;f&&(Z=+T-I.get(a,E));var V=void 0,X=void 0,ee=void 0,te=void 0;if(c){var D=r.dataToPoint([T,L]);if(f){var M=r.dataToPoint([Z,L]);P=M[0]}V=P,X=D[1]+B,ee=D[0]-P,te=p,Math.abs(ee)<d&&(ee=(ee<0?-1:1)*d)}else{var D=r.dataToPoint([L,T]);if(f){var M=r.dataToPoint([L,Z]);P=M[1]}V=D[0]+B,X=P,ee=p,te=D[1]-P,Math.abs(te)<d&&(te=(te<=0?-1:1)*d)}v?(C[U]=V,C[U+1]=X,C[U+2]=c?ee:te,Q&&(Q[U]=c?F.x:V,Q[U+1]=c?X:F.y,Q[U+2]=S),x[E]=E):y.setItemLayout(E,{x:V,y:X,width:ee,height:te}),U+=3}v&&y.setLayout({largePoints:C,largeDataIndices:x,largeBackgroundPoints:Q,valueAxisHorizontal:c})}}}}}}function vw(A){return A.coordinateSystem&&A.coordinateSystem.type==="cartesian2d"}function dw(A){return A.pipelineContext&&A.pipelineContext.large}function _D(A,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var QD=function(A,e,t,r){for(;t<r;){var n=t+r>>>1;A[n][1]<e?t=n+1:r=n}return t},pw=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="time",r}return e.prototype.getLabel=function(t){var r=this.getSetting("useUTC");return xl(t.value,HB[DS(Ya(this._minLevelUnit))]||HB.second,r,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,r,n){var i=this.getSetting("useUTC"),a=this.getSetting("locale");return LS(t,r,n,a,i)},e.prototype.getTicks=function(t){var r=this._interval,n=this._extent,i=[];if(!r)return i;var a=this.getSetting("useUTC"),o=Fl(n[1],a);i.push({value:n[0],time:{level:0,upperTimeUnit:o,lowerTimeUnit:o}});var s=TD(this._minLevelUnit,this._approxInterval,a,n,this._getExtentSpanWithBreaks(),this._brkCtx);i=i.concat(s);var l=Fl(n[1],a);i.push({value:n[1],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}}),this.getSetting("useUTC");var u=Tn.length-1,f=0;return b(i,function(c){u=Math.min(u,Te(Tn,c.time.upperTimeUnit)),f=Math.max(f,c.time.level)}),i},e.prototype.calcNiceExtent=function(t){var r=this.getExtent();if(r[0]===r[1]&&(r[0]-=uA,r[1]+=uA),r[1]===-1/0&&r[0]===1/0){var n=new Date;r[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),r[0]=r[1]-uA}this._innerSetExtent(r[0],r[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,r,n){t=t||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/t,r!=null&&this._approxInterval<r&&(this._approxInterval=r),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var a=au.length,o=Math.min(QD(au,this._approxInterval,0,a),a-1);this._interval=au[o][1],this._intervalPrecision=ho(this._interval),this._minLevelUnit=au[Math.max(o-1,0)][0]},e.prototype.parse=function(t){return Ye(t)?t:+Qi(t)},e.prototype.contain=function(t){return Lv(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(qi),au=[["second",Eh],["minute",bh],["hour",Wa],["quarter-day",Wa*6],["half-day",Wa*12],["day",uA*1.2],["half-week",uA*3.5],["week",uA*7],["month",uA*31],["quarter",uA*95],["half-year",MB/2],["year",MB]];function xD(A,e,t,r){return Sh(new Date(e),A,r).getTime()===Sh(new Date(t),A,r).getTime()}function FD(A,e){return A/=uA,A>16?16:A>7.5?7:A>3.5?4:A>1.5?2:1}function ED(A){var e=30*uA;return A/=e,A>6?6:A>3?3:A>2?2:1}function bD(A){return A/=Wa,A>12?12:A>6?6:A>3.5?4:A>2?2:1}function gw(A,e){return A/=e?bh:Eh,A>30?30:A>20?20:A>15?15:A>10?10:A>5?5:A>2?2:1}function SD(A){return kg(A)}function UD(A,e,t){var r=Math.max(0,Te(Tn,e)-1);return Sh(new Date(A),Tn[r],t).getTime()}function ID(A,e){var t=new Date(0);t[A](1);var r=t.getTime();t[A](1+e);var n=t.getTime()-r;return function(i,a){return Math.max(0,Math.round((a-i)/n))}}function TD(A,e,t,r,n,i){var a=1e4,o=SS,s=0;function l(U,T,L,P,Z,V,X){for(var ee=ID(Z,U),te=T,D=new Date(te);te<L&&te<=r[1];){if(X.push({value:te}),s++>a){process.env.NODE_ENV!=="production"&&xt("Exceed safe limit in time scale.");break}if(D[Z](D[P]()+U),te=D.getTime(),i){var M=i.calcNiceTickMultiple(te,ee);M>0&&(D[Z](D[P]()+M*U),te=D.getTime())}}X.push({value:te,notAdd:!0})}function u(U,T,L){var P=[],Z=!T.length;if(!xD(Ya(U),r[0],r[1],t)){Z&&(T=[{value:UD(r[0],U,t)},{value:r[1]}]);for(var V=0;V<T.length-1;V++){var X=T[V].value,ee=T[V+1].value;if(X!==ee){var te=void 0,D=void 0,M=void 0,H=!1;switch(U){case"year":te=Math.max(1,Math.round(e/uA/365)),D=OB(t),M=MS(t);break;case"half-year":case"quarter":case"month":te=ED(e),D=Uh(t),M=RB(t);break;case"week":case"half-week":case"day":te=FD(e),D=Ih(t),M=NB(t),H=!0;break;case"half-day":case"quarter-day":case"hour":te=bD(e),D=Th(t),M=PB(t);break;case"minute":te=gw(e,!0),D=Dh(t),M=kB(t);break;case"second":te=gw(e,!1),D=Lh(t),M=VB(t);break;case"millisecond":te=SD(e),D=Mh(t),M=KB(t);break}ee>=r[0]&&X<=r[1]&&l(te,X,ee,D,M,H,P),U==="year"&&L.length>1&&V===0&&L.unshift({value:L[0].value-te})}}for(var V=0;V<P.length;V++)L.push(P[V])}}for(var f=[],c=[],h=0,v=0,d=0;d<o.length;++d){var g=Ya(o[d]);if(TS(o[d])){u(o[d],f[f.length-1]||[],c);var p=o[d+1]?Ya(o[d+1]):null;if(g!==p){if(c.length){v=h,c.sort(function(U,T){return U.value-T.value});for(var B=[],m=0;m<c.length;++m){var y=c[m].value;(m===0||c[m-1].value!==y)&&(B.push(c[m]),y>=r[0]&&y<=r[1]&&h++)}var _=n/e;if(h>_*1.5&&v>_/1.5||(f.push(B),h>_||A===o[d]))break}c=[]}}}for(var C=rt(Be(f,function(U){return rt(U,function(T){return T.value>=r[0]&&T.value<=r[1]&&!T.notAdd})}),function(U){return U.length>0}),Q=[],x=C.length-1,d=0;d<C.length;++d)for(var F=C[d],S=0;S<F.length;++S){var E=Fl(F[S].value,t);Q.push({value:F[S].value,time:{level:x-d,upperTimeUnit:E,lowerTimeUnit:E}})}Q.sort(function(U,T){return U.value-T.value});for(var I=[],d=0;d<Q.length;++d)(d===0||Q[d].value!==Q[d-1].value)&&I.push(Q[d]);return I}Nr.registerClass(pw);var Rv=wt,DD=Math.floor,LD=Math.ceil,ou=Math.pow,su=Math.log,Bw=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new qi,t}return e.prototype.getTicks=function(t){t=t||{};var r=this._extent.slice(),n=this._originalScale.getExtent(),i=A.prototype.getTicks.call(this,t),a=this.base;return this._originalScale._innerGetBreaks(),Be(i,function(o){var s=o.value,l=null,u=ou(a,s);s===r[0]&&this._fixMin?l=n[0]:s===r[1]&&this._fixMax&&(l=n[1]);var f;return l!=null&&(u=Nv(u,l)),{value:u,break:f}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(t,r){this._originalScale.setExtent(t,r);var n=Mv(this.base,[t,r]);A.prototype.setExtent.call(this,n[0],n[1])},e.prototype.getExtent=function(){var t=this.base,r=A.prototype.getExtent.call(this);r[0]=ou(t,r[0]),r[1]=ou(t,r[1]);var n=this._originalScale.getExtent();return this._fixMin&&(r[0]=Nv(r[0],n[0])),this._fixMax&&(r[1]=Nv(r[1],n[1])),r},e.prototype.unionExtentFromData=function(t,r){this._originalScale.unionExtentFromData(t,r);var n=Mv(this.base,t.getApproximateExtent(r),!0);this._innerUnionExtent(n)},e.prototype.calcNiceTicks=function(t){t=t||10;var r=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(!(!isFinite(n)||n<=0)){var i=TF(n),a=t/n*i;for(a<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[Rv(LD(r[0]/i)*i),Rv(DD(r[1]/i)*i)];this._interval=i,this._intervalPrecision=ho(i),this._niceExtent=o}},e.prototype.calcNiceExtent=function(t){A.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=su(t)/su(this.base),A.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=su(t)/su(this.base),A.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=A.prototype.scale.call(this,t),ou(this.base,t)},e.prototype.setBreaksFromOption=function(t){},e.type="log",e})(qi);function Nv(A,e){return Rv(A,ar(e))}Nr.registerClass(Bw);var MD=(function(){function A(e,t,r){this._prepareParams(e,t,r)}return A.prototype._prepareParams=function(e,t,r){r[1]<r[0]&&(r=[NaN,NaN]),this._dataMin=r[0],this._dataMax=r[1];var n=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get("min",!0);i==null&&(i=t.get("startValue",!0));var a=this._modelMinRaw=i;me(a)?this._modelMinNum=lu(e,a({min:r[0],max:r[1]})):a!=="dataMin"&&(this._modelMinNum=lu(e,a));var o=this._modelMaxRaw=t.get("max",!0);if(me(o)?this._modelMaxNum=lu(e,o({min:r[0],max:r[1]})):o!=="dataMax"&&(this._modelMaxNum=lu(e,o)),n)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=ae(s)?s:[s||0,s||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Fr(l[0],1),Fr(l[1],1)]}},A.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,r=this._dataMax,n=this._axisDataLen,i=this._boundaryGapInner,a=e?null:r-t||Math.abs(t),o=this._modelMinRaw==="dataMin"?t:this._modelMinNum,s=this._modelMaxRaw==="dataMax"?r:this._modelMaxNum,l=o!=null,u=s!=null;o==null&&(o=e?n?0:NaN:t-i[0]*a),s==null&&(s=e?n?n-1:NaN:r+i[1]*a),(o==null||!isFinite(o))&&(o=NaN),(s==null||!isFinite(s))&&(s=NaN);var f=ai(o)||ai(s)||e&&!n;this._needCrossZero&&(o>0&&s>0&&!l&&(o=0),o<0&&s<0&&!u&&(s=0));var c=this._determinedMin,h=this._determinedMax;return c!=null&&(o=c,l=!0),h!=null&&(s=h,u=!0),{min:o,max:s,minFixed:l,maxFixed:u,isBlank:f}},A.prototype.modifyDataMinMax=function(e,t){process.env.NODE_ENV!=="production"&&fe(!this.frozen),this[OD[e]]=t},A.prototype.setDeterminedMinMax=function(e,t){var r=HD[e];process.env.NODE_ENV!=="production"&&fe(!this.frozen&&this[r]==null),this[r]=t},A.prototype.freeze=function(){this.frozen=!0},A})(),HD={min:"_determinedMin",max:"_determinedMax"},OD={min:"_dataMin",max:"_dataMax"};function mw(A,e,t){var r=A.rawExtentInfo;return r||(r=new MD(A,e,t),A.rawExtentInfo=r,r)}function lu(A,e){return e==null?null:ai(e)?NaN:A.parse(e)}function yw(A,e){var t=A.type,r=mw(A,e,A.getExtent()).calculate();A.setBlank(r.isBlank);var n=r.min,i=r.max,a=e.ecModel;if(a&&t==="time"){var o=cw("bar",a),s=!1;if(b(o,function(f){s=s||f.getBaseAxis()===e.axis}),s){var l=hw(o),u=RD(n,i,e,l);n=u.min,i=u.max}}return{extent:[n,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function RD(A,e,t,r){var n=t.axis.getExtent(),i=Math.abs(n[1]-n[0]),a=yD(r,t.axis);if(a===void 0)return{min:A,max:e};var o=1/0;b(a,function(h){o=Math.min(h.offset,o)});var s=-1/0;b(a,function(h){s=Math.max(h.offset+h.width,s)}),o=Math.abs(o),s=Math.abs(s);var l=o+s,u=e-A,f=1-(o+s)/i,c=u/f-u;return e+=c*(s/l),A-=c*(o/l),{min:A,max:e}}function ww(A,e){var t=e,r=yw(A,t),n=r.extent,i=t.get("splitNumber");A instanceof Bw&&(A.base=t.get("logBase"));var a=A.type,o=t.get("interval"),s=a==="interval"||a==="time";A.setBreaksFromOption(Qw(t)),A.setExtent(n[0],n[1]),A.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:s?t.get("minInterval"):null,maxInterval:s?t.get("maxInterval"):null}),o!=null&&A.setInterval&&A.setInterval(o)}function ND(A,e){if(e=e||A.get("type"),e)switch(e){case"category":return new lw({ordinalMeta:A.getOrdinalMeta?A.getOrdinalMeta():A.getCategories(),extent:[1/0,-1/0]});case"time":return new pw({locale:A.ecModel.getLocaleModel(),useUTC:A.ecModel.get("useUTC")});default:return new(Nr.getClass(e)||qi)}}function PD(A){var e=A.scale.getExtent(),t=e[0],r=e[1];return!(t>0&&r>0||t<0&&r<0)}function vo(A){var e=A.getLabelModel().get("formatter");if(A.type==="time"){var t=US(e);return function(n,i){return A.scale.getFormattedLabel(n,i,t)}}else{if(le(e))return function(n){var i=A.scale.getLabel(n),a=e.replace("{value}",i??"");return a};if(me(e)){if(A.type==="category")return function(n,i){return e(uu(A,n),n.value-A.scale.getExtent()[0],null)};var r=Cl();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),e(uu(A,n),i,a)}}else return function(n){return A.scale.getLabel(n)}}}function uu(A,e){return A.type==="category"?A.scale.getLabel(e):e.value}function Pv(A){var e=A.get("interval");return e??"auto"}function Cw(A){return A.type==="category"&&Pv(A.getLabelModel())===0}function _w(A,e){var t={};return b(A.mapDimensionsAll(e),function(r){t[iD(A,r)]=!0}),Xe(t)}function kD(A,e,t){e&&b(_w(e,t),function(r){var n=e.getApproximateExtent(r);n[0]<A[0]&&(A[0]=n[0]),n[1]>A[1]&&(A[1]=n[1])})}function $i(A){return A==="middle"||A==="center"}function po(A){return A.getShallow("show")}function Qw(A){var e=A.get("breaks",!0);if(e!=null){process.env.NODE_ENV!=="production"&&Ge('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}}var VD=(function(){function A(){}return A.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},A.prototype.getCoordSysModel=function(){},A})(),xw=[],KD={registerPreprocessor:Xy,registerProcessor:Zy,registerPostInit:TT,registerPostUpdate:DT,registerUpdateLifecycle:xv,registerAction:Kn,registerCoordinateSystem:LT,registerLayout:MT,registerVisual:Gn,registerTransform:OT,registerLoading:qy,registerMap:HT,registerImpl:cT,PRIORITY:xT,ComponentModel:Re,ComponentView:xA,SeriesModel:JA,ChartView:FA,registerComponentModel:function(A){Re.registerClass(A)},registerComponentView:function(A){xA.registerClass(A)},registerSeriesModel:function(A){JA.registerClass(A)},registerChartView:function(A){FA.registerClass(A)},registerCustomSeries:function(A,e){},registerSubTypeDefaulter:function(A,e){Re.registerSubTypeDefaulter(A,e)},registerPainter:function(A,e){EF(A,e)}};function qA(A){if(ae(A)){b(A,function(e){qA(e)});return}Te(xw,A)>=0||(xw.push(A),me(A)&&(A={install:A}),A.install(KD))}var GD=ze(),go=ze(),bA={estimate:1,determine:2};function fu(A){return{out:{noPxChangeTryDetermine:[]},kind:A}}function Fw(A,e){var t=Be(e,function(r){return A.scale.parse(r)});return A.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function zD(A,e){var t=A.getLabelModel().get("customValues");if(t){var r=vo(A),n=A.scale.getExtent(),i=Fw(A,t),a=rt(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:Be(a,function(o){var s={value:o};return{formattedLabel:r(s),rawLabel:A.scale.getLabel(s),tickValue:o,time:void 0,break:void 0}})}}return A.type==="category"?YD(A,e):ZD(A)}function WD(A,e,t){var r=A.getTickModel().get("customValues");if(r){var n=A.scale.getExtent(),i=Fw(A,r);return{ticks:rt(i,function(a){return a>=n[0]&&a<=n[1]})}}return A.type==="category"?XD(A,e):{ticks:Be(A.scale.getTicks(t),function(a){return a.value})}}function YD(A,e){var t=A.getLabelModel(),r=Ew(A,t,e);return!t.get("show")||A.scale.isBlank()?{labels:[]}:r}function Ew(A,e,t){var r=qD(A),n=Pv(e),i=t.kind===bA.estimate;if(!i){var a=Sw(r,n);if(a)return a}var o,s;me(n)?o=Tw(A,n):(s=n==="auto"?$D(A,t):n,o=Iw(A,s));var l={labels:o,labelCategoryInterval:s};return i?t.out.noPxChangeTryDetermine.push(function(){return kv(r,n,l),!0}):kv(r,n,l),l}function XD(A,e){var t=JD(A),r=Pv(e),n=Sw(t,r);if(n)return n;var i,a;if((!e.get("show")||A.scale.isBlank())&&(i=[]),me(r))i=Tw(A,r,!0);else if(r==="auto"){var o=Ew(A,A.getLabelModel(),fu(bA.determine));a=o.labelCategoryInterval,i=Be(o.labels,function(s){return s.tickValue})}else a=r,i=Iw(A,a,!0);return kv(t,r,{ticks:i,tickCategoryInterval:a})}function ZD(A){var e=A.scale.getTicks(),t=vo(A);return{labels:Be(e,function(r,n){return{formattedLabel:t(r,n),rawLabel:A.scale.getLabel(r),tickValue:r.value,time:r.time,break:r.break}})}}var JD=bw("axisTick"),qD=bw("axisLabel");function bw(A){return function(t){return go(t)[A]||(go(t)[A]={list:[]})}}function Sw(A,e){for(var t=0;t<A.list.length;t++)if(A.list[t].key===e)return A.list[t].value}function kv(A,e,t){return A.list.push({key:e,value:t}),t}function $D(A,e){if(e.kind===bA.estimate){var t=A.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return go(A).autoInterval=t,!0}),t}var r=go(A).autoInterval;return r??(go(A).autoInterval=A.calculateCategoryInterval(e))}function jD(A,e){var t=e.kind,r=tL(A),n=vo(A),i=(r.axisRotate-r.labelRotate)/180*Math.PI,a=A.scale,o=a.getExtent(),s=a.count();if(o[1]-o[0]<1)return 0;var l=1,u=40;s>u&&(l=Math.max(1,Math.floor(s/u)));for(var f=o[0],c=A.dataToCoord(f+1)-A.dataToCoord(f),h=Math.abs(c*Math.cos(i)),v=Math.abs(c*Math.sin(i)),d=0,g=0;f<=o[1];f+=l){var p=0,B=0,m=Dg(n({value:f}),r.font,"center","top");p=m.width*1.3,B=m.height*1.3,d=Math.max(d,p,7),g=Math.max(g,B,7)}var y=d/h,_=g/v;isNaN(y)&&(y=1/0),isNaN(_)&&(_=1/0);var C=Math.max(0,Math.floor(Math.min(y,_)));if(t===bA.estimate)return e.out.noPxChangeTryDetermine.push(ye(eL,null,A,C,s)),C;var Q=Uw(A,C,s);return Q??C}function eL(A,e,t){return Uw(A,e,t)==null}function Uw(A,e,t){var r=GD(A.model),n=A.getExtent(),i=r.lastAutoInterval,a=r.lastTickCount;if(i!=null&&a!=null&&Math.abs(i-e)<=1&&Math.abs(a-t)<=1&&i>e&&r.axisExtent0===n[0]&&r.axisExtent1===n[1])return i;r.lastTickCount=t,r.lastAutoInterval=e,r.axisExtent0=n[0],r.axisExtent1=n[1]}function tL(A){var e=A.getLabelModel();return{axisRotate:A.getRotate?A.getRotate():A.isHorizontal&&!A.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Iw(A,e,t){var r=vo(A),n=A.scale,i=n.getExtent(),a=A.getLabelModel(),o=[],s=Math.max((e||0)+1,1),l=i[0],u=n.count();l!==0&&s>1&&u/s>2&&(l=Math.round(Math.ceil(l/s)*s));var f=Cw(A),c=a.get("showMinLabel")||f,h=a.get("showMaxLabel")||f;c&&l!==i[0]&&d(i[0]);for(var v=l;v<=i[1];v+=s)d(v);h&&v-s!==i[1]&&d(i[1]);function d(g){var p={value:g};o.push(t?g:{formattedLabel:r(p),rawLabel:n.getLabel(p),tickValue:g,time:void 0,break:void 0})}return o}function Tw(A,e,t){var r=A.scale,n=vo(A),i=[];return b(r.getTicks(),function(a){var o=r.getLabel(a),s=a.value;e(a.value,o)&&i.push(t?s:{formattedLabel:n(a),rawLabel:o,tickValue:s,time:void 0,break:void 0})}),i}var Dw=[0,1],AL=(function(){function A(e,t,r){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=r||[0,0]}return A.prototype.contain=function(e){var t=this._extent,r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=r&&e<=n},A.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},A.prototype.getExtent=function(){return this._extent.slice()},A.prototype.getPixelPrecision=function(e){return Ng(e||this.scale.getExtent(),this._extent)},A.prototype.setExtent=function(e,t){var r=this._extent;r[0]=e,r[1]=t},A.prototype.dataToCoord=function(e,t){var r=this._extent,n=this.scale;return e=n.normalize(n.parse(e)),this.onBand&&n.type==="ordinal"&&(r=r.slice(),Lw(r,n.count())),dt(e,Dw,r,t)},A.prototype.coordToData=function(e,t){var r=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(r=r.slice(),Lw(r,n.count()));var i=dt(e,r,Dw,t);return this.scale.scale(i)},A.prototype.pointToData=function(e,t){},A.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),r=WD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),n=r.ticks,i=Be(n,function(o){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(o):o),tickValue:o}},this),a=t.get("alignWithLabel");return rL(this,i,a,e.clamp),i},A.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var r=this.scale.getMinorTicks(t),n=Be(r,function(i){return Be(i,function(a){return{coord:this.dataToCoord(a),tickValue:a}},this)},this);return n},A.prototype.getViewLabels=function(e){return e=e||fu(bA.determine),zD(this,e).labels},A.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},A.prototype.getTickModel=function(){return this.model.getModel("axisTick")},A.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),r=t[1]-t[0]+(this.onBand?1:0);r===0&&(r=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/r},A.prototype.calculateCategoryInterval=function(e){return e=e||fu(bA.determine),jD(this,e)},A})();function Lw(A,e){var t=A[1]-A[0],r=e,n=t/r/2;A[0]+=n,A[1]-=n}function rL(A,e,t,r){var n=e.length;if(!A.onBand||t||!n)return;var i=A.getExtent(),a,o;if(n===1)e[0].coord=i[0],e[0].onBand=!0,a=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var s=e[n-1].tickValue-e[0].tickValue,l=(e[n-1].coord-e[0].coord)/s;b(e,function(h){h.coord-=l/2,h.onBand=!0});var u=A.scale.getExtent();o=1+u[1]-e[n-1].tickValue,a={coord:e[n-1].coord+l*o,tickValue:u[1]+1,onBand:!0},e.push(a)}var f=i[0]>i[1];c(e[0].coord,i[0])&&(r?e[0].coord=i[0]:e.shift()),r&&c(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),c(i[1],a.coord)&&(r?a.coord=i[1]:e.pop()),r&&c(a.coord,i[1])&&e.push({coord:i[1],onBand:!0});function c(h,v){return h=wt(h),v=wt(v),f?h>v:h<v}}var Bo=Math.PI*2,zn=Sr.CMD,nL=["top","right","bottom","left"];function iL(A,e,t,r,n){var i=t.width,a=t.height;switch(A){case"top":r.set(t.x+i/2,t.y-e),n.set(0,-1);break;case"bottom":r.set(t.x+i/2,t.y+a+e),n.set(0,1);break;case"left":r.set(t.x-e,t.y+a/2),n.set(-1,0);break;case"right":r.set(t.x+i+e,t.y+a/2),n.set(1,0);break}}function aL(A,e,t,r,n,i,a,o,s){a-=A,o-=e;var l=Math.sqrt(a*a+o*o);a/=l,o/=l;var u=a*t+A,f=o*t+e;if(Math.abs(r-n)%Bo<1e-4)return s[0]=u,s[1]=f,l-t;if(i){var c=r;r=sr(n),n=sr(c)}else r=sr(r),n=sr(n);r>n&&(n+=Bo);var h=Math.atan2(o,a);if(h<0&&(h+=Bo),h>=r&&h<=n||h+Bo>=r&&h+Bo<=n)return s[0]=u,s[1]=f,l-t;var v=t*Math.cos(r)+A,d=t*Math.sin(r)+e,g=t*Math.cos(n)+A,p=t*Math.sin(n)+e,B=(v-a)*(v-a)+(d-o)*(d-o),m=(g-a)*(g-a)+(p-o)*(p-o);return B<m?(s[0]=v,s[1]=d,Math.sqrt(B)):(s[0]=g,s[1]=p,Math.sqrt(m))}function Vv(A,e,t,r,n,i,a,o){var s=n-A,l=i-e,u=t-A,f=r-e,c=Math.sqrt(u*u+f*f);u/=c,f/=c;var h=s*u+l*f,v=h/c;o&&(v=Math.min(Math.max(v,0),1)),v*=c;var d=a[0]=A+v*u,g=a[1]=e+v*f;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function Mw(A,e,t,r,n,i,a){t<0&&(A=A+t,t=-t),r<0&&(e=e+r,r=-r);var o=A+t,s=e+r,l=a[0]=Math.min(Math.max(n,A),o),u=a[1]=Math.min(Math.max(i,e),s);return Math.sqrt((l-n)*(l-n)+(u-i)*(u-i))}var SA=[];function oL(A,e,t){var r=Mw(e.x,e.y,e.width,e.height,A.x,A.y,SA);return t.set(SA[0],SA[1]),r}function sL(A,e,t){for(var r=0,n=0,i=0,a=0,o,s,l=1/0,u=e.data,f=A.x,c=A.y,h=0;h<u.length;){var v=u[h++];h===1&&(r=u[h],n=u[h+1],i=r,a=n);var d=l;switch(v){case zn.M:i=u[h++],a=u[h++],r=i,n=a;break;case zn.L:d=Vv(r,n,u[h],u[h+1],f,c,SA,!0),r=u[h++],n=u[h++];break;case zn.C:d=sg(r,n,u[h++],u[h++],u[h++],u[h++],u[h],u[h+1],f,c,SA),r=u[h++],n=u[h++];break;case zn.Q:d=fg(r,n,u[h++],u[h++],u[h],u[h+1],f,c,SA),r=u[h++],n=u[h++];break;case zn.A:var g=u[h++],p=u[h++],B=u[h++],m=u[h++],y=u[h++],_=u[h++];h+=1;var C=!!(1-u[h++]);o=Math.cos(y)*B+g,s=Math.sin(y)*m+p,h<=1&&(i=o,a=s);var Q=(f-g)*m/B+g;d=aL(g,p,m,y,y+_,C,Q,c,SA),r=Math.cos(y+_)*B+g,n=Math.sin(y+_)*m+p;break;case zn.R:i=r=u[h++],a=n=u[h++];var x=u[h++],F=u[h++];d=Mw(i,a,x,F,f,c,SA);break;case zn.Z:d=Vv(r,n,i,a,f,c,SA,!0),r=i,n=a;break}d<l&&(l=d,t.set(SA[0],SA[1]))}return l}var Wn=new be,mt=new be,jt=new be,ji=new be,mo=new be;function Hw(A,e){if(A){var t=A.getTextGuideLine(),r=A.getTextContent();if(r&&t){var n=A.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],a=n.candidates||nL,o=r.getBoundingRect().clone();o.applyTransform(r.getComputedTransform());var s=1/0,l=n.anchor,u=A.getComputedTransform(),f=u&&vi([],u),c=e.get("length2")||0;l&&jt.copy(l);for(var h=0;h<a.length;h++){var v=a[h];iL(v,0,o,Wn,ji),be.scaleAndAdd(mt,Wn,ji,c),mt.transform(f);var d=A.getBoundingRect(),g=l?l.distance(mt):A instanceof ke?sL(mt,A.path,jt):oL(mt,d,jt);g<s&&(s=g,mt.transform(u),jt.transform(u),jt.toArray(i[0]),mt.toArray(i[1]),Wn.toArray(i[2]))}lL(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var Ow=[],Yn=new be;function lL(A,e){if(e<=180&&e>0){e=e/180*Math.PI,Wn.fromArray(A[0]),mt.fromArray(A[1]),jt.fromArray(A[2]),be.sub(ji,Wn,mt),be.sub(mo,jt,mt);var t=ji.len(),r=mo.len();if(!(t<.001||r<.001)){ji.scale(1/t),mo.scale(1/r);var n=ji.dot(mo),i=Math.cos(e);if(i<n){var a=Vv(mt.x,mt.y,jt.x,jt.y,Wn.x,Wn.y,Ow,!1);Yn.fromArray(Ow),Yn.scaleAndAdd(mo,a/Math.tan(Math.PI-e));var o=jt.x!==mt.x?(Yn.x-mt.x)/(jt.x-mt.x):(Yn.y-mt.y)/(jt.y-mt.y);if(isNaN(o))return;o<0?be.copy(Yn,mt):o>1&&be.copy(Yn,jt),Yn.toArray(A[1])}}}}function Kv(A,e,t,r){var n=t==="normal",i=n?A:A.ensureState(t);i.ignore=e;var a=r.get("smooth");a&&a===!0&&(a=.3),i.shape=i.shape||{},a>0&&(i.shape.smooth=a);var o=r.getModel("lineStyle").getLineStyle();n?A.useStyle(o):i.style=o}function uL(A,e){var t=e.smooth,r=e.points;if(r)if(A.moveTo(r[0][0],r[0][1]),t>0&&r.length>=3){var n=Mf(r[0],r[1]),i=Mf(r[1],r[2]);if(!n||!i){A.lineTo(r[1][0],r[1][1]),A.lineTo(r[2][0],r[2][1]);return}var a=Math.min(n,i)*t,o=Hf([],r[1],r[0],a/n),s=Hf([],r[1],r[2],a/i),l=Hf([],o,s,.5);A.bezierCurveTo(o[0],o[1],o[0],o[1],l[0],l[1]),A.bezierCurveTo(s[0],s[1],s[0],s[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)A.lineTo(r[u][0],r[u][1])}function fL(A,e,t){var r=A.getTextGuideLine(),n=A.getTextContent();if(!n){r&&A.removeTextGuideLine();return}for(var i=e.normal,a=i.get("show"),o=n.ignore,s=0;s<zs.length;s++){var l=zs[s],u=e[l],f=l==="normal";if(u){var c=u.get("show"),h=f?o:ve(n.states[l]&&n.states[l].ignore,o);if(h||!ve(c,a)){var v=f?r:r&&r.states[l];v&&(v.ignore=!0),r&&Kv(r,!0,l,u);continue}r||(r=new ka,A.setTextGuideLine(r),!f&&(o||!a)&&Kv(r,!0,"normal",e.normal),A.stateProxy&&(r.stateProxy=A.stateProxy)),Kv(r,!1,l,u)}}if(r){Ne(r.style,t),r.style.fill=null;var d=i.get("showAbove"),g=A.textGuideLineConfig=A.textGuideLineConfig||{};g.showAbove=d||!1,r.buildPath=uL}}function cL(A,e){e=e||"labelLine";for(var t={normal:A.getModel(e)},r=0;r<sA.length;r++){var n=sA[r];t[n]=A.getModel([n,e])}return t}var Rw=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],hL=1,cu=2,Nw=hL|cu;function hu(A,e,t){t=t||Nw,e?A.dirty|=t:A.dirty&=~t}function Pw(A,e){return e=e||Nw,A.dirty==null||!!(A.dirty&e)}function kr(A){if(A)return Pw(A)&&vL(A,A.label,A),A}function vL(A,e,t){var r=e.getComputedTransform();A.transform=wh(A.transform,r);var n=A.localRect=Ga(A.localRect,e.getBoundingRect()),i=e.style,a=i.margin,o=t&&t.marginForce,s=t&&t.minMarginForce,l=t&&t.marginDefault,u=i.__marginType;u==null&&l&&(a=l,u=Hi.textMargin);for(var f=0;f<4;f++)Gv[f]=u===Hi.minMargin&&s&&s[f]!=null?s[f]:o&&o[f]!=null?o[f]:a?a[f]:0;u===Hi.textMargin&&fl(n,Gv,!1,!1);var c=A.rect=Ga(A.rect,n);return r&&c.applyTransform(r),u===Hi.minMargin&&fl(c,Gv,!1,!1),A.axisAligned=yh(r),(A.label=A.label||{}).ignore=e.ignore,hu(A,!1),hu(A,!0,cu),A}var Gv=[0,0,0,0];function dL(A,e,t){return A.transform=wh(A.transform,t),A.localRect=Ga(A.localRect,e),A.rect=Ga(A.rect,e),t&&A.rect.applyTransform(t),A.axisAligned=yh(t),A.obb=void 0,(A.label=A.label||{}).ignore=!1,A}function pL(A,e){if(A){A.label.x+=e.x,A.label.y+=e.y,A.label.markRedraw();var t=A.transform;t&&(t[4]+=e.x,t[5]+=e.y);var r=A.rect;r&&(r.x+=e.x,r.y+=e.y);var n=A.obb;n&&n.fromBoundingRect(A.localRect,t)}}function zv(A,e){for(var t=0;t<Rw.length;t++){var r=Rw[t];A[r]==null&&(A[r]=e[r])}return kr(A)}function kw(A){var e=A.obb;return(!e||Pw(A,cu))&&(A.obb=e=e||new fB,e.fromBoundingRect(A.localRect,A.transform),hu(A,!1,cu)),e}function Vw(A,e,t,r,n){var i=A.length,a=Dr[e],o=Li[e];if(i<2)return!1;A.sort(function(Q,x){return Q.rect[a]-x.rect[a]});for(var s=0,l,u=!1,f=0;f<i;f++){var c=A[f],h=c.rect;l=h[a]-s,l<0&&(h[a]-=l,c.label[a]-=l,u=!0),s=h[a]+h[o]}var v=A[0],d=A[i-1],g,p;B(),g<0&&_(-g,.8),p<0&&_(p,.8),B(),m(g,p,1),m(p,g,-1),B(),g<0&&C(-g),p<0&&C(p);function B(){g=v.rect[a]-t,p=r-d.rect[a]-d.rect[o]}function m(Q,x,F){if(Q<0){var S=Math.min(x,-Q);if(S>0){y(S*F,0,i);var E=S+Q;E<0&&_(-E*F,1)}else _(-Q*F,1)}}function y(Q,x,F){Q!==0&&(u=!0);for(var S=x;S<F;S++){var E=A[S],I=E.rect;I[a]+=Q,E.label[a]+=Q}}function _(Q,x){for(var F=[],S=0,E=1;E<i;E++){var I=A[E-1].rect,U=Math.max(A[E].rect[a]-I[a]-I[o],0);F.push(U),S+=U}if(S){var T=Math.min(Math.abs(Q)/S,x);if(Q>0)for(var E=0;E<i-1;E++){var L=F[E]*T;y(L,0,E+1)}else for(var E=i-1;E>0;E--){var L=F[E-1]*T;y(-L,E,i)}}}function C(Q){var x=Q<0?-1:1;Q=Math.abs(Q);for(var F=Math.ceil(Q/(i-1)),S=0;S<i-1;S++)if(x>0?y(F,0,S+1):y(-F,i-S-1,i),Q-=F,Q<=0)return}return u}function gL(A){for(var e=0;e<A.length;e++){var t=A[e],r=t.defaultAttr,n=t.labelLine;t.label.attr("ignore",r.ignore),n&&n.attr("ignore",r.labelGuideIgnore)}}function Kw(A){var e=[];A.sort(function(l,u){return(u.suggestIgnore?1:0)-(l.suggestIgnore?1:0)||u.priority-l.priority});function t(l){if(!l.ignore){var u=l.ensureState("emphasis");u.ignore==null&&(u.ignore=!1)}l.ignore=!0}for(var r=0;r<A.length;r++){var n=kr(A[r]);if(!n.label.ignore){for(var i=n.label,a=n.labelLine,o=!1,s=0;s<e.length;s++)if(Wv(n,e[s],null,{touchThreshold:.05})){o=!0;break}o?(t(i),a&&t(a)):e.push(n)}}}function Wv(A,e,t,r){return!A||!e||A.label&&A.label.ignore||e.label&&e.label.ignore||!A.rect.intersect(e.rect,t,r)?!1:A.axisAligned&&e.axisAligned?!0:kw(A).intersect(kw(e),t,r)}function BL(A){if(A){for(var e=[],t=0;t<A.length;t++)e.push(A[t].slice());return e}}function mL(A,e){var t=A.label,r=e&&e.getTextGuideLine();return{dataIndex:A.dataIndex,dataType:A.dataType,seriesIndex:A.seriesModel.seriesIndex,text:A.label.style.text,rect:A.hostRect,labelRect:A.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:BL(r&&r.shape.points)}}var Gw=["align","verticalAlign","width","height","fontSize"],Rt=new xs,Yv=ze(),yL=ze();function vu(A,e,t){for(var r=0;r<t.length;r++){var n=t[r];e[n]!=null&&(A[n]=e[n])}}var du=["x","y","rotation"],wL=(function(){function A(){this._labelList=[],this._chartViewList=[]}return A.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},A.prototype._addLabel=function(e,t,r,n,i){var a=n.style,o=n.__hostTarget,s=o.textConfig||{},l=n.getComputedTransform(),u=n.getBoundingRect().plain();Fe.applyTransform(u,u,l),l?Rt.setLocalTransform(l):(Rt.x=Rt.y=Rt.rotation=Rt.originX=Rt.originY=0,Rt.scaleX=Rt.scaleY=1),Rt.rotation=sr(Rt.rotation);var f=n.__hostTarget,c;if(f){c=f.getBoundingRect().plain();var h=f.getComputedTransform();Fe.applyTransform(c,c,h)}var v=c&&f.getTextGuideLine();this._labelList.push({label:n,labelLine:v,seriesModel:r,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:u,hostRect:c,priority:c?c.width*c.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:v&&v.ignore,x:Rt.x,y:Rt.y,scaleX:Rt.scaleX,scaleY:Rt.scaleY,rotation:Rt.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:n.cursor,attachedPos:s.position,attachedRot:s.rotation}})},A.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var r=e.__model,n=r.get("labelLayout");(me(n)||Xe(n).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var a=i.getTextContent(),o=Le(i);a&&!a.disableLabelLayout&&t._addLabel(o.dataIndex,o.dataType,r,a,n)})},A.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),r=e.getHeight();function n(m,y){return function(){Hw(m,y)}}for(var i=0;i<this._labelList.length;i++){var a=this._labelList[i],o=a.label,s=o.__hostTarget,l=a.defaultAttr,u=void 0;me(a.layoutOptionOrCb)?u=a.layoutOptionOrCb(mL(a,s)):u=a.layoutOptionOrCb,u=u||{},a.layoutOption=u;var f=Math.PI/180;s&&s.setTextConfig({local:!1,position:u.x!=null||u.y!=null?null:l.attachedPos,rotation:u.rotate!=null?u.rotate*f:l.attachedRot,offset:[u.dx||0,u.dy||0]});var c=!1;if(u.x!=null?(o.x=ht(u.x,t),o.setStyle("x",0),c=!0):(o.x=l.x,o.setStyle("x",l.style.x)),u.y!=null?(o.y=ht(u.y,r),o.setStyle("y",0),c=!0):(o.y=l.y,o.setStyle("y",l.style.y)),u.labelLinePoints){var h=s.getTextGuideLine();h&&(h.setShape({points:u.labelLinePoints}),c=!1)}var v=Yv(o);v.needsUpdateLabelLine=c,o.rotation=u.rotate!=null?u.rotate*f:l.rotation,o.scaleX=l.scaleX,o.scaleY=l.scaleY;for(var d=0;d<Gw.length;d++){var g=Gw[d];o.setStyle(g,u[g]!=null?u[g]:l.style[g])}if(u.draggable){if(o.draggable=!0,o.cursor="move",s){var p=a.seriesModel;if(a.dataIndex!=null){var B=a.seriesModel.getData(a.dataType);p=B.getItemModel(a.dataIndex)}o.on("drag",n(s,p.getModel("labelLine")))}}else o.off("drag"),o.cursor=l.cursor}},A.prototype.layout=function(e){var t=e.getWidth(),r=e.getHeight(),n=[];b(this._labelList,function(s){s.defaultAttr.ignore||n.push(zv({},s))});var i=rt(n,function(s){return s.layoutOption.moveOverlap==="shiftX"}),a=rt(n,function(s){return s.layoutOption.moveOverlap==="shiftY"});Vw(i,0,0,t),Vw(a,1,0,r);var o=rt(n,function(s){return s.layoutOption.hideOverlap});gL(o),Kw(o)},A.prototype.processLabelsOverall=function(){var e=this;b(this._chartViewList,function(t){var r=t.__model,n=t.ignoreLabelLineUpdate,i=r.isAnimationEnabled();t.group.traverse(function(a){if(a.ignore&&!a.forceLabelAnimation)return!0;var o=!n,s=a.getTextContent();!o&&s&&(o=Yv(s).needsUpdateLabelLine),o&&e._updateLabelLine(a,r),i&&e._animateLabels(a,r)})})},A.prototype._updateLabelLine=function(e,t){var r=e.getTextContent(),n=Le(e),i=n.dataIndex;if(r&&i!=null){var a=t.getData(n.dataType),o=a.getItemModel(i),s={},l=a.getItemVisual(i,"style");if(l){var u=a.getVisual("drawType");s.stroke=l[u]}var f=o.getModel("labelLine");fL(e,cL(o),s),Hw(e,f)}},A.prototype._animateLabels=function(e,t){var r=e.getTextContent(),n=e.getTextGuideLine();if(r&&(e.forceLabelAnimation||!r.ignore&&!r.invisible&&!e.disableLabelAnimation&&!Di(e))){var i=Yv(r),a=i.oldLayout,o=Le(e),s=o.dataIndex,l={x:r.x,y:r.y,rotation:r.rotation},u=t.getData(o.dataType);if(a){r.attr(a);var c=e.prevStates;c&&(Te(c,"select")>=0&&r.attr(i.oldLayoutSelect),Te(c,"emphasis")>=0&&r.attr(i.oldLayoutEmphasis)),Et(r,l,t,s)}else if(r.attr(l),!Mi(r).valueAnimation){var f=ve(r.style.opacity,1);r.style.opacity=0,lA(r,{style:{opacity:f}},t,s)}if(i.oldLayout=l,r.states.select){var h=i.oldLayoutSelect={};vu(h,l,du),vu(h,r.states.select,du)}if(r.states.emphasis){var v=i.oldLayoutEmphasis={};vu(v,l,du),vu(v,r.states.emphasis,du)}fS(r,s,u,t,t)}if(n&&!n.ignore&&!n.invisible){var i=yL(n),a=i.oldLayout,d={points:n.shape.points};a?(n.attr({shape:a}),Et(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,lA(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},A})(),Xv=ze();function CL(A){A.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){var n=Xv(t).labelManager;n||(n=Xv(t).labelManager=new wL),n.clearLabels()}),A.registerUpdateLifecycle("series:layoutlabels",function(e,t,r){var n=Xv(t).labelManager;r.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var _L=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){if(process.env.NODE_ENV!=="production"){var r=t.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Iv(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var r=new lt,n=Or("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);r.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),a=this.getData().getVisual("symbolRotate"),o=i==="none"?"circle":i,s=t.itemHeight*.8,l=Or(o,(t.itemWidth-s)/2,(t.itemHeight-s)/2,s,s,t.itemStyle.fill);r.add(l),l.setStyle(t.itemStyle);var u=t.iconRotate==="inherit"?a:t.iconRotate||0;return l.rotation=u*Math.PI/180,l.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill=oe.color.neutral00,l.style.lineWidth=2),r},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e})(JA);function Zv(A,e){var t=A.mapDimensionsAll("defaultedLabel"),r=t.length;if(r===1){var n=ki(A,e,t[0]);return n!=null?n+"":null}else if(r){for(var i=[],a=0;a<t.length;a++)i.push(ki(A,e,t[a]));return i.join(" ")}}function zw(A,e){var t=A.mapDimensionsAll("defaultedLabel");if(!ae(e))return e+"";for(var r=[],n=0;n<t.length;n++){var i=A.getDimensionIndex(t[n]);i>=0&&r.push(e[i])}return r.join(" ")}var Jv=(function(A){J(e,A);function e(t,r,n,i){var a=A.call(this)||this;return a.updateData(t,r,n,i),a}return e.prototype._createSymbol=function(t,r,n,i,a,o){this.removeAll();var s=Or(t,-1,-1,2,2,null,o);s.attr({z2:ve(a,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=QL,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Js(this.childAt(0))},e.prototype.downplay=function(){qs(this.childAt(0))},e.prototype.setZ=function(t,r){var n=this.childAt(0);n.zlevel=t,n.z=r},e.prototype.setDraggable=function(t,r){var n=this.childAt(0);n.draggable=t,n.cursor=!r&&t?"move":n.cursor},e.prototype.updateData=function(t,r,n,i){this.silent=!1;var a=t.getItemVisual(r,"symbol")||"circle",o=t.hostModel,s=e.getSymbolSize(t,r),l=e.getSymbolZ2(t,r),u=a!==this._symbolType,f=i&&i.disableAnimation;if(u){var c=t.getItemVisual(r,"symbolKeepAspect");this._createSymbol(a,t,r,s,l,c)}else{var h=this.childAt(0);h.silent=!1;var v={scaleX:s[0]/2,scaleY:s[1]/2};f?h.attr(v):Et(h,v,o,r),hB(h)}if(this._updateCommon(t,r,s,n,i),u){var h=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,lA(h,v,o,r)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,r,n,i,a){var o=this.childAt(0),s=t.hostModel,l,u,f,c,h,v,d,g,p;if(i&&(l=i.emphasisItemStyle,u=i.blurItemStyle,f=i.selectItemStyle,c=i.focus,h=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,p=i.cursorStyle,v=i.emphasisDisabled),!i||t.hasItemOption){var B=i&&i.itemModel?i.itemModel:t.getItemModel(r),m=B.getModel("emphasis");l=m.getModel("itemStyle").getItemStyle(),f=B.getModel(["select","itemStyle"]).getItemStyle(),u=B.getModel(["blur","itemStyle"]).getItemStyle(),c=m.get("focus"),h=m.get("blurScope"),v=m.get("disabled"),d=gl(B),g=m.getShallow("scale"),p=B.getShallow("cursor")}var y=t.getItemVisual(r,"symbolRotate");o.attr("rotation",(y||0)*Math.PI/180||0);var _=sy(t.getItemVisual(r,"symbolOffset"),n);_&&(o.x=_[0],o.y=_[1]),p&&o.attr("cursor",p);var C=t.getItemVisual(r,"style"),Q=C.fill;if(o instanceof Ir){var x=o.style;o.useStyle(Y({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},C))}else o.__isEmptyBrush?o.useStyle(Y({},C)):o.useStyle(C),o.style.decal=null,o.setColor(Q,a&&a.symbolInnerColor),o.style.strokeNoScale=!0;var F=t.getItemVisual(r,"liftZ"),S=this._z2;F!=null?S==null&&(this._z2=o.z2,o.z2+=F):S!=null&&(o.z2=S,this._z2=null);var E=a&&a.useNameLabel;pl(o,d,{labelFetcher:s,labelDataIndex:r,defaultText:I,inheritColor:Q,defaultOpacity:C.opacity});function I(L){return E?t.getName(L):Zv(t,L)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var U=o.ensureState("emphasis");U.style=l,o.ensureState("select").style=f,o.ensureState("blur").style=u;var T=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;U.scaleX=this._sizeX*T,U.scaleY=this._sizeY*T,this.setSymbolScale(1),js(this,c,h,v)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,r,n){var i=this.childAt(0),a=Le(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var s=i.getTextContent();s&&ll(s,{style:{opacity:0}},r,{dataIndex:a,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ll(i,{style:{opacity:0},scaleX:0,scaleY:0},r,{dataIndex:a,cb:t,removeOpt:o})},e.getSymbolSize=function(t,r){return ZI(t.getItemVisual(r,"symbolSize"))},e.getSymbolZ2=function(t,r){return t.getItemVisual(r,"z2")},e})(lt);function QL(A,e){this.parent.drift(A,e)}function qv(A,e,t,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r.isIgnore&&r.isIgnore(t))&&!(r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&A.getItemVisual(t,"symbol")!=="none"}function Ww(A){return A!=null&&!he(A)&&(A={isIgnore:A}),A||{}}function Yw(A){var e=A.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:gl(e),cursorStyle:e.get("cursor")}}var xL=(function(){function A(e){this.group=new lt,this._SymbolCtor=e||Jv}return A.prototype.updateData=function(e,t){this._progressiveEls=null,t=Ww(t);var r=this.group,n=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=Yw(e),l={disableAnimation:o},u=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||r.removeAll(),e.diff(i).add(function(f){var c=u(f);if(qv(e,c,f,t)){var h=new a(e,f,s,l);h.setPosition(c),e.setItemGraphicEl(f,h),r.add(h)}}).update(function(f,c){var h=i.getItemGraphicEl(c),v=u(f);if(!qv(e,v,f,t)){r.remove(h);return}var d=e.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==d)r.remove(h),h=new a(e,f,s,l),h.setPosition(v);else{h.updateData(e,f,s,l);var p={x:v[0],y:v[1]};o?h.attr(p):Et(h,p,n)}r.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var c=i.getItemGraphicEl(f);c&&c.fadeOut(function(){r.remove(c)},n)}).execute(),this._getSymbolPoint=u,this._data=e},A.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(r,n){var i=e._getSymbolPoint(n);r.setPosition(i),r.markRedraw()})},A.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Yw(e),this._data=null,this.group.removeAll()},A.prototype.incrementalUpdate=function(e,t,r){this._progressiveEls=[],r=Ww(r);function n(s){s.isGroup||(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var a=t.getItemLayout(i);if(qv(t,a,i,r)){var o=new this._SymbolCtor(t,i,this._seriesScope);o.traverse(n),o.setPosition(a),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},A.prototype.eachRendered=function(e){hl(this._progressiveEls||this.group,e)},A.prototype.remove=function(e){var t=this.group,r=this._data;r&&e?r.eachItemGraphicEl(function(n){n.fadeOut(function(){t.remove(n)},r.hostModel)}):t.removeAll()},A})();function Xw(A,e,t){var r=A.getBaseAxis(),n=A.getOtherAxis(r),i=FL(n,t),a=r.dim,o=n.dim,s=e.mapDimension(o),l=e.mapDimension(a),u=o==="x"||o==="radius"?1:0,f=Be(A.dimensions,function(v){return e.mapDimension(v)}),c=!1,h=e.getCalculationInfo("stackResultDimension");return Ji(e,f[0])&&(c=!0,f[0]=h),Ji(e,f[1])&&(c=!0,f[1]=h),{dataDimsForPoint:f,valueStart:i,valueAxisDim:o,baseAxisDim:a,stacked:!!c,valueDim:s,baseDim:l,baseDataOffset:u,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function FL(A,e){var t=0,r=A.scale.getExtent();return e==="start"?t=r[0]:e==="end"?t=r[1]:Ye(e)&&!isNaN(e)?t=e:r[0]>0?t=r[0]:r[1]<0&&(t=r[1]),t}function Zw(A,e,t,r){var n=NaN;A.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),r)),isNaN(n)&&(n=A.valueStart);var i=A.baseDataOffset,a=[];return a[i]=t.get(A.baseDim,r),a[1-i]=n,e.dataToPoint(a)}function EL(A,e){var t=[];return e.diff(A).add(function(r){t.push({cmd:"+",idx:r})}).update(function(r,n){t.push({cmd:"=",idx:n,idx1:r})}).remove(function(r){t.push({cmd:"-",idx:r})}).execute(),t}function bL(A,e,t,r,n,i,a,o){for(var s=EL(A,e),l=[],u=[],f=[],c=[],h=[],v=[],d=[],g=Xw(n,e,a),p=A.getLayout("points")||[],B=e.getLayout("points")||[],m=0;m<s.length;m++){var y=s[m],_=!0,C=void 0,Q=void 0;switch(y.cmd){case"=":C=y.idx*2,Q=y.idx1*2;var x=p[C],F=p[C+1],S=B[Q],E=B[Q+1];(isNaN(x)||isNaN(F))&&(x=S,F=E),l.push(x,F),u.push(S,E),f.push(t[C],t[C+1]),c.push(r[Q],r[Q+1]),d.push(e.getRawIndex(y.idx1));break;case"+":var I=y.idx,U=g.dataDimsForPoint,T=n.dataToPoint([e.get(U[0],I),e.get(U[1],I)]);Q=I*2,l.push(T[0],T[1]),u.push(B[Q],B[Q+1]);var L=Zw(g,n,e,I);f.push(L[0],L[1]),c.push(r[Q],r[Q+1]),d.push(e.getRawIndex(I));break;case"-":_=!1}_&&(h.push(y),v.push(v.length))}v.sort(function(K,N){return d[K]-d[N]});for(var P=l.length,Z=vr(P),V=vr(P),X=vr(P),ee=vr(P),te=[],m=0;m<v.length;m++){var D=v[m],M=m*2,H=D*2;Z[M]=l[H],Z[M+1]=l[H+1],V[M]=u[H],V[M+1]=u[H+1],X[M]=f[H],X[M+1]=f[H+1],ee[M]=c[H],ee[M+1]=c[H+1],te[m]=h[D]}return{current:Z,next:V,stackedOnCurrent:X,stackedOnNext:ee,status:te}}var Vr=Math.min,Kr=Math.max;function Xn(A,e){return isNaN(A)||isNaN(e)}function $v(A,e,t,r,n,i,a,o,s){for(var l,u,f,c,h,v,d=t,g=0;g<r;g++){var p=e[d*2],B=e[d*2+1];if(d>=n||d<0)break;if(Xn(p,B)){if(s){d+=i;continue}break}if(d===t)A[i>0?"moveTo":"lineTo"](p,B),f=p,c=B;else{var m=p-l,y=B-u;if(m*m+y*y<.5){d+=i;continue}if(a>0){for(var _=d+i,C=e[_*2],Q=e[_*2+1];C===p&&Q===B&&g<r;)g++,_+=i,d+=i,C=e[_*2],Q=e[_*2+1],p=e[d*2],B=e[d*2+1],m=p-l,y=B-u;var x=g+1;if(s)for(;Xn(C,Q)&&x<r;)x++,_+=i,C=e[_*2],Q=e[_*2+1];var F=.5,S=0,E=0,I=void 0,U=void 0;if(x>=r||Xn(C,Q))h=p,v=B;else{S=C-l,E=Q-u;var T=p-l,L=C-p,P=B-u,Z=Q-B,V=void 0,X=void 0;if(o==="x"){V=Math.abs(T),X=Math.abs(L);var ee=S>0?1:-1;h=p-ee*V*a,v=B,I=p+ee*X*a,U=B}else if(o==="y"){V=Math.abs(P),X=Math.abs(Z);var te=E>0?1:-1;h=p,v=B-te*V*a,I=p,U=B+te*X*a}else V=Math.sqrt(T*T+P*P),X=Math.sqrt(L*L+Z*Z),F=X/(X+V),h=p-S*a*(1-F),v=B-E*a*(1-F),I=p+S*a*F,U=B+E*a*F,I=Vr(I,Kr(C,p)),U=Vr(U,Kr(Q,B)),I=Kr(I,Vr(C,p)),U=Kr(U,Vr(Q,B)),S=I-p,E=U-B,h=p-S*V/X,v=B-E*V/X,h=Vr(h,Kr(l,p)),v=Vr(v,Kr(u,B)),h=Kr(h,Vr(l,p)),v=Kr(v,Vr(u,B)),S=p-h,E=B-v,I=p+S*X/V,U=B+E*X/V}A.bezierCurveTo(f,c,h,v,p,B),f=I,c=U}else A.lineTo(p,B)}l=p,u=B,d+=i}return g}var Jw=(function(){function A(){this.smooth=0,this.smoothConstraint=!0}return A})(),SL=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="ec-polyline",r}return e.prototype.getDefaultStyle=function(){return{stroke:oe.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Jw},e.prototype.buildPath=function(t,r){var n=r.points,i=0,a=n.length/2;if(r.connectNulls){for(;a>0&&Xn(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Xn(n[i*2],n[i*2+1]);i++);}for(;i<a;)i+=$v(t,n,i,a,a,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},e.prototype.getPointOn=function(t,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,i=n.data,a=Sr.CMD,o,s,l=r==="x",u=[],f=0;f<i.length;){var c=i[f++],h=void 0,v=void 0,d=void 0,g=void 0,p=void 0,B=void 0,m=void 0;switch(c){case a.M:o=i[f++],s=i[f++];break;case a.L:if(h=i[f++],v=i[f++],m=l?(t-o)/(h-o):(t-s)/(v-s),m<=1&&m>=0){var y=l?(v-s)*m+s:(h-o)*m+o;return l?[t,y]:[y,t]}o=h,s=v;break;case a.C:h=i[f++],v=i[f++],d=i[f++],g=i[f++],p=i[f++],B=i[f++];var _=l?fs(o,h,d,p,t,u):fs(s,v,g,B,t,u);if(_>0)for(var C=0;C<_;C++){var Q=u[C];if(Q<=1&&Q>=0){var y=l?ct(s,v,g,B,Q):ct(o,h,d,p,Q);return l?[t,y]:[y,t]}}o=p,s=B;break}}},e})(ke),UL=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e})(Jw),IL=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="ec-polygon",r}return e.prototype.getDefaultShape=function(){return new UL},e.prototype.buildPath=function(t,r){var n=r.points,i=r.stackedOnPoints,a=0,o=n.length/2,s=r.smoothMonotone;if(r.connectNulls){for(;o>0&&Xn(n[o*2-2],n[o*2-1]);o--);for(;a<o&&Xn(n[a*2],n[a*2+1]);a++);}for(;a<o;){var l=$v(t,n,a,o,o,1,r.smooth,s,r.connectNulls);$v(t,i,a+l-1,l,o,-1,r.stackedOnSmooth,s,r.connectNulls),a+=l+1,t.closePath()}},e})(ke);function qw(A,e,t,r,n){var i=A.getArea(),a=i.x,o=i.y,s=i.width,l=i.height,u=t.get(["lineStyle","width"])||0;a-=u/2,o-=u/2,s+=u,l+=u,s=Math.ceil(s),a!==Math.floor(a)&&(a=Math.floor(a),s++);var f=new qe({shape:{x:a,y:o,width:s,height:l}});if(e){var c=A.getBaseAxis(),h=c.isHorizontal(),v=c.inverse;h?(v&&(f.shape.x+=s),f.shape.width=0):(v||(f.shape.y+=l),f.shape.height=0);var d=me(n)?function(g){n(g,f)}:null;lA(f,{shape:{width:s,height:l,x:a,y:o}},t,null,r,d)}return f}function $w(A,e,t){var r=A.getArea(),n=wt(r.r0,1),i=wt(r.r,1),a=new Ti({shape:{cx:wt(A.cx,1),cy:wt(A.cy,1),r0:n,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(e){var o=A.getBaseAxis().dim==="angle";o?a.shape.endAngle=r.startAngle:a.shape.r=n,lA(a,{shape:{endAngle:r.endAngle,r:i}},t)}return a}function TL(A,e,t,r,n){if(A){if(A.type==="polar")return $w(A,e,t);if(A.type==="cartesian2d")return qw(A,e,t,r,n)}else return null;return null}function jv(A,e){return A.type===e}function jw(A,e){if(A.length===e.length){for(var t=0;t<A.length;t++)if(A[t]!==e[t])return;return!0}}function eC(A){for(var e=1/0,t=1/0,r=-1/0,n=-1/0,i=0;i<A.length;){var a=A[i++],o=A[i++];isNaN(a)||(e=Math.min(a,e),r=Math.max(a,r)),isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n))}return[[e,t],[r,n]]}function tC(A,e){var t=eC(A),r=t[0],n=t[1],i=eC(e),a=i[0],o=i[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]))}function AC(A){return Ye(A)?A:A?.5:0}function DL(A,e,t){if(!t.valueDim)return[];for(var r=e.count(),n=vr(r*2),i=0;i<r;i++){var a=Zw(t,A,e,i);n[i*2]=a[0],n[i*2+1]=a[1]}return n}function Gr(A,e,t,r,n){var i=t.getBaseAxis(),a=i.dim==="x"||i.dim==="radius"?0:1,o=[],s=0,l=[],u=[],f=[],c=[];if(n){for(s=0;s<A.length;s+=2){var h=e||A;!isNaN(h[s])&&!isNaN(h[s+1])&&c.push(A[s],A[s+1])}A=c}for(s=0;s<A.length-2;s+=2)switch(f[0]=A[s+2],f[1]=A[s+3],u[0]=A[s],u[1]=A[s+1],o.push(u[0],u[1]),r){case"end":l[a]=f[a],l[1-a]=u[1-a],o.push(l[0],l[1]);break;case"middle":var v=(u[a]+f[a])/2,d=[];l[a]=d[a]=v,l[1-a]=u[1-a],d[1-a]=f[1-a],o.push(l[0],l[1]),o.push(d[0],d[1]);break;default:l[a]=u[a],l[1-a]=f[1-a],o.push(l[0],l[1])}return o.push(A[s++],A[s++]),o}function LL(A,e){var t=[],r=A.length,n,i;function a(u,f,c){var h=u.coord,v=(c-h)/(f.coord-h),d=eF(v,[u.color,f.color]);return{coord:c,color:d}}for(var o=0;o<r;o++){var s=A[o],l=s.coord;if(l<0)n=s;else if(l>e){i?t.push(a(i,s,e)):n&&t.push(a(n,s,0),a(n,s,e));break}else n&&(t.push(a(n,s,0)),n=null),t.push(s),i=s}return t}function ML(A,e,t){var r=A.getVisual("visualMeta");if(!(!r||!r.length||!A.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var n,i,a=r.length-1;a>=0;a--){var o=A.getDimensionInfo(r[a].dimension);if(n=o&&o.coordDim,n==="x"||n==="y"){i=r[a];break}}if(!i){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var s=e.getAxis(n),l=Be(i.stops,function(m){return{coord:s.toGlobalCoord(s.dataToCoord(m.value)),color:m.color}}),u=l.length,f=i.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),f.reverse());var c=LL(l,n==="x"?t.getWidth():t.getHeight()),h=c.length;if(!h&&u)return l[0].coord<0?f[1]?f[1]:l[u-1].color:f[0]?f[0]:l[0].color;var v=10,d=c[0].coord-v,g=c[h-1].coord+v,p=g-d;if(p<.001)return"transparent";b(c,function(m){m.offset=(m.coord-d)/p}),c.push({offset:h?c[h-1].offset:.5,color:f[1]||"transparent"}),c.unshift({offset:h?c[0].offset:.5,color:f[0]||"transparent"});var B=new uB(0,0,0,0,c,!0);return B[n]=d,B[n+"2"]=g,B}}function HL(A,e,t){var r=A.get("showAllSymbol"),n=r==="auto";if(!(r&&!n)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(n&&OL(i,e))){var a=e.mapDimension(i.dim),o={};return b(i.getViewLabels(),function(s){var l=i.scale.getRawOrdinalNumber(s.tickValue);o[l]=1}),function(s){return!o.hasOwnProperty(e.get(a,s))}}}}function OL(A,e){var t=A.getExtent(),r=Math.abs(t[1]-t[0])/A.scale.count();isNaN(r)&&(r=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),a=0;a<n;a+=i)if(Jv.getSymbolSize(e,a)[A.isHorizontal()?1:0]*1.5>r)return!1;return!0}function RL(A,e){return isNaN(A)||isNaN(e)}function NL(A){for(var e=A.length/2;e>0&&RL(A[e*2-2],A[e*2-1]);e--);return e-1}function rC(A,e){return[A[e*2],A[e*2+1]]}function PL(A,e,t){for(var r=A.length/2,n=t==="x"?0:1,i,a,o=0,s=-1,l=0;l<r;l++)if(a=A[l*2+n],!(isNaN(a)||isNaN(A[l*2+1-n]))){if(l===0){i=a;continue}if(i<=e&&a>=e||i>=e&&a<=e){s=l;break}o=l,i=a}return{range:[o,s],t:(e-i)/(a-i)}}function nC(A){if(A.get(["endLabel","show"]))return!0;for(var e=0;e<sA.length;e++)if(A.get([sA[e],"endLabel","show"]))return!0;return!1}function ed(A,e,t,r){if(jv(e,"cartesian2d")){var n=r.getModel("endLabel"),i=n.get("valueAnimation"),a=r.getData(),o={lastFrameIndex:0},s=nC(r)?function(h,v){A._endLabelOnDuring(h,v,a,o,i,n,e)}:null,l=e.getBaseAxis().isHorizontal(),u=qw(e,t,r,function(){var h=A._endLabel;h&&t&&o.originalX!=null&&h.attr({x:o.originalX,y:o.originalY})},s);if(!r.get("clip",!0)){var f=u.shape,c=Math.max(f.width,f.height);l?(f.y-=c,f.height+=c*2):(f.x-=c,f.width+=c*2)}return s&&s(1,u),u}else return process.env.NODE_ENV!=="production"&&r.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),$w(e,t,r)}function kL(A,e){var t=e.getBaseAxis(),r=t.isHorizontal(),n=t.inverse,i=r?n?"right":"left":"center",a=r?"middle":n?"top":"bottom";return{normal:{align:A.get("align")||i,verticalAlign:A.get("verticalAlign")||a}}}var VL=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e.prototype.init=function(){var t=new lt,r=new xL;this.group.add(r.group),this._symbolDraw=r,this._lineGroup=t,this._changePolyState=ye(this._changePolyState,this)},e.prototype.render=function(t,r,n){var i=t.coordinateSystem,a=this.group,o=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.getLayout("points")||[],f=i.type==="polar",c=this._coordSys,h=this._symbolDraw,v=this._polyline,d=this._polygon,g=this._lineGroup,p=!r.ssr&&t.get("animation"),B=!l.isEmpty(),m=l.get("origin"),y=Xw(i,o,m),_=B&&DL(i,o,y),C=t.get("showSymbol"),Q=t.get("connectNulls"),x=C&&!f&&HL(t,o,i),F=this._data;F&&F.eachItemGraphicEl(function(K,N){K.__temp&&(a.remove(K),F.setItemGraphicEl(N,null))}),C||h.remove(),a.add(g);var S=f?!1:t.get("step"),E;i&&i.getArea&&t.get("clip",!0)&&(E=i.getArea(),E.width!=null?(E.x-=.1,E.y-=.1,E.width+=.2,E.height+=.2):E.r0&&(E.r0-=.5,E.r+=.5)),this._clipShapeForSymbol=E;var I=ML(o,i,n)||o.getVisual("style")[o.getVisual("drawType")];if(!(v&&c.type===i.type&&S===this._step))C&&h.updateData(o,{isIgnore:x,clipShape:E,disableAnimation:!0,getSymbolPoint:function(K){return[u[K*2],u[K*2+1]]}}),p&&this._initSymbolLabelAnimation(o,i,E),S&&(_&&(_=Gr(_,u,i,S,Q)),u=Gr(u,null,i,S,Q)),v=this._newPolyline(u),B?d=this._newPolygon(u,_):d&&(g.remove(d),d=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,Dn(I)),g.setClipPath(ed(this,i,!0,t));else{B&&!d?d=this._newPolygon(u,_):d&&!B&&(g.remove(d),d=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,Dn(I));var U=g.getClipPath();if(U){var T=ed(this,i,!1,t);lA(U,{shape:T.shape},t)}else g.setClipPath(ed(this,i,!0,t));C&&h.updateData(o,{isIgnore:x,clipShape:E,disableAnimation:!0,getSymbolPoint:function(K){return[u[K*2],u[K*2+1]]}}),(!jw(this._stackedOnPoints,_)||!jw(this._points,u))&&(p?this._doUpdateAnimation(o,_,i,n,S,m,Q):(S&&(_&&(_=Gr(_,u,i,S,Q)),u=Gr(u,null,i,S,Q)),v.setShape({points:u}),d&&d.setShape({points:u,stackedOnPoints:_})))}var L=t.getModel("emphasis"),P=L.get("focus"),Z=L.get("blurScope"),V=L.get("disabled");if(v.useStyle(Ne(s.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),ih(v,t,"lineStyle"),v.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var X=v.getState("emphasis").style;X.lineWidth=+v.style.lineWidth+1}Le(v).seriesIndex=t.seriesIndex,js(v,P,Z,V);var ee=AC(t.get("smooth")),te=t.get("smoothMonotone");if(v.setShape({smooth:ee,smoothMonotone:te,connectNulls:Q}),d){var D=o.getCalculationInfo("stackedOnSeries"),M=0;d.useStyle(Ne(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),D&&(M=AC(D.get("smooth"))),d.setShape({smooth:ee,stackedOnSmooth:M,smoothMonotone:te,connectNulls:Q}),ih(d,t,"areaStyle"),Le(d).seriesIndex=t.seriesIndex,js(d,P,Z,V)}var H=this._changePolyState;o.eachItemGraphicEl(function(K){K&&(K.onHoverStateChange=H)}),this._polyline.onHoverStateChange=H,this._data=o,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=S,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,v),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,r){Le(r).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,r,n,i){var a=t.getData(),o=pn(a,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&o!=null&&o>=0){var s=a.getLayout("points"),l=a.getItemGraphicEl(o);if(!l){var u=s[o*2],f=s[o*2+1];if(isNaN(u)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(u,f))return;var c=t.get("zlevel")||0,h=t.get("z")||0;l=new Jv(a,o),l.x=u,l.y=f,l.setZ(c,h);var v=l.getSymbolPath().getTextContent();v&&(v.zlevel=c,v.z=h,v.z2=this._polyline.z2+1),l.__temp=!0,a.setItemGraphicEl(o,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else FA.prototype.highlight.call(this,t,r,n,i)},e.prototype.downplay=function(t,r,n,i){var a=t.getData(),o=pn(a,i);if(this._changePolyState("normal"),o!=null&&o>=0){var s=a.getItemGraphicEl(o);s&&(s.__temp?(a.setItemGraphicEl(o,null),this.group.remove(s)):s.downplay())}else FA.prototype.downplay.call(this,t,r,n,i)},e.prototype._changePolyState=function(t){var r=this._polygon;P0(this._polyline,t),r&&P0(r,t)},e.prototype._newPolyline=function(t){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new SL({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},e.prototype._newPolygon=function(t,r){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new IL({shape:{points:t,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,r,n){var i,a,o=r.getBaseAxis(),s=o.inverse;r.type==="cartesian2d"?(i=o.isHorizontal(),a=!1):r.type==="polar"&&(i=o.dim==="angle",a=!0);var l=t.hostModel,u=l.get("animationDuration");me(u)&&(u=u(null));var f=l.get("animationDelay")||0,c=me(f)?f(null):f;t.eachItemGraphicEl(function(h,v){var d=h;if(d){var g=[h.x,h.y],p=void 0,B=void 0,m=void 0;if(n)if(a){var y=n,_=r.pointToCoord(g);i?(p=y.startAngle,B=y.endAngle,m=-_[1]/180*Math.PI):(p=y.r0,B=y.r,m=_[0])}else{var C=n;i?(p=C.x,B=C.x+C.width,m=h.x):(p=C.y+C.height,B=C.y,m=h.y)}var Q=B===p?0:(m-p)/(B-p);s&&(Q=1-Q);var x=me(f)?f(v):u*Q+c,F=d.getSymbolPath(),S=F.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),S&&S.animateFrom({style:{opacity:0}},{duration:300,delay:x}),F.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,r,n){var i=t.getModel("endLabel");if(nC(t)){var a=t.getData(),o=this._polyline,s=a.getLayout("points");if(!s){o.removeTextContent(),this._endLabel=null;return}var l=this._endLabel;l||(l=this._endLabel=new Ot({z2:200}),l.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var u=NL(s);u>=0&&(pl(o,gl(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:u,defaultText:function(f,c,h){return h!=null?zw(a,h):Zv(a,f)},enableTextSetter:!0},kL(i,r)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,r,n,i,a,o,s){var l=this._endLabel,u=this._polyline;if(l){t<1&&i.originalX==null&&(i.originalX=l.x,i.originalY=l.y);var f=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),v=o.get("precision"),d=o.get("distance")||0,g=s.getBaseAxis(),p=g.isHorizontal(),B=g.inverse,m=r.shape,y=B?p?m.x:m.y+m.height:p?m.x+m.width:m.y,_=(p?d:0)*(B?-1:1),C=(p?0:-d)*(B?-1:1),Q=p?"x":"y",x=PL(f,y,Q),F=x.range,S=F[1]-F[0],E=void 0;if(S>=1){if(S>1&&!h){var I=rC(f,F[0]);l.attr({x:I[0]+_,y:I[1]+C}),a&&(E=c.getRawValue(F[0]))}else{var I=u.getPointOn(y,Q);I&&l.attr({x:I[0]+_,y:I[1]+C});var U=c.getRawValue(F[0]),T=c.getRawValue(F[1]);a&&(E=A0(n,v,U,T,x.t))}i.lastFrameIndex=F[0]}else{var L=t===1||i.lastFrameIndex>0?F[0]:0,I=rC(f,L);a&&(E=c.getRawValue(L)),l.attr({x:I[0]+_,y:I[1]+C})}if(a){var P=Mi(l);typeof P.setLabelText=="function"&&P.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(t,r,n,i,a,o,s){var l=this._polyline,u=this._polygon,f=t.hostModel,c=bL(this._data,t,this._stackedOnPoints,r,this._coordSys,n,this._valueOrigin),h=c.current,v=c.stackedOnCurrent,d=c.next,g=c.stackedOnNext;if(a&&(v=Gr(c.stackedOnCurrent,c.current,n,a,s),h=Gr(c.current,null,n,a,s),g=Gr(c.stackedOnNext,c.next,n,a,s),d=Gr(c.next,null,n,a,s)),tC(h,d)>3e3||u&&tC(v,g)>3e3){l.stopAnimation(),l.setShape({points:d}),u&&(u.stopAnimation(),u.setShape({points:d,stackedOnPoints:g}));return}l.shape.__points=c.current,l.shape.points=h;var p={shape:{points:d}};c.current!==h&&(p.shape.__points=c.next),l.stopAnimation(),Et(l,p,f),u&&(u.setShape({points:h,stackedOnPoints:v}),u.stopAnimation(),Et(u,{shape:{stackedOnPoints:g}},f),l.shape.points!==u.shape.points&&(u.shape.points=l.shape.points));for(var B=[],m=c.status,y=0;y<m.length;y++){var _=m[y].cmd;if(_==="="){var C=t.getItemGraphicEl(m[y].idx1);C&&B.push({el:C,ptIdx:y})}}l.animators&&l.animators.length&&l.animators[0].during(function(){u&&u.dirtyShape();for(var Q=l.shape.__points,x=0;x<B.length;x++){var F=B[x].el,S=B[x].ptIdx*2;F.x=Q[S],F.y=Q[S+1],F.markRedraw()}})},e.prototype.remove=function(t){var r=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(i,a){i.__temp&&(r.remove(i),n.setItemGraphicEl(a,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(FA);function KL(A,e){return{seriesType:A,plan:iv(),reset:function(t){var r=t.getData(),n=t.coordinateSystem;if(t.pipelineContext,!!n){var i=Be(n.dimensions,function(f){return r.mapDimension(f)}).slice(0,2),a=i.length,o=r.getCalculationInfo("stackResultDimension");Ji(r,i[0])&&(i[0]=o),Ji(r,i[1])&&(i[1]=o);var s=r.getStore(),l=r.getDimensionIndex(i[0]),u=r.getDimensionIndex(i[1]);return a&&{progress:function(f,c){for(var h=f.end-f.start,v=vr(h*a),d=[],g=[],p=f.start,B=0;p<f.end;p++){var m=void 0;if(a===1){var y=s.get(l,p);m=n.dataToPoint(y,null,g)}else d[0]=s.get(l,p),d[1]=s.get(u,p),m=n.dataToPoint(d,null,g);v[B++]=m[0],v[B++]=m[1]}c.setLayout("points",v)}}}}}}var GL={average:function(A){for(var e=0,t=0,r=0;r<A.length;r++)isNaN(A[r])||(e+=A[r],t++);return t===0?NaN:e/t},sum:function(A){for(var e=0,t=0;t<A.length;t++)e+=A[t]||0;return e},max:function(A){for(var e=-1/0,t=0;t<A.length;t++)A[t]>e&&(e=A[t]);return isFinite(e)?e:NaN},min:function(A){for(var e=1/0,t=0;t<A.length;t++)A[t]<e&&(e=A[t]);return isFinite(e)?e:NaN},nearest:function(A){return A[0]}},zL=function(A){return Math.round(A.length/2)};function iC(A){return{seriesType:A,reset:function(e,t,r){var n=e.getData(),i=e.get("sampling"),a=e.coordinateSystem,o=n.count();if(o>10&&a.type==="cartesian2d"&&i){var s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),f=r.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(f||1),h=Math.round(o/c);if(isFinite(h)&&h>1){i==="lttb"?e.setData(n.lttbDownSample(n.mapDimension(l.dim),1/h)):i==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(l.dim),1/h));var v=void 0;le(i)?v=GL[i]:me(i)&&(v=i),v&&e.setData(n.downSample(n.mapDimension(l.dim),1/h,v,zL))}}}}}function WL(A){A.registerChartView(VL),A.registerSeriesModel(_L),A.registerLayout(KL("line")),A.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),r=e.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",r)}}),A.registerProcessor(A.PRIORITY.PROCESSOR.STATISTIC,iC("line"))}var td=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return Iv(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,r,n){var i=this.coordinateSystem;if(i&&i.clampData){var a=i.clampData(t),o=i.dataToPoint(a);if(n)b(i.getAxes(),function(c,h){if(c.type==="category"&&r!=null){var v=c.getTicksCoords(),d=c.getTickModel().get("alignWithLabel"),g=a[h],p=r[h]==="x1"||r[h]==="y1";if(p&&!d&&(g+=1),v.length<2)return;if(v.length===2){o[h]=c.toGlobalCoord(c.getExtent()[p?1:0]);return}for(var B=void 0,m=void 0,y=1,_=0;_<v.length;_++){var C=v[_].coord,Q=_===v.length-1?v[_-1].tickValue+y:v[_].tickValue;if(Q===g){m=C;break}else if(Q<g)B=C;else if(B!=null&&Q>g){m=(C+B)/2;break}_===1&&(y=Q-v[0].tickValue)}m==null&&(B?B&&(m=v[v.length-1].coord):m=v[0].coord),o[h]=c.toGlobalCoord(m)}});else{var s=this.getData(),l=s.getLayout("offset"),u=s.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;o[f]+=l+u/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(JA);JA.registerClass(td);var YL=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Iv(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),r=this.get("largeThreshold");return r>t&&(t=r),t},e.prototype.brushSelector=function(t,r,n){return n.rect(r.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ml(td.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:oe.color.primary,borderWidth:2}},realtimeSort:!1}),e})(td),XL=(function(){function A(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return A})(),aC=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="sausage",r}return e.prototype.getDefaultShape=function(){return new XL},e.prototype.buildPath=function(t,r){var n=r.cx,i=r.cy,a=Math.max(r.r0||0,0),o=Math.max(r.r,0),s=(o-a)*.5,l=a+s,u=r.startAngle,f=r.endAngle,c=r.clockwise,h=Math.PI*2,v=c?f-u<h:u-f<h;v||(u=f-(c?h:-h));var d=Math.cos(u),g=Math.sin(u),p=Math.cos(f),B=Math.sin(f);v?(t.moveTo(d*a+n,g*a+i),t.arc(d*l+n,g*l+i,s,-Math.PI+u,u,!c)):t.moveTo(d*o+n,g*o+i),t.arc(n,i,o,u,f,!c),t.arc(p*l+n,B*l+i,s,f-Math.PI*2,f-Math.PI,!c),a!==0&&t.arc(n,i,a,f,u,c)},e})(ke);function ZL(A,e){e=e||{};var t=e.isRoundCap;return function(r,n,i){var a=n.position;if(!a||a instanceof Array)return bs(r,n,i);var o=A(a),s=n.distance!=null?n.distance:5,l=this.shape,u=l.cx,f=l.cy,c=l.r,h=l.r0,v=(c+h)/2,d=l.startAngle,g=l.endAngle,p=(d+g)/2,B=t?Math.abs(c-h)/2:0,m=Math.cos,y=Math.sin,_=u+c*m(d),C=f+c*y(d),Q="left",x="top";switch(o){case"startArc":_=u+(h-s)*m(p),C=f+(h-s)*y(p),Q="center",x="top";break;case"insideStartArc":_=u+(h+s)*m(p),C=f+(h+s)*y(p),Q="center",x="bottom";break;case"startAngle":_=u+v*m(d)+pu(d,s+B,!1),C=f+v*y(d)+gu(d,s+B,!1),Q="right",x="middle";break;case"insideStartAngle":_=u+v*m(d)+pu(d,-s+B,!1),C=f+v*y(d)+gu(d,-s+B,!1),Q="left",x="middle";break;case"middle":_=u+v*m(p),C=f+v*y(p),Q="center",x="middle";break;case"endArc":_=u+(c+s)*m(p),C=f+(c+s)*y(p),Q="center",x="bottom";break;case"insideEndArc":_=u+(c-s)*m(p),C=f+(c-s)*y(p),Q="center",x="top";break;case"endAngle":_=u+v*m(g)+pu(g,s+B,!0),C=f+v*y(g)+gu(g,s+B,!0),Q="left",x="middle";break;case"insideEndAngle":_=u+v*m(g)+pu(g,-s+B,!0),C=f+v*y(g)+gu(g,-s+B,!0),Q="right",x="middle";break;default:return bs(r,n,i)}return r=r||{},r.x=_,r.y=C,r.align=Q,r.verticalAlign=x,r}}function JL(A,e,t,r){if(Ye(r)){A.setTextConfig({rotation:r});return}else if(ae(e)){A.setTextConfig({rotation:0});return}var n=A.shape,i=n.clockwise?n.startAngle:n.endAngle,a=n.clockwise?n.endAngle:n.startAngle,o=(i+a)/2,s,l=t(e);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":s=o;break;case"startAngle":case"insideStartAngle":s=i;break;case"endAngle":case"insideEndAngle":s=a;break;default:A.setTextConfig({rotation:0});return}var u=Math.PI*1.5-s;l==="middle"&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),A.setTextConfig({rotation:u})}function pu(A,e,t){return e*Math.sin(A)*(t?-1:1)}function gu(A,e,t){return e*Math.cos(A)*(t?1:-1)}function qL(A,e,t){var r=A.get("borderRadius");if(r==null)return{cornerRadius:0};ae(r)||(r=[r,r,r,r]);var n=Math.abs(e.r||0-e.r0||0);return{cornerRadius:Be(r,function(i){return Fr(i,n)})}}var Ad=Math.max,rd=Math.min;function $L(A,e){var t=A.getArea&&A.getArea();if(jv(A,"cartesian2d")){var r=A.getBaseAxis();if(r.type!=="category"||!r.onBand){var n=e.getLayout("bandWidth");r.isHorizontal()?(t.x-=n,t.width+=n*2):(t.y-=n,t.height+=n*2)}}return t}var jL=(function(A){J(e,A);function e(){var t=A.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,r,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var a=t.get("coordinateSystem");a==="cartesian2d"||a==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,r,n):this._renderNormal(t,r,n,i)):process.env.NODE_ENV!=="production"&&xt("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,r){this._progressiveEls=[],this._incrementalRenderLarge(t,r)},e.prototype.eachRendered=function(t){hl(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t,r,n,i){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f;l.type==="cartesian2d"?f=u.isHorizontal():l.type==="polar"&&(f=u.dim==="angle");var c=t.isAnimationEnabled()?t:null,h=eM(t,l);h&&this._enableRealtimeSort(h,o,n);var v=t.get("clip",!0)||h,d=$L(l,o);a.removeClipPath();var g=t.get("roundCap",!0),p=t.get("showBackground",!0),B=t.getModel("backgroundStyle"),m=B.get("borderRadius")||0,y=[],_=this._backgroundEls,C=i&&i.isInitSort,Q=i&&i.type==="changeAxisOrder";function x(E){var I=Bu[l.type](o,E);if(!I)return null;var U=oM(l,f,I);return U.useStyle(B.getItemStyle()),l.type==="cartesian2d"?U.setShape("r",m):U.setShape("cornerRadius",m),y[E]=U,U}o.diff(s).add(function(E){var I=o.getItemModel(E),U=Bu[l.type](o,E,I);if(U&&(p&&x(E),!(!o.hasValue(E)||!fC[l.type](U)))){var T=!1;v&&(T=oC[l.type](d,U));var L=sC[l.type](t,o,E,U,f,c,u.model,!1,g);h&&(L.forceLabelAnimation=!0),hC(L,o,E,I,U,t,f,l.type==="polar"),C?L.attr({shape:U}):h?lC(h,c,L,U,E,f,!1,!1):lA(L,{shape:U},t,E),o.setItemGraphicEl(E,L),a.add(L),L.ignore=T}}).update(function(E,I){var U=o.getItemModel(E),T=Bu[l.type](o,E,U);if(T){if(p){var L=void 0;_.length===0?L=x(I):(L=_[I],L.useStyle(B.getItemStyle()),l.type==="cartesian2d"?L.setShape("r",m):L.setShape("cornerRadius",m),y[E]=L);var P=Bu[l.type](o,E),Z=gC(f,P,l);Et(L,{shape:Z},c,E)}var V=s.getItemGraphicEl(I);if(!o.hasValue(E)||!fC[l.type](T)){a.remove(V);return}var X=!1;v&&(X=oC[l.type](d,T),X&&a.remove(V));var ee=V&&(V.type==="sector"&&g||V.type==="sausage"&&!g);if(ee&&(V&&ul(V,t,I),V=null),V?hB(V):V=sC[l.type](t,o,E,T,f,c,u.model,!0,g),h&&(V.forceLabelAnimation=!0),Q){var te=V.getTextContent();if(te){var D=Mi(te);D.prevValue!=null&&(D.prevValue=D.value)}}else hC(V,o,E,U,T,t,f,l.type==="polar");C?V.attr({shape:T}):h?lC(h,c,V,T,E,f,!0,Q):Et(V,{shape:T},t,E,null),o.setItemGraphicEl(E,V),V.ignore=X,a.add(V)}}).remove(function(E){var I=s.getItemGraphicEl(E);I&&ul(I,t,E)}).execute();var F=this._backgroundGroup||(this._backgroundGroup=new lt);F.removeAll();for(var S=0;S<y.length;++S)F.add(y[S]);a.add(F),this._backgroundEls=y,this._data=o},e.prototype._renderLarge=function(t,r,n){this._clear(),dC(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,r){this._removeBackground(),dC(r,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var r=t.get("clip",!0)&&TL(t.coordinateSystem,!1,t),n=this.group;r?n.setClipPath(r):n.removeClipPath()},e.prototype._enableRealtimeSort=function(t,r,n){var i=this;if(r.count()){var a=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(r,t,n),this._isFirstFrame=!1;else{var o=function(s){var l=r.getItemGraphicEl(s),u=l&&l.shape;return u&&Math.abs(a.isHorizontal()?u.height:u.width)||0};this._onRendered=function(){i._updateSortWithinSameData(r,o,a,n)},n.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,r,n){var i=[];return t.each(t.mapDimension(r.dim),function(a,o){var s=n(o);s=s??NaN,i.push({dataIndex:o,mappedValue:s,ordinalNumber:a})}),i.sort(function(a,o){return o.mappedValue-a.mappedValue}),{ordinalNumbers:Be(i,function(a){return a.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,r,n){for(var i=n.scale,a=t.mapDimension(n.dim),o=Number.MAX_VALUE,s=0,l=i.getOrdinalMeta().categories.length;s<l;++s){var u=t.rawIndexOf(a,i.getRawOrdinalNumber(s)),f=u<0?Number.MIN_VALUE:r(t.indexOfRawIndex(u));if(f>o)return!0;o=f}return!1},e.prototype._isOrderDifferentInView=function(t,r){for(var n=r.scale,i=n.getExtent(),a=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);a<=o;++a)if(t.ordinalNumbers[a]!==n.getRawOrdinalNumber(a))return!0},e.prototype._updateSortWithinSameData=function(t,r,n,i){if(this._isOrderChangedWithinSameData(t,r,n)){var a=this._dataSort(t,n,r);this._isOrderDifferentInView(a,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:a}))}},e.prototype._dispatchInitSort=function(t,r,n){var i=r.baseAxis,a=this._dataSort(t,i,function(o){return t.get(t.mapDimension(r.otherAxis.dim),o)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:a})},e.prototype.remove=function(t,r){this._clear(this._model),this._removeOnRenderedListener(r)},e.prototype.dispose=function(t,r){this._removeOnRenderedListener(r)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var r=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){ul(i,t,Le(i).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(FA),oC={cartesian2d:function(A,e){var t=e.width<0?-1:1,r=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var n=A.x+A.width,i=A.y+A.height,a=Ad(e.x,A.x),o=rd(e.x+e.width,n),s=Ad(e.y,A.y),l=rd(e.y+e.height,i),u=o<a,f=l<s;return e.x=u&&a>n?o:a,e.y=f&&s>i?l:s,e.width=u?0:o-a,e.height=f?0:l-s,t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),u||f},polar:function(A,e){var t=e.r0<=e.r?1:-1;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}var n=rd(e.r,A.r),i=Ad(e.r0,A.r0);e.r=n,e.r0=i;var a=n-i<0;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}return a}},sC={cartesian2d:function(A,e,t,r,n,i,a,o,s){var l=new qe({shape:Y({},r),z2:1});if(l.__dataIndex=t,l.name="item",i){var u=l.shape,f=n?"height":"width";u[f]=0}return l},polar:function(A,e,t,r,n,i,a,o,s){var l=!n&&s?aC:Ti,u=new l({shape:r,z2:1});u.name="item";var f=cC(n);if(u.calculateTextPosition=ZL(f,{isRoundCap:l===aC}),i){var c=u.shape,h=n?"r":"endAngle",v={};c[h]=n?r.r0:r.startAngle,v[h]=r[h],(o?Et:lA)(u,{shape:v},i)}return u}};function eM(A,e){var t=A.get("realtimeSort",!0),r=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&t&&(r.type!=="category"&&xt("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&xt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),t&&r.type==="category"&&e.type==="cartesian2d")return{baseAxis:r,otherAxis:e.getOtherAxis(r)}}function lC(A,e,t,r,n,i,a,o){var s,l;i?(l={x:r.x,width:r.width},s={y:r.y,height:r.height}):(l={y:r.y,height:r.height},s={x:r.x,width:r.width}),o||(a?Et:lA)(t,{shape:s},e,n,null);var u=e?A.baseAxis.model:null;(a?Et:lA)(t,{shape:l},u,n)}function uC(A,e){for(var t=0;t<e.length;t++)if(!isFinite(A[e[t]]))return!0;return!1}var tM=["x","y","width","height"],AM=["cx","cy","r","startAngle","endAngle"],fC={cartesian2d:function(A){return!uC(A,tM)},polar:function(A){return!uC(A,AM)}},Bu={cartesian2d:function(A,e,t){var r=A.getItemLayout(e);if(!r)return null;var n=t?nM(t,r):0,i=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+i*n/2,y:r.y+a*n/2,width:r.width-i*n,height:r.height-a*n}},polar:function(A,e,t){var r=A.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function rM(A){return A.startAngle!=null&&A.endAngle!=null&&A.startAngle===A.endAngle}function cC(A){return(function(e){var t=e?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+t;default:return r}}})(A)}function hC(A,e,t,r,n,i,a,o){var s=e.getItemVisual(t,"style");if(o){if(!i.get("roundCap")){var u=A.shape,f=qL(r.getModel("itemStyle"),u);Y(u,f),A.setShape(u)}}else{var l=r.get(["itemStyle","borderRadius"])||0;A.setShape("r",l)}A.useStyle(s);var c=r.getShallow("cursor");c&&A.attr("cursor",c);var h=o?a?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":a?n.height>=0?"bottom":"top":n.width>=0?"right":"left",v=gl(r);pl(A,v,{labelFetcher:i,labelDataIndex:t,defaultText:Zv(i.getData(),t),inheritColor:s.fill,defaultOpacity:s.opacity,defaultOutsidePosition:h});var d=A.getTextContent();if(o&&d){var g=r.get(["label","position"]);A.textConfig.inside=g==="middle"?!0:null,JL(A,g==="outside"?h:g,cC(a),r.get(["label","rotate"]))}uS(d,v,i.getRawValue(t),function(B){return zw(e,B)});var p=r.getModel(["emphasis"]);js(A,p.get("focus"),p.get("blurScope"),p.get("disabled")),ih(A,r),rM(n)&&(A.style.fill="none",A.style.stroke="none",b(A.states,function(B){B.style&&(B.style.fill=B.style.stroke="none")}))}function nM(A,e){var t=A.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var r=A.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,n,i)}var iM=(function(){function A(){}return A})(),vC=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="largeBar",r}return e.prototype.getDefaultShape=function(){return new iM},e.prototype.buildPath=function(t,r){for(var n=r.points,i=this.baseDimIdx,a=1-this.baseDimIdx,o=[],s=[],l=this.barWidth,u=0;u<n.length;u+=3)s[i]=l,s[a]=n[u+2],o[i]=n[u+i],o[a]=n[u+a],t.rect(o[0],o[1],s[0],s[1])},e})(ke);function dC(A,e,t,r){var n=A.getData(),i=n.getLayout("valueAxisHorizontal")?1:0,a=n.getLayout("largeDataIndices"),o=n.getLayout("size"),s=A.getModel("backgroundStyle"),l=n.getLayout("largeBackgroundPoints");if(l){var u=new vC({shape:{points:l},incremental:!!r,silent:!0,z2:0});u.baseDimIdx=i,u.largeDataIndices=a,u.barWidth=o,u.useStyle(s.getItemStyle()),e.add(u),t&&t.push(u)}var f=new vC({shape:{points:n.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=i,f.largeDataIndices=a,f.barWidth=o,e.add(f),f.useStyle(n.getVisual("style")),f.style.stroke=null,Le(f).seriesIndex=A.seriesIndex,A.get("silent")||(f.on("mousedown",pC),f.on("mousemove",pC)),t&&t.push(f)}var pC=av(function(A){var e=this,t=aM(e,A.offsetX,A.offsetY);Le(e).dataIndex=t>=0?t:null},30,!1);function aM(A,e,t){for(var r=A.baseDimIdx,n=1-r,i=A.shape.points,a=A.largeDataIndices,o=[],s=[],l=A.barWidth,u=0,f=i.length/3;u<f;u++){var c=u*3;if(s[r]=l,s[n]=i[c+2],o[r]=i[c+r],o[n]=i[c+n],s[n]<0&&(o[n]+=s[n],s[n]=-s[n]),e>=o[0]&&e<=o[0]+s[0]&&t>=o[1]&&t<=o[1]+s[1])return a[u]}return-1}function gC(A,e,t){if(jv(t,"cartesian2d")){var r=e,n=t.getArea();return{x:A?r.x:n.x,y:A?n.y:r.y,width:A?r.width:n.width,height:A?n.height:r.height}}else{var n=t.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:A?n.r0:i.r0,r:A?n.r:i.r,startAngle:A?i.startAngle:0,endAngle:A?i.endAngle:Math.PI*2}}}function oM(A,e,t){var r=A.type==="polar"?Ti:qe;return new r({shape:gC(e,t,A),silent:!0,z2:0})}function sM(A){A.registerChartView(jL),A.registerSeriesModel(YL),A.registerLayout(A.PRIORITY.VISUAL.LAYOUT,nt(wD,"bar")),A.registerLayout(A.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,CD("bar")),A.registerProcessor(A.PRIORITY.PROCESSOR.STATISTIC,iC("bar")),A.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var BC={left:0,right:0,top:0,bottom:0},mu=["25%","25%"],lM=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,r){var n=Ni(t.outerBounds);A.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&t.outerBounds&&Mr(t.outerBounds,n)},e.prototype.mergeOption=function(t,r){A.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Mr(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:BC,outerBoundsContain:"all",outerBoundsClampWidth:mu[0],outerBoundsClampHeight:mu[1],backgroundColor:oe.color.transparent,borderWidth:1,borderColor:oe.color.neutral30},e})(Re),nd=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Mt).models[0]},e.type="cartesian2dAxis",e})(Re);DA(nd,VD);var mC={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:oe.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:oe.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:oe.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[oe.color.backgroundTint,oe.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:oe.color.neutral00,borderColor:oe.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},uM=Oe({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},mC),id=Oe({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:oe.color.axisMinorSplitLine,width:1}}},mC),fM=Oe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},id),cM=Ne({logBase:10},id);const hM={category:uM,value:id,time:fM,log:cM};var vM={value:1,category:1,time:1,log:1},dM=null;function pM(){return dM}function yC(A,e,t,r){b(vM,function(n,i){var a=Oe(Oe({},hM[i],!0),r,!0),o=(function(s){J(l,s);function l(){var u=s!==null&&s.apply(this,arguments)||this;return u.type=e+"Axis."+i,u}return l.prototype.mergeDefaultAndTheme=function(u,f){var c=Za(this),h=c?Ni(u):{},v=f.getTheme();Oe(u,v.get(i+"Axis")),Oe(u,this.getDefaultOption()),u.type=wC(u),c&&Mr(u,h,c)},l.prototype.optionUpdated=function(){var u=this.option;u.type==="category"&&(this.__ordinalMeta=Hv.createByAxisModel(this))},l.prototype.getCategories=function(u){var f=this.option;if(f.type==="category")return u?f.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.prototype.updateAxisBreaks=function(u){return{breaks:[]}},l.type=e+"Axis."+i,l.defaultOption=a,l})(t);A.registerComponentModel(o)}),A.registerSubTypeDefaulter(e+"Axis",wC)}function wC(A){return A.type||(A.data?"category":"value")}var gM=(function(){function A(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return A.prototype.getAxis=function(e){return this._axes[e]},A.prototype.getAxes=function(){return Be(this._dimList,function(e){return this._axes[e]},this)},A.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),rt(this.getAxes(),function(t){return t.scale.type===e})},A.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},A})(),ad=["x","y"];function CC(A){return(A.type==="interval"||A.type==="time")&&!A.hasBreaks()}var BM=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=ad,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!CC(t)||!CC(r))){var n=t.getExtent(),i=r.getExtent(),a=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),s=n[1]-n[0],l=i[1]-i[0];if(!(!s||!l)){var u=(o[0]-a[0])/s,f=(o[1]-a[1])/l,c=a[0]-n[0]*u,h=a[1]-i[0]*f,v=this._transform=[u,0,0,f,c,h];this._invTransform=vi([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var r=this.getAxis("x"),n=this.getAxis("y");return r.contain(r.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,r){var n=this.dataToPoint(t),i=this.dataToPoint(r),a=this.getArea(),o=new Fe(n[0],n[1],i[0]-n[0],i[1]-n[1]);return a.intersect(o)},e.prototype.dataToPoint=function(t,r,n){n=n||[];var i=t[0],a=t[1];if(this._transform&&i!=null&&isFinite(i)&&a!=null&&isFinite(a))return tA(n,t,this._transform);var o=this.getAxis("x"),s=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,r)),n[1]=s.toGlobalCoord(s.dataToCoord(a,r)),n},e.prototype.clampData=function(t,r){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,a=n.getExtent(),o=i.getExtent(),s=n.parse(t[0]),l=i.parse(t[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),r[1]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),r},e.prototype.pointToData=function(t,r,n){if(n=n||[],this._invTransform)return tA(n,t,this._invTransform);var i=this.getAxis("x"),a=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),r),n[1]=a.coordToData(a.toLocalCoord(t[1]),r),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1])-t,a=Math.min(n[0],n[1])-t,o=Math.max(r[0],r[1])-i+t,s=Math.max(n[0],n[1])-a+t;return new Fe(i,a,o,s)},e})(gM),mM=(function(A){J(e,A);function e(t,r,n,i,a){var o=A.call(this,t,r,n)||this;return o.index=0,o.type=i||"value",o.position=a||"bottom",o}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),t&&r[0]>r[1]&&r.reverse(),r},e.prototype.pointToData=function(t,r){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),r)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(AL),yM="expandAxisBreak",zr=Math.PI,wM=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],CM=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],yo=ze(),_C=ze(),QC=(function(){function A(e){this.recordMap={},this.resolveAxisNameOverlap=e}return A.prototype.ensureRecord=function(e){var t=e.axis.dim,r=e.componentIndex,n=this.recordMap,i=n[t]||(n[t]=[]);return i[r]||(i[r]={ready:{}})},A})();function _M(A,e,t,r){var n=t.axis,i=e.ensureRecord(t),a=[],o,s=sd(A.axisName)&&$i(A.nameLocation);b(r,function(v){var d=kr(v);if(!(!d||d.label.ignore)){a.push(d);var g=i.transGroup;s&&(g.transform?vi(wo,g.transform):Gf(wo),d.transform&&ga(wo,wo,d.transform),Fe.copy(yu,d.localRect),yu.applyTransform(wo),o?o.union(yu):Fe.copy(o=new Fe(0,0,0,0),yu))}});var l=Math.abs(i.dirVec.x)>.1?"x":"y",u=i.transGroup[l];if(a.sort(function(v,d){return Math.abs(v.label[l]-u)-Math.abs(d.label[l]-u)}),s&&o){var f=n.getExtent(),c=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-c;o.union(new Fe(c,0,h,1))}i.stOccupiedRect=o,i.labelInfoList=a}var wo=nr(),yu=new Fe(0,0,0,0),xC=function(A,e,t,r,n,i){if($i(A.nameLocation)){var a=i.stOccupiedRect;a&&FC(dL({},a,i.transGroup.transform),r,n)}else EC(i.labelInfoList,i.dirVec,r,n)};function FC(A,e,t){var r=new be;Wv(A,e,r,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&pL(e,r)}function EC(A,e,t,r){for(var n=be.dot(r,e)>=0,i=0,a=A.length;i<a;i++){var o=A[n?i:a-1-i];o.label.ignore||FC(o,t,r)}}var Wr=(function(){function A(e,t,r,n){this.group=new lt,this._axisModel=e,this._api=t,this._local={},this._shared=n||new QC(xC),this._resetCfgDetermined(r)}return A.prototype.updateCfg=function(e){if(process.env.NODE_ENV!=="production"){var t=this._shared.ensureRecord(this._axisModel).ready;fe(!t.axisLine&&!t.axisTickLabelDetermine),t.axisName=t.axisTickLabelEstimate=!1}var r=this._cfg.raw;r.position=e.position,r.labelOffset=e.labelOffset,this._resetCfgDetermined(r)},A.prototype.__getRawCfg=function(){return this._cfg.raw},A.prototype._resetCfgDetermined=function(e){var t=this._axisModel,r=t.getDefaultOption?t.getDefaultOption():{},n=ve(e.axisName,t.get("name")),i=t.get("nameMoveOverlap");(i==null||i==="auto")&&(i=ve(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:ve(e.nameDirection,1),tickDirection:ve(e.tickDirection,1),labelDirection:ve(e.labelDirection,1),labelOffset:ve(e.labelOffset,0),silent:ve(e.silent,!0),axisName:n,nameLocation:Cr(t.get("nameLocation"),r.nameLocation,"end"),shouldNameMoveOverlap:sd(n)&&i,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(fe(a.position!=null),fe(a.rotation!=null)),this._cfg=a;var o=new lt({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new be(Math.cos(-a.rotation),Math.sin(-a.rotation))},A.prototype.build=function(e,t){var r=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),b(QM,function(n){e[n]&&xM[n](r._cfg,r._local,r._shared,r._axisModel,r.group,r._transformGroup,r._api,t||{})}),this},A.innerTextLayout=function(e,t,r){var n=Pg(t-e),i,a;return Is(n)?(a=r>0?"top":"bottom",i="center"):Is(n-zr)?(a=r>0?"bottom":"top",i="center"):(a="middle",n>0&&n<zr?i=r>0?"right":"left":i=r>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:a}},A.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},A.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},A})(),QM=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],xM={axisLine:function(A,e,t,r,n,i,a){if(process.env.NODE_ENV!=="production"){var o=t.ensureRecord(r).ready;fe(!o.axisLine),o.axisLine=!0}var s=r.get(["axisLine","show"]);if(s==="auto"&&(s=!0,A.raw.axisLineAutoShow!=null&&(s=!!A.raw.axisLineAutoShow)),!!s){var l=r.axis.getExtent(),u=i.transform,f=[l[0],0],c=[l[1],0],h=f[0]>c[0];u&&(tA(f,f,u),tA(c,c,u));var v=Y({lineCap:"round"},r.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:A.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(r.get(["axisLine","breakLine"])&&r.axis.scale.hasBreaks())pM().buildAxisBreakLine(r,n,i,d);else{var g=new Tr(Y({shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]}},d));Va(g.shape,g.style.lineWidth),g.anid="line",n.add(g)}var p=r.get(["axisLine","symbol"]);if(p!=null){var B=r.get(["axisLine","symbolSize"]);le(p)&&(p=[p,p]),(le(B)||Ye(B))&&(B=[B,B]);var m=sy(r.get(["axisLine","symbolOffset"])||0,B),y=B[0],_=B[1];b([{rotate:A.rotation+Math.PI/2,offset:m[0],r:0},{rotate:A.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-c[0])*(f[0]-c[0])+(f[1]-c[1])*(f[1]-c[1]))}],function(C,Q){if(p[Q]!=="none"&&p[Q]!=null){var x=Or(p[Q],-y/2,-_/2,y,_,v.stroke,!0),F=C.r+C.offset,S=h?c:f;x.attr({rotation:C.rotate,x:S[0]+F*Math.cos(A.rotation),y:S[1]-F*Math.sin(A.rotation),silent:!0,z2:11}),n.add(x)}})}}},axisTickLabelEstimate:function(A,e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=t.ensureRecord(r).ready;fe(!s.axisTickLabelDetermine),s.axisTickLabelEstimate=!0}var l=UC(e,n,o);l&&bC(A,e,t,r,n,i,a,bA.estimate)},axisTickLabelDetermine:function(A,e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=t.ensureRecord(r).ready;s.axisTickLabelDetermine=!0}var l=UC(e,n,o);l&&bC(A,e,t,r,n,i,a,bA.determine);var u=SM(A,n,i,r);bM(A,e.labelLayoutList,u),UM(A,n,i,r,A.tickDirection)},axisName:function(A,e,t,r,n,i,a,o){var s=t.ensureRecord(r);if(process.env.NODE_ENV!=="production"){var l=s.ready;fe(l.axisTickLabelEstimate||l.axisTickLabelDetermine),l.axisName=!0}e.nameEl&&(n.remove(e.nameEl),e.nameEl=s.nameLayout=s.nameLocation=null);var u=A.axisName;if(sd(u)){var f=A.nameLocation,c=A.nameDirection,h=r.getModel("nameTextStyle"),v=r.get("nameGap")||0,d=r.axis.getExtent(),g=r.axis.inverse?-1:1,p=new be(0,0),B=new be(0,0);f==="start"?(p.x=d[0]-g*v,B.x=-g):f==="end"?(p.x=d[1]+g*v,B.x=g):(p.x=(d[0]+d[1])/2,p.y=A.labelOffset+c*v,B.y=c);var m=nr();B.transform(Wf(m,m,A.rotation));var y=r.get("nameRotate");y!=null&&(y=y*zr/180);var _,C;$i(f)?_=Wr.innerTextLayout(A.rotation,y??A.rotation,c):(_=FM(A.rotation,f,y||0,d),C=A.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(_.rotation)),!isFinite(C)&&(C=null)));var Q=h.getFont(),x=r.get("nameTruncate",!0)||{},F=x.ellipsis,S=oi(A.raw.nameTruncateMaxWidth,x.maxWidth,C),E=o.nameMarginLevel||0,I=new Ot({x:p.x,y:p.y,rotation:_.rotation,silent:Wr.isLabelSilent(r),style:In(h,{text:u,font:Q,overflow:"truncate",width:S,ellipsis:F,fill:h.getTextColor()||r.get(["axisLine","lineStyle","color"]),align:h.get("align")||_.textAlign,verticalAlign:h.get("verticalAlign")||_.textVerticalAlign}),z2:1});if(cl({el:I,componentModel:r,itemName:u}),I.__fullText=u,I.anid="name",r.get("triggerEvent")){var U=Wr.makeAxisEventDataBase(r);U.targetType="axisName",U.name=u,Le(I).eventData=U}i.add(I),I.updateTransform(),e.nameEl=I;var T=s.nameLayout=kr({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:$i(f)?wM[E]:CM[E]});if(s.nameLocation=f,n.add(I),I.decomposeTransform(),A.shouldNameMoveOverlap&&T){var L=t.ensureRecord(r);process.env.NODE_ENV!=="production"&&fe(L.labelInfoList),t.resolveAxisNameOverlap(A,t,r,T,B,L)}}}};function bC(A,e,t,r,n,i,a,o){IC(e)||IM(A,e,n,o,r,a);var s=e.labelLayoutList;TM(A,r,s,i),A.rotation;var l=A.optionHideOverlap;EM(r,s,l),l&&Kw(rt(s,function(u){return u&&!u.label.ignore})),_M(A,t,r,s)}function FM(A,e,t,r){var n=Pg(t-A),i,a,o=r[0]>r[1],s=e==="start"&&!o||e!=="start"&&o;return Is(n-zr/2)?(a=s?"bottom":"top",i="center"):Is(n-zr*1.5)?(a=s?"top":"bottom",i="center"):(a="middle",n<zr*1.5&&n>zr/2?i=s?"left":"right":i=s?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:a}}function EM(A,e,t){if(Cw(A.axis))return;function r(o,s,l){var u=kr(e[s]),f=kr(e[l]);if(!(!u||!f)){if(o===!1||u.suggestIgnore){Co(u.label);return}if(f.suggestIgnore){Co(f.label);return}var c=.1;if(!t){var h=[0,0,0,0];u=zv({marginForce:h},u),f=zv({marginForce:h},f)}Wv(u,f,null,{touchThreshold:c})&&Co(o?f.label:u.label)}}var n=A.get(["axisLabel","showMinLabel"]),i=A.get(["axisLabel","showMaxLabel"]),a=e.length;r(n,0,1),r(i,a-1,a-2)}function bM(A,e,t){A.showMinorTicks||b(e,function(r){if(r&&r.label.ignore)for(var n=0;n<t.length;n++){var i=t[n],a=_C(i),o=yo(r.label);if(a.tickValue!=null&&!a.onBand&&a.tickValue===o.tickValue){Co(i);return}}})}function Co(A){A&&(A.ignore=!0)}function SC(A,e,t,r,n){for(var i=[],a=[],o=[],s=0;s<A.length;s++){var l=A[s].coord;a[0]=l,a[1]=0,o[0]=l,o[1]=t,e&&(tA(a,a,e),tA(o,o,e));var u=new Tr({shape:{x1:a[0],y1:a[1],x2:o[0],y2:o[1]},style:r,z2:2,autoBatch:!0,silent:!0});Va(u.shape,u.style.lineWidth),u.anid=n+"_"+A[s].tickValue,i.push(u);var f=_C(u);f.onBand=!!A[s].onBand,f.tickValue=A[s].tickValue}return i}function SM(A,e,t,r){var n=r.axis,i=r.getModel("axisTick"),a=i.get("show");if(a==="auto"&&(a=!0,A.raw.axisTickAutoShow!=null&&(a=!!A.raw.axisTickAutoShow)),!a||n.scale.isBlank())return[];for(var o=i.getModel("lineStyle"),s=A.tickDirection*i.get("length"),l=n.getTicksCoords(),u=SC(l,t.transform,s,Ne(o.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<u.length;f++)e.add(u[f]);return u}function UM(A,e,t,r,n){var i=r.axis,a=r.getModel("minorTick");if(!(!A.showMinorTicks||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=n*a.get("length"),u=Ne(s.getLineStyle(),Ne(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var c=SC(o[f],t.transform,l,u,"minorticks_"+f),h=0;h<c.length;h++)e.add(c[h])}}function UC(A,e,t){if(IC(A)){var r=A.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&fe(A.labelGroup&&r);var n=r.out.noPxChangeTryDetermine;if(t.noPxChange){for(var i=!0,a=0;a<n.length;a++)i=i&&n[a]();if(i)return!1}n.length&&(e.remove(A.labelGroup),od(A,null,null,null))}return!0}function IM(A,e,t,r,n,i){var a=n.axis,o=oi(A.raw.axisLabelShow,n.get(["axisLabel","show"])),s=new lt;t.add(s);var l=fu(r);if(!o||a.scale.isBlank()){od(e,[],s,l);return}var u=n.getModel("axisLabel"),f=a.getViewLabels(l),c=(oi(A.raw.labelRotate,u.get("rotate"))||0)*zr/180,h=Wr.innerTextLayout(A.rotation,c,A.labelDirection),v=n.getCategories&&n.getCategories(!0),d=[],g=n.get("triggerEvent"),p=1/0,B=-1/0;b(f,function(y,_){var C,Q=a.scale.type==="ordinal"?a.scale.getRawOrdinalNumber(y.tickValue):y.tickValue,x=y.formattedLabel,F=y.rawLabel,S=u;if(v&&v[Q]){var E=v[Q];he(E)&&E.textStyle&&(S=new et(E.textStyle,u,n.ecModel))}var I=S.getTextColor()||n.get(["axisLine","lineStyle","color"]),U=S.getShallow("align",!0)||h.textAlign,T=ve(S.getShallow("alignMinLabel",!0),U),L=ve(S.getShallow("alignMaxLabel",!0),U),P=S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||h.textVerticalAlign,Z=ve(S.getShallow("verticalAlignMinLabel",!0),P),V=ve(S.getShallow("verticalAlignMaxLabel",!0),P),X=10+(((C=y.time)===null||C===void 0?void 0:C.level)||0);p=Math.min(p,X),B=Math.max(B,X);var ee=new Ot({x:0,y:0,rotation:0,silent:Wr.isLabelSilent(n),z2:X,style:In(S,{text:x,align:_===0?T:_===f.length-1?L:U,verticalAlign:_===0?Z:_===f.length-1?V:P,fill:me(I)?I(a.type==="category"?F:a.type==="value"?Q+"":Q,_):I})});ee.anid="label_"+Q;var te=yo(ee);if(te.break=y.break,te.tickValue=Q,te.layoutRotation=h.rotation,cl({el:ee,componentModel:n,itemName:x,formatterParamsExtra:{isTruncated:function(){return ee.isTruncated},value:F,tickIndex:_}}),g){var D=Wr.makeAxisEventDataBase(n);D.targetType="axisLabel",D.value=F,D.tickIndex=_,y.break&&(D.break={start:y.break.parsedBreak.vmin,end:y.break.parsedBreak.vmax}),a.type==="category"&&(D.dataIndex=Q),Le(ee).eventData=D,y.break&&LM(n,i,ee,y.break)}d.push(ee),s.add(ee)});var m=Be(d,function(y){return{label:y,priority:yo(y).break?y.z2+(B-p+1):y.z2,defaultAttr:{ignore:y.ignore}}});od(e,m,s,l)}function IC(A){return!!A.labelLayoutList}function od(A,e,t,r){A.labelLayoutList=e,A.labelGroup=t,A.axisLabelsCreationContext=r}function TM(A,e,t,r){var n=e.get(["axisLabel","margin"]);b(t,function(i,a){var o=kr(i);if(o){var s=o.label,l=yo(s);o.suggestIgnore=s.ignore,s.ignore=!1,wc(dr,DM),dr.x=e.axis.dataToCoord(l.tickValue),dr.y=A.labelOffset+A.labelDirection*n,dr.rotation=l.layoutRotation,r.add(dr),dr.updateTransform(),r.remove(dr),dr.decomposeTransform(),wc(s,dr),s.markRedraw(),hu(o,!0),kr(o)}})}var dr=new qe,DM=new qe;function sd(A){return!!A}function LM(A,e,t,r){t.on("click",function(n){var i={type:yM,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[A.axis.dim+"AxisIndex"]=A.componentIndex,e.dispatchAction(i)})}function Ik(A,e,t){}function wu(A,e,t){t=t||{};var r=e.axis,n={},i=r.getAxesOnZeroOf()[0],a=r.position,o=i?"onZero":a,s=r.dim,l=[A.x,A.x+A.width,A.y,A.y+A.height],u={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,c=s==="x"?[l[2]-f,l[3]+f]:[l[0]-f,l[1]+f];if(i){var h=i.toGlobalCoord(i.dataToCoord(0));c[u.onZero]=Math.max(Math.min(h,c[1]),c[0])}n.position=[s==="y"?c[u[o]]:l[0],s==="x"?c[u[o]]:l[3]],n.rotation=Math.PI/2*(s==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=v[a],n.labelOffset=i?c[u[a]]-c[u.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),oi(t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var d=e.get(["axisLabel","rotate"]);return n.labelRotate=o==="top"?-d:d,n.z2=1,n}function MM(A){return A.coordinateSystem&&A.coordinateSystem.type==="cartesian2d"}function TC(A){var e={xAxisModel:null,yAxisModel:null};return b(e,function(t,r){var n=r.replace(/Model$/,""),i=A.getReferringComponents(n,Mt).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error(n+' "'+Cr(A.get(n+"Index"),A.get(n+"Id"),0)+'" not found');e[r]=i}),e}function HM(A,e,t,r,n,i){for(var a=wu(A,t),o=!1,s=!1,l=0;l<e.length;l++)Tv(e[l].getOtherAxis(t.axis).scale)&&(o=s=!0,t.axis.type==="category"&&t.axis.onBand&&(s=!1));return a.axisLineAutoShow=o,a.axisTickAutoShow=s,a.defaultNameMoveOverlap=i,new Wr(t,r,a,n)}function OM(A,e,t){var r=wu(e,t);if(process.env.NODE_ENV!=="production"){var n=A.__getRawCfg();b(Xe(r),function(i){i!=="position"&&i!=="labelOffset"&&fe(r[i]===n[i])})}A.updateCfg(r)}function RM(A,e,t){var r,n=qi.prototype,i=n.getTicks.call(t),a=n.getTicks.call(t,{expandToNicedExtent:!0}),o=i.length-1,s=n.getInterval.call(t),l=yw(A,e),u=l.extent,f=l.fixMin,c=l.fixMax;A.type==="log"&&(u=Mv(A.base,u,!0)),A.setBreaksFromOption(Qw(e)),A.setExtent(u[0],u[1]),A.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var h=n.getExtent.call(A);f&&(u[0]=h[0]),c&&(u[1]=h[1]);var v=n.getInterval.call(A),d=u[0],g=u[1];if(f&&c)v=(g-d)/o;else if(f)for(g=u[0]+v*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)v=Dv(v),g=u[0]+v*o;else if(c)for(d=u[1]-v*o;d>u[0]&&isFinite(d)&&isFinite(u[0]);)v=Dv(v),d=u[1]-v*o;else{var p=A.getTicks().length-1;p>o&&(v=Dv(v));var B=v*o;g=Math.ceil(u[1]/v)*v,d=wt(g-B),d<0&&u[0]>=0?(d=0,g=wt(B)):g>0&&u[1]<=0&&(g=0,d=-wt(B))}var m=(i[0].value-a[0].value)/s,y=(i[o].value-a[o].value)/s;if(n.setExtent.call(A,d+v*m,g+v*y),n.setInterval.call(A,v),(m||y)&&n.setNiceExtent.call(A,d+v,g-v),process.env.NODE_ENV!=="production"){var _=n.getTicks.call(A);_[1]&&(!uD(v)||bc(_[1].value)>bc(v))&&xt("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+(" and alignTicks: true. ("+((r=e.axis)===null||r===void 0?void 0:r.dim)+"AxisIndex: "+e.componentIndex+")"),!0)}}var DC=[[3,1],[0,2]],NM=(function(){function A(e,t,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ad,this._initCartesian(e,t,r),this.model=e}return A.prototype.getRect=function(){return this._rect},A.prototype.update=function(e,t){var r=this._axesMap;this._updateScale(e,this.model);function n(a){var o,s=Xe(a),l=s.length;if(l){for(var u=[],f=l-1;f>=0;f--){var c=+s[f],h=a[c],v=h.model,d=h.scale;Tv(d)&&v.get("alignTicks")&&v.get("interval")==null?u.push(h):(ww(d,v),Tv(d)&&(o=h))}u.length&&(o||(o=u.pop(),ww(o.scale,o.model)),b(u,function(g){RM(g.scale,g.model,o.scale)}))}}n(r.x),n(r.y);var i={};b(r.x,function(a){LC(r,"y",a,i)}),b(r.y,function(a){LC(r,"x",a,i)}),this.resize(this.model,t)},A.prototype.resize=function(e,t,r){var n=Vh(e,t),i=this._rect=Ri(e.getBoxLayoutParams(),n.refContainer),a=this._axesMap,o=this._coordsList,s=e.get("containLabel");if(HC(a,i),!r){var l=kM(i,o,a,s,t),u=void 0;if(s)process.env.NODE_ENV!=="production"&&Yg("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),u=RC(i.clone(),"axisLabel",null,i,a,l,n);else{var f=VM(e,i,n),c=f.outerBoundsRect,h=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;c&&(u=RC(c,h,v,i,a,l,n))}NC(i,a,bA.determine,null,u,n)}b(this._coordsList,function(d){d.calcAffineTransform()})},A.prototype.getAxis=function(e,t){var r=this._axesMap[e];if(r!=null)return r[t||0]},A.prototype.getAxes=function(){return this._axesList.slice()},A.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var r="x"+e+"y"+t;return this._coordsMap[r]}he(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n<i.length;n++)if(i[n].getAxis("x").index===e||i[n].getAxis("y").index===t)return i[n]},A.prototype.getCartesians=function(){return this._coordsList.slice()},A.prototype.convertToPixel=function(e,t,r){var n=this._findConvertTarget(t);return n.cartesian?n.cartesian.dataToPoint(r):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(r)):null},A.prototype.convertFromPixel=function(e,t,r){var n=this._findConvertTarget(t);return n.cartesian?n.cartesian.pointToData(r):n.axis?n.axis.coordToData(n.axis.toLocalCoord(r)):null},A.prototype._findConvertTarget=function(e){var t=e.seriesModel,r=e.xAxisModel||t&&t.getReferringComponents("xAxis",Mt).models[0],n=e.yAxisModel||t&&t.getReferringComponents("yAxis",Mt).models[0],i=e.gridModel,a=this._coordsList,o,s;if(t)o=t.coordinateSystem,Te(a,o)<0&&(o=null);else if(r&&n)o=this.getCartesian(r.componentIndex,n.componentIndex);else if(r)s=this.getAxis("x",r.componentIndex);else if(n)s=this.getAxis("y",n.componentIndex);else if(i){var l=i.coordinateSystem;l===this&&(o=this._coordsList[0])}return{cartesian:o,axis:s}},A.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},A.prototype._initCartesian=function(e,t,r){var n=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,b(o.x,function(u,f){b(o.y,function(c,h){var v="x"+f+"y"+h,d=new BM(v);d.master=n,d.model=e,n._coordsMap[v]=d,n._coordsList.push(d),d.addAxis(u),d.addAxis(c)})});function l(u){return function(f,c){if(ld(f,e)){var h=f.get("position");u==="x"?h!=="top"&&h!=="bottom"&&(h=a.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=a.left?"right":"left"),a[h]=!0;var v=new mM(u,ND(f),[0,0],f.get("type"),h),d=v.type==="category";v.onBand=d&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=i,v.index=c,i._axesList.push(v),o[u][c]=v,s[u]++}}}},A.prototype._updateScale=function(e,t){b(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var i=n.model.get("categorySortInfo");n.scale.setSortInfo(i)}}),e.eachSeries(function(n){if(MM(n)){var i=TC(n),a=i.xAxisModel,o=i.yAxisModel;if(!ld(a,t)||!ld(o,t))return;var s=this.getCartesian(a.componentIndex,o.componentIndex),l=n.getData(),u=s.getAxis("x"),f=s.getAxis("y");r(l,u),r(l,f)}},this);function r(n,i){b(_w(n,i.dim),function(a){i.scale.unionExtentFromData(n,a)})}},A.prototype.getTooltipAxes=function(e){var t=[],r=[];return b(this.getCartesians(),function(n){var i=e!=null&&e!=="auto"?n.getAxis(e):n.getBaseAxis(),a=n.getOtherAxis(i);Te(t,i)<0&&t.push(i),Te(r,a)<0&&r.push(a)}),{baseAxes:t,otherAxes:r}},A.create=function(e,t){var r=[];return e.eachComponent("grid",function(n,i){var a=new A(n,e,t);a.name="grid_"+i,a.resize(n,t,!0),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){kS({targetModel:n,coordSysType:"cartesian2d",coordSysProvider:i});function i(){var a=TC(n),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!l)throw new Error('Grid "'+Cr(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var u=l.coordinateSystem;return u.getCartesian(o.componentIndex,s.componentIndex)}}),r},A.dimensions=ad,A})();function ld(A,e){return A.getCoordSysModel()===e}function LC(A,e,t,r){t.getAxesOnZeroOf=function(){return i?[i]:[]};var n=A[e],i,a=t.model,o=a.get(["axisLine","onZero"]),s=a.get(["axisLine","onZeroAxisIndex"]);if(!o)return;if(s!=null)MC(n[s])&&(i=n[s]);else for(var l in n)if(n.hasOwnProperty(l)&&MC(n[l])&&!r[u(n[l])]){i=n[l];break}i&&(r[u(i)]=!0);function u(f){return f.dim+"_"+f.index}}function MC(A){return A&&A.type!=="category"&&A.type!=="time"&&PD(A)}function PM(A,e){var t=A.getExtent(),r=t[0]+t[1];A.toGlobalCoord=A.dim==="x"?function(n){return n+e}:function(n){return r-n+e},A.toLocalCoord=A.dim==="x"?function(n){return n-e}:function(n){return r-n+e}}function HC(A,e){b(A.x,function(t){return OC(t,e.x,e.width)}),b(A.y,function(t){return OC(t,e.y,e.height)})}function OC(A,e,t){var r=[0,t],n=A.inverse?1:0;A.setExtent(r[n],r[1-n]),PM(A,e)}function RC(A,e,t,r,n,i,a){process.env.NODE_ENV!=="production"&&fe(e==="all"||e==="axisLabel"),NC(r,n,bA.estimate,e,!1,a);var o=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var s=rx(o,function(c){return c>0})==null;return fl(r,o,!0,!0,t),HC(n,r),s;function l(c){b(n[Dr[c]],function(h){if(po(h.model)){var v=i.ensureRecord(h.model),d=v.labelInfoList;if(d)for(var g=0;g<d.length;g++){var p=d[g],B=h.scale.normalize(yo(p.label).tickValue);B=c===1?1-B:B,u(p.rect,c,B),u(p.rect,1-c,NaN)}var m=v.nameLayout;if(m){var B=$i(v.nameLocation)?.5:NaN;u(m.rect,c,B),u(m.rect,1-c,NaN)}}})}function u(c,h,v){var d=A[Dr[h]]-c[Dr[h]],g=c[Li[h]]+c[Dr[h]]-(A[Li[h]]+A[Dr[h]]);d=f(d,1-v),g=f(g,v);var p=DC[h][0],B=DC[h][1];o[p]=Jt(o[p],d),o[B]=Jt(o[B],g)}function f(c,h){return c>0&&!ai(h)&&h>1e-4&&(c/=h),c}}function kM(A,e,t,r,n){var i=new QC(KM);return b(t,function(a){return b(a,function(o){if(po(o.model)){var s=!r;o.axisBuilder=HM(A,e,o.model,n,i,s)}})}),i}function NC(A,e,t,r,n,i){var a=t===bA.determine;b(e,function(l){return b(l,function(u){po(u.model)&&(OM(u.axisBuilder,A,u.model),u.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var o={x:0,y:0};s(0),s(1);function s(l){o[Dr[1-l]]=A[Li[l]]<=i.refContainer[Li[l]]*.5?0:1-l===1?2:1}b(e,function(l,u){return b(l,function(f){po(f.model)&&((r==="all"||a)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:o[u]}),a&&f.axisBuilder.build({axisLine:!0}))})})}function VM(A,e,t){var r,n=A.get("outerBoundsMode",!0);n==="same"?r=e.clone():n==null||n==="auto"?r=Ri(A.get("outerBounds",!0)||BC,t.refContainer):n!=="none"&&process.env.NODE_ENV!=="production"&&Ge("Invalid grid["+A.componentIndex+"].outerBoundsMode.");var i=A.get("outerBoundsContain",!0),a;i==null||i==="auto"?a="all":Te(["all","axisLabel"],i)<0?(process.env.NODE_ENV!=="production"&&Ge("Invalid grid["+A.componentIndex+"].outerBoundsContain."),a="all"):a=i;var o=[Ec(ve(A.get("outerBoundsClampWidth",!0),mu[0]),e.width),Ec(ve(A.get("outerBoundsClampHeight",!0),mu[1]),e.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:a,outerBoundsClamp:o}}var KM=function(A,e,t,r,n,i){var a=t.axis.dim==="x"?"y":"x";xC(A,e,t,r,n,i),$i(A.nameLocation)||b(e.recordMap[a],function(o){o&&o.labelInfoList&&o.dirVec&&EC(o.labelInfoList,o.dirVec,r,n)})};function GM(A,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return zM(t,A,e),t.seriesInvolved&&YM(t,A),t}function zM(A,e,t){var r=e.getComponent("tooltip"),n=e.getComponent("axisPointer"),i=n.get("link",!0)||[],a=[];b(t.getCoordinateSystems(),function(o){if(!o.axisPointerEnabled)return;var s=_o(o.model),l=A.coordSysAxesInfo[s]={};A.coordSysMap[s]=o;var u=o.model,f=u.getModel("tooltip",r);if(b(o.getAxes(),nt(d,!1,null)),o.getTooltipAxes&&r&&f.get("show")){var c=f.get("trigger")==="axis",h=f.get(["axisPointer","type"])==="cross",v=o.getTooltipAxes(f.get(["axisPointer","axis"]));(c||h)&&b(v.baseAxes,nt(d,h?"cross":!0,c)),h&&b(v.otherAxes,nt(d,"cross",!1))}function d(g,p,B){var m=B.model.getModel("axisPointer",n),y=m.get("show");if(!(!y||y==="auto"&&!g&&!cd(m))){p==null&&(p=m.get("triggerTooltip")),m=g?WM(B,f,n,e,g,p):m;var _=m.get("snap"),C=m.get("triggerEmphasis"),Q=_o(B.model),x=p||_||B.type==="category",F=A.axesInfo[Q]={key:Q,axis:B,coordSys:o,axisPointerModel:m,triggerTooltip:p,triggerEmphasis:C,involveSeries:x,snap:_,useHandle:cd(m),seriesModels:[],linkGroup:null};l[Q]=F,A.seriesInvolved=A.seriesInvolved||x;var S=XM(i,B);if(S!=null){var E=a[S]||(a[S]={axesInfo:{}});E.axesInfo[Q]=F,E.mapper=i[S].mapper,F.linkGroup=E}}}})}function WM(A,e,t,r,n,i){var a=e.getModel("axisPointer"),o=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],s={};b(o,function(c){s[c]=Ue(a.get(c))}),s.snap=A.type!=="category"&&!!i,a.get("type")==="cross"&&(s.type="line");var l=s.label||(s.label={});if(l.show==null&&(l.show=!1),n==="cross"){var u=a.get(["label","show"]);if(l.show=u??!0,!i){var f=s.lineStyle=a.get("crossStyle");f&&Ne(l,f.textStyle)}}return A.model.getModel("axisPointer",new et(s,t,r))}function YM(A,e){e.eachSeries(function(t){var r=t.coordinateSystem,n=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!r||!r.model||n==="none"||n===!1||n==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||b(A.coordSysAxesInfo[_o(r.model)],function(a){var o=a.axis;r.getAxis(o.dim)===o&&(a.seriesModels.push(t),a.seriesDataCount==null&&(a.seriesDataCount=0),a.seriesDataCount+=t.getData().count())})})}function XM(A,e){for(var t=e.model,r=e.dim,n=0;n<A.length;n++){var i=A[n]||{};if(ud(i[r+"AxisId"],t.id)||ud(i[r+"AxisIndex"],t.componentIndex)||ud(i[r+"AxisName"],t.name))return n}}function ud(A,e){return A==="all"||ae(A)&&Te(A,e)>=0||A===e}function ZM(A){var e=fd(A);if(e){var t=e.axisPointerModel,r=e.axis.scale,n=t.option,i=t.get("status"),a=t.get("value");a!=null&&(a=r.parse(a));var o=cd(t);i==null&&(n.status=o?"show":"hide");var s=r.getExtent().slice();s[0]>s[1]&&s.reverse(),(a==null||a>s[1])&&(a=s[1]),a<s[0]&&(a=s[0]),n.value=a,o&&(n.status=e.axis.scale.isBlank()?"hide":"show")}}function fd(A){var e=(A.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[_o(A)]}function JM(A){var e=fd(A);return e&&e.axisPointerModel}function cd(A){return!!A.get(["handle","show"])}function _o(A){return A.type+"||"+A.id}var hd={},PC=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){this.axisPointerClass&&ZM(t),A.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},e.prototype.updateAxisPointer=function(t,r,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,r){var n=this._axisPointer;n&&n.remove(r)},e.prototype.dispose=function(t,r){this._disposeAxisPointer(r),A.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,r,n){var i=e.getAxisPointerClass(this.axisPointerClass);if(i){var a=JM(t);a?(this._axisPointer||(this._axisPointer=new i)).render(t,a,r,n):this._disposeAxisPointer(r)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,r){if(process.env.NODE_ENV!=="production"&&hd[t])throw new Error("axisPointer "+t+" exists");hd[t]=r},e.getAxisPointerClass=function(t){return t&&hd[t]},e.type="axis",e})(xA),vd=ze();function qM(A,e,t,r){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitArea"),a=i.getModel("areaStyle"),o=a.get("color"),s=r.coordinateSystem.getRect(),l=n.getTicksCoords({tickModel:i,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(l.length){var u=o.length,f=vd(A).splitAreaColors,c=we(),h=0;if(f)for(var v=0;v<l.length;v++){var d=f.get(l[v].tickValue);if(d!=null){h=(d+(u-1)*v)%u;break}}var g=n.toGlobalCoord(l[0].coord),p=a.getAreaStyle();o=ae(o)?o:[o];for(var v=1;v<l.length;v++){var B=n.toGlobalCoord(l[v].coord),m=void 0,y=void 0,_=void 0,C=void 0;n.isHorizontal()?(m=g,y=s.y,_=B-m,C=s.height,g=m+_):(m=s.x,y=g,_=s.width,C=B-y,g=y+C);var Q=l[v-1].tickValue;Q!=null&&c.set(Q,h),e.add(new qe({anid:Q!=null?"area_"+Q:null,shape:{x:m,y,width:_,height:C},style:Ne({fill:o[h]},p),autoBatch:!0,silent:!0})),h=(h+1)%u}vd(A).splitAreaColors=c}}}function $M(A){vd(A).splitAreaColors=null}var jM=["splitArea","splitLine","minorSplitLine","breakArea"],kC=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,r,n,i){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new lt,this.group.add(this._axisGroup),!!po(t)){this._axisGroup.add(t.axis.axisBuilder.group),b(jM,function(s){t.get([s,"show"])&&eH[s](this,this._axisGroup,t,t.getCoordSysModel(),n)},this);var o=i&&i.type==="changeAxisOrder"&&i.isInitSort;o||yB(a,this._axisGroup,t),A.prototype.render.call(this,t,r,n,i)}},e.prototype.remove=function(){$M(this)},e.type="cartesianAxis",e})(PC),eH={splitLine:function(A,e,t,r,n){var i=t.axis;if(!i.scale.isBlank()){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,u=a.get("showMaxLine")!==!1;s=ae(s)?s:[s];for(var f=r.coordinateSystem.getRect(),c=i.isHorizontal(),h=0,v=i.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),d=[],g=[],p=o.getLineStyle(),B=0;B<v.length;B++){var m=i.toGlobalCoord(v[B].coord);if(!(B===0&&!l||B===v.length-1&&!u)){var y=v[B].tickValue;c?(d[0]=m,d[1]=f.y,g[0]=m,g[1]=f.y+f.height):(d[0]=f.x,d[1]=m,g[0]=f.x+f.width,g[1]=m);var _=h++%s.length,C=new Tr({anid:y!=null?"line_"+y:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:g[0],y2:g[1]},style:Ne({stroke:s[_]},p),silent:!0});Va(C.shape,p.lineWidth),e.add(C)}}}},minorSplitLine:function(A,e,t,r,n){var i=t.axis,a=t.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=r.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(u.length)for(var f=[],c=[],h=o.getLineStyle(),v=0;v<u.length;v++)for(var d=0;d<u[v].length;d++){var g=i.toGlobalCoord(u[v][d].coord);l?(f[0]=g,f[1]=s.y,c[0]=g,c[1]=s.y+s.height):(f[0]=s.x,f[1]=g,c[0]=s.x+s.width,c[1]=g);var p=new Tr({anid:"minor_line_"+u[v][d].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:h,silent:!0});Va(p.shape,h.lineWidth),e.add(p)}},splitArea:function(A,e,t,r,n){qM(A,e,t,r)},breakArea:function(A,e,t,r,n){t.axis.scale}},VC=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e})(kC),tH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=VC.type,t}return e.type="yAxis",e})(kC),AH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,r){this.group.removeAll(),t.get("show")&&this.group.add(new qe({shape:t.coordinateSystem.getRect(),style:Ne({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(xA),KC={offset:0};function rH(A){A.registerComponentView(AH),A.registerComponentModel(lM),A.registerCoordinateSystem("cartesian2d",NM),yC(A,"x",nd,KC),yC(A,"y",nd,KC),A.registerComponentView(VC),A.registerComponentView(tH),A.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var nH=ze();function GC(A,e){return!!nH(A)[e]}Kn({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Dt);var iH={axisPointer:1,tooltip:1,brush:1};function aH(A,e,t){var r=e.getComponentByElement(A.topTarget);if(!r||r===t||iH.hasOwnProperty(r.mainType))return!1;var n=r.coordinateSystem;if(!n||n.model===t)return!1;var i=za(r),a=za(t);return!((i.zlevel-a.zlevel||i.z-a.z)<=0)}var oH=(function(A){J(e,A);function e(t){var r=A.call(this)||this;r._zr=t;var n=ye(r._mousedownHandler,r),i=ye(r._mousemoveHandler,r),a=ye(r._mouseupHandler,r),o=ye(r._mousewheelHandler,r),s=ye(r._pinchHandler,r);return r.enable=function(l,u){var f=u.zInfo,c=za(f.component),h=c.z,v=c.zlevel,d={component:f.component,z:h,zlevel:v,z2:ve(f.z2,-1/0)},g=Y({},u.triggerInfo);this._opt=Ne(Y({},u),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:d,triggerInfo:g}),l==null&&(l=!0),(!this._enabled||this._controlType!==l)&&(this._enabled=!0,this.disable(),(l===!0||l==="move"||l==="pan")&&(xo(t,"mousedown",n,d),xo(t,"mousemove",i,d),xo(t,"mouseup",a,d)),(l===!0||l==="scale"||l==="zoom")&&(xo(t,"mousewheel",o,d),xo(t,"pinch",s,d)))},r.disable=function(){this._enabled=!1,Fo(t,"mousedown",n),Fo(t,"mousemove",i),Fo(t,"mouseup",a),Fo(t,"mousewheel",o),Fo(t,"pinch",s)},r}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,r,n){var i=this._opt,a=i.zInfoParsed;if(aH(t,i.api,a.component))return!1;var o=i.triggerInfo,s=o.roamTrigger,l=!1;return s==="global"&&(l=!0),l||(l=o.isInSelf(t,r,n)),l&&o.isInClip&&!o.isInClip(t,r,n)&&(l=!1),l},e.prototype._decideCursorStyle=function(t,r,n,i){var a=t.target;if(!a&&this._checkPointer(t,r,n))return"grab";if(i)return a&&a.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(Vp(t)||Qo(t))){for(var r=t.target;r;){if(r.draggable)return;r=r.__hostTarget||r.parent}var n=t.offsetX,i=t.offsetY;this._checkPointer(t,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var r=this._zr;if(!(t.gestureEvent==="pinch"||GC(r,"globalPan")||Qo(t))){var n=t.offsetX,i=t.offsetY;if(!this._dragging||!_u("moveOnMouseMove",t,this._opt)){var a=this._decideCursorStyle(t,n,i,!1);a&&r.setCursorStyle(a);return}r.setCursorStyle("grabbing");var o=this._x,s=this._y,l=n-o,u=i-s;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&hi(t.event),t.__ecRoamConsumed=!0,zC(this,"pan","moveOnMouseMove",t,{dx:l,dy:u,oldX:o,oldY:s,newX:n,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!Qo(t)){var r=this._zr;if(!Vp(t)){this._dragging=!1;var n=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);n&&r.setCursorStyle(n)}}},e.prototype._mousewheelHandler=function(t){if(!Qo(t)){var r=_u("zoomOnMouseWheel",t,this._opt),n=_u("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,a=Math.abs(i),o=t.offsetX,s=t.offsetY;if(!(i===0||!r&&!n)){if(r){var l=a>3?1.4:a>1?1.2:1.1,u=i>0?l:1/l;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:u,originX:o,originY:s,isAvailableBehavior:null})}if(n){var f=Math.abs(i),c=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:o,originY:s,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(GC(this._zr,"globalPan")||Qo(t))){var r=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:r,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,r,n,i,a){t._checkPointer(i,a.originX,a.originY)&&(hi(i.event),i.__ecRoamConsumed=!0,zC(t,r,n,i,a))},e})(yA);function Qo(A){return A.__ecRoamConsumed}var sH=ze();function Cu(A){var e=sH(A);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function xo(A,e,t,r){for(var n=Cu(A),i=n.roam,a=i[e]=i[e]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:t,zInfoParsed:r}),lH(A,e)}function Fo(A,e,t){for(var r=Cu(A),n=r.roam[e]||[],i=0;i<n.length;i++)if(n[i].listener===t){n.splice(i,1),n.length||uH(A,e);return}}function lH(A,e){var t=Cu(A);t.uniform[e]||A.on(e,t.uniform[e]=function(r){var n=t.roam[e];if(n)for(var i=0;i<n.length;i++)n[i].listener(r)})}function uH(A,e){var t=Cu(A),r=t.uniform;r[e]&&(A.off(e,r[e]),r[e]=null)}function zC(A,e,t,r,n){n.isAvailableBehavior=ye(_u,null,t,r),A.trigger(e,n)}function _u(A,e,t){var r=t[A];return!A||r&&(!le(r)||e.event[r+"Key"])}function Eo(A,e,t,r,n,i){A=A||0;var a=t[1]-t[0];if(n!=null&&(n=ea(n,[0,a])),i!=null&&(i=Math.max(i,n??0)),r==="all"){var o=Math.abs(e[1]-e[0]);o=ea(o,[0,a]),n=i=ea(o,[n,i]),r=0}e[0]=ea(e[0],t),e[1]=ea(e[1],t);var s=dd(e,r);e[r]+=A;var l=n||0,u=t.slice();s.sign<0?u[0]+=l:u[1]-=l,e[r]=ea(e[r],u);var f;return f=dd(e,r),n!=null&&(f.sign!==s.sign||f.span<n)&&(e[1-r]=e[r]+s.sign*n),f=dd(e,r),i!=null&&f.span>i&&(e[1-r]=e[r]+f.sign*i),e}function dd(A,e){var t=A[e]-A[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function ea(A,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,A))}var Zn=ze(),WC=Ue,pd=ye,fH=(function(){function A(){this._dragging=!1,this.animationThreshold=15}return A.prototype.render=function(e,t,r,n){var i=t.get("value"),a=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=r,!(!n&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a==="hide"){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,r);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=u;var f=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new lt,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),r.getZr().add(o);else{var c=nt(YC,t,f);this.updatePointerEl(o,l,c),this.updateLabelEl(o,l,c,t)}JC(o,t,!0),this._renderHandle(i)}},A.prototype.remove=function(e){this.clear(e)},A.prototype.dispose=function(e){this.clear(e)},A.prototype.determineAnimation=function(e,t){var r=t.get("animation"),n=e.axis,i=n.type==="category",a=t.get("snap");if(!a&&!i)return!1;if(r==="auto"||r==null){var o=this.animationThreshold;if(i&&n.getBandWidth()>o)return!0;if(a){var s=fd(e).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return r===!0},A.prototype.makeElOption=function(e,t,r,n,i){},A.prototype.createPointerEl=function(e,t,r,n){var i=t.pointer;if(i){var a=Zn(e).pointerEl=new aS[i.type](WC(t.pointer));e.add(a)}},A.prototype.createLabelEl=function(e,t,r,n){if(t.label){var i=Zn(e).labelEl=new Ot(WC(t.label));e.add(i),ZC(i,n)}},A.prototype.updatePointerEl=function(e,t,r){var n=Zn(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),r(n,{shape:t.pointer.shape}))},A.prototype.updateLabelEl=function(e,t,r,n){var i=Zn(e).labelEl;i&&(i.setStyle(t.label.style),r(i,{x:t.label.x,y:t.label.y}),ZC(i,n))},A.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,r=this._api.getZr(),n=this._handle,i=t.getModel("handle"),a=t.get("status");if(!i.get("show")||!a||a==="hide"){n&&r.remove(n),this._handle=null;return}var o;this._handle||(o=!0,n=this._handle=gh(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){hi(l.event)},onmousedown:pd(this._onHandleDragMove,this,0,0),drift:pd(this._onHandleDragMove,this),ondragend:pd(this._onHandleDragEnd,this)}),r.add(n)),JC(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");ae(s)||(s=[s,s]),n.scaleX=s[0]/2,n.scaleY=s[1]/2,Pl(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,o)}},A.prototype._moveHandleToValue=function(e,t){YC(this._axisPointerModel,!t&&this._moveAnimation,this._handle,gd(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},A.prototype._onHandleDragMove=function(e,t){var r=this._handle;if(r){this._dragging=!0;var n=this.updateHandleTransform(gd(r),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,r.stopAnimation(),r.attr(gd(n)),Zn(r).lastProp=null,this._doDispatchAxisPointer()}},A.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},A.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},A.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),r=this._group,n=this._handle;t&&r&&(this._lastGraphicKey=null,r&&t.remove(r),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),kl(this,"_doDispatchAxisPointer")},A.prototype.doClear=function(){},A.prototype.buildLabel=function(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}},A})();function YC(A,e,t,r){XC(Zn(t).lastProp,r)||(Zn(t).lastProp=r,e?Et(t,r,A):(t.stopAnimation(),t.attr(r)))}function XC(A,e){if(he(A)&&he(e)){var t=!0;return b(e,function(r,n){t=t&&XC(A[n],r)}),!!t}else return A===e}function ZC(A,e){A[e.get(["label","show"])?"show":"hide"]()}function gd(A){return{x:A.x||0,y:A.y||0,rotation:A.rotation||0}}function JC(A,e,t){var r=e.get("z"),n=e.get("zlevel");A&&A.traverse(function(i){i.type!=="group"&&(r!=null&&(i.z=r),n!=null&&(i.zlevel=n),i.silent=t)})}function cH(A){var e=A.get("type"),t=A.getModel(e+"Style"),r;return e==="line"?(r=t.getLineStyle(),r.fill=null):e==="shadow"&&(r=t.getAreaStyle(),r.stroke=null),r}function hH(A,e,t,r,n){var i=t.get("value"),a=qC(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),o=t.getModel("label"),s=El(o.get("padding")||0),l=o.getFont(),u=Dg(a,l),f=n.position,c=u.width+s[1]+s[3],h=u.height+s[0]+s[2],v=n.align;v==="right"&&(f[0]-=c),v==="center"&&(f[0]-=c/2);var d=n.verticalAlign;d==="bottom"&&(f[1]-=h),d==="middle"&&(f[1]-=h/2),vH(f,c,h,r);var g=o.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),A.label={x:f[0],y:f[1],style:In(o,{text:a,font:l,fill:o.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function vH(A,e,t,r){var n=r.getWidth(),i=r.getHeight();A[0]=Math.min(A[0]+e,n)-e,A[1]=Math.min(A[1]+t,i)-t,A[0]=Math.max(A[0],0),A[1]=Math.max(A[1],0)}function qC(A,e,t,r,n){A=e.scale.parse(A);var i=e.scale.getLabel({value:A},{precision:n.precision}),a=n.formatter;if(a){var o={value:uu(e,{value:A}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};b(r,function(s){var l=t.getSeriesByIndex(s.seriesIndex),u=s.dataIndexInside,f=l&&l.getDataParams(u);f&&o.seriesData.push(f)}),le(a)?i=a.replace("{value}",i):me(a)&&(i=a(o))}return i}function $C(A,e,t){var r=nr();return Wf(r,r,t.rotation),zf(r,r,t.position),Ka([A.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],r)}function dH(A,e,t,r,n,i){var a=Wr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),hH(e,r,n,i,{position:$C(r.axis,A,t),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function pH(A,e,t){return t=t||0,{x1:A[t],y1:A[1-t],x2:e[t],y2:e[1-t]}}function gH(A,e,t){return t=t||0,{x:A[t],y:A[1-t],width:e[t],height:e[1-t]}}var BH=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,n,i,a){var o=n.axis,s=o.grid,l=i.get("type"),u=jC(s,o).getOtherAxis(o).getGlobalExtent(),f=o.toGlobalCoord(o.dataToCoord(r,!0));if(l&&l!=="none"){var c=cH(i),h=mH[l](o,f,u);h.style=c,t.graphicKey=h.type,t.pointer=h}var v=wu(s.getRect(),n);dH(r,t,v,n,i,a)},e.prototype.getHandleTransform=function(t,r,n){var i=wu(r.axis.grid.getRect(),r,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var a=$C(r.axis,t,i);return{x:a[0],y:a[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,n,i){var a=n.axis,o=a.grid,s=a.getGlobalExtent(!0),l=jC(o,a).getOtherAxis(a).getGlobalExtent(),u=a.dim==="x"?0:1,f=[t.x,t.y];f[u]+=r[u],f[u]=Math.min(s[1],f[u]),f[u]=Math.max(s[0],f[u]);var c=(l[1]+l[0])/2,h=[c,c];h[u]=f[u];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:v[u]}},e})(fH);function jC(A,e){var t={};return t[e.dim+"AxisIndex"]=e.index,A.getCartesian(t)}var mH={line:function(A,e,t){var r=pH([e,t[0]],[e,t[1]],e_(A));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(A,e,t){var r=Math.max(1,A.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:gH([e-r/2,t[0]],[r,n],e_(A))}}};function e_(A){return A.dim==="x"?0:1}var yH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:oe.color.border,width:1,type:"dashed"},shadowStyle:{color:oe.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:oe.color.neutral00,padding:[5,7,5,7],backgroundColor:oe.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:oe.color.accent40,throttle:40}},e})(Re),pr=ze(),wH=b;function t_(A,e,t){if(!_e.node){var r=e.getZr();pr(r).records||(pr(r).records={}),CH(r,e);var n=pr(r).records[A]||(pr(r).records[A]={});n.handler=t}}function CH(A,e){if(pr(A).initialized)return;pr(A).initialized=!0,t("click",nt(A_,"click")),t("mousemove",nt(A_,"mousemove")),t("globalout",QH);function t(r,n){A.on(r,function(i){var a=xH(e);wH(pr(A).records,function(o){o&&n(o,i,a.dispatchAction)}),_H(a.pendings,e)})}}function _H(A,e){var t=A.showTip.length,r=A.hideTip.length,n;t?n=A.showTip[t-1]:r&&(n=A.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function QH(A,e,t){A.handler("leave",null,t)}function A_(A,e,t,r){e.handler(A,t,r)}function xH(A){var e={showTip:[],hideTip:[]},t=function(r){var n=e[r.type];n?n.push(r):(r.dispatchAction=t,A.dispatchAction(r))};return{dispatchAction:t,pendings:e}}function Bd(A,e){if(!_e.node){var t=e.getZr(),r=(pr(t).records||{})[A];r&&(pr(t).records[A]=null)}}var FH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i=r.getComponent("tooltip"),a=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";t_("axisPointer",n,function(o,s,l){a!=="none"&&(o==="leave"||a.indexOf(o)>=0)&&l({type:"updateAxisPointer",currTrigger:o,x:s&&s.offsetX,y:s&&s.offsetY})})},e.prototype.remove=function(t,r){Bd("axisPointer",r)},e.prototype.dispose=function(t,r){Bd("axisPointer",r)},e.type="axisPointer",e})(xA);function r_(A,e){var t=[],r=A.seriesIndex,n;if(r==null||!(n=e.getSeriesByIndex(r)))return{point:[]};var i=n.getData(),a=pn(i,A);if(a==null||a<0||ae(a))return{point:[]};var o=i.getItemGraphicEl(a),s=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(a)||[];else if(s&&s.dataToPoint)if(A.isStacked){var l=s.getBaseAxis(),u=s.getOtherAxis(l),f=u.dim,c=l.dim,h=f==="x"||f==="radius"?1:0,v=i.mapDimension(c),d=[];d[h]=i.get(v,a),d[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),a),t=s.dataToPoint(d)||[]}else t=s.dataToPoint(i.getValues(Be(s.dimensions,function(p){return i.mapDimension(p)}),a))||[];else if(o){var g=o.getBoundingRect().clone();g.applyTransform(o.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:o}}var n_=ze();function EH(A,e,t){var r=A.currTrigger,n=[A.x,A.y],i=A,a=A.dispatchAction||ye(t.dispatchAction,t),o=e.getComponent("axisPointer").coordSysAxesInfo;if(o){Qu(n)&&(n=r_({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var s=Qu(n),l=i.axesInfo,u=o.axesInfo,f=r==="leave"||Qu(n),c={},h={},v={list:[],map:{}},d={showPointer:nt(SH,h),showTooltip:nt(UH,v)};b(o.coordSysMap,function(p,B){var m=s||p.containPoint(n);b(o.coordSysAxesInfo[B],function(y,_){var C=y.axis,Q=LH(l,y);if(!f&&m&&(!l||Q)){var x=Q&&Q.value;x==null&&!s&&(x=C.pointToData(n)),x!=null&&i_(y,x,d,!1,c)}})});var g={};return b(u,function(p,B){var m=p.linkGroup;m&&!h[B]&&b(m.axesInfo,function(y,_){var C=h[_];if(y!==p&&C){var Q=C.value;m.mapper&&(Q=p.axis.scale.parse(m.mapper(Q,a_(y),a_(p)))),g[p.key]=Q}})}),b(g,function(p,B){i_(u[B],p,d,!0,c)}),IH(h,u,c),TH(v,n,A,a),DH(u,a,t),c}}function i_(A,e,t,r,n){var i=A.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!A.involveSeries){t.showPointer(A,e);return}var a=bH(e,A),o=a.payloadBatch,s=a.snapToValue;o[0]&&n.seriesIndex==null&&Y(n,o[0]),!r&&A.snap&&i.containData(s)&&s!=null&&(e=s),t.showPointer(A,e,o),t.showTooltip(A,a,s)}}function bH(A,e){var t=e.axis,r=t.dim,n=A,i=[],a=Number.MAX_VALUE,o=-1;return b(e.seriesModels,function(s,l){var u=s.getData().mapDimensionsAll(r),f,c;if(s.getAxisTooltipData){var h=s.getAxisTooltipData(u,A,t);c=h.dataIndices,f=h.nestestValue}else{if(c=s.indicesOfNearest(r,u[0],A,t.type==="category"?.5:null),!c.length)return;f=s.getData().get(u[0],c[0])}if(!(f==null||!isFinite(f))){var v=A-f,d=Math.abs(v);d<=a&&((d<a||v>=0&&o<0)&&(a=d,o=v,n=f,i.length=0),b(c,function(g){i.push({seriesIndex:s.seriesIndex,dataIndexInside:g,dataIndex:s.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function SH(A,e,t,r){A[e.key]={value:t,payloadBatch:r}}function UH(A,e,t,r){var n=t.payloadBatch,i=e.axis,a=i.model,o=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var s=e.coordSys.model,l=_o(s),u=A.map[l];u||(u=A.map[l]={coordSysId:s.id,coordSysIndex:s.componentIndex,coordSysType:s.type,coordSysMainType:s.mainType,dataByAxis:[]},A.list.push(u)),u.dataByAxis.push({axisDim:i.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:o.get(["label","precision"]),formatter:o.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function IH(A,e,t){var r=t.axesInfo=[];b(e,function(n,i){var a=n.axisPointerModel.option,o=A[i];o?(!n.useHandle&&(a.status="show"),a.value=o.value,a.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(a.status="hide"),a.status==="show"&&r.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:a.value})})}function TH(A,e,t,r){if(Qu(e)||!A.list.length){r({type:"hideTip"});return}var n=((A.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:A.list})}function DH(A,e,t){var r=t.getZr(),n="axisPointerLastHighlights",i=n_(r)[n]||{},a=n_(r)[n]={};b(A,function(l,u){var f=l.axisPointerModel.option;f.status==="show"&&l.triggerEmphasis&&b(f.seriesDataIndices,function(c){var h=c.seriesIndex+" | "+c.dataIndex;a[h]=c})});var o=[],s=[];b(i,function(l,u){!a[u]&&s.push(l)}),b(a,function(l,u){!i[u]&&o.push(l)}),s.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),o.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:o})}function LH(A,e){for(var t=0;t<(A||[]).length;t++){var r=A[t];if(e.axis.dim===r.axisDim&&e.axis.model.componentIndex===r.axisIndex)return r}}function a_(A){var e=A.axis.model,t={},r=t.axisDim=A.axis.dim;return t.axisIndex=t[r+"AxisIndex"]=e.componentIndex,t.axisName=t[r+"AxisName"]=e.name,t.axisId=t[r+"AxisId"]=e.id,t}function Qu(A){return!A||A[0]==null||isNaN(A[0])||A[1]==null||isNaN(A[1])}function o_(A){PC.registerAxisPointerClass("CartesianAxisPointer",BH),A.registerComponentModel(yH),A.registerComponentView(FH),A.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!ae(t)&&(e.axisPointer.link=[t])}}),A.registerProcessor(A.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=GM(e,t)}),A.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},EH)}function MH(A){qA(rH),qA(o_)}var s_=["x","y","radius","angle","single"],HH=["cartesian2d","polar","singleAxis"];function OH(A){var e=A.get("coordinateSystem");return Te(HH,e)>=0}function Yr(A){return process.env.NODE_ENV!=="production"&&fe(A),A+"Axis"}function RH(A,e){var t=we(),r=[],n=we();A.eachComponent({mainType:"dataZoom",query:e},function(u){n.get(u.uid)||o(u)});var i;do i=!1,A.eachComponent("dataZoom",a);while(i);function a(u){!n.get(u.uid)&&s(u)&&(o(u),i=!0)}function o(u){n.set(u.uid,!0),r.push(u),l(u)}function s(u){var f=!1;return u.eachTargetAxis(function(c,h){var v=t.get(c);v&&v[h]&&(f=!0)}),f}function l(u){u.eachTargetAxis(function(f,c){(t.get(f)||t.set(f,[]))[c]=!0})}return r}function l_(A){var e=A.ecModel,t={infoList:[],infoMap:we()};return A.eachTargetAxis(function(r,n){var i=e.getComponent(Yr(r),n);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=t.infoMap.get(o);s||(s={model:a,axisModels:[]},t.infoList.push(s),t.infoMap.set(o,s)),s.axisModels.push(i)}}}),t}var md=(function(){function A(){this.indexList=[],this.indexMap=[]}return A.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},A})(),xu=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,r,n){var i=u_(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var r=u_(t);Oe(this.option,t,!0),Oe(this.settledOption,r,!0),this._doInit(r)},e.prototype._doInit=function(t){var r=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;b([["start","startValue"],["end","endValue"]],function(i,a){this._rangePropMode[a]==="value"&&(r[i[0]]=n[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),r=this._targetAxisInfoMap=we(),n=this._fillSpecifiedTargetAxis(r);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(r,this._orient)),this._noTarget=!0,r.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var r=!1;return b(s_,function(n){var i=this.getReferringComponents(Yr(n),YF);if(i.specified){r=!0;var a=new md;b(i.models,function(o){a.add(o.componentIndex)}),t.set(n,a)}},this),r},e.prototype._fillAutoTargetAxisByOrient=function(t,r){var n=this.ecModel,i=!0;if(i){var a=r==="vertical"?"y":"x",o=n.findComponents({mainType:a+"Axis"});s(o,a)}if(i){var o=n.findComponents({mainType:"singleAxis",filter:function(u){return u.get("orient",!0)===r}});s(o,"single")}function s(l,u){var f=l[0];if(f){var c=new md;if(c.add(f.componentIndex),t.set(u,c),i=!1,u==="x"||u==="y"){var h=f.getReferringComponents("grid",Mt).models[0];h&&b(l,function(v){f.componentIndex!==v.componentIndex&&h===v.getReferringComponents("grid",Mt).models[0]&&c.add(v.componentIndex)})}}}i&&b(s_,function(l){if(i){var u=n.findComponents({mainType:Yr(l),filter:function(c){return c.get("type",!0)==="category"}});if(u[0]){var f=new md;f.add(u[0].componentIndex),t.set(l,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(r){!t&&(t=r)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var r=this.ecModel.option;this.option.throttle=r.animation&&r.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var r=this._rangePropMode,n=this.get("rangeMode");b([["start","startValue"],["end","endValue"]],function(i,a){var o=t[i[0]]!=null,s=t[i[1]]!=null;o&&!s?r[a]="percent":!o&&s?r[a]="value":n?r[a]=n[a]:o&&(r[a]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(r,n){t==null&&(t=this.ecModel.getComponent(Yr(r),n))},this),t},e.prototype.eachTargetAxis=function(t,r){this._targetAxisInfoMap.each(function(n,i){b(n.indexList,function(a){t.call(r,i,a)})})},e.prototype.getAxisProxy=function(t,r){var n=this.getAxisModel(t,r);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,r){process.env.NODE_ENV!=="production"&&fe(t&&r!=null);var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[r])return this.ecModel.getComponent(Yr(t),r)},e.prototype.setRawRange=function(t){var r=this.option,n=this.settledOption;b([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(r[i[0]]=n[i[0]]=t[i[0]],r[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var r=this.option;b(["start","startValue","end","endValue"],function(n){r[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,r){if(t==null&&r==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,r).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var r,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var a=n[i],o=this._targetAxisInfoMap.get(a),s=0;s<o.indexList.length;s++){var l=this.getAxisProxy(a,o.indexList[s]);if(l.hostedBy(this))return l;r||(r=l)}return r},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&fe(this._orient),this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(Re);function u_(A){var e={};return b(["start","end","startValue","endValue","throttle"],function(t){A.hasOwnProperty(t)&&(e[t]=A[t])}),e}var f_=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){this.dataZoomModel=t,this.ecModel=r,this.api=n},e.type="dataZoom",e})(xA),ta=b,c_=Ua,NH=(function(){function A(e,t,r,n){this._dimName=e,this._axisIndex=t,this.ecModel=n,this._dataZoomModel=r}return A.prototype.hostedBy=function(e){return this._dataZoomModel===e},A.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},A.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},A.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(OH(t)){var r=Yr(this._dimName),n=t.getReferringComponents(r,Mt).models[0];n&&this._axisIndex===n.componentIndex&&e.push(t)}},this),e},A.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},A.prototype.getMinMaxSpan=function(){return Ue(this._minMaxSpan)},A.prototype.calculateDataWindow=function(e){var t=this._dataExtent,r=this.getAxisModel(),n=r.axis.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[],l;ta(["start","end"],function(c,h){var v=e[c],d=e[c+"Value"];i[h]==="percent"?(v==null&&(v=a[h]),d=n.parse(dt(v,a,t))):(l=!0,d=d==null?t[h]:n.parse(d),v=dt(d,t,a)),s[h]=d==null||isNaN(d)?t[h]:d,o[h]=v==null||isNaN(v)?a[h]:v}),c_(s),c_(o);var u=this._minMaxSpan;l?f(s,o,t,a,!1):f(o,s,a,t,!0);function f(c,h,v,d,g){var p=g?"Span":"ValueSpan";Eo(0,c,v,"all",u["min"+p],u["max"+p]);for(var B=0;B<2;B++)h[B]=dt(c[B],v,d,!0),g&&(h[B]=n.parse(h[B]))}return{valueWindow:s,percentWindow:o}},A.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=PH(this,this._dimName,t),this._updateMinMaxSpan();var r=this.calculateDataWindow(e.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,this._setAxisModel()}},A.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var r=this._dimName,n=this.getTargetSeriesModels(),i=e.get("filterMode"),a=this._valueWindow;if(i==="none")return;ta(n,function(s){var l=s.getData(),u=l.mapDimensionsAll(r);if(u.length){if(i==="weakFilter"){var f=l.getStore(),c=Be(u,function(h){return l.getDimensionIndex(h)},l);l.filterSelf(function(h){for(var v,d,g,p=0;p<u.length;p++){var B=f.get(c[p],h),m=!isNaN(B),y=B<a[0],_=B>a[1];if(m&&!y&&!_)return!0;m&&(g=!0),y&&(v=!0),_&&(d=!0)}return g&&v&&d})}else ta(u,function(h){if(i==="empty")s.setData(l=l.map(h,function(d){return o(d)?d:NaN}));else{var v={};v[h]=a,l.selectRange(v)}});ta(u,function(h){l.setApproximateExtent(a,h)})}});function o(s){return s>=a[0]&&s<=a[1]}},A.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,r=this._dataExtent;ta(["min","max"],function(n){var i=t.get(n+"Span"),a=t.get(n+"ValueSpan");a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a!=null?i=dt(r[0]+a,r,[0,100],!0):i!=null&&(a=dt(i,[0,100],r,!0)-r[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=a},this)},A.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,r=this._valueWindow;if(t){var n=Ng(r,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+r[0].toFixed(n)),t[1]!==100&&i.setDeterminedMinMax("max",+r[1].toFixed(n)),i.freeze()}},A})();function PH(A,e,t){var r=[1/0,-1/0];ta(t,function(a){kD(r,a.getData(),e)});var n=A.getAxisModel(),i=mw(n.axis.scale,n,r).calculate();return[i.min,i.max]}var kH={getTargetSeries:function(A){function e(n){A.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(a,o){var s=A.getComponent(Yr(a),o);n(a,o,s,i)})})}e(function(n,i,a,o){a.__dzAxisProxy=null});var t=[];e(function(n,i,a,o){a.__dzAxisProxy||(a.__dzAxisProxy=new NH(n,i,o,A),t.push(a.__dzAxisProxy))});var r=we();return b(t,function(n){b(n.getTargetSeriesModels(),function(i){r.set(i.uid,i)})}),r},overallReset:function(A,e){A.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(r,n){t.getAxisProxy(r,n).reset(t)}),t.eachTargetAxis(function(r,n){t.getAxisProxy(r,n).filterData(t,e)})}),A.eachComponent("dataZoom",function(t){var r=t.findRepresentativeAxisProxy();if(r){var n=r.getDataPercentWindow(),i=r.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};function VH(A){A.registerAction("dataZoom",function(e,t){var r=RH(t,e);b(r,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var h_=!1;function v_(A){h_||(h_=!0,A.registerProcessor(A.PRIORITY.PROCESSOR.FILTER,kH),VH(A),A.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function KH(A,e){var t=El(e.get("padding")),r=e.getItemStyle(["color","opacity"]);r.fill=e.get("backgroundColor");var n=new qe({shape:{x:A.x-t[3],y:A.y-t[0],width:A.width+t[1]+t[3],height:A.height+t[0]+t[2],r:e.get("borderRadius")},style:r,silent:!0,z2:-1});return n}var GH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:oe.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:oe.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:oe.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:oe.color.tertiary,fontSize:14}},e})(Re);function d_(A){var e=A.get("confine");return e!=null?!!e:A.get("renderMode")==="richText"}function p_(A){if(_e.domSupported){for(var e=document.documentElement.style,t=0,r=A.length;t<r;t++)if(A[t]in e)return A[t]}}var g_=p_(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),zH=p_(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function B_(A,e){if(!A)return e;e=zB(e,!0);var t=A.indexOf(e);return A=t===-1?e:"-"+A.slice(0,t)+"-"+e,A.toLowerCase()}function WH(A,e){var t=A.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(A);return t?t[e]:null}var YH=B_(zH,"transition"),yd=B_(g_,"transform"),XH="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(_e.transform3dSupported?"will-change:transform;":"");function ZH(A){return A=A==="left"?"right":A==="right"?"left":A==="top"?"bottom":"top",A}function JH(A,e,t){if(!le(t)||t==="inside")return"";var r=A.get("backgroundColor"),n=A.get("borderWidth");e=Dn(e);var i=ZH(t),a=Math.max(Math.round(n)*1.5,6),o="",s=yd+":",l;Te(["left","right"],i)>-1?(o+="top:50%",s+="translateY(-50%) rotate("+(l=i==="left"?-225:-45)+"deg)"):(o+="left:50%",s+="translateX(-50%) rotate("+(l=i==="top"?225:45)+"deg)");var u=l*Math.PI/180,f=a+n,c=f*Math.abs(Math.cos(u))+f*Math.abs(Math.sin(u)),h=Math.round(((c-Math.SQRT2*n)/2+Math.SQRT2*n-(c-f)/2)*100)/100;o+=";"+i+":-"+h+"px";var v=e+" solid "+n+"px;",d=["position:absolute;width:"+a+"px;height:"+a+"px;z-index:-1;",o+";"+s+";","border-bottom:"+v,"border-right:"+v,"background-color:"+r+";"];return'<div style="'+d.join("")+'"></div>'}function qH(A,e,t){var r="cubic-bezier(0.23,1,0.32,1)",n="",i="";return t&&(n=" "+A/2+"s "+r,i="opacity"+n+",visibility"+n),e||(n=" "+A+"s "+r,i+=(i.length?",":"")+(_e.transformSupported?""+yd+n:",left"+n+",top"+n)),YH+":"+i}function m_(A,e,t){var r=A.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!_e.transformSupported)return t?"top:"+n+";left:"+r+";":[["top",n],["left",r]];var i=_e.transform3dSupported,a="translate"+(i?"3d":"")+"("+r+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+yd+":"+a+";":[["top",0],["left",0],[g_,a]]}function $H(A){var e=[],t=A.get("fontSize"),r=A.getTextColor();r&&e.push("color:"+r),e.push("font:"+A.getFont());var n=ve(A.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+n+"px");var i=A.get("textShadowColor"),a=A.get("textShadowBlur")||0,o=A.get("textShadowOffsetX")||0,s=A.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),b(["decoration","align"],function(l){var u=A.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function jH(A,e,t,r){var n=[],i=A.get("transitionDuration"),a=A.get("backgroundColor"),o=A.get("shadowBlur"),s=A.get("shadowColor"),l=A.get("shadowOffsetX"),u=A.get("shadowOffsetY"),f=A.getModel("textStyle"),c=Km(A,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i>0&&n.push(qH(i,t,r)),a&&n.push("background-color:"+a),b(["width","color","radius"],function(v){var d="border-"+v,g=zB(d),p=A.get(g);p!=null&&n.push(d+":"+p+(v==="color"?"":"px"))}),n.push($H(f)),c!=null&&n.push("padding:"+El(c).join("px ")+"px"),n.join(";")+";"}function y_(A,e,t,r,n){var i=e&&e.painter;if(t){var a=i&&i.getViewportRoot();a&&yx(A,a,t,r,n)}else{A[0]=r,A[1]=n;var o=i&&i.getViewportRootOffset();o&&(A[0]+=o.offsetLeft,A[1]+=o.offsetTop)}A[2]=A[0]/e.getWidth(),A[3]=A[1]/e.getHeight()}var e2=(function(){function A(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,_e.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var n=this._zr=e.getZr(),i=t.appendTo,a=i&&(le(i)?document.querySelector(i):ii(i)?i:me(i)&&i(e.getDom()));y_(this._styleCoord,n,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(r),this._api=e,this._container=a;var o=this;r.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},r.onmousemove=function(s){if(s=s||window.event,!o._enterable){var l=n.handler,u=n.painter.getViewportRoot();AA(u,s,!0),l.dispatch("mousemove",s)}},r.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return A.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),r=WH(t,"position"),n=t.style;n.position!=="absolute"&&r!=="absolute"&&(n.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},A.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,n=r.style,i=this._styleCoord;r.innerHTML?n.cssText=XH+jH(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+m_(i[0],i[1],!0)+("border-color:"+Dn(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},A.prototype.setContent=function(e,t,r,n,i){var a=this.el;if(e==null){a.innerHTML="";return}var o="";if(le(i)&&r.get("trigger")==="item"&&!d_(r)&&(o=JH(r,n,i)),le(e))a.innerHTML=e+o;else if(e){a.innerHTML="",ae(e)||(e=[e]);for(var s=0;s<e.length;s++)ii(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var l=document.createElement("div");l.innerHTML=o,a.appendChild(l)}}},A.prototype.setEnterable=function(e){this._enterable=e},A.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},A.prototype.moveTo=function(e,t){if(this.el){var r=this._styleCoord;if(y_(r,this._zr,this._container,e,t),r[0]!=null&&r[1]!=null){var n=this.el.style,i=m_(r[0],r[1]);b(i,function(a){n[a[0]]=a[1]})}}},A.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},A.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",_e.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},A.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ye(this.hide,this),e)):this.hide())},A.prototype.isShow=function(){return this._show},A.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Cx(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var r=t.parentNode;r&&r.removeChild(t)}this.el=this._container=null},A})(),t2=(function(){function A(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),C_(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return A.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},A.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},A.prototype.setContent=function(e,t,r,n,i){var a=this;he(e)&&Kt(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var o=r.getModel("textStyle");this.el=new Ot({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:o.get("textShadowColor"),fill:r.get(["textStyle","color"]),padding:Km(r,"richText"),verticalAlign:"top",align:"left"},z:r.get("z")}),b(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(l){a.el.style[l]=r.get(l)}),b(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(l){a.el.style[l]=o.get(l)||0}),this._zr.add(this.el);var s=this;this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},A.prototype.setEnterable=function(e){this._enterable=e},A.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),r=w_(e.style);return[t.width+r.left+r.right,t.height+r.top+r.bottom]},A.prototype.moveTo=function(e,t){var r=this.el;if(r){var n=this._styleCoord;C_(n,this._zr,e,t),e=n[0],t=n[1];var i=r.style,a=Xr(i.borderWidth||0),o=w_(i);r.x=e+a+o.left,r.y=t+a+o.top,r.markRedraw()}},A.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},A.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},A.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ye(this.hide,this),e)):this.hide())},A.prototype.isShow=function(){return this._show},A.prototype.dispose=function(){this._zr.remove(this.el)},A})();function Xr(A){return Math.max(0,A)}function w_(A){var e=Xr(A.shadowBlur||0),t=Xr(A.shadowOffsetX||0),r=Xr(A.shadowOffsetY||0);return{left:Xr(e-t),right:Xr(e+t),top:Xr(e-r),bottom:Xr(e+r)}}function C_(A,e,t,r){A[0]=t,A[1]=r,A[2]=A[0]/e.getWidth(),A[3]=A[1]/e.getHeight()}var A2=new qe({shape:{x:-1,y:-1,width:2,height:2}}),r2=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){if(!(_e.node||!r.getDom())){var n=t.getComponent("tooltip"),i=this._renderMode=ZF(n.get("renderMode"));this._tooltipContent=i==="richText"?new t2(r):new e2(r,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},e.prototype.render=function(t,r,n){if(!(_e.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=r,this._api=n;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Pl(this,"_updatePosition",50,"fixRate"):kl(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,r=t.get("triggerOn");t_("itemTooltip",this._api,ye(function(n,i,a){r!=="none"&&(r.indexOf(n)>=0?this._tryShow(i,a):n==="leave"&&this._hide(a))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,r=this._ecModel,n=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&a.manuallyShowTip(t,r,n,{x:a._lastX,y:a._lastY,dataByCoordSys:a._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,r,n,i){if(!(i.from===this.uid||_e.node||!n.getDom())){var a=__(i,n);this._ticket="";var o=i.dataByCoordSys,s=o2(i,r,n);if(s){var l=s.el.getBoundingRect().clone();l.applyTransform(s.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:s.el,position:i.position,positionDefault:"bottom"},a)}else if(i.tooltip&&i.x!=null&&i.y!=null){var u=A2;u.x=i.x,u.y=i.y,u.update(),Le(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},a)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},a);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,r,n,i))return;var f=r_(i,r),c=f.point[0],h=f.point[1];c!=null&&h!=null&&this._tryShow({offsetX:c,offsetY:h,target:f.el,position:i.position,positionDefault:"bottom"},a)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},a))}},e.prototype.manuallyHideTip=function(t,r,n,i){var a=this._tooltipContent;this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(__(i,n))},e.prototype._manuallyAxisShowTip=function(t,r,n,i){var a=i.seriesIndex,o=i.dataIndex,s=r.getComponent("axisPointer").coordSysAxesInfo;if(!(a==null||o==null||s==null)){var l=r.getSeriesByIndex(a);if(l){var u=l.getData(),f=bo([u.getItemModel(o),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:o,position:i.position}),!0}}},e.prototype._tryShow=function(t,r){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var a=t.dataByCoordSys;if(a&&a.length)this._showAxisTooltip(a,t);else if(n){var o=Le(n);if(o.ssrType==="legend")return;this._lastDataByCoordSys=null;var s,l;ao(n,function(u){if(u.tooltipDisabled)return s=l=null,!0;s||l||(Le(u).dataIndex!=null?s=u:Le(u).tooltipConfig!=null&&(l=u))},!0),s?this._showSeriesItemTooltip(t,s,r):l?this._showComponentItemTooltip(t,l,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},e.prototype._showOrMove=function(t,r){var n=t.get("showDelay");r=ye(r,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(r,n):r()},e.prototype._showAxisTooltip=function(t,r){var n=this._ecModel,i=this._tooltipModel,a=[r.offsetX,r.offsetY],o=bo([r.tooltipOption],i),s=this._renderMode,l=[],u=Ao("section",{blocks:[],noHeader:!0}),f=[],c=new rv;b(t,function(B){b(B.dataByAxis,function(m){var y=n.getComponent(m.axisDim+"Axis",m.axisIndex),_=m.value;if(!(!y||_==null)){var C=qC(_,y.axis,n,m.seriesDataIndices,m.valueLabelOpt),Q=Ao("section",{header:C,noHeader:!LA(C),sortBlocks:!0,blocks:[]});u.blocks.push(Q),b(m.seriesDataIndices,function(x){var F=n.getSeriesByIndex(x.seriesIndex),S=x.dataIndexInside,E=F.getDataParams(S);if(!(E.dataIndex<0)){E.axisDim=m.axisDim,E.axisIndex=m.axisIndex,E.axisType=m.axisType,E.axisId=m.axisId,E.axisValue=uu(y.axis,{value:_}),E.axisValueLabel=C,E.marker=c.makeTooltipMarker("item",Dn(E.color),s);var I=Sm(F.formatTooltip(S,!0,null)),U=I.frag;if(U){var T=bo([F],i).get("valueFormatter");Q.blocks.push(T?Y({valueFormatter:T},U):U)}I.text&&f.push(I.text),l.push(E)}})}})}),u.blocks.reverse(),f.reverse();var h=r.position,v=o.get("order"),d=km(u,c,s,v,n.get("useUTC"),o.get("textStyle"));d&&f.unshift(d);var g=s==="richText"?`
41
+ `];function Ao(A,e){return e.type=A,e}function tv(A){return A.type==="section"}function Nm(A){return tv(A)?$U:jU}function Pm(A){if(tv(A)){var e=0,t=A.blocks.length,r=t>1||t>0&&!A.noHeader;return b(A.blocks,function(n){var i=Pm(n);i>=e&&(e=i+ +(r&&(!i||tv(n)&&!n.noHeader)))}),e}return 0}function $U(A,e,t,r){var n=e.noHeader,i=eI(Pm(e)),a=[],o=e.blocks||[];fe(!o||ae(o)),o=o||[];var s=A.orderMode;if(e.sortBlocks&&s){o=o.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(mA(l,s)){var u=new MU(l[s],null);o.sort(function(d,g){return u.evaluate(d.sortParam,g.sortParam)})}else s==="seriesDesc"&&o.reverse()}b(o,function(d,g){var p=e.valueFormatter,B=Nm(d)(p?Y(Y({},A),{valueFormatter:p}):A,d,g>0?i.html:0,r);B!=null&&a.push(B)});var f=A.renderMode==="richText"?a.join(i.richText):Av(r,a.join(""),n?t:i.html);if(n)return f;var c=Hh(e.header,"ordinal",A.useUTC),h=Rm(r,A.renderMode).nameStyle,v=Om(r);return A.renderMode==="richText"?Vm(A,c,h)+i.richText+f:Av(r,'<div style="'+h+";"+v+';">'+Vt(c)+"</div>"+f,t)}function jU(A,e,t,r){var n=A.renderMode,i=e.noName,a=e.noValue,o=!e.markerType,s=e.name,l=A.useUTC,u=e.valueFormatter||A.valueFormatter||function(y){return y=ae(y)?y:[y],Be(y,function(_,C){return Hh(_,ae(h)?h[C]:h,l)})};if(!(i&&a)){var f=o?"":A.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||oe.color.secondary,n),c=i?"":Hh(s,"ordinal",l),h=e.valueType,v=a?[]:u(e.value,e.dataIndex),d=!o||!i,g=!o&&i,p=Rm(r,n),B=p.nameStyle,m=p.valueStyle;return n==="richText"?(o?"":f)+(i?"":Vm(A,c,B))+(a?"":rI(A,v,d,g,m)):Av(r,(o?"":f)+(i?"":tI(c,!o,B))+(a?"":AI(v,d,g,m)),t)}}function km(A,e,t,r,n,i){if(A){var a=Nm(A),o={useUTC:n,renderMode:t,orderMode:r,markupStyleCreator:e,valueFormatter:A.valueFormatter};return a(o,A,0,i)}}function eI(A){return{html:JU[A],richText:qU[A]}}function Av(A,e,t){var r='<div style="clear:both"></div>',n="margin: "+t+"px 0 0",i=Om(A);return'<div style="'+n+";"+i+';">'+e+r+"</div>"}function tI(A,e,t){var r=e?"margin-left:2px":"";return'<span style="'+t+";"+r+'">'+Vt(A)+"</span>"}function AI(A,e,t,r){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return A=ae(A)?A:[A],'<span style="'+i+";"+r+'">'+Be(A,function(a){return Vt(a)}).join("&nbsp;&nbsp;")+"</span>"}function Vm(A,e,t){return A.markupStyleCreator.wrapRichTextStyle(e,t)}function rI(A,e,t,r,n){var i=[n],a=r?10:20;return t&&i.push({padding:[0,0,0,a],align:"right"}),A.markupStyleCreator.wrapRichTextStyle(ae(e)?e.join(" "):e,i)}function nI(A,e){var t=A.getData().getItemVisual(e,"style"),r=t[A.visualDrawType];return Dn(r)}function Km(A,e){var t=A.get("padding");return t??(e==="richText"?[8,10]:10)}var rv=(function(){function A(){this.richTextStyles={},this._nextStyleNameId=Kg()}return A.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},A.prototype.makeTooltipMarker=function(e,t,r){var n=r==="richText"?this._generateStyleName():null,i=HS({color:t,type:e,renderMode:r,markerId:n});return le(i)?i:(process.env.NODE_ENV!=="production"&&fe(n),this.richTextStyles[n]=i.style,i.content)},A.prototype.wrapRichTextStyle=function(e,t){var r={};ae(t)?b(t,function(i){return Y(r,i)}):Y(r,t);var n=this._generateStyleName();return this.richTextStyles[n]=r,"{"+n+"|"+e+"}"},A})();function iI(A){var e=A.series,t=A.dataIndex,r=A.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),a=i.length,o=e.getRawValue(t),s=ae(o),l=nI(e,t),u,f,c,h;if(a>1||s&&!a){var v=aI(o,e,t,i,l);u=v.inlineValues,f=v.inlineValueTypes,c=v.blocks,h=v.inlineValues[0]}else if(a){var d=n.getDimensionInfo(i[0]);h=u=ki(n,t,i[0]),f=d.type}else h=u=s?o[0]:o;var g=Sc(e),p=g&&e.name||"",B=n.getName(t),m=r?p:B;return Ao("section",{header:p,noHeader:r||!g,sortParam:h,blocks:[Ao("nameValue",{markerType:"item",markerColor:l,name:m,noName:!LA(m),value:u,valueType:f,dataIndex:t})].concat(c||[])})}function aI(A,e,t,r,n){var i=e.getData(),a=ni(A,function(f,c,h){var v=i.getDimensionInfo(h);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),o=[],s=[],l=[];r.length?b(r,function(f){u(ki(i,t,f),f)}):b(A,u);function u(f,c){var h=i.getDimensionInfo(c);!h||h.otherDims.tooltip===!1||(a?l.push(Ao("nameValue",{markerType:"subItem",markerColor:n,name:h.displayName,value:f,valueType:h.type})):(o.push(f),s.push(h.type)))}return{inlineValues:o,inlineValueTypes:s,blocks:l}}var Hr=ze();function Rl(A,e){return A.getName(e)||A.getId(e)}var oI="__universalTransitionEnabled",JA=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,r,n){this.seriesIndex=this.componentIndex,this.dataTask=eo({count:lI,reset:uI}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=Hr(this).sourceManager=new XU(this);i.prepareSource();var a=this.getInitialData(t,n);zm(a,this),this.dataTask.context.data=a,process.env.NODE_ENV!=="production"&&fe(a,"getInitialData returned invalid data."),Hr(this).dataBeforeProcessed=a,Gm(this),this._initSelectedMapFromData(a)},e.prototype.mergeDefaultAndTheme=function(t,r){var n=Za(this),i=n?Ni(t):{},a=this.subType;Re.hasClass(a)&&(a+="Series"),Oe(t,r.getTheme().get(this.subType)),Oe(t,this.getDefaultOption()),Jg(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Mr(t,i,n)},e.prototype.mergeOption=function(t,r){t=Oe(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Za(this);n&&Mr(this.option,t,n);var i=Hr(this).sourceManager;i.dirty(),i.prepareSource();var a=this.getInitialData(t,r);zm(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,Hr(this).dataBeforeProcessed=a,Gm(this),this._initSelectedMapFromData(a)},e.prototype.fillDataTextStyle=function(t){if(t&&!Tt(t))for(var r=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Jg(t[n],"label",r)},e.prototype.getInitialData=function(t,r){},e.prototype.appendData=function(t){var r=this.getRawData();r.appendData(t.data)},e.prototype.getData=function(t){var r=nv(this);if(r){var n=r.context.data;return t==null||!n.getLinkedData?n:n.getLinkedData(t)}else return Hr(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var r=nv(this);if(r){var n=r.context;n.outputData=t,r!==this.dataTask&&(n.data=t)}Hr(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return we(t)},e.prototype.getSourceManager=function(){return Hr(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Hr(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.indicesOfNearest=function(t,r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o&&o.getAxis(t);if(!o||!s)return[];var l=s.dataToCoord(n);i==null&&(i=1/0);var u=[],f=1/0,c=-1,h=0;return a.each(r,function(v,d){var g=s.dataToCoord(v),p=l-g,B=Math.abs(p);B<=i&&((B<f||B===f&&p>=0&&c<0)&&(f=B,c=p,h=0),p===c&&(u[h++]=d))}),u.length=h,u},e.prototype.formatTooltip=function(t,r,n){return iI({series:this,dataIndex:t,multipleSeries:r})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(_e.node&&!(t&&t.ssr))return!1;var r=this.getShallow("animation");return r&&this.getData().count()>this.getShallow("animationThreshold")&&(r=!1),!!r},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,r,n){var i=this.ecModel,a=Gh.prototype.getColorFromPalette.call(this,t,r,n);return a||(a=i.getColorFromPalette(t,r,n)),a},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,r){this._innerSelect(this.getData(r),t)},e.prototype.unselect=function(t,r){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,a=this.getData(r);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o<t.length;o++){var s=t[o],l=Rl(a,s);n[l]=!1,this._selectedDataIndicesMap[l]=-1}}},e.prototype.toggleSelect=function(t,r){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],r)?this.unselect(n,r):this.select(n,r)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,r=Xe(t),n=[],i=0;i<r.length;i++){var a=t[r[i]];a>=0&&n.push(a)}return n},e.prototype.isSelected=function(t,r){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(r);return(n==="all"||n[Rl(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[oI])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,r){var n,i,a=this.option,o=a.selectedMode,s=r.length;if(!(!o||!s)){if(o==="series")a.selectedMap="all";else if(o==="multiple"){he(a.selectedMap)||(a.selectedMap={});for(var l=a.selectedMap,u=0;u<s;u++){var f=r[u],c=Rl(t,f);l[c]=!0,this._selectedDataIndicesMap[c]=t.getRawIndex(f)}}else if(o==="single"||o===!0){var h=r[s-1],c=Rl(t,h);a.selectedMap=(n={},n[c]=!0,n),this._selectedDataIndicesMap=(i={},i[c]=t.getRawIndex(h),i)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var r=[];t.hasItemOption&&t.each(function(n){var i=t.getRawDataItem(n);i&&i.selected&&r.push(n)}),r.length>0&&this._innerSelect(t,r)}},e.registerClass=function(t){return Re.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(Re);DA(JA,DU),DA(JA,Gh),n0(JA,Re);function Gm(A){var e=A.name;Sc(A)||(A.name=sI(A)||e)}function sI(A){var e=A.getRawData(),t=e.mapDimensionsAll("seriesName"),r=[];return b(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&r.push(i.displayName)}),r.join(" ")}function lI(A){return A.model.getRawData().count()}function uI(A){var e=A.model;return e.setData(e.getRawData().cloneShallow()),fI}function fI(A,e){e.outputData&&A.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function zm(A,e){b(ux(A.CHANGABLE_METHODS,A.DOWNSAMPLE_METHODS),function(t){A.wrapMethod(t,nt(cI,e))})}function cI(A,e){var t=nv(A);return t&&t.setOutputEnd((e||this).count()),e}function nv(A){var e=(A.ecModel||{}).scheduler,t=e&&e.getPipeline(A.uid);if(t){var r=t.currentTask;if(r){var n=r.agentStubMap;n&&(r=n.get(A.uid))}return r}}var xA=(function(){function A(){this.group=new lt,this.uid=Bl("viewComponent")}return A.prototype.init=function(e,t){},A.prototype.render=function(e,t,r,n){},A.prototype.dispose=function(e,t){},A.prototype.updateView=function(e,t,r,n){},A.prototype.updateLayout=function(e,t,r,n){},A.prototype.updateVisual=function(e,t,r,n){},A.prototype.toggleBlurSeries=function(e,t,r){},A.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},A})();Tc(xA),Hs(xA);function iv(){var A=ze();return function(e){var t=A(e),r=e.pipelineContext,n=!!t.large,i=!!t.progressiveRender,a=t.large=!!(r&&r.large),o=t.progressiveRender=!!(r&&r.progressiveRender);return(n!==a||i!==o)&&"reset"}}var Wm=ze(),hI=iv(),FA=(function(){function A(){this.group=new lt,this.uid=Bl("viewChart"),this.renderTask=eo({plan:vI,reset:dI}),this.renderTask.context={view:this}}return A.prototype.init=function(e,t){},A.prototype.render=function(e,t,r,n){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},A.prototype.highlight=function(e,t,r,n){var i=e.getData(n&&n.dataType);if(!i){process.env.NODE_ENV!=="production"&&Ge("Unknown dataType "+n.dataType);return}Xm(i,n,"emphasis")},A.prototype.downplay=function(e,t,r,n){var i=e.getData(n&&n.dataType);if(!i){process.env.NODE_ENV!=="production"&&Ge("Unknown dataType "+n.dataType);return}Xm(i,n,"normal")},A.prototype.remove=function(e,t){this.group.removeAll()},A.prototype.dispose=function(e,t){},A.prototype.updateView=function(e,t,r,n){this.render(e,t,r,n)},A.prototype.updateLayout=function(e,t,r,n){this.render(e,t,r,n)},A.prototype.updateVisual=function(e,t,r,n){this.render(e,t,r,n)},A.prototype.eachRendered=function(e){hl(this.group,e)},A.markUpdateMethod=function(e,t){Wm(e).updateMethod=t},A.protoInitialize=(function(){var e=A.prototype;e.type="chart"})(),A})();function Ym(A,e,t){A&&Si(A)&&(e==="emphasis"?Js:qs)(A,t)}function Xm(A,e,t){var r=pn(A,e),n=e&&e.highlightKey!=null?vb(e.highlightKey):null;r!=null?b(Lt(r),function(i){Ym(A.getItemGraphicEl(i),t,n)}):A.eachItemGraphicEl(function(i){Ym(i,t,n)})}Tc(FA,["dispose"]),Hs(FA);function vI(A){return hI(A.model)}function dI(A){var e=A.model,t=A.ecModel,r=A.api,n=A.payload,i=e.pipelineContext.progressiveRender,a=A.view,o=n&&Wm(n).updateMethod,s=i?"incrementalPrepareRender":o&&a[o]?o:"render";return s!=="render"&&a[s](e,t,r,n),pI[s]}var pI={incrementalPrepareRender:{progress:function(A,e){e.view.incrementalRender(A,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(A,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Nl="\0__throttleOriginMethod",Zm="\0__throttleRate",Jm="\0__throttleType";function av(A,e,t){var r,n=0,i=0,a=null,o,s,l,u;e=e||0;function f(){i=new Date().getTime(),a=null,A.apply(s,l||[])}var c=function(){for(var h=[],v=0;v<arguments.length;v++)h[v]=arguments[v];r=new Date().getTime(),s=this,l=h;var d=u||e,g=u||t;u=null,o=r-(g?n:i)-d,clearTimeout(a),g?a=setTimeout(f,d):o>=0?f():a=setTimeout(f,-o),n=r};return c.clear=function(){a&&(clearTimeout(a),a=null)},c.debounceNextCall=function(h){u=h},c}function Pl(A,e,t,r){var n=A[e];if(n){var i=n[Nl]||n,a=n[Jm],o=n[Zm];if(o!==t||a!==r){if(t==null||!r)return A[e]=i;n=A[e]=av(i,t,r==="debounce"),n[Nl]=i,n[Jm]=r,n[Zm]=t}return n}}function kl(A,e){var t=A[e];t&&t[Nl]&&(t.clear&&t.clear(),A[e]=t[Nl])}var qm=ze(),$m={itemStyle:La(TB,!0),lineStyle:La(IB,!0)},gI={lineStyle:"stroke",itemStyle:"fill"};function jm(A,e){var t=A.visualStyleMapper||$m[e];return t||(console.warn("Unknown style type '"+e+"'."),$m.itemStyle)}function ey(A,e){var t=A.visualDrawType||gI[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var BI={createOnAllSeries:!0,performRawSeries:!0,reset:function(A,e){var t=A.getData(),r=A.visualStyleAccessPath||"itemStyle",n=A.getModel(r),i=jm(A,r),a=i(n),o=n.getShallow("decal");o&&(t.setVisual("decal",o),o.dirty=!0);var s=ey(A,r),l=a[s],u=me(l)?l:null,f=a.fill==="auto"||a.stroke==="auto";if(!a[s]||u||f){var c=A.getColorFromPalette(A.name,null,e.getSeriesCount());a[s]||(a[s]=c,t.setVisual("colorFromPalette",!0)),a.fill=a.fill==="auto"||me(a.fill)?c:a.fill,a.stroke=a.stroke==="auto"||me(a.stroke)?c:a.stroke}if(t.setVisual("style",a),t.setVisual("drawType",s),!e.isSeriesFiltered(A)&&u)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var d=A.getDataParams(v),g=Y({},a);g[s]=u(d),h.setItemVisual(v,"style",g)}}}},ro=new et,mI={createOnAllSeries:!0,performRawSeries:!0,reset:function(A,e){if(!(A.ignoreStyleOnData||e.isSeriesFiltered(A))){var t=A.getData(),r=A.visualStyleAccessPath||"itemStyle",n=jm(A,r),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(a,o){var s=a.getRawDataItem(o);if(s&&s[r]){ro.option=s[r];var l=n(ro),u=a.ensureUniqueItemVisual(o,"style");Y(u,l),ro.option.decal&&(a.setItemVisual(o,"decal",ro.option.decal),ro.option.decal.dirty=!0),i in l&&a.setItemVisual(o,"colorFromPalette",!1)}}:null}}}},yI={performRawSeries:!0,overallReset:function(A){var e=we();A.eachSeries(function(t){var r=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+r,i=e.get(n);i||(i={},e.set(n,i)),qm(t).scope=i}}),A.eachSeries(function(t){if(!(t.isColorBySeries()||A.isSeriesFiltered(t))){var r=t.getRawData(),n={},i=t.getData(),a=qm(t).scope,o=t.visualStyleAccessPath||"itemStyle",s=ey(t,o);i.each(function(l){var u=i.getRawIndex(l);n[u]=l}),r.each(function(l){var u=n[l],f=i.getItemVisual(u,"colorFromPalette");if(f){var c=i.ensureUniqueItemVisual(u,"style"),h=r.getName(l)||l+"",v=r.count();c[s]=t.getColorFromPalette(h,a,v)}})}})}},Vl=Math.PI;function wI(A,e){e=e||{},Ne(e,{text:"loading",textColor:oe.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:oe.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new lt,r=new qe({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(r);var n=new Ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new qe({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var a;return e.showSpinner&&(a=new il({shape:{startAngle:-Vl/2,endAngle:-Vl/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),a.animateShape(!0).when(1e3,{endAngle:Vl*3/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:Vl*3/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var o=n.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(A.getWidth()-s*2-(e.showSpinner&&o?10:0)-o)/2-(e.showSpinner&&o?0:5+o/2)+(e.showSpinner?0:o/2)+(o?0:s),u=A.getHeight()/2;e.showSpinner&&a.setShape({cx:l,cy:u}),i.setShape({x:l-s,y:u-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:A.getWidth(),height:A.getHeight()})},t.resize(),t}var ty=(function(){function A(e,t,r,n){this._stageTaskMap=we(),this.ecInstance=e,this.api=t,r=this._dataProcessorHandlers=r.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=r.concat(n)}return A.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(r){var n=r.overallTask;n&&n.dirty()})},A.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var r=this._pipelineMap.get(e.__pipeline.id),n=r.context,i=!t&&r.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>r.blockIndex,a=i?r.step:null,o=n&&n.modDataCount,s=o!=null?Math.ceil(o/a):null;return{step:a,modBy:s,modDataCount:o}}},A.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},A.prototype.updateStreamModes=function(e,t){var r=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),a=r.progressiveEnabled&&t.incrementalPrepareRender&&i>=r.threshold,o=e.get("large")&&i>=e.get("largeThreshold"),s=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=r.context={progressiveRender:a,modDataCount:s,large:o}},A.prototype.restorePipelines=function(e){var t=this,r=t._pipelineMap=we();e.eachSeries(function(n){var i=n.getProgressive(),a=n.uid;r.set(a,{id:a,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(n,n.dataTask)})},A.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),r=this.api;b(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),a="";process.env.NODE_ENV!=="production"&&(a='"reset" and "overallReset" must not be both specified.'),fe(!(n.reset&&n.overallReset),a),n.reset&&this._createSeriesStageTask(n,i,t,r),n.overallReset&&this._createOverallStageTask(n,i,t,r)},this)},A.prototype.prepareView=function(e,t,r,n){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=r,a.api=n,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},A.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},A.prototype.performVisualTasks=function(e,t,r){this._performStageTasks(this._visualHandlers,e,t,r)},A.prototype._performStageTasks=function(e,t,r,n){n=n||{};var i=!1,a=this;b(e,function(s,l){if(!(n.visualType&&n.visualType!==s.visualType)){var u=a._stageTaskMap.get(s.uid),f=u.seriesTaskMap,c=u.overallTask;if(c){var h,v=c.agentStubMap;v.each(function(g){o(n,g)&&(g.dirty(),h=!0)}),h&&c.dirty(),a.updatePayload(c,r);var d=a.getPerformArgs(c,n.block);v.each(function(g){g.perform(d)}),c.perform(d)&&(i=!0)}else f&&f.each(function(g,p){o(n,g)&&g.dirty();var B=a.getPerformArgs(g,n.block);B.skip=!s.performRawSeries&&t.isSeriesFiltered(g.context.model),a.updatePayload(g,r),g.perform(B)&&(i=!0)})}});function o(s,l){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(l.__pipeline.id))}this.unfinished=i||this.unfinished},A.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(r){t=r.dataTask.perform()||t}),this.unfinished=t||this.unfinished},A.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},A.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},A.prototype._createSeriesStageTask=function(e,t,r,n){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=we(),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?r.eachRawSeries(u):s?r.eachRawSeriesByType(s,u):l&&l(r,n).each(u);function u(f){var c=f.uid,h=o.set(c,a&&a.get(c)||eo({plan:FI,reset:EI,count:SI}));h.context={model:f,ecModel:r,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,h)}},A.prototype._createOverallStageTask=function(e,t,r,n){var i=this,a=t.overallTask=t.overallTask||eo({reset:CI});a.context={ecModel:r,api:n,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=we(),l=e.seriesType,u=e.getTargetSeries,f=!0,c=!1,h="";process.env.NODE_ENV!=="production"&&(h='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),fe(!e.createOnAllSeries,h),l?r.eachRawSeriesByType(l,v):u?u(r,n).each(v):(f=!1,b(r.getSeries(),v));function v(d){var g=d.uid,p=s.set(g,o&&o.get(g)||(c=!0,eo({reset:_I,onDirty:xI})));p.context={model:d,overallProgress:f},p.agent=a,p.__block=f,i._pipe(d,p)}c&&a.dirty()},A.prototype._pipe=function(e,t){var r=e.uid,n=this._pipelineMap.get(r);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},A.wrapStageHandler=function(e,t){return me(e)&&(e={overallReset:e,seriesType:UI(e)}),e.uid=Bl("stageHandler"),t&&(e.visualType=t),e},A})();function CI(A){A.overallReset(A.ecModel,A.api,A.payload)}function _I(A){return A.overallProgress&&QI}function QI(){this.agent.dirty(),this.getDownstream().dirty()}function xI(){this.agent&&this.agent.dirty()}function FI(A){return A.plan?A.plan(A.model,A.ecModel,A.api,A.payload):null}function EI(A){A.useClearVisual&&A.data.clearAllVisual();var e=A.resetDefines=Lt(A.reset(A.model,A.ecModel,A.api,A.payload));return e.length>1?Be(e,function(t,r){return Ay(r)}):bI}var bI=Ay(0);function Ay(A){return function(e,t){var r=t.data,n=t.resetDefines[A];if(n&&n.dataEach)for(var i=e.start;i<e.end;i++)n.dataEach(r,i);else n&&n.progress&&n.progress(e,r)}}function SI(A){return A.data.count()}function UI(A){Kl=null;try{A(no,ry)}catch{}return Kl}var no={},ry={},Kl;ny(no,Wh),ny(ry,sm),no.eachSeriesByType=no.eachRawSeriesByType=function(A){Kl=A},no.eachComponent=function(A){A.mainType==="series"&&A.subType&&(Kl=A.subType)};function ny(A,e){for(var t in e.prototype)A[t]=Dt}var $=oe.darkColor,II=$.background,io=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},iy={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},ay={darkMode:!0,color:$.theme,backgroundColor:II,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:iy,y:iy,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:io(),logAxis:io(),valueAxis:io(),categoryAxis:io(),line:{symbol:"circle"},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:$.background}},radar:(function(){var A=io();return A.axisName={color:$.axisLabel},A.axisLine.lineStyle.color=$.neutral20,A})(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};ay.categoryAxis.splitLine.show=!1;var TI=(function(){function A(){}return A.prototype.normalizeQuery=function(e){var t={},r={},n={};if(le(e)){var i=VA(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};b(e,function(s,l){for(var u=!1,f=0;f<a.length;f++){var c=a[f],h=l.lastIndexOf(c);if(h>0&&h===l.length-c.length){var v=l.slice(0,h);v!=="data"&&(t.mainType=v,t[c.toLowerCase()]=s,u=!0)}}o.hasOwnProperty(l)&&(r[l]=s,u=!0),u||(n[l]=s)})}return{cptQuery:t,dataQuery:r,otherQuery:n}},A.prototype.filter=function(e,t){var r=this.eventInfo;if(!r)return!0;var n=r.targetEl,i=r.packedEvent,a=r.model,o=r.view;if(!a||!o)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,a,"mainType")&&u(s,a,"subType")&&u(s,a,"index","componentIndex")&&u(s,a,"name")&&u(s,a,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,n,i));function u(f,c,h,v){return f[h]==null||c[v||h]===f[h]}},A.prototype.afterTrigger=function(){this.eventInfo=null},A})(),ov=["symbol","symbolSize","symbolRotate","symbolOffset"],oy=ov.concat(["symbolKeepAspect"]),DI={createOnAllSeries:!0,performRawSeries:!0,reset:function(A,e){var t=A.getData();if(A.legendIcon&&t.setVisual("legendIcon",A.legendIcon),!A.hasSymbolVisual)return;for(var r={},n={},i=!1,a=0;a<ov.length;a++){var o=ov[a],s=A.get(o);me(s)?(i=!0,n[o]=s):r[o]=s}if(r.symbol=r.symbol||A.defaultSymbol,t.setVisual(Y({legendIcon:A.legendIcon||r.symbol,symbolKeepAspect:A.get("symbolKeepAspect")},r)),e.isSeriesFiltered(A))return;var l=Xe(n);function u(f,c){for(var h=A.getRawValue(c),v=A.getDataParams(c),d=0;d<l.length;d++){var g=l[d];f.setItemVisual(c,g,n[g](h,v))}}return{dataEach:i?u:null}}},LI={createOnAllSeries:!0,performRawSeries:!0,reset:function(A,e){if(!A.hasSymbolVisual||e.isSeriesFiltered(A))return;var t=A.getData();function r(n,i){for(var a=n.getItemModel(i),o=0;o<oy.length;o++){var s=oy[o],l=a.getShallow(s,!0);l!=null&&n.setItemVisual(i,s,l)}}return{dataEach:t.hasItemOption?r:null}}};function MI(A,e,t){switch(t){case"color":var r=A.getItemVisual(e,"style");return r[A.getVisual("drawType")];case"opacity":return A.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return A.getItemVisual(e,t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function HI(A,e){switch(e){case"color":var t=A.getVisual("style");return t[A.getVisual("drawType")];case"opacity":return A.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return A.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function Gi(A,e,t,r,n){var i=A+e;t.isSilent(i)||(process.env.NODE_ENV!=="production"&&PA("event "+i+" is deprecated."),r.eachComponent({mainType:"series",subType:"pie"},function(a){for(var o=a.seriesIndex,s=a.option.selectedMap,l=n.selected,u=0;u<l.length;u++)if(l[u].seriesIndex===o){var f=a.getData(),c=pn(f,n.fromActionPayload);t.trigger(i,{type:i,seriesId:a.id,name:ae(c)?f.getName(c[0]):f.getName(c),selected:le(s)?s:Y({},s)})}}))}function OI(A,e,t){A.on("selectchanged",function(r){var n=t.getModel();r.isFromClick?(Gi("map","selectchanged",e,n,r),Gi("pie","selectchanged",e,n,r)):r.fromAction==="select"?(Gi("map","selected",e,n,r),Gi("pie","selected",e,n,r)):r.fromAction==="unselect"&&(Gi("map","unselected",e,n,r),Gi("pie","unselected",e,n,r))})}function ao(A,e,t){for(var r;A&&!(e(A)&&(r=A,t));)A=A.__hostTarget||A.parent;return r}var RI=Math.round(Math.random()*9),NI=typeof Object.defineProperty=="function",PI=(function(){function A(){this._id="__ec_inner_"+RI++}return A.prototype.get=function(e){return this._guard(e)[this._id]},A.prototype.set=function(e,t){var r=this._guard(e);return NI?Object.defineProperty(r,this._id,{value:t,enumerable:!1,configurable:!0}):r[this._id]=t,this},A.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},A.prototype.has=function(e){return!!this._guard(e)[this._id]},A.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},A})(),kI=ke.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(A,e){var t=e.cx,r=e.cy,n=e.width/2,i=e.height/2;A.moveTo(t,r-i),A.lineTo(t+n,r+i),A.lineTo(t-n,r+i),A.closePath()}}),VI=ke.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(A,e){var t=e.cx,r=e.cy,n=e.width/2,i=e.height/2;A.moveTo(t,r-i),A.lineTo(t+n,r),A.lineTo(t,r+i),A.lineTo(t-n,r),A.closePath()}}),KI=ke.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(A,e){var t=e.x,r=e.y,n=e.width/5*3,i=Math.max(n,e.height),a=n/2,o=a*a/(i-a),s=r-i+a+o,l=Math.asin(o/a),u=Math.cos(l)*a,f=Math.sin(l),c=Math.cos(l),h=a*.6,v=a*.7;A.moveTo(t-u,s+o),A.arc(t,s,a,Math.PI-l,Math.PI*2+l),A.bezierCurveTo(t+u-f*h,s+o+c*h,t,r-v,t,r),A.bezierCurveTo(t,r-v,t-u+f*h,s+o+c*h,t-u,s+o),A.closePath()}}),GI=ke.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(A,e){var t=e.height,r=e.width,n=e.x,i=e.y,a=r/3*2;A.moveTo(n,i),A.lineTo(n+a,i+t),A.lineTo(n,i+t/4*3),A.lineTo(n-a,i+t),A.lineTo(n,i),A.closePath()}}),zI={line:Tr,rect:qe,roundRect:qe,square:qe,circle:Al,diamond:VI,pin:KI,arrow:GI,triangle:kI},WI={line:function(A,e,t,r,n){n.x1=A,n.y1=e+r/2,n.x2=A+t,n.y2=e+r/2},rect:function(A,e,t,r,n){n.x=A,n.y=e,n.width=t,n.height=r},roundRect:function(A,e,t,r,n){n.x=A,n.y=e,n.width=t,n.height=r,n.r=Math.min(t,r)/4},square:function(A,e,t,r,n){var i=Math.min(t,r);n.x=A,n.y=e,n.width=i,n.height=i},circle:function(A,e,t,r,n){n.cx=A+t/2,n.cy=e+r/2,n.r=Math.min(t,r)/2},diamond:function(A,e,t,r,n){n.cx=A+t/2,n.cy=e+r/2,n.width=t,n.height=r},pin:function(A,e,t,r,n){n.x=A+t/2,n.y=e+r/2,n.width=t,n.height=r},arrow:function(A,e,t,r,n){n.x=A+t/2,n.y=e+r/2,n.width=t,n.height=r},triangle:function(A,e,t,r,n){n.cx=A+t/2,n.cy=e+r/2,n.width=t,n.height=r}},Gl={};b(zI,function(A,e){Gl[e]=new A});var YI=ke.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(A,e,t){var r=bs(A,e,t),n=this.shape;return n&&n.symbolType==="pin"&&e.position==="inside"&&(r.y=t.y+t.height*.4),r},buildPath:function(A,e,t){var r=e.symbolType;if(r!=="none"){var n=Gl[r];n||(r="rect",n=Gl[r]),WI[r](e.x,e.y,e.width,e.height,n.shape),n.buildPath(A,n.shape,t)}}});function XI(A,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=A,t.fill=e||oe.color.neutral00,t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=A:t.fill=A,this.markRedraw()}}function Or(A,e,t,r,n,i,a){var o=A.indexOf("empty")===0;o&&(A=A.substr(5,1).toLowerCase()+A.substr(6));var s;return A.indexOf("image://")===0?s=vB(A.slice(8),new Fe(e,t,r,n),a?"center":"cover"):A.indexOf("path://")===0?s=ph(A.slice(7),{},new Fe(e,t,r,n),a?"center":"cover"):s=new YI({shape:{symbolType:A,x:e,y:t,width:r,height:n}}),s.__isEmptyBrush=o,s.setColor=XI,i&&s.setColor(i),s}function ZI(A){return ae(A)||(A=[+A,+A]),[A[0]||0,A[1]||0]}function sy(A,e){if(A!=null)return ae(A)||(A=[A,A]),[ht(A[0],e[0])||0,ht(ve(A[1],A[0]),e[1])||0]}function Pn(A){return isFinite(A)}function JI(A,e,t){var r=e.x==null?0:e.x,n=e.x2==null?1:e.x2,i=e.y==null?0:e.y,a=e.y2==null?0:e.y2;e.global||(r=r*t.width+t.x,n=n*t.width+t.x,i=i*t.height+t.y,a=a*t.height+t.y),r=Pn(r)?r:0,n=Pn(n)?n:1,i=Pn(i)?i:0,a=Pn(a)?a:0;var o=A.createLinearGradient(r,i,n,a);return o}function qI(A,e,t){var r=t.width,n=t.height,i=Math.min(r,n),a=e.x==null?.5:e.x,o=e.y==null?.5:e.y,s=e.r==null?.5:e.r;e.global||(a=a*r+t.x,o=o*n+t.y,s=s*i),a=Pn(a)?a:.5,o=Pn(o)?o:.5,s=s>=0&&Pn(s)?s:.5;var l=A.createRadialGradient(a,o,0,a,o,s);return l}function sv(A,e,t){for(var r=e.type==="radial"?qI(A,e,t):JI(A,e,t),n=e.colorStops,i=0;i<n.length;i++)r.addColorStop(n[i].offset,n[i].color);return r}function $I(A,e){if(A===e||!A&&!e)return!1;if(!A||!e||A.length!==e.length)return!0;for(var t=0;t<A.length;t++)if(A[t]!==e[t])return!0;return!1}function zl(A){return parseInt(A,10)}function Wl(A,e,t){var r=["width","height"][e],n=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(t[r]!=null&&t[r]!=="auto")return parseFloat(t[r]);var o=document.defaultView.getComputedStyle(A);return(A[n]||zl(o[r])||zl(A.style[r]))-(zl(o[i])||0)-(zl(o[a])||0)|0}function jI(A,e){return!A||A==="solid"||!(e>0)?null:A==="dashed"?[4*e,2*e]:A==="dotted"?[e]:Ye(A)?[A]:ae(A)?A:null}function ly(A){var e=A.style,t=e.lineDash&&e.lineWidth>0&&jI(e.lineDash,e.lineWidth),r=e.lineDashOffset;if(t){var n=e.strokeNoScale&&A.getLineScale?A.getLineScale():1;n&&n!==1&&(t=Be(t,function(i){return i/n}),r/=n)}return[t,r]}var eT=new Sr(!0);function Yl(A){var e=A.stroke;return!(e==null||e==="none"||!(A.lineWidth>0))}function uy(A){return typeof A=="string"&&A!=="none"}function Xl(A){var e=A.fill;return e!=null&&e!=="none"}function fy(A,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=A.globalAlpha;A.globalAlpha=e.fillOpacity*e.opacity,A.fill(),A.globalAlpha=t}else A.fill()}function cy(A,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=A.globalAlpha;A.globalAlpha=e.strokeOpacity*e.opacity,A.stroke(),A.globalAlpha=t}else A.stroke()}function lv(A,e,t){var r=i0(e.image,e.__image,t);if(Os(r)){var n=A.createPattern(r,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*fx),i.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(i)}return n}}function tT(A,e,t,r){var n,i=Yl(t),a=Xl(t),o=t.strokePercent,s=o<1,l=!e.path;(!e.silent||s)&&l&&e.createPathProxy();var u=e.path||eT,f=e.__dirty;if(!r){var c=t.fill,h=t.stroke,v=a&&!!c.colorStops,d=i&&!!h.colorStops,g=a&&!!c.image,p=i&&!!h.image,B=void 0,m=void 0,y=void 0,_=void 0,C=void 0;(v||d)&&(C=e.getBoundingRect()),v&&(B=f?sv(A,c,C):e.__canvasFillGradient,e.__canvasFillGradient=B),d&&(m=f?sv(A,h,C):e.__canvasStrokeGradient,e.__canvasStrokeGradient=m),g&&(y=f||!e.__canvasFillPattern?lv(A,c,e):e.__canvasFillPattern,e.__canvasFillPattern=y),p&&(_=f||!e.__canvasStrokePattern?lv(A,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),v?A.fillStyle=B:g&&(y?A.fillStyle=y:a=!1),d?A.strokeStyle=m:p&&(_?A.strokeStyle=_:i=!1)}var Q=e.getGlobalScale();u.setScale(Q[0],Q[1],e.segmentIgnoreThreshold);var x,F;A.setLineDash&&t.lineDash&&(n=ly(e),x=n[0],F=n[1]);var S=!0;(l||f&pi)&&(u.setDPR(A.dpr),s?u.setContext(null):(u.setContext(A),S=!1),u.reset(),e.buildPath(u,e.shape,r),u.toStatic(),e.pathUpdated()),S&&u.rebuildPath(A,s?o:1),x&&(A.setLineDash(x),A.lineDashOffset=F),r||(t.strokeFirst?(i&&cy(A,t),a&&fy(A,t)):(a&&fy(A,t),i&&cy(A,t))),x&&A.setLineDash([])}function AT(A,e,t){var r=e.__image=i0(t.image,e.__image,e,e.onload);if(!(!r||!Os(r))){var n=t.x||0,i=t.y||0,a=e.getWidth(),o=e.getHeight(),s=r.width/r.height;if(a==null&&o!=null?a=o*s:o==null&&a!=null?o=a/s:a==null&&o==null&&(a=r.width,o=r.height),t.sWidth&&t.sHeight){var l=t.sx||0,u=t.sy||0;A.drawImage(r,l,u,t.sWidth,t.sHeight,n,i,a,o)}else if(t.sx&&t.sy){var l=t.sx,u=t.sy,f=a-l,c=o-u;A.drawImage(r,l,u,f,c,n,i,a,o)}else A.drawImage(r,n,i,a,o)}}function rT(A,e,t){var r,n=t.text;if(n!=null&&(n+=""),n){A.font=t.font||wr,A.textAlign=t.textAlign,A.textBaseline=t.textBaseline;var i=void 0,a=void 0;A.setLineDash&&t.lineDash&&(r=ly(e),i=r[0],a=r[1]),i&&(A.setLineDash(i),A.lineDashOffset=a),t.strokeFirst?(Yl(t)&&A.strokeText(n,t.x,t.y),Xl(t)&&A.fillText(n,t.x,t.y)):(Xl(t)&&A.fillText(n,t.x,t.y),Yl(t)&&A.strokeText(n,t.x,t.y)),i&&A.setLineDash([])}}var hy=["shadowBlur","shadowOffsetX","shadowOffsetY"],vy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function dy(A,e,t,r,n){var i=!1;if(!r&&(t=t||{},e===t))return!1;if(r||e.opacity!==t.opacity){zt(A,n),i=!0;var a=Math.max(Math.min(e.opacity,1),0);A.globalAlpha=isNaN(a)?Bn.opacity:a}(r||e.blend!==t.blend)&&(i||(zt(A,n),i=!0),A.globalCompositeOperation=e.blend||Bn.blend);for(var o=0;o<hy.length;o++){var s=hy[o];(r||e[s]!==t[s])&&(i||(zt(A,n),i=!0),A[s]=A.dpr*(e[s]||0))}return(r||e.shadowColor!==t.shadowColor)&&(i||(zt(A,n),i=!0),A.shadowColor=e.shadowColor||Bn.shadowColor),i}function py(A,e,t,r,n){var i=oo(e,n.inHover),a=r?null:t&&oo(t,n.inHover)||{};if(i===a)return!1;var o=dy(A,i,a,r,n);if((r||i.fill!==a.fill)&&(o||(zt(A,n),o=!0),uy(i.fill)&&(A.fillStyle=i.fill)),(r||i.stroke!==a.stroke)&&(o||(zt(A,n),o=!0),uy(i.stroke)&&(A.strokeStyle=i.stroke)),(r||i.opacity!==a.opacity)&&(o||(zt(A,n),o=!0),A.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var s=i.lineWidth,l=s/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);A.lineWidth!==l&&(o||(zt(A,n),o=!0),A.lineWidth=l)}for(var u=0;u<vy.length;u++){var f=vy[u],c=f[0];(r||i[c]!==a[c])&&(o||(zt(A,n),o=!0),A[c]=i[c]||f[1])}return o}function nT(A,e,t,r,n){return dy(A,oo(e,n.inHover),t&&oo(t,n.inHover),r,n)}function gy(A,e){var t=e.transform,r=A.dpr||1;t?A.setTransform(r*t[0],r*t[1],r*t[2],r*t[3],r*t[4],r*t[5]):A.setTransform(r,0,0,r,0,0)}function iT(A,e,t){for(var r=!1,n=0;n<A.length;n++){var i=A[n];r=r||i.isZeroArea(),gy(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=r}function aT(A,e){return A&&e?A[0]!==e[0]||A[1]!==e[1]||A[2]!==e[2]||A[3]!==e[3]||A[4]!==e[4]||A[5]!==e[5]:!(!A&&!e)}var By=1,my=2,yy=3,wy=4;function oT(A){var e=Xl(A),t=Yl(A);return!(A.lineDash||!(+e^+t)||e&&typeof A.fill!="string"||t&&typeof A.stroke!="string"||A.strokePercent<1||A.strokeOpacity<1||A.fillOpacity<1)}function zt(A,e){e.batchFill&&A.fill(),e.batchStroke&&A.stroke(),e.batchFill="",e.batchStroke=""}function oo(A,e){return e&&A.__hoverStyle||A.style}function Cy(A,e){kn(A,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function kn(A,e,t,r){var n=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~Zt,e.__isRendered=!1;return}var i=e.__clipPaths,a=t.prevElClipPaths,o=!1,s=!1;if((!a||$I(i,a))&&(a&&a.length&&(zt(A,t),A.restore(),s=o=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(zt(A,t),A.save(),iT(i,A,t),o=!0),t.prevElClipPaths=i),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var l=t.prevEl;l||(s=o=!0);var u=e instanceof ke&&e.autoBatch&&oT(e.style);o||aT(n,l.transform)?(zt(A,t),gy(A,e)):u||zt(A,t);var f=oo(e,t.inHover);e instanceof ke?(t.lastDrawType!==By&&(s=!0,t.lastDrawType=By),py(A,e,l,s,t),(!u||!t.batchFill&&!t.batchStroke)&&A.beginPath(),tT(A,e,f,u),u&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Vs?(t.lastDrawType!==yy&&(s=!0,t.lastDrawType=yy),py(A,e,l,s,t),rT(A,e,f)):e instanceof Ir?(t.lastDrawType!==my&&(s=!0,t.lastDrawType=my),nT(A,e,l,s,t),AT(A,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==wy&&(s=!0,t.lastDrawType=wy),sT(A,e,t)),u&&r&&zt(A,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function sT(A,e,t){var r=e.getDisplayables(),n=e.getTemporalDisplayables();A.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},a,o;for(a=e.getCursor(),o=r.length;a<o;a++){var s=r[a];s.beforeBrush&&s.beforeBrush(),s.innerBeforeBrush(),kn(A,s,i,a===o-1),s.innerAfterBrush(),s.afterBrush&&s.afterBrush(),i.prevEl=s}for(var l=0,u=n.length;l<u;l++){var s=n[l];s.beforeBrush&&s.beforeBrush(),s.innerBeforeBrush(),kn(A,s,i,l===u-1),s.innerAfterBrush(),s.afterBrush&&s.afterBrush(),i.prevEl=s}e.clearTemporalDisplayables(),e.notClear=!0,A.restore()}var uv=new PI,_y=new Bi(100),Qy=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function fv(A,e){if(A==="none")return null;var t=e.getDevicePixelRatio(),r=e.getZr(),n=r.painter.type==="svg";A.dirty&&uv.delete(A);var i=uv.get(A);if(i)return i;var a=Ne(A,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});a.backgroundColor==="none"&&(a.backgroundColor=null);var o={repeat:"repeat"};return s(o),o.rotation=a.rotation,o.scaleX=o.scaleY=n?1:1/t,uv.set(A,o),A.dirty=!1,o;function s(l){for(var u=[t],f=!0,c=0;c<Qy.length;++c){var h=a[Qy[c]];if(h!=null&&!ae(h)&&!le(h)&&!Ye(h)&&typeof h!="boolean"){f=!1;break}u.push(h)}var v;if(f){v=u.join(",")+(n?"-svg":"");var d=_y.get(v);d&&(n?l.svgElement=d:l.image=d)}var g=Fy(a.dashArrayX),p=lT(a.dashArrayY),B=xy(a.symbol),m=uT(g),y=Ey(p),_=!n&&rr.createCanvas(),C=n&&{tag:"g",attrs:{},key:"dcl",children:[]},Q=F(),x;_&&(_.width=Q.width*t,_.height=Q.height*t,x=_.getContext("2d")),S(),f&&_y.put(v,_||C),l.image=_,l.svgElement=C,l.svgWidth=Q.width,l.svgHeight=Q.height;function F(){for(var E=1,I=0,U=m.length;I<U;++I)E=zg(E,m[I]);for(var T=1,I=0,U=B.length;I<U;++I)T=zg(T,B[I].length);E*=T;var L=y*m.length*B.length;if(process.env.NODE_ENV!=="production"){var P=function(Z){console.warn("Calculated decal size is greater than "+Z+" due to decal option settings so "+Z+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+Z+" to be larger to avoid incontinuity.")};E>a.maxTileWidth&&P("maxTileWidth"),L>a.maxTileHeight&&P("maxTileHeight")}return{width:Math.max(1,Math.min(E,a.maxTileWidth)),height:Math.max(1,Math.min(L,a.maxTileHeight))}}function S(){x&&(x.clearRect(0,0,_.width,_.height),a.backgroundColor&&(x.fillStyle=a.backgroundColor,x.fillRect(0,0,_.width,_.height)));for(var E=0,I=0;I<p.length;++I)E+=p[I];if(E<=0)return;for(var U=-y,T=0,L=0,P=0;U<Q.height;){if(T%2===0){for(var Z=L/2%B.length,V=0,X=0,ee=0;V<Q.width*2;){for(var te=0,I=0;I<g[P].length;++I)te+=g[P][I];if(te<=0)break;if(X%2===0){var D=(1-a.symbolSize)*.5,M=V+g[P][X]*D,H=U+p[T]*D,K=g[P][X]*a.symbolSize,N=p[T]*a.symbolSize,ue=ee/2%B[Z].length;ie(M,H,K,N,B[Z][ue])}V+=g[P][X],++ee,++X,X===g[P].length&&(X=0)}++P,P===g.length&&(P=0)}U+=p[T],++L,++T,T===p.length&&(T=0)}function ie(Se,He,G,de,De){var st=n?1:t,tr=Or(De,Se*st,He*st,G*st,de*st,a.color,a.symbolKeepAspect);if(n){var nn=r.painter.renderOneToVNode(tr);nn&&C.children.push(nn)}else Cy(x,tr)}}}}function xy(A){if(!A||A.length===0)return[["rect"]];if(le(A))return[[A]];for(var e=!0,t=0;t<A.length;++t)if(!le(A[t])){e=!1;break}if(e)return xy([A]);for(var r=[],t=0;t<A.length;++t)le(A[t])?r.push([A[t]]):r.push(A[t]);return r}function Fy(A){if(!A||A.length===0)return[[0,0]];if(Ye(A)){var e=Math.ceil(A);return[[e,e]]}for(var t=!0,r=0;r<A.length;++r)if(!Ye(A[r])){t=!1;break}if(t)return Fy([A]);for(var n=[],r=0;r<A.length;++r)if(Ye(A[r])){var e=Math.ceil(A[r]);n.push([e,e])}else{var e=Be(A[r],function(o){return Math.ceil(o)});e.length%2===1?n.push(e.concat(e)):n.push(e)}return n}function lT(A){if(!A||typeof A=="object"&&A.length===0)return[0,0];if(Ye(A)){var e=Math.ceil(A);return[e,e]}var t=Be(A,function(r){return Math.ceil(r)});return A.length%2?t.concat(t):t}function uT(A){return Be(A,function(e){return Ey(e)})}function Ey(A){for(var e=0,t=0;t<A.length;++t)e+=A[t];return A.length%2===1?e*2:e}function fT(A,e){A.eachRawSeries(function(t){if(!A.isSeriesFiltered(t)){var r=t.getData();r.hasItemVisual()&&r.each(function(a){var o=r.getItemVisual(a,"decal");if(o){var s=r.ensureUniqueItemVisual(a,"style");s.decal=fv(o,e)}});var n=r.getVisual("decal");if(n){var i=r.getVisual("style");i.decal=fv(n,e)}}})}var EA=new yA,Zl={};function cT(A,e){process.env.NODE_ENV!=="production"&&Zl[A]&&Ge("Already has an implementation of "+A+"."),Zl[A]=e}function hT(A){return process.env.NODE_ENV!=="production"&&(Zl[A]||Ge("Implementation of "+A+" doesn't exists.")),Zl[A]}var vT=1,dT=800,pT=900,gT=1e3,BT=2e3,mT=5e3,by=1e3,yT=1100,cv=2e3,Sy=3e3,wT=4e3,Jl=4500,CT=4600,_T=5e3,QT=6e3,Uy=7e3,xT={PROCESSOR:{FILTER:gT,SERIES_FILTER:dT,STATISTIC:mT},VISUAL:{LAYOUT:by,PROGRESSIVE_LAYOUT:yT,GLOBAL:cv,CHART:Sy,POST_CHART_LAYOUT:CT,COMPONENT:wT,BRUSH:_T,CHART_ITEM:Jl,ARIA:QT,DECAL:Uy}},ut="__flagInMainProcess",ql="__mainProcessVersion",Bt="__pendingUpdate",hv="__needsUpdateStatus",Iy=/^[a-zA-Z0-9_]+$/,vv="__connectUpdateStatus",Ty=0,FT=1,ET=2;function Dy(A){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){Wt(this.id);return}return My(this,A,e)}}function Ly(A){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return My(this,A,e)}}function My(A,e,t){return t[0]=t[0]&&t[0].toLowerCase(),yA.prototype[e].apply(A,t)}var Hy=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e})(yA),Oy=Hy.prototype;Oy.on=Ly("on"),Oy.off=Ly("off");var Vn,dv,$l,hr,jl,pv,gv,zi,Wi,Ry,Ny,Bv,Py,eu,ky,Vy,hA,Ky,Yi,Gy=(function(A){J(e,A);function e(t,r,n){var i=A.call(this,new TI)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},i._dom=t;var a="canvas",o="auto",s=!1;if(i[ql]=1,process.env.NODE_ENV!=="production"){var l=_e.hasGlobalWindow?window:global;l&&(a=ve(l.__ECHARTS__DEFAULT__RENDERER__,a),o=ve(l.__ECHARTS__DEFAULT__COARSE_POINTER,o),s=ve(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,s))}n.ssr;var u=i._zr=Hg(t,{renderer:n.renderer||a,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:ve(n.useDirtyRect,s),useCoarsePointer:ve(n.useCoarsePointer,o),pointerSize:n.pointerSize});i._ssr=n.ssr,i._throttledZrFlush=av(ye(u.flush,u),17),i._updateTheme(r),i._locale=_S(n.locale||DB),i._coordSysMgr=new Nh;var f=i._api=ky(i);function c(h,v){return h.__prio-v.__prio}return as(ru,c),as(wv,c),i._scheduler=new ty(i,f,wv,ru),i._messageCenter=new Hy,i._initEvents(),i.resize=ye(i.resize,i),u.animation.on("frame",i._onframe,i),Ry(u,i),Ny(u,i),Tf(i),i}return e.prototype._onframe=function(){if(!this._disposed){Ky(this);var t=this._scheduler;if(this[Bt]){var r=this[Bt].silent;this[ut]=!0,Yi(this);try{Vn(this),hr.update.call(this,null,this[Bt].updateParams)}catch(s){throw this[ut]=!1,this[Bt]=null,s}this._zr.flush(),this[ut]=!1,this[Bt]=null,zi.call(this,r),Wi.call(this,r)}else if(t.unfinished){var n=vT,i=this._model,a=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),pv(this,i),t.performVisualTasks(i),eu(this,this._model,a,"remain",{}),n-=+new Date-o}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,r,n){if(this[ut]){process.env.NODE_ENV!=="production"&&Ge("`setOption` should not be called during main process.");return}if(this._disposed){Wt(this.id);return}var i,a,o;if(he(r)&&(n=r.lazyUpdate,i=r.silent,a=r.replaceMerge,o=r.transition,r=r.notMerge),this[ut]=!0,Yi(this),!this._model||r){var s=new fU(this._api),l=this._theme,u=this._model=new Wh;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:a},Cv);var f={seriesTransition:o,optionChanged:!0};if(n)this[Bt]={silent:i,updateParams:f},this[ut]=!1,this.getZr().wakeUp();else{try{Vn(this),hr.update.call(this,null,f)}catch(c){throw this[Bt]=null,this[ut]=!1,c}this._ssr||this._zr.flush(),this[Bt]=null,this[ut]=!1,zi.call(this,i),Wi.call(this,i)}},e.prototype.setTheme=function(t,r){if(this[ut]){process.env.NODE_ENV!=="production"&&Ge("`setTheme` should not be called during main process.");return}if(this._disposed){Wt(this.id);return}var n=this._model;if(n){var i=r&&r.silent,a=null;this[Bt]&&(i==null&&(i=this[Bt].silent),a=this[Bt].updateParams,this[Bt]=null),this[ut]=!0,Yi(this);try{this._updateTheme(t),n.setTheme(this._theme),Vn(this),hr.update.call(this,{type:"setTheme"},a)}catch(o){throw this[ut]=!1,o}this[ut]=!1,zi.call(this,i),Wi.call(this,i)}},e.prototype._updateTheme=function(t){le(t)&&(t=zy[t]),t&&(t=Ue(t),t&&dm(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||_e.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return process.env.NODE_ENV!=="production"&&pt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var r=this._zr.painter;if(process.env.NODE_ENV!=="production"&&r.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return r.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var r=this._zr.painter;if(process.env.NODE_ENV!=="production"&&r.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return r.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,r=t.storage.getDisplayList();return b(r,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){Wt(this.id);return}t=t||{};var r=t.excludeComponents,n=this._model,i=[],a=this;b(r,function(s){n.eachComponent({mainType:s},function(l){var u=a._componentsMap[l.__viewId];u.group.ignore||(i.push(u),u.group.ignore=!0)})});var o=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return b(i,function(s){s.group.ignore=!1}),o},e.prototype.getConnectedDataURL=function(t){if(this._disposed){Wt(this.id);return}var r=t.type==="svg",n=this.group,i=Math.min,a=Math.max,o=1/0;if(Wy[n]){var s=o,l=o,u=-o,f=-o,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();b(so,function(m,y){if(m.group===n){var _=r?m.getZr().painter.getSvgDom().innerHTML:m.renderToCanvas(Ue(t)),C=m.getDom().getBoundingClientRect();s=i(C.left,s),l=i(C.top,l),u=a(C.right,u),f=a(C.bottom,f),c.push({dom:_,left:C.left,top:C.top})}}),s*=h,l*=h,u*=h,f*=h;var v=u-s,d=f-l,g=rr.createCanvas(),p=Hg(g,{renderer:r?"svg":"canvas"});if(p.resize({width:v,height:d}),r){var B="";return b(c,function(m){var y=m.left-s,_=m.top-l;B+='<g transform="translate('+y+","+_+')">'+m.dom+"</g>"}),p.painter.getSvgRoot().innerHTML=B,t.connectedBackgroundColor&&p.painter.setBackgroundColor(t.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}else return t.connectedBackgroundColor&&p.add(new qe({shape:{x:0,y:0,width:v,height:d},style:{fill:t.connectedBackgroundColor}})),b(c,function(m){var y=new Ir({style:{x:m.left*h-s,y:m.top*h-l,image:m.dom}});p.add(y)}),p.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,r,n){return jl(this,"convertToPixel",t,r,n)},e.prototype.convertToLayout=function(t,r,n){return jl(this,"convertToLayout",t,r,n)},e.prototype.convertFromPixel=function(t,r,n){return jl(this,"convertFromPixel",t,r,n)},e.prototype.containPixel=function(t,r){if(this._disposed){Wt(this.id);return}var n=this._model,i,a=Uc(n,t);return b(a,function(o,s){s.indexOf("Models")>=0&&b(o,function(l){var u=l.coordinateSystem;if(u&&u.containPoint)i=i||!!u.containPoint(r);else if(s==="seriesModels"){var f=this._chartsMap[l.__viewId];f&&f.containPoint?i=i||f.containPoint(r,l):process.env.NODE_ENV!=="production"&&xt(s+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&xt(s+": containPoint is not supported")},this)},this),!!i},e.prototype.getVisual=function(t,r){var n=this._model,i=Uc(n,t,{defaultMainType:"series"}),a=i.seriesModel;process.env.NODE_ENV!=="production"&&(a||xt("There is no specified series model"));var o=a.getData(),s=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?o.indexOfRawIndex(i.dataIndex):null;return s!=null?MI(o,s,r):HI(o,r)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;b(bT,function(n){var i=function(a){var o=t.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&ao(s,function(d){var g=Le(d);if(g&&g.dataIndex!=null){var p=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=p&&p.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=Y({},g.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),v=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!u&&!(h&&v)&&xt("model or view can not be found by params"),l.event=a,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:v},t.trigger(n,l)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)});var r=this._messageCenter;b(yv,function(n,i){r.on(i,function(a){t.trigger(i,a)})}),OI(r,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Wt(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Wt(this.id);return}this._disposed=!0;var t=this.getDom();t&&t0(this.getDom(),Qv,"");var r=this,n=r._api,i=r._model;b(r._componentsViews,function(a){a.dispose(i,n)}),b(r._chartsViews,function(a){a.dispose(i,n)}),r._zr.dispose(),r._dom=r._model=r._chartsMap=r._componentsMap=r._chartsViews=r._componentsViews=r._scheduler=r._api=r._zr=r._throttledZrFlush=r._theme=r._coordSysMgr=r._messageCenter=null,delete so[r.id]},e.prototype.resize=function(t){if(this[ut]){process.env.NODE_ENV!=="production"&&Ge("`resize` should not be called during main process.");return}if(this._disposed){Wt(this.id);return}this._zr.resize(t);var r=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!r){var n=r.resetOption("media"),i=t&&t.silent;this[Bt]&&(i==null&&(i=this[Bt].silent),n=!0,this[Bt]=null),this[ut]=!0,Yi(this);try{n&&Vn(this),hr.update.call(this,{type:"resize",animation:Y({duration:0},t&&t.animation)})}catch(a){throw this[ut]=!1,a}this[ut]=!1,zi.call(this,i),Wi.call(this,i)}},e.prototype.showLoading=function(t,r){if(this._disposed){Wt(this.id);return}if(he(t)&&(r=t,t=""),t=t||"default",this.hideLoading(),!_v[t]){process.env.NODE_ENV!=="production"&&xt("Loading effects "+t+" not exists.");return}var n=_v[t](this._api,r),i=this._zr;this._loadingFX=n,i.add(n)},e.prototype.hideLoading=function(){if(this._disposed){Wt(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var r=Y({},t);return r.type=Au[t.type],r},e.prototype.dispatchAction=function(t,r){if(this._disposed){Wt(this.id);return}if(he(r)||(r={silent:!!r}),!!tu[t.type]&&this._model){if(this[ut]){this._pendingActions.push(t);return}var n=r.silent;gv.call(this,t,n);var i=r.flush;i?this._zr.flush():i!==!1&&_e.browser.weChat&&this._throttledZrFlush(),zi.call(this,n),Wi.call(this,n)}},e.prototype.updateLabelLayout=function(){EA.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){Wt(this.id);return}var r=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(r);process.env.NODE_ENV!=="production"&&fe(t.data&&i),i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){Vn=function(f){var c=f._scheduler;c.restorePipelines(f._model),c.prepareStageTasks(),dv(f,!0),dv(f,!1),c.plan()},dv=function(f,c){for(var h=f._model,v=f._scheduler,d=c?f._componentsViews:f._chartsViews,g=c?f._componentsMap:f._chartsMap,p=f._zr,B=f._api,m=0;m<d.length;m++)d[m].__alive=!1;c?h.eachComponent(function(C,Q){C!=="series"&&y(Q)}):h.eachSeries(y);function y(C){var Q=C.__requireNewView;C.__requireNewView=!1;var x="_ec_"+C.id+"_"+C.type,F=!Q&&g[x];if(!F){var S=VA(C.type),E=c?xA.getClass(S.main,S.sub):FA.getClass(S.sub);process.env.NODE_ENV!=="production"&&fe(E,S.sub+" does not exist."),F=new E,F.init(h,B),g[x]=F,d.push(F),p.add(F.group)}C.__viewId=F.__id=x,F.__alive=!0,F.__model=C,F.group.__ecComponentInfo={mainType:C.mainType,index:C.componentIndex},!c&&v.prepareView(F,C,h,B)}for(var m=0;m<d.length;){var _=d[m];_.__alive?m++:(!c&&_.renderTask.dispose(),p.remove(_.group),_.dispose(h,B),d.splice(m,1),g[_.__id]===_&&delete g[_.__id],_.__id=_.group.__ecComponentInfo=null)}},$l=function(f,c,h,v,d){var g=f._model;if(g.setUpdatePayload(h),!v){b([].concat(f._componentsViews).concat(f._chartsViews),_);return}var p={};p[v+"Id"]=h[v+"Id"],p[v+"Index"]=h[v+"Index"],p[v+"Name"]=h[v+"Name"];var B={mainType:v,query:p};d&&(B.subType=d);var m=h.excludeSeriesId,y;m!=null&&(y=we(),b(Lt(m),function(C){var Q=kA(C,null);Q!=null&&y.set(Q,!0)})),g&&g.eachComponent(B,function(C){var Q=y&&y.get(C.id)!=null;if(!Q)if(q0(h))if(C instanceof JA)h.type===En&&!h.notBlur&&!C.get(["emphasis","disabled"])&&ab(C,h,f._api);else{var x=nh(C.mainType,C.componentIndex,h.name,f._api),F=x.focusSelf,S=x.dispatchers;h.type===En&&F&&!h.notBlur&&rh(C.mainType,C.componentIndex,f._api),S&&b(S,function(E){h.type===En?Js(E):qs(E)})}else ah(h)&&C instanceof JA&&(lb(C,h,f._api),X0(C),hA(f))},f),g&&g.eachComponent(B,function(C){var Q=y&&y.get(C.id)!=null;Q||_(f[v==="series"?"_chartsMap":"_componentsMap"][C.__viewId])},f);function _(C){C&&C.__alive&&C[c]&&C[c](C.__model,g,f._api,h)}},hr={prepareAndUpdate:function(f){Vn(this),hr.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,c){var h=this._model,v=this._api,d=this._zr,g=this._coordSysMgr,p=this._scheduler;if(h){h.setUpdatePayload(f),p.restoreData(h,f),p.performSeriesTasks(h),g.create(h,v),p.performDataProcessorTasks(h,f),pv(this,h),g.update(h,v),r(h),p.performVisualTasks(h,f);var B=h.get("backgroundColor")||"transparent";d.setBackgroundColor(B);var m=h.get("darkMode");m!=null&&m!=="auto"&&d.setDarkMode(m),Bv(this,h,v,f,c),EA.trigger("afterupdate",h,v)}},updateTransform:function(f){var c=this,h=this._model,v=this._api;if(h){h.setUpdatePayload(f);var d=[];h.eachComponent(function(p,B){if(p!=="series"){var m=c.getViewOfComponentModel(B);if(m&&m.__alive)if(m.updateTransform){var y=m.updateTransform(B,h,v,f);y&&y.update&&d.push(m)}else d.push(m)}});var g=we();h.eachSeries(function(p){var B=c._chartsMap[p.__viewId];if(B.updateTransform){var m=B.updateTransform(p,h,v,f);m&&m.update&&g.set(p.uid,1)}else g.set(p.uid,1)}),r(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:g}),eu(this,h,v,f,{},g),EA.trigger("afterupdate",h,v)}},updateView:function(f){var c=this._model;c&&(c.setUpdatePayload(f),FA.markUpdateMethod(f,"updateView"),r(c),this._scheduler.performVisualTasks(c,f,{setDirty:!0}),Bv(this,c,this._api,f,{}),EA.trigger("afterupdate",c,this._api))},updateVisual:function(f){var c=this,h=this._model;h&&(h.setUpdatePayload(f),h.eachSeries(function(v){v.getData().clearAllVisual()}),FA.markUpdateMethod(f,"updateVisual"),r(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(v,d){if(v!=="series"){var g=c.getViewOfComponentModel(d);g&&g.__alive&&g.updateVisual(d,h,c._api,f)}}),h.eachSeries(function(v){var d=c._chartsMap[v.__viewId];d.updateVisual(v,h,c._api,f)}),EA.trigger("afterupdate",h,this._api))},updateLayout:function(f){hr.update.call(this,f)}};function t(f,c,h,v,d){if(f._disposed){Wt(f.id);return}for(var g=f._model,p=f._coordSysMgr.getCoordinateSystems(),B,m=Uc(g,h),y=0;y<p.length;y++){var _=p[y];if(_[c]&&(B=_[c](g,m,v,d))!=null)return B}process.env.NODE_ENV!=="production"&&xt("No coordinate system that supports "+c+" found by the given finder.")}jl=t,pv=function(f,c){var h=f._chartsMap,v=f._scheduler;c.eachSeries(function(d){v.updateStreamModes(d,h[d.__viewId])})},gv=function(f,c){var h=this,v=this.getModel(),d=f.type,g=f.escapeConnect,p=tu[d],B=(p.update||"update").split(":"),m=B.pop(),y=B[0]!=null&&VA(B[0]);this[ut]=!0,Yi(this);var _=[f],C=!1;f.batch&&(C=!0,_=Be(f.batch,function(P){return P=Ne(Y({},P),f),P.batch=null,P}));var Q=[],x,F=[],S=p.nonRefinedEventType,E=ah(f),I=q0(f);if(I&&Y0(this._api),b(_,function(P){var Z=p.action(P,v,h._api);if(p.refineEvent?F.push(Z):x=Z,x=x||Y({},P),x.type=S,Q.push(x),I){var V=Ic(f),X=V.queryOptionMap,ee=V.mainTypeSpecified,te=ee?X.keys()[0]:"series";$l(h,m,P,te),hA(h)}else E?($l(h,m,P,"series"),hA(h)):y&&$l(h,m,P,y.main,y.sub)}),m!=="none"&&!I&&!E&&!y)try{this[Bt]?(Vn(this),hr.update.call(this,f),this[Bt]=null):hr[m].call(this,f)}catch(P){throw this[ut]=!1,P}if(C?x={type:S,escapeConnect:g,batch:Q}:x=Q[0],this[ut]=!1,!c){var U=void 0;if(p.refineEvent){var T=p.refineEvent(F,f,v,this._api).eventContent;fe(he(T)),U=Ne({type:p.refinedEventType},T),U.fromAction=f.type,U.fromActionPayload=f,U.escapeConnect=!0}var L=this._messageCenter;L.trigger(x.type,x),U&&L.trigger(U.type,U)}},zi=function(f){for(var c=this._pendingActions;c.length;){var h=c.shift();gv.call(this,h,f)}},Wi=function(f){!f&&this.trigger("updated")},Ry=function(f,c){f.on("rendered",function(h){c.trigger("rendered",h),f.animation.isFinished()&&!c[Bt]&&!c._scheduler.unfinished&&!c._pendingActions.length&&c.trigger("finished")})},Ny=function(f,c){f.on("mouseover",function(h){var v=h.target,d=ao(v,Si);d&&(ob(d,h,c._api),hA(c))}).on("mouseout",function(h){var v=h.target,d=ao(v,Si);d&&(sb(d,h,c._api),hA(c))}).on("click",function(h){var v=h.target,d=ao(v,function(B){return Le(B).dataIndex!=null},!0);if(d){var g=d.selected?"unselect":"select",p=Le(d);c._api.dispatchAction({type:g,dataType:p.dataType,dataIndexInside:p.dataIndex,seriesIndex:p.seriesIndex,isFromClick:!0})}})};function r(f){f.clearColorPalette(),f.eachSeries(function(c){c.clearColorPalette()})}function n(f){var c=[],h=[],v=!1;if(f.eachComponent(function(B,m){var y=m.get("zlevel")||0,_=m.get("z")||0,C=m.getZLevelKey();v=v||!!C,(B==="series"?h:c).push({zlevel:y,z:_,idx:m.componentIndex,type:B,key:C})}),v){var d=c.concat(h),g,p;as(d,function(B,m){return B.zlevel===m.zlevel?B.z-m.z:B.zlevel-m.zlevel}),b(d,function(B){var m=f.getComponent(B.type,B.idx),y=B.zlevel,_=B.key;g!=null&&(y=Math.max(g,y)),_?(y===g&&_!==p&&y++,p=_):p&&(y===g&&y++,p=""),g=y,m.setZLevel(y)})}}Bv=function(f,c,h,v,d){n(c),Py(f,c,h,v,d),b(f._chartsViews,function(g){g.__alive=!1}),eu(f,c,h,v,d),b(f._chartsViews,function(g){g.__alive||g.remove(c,h)})},Py=function(f,c,h,v,d,g){b(g||f._componentsViews,function(p){var B=p.__model;l(B,p),p.render(B,c,h,v),s(B,p),u(B,p)})},eu=function(f,c,h,v,d,g){var p=f._scheduler;d=Y(d||{},{updatedSeries:c.getSeries()}),EA.trigger("series:beforeupdate",c,h,d);var B=!1;c.eachSeries(function(m){var y=f._chartsMap[m.__viewId];y.__alive=!0;var _=y.renderTask;p.updatePayload(_,v),l(m,y),g&&g.get(m.uid)&&_.dirty(),_.perform(p.getPerformArgs(_))&&(B=!0),y.group.silent=!!m.get("silent"),o(m,y),X0(m)}),p.unfinished=B||p.unfinished,EA.trigger("series:layoutlabels",c,h,d),EA.trigger("series:transition",c,h,d),c.eachSeries(function(m){var y=f._chartsMap[m.__viewId];s(m,y),u(m,y)}),a(f,c),EA.trigger("series:afterupdate",c,h,d)},hA=function(f){f[hv]=!0,f.getZr().wakeUp()},Yi=function(f){f[ql]=(f[ql]+1)%1e3},Ky=function(f){f[hv]&&(f.getZr().storage.traverse(function(c){Di(c)||i(c)}),f[hv]=!1)};function i(f){for(var c=[],h=f.currentStates,v=0;v<h.length;v++){var d=h[v];d==="emphasis"||d==="blur"||d==="select"||c.push(d)}f.selected&&f.states.select&&c.push("select"),f.hoverState===Gs&&f.states.emphasis?c.push("emphasis"):f.hoverState===Ks&&f.states.blur&&c.push("blur"),f.useStates(c)}function a(f,c){var h=f._zr,v=h.storage,d=0;v.traverse(function(g){g.isGroup||d++}),d>c.get("hoverLayerThreshold")&&!_e.node&&!_e.worker&&c.eachSeries(function(g){if(!g.preventUsingHoverLayer){var p=f._chartsMap[g.__viewId];p.__alive&&p.eachRendered(function(B){B.states.emphasis&&(B.states.emphasis.hoverLayer=!0)})}})}function o(f,c){var h=f.get("blendMode")||null;c.eachRendered(function(v){v.isGroup||(v.style.blend=h)})}function s(f,c){if(!f.preventAutoZ){var h=za(f);c.eachRendered(function(v){return _B(v,h.z,h.zlevel),!0})}}function l(f,c){c.eachRendered(function(h){if(!Di(h)){var v=h.getTextContent(),d=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function u(f,c){var h=f.getModel("stateAnimation"),v=f.isAnimationEnabled(),d=h.get("duration"),g=d>0?{duration:d,delay:h.get("delay"),easing:h.get("easing")}:null;c.eachRendered(function(p){if(p.states&&p.states.emphasis){if(Di(p))return;if(p instanceof ke&&db(p),p.__dirty){var B=p.prevStates;B&&p.useStates(B)}if(v){p.stateTransition=g;var m=p.getTextContent(),y=p.getTextGuideLine();m&&(m.stateTransition=g),y&&(y.stateTransition=g)}p.__dirty&&i(p)}})}ky=function(f){return new((function(c){J(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(v){for(;v;){var d=v.__ecComponentInfo;if(d!=null)return f._model.getComponent(d.mainType,d.index);v=v.parent}},h.prototype.enterEmphasis=function(v,d){Js(v,d),hA(f)},h.prototype.leaveEmphasis=function(v,d){qs(v,d),hA(f)},h.prototype.enterBlur=function(v){ib(v),hA(f)},h.prototype.leaveBlur=function(v){K0(v),hA(f)},h.prototype.enterSelect=function(v){G0(v),hA(f)},h.prototype.leaveSelect=function(v){z0(v),hA(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},h.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},h.prototype.getMainProcessVersion=function(){return f[ql]},h})(sm))(f)},Vy=function(f){function c(h,v){for(var d=0;d<h.length;d++){var g=h[d];g[vv]=v}}b(Au,function(h,v){f._messageCenter.on(v,function(d){if(Wy[f.group]&&f[vv]!==Ty){if(d&&d.escapeConnect)return;var g=f.makeActionFromEvent(d),p=[];b(so,function(B){B!==f&&B.group===f.group&&p.push(B)}),c(p,Ty),b(p,function(B){B[vv]!==FT&&B.dispatchAction(g)}),c(p,ET)}})})}})(),e})(yA),mv=Gy.prototype;mv.on=Dy("on"),mv.off=Dy("off"),mv.one=function(A,e,t){var r=this;PA("ECharts#one is deprecated.");function n(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];e&&e.apply&&e.apply(this,i),r.off(A,n)}this.on.call(this,A,n,t)};var bT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Wt(A){process.env.NODE_ENV!=="production"&&xt("Instance "+A+" has been disposed")}var tu={},Au={},yv={},wv=[],Cv=[],ru=[],zy={},_v={},so={},Wy={},ST=+new Date-0,Qv="_echarts_instance_";function UT(A,e,t){{if(process.env.NODE_ENV!=="production"&&!A)throw new Error("Initialize failed: invalid dom.");var r=IT(A);if(r)return process.env.NODE_ENV!=="production"&&xt("There is a chart instance already initialized on the dom."),r;process.env.NODE_ENV!=="production"&&ii(A)&&A.nodeName.toUpperCase()!=="CANVAS"&&(!A.clientWidth&&!t||!A.clientHeight&&!t)&&xt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var n=new Gy(A,e,t);return n.id="ec_"+ST++,so[n.id]=n,t0(A,Qv,n.id),Vy(n),EA.trigger("afterinit",n),n}function IT(A){return so[XF(A,Qv)]}function Yy(A,e){zy[A]=e}function Xy(A){Te(Cv,A)<0&&Cv.push(A)}function Zy(A,e){Fv(wv,A,e,BT)}function TT(A){xv("afterinit",A)}function DT(A){xv("afterupdate",A)}function xv(A,e){EA.on(A,e)}function Kn(A,e,t){var r,n,i,a,o;me(e)&&(t=e,e=""),he(A)?(r=A.type,n=A.event,a=A.update,o=A.publishNonRefinedEvent,t||(t=A.action),i=A.refineEvent):(r=A,n=e);function s(u){return u.toLowerCase()}n=s(n||r);var l=i?s(r):n;tu[r]||(fe(Iy.test(r)&&Iy.test(n)),i&&fe(n!==r),tu[r]={actionType:r,refinedEventType:n,nonRefinedEventType:l,update:a,action:t,refineEvent:i},yv[n]=1,i&&o&&(yv[l]=1),process.env.NODE_ENV!=="production"&&Au[l]&&Ge(l+' must not be shared; use "refineEvent" if you intend to share an event name.'),Au[l]=r)}function LT(A,e){Nh.register(A,e)}function MT(A,e){Fv(ru,A,e,by,"layout")}function Gn(A,e){Fv(ru,A,e,Sy,"visual")}var Jy=[];function Fv(A,e,t,r,n){if((me(e)||he(e))&&(t=e,e=r),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");b(A,function(a){fe(a.__raw!==t)})}if(!(Te(Jy,t)>=0)){Jy.push(t);var i=ty.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,A.push(i)}}function qy(A,e){_v[A]=e}function HT(A,e,t){var r=hT("registerMap");r&&r(A,e,t)}var OT=VU;Gn(cv,BI),Gn(Jl,mI),Gn(Jl,yI),Gn(cv,DI),Gn(Jl,LI),Gn(Uy,fT),Xy(dm),Zy(pT,_U),qy("default",wI),Kn({type:En,event:En,update:En},Dt),Kn({type:Ws,event:Ws,update:Ws},Dt),Kn({type:Ys,event:jc,update:Ys,action:Dt,refineEvent:Ev,publishNonRefinedEvent:!0}),Kn({type:$c,event:jc,update:$c,action:Dt,refineEvent:Ev,publishNonRefinedEvent:!0}),Kn({type:Xs,event:jc,update:Xs,action:Dt,refineEvent:Ev,publishNonRefinedEvent:!0});function Ev(A,e,t,r){return{eventContent:{selected:ub(t),isFromClick:e.isFromClick||!1}}}Yy("default",{}),Yy("dark",ay);function lo(A){return A==null?0:A.length||1}function $y(A){return A}var RT=(function(){function A(e,t,r,n,i,a){this._old=e,this._new=t,this._oldKeyGetter=r||$y,this._newKeyGetter=n||$y,this.context=i,this._diffModeMultiple=a==="multiple"}return A.prototype.add=function(e){return this._add=e,this},A.prototype.update=function(e){return this._update=e,this},A.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},A.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},A.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},A.prototype.remove=function(e){return this._remove=e,this},A.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},A.prototype._executeOneToOne=function(){var e=this._old,t=this._new,r={},n=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,r,i,"_newKeyGetter");for(var a=0;a<e.length;a++){var o=n[a],s=r[o],l=lo(s);if(l>1){var u=s.shift();s.length===1&&(r[o]=s[0]),this._update&&this._update(u,a)}else l===1?(r[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,r)},A.prototype._executeMultiple=function(){var e=this._old,t=this._new,r={},n={},i=[],a=[];this._initIndexMap(e,r,i,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var o=0;o<i.length;o++){var s=i[o],l=r[s],u=n[s],f=lo(l),c=lo(u);if(f>1&&c===1)this._updateManyToOne&&this._updateManyToOne(u,l),n[s]=null;else if(f===1&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),n[s]=null;else if(f===1&&c===1)this._update&&this._update(u,l),n[s]=null;else if(f>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),n[s]=null;else if(f>1)for(var h=0;h<f;h++)this._remove&&this._remove(l[h]);else this._remove&&this._remove(l)}this._performRestAdd(a,n)},A.prototype._performRestAdd=function(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=t[n],a=lo(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[n]=null}},A.prototype._initIndexMap=function(e,t,r,n){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o="_ec_"+this[n](e[a],a);if(i||(r[a]=o),!!t){var s=t[o],l=lo(s);l===0?(t[o]=a,i&&r.push(o)):l===1?t[o]=[s,a]:s.push(a)}}},A})(),NT=(function(){function A(e,t){this._encode=e,this._schema=t}return A.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},A.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},A})();function PT(A,e){var t={},r=t.encode={},n=we(),i=[],a=[],o={};b(A.dimensions,function(c){var h=A.getDimensionInfo(c),v=h.coordDim;if(v){process.env.NODE_ENV!=="production"&&fe(Kh.get(v)==null);var d=h.coordDimIndex;bv(r,v)[d]=c,h.isExtraCoord||(n.set(v,1),VT(h.type)&&(i[0]=c),bv(o,v)[d]=A.getDimensionIndex(h.name)),h.defaultTooltip&&a.push(c)}Kh.each(function(g,p){var B=bv(r,p),m=h.otherDims[p];m!=null&&m!==!1&&(B[m]=h.name)})});var s=[],l={};n.each(function(c,h){var v=r[h];l[h]=v[0],s=s.concat(v)}),t.dataDimsOnCoord=s,t.dataDimIndicesOnCoord=Be(s,function(c){return A.getDimensionInfo(c).storeDimIndex}),t.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(i=u.slice());var f=r.tooltip;return f&&f.length?a=f.slice():a.length||(a=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=a,t.userOutput=new NT(o,e),t}function bv(A,e){return A.hasOwnProperty(e)||(A[e]=[]),A[e]}function kT(A){return A==="category"?"ordinal":A==="time"?"time":"float"}function VT(A){return!(A==="ordinal"||A==="time")}var nu=(function(){function A(e){this.otherDims={},e!=null&&Y(this,e)}return A})(),KT=ze(),GT={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},jy=(function(){function A(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return A.prototype.isDimensionOmitted=function(){return this._dimOmitted},A.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Aw(this.source)))},A.prototype.getSourceDimensionIndex=function(e){return ve(this._dimNameMap.get(e),-1)},A.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},A.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=ym(this.source),r=!rw(e),n="",i=[],a=0,o=0;a<e;a++){var s=void 0,l=void 0,u=void 0,f=this.dimensions[o];if(f&&f.storeDimIndex===a)s=t?f.name:null,l=f.type,u=f.ordinalMeta,o++;else{var c=this.getSourceDimension(a);c&&(s=t?c.name:null,l=c.type)}i.push({property:s,type:l,ordinalMeta:u}),t&&s!=null&&(!f||!f.isCalculationCoord)&&(n+=r?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),n+="$",n+=GT[l]||"f",u&&(n+=u.uid),n+="$"}var h=this.source,v=[h.seriesLayoutBy,h.startIndex,n].join("$$");return{dimensions:i,hash:v}},A.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,r=0;t<this._fullDimCount;t++){var n=void 0,i=this.dimensions[r];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(n=i.name),r++;else{var a=this.getSourceDimension(t);a&&(n=a.name)}e.push(n)}return e},A.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},A})();function ew(A){return A instanceof jy}function tw(A){for(var e=we(),t=0;t<(A||[]).length;t++){var r=A[t],n=he(r)?r.name:r;n!=null&&e.get(n)==null&&e.set(n,t)}return e}function Aw(A){var e=KT(A);return e.dimNameMap||(e.dimNameMap=tw(A.dimensionsDefine))}function rw(A){return A>30}var uo=he,Rr=Be,zT=typeof Int32Array>"u"?Array:Int32Array,WT="e\0\0",nw=-1,YT=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],XT=["_approximateExtent"],iw,iu,fo,Xi,Sv,co,Uv,ZT=(function(){function A(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r,n=!1;ew(e)?(r=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,r=e),r=r||["x","y"];for(var i={},a=[],o={},s=!1,l={},u=0;u<r.length;u++){var f=r[u],c=le(f)?new nu({name:f}):f instanceof nu?f:new nu(f),h=c.name;c.type=c.type||"float",c.coordDim||(c.coordDim=h,c.coordDimIndex=0);var v=c.otherDims=c.otherDims||{};a.push(h),i[h]=c,l[h]!=null&&(s=!0),c.createInvertedIndices&&(o[h]=[]);var d=u;Ye(c.storeDimIndex)&&(d=c.storeDimIndex),v.itemName===0&&(this._nameDimIdx=d),v.itemId===0&&(this._idDimIdx=d),process.env.NODE_ENV!=="production"&&fe(n||c.storeDimIndex>=0),n&&(c.storeDimIndex=u)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var g=this._dimIdxToName=we();b(a,function(p){g.set(i[p].storeDimIndex,p)})}}return A.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var r=this._dimIdxToName.get(t);if(r!=null)return r;var n=this._schema.getSourceDimension(t);if(n)return n.name},A.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var r=this._getDimInfo(e);return r?r.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},A.prototype._recognizeDimIndex=function(e){if(Ye(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},A.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&t==null)throw new Error("Unknown dimension "+e);return t},A.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},A.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(r){return t.hasOwnProperty(r)?t[r]:void 0}:function(r){return t[r]}},A.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},A.prototype.mapDimension=function(e,t){var r=this._dimSummary;if(t==null)return r.encodeFirstDimNotExtra[e];var n=r.encode[e];return n?n[t]:null},A.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,r=t.encode[e];return(r||[]).slice()},A.prototype.getStore=function(){return this._store},A.prototype.initData=function(e,t,r){var n=this,i;if(e instanceof ev&&(i=e),!i){var a=this.dimensions,o=Zh(e)||kt(e)?new _m(e,a.length):e;i=new ev;var s=Rr(a,function(l){return{type:n._dimInfos[l].type,property:l}});i.initData(o,s,r)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=PT(this,this._schema),this.userOutput=this._dimSummary.userOutput},A.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},A.prototype.appendValues=function(e,t){var r=this._store.appendValues(e,t&&t.length),n=r.start,i=r.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=n;o<i;o++){var s=o-n;this._nameList[o]=t[s],a&&Uv(this,o)}},A.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,r=0;r<t.length;r++){var n=this._dimInfos[t[r]];n.ordinalMeta&&e.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},A.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==fr&&!e.fillStorage},A.prototype._doInit=function(e,t){if(!(e>=t)){var r=this._store,n=r.getProvider();this._updateOrdinalMeta();var i=this._nameList,a=this._idList,o=n.getSource().sourceFormat,s=o===qt;if(s&&!n.pure)for(var l=[],u=e;u<t;u++){var f=n.getItem(u,l);if(!this.hasItemOption&&HF(f)&&(this.hasItemOption=!0),f){var c=f.name;i[u]==null&&c!=null&&(i[u]=kA(c,null));var h=f.id;a[u]==null&&h!=null&&(a[u]=kA(h,null))}}if(this._shouldMakeIdFromName())for(var u=e;u<t;u++)Uv(this,u);iw(this)}},A.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},A.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},A.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},A.prototype.setCalculationInfo=function(e,t){uo(e)?Y(this._calculationInfo,e):this._calculationInfo[e]=t},A.prototype.getName=function(e){var t=this.getRawIndex(e),r=this._nameList[t];return r==null&&this._nameDimIdx!=null&&(r=fo(this,this._nameDimIdx,t)),r==null&&(r=""),r},A.prototype._getCategory=function(e,t){var r=this._store.get(e,t),n=this._store.getOrdinalMeta(e);return n?n.categories[r]:r},A.prototype.getId=function(e){return iu(this,this.getRawIndex(e))},A.prototype.count=function(){return this._store.count()},A.prototype.get=function(e,t){var r=this._store,n=this._dimInfos[e];if(n)return r.get(n.storeDimIndex,t)},A.prototype.getByRawIndex=function(e,t){var r=this._store,n=this._dimInfos[e];if(n)return r.getByRawIndex(n.storeDimIndex,t)},A.prototype.getIndices=function(){return this._store.getIndices()},A.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},A.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},A.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},A.prototype.getValues=function(e,t){var r=this,n=this._store;return ae(e)?n.getValues(Rr(e,function(i){return r._getStoreDimIndex(i)}),t):n.getValues(e)},A.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,r=0,n=t.length;r<n;r++)if(isNaN(this._store.get(t[r],e)))return!1;return!0},A.prototype.indexOfName=function(e){for(var t=0,r=this._store.count();t<r;t++)if(this.getName(t)===e)return t;return-1},A.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},A.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},A.prototype.rawIndexOf=function(e,t){var r=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!r)throw new Error("Do not supported yet");var n=r&&r[t];return n==null||isNaN(n)?nw:n},A.prototype.each=function(e,t,r){me(e)&&(r=t,t=e,e=[]);var n=r||this,i=Rr(Xi(e),this._getStoreDimIndex,this);this._store.each(i,n?ye(t,n):t)},A.prototype.filterSelf=function(e,t,r){me(e)&&(r=t,t=e,e=[]);var n=r||this,i=Rr(Xi(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,n?ye(t,n):t),this},A.prototype.selectRange=function(e){var t=this,r={},n=Xe(e);return b(n,function(i){var a=t._getStoreDimIndex(i);r[a]=e[i]}),this._store=this._store.selectRange(r),this},A.prototype.mapArray=function(e,t,r){me(e)&&(r=t,t=e,e=[]),r=r||this;var n=[];return this.each(e,function(){n.push(t&&t.apply(this,arguments))},r),n},A.prototype.map=function(e,t,r,n){var i=r||n||this,a=Rr(Xi(e),this._getStoreDimIndex,this),o=co(this);return o._store=this._store.map(a,i?ye(t,i):t),o},A.prototype.modify=function(e,t,r,n){var i=this,a=r||n||this;process.env.NODE_ENV!=="production"&&b(Xi(e),function(s){var l=i.getDimensionInfo(s);l.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var o=Rr(Xi(e),this._getStoreDimIndex,this);this._store.modify(o,a?ye(t,a):t)},A.prototype.downSample=function(e,t,r,n){var i=co(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,r,n),i},A.prototype.minmaxDownSample=function(e,t){var r=co(this);return r._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),r},A.prototype.lttbDownSample=function(e,t){var r=co(this);return r._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),r},A.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},A.prototype.getItemModel=function(e){var t=this.hostModel,r=this.getRawDataItem(e);return new et(r,t,t&&t.ecModel)},A.prototype.diff=function(e){var t=this;return new RT(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(r){return iu(e,r)},function(r){return iu(t,r)})},A.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},A.prototype.setVisual=function(e,t){this._visual=this._visual||{},uo(e)?Y(this._visual,e):this._visual[e]=t},A.prototype.getItemVisual=function(e,t){var r=this._itemVisuals[e],n=r&&r[t];return n??this.getVisual(t)},A.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},A.prototype.ensureUniqueItemVisual=function(e,t){var r=this._itemVisuals,n=r[e];n||(n=r[e]={});var i=n[t];return i==null&&(i=this.getVisual(t),ae(i)?i=i.slice():uo(i)&&(i=Y({},i)),n[t]=i),i},A.prototype.setItemVisual=function(e,t,r){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,uo(t)?Y(n,t):n[t]=r},A.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},A.prototype.setLayout=function(e,t){uo(e)?Y(this._layout,e):this._layout[e]=t},A.prototype.getLayout=function(e){return this._layout[e]},A.prototype.getItemLayout=function(e){return this._itemLayouts[e]},A.prototype.setItemLayout=function(e,t,r){this._itemLayouts[e]=r?Y(this._itemLayouts[e]||{},t):t},A.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},A.prototype.setItemGraphicEl=function(e,t){var r=this.hostModel&&this.hostModel.seriesIndex;ZE(r,this.dataType,e,t),this._graphicEls[e]=t},A.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},A.prototype.eachItemGraphicEl=function(e,t){b(this._graphicEls,function(r,n){r&&e&&e.call(t,r,n)})},A.prototype.cloneShallow=function(e){return e||(e=new A(this._schema?this._schema:Rr(this.dimensions,this._getDimInfo,this),this.hostModel)),Sv(e,this),e._store=this._store,e},A.prototype.wrapMethod=function(e,t){var r=this[e];me(r)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=r.apply(this,arguments);return t.apply(this,[n].concat(Uf(arguments)))})},A.internalField=(function(){iw=function(e){var t=e._invertedIndicesMap;b(t,function(r,n){var i=e._dimInfos[n],a=i.ordinalMeta,o=e._store;if(a){r=t[n]=new zT(a.categories.length);for(var s=0;s<r.length;s++)r[s]=nw;for(var s=0;s<o.count();s++)r[o.get(i.storeDimIndex,s)]=s}})},fo=function(e,t,r){return kA(e._getCategory(t,r),null)},iu=function(e,t){var r=e._idList[t];return r==null&&e._idDimIdx!=null&&(r=fo(e,e._idDimIdx,t)),r==null&&(r=WT+t),r},Xi=function(e){return ae(e)||(e=e!=null?[e]:[]),e},co=function(e){var t=new A(e._schema?e._schema:Rr(e.dimensions,e._getDimInfo,e),e.hostModel);return Sv(t,e),t},Sv=function(e,t){b(YT.concat(t.__wrappedMethods||[]),function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e.__wrappedMethods=t.__wrappedMethods,b(XT,function(r){e[r]=Ue(t[r])}),e._calculationInfo=Y({},t._calculationInfo)},Uv=function(e,t){var r=e._nameList,n=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=r[t],s=n[t];if(o==null&&i!=null&&(r[t]=o=fo(e,i,t)),s==null&&a!=null&&(n[t]=s=fo(e,a,t)),s==null&&o!=null){var l=e._nameRepeatCount,u=l[o]=(l[o]||0)+1;s=o,u>1&&(s+="__ec__"+u),n[t]=s}}})(),A})();function JT(A,e){Zh(A)||(A=pm(A)),e=e||{};var t=e.coordDimensions||[],r=e.dimensionsDefine||A.dimensionsDefine||[],n=we(),i=[],a=$T(A,t,r,e.dimensionsCount),o=e.canOmitUnusedDimensions&&rw(a),s=r===A.dimensionsDefine,l=s?Aw(A):tw(r),u=e.encodeDefine;!u&&e.encodeDefaulter&&(u=e.encodeDefaulter(A,a));for(var f=we(u),c=new Tm(a),h=0;h<c.length;h++)c[h]=-1;function v(F){var S=c[F];if(S<0){var E=r[F],I=he(E)?E:{name:E},U=new nu,T=I.name;T!=null&&l.get(T)!=null&&(U.name=U.displayName=T),I.type!=null&&(U.type=I.type),I.displayName!=null&&(U.displayName=I.displayName);var L=i.length;return c[F]=L,U.storeDimIndex=F,i.push(U),U}return i[S]}if(!o)for(var h=0;h<a;h++)v(h);f.each(function(F,S){var E=Lt(F).slice();if(E.length===1&&!le(E[0])&&E[0]<0){f.set(S,!1);return}var I=f.set(S,[]);b(E,function(U,T){var L=le(U)?l.get(U):U;L!=null&&L<a&&(I[T]=L,g(v(L),S,T))})});var d=0;b(t,function(F){var S,E,I,U;if(le(F))S=F,U={};else{U=F,S=U.name;var T=U.ordinalMeta;U.ordinalMeta=null,U=Y({},U),U.ordinalMeta=T,E=U.dimsDef,I=U.otherDims,U.name=U.coordDim=U.coordDimIndex=U.dimsDef=U.otherDims=null}var L=f.get(S);if(L!==!1){if(L=Lt(L),!L.length)for(var P=0;P<(E&&E.length||1);P++){for(;d<a&&v(d).coordDim!=null;)d++;d<a&&L.push(d++)}b(L,function(Z,V){var X=v(Z);if(s&&U.type!=null&&(X.type=U.type),g(Ne(X,U),S,V),X.name==null&&E){var ee=E[V];!he(ee)&&(ee={name:ee}),X.name=X.displayName=ee.name,X.defaultTooltip=ee.defaultTooltip}I&&Ne(X.otherDims,I)})}});function g(F,S,E){Kh.get(S)!=null?F.otherDims[S]=E:(F.coordDim=S,F.coordDimIndex=E,n.set(S,!0))}var p=e.generateCoord,B=e.generateCoordCount,m=B!=null;B=p?B||1:0;var y=p||"value";function _(F){F.name==null&&(F.name=F.coordDim)}if(o)b(i,function(F){_(F)}),i.sort(function(F,S){return F.storeDimIndex-S.storeDimIndex});else for(var C=0;C<a;C++){var Q=v(C),x=Q.coordDim;x==null&&(Q.coordDim=jT(y,n,m),Q.coordDimIndex=0,(!p||B<=0)&&(Q.isExtraCoord=!0),B--),_(Q),Q.type==null&&(tm(A,C)===$t.Must||Q.isExtraCoord&&(Q.otherDims.itemName!=null||Q.otherDims.seriesName!=null))&&(Q.type="ordinal")}return qT(i),new jy({source:A,dimensions:i,fullDimensionCount:a,dimensionOmitted:o})}function qT(A){for(var e=we(),t=0;t<A.length;t++){var r=A[t],n=r.name,i=e.get(n)||0;i>0&&(r.name=n+(i-1)),i++,e.set(n,i)}}function $T(A,e,t,r){var n=Math.max(A.dimensionsDetectedCount||1,e.length,t.length,r||0);return b(e,function(i){var a;he(i)&&(a=i.dimsDef)&&(n=Math.max(n,a.length))}),n}function jT(A,e,t){if(t||e.hasKey(A)){for(var r=0;e.hasKey(A+r);)r++;A+=r}return e.set(A,!0),A}var eD=(function(){function A(e){this.coordSysDims=[],this.axisMap=we(),this.categoryAxisMap=we(),this.coordSysName=e}return A})();function tD(A){var e=A.get("coordinateSystem"),t=new eD(e),r=AD[e];if(r)return r(A,t,t.axisMap,t.categoryAxisMap),t}var AD={cartesian2d:function(A,e,t,r){var n=A.getReferringComponents("xAxis",Mt).models[0],i=A.getReferringComponents("yAxis",Mt).models[0];if(process.env.NODE_ENV!=="production"){if(!n)throw new Error('xAxis "'+oi(A.get("xAxisIndex"),A.get("xAxisId"),0)+'" not found');if(!i)throw new Error('yAxis "'+oi(A.get("xAxisIndex"),A.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),Zi(n)&&(r.set("x",n),e.firstCategoryDimIndex=0),Zi(i)&&(r.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(A,e,t,r){var n=A.getReferringComponents("singleAxis",Mt).models[0];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],t.set("single",n),Zi(n)&&(r.set("single",n),e.firstCategoryDimIndex=0)},polar:function(A,e,t,r){var n=A.getReferringComponents("polar",Mt).models[0],i=n.findAxisModel("radiusAxis"),a=n.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!a)throw new Error("angleAxis option not found");if(!i)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",a),Zi(i)&&(r.set("radius",i),e.firstCategoryDimIndex=0),Zi(a)&&(r.set("angle",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(A,e,t,r){e.coordSysDims=["lng","lat"]},parallel:function(A,e,t,r){var n=A.ecModel,i=n.getComponent("parallel",A.get("parallelIndex")),a=e.coordSysDims=i.dimensions.slice();b(i.parallelAxisIndex,function(o,s){var l=n.getComponent("parallelAxis",o),u=a[s];t.set(u,l),Zi(l)&&(r.set(u,l),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=s))})},matrix:function(A,e,t,r){var n=A.getReferringComponents("matrix",Mt).models[0];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("matrix coordinate system should be specified.");e.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),a=n.getDimensionModel("y");t.set("x",i),t.set("y",a),r.set("x",i),r.set("y",a)}};function Zi(A){return A.get("type")==="category"}function rD(A,e,t){t=t||{};var r=t.byIndex,n=t.stackedCoordDimension,i,a,o;nD(e)?i=e:(a=e.schema,i=a.dimensions,o=e.store);var s=!!(A&&A.get("stack")),l,u,f,c;if(b(i,function(B,m){le(B)&&(i[m]=B={name:B}),s&&!B.isExtraCoord&&(!r&&!l&&B.ordinalMeta&&(l=B),!u&&B.type!=="ordinal"&&B.type!=="time"&&(!n||n===B.coordDim)&&(u=B))}),u&&!r&&!l&&(r=!0),u){f="__\0ecstackresult_"+A.id,c="__\0ecstackedover_"+A.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,v=u.type,d=0;b(i,function(B){B.coordDim===h&&d++});var g={name:f,coordDim:h,coordDimIndex:d,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},p={name:c,coordDim:c,coordDimIndex:d+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};a?(o&&(g.storeDimIndex=o.ensureCalculationDimension(c,v),p.storeDimIndex=o.ensureCalculationDimension(f,v)),a.appendCalculationDimension(g),a.appendCalculationDimension(p)):(i.push(g),i.push(p))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:c,stackResultDimension:f}}function nD(A){return!ew(A.schema)}function Ji(A,e){return!!e&&e===A.getCalculationInfo("stackedDimension")}function iD(A,e){return Ji(A,e)?A.getCalculationInfo("stackResultDimension"):e}function aD(A,e){var t=A.get("coordinateSystem"),r=Nh.get(t),n;return e&&e.coordSysDims&&(n=Be(e.coordSysDims,function(i){var a={name:i},o=e.axisMap.get(i);if(o){var s=o.get("type");a.type=kT(s)}return a})),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}function oD(A,e,t){var r,n;return t&&b(A,function(i,a){var o=i.coordDim,s=t.categoryAxisMap.get(o);s&&(r==null&&(r=a),i.ordinalMeta=s.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&r!=null&&(A[r].otherDims.itemName=0),r}function Iv(A,e,t){t=t||{};var r=e.getSourceManager(),n,i=!1;n=r.getSource(),i=n.sourceFormat===qt;var a=tD(e),o=aD(e,a),s=t.useEncodeDefaulter,l=me(s)?s:s?nt(JS,o,e):null,u={coordDimensions:o,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!i},f=JT(n,u),c=oD(f.dimensions,t.createInvertedIndices,a),h=i?null:r.getSharedDataStore(f),v=rD(e,{schema:f,store:h}),d=new ZT(f,e);d.setCalculationInfo(v);var g=c!=null&&sD(n)?function(p,B,m,y){return y===c?m:this.defaultDimValueGetter(p,B,m,y)}:null;return d.hasItemOption=!1,d.initData(i?n:h,null,g),d}function sD(A){if(A.sourceFormat===qt){var e=lD(A.data||[]);return!ae(Ia(e))}}function lD(A){for(var e=0;e<A.length&&A[e]==null;)e++;return A[e]}function uD(A){var e=Math.pow(10,Ts(Math.abs(A))),t=Math.abs(A/e);return t===0||t===1||t===2||t===3||t===5}function Tv(A){return A.type==="interval"||A.type==="log"}function fD(A,e,t,r,n){var i={},a=i.interval=kg(e/t);r!=null&&a<r&&(a=i.interval=r),n!=null&&a>n&&(a=i.interval=n);var o=i.intervalPrecision=ho(a),s=i.niceTickExtent=[wt(Math.ceil(A[0]/a)*a,o),wt(Math.floor(A[1]/a)*a,o)];return cD(s,A),i}function Dv(A){var e=Math.pow(10,Ts(A)),t=A/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,wt(t*e)}function ho(A){return ar(A)+2}function aw(A,e,t){A[e]=Math.max(Math.min(A[e],t[1]),t[0])}function cD(A,e){!isFinite(A[0])&&(A[0]=e[0]),!isFinite(A[1])&&(A[1]=e[1]),aw(A,0,e),aw(A,1,e),A[0]>A[1]&&(A[0]=A[1])}function Lv(A,e){return A>=e[0]&&A<=e[1]}var hD=(function(){function A(){this.normalize=ow,this.scale=sw}return A.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ye(e.normalize,e),this.scale=ye(e.scale,e)):(this.normalize=ow,this.scale=sw)},A})();function ow(A,e){return e[1]===e[0]?.5:(A-e[0])/(e[1]-e[0])}function sw(A,e){return A*(e[1]-e[0])+e[0]}function Mv(A,e,t){var r=Math.log(A);return[Math.log(t?e[0]:Math.max(0,e[0]))/r,Math.log(t?e[1]:Math.max(0,e[1]))/r]}var Nr=(function(){function A(e){this._calculator=new hD,this._setting=e||{},this._extent=[1/0,-1/0]}return A.prototype.getSetting=function(e){return this._setting[e]},A.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},A.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},A.prototype.getExtent=function(){return this._extent.slice()},A.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},A.prototype._innerSetExtent=function(e,t){var r=this._extent;isNaN(e)||(r[0]=e),isNaN(t)||(r[1]=t),this._brkCtx&&this._brkCtx.update(r)},A.prototype.setBreaksFromOption=function(e){},A.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},A.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},A.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},A.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},A.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},A.prototype.isBlank=function(){return this._isBlank},A.prototype.setBlank=function(e){this._isBlank=e},A})();Hs(Nr);var vD=0,Hv=(function(){function A(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++vD,this._onCollect=e.onCollect}return A.createByAxisModel=function(e){var t=e.option,r=t.data,n=r&&Be(r,dD);return new A({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},A.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},A.prototype.parseAndCollect=function(e){var t,r=this._needCollect;if(!le(e)&&!r)return e;if(r&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(r?(t=this.categories.length,this.categories[t]=e,n.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},A.prototype._getOrCreateMap=function(){return this._map||(this._map=we(this.categories))},A})();function dD(A){return he(A)&&A.value!=null?A.value:A+""}var lw=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;r.type="ordinal";var n=r.getSetting("ordinalMeta");return n||(n=new Hv({})),ae(n)&&(n=new Hv({categories:Be(n,function(i){return he(i)?i.value:i})})),r._ordinalMeta=n,r._extent=r.getSetting("extent")||[0,n.categories.length-1],r}return e.prototype.parse=function(t){return t==null?NaN:le(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Lv(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],r=this._extent,n=r[0];n<=r[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var r=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],a=0,o=this._ordinalMeta.categories.length,s=Math.min(o,r.length);a<s;++a){var l=r[a];n[a]=l,i[l]=a}for(var u=0;a<o;++a){for(;i[u]!=null;)u++;n.push(u),i[u]=a}},e.prototype._getTickNumber=function(t){var r=this._ticksByOrdinalNumber;return r&&t>=0&&t<r.length?r[t]:t},e.prototype.getRawOrdinalNumber=function(t){var r=this._ordinalNumbersByTick;return r&&t>=0&&t<r.length?r[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var r=this.getRawOrdinalNumber(t.value),n=this._ordinalMeta.categories[r];return n==null?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(Nr);Nr.registerClass(lw);var Pr=wt,qi=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return Lv(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ho(t)},e.prototype.getTicks=function(t){t=t||{};var r=this._interval,n=this._extent,i=this._niceExtent,a=this._intervalPrecision,o=Cl(),s=[];if(!r)return s;t.breakTicks;var l=1e4;n[0]<i[0]&&(t.expandToNicedExtent?s.push({value:Pr(i[0]-r,a)}):s.push({value:n[0]}));for(var u=function(v,d){return Math.round((d-v)/r)},f=i[0];f<=i[1];){if(s.push({value:f}),f=Pr(f+r,a),this._brkCtx){var c=this._brkCtx.calcNiceTickMultiple(f,u);c>=0&&(f=Pr(f+c*r,a))}if(s.length>0&&f===s[s.length-1].value)break;if(s.length>l)return[]}var h=s.length?s[s.length-1].value:i[1];return n[1]>h&&(t.expandToNicedExtent?s.push({value:Pr(h+r,a)}):s.push({value:n[1]})),t.breakTicks,s},e.prototype.getMinorTicks=function(t){for(var r=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),a=1;a<r.length;a++){var o=r[a],s=r[a-1];if(!(s.break||o.break)){for(var l=0,u=[],f=o.value-s.value,c=f/t,h=ho(c);l<t-1;){var v=Pr(s.value+(l+1)*c,h);v>i[0]&&v<i[1]&&u.push(v),l++}var d=Cl();d&&d.pruneTicksByBreak("auto",u,this._getNonTransBreaks(),function(g){return g},this._interval,i),n.push(u)}}return n},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,r){if(t==null)return"";var n=r&&r.precision;n==null?n=ar(t.value)||0:n==="auto"&&(n=this._intervalPrecision);var i=Pr(t.value,n,!0);return GB(i)},e.prototype.calcNiceTicks=function(t,r,n){t=t||5;var i=this._extent.slice(),a=this._getExtentSpanWithBreaks();if(isFinite(a)){a<0&&(a=-a,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var o=fD(i,a,t,r,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var r=this._extent.slice();if(r[0]===r[1])if(r[0]!==0){var n=Math.abs(r[0]);t.fixMax||(r[1]+=n/2),r[0]-=n/2}else r[1]=1;var i=r[1]-r[0];isFinite(i)||(r[0]=0,r[1]=1),this._innerSetExtent(r[0],r[1]),r=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval,o=this._intervalPrecision;t.fixMin||(r[0]=Pr(Math.floor(r[0]/a)*a,o)),t.fixMax||(r[1]=Pr(Math.ceil(r[1]/a)*a,o)),this._innerSetExtent(r[0],r[1])},e.prototype.setNiceExtent=function(t,r){this._niceExtent=[t,r]},e.type="interval",e})(Nr);Nr.registerClass(qi);var uw=typeof Float32Array<"u",pD=uw?Float32Array:Array;function vr(A){return ae(A)?uw?new Float32Array(A):A:new pD(A)}var gD="__ec_stack_";function fw(A){return A.get("stack")||gD+A.seriesIndex}function Ov(A){return A.dim+A.index}function cw(A,e){var t=[];return e.eachSeriesByType(A,function(r){vw(r)&&t.push(r)}),t}function BD(A){var e={};b(A,function(s){var l=s.coordinateSystem,u=l.getBaseAxis();if(!(u.type!=="time"&&u.type!=="value"))for(var f=s.getData(),c=u.dim+"_"+u.index,h=f.getDimensionIndex(f.mapDimension(u.dim)),v=f.getStore(),d=0,g=v.count();d<g;++d){var p=v.get(h,d);e[c]?e[c].push(p):e[c]=[p]}});var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(n){n.sort(function(s,l){return s-l});for(var i=null,a=1;a<n.length;++a){var o=n[a]-n[a-1];o>0&&(i=i===null?o:Math.min(i,o))}t[r]=i}}return t}function hw(A){var e=BD(A),t=[];return b(A,function(r){var n=r.coordinateSystem,i=n.getBaseAxis(),a=i.getExtent(),o;if(i.type==="category")o=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var s=i.dim+"_"+i.index,l=e[s],u=Math.abs(a[1]-a[0]),f=i.scale.getExtent(),c=Math.abs(f[1]-f[0]);o=l?u/c*l:u}else{var h=r.getData();o=Math.abs(a[1]-a[0])/h.count()}var v=ht(r.get("barWidth"),o),d=ht(r.get("barMaxWidth"),o),g=ht(r.get("barMinWidth")||(dw(r)?.5:1),o),p=r.get("barGap"),B=r.get("barCategoryGap"),m=r.get("defaultBarGap");t.push({bandWidth:o,barWidth:v,barMaxWidth:d,barMinWidth:g,barGap:p,barCategoryGap:B,defaultBarGap:m,axisKey:Ov(i),stackId:fw(r)})}),mD(t)}function mD(A){var e={};b(A,function(r,n){var i=r.axisKey,a=r.bandWidth,o=e[i]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:null,gap:r.defaultBarGap||0,stacks:{}},s=o.stacks;e[i]=o;var l=r.stackId;s[l]||o.autoWidthCount++,s[l]=s[l]||{width:0,maxWidth:0};var u=r.barWidth;u&&!s[l].width&&(s[l].width=u,u=Math.min(o.remainedWidth,u),o.remainedWidth-=u);var f=r.barMaxWidth;f&&(s[l].maxWidth=f);var c=r.barMinWidth;c&&(s[l].minWidth=c);var h=r.barGap;h!=null&&(o.gap=h);var v=r.barCategoryGap;v!=null&&(o.categoryGap=v)});var t={};return b(e,function(r,n){t[n]={};var i=r.stacks,a=r.bandWidth,o=r.categoryGap;if(o==null){var s=Xe(i).length;o=Math.max(35-s*4,15)+"%"}var l=ht(o,a),u=ht(r.gap,1),f=r.remainedWidth,c=r.autoWidthCount,h=(f-l)/(c+(c-1)*u);h=Math.max(h,0),b(i,function(p){var B=p.maxWidth,m=p.minWidth;if(p.width){var y=p.width;B&&(y=Math.min(y,B)),m&&(y=Math.max(y,m)),p.width=y,f-=y+u*y,c--}else{var y=h;B&&B<y&&(y=Math.min(B,f)),m&&m>y&&(y=m),y!==h&&(p.width=y,f-=y+u*y,c--)}}),h=(f-l)/(c+(c-1)*u),h=Math.max(h,0);var v=0,d;b(i,function(p,B){p.width||(p.width=h),d=p,v+=p.width*(1+u)}),d&&(v-=d.width*u);var g=-v/2;b(i,function(p,B){t[n][B]=t[n][B]||{bandWidth:a,offset:g,width:p.width},g+=p.width*(1+u)})}),t}function yD(A,e,t){if(A&&e){var r=A[Ov(e)];return r}}function wD(A,e){var t=cw(A,e),r=hw(t);b(t,function(n){var i=n.getData(),a=n.coordinateSystem,o=a.getBaseAxis(),s=fw(n),l=r[Ov(o)][s],u=l.offset,f=l.width;i.setLayout({bandWidth:l.bandWidth,offset:u,size:f})})}function CD(A){return{seriesType:A,plan:iv(),reset:function(e){if(vw(e)){var t=e.getData(),r=e.coordinateSystem,n=r.getBaseAxis(),i=r.getOtherAxis(n),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(n.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),f=Ji(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),c=i.isHorizontal(),h=_D(n,i),v=dw(e),d=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),p=t.getLayout("size"),B=t.getLayout("offset");return{progress:function(m,y){for(var _=m.count,C=v&&vr(_*3),Q=v&&s&&vr(_*3),x=v&&vr(_),F=r.master.getRect(),S=c?F.width:F.height,E,I=y.getStore(),U=0;(E=m.next())!=null;){var T=I.get(f?g:a,E),L=I.get(o,E),P=h,Z=void 0;f&&(Z=+T-I.get(a,E));var V=void 0,X=void 0,ee=void 0,te=void 0;if(c){var D=r.dataToPoint([T,L]);if(f){var M=r.dataToPoint([Z,L]);P=M[0]}V=P,X=D[1]+B,ee=D[0]-P,te=p,Math.abs(ee)<d&&(ee=(ee<0?-1:1)*d)}else{var D=r.dataToPoint([L,T]);if(f){var M=r.dataToPoint([L,Z]);P=M[1]}V=D[0]+B,X=P,ee=p,te=D[1]-P,Math.abs(te)<d&&(te=(te<=0?-1:1)*d)}v?(C[U]=V,C[U+1]=X,C[U+2]=c?ee:te,Q&&(Q[U]=c?F.x:V,Q[U+1]=c?X:F.y,Q[U+2]=S),x[E]=E):y.setItemLayout(E,{x:V,y:X,width:ee,height:te}),U+=3}v&&y.setLayout({largePoints:C,largeDataIndices:x,largeBackgroundPoints:Q,valueAxisHorizontal:c})}}}}}}function vw(A){return A.coordinateSystem&&A.coordinateSystem.type==="cartesian2d"}function dw(A){return A.pipelineContext&&A.pipelineContext.large}function _D(A,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var QD=function(A,e,t,r){for(;t<r;){var n=t+r>>>1;A[n][1]<e?t=n+1:r=n}return t},pw=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="time",r}return e.prototype.getLabel=function(t){var r=this.getSetting("useUTC");return xl(t.value,HB[DS(Ya(this._minLevelUnit))]||HB.second,r,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,r,n){var i=this.getSetting("useUTC"),a=this.getSetting("locale");return LS(t,r,n,a,i)},e.prototype.getTicks=function(t){var r=this._interval,n=this._extent,i=[];if(!r)return i;var a=this.getSetting("useUTC"),o=Fl(n[1],a);i.push({value:n[0],time:{level:0,upperTimeUnit:o,lowerTimeUnit:o}});var s=TD(this._minLevelUnit,this._approxInterval,a,n,this._getExtentSpanWithBreaks(),this._brkCtx);i=i.concat(s);var l=Fl(n[1],a);i.push({value:n[1],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}}),this.getSetting("useUTC");var u=Tn.length-1,f=0;return b(i,function(c){u=Math.min(u,Te(Tn,c.time.upperTimeUnit)),f=Math.max(f,c.time.level)}),i},e.prototype.calcNiceExtent=function(t){var r=this.getExtent();if(r[0]===r[1]&&(r[0]-=uA,r[1]+=uA),r[1]===-1/0&&r[0]===1/0){var n=new Date;r[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),r[0]=r[1]-uA}this._innerSetExtent(r[0],r[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,r,n){t=t||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/t,r!=null&&this._approxInterval<r&&(this._approxInterval=r),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var a=au.length,o=Math.min(QD(au,this._approxInterval,0,a),a-1);this._interval=au[o][1],this._intervalPrecision=ho(this._interval),this._minLevelUnit=au[Math.max(o-1,0)][0]},e.prototype.parse=function(t){return Ye(t)?t:+Qi(t)},e.prototype.contain=function(t){return Lv(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(qi),au=[["second",Eh],["minute",bh],["hour",Wa],["quarter-day",Wa*6],["half-day",Wa*12],["day",uA*1.2],["half-week",uA*3.5],["week",uA*7],["month",uA*31],["quarter",uA*95],["half-year",MB/2],["year",MB]];function xD(A,e,t,r){return Sh(new Date(e),A,r).getTime()===Sh(new Date(t),A,r).getTime()}function FD(A,e){return A/=uA,A>16?16:A>7.5?7:A>3.5?4:A>1.5?2:1}function ED(A){var e=30*uA;return A/=e,A>6?6:A>3?3:A>2?2:1}function bD(A){return A/=Wa,A>12?12:A>6?6:A>3.5?4:A>2?2:1}function gw(A,e){return A/=e?bh:Eh,A>30?30:A>20?20:A>15?15:A>10?10:A>5?5:A>2?2:1}function SD(A){return kg(A)}function UD(A,e,t){var r=Math.max(0,Te(Tn,e)-1);return Sh(new Date(A),Tn[r],t).getTime()}function ID(A,e){var t=new Date(0);t[A](1);var r=t.getTime();t[A](1+e);var n=t.getTime()-r;return function(i,a){return Math.max(0,Math.round((a-i)/n))}}function TD(A,e,t,r,n,i){var a=1e4,o=SS,s=0;function l(U,T,L,P,Z,V,X){for(var ee=ID(Z,U),te=T,D=new Date(te);te<L&&te<=r[1];){if(X.push({value:te}),s++>a){process.env.NODE_ENV!=="production"&&xt("Exceed safe limit in time scale.");break}if(D[Z](D[P]()+U),te=D.getTime(),i){var M=i.calcNiceTickMultiple(te,ee);M>0&&(D[Z](D[P]()+M*U),te=D.getTime())}}X.push({value:te,notAdd:!0})}function u(U,T,L){var P=[],Z=!T.length;if(!xD(Ya(U),r[0],r[1],t)){Z&&(T=[{value:UD(r[0],U,t)},{value:r[1]}]);for(var V=0;V<T.length-1;V++){var X=T[V].value,ee=T[V+1].value;if(X!==ee){var te=void 0,D=void 0,M=void 0,H=!1;switch(U){case"year":te=Math.max(1,Math.round(e/uA/365)),D=OB(t),M=MS(t);break;case"half-year":case"quarter":case"month":te=ED(e),D=Uh(t),M=RB(t);break;case"week":case"half-week":case"day":te=FD(e),D=Ih(t),M=NB(t),H=!0;break;case"half-day":case"quarter-day":case"hour":te=bD(e),D=Th(t),M=PB(t);break;case"minute":te=gw(e,!0),D=Dh(t),M=kB(t);break;case"second":te=gw(e,!1),D=Lh(t),M=VB(t);break;case"millisecond":te=SD(e),D=Mh(t),M=KB(t);break}ee>=r[0]&&X<=r[1]&&l(te,X,ee,D,M,H,P),U==="year"&&L.length>1&&V===0&&L.unshift({value:L[0].value-te})}}for(var V=0;V<P.length;V++)L.push(P[V])}}for(var f=[],c=[],h=0,v=0,d=0;d<o.length;++d){var g=Ya(o[d]);if(TS(o[d])){u(o[d],f[f.length-1]||[],c);var p=o[d+1]?Ya(o[d+1]):null;if(g!==p){if(c.length){v=h,c.sort(function(U,T){return U.value-T.value});for(var B=[],m=0;m<c.length;++m){var y=c[m].value;(m===0||c[m-1].value!==y)&&(B.push(c[m]),y>=r[0]&&y<=r[1]&&h++)}var _=n/e;if(h>_*1.5&&v>_/1.5||(f.push(B),h>_||A===o[d]))break}c=[]}}}for(var C=rt(Be(f,function(U){return rt(U,function(T){return T.value>=r[0]&&T.value<=r[1]&&!T.notAdd})}),function(U){return U.length>0}),Q=[],x=C.length-1,d=0;d<C.length;++d)for(var F=C[d],S=0;S<F.length;++S){var E=Fl(F[S].value,t);Q.push({value:F[S].value,time:{level:x-d,upperTimeUnit:E,lowerTimeUnit:E}})}Q.sort(function(U,T){return U.value-T.value});for(var I=[],d=0;d<Q.length;++d)(d===0||Q[d].value!==Q[d-1].value)&&I.push(Q[d]);return I}Nr.registerClass(pw);var Rv=wt,DD=Math.floor,LD=Math.ceil,ou=Math.pow,su=Math.log,Bw=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new qi,t}return e.prototype.getTicks=function(t){t=t||{};var r=this._extent.slice(),n=this._originalScale.getExtent(),i=A.prototype.getTicks.call(this,t),a=this.base;return this._originalScale._innerGetBreaks(),Be(i,function(o){var s=o.value,l=null,u=ou(a,s);s===r[0]&&this._fixMin?l=n[0]:s===r[1]&&this._fixMax&&(l=n[1]);var f;return l!=null&&(u=Nv(u,l)),{value:u,break:f}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(t,r){this._originalScale.setExtent(t,r);var n=Mv(this.base,[t,r]);A.prototype.setExtent.call(this,n[0],n[1])},e.prototype.getExtent=function(){var t=this.base,r=A.prototype.getExtent.call(this);r[0]=ou(t,r[0]),r[1]=ou(t,r[1]);var n=this._originalScale.getExtent();return this._fixMin&&(r[0]=Nv(r[0],n[0])),this._fixMax&&(r[1]=Nv(r[1],n[1])),r},e.prototype.unionExtentFromData=function(t,r){this._originalScale.unionExtentFromData(t,r);var n=Mv(this.base,t.getApproximateExtent(r),!0);this._innerUnionExtent(n)},e.prototype.calcNiceTicks=function(t){t=t||10;var r=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(!(!isFinite(n)||n<=0)){var i=TF(n),a=t/n*i;for(a<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[Rv(LD(r[0]/i)*i),Rv(DD(r[1]/i)*i)];this._interval=i,this._intervalPrecision=ho(i),this._niceExtent=o}},e.prototype.calcNiceExtent=function(t){A.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=su(t)/su(this.base),A.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=su(t)/su(this.base),A.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=A.prototype.scale.call(this,t),ou(this.base,t)},e.prototype.setBreaksFromOption=function(t){},e.type="log",e})(qi);function Nv(A,e){return Rv(A,ar(e))}Nr.registerClass(Bw);var MD=(function(){function A(e,t,r){this._prepareParams(e,t,r)}return A.prototype._prepareParams=function(e,t,r){r[1]<r[0]&&(r=[NaN,NaN]),this._dataMin=r[0],this._dataMax=r[1];var n=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get("min",!0);i==null&&(i=t.get("startValue",!0));var a=this._modelMinRaw=i;me(a)?this._modelMinNum=lu(e,a({min:r[0],max:r[1]})):a!=="dataMin"&&(this._modelMinNum=lu(e,a));var o=this._modelMaxRaw=t.get("max",!0);if(me(o)?this._modelMaxNum=lu(e,o({min:r[0],max:r[1]})):o!=="dataMax"&&(this._modelMaxNum=lu(e,o)),n)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=ae(s)?s:[s||0,s||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Fr(l[0],1),Fr(l[1],1)]}},A.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,r=this._dataMax,n=this._axisDataLen,i=this._boundaryGapInner,a=e?null:r-t||Math.abs(t),o=this._modelMinRaw==="dataMin"?t:this._modelMinNum,s=this._modelMaxRaw==="dataMax"?r:this._modelMaxNum,l=o!=null,u=s!=null;o==null&&(o=e?n?0:NaN:t-i[0]*a),s==null&&(s=e?n?n-1:NaN:r+i[1]*a),(o==null||!isFinite(o))&&(o=NaN),(s==null||!isFinite(s))&&(s=NaN);var f=ai(o)||ai(s)||e&&!n;this._needCrossZero&&(o>0&&s>0&&!l&&(o=0),o<0&&s<0&&!u&&(s=0));var c=this._determinedMin,h=this._determinedMax;return c!=null&&(o=c,l=!0),h!=null&&(s=h,u=!0),{min:o,max:s,minFixed:l,maxFixed:u,isBlank:f}},A.prototype.modifyDataMinMax=function(e,t){process.env.NODE_ENV!=="production"&&fe(!this.frozen),this[OD[e]]=t},A.prototype.setDeterminedMinMax=function(e,t){var r=HD[e];process.env.NODE_ENV!=="production"&&fe(!this.frozen&&this[r]==null),this[r]=t},A.prototype.freeze=function(){this.frozen=!0},A})(),HD={min:"_determinedMin",max:"_determinedMax"},OD={min:"_dataMin",max:"_dataMax"};function mw(A,e,t){var r=A.rawExtentInfo;return r||(r=new MD(A,e,t),A.rawExtentInfo=r,r)}function lu(A,e){return e==null?null:ai(e)?NaN:A.parse(e)}function yw(A,e){var t=A.type,r=mw(A,e,A.getExtent()).calculate();A.setBlank(r.isBlank);var n=r.min,i=r.max,a=e.ecModel;if(a&&t==="time"){var o=cw("bar",a),s=!1;if(b(o,function(f){s=s||f.getBaseAxis()===e.axis}),s){var l=hw(o),u=RD(n,i,e,l);n=u.min,i=u.max}}return{extent:[n,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function RD(A,e,t,r){var n=t.axis.getExtent(),i=Math.abs(n[1]-n[0]),a=yD(r,t.axis);if(a===void 0)return{min:A,max:e};var o=1/0;b(a,function(h){o=Math.min(h.offset,o)});var s=-1/0;b(a,function(h){s=Math.max(h.offset+h.width,s)}),o=Math.abs(o),s=Math.abs(s);var l=o+s,u=e-A,f=1-(o+s)/i,c=u/f-u;return e+=c*(s/l),A-=c*(o/l),{min:A,max:e}}function ww(A,e){var t=e,r=yw(A,t),n=r.extent,i=t.get("splitNumber");A instanceof Bw&&(A.base=t.get("logBase"));var a=A.type,o=t.get("interval"),s=a==="interval"||a==="time";A.setBreaksFromOption(Qw(t)),A.setExtent(n[0],n[1]),A.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:s?t.get("minInterval"):null,maxInterval:s?t.get("maxInterval"):null}),o!=null&&A.setInterval&&A.setInterval(o)}function ND(A,e){if(e=e||A.get("type"),e)switch(e){case"category":return new lw({ordinalMeta:A.getOrdinalMeta?A.getOrdinalMeta():A.getCategories(),extent:[1/0,-1/0]});case"time":return new pw({locale:A.ecModel.getLocaleModel(),useUTC:A.ecModel.get("useUTC")});default:return new(Nr.getClass(e)||qi)}}function PD(A){var e=A.scale.getExtent(),t=e[0],r=e[1];return!(t>0&&r>0||t<0&&r<0)}function vo(A){var e=A.getLabelModel().get("formatter");if(A.type==="time"){var t=US(e);return function(n,i){return A.scale.getFormattedLabel(n,i,t)}}else{if(le(e))return function(n){var i=A.scale.getLabel(n),a=e.replace("{value}",i??"");return a};if(me(e)){if(A.type==="category")return function(n,i){return e(uu(A,n),n.value-A.scale.getExtent()[0],null)};var r=Cl();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),e(uu(A,n),i,a)}}else return function(n){return A.scale.getLabel(n)}}}function uu(A,e){return A.type==="category"?A.scale.getLabel(e):e.value}function Pv(A){var e=A.get("interval");return e??"auto"}function Cw(A){return A.type==="category"&&Pv(A.getLabelModel())===0}function _w(A,e){var t={};return b(A.mapDimensionsAll(e),function(r){t[iD(A,r)]=!0}),Xe(t)}function kD(A,e,t){e&&b(_w(e,t),function(r){var n=e.getApproximateExtent(r);n[0]<A[0]&&(A[0]=n[0]),n[1]>A[1]&&(A[1]=n[1])})}function $i(A){return A==="middle"||A==="center"}function po(A){return A.getShallow("show")}function Qw(A){var e=A.get("breaks",!0);if(e!=null){process.env.NODE_ENV!=="production"&&Ge('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}}var VD=(function(){function A(){}return A.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},A.prototype.getCoordSysModel=function(){},A})(),xw=[],KD={registerPreprocessor:Xy,registerProcessor:Zy,registerPostInit:TT,registerPostUpdate:DT,registerUpdateLifecycle:xv,registerAction:Kn,registerCoordinateSystem:LT,registerLayout:MT,registerVisual:Gn,registerTransform:OT,registerLoading:qy,registerMap:HT,registerImpl:cT,PRIORITY:xT,ComponentModel:Re,ComponentView:xA,SeriesModel:JA,ChartView:FA,registerComponentModel:function(A){Re.registerClass(A)},registerComponentView:function(A){xA.registerClass(A)},registerSeriesModel:function(A){JA.registerClass(A)},registerChartView:function(A){FA.registerClass(A)},registerCustomSeries:function(A,e){},registerSubTypeDefaulter:function(A,e){Re.registerSubTypeDefaulter(A,e)},registerPainter:function(A,e){EF(A,e)}};function qA(A){if(ae(A)){b(A,function(e){qA(e)});return}Te(xw,A)>=0||(xw.push(A),me(A)&&(A={install:A}),A.install(KD))}var GD=ze(),go=ze(),bA={estimate:1,determine:2};function fu(A){return{out:{noPxChangeTryDetermine:[]},kind:A}}function Fw(A,e){var t=Be(e,function(r){return A.scale.parse(r)});return A.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function zD(A,e){var t=A.getLabelModel().get("customValues");if(t){var r=vo(A),n=A.scale.getExtent(),i=Fw(A,t),a=rt(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:Be(a,function(o){var s={value:o};return{formattedLabel:r(s),rawLabel:A.scale.getLabel(s),tickValue:o,time:void 0,break:void 0}})}}return A.type==="category"?YD(A,e):ZD(A)}function WD(A,e,t){var r=A.getTickModel().get("customValues");if(r){var n=A.scale.getExtent(),i=Fw(A,r);return{ticks:rt(i,function(a){return a>=n[0]&&a<=n[1]})}}return A.type==="category"?XD(A,e):{ticks:Be(A.scale.getTicks(t),function(a){return a.value})}}function YD(A,e){var t=A.getLabelModel(),r=Ew(A,t,e);return!t.get("show")||A.scale.isBlank()?{labels:[]}:r}function Ew(A,e,t){var r=qD(A),n=Pv(e),i=t.kind===bA.estimate;if(!i){var a=Sw(r,n);if(a)return a}var o,s;me(n)?o=Tw(A,n):(s=n==="auto"?$D(A,t):n,o=Iw(A,s));var l={labels:o,labelCategoryInterval:s};return i?t.out.noPxChangeTryDetermine.push(function(){return kv(r,n,l),!0}):kv(r,n,l),l}function XD(A,e){var t=JD(A),r=Pv(e),n=Sw(t,r);if(n)return n;var i,a;if((!e.get("show")||A.scale.isBlank())&&(i=[]),me(r))i=Tw(A,r,!0);else if(r==="auto"){var o=Ew(A,A.getLabelModel(),fu(bA.determine));a=o.labelCategoryInterval,i=Be(o.labels,function(s){return s.tickValue})}else a=r,i=Iw(A,a,!0);return kv(t,r,{ticks:i,tickCategoryInterval:a})}function ZD(A){var e=A.scale.getTicks(),t=vo(A);return{labels:Be(e,function(r,n){return{formattedLabel:t(r,n),rawLabel:A.scale.getLabel(r),tickValue:r.value,time:r.time,break:r.break}})}}var JD=bw("axisTick"),qD=bw("axisLabel");function bw(A){return function(t){return go(t)[A]||(go(t)[A]={list:[]})}}function Sw(A,e){for(var t=0;t<A.list.length;t++)if(A.list[t].key===e)return A.list[t].value}function kv(A,e,t){return A.list.push({key:e,value:t}),t}function $D(A,e){if(e.kind===bA.estimate){var t=A.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return go(A).autoInterval=t,!0}),t}var r=go(A).autoInterval;return r??(go(A).autoInterval=A.calculateCategoryInterval(e))}function jD(A,e){var t=e.kind,r=tL(A),n=vo(A),i=(r.axisRotate-r.labelRotate)/180*Math.PI,a=A.scale,o=a.getExtent(),s=a.count();if(o[1]-o[0]<1)return 0;var l=1,u=40;s>u&&(l=Math.max(1,Math.floor(s/u)));for(var f=o[0],c=A.dataToCoord(f+1)-A.dataToCoord(f),h=Math.abs(c*Math.cos(i)),v=Math.abs(c*Math.sin(i)),d=0,g=0;f<=o[1];f+=l){var p=0,B=0,m=Dg(n({value:f}),r.font,"center","top");p=m.width*1.3,B=m.height*1.3,d=Math.max(d,p,7),g=Math.max(g,B,7)}var y=d/h,_=g/v;isNaN(y)&&(y=1/0),isNaN(_)&&(_=1/0);var C=Math.max(0,Math.floor(Math.min(y,_)));if(t===bA.estimate)return e.out.noPxChangeTryDetermine.push(ye(eL,null,A,C,s)),C;var Q=Uw(A,C,s);return Q??C}function eL(A,e,t){return Uw(A,e,t)==null}function Uw(A,e,t){var r=GD(A.model),n=A.getExtent(),i=r.lastAutoInterval,a=r.lastTickCount;if(i!=null&&a!=null&&Math.abs(i-e)<=1&&Math.abs(a-t)<=1&&i>e&&r.axisExtent0===n[0]&&r.axisExtent1===n[1])return i;r.lastTickCount=t,r.lastAutoInterval=e,r.axisExtent0=n[0],r.axisExtent1=n[1]}function tL(A){var e=A.getLabelModel();return{axisRotate:A.getRotate?A.getRotate():A.isHorizontal&&!A.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Iw(A,e,t){var r=vo(A),n=A.scale,i=n.getExtent(),a=A.getLabelModel(),o=[],s=Math.max((e||0)+1,1),l=i[0],u=n.count();l!==0&&s>1&&u/s>2&&(l=Math.round(Math.ceil(l/s)*s));var f=Cw(A),c=a.get("showMinLabel")||f,h=a.get("showMaxLabel")||f;c&&l!==i[0]&&d(i[0]);for(var v=l;v<=i[1];v+=s)d(v);h&&v-s!==i[1]&&d(i[1]);function d(g){var p={value:g};o.push(t?g:{formattedLabel:r(p),rawLabel:n.getLabel(p),tickValue:g,time:void 0,break:void 0})}return o}function Tw(A,e,t){var r=A.scale,n=vo(A),i=[];return b(r.getTicks(),function(a){var o=r.getLabel(a),s=a.value;e(a.value,o)&&i.push(t?s:{formattedLabel:n(a),rawLabel:o,tickValue:s,time:void 0,break:void 0})}),i}var Dw=[0,1],AL=(function(){function A(e,t,r){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=r||[0,0]}return A.prototype.contain=function(e){var t=this._extent,r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=r&&e<=n},A.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},A.prototype.getExtent=function(){return this._extent.slice()},A.prototype.getPixelPrecision=function(e){return Ng(e||this.scale.getExtent(),this._extent)},A.prototype.setExtent=function(e,t){var r=this._extent;r[0]=e,r[1]=t},A.prototype.dataToCoord=function(e,t){var r=this._extent,n=this.scale;return e=n.normalize(n.parse(e)),this.onBand&&n.type==="ordinal"&&(r=r.slice(),Lw(r,n.count())),dt(e,Dw,r,t)},A.prototype.coordToData=function(e,t){var r=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(r=r.slice(),Lw(r,n.count()));var i=dt(e,r,Dw,t);return this.scale.scale(i)},A.prototype.pointToData=function(e,t){},A.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),r=WD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),n=r.ticks,i=Be(n,function(o){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(o):o),tickValue:o}},this),a=t.get("alignWithLabel");return rL(this,i,a,e.clamp),i},A.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var r=this.scale.getMinorTicks(t),n=Be(r,function(i){return Be(i,function(a){return{coord:this.dataToCoord(a),tickValue:a}},this)},this);return n},A.prototype.getViewLabels=function(e){return e=e||fu(bA.determine),zD(this,e).labels},A.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},A.prototype.getTickModel=function(){return this.model.getModel("axisTick")},A.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),r=t[1]-t[0]+(this.onBand?1:0);r===0&&(r=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/r},A.prototype.calculateCategoryInterval=function(e){return e=e||fu(bA.determine),jD(this,e)},A})();function Lw(A,e){var t=A[1]-A[0],r=e,n=t/r/2;A[0]+=n,A[1]-=n}function rL(A,e,t,r){var n=e.length;if(!A.onBand||t||!n)return;var i=A.getExtent(),a,o;if(n===1)e[0].coord=i[0],e[0].onBand=!0,a=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var s=e[n-1].tickValue-e[0].tickValue,l=(e[n-1].coord-e[0].coord)/s;b(e,function(h){h.coord-=l/2,h.onBand=!0});var u=A.scale.getExtent();o=1+u[1]-e[n-1].tickValue,a={coord:e[n-1].coord+l*o,tickValue:u[1]+1,onBand:!0},e.push(a)}var f=i[0]>i[1];c(e[0].coord,i[0])&&(r?e[0].coord=i[0]:e.shift()),r&&c(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),c(i[1],a.coord)&&(r?a.coord=i[1]:e.pop()),r&&c(a.coord,i[1])&&e.push({coord:i[1],onBand:!0});function c(h,v){return h=wt(h),v=wt(v),f?h>v:h<v}}var Bo=Math.PI*2,zn=Sr.CMD,nL=["top","right","bottom","left"];function iL(A,e,t,r,n){var i=t.width,a=t.height;switch(A){case"top":r.set(t.x+i/2,t.y-e),n.set(0,-1);break;case"bottom":r.set(t.x+i/2,t.y+a+e),n.set(0,1);break;case"left":r.set(t.x-e,t.y+a/2),n.set(-1,0);break;case"right":r.set(t.x+i+e,t.y+a/2),n.set(1,0);break}}function aL(A,e,t,r,n,i,a,o,s){a-=A,o-=e;var l=Math.sqrt(a*a+o*o);a/=l,o/=l;var u=a*t+A,f=o*t+e;if(Math.abs(r-n)%Bo<1e-4)return s[0]=u,s[1]=f,l-t;if(i){var c=r;r=sr(n),n=sr(c)}else r=sr(r),n=sr(n);r>n&&(n+=Bo);var h=Math.atan2(o,a);if(h<0&&(h+=Bo),h>=r&&h<=n||h+Bo>=r&&h+Bo<=n)return s[0]=u,s[1]=f,l-t;var v=t*Math.cos(r)+A,d=t*Math.sin(r)+e,g=t*Math.cos(n)+A,p=t*Math.sin(n)+e,B=(v-a)*(v-a)+(d-o)*(d-o),m=(g-a)*(g-a)+(p-o)*(p-o);return B<m?(s[0]=v,s[1]=d,Math.sqrt(B)):(s[0]=g,s[1]=p,Math.sqrt(m))}function Vv(A,e,t,r,n,i,a,o){var s=n-A,l=i-e,u=t-A,f=r-e,c=Math.sqrt(u*u+f*f);u/=c,f/=c;var h=s*u+l*f,v=h/c;o&&(v=Math.min(Math.max(v,0),1)),v*=c;var d=a[0]=A+v*u,g=a[1]=e+v*f;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function Mw(A,e,t,r,n,i,a){t<0&&(A=A+t,t=-t),r<0&&(e=e+r,r=-r);var o=A+t,s=e+r,l=a[0]=Math.min(Math.max(n,A),o),u=a[1]=Math.min(Math.max(i,e),s);return Math.sqrt((l-n)*(l-n)+(u-i)*(u-i))}var SA=[];function oL(A,e,t){var r=Mw(e.x,e.y,e.width,e.height,A.x,A.y,SA);return t.set(SA[0],SA[1]),r}function sL(A,e,t){for(var r=0,n=0,i=0,a=0,o,s,l=1/0,u=e.data,f=A.x,c=A.y,h=0;h<u.length;){var v=u[h++];h===1&&(r=u[h],n=u[h+1],i=r,a=n);var d=l;switch(v){case zn.M:i=u[h++],a=u[h++],r=i,n=a;break;case zn.L:d=Vv(r,n,u[h],u[h+1],f,c,SA,!0),r=u[h++],n=u[h++];break;case zn.C:d=sg(r,n,u[h++],u[h++],u[h++],u[h++],u[h],u[h+1],f,c,SA),r=u[h++],n=u[h++];break;case zn.Q:d=fg(r,n,u[h++],u[h++],u[h],u[h+1],f,c,SA),r=u[h++],n=u[h++];break;case zn.A:var g=u[h++],p=u[h++],B=u[h++],m=u[h++],y=u[h++],_=u[h++];h+=1;var C=!!(1-u[h++]);o=Math.cos(y)*B+g,s=Math.sin(y)*m+p,h<=1&&(i=o,a=s);var Q=(f-g)*m/B+g;d=aL(g,p,m,y,y+_,C,Q,c,SA),r=Math.cos(y+_)*B+g,n=Math.sin(y+_)*m+p;break;case zn.R:i=r=u[h++],a=n=u[h++];var x=u[h++],F=u[h++];d=Mw(i,a,x,F,f,c,SA);break;case zn.Z:d=Vv(r,n,i,a,f,c,SA,!0),r=i,n=a;break}d<l&&(l=d,t.set(SA[0],SA[1]))}return l}var Wn=new be,mt=new be,jt=new be,ji=new be,mo=new be;function Hw(A,e){if(A){var t=A.getTextGuideLine(),r=A.getTextContent();if(r&&t){var n=A.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],a=n.candidates||nL,o=r.getBoundingRect().clone();o.applyTransform(r.getComputedTransform());var s=1/0,l=n.anchor,u=A.getComputedTransform(),f=u&&vi([],u),c=e.get("length2")||0;l&&jt.copy(l);for(var h=0;h<a.length;h++){var v=a[h];iL(v,0,o,Wn,ji),be.scaleAndAdd(mt,Wn,ji,c),mt.transform(f);var d=A.getBoundingRect(),g=l?l.distance(mt):A instanceof ke?sL(mt,A.path,jt):oL(mt,d,jt);g<s&&(s=g,mt.transform(u),jt.transform(u),jt.toArray(i[0]),mt.toArray(i[1]),Wn.toArray(i[2]))}lL(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var Ow=[],Yn=new be;function lL(A,e){if(e<=180&&e>0){e=e/180*Math.PI,Wn.fromArray(A[0]),mt.fromArray(A[1]),jt.fromArray(A[2]),be.sub(ji,Wn,mt),be.sub(mo,jt,mt);var t=ji.len(),r=mo.len();if(!(t<.001||r<.001)){ji.scale(1/t),mo.scale(1/r);var n=ji.dot(mo),i=Math.cos(e);if(i<n){var a=Vv(mt.x,mt.y,jt.x,jt.y,Wn.x,Wn.y,Ow,!1);Yn.fromArray(Ow),Yn.scaleAndAdd(mo,a/Math.tan(Math.PI-e));var o=jt.x!==mt.x?(Yn.x-mt.x)/(jt.x-mt.x):(Yn.y-mt.y)/(jt.y-mt.y);if(isNaN(o))return;o<0?be.copy(Yn,mt):o>1&&be.copy(Yn,jt),Yn.toArray(A[1])}}}}function Kv(A,e,t,r){var n=t==="normal",i=n?A:A.ensureState(t);i.ignore=e;var a=r.get("smooth");a&&a===!0&&(a=.3),i.shape=i.shape||{},a>0&&(i.shape.smooth=a);var o=r.getModel("lineStyle").getLineStyle();n?A.useStyle(o):i.style=o}function uL(A,e){var t=e.smooth,r=e.points;if(r)if(A.moveTo(r[0][0],r[0][1]),t>0&&r.length>=3){var n=Mf(r[0],r[1]),i=Mf(r[1],r[2]);if(!n||!i){A.lineTo(r[1][0],r[1][1]),A.lineTo(r[2][0],r[2][1]);return}var a=Math.min(n,i)*t,o=Hf([],r[1],r[0],a/n),s=Hf([],r[1],r[2],a/i),l=Hf([],o,s,.5);A.bezierCurveTo(o[0],o[1],o[0],o[1],l[0],l[1]),A.bezierCurveTo(s[0],s[1],s[0],s[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)A.lineTo(r[u][0],r[u][1])}function fL(A,e,t){var r=A.getTextGuideLine(),n=A.getTextContent();if(!n){r&&A.removeTextGuideLine();return}for(var i=e.normal,a=i.get("show"),o=n.ignore,s=0;s<zs.length;s++){var l=zs[s],u=e[l],f=l==="normal";if(u){var c=u.get("show"),h=f?o:ve(n.states[l]&&n.states[l].ignore,o);if(h||!ve(c,a)){var v=f?r:r&&r.states[l];v&&(v.ignore=!0),r&&Kv(r,!0,l,u);continue}r||(r=new ka,A.setTextGuideLine(r),!f&&(o||!a)&&Kv(r,!0,"normal",e.normal),A.stateProxy&&(r.stateProxy=A.stateProxy)),Kv(r,!1,l,u)}}if(r){Ne(r.style,t),r.style.fill=null;var d=i.get("showAbove"),g=A.textGuideLineConfig=A.textGuideLineConfig||{};g.showAbove=d||!1,r.buildPath=uL}}function cL(A,e){e=e||"labelLine";for(var t={normal:A.getModel(e)},r=0;r<sA.length;r++){var n=sA[r];t[n]=A.getModel([n,e])}return t}var Rw=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],hL=1,cu=2,Nw=hL|cu;function hu(A,e,t){t=t||Nw,e?A.dirty|=t:A.dirty&=~t}function Pw(A,e){return e=e||Nw,A.dirty==null||!!(A.dirty&e)}function kr(A){if(A)return Pw(A)&&vL(A,A.label,A),A}function vL(A,e,t){var r=e.getComputedTransform();A.transform=wh(A.transform,r);var n=A.localRect=Ga(A.localRect,e.getBoundingRect()),i=e.style,a=i.margin,o=t&&t.marginForce,s=t&&t.minMarginForce,l=t&&t.marginDefault,u=i.__marginType;u==null&&l&&(a=l,u=Hi.textMargin);for(var f=0;f<4;f++)Gv[f]=u===Hi.minMargin&&s&&s[f]!=null?s[f]:o&&o[f]!=null?o[f]:a?a[f]:0;u===Hi.textMargin&&fl(n,Gv,!1,!1);var c=A.rect=Ga(A.rect,n);return r&&c.applyTransform(r),u===Hi.minMargin&&fl(c,Gv,!1,!1),A.axisAligned=yh(r),(A.label=A.label||{}).ignore=e.ignore,hu(A,!1),hu(A,!0,cu),A}var Gv=[0,0,0,0];function dL(A,e,t){return A.transform=wh(A.transform,t),A.localRect=Ga(A.localRect,e),A.rect=Ga(A.rect,e),t&&A.rect.applyTransform(t),A.axisAligned=yh(t),A.obb=void 0,(A.label=A.label||{}).ignore=!1,A}function pL(A,e){if(A){A.label.x+=e.x,A.label.y+=e.y,A.label.markRedraw();var t=A.transform;t&&(t[4]+=e.x,t[5]+=e.y);var r=A.rect;r&&(r.x+=e.x,r.y+=e.y);var n=A.obb;n&&n.fromBoundingRect(A.localRect,t)}}function zv(A,e){for(var t=0;t<Rw.length;t++){var r=Rw[t];A[r]==null&&(A[r]=e[r])}return kr(A)}function kw(A){var e=A.obb;return(!e||Pw(A,cu))&&(A.obb=e=e||new fB,e.fromBoundingRect(A.localRect,A.transform),hu(A,!1,cu)),e}function Vw(A,e,t,r,n){var i=A.length,a=Dr[e],o=Li[e];if(i<2)return!1;A.sort(function(Q,x){return Q.rect[a]-x.rect[a]});for(var s=0,l,u=!1,f=0;f<i;f++){var c=A[f],h=c.rect;l=h[a]-s,l<0&&(h[a]-=l,c.label[a]-=l,u=!0),s=h[a]+h[o]}var v=A[0],d=A[i-1],g,p;B(),g<0&&_(-g,.8),p<0&&_(p,.8),B(),m(g,p,1),m(p,g,-1),B(),g<0&&C(-g),p<0&&C(p);function B(){g=v.rect[a]-t,p=r-d.rect[a]-d.rect[o]}function m(Q,x,F){if(Q<0){var S=Math.min(x,-Q);if(S>0){y(S*F,0,i);var E=S+Q;E<0&&_(-E*F,1)}else _(-Q*F,1)}}function y(Q,x,F){Q!==0&&(u=!0);for(var S=x;S<F;S++){var E=A[S],I=E.rect;I[a]+=Q,E.label[a]+=Q}}function _(Q,x){for(var F=[],S=0,E=1;E<i;E++){var I=A[E-1].rect,U=Math.max(A[E].rect[a]-I[a]-I[o],0);F.push(U),S+=U}if(S){var T=Math.min(Math.abs(Q)/S,x);if(Q>0)for(var E=0;E<i-1;E++){var L=F[E]*T;y(L,0,E+1)}else for(var E=i-1;E>0;E--){var L=F[E-1]*T;y(-L,E,i)}}}function C(Q){var x=Q<0?-1:1;Q=Math.abs(Q);for(var F=Math.ceil(Q/(i-1)),S=0;S<i-1;S++)if(x>0?y(F,0,S+1):y(-F,i-S-1,i),Q-=F,Q<=0)return}return u}function gL(A){for(var e=0;e<A.length;e++){var t=A[e],r=t.defaultAttr,n=t.labelLine;t.label.attr("ignore",r.ignore),n&&n.attr("ignore",r.labelGuideIgnore)}}function Kw(A){var e=[];A.sort(function(l,u){return(u.suggestIgnore?1:0)-(l.suggestIgnore?1:0)||u.priority-l.priority});function t(l){if(!l.ignore){var u=l.ensureState("emphasis");u.ignore==null&&(u.ignore=!1)}l.ignore=!0}for(var r=0;r<A.length;r++){var n=kr(A[r]);if(!n.label.ignore){for(var i=n.label,a=n.labelLine,o=!1,s=0;s<e.length;s++)if(Wv(n,e[s],null,{touchThreshold:.05})){o=!0;break}o?(t(i),a&&t(a)):e.push(n)}}}function Wv(A,e,t,r){return!A||!e||A.label&&A.label.ignore||e.label&&e.label.ignore||!A.rect.intersect(e.rect,t,r)?!1:A.axisAligned&&e.axisAligned?!0:kw(A).intersect(kw(e),t,r)}function BL(A){if(A){for(var e=[],t=0;t<A.length;t++)e.push(A[t].slice());return e}}function mL(A,e){var t=A.label,r=e&&e.getTextGuideLine();return{dataIndex:A.dataIndex,dataType:A.dataType,seriesIndex:A.seriesModel.seriesIndex,text:A.label.style.text,rect:A.hostRect,labelRect:A.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:BL(r&&r.shape.points)}}var Gw=["align","verticalAlign","width","height","fontSize"],Rt=new xs,Yv=ze(),yL=ze();function vu(A,e,t){for(var r=0;r<t.length;r++){var n=t[r];e[n]!=null&&(A[n]=e[n])}}var du=["x","y","rotation"],wL=(function(){function A(){this._labelList=[],this._chartViewList=[]}return A.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},A.prototype._addLabel=function(e,t,r,n,i){var a=n.style,o=n.__hostTarget,s=o.textConfig||{},l=n.getComputedTransform(),u=n.getBoundingRect().plain();Fe.applyTransform(u,u,l),l?Rt.setLocalTransform(l):(Rt.x=Rt.y=Rt.rotation=Rt.originX=Rt.originY=0,Rt.scaleX=Rt.scaleY=1),Rt.rotation=sr(Rt.rotation);var f=n.__hostTarget,c;if(f){c=f.getBoundingRect().plain();var h=f.getComputedTransform();Fe.applyTransform(c,c,h)}var v=c&&f.getTextGuideLine();this._labelList.push({label:n,labelLine:v,seriesModel:r,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:u,hostRect:c,priority:c?c.width*c.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:v&&v.ignore,x:Rt.x,y:Rt.y,scaleX:Rt.scaleX,scaleY:Rt.scaleY,rotation:Rt.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:n.cursor,attachedPos:s.position,attachedRot:s.rotation}})},A.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var r=e.__model,n=r.get("labelLayout");(me(n)||Xe(n).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var a=i.getTextContent(),o=Le(i);a&&!a.disableLabelLayout&&t._addLabel(o.dataIndex,o.dataType,r,a,n)})},A.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),r=e.getHeight();function n(m,y){return function(){Hw(m,y)}}for(var i=0;i<this._labelList.length;i++){var a=this._labelList[i],o=a.label,s=o.__hostTarget,l=a.defaultAttr,u=void 0;me(a.layoutOptionOrCb)?u=a.layoutOptionOrCb(mL(a,s)):u=a.layoutOptionOrCb,u=u||{},a.layoutOption=u;var f=Math.PI/180;s&&s.setTextConfig({local:!1,position:u.x!=null||u.y!=null?null:l.attachedPos,rotation:u.rotate!=null?u.rotate*f:l.attachedRot,offset:[u.dx||0,u.dy||0]});var c=!1;if(u.x!=null?(o.x=ht(u.x,t),o.setStyle("x",0),c=!0):(o.x=l.x,o.setStyle("x",l.style.x)),u.y!=null?(o.y=ht(u.y,r),o.setStyle("y",0),c=!0):(o.y=l.y,o.setStyle("y",l.style.y)),u.labelLinePoints){var h=s.getTextGuideLine();h&&(h.setShape({points:u.labelLinePoints}),c=!1)}var v=Yv(o);v.needsUpdateLabelLine=c,o.rotation=u.rotate!=null?u.rotate*f:l.rotation,o.scaleX=l.scaleX,o.scaleY=l.scaleY;for(var d=0;d<Gw.length;d++){var g=Gw[d];o.setStyle(g,u[g]!=null?u[g]:l.style[g])}if(u.draggable){if(o.draggable=!0,o.cursor="move",s){var p=a.seriesModel;if(a.dataIndex!=null){var B=a.seriesModel.getData(a.dataType);p=B.getItemModel(a.dataIndex)}o.on("drag",n(s,p.getModel("labelLine")))}}else o.off("drag"),o.cursor=l.cursor}},A.prototype.layout=function(e){var t=e.getWidth(),r=e.getHeight(),n=[];b(this._labelList,function(s){s.defaultAttr.ignore||n.push(zv({},s))});var i=rt(n,function(s){return s.layoutOption.moveOverlap==="shiftX"}),a=rt(n,function(s){return s.layoutOption.moveOverlap==="shiftY"});Vw(i,0,0,t),Vw(a,1,0,r);var o=rt(n,function(s){return s.layoutOption.hideOverlap});gL(o),Kw(o)},A.prototype.processLabelsOverall=function(){var e=this;b(this._chartViewList,function(t){var r=t.__model,n=t.ignoreLabelLineUpdate,i=r.isAnimationEnabled();t.group.traverse(function(a){if(a.ignore&&!a.forceLabelAnimation)return!0;var o=!n,s=a.getTextContent();!o&&s&&(o=Yv(s).needsUpdateLabelLine),o&&e._updateLabelLine(a,r),i&&e._animateLabels(a,r)})})},A.prototype._updateLabelLine=function(e,t){var r=e.getTextContent(),n=Le(e),i=n.dataIndex;if(r&&i!=null){var a=t.getData(n.dataType),o=a.getItemModel(i),s={},l=a.getItemVisual(i,"style");if(l){var u=a.getVisual("drawType");s.stroke=l[u]}var f=o.getModel("labelLine");fL(e,cL(o),s),Hw(e,f)}},A.prototype._animateLabels=function(e,t){var r=e.getTextContent(),n=e.getTextGuideLine();if(r&&(e.forceLabelAnimation||!r.ignore&&!r.invisible&&!e.disableLabelAnimation&&!Di(e))){var i=Yv(r),a=i.oldLayout,o=Le(e),s=o.dataIndex,l={x:r.x,y:r.y,rotation:r.rotation},u=t.getData(o.dataType);if(a){r.attr(a);var c=e.prevStates;c&&(Te(c,"select")>=0&&r.attr(i.oldLayoutSelect),Te(c,"emphasis")>=0&&r.attr(i.oldLayoutEmphasis)),Et(r,l,t,s)}else if(r.attr(l),!Mi(r).valueAnimation){var f=ve(r.style.opacity,1);r.style.opacity=0,lA(r,{style:{opacity:f}},t,s)}if(i.oldLayout=l,r.states.select){var h=i.oldLayoutSelect={};vu(h,l,du),vu(h,r.states.select,du)}if(r.states.emphasis){var v=i.oldLayoutEmphasis={};vu(v,l,du),vu(v,r.states.emphasis,du)}fS(r,s,u,t,t)}if(n&&!n.ignore&&!n.invisible){var i=yL(n),a=i.oldLayout,d={points:n.shape.points};a?(n.attr({shape:a}),Et(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,lA(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},A})(),Xv=ze();function CL(A){A.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){var n=Xv(t).labelManager;n||(n=Xv(t).labelManager=new wL),n.clearLabels()}),A.registerUpdateLifecycle("series:layoutlabels",function(e,t,r){var n=Xv(t).labelManager;r.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var _L=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){if(process.env.NODE_ENV!=="production"){var r=t.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Iv(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var r=new lt,n=Or("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);r.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),a=this.getData().getVisual("symbolRotate"),o=i==="none"?"circle":i,s=t.itemHeight*.8,l=Or(o,(t.itemWidth-s)/2,(t.itemHeight-s)/2,s,s,t.itemStyle.fill);r.add(l),l.setStyle(t.itemStyle);var u=t.iconRotate==="inherit"?a:t.iconRotate||0;return l.rotation=u*Math.PI/180,l.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill=oe.color.neutral00,l.style.lineWidth=2),r},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e})(JA);function Zv(A,e){var t=A.mapDimensionsAll("defaultedLabel"),r=t.length;if(r===1){var n=ki(A,e,t[0]);return n!=null?n+"":null}else if(r){for(var i=[],a=0;a<t.length;a++)i.push(ki(A,e,t[a]));return i.join(" ")}}function zw(A,e){var t=A.mapDimensionsAll("defaultedLabel");if(!ae(e))return e+"";for(var r=[],n=0;n<t.length;n++){var i=A.getDimensionIndex(t[n]);i>=0&&r.push(e[i])}return r.join(" ")}var Jv=(function(A){J(e,A);function e(t,r,n,i){var a=A.call(this)||this;return a.updateData(t,r,n,i),a}return e.prototype._createSymbol=function(t,r,n,i,a,o){this.removeAll();var s=Or(t,-1,-1,2,2,null,o);s.attr({z2:ve(a,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=QL,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Js(this.childAt(0))},e.prototype.downplay=function(){qs(this.childAt(0))},e.prototype.setZ=function(t,r){var n=this.childAt(0);n.zlevel=t,n.z=r},e.prototype.setDraggable=function(t,r){var n=this.childAt(0);n.draggable=t,n.cursor=!r&&t?"move":n.cursor},e.prototype.updateData=function(t,r,n,i){this.silent=!1;var a=t.getItemVisual(r,"symbol")||"circle",o=t.hostModel,s=e.getSymbolSize(t,r),l=e.getSymbolZ2(t,r),u=a!==this._symbolType,f=i&&i.disableAnimation;if(u){var c=t.getItemVisual(r,"symbolKeepAspect");this._createSymbol(a,t,r,s,l,c)}else{var h=this.childAt(0);h.silent=!1;var v={scaleX:s[0]/2,scaleY:s[1]/2};f?h.attr(v):Et(h,v,o,r),hB(h)}if(this._updateCommon(t,r,s,n,i),u){var h=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,lA(h,v,o,r)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,r,n,i,a){var o=this.childAt(0),s=t.hostModel,l,u,f,c,h,v,d,g,p;if(i&&(l=i.emphasisItemStyle,u=i.blurItemStyle,f=i.selectItemStyle,c=i.focus,h=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,p=i.cursorStyle,v=i.emphasisDisabled),!i||t.hasItemOption){var B=i&&i.itemModel?i.itemModel:t.getItemModel(r),m=B.getModel("emphasis");l=m.getModel("itemStyle").getItemStyle(),f=B.getModel(["select","itemStyle"]).getItemStyle(),u=B.getModel(["blur","itemStyle"]).getItemStyle(),c=m.get("focus"),h=m.get("blurScope"),v=m.get("disabled"),d=gl(B),g=m.getShallow("scale"),p=B.getShallow("cursor")}var y=t.getItemVisual(r,"symbolRotate");o.attr("rotation",(y||0)*Math.PI/180||0);var _=sy(t.getItemVisual(r,"symbolOffset"),n);_&&(o.x=_[0],o.y=_[1]),p&&o.attr("cursor",p);var C=t.getItemVisual(r,"style"),Q=C.fill;if(o instanceof Ir){var x=o.style;o.useStyle(Y({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},C))}else o.__isEmptyBrush?o.useStyle(Y({},C)):o.useStyle(C),o.style.decal=null,o.setColor(Q,a&&a.symbolInnerColor),o.style.strokeNoScale=!0;var F=t.getItemVisual(r,"liftZ"),S=this._z2;F!=null?S==null&&(this._z2=o.z2,o.z2+=F):S!=null&&(o.z2=S,this._z2=null);var E=a&&a.useNameLabel;pl(o,d,{labelFetcher:s,labelDataIndex:r,defaultText:I,inheritColor:Q,defaultOpacity:C.opacity});function I(L){return E?t.getName(L):Zv(t,L)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var U=o.ensureState("emphasis");U.style=l,o.ensureState("select").style=f,o.ensureState("blur").style=u;var T=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;U.scaleX=this._sizeX*T,U.scaleY=this._sizeY*T,this.setSymbolScale(1),js(this,c,h,v)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,r,n){var i=this.childAt(0),a=Le(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var s=i.getTextContent();s&&ll(s,{style:{opacity:0}},r,{dataIndex:a,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ll(i,{style:{opacity:0},scaleX:0,scaleY:0},r,{dataIndex:a,cb:t,removeOpt:o})},e.getSymbolSize=function(t,r){return ZI(t.getItemVisual(r,"symbolSize"))},e.getSymbolZ2=function(t,r){return t.getItemVisual(r,"z2")},e})(lt);function QL(A,e){this.parent.drift(A,e)}function qv(A,e,t,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r.isIgnore&&r.isIgnore(t))&&!(r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&A.getItemVisual(t,"symbol")!=="none"}function Ww(A){return A!=null&&!he(A)&&(A={isIgnore:A}),A||{}}function Yw(A){var e=A.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:gl(e),cursorStyle:e.get("cursor")}}var xL=(function(){function A(e){this.group=new lt,this._SymbolCtor=e||Jv}return A.prototype.updateData=function(e,t){this._progressiveEls=null,t=Ww(t);var r=this.group,n=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=Yw(e),l={disableAnimation:o},u=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||r.removeAll(),e.diff(i).add(function(f){var c=u(f);if(qv(e,c,f,t)){var h=new a(e,f,s,l);h.setPosition(c),e.setItemGraphicEl(f,h),r.add(h)}}).update(function(f,c){var h=i.getItemGraphicEl(c),v=u(f);if(!qv(e,v,f,t)){r.remove(h);return}var d=e.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==d)r.remove(h),h=new a(e,f,s,l),h.setPosition(v);else{h.updateData(e,f,s,l);var p={x:v[0],y:v[1]};o?h.attr(p):Et(h,p,n)}r.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var c=i.getItemGraphicEl(f);c&&c.fadeOut(function(){r.remove(c)},n)}).execute(),this._getSymbolPoint=u,this._data=e},A.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(r,n){var i=e._getSymbolPoint(n);r.setPosition(i),r.markRedraw()})},A.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Yw(e),this._data=null,this.group.removeAll()},A.prototype.incrementalUpdate=function(e,t,r){this._progressiveEls=[],r=Ww(r);function n(s){s.isGroup||(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var a=t.getItemLayout(i);if(qv(t,a,i,r)){var o=new this._SymbolCtor(t,i,this._seriesScope);o.traverse(n),o.setPosition(a),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},A.prototype.eachRendered=function(e){hl(this._progressiveEls||this.group,e)},A.prototype.remove=function(e){var t=this.group,r=this._data;r&&e?r.eachItemGraphicEl(function(n){n.fadeOut(function(){t.remove(n)},r.hostModel)}):t.removeAll()},A})();function Xw(A,e,t){var r=A.getBaseAxis(),n=A.getOtherAxis(r),i=FL(n,t),a=r.dim,o=n.dim,s=e.mapDimension(o),l=e.mapDimension(a),u=o==="x"||o==="radius"?1:0,f=Be(A.dimensions,function(v){return e.mapDimension(v)}),c=!1,h=e.getCalculationInfo("stackResultDimension");return Ji(e,f[0])&&(c=!0,f[0]=h),Ji(e,f[1])&&(c=!0,f[1]=h),{dataDimsForPoint:f,valueStart:i,valueAxisDim:o,baseAxisDim:a,stacked:!!c,valueDim:s,baseDim:l,baseDataOffset:u,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function FL(A,e){var t=0,r=A.scale.getExtent();return e==="start"?t=r[0]:e==="end"?t=r[1]:Ye(e)&&!isNaN(e)?t=e:r[0]>0?t=r[0]:r[1]<0&&(t=r[1]),t}function Zw(A,e,t,r){var n=NaN;A.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),r)),isNaN(n)&&(n=A.valueStart);var i=A.baseDataOffset,a=[];return a[i]=t.get(A.baseDim,r),a[1-i]=n,e.dataToPoint(a)}function EL(A,e){var t=[];return e.diff(A).add(function(r){t.push({cmd:"+",idx:r})}).update(function(r,n){t.push({cmd:"=",idx:n,idx1:r})}).remove(function(r){t.push({cmd:"-",idx:r})}).execute(),t}function bL(A,e,t,r,n,i,a,o){for(var s=EL(A,e),l=[],u=[],f=[],c=[],h=[],v=[],d=[],g=Xw(n,e,a),p=A.getLayout("points")||[],B=e.getLayout("points")||[],m=0;m<s.length;m++){var y=s[m],_=!0,C=void 0,Q=void 0;switch(y.cmd){case"=":C=y.idx*2,Q=y.idx1*2;var x=p[C],F=p[C+1],S=B[Q],E=B[Q+1];(isNaN(x)||isNaN(F))&&(x=S,F=E),l.push(x,F),u.push(S,E),f.push(t[C],t[C+1]),c.push(r[Q],r[Q+1]),d.push(e.getRawIndex(y.idx1));break;case"+":var I=y.idx,U=g.dataDimsForPoint,T=n.dataToPoint([e.get(U[0],I),e.get(U[1],I)]);Q=I*2,l.push(T[0],T[1]),u.push(B[Q],B[Q+1]);var L=Zw(g,n,e,I);f.push(L[0],L[1]),c.push(r[Q],r[Q+1]),d.push(e.getRawIndex(I));break;case"-":_=!1}_&&(h.push(y),v.push(v.length))}v.sort(function(K,N){return d[K]-d[N]});for(var P=l.length,Z=vr(P),V=vr(P),X=vr(P),ee=vr(P),te=[],m=0;m<v.length;m++){var D=v[m],M=m*2,H=D*2;Z[M]=l[H],Z[M+1]=l[H+1],V[M]=u[H],V[M+1]=u[H+1],X[M]=f[H],X[M+1]=f[H+1],ee[M]=c[H],ee[M+1]=c[H+1],te[m]=h[D]}return{current:Z,next:V,stackedOnCurrent:X,stackedOnNext:ee,status:te}}var Vr=Math.min,Kr=Math.max;function Xn(A,e){return isNaN(A)||isNaN(e)}function $v(A,e,t,r,n,i,a,o,s){for(var l,u,f,c,h,v,d=t,g=0;g<r;g++){var p=e[d*2],B=e[d*2+1];if(d>=n||d<0)break;if(Xn(p,B)){if(s){d+=i;continue}break}if(d===t)A[i>0?"moveTo":"lineTo"](p,B),f=p,c=B;else{var m=p-l,y=B-u;if(m*m+y*y<.5){d+=i;continue}if(a>0){for(var _=d+i,C=e[_*2],Q=e[_*2+1];C===p&&Q===B&&g<r;)g++,_+=i,d+=i,C=e[_*2],Q=e[_*2+1],p=e[d*2],B=e[d*2+1],m=p-l,y=B-u;var x=g+1;if(s)for(;Xn(C,Q)&&x<r;)x++,_+=i,C=e[_*2],Q=e[_*2+1];var F=.5,S=0,E=0,I=void 0,U=void 0;if(x>=r||Xn(C,Q))h=p,v=B;else{S=C-l,E=Q-u;var T=p-l,L=C-p,P=B-u,Z=Q-B,V=void 0,X=void 0;if(o==="x"){V=Math.abs(T),X=Math.abs(L);var ee=S>0?1:-1;h=p-ee*V*a,v=B,I=p+ee*X*a,U=B}else if(o==="y"){V=Math.abs(P),X=Math.abs(Z);var te=E>0?1:-1;h=p,v=B-te*V*a,I=p,U=B+te*X*a}else V=Math.sqrt(T*T+P*P),X=Math.sqrt(L*L+Z*Z),F=X/(X+V),h=p-S*a*(1-F),v=B-E*a*(1-F),I=p+S*a*F,U=B+E*a*F,I=Vr(I,Kr(C,p)),U=Vr(U,Kr(Q,B)),I=Kr(I,Vr(C,p)),U=Kr(U,Vr(Q,B)),S=I-p,E=U-B,h=p-S*V/X,v=B-E*V/X,h=Vr(h,Kr(l,p)),v=Vr(v,Kr(u,B)),h=Kr(h,Vr(l,p)),v=Kr(v,Vr(u,B)),S=p-h,E=B-v,I=p+S*X/V,U=B+E*X/V}A.bezierCurveTo(f,c,h,v,p,B),f=I,c=U}else A.lineTo(p,B)}l=p,u=B,d+=i}return g}var Jw=(function(){function A(){this.smooth=0,this.smoothConstraint=!0}return A})(),SL=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="ec-polyline",r}return e.prototype.getDefaultStyle=function(){return{stroke:oe.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Jw},e.prototype.buildPath=function(t,r){var n=r.points,i=0,a=n.length/2;if(r.connectNulls){for(;a>0&&Xn(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Xn(n[i*2],n[i*2+1]);i++);}for(;i<a;)i+=$v(t,n,i,a,a,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},e.prototype.getPointOn=function(t,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,i=n.data,a=Sr.CMD,o,s,l=r==="x",u=[],f=0;f<i.length;){var c=i[f++],h=void 0,v=void 0,d=void 0,g=void 0,p=void 0,B=void 0,m=void 0;switch(c){case a.M:o=i[f++],s=i[f++];break;case a.L:if(h=i[f++],v=i[f++],m=l?(t-o)/(h-o):(t-s)/(v-s),m<=1&&m>=0){var y=l?(v-s)*m+s:(h-o)*m+o;return l?[t,y]:[y,t]}o=h,s=v;break;case a.C:h=i[f++],v=i[f++],d=i[f++],g=i[f++],p=i[f++],B=i[f++];var _=l?fs(o,h,d,p,t,u):fs(s,v,g,B,t,u);if(_>0)for(var C=0;C<_;C++){var Q=u[C];if(Q<=1&&Q>=0){var y=l?ct(s,v,g,B,Q):ct(o,h,d,p,Q);return l?[t,y]:[y,t]}}o=p,s=B;break}}},e})(ke),UL=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e})(Jw),IL=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="ec-polygon",r}return e.prototype.getDefaultShape=function(){return new UL},e.prototype.buildPath=function(t,r){var n=r.points,i=r.stackedOnPoints,a=0,o=n.length/2,s=r.smoothMonotone;if(r.connectNulls){for(;o>0&&Xn(n[o*2-2],n[o*2-1]);o--);for(;a<o&&Xn(n[a*2],n[a*2+1]);a++);}for(;a<o;){var l=$v(t,n,a,o,o,1,r.smooth,s,r.connectNulls);$v(t,i,a+l-1,l,o,-1,r.stackedOnSmooth,s,r.connectNulls),a+=l+1,t.closePath()}},e})(ke);function qw(A,e,t,r,n){var i=A.getArea(),a=i.x,o=i.y,s=i.width,l=i.height,u=t.get(["lineStyle","width"])||0;a-=u/2,o-=u/2,s+=u,l+=u,s=Math.ceil(s),a!==Math.floor(a)&&(a=Math.floor(a),s++);var f=new qe({shape:{x:a,y:o,width:s,height:l}});if(e){var c=A.getBaseAxis(),h=c.isHorizontal(),v=c.inverse;h?(v&&(f.shape.x+=s),f.shape.width=0):(v||(f.shape.y+=l),f.shape.height=0);var d=me(n)?function(g){n(g,f)}:null;lA(f,{shape:{width:s,height:l,x:a,y:o}},t,null,r,d)}return f}function $w(A,e,t){var r=A.getArea(),n=wt(r.r0,1),i=wt(r.r,1),a=new Ti({shape:{cx:wt(A.cx,1),cy:wt(A.cy,1),r0:n,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(e){var o=A.getBaseAxis().dim==="angle";o?a.shape.endAngle=r.startAngle:a.shape.r=n,lA(a,{shape:{endAngle:r.endAngle,r:i}},t)}return a}function TL(A,e,t,r,n){if(A){if(A.type==="polar")return $w(A,e,t);if(A.type==="cartesian2d")return qw(A,e,t,r,n)}else return null;return null}function jv(A,e){return A.type===e}function jw(A,e){if(A.length===e.length){for(var t=0;t<A.length;t++)if(A[t]!==e[t])return;return!0}}function eC(A){for(var e=1/0,t=1/0,r=-1/0,n=-1/0,i=0;i<A.length;){var a=A[i++],o=A[i++];isNaN(a)||(e=Math.min(a,e),r=Math.max(a,r)),isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n))}return[[e,t],[r,n]]}function tC(A,e){var t=eC(A),r=t[0],n=t[1],i=eC(e),a=i[0],o=i[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]))}function AC(A){return Ye(A)?A:A?.5:0}function DL(A,e,t){if(!t.valueDim)return[];for(var r=e.count(),n=vr(r*2),i=0;i<r;i++){var a=Zw(t,A,e,i);n[i*2]=a[0],n[i*2+1]=a[1]}return n}function Gr(A,e,t,r,n){var i=t.getBaseAxis(),a=i.dim==="x"||i.dim==="radius"?0:1,o=[],s=0,l=[],u=[],f=[],c=[];if(n){for(s=0;s<A.length;s+=2){var h=e||A;!isNaN(h[s])&&!isNaN(h[s+1])&&c.push(A[s],A[s+1])}A=c}for(s=0;s<A.length-2;s+=2)switch(f[0]=A[s+2],f[1]=A[s+3],u[0]=A[s],u[1]=A[s+1],o.push(u[0],u[1]),r){case"end":l[a]=f[a],l[1-a]=u[1-a],o.push(l[0],l[1]);break;case"middle":var v=(u[a]+f[a])/2,d=[];l[a]=d[a]=v,l[1-a]=u[1-a],d[1-a]=f[1-a],o.push(l[0],l[1]),o.push(d[0],d[1]);break;default:l[a]=u[a],l[1-a]=f[1-a],o.push(l[0],l[1])}return o.push(A[s++],A[s++]),o}function LL(A,e){var t=[],r=A.length,n,i;function a(u,f,c){var h=u.coord,v=(c-h)/(f.coord-h),d=eF(v,[u.color,f.color]);return{coord:c,color:d}}for(var o=0;o<r;o++){var s=A[o],l=s.coord;if(l<0)n=s;else if(l>e){i?t.push(a(i,s,e)):n&&t.push(a(n,s,0),a(n,s,e));break}else n&&(t.push(a(n,s,0)),n=null),t.push(s),i=s}return t}function ML(A,e,t){var r=A.getVisual("visualMeta");if(!(!r||!r.length||!A.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var n,i,a=r.length-1;a>=0;a--){var o=A.getDimensionInfo(r[a].dimension);if(n=o&&o.coordDim,n==="x"||n==="y"){i=r[a];break}}if(!i){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var s=e.getAxis(n),l=Be(i.stops,function(m){return{coord:s.toGlobalCoord(s.dataToCoord(m.value)),color:m.color}}),u=l.length,f=i.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),f.reverse());var c=LL(l,n==="x"?t.getWidth():t.getHeight()),h=c.length;if(!h&&u)return l[0].coord<0?f[1]?f[1]:l[u-1].color:f[0]?f[0]:l[0].color;var v=10,d=c[0].coord-v,g=c[h-1].coord+v,p=g-d;if(p<.001)return"transparent";b(c,function(m){m.offset=(m.coord-d)/p}),c.push({offset:h?c[h-1].offset:.5,color:f[1]||"transparent"}),c.unshift({offset:h?c[0].offset:.5,color:f[0]||"transparent"});var B=new uB(0,0,0,0,c,!0);return B[n]=d,B[n+"2"]=g,B}}function HL(A,e,t){var r=A.get("showAllSymbol"),n=r==="auto";if(!(r&&!n)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(n&&OL(i,e))){var a=e.mapDimension(i.dim),o={};return b(i.getViewLabels(),function(s){var l=i.scale.getRawOrdinalNumber(s.tickValue);o[l]=1}),function(s){return!o.hasOwnProperty(e.get(a,s))}}}}function OL(A,e){var t=A.getExtent(),r=Math.abs(t[1]-t[0])/A.scale.count();isNaN(r)&&(r=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),a=0;a<n;a+=i)if(Jv.getSymbolSize(e,a)[A.isHorizontal()?1:0]*1.5>r)return!1;return!0}function RL(A,e){return isNaN(A)||isNaN(e)}function NL(A){for(var e=A.length/2;e>0&&RL(A[e*2-2],A[e*2-1]);e--);return e-1}function rC(A,e){return[A[e*2],A[e*2+1]]}function PL(A,e,t){for(var r=A.length/2,n=t==="x"?0:1,i,a,o=0,s=-1,l=0;l<r;l++)if(a=A[l*2+n],!(isNaN(a)||isNaN(A[l*2+1-n]))){if(l===0){i=a;continue}if(i<=e&&a>=e||i>=e&&a<=e){s=l;break}o=l,i=a}return{range:[o,s],t:(e-i)/(a-i)}}function nC(A){if(A.get(["endLabel","show"]))return!0;for(var e=0;e<sA.length;e++)if(A.get([sA[e],"endLabel","show"]))return!0;return!1}function ed(A,e,t,r){if(jv(e,"cartesian2d")){var n=r.getModel("endLabel"),i=n.get("valueAnimation"),a=r.getData(),o={lastFrameIndex:0},s=nC(r)?function(h,v){A._endLabelOnDuring(h,v,a,o,i,n,e)}:null,l=e.getBaseAxis().isHorizontal(),u=qw(e,t,r,function(){var h=A._endLabel;h&&t&&o.originalX!=null&&h.attr({x:o.originalX,y:o.originalY})},s);if(!r.get("clip",!0)){var f=u.shape,c=Math.max(f.width,f.height);l?(f.y-=c,f.height+=c*2):(f.x-=c,f.width+=c*2)}return s&&s(1,u),u}else return process.env.NODE_ENV!=="production"&&r.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),$w(e,t,r)}function kL(A,e){var t=e.getBaseAxis(),r=t.isHorizontal(),n=t.inverse,i=r?n?"right":"left":"center",a=r?"middle":n?"top":"bottom";return{normal:{align:A.get("align")||i,verticalAlign:A.get("verticalAlign")||a}}}var VL=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e.prototype.init=function(){var t=new lt,r=new xL;this.group.add(r.group),this._symbolDraw=r,this._lineGroup=t,this._changePolyState=ye(this._changePolyState,this)},e.prototype.render=function(t,r,n){var i=t.coordinateSystem,a=this.group,o=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.getLayout("points")||[],f=i.type==="polar",c=this._coordSys,h=this._symbolDraw,v=this._polyline,d=this._polygon,g=this._lineGroup,p=!r.ssr&&t.get("animation"),B=!l.isEmpty(),m=l.get("origin"),y=Xw(i,o,m),_=B&&DL(i,o,y),C=t.get("showSymbol"),Q=t.get("connectNulls"),x=C&&!f&&HL(t,o,i),F=this._data;F&&F.eachItemGraphicEl(function(K,N){K.__temp&&(a.remove(K),F.setItemGraphicEl(N,null))}),C||h.remove(),a.add(g);var S=f?!1:t.get("step"),E;i&&i.getArea&&t.get("clip",!0)&&(E=i.getArea(),E.width!=null?(E.x-=.1,E.y-=.1,E.width+=.2,E.height+=.2):E.r0&&(E.r0-=.5,E.r+=.5)),this._clipShapeForSymbol=E;var I=ML(o,i,n)||o.getVisual("style")[o.getVisual("drawType")];if(!(v&&c.type===i.type&&S===this._step))C&&h.updateData(o,{isIgnore:x,clipShape:E,disableAnimation:!0,getSymbolPoint:function(K){return[u[K*2],u[K*2+1]]}}),p&&this._initSymbolLabelAnimation(o,i,E),S&&(_&&(_=Gr(_,u,i,S,Q)),u=Gr(u,null,i,S,Q)),v=this._newPolyline(u),B?d=this._newPolygon(u,_):d&&(g.remove(d),d=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,Dn(I)),g.setClipPath(ed(this,i,!0,t));else{B&&!d?d=this._newPolygon(u,_):d&&!B&&(g.remove(d),d=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,Dn(I));var U=g.getClipPath();if(U){var T=ed(this,i,!1,t);lA(U,{shape:T.shape},t)}else g.setClipPath(ed(this,i,!0,t));C&&h.updateData(o,{isIgnore:x,clipShape:E,disableAnimation:!0,getSymbolPoint:function(K){return[u[K*2],u[K*2+1]]}}),(!jw(this._stackedOnPoints,_)||!jw(this._points,u))&&(p?this._doUpdateAnimation(o,_,i,n,S,m,Q):(S&&(_&&(_=Gr(_,u,i,S,Q)),u=Gr(u,null,i,S,Q)),v.setShape({points:u}),d&&d.setShape({points:u,stackedOnPoints:_})))}var L=t.getModel("emphasis"),P=L.get("focus"),Z=L.get("blurScope"),V=L.get("disabled");if(v.useStyle(Ne(s.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),ih(v,t,"lineStyle"),v.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var X=v.getState("emphasis").style;X.lineWidth=+v.style.lineWidth+1}Le(v).seriesIndex=t.seriesIndex,js(v,P,Z,V);var ee=AC(t.get("smooth")),te=t.get("smoothMonotone");if(v.setShape({smooth:ee,smoothMonotone:te,connectNulls:Q}),d){var D=o.getCalculationInfo("stackedOnSeries"),M=0;d.useStyle(Ne(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),D&&(M=AC(D.get("smooth"))),d.setShape({smooth:ee,stackedOnSmooth:M,smoothMonotone:te,connectNulls:Q}),ih(d,t,"areaStyle"),Le(d).seriesIndex=t.seriesIndex,js(d,P,Z,V)}var H=this._changePolyState;o.eachItemGraphicEl(function(K){K&&(K.onHoverStateChange=H)}),this._polyline.onHoverStateChange=H,this._data=o,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=S,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,v),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,r){Le(r).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,r,n,i){var a=t.getData(),o=pn(a,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&o!=null&&o>=0){var s=a.getLayout("points"),l=a.getItemGraphicEl(o);if(!l){var u=s[o*2],f=s[o*2+1];if(isNaN(u)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(u,f))return;var c=t.get("zlevel")||0,h=t.get("z")||0;l=new Jv(a,o),l.x=u,l.y=f,l.setZ(c,h);var v=l.getSymbolPath().getTextContent();v&&(v.zlevel=c,v.z=h,v.z2=this._polyline.z2+1),l.__temp=!0,a.setItemGraphicEl(o,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else FA.prototype.highlight.call(this,t,r,n,i)},e.prototype.downplay=function(t,r,n,i){var a=t.getData(),o=pn(a,i);if(this._changePolyState("normal"),o!=null&&o>=0){var s=a.getItemGraphicEl(o);s&&(s.__temp?(a.setItemGraphicEl(o,null),this.group.remove(s)):s.downplay())}else FA.prototype.downplay.call(this,t,r,n,i)},e.prototype._changePolyState=function(t){var r=this._polygon;P0(this._polyline,t),r&&P0(r,t)},e.prototype._newPolyline=function(t){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new SL({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},e.prototype._newPolygon=function(t,r){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new IL({shape:{points:t,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,r,n){var i,a,o=r.getBaseAxis(),s=o.inverse;r.type==="cartesian2d"?(i=o.isHorizontal(),a=!1):r.type==="polar"&&(i=o.dim==="angle",a=!0);var l=t.hostModel,u=l.get("animationDuration");me(u)&&(u=u(null));var f=l.get("animationDelay")||0,c=me(f)?f(null):f;t.eachItemGraphicEl(function(h,v){var d=h;if(d){var g=[h.x,h.y],p=void 0,B=void 0,m=void 0;if(n)if(a){var y=n,_=r.pointToCoord(g);i?(p=y.startAngle,B=y.endAngle,m=-_[1]/180*Math.PI):(p=y.r0,B=y.r,m=_[0])}else{var C=n;i?(p=C.x,B=C.x+C.width,m=h.x):(p=C.y+C.height,B=C.y,m=h.y)}var Q=B===p?0:(m-p)/(B-p);s&&(Q=1-Q);var x=me(f)?f(v):u*Q+c,F=d.getSymbolPath(),S=F.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),S&&S.animateFrom({style:{opacity:0}},{duration:300,delay:x}),F.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,r,n){var i=t.getModel("endLabel");if(nC(t)){var a=t.getData(),o=this._polyline,s=a.getLayout("points");if(!s){o.removeTextContent(),this._endLabel=null;return}var l=this._endLabel;l||(l=this._endLabel=new Ot({z2:200}),l.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var u=NL(s);u>=0&&(pl(o,gl(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:u,defaultText:function(f,c,h){return h!=null?zw(a,h):Zv(a,f)},enableTextSetter:!0},kL(i,r)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,r,n,i,a,o,s){var l=this._endLabel,u=this._polyline;if(l){t<1&&i.originalX==null&&(i.originalX=l.x,i.originalY=l.y);var f=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),v=o.get("precision"),d=o.get("distance")||0,g=s.getBaseAxis(),p=g.isHorizontal(),B=g.inverse,m=r.shape,y=B?p?m.x:m.y+m.height:p?m.x+m.width:m.y,_=(p?d:0)*(B?-1:1),C=(p?0:-d)*(B?-1:1),Q=p?"x":"y",x=PL(f,y,Q),F=x.range,S=F[1]-F[0],E=void 0;if(S>=1){if(S>1&&!h){var I=rC(f,F[0]);l.attr({x:I[0]+_,y:I[1]+C}),a&&(E=c.getRawValue(F[0]))}else{var I=u.getPointOn(y,Q);I&&l.attr({x:I[0]+_,y:I[1]+C});var U=c.getRawValue(F[0]),T=c.getRawValue(F[1]);a&&(E=A0(n,v,U,T,x.t))}i.lastFrameIndex=F[0]}else{var L=t===1||i.lastFrameIndex>0?F[0]:0,I=rC(f,L);a&&(E=c.getRawValue(L)),l.attr({x:I[0]+_,y:I[1]+C})}if(a){var P=Mi(l);typeof P.setLabelText=="function"&&P.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(t,r,n,i,a,o,s){var l=this._polyline,u=this._polygon,f=t.hostModel,c=bL(this._data,t,this._stackedOnPoints,r,this._coordSys,n,this._valueOrigin),h=c.current,v=c.stackedOnCurrent,d=c.next,g=c.stackedOnNext;if(a&&(v=Gr(c.stackedOnCurrent,c.current,n,a,s),h=Gr(c.current,null,n,a,s),g=Gr(c.stackedOnNext,c.next,n,a,s),d=Gr(c.next,null,n,a,s)),tC(h,d)>3e3||u&&tC(v,g)>3e3){l.stopAnimation(),l.setShape({points:d}),u&&(u.stopAnimation(),u.setShape({points:d,stackedOnPoints:g}));return}l.shape.__points=c.current,l.shape.points=h;var p={shape:{points:d}};c.current!==h&&(p.shape.__points=c.next),l.stopAnimation(),Et(l,p,f),u&&(u.setShape({points:h,stackedOnPoints:v}),u.stopAnimation(),Et(u,{shape:{stackedOnPoints:g}},f),l.shape.points!==u.shape.points&&(u.shape.points=l.shape.points));for(var B=[],m=c.status,y=0;y<m.length;y++){var _=m[y].cmd;if(_==="="){var C=t.getItemGraphicEl(m[y].idx1);C&&B.push({el:C,ptIdx:y})}}l.animators&&l.animators.length&&l.animators[0].during(function(){u&&u.dirtyShape();for(var Q=l.shape.__points,x=0;x<B.length;x++){var F=B[x].el,S=B[x].ptIdx*2;F.x=Q[S],F.y=Q[S+1],F.markRedraw()}})},e.prototype.remove=function(t){var r=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(i,a){i.__temp&&(r.remove(i),n.setItemGraphicEl(a,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(FA);function KL(A,e){return{seriesType:A,plan:iv(),reset:function(t){var r=t.getData(),n=t.coordinateSystem;if(t.pipelineContext,!!n){var i=Be(n.dimensions,function(f){return r.mapDimension(f)}).slice(0,2),a=i.length,o=r.getCalculationInfo("stackResultDimension");Ji(r,i[0])&&(i[0]=o),Ji(r,i[1])&&(i[1]=o);var s=r.getStore(),l=r.getDimensionIndex(i[0]),u=r.getDimensionIndex(i[1]);return a&&{progress:function(f,c){for(var h=f.end-f.start,v=vr(h*a),d=[],g=[],p=f.start,B=0;p<f.end;p++){var m=void 0;if(a===1){var y=s.get(l,p);m=n.dataToPoint(y,null,g)}else d[0]=s.get(l,p),d[1]=s.get(u,p),m=n.dataToPoint(d,null,g);v[B++]=m[0],v[B++]=m[1]}c.setLayout("points",v)}}}}}}var GL={average:function(A){for(var e=0,t=0,r=0;r<A.length;r++)isNaN(A[r])||(e+=A[r],t++);return t===0?NaN:e/t},sum:function(A){for(var e=0,t=0;t<A.length;t++)e+=A[t]||0;return e},max:function(A){for(var e=-1/0,t=0;t<A.length;t++)A[t]>e&&(e=A[t]);return isFinite(e)?e:NaN},min:function(A){for(var e=1/0,t=0;t<A.length;t++)A[t]<e&&(e=A[t]);return isFinite(e)?e:NaN},nearest:function(A){return A[0]}},zL=function(A){return Math.round(A.length/2)};function iC(A){return{seriesType:A,reset:function(e,t,r){var n=e.getData(),i=e.get("sampling"),a=e.coordinateSystem,o=n.count();if(o>10&&a.type==="cartesian2d"&&i){var s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),f=r.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(f||1),h=Math.round(o/c);if(isFinite(h)&&h>1){i==="lttb"?e.setData(n.lttbDownSample(n.mapDimension(l.dim),1/h)):i==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(l.dim),1/h));var v=void 0;le(i)?v=GL[i]:me(i)&&(v=i),v&&e.setData(n.downSample(n.mapDimension(l.dim),1/h,v,zL))}}}}}function WL(A){A.registerChartView(VL),A.registerSeriesModel(_L),A.registerLayout(KL("line")),A.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),r=e.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",r)}}),A.registerProcessor(A.PRIORITY.PROCESSOR.STATISTIC,iC("line"))}var td=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return Iv(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,r,n){var i=this.coordinateSystem;if(i&&i.clampData){var a=i.clampData(t),o=i.dataToPoint(a);if(n)b(i.getAxes(),function(c,h){if(c.type==="category"&&r!=null){var v=c.getTicksCoords(),d=c.getTickModel().get("alignWithLabel"),g=a[h],p=r[h]==="x1"||r[h]==="y1";if(p&&!d&&(g+=1),v.length<2)return;if(v.length===2){o[h]=c.toGlobalCoord(c.getExtent()[p?1:0]);return}for(var B=void 0,m=void 0,y=1,_=0;_<v.length;_++){var C=v[_].coord,Q=_===v.length-1?v[_-1].tickValue+y:v[_].tickValue;if(Q===g){m=C;break}else if(Q<g)B=C;else if(B!=null&&Q>g){m=(C+B)/2;break}_===1&&(y=Q-v[0].tickValue)}m==null&&(B?B&&(m=v[v.length-1].coord):m=v[0].coord),o[h]=c.toGlobalCoord(m)}});else{var s=this.getData(),l=s.getLayout("offset"),u=s.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;o[f]+=l+u/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(JA);JA.registerClass(td);var YL=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Iv(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),r=this.get("largeThreshold");return r>t&&(t=r),t},e.prototype.brushSelector=function(t,r,n){return n.rect(r.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ml(td.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:oe.color.primary,borderWidth:2}},realtimeSort:!1}),e})(td),XL=(function(){function A(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return A})(),aC=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="sausage",r}return e.prototype.getDefaultShape=function(){return new XL},e.prototype.buildPath=function(t,r){var n=r.cx,i=r.cy,a=Math.max(r.r0||0,0),o=Math.max(r.r,0),s=(o-a)*.5,l=a+s,u=r.startAngle,f=r.endAngle,c=r.clockwise,h=Math.PI*2,v=c?f-u<h:u-f<h;v||(u=f-(c?h:-h));var d=Math.cos(u),g=Math.sin(u),p=Math.cos(f),B=Math.sin(f);v?(t.moveTo(d*a+n,g*a+i),t.arc(d*l+n,g*l+i,s,-Math.PI+u,u,!c)):t.moveTo(d*o+n,g*o+i),t.arc(n,i,o,u,f,!c),t.arc(p*l+n,B*l+i,s,f-Math.PI*2,f-Math.PI,!c),a!==0&&t.arc(n,i,a,f,u,c)},e})(ke);function ZL(A,e){e=e||{};var t=e.isRoundCap;return function(r,n,i){var a=n.position;if(!a||a instanceof Array)return bs(r,n,i);var o=A(a),s=n.distance!=null?n.distance:5,l=this.shape,u=l.cx,f=l.cy,c=l.r,h=l.r0,v=(c+h)/2,d=l.startAngle,g=l.endAngle,p=(d+g)/2,B=t?Math.abs(c-h)/2:0,m=Math.cos,y=Math.sin,_=u+c*m(d),C=f+c*y(d),Q="left",x="top";switch(o){case"startArc":_=u+(h-s)*m(p),C=f+(h-s)*y(p),Q="center",x="top";break;case"insideStartArc":_=u+(h+s)*m(p),C=f+(h+s)*y(p),Q="center",x="bottom";break;case"startAngle":_=u+v*m(d)+pu(d,s+B,!1),C=f+v*y(d)+gu(d,s+B,!1),Q="right",x="middle";break;case"insideStartAngle":_=u+v*m(d)+pu(d,-s+B,!1),C=f+v*y(d)+gu(d,-s+B,!1),Q="left",x="middle";break;case"middle":_=u+v*m(p),C=f+v*y(p),Q="center",x="middle";break;case"endArc":_=u+(c+s)*m(p),C=f+(c+s)*y(p),Q="center",x="bottom";break;case"insideEndArc":_=u+(c-s)*m(p),C=f+(c-s)*y(p),Q="center",x="top";break;case"endAngle":_=u+v*m(g)+pu(g,s+B,!0),C=f+v*y(g)+gu(g,s+B,!0),Q="left",x="middle";break;case"insideEndAngle":_=u+v*m(g)+pu(g,-s+B,!0),C=f+v*y(g)+gu(g,-s+B,!0),Q="right",x="middle";break;default:return bs(r,n,i)}return r=r||{},r.x=_,r.y=C,r.align=Q,r.verticalAlign=x,r}}function JL(A,e,t,r){if(Ye(r)){A.setTextConfig({rotation:r});return}else if(ae(e)){A.setTextConfig({rotation:0});return}var n=A.shape,i=n.clockwise?n.startAngle:n.endAngle,a=n.clockwise?n.endAngle:n.startAngle,o=(i+a)/2,s,l=t(e);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":s=o;break;case"startAngle":case"insideStartAngle":s=i;break;case"endAngle":case"insideEndAngle":s=a;break;default:A.setTextConfig({rotation:0});return}var u=Math.PI*1.5-s;l==="middle"&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),A.setTextConfig({rotation:u})}function pu(A,e,t){return e*Math.sin(A)*(t?-1:1)}function gu(A,e,t){return e*Math.cos(A)*(t?1:-1)}function qL(A,e,t){var r=A.get("borderRadius");if(r==null)return{cornerRadius:0};ae(r)||(r=[r,r,r,r]);var n=Math.abs(e.r||0-e.r0||0);return{cornerRadius:Be(r,function(i){return Fr(i,n)})}}var Ad=Math.max,rd=Math.min;function $L(A,e){var t=A.getArea&&A.getArea();if(jv(A,"cartesian2d")){var r=A.getBaseAxis();if(r.type!=="category"||!r.onBand){var n=e.getLayout("bandWidth");r.isHorizontal()?(t.x-=n,t.width+=n*2):(t.y-=n,t.height+=n*2)}}return t}var jL=(function(A){J(e,A);function e(){var t=A.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,r,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var a=t.get("coordinateSystem");a==="cartesian2d"||a==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,r,n):this._renderNormal(t,r,n,i)):process.env.NODE_ENV!=="production"&&xt("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,r){this._progressiveEls=[],this._incrementalRenderLarge(t,r)},e.prototype.eachRendered=function(t){hl(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t,r,n,i){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f;l.type==="cartesian2d"?f=u.isHorizontal():l.type==="polar"&&(f=u.dim==="angle");var c=t.isAnimationEnabled()?t:null,h=eM(t,l);h&&this._enableRealtimeSort(h,o,n);var v=t.get("clip",!0)||h,d=$L(l,o);a.removeClipPath();var g=t.get("roundCap",!0),p=t.get("showBackground",!0),B=t.getModel("backgroundStyle"),m=B.get("borderRadius")||0,y=[],_=this._backgroundEls,C=i&&i.isInitSort,Q=i&&i.type==="changeAxisOrder";function x(E){var I=Bu[l.type](o,E);if(!I)return null;var U=oM(l,f,I);return U.useStyle(B.getItemStyle()),l.type==="cartesian2d"?U.setShape("r",m):U.setShape("cornerRadius",m),y[E]=U,U}o.diff(s).add(function(E){var I=o.getItemModel(E),U=Bu[l.type](o,E,I);if(U&&(p&&x(E),!(!o.hasValue(E)||!fC[l.type](U)))){var T=!1;v&&(T=oC[l.type](d,U));var L=sC[l.type](t,o,E,U,f,c,u.model,!1,g);h&&(L.forceLabelAnimation=!0),hC(L,o,E,I,U,t,f,l.type==="polar"),C?L.attr({shape:U}):h?lC(h,c,L,U,E,f,!1,!1):lA(L,{shape:U},t,E),o.setItemGraphicEl(E,L),a.add(L),L.ignore=T}}).update(function(E,I){var U=o.getItemModel(E),T=Bu[l.type](o,E,U);if(T){if(p){var L=void 0;_.length===0?L=x(I):(L=_[I],L.useStyle(B.getItemStyle()),l.type==="cartesian2d"?L.setShape("r",m):L.setShape("cornerRadius",m),y[E]=L);var P=Bu[l.type](o,E),Z=gC(f,P,l);Et(L,{shape:Z},c,E)}var V=s.getItemGraphicEl(I);if(!o.hasValue(E)||!fC[l.type](T)){a.remove(V);return}var X=!1;v&&(X=oC[l.type](d,T),X&&a.remove(V));var ee=V&&(V.type==="sector"&&g||V.type==="sausage"&&!g);if(ee&&(V&&ul(V,t,I),V=null),V?hB(V):V=sC[l.type](t,o,E,T,f,c,u.model,!0,g),h&&(V.forceLabelAnimation=!0),Q){var te=V.getTextContent();if(te){var D=Mi(te);D.prevValue!=null&&(D.prevValue=D.value)}}else hC(V,o,E,U,T,t,f,l.type==="polar");C?V.attr({shape:T}):h?lC(h,c,V,T,E,f,!0,Q):Et(V,{shape:T},t,E,null),o.setItemGraphicEl(E,V),V.ignore=X,a.add(V)}}).remove(function(E){var I=s.getItemGraphicEl(E);I&&ul(I,t,E)}).execute();var F=this._backgroundGroup||(this._backgroundGroup=new lt);F.removeAll();for(var S=0;S<y.length;++S)F.add(y[S]);a.add(F),this._backgroundEls=y,this._data=o},e.prototype._renderLarge=function(t,r,n){this._clear(),dC(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,r){this._removeBackground(),dC(r,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var r=t.get("clip",!0)&&TL(t.coordinateSystem,!1,t),n=this.group;r?n.setClipPath(r):n.removeClipPath()},e.prototype._enableRealtimeSort=function(t,r,n){var i=this;if(r.count()){var a=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(r,t,n),this._isFirstFrame=!1;else{var o=function(s){var l=r.getItemGraphicEl(s),u=l&&l.shape;return u&&Math.abs(a.isHorizontal()?u.height:u.width)||0};this._onRendered=function(){i._updateSortWithinSameData(r,o,a,n)},n.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,r,n){var i=[];return t.each(t.mapDimension(r.dim),function(a,o){var s=n(o);s=s??NaN,i.push({dataIndex:o,mappedValue:s,ordinalNumber:a})}),i.sort(function(a,o){return o.mappedValue-a.mappedValue}),{ordinalNumbers:Be(i,function(a){return a.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,r,n){for(var i=n.scale,a=t.mapDimension(n.dim),o=Number.MAX_VALUE,s=0,l=i.getOrdinalMeta().categories.length;s<l;++s){var u=t.rawIndexOf(a,i.getRawOrdinalNumber(s)),f=u<0?Number.MIN_VALUE:r(t.indexOfRawIndex(u));if(f>o)return!0;o=f}return!1},e.prototype._isOrderDifferentInView=function(t,r){for(var n=r.scale,i=n.getExtent(),a=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);a<=o;++a)if(t.ordinalNumbers[a]!==n.getRawOrdinalNumber(a))return!0},e.prototype._updateSortWithinSameData=function(t,r,n,i){if(this._isOrderChangedWithinSameData(t,r,n)){var a=this._dataSort(t,n,r);this._isOrderDifferentInView(a,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:a}))}},e.prototype._dispatchInitSort=function(t,r,n){var i=r.baseAxis,a=this._dataSort(t,i,function(o){return t.get(t.mapDimension(r.otherAxis.dim),o)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:a})},e.prototype.remove=function(t,r){this._clear(this._model),this._removeOnRenderedListener(r)},e.prototype.dispose=function(t,r){this._removeOnRenderedListener(r)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var r=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){ul(i,t,Le(i).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(FA),oC={cartesian2d:function(A,e){var t=e.width<0?-1:1,r=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var n=A.x+A.width,i=A.y+A.height,a=Ad(e.x,A.x),o=rd(e.x+e.width,n),s=Ad(e.y,A.y),l=rd(e.y+e.height,i),u=o<a,f=l<s;return e.x=u&&a>n?o:a,e.y=f&&s>i?l:s,e.width=u?0:o-a,e.height=f?0:l-s,t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),u||f},polar:function(A,e){var t=e.r0<=e.r?1:-1;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}var n=rd(e.r,A.r),i=Ad(e.r0,A.r0);e.r=n,e.r0=i;var a=n-i<0;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}return a}},sC={cartesian2d:function(A,e,t,r,n,i,a,o,s){var l=new qe({shape:Y({},r),z2:1});if(l.__dataIndex=t,l.name="item",i){var u=l.shape,f=n?"height":"width";u[f]=0}return l},polar:function(A,e,t,r,n,i,a,o,s){var l=!n&&s?aC:Ti,u=new l({shape:r,z2:1});u.name="item";var f=cC(n);if(u.calculateTextPosition=ZL(f,{isRoundCap:l===aC}),i){var c=u.shape,h=n?"r":"endAngle",v={};c[h]=n?r.r0:r.startAngle,v[h]=r[h],(o?Et:lA)(u,{shape:v},i)}return u}};function eM(A,e){var t=A.get("realtimeSort",!0),r=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&t&&(r.type!=="category"&&xt("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&xt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),t&&r.type==="category"&&e.type==="cartesian2d")return{baseAxis:r,otherAxis:e.getOtherAxis(r)}}function lC(A,e,t,r,n,i,a,o){var s,l;i?(l={x:r.x,width:r.width},s={y:r.y,height:r.height}):(l={y:r.y,height:r.height},s={x:r.x,width:r.width}),o||(a?Et:lA)(t,{shape:s},e,n,null);var u=e?A.baseAxis.model:null;(a?Et:lA)(t,{shape:l},u,n)}function uC(A,e){for(var t=0;t<e.length;t++)if(!isFinite(A[e[t]]))return!0;return!1}var tM=["x","y","width","height"],AM=["cx","cy","r","startAngle","endAngle"],fC={cartesian2d:function(A){return!uC(A,tM)},polar:function(A){return!uC(A,AM)}},Bu={cartesian2d:function(A,e,t){var r=A.getItemLayout(e);if(!r)return null;var n=t?nM(t,r):0,i=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+i*n/2,y:r.y+a*n/2,width:r.width-i*n,height:r.height-a*n}},polar:function(A,e,t){var r=A.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function rM(A){return A.startAngle!=null&&A.endAngle!=null&&A.startAngle===A.endAngle}function cC(A){return(function(e){var t=e?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+t;default:return r}}})(A)}function hC(A,e,t,r,n,i,a,o){var s=e.getItemVisual(t,"style");if(o){if(!i.get("roundCap")){var u=A.shape,f=qL(r.getModel("itemStyle"),u);Y(u,f),A.setShape(u)}}else{var l=r.get(["itemStyle","borderRadius"])||0;A.setShape("r",l)}A.useStyle(s);var c=r.getShallow("cursor");c&&A.attr("cursor",c);var h=o?a?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":a?n.height>=0?"bottom":"top":n.width>=0?"right":"left",v=gl(r);pl(A,v,{labelFetcher:i,labelDataIndex:t,defaultText:Zv(i.getData(),t),inheritColor:s.fill,defaultOpacity:s.opacity,defaultOutsidePosition:h});var d=A.getTextContent();if(o&&d){var g=r.get(["label","position"]);A.textConfig.inside=g==="middle"?!0:null,JL(A,g==="outside"?h:g,cC(a),r.get(["label","rotate"]))}uS(d,v,i.getRawValue(t),function(B){return zw(e,B)});var p=r.getModel(["emphasis"]);js(A,p.get("focus"),p.get("blurScope"),p.get("disabled")),ih(A,r),rM(n)&&(A.style.fill="none",A.style.stroke="none",b(A.states,function(B){B.style&&(B.style.fill=B.style.stroke="none")}))}function nM(A,e){var t=A.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var r=A.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,n,i)}var iM=(function(){function A(){}return A})(),vC=(function(A){J(e,A);function e(t){var r=A.call(this,t)||this;return r.type="largeBar",r}return e.prototype.getDefaultShape=function(){return new iM},e.prototype.buildPath=function(t,r){for(var n=r.points,i=this.baseDimIdx,a=1-this.baseDimIdx,o=[],s=[],l=this.barWidth,u=0;u<n.length;u+=3)s[i]=l,s[a]=n[u+2],o[i]=n[u+i],o[a]=n[u+a],t.rect(o[0],o[1],s[0],s[1])},e})(ke);function dC(A,e,t,r){var n=A.getData(),i=n.getLayout("valueAxisHorizontal")?1:0,a=n.getLayout("largeDataIndices"),o=n.getLayout("size"),s=A.getModel("backgroundStyle"),l=n.getLayout("largeBackgroundPoints");if(l){var u=new vC({shape:{points:l},incremental:!!r,silent:!0,z2:0});u.baseDimIdx=i,u.largeDataIndices=a,u.barWidth=o,u.useStyle(s.getItemStyle()),e.add(u),t&&t.push(u)}var f=new vC({shape:{points:n.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=i,f.largeDataIndices=a,f.barWidth=o,e.add(f),f.useStyle(n.getVisual("style")),f.style.stroke=null,Le(f).seriesIndex=A.seriesIndex,A.get("silent")||(f.on("mousedown",pC),f.on("mousemove",pC)),t&&t.push(f)}var pC=av(function(A){var e=this,t=aM(e,A.offsetX,A.offsetY);Le(e).dataIndex=t>=0?t:null},30,!1);function aM(A,e,t){for(var r=A.baseDimIdx,n=1-r,i=A.shape.points,a=A.largeDataIndices,o=[],s=[],l=A.barWidth,u=0,f=i.length/3;u<f;u++){var c=u*3;if(s[r]=l,s[n]=i[c+2],o[r]=i[c+r],o[n]=i[c+n],s[n]<0&&(o[n]+=s[n],s[n]=-s[n]),e>=o[0]&&e<=o[0]+s[0]&&t>=o[1]&&t<=o[1]+s[1])return a[u]}return-1}function gC(A,e,t){if(jv(t,"cartesian2d")){var r=e,n=t.getArea();return{x:A?r.x:n.x,y:A?n.y:r.y,width:A?r.width:n.width,height:A?n.height:r.height}}else{var n=t.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:A?n.r0:i.r0,r:A?n.r:i.r,startAngle:A?i.startAngle:0,endAngle:A?i.endAngle:Math.PI*2}}}function oM(A,e,t){var r=A.type==="polar"?Ti:qe;return new r({shape:gC(e,t,A),silent:!0,z2:0})}function sM(A){A.registerChartView(jL),A.registerSeriesModel(YL),A.registerLayout(A.PRIORITY.VISUAL.LAYOUT,nt(wD,"bar")),A.registerLayout(A.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,CD("bar")),A.registerProcessor(A.PRIORITY.PROCESSOR.STATISTIC,iC("bar")),A.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var BC={left:0,right:0,top:0,bottom:0},mu=["25%","25%"],lM=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,r){var n=Ni(t.outerBounds);A.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&t.outerBounds&&Mr(t.outerBounds,n)},e.prototype.mergeOption=function(t,r){A.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Mr(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:BC,outerBoundsContain:"all",outerBoundsClampWidth:mu[0],outerBoundsClampHeight:mu[1],backgroundColor:oe.color.transparent,borderWidth:1,borderColor:oe.color.neutral30},e})(Re),nd=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Mt).models[0]},e.type="cartesian2dAxis",e})(Re);DA(nd,VD);var mC={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:oe.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:oe.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:oe.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[oe.color.backgroundTint,oe.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:oe.color.neutral00,borderColor:oe.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},uM=Oe({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},mC),id=Oe({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:oe.color.axisMinorSplitLine,width:1}}},mC),fM=Oe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},id),cM=Ne({logBase:10},id);const hM={category:uM,value:id,time:fM,log:cM};var vM={value:1,category:1,time:1,log:1},dM=null;function pM(){return dM}function yC(A,e,t,r){b(vM,function(n,i){var a=Oe(Oe({},hM[i],!0),r,!0),o=(function(s){J(l,s);function l(){var u=s!==null&&s.apply(this,arguments)||this;return u.type=e+"Axis."+i,u}return l.prototype.mergeDefaultAndTheme=function(u,f){var c=Za(this),h=c?Ni(u):{},v=f.getTheme();Oe(u,v.get(i+"Axis")),Oe(u,this.getDefaultOption()),u.type=wC(u),c&&Mr(u,h,c)},l.prototype.optionUpdated=function(){var u=this.option;u.type==="category"&&(this.__ordinalMeta=Hv.createByAxisModel(this))},l.prototype.getCategories=function(u){var f=this.option;if(f.type==="category")return u?f.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.prototype.updateAxisBreaks=function(u){return{breaks:[]}},l.type=e+"Axis."+i,l.defaultOption=a,l})(t);A.registerComponentModel(o)}),A.registerSubTypeDefaulter(e+"Axis",wC)}function wC(A){return A.type||(A.data?"category":"value")}var gM=(function(){function A(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return A.prototype.getAxis=function(e){return this._axes[e]},A.prototype.getAxes=function(){return Be(this._dimList,function(e){return this._axes[e]},this)},A.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),rt(this.getAxes(),function(t){return t.scale.type===e})},A.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},A})(),ad=["x","y"];function CC(A){return(A.type==="interval"||A.type==="time")&&!A.hasBreaks()}var BM=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=ad,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!CC(t)||!CC(r))){var n=t.getExtent(),i=r.getExtent(),a=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),s=n[1]-n[0],l=i[1]-i[0];if(!(!s||!l)){var u=(o[0]-a[0])/s,f=(o[1]-a[1])/l,c=a[0]-n[0]*u,h=a[1]-i[0]*f,v=this._transform=[u,0,0,f,c,h];this._invTransform=vi([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var r=this.getAxis("x"),n=this.getAxis("y");return r.contain(r.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,r){var n=this.dataToPoint(t),i=this.dataToPoint(r),a=this.getArea(),o=new Fe(n[0],n[1],i[0]-n[0],i[1]-n[1]);return a.intersect(o)},e.prototype.dataToPoint=function(t,r,n){n=n||[];var i=t[0],a=t[1];if(this._transform&&i!=null&&isFinite(i)&&a!=null&&isFinite(a))return tA(n,t,this._transform);var o=this.getAxis("x"),s=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,r)),n[1]=s.toGlobalCoord(s.dataToCoord(a,r)),n},e.prototype.clampData=function(t,r){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,a=n.getExtent(),o=i.getExtent(),s=n.parse(t[0]),l=i.parse(t[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),r[1]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),r},e.prototype.pointToData=function(t,r,n){if(n=n||[],this._invTransform)return tA(n,t,this._invTransform);var i=this.getAxis("x"),a=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),r),n[1]=a.coordToData(a.toLocalCoord(t[1]),r),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1])-t,a=Math.min(n[0],n[1])-t,o=Math.max(r[0],r[1])-i+t,s=Math.max(n[0],n[1])-a+t;return new Fe(i,a,o,s)},e})(gM),mM=(function(A){J(e,A);function e(t,r,n,i,a){var o=A.call(this,t,r,n)||this;return o.index=0,o.type=i||"value",o.position=a||"bottom",o}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),t&&r[0]>r[1]&&r.reverse(),r},e.prototype.pointToData=function(t,r){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),r)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(AL),yM="expandAxisBreak",zr=Math.PI,wM=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],CM=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],yo=ze(),_C=ze(),QC=(function(){function A(e){this.recordMap={},this.resolveAxisNameOverlap=e}return A.prototype.ensureRecord=function(e){var t=e.axis.dim,r=e.componentIndex,n=this.recordMap,i=n[t]||(n[t]=[]);return i[r]||(i[r]={ready:{}})},A})();function _M(A,e,t,r){var n=t.axis,i=e.ensureRecord(t),a=[],o,s=sd(A.axisName)&&$i(A.nameLocation);b(r,function(v){var d=kr(v);if(!(!d||d.label.ignore)){a.push(d);var g=i.transGroup;s&&(g.transform?vi(wo,g.transform):Gf(wo),d.transform&&ga(wo,wo,d.transform),Fe.copy(yu,d.localRect),yu.applyTransform(wo),o?o.union(yu):Fe.copy(o=new Fe(0,0,0,0),yu))}});var l=Math.abs(i.dirVec.x)>.1?"x":"y",u=i.transGroup[l];if(a.sort(function(v,d){return Math.abs(v.label[l]-u)-Math.abs(d.label[l]-u)}),s&&o){var f=n.getExtent(),c=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-c;o.union(new Fe(c,0,h,1))}i.stOccupiedRect=o,i.labelInfoList=a}var wo=nr(),yu=new Fe(0,0,0,0),xC=function(A,e,t,r,n,i){if($i(A.nameLocation)){var a=i.stOccupiedRect;a&&FC(dL({},a,i.transGroup.transform),r,n)}else EC(i.labelInfoList,i.dirVec,r,n)};function FC(A,e,t){var r=new be;Wv(A,e,r,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&pL(e,r)}function EC(A,e,t,r){for(var n=be.dot(r,e)>=0,i=0,a=A.length;i<a;i++){var o=A[n?i:a-1-i];o.label.ignore||FC(o,t,r)}}var Wr=(function(){function A(e,t,r,n){this.group=new lt,this._axisModel=e,this._api=t,this._local={},this._shared=n||new QC(xC),this._resetCfgDetermined(r)}return A.prototype.updateCfg=function(e){if(process.env.NODE_ENV!=="production"){var t=this._shared.ensureRecord(this._axisModel).ready;fe(!t.axisLine&&!t.axisTickLabelDetermine),t.axisName=t.axisTickLabelEstimate=!1}var r=this._cfg.raw;r.position=e.position,r.labelOffset=e.labelOffset,this._resetCfgDetermined(r)},A.prototype.__getRawCfg=function(){return this._cfg.raw},A.prototype._resetCfgDetermined=function(e){var t=this._axisModel,r=t.getDefaultOption?t.getDefaultOption():{},n=ve(e.axisName,t.get("name")),i=t.get("nameMoveOverlap");(i==null||i==="auto")&&(i=ve(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:ve(e.nameDirection,1),tickDirection:ve(e.tickDirection,1),labelDirection:ve(e.labelDirection,1),labelOffset:ve(e.labelOffset,0),silent:ve(e.silent,!0),axisName:n,nameLocation:Cr(t.get("nameLocation"),r.nameLocation,"end"),shouldNameMoveOverlap:sd(n)&&i,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(fe(a.position!=null),fe(a.rotation!=null)),this._cfg=a;var o=new lt({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new be(Math.cos(-a.rotation),Math.sin(-a.rotation))},A.prototype.build=function(e,t){var r=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),b(QM,function(n){e[n]&&xM[n](r._cfg,r._local,r._shared,r._axisModel,r.group,r._transformGroup,r._api,t||{})}),this},A.innerTextLayout=function(e,t,r){var n=Pg(t-e),i,a;return Is(n)?(a=r>0?"top":"bottom",i="center"):Is(n-zr)?(a=r>0?"bottom":"top",i="center"):(a="middle",n>0&&n<zr?i=r>0?"right":"left":i=r>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:a}},A.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},A.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},A})(),QM=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],xM={axisLine:function(A,e,t,r,n,i,a){if(process.env.NODE_ENV!=="production"){var o=t.ensureRecord(r).ready;fe(!o.axisLine),o.axisLine=!0}var s=r.get(["axisLine","show"]);if(s==="auto"&&(s=!0,A.raw.axisLineAutoShow!=null&&(s=!!A.raw.axisLineAutoShow)),!!s){var l=r.axis.getExtent(),u=i.transform,f=[l[0],0],c=[l[1],0],h=f[0]>c[0];u&&(tA(f,f,u),tA(c,c,u));var v=Y({lineCap:"round"},r.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:A.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(r.get(["axisLine","breakLine"])&&r.axis.scale.hasBreaks())pM().buildAxisBreakLine(r,n,i,d);else{var g=new Tr(Y({shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]}},d));Va(g.shape,g.style.lineWidth),g.anid="line",n.add(g)}var p=r.get(["axisLine","symbol"]);if(p!=null){var B=r.get(["axisLine","symbolSize"]);le(p)&&(p=[p,p]),(le(B)||Ye(B))&&(B=[B,B]);var m=sy(r.get(["axisLine","symbolOffset"])||0,B),y=B[0],_=B[1];b([{rotate:A.rotation+Math.PI/2,offset:m[0],r:0},{rotate:A.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-c[0])*(f[0]-c[0])+(f[1]-c[1])*(f[1]-c[1]))}],function(C,Q){if(p[Q]!=="none"&&p[Q]!=null){var x=Or(p[Q],-y/2,-_/2,y,_,v.stroke,!0),F=C.r+C.offset,S=h?c:f;x.attr({rotation:C.rotate,x:S[0]+F*Math.cos(A.rotation),y:S[1]-F*Math.sin(A.rotation),silent:!0,z2:11}),n.add(x)}})}}},axisTickLabelEstimate:function(A,e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=t.ensureRecord(r).ready;fe(!s.axisTickLabelDetermine),s.axisTickLabelEstimate=!0}var l=UC(e,n,o);l&&bC(A,e,t,r,n,i,a,bA.estimate)},axisTickLabelDetermine:function(A,e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=t.ensureRecord(r).ready;s.axisTickLabelDetermine=!0}var l=UC(e,n,o);l&&bC(A,e,t,r,n,i,a,bA.determine);var u=SM(A,n,i,r);bM(A,e.labelLayoutList,u),UM(A,n,i,r,A.tickDirection)},axisName:function(A,e,t,r,n,i,a,o){var s=t.ensureRecord(r);if(process.env.NODE_ENV!=="production"){var l=s.ready;fe(l.axisTickLabelEstimate||l.axisTickLabelDetermine),l.axisName=!0}e.nameEl&&(n.remove(e.nameEl),e.nameEl=s.nameLayout=s.nameLocation=null);var u=A.axisName;if(sd(u)){var f=A.nameLocation,c=A.nameDirection,h=r.getModel("nameTextStyle"),v=r.get("nameGap")||0,d=r.axis.getExtent(),g=r.axis.inverse?-1:1,p=new be(0,0),B=new be(0,0);f==="start"?(p.x=d[0]-g*v,B.x=-g):f==="end"?(p.x=d[1]+g*v,B.x=g):(p.x=(d[0]+d[1])/2,p.y=A.labelOffset+c*v,B.y=c);var m=nr();B.transform(Wf(m,m,A.rotation));var y=r.get("nameRotate");y!=null&&(y=y*zr/180);var _,C;$i(f)?_=Wr.innerTextLayout(A.rotation,y??A.rotation,c):(_=FM(A.rotation,f,y||0,d),C=A.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(_.rotation)),!isFinite(C)&&(C=null)));var Q=h.getFont(),x=r.get("nameTruncate",!0)||{},F=x.ellipsis,S=oi(A.raw.nameTruncateMaxWidth,x.maxWidth,C),E=o.nameMarginLevel||0,I=new Ot({x:p.x,y:p.y,rotation:_.rotation,silent:Wr.isLabelSilent(r),style:In(h,{text:u,font:Q,overflow:"truncate",width:S,ellipsis:F,fill:h.getTextColor()||r.get(["axisLine","lineStyle","color"]),align:h.get("align")||_.textAlign,verticalAlign:h.get("verticalAlign")||_.textVerticalAlign}),z2:1});if(cl({el:I,componentModel:r,itemName:u}),I.__fullText=u,I.anid="name",r.get("triggerEvent")){var U=Wr.makeAxisEventDataBase(r);U.targetType="axisName",U.name=u,Le(I).eventData=U}i.add(I),I.updateTransform(),e.nameEl=I;var T=s.nameLayout=kr({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:$i(f)?wM[E]:CM[E]});if(s.nameLocation=f,n.add(I),I.decomposeTransform(),A.shouldNameMoveOverlap&&T){var L=t.ensureRecord(r);process.env.NODE_ENV!=="production"&&fe(L.labelInfoList),t.resolveAxisNameOverlap(A,t,r,T,B,L)}}}};function bC(A,e,t,r,n,i,a,o){IC(e)||IM(A,e,n,o,r,a);var s=e.labelLayoutList;TM(A,r,s,i),A.rotation;var l=A.optionHideOverlap;EM(r,s,l),l&&Kw(rt(s,function(u){return u&&!u.label.ignore})),_M(A,t,r,s)}function FM(A,e,t,r){var n=Pg(t-A),i,a,o=r[0]>r[1],s=e==="start"&&!o||e!=="start"&&o;return Is(n-zr/2)?(a=s?"bottom":"top",i="center"):Is(n-zr*1.5)?(a=s?"top":"bottom",i="center"):(a="middle",n<zr*1.5&&n>zr/2?i=s?"left":"right":i=s?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:a}}function EM(A,e,t){if(Cw(A.axis))return;function r(o,s,l){var u=kr(e[s]),f=kr(e[l]);if(!(!u||!f)){if(o===!1||u.suggestIgnore){Co(u.label);return}if(f.suggestIgnore){Co(f.label);return}var c=.1;if(!t){var h=[0,0,0,0];u=zv({marginForce:h},u),f=zv({marginForce:h},f)}Wv(u,f,null,{touchThreshold:c})&&Co(o?f.label:u.label)}}var n=A.get(["axisLabel","showMinLabel"]),i=A.get(["axisLabel","showMaxLabel"]),a=e.length;r(n,0,1),r(i,a-1,a-2)}function bM(A,e,t){A.showMinorTicks||b(e,function(r){if(r&&r.label.ignore)for(var n=0;n<t.length;n++){var i=t[n],a=_C(i),o=yo(r.label);if(a.tickValue!=null&&!a.onBand&&a.tickValue===o.tickValue){Co(i);return}}})}function Co(A){A&&(A.ignore=!0)}function SC(A,e,t,r,n){for(var i=[],a=[],o=[],s=0;s<A.length;s++){var l=A[s].coord;a[0]=l,a[1]=0,o[0]=l,o[1]=t,e&&(tA(a,a,e),tA(o,o,e));var u=new Tr({shape:{x1:a[0],y1:a[1],x2:o[0],y2:o[1]},style:r,z2:2,autoBatch:!0,silent:!0});Va(u.shape,u.style.lineWidth),u.anid=n+"_"+A[s].tickValue,i.push(u);var f=_C(u);f.onBand=!!A[s].onBand,f.tickValue=A[s].tickValue}return i}function SM(A,e,t,r){var n=r.axis,i=r.getModel("axisTick"),a=i.get("show");if(a==="auto"&&(a=!0,A.raw.axisTickAutoShow!=null&&(a=!!A.raw.axisTickAutoShow)),!a||n.scale.isBlank())return[];for(var o=i.getModel("lineStyle"),s=A.tickDirection*i.get("length"),l=n.getTicksCoords(),u=SC(l,t.transform,s,Ne(o.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<u.length;f++)e.add(u[f]);return u}function UM(A,e,t,r,n){var i=r.axis,a=r.getModel("minorTick");if(!(!A.showMinorTicks||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=n*a.get("length"),u=Ne(s.getLineStyle(),Ne(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var c=SC(o[f],t.transform,l,u,"minorticks_"+f),h=0;h<c.length;h++)e.add(c[h])}}function UC(A,e,t){if(IC(A)){var r=A.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&fe(A.labelGroup&&r);var n=r.out.noPxChangeTryDetermine;if(t.noPxChange){for(var i=!0,a=0;a<n.length;a++)i=i&&n[a]();if(i)return!1}n.length&&(e.remove(A.labelGroup),od(A,null,null,null))}return!0}function IM(A,e,t,r,n,i){var a=n.axis,o=oi(A.raw.axisLabelShow,n.get(["axisLabel","show"])),s=new lt;t.add(s);var l=fu(r);if(!o||a.scale.isBlank()){od(e,[],s,l);return}var u=n.getModel("axisLabel"),f=a.getViewLabels(l),c=(oi(A.raw.labelRotate,u.get("rotate"))||0)*zr/180,h=Wr.innerTextLayout(A.rotation,c,A.labelDirection),v=n.getCategories&&n.getCategories(!0),d=[],g=n.get("triggerEvent"),p=1/0,B=-1/0;b(f,function(y,_){var C,Q=a.scale.type==="ordinal"?a.scale.getRawOrdinalNumber(y.tickValue):y.tickValue,x=y.formattedLabel,F=y.rawLabel,S=u;if(v&&v[Q]){var E=v[Q];he(E)&&E.textStyle&&(S=new et(E.textStyle,u,n.ecModel))}var I=S.getTextColor()||n.get(["axisLine","lineStyle","color"]),U=S.getShallow("align",!0)||h.textAlign,T=ve(S.getShallow("alignMinLabel",!0),U),L=ve(S.getShallow("alignMaxLabel",!0),U),P=S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||h.textVerticalAlign,Z=ve(S.getShallow("verticalAlignMinLabel",!0),P),V=ve(S.getShallow("verticalAlignMaxLabel",!0),P),X=10+(((C=y.time)===null||C===void 0?void 0:C.level)||0);p=Math.min(p,X),B=Math.max(B,X);var ee=new Ot({x:0,y:0,rotation:0,silent:Wr.isLabelSilent(n),z2:X,style:In(S,{text:x,align:_===0?T:_===f.length-1?L:U,verticalAlign:_===0?Z:_===f.length-1?V:P,fill:me(I)?I(a.type==="category"?F:a.type==="value"?Q+"":Q,_):I})});ee.anid="label_"+Q;var te=yo(ee);if(te.break=y.break,te.tickValue=Q,te.layoutRotation=h.rotation,cl({el:ee,componentModel:n,itemName:x,formatterParamsExtra:{isTruncated:function(){return ee.isTruncated},value:F,tickIndex:_}}),g){var D=Wr.makeAxisEventDataBase(n);D.targetType="axisLabel",D.value=F,D.tickIndex=_,y.break&&(D.break={start:y.break.parsedBreak.vmin,end:y.break.parsedBreak.vmax}),a.type==="category"&&(D.dataIndex=Q),Le(ee).eventData=D,y.break&&LM(n,i,ee,y.break)}d.push(ee),s.add(ee)});var m=Be(d,function(y){return{label:y,priority:yo(y).break?y.z2+(B-p+1):y.z2,defaultAttr:{ignore:y.ignore}}});od(e,m,s,l)}function IC(A){return!!A.labelLayoutList}function od(A,e,t,r){A.labelLayoutList=e,A.labelGroup=t,A.axisLabelsCreationContext=r}function TM(A,e,t,r){var n=e.get(["axisLabel","margin"]);b(t,function(i,a){var o=kr(i);if(o){var s=o.label,l=yo(s);o.suggestIgnore=s.ignore,s.ignore=!1,wc(dr,DM),dr.x=e.axis.dataToCoord(l.tickValue),dr.y=A.labelOffset+A.labelDirection*n,dr.rotation=l.layoutRotation,r.add(dr),dr.updateTransform(),r.remove(dr),dr.decomposeTransform(),wc(s,dr),s.markRedraw(),hu(o,!0),kr(o)}})}var dr=new qe,DM=new qe;function sd(A){return!!A}function LM(A,e,t,r){t.on("click",function(n){var i={type:yM,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[A.axis.dim+"AxisIndex"]=A.componentIndex,e.dispatchAction(i)})}function Uk(A,e,t){}function wu(A,e,t){t=t||{};var r=e.axis,n={},i=r.getAxesOnZeroOf()[0],a=r.position,o=i?"onZero":a,s=r.dim,l=[A.x,A.x+A.width,A.y,A.y+A.height],u={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,c=s==="x"?[l[2]-f,l[3]+f]:[l[0]-f,l[1]+f];if(i){var h=i.toGlobalCoord(i.dataToCoord(0));c[u.onZero]=Math.max(Math.min(h,c[1]),c[0])}n.position=[s==="y"?c[u[o]]:l[0],s==="x"?c[u[o]]:l[3]],n.rotation=Math.PI/2*(s==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=v[a],n.labelOffset=i?c[u[a]]-c[u.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),oi(t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var d=e.get(["axisLabel","rotate"]);return n.labelRotate=o==="top"?-d:d,n.z2=1,n}function MM(A){return A.coordinateSystem&&A.coordinateSystem.type==="cartesian2d"}function TC(A){var e={xAxisModel:null,yAxisModel:null};return b(e,function(t,r){var n=r.replace(/Model$/,""),i=A.getReferringComponents(n,Mt).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error(n+' "'+Cr(A.get(n+"Index"),A.get(n+"Id"),0)+'" not found');e[r]=i}),e}function HM(A,e,t,r,n,i){for(var a=wu(A,t),o=!1,s=!1,l=0;l<e.length;l++)Tv(e[l].getOtherAxis(t.axis).scale)&&(o=s=!0,t.axis.type==="category"&&t.axis.onBand&&(s=!1));return a.axisLineAutoShow=o,a.axisTickAutoShow=s,a.defaultNameMoveOverlap=i,new Wr(t,r,a,n)}function OM(A,e,t){var r=wu(e,t);if(process.env.NODE_ENV!=="production"){var n=A.__getRawCfg();b(Xe(r),function(i){i!=="position"&&i!=="labelOffset"&&fe(r[i]===n[i])})}A.updateCfg(r)}function RM(A,e,t){var r,n=qi.prototype,i=n.getTicks.call(t),a=n.getTicks.call(t,{expandToNicedExtent:!0}),o=i.length-1,s=n.getInterval.call(t),l=yw(A,e),u=l.extent,f=l.fixMin,c=l.fixMax;A.type==="log"&&(u=Mv(A.base,u,!0)),A.setBreaksFromOption(Qw(e)),A.setExtent(u[0],u[1]),A.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var h=n.getExtent.call(A);f&&(u[0]=h[0]),c&&(u[1]=h[1]);var v=n.getInterval.call(A),d=u[0],g=u[1];if(f&&c)v=(g-d)/o;else if(f)for(g=u[0]+v*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)v=Dv(v),g=u[0]+v*o;else if(c)for(d=u[1]-v*o;d>u[0]&&isFinite(d)&&isFinite(u[0]);)v=Dv(v),d=u[1]-v*o;else{var p=A.getTicks().length-1;p>o&&(v=Dv(v));var B=v*o;g=Math.ceil(u[1]/v)*v,d=wt(g-B),d<0&&u[0]>=0?(d=0,g=wt(B)):g>0&&u[1]<=0&&(g=0,d=-wt(B))}var m=(i[0].value-a[0].value)/s,y=(i[o].value-a[o].value)/s;if(n.setExtent.call(A,d+v*m,g+v*y),n.setInterval.call(A,v),(m||y)&&n.setNiceExtent.call(A,d+v,g-v),process.env.NODE_ENV!=="production"){var _=n.getTicks.call(A);_[1]&&(!uD(v)||bc(_[1].value)>bc(v))&&xt("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+(" and alignTicks: true. ("+((r=e.axis)===null||r===void 0?void 0:r.dim)+"AxisIndex: "+e.componentIndex+")"),!0)}}var DC=[[3,1],[0,2]],NM=(function(){function A(e,t,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ad,this._initCartesian(e,t,r),this.model=e}return A.prototype.getRect=function(){return this._rect},A.prototype.update=function(e,t){var r=this._axesMap;this._updateScale(e,this.model);function n(a){var o,s=Xe(a),l=s.length;if(l){for(var u=[],f=l-1;f>=0;f--){var c=+s[f],h=a[c],v=h.model,d=h.scale;Tv(d)&&v.get("alignTicks")&&v.get("interval")==null?u.push(h):(ww(d,v),Tv(d)&&(o=h))}u.length&&(o||(o=u.pop(),ww(o.scale,o.model)),b(u,function(g){RM(g.scale,g.model,o.scale)}))}}n(r.x),n(r.y);var i={};b(r.x,function(a){LC(r,"y",a,i)}),b(r.y,function(a){LC(r,"x",a,i)}),this.resize(this.model,t)},A.prototype.resize=function(e,t,r){var n=Vh(e,t),i=this._rect=Ri(e.getBoxLayoutParams(),n.refContainer),a=this._axesMap,o=this._coordsList,s=e.get("containLabel");if(HC(a,i),!r){var l=kM(i,o,a,s,t),u=void 0;if(s)process.env.NODE_ENV!=="production"&&Yg("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),u=RC(i.clone(),"axisLabel",null,i,a,l,n);else{var f=VM(e,i,n),c=f.outerBoundsRect,h=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;c&&(u=RC(c,h,v,i,a,l,n))}NC(i,a,bA.determine,null,u,n)}b(this._coordsList,function(d){d.calcAffineTransform()})},A.prototype.getAxis=function(e,t){var r=this._axesMap[e];if(r!=null)return r[t||0]},A.prototype.getAxes=function(){return this._axesList.slice()},A.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var r="x"+e+"y"+t;return this._coordsMap[r]}he(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n<i.length;n++)if(i[n].getAxis("x").index===e||i[n].getAxis("y").index===t)return i[n]},A.prototype.getCartesians=function(){return this._coordsList.slice()},A.prototype.convertToPixel=function(e,t,r){var n=this._findConvertTarget(t);return n.cartesian?n.cartesian.dataToPoint(r):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(r)):null},A.prototype.convertFromPixel=function(e,t,r){var n=this._findConvertTarget(t);return n.cartesian?n.cartesian.pointToData(r):n.axis?n.axis.coordToData(n.axis.toLocalCoord(r)):null},A.prototype._findConvertTarget=function(e){var t=e.seriesModel,r=e.xAxisModel||t&&t.getReferringComponents("xAxis",Mt).models[0],n=e.yAxisModel||t&&t.getReferringComponents("yAxis",Mt).models[0],i=e.gridModel,a=this._coordsList,o,s;if(t)o=t.coordinateSystem,Te(a,o)<0&&(o=null);else if(r&&n)o=this.getCartesian(r.componentIndex,n.componentIndex);else if(r)s=this.getAxis("x",r.componentIndex);else if(n)s=this.getAxis("y",n.componentIndex);else if(i){var l=i.coordinateSystem;l===this&&(o=this._coordsList[0])}return{cartesian:o,axis:s}},A.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},A.prototype._initCartesian=function(e,t,r){var n=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,b(o.x,function(u,f){b(o.y,function(c,h){var v="x"+f+"y"+h,d=new BM(v);d.master=n,d.model=e,n._coordsMap[v]=d,n._coordsList.push(d),d.addAxis(u),d.addAxis(c)})});function l(u){return function(f,c){if(ld(f,e)){var h=f.get("position");u==="x"?h!=="top"&&h!=="bottom"&&(h=a.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=a.left?"right":"left"),a[h]=!0;var v=new mM(u,ND(f),[0,0],f.get("type"),h),d=v.type==="category";v.onBand=d&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=i,v.index=c,i._axesList.push(v),o[u][c]=v,s[u]++}}}},A.prototype._updateScale=function(e,t){b(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var i=n.model.get("categorySortInfo");n.scale.setSortInfo(i)}}),e.eachSeries(function(n){if(MM(n)){var i=TC(n),a=i.xAxisModel,o=i.yAxisModel;if(!ld(a,t)||!ld(o,t))return;var s=this.getCartesian(a.componentIndex,o.componentIndex),l=n.getData(),u=s.getAxis("x"),f=s.getAxis("y");r(l,u),r(l,f)}},this);function r(n,i){b(_w(n,i.dim),function(a){i.scale.unionExtentFromData(n,a)})}},A.prototype.getTooltipAxes=function(e){var t=[],r=[];return b(this.getCartesians(),function(n){var i=e!=null&&e!=="auto"?n.getAxis(e):n.getBaseAxis(),a=n.getOtherAxis(i);Te(t,i)<0&&t.push(i),Te(r,a)<0&&r.push(a)}),{baseAxes:t,otherAxes:r}},A.create=function(e,t){var r=[];return e.eachComponent("grid",function(n,i){var a=new A(n,e,t);a.name="grid_"+i,a.resize(n,t,!0),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){kS({targetModel:n,coordSysType:"cartesian2d",coordSysProvider:i});function i(){var a=TC(n),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!l)throw new Error('Grid "'+Cr(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var u=l.coordinateSystem;return u.getCartesian(o.componentIndex,s.componentIndex)}}),r},A.dimensions=ad,A})();function ld(A,e){return A.getCoordSysModel()===e}function LC(A,e,t,r){t.getAxesOnZeroOf=function(){return i?[i]:[]};var n=A[e],i,a=t.model,o=a.get(["axisLine","onZero"]),s=a.get(["axisLine","onZeroAxisIndex"]);if(!o)return;if(s!=null)MC(n[s])&&(i=n[s]);else for(var l in n)if(n.hasOwnProperty(l)&&MC(n[l])&&!r[u(n[l])]){i=n[l];break}i&&(r[u(i)]=!0);function u(f){return f.dim+"_"+f.index}}function MC(A){return A&&A.type!=="category"&&A.type!=="time"&&PD(A)}function PM(A,e){var t=A.getExtent(),r=t[0]+t[1];A.toGlobalCoord=A.dim==="x"?function(n){return n+e}:function(n){return r-n+e},A.toLocalCoord=A.dim==="x"?function(n){return n-e}:function(n){return r-n+e}}function HC(A,e){b(A.x,function(t){return OC(t,e.x,e.width)}),b(A.y,function(t){return OC(t,e.y,e.height)})}function OC(A,e,t){var r=[0,t],n=A.inverse?1:0;A.setExtent(r[n],r[1-n]),PM(A,e)}function RC(A,e,t,r,n,i,a){process.env.NODE_ENV!=="production"&&fe(e==="all"||e==="axisLabel"),NC(r,n,bA.estimate,e,!1,a);var o=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var s=rx(o,function(c){return c>0})==null;return fl(r,o,!0,!0,t),HC(n,r),s;function l(c){b(n[Dr[c]],function(h){if(po(h.model)){var v=i.ensureRecord(h.model),d=v.labelInfoList;if(d)for(var g=0;g<d.length;g++){var p=d[g],B=h.scale.normalize(yo(p.label).tickValue);B=c===1?1-B:B,u(p.rect,c,B),u(p.rect,1-c,NaN)}var m=v.nameLayout;if(m){var B=$i(v.nameLocation)?.5:NaN;u(m.rect,c,B),u(m.rect,1-c,NaN)}}})}function u(c,h,v){var d=A[Dr[h]]-c[Dr[h]],g=c[Li[h]]+c[Dr[h]]-(A[Li[h]]+A[Dr[h]]);d=f(d,1-v),g=f(g,v);var p=DC[h][0],B=DC[h][1];o[p]=Jt(o[p],d),o[B]=Jt(o[B],g)}function f(c,h){return c>0&&!ai(h)&&h>1e-4&&(c/=h),c}}function kM(A,e,t,r,n){var i=new QC(KM);return b(t,function(a){return b(a,function(o){if(po(o.model)){var s=!r;o.axisBuilder=HM(A,e,o.model,n,i,s)}})}),i}function NC(A,e,t,r,n,i){var a=t===bA.determine;b(e,function(l){return b(l,function(u){po(u.model)&&(OM(u.axisBuilder,A,u.model),u.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var o={x:0,y:0};s(0),s(1);function s(l){o[Dr[1-l]]=A[Li[l]]<=i.refContainer[Li[l]]*.5?0:1-l===1?2:1}b(e,function(l,u){return b(l,function(f){po(f.model)&&((r==="all"||a)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:o[u]}),a&&f.axisBuilder.build({axisLine:!0}))})})}function VM(A,e,t){var r,n=A.get("outerBoundsMode",!0);n==="same"?r=e.clone():n==null||n==="auto"?r=Ri(A.get("outerBounds",!0)||BC,t.refContainer):n!=="none"&&process.env.NODE_ENV!=="production"&&Ge("Invalid grid["+A.componentIndex+"].outerBoundsMode.");var i=A.get("outerBoundsContain",!0),a;i==null||i==="auto"?a="all":Te(["all","axisLabel"],i)<0?(process.env.NODE_ENV!=="production"&&Ge("Invalid grid["+A.componentIndex+"].outerBoundsContain."),a="all"):a=i;var o=[Ec(ve(A.get("outerBoundsClampWidth",!0),mu[0]),e.width),Ec(ve(A.get("outerBoundsClampHeight",!0),mu[1]),e.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:a,outerBoundsClamp:o}}var KM=function(A,e,t,r,n,i){var a=t.axis.dim==="x"?"y":"x";xC(A,e,t,r,n,i),$i(A.nameLocation)||b(e.recordMap[a],function(o){o&&o.labelInfoList&&o.dirVec&&EC(o.labelInfoList,o.dirVec,r,n)})};function GM(A,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return zM(t,A,e),t.seriesInvolved&&YM(t,A),t}function zM(A,e,t){var r=e.getComponent("tooltip"),n=e.getComponent("axisPointer"),i=n.get("link",!0)||[],a=[];b(t.getCoordinateSystems(),function(o){if(!o.axisPointerEnabled)return;var s=_o(o.model),l=A.coordSysAxesInfo[s]={};A.coordSysMap[s]=o;var u=o.model,f=u.getModel("tooltip",r);if(b(o.getAxes(),nt(d,!1,null)),o.getTooltipAxes&&r&&f.get("show")){var c=f.get("trigger")==="axis",h=f.get(["axisPointer","type"])==="cross",v=o.getTooltipAxes(f.get(["axisPointer","axis"]));(c||h)&&b(v.baseAxes,nt(d,h?"cross":!0,c)),h&&b(v.otherAxes,nt(d,"cross",!1))}function d(g,p,B){var m=B.model.getModel("axisPointer",n),y=m.get("show");if(!(!y||y==="auto"&&!g&&!cd(m))){p==null&&(p=m.get("triggerTooltip")),m=g?WM(B,f,n,e,g,p):m;var _=m.get("snap"),C=m.get("triggerEmphasis"),Q=_o(B.model),x=p||_||B.type==="category",F=A.axesInfo[Q]={key:Q,axis:B,coordSys:o,axisPointerModel:m,triggerTooltip:p,triggerEmphasis:C,involveSeries:x,snap:_,useHandle:cd(m),seriesModels:[],linkGroup:null};l[Q]=F,A.seriesInvolved=A.seriesInvolved||x;var S=XM(i,B);if(S!=null){var E=a[S]||(a[S]={axesInfo:{}});E.axesInfo[Q]=F,E.mapper=i[S].mapper,F.linkGroup=E}}}})}function WM(A,e,t,r,n,i){var a=e.getModel("axisPointer"),o=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],s={};b(o,function(c){s[c]=Ue(a.get(c))}),s.snap=A.type!=="category"&&!!i,a.get("type")==="cross"&&(s.type="line");var l=s.label||(s.label={});if(l.show==null&&(l.show=!1),n==="cross"){var u=a.get(["label","show"]);if(l.show=u??!0,!i){var f=s.lineStyle=a.get("crossStyle");f&&Ne(l,f.textStyle)}}return A.model.getModel("axisPointer",new et(s,t,r))}function YM(A,e){e.eachSeries(function(t){var r=t.coordinateSystem,n=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!r||!r.model||n==="none"||n===!1||n==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||b(A.coordSysAxesInfo[_o(r.model)],function(a){var o=a.axis;r.getAxis(o.dim)===o&&(a.seriesModels.push(t),a.seriesDataCount==null&&(a.seriesDataCount=0),a.seriesDataCount+=t.getData().count())})})}function XM(A,e){for(var t=e.model,r=e.dim,n=0;n<A.length;n++){var i=A[n]||{};if(ud(i[r+"AxisId"],t.id)||ud(i[r+"AxisIndex"],t.componentIndex)||ud(i[r+"AxisName"],t.name))return n}}function ud(A,e){return A==="all"||ae(A)&&Te(A,e)>=0||A===e}function ZM(A){var e=fd(A);if(e){var t=e.axisPointerModel,r=e.axis.scale,n=t.option,i=t.get("status"),a=t.get("value");a!=null&&(a=r.parse(a));var o=cd(t);i==null&&(n.status=o?"show":"hide");var s=r.getExtent().slice();s[0]>s[1]&&s.reverse(),(a==null||a>s[1])&&(a=s[1]),a<s[0]&&(a=s[0]),n.value=a,o&&(n.status=e.axis.scale.isBlank()?"hide":"show")}}function fd(A){var e=(A.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[_o(A)]}function JM(A){var e=fd(A);return e&&e.axisPointerModel}function cd(A){return!!A.get(["handle","show"])}function _o(A){return A.type+"||"+A.id}var hd={},PC=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){this.axisPointerClass&&ZM(t),A.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},e.prototype.updateAxisPointer=function(t,r,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,r){var n=this._axisPointer;n&&n.remove(r)},e.prototype.dispose=function(t,r){this._disposeAxisPointer(r),A.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,r,n){var i=e.getAxisPointerClass(this.axisPointerClass);if(i){var a=JM(t);a?(this._axisPointer||(this._axisPointer=new i)).render(t,a,r,n):this._disposeAxisPointer(r)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,r){if(process.env.NODE_ENV!=="production"&&hd[t])throw new Error("axisPointer "+t+" exists");hd[t]=r},e.getAxisPointerClass=function(t){return t&&hd[t]},e.type="axis",e})(xA),vd=ze();function qM(A,e,t,r){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitArea"),a=i.getModel("areaStyle"),o=a.get("color"),s=r.coordinateSystem.getRect(),l=n.getTicksCoords({tickModel:i,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(l.length){var u=o.length,f=vd(A).splitAreaColors,c=we(),h=0;if(f)for(var v=0;v<l.length;v++){var d=f.get(l[v].tickValue);if(d!=null){h=(d+(u-1)*v)%u;break}}var g=n.toGlobalCoord(l[0].coord),p=a.getAreaStyle();o=ae(o)?o:[o];for(var v=1;v<l.length;v++){var B=n.toGlobalCoord(l[v].coord),m=void 0,y=void 0,_=void 0,C=void 0;n.isHorizontal()?(m=g,y=s.y,_=B-m,C=s.height,g=m+_):(m=s.x,y=g,_=s.width,C=B-y,g=y+C);var Q=l[v-1].tickValue;Q!=null&&c.set(Q,h),e.add(new qe({anid:Q!=null?"area_"+Q:null,shape:{x:m,y,width:_,height:C},style:Ne({fill:o[h]},p),autoBatch:!0,silent:!0})),h=(h+1)%u}vd(A).splitAreaColors=c}}}function $M(A){vd(A).splitAreaColors=null}var jM=["splitArea","splitLine","minorSplitLine","breakArea"],kC=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,r,n,i){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new lt,this.group.add(this._axisGroup),!!po(t)){this._axisGroup.add(t.axis.axisBuilder.group),b(jM,function(s){t.get([s,"show"])&&eH[s](this,this._axisGroup,t,t.getCoordSysModel(),n)},this);var o=i&&i.type==="changeAxisOrder"&&i.isInitSort;o||yB(a,this._axisGroup,t),A.prototype.render.call(this,t,r,n,i)}},e.prototype.remove=function(){$M(this)},e.type="cartesianAxis",e})(PC),eH={splitLine:function(A,e,t,r,n){var i=t.axis;if(!i.scale.isBlank()){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,u=a.get("showMaxLine")!==!1;s=ae(s)?s:[s];for(var f=r.coordinateSystem.getRect(),c=i.isHorizontal(),h=0,v=i.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),d=[],g=[],p=o.getLineStyle(),B=0;B<v.length;B++){var m=i.toGlobalCoord(v[B].coord);if(!(B===0&&!l||B===v.length-1&&!u)){var y=v[B].tickValue;c?(d[0]=m,d[1]=f.y,g[0]=m,g[1]=f.y+f.height):(d[0]=f.x,d[1]=m,g[0]=f.x+f.width,g[1]=m);var _=h++%s.length,C=new Tr({anid:y!=null?"line_"+y:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:g[0],y2:g[1]},style:Ne({stroke:s[_]},p),silent:!0});Va(C.shape,p.lineWidth),e.add(C)}}}},minorSplitLine:function(A,e,t,r,n){var i=t.axis,a=t.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=r.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(u.length)for(var f=[],c=[],h=o.getLineStyle(),v=0;v<u.length;v++)for(var d=0;d<u[v].length;d++){var g=i.toGlobalCoord(u[v][d].coord);l?(f[0]=g,f[1]=s.y,c[0]=g,c[1]=s.y+s.height):(f[0]=s.x,f[1]=g,c[0]=s.x+s.width,c[1]=g);var p=new Tr({anid:"minor_line_"+u[v][d].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:h,silent:!0});Va(p.shape,h.lineWidth),e.add(p)}},splitArea:function(A,e,t,r,n){qM(A,e,t,r)},breakArea:function(A,e,t,r,n){t.axis.scale}},VC=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e})(kC),tH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=VC.type,t}return e.type="yAxis",e})(kC),AH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,r){this.group.removeAll(),t.get("show")&&this.group.add(new qe({shape:t.coordinateSystem.getRect(),style:Ne({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(xA),KC={offset:0};function rH(A){A.registerComponentView(AH),A.registerComponentModel(lM),A.registerCoordinateSystem("cartesian2d",NM),yC(A,"x",nd,KC),yC(A,"y",nd,KC),A.registerComponentView(VC),A.registerComponentView(tH),A.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var nH=ze();function GC(A,e){return!!nH(A)[e]}Kn({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Dt);var iH={axisPointer:1,tooltip:1,brush:1};function aH(A,e,t){var r=e.getComponentByElement(A.topTarget);if(!r||r===t||iH.hasOwnProperty(r.mainType))return!1;var n=r.coordinateSystem;if(!n||n.model===t)return!1;var i=za(r),a=za(t);return!((i.zlevel-a.zlevel||i.z-a.z)<=0)}var oH=(function(A){J(e,A);function e(t){var r=A.call(this)||this;r._zr=t;var n=ye(r._mousedownHandler,r),i=ye(r._mousemoveHandler,r),a=ye(r._mouseupHandler,r),o=ye(r._mousewheelHandler,r),s=ye(r._pinchHandler,r);return r.enable=function(l,u){var f=u.zInfo,c=za(f.component),h=c.z,v=c.zlevel,d={component:f.component,z:h,zlevel:v,z2:ve(f.z2,-1/0)},g=Y({},u.triggerInfo);this._opt=Ne(Y({},u),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:d,triggerInfo:g}),l==null&&(l=!0),(!this._enabled||this._controlType!==l)&&(this._enabled=!0,this.disable(),(l===!0||l==="move"||l==="pan")&&(xo(t,"mousedown",n,d),xo(t,"mousemove",i,d),xo(t,"mouseup",a,d)),(l===!0||l==="scale"||l==="zoom")&&(xo(t,"mousewheel",o,d),xo(t,"pinch",s,d)))},r.disable=function(){this._enabled=!1,Fo(t,"mousedown",n),Fo(t,"mousemove",i),Fo(t,"mouseup",a),Fo(t,"mousewheel",o),Fo(t,"pinch",s)},r}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,r,n){var i=this._opt,a=i.zInfoParsed;if(aH(t,i.api,a.component))return!1;var o=i.triggerInfo,s=o.roamTrigger,l=!1;return s==="global"&&(l=!0),l||(l=o.isInSelf(t,r,n)),l&&o.isInClip&&!o.isInClip(t,r,n)&&(l=!1),l},e.prototype._decideCursorStyle=function(t,r,n,i){var a=t.target;if(!a&&this._checkPointer(t,r,n))return"grab";if(i)return a&&a.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(Vp(t)||Qo(t))){for(var r=t.target;r;){if(r.draggable)return;r=r.__hostTarget||r.parent}var n=t.offsetX,i=t.offsetY;this._checkPointer(t,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var r=this._zr;if(!(t.gestureEvent==="pinch"||GC(r,"globalPan")||Qo(t))){var n=t.offsetX,i=t.offsetY;if(!this._dragging||!_u("moveOnMouseMove",t,this._opt)){var a=this._decideCursorStyle(t,n,i,!1);a&&r.setCursorStyle(a);return}r.setCursorStyle("grabbing");var o=this._x,s=this._y,l=n-o,u=i-s;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&hi(t.event),t.__ecRoamConsumed=!0,zC(this,"pan","moveOnMouseMove",t,{dx:l,dy:u,oldX:o,oldY:s,newX:n,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!Qo(t)){var r=this._zr;if(!Vp(t)){this._dragging=!1;var n=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);n&&r.setCursorStyle(n)}}},e.prototype._mousewheelHandler=function(t){if(!Qo(t)){var r=_u("zoomOnMouseWheel",t,this._opt),n=_u("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,a=Math.abs(i),o=t.offsetX,s=t.offsetY;if(!(i===0||!r&&!n)){if(r){var l=a>3?1.4:a>1?1.2:1.1,u=i>0?l:1/l;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:u,originX:o,originY:s,isAvailableBehavior:null})}if(n){var f=Math.abs(i),c=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:o,originY:s,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(GC(this._zr,"globalPan")||Qo(t))){var r=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:r,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,r,n,i,a){t._checkPointer(i,a.originX,a.originY)&&(hi(i.event),i.__ecRoamConsumed=!0,zC(t,r,n,i,a))},e})(yA);function Qo(A){return A.__ecRoamConsumed}var sH=ze();function Cu(A){var e=sH(A);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function xo(A,e,t,r){for(var n=Cu(A),i=n.roam,a=i[e]=i[e]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:t,zInfoParsed:r}),lH(A,e)}function Fo(A,e,t){for(var r=Cu(A),n=r.roam[e]||[],i=0;i<n.length;i++)if(n[i].listener===t){n.splice(i,1),n.length||uH(A,e);return}}function lH(A,e){var t=Cu(A);t.uniform[e]||A.on(e,t.uniform[e]=function(r){var n=t.roam[e];if(n)for(var i=0;i<n.length;i++)n[i].listener(r)})}function uH(A,e){var t=Cu(A),r=t.uniform;r[e]&&(A.off(e,r[e]),r[e]=null)}function zC(A,e,t,r,n){n.isAvailableBehavior=ye(_u,null,t,r),A.trigger(e,n)}function _u(A,e,t){var r=t[A];return!A||r&&(!le(r)||e.event[r+"Key"])}function Eo(A,e,t,r,n,i){A=A||0;var a=t[1]-t[0];if(n!=null&&(n=ea(n,[0,a])),i!=null&&(i=Math.max(i,n??0)),r==="all"){var o=Math.abs(e[1]-e[0]);o=ea(o,[0,a]),n=i=ea(o,[n,i]),r=0}e[0]=ea(e[0],t),e[1]=ea(e[1],t);var s=dd(e,r);e[r]+=A;var l=n||0,u=t.slice();s.sign<0?u[0]+=l:u[1]-=l,e[r]=ea(e[r],u);var f;return f=dd(e,r),n!=null&&(f.sign!==s.sign||f.span<n)&&(e[1-r]=e[r]+s.sign*n),f=dd(e,r),i!=null&&f.span>i&&(e[1-r]=e[r]+f.sign*i),e}function dd(A,e){var t=A[e]-A[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function ea(A,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,A))}var Zn=ze(),WC=Ue,pd=ye,fH=(function(){function A(){this._dragging=!1,this.animationThreshold=15}return A.prototype.render=function(e,t,r,n){var i=t.get("value"),a=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=r,!(!n&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a==="hide"){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,r);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=u;var f=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new lt,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),r.getZr().add(o);else{var c=nt(YC,t,f);this.updatePointerEl(o,l,c),this.updateLabelEl(o,l,c,t)}JC(o,t,!0),this._renderHandle(i)}},A.prototype.remove=function(e){this.clear(e)},A.prototype.dispose=function(e){this.clear(e)},A.prototype.determineAnimation=function(e,t){var r=t.get("animation"),n=e.axis,i=n.type==="category",a=t.get("snap");if(!a&&!i)return!1;if(r==="auto"||r==null){var o=this.animationThreshold;if(i&&n.getBandWidth()>o)return!0;if(a){var s=fd(e).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return r===!0},A.prototype.makeElOption=function(e,t,r,n,i){},A.prototype.createPointerEl=function(e,t,r,n){var i=t.pointer;if(i){var a=Zn(e).pointerEl=new aS[i.type](WC(t.pointer));e.add(a)}},A.prototype.createLabelEl=function(e,t,r,n){if(t.label){var i=Zn(e).labelEl=new Ot(WC(t.label));e.add(i),ZC(i,n)}},A.prototype.updatePointerEl=function(e,t,r){var n=Zn(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),r(n,{shape:t.pointer.shape}))},A.prototype.updateLabelEl=function(e,t,r,n){var i=Zn(e).labelEl;i&&(i.setStyle(t.label.style),r(i,{x:t.label.x,y:t.label.y}),ZC(i,n))},A.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,r=this._api.getZr(),n=this._handle,i=t.getModel("handle"),a=t.get("status");if(!i.get("show")||!a||a==="hide"){n&&r.remove(n),this._handle=null;return}var o;this._handle||(o=!0,n=this._handle=gh(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){hi(l.event)},onmousedown:pd(this._onHandleDragMove,this,0,0),drift:pd(this._onHandleDragMove,this),ondragend:pd(this._onHandleDragEnd,this)}),r.add(n)),JC(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");ae(s)||(s=[s,s]),n.scaleX=s[0]/2,n.scaleY=s[1]/2,Pl(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,o)}},A.prototype._moveHandleToValue=function(e,t){YC(this._axisPointerModel,!t&&this._moveAnimation,this._handle,gd(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},A.prototype._onHandleDragMove=function(e,t){var r=this._handle;if(r){this._dragging=!0;var n=this.updateHandleTransform(gd(r),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,r.stopAnimation(),r.attr(gd(n)),Zn(r).lastProp=null,this._doDispatchAxisPointer()}},A.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},A.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},A.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),r=this._group,n=this._handle;t&&r&&(this._lastGraphicKey=null,r&&t.remove(r),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),kl(this,"_doDispatchAxisPointer")},A.prototype.doClear=function(){},A.prototype.buildLabel=function(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}},A})();function YC(A,e,t,r){XC(Zn(t).lastProp,r)||(Zn(t).lastProp=r,e?Et(t,r,A):(t.stopAnimation(),t.attr(r)))}function XC(A,e){if(he(A)&&he(e)){var t=!0;return b(e,function(r,n){t=t&&XC(A[n],r)}),!!t}else return A===e}function ZC(A,e){A[e.get(["label","show"])?"show":"hide"]()}function gd(A){return{x:A.x||0,y:A.y||0,rotation:A.rotation||0}}function JC(A,e,t){var r=e.get("z"),n=e.get("zlevel");A&&A.traverse(function(i){i.type!=="group"&&(r!=null&&(i.z=r),n!=null&&(i.zlevel=n),i.silent=t)})}function cH(A){var e=A.get("type"),t=A.getModel(e+"Style"),r;return e==="line"?(r=t.getLineStyle(),r.fill=null):e==="shadow"&&(r=t.getAreaStyle(),r.stroke=null),r}function hH(A,e,t,r,n){var i=t.get("value"),a=qC(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),o=t.getModel("label"),s=El(o.get("padding")||0),l=o.getFont(),u=Dg(a,l),f=n.position,c=u.width+s[1]+s[3],h=u.height+s[0]+s[2],v=n.align;v==="right"&&(f[0]-=c),v==="center"&&(f[0]-=c/2);var d=n.verticalAlign;d==="bottom"&&(f[1]-=h),d==="middle"&&(f[1]-=h/2),vH(f,c,h,r);var g=o.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),A.label={x:f[0],y:f[1],style:In(o,{text:a,font:l,fill:o.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function vH(A,e,t,r){var n=r.getWidth(),i=r.getHeight();A[0]=Math.min(A[0]+e,n)-e,A[1]=Math.min(A[1]+t,i)-t,A[0]=Math.max(A[0],0),A[1]=Math.max(A[1],0)}function qC(A,e,t,r,n){A=e.scale.parse(A);var i=e.scale.getLabel({value:A},{precision:n.precision}),a=n.formatter;if(a){var o={value:uu(e,{value:A}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};b(r,function(s){var l=t.getSeriesByIndex(s.seriesIndex),u=s.dataIndexInside,f=l&&l.getDataParams(u);f&&o.seriesData.push(f)}),le(a)?i=a.replace("{value}",i):me(a)&&(i=a(o))}return i}function $C(A,e,t){var r=nr();return Wf(r,r,t.rotation),zf(r,r,t.position),Ka([A.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],r)}function dH(A,e,t,r,n,i){var a=Wr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),hH(e,r,n,i,{position:$C(r.axis,A,t),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function pH(A,e,t){return t=t||0,{x1:A[t],y1:A[1-t],x2:e[t],y2:e[1-t]}}function gH(A,e,t){return t=t||0,{x:A[t],y:A[1-t],width:e[t],height:e[1-t]}}var BH=(function(A){J(e,A);function e(){return A!==null&&A.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,n,i,a){var o=n.axis,s=o.grid,l=i.get("type"),u=jC(s,o).getOtherAxis(o).getGlobalExtent(),f=o.toGlobalCoord(o.dataToCoord(r,!0));if(l&&l!=="none"){var c=cH(i),h=mH[l](o,f,u);h.style=c,t.graphicKey=h.type,t.pointer=h}var v=wu(s.getRect(),n);dH(r,t,v,n,i,a)},e.prototype.getHandleTransform=function(t,r,n){var i=wu(r.axis.grid.getRect(),r,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var a=$C(r.axis,t,i);return{x:a[0],y:a[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,n,i){var a=n.axis,o=a.grid,s=a.getGlobalExtent(!0),l=jC(o,a).getOtherAxis(a).getGlobalExtent(),u=a.dim==="x"?0:1,f=[t.x,t.y];f[u]+=r[u],f[u]=Math.min(s[1],f[u]),f[u]=Math.max(s[0],f[u]);var c=(l[1]+l[0])/2,h=[c,c];h[u]=f[u];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:v[u]}},e})(fH);function jC(A,e){var t={};return t[e.dim+"AxisIndex"]=e.index,A.getCartesian(t)}var mH={line:function(A,e,t){var r=pH([e,t[0]],[e,t[1]],e_(A));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(A,e,t){var r=Math.max(1,A.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:gH([e-r/2,t[0]],[r,n],e_(A))}}};function e_(A){return A.dim==="x"?0:1}var yH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:oe.color.border,width:1,type:"dashed"},shadowStyle:{color:oe.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:oe.color.neutral00,padding:[5,7,5,7],backgroundColor:oe.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:oe.color.accent40,throttle:40}},e})(Re),pr=ze(),wH=b;function t_(A,e,t){if(!_e.node){var r=e.getZr();pr(r).records||(pr(r).records={}),CH(r,e);var n=pr(r).records[A]||(pr(r).records[A]={});n.handler=t}}function CH(A,e){if(pr(A).initialized)return;pr(A).initialized=!0,t("click",nt(A_,"click")),t("mousemove",nt(A_,"mousemove")),t("globalout",QH);function t(r,n){A.on(r,function(i){var a=xH(e);wH(pr(A).records,function(o){o&&n(o,i,a.dispatchAction)}),_H(a.pendings,e)})}}function _H(A,e){var t=A.showTip.length,r=A.hideTip.length,n;t?n=A.showTip[t-1]:r&&(n=A.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function QH(A,e,t){A.handler("leave",null,t)}function A_(A,e,t,r){e.handler(A,t,r)}function xH(A){var e={showTip:[],hideTip:[]},t=function(r){var n=e[r.type];n?n.push(r):(r.dispatchAction=t,A.dispatchAction(r))};return{dispatchAction:t,pendings:e}}function Bd(A,e){if(!_e.node){var t=e.getZr(),r=(pr(t).records||{})[A];r&&(pr(t).records[A]=null)}}var FH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i=r.getComponent("tooltip"),a=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";t_("axisPointer",n,function(o,s,l){a!=="none"&&(o==="leave"||a.indexOf(o)>=0)&&l({type:"updateAxisPointer",currTrigger:o,x:s&&s.offsetX,y:s&&s.offsetY})})},e.prototype.remove=function(t,r){Bd("axisPointer",r)},e.prototype.dispose=function(t,r){Bd("axisPointer",r)},e.type="axisPointer",e})(xA);function r_(A,e){var t=[],r=A.seriesIndex,n;if(r==null||!(n=e.getSeriesByIndex(r)))return{point:[]};var i=n.getData(),a=pn(i,A);if(a==null||a<0||ae(a))return{point:[]};var o=i.getItemGraphicEl(a),s=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(a)||[];else if(s&&s.dataToPoint)if(A.isStacked){var l=s.getBaseAxis(),u=s.getOtherAxis(l),f=u.dim,c=l.dim,h=f==="x"||f==="radius"?1:0,v=i.mapDimension(c),d=[];d[h]=i.get(v,a),d[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),a),t=s.dataToPoint(d)||[]}else t=s.dataToPoint(i.getValues(Be(s.dimensions,function(p){return i.mapDimension(p)}),a))||[];else if(o){var g=o.getBoundingRect().clone();g.applyTransform(o.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:o}}var n_=ze();function EH(A,e,t){var r=A.currTrigger,n=[A.x,A.y],i=A,a=A.dispatchAction||ye(t.dispatchAction,t),o=e.getComponent("axisPointer").coordSysAxesInfo;if(o){Qu(n)&&(n=r_({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var s=Qu(n),l=i.axesInfo,u=o.axesInfo,f=r==="leave"||Qu(n),c={},h={},v={list:[],map:{}},d={showPointer:nt(SH,h),showTooltip:nt(UH,v)};b(o.coordSysMap,function(p,B){var m=s||p.containPoint(n);b(o.coordSysAxesInfo[B],function(y,_){var C=y.axis,Q=LH(l,y);if(!f&&m&&(!l||Q)){var x=Q&&Q.value;x==null&&!s&&(x=C.pointToData(n)),x!=null&&i_(y,x,d,!1,c)}})});var g={};return b(u,function(p,B){var m=p.linkGroup;m&&!h[B]&&b(m.axesInfo,function(y,_){var C=h[_];if(y!==p&&C){var Q=C.value;m.mapper&&(Q=p.axis.scale.parse(m.mapper(Q,a_(y),a_(p)))),g[p.key]=Q}})}),b(g,function(p,B){i_(u[B],p,d,!0,c)}),IH(h,u,c),TH(v,n,A,a),DH(u,a,t),c}}function i_(A,e,t,r,n){var i=A.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!A.involveSeries){t.showPointer(A,e);return}var a=bH(e,A),o=a.payloadBatch,s=a.snapToValue;o[0]&&n.seriesIndex==null&&Y(n,o[0]),!r&&A.snap&&i.containData(s)&&s!=null&&(e=s),t.showPointer(A,e,o),t.showTooltip(A,a,s)}}function bH(A,e){var t=e.axis,r=t.dim,n=A,i=[],a=Number.MAX_VALUE,o=-1;return b(e.seriesModels,function(s,l){var u=s.getData().mapDimensionsAll(r),f,c;if(s.getAxisTooltipData){var h=s.getAxisTooltipData(u,A,t);c=h.dataIndices,f=h.nestestValue}else{if(c=s.indicesOfNearest(r,u[0],A,t.type==="category"?.5:null),!c.length)return;f=s.getData().get(u[0],c[0])}if(!(f==null||!isFinite(f))){var v=A-f,d=Math.abs(v);d<=a&&((d<a||v>=0&&o<0)&&(a=d,o=v,n=f,i.length=0),b(c,function(g){i.push({seriesIndex:s.seriesIndex,dataIndexInside:g,dataIndex:s.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function SH(A,e,t,r){A[e.key]={value:t,payloadBatch:r}}function UH(A,e,t,r){var n=t.payloadBatch,i=e.axis,a=i.model,o=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var s=e.coordSys.model,l=_o(s),u=A.map[l];u||(u=A.map[l]={coordSysId:s.id,coordSysIndex:s.componentIndex,coordSysType:s.type,coordSysMainType:s.mainType,dataByAxis:[]},A.list.push(u)),u.dataByAxis.push({axisDim:i.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:o.get(["label","precision"]),formatter:o.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function IH(A,e,t){var r=t.axesInfo=[];b(e,function(n,i){var a=n.axisPointerModel.option,o=A[i];o?(!n.useHandle&&(a.status="show"),a.value=o.value,a.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(a.status="hide"),a.status==="show"&&r.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:a.value})})}function TH(A,e,t,r){if(Qu(e)||!A.list.length){r({type:"hideTip"});return}var n=((A.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:A.list})}function DH(A,e,t){var r=t.getZr(),n="axisPointerLastHighlights",i=n_(r)[n]||{},a=n_(r)[n]={};b(A,function(l,u){var f=l.axisPointerModel.option;f.status==="show"&&l.triggerEmphasis&&b(f.seriesDataIndices,function(c){var h=c.seriesIndex+" | "+c.dataIndex;a[h]=c})});var o=[],s=[];b(i,function(l,u){!a[u]&&s.push(l)}),b(a,function(l,u){!i[u]&&o.push(l)}),s.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),o.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:o})}function LH(A,e){for(var t=0;t<(A||[]).length;t++){var r=A[t];if(e.axis.dim===r.axisDim&&e.axis.model.componentIndex===r.axisIndex)return r}}function a_(A){var e=A.axis.model,t={},r=t.axisDim=A.axis.dim;return t.axisIndex=t[r+"AxisIndex"]=e.componentIndex,t.axisName=t[r+"AxisName"]=e.name,t.axisId=t[r+"AxisId"]=e.id,t}function Qu(A){return!A||A[0]==null||isNaN(A[0])||A[1]==null||isNaN(A[1])}function o_(A){PC.registerAxisPointerClass("CartesianAxisPointer",BH),A.registerComponentModel(yH),A.registerComponentView(FH),A.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!ae(t)&&(e.axisPointer.link=[t])}}),A.registerProcessor(A.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=GM(e,t)}),A.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},EH)}function MH(A){qA(rH),qA(o_)}var s_=["x","y","radius","angle","single"],HH=["cartesian2d","polar","singleAxis"];function OH(A){var e=A.get("coordinateSystem");return Te(HH,e)>=0}function Yr(A){return process.env.NODE_ENV!=="production"&&fe(A),A+"Axis"}function RH(A,e){var t=we(),r=[],n=we();A.eachComponent({mainType:"dataZoom",query:e},function(u){n.get(u.uid)||o(u)});var i;do i=!1,A.eachComponent("dataZoom",a);while(i);function a(u){!n.get(u.uid)&&s(u)&&(o(u),i=!0)}function o(u){n.set(u.uid,!0),r.push(u),l(u)}function s(u){var f=!1;return u.eachTargetAxis(function(c,h){var v=t.get(c);v&&v[h]&&(f=!0)}),f}function l(u){u.eachTargetAxis(function(f,c){(t.get(f)||t.set(f,[]))[c]=!0})}return r}function l_(A){var e=A.ecModel,t={infoList:[],infoMap:we()};return A.eachTargetAxis(function(r,n){var i=e.getComponent(Yr(r),n);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=t.infoMap.get(o);s||(s={model:a,axisModels:[]},t.infoList.push(s),t.infoMap.set(o,s)),s.axisModels.push(i)}}}),t}var md=(function(){function A(){this.indexList=[],this.indexMap=[]}return A.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},A})(),xu=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,r,n){var i=u_(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var r=u_(t);Oe(this.option,t,!0),Oe(this.settledOption,r,!0),this._doInit(r)},e.prototype._doInit=function(t){var r=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;b([["start","startValue"],["end","endValue"]],function(i,a){this._rangePropMode[a]==="value"&&(r[i[0]]=n[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),r=this._targetAxisInfoMap=we(),n=this._fillSpecifiedTargetAxis(r);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(r,this._orient)),this._noTarget=!0,r.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var r=!1;return b(s_,function(n){var i=this.getReferringComponents(Yr(n),YF);if(i.specified){r=!0;var a=new md;b(i.models,function(o){a.add(o.componentIndex)}),t.set(n,a)}},this),r},e.prototype._fillAutoTargetAxisByOrient=function(t,r){var n=this.ecModel,i=!0;if(i){var a=r==="vertical"?"y":"x",o=n.findComponents({mainType:a+"Axis"});s(o,a)}if(i){var o=n.findComponents({mainType:"singleAxis",filter:function(u){return u.get("orient",!0)===r}});s(o,"single")}function s(l,u){var f=l[0];if(f){var c=new md;if(c.add(f.componentIndex),t.set(u,c),i=!1,u==="x"||u==="y"){var h=f.getReferringComponents("grid",Mt).models[0];h&&b(l,function(v){f.componentIndex!==v.componentIndex&&h===v.getReferringComponents("grid",Mt).models[0]&&c.add(v.componentIndex)})}}}i&&b(s_,function(l){if(i){var u=n.findComponents({mainType:Yr(l),filter:function(c){return c.get("type",!0)==="category"}});if(u[0]){var f=new md;f.add(u[0].componentIndex),t.set(l,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(r){!t&&(t=r)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var r=this.ecModel.option;this.option.throttle=r.animation&&r.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var r=this._rangePropMode,n=this.get("rangeMode");b([["start","startValue"],["end","endValue"]],function(i,a){var o=t[i[0]]!=null,s=t[i[1]]!=null;o&&!s?r[a]="percent":!o&&s?r[a]="value":n?r[a]=n[a]:o&&(r[a]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(r,n){t==null&&(t=this.ecModel.getComponent(Yr(r),n))},this),t},e.prototype.eachTargetAxis=function(t,r){this._targetAxisInfoMap.each(function(n,i){b(n.indexList,function(a){t.call(r,i,a)})})},e.prototype.getAxisProxy=function(t,r){var n=this.getAxisModel(t,r);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,r){process.env.NODE_ENV!=="production"&&fe(t&&r!=null);var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[r])return this.ecModel.getComponent(Yr(t),r)},e.prototype.setRawRange=function(t){var r=this.option,n=this.settledOption;b([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(r[i[0]]=n[i[0]]=t[i[0]],r[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var r=this.option;b(["start","startValue","end","endValue"],function(n){r[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,r){if(t==null&&r==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,r).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var r,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var a=n[i],o=this._targetAxisInfoMap.get(a),s=0;s<o.indexList.length;s++){var l=this.getAxisProxy(a,o.indexList[s]);if(l.hostedBy(this))return l;r||(r=l)}return r},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&fe(this._orient),this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(Re);function u_(A){var e={};return b(["start","end","startValue","endValue","throttle"],function(t){A.hasOwnProperty(t)&&(e[t]=A[t])}),e}var f_=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){this.dataZoomModel=t,this.ecModel=r,this.api=n},e.type="dataZoom",e})(xA),ta=b,c_=Ua,NH=(function(){function A(e,t,r,n){this._dimName=e,this._axisIndex=t,this.ecModel=n,this._dataZoomModel=r}return A.prototype.hostedBy=function(e){return this._dataZoomModel===e},A.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},A.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},A.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(OH(t)){var r=Yr(this._dimName),n=t.getReferringComponents(r,Mt).models[0];n&&this._axisIndex===n.componentIndex&&e.push(t)}},this),e},A.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},A.prototype.getMinMaxSpan=function(){return Ue(this._minMaxSpan)},A.prototype.calculateDataWindow=function(e){var t=this._dataExtent,r=this.getAxisModel(),n=r.axis.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[],l;ta(["start","end"],function(c,h){var v=e[c],d=e[c+"Value"];i[h]==="percent"?(v==null&&(v=a[h]),d=n.parse(dt(v,a,t))):(l=!0,d=d==null?t[h]:n.parse(d),v=dt(d,t,a)),s[h]=d==null||isNaN(d)?t[h]:d,o[h]=v==null||isNaN(v)?a[h]:v}),c_(s),c_(o);var u=this._minMaxSpan;l?f(s,o,t,a,!1):f(o,s,a,t,!0);function f(c,h,v,d,g){var p=g?"Span":"ValueSpan";Eo(0,c,v,"all",u["min"+p],u["max"+p]);for(var B=0;B<2;B++)h[B]=dt(c[B],v,d,!0),g&&(h[B]=n.parse(h[B]))}return{valueWindow:s,percentWindow:o}},A.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=PH(this,this._dimName,t),this._updateMinMaxSpan();var r=this.calculateDataWindow(e.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,this._setAxisModel()}},A.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var r=this._dimName,n=this.getTargetSeriesModels(),i=e.get("filterMode"),a=this._valueWindow;if(i==="none")return;ta(n,function(s){var l=s.getData(),u=l.mapDimensionsAll(r);if(u.length){if(i==="weakFilter"){var f=l.getStore(),c=Be(u,function(h){return l.getDimensionIndex(h)},l);l.filterSelf(function(h){for(var v,d,g,p=0;p<u.length;p++){var B=f.get(c[p],h),m=!isNaN(B),y=B<a[0],_=B>a[1];if(m&&!y&&!_)return!0;m&&(g=!0),y&&(v=!0),_&&(d=!0)}return g&&v&&d})}else ta(u,function(h){if(i==="empty")s.setData(l=l.map(h,function(d){return o(d)?d:NaN}));else{var v={};v[h]=a,l.selectRange(v)}});ta(u,function(h){l.setApproximateExtent(a,h)})}});function o(s){return s>=a[0]&&s<=a[1]}},A.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,r=this._dataExtent;ta(["min","max"],function(n){var i=t.get(n+"Span"),a=t.get(n+"ValueSpan");a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a!=null?i=dt(r[0]+a,r,[0,100],!0):i!=null&&(a=dt(i,[0,100],r,!0)-r[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=a},this)},A.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,r=this._valueWindow;if(t){var n=Ng(r,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+r[0].toFixed(n)),t[1]!==100&&i.setDeterminedMinMax("max",+r[1].toFixed(n)),i.freeze()}},A})();function PH(A,e,t){var r=[1/0,-1/0];ta(t,function(a){kD(r,a.getData(),e)});var n=A.getAxisModel(),i=mw(n.axis.scale,n,r).calculate();return[i.min,i.max]}var kH={getTargetSeries:function(A){function e(n){A.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(a,o){var s=A.getComponent(Yr(a),o);n(a,o,s,i)})})}e(function(n,i,a,o){a.__dzAxisProxy=null});var t=[];e(function(n,i,a,o){a.__dzAxisProxy||(a.__dzAxisProxy=new NH(n,i,o,A),t.push(a.__dzAxisProxy))});var r=we();return b(t,function(n){b(n.getTargetSeriesModels(),function(i){r.set(i.uid,i)})}),r},overallReset:function(A,e){A.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(r,n){t.getAxisProxy(r,n).reset(t)}),t.eachTargetAxis(function(r,n){t.getAxisProxy(r,n).filterData(t,e)})}),A.eachComponent("dataZoom",function(t){var r=t.findRepresentativeAxisProxy();if(r){var n=r.getDataPercentWindow(),i=r.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};function VH(A){A.registerAction("dataZoom",function(e,t){var r=RH(t,e);b(r,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var h_=!1;function v_(A){h_||(h_=!0,A.registerProcessor(A.PRIORITY.PROCESSOR.FILTER,kH),VH(A),A.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function KH(A,e){var t=El(e.get("padding")),r=e.getItemStyle(["color","opacity"]);r.fill=e.get("backgroundColor");var n=new qe({shape:{x:A.x-t[3],y:A.y-t[0],width:A.width+t[1]+t[3],height:A.height+t[0]+t[2],r:e.get("borderRadius")},style:r,silent:!0,z2:-1});return n}var GH=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:oe.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:oe.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:oe.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:oe.color.tertiary,fontSize:14}},e})(Re);function d_(A){var e=A.get("confine");return e!=null?!!e:A.get("renderMode")==="richText"}function p_(A){if(_e.domSupported){for(var e=document.documentElement.style,t=0,r=A.length;t<r;t++)if(A[t]in e)return A[t]}}var g_=p_(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),zH=p_(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function B_(A,e){if(!A)return e;e=zB(e,!0);var t=A.indexOf(e);return A=t===-1?e:"-"+A.slice(0,t)+"-"+e,A.toLowerCase()}function WH(A,e){var t=A.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(A);return t?t[e]:null}var YH=B_(zH,"transition"),yd=B_(g_,"transform"),XH="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(_e.transform3dSupported?"will-change:transform;":"");function ZH(A){return A=A==="left"?"right":A==="right"?"left":A==="top"?"bottom":"top",A}function JH(A,e,t){if(!le(t)||t==="inside")return"";var r=A.get("backgroundColor"),n=A.get("borderWidth");e=Dn(e);var i=ZH(t),a=Math.max(Math.round(n)*1.5,6),o="",s=yd+":",l;Te(["left","right"],i)>-1?(o+="top:50%",s+="translateY(-50%) rotate("+(l=i==="left"?-225:-45)+"deg)"):(o+="left:50%",s+="translateX(-50%) rotate("+(l=i==="top"?225:45)+"deg)");var u=l*Math.PI/180,f=a+n,c=f*Math.abs(Math.cos(u))+f*Math.abs(Math.sin(u)),h=Math.round(((c-Math.SQRT2*n)/2+Math.SQRT2*n-(c-f)/2)*100)/100;o+=";"+i+":-"+h+"px";var v=e+" solid "+n+"px;",d=["position:absolute;width:"+a+"px;height:"+a+"px;z-index:-1;",o+";"+s+";","border-bottom:"+v,"border-right:"+v,"background-color:"+r+";"];return'<div style="'+d.join("")+'"></div>'}function qH(A,e,t){var r="cubic-bezier(0.23,1,0.32,1)",n="",i="";return t&&(n=" "+A/2+"s "+r,i="opacity"+n+",visibility"+n),e||(n=" "+A+"s "+r,i+=(i.length?",":"")+(_e.transformSupported?""+yd+n:",left"+n+",top"+n)),YH+":"+i}function m_(A,e,t){var r=A.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!_e.transformSupported)return t?"top:"+n+";left:"+r+";":[["top",n],["left",r]];var i=_e.transform3dSupported,a="translate"+(i?"3d":"")+"("+r+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+yd+":"+a+";":[["top",0],["left",0],[g_,a]]}function $H(A){var e=[],t=A.get("fontSize"),r=A.getTextColor();r&&e.push("color:"+r),e.push("font:"+A.getFont());var n=ve(A.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+n+"px");var i=A.get("textShadowColor"),a=A.get("textShadowBlur")||0,o=A.get("textShadowOffsetX")||0,s=A.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),b(["decoration","align"],function(l){var u=A.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function jH(A,e,t,r){var n=[],i=A.get("transitionDuration"),a=A.get("backgroundColor"),o=A.get("shadowBlur"),s=A.get("shadowColor"),l=A.get("shadowOffsetX"),u=A.get("shadowOffsetY"),f=A.getModel("textStyle"),c=Km(A,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i>0&&n.push(qH(i,t,r)),a&&n.push("background-color:"+a),b(["width","color","radius"],function(v){var d="border-"+v,g=zB(d),p=A.get(g);p!=null&&n.push(d+":"+p+(v==="color"?"":"px"))}),n.push($H(f)),c!=null&&n.push("padding:"+El(c).join("px ")+"px"),n.join(";")+";"}function y_(A,e,t,r,n){var i=e&&e.painter;if(t){var a=i&&i.getViewportRoot();a&&yx(A,a,t,r,n)}else{A[0]=r,A[1]=n;var o=i&&i.getViewportRootOffset();o&&(A[0]+=o.offsetLeft,A[1]+=o.offsetTop)}A[2]=A[0]/e.getWidth(),A[3]=A[1]/e.getHeight()}var e2=(function(){function A(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,_e.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var n=this._zr=e.getZr(),i=t.appendTo,a=i&&(le(i)?document.querySelector(i):ii(i)?i:me(i)&&i(e.getDom()));y_(this._styleCoord,n,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(r),this._api=e,this._container=a;var o=this;r.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},r.onmousemove=function(s){if(s=s||window.event,!o._enterable){var l=n.handler,u=n.painter.getViewportRoot();AA(u,s,!0),l.dispatch("mousemove",s)}},r.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return A.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),r=WH(t,"position"),n=t.style;n.position!=="absolute"&&r!=="absolute"&&(n.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},A.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,n=r.style,i=this._styleCoord;r.innerHTML?n.cssText=XH+jH(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+m_(i[0],i[1],!0)+("border-color:"+Dn(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},A.prototype.setContent=function(e,t,r,n,i){var a=this.el;if(e==null){a.innerHTML="";return}var o="";if(le(i)&&r.get("trigger")==="item"&&!d_(r)&&(o=JH(r,n,i)),le(e))a.innerHTML=e+o;else if(e){a.innerHTML="",ae(e)||(e=[e]);for(var s=0;s<e.length;s++)ii(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var l=document.createElement("div");l.innerHTML=o,a.appendChild(l)}}},A.prototype.setEnterable=function(e){this._enterable=e},A.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},A.prototype.moveTo=function(e,t){if(this.el){var r=this._styleCoord;if(y_(r,this._zr,this._container,e,t),r[0]!=null&&r[1]!=null){var n=this.el.style,i=m_(r[0],r[1]);b(i,function(a){n[a[0]]=a[1]})}}},A.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},A.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",_e.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},A.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ye(this.hide,this),e)):this.hide())},A.prototype.isShow=function(){return this._show},A.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Cx(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var r=t.parentNode;r&&r.removeChild(t)}this.el=this._container=null},A})(),t2=(function(){function A(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),C_(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return A.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},A.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},A.prototype.setContent=function(e,t,r,n,i){var a=this;he(e)&&Kt(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var o=r.getModel("textStyle");this.el=new Ot({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:o.get("textShadowColor"),fill:r.get(["textStyle","color"]),padding:Km(r,"richText"),verticalAlign:"top",align:"left"},z:r.get("z")}),b(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(l){a.el.style[l]=r.get(l)}),b(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(l){a.el.style[l]=o.get(l)||0}),this._zr.add(this.el);var s=this;this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},A.prototype.setEnterable=function(e){this._enterable=e},A.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),r=w_(e.style);return[t.width+r.left+r.right,t.height+r.top+r.bottom]},A.prototype.moveTo=function(e,t){var r=this.el;if(r){var n=this._styleCoord;C_(n,this._zr,e,t),e=n[0],t=n[1];var i=r.style,a=Xr(i.borderWidth||0),o=w_(i);r.x=e+a+o.left,r.y=t+a+o.top,r.markRedraw()}},A.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},A.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},A.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ye(this.hide,this),e)):this.hide())},A.prototype.isShow=function(){return this._show},A.prototype.dispose=function(){this._zr.remove(this.el)},A})();function Xr(A){return Math.max(0,A)}function w_(A){var e=Xr(A.shadowBlur||0),t=Xr(A.shadowOffsetX||0),r=Xr(A.shadowOffsetY||0);return{left:Xr(e-t),right:Xr(e+t),top:Xr(e-r),bottom:Xr(e+r)}}function C_(A,e,t,r){A[0]=t,A[1]=r,A[2]=A[0]/e.getWidth(),A[3]=A[1]/e.getHeight()}var A2=new qe({shape:{x:-1,y:-1,width:2,height:2}}),r2=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){if(!(_e.node||!r.getDom())){var n=t.getComponent("tooltip"),i=this._renderMode=ZF(n.get("renderMode"));this._tooltipContent=i==="richText"?new t2(r):new e2(r,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},e.prototype.render=function(t,r,n){if(!(_e.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=r,this._api=n;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Pl(this,"_updatePosition",50,"fixRate"):kl(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,r=t.get("triggerOn");t_("itemTooltip",this._api,ye(function(n,i,a){r!=="none"&&(r.indexOf(n)>=0?this._tryShow(i,a):n==="leave"&&this._hide(a))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,r=this._ecModel,n=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&a.manuallyShowTip(t,r,n,{x:a._lastX,y:a._lastY,dataByCoordSys:a._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,r,n,i){if(!(i.from===this.uid||_e.node||!n.getDom())){var a=__(i,n);this._ticket="";var o=i.dataByCoordSys,s=o2(i,r,n);if(s){var l=s.el.getBoundingRect().clone();l.applyTransform(s.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:s.el,position:i.position,positionDefault:"bottom"},a)}else if(i.tooltip&&i.x!=null&&i.y!=null){var u=A2;u.x=i.x,u.y=i.y,u.update(),Le(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},a)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},a);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,r,n,i))return;var f=r_(i,r),c=f.point[0],h=f.point[1];c!=null&&h!=null&&this._tryShow({offsetX:c,offsetY:h,target:f.el,position:i.position,positionDefault:"bottom"},a)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},a))}},e.prototype.manuallyHideTip=function(t,r,n,i){var a=this._tooltipContent;this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(__(i,n))},e.prototype._manuallyAxisShowTip=function(t,r,n,i){var a=i.seriesIndex,o=i.dataIndex,s=r.getComponent("axisPointer").coordSysAxesInfo;if(!(a==null||o==null||s==null)){var l=r.getSeriesByIndex(a);if(l){var u=l.getData(),f=bo([u.getItemModel(o),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:o,position:i.position}),!0}}},e.prototype._tryShow=function(t,r){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var a=t.dataByCoordSys;if(a&&a.length)this._showAxisTooltip(a,t);else if(n){var o=Le(n);if(o.ssrType==="legend")return;this._lastDataByCoordSys=null;var s,l;ao(n,function(u){if(u.tooltipDisabled)return s=l=null,!0;s||l||(Le(u).dataIndex!=null?s=u:Le(u).tooltipConfig!=null&&(l=u))},!0),s?this._showSeriesItemTooltip(t,s,r):l?this._showComponentItemTooltip(t,l,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},e.prototype._showOrMove=function(t,r){var n=t.get("showDelay");r=ye(r,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(r,n):r()},e.prototype._showAxisTooltip=function(t,r){var n=this._ecModel,i=this._tooltipModel,a=[r.offsetX,r.offsetY],o=bo([r.tooltipOption],i),s=this._renderMode,l=[],u=Ao("section",{blocks:[],noHeader:!0}),f=[],c=new rv;b(t,function(B){b(B.dataByAxis,function(m){var y=n.getComponent(m.axisDim+"Axis",m.axisIndex),_=m.value;if(!(!y||_==null)){var C=qC(_,y.axis,n,m.seriesDataIndices,m.valueLabelOpt),Q=Ao("section",{header:C,noHeader:!LA(C),sortBlocks:!0,blocks:[]});u.blocks.push(Q),b(m.seriesDataIndices,function(x){var F=n.getSeriesByIndex(x.seriesIndex),S=x.dataIndexInside,E=F.getDataParams(S);if(!(E.dataIndex<0)){E.axisDim=m.axisDim,E.axisIndex=m.axisIndex,E.axisType=m.axisType,E.axisId=m.axisId,E.axisValue=uu(y.axis,{value:_}),E.axisValueLabel=C,E.marker=c.makeTooltipMarker("item",Dn(E.color),s);var I=Sm(F.formatTooltip(S,!0,null)),U=I.frag;if(U){var T=bo([F],i).get("valueFormatter");Q.blocks.push(T?Y({valueFormatter:T},U):U)}I.text&&f.push(I.text),l.push(E)}})}})}),u.blocks.reverse(),f.reverse();var h=r.position,v=o.get("order"),d=km(u,c,s,v,n.get("useUTC"),o.get("textStyle"));d&&f.unshift(d);var g=s==="richText"?`
42
42
 
43
43
  `:"<br/>",p=f.join(g);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t,l)?this._updatePosition(o,h,a[0],a[1],this._tooltipContent,l):this._showTooltipContent(o,p,l,Math.random()+"",a[0],a[1],h,null,c)})},e.prototype._showSeriesItemTooltip=function(t,r,n){var i=this._ecModel,a=Le(r),o=a.seriesIndex,s=i.getSeriesByIndex(o),l=a.dataModel||s,u=a.dataIndex,f=a.dataType,c=l.getData(f),h=this._renderMode,v=t.positionDefault,d=bo([c.getItemModel(u),l,s&&(s.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var p=l.getDataParams(u,f),B=new rv;p.marker=B.makeTooltipMarker("item",Dn(p.color),h);var m=Sm(l.formatTooltip(u,!1,f)),y=d.get("order"),_=d.get("valueFormatter"),C=m.frag,Q=C?km(_?Y({valueFormatter:_},C):C,B,h,y,i.get("useUTC"),d.get("textStyle")):m.text,x="item_"+l.name+"_"+u;this._showOrMove(d,function(){this._showTooltipContent(d,Q,p,x,t.offsetX,t.offsetY,t.position,t.target,B)}),n({type:"showTip",dataIndexInside:u,dataIndex:c.getRawIndex(u),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,r,n){var i=this._renderMode==="html",a=Le(r),o=a.tooltipConfig,s=o.option||{},l=s.encodeHTMLContent;if(le(s)){var u=s;s={content:u,formatter:u},l=!0}l&&i&&s.content&&(s=Ue(s),s.content=Vt(s.content));var f=[s],c=this._ecModel.getComponent(a.componentMainType,a.componentIndex);c&&f.push(c),f.push({formatter:s.content});var h=t.positionDefault,v=bo(f,this._tooltipModel,h?{position:h}:null),d=v.get("content"),g=Math.random()+"",p=new rv;this._showOrMove(v,function(){var B=Ue(v.get("formatterParams")||{});this._showTooltipContent(v,d,B,g,t.offsetX,t.offsetY,t.position,r,p)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,r,n,i,a,o,s,l,u){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var c=t.get("formatter");s=s||t.get("position");var h=r,v=this._getNearestPoint([a,o],n,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),d=v.color;if(c)if(le(c)){var g=t.ecModel.get("useUTC"),p=ae(n)?n[0]:n,B=p&&p.axisType&&p.axisType.indexOf("time")>=0;h=c,B&&(h=xl(p.axisValue,h,g)),h=YB(h,n,!0)}else if(me(c)){var m=ye(function(y,_){y===this._ticket&&(f.setContent(_,u,t,d,s),this._updatePosition(t,s,a,o,f,n,l))},this);this._ticket=i,h=c(n,i,m)}else h=c;f.setContent(h,u,t,d,s),f.show(t,d),this._updatePosition(t,s,a,o,f,n,l)}},e.prototype._getNearestPoint=function(t,r,n,i,a){if(n==="axis"||ae(r))return{color:i||a};if(!ae(r))return{color:i||r.color||r.borderColor}},e.prototype._updatePosition=function(t,r,n,i,a,o,s){var l=this._api.getWidth(),u=this._api.getHeight();r=r||t.get("position");var f=a.getSize(),c=t.get("align"),h=t.get("verticalAlign"),v=s&&s.getBoundingRect().clone();if(s&&v.applyTransform(s.transform),me(r)&&(r=r([n,i],o,a.el,v,{viewSize:[l,u],contentSize:f.slice()})),ae(r))n=ht(r[0],l),i=ht(r[1],u);else if(he(r)){var d=r;d.width=f[0],d.height=f[1];var g=Ri(d,{width:l,height:u});n=g.x,i=g.y,c=null,h=null}else if(le(r)&&s){var p=a2(r,v,f,t.get("borderWidth"));n=p[0],i=p[1]}else{var p=n2(n,i,a,l,u,c?null:20,h?null:20);n=p[0],i=p[1]}if(c&&(n-=Q_(c)?f[0]/2:c==="right"?f[0]:0),h&&(i-=Q_(h)?f[1]/2:h==="bottom"?f[1]:0),d_(t)){var p=i2(n,i,a,l,u);n=p[0],i=p[1]}a.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,r){var n=this._lastDataByCoordSys,i=this._cbParamsList,a=!!n&&n.length===t.length;return a&&b(n,function(o,s){var l=o.dataByAxis||[],u=t[s]||{},f=u.dataByAxis||[];a=a&&l.length===f.length,a&&b(l,function(c,h){var v=f[h]||{},d=c.seriesDataIndices||[],g=v.seriesDataIndices||[];a=a&&c.value===v.value&&c.axisType===v.axisType&&c.axisId===v.axisId&&d.length===g.length,a&&b(d,function(p,B){var m=g[B];a=a&&p.seriesIndex===m.seriesIndex&&p.dataIndex===m.dataIndex}),i&&b(c.seriesDataIndices,function(p){var B=p.seriesIndex,m=r[B],y=i[B];m&&y&&y.data!==m.data&&(a=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=r,!!a},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,r){_e.node||!r.getDom()||(kl(this,"_updatePosition"),this._tooltipContent.dispose(),Bd("itemTooltip",r))},e.type="tooltip",e})(xA);function bo(A,e,t){var r=e.ecModel,n;t?(n=new et(t,r,r),n=new et(e.option,n,r)):n=e;for(var i=A.length-1;i>=0;i--){var a=A[i];a&&(a instanceof et&&(a=a.get("tooltip",!0)),le(a)&&(a={formatter:a}),a&&(n=new et(a,n,r)))}return n}function __(A,e){return A.dispatchAction||ye(e.dispatchAction,e)}function n2(A,e,t,r,n,i,a){var o=t.getSize(),s=o[0],l=o[1];return i!=null&&(A+s+i+2>r?A-=s+i:A+=i),a!=null&&(e+l+a>n?e-=l+a:e+=a),[A,e]}function i2(A,e,t,r,n){var i=t.getSize(),a=i[0],o=i[1];return A=Math.min(A+a,r)-a,e=Math.min(e+o,n)-o,A=Math.max(A,0),e=Math.max(e,0),[A,e]}function a2(A,e,t,r){var n=t[0],i=t[1],a=Math.ceil(Math.SQRT2*r)+8,o=0,s=0,l=e.width,u=e.height;switch(A){case"inside":o=e.x+l/2-n/2,s=e.y+u/2-i/2;break;case"top":o=e.x+l/2-n/2,s=e.y-i-a;break;case"bottom":o=e.x+l/2-n/2,s=e.y+u+a;break;case"left":o=e.x-n-a,s=e.y+u/2-i/2;break;case"right":o=e.x+l+a,s=e.y+u/2-i/2}return[o,s]}function Q_(A){return A==="center"||A==="middle"}function o2(A,e,t){var r=Ic(A).queryOptionMap,n=r.keys()[0];if(!(!n||n==="series")){var i=Da(e,n,r.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),a=i.models[0];if(a){var o=t.getViewOfComponentModel(a),s;if(o.group.traverse(function(l){var u=Le(l).tooltipConfig;if(u&&u.name===A.name)return s=l,!0}),s)return{componentMainType:n,componentIndex:a.componentIndex,el:s}}}}function s2(A){qA(o_),A.registerComponentModel(GH),A.registerComponentView(r2),A.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Dt),A.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Dt)}var l2=function(A,e){if(e==="all")return{type:"all",title:A.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:A.getLocaleModel().get(["legend","selector","inverse"])}},wd=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,r,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,r){A.prototype.mergeOption.call(this,t,r),this._updateSelector(t)},e.prototype._updateSelector=function(t){var r=t.selector,n=this.ecModel;r===!0&&(r=t.selector=["all","inverse"]),ae(r)&&b(r,function(i,a){le(i)&&(i={type:i}),r[a]=Oe(i,l2(n,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var r=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),r=!0;break}}!r&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var r=[],n=[];t.eachRawSeries(function(s){var l=s.name;n.push(l);var u;if(s.legendVisualProvider){var f=s.legendVisualProvider,c=f.getAllNames();t.isSeriesFiltered(s)||(n=n.concat(c)),c.length?r=r.concat(c):u=!0}else u=!0;u&&Sc(s)&&r.push(s.name)}),this._availableNames=n;var i=this.get("data")||r,a=we(),o=Be(i,function(s){return(le(s)||Ye(s))&&(s={name:s}),a.get(s.name)?null:(a.set(s.name,!0),new et(s,this,this.ecModel))},this);this._data=rt(o,function(s){return!!s})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var r=this.option.selected,n=this.get("selectedMode");if(n==="single"){var i=this._data;b(i,function(a){r[a.get("name")]=!1})}r[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var r=this.option.selected;r.hasOwnProperty(t)||(r[t]=!0),this[r[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,r=this.option.selected;b(t,function(n){r[n.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,r=this.option.selected;b(t,function(n){var i=n.get("name",!0);r.hasOwnProperty(i)||(r[i]=!0),r[i]=!r[i]})},e.prototype.isSelected=function(t){var r=this.option.selected;return!(r.hasOwnProperty(t)&&!r[t])&&Te(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:oe.size.m,align:"auto",backgroundColor:oe.color.transparent,borderColor:oe.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:oe.color.disabled,inactiveBorderColor:oe.color.disabled,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:oe.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:oe.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:oe.color.tertiary,borderWidth:1,borderColor:oe.color.border},emphasis:{selectorLabel:{show:!0,color:oe.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(Re),Aa=nt,Cd=b,Fu=lt,x_=(function(A){J(e,A);function e(){var t=A!==null&&A.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Fu),this.group.add(this._selectorGroup=new Fu),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,r,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var a=t.get("align"),o=t.get("orient");(!a||a==="auto")&&(a=t.get("left")==="right"&&o==="vertical"?"right":"left");var s=t.get("selector",!0),l=t.get("selectorPosition",!0);s&&(!l||l==="auto")&&(l=o==="horizontal"?"end":"start"),this.renderInner(a,t,r,n,s,o,l);var u=Vh(t,n).refContainer,f=t.getBoxLayoutParams(),c=t.get("padding"),h=Ri(f,u,c),v=this.layoutInner(t,a,h,i,s,l),d=Ri(Ne({width:v.width,height:v.height},f),u,c);this.group.x=d.x-v.x,this.group.y=d.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=KH(v,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,r,n,i,a,o,s){var l=this.getContentGroup(),u=we(),f=r.get("selectedMode"),c=r.get("triggerEvent"),h=[];n.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),Cd(r.getData(),function(v,d){var g=this,p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
44
44
  `)){var B=new Fu;B.newline=!0,l.add(B);return}var m=n.getSeriesByName(p)[0];if(!u.get(p)){if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},C=y.getVisual("legendIcon"),Q=y.getVisual("style"),x=this._createItem(m,p,d,v,r,t,_,Q,C,f,i);x.on("click",Aa(F_,p,null,i,h)).on("mouseover",Aa(_d,m.name,null,i,h)).on("mouseout",Aa(Qd,m.name,null,i,h)),n.ssr&&x.eachChild(function(F){var S=Le(F);S.seriesIndex=m.seriesIndex,S.dataIndex=d,S.ssrType="legend"}),c&&x.eachChild(function(F){g.packEventData(F,r,m,d,p)}),u.set(p,!0)}else n.eachRawSeries(function(F){var S=this;if(!u.get(p)&&F.legendVisualProvider){var E=F.legendVisualProvider;if(!E.containName(p))return;var I=E.indexOfName(p),U=E.getItemVisual(I,"style"),T=E.getItemVisual(I,"legendIcon"),L=HA(U.fill);L&&L[3]===0&&(L[3]=.2,U=Y(Y({},U),{fill:Qa(L,"rgba")}));var P=this._createItem(F,p,d,v,r,t,{},U,T,f,i);P.on("click",Aa(F_,null,p,i,h)).on("mouseover",Aa(_d,null,p,i,h)).on("mouseout",Aa(Qd,null,p,i,h)),n.ssr&&P.eachChild(function(Z){var V=Le(Z);V.seriesIndex=F.seriesIndex,V.dataIndex=d,V.ssrType="legend"}),c&&P.eachChild(function(Z){S.packEventData(Z,r,F,d,p)}),u.set(p,!0)}},this);process.env.NODE_ENV!=="production"&&(u.get(p)||console.warn(p+" series not exists. Legend data should be same with series name or data name."))}},this),a&&this._createSelector(a,r,i,o,s)},e.prototype.packEventData=function(t,r,n,i,a){var o={componentType:"legend",componentIndex:r.componentIndex,dataIndex:i,value:a,seriesIndex:n.seriesIndex};Le(t).eventData=o},e.prototype._createSelector=function(t,r,n,i,a){var o=this.getSelectorGroup();Cd(t,function(l){var u=l.type,f=new Ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:u==="all"?"legendAllSelect":"legendInverseSelect",legendId:r.id})}});o.add(f);var c=r.getModel("selectorLabel"),h=r.getModel(["emphasis","selectorLabel"]);pl(f,{normal:c,emphasis:h},{defaultText:l.title}),$s(f)})},e.prototype._createItem=function(t,r,n,i,a,o,s,l,u,f,c){var h=t.visualDrawType,v=a.get("itemWidth"),d=a.get("itemHeight"),g=a.isSelected(r),p=i.get("symbolRotate"),B=i.get("symbolKeepAspect"),m=i.get("icon");u=m||u||"roundRect";var y=u2(u,i,s,l,h,g,c),_=new Fu,C=i.getModel("textStyle");if(me(t.getLegendIcon)&&(!m||m==="inherit"))_.add(t.getLegendIcon({itemWidth:v,itemHeight:d,icon:u,iconRotate:p,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:B}));else{var Q=m==="inherit"&&t.getData().getVisual("symbol")?p==="inherit"?t.getData().getVisual("symbolRotate"):p:0;_.add(f2({itemWidth:v,itemHeight:d,icon:u,iconRotate:Q,itemStyle:y.itemStyle,symbolKeepAspect:B}))}var x=o==="left"?v+5:-5,F=o,S=a.get("formatter"),E=r;le(S)&&S?E=S.replace("{name}",r??""):me(S)&&(E=S(r));var I=g?C.getTextColor():i.get("inactiveColor");_.add(new Ot({style:In(C,{text:E,x,y:d/2,fill:I,align:F,verticalAlign:"middle"},{inheritColor:I})}));var U=new qe({shape:_.getBoundingRect(),style:{fill:"transparent"}}),T=i.getModel("tooltip");return T.get("show")&&cl({el:U,componentModel:a,itemName:r,itemTooltipOption:T.option}),_.add(U),_.eachChild(function(L){L.silent=!0}),U.silent=!f,this.getContentGroup().add(_),$s(_),_.__legendDataIndex=n,_},e.prototype.layoutInner=function(t,r,n,i,a,o){var s=this.getContentGroup(),l=this.getSelectorGroup();Xa(t.get("orient"),s,t.get("itemGap"),n.width,n.height);var u=s.getBoundingRect(),f=[-u.x,-u.y];if(l.markRedraw(),s.markRedraw(),a){Xa("horizontal",l,t.get("selectorItemGap",!0));var c=l.getBoundingRect(),h=[-c.x,-c.y],v=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",p=d===0?"height":"width",B=d===0?"y":"x";o==="end"?h[d]+=u[g]+v:f[d]+=c[g]+v,h[1-d]+=u[p]/2-c[p]/2,l.x=h[0],l.y=h[1],s.x=f[0],s.y=f[1];var m={x:0,y:0};return m[g]=u[g]+v+c[g],m[p]=Math.max(u[p],c[p]),m[B]=Math.min(0,c[B]+h[1-d]),m}else return s.x=f[0],s.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(xA);function u2(A,e,t,r,n,i,a){function o(g,p){g.lineWidth==="auto"&&(g.lineWidth=p.lineWidth>0?2:0),Cd(g,function(B,m){g[m]==="inherit"&&(g[m]=p[m])})}var s=e.getModel("itemStyle"),l=s.getItemStyle(),u=A.lastIndexOf("empty",0)===0?"fill":"stroke",f=s.getShallow("decal");l.decal=!f||f==="inherit"?r.decal:fv(f,a),l.fill==="inherit"&&(l.fill=r[n]),l.stroke==="inherit"&&(l.stroke=r[u]),l.opacity==="inherit"&&(l.opacity=(n==="fill"?r:t).opacity),o(l,r);var c=e.getModel("lineStyle"),h=c.getLineStyle();if(o(h,t),l.fill==="auto"&&(l.fill=r.fill),l.stroke==="auto"&&(l.stroke=r.fill),h.stroke==="auto"&&(h.stroke=r.fill),!i){var v=e.get("inactiveBorderWidth"),d=l[u];l.lineWidth=v==="auto"?r.lineWidth>0&&d?2:0:l.lineWidth,l.fill=e.get("inactiveColor"),l.stroke=e.get("inactiveBorderColor"),h.stroke=c.get("inactiveColor"),h.lineWidth=c.get("inactiveWidth")}return{itemStyle:l,lineStyle:h}}function f2(A){var e=A.icon||"roundRect",t=Or(e,0,0,A.itemWidth,A.itemHeight,A.itemStyle.fill,A.symbolKeepAspect);return t.setStyle(A.itemStyle),t.rotation=(A.iconRotate||0)*Math.PI/180,t.setOrigin([A.itemWidth/2,A.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=oe.color.neutral00,t.style.lineWidth=2),t}function F_(A,e,t,r){Qd(A,e,t,r),t.dispatchAction({type:"legendToggleSelect",name:A??e}),_d(A,e,t,r)}function E_(A){for(var e=A.getZr().storage.getDisplayList(),t,r=0,n=e.length;r<n&&!(t=e[r].states.emphasis);)r++;return t&&t.hoverLayer}function _d(A,e,t,r){E_(t)||t.dispatchAction({type:"highlight",seriesName:A,name:e,excludeSeriesId:r})}function Qd(A,e,t,r){E_(t)||t.dispatchAction({type:"downplay",seriesName:A,name:e,excludeSeriesId:r})}function c2(A){var e=A.findComponents({mainType:"legend"});e&&e.length&&A.filterSeries(function(t){for(var r=0;r<e.length;r++)if(!e[r].isSelected(t.name))return!1;return!0})}function So(A,e,t){var r=A==="allSelect"||A==="inverseSelect",n={},i=[];t.eachComponent({mainType:"legend",query:e},function(o){r?o[A]():o[A](e.name),b_(o,n),i.push(o.componentIndex)});var a={};return t.eachComponent("legend",function(o){b(n,function(s,l){o[s?"select":"unSelect"](l)}),b_(o,a)}),r?{selected:a,legendIndex:i}:{name:e.name,selected:a}}function b_(A,e){var t=e||{};return b(A.getData(),function(r){var n=r.get("name");if(!(n===`
@@ -63,7 +63,7 @@ echarts.use([`+I+"]);":"Unknown series "+E))}return}if(f==="tooltip"){if(m){proc
63
63
  content: "" !important;
64
64
  display: none !important;
65
65
  }`,D4=function(A){L4(A,"."+_p+I4+U1+`
66
- .`+Qp+T4+U1)},L4=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},I1=(function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A})(),M4=(function(){function A(e,t){this.context=e,this._options=t,this._cache={}}return A.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Fp(e)||N4(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},A.prototype.match=function(e){return this._cache[e]},A.prototype.loadImage=function(e){return Nt(this,void 0,void 0,function(){var t,r,n,i,a=this;return Ut(this,function(o){switch(o.label){case 0:return t=I1.isSameOrigin(e),r=!xp(e)&&this._options.useCORS===!0&&_t.SUPPORT_CORS_IMAGES&&!t,n=!xp(e)&&!t&&!Fp(e)&&typeof this._options.proxy=="string"&&_t.SUPPORT_CORS_XHR&&!r,!t&&this._options.allowTaint===!1&&!xp(e)&&!Fp(e)&&!n&&!r?[2]:(i=e,n?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(P4(i)||r)&&(u.crossOrigin="anonymous"),u.src=i,u.complete===!0&&setTimeout(function(){return s(u)},500),a._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+a._options.imageTimeout+"ms) loading image")},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},A.prototype.has=function(e){return typeof this._cache[e]<"u"},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(e){var t=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(i,a){var o=_t.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")i(s.response);else{var f=new FileReader;f.addEventListener("load",function(){return i(f.result)},!1),f.addEventListener("error",function(c){return a(c)},!1),f.readAsDataURL(s.response)}else a("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=a;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var u=t._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return a("Timed out ("+u+"ms) proxying "+n)}}s.send()})},A})(),H4=/^data:image\/svg\+xml/i,O4=/^data:image\/.*;base64,/i,R4=/^data:image\/.*/i,N4=function(A){return _t.SUPPORT_SVG_DRAWING||!k4(A)},xp=function(A){return R4.test(A)},P4=function(A){return O4.test(A)},Fp=function(A){return A.substr(0,4)==="blob"},k4=function(A){return A.substr(-3).toLowerCase()==="svg"||H4.test(A)},j=(function(){function A(e,t){this.type=0,this.x=e,this.y=t}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A})(),ha=function(A,e,t){return new j(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},pf=(function(){function A(e,t,r,n){this.type=1,this.start=e,this.startControl=t,this.endControl=r,this.end=n}return A.prototype.subdivide=function(e,t){var r=ha(this.start,this.startControl,e),n=ha(this.startControl,this.endControl,e),i=ha(this.endControl,this.end,e),a=ha(r,n,e),o=ha(n,i,e),s=ha(a,o,e);return t?new A(this.start,r,a,s):new A(s,o,i,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A})(),pA=function(A){return A.type===1},V4=(function(){function A(e){var t=e.styles,r=e.bounds,n=zo(t.borderTopLeftRadius,r.width,r.height),i=n[0],a=n[1],o=zo(t.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=zo(t.borderBottomRightRadius,r.width,r.height),f=u[0],c=u[1],h=zo(t.borderBottomLeftRadius,r.width,r.height),v=h[0],d=h[1],g=[];g.push((i+s)/r.width),g.push((v+f)/r.width),g.push((a+d)/r.height),g.push((l+c)/r.height);var p=Math.max.apply(Math,g);p>1&&(i/=p,a/=p,s/=p,l/=p,f/=p,c/=p,v/=p,d/=p);var B=r.width-s,m=r.height-c,y=r.width-f,_=r.height-d,C=t.borderTopWidth,Q=t.borderRightWidth,x=t.borderBottomWidth,F=t.borderLeftWidth,S=Je(t.paddingTop,e.bounds.width),E=Je(t.paddingRight,e.bounds.width),I=Je(t.paddingBottom,e.bounds.width),U=Je(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?je(r.left+F/3,r.top+C/3,i-F/3,a-C/3,Ve.TOP_LEFT):new j(r.left+F/3,r.top+C/3),this.topRightBorderDoubleOuterBox=i>0||a>0?je(r.left+B,r.top+C/3,s-Q/3,l-C/3,Ve.TOP_RIGHT):new j(r.left+r.width-Q/3,r.top+C/3),this.bottomRightBorderDoubleOuterBox=f>0||c>0?je(r.left+y,r.top+m,f-Q/3,c-x/3,Ve.BOTTOM_RIGHT):new j(r.left+r.width-Q/3,r.top+r.height-x/3),this.bottomLeftBorderDoubleOuterBox=v>0||d>0?je(r.left+F/3,r.top+_,v-F/3,d-x/3,Ve.BOTTOM_LEFT):new j(r.left+F/3,r.top+r.height-x/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?je(r.left+F*2/3,r.top+C*2/3,i-F*2/3,a-C*2/3,Ve.TOP_LEFT):new j(r.left+F*2/3,r.top+C*2/3),this.topRightBorderDoubleInnerBox=i>0||a>0?je(r.left+B,r.top+C*2/3,s-Q*2/3,l-C*2/3,Ve.TOP_RIGHT):new j(r.left+r.width-Q*2/3,r.top+C*2/3),this.bottomRightBorderDoubleInnerBox=f>0||c>0?je(r.left+y,r.top+m,f-Q*2/3,c-x*2/3,Ve.BOTTOM_RIGHT):new j(r.left+r.width-Q*2/3,r.top+r.height-x*2/3),this.bottomLeftBorderDoubleInnerBox=v>0||d>0?je(r.left+F*2/3,r.top+_,v-F*2/3,d-x*2/3,Ve.BOTTOM_LEFT):new j(r.left+F*2/3,r.top+r.height-x*2/3),this.topLeftBorderStroke=i>0||a>0?je(r.left+F/2,r.top+C/2,i-F/2,a-C/2,Ve.TOP_LEFT):new j(r.left+F/2,r.top+C/2),this.topRightBorderStroke=i>0||a>0?je(r.left+B,r.top+C/2,s-Q/2,l-C/2,Ve.TOP_RIGHT):new j(r.left+r.width-Q/2,r.top+C/2),this.bottomRightBorderStroke=f>0||c>0?je(r.left+y,r.top+m,f-Q/2,c-x/2,Ve.BOTTOM_RIGHT):new j(r.left+r.width-Q/2,r.top+r.height-x/2),this.bottomLeftBorderStroke=v>0||d>0?je(r.left+F/2,r.top+_,v-F/2,d-x/2,Ve.BOTTOM_LEFT):new j(r.left+F/2,r.top+r.height-x/2),this.topLeftBorderBox=i>0||a>0?je(r.left,r.top,i,a,Ve.TOP_LEFT):new j(r.left,r.top),this.topRightBorderBox=s>0||l>0?je(r.left+B,r.top,s,l,Ve.TOP_RIGHT):new j(r.left+r.width,r.top),this.bottomRightBorderBox=f>0||c>0?je(r.left+y,r.top+m,f,c,Ve.BOTTOM_RIGHT):new j(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=v>0||d>0?je(r.left,r.top+_,v,d,Ve.BOTTOM_LEFT):new j(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||a>0?je(r.left+F,r.top+C,Math.max(0,i-F),Math.max(0,a-C),Ve.TOP_LEFT):new j(r.left+F,r.top+C),this.topRightPaddingBox=s>0||l>0?je(r.left+Math.min(B,r.width-Q),r.top+C,B>r.width+Q?0:Math.max(0,s-Q),Math.max(0,l-C),Ve.TOP_RIGHT):new j(r.left+r.width-Q,r.top+C),this.bottomRightPaddingBox=f>0||c>0?je(r.left+Math.min(y,r.width-F),r.top+Math.min(m,r.height-x),Math.max(0,f-Q),Math.max(0,c-x),Ve.BOTTOM_RIGHT):new j(r.left+r.width-Q,r.top+r.height-x),this.bottomLeftPaddingBox=v>0||d>0?je(r.left+F,r.top+Math.min(_,r.height-x),Math.max(0,v-F),Math.max(0,d-x),Ve.BOTTOM_LEFT):new j(r.left+F,r.top+r.height-x),this.topLeftContentBox=i>0||a>0?je(r.left+F+U,r.top+C+S,Math.max(0,i-(F+U)),Math.max(0,a-(C+S)),Ve.TOP_LEFT):new j(r.left+F+U,r.top+C+S),this.topRightContentBox=s>0||l>0?je(r.left+Math.min(B,r.width+F+U),r.top+C+S,B>r.width+F+U?0:s-F+U,l-(C+S),Ve.TOP_RIGHT):new j(r.left+r.width-(Q+E),r.top+C+S),this.bottomRightContentBox=f>0||c>0?je(r.left+Math.min(y,r.width-(F+U)),r.top+Math.min(m,r.height+C+S),Math.max(0,f-(Q+E)),c-(x+I),Ve.BOTTOM_RIGHT):new j(r.left+r.width-(Q+E),r.top+r.height-(x+I)),this.bottomLeftContentBox=v>0||d>0?je(r.left+F+U,r.top+_,Math.max(0,v-(F+U)),d-(x+I),Ve.BOTTOM_LEFT):new j(r.left+F+U,r.top+r.height-(x+I))}return A})(),Ve;(function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Ve||(Ve={}));var je=function(A,e,t,r,n){var i=4*((Math.sqrt(2)-1)/3),a=t*i,o=r*i,s=A+t,l=e+r;switch(n){case Ve.TOP_LEFT:return new pf(new j(A,l),new j(A,l-o),new j(s-a,e),new j(s,e));case Ve.TOP_RIGHT:return new pf(new j(A,e),new j(A+a,e),new j(s,l-o),new j(s,l));case Ve.BOTTOM_RIGHT:return new pf(new j(s,e),new j(s,e+o),new j(A+a,l),new j(A,l));case Ve.BOTTOM_LEFT:default:return new pf(new j(s,l),new j(s-a,l),new j(A,e+o),new j(A,e))}},gf=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},K4=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},Bf=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},G4=(function(){function A(e,t,r){this.offsetX=e,this.offsetY=t,this.matrix=r,this.type=0,this.target=6}return A})(),mf=(function(){function A(e,t){this.path=e,this.target=t,this.type=1}return A})(),z4=(function(){function A(e){this.opacity=e,this.type=2,this.target=6}return A})(),W4=function(A){return A.type===0},T1=function(A){return A.type===1},Y4=function(A){return A.type===2},D1=function(A,e){return A.length===e.length?A.some(function(t,r){return t===e[r]}):!1},X4=function(A,e,t,r,n){return A.map(function(i,a){switch(a){case 0:return i.add(e,t);case 1:return i.add(e+r,t);case 2:return i.add(e+r,t+n);case 3:return i.add(e,t+n)}return i})},L1=(function(){function A(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A})(),M1=(function(){function A(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new V4(this.container),this.container.styles.opacity<1&&this.effects.push(new z4(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new G4(r,n,i))}if(this.container.styles.overflowX!==0){var a=gf(this.curves),o=Bf(this.curves);D1(a,o)?this.effects.push(new mf(a,6)):(this.effects.push(new mf(a,2)),this.effects.push(new mf(o,4)))}}return A.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var i=r.effects.filter(function(s){return!T1(s)});if(t||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,i),t=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var a=gf(r.curves),o=Bf(r.curves);D1(a,o)||n.unshift(new mf(o,6))}}else n.unshift.apply(n,i);r=r.parent}return n.filter(function(s){return vt(s.target,e)})},A})(),Ep=function(A,e,t,r){A.container.elements.forEach(function(n){var i=vt(n.flags,4),a=vt(n.flags,2),o=new M1(n,A);vt(n.styles.display,2048)&&r.push(o);var s=vt(n.flags,8)?[]:r;if(i||a){var l=i||n.styles.isPositioned()?t:e,u=new L1(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var f=n.styles.zIndex.order;if(f<0){var c=0;l.negativeZIndex.some(function(v,d){return f>v.element.container.styles.zIndex.order?(c=d,!1):c>0}),l.negativeZIndex.splice(c,0,u)}else if(f>0){var h=0;l.positiveZIndex.some(function(v,d){return f>=v.element.container.styles.zIndex.order?(h=d+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Ep(o,u,i?u:t,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),Ep(o,e,t,s);vt(n.flags,8)&&H1(n,s)})},H1=function(A,e){for(var t=A instanceof pp?A.start:1,r=A instanceof pp?A.reversed:!1,n=0;n<e.length;n++){var i=e[n];i.container instanceof o1&&typeof i.container.value=="number"&&i.container.value!==0&&(t=i.container.value),i.listValue=qo(t,i.container.styles.listStyleType,!0),t+=r?-1:1}},Z4=function(A){var e=new M1(A,null),t=new L1(e),r=[];return Ep(e,t,t,r),H1(e.container,r),t},O1=function(A,e){switch(e){case 0:return gA(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return gA(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return gA(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);case 3:default:return gA(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},J4=function(A,e){switch(e){case 0:return gA(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return gA(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return gA(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);case 3:default:return gA(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}},q4=function(A,e){switch(e){case 0:return gA(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return gA(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return gA(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);case 3:default:return gA(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}},$4=function(A,e){switch(e){case 0:return yf(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return yf(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return yf(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);case 3:default:return yf(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}},yf=function(A,e){var t=[];return pA(A)?t.push(A.subdivide(.5,!1)):t.push(A),pA(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},gA=function(A,e,t,r){var n=[];return pA(A)?n.push(A.subdivide(.5,!1)):n.push(A),pA(t)?n.push(t.subdivide(.5,!0)):n.push(t),pA(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),pA(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},R1=function(A){var e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},wf=function(A){var e=A.styles,t=A.bounds,r=Je(e.paddingLeft,t.width),n=Je(e.paddingRight,t.width),i=Je(e.paddingTop,t.width),a=Je(e.paddingBottom,t.width);return t.add(r+e.borderLeftWidth,i+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+i+a))},j4=function(A,e){return A===0?e.bounds:A===2?wf(e):R1(e)},ek=function(A,e){return A===0?e.bounds:A===2?wf(e):R1(e)},bp=function(A,e,t){var r=j4(da(A.styles.backgroundOrigin,e),A),n=ek(da(A.styles.backgroundClip,e),A),i=tk(da(A.styles.backgroundSize,e),t,r),a=i[0],o=i[1],s=zo(da(A.styles.backgroundPosition,e),r.width-a,r.height-o),l=Ak(da(A.styles.backgroundRepeat,e),s,i,r,n),u=Math.round(r.left+s[0]),f=Math.round(r.top+s[1]);return[l,u,f,a,o]},va=function(A){return We(A)&&A.value===la.AUTO},Cf=function(A){return typeof A=="number"},tk=function(A,e,t){var r=e[0],n=e[1],i=e[2],a=A[0],o=A[1];if(!a)return[0,0];if(ft(a)&&o&&ft(o))return[Je(a,t.width),Je(o,t.height)];var s=Cf(i);if(We(a)&&(a.value===la.CONTAIN||a.value===la.COVER)){if(Cf(i)){var l=t.width/t.height;return l<i!=(a.value===la.COVER)?[t.width,t.width/i]:[t.height*i,t.height]}return[t.width,t.height]}var u=Cf(r),f=Cf(n),c=u||f;if(va(a)&&(!o||va(o))){if(u&&f)return[r,n];if(!s&&!c)return[t.width,t.height];if(c&&s){var h=u?r:n*i,v=f?n:r/i;return[h,v]}var d=u?r:t.width,g=f?n:t.height;return[d,g]}if(s){var p=0,B=0;return ft(a)?p=Je(a,t.width):ft(o)&&(B=Je(o,t.height)),va(a)?p=B*i:(!o||va(o))&&(B=p/i),[p,B]}var m=null,y=null;if(ft(a)?m=Je(a,t.width):o&&ft(o)&&(y=Je(o,t.height)),m!==null&&(!o||va(o))&&(y=u&&f?m/r*n:t.height),y!==null&&va(a)&&(m=u&&f?y/n*r:t.width),m!==null&&y!==null)return[m,y];throw new Error("Unable to calculate background-size for element")},da=function(A,e){var t=A[e];return typeof t>"u"?A[0]:t},Ak=function(A,e,t,r,n){var i=e[0],a=e[1],o=t[0],s=t[1];switch(A){case 2:return[new j(Math.round(r.left),Math.round(r.top+a)),new j(Math.round(r.left+r.width),Math.round(r.top+a)),new j(Math.round(r.left+r.width),Math.round(s+r.top+a)),new j(Math.round(r.left),Math.round(s+r.top+a))];case 3:return[new j(Math.round(r.left+i),Math.round(r.top)),new j(Math.round(r.left+i+o),Math.round(r.top)),new j(Math.round(r.left+i+o),Math.round(r.height+r.top)),new j(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new j(Math.round(r.left+i),Math.round(r.top+a)),new j(Math.round(r.left+i+o),Math.round(r.top+a)),new j(Math.round(r.left+i+o),Math.round(r.top+a+s)),new j(Math.round(r.left+i),Math.round(r.top+a+s))];default:return[new j(Math.round(n.left),Math.round(n.top)),new j(Math.round(n.left+n.width),Math.round(n.top)),new j(Math.round(n.left+n.width),Math.round(n.height+n.top)),new j(Math.round(n.left),Math.round(n.height+n.top))]}},rk="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",N1="Hidden Text",nk=(function(){function A(e){this._data={},this._document=e}return A.prototype.parseMetrics=function(e,t){var r=this._document.createElement("div"),n=this._document.createElement("img"),i=this._document.createElement("span"),a=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",a.appendChild(r),n.src=rk,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(N1)),r.appendChild(i),r.appendChild(n);var o=n.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(N1)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return a.removeChild(r),{baseline:o,middle:s}},A.prototype.getMetrics=function(e,t){var r=e+" "+t;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,t)),this._data[r]},A})(),P1=(function(){function A(e,t){this.context=e,this.options=t}return A})(),ik=1e4,ak=(function(A){UA(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new nk(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(t){for(var r=this;this._activeEffects.length;)this.popEffect();t.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(t){this.ctx.save(),Y4(t)&&(this.ctx.globalAlpha=t.opacity),W4(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),T1(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return Nt(this,void 0,void 0,function(){var r;return Ut(this,function(n){switch(n.label){case 0:return r=t.element.container.styles,r.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return Nt(this,void 0,void 0,function(){return Ut(this,function(r){switch(r.label){case 0:if(vt(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(t)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,r,n){var i=this;if(r===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+n);else{var a=dp(t.text);a.reduce(function(o,s){return i.ctx.fillText(s,o,t.bounds.top+n),o+i.ctx.measureText(s).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var r=t.fontVariant.filter(function(a){return a==="normal"||a==="small-caps"}).join(""),n=fk(t.fontFamily).join(", "),i=Go(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,r,t.fontWeight,i,n].join(" "),n,i]},e.prototype.renderTextNode=function(t,r){return Nt(this,void 0,void 0,function(){var n,i,a,o,s,l,u,f,c=this;return Ut(this,function(h){return n=this.createFontStyle(r),i=n[0],a=n[1],o=n[2],this.ctx.font=i,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(a,o),l=s.baseline,u=s.middle,f=r.paintOrder,t.textBounds.forEach(function(v){f.forEach(function(d){switch(d){case 0:c.ctx.fillStyle=yt(r.color),c.renderTextWithLetterSpacing(v,r.letterSpacing,l);var g=r.textShadow;g.length&&v.text.trim().length&&(g.slice(0).reverse().forEach(function(p){c.ctx.shadowColor=yt(p.color),c.ctx.shadowOffsetX=p.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=p.offsetY.number*c.options.scale,c.ctx.shadowBlur=p.blur.number,c.renderTextWithLetterSpacing(v,r.letterSpacing,l)}),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),r.textDecorationLine.length&&(c.ctx.fillStyle=yt(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(p){switch(p){case 1:c.ctx.fillRect(v.bounds.left,Math.round(v.bounds.top+l),v.bounds.width,1);break;case 2:c.ctx.fillRect(v.bounds.left,Math.round(v.bounds.top),v.bounds.width,1);break;case 3:c.ctx.fillRect(v.bounds.left,Math.ceil(v.bounds.top+u),v.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&v.text.trim().length&&(c.ctx.strokeStyle=yt(r.webkitTextStrokeColor),c.ctx.lineWidth=r.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(v.text,v.bounds.left,v.bounds.top+l)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,r,n){if(n&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var i=wf(t),a=Bf(r);this.path(a),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,t.intrinsicWidth,t.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return Nt(this,void 0,void 0,function(){var r,n,i,a,o,s,B,B,l,u,f,c,y,h,v,_,d,g,p,B,m,y,_;return Ut(this,function(C){switch(C.label){case 0:this.applyEffects(t.getEffects(4)),r=t.container,n=t.curves,i=r.styles,a=0,o=r.textNodes,C.label=1;case 1:return a<o.length?(s=o[a],[4,this.renderTextNode(s,i)]):[3,4];case 2:C.sent(),C.label=3;case 3:return a++,[3,1];case 4:if(!(r instanceof n1))return[3,8];C.label=5;case 5:return C.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return B=C.sent(),this.renderReplacedElement(r,n,B),[3,8];case 7:return C.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof i1&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof a1))return[3,12];C.label=9;case 9:return C.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return B=C.sent(),this.renderReplacedElement(r,n,B),[3,12];case 11:return C.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof f1&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=C.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),C.label=14;case 14:if(r instanceof gp&&(f=Math.min(r.bounds.width,r.bounds.height),r.type===uf?r.checked&&(this.ctx.save(),this.path([new j(r.bounds.left+f*.39363,r.bounds.top+f*.79),new j(r.bounds.left+f*.16,r.bounds.top+f*.5549),new j(r.bounds.left+f*.27347,r.bounds.top+f*.44071),new j(r.bounds.left+f*.39694,r.bounds.top+f*.5649),new j(r.bounds.left+f*.72983,r.bounds.top+f*.23),new j(r.bounds.left+f*.84,r.bounds.top+f*.34085),new j(r.bounds.left+f*.39363,r.bounds.top+f*.79)]),this.ctx.fillStyle=yt(s1),this.ctx.fill(),this.ctx.restore()):r.type===ff&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+f/2,r.bounds.top+f/2,f/4,0,Math.PI*2,!0),this.ctx.fillStyle=yt(s1),this.ctx.fill(),this.ctx.restore())),ok(r)&&r.value.length){switch(c=this.createFontStyle(i),y=c[0],h=c[1],v=this.fontMetrics.getMetrics(y,h).baseline,this.ctx.font=y,this.ctx.fillStyle=yt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=lk(r.styles.textAlign),_=wf(r),d=0,r.styles.textAlign){case 1:d+=_.width/2;break;case 2:d+=_.width;break}g=_.add(d,0,0,-_.height/2+1),this.ctx.save(),this.path([new j(_.left,_.top),new j(_.left+_.width,_.top),new j(_.left+_.width,_.top+_.height),new j(_.left,_.top+_.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Zo(r.value,g),i.letterSpacing,v),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!vt(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(p=r.styles.listStyleImage,p.type!==0)return[3,18];B=void 0,m=p.url,C.label=15;case 15:return C.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return B=C.sent(),this.ctx.drawImage(B,r.bounds.left-(B.width+10),r.bounds.top),[3,18];case 17:return C.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:t.listValue&&r.styles.listStyleType!==-1&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=yt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",_=new gr(r.bounds.left,r.bounds.top+Je(r.styles.paddingTop,r.bounds.width),r.bounds.width,NQ(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Zo(t.listValue,_),i.letterSpacing,NQ(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),C.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return Nt(this,void 0,void 0,function(){var r,n,p,i,a,p,o,s,p,l,u,p,f,c,p,h,v,p,d,g,p;return Ut(this,function(B){switch(B.label){case 0:if(vt(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:B.sent(),r=0,n=t.negativeZIndex,B.label=2;case 2:return r<n.length?(p=n[r],[4,this.renderStack(p)]):[3,5];case 3:B.sent(),B.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:B.sent(),i=0,a=t.nonInlineLevel,B.label=7;case 7:return i<a.length?(p=a[i],[4,this.renderNode(p)]):[3,10];case 8:B.sent(),B.label=9;case 9:return i++,[3,7];case 10:o=0,s=t.nonPositionedFloats,B.label=11;case 11:return o<s.length?(p=s[o],[4,this.renderStack(p)]):[3,14];case 12:B.sent(),B.label=13;case 13:return o++,[3,11];case 14:l=0,u=t.nonPositionedInlineLevel,B.label=15;case 15:return l<u.length?(p=u[l],[4,this.renderStack(p)]):[3,18];case 16:B.sent(),B.label=17;case 17:return l++,[3,15];case 18:f=0,c=t.inlineLevel,B.label=19;case 19:return f<c.length?(p=c[f],[4,this.renderNode(p)]):[3,22];case 20:B.sent(),B.label=21;case 21:return f++,[3,19];case 22:h=0,v=t.zeroOrAutoZIndexOrTransformedOrOpacity,B.label=23;case 23:return h<v.length?(p=v[h],[4,this.renderStack(p)]):[3,26];case 24:B.sent(),B.label=25;case 25:return h++,[3,23];case 26:d=0,g=t.positiveZIndex,B.label=27;case 27:return d<g.length?(p=g[d],[4,this.renderStack(p)]):[3,30];case 28:B.sent(),B.label=29;case 29:return d++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var r=this;t.forEach(function(n,i){var a=pA(n)?n.start:n;i===0?r.ctx.moveTo(a.x,a.y):r.ctx.lineTo(a.x,a.y),pA(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(t,r,n,i){this.path(t),this.ctx.fillStyle=r,this.ctx.translate(n,i),this.ctx.fill(),this.ctx.translate(-n,-i)},e.prototype.resizeImage=function(t,r,n){var i;if(t.width===r&&t.height===n)return t;var a=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,o=a.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(t,0,0,t.width,t.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(t){return Nt(this,void 0,void 0,function(){var r,n,i,a,o,s;return Ut(this,function(l){switch(l.label){case 0:r=t.styles.backgroundImage.length-1,n=function(u){var f,c,h,S,P,Z,U,T,x,v,S,P,Z,U,T,d,g,p,B,m,y,_,C,Q,x,F,S,E,I,U,T,L,P,Z,V,X,ee,te,D,M,H,K;return Ut(this,function(N){switch(N.label){case 0:if(u.type!==0)return[3,5];f=void 0,c=u.url,N.label=1;case 1:return N.trys.push([1,3,,4]),[4,i.context.cache.match(c)];case 2:return f=N.sent(),[3,4];case 3:return N.sent(),i.context.logger.error("Error loading background-image "+c),[3,4];case 4:return f&&(h=bp(t,r,[f.width,f.height,f.width/f.height]),S=h[0],P=h[1],Z=h[2],U=h[3],T=h[4],x=i.ctx.createPattern(i.resizeImage(f,U,T),"repeat"),i.renderRepeat(S,x,P,Z)),[3,6];case 5:WR(u)?(v=bp(t,r,[null,null,null]),S=v[0],P=v[1],Z=v[2],U=v[3],T=v[4],d=kR(u.angle,U,T),g=d[0],p=d[1],B=d[2],m=d[3],y=d[4],_=document.createElement("canvas"),_.width=U,_.height=T,C=_.getContext("2d"),Q=C.createLinearGradient(p,m,B,y),bQ(u.stops,g).forEach(function(ue){return Q.addColorStop(ue.stop,yt(ue.color))}),C.fillStyle=Q,C.fillRect(0,0,U,T),U>0&&T>0&&(x=i.ctx.createPattern(_,"repeat"),i.renderRepeat(S,x,P,Z))):YR(u)&&(F=bp(t,r,[null,null,null]),S=F[0],E=F[1],I=F[2],U=F[3],T=F[4],L=u.position.length===0?[ep]:u.position,P=Je(L[0],U),Z=Je(L[L.length-1],T),V=VR(u,P,Z,U,T),X=V[0],ee=V[1],X>0&&ee>0&&(te=i.ctx.createRadialGradient(E+P,I+Z,0,E+P,I+Z,X),bQ(u.stops,X*2).forEach(function(ue){return te.addColorStop(ue.stop,yt(ue.color))}),i.path(S),i.ctx.fillStyle=te,X!==ee?(D=t.bounds.left+.5*t.bounds.width,M=t.bounds.top+.5*t.bounds.height,H=ee/X,K=1/H,i.ctx.save(),i.ctx.translate(D,M),i.ctx.transform(1,0,0,H,0,0),i.ctx.translate(-D,-M),i.ctx.fillRect(E,K*(I-M)+M,U,T*K),i.ctx.restore()):i.ctx.fill())),N.label=6;case 6:return r--,[2]}})},i=this,a=0,o=t.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return a<o.length?(s=o[a],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return a++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,r,n){return Nt(this,void 0,void 0,function(){return Ut(this,function(i){return this.path(O1(n,r)),this.ctx.fillStyle=yt(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,r,n,i){return Nt(this,void 0,void 0,function(){var a,o;return Ut(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(t,n,i)]:[3,2];case 1:return s.sent(),[2];case 2:return a=J4(i,n),this.path(a),this.ctx.fillStyle=yt(t),this.ctx.fill(),o=q4(i,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return Nt(this,void 0,void 0,function(){var r,n,i,a,o,s,l,u,f=this;return Ut(this,function(c){switch(c.label){case 0:return this.applyEffects(t.getEffects(2)),r=t.container.styles,n=!en(r.backgroundColor)||r.backgroundImage.length,i=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],a=sk(da(r.backgroundClip,0),t.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),en(r.backgroundColor)||(this.ctx.fillStyle=yt(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){f.ctx.save();var v=gf(t.curves),d=h.inset?0:ik,g=X4(v,-d+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(f.path(v),f.ctx.clip(),f.mask(g)):(f.mask(v),f.ctx.clip(),f.path(g)),f.ctx.shadowOffsetX=h.offsetX.number+d,f.ctx.shadowOffsetY=h.offsetY.number,f.ctx.shadowColor=yt(h.color),f.ctx.shadowBlur=h.blur.number,f.ctx.fillStyle=h.inset?yt(h.color):"rgba(0,0,0,1)",f.ctx.fill(),f.ctx.restore()}),c.label=2;case 2:o=0,s=0,l=i,c.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!en(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,t.curves,2)]:[3,11]):[3,13];case 4:return c.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,t.curves,3)];case 6:return c.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,t.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,t.curves)];case 10:c.sent(),c.label=11;case 11:o++,c.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,r,n,i,a){return Nt(this,void 0,void 0,function(){var o,s,l,u,f,c,h,v,d,g,p,B,m,y,_,C,_,C;return Ut(this,function(Q){return this.ctx.save(),o=$4(i,n),s=O1(i,n),a===2&&(this.path(s),this.ctx.clip()),pA(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),pA(s[1])?(f=s[1].end.x,c=s[1].end.y):(f=s[1].x,c=s[1].y),n===0||n===2?h=Math.abs(l-f):h=Math.abs(u-c),this.ctx.beginPath(),a===3?this.formatPath(o):this.formatPath(s.slice(0,2)),v=r<3?r*3:r*2,d=r<3?r*2:r,a===3&&(v=r,d=r),g=!0,h<=v*2?g=!1:h<=v*2+d?(p=h/(2*v+d),v*=p,d*=p):(B=Math.floor((h+d)/(v+d)),m=(h-B*v)/(B-1),y=(h-(B+1)*v)/B,d=y<=0||Math.abs(d-m)<Math.abs(d-y)?m:y),g&&(a===3?this.ctx.setLineDash([0,v+d]):this.ctx.setLineDash([v,d])),a===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=yt(t),this.ctx.stroke(),this.ctx.setLineDash([]),a===2&&(pA(s[0])&&(_=s[3],C=s[0],this.ctx.beginPath(),this.formatPath([new j(_.end.x,_.end.y),new j(C.start.x,C.start.y)]),this.ctx.stroke()),pA(s[1])&&(_=s[1],C=s[2],this.ctx.beginPath(),this.formatPath([new j(_.end.x,_.end.y),new j(C.start.x,C.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return Nt(this,void 0,void 0,function(){var r;return Ut(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=yt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=Z4(t),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e})(P1),ok=function(A){return A instanceof u1||A instanceof l1?!0:A instanceof gp&&A.type!==ff&&A.type!==uf},sk=function(A,e){switch(A){case 0:return gf(e);case 2:return K4(e);case 1:default:return Bf(e)}},lk=function(A){switch(A){case 1:return"center";case 2:return"right";case 0:default:return"left"}},uk=["-apple-system","system-ui"],fk=function(A){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?A.filter(function(e){return uk.indexOf(e)===-1}):A},ck=(function(A){UA(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(t){return Nt(this,void 0,void 0,function(){var r,n;return Ut(this,function(i){switch(i.label){case 0:return r=vp(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,hk(r)];case 1:return n=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=yt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e})(P1),hk=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(A))})},vk=(function(){function A(e){var t=e.id,r=e.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return A.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Su([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.getTime=function(){return Date.now()-this.start},A.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Su([this.id,this.getTime()+"ms"],e))},A.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Su([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Su([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.instances={},A})(),dk=(function(){function A(e,t){var r;this.windowBounds=t,this.instanceName="#"+A.instanceCount++,this.logger=new vk({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new M4(this,e)}return A.instanceCount=1,A})(),k1=function(A,e){return e===void 0&&(e={}),pk(A,e)};typeof window<"u"&&I1.setContext(window);var pk=function(A,e){return Nt(void 0,void 0,void 0,function(){var t,r,n,i,a,o,s,l,u,f,c,h,v,d,g,p,B,m,y,_,Q,C,Q,x,F,S,E,I,U,T,L,P,Z,V,X,ee,te,D,M,H;return Ut(this,function(K){switch(K.label){case 0:if(!A||typeof A!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=A.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(r=t.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(x=e.allowTaint)!==null&&x!==void 0?x:!1,imageTimeout:(F=e.imageTimeout)!==null&&F!==void 0?F:15e3,proxy:e.proxy,useCORS:(S=e.useCORS)!==null&&S!==void 0?S:!1},i=Dd({logging:(E=e.logging)!==null&&E!==void 0?E:!0,cache:e.cache},n),a={windowWidth:(I=e.windowWidth)!==null&&I!==void 0?I:r.innerWidth,windowHeight:(U=e.windowHeight)!==null&&U!==void 0?U:r.innerHeight,scrollX:(T=e.scrollX)!==null&&T!==void 0?T:r.pageXOffset,scrollY:(L=e.scrollY)!==null&&L!==void 0?L:r.pageYOffset},o=new gr(a.scrollX,a.scrollY,a.windowWidth,a.windowHeight),s=new dk(i,o),l=(P=e.foreignObjectRendering)!==null&&P!==void 0?P:!1,u={allowTaint:(Z=e.allowTaint)!==null&&Z!==void 0?Z:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),f=new S1(s,A,u),c=f.clonedReferenceElement,c?[4,f.toIFrame(t,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=K.sent(),v=mp(c)||B4(c)?X2(c.ownerDocument):Uu(s,c),d=v.width,g=v.height,p=v.left,B=v.top,m=gk(s,c,e.backgroundColor),y={canvas:e.canvas,backgroundColor:m,scale:(X=(V=e.scale)!==null&&V!==void 0?V:r.devicePixelRatio)!==null&&X!==void 0?X:1,x:((ee=e.x)!==null&&ee!==void 0?ee:0)+p,y:((te=e.y)!==null&&te!==void 0?te:0)+B,width:(D=e.width)!==null&&D!==void 0?D:Math.ceil(d),height:(M=e.height)!==null&&M!==void 0?M:Math.ceil(g)},l?(s.logger.debug("Document cloned, using foreign object rendering"),Q=new ck(s,y),[4,Q.render(c)]):[3,3];case 2:return _=K.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+p+","+B+" with size "+d+"x"+g+" using computed rendering"),s.logger.debug("Starting DOM parsing"),C=h1(s,c),m===C.styles.backgroundColor&&(C.styles.backgroundColor=mr.TRANSPARENT),s.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),Q=new ak(s,y),[4,Q.render(C)];case 4:_=K.sent(),K.label=5;case 5:return(!((H=e.removeContainer)!==null&&H!==void 0)||H)&&(S1.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,_]}})})},gk=function(A,e,t){var r=e.ownerDocument,n=r.documentElement?Wo(A,getComputedStyle(r.documentElement).backgroundColor):mr.TRANSPARENT,i=r.body?Wo(A,getComputedStyle(r.body).backgroundColor):mr.TRANSPARENT,a=typeof t=="string"?Wo(A,t):t===null?mr.TRANSPARENT:4294967295;return e===r.documentElement?en(n)?en(i)?a:i:n:a};/*! Element Plus Icons Vue v2.3.2 */var Bk=R.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(A){return(e,t)=>(R.openBlock(),R.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[R.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),V1=Bk;const mk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAk1BMVEUAAAAyMjIzMzMzMzMzMzMzMzMyMjIzMzMzMzMzMzM3NzcyMjIzMzMyMjIzMzMzMzMzMzMzMzMzMzMyMjIzMzMyMjIzMzMzMzMzMzMzMzMyMjIzMzMzMzMzMzMzMzMyMjIzMzMyMjIzMzM0NDQzMzMzMzMzMzMzMzMzMzMzMzM0NDQzMzMzMzMzMzMyMjI6OjozMzMnMcQ8AAAAMHRSTlMAgprMx7VSMqV6CWbkjtXRv5RiD/hEOe91cSng21w/Lq6piBwX6mtXTUkg9J68JAbdlNjNAAAFP0lEQVR42u3d13biMBAG4N/gDqabYnrokIR5/6fbmrMe7LCAJWFx9N3tDRtF1sxopBgYhmEYhmEYhmEYhmEYhmEYhmEYhmEY9wvn8X7X2Y6CYLTt7PbxPIRuju6w0qpTRr1VGbor6OHYeZ/QVY32rvSDiaMq3cSOYpTWcWjTHezhEWXk+j26U893UTLrYZMeUq2hRLxoQz/pPpT9kn7RfSifFSrOfv5aGW1ICN/DM8UfJErP6uJp3uiaU9OJglFt6saxO62Ngshpnq4m/CmeY/39Iu99DPtr5Fj3R8736eYNz9Cvflt9uCGuCA9vNuVzEig3HVCeSTTDDWbRhPKMXShmUR7fPeNGZ9enPBZUyl/mFQ938Sq5nwKFoivDKDwUB8o4lLH08BBvSRlNKDLOVks7PKyT/bgNlOhlMp8VooBVO5uHoECmuHI8FOQ2MlEc0jVkxMuVn8mqkMwmrrGHEKMecUtI5RDnryDIrKlyJG3iIohztIlrQ5qO3HLig7gOJJlvJJdFPjGbOeRwJDxXnJVXrGj5v7QVlMJ7YlqQwidmD/FsXl2FkOL8ITsvBryESCDJJ986BhBsPpA95fmP8GAORvCzO4REQ147QKgdpb1DqndK20GkKluBXUjVtVlYgUA1SoshWUxpU1kTUoF0rCfxIWlCBgmkS1iMPMiZkAAKBFJ2JjUVKZ0L2e+uL6M4qUGJmoQtVv+OYCgnvtS74vu8NShSE79XbLIJUaYqeu8Tq5+Q7JR4KC7iD6sy3brgreJEbVLPT+8NwTHrAIUOlDJDUSN2cKFUU2g9sXje+Z4lNG4NHikVxGfik8gPm0CxscBFErCYpZgv8LFusd2zYh2BDcF0VlpDsVU6F6OQ8FnBNxuAQxQxv7sJJG2RzFGES/+MoBjPJC7u5XWsWTen6xdDuU6R7uZbj4jGs2zhtoZycYHgX2E7gFb2XkWYJFDlyOLvg73wFX6qZj5oVCdqdKDI40clW/rSW/MiYYGf1gu15ePm4ei/TW1musCA9/e9qqp2Y/bCyOTxeLs4gy+2Q131hdDWw6n9OGA/O+uSddKDhBLLVM+5yAFx+h9vAalP8+3H73B1W5SvfcehhZTUjjt9Noi571JreWYE6A+Iue8iaGnWCItczI3VQkmi1m/bcjxXmTxSaI1lbXFdOTI7Kx2Z2/cFpai1eF8uq9fH/5Sj+mXHE1njFW5Qiv1Ipjv2wMFbOXaIX7q9h9NHSfbsXxJi7qivytZFiZ/+p1yi+lpTem43aM06jWJa2Kcd1JuK6/3OJn/DbgzleFq2RBTSm2iOZ2gIPURce0mIp0jYiZXGhiyFacxmp7r6mvFzdn1F7OaDvi7uoujr4naQvuwXiVlTfoNOXx/8mpi2XH7LVF8Ov/erLbZCFtBW2KSU57+PR8zVeBvaSga8Rastn/UE9Y29AaUNoSuX0lrQVcJ7tQfoyrk4HNNVhdLq5XyV421t65cIvdZl21xTFjG2rinEJ+aka9X7ay/1AvvCo01cBC31m0T0AruQzoA4R78XaOe+026iZcD6XNCl0r80O09tTJc+oR/v73To3nsPTvSb5p3eWpUyxvo9V3nDIHsNvSSjKuVY6JU/vKBF/2h6Vnjlfb9NbXbooXftDczvZV8e5+7qc97fWYsJXbEp+b52uqzTLd4TlNqSblIte8u9Qbc4BWeUm0W3qJS/Jqm8xjAA5zWG8d+lXrX0GAa7GJPReNNo27Gnb9iRNtXIH76m32OVNdX2m8UuzUe+47et7fSg4Xe9GYZhGIZhGIZhGIZhvJIfLCr2GzAyoncAAAAASUVORK5CYII=",yk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAaVBMVEUAAAAQFBgQExcQEhYLFRcQExcQExYPExcQEhcOFBUQEhcQExcPEhcPExcQEhcQExYQERcPExYPEhcQExYQEhcTExMUFBQQExcQExcQExcQFBcPEhcPExcPFBYSEhgcHBwRExcOExgQExdmmIFTAAAAInRSTlMAQL+AFuzVxbEj3KOWdF9OR7qnnmgZDPrkyY5WQzIqCXs2T8mN8gAAAeVJREFUeNrt3dlqwzAQRmFFdpx9X7omaf/3f8iSrSW0FqFy0Micc+2bDxsGI9A4IiIiIqJHNJuMFz5hxWzQiGOs9PU30Yzdk0y0jnSUstI+DtKTlXpRjkJ2KmIgK9mp344vS+rGQLo65V3KOjoXM01kCdIBAgQIECChgAABEg4IECDhgAABEg4IkLZBNrPipul7lpB1pV+95AcpF/qrIjfIVmoHxLcEstajIV6XHgsZqaZ5ZpCqxrF0eUFKnfO3rQqXGaT2CSBAgAABAgQIECBAgAABAgQIEFsQr38HBAgQIECAOF+bLvm6bEFaM9mBAAECBAgQIECAAAECBAgQIECAADlBruUO+Q4IECA/AQECJBwQIEDCAQECJBwQIEDCAQECJBwQIEDCAQECJBwQIEDCGYQ8XyCdpOncJgKykJ2Gd7wz0xuTri1jIFPZaRoDcUtZaeyiIK4rIx0iIe5VFqoGLhbi5r3ky8Wqj2aubd12JkXC5uX9IzPzgFgLiLWANN1h1w7IvlLvrQWQgY695Q/p69gwf8hQp/KHCAiQU0CAAAkHBAiQcAYhgyskbQ0s+36WnV7i/gTsNGKz/7GhrDRyUb3LSlt3V9bP1rqfLrZypPS9uiaaTVY+Yf3JvHRERERERA/oC7GKf5yH1bdrAAAAAElFTkSuQmCC",wk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAsVBMVEUAAAAEAAAEAAAEAAAFAAAEAAAEAAAEAAAEAAAEAAADAAAEAAAFAAAEAAAFAAAEAAAEAAAEAAAEAAAEAAAEAAADAAAGAAAAAAAAAAAEAAAEAAAEAAAAAAADAAAEAAAFAAAEAAAEAAAEAAADAAADAAAFAAAHAAAFAAAAAAAFAAAEAAAAAAAEAAAFAAADAAADAAAEAAAEAAADAAAEAAAFAAADAAAEAAAAAAADAAADAAAEAADKKhWhAAAAOnRSTlMAQIC/qMxgiXfrmPcyx2s677H74nJVKRQS0LmFCd22LtjUrJ2RNiUgGaNEDXxmW0nz5k6OZFK9Flfau44tfQAAB5tJREFUeNrs29lu2lAUheFlMGAwEAhDCXEgATOEMDQUMqz3f7CqalVtN8DGDLZP5e8J+C8W8jmykUqlUqlUKpVKpVKpVGJYS2c7humm8wf+Uu/AZK0e/3qHqfr+dwo2jORVc/xHHuaZPfOrOgwzyTS4Ux8m+ehynwyMUfZr3O8JZvCqdzxsCwOsbO5k1j/w732r3AkSbfnGIzlIrlGpxqPlkFAvzRxDWSGJVgMqvvtl2BRKSJzx/QMV3Q8AsCgUPSRLXt13Yz7FbxUKVSTIzVDd9/MMfzkU3pAUHX3fuaoHYXybwCfHtbrvmt9HUHDuPxC/cUHdd6+Fr1qB7SBuG3Xfn/Mpdvqk8IE43QyLPOz22cI+hYQcFN8ddd+VhYf9RpQ6iMd2cMvDXn/0cdhb7AfFtr7v+haqaswHxUWXiifnHdB1ahRuECmrpO3bHVo40jCug+JU33d2g+OtKLiISsvW9t0otBHKHYUFotAvfFIxWCOsecQHRU/fd875hvDGlCa4rpm671rpBqepU/BxRROnQkU3j5MtKRQREO2+PzNjnKMRwSVE+f5RfSRc40w+hS6E6PZdqXZwthElD0DE+y76I1xEYIJO1PuuL3Ep1WsdFFu2qz0Szse4nG8uhX5k+3aHM1zWM4UhLuBl06Miu3jBpa0oXWLfr+ojYRnX8Ehheea+m+q+B5mroVDJ7LUZedr523ZphAdL2bc5Rtits+nRLG3sYPmvNE0F/3rR9/3A5HE9BN08aU+29jrLBCojoKqdXJtTIJEhFqQZDymWLABGhJS4X2/jAaaE3HGPx/s+AHNCatzFfd4CMCqky6+yzQlgWkiB/2j4FoBDIXUH8WhnavtDLAY5L4ASYiE2vQO/o0LpA9BC7hCf/IEQh5Klh2QRH+vAbx27/0kIbAoFg0NaFIoGhwTfO1gbHFKgMDA4ZESpY25I8DGlaXBI8L0Dg0PeaxRG5oZgSKFkcMiKwu1pIZ384Kn2/TG77ECIOCR4TlyeEDLNvPKP18wUQrQhcwpv4UPaT8rFbFQhbUqTsCGWcjEbXQjqFDIhQyzlYjbKkDyFRsiQnPL9RJQhaFCYhQpZcIcFjla+aIhPwQ4VUjnzk5Z6+/QQba+dECEj5bJGM6d9coh6UVINEXLPne5xHMsly5cMaVLIhQgZcqchjuJlSfZODdHfOygfH9LlTl0o5KnOOjFEf+/APz7EPufjyO3P9s5tKZUYiKI9owKDIBdHFJWLHEUQlYsoVP//h52qI3U0FWB3JzOUY8169sGl1clOdwIwiOpF3vkbM7nIGxuo3oGM2uCiGRLB9w4uxCIL3sqaBJTNovQXsZefrljkts5bmE10HdALVxGcHIEIGHqVCdPqgBO2g4i9/jyLRSpw5GpjLxOFZETs0NTZI4LLPSRMbM5lEhShyEiOYhE6ctkNaxHzjjQxrXmKlI1fRipiz726BLE30jp9UikdcVEhgpPjRC5C4Zz/Mw9JQLj1Mfvo821s30PEPiK9KERoFG72tras9zA9tUfJtKzyhp5GBDUhqlDEpHcRx+uARFyBezyxp8iluYQCEQ/u0XMBTxEaGOOr1EReGTHUioDxVToij23ew7xxU6hdeYpQx0iOKYn82XM37KUy8d0Q7V26kY7I2e5XTUO3nR0nxzREKp0dd8OeCLKcS0TsuFFKSgQfKe8fSURcF4jY46sUREq8hUZAUlY3TZEIzYzkmLhIELFFu0AaemNLBD9+SFrktssW4cTpvxpoMn9z4iuC23mvpGfaxyJ0ZyTHZEXerazYrJELV8ccqAL2UaIiI+sIdj4iR+IAytrJUS+yKN1KsmKV3Al0F+6KTiLBKXenOCv2KUHwB67oRSoRM8+KKzJotdnknFJmbiRHvciws8lOhb1ZMbqk5MBNiIFaZPV1Yh4Pd2fFWY0SBSdHpcjt958+j2nDQ4cNmgvS4f9sVinSYIPryvasWCAV4YP3iaGtExlb3ZFwW1Yckw6OXsmBpnGCASKwpX0S0FPEBvOhVoQ59D0zlBUiRd7KW5dNzkgvwseXflcMZhOxyDPLGJCLCJ+AhQ41IZZSkTOWUe+5iXAdLBEgOX4IRQospEhqwPxemBwNEZjRMT1nEX2hfKhFniIWckyOIqhQcHIEIsbOjVl4ifBMVyh1NgAiRrQFVMlDRF8oZSBinf3ExN4iPFAUSksjMumymPrKX4TbikJpK0SOWc41uWAluII+OWKRMiu4IRd8NiMsYrfw9WtWLxDBNg1poQyEIiFriFbgjyDnTlgogUwkZhVdMmAfmsJCOZeILFlH6C2iL5RQILIOlSy8RfSFcgVF/GFf+jXCHGVARFQoF1kQERXKaSZEBIVSzoYIvtzZ+i0i1M+EiGANPsuCSJEE/HwRYU4Z/HSRvlNy9KdK6UQUTMSJUp+kExoxISdL5RAxHidHf9Z0gIMVTo7+PNMBjro4OfozppSaDxhOlDs6RDsIJ0d/WpROgw4z5EQp0QFapjg5+lOlQzSxcXL0p0IpjRUw6S7A+kGPM0GyEPmN3jLNV3lknE3kzOLXIW+/MJB5fkN5/CNb34QMrjn9CsIHysnJycnJycnJycnJycnB/AUiHJaNu/P1RgAAAABJRU5ErkJggg==",Ck=(A,e)=>{const t=A.__vccOpts||A;for(const[r,n]of e)t[r]=n;return t},_k={class:"title"},Qk={class:"subTitle"},xk={style:{width:"20px",display:"flex","justify-content":"center"}},Fk={class:"mychart"},Ek=["id"],_f=Ck({__name:"HydroGraph",props:{id:{type:String,default(){return z2()}},chartOption:{type:Object,default(){return{}}},legendList:{type:Array,default(){return[]}},width:{type:String,default(){return"100%"}},height:{type:String,default(){return"100%"}},backgroundColor:{type:String,default(){return"#fff"}}},setup(A,{expose:e,emit:t}){qA([s2,MH,B2,N2,WL,sM,CL,G2]);const r=R.ref(),n=A;n.chartOption.series||(n.chartOption.series=[]);let i={};const a=t;let o={};R.watch(()=>n.chartOption,()=>{R.nextTick(()=>{let D=setInterval(()=>{document.getElementById(n.id)&&document.getElementById(n.id).offsetHeight>100&&document.getElementById(n.id).offsetWidth>100&&(y&&y.getOption()&&!n.chartOption.restoreZoom&&(o={...y.getOption().dataZoom[0],moveOnMouseMove:n.chartOption.series.some(M=>M.openBarDrag&&(M.type=="line"||M.type=="markLine"))?"ctrl":!0}),Q(),clearInterval(D))},100)})},{deep:!0,immediate:!0});let s={};R.watch(()=>n.legendList,()=>{y&&(s=y.getOption().legend[0].selected);let D=n.legendList.map(H=>{let K=u.find(N=>N.code==H.name);return K?{...H,...K}:{...H}}),M=JSON.parse(JSON.stringify(c.value));i={},c.value=D.map(H=>{const K=M.find(ue=>ue.name==H.name);i[H.name]=H,H.children&&(H.children=H.children.map(ue=>{i[ue.name]=ue;let ie="";return n.chartOption.isDefaultElement===!1?ie=s[ue.name]!=null?s[ue.name]:ue.isSelected:K&&K.children&&K.children.find(Se=>Se.name==ue.name)?ie=K.children.find(Se=>Se.name==ue.name).isSelected:ie=ue.isSelected,{...ue,isSelected:ie,id:Math.random()}}));let N="";return n.chartOption.isDefaultElement===!1?N=s[H.name]!=null?s[H.name]:H.isSelected:H.compel?N=H.isSelected:K?N=K.isSelected:N=H.isSelected,{...H,isSelected:N,id:Math.random()}})},{deep:!0});const l=[{name:"实况雨量",type:"bar",color:"#0000ff",unit:"mm"},{name:"实测水位",type:"line",color:"#304755",unit:"m"},{name:"库容",type:"line",color:"#197e2b",unit:"万m³"},{name:"5分钟水位",type:"line",color:"#304755",unit:"m"},{name:"5分钟库容",type:"line",color:"#197e2b",unit:"万m³"},{name:"校核洪水位",type:"markLine",color:"#ffa500",unit:"m"},{name:"设计洪水位",type:"markLine",color:"#a52a2a",unit:"m"},{name:"正常高水位",type:"markLine",color:"#008000",unit:"m"},{name:"死水位",type:"markLine",color:"#000000",unit:"m"},{name:"坝顶高程",type:"markLine",color:"#cf0ce1",unit:"m"},{name:"梅汛期",code:"MXQ",type:"markLine",color:"#ff0000",unit:"m"},{name:"台汛期",code:"TXQ",type:"markLine",color:"#ff0000",unit:"m"},{name:"累计降雨",type:"line",color:"red",unit:"mm"},{name:"可纳雨量",type:"bar",color:"#0000ff",unit:"mm"},{name:"作业预报时间",type:"markLine",color:"#ff0000"}],u=[{name:"实况雨量",code:"P",color:"#0000ff",icon:"histogram"},{name:"实测水位",code:"RZ",color:"#304755",icon:"straightLine",iconWidth:"30",iconHeight:"30"},{name:"库容",code:"W",color:"#197e2b",icon:"straightLine",iconWidth:"30",iconHeight:"30"}],f=["校核洪水位","设计洪水位","正常高水位","坝顶高程","死水位","主汛期"],c=R.ref(n.legendList.map((D,M)=>{let H=u.find(K=>K.code==D.name);return D.color||(D.color=O_[M]),H?{...D,...H}:{...D}}));c.value.forEach(D=>{i[D.name]=D,D.children&&D.children.forEach(M=>{i[M.name]=M})});const h=R.ref(!0);let v=null;const d=D=>{var H;let M=[];h.value=D,c.value.forEach(K=>{K.isSelected=D,M.push(K.name),K.children&&K.children.forEach(N=>{N.isSelected=D,M.push(N.name)})}),M.forEach(K=>{m[K]=D,F(K,D)}),o={...(H=y.getOption())==null?void 0:H.dataZoom[0]},Q()},g=(D,M)=>{var K;let H=[];c.value.forEach(N=>{N.name==M?(N.isSelected=D,N.children?N.children.forEach(ue=>{ue.isSelected=D,H.push(ue.name)}):H.push(N.name)):N.children&&N.children.forEach(ue=>{ue.name==M&&(ue.isSelected=D,H.push(ue.name),N.children.filter(ie=>ie.isSelected).length==N.children.length?N.isSelected=!0:N.isSelected=!1)})}),H.forEach(N=>{Array.isArray(N)?(m[N[0]]=D,m[N[1]]=D,F(N[0],D),F(N[1],D)):(m[N]=D,F(N,D))}),v=c.value.some(N=>N.isSelected==!1),v?h.value=!1:h.value=!0,o={...(K=y.getOption())==null?void 0:K.dataZoom[0]},Q()};R.onMounted(()=>{window.addEventListener("keydown",B)});let p={};const B=D=>{if(D.key==="i"){let M=JSON.parse(JSON.stringify(y.getOption()));M.series.forEach(H=>{H.markPoint&&H.markPoint.data.length!=0?H.markPoint.data=[]:H.markPoint&&H.markPoint.data==0&&(H.markPoint=p[H.name])}),y.setOption(M)}};let m={},y,_;const C=R.ref({}),Q=async()=>{let D=n.chartOption.series.map(w=>{let q="";return w.code?q=l.find(O=>O.code==w.code):q=l.find(O=>O.name==w.name),q?{...q,...w}:{...w}});c.value.forEach(w=>{m[w.name]=w.isSelected,w.children&&w.children.forEach(q=>{m[q.name]=q.isSelected})}),_=document.getElementById(n.id),y||(y=UT(_));let M=D.filter(w=>Array.isArray(w.data));const H=M.every(w=>Array.isArray(w.data)&&w.data.length===0),K=R_(new Date(xe().subtract(5,"day").format("YYYY-MM-DD 08:00")),new Date(xe().format("YYYY-MM-DD HH:00")),60).map(w=>[w,""]);let N=[];M.forEach(w=>{N=N.concat(w.data)}),N=[...new Set(N.map(w=>w[0]))],N.sort((w,q)=>Date.parse(w)-Date.parse(q)),N.some(w=>bu(w))&&(N=N.filter(w=>bu(w)));let ue=N[0];n.chartOption.series.forEach(w=>{w.name=="开始"&&w.sectionStartTime&&(ue=w.sectionStartTime)});let ie=JSON.parse(JSON.stringify(n.chartOption.grid)),Se=n.chartOption.xAxis.map((w,q)=>{let O="";w.show==!1||ie.length>1&&q==0?O=!1:O=!0;let se={type:w.type,logBase:w.logBase||10,gridIndex:w.gridIndex,name:O&&w.type=="time"?"时间":w.name,nameLocation:O&&w.type=="time"?"end":"middle",nameTextStyle:{color:"#333",verticalAlign:O&&w.type=="time"?"top":""},position:w.position,offset:w.offset?w.offset:0,inverse:w.inverse?w.inverse:!1,nameGap:O&&w.type=="time"?45:w.nameGap?w.nameGap:w.name?25:0,axisLabel:{show:O,rotate:w.rotate,formatter:function(ge){return w.type=="time"?S(xe(xe(ge).format("YYYY-MM-DD HH:mm")))?n.chartOption.xTimeType?`{a|${n.chartOption.xTimeType}}`:"{a|{yyyy}-{MM}-{dd} {HH}:{mm}}":n.chartOption.xTimeType?n.chartOption.xTimeType:"{MM}-{dd} {HH}:{mm}":w.name?w.name.includes("m³/s")?ra(ge):w.name.includes("万m³")?ge.toFixed(2):w.name.includes("mm")?ge.toFixed(1):w.name.includes("m")?ge.toFixed(2):(ge||ge==0)&&w.toFixed?Number(ge).toFixed(w.toFixed):ge:ge},rich:{a:{fontWeight:"bold"}},color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#333",hideOverlap:!0},axisLine:{show:!0,lineStyle:{color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#8a949c"}},splitLine:{show:w.splitLineHide?!1:w.gridIndex!=2,lineStyle:{color:"#e0e6f1"}},axisTick:{show:w.show==!1?!1:!(ie.length>1&&q==0),alignWithLabel:n.chartOption.alignWithLabel!=null?n.chartOption.alignWithLabel:!0},boundaryGap:w.boundaryGap?w.boundaryGap:["1%","1%"]};if(w.data&&(se.data=w.data),w.type=="value"||w.type=="log"){let ge=0,Ee=100,re=10;w.name.includes("m³/s")?(Ee=1e3,re=100):w.name.includes("万m³")&&(Ee=1e4,re=1e3);let k=n.chartOption.series.filter(ne=>ne.yAxisIndex==q),ce=[],z=[],W=0,Qe=100;k.forEach(ne=>{ne.data instanceof Array&&(ce=ce.concat(ne.data))}),ce[0]instanceof Array&&(z=ce.filter(ne=>ne[0]!=""&&ne[0]!=null&&ne[0]!=null&&!isNaN(ne[0])).map(ne=>Number(ne[0]))),z.length>0&&(W=Math.min(...z),Qe=Math.max(...z),k.some(ne=>ne.type=="bar")||w.name.includes("雨")?(ge=0,(W!==0||Qe!==0)&&(Ee=Math.ceil(Qe/Me(0,Qe))*Me(0,Qe),re=Me(0,Qe))):w.min||w.min==0?(ge=w.min,(W!==0||Qe!==0)&&(Ee=Math.ceil(Qe/Me(w.min,Qe))*Me(w.min,Qe),re=Me(w.min,Qe))):(W!==0||Qe!==0)&&(ge=Math.floor(W/Me(W,Qe))*Me(W,Qe),Ee=Math.ceil(Qe/Me(W,Qe))*Me(W,Qe),re=Me(W,Qe))),se.min=w.min!=""&&w.min!=null?w.min:ge,se.max=w.max!=""&&w.max!=null?w.max:Ee,se.interval=w.interval&&w.max&&(w.min||w.min==0)?w.interval:re,w.interval&&w.max&&(w.min||w.min==0)&&w.interval,se.minorTick={show:!!w.isMinorSplitLineShow}}return se}),He=n.chartOption.yAxis.map((w,q)=>{let O=0,se=100,ge=10;if(w.name.includes("m³/s")?(se=1e3,ge=100):w.name.includes("万m³")&&(se=1e4,ge=1e3),w.name=="可纳雨量(mm)")return{gridIndex:w.index,name:w.name,nameLocation:"middle",nameTextStyle:{color:"#333"},nameGap:w.nameGap,type:"value",position:w.position,offset:w.offset,min:w.min,max:w.max,interval:w.interval,axisLabel:{formatter:Ee=>Ee.toFixed(1),color:"#333"},axisLine:{show:!0,lineStyle:{color:"#8a949c"}},splitLine:{show:!1},minorTick:{show:!0},axisTick:{show:!0}};{let Ee=n.chartOption.series.filter(ne=>ne.yAxisIndex==q&&(m[ne.name]||!Object.keys(m).includes(ne.name))),re=[],k=[],ce=[],z=0,W=100,Qe=null;if(Ee.forEach(ne=>{ne.data instanceof Array?((ne.data2?ne.data2:ne.data).forEach(Ce=>{if(Ce instanceof Array&&Ce.length>=2){const Ke=Ce[1];if(Ke!=""&&Ke!=null&&Ke!=null&&!isNaN(Ke)){const $e=Number(Ke);Qe===null&&(Qe=$e)}}}),re=ne.data2?re.concat(ne.data2):re.concat(ne.data)):ne.data.name=="yAxis"&&ne.data.value&&ce.push(Number(ne.data.value))}),re[0]instanceof Array?k=re.filter(ne=>ne[1]!=""&&ne[1]!=null&&ne[1]!=null&&!isNaN(ne[1])).map(ne=>Number(ne[1])):re[0]instanceof Object&&re[0].value?k=re.map(pe=>pe.value).filter(pe=>pe!=""&&pe!=null&&pe!=null&&!isNaN(pe)).map(pe=>Number(pe)):k=re.filter(ne=>ne!=""&&ne!=null&&ne!=null&&!isNaN(ne)).map(ne=>Number(ne)),k.length>0||ce.length>0){if(z=Math.min(...k,...ce),W=Math.max(...k,...ce),Ee.some(ne=>ne.type=="bar")||w.name.includes("雨"))O=0,n.chartOption.xAxis.length>1&&w.inverse?(z!==0||W!==0)&&(se=Math.ceil(W/Me(0,W,1))*Me(0,W,1)+Me(0,W,1)*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=Me(0,W,1)):(z!==0||W!==0)&&(se=Math.ceil(W/Me(0,W))*Me(0,W)+Me(0,W)*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=Me(0,W));else if(w.min||w.min==0)O=w.min,(z!==0||W!==0)&&(se=Math.ceil(W/Me(w.min,W))*Me(w.min,W)+Me(w.min,W)*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=Me(w.min,W));else if(z!==0||W!==0)if(n.chartOption.xAxis.some(pe=>pe.type==="value")&&Qe!==null){O=Qe;const pe=Me(O,W);se=Math.ceil((W-O)/pe)*pe+O+pe*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=pe}else O=Math.floor(z/Me(z,W))*Me(z,W)-Me(z,W)*(w.downIntervalNumber!=null?w.downIntervalNumber:1),se=Math.ceil(W/Me(z,W))*Me(z,W)+Me(z,W)*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=Me(z,W)}if(w.rangeType==1){let ne="",pe="";Math.abs(W)>Math.abs(z)?pe=Math.abs(W):pe=Math.abs(z),ne=Math.ceil(pe/Me(0,pe))*Me(0,pe),se=ne,O=0-ne,ge=Me(0,Math.abs(ne))}return{gridIndex:w.index,name:w.name,nameLocation:"middle",nameTextStyle:{color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#333"},nameGap:w.nameGap,type:w.type||"value",logBase:w.logBase||10,position:w.position,offset:w.offset?w.offset:0,inverse:w.inverse?w.inverse:!1,min:w.min!=""&&w.min!=null?w.min:O,max:w.max!=""&&w.max!=null?w.max:se,interval:w.interval&&w.max&&(w.min||w.min==0)?w.interval:ge,axisLabel:{formatter:ne=>w.name.includes("m³/s")?ra(ne):w.name.includes("万m³")?ne.toFixed(2):w.name.includes("mm")?ne.toFixed(1):w.name.includes("m")?ne.toFixed(2):ne,color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#333"},axisLine:{show:!0,lineStyle:{color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#8a949c"}},axisTick:{show:!0},splitLine:{show:!(ie.length>1&&w.index==1&&w.position=="right"||ie.length==1&&w.index==0&&w.position=="right"||w.splitLineHide),lineStyle:{color:"#e0e6f1"}},minorTick:{show:!0},minorSplitLine:{show:ie.length>1&&w.index==1&&w.position=="right"||ie.length==1&&w.index==0&&w.position=="right"||w.splitLineHide?!1:!w.minorSplitLineHide,lineStyle:{color:"#f4f7fd"}},axisTick:{show:!0}}}}),G=D.some(w=>w.openBarDrag),de=D.map((w,q)=>{var se,ge,Ee;let O={};if(w.type=="bar")w.name=="可纳雨量"?O={name:w.name,type:w.type,xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,barWidth:w.barWidth,data:H?K:w.data,label:{show:!0,position:"top",color:"black",fontFamily:"Times New Roman"},itemStyle:{color:function(re){if(w.barColor=="1"){if(re.dataIndex===0)return"#ff0000";if(re.dataIndex===1)return"#a52a2a";if(re.dataIndex===2)return"#ffa500";if(re.dataIndex===3)return"#cf0ce1"}else return"#00a651"}},zlevel:9,z:9}:O={name:w.name,type:w.type,xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,label:{show:w.isLabelShow?w.isLabelShow:!1,position:"top",fontFamily:"Times New Roman",formatter:function(re){return"{a0|"+(Array.isArray(re.value)?re.value[1]:re.value)+"}"},rich:{a0:{color:i[w.name]?i[w.name].color:w.color,fontSize:12}}},stack:w.stack?w.stack:"",tooltip:{show:w.isTooltipShow!=!1,trigger:"axis",type:"none"},itemStyle:w.itemStyle?w.itemStyle:{color:function(re){let k=i[w.name]?i[w.name].color:w.color?w.color:O_[q];return w.color2&&re.value[1]<0?w.color2:k},decal:{symbol:w.pattern?w.pattern:"none"}},barCategoryGap:w.barCategoryGap?w.barCategoryGap:He[w.yAxisIndex].inverse?"0%":"20%",barGap:w.barGap?w.barGap:"0%",data:H?K:w.data,zlevel:9,z:9},w.barWidth&&(O.barWidth=w.barWidth,w.barGap?O.barGap=w.barGap:O.barGap="20%"),w.barMaxWidth&&(O.barMaxWidth=w.barMaxWidth,w.barGap?O.barGap=w.barGap:O.barGap="20%");else if(w.type=="line"){let re="rgba(0, 0, 0, 0)";n.chartOption.isFace&&(n.chartOption.faceNames?n.chartOption.faceNames.includes(w.name)&&(i[w.name]?re=i[w.name].color:re=w.color):i[w.name]?re=i[w.name].color:re=w.color);let k="",ce=!1;if(w.showSymbol||((se=i[w.name])==null?void 0:se.icon)=="dottedLine"?w.symbolSize?k=w.symbolSize:k=5:n.chartOption.isTooltipItem?(k=10,ce=!0):k=0,O={name:w.name,type:w.type,xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,itemStyle:{color:i[w.name]?i[w.name].color:w.color,opacity:w.showSymbol||((ge=i[w.name])==null?void 0:ge.icon)=="dottedLine"?1:0},lineStyle:w.lineStyle?w.lineStyle:{type:((Ee=i[w.name])==null?void 0:Ee.icon)=="dotted"?"dotted":"solid"},areaStyle:{color:re,opacity:.5},smooth:w.smooth!=null?w.smooth:!1,showSymbol:!0,symbol:w.symbol?w.symbol:"circle",connectNulls:!0,symbolSize:k,data:H?K:w.data,silent:G?w.openBarDrag!==!0:!1,triggerLineEvent:ce,zlevel:9,z:9},w.isMaxMinShow&&w.data.length>0){let z=w.data.filter(Ce=>!Ce[2]).filter(Ce=>Ce[1]),W=z.reduce((Ce,Ke)=>parseFloat(Ke[1])>parseFloat(Ce[1])?Ke:Ce,z[0]),Qe=W?W[0]:"",ne=W?W[1]:"",pe;N.forEach((Ce,Ke)=>{xe(Ce).isValid()&&Ce==Qe&&(Ce.markPointOffset||(Ke>=N.length/5*4?pe=[-200,0]:Ke>=N.length/5*3?pe=[-150,0]:Ke>=N.length/5*2?pe=[-100,0]:Ke>=N.length/5*1?pe=[-50,0]:Ke>=0&&(pe=[0,0])))}),O.markPoint={symbol:"pin",symbolSize:20,label:{show:w.isMarkPointLabelShow!==!1,position:"top",align:"left",fontSize:16,backgroundColor:w.backgroundColor?w.backgroundColor:i[w.name]?i[w.name].color:w.color,borderRadius:6,shadowColor:"#666666",shadowBlur:5,shadowOffsetX:3,shadowOffsetY:3,fontWeight:"bold",padding:[4,4,4,4],lineHeight:30,color:w.markPointColor?w.markPointColor:"#fff",formatter:Ce=>{let Ke="";if(Ce.data&&Ce.data.coord&&Ce.data.coord[0]){let Ar=w.tmType?w.tmType:"YYYY-MM-DD HH:mm";Ke=xe(Ce.data.coord[0]).format(Ar)}let $e="",BA="";if(Ce.name=="Max")return $e=w.maxText?w.maxText:"最大值",w.unit.includes("m³")?BA=Ce.value?ra(Ce.value):"--":w.unit.includes("mm")?BA=Ce.value?Number(Ce.value).toFixed(1):"--":w.unit.includes("m")?BA=Ce.value?Number(Ce.value).toFixed(2):"--":BA=Ce.value,w.tmText?`${$e}: {a0|${BA}} ${w.unit}
66
+ .`+Qp+T4+U1)},L4=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},I1=(function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A})(),M4=(function(){function A(e,t){this.context=e,this._options=t,this._cache={}}return A.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Fp(e)||N4(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},A.prototype.match=function(e){return this._cache[e]},A.prototype.loadImage=function(e){return Nt(this,void 0,void 0,function(){var t,r,n,i,a=this;return Ut(this,function(o){switch(o.label){case 0:return t=I1.isSameOrigin(e),r=!xp(e)&&this._options.useCORS===!0&&_t.SUPPORT_CORS_IMAGES&&!t,n=!xp(e)&&!t&&!Fp(e)&&typeof this._options.proxy=="string"&&_t.SUPPORT_CORS_XHR&&!r,!t&&this._options.allowTaint===!1&&!xp(e)&&!Fp(e)&&!n&&!r?[2]:(i=e,n?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(P4(i)||r)&&(u.crossOrigin="anonymous"),u.src=i,u.complete===!0&&setTimeout(function(){return s(u)},500),a._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+a._options.imageTimeout+"ms) loading image")},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},A.prototype.has=function(e){return typeof this._cache[e]<"u"},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(e){var t=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(i,a){var o=_t.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")i(s.response);else{var f=new FileReader;f.addEventListener("load",function(){return i(f.result)},!1),f.addEventListener("error",function(c){return a(c)},!1),f.readAsDataURL(s.response)}else a("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=a;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var u=t._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return a("Timed out ("+u+"ms) proxying "+n)}}s.send()})},A})(),H4=/^data:image\/svg\+xml/i,O4=/^data:image\/.*;base64,/i,R4=/^data:image\/.*/i,N4=function(A){return _t.SUPPORT_SVG_DRAWING||!k4(A)},xp=function(A){return R4.test(A)},P4=function(A){return O4.test(A)},Fp=function(A){return A.substr(0,4)==="blob"},k4=function(A){return A.substr(-3).toLowerCase()==="svg"||H4.test(A)},j=(function(){function A(e,t){this.type=0,this.x=e,this.y=t}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A})(),ha=function(A,e,t){return new j(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},pf=(function(){function A(e,t,r,n){this.type=1,this.start=e,this.startControl=t,this.endControl=r,this.end=n}return A.prototype.subdivide=function(e,t){var r=ha(this.start,this.startControl,e),n=ha(this.startControl,this.endControl,e),i=ha(this.endControl,this.end,e),a=ha(r,n,e),o=ha(n,i,e),s=ha(a,o,e);return t?new A(this.start,r,a,s):new A(s,o,i,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A})(),pA=function(A){return A.type===1},V4=(function(){function A(e){var t=e.styles,r=e.bounds,n=zo(t.borderTopLeftRadius,r.width,r.height),i=n[0],a=n[1],o=zo(t.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=zo(t.borderBottomRightRadius,r.width,r.height),f=u[0],c=u[1],h=zo(t.borderBottomLeftRadius,r.width,r.height),v=h[0],d=h[1],g=[];g.push((i+s)/r.width),g.push((v+f)/r.width),g.push((a+d)/r.height),g.push((l+c)/r.height);var p=Math.max.apply(Math,g);p>1&&(i/=p,a/=p,s/=p,l/=p,f/=p,c/=p,v/=p,d/=p);var B=r.width-s,m=r.height-c,y=r.width-f,_=r.height-d,C=t.borderTopWidth,Q=t.borderRightWidth,x=t.borderBottomWidth,F=t.borderLeftWidth,S=Je(t.paddingTop,e.bounds.width),E=Je(t.paddingRight,e.bounds.width),I=Je(t.paddingBottom,e.bounds.width),U=Je(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?je(r.left+F/3,r.top+C/3,i-F/3,a-C/3,Ve.TOP_LEFT):new j(r.left+F/3,r.top+C/3),this.topRightBorderDoubleOuterBox=i>0||a>0?je(r.left+B,r.top+C/3,s-Q/3,l-C/3,Ve.TOP_RIGHT):new j(r.left+r.width-Q/3,r.top+C/3),this.bottomRightBorderDoubleOuterBox=f>0||c>0?je(r.left+y,r.top+m,f-Q/3,c-x/3,Ve.BOTTOM_RIGHT):new j(r.left+r.width-Q/3,r.top+r.height-x/3),this.bottomLeftBorderDoubleOuterBox=v>0||d>0?je(r.left+F/3,r.top+_,v-F/3,d-x/3,Ve.BOTTOM_LEFT):new j(r.left+F/3,r.top+r.height-x/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?je(r.left+F*2/3,r.top+C*2/3,i-F*2/3,a-C*2/3,Ve.TOP_LEFT):new j(r.left+F*2/3,r.top+C*2/3),this.topRightBorderDoubleInnerBox=i>0||a>0?je(r.left+B,r.top+C*2/3,s-Q*2/3,l-C*2/3,Ve.TOP_RIGHT):new j(r.left+r.width-Q*2/3,r.top+C*2/3),this.bottomRightBorderDoubleInnerBox=f>0||c>0?je(r.left+y,r.top+m,f-Q*2/3,c-x*2/3,Ve.BOTTOM_RIGHT):new j(r.left+r.width-Q*2/3,r.top+r.height-x*2/3),this.bottomLeftBorderDoubleInnerBox=v>0||d>0?je(r.left+F*2/3,r.top+_,v-F*2/3,d-x*2/3,Ve.BOTTOM_LEFT):new j(r.left+F*2/3,r.top+r.height-x*2/3),this.topLeftBorderStroke=i>0||a>0?je(r.left+F/2,r.top+C/2,i-F/2,a-C/2,Ve.TOP_LEFT):new j(r.left+F/2,r.top+C/2),this.topRightBorderStroke=i>0||a>0?je(r.left+B,r.top+C/2,s-Q/2,l-C/2,Ve.TOP_RIGHT):new j(r.left+r.width-Q/2,r.top+C/2),this.bottomRightBorderStroke=f>0||c>0?je(r.left+y,r.top+m,f-Q/2,c-x/2,Ve.BOTTOM_RIGHT):new j(r.left+r.width-Q/2,r.top+r.height-x/2),this.bottomLeftBorderStroke=v>0||d>0?je(r.left+F/2,r.top+_,v-F/2,d-x/2,Ve.BOTTOM_LEFT):new j(r.left+F/2,r.top+r.height-x/2),this.topLeftBorderBox=i>0||a>0?je(r.left,r.top,i,a,Ve.TOP_LEFT):new j(r.left,r.top),this.topRightBorderBox=s>0||l>0?je(r.left+B,r.top,s,l,Ve.TOP_RIGHT):new j(r.left+r.width,r.top),this.bottomRightBorderBox=f>0||c>0?je(r.left+y,r.top+m,f,c,Ve.BOTTOM_RIGHT):new j(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=v>0||d>0?je(r.left,r.top+_,v,d,Ve.BOTTOM_LEFT):new j(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||a>0?je(r.left+F,r.top+C,Math.max(0,i-F),Math.max(0,a-C),Ve.TOP_LEFT):new j(r.left+F,r.top+C),this.topRightPaddingBox=s>0||l>0?je(r.left+Math.min(B,r.width-Q),r.top+C,B>r.width+Q?0:Math.max(0,s-Q),Math.max(0,l-C),Ve.TOP_RIGHT):new j(r.left+r.width-Q,r.top+C),this.bottomRightPaddingBox=f>0||c>0?je(r.left+Math.min(y,r.width-F),r.top+Math.min(m,r.height-x),Math.max(0,f-Q),Math.max(0,c-x),Ve.BOTTOM_RIGHT):new j(r.left+r.width-Q,r.top+r.height-x),this.bottomLeftPaddingBox=v>0||d>0?je(r.left+F,r.top+Math.min(_,r.height-x),Math.max(0,v-F),Math.max(0,d-x),Ve.BOTTOM_LEFT):new j(r.left+F,r.top+r.height-x),this.topLeftContentBox=i>0||a>0?je(r.left+F+U,r.top+C+S,Math.max(0,i-(F+U)),Math.max(0,a-(C+S)),Ve.TOP_LEFT):new j(r.left+F+U,r.top+C+S),this.topRightContentBox=s>0||l>0?je(r.left+Math.min(B,r.width+F+U),r.top+C+S,B>r.width+F+U?0:s-F+U,l-(C+S),Ve.TOP_RIGHT):new j(r.left+r.width-(Q+E),r.top+C+S),this.bottomRightContentBox=f>0||c>0?je(r.left+Math.min(y,r.width-(F+U)),r.top+Math.min(m,r.height+C+S),Math.max(0,f-(Q+E)),c-(x+I),Ve.BOTTOM_RIGHT):new j(r.left+r.width-(Q+E),r.top+r.height-(x+I)),this.bottomLeftContentBox=v>0||d>0?je(r.left+F+U,r.top+_,Math.max(0,v-(F+U)),d-(x+I),Ve.BOTTOM_LEFT):new j(r.left+F+U,r.top+r.height-(x+I))}return A})(),Ve;(function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Ve||(Ve={}));var je=function(A,e,t,r,n){var i=4*((Math.sqrt(2)-1)/3),a=t*i,o=r*i,s=A+t,l=e+r;switch(n){case Ve.TOP_LEFT:return new pf(new j(A,l),new j(A,l-o),new j(s-a,e),new j(s,e));case Ve.TOP_RIGHT:return new pf(new j(A,e),new j(A+a,e),new j(s,l-o),new j(s,l));case Ve.BOTTOM_RIGHT:return new pf(new j(s,e),new j(s,e+o),new j(A+a,l),new j(A,l));case Ve.BOTTOM_LEFT:default:return new pf(new j(s,l),new j(s-a,l),new j(A,e+o),new j(A,e))}},gf=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},K4=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},Bf=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},G4=(function(){function A(e,t,r){this.offsetX=e,this.offsetY=t,this.matrix=r,this.type=0,this.target=6}return A})(),mf=(function(){function A(e,t){this.path=e,this.target=t,this.type=1}return A})(),z4=(function(){function A(e){this.opacity=e,this.type=2,this.target=6}return A})(),W4=function(A){return A.type===0},T1=function(A){return A.type===1},Y4=function(A){return A.type===2},D1=function(A,e){return A.length===e.length?A.some(function(t,r){return t===e[r]}):!1},X4=function(A,e,t,r,n){return A.map(function(i,a){switch(a){case 0:return i.add(e,t);case 1:return i.add(e+r,t);case 2:return i.add(e+r,t+n);case 3:return i.add(e,t+n)}return i})},L1=(function(){function A(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A})(),M1=(function(){function A(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new V4(this.container),this.container.styles.opacity<1&&this.effects.push(new z4(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new G4(r,n,i))}if(this.container.styles.overflowX!==0){var a=gf(this.curves),o=Bf(this.curves);D1(a,o)?this.effects.push(new mf(a,6)):(this.effects.push(new mf(a,2)),this.effects.push(new mf(o,4)))}}return A.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var i=r.effects.filter(function(s){return!T1(s)});if(t||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,i),t=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var a=gf(r.curves),o=Bf(r.curves);D1(a,o)||n.unshift(new mf(o,6))}}else n.unshift.apply(n,i);r=r.parent}return n.filter(function(s){return vt(s.target,e)})},A})(),Ep=function(A,e,t,r){A.container.elements.forEach(function(n){var i=vt(n.flags,4),a=vt(n.flags,2),o=new M1(n,A);vt(n.styles.display,2048)&&r.push(o);var s=vt(n.flags,8)?[]:r;if(i||a){var l=i||n.styles.isPositioned()?t:e,u=new L1(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var f=n.styles.zIndex.order;if(f<0){var c=0;l.negativeZIndex.some(function(v,d){return f>v.element.container.styles.zIndex.order?(c=d,!1):c>0}),l.negativeZIndex.splice(c,0,u)}else if(f>0){var h=0;l.positiveZIndex.some(function(v,d){return f>=v.element.container.styles.zIndex.order?(h=d+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Ep(o,u,i?u:t,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),Ep(o,e,t,s);vt(n.flags,8)&&H1(n,s)})},H1=function(A,e){for(var t=A instanceof pp?A.start:1,r=A instanceof pp?A.reversed:!1,n=0;n<e.length;n++){var i=e[n];i.container instanceof o1&&typeof i.container.value=="number"&&i.container.value!==0&&(t=i.container.value),i.listValue=qo(t,i.container.styles.listStyleType,!0),t+=r?-1:1}},Z4=function(A){var e=new M1(A,null),t=new L1(e),r=[];return Ep(e,t,t,r),H1(e.container,r),t},O1=function(A,e){switch(e){case 0:return gA(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return gA(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return gA(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);case 3:default:return gA(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},J4=function(A,e){switch(e){case 0:return gA(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return gA(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return gA(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);case 3:default:return gA(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}},q4=function(A,e){switch(e){case 0:return gA(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return gA(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return gA(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);case 3:default:return gA(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}},$4=function(A,e){switch(e){case 0:return yf(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return yf(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return yf(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);case 3:default:return yf(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}},yf=function(A,e){var t=[];return pA(A)?t.push(A.subdivide(.5,!1)):t.push(A),pA(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},gA=function(A,e,t,r){var n=[];return pA(A)?n.push(A.subdivide(.5,!1)):n.push(A),pA(t)?n.push(t.subdivide(.5,!0)):n.push(t),pA(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),pA(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},R1=function(A){var e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},wf=function(A){var e=A.styles,t=A.bounds,r=Je(e.paddingLeft,t.width),n=Je(e.paddingRight,t.width),i=Je(e.paddingTop,t.width),a=Je(e.paddingBottom,t.width);return t.add(r+e.borderLeftWidth,i+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+i+a))},j4=function(A,e){return A===0?e.bounds:A===2?wf(e):R1(e)},ek=function(A,e){return A===0?e.bounds:A===2?wf(e):R1(e)},bp=function(A,e,t){var r=j4(da(A.styles.backgroundOrigin,e),A),n=ek(da(A.styles.backgroundClip,e),A),i=tk(da(A.styles.backgroundSize,e),t,r),a=i[0],o=i[1],s=zo(da(A.styles.backgroundPosition,e),r.width-a,r.height-o),l=Ak(da(A.styles.backgroundRepeat,e),s,i,r,n),u=Math.round(r.left+s[0]),f=Math.round(r.top+s[1]);return[l,u,f,a,o]},va=function(A){return We(A)&&A.value===la.AUTO},Cf=function(A){return typeof A=="number"},tk=function(A,e,t){var r=e[0],n=e[1],i=e[2],a=A[0],o=A[1];if(!a)return[0,0];if(ft(a)&&o&&ft(o))return[Je(a,t.width),Je(o,t.height)];var s=Cf(i);if(We(a)&&(a.value===la.CONTAIN||a.value===la.COVER)){if(Cf(i)){var l=t.width/t.height;return l<i!=(a.value===la.COVER)?[t.width,t.width/i]:[t.height*i,t.height]}return[t.width,t.height]}var u=Cf(r),f=Cf(n),c=u||f;if(va(a)&&(!o||va(o))){if(u&&f)return[r,n];if(!s&&!c)return[t.width,t.height];if(c&&s){var h=u?r:n*i,v=f?n:r/i;return[h,v]}var d=u?r:t.width,g=f?n:t.height;return[d,g]}if(s){var p=0,B=0;return ft(a)?p=Je(a,t.width):ft(o)&&(B=Je(o,t.height)),va(a)?p=B*i:(!o||va(o))&&(B=p/i),[p,B]}var m=null,y=null;if(ft(a)?m=Je(a,t.width):o&&ft(o)&&(y=Je(o,t.height)),m!==null&&(!o||va(o))&&(y=u&&f?m/r*n:t.height),y!==null&&va(a)&&(m=u&&f?y/n*r:t.width),m!==null&&y!==null)return[m,y];throw new Error("Unable to calculate background-size for element")},da=function(A,e){var t=A[e];return typeof t>"u"?A[0]:t},Ak=function(A,e,t,r,n){var i=e[0],a=e[1],o=t[0],s=t[1];switch(A){case 2:return[new j(Math.round(r.left),Math.round(r.top+a)),new j(Math.round(r.left+r.width),Math.round(r.top+a)),new j(Math.round(r.left+r.width),Math.round(s+r.top+a)),new j(Math.round(r.left),Math.round(s+r.top+a))];case 3:return[new j(Math.round(r.left+i),Math.round(r.top)),new j(Math.round(r.left+i+o),Math.round(r.top)),new j(Math.round(r.left+i+o),Math.round(r.height+r.top)),new j(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new j(Math.round(r.left+i),Math.round(r.top+a)),new j(Math.round(r.left+i+o),Math.round(r.top+a)),new j(Math.round(r.left+i+o),Math.round(r.top+a+s)),new j(Math.round(r.left+i),Math.round(r.top+a+s))];default:return[new j(Math.round(n.left),Math.round(n.top)),new j(Math.round(n.left+n.width),Math.round(n.top)),new j(Math.round(n.left+n.width),Math.round(n.height+n.top)),new j(Math.round(n.left),Math.round(n.height+n.top))]}},rk="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",N1="Hidden Text",nk=(function(){function A(e){this._data={},this._document=e}return A.prototype.parseMetrics=function(e,t){var r=this._document.createElement("div"),n=this._document.createElement("img"),i=this._document.createElement("span"),a=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",a.appendChild(r),n.src=rk,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(N1)),r.appendChild(i),r.appendChild(n);var o=n.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(N1)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return a.removeChild(r),{baseline:o,middle:s}},A.prototype.getMetrics=function(e,t){var r=e+" "+t;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,t)),this._data[r]},A})(),P1=(function(){function A(e,t){this.context=e,this.options=t}return A})(),ik=1e4,ak=(function(A){UA(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new nk(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(t){for(var r=this;this._activeEffects.length;)this.popEffect();t.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(t){this.ctx.save(),Y4(t)&&(this.ctx.globalAlpha=t.opacity),W4(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),T1(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return Nt(this,void 0,void 0,function(){var r;return Ut(this,function(n){switch(n.label){case 0:return r=t.element.container.styles,r.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return Nt(this,void 0,void 0,function(){return Ut(this,function(r){switch(r.label){case 0:if(vt(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(t)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,r,n){var i=this;if(r===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+n);else{var a=dp(t.text);a.reduce(function(o,s){return i.ctx.fillText(s,o,t.bounds.top+n),o+i.ctx.measureText(s).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var r=t.fontVariant.filter(function(a){return a==="normal"||a==="small-caps"}).join(""),n=fk(t.fontFamily).join(", "),i=Go(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,r,t.fontWeight,i,n].join(" "),n,i]},e.prototype.renderTextNode=function(t,r){return Nt(this,void 0,void 0,function(){var n,i,a,o,s,l,u,f,c=this;return Ut(this,function(h){return n=this.createFontStyle(r),i=n[0],a=n[1],o=n[2],this.ctx.font=i,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(a,o),l=s.baseline,u=s.middle,f=r.paintOrder,t.textBounds.forEach(function(v){f.forEach(function(d){switch(d){case 0:c.ctx.fillStyle=yt(r.color),c.renderTextWithLetterSpacing(v,r.letterSpacing,l);var g=r.textShadow;g.length&&v.text.trim().length&&(g.slice(0).reverse().forEach(function(p){c.ctx.shadowColor=yt(p.color),c.ctx.shadowOffsetX=p.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=p.offsetY.number*c.options.scale,c.ctx.shadowBlur=p.blur.number,c.renderTextWithLetterSpacing(v,r.letterSpacing,l)}),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),r.textDecorationLine.length&&(c.ctx.fillStyle=yt(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(p){switch(p){case 1:c.ctx.fillRect(v.bounds.left,Math.round(v.bounds.top+l),v.bounds.width,1);break;case 2:c.ctx.fillRect(v.bounds.left,Math.round(v.bounds.top),v.bounds.width,1);break;case 3:c.ctx.fillRect(v.bounds.left,Math.ceil(v.bounds.top+u),v.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&v.text.trim().length&&(c.ctx.strokeStyle=yt(r.webkitTextStrokeColor),c.ctx.lineWidth=r.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(v.text,v.bounds.left,v.bounds.top+l)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,r,n){if(n&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var i=wf(t),a=Bf(r);this.path(a),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,t.intrinsicWidth,t.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return Nt(this,void 0,void 0,function(){var r,n,i,a,o,s,B,B,l,u,f,c,y,h,v,_,d,g,p,B,m,y,_;return Ut(this,function(C){switch(C.label){case 0:this.applyEffects(t.getEffects(4)),r=t.container,n=t.curves,i=r.styles,a=0,o=r.textNodes,C.label=1;case 1:return a<o.length?(s=o[a],[4,this.renderTextNode(s,i)]):[3,4];case 2:C.sent(),C.label=3;case 3:return a++,[3,1];case 4:if(!(r instanceof n1))return[3,8];C.label=5;case 5:return C.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return B=C.sent(),this.renderReplacedElement(r,n,B),[3,8];case 7:return C.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof i1&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof a1))return[3,12];C.label=9;case 9:return C.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return B=C.sent(),this.renderReplacedElement(r,n,B),[3,12];case 11:return C.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof f1&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=C.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),C.label=14;case 14:if(r instanceof gp&&(f=Math.min(r.bounds.width,r.bounds.height),r.type===uf?r.checked&&(this.ctx.save(),this.path([new j(r.bounds.left+f*.39363,r.bounds.top+f*.79),new j(r.bounds.left+f*.16,r.bounds.top+f*.5549),new j(r.bounds.left+f*.27347,r.bounds.top+f*.44071),new j(r.bounds.left+f*.39694,r.bounds.top+f*.5649),new j(r.bounds.left+f*.72983,r.bounds.top+f*.23),new j(r.bounds.left+f*.84,r.bounds.top+f*.34085),new j(r.bounds.left+f*.39363,r.bounds.top+f*.79)]),this.ctx.fillStyle=yt(s1),this.ctx.fill(),this.ctx.restore()):r.type===ff&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+f/2,r.bounds.top+f/2,f/4,0,Math.PI*2,!0),this.ctx.fillStyle=yt(s1),this.ctx.fill(),this.ctx.restore())),ok(r)&&r.value.length){switch(c=this.createFontStyle(i),y=c[0],h=c[1],v=this.fontMetrics.getMetrics(y,h).baseline,this.ctx.font=y,this.ctx.fillStyle=yt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=lk(r.styles.textAlign),_=wf(r),d=0,r.styles.textAlign){case 1:d+=_.width/2;break;case 2:d+=_.width;break}g=_.add(d,0,0,-_.height/2+1),this.ctx.save(),this.path([new j(_.left,_.top),new j(_.left+_.width,_.top),new j(_.left+_.width,_.top+_.height),new j(_.left,_.top+_.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Zo(r.value,g),i.letterSpacing,v),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!vt(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(p=r.styles.listStyleImage,p.type!==0)return[3,18];B=void 0,m=p.url,C.label=15;case 15:return C.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return B=C.sent(),this.ctx.drawImage(B,r.bounds.left-(B.width+10),r.bounds.top),[3,18];case 17:return C.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:t.listValue&&r.styles.listStyleType!==-1&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=yt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",_=new gr(r.bounds.left,r.bounds.top+Je(r.styles.paddingTop,r.bounds.width),r.bounds.width,NQ(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Zo(t.listValue,_),i.letterSpacing,NQ(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),C.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return Nt(this,void 0,void 0,function(){var r,n,p,i,a,p,o,s,p,l,u,p,f,c,p,h,v,p,d,g,p;return Ut(this,function(B){switch(B.label){case 0:if(vt(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:B.sent(),r=0,n=t.negativeZIndex,B.label=2;case 2:return r<n.length?(p=n[r],[4,this.renderStack(p)]):[3,5];case 3:B.sent(),B.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:B.sent(),i=0,a=t.nonInlineLevel,B.label=7;case 7:return i<a.length?(p=a[i],[4,this.renderNode(p)]):[3,10];case 8:B.sent(),B.label=9;case 9:return i++,[3,7];case 10:o=0,s=t.nonPositionedFloats,B.label=11;case 11:return o<s.length?(p=s[o],[4,this.renderStack(p)]):[3,14];case 12:B.sent(),B.label=13;case 13:return o++,[3,11];case 14:l=0,u=t.nonPositionedInlineLevel,B.label=15;case 15:return l<u.length?(p=u[l],[4,this.renderStack(p)]):[3,18];case 16:B.sent(),B.label=17;case 17:return l++,[3,15];case 18:f=0,c=t.inlineLevel,B.label=19;case 19:return f<c.length?(p=c[f],[4,this.renderNode(p)]):[3,22];case 20:B.sent(),B.label=21;case 21:return f++,[3,19];case 22:h=0,v=t.zeroOrAutoZIndexOrTransformedOrOpacity,B.label=23;case 23:return h<v.length?(p=v[h],[4,this.renderStack(p)]):[3,26];case 24:B.sent(),B.label=25;case 25:return h++,[3,23];case 26:d=0,g=t.positiveZIndex,B.label=27;case 27:return d<g.length?(p=g[d],[4,this.renderStack(p)]):[3,30];case 28:B.sent(),B.label=29;case 29:return d++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var r=this;t.forEach(function(n,i){var a=pA(n)?n.start:n;i===0?r.ctx.moveTo(a.x,a.y):r.ctx.lineTo(a.x,a.y),pA(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(t,r,n,i){this.path(t),this.ctx.fillStyle=r,this.ctx.translate(n,i),this.ctx.fill(),this.ctx.translate(-n,-i)},e.prototype.resizeImage=function(t,r,n){var i;if(t.width===r&&t.height===n)return t;var a=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,o=a.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(t,0,0,t.width,t.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(t){return Nt(this,void 0,void 0,function(){var r,n,i,a,o,s;return Ut(this,function(l){switch(l.label){case 0:r=t.styles.backgroundImage.length-1,n=function(u){var f,c,h,S,P,Z,U,T,x,v,S,P,Z,U,T,d,g,p,B,m,y,_,C,Q,x,F,S,E,I,U,T,L,P,Z,V,X,ee,te,D,M,H,K;return Ut(this,function(N){switch(N.label){case 0:if(u.type!==0)return[3,5];f=void 0,c=u.url,N.label=1;case 1:return N.trys.push([1,3,,4]),[4,i.context.cache.match(c)];case 2:return f=N.sent(),[3,4];case 3:return N.sent(),i.context.logger.error("Error loading background-image "+c),[3,4];case 4:return f&&(h=bp(t,r,[f.width,f.height,f.width/f.height]),S=h[0],P=h[1],Z=h[2],U=h[3],T=h[4],x=i.ctx.createPattern(i.resizeImage(f,U,T),"repeat"),i.renderRepeat(S,x,P,Z)),[3,6];case 5:WR(u)?(v=bp(t,r,[null,null,null]),S=v[0],P=v[1],Z=v[2],U=v[3],T=v[4],d=kR(u.angle,U,T),g=d[0],p=d[1],B=d[2],m=d[3],y=d[4],_=document.createElement("canvas"),_.width=U,_.height=T,C=_.getContext("2d"),Q=C.createLinearGradient(p,m,B,y),bQ(u.stops,g).forEach(function(ue){return Q.addColorStop(ue.stop,yt(ue.color))}),C.fillStyle=Q,C.fillRect(0,0,U,T),U>0&&T>0&&(x=i.ctx.createPattern(_,"repeat"),i.renderRepeat(S,x,P,Z))):YR(u)&&(F=bp(t,r,[null,null,null]),S=F[0],E=F[1],I=F[2],U=F[3],T=F[4],L=u.position.length===0?[ep]:u.position,P=Je(L[0],U),Z=Je(L[L.length-1],T),V=VR(u,P,Z,U,T),X=V[0],ee=V[1],X>0&&ee>0&&(te=i.ctx.createRadialGradient(E+P,I+Z,0,E+P,I+Z,X),bQ(u.stops,X*2).forEach(function(ue){return te.addColorStop(ue.stop,yt(ue.color))}),i.path(S),i.ctx.fillStyle=te,X!==ee?(D=t.bounds.left+.5*t.bounds.width,M=t.bounds.top+.5*t.bounds.height,H=ee/X,K=1/H,i.ctx.save(),i.ctx.translate(D,M),i.ctx.transform(1,0,0,H,0,0),i.ctx.translate(-D,-M),i.ctx.fillRect(E,K*(I-M)+M,U,T*K),i.ctx.restore()):i.ctx.fill())),N.label=6;case 6:return r--,[2]}})},i=this,a=0,o=t.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return a<o.length?(s=o[a],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return a++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,r,n){return Nt(this,void 0,void 0,function(){return Ut(this,function(i){return this.path(O1(n,r)),this.ctx.fillStyle=yt(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,r,n,i){return Nt(this,void 0,void 0,function(){var a,o;return Ut(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(t,n,i)]:[3,2];case 1:return s.sent(),[2];case 2:return a=J4(i,n),this.path(a),this.ctx.fillStyle=yt(t),this.ctx.fill(),o=q4(i,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return Nt(this,void 0,void 0,function(){var r,n,i,a,o,s,l,u,f=this;return Ut(this,function(c){switch(c.label){case 0:return this.applyEffects(t.getEffects(2)),r=t.container.styles,n=!en(r.backgroundColor)||r.backgroundImage.length,i=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],a=sk(da(r.backgroundClip,0),t.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),en(r.backgroundColor)||(this.ctx.fillStyle=yt(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){f.ctx.save();var v=gf(t.curves),d=h.inset?0:ik,g=X4(v,-d+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(f.path(v),f.ctx.clip(),f.mask(g)):(f.mask(v),f.ctx.clip(),f.path(g)),f.ctx.shadowOffsetX=h.offsetX.number+d,f.ctx.shadowOffsetY=h.offsetY.number,f.ctx.shadowColor=yt(h.color),f.ctx.shadowBlur=h.blur.number,f.ctx.fillStyle=h.inset?yt(h.color):"rgba(0,0,0,1)",f.ctx.fill(),f.ctx.restore()}),c.label=2;case 2:o=0,s=0,l=i,c.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!en(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,t.curves,2)]:[3,11]):[3,13];case 4:return c.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,t.curves,3)];case 6:return c.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,t.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,t.curves)];case 10:c.sent(),c.label=11;case 11:o++,c.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,r,n,i,a){return Nt(this,void 0,void 0,function(){var o,s,l,u,f,c,h,v,d,g,p,B,m,y,_,C,_,C;return Ut(this,function(Q){return this.ctx.save(),o=$4(i,n),s=O1(i,n),a===2&&(this.path(s),this.ctx.clip()),pA(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),pA(s[1])?(f=s[1].end.x,c=s[1].end.y):(f=s[1].x,c=s[1].y),n===0||n===2?h=Math.abs(l-f):h=Math.abs(u-c),this.ctx.beginPath(),a===3?this.formatPath(o):this.formatPath(s.slice(0,2)),v=r<3?r*3:r*2,d=r<3?r*2:r,a===3&&(v=r,d=r),g=!0,h<=v*2?g=!1:h<=v*2+d?(p=h/(2*v+d),v*=p,d*=p):(B=Math.floor((h+d)/(v+d)),m=(h-B*v)/(B-1),y=(h-(B+1)*v)/B,d=y<=0||Math.abs(d-m)<Math.abs(d-y)?m:y),g&&(a===3?this.ctx.setLineDash([0,v+d]):this.ctx.setLineDash([v,d])),a===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=yt(t),this.ctx.stroke(),this.ctx.setLineDash([]),a===2&&(pA(s[0])&&(_=s[3],C=s[0],this.ctx.beginPath(),this.formatPath([new j(_.end.x,_.end.y),new j(C.start.x,C.start.y)]),this.ctx.stroke()),pA(s[1])&&(_=s[1],C=s[2],this.ctx.beginPath(),this.formatPath([new j(_.end.x,_.end.y),new j(C.start.x,C.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return Nt(this,void 0,void 0,function(){var r;return Ut(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=yt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=Z4(t),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e})(P1),ok=function(A){return A instanceof u1||A instanceof l1?!0:A instanceof gp&&A.type!==ff&&A.type!==uf},sk=function(A,e){switch(A){case 0:return gf(e);case 2:return K4(e);case 1:default:return Bf(e)}},lk=function(A){switch(A){case 1:return"center";case 2:return"right";case 0:default:return"left"}},uk=["-apple-system","system-ui"],fk=function(A){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?A.filter(function(e){return uk.indexOf(e)===-1}):A},ck=(function(A){UA(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(t){return Nt(this,void 0,void 0,function(){var r,n;return Ut(this,function(i){switch(i.label){case 0:return r=vp(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,hk(r)];case 1:return n=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=yt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e})(P1),hk=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(A))})},vk=(function(){function A(e){var t=e.id,r=e.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return A.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Su([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.getTime=function(){return Date.now()-this.start},A.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Su([this.id,this.getTime()+"ms"],e))},A.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Su([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Su([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.instances={},A})(),dk=(function(){function A(e,t){var r;this.windowBounds=t,this.instanceName="#"+A.instanceCount++,this.logger=new vk({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new M4(this,e)}return A.instanceCount=1,A})(),k1=function(A,e){return e===void 0&&(e={}),pk(A,e)};typeof window<"u"&&I1.setContext(window);var pk=function(A,e){return Nt(void 0,void 0,void 0,function(){var t,r,n,i,a,o,s,l,u,f,c,h,v,d,g,p,B,m,y,_,Q,C,Q,x,F,S,E,I,U,T,L,P,Z,V,X,ee,te,D,M,H;return Ut(this,function(K){switch(K.label){case 0:if(!A||typeof A!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=A.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(r=t.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(x=e.allowTaint)!==null&&x!==void 0?x:!1,imageTimeout:(F=e.imageTimeout)!==null&&F!==void 0?F:15e3,proxy:e.proxy,useCORS:(S=e.useCORS)!==null&&S!==void 0?S:!1},i=Dd({logging:(E=e.logging)!==null&&E!==void 0?E:!0,cache:e.cache},n),a={windowWidth:(I=e.windowWidth)!==null&&I!==void 0?I:r.innerWidth,windowHeight:(U=e.windowHeight)!==null&&U!==void 0?U:r.innerHeight,scrollX:(T=e.scrollX)!==null&&T!==void 0?T:r.pageXOffset,scrollY:(L=e.scrollY)!==null&&L!==void 0?L:r.pageYOffset},o=new gr(a.scrollX,a.scrollY,a.windowWidth,a.windowHeight),s=new dk(i,o),l=(P=e.foreignObjectRendering)!==null&&P!==void 0?P:!1,u={allowTaint:(Z=e.allowTaint)!==null&&Z!==void 0?Z:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),f=new S1(s,A,u),c=f.clonedReferenceElement,c?[4,f.toIFrame(t,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=K.sent(),v=mp(c)||B4(c)?X2(c.ownerDocument):Uu(s,c),d=v.width,g=v.height,p=v.left,B=v.top,m=gk(s,c,e.backgroundColor),y={canvas:e.canvas,backgroundColor:m,scale:(X=(V=e.scale)!==null&&V!==void 0?V:r.devicePixelRatio)!==null&&X!==void 0?X:1,x:((ee=e.x)!==null&&ee!==void 0?ee:0)+p,y:((te=e.y)!==null&&te!==void 0?te:0)+B,width:(D=e.width)!==null&&D!==void 0?D:Math.ceil(d),height:(M=e.height)!==null&&M!==void 0?M:Math.ceil(g)},l?(s.logger.debug("Document cloned, using foreign object rendering"),Q=new ck(s,y),[4,Q.render(c)]):[3,3];case 2:return _=K.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+p+","+B+" with size "+d+"x"+g+" using computed rendering"),s.logger.debug("Starting DOM parsing"),C=h1(s,c),m===C.styles.backgroundColor&&(C.styles.backgroundColor=mr.TRANSPARENT),s.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),Q=new ak(s,y),[4,Q.render(C)];case 4:_=K.sent(),K.label=5;case 5:return(!((H=e.removeContainer)!==null&&H!==void 0)||H)&&(S1.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,_]}})})},gk=function(A,e,t){var r=e.ownerDocument,n=r.documentElement?Wo(A,getComputedStyle(r.documentElement).backgroundColor):mr.TRANSPARENT,i=r.body?Wo(A,getComputedStyle(r.body).backgroundColor):mr.TRANSPARENT,a=typeof t=="string"?Wo(A,t):t===null?mr.TRANSPARENT:4294967295;return e===r.documentElement?en(n)?en(i)?a:i:n:a};/*! Element Plus Icons Vue v2.3.2 */var Bk=R.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(A){return(e,t)=>(R.openBlock(),R.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[R.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),V1=Bk;const mk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAk1BMVEUAAAAyMjIzMzMzMzMzMzMzMzMyMjIzMzMzMzMzMzM3NzcyMjIzMzMyMjIzMzMzMzMzMzMzMzMzMzMyMjIzMzMyMjIzMzMzMzMzMzMzMzMyMjIzMzMzMzMzMzMzMzMyMjIzMzMyMjIzMzM0NDQzMzMzMzMzMzMzMzMzMzMzMzM0NDQzMzMzMzMzMzMyMjI6OjozMzMnMcQ8AAAAMHRSTlMAgprMx7VSMqV6CWbkjtXRv5RiD/hEOe91cSng21w/Lq6piBwX6mtXTUkg9J68JAbdlNjNAAAFP0lEQVR42u3d13biMBAG4N/gDqabYnrokIR5/6fbmrMe7LCAJWFx9N3tDRtF1sxopBgYhmEYhmEYhmEYhmEYhmEYhmEYhmEY9wvn8X7X2Y6CYLTt7PbxPIRuju6w0qpTRr1VGbor6OHYeZ/QVY32rvSDiaMq3cSOYpTWcWjTHezhEWXk+j26U893UTLrYZMeUq2hRLxoQz/pPpT9kn7RfSifFSrOfv5aGW1ICN/DM8UfJErP6uJp3uiaU9OJglFt6saxO62Ngshpnq4m/CmeY/39Iu99DPtr5Fj3R8736eYNz9Cvflt9uCGuCA9vNuVzEig3HVCeSTTDDWbRhPKMXShmUR7fPeNGZ9enPBZUyl/mFQ938Sq5nwKFoivDKDwUB8o4lLH08BBvSRlNKDLOVks7PKyT/bgNlOhlMp8VooBVO5uHoECmuHI8FOQ2MlEc0jVkxMuVn8mqkMwmrrGHEKMecUtI5RDnryDIrKlyJG3iIohztIlrQ5qO3HLig7gOJJlvJJdFPjGbOeRwJDxXnJVXrGj5v7QVlMJ7YlqQwidmD/FsXl2FkOL8ITsvBryESCDJJ986BhBsPpA95fmP8GAORvCzO4REQ147QKgdpb1DqndK20GkKluBXUjVtVlYgUA1SoshWUxpU1kTUoF0rCfxIWlCBgmkS1iMPMiZkAAKBFJ2JjUVKZ0L2e+uL6M4qUGJmoQtVv+OYCgnvtS74vu8NShSE79XbLIJUaYqeu8Tq5+Q7JR4KC7iD6sy3brgreJEbVLPT+8NwTHrAIUOlDJDUSN2cKFUU2g9sXje+Z4lNG4NHikVxGfik8gPm0CxscBFErCYpZgv8LFusd2zYh2BDcF0VlpDsVU6F6OQ8FnBNxuAQxQxv7sJJG2RzFGES/+MoBjPJC7u5XWsWTen6xdDuU6R7uZbj4jGs2zhtoZycYHgX2E7gFb2XkWYJFDlyOLvg73wFX6qZj5oVCdqdKDI40clW/rSW/MiYYGf1gu15ePm4ei/TW1musCA9/e9qqp2Y/bCyOTxeLs4gy+2Q131hdDWw6n9OGA/O+uSddKDhBLLVM+5yAFx+h9vAalP8+3H73B1W5SvfcehhZTUjjt9Noi571JreWYE6A+Iue8iaGnWCItczI3VQkmi1m/bcjxXmTxSaI1lbXFdOTI7Kx2Z2/cFpai1eF8uq9fH/5Sj+mXHE1njFW5Qiv1Ipjv2wMFbOXaIX7q9h9NHSfbsXxJi7qivytZFiZ/+p1yi+lpTem43aM06jWJa2Kcd1JuK6/3OJn/DbgzleFq2RBTSm2iOZ2gIPURce0mIp0jYiZXGhiyFacxmp7r6mvFzdn1F7OaDvi7uoujr4naQvuwXiVlTfoNOXx/8mpi2XH7LVF8Ov/erLbZCFtBW2KSU57+PR8zVeBvaSga8Rastn/UE9Y29AaUNoSuX0lrQVcJ7tQfoyrk4HNNVhdLq5XyV421t65cIvdZl21xTFjG2rinEJ+aka9X7ay/1AvvCo01cBC31m0T0AruQzoA4R78XaOe+026iZcD6XNCl0r80O09tTJc+oR/v73To3nsPTvSb5p3eWpUyxvo9V3nDIHsNvSSjKuVY6JU/vKBF/2h6Vnjlfb9NbXbooXftDczvZV8e5+7qc97fWYsJXbEp+b52uqzTLd4TlNqSblIte8u9Qbc4BWeUm0W3qJS/Jqm8xjAA5zWG8d+lXrX0GAa7GJPReNNo27Gnb9iRNtXIH76m32OVNdX2m8UuzUe+47et7fSg4Xe9GYZhGIZhGIZhGIZhvJIfLCr2GzAyoncAAAAASUVORK5CYII=",yk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAaVBMVEUAAAAQFBgQExcQEhYLFRcQExcQExYPExcQEhcOFBUQEhcQExcPEhcPExcQEhcQExYQERcPExYPEhcQExYQEhcTExMUFBQQExcQExcQExcQFBcPEhcPExcPFBYSEhgcHBwRExcOExgQExdmmIFTAAAAInRSTlMAQL+AFuzVxbEj3KOWdF9OR7qnnmgZDPrkyY5WQzIqCXs2T8mN8gAAAeVJREFUeNrt3dlqwzAQRmFFdpx9X7omaf/3f8iSrSW0FqFy0Micc+2bDxsGI9A4IiIiIqJHNJuMFz5hxWzQiGOs9PU30Yzdk0y0jnSUstI+DtKTlXpRjkJ2KmIgK9mp344vS+rGQLo65V3KOjoXM01kCdIBAgQIECChgAABEg4IECDhgAABEg4IkLZBNrPipul7lpB1pV+95AcpF/qrIjfIVmoHxLcEstajIV6XHgsZqaZ5ZpCqxrF0eUFKnfO3rQqXGaT2CSBAgAABAgQIECBAgAABAgQIEFsQr38HBAgQIECAOF+bLvm6bEFaM9mBAAECBAgQIECAAAECBAgQIECAADlBruUO+Q4IECA/AQECJBwQIEDCAQECJBwQIEDCAQECJBwQIEDCAQECJBwQIEDCGYQ8XyCdpOncJgKykJ2Gd7wz0xuTri1jIFPZaRoDcUtZaeyiIK4rIx0iIe5VFqoGLhbi5r3ky8Wqj2aubd12JkXC5uX9IzPzgFgLiLWANN1h1w7IvlLvrQWQgY695Q/p69gwf8hQp/KHCAiQU0CAAAkHBAiQcAYhgyskbQ0s+36WnV7i/gTsNGKz/7GhrDRyUb3LSlt3V9bP1rqfLrZypPS9uiaaTVY+Yf3JvHRERERERA/oC7GKf5yH1bdrAAAAAElFTkSuQmCC",wk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAsVBMVEUAAAAEAAAEAAAEAAAFAAAEAAAEAAAEAAAEAAAEAAADAAAEAAAFAAAEAAAFAAAEAAAEAAAEAAAEAAAEAAAEAAADAAAGAAAAAAAAAAAEAAAEAAAEAAAAAAADAAAEAAAFAAAEAAAEAAAEAAADAAADAAAFAAAHAAAFAAAAAAAFAAAEAAAAAAAEAAAFAAADAAADAAAEAAAEAAADAAAEAAAFAAADAAAEAAAAAAADAAADAAAEAADKKhWhAAAAOnRSTlMAQIC/qMxgiXfrmPcyx2s677H74nJVKRQS0LmFCd22LtjUrJ2RNiUgGaNEDXxmW0nz5k6OZFK9Flfau44tfQAAB5tJREFUeNrs29lu2lAUheFlMGAwEAhDCXEgATOEMDQUMqz3f7CqalVtN8DGDLZP5e8J+C8W8jmykUqlUqlUKpVKpVKpVGJYS2c7humm8wf+Uu/AZK0e/3qHqfr+dwo2jORVc/xHHuaZPfOrOgwzyTS4Ux8m+ehynwyMUfZr3O8JZvCqdzxsCwOsbO5k1j/w732r3AkSbfnGIzlIrlGpxqPlkFAvzRxDWSGJVgMqvvtl2BRKSJzx/QMV3Q8AsCgUPSRLXt13Yz7FbxUKVSTIzVDd9/MMfzkU3pAUHX3fuaoHYXybwCfHtbrvmt9HUHDuPxC/cUHdd6+Fr1qB7SBuG3Xfn/Mpdvqk8IE43QyLPOz22cI+hYQcFN8ddd+VhYf9RpQ6iMd2cMvDXn/0cdhb7AfFtr7v+haqaswHxUWXiifnHdB1ahRuECmrpO3bHVo40jCug+JU33d2g+OtKLiISsvW9t0otBHKHYUFotAvfFIxWCOsecQHRU/fd875hvDGlCa4rpm671rpBqepU/BxRROnQkU3j5MtKRQREO2+PzNjnKMRwSVE+f5RfSRc40w+hS6E6PZdqXZwthElD0DE+y76I1xEYIJO1PuuL3Ep1WsdFFu2qz0Szse4nG8uhX5k+3aHM1zWM4UhLuBl06Miu3jBpa0oXWLfr+ojYRnX8Ehheea+m+q+B5mroVDJ7LUZedr523ZphAdL2bc5Rtits+nRLG3sYPmvNE0F/3rR9/3A5HE9BN08aU+29jrLBCojoKqdXJtTIJEhFqQZDymWLABGhJS4X2/jAaaE3HGPx/s+AHNCatzFfd4CMCqky6+yzQlgWkiB/2j4FoBDIXUH8WhnavtDLAY5L4ASYiE2vQO/o0LpA9BC7hCf/IEQh5Klh2QRH+vAbx27/0kIbAoFg0NaFIoGhwTfO1gbHFKgMDA4ZESpY25I8DGlaXBI8L0Dg0PeaxRG5oZgSKFkcMiKwu1pIZ384Kn2/TG77ECIOCR4TlyeEDLNvPKP18wUQrQhcwpv4UPaT8rFbFQhbUqTsCGWcjEbXQjqFDIhQyzlYjbKkDyFRsiQnPL9RJQhaFCYhQpZcIcFjla+aIhPwQ4VUjnzk5Z6+/QQba+dECEj5bJGM6d9coh6UVINEXLPne5xHMsly5cMaVLIhQgZcqchjuJlSfZODdHfOygfH9LlTl0o5KnOOjFEf+/APz7EPufjyO3P9s5tKZUYiKI9owKDIBdHFJWLHEUQlYsoVP//h52qI3U0FWB3JzOUY8169sGl1clOdwIwiOpF3vkbM7nIGxuo3oGM2uCiGRLB9w4uxCIL3sqaBJTNovQXsZefrljkts5bmE10HdALVxGcHIEIGHqVCdPqgBO2g4i9/jyLRSpw5GpjLxOFZETs0NTZI4LLPSRMbM5lEhShyEiOYhE6ctkNaxHzjjQxrXmKlI1fRipiz726BLE30jp9UikdcVEhgpPjRC5C4Zz/Mw9JQLj1Mfvo821s30PEPiK9KERoFG72tras9zA9tUfJtKzyhp5GBDUhqlDEpHcRx+uARFyBezyxp8iluYQCEQ/u0XMBTxEaGOOr1EReGTHUioDxVToij23ew7xxU6hdeYpQx0iOKYn82XM37KUy8d0Q7V26kY7I2e5XTUO3nR0nxzREKp0dd8OeCLKcS0TsuFFKSgQfKe8fSURcF4jY46sUREq8hUZAUlY3TZEIzYzkmLhIELFFu0AaemNLBD9+SFrktssW4cTpvxpoMn9z4iuC23mvpGfaxyJ0ZyTHZEXerazYrJELV8ccqAL2UaIiI+sIdj4iR+IAytrJUS+yKN1KsmKV3Al0F+6KTiLBKXenOCv2KUHwB67oRSoRM8+KKzJotdnknFJmbiRHvciws8lOhb1ZMbqk5MBNiIFaZPV1Yh4Pd2fFWY0SBSdHpcjt958+j2nDQ4cNmgvS4f9sVinSYIPryvasWCAV4YP3iaGtExlb3ZFwW1Yckw6OXsmBpnGCASKwpX0S0FPEBvOhVoQ59D0zlBUiRd7KW5dNzkgvwseXflcMZhOxyDPLGJCLCJ+AhQ41IZZSkTOWUe+5iXAdLBEgOX4IRQospEhqwPxemBwNEZjRMT1nEX2hfKhFniIWckyOIqhQcHIEIsbOjVl4ifBMVyh1NgAiRrQFVMlDRF8oZSBinf3ExN4iPFAUSksjMumymPrKX4TbikJpK0SOWc41uWAluII+OWKRMiu4IRd8NiMsYrfw9WtWLxDBNg1poQyEIiFriFbgjyDnTlgogUwkZhVdMmAfmsJCOZeILFlH6C2iL5RQILIOlSy8RfSFcgVF/GFf+jXCHGVARFQoF1kQERXKaSZEBIVSzoYIvtzZ+i0i1M+EiGANPsuCSJEE/HwRYU4Z/HSRvlNy9KdK6UQUTMSJUp+kExoxISdL5RAxHidHf9Z0gIMVTo7+PNMBjro4OfozppSaDxhOlDs6RDsIJ0d/WpROgw4z5EQp0QFapjg5+lOlQzSxcXL0p0IpjRUw6S7A+kGPM0GyEPmN3jLNV3lknE3kzOLXIW+/MJB5fkN5/CNb34QMrjn9CsIHysnJycnJycnJycnJycnB/AUiHJaNu/P1RgAAAABJRU5ErkJggg==",Ck={class:"title"},_k={class:"subTitle"},Qk={style:{width:"20px",display:"flex","justify-content":"center"}},xk={class:"mychart"},Fk=["id"],_f={__name:"HydroGraph",props:{id:{type:String,default(){return z2()}},chartOption:{type:Object,default(){return{}}},legendList:{type:Array,default(){return[]}},width:{type:String,default(){return"100%"}},height:{type:String,default(){return"100%"}},backgroundColor:{type:String,default(){return"#fff"}}},setup(A,{expose:e,emit:t}){qA([s2,MH,B2,N2,WL,sM,CL,G2]);const r=R.ref(),n=A;n.chartOption.series||(n.chartOption.series=[]);let i={};const a=t;let o={};R.watch(()=>n.chartOption,()=>{R.nextTick(()=>{let D=setInterval(()=>{document.getElementById(n.id)&&document.getElementById(n.id).offsetHeight>100&&document.getElementById(n.id).offsetWidth>100&&(y&&y.getOption()&&!n.chartOption.restoreZoom&&(o={...y.getOption().dataZoom[0],moveOnMouseMove:n.chartOption.series.some(M=>M.openBarDrag&&(M.type=="line"||M.type=="markLine"))?"ctrl":!0}),Q(),clearInterval(D))},100)})},{deep:!0,immediate:!0});let s={};R.watch(()=>n.legendList,()=>{y&&(s=y.getOption().legend[0].selected);let D=n.legendList.map(H=>{let K=u.find(N=>N.code==H.name);return K?{...H,...K}:{...H}}),M=JSON.parse(JSON.stringify(c.value));i={},c.value=D.map(H=>{const K=M.find(ue=>ue.name==H.name);i[H.name]=H,H.children&&(H.children=H.children.map(ue=>{i[ue.name]=ue;let ie="";return n.chartOption.isDefaultElement===!1?ie=s[ue.name]!=null?s[ue.name]:ue.isSelected:K&&K.children&&K.children.find(Se=>Se.name==ue.name)?ie=K.children.find(Se=>Se.name==ue.name).isSelected:ie=ue.isSelected,{...ue,isSelected:ie,id:Math.random()}}));let N="";return n.chartOption.isDefaultElement===!1?N=s[H.name]!=null?s[H.name]:H.isSelected:H.compel?N=H.isSelected:K?N=K.isSelected:N=H.isSelected,{...H,isSelected:N,id:Math.random()}})},{deep:!0});const l=[{name:"实况雨量",type:"bar",color:"#0000ff",unit:"mm"},{name:"实测水位",type:"line",color:"#304755",unit:"m"},{name:"库容",type:"line",color:"#197e2b",unit:"万m³"},{name:"5分钟水位",type:"line",color:"#304755",unit:"m"},{name:"5分钟库容",type:"line",color:"#197e2b",unit:"万m³"},{name:"校核洪水位",type:"markLine",color:"#ffa500",unit:"m"},{name:"设计洪水位",type:"markLine",color:"#a52a2a",unit:"m"},{name:"正常高水位",type:"markLine",color:"#008000",unit:"m"},{name:"死水位",type:"markLine",color:"#000000",unit:"m"},{name:"坝顶高程",type:"markLine",color:"#cf0ce1",unit:"m"},{name:"梅汛期",code:"MXQ",type:"markLine",color:"#ff0000",unit:"m"},{name:"台汛期",code:"TXQ",type:"markLine",color:"#ff0000",unit:"m"},{name:"累计降雨",type:"line",color:"red",unit:"mm"},{name:"可纳雨量",type:"bar",color:"#0000ff",unit:"mm"},{name:"作业预报时间",type:"markLine",color:"#ff0000"}],u=[{name:"实况雨量",code:"P",color:"#0000ff",icon:"histogram"},{name:"实测水位",code:"RZ",color:"#304755",icon:"straightLine",iconWidth:"30",iconHeight:"30"},{name:"库容",code:"W",color:"#197e2b",icon:"straightLine",iconWidth:"30",iconHeight:"30"}],f=["校核洪水位","设计洪水位","正常高水位","坝顶高程","死水位","主汛期"],c=R.ref(n.legendList.map((D,M)=>{let H=u.find(K=>K.code==D.name);return D.color||(D.color=O_[M]),H?{...D,...H}:{...D}}));c.value.forEach(D=>{i[D.name]=D,D.children&&D.children.forEach(M=>{i[M.name]=M})});const h=R.ref(!0);let v=null;const d=D=>{var H;let M=[];h.value=D,c.value.forEach(K=>{K.isSelected=D,M.push(K.name),K.children&&K.children.forEach(N=>{N.isSelected=D,M.push(N.name)})}),M.forEach(K=>{m[K]=D,F(K,D)}),o={...(H=y.getOption())==null?void 0:H.dataZoom[0]},Q()},g=(D,M)=>{var K;let H=[];c.value.forEach(N=>{N.name==M?(N.isSelected=D,N.children?N.children.forEach(ue=>{ue.isSelected=D,H.push(ue.name)}):H.push(N.name)):N.children&&N.children.forEach(ue=>{ue.name==M&&(ue.isSelected=D,H.push(ue.name),N.children.filter(ie=>ie.isSelected).length==N.children.length?N.isSelected=!0:N.isSelected=!1)})}),H.forEach(N=>{Array.isArray(N)?(m[N[0]]=D,m[N[1]]=D,F(N[0],D),F(N[1],D)):(m[N]=D,F(N,D))}),v=c.value.some(N=>N.isSelected==!1),v?h.value=!1:h.value=!0,o={...(K=y.getOption())==null?void 0:K.dataZoom[0]},Q()};R.onMounted(()=>{window.addEventListener("keydown",B)});let p={};const B=D=>{if(D.key==="i"){let M=JSON.parse(JSON.stringify(y.getOption()));M.series.forEach(H=>{H.markPoint&&H.markPoint.data.length!=0?H.markPoint.data=[]:H.markPoint&&H.markPoint.data==0&&(H.markPoint=p[H.name])}),y.setOption(M)}};let m={},y,_;const C=R.ref({}),Q=async()=>{let D=n.chartOption.series.map(w=>{let q="";return w.code?q=l.find(O=>O.code==w.code):q=l.find(O=>O.name==w.name),q?{...q,...w}:{...w}});c.value.forEach(w=>{m[w.name]=w.isSelected,w.children&&w.children.forEach(q=>{m[q.name]=q.isSelected})}),_=document.getElementById(n.id),y||(y=UT(_));let M=D.filter(w=>Array.isArray(w.data));const H=M.every(w=>Array.isArray(w.data)&&w.data.length===0),K=R_(new Date(xe().subtract(5,"day").format("YYYY-MM-DD 08:00")),new Date(xe().format("YYYY-MM-DD HH:00")),60).map(w=>[w,""]);let N=[];M.forEach(w=>{N=N.concat(w.data)}),N=[...new Set(N.map(w=>w[0]))],N.sort((w,q)=>Date.parse(w)-Date.parse(q)),N.some(w=>bu(w))&&(N=N.filter(w=>bu(w)));let ue=N[0];n.chartOption.series.forEach(w=>{w.name=="开始"&&w.sectionStartTime&&(ue=w.sectionStartTime)});let ie=JSON.parse(JSON.stringify(n.chartOption.grid)),Se=n.chartOption.xAxis.map((w,q)=>{let O="";w.show==!1||ie.length>1&&q==0?O=!1:O=!0;let se={type:w.type,logBase:w.logBase||10,gridIndex:w.gridIndex,name:O&&w.type=="time"?"时间":w.name,nameLocation:O&&w.type=="time"?"end":"middle",nameTextStyle:{color:"#333",verticalAlign:O&&w.type=="time"?"top":""},position:w.position,offset:w.offset?w.offset:0,inverse:w.inverse?w.inverse:!1,nameGap:O&&w.type=="time"?45:w.nameGap?w.nameGap:w.name?25:0,axisLabel:{show:O,rotate:w.rotate,formatter:function(ge){return w.type=="time"?S(xe(xe(ge).format("YYYY-MM-DD HH:mm")))?n.chartOption.xTimeType?`{a|${n.chartOption.xTimeType}}`:"{a|{yyyy}-{MM}-{dd} {HH}:{mm}}":n.chartOption.xTimeType?n.chartOption.xTimeType:"{MM}-{dd} {HH}:{mm}":w.name?w.name.includes("m³/s")?ra(ge):w.name.includes("万m³")?ge.toFixed(2):w.name.includes("mm")?ge.toFixed(1):w.name.includes("m")?ge.toFixed(2):(ge||ge==0)&&w.toFixed?Number(ge).toFixed(w.toFixed):ge:ge},rich:{a:{fontWeight:"bold"}},color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#333",hideOverlap:!0},axisLine:{show:!0,lineStyle:{color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#8a949c"}},splitLine:{show:w.splitLineHide?!1:w.gridIndex!=2,lineStyle:{color:"#e0e6f1"}},axisTick:{show:w.show==!1?!1:!(ie.length>1&&q==0),alignWithLabel:n.chartOption.alignWithLabel!=null?n.chartOption.alignWithLabel:!0},boundaryGap:w.boundaryGap?w.boundaryGap:["1%","1%"]};if(w.data&&(se.data=w.data),w.type=="value"||w.type=="log"){let ge=0,Ee=100,re=10;w.name.includes("m³/s")?(Ee=1e3,re=100):w.name.includes("万m³")&&(Ee=1e4,re=1e3);let k=n.chartOption.series.filter(ne=>ne.yAxisIndex==q),ce=[],z=[],W=0,Qe=100;k.forEach(ne=>{ne.data instanceof Array&&(ce=ce.concat(ne.data))}),ce[0]instanceof Array&&(z=ce.filter(ne=>ne[0]!=""&&ne[0]!=null&&ne[0]!=null&&!isNaN(ne[0])).map(ne=>Number(ne[0]))),z.length>0&&(W=Math.min(...z),Qe=Math.max(...z),k.some(ne=>ne.type=="bar")||w.name.includes("雨")?(ge=0,(W!==0||Qe!==0)&&(Ee=Math.ceil(Qe/Me(0,Qe))*Me(0,Qe),re=Me(0,Qe))):w.min||w.min==0?(ge=w.min,(W!==0||Qe!==0)&&(Ee=Math.ceil(Qe/Me(w.min,Qe))*Me(w.min,Qe),re=Me(w.min,Qe))):(W!==0||Qe!==0)&&(ge=Math.floor(W/Me(W,Qe))*Me(W,Qe),Ee=Math.ceil(Qe/Me(W,Qe))*Me(W,Qe),re=Me(W,Qe))),se.min=w.min!=""&&w.min!=null?w.min:ge,se.max=w.max!=""&&w.max!=null?w.max:Ee,se.interval=w.interval&&w.max&&(w.min||w.min==0)?w.interval:re,w.interval&&w.max&&(w.min||w.min==0)&&w.interval,se.minorTick={show:!!w.isMinorSplitLineShow}}return se}),He=n.chartOption.yAxis.map((w,q)=>{let O=0,se=100,ge=10;if(w.name.includes("m³/s")?(se=1e3,ge=100):w.name.includes("万m³")&&(se=1e4,ge=1e3),w.name=="可纳雨量(mm)")return{gridIndex:w.index,name:w.name,nameLocation:"middle",nameTextStyle:{color:"#333"},nameGap:w.nameGap,type:"value",position:w.position,offset:w.offset,min:w.min,max:w.max,interval:w.interval,axisLabel:{formatter:Ee=>Ee.toFixed(1),color:"#333"},axisLine:{show:!0,lineStyle:{color:"#8a949c"}},splitLine:{show:!1},minorTick:{show:!0},axisTick:{show:!0}};{let Ee=n.chartOption.series.filter(ne=>ne.yAxisIndex==q&&(m[ne.name]||!Object.keys(m).includes(ne.name))),re=[],k=[],ce=[],z=0,W=100,Qe=null;if(Ee.forEach(ne=>{ne.data instanceof Array?((ne.data2?ne.data2:ne.data).forEach(Ce=>{if(Ce instanceof Array&&Ce.length>=2){const Ke=Ce[1];if(Ke!=""&&Ke!=null&&Ke!=null&&!isNaN(Ke)){const $e=Number(Ke);Qe===null&&(Qe=$e)}}}),re=ne.data2?re.concat(ne.data2):re.concat(ne.data)):ne.data.name=="yAxis"&&ne.data.value&&ce.push(Number(ne.data.value))}),re[0]instanceof Array?k=re.filter(ne=>ne[1]!=""&&ne[1]!=null&&ne[1]!=null&&!isNaN(ne[1])).map(ne=>Number(ne[1])):re[0]instanceof Object&&re[0].value?k=re.map(pe=>pe.value).filter(pe=>pe!=""&&pe!=null&&pe!=null&&!isNaN(pe)).map(pe=>Number(pe)):k=re.filter(ne=>ne!=""&&ne!=null&&ne!=null&&!isNaN(ne)).map(ne=>Number(ne)),k.length>0||ce.length>0){if(z=Math.min(...k,...ce),W=Math.max(...k,...ce),Ee.some(ne=>ne.type=="bar")||w.name.includes("雨"))O=0,n.chartOption.xAxis.length>1&&w.inverse?(z!==0||W!==0)&&(se=Math.ceil(W/Me(0,W,1))*Me(0,W,1)+Me(0,W,1)*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=Me(0,W,1)):(z!==0||W!==0)&&(se=Math.ceil(W/Me(0,W))*Me(0,W)+Me(0,W)*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=Me(0,W));else if(w.min||w.min==0)O=w.min,(z!==0||W!==0)&&(se=Math.ceil(W/Me(w.min,W))*Me(w.min,W)+Me(w.min,W)*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=Me(w.min,W));else if(z!==0||W!==0)if(n.chartOption.xAxis.some(pe=>pe.type==="value")&&Qe!==null){O=Qe;const pe=Me(O,W);se=Math.ceil((W-O)/pe)*pe+O+pe*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=pe}else O=Math.floor(z/Me(z,W))*Me(z,W)-Me(z,W)*(w.downIntervalNumber!=null?w.downIntervalNumber:1),se=Math.ceil(W/Me(z,W))*Me(z,W)+Me(z,W)*(w.upIntervalNumber!=null?w.upIntervalNumber:1),ge=Me(z,W)}if(w.rangeType==1){let ne="",pe="";Math.abs(W)>Math.abs(z)?pe=Math.abs(W):pe=Math.abs(z),ne=Math.ceil(pe/Me(0,pe))*Me(0,pe),se=ne,O=0-ne,ge=Me(0,Math.abs(ne))}return{gridIndex:w.index,name:w.name,nameLocation:"middle",nameTextStyle:{color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#333"},nameGap:w.nameGap,type:w.type||"value",logBase:w.logBase||10,position:w.position,offset:w.offset?w.offset:0,inverse:w.inverse?w.inverse:!1,min:w.min!=""&&w.min!=null?w.min:O,max:w.max!=""&&w.max!=null?w.max:se,interval:w.interval&&w.max&&(w.min||w.min==0)?w.interval:ge,axisLabel:{formatter:ne=>w.name.includes("m³/s")?ra(ne):w.name.includes("万m³")?ne.toFixed(2):w.name.includes("mm")?ne.toFixed(1):w.name.includes("m")?ne.toFixed(2):ne,color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#333"},axisLine:{show:!0,lineStyle:{color:n.chartOption.yAxisColor?n.chartOption.yAxisColor:"#8a949c"}},axisTick:{show:!0},splitLine:{show:!(ie.length>1&&w.index==1&&w.position=="right"||ie.length==1&&w.index==0&&w.position=="right"||w.splitLineHide),lineStyle:{color:"#e0e6f1"}},minorTick:{show:!0},minorSplitLine:{show:ie.length>1&&w.index==1&&w.position=="right"||ie.length==1&&w.index==0&&w.position=="right"||w.splitLineHide?!1:!w.minorSplitLineHide,lineStyle:{color:"#f4f7fd"}},axisTick:{show:!0}}}}),G=D.some(w=>w.openBarDrag),de=D.map((w,q)=>{var se,ge,Ee;let O={};if(w.type=="bar")w.name=="可纳雨量"?O={name:w.name,type:w.type,xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,barWidth:w.barWidth,data:H?K:w.data,label:{show:!0,position:"top",color:"black",fontFamily:"Times New Roman"},itemStyle:{color:function(re){if(w.barColor=="1"){if(re.dataIndex===0)return"#ff0000";if(re.dataIndex===1)return"#a52a2a";if(re.dataIndex===2)return"#ffa500";if(re.dataIndex===3)return"#cf0ce1"}else return"#00a651"}},zlevel:9,z:9}:O={name:w.name,type:w.type,xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,label:{show:w.isLabelShow?w.isLabelShow:!1,position:"top",fontFamily:"Times New Roman",formatter:function(re){return"{a0|"+(Array.isArray(re.value)?re.value[1]:re.value)+"}"},rich:{a0:{color:i[w.name]?i[w.name].color:w.color,fontSize:12}}},stack:w.stack?w.stack:"",tooltip:{show:w.isTooltipShow!=!1,trigger:"axis",type:"none"},itemStyle:w.itemStyle?w.itemStyle:{color:function(re){let k=i[w.name]?i[w.name].color:w.color?w.color:O_[q];return w.color2&&re.value[1]<0?w.color2:k},decal:{symbol:w.pattern?w.pattern:"none"}},barCategoryGap:w.barCategoryGap?w.barCategoryGap:He[w.yAxisIndex].inverse?"0%":"20%",barGap:w.barGap?w.barGap:"0%",data:H?K:w.data,zlevel:9,z:9},w.barWidth&&(O.barWidth=w.barWidth,w.barGap?O.barGap=w.barGap:O.barGap="20%"),w.barMaxWidth&&(O.barMaxWidth=w.barMaxWidth,w.barGap?O.barGap=w.barGap:O.barGap="20%");else if(w.type=="line"){let re="rgba(0, 0, 0, 0)";n.chartOption.isFace&&(n.chartOption.faceNames?n.chartOption.faceNames.includes(w.name)&&(i[w.name]?re=i[w.name].color:re=w.color):i[w.name]?re=i[w.name].color:re=w.color);let k="",ce=!1;if(w.showSymbol||((se=i[w.name])==null?void 0:se.icon)=="dottedLine"?w.symbolSize?k=w.symbolSize:k=5:n.chartOption.isTooltipItem?(k=10,ce=!0):k=0,O={name:w.name,type:w.type,xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,itemStyle:{color:i[w.name]?i[w.name].color:w.color,opacity:w.showSymbol||((ge=i[w.name])==null?void 0:ge.icon)=="dottedLine"?1:0},lineStyle:w.lineStyle?w.lineStyle:{type:((Ee=i[w.name])==null?void 0:Ee.icon)=="dotted"?"dotted":"solid"},areaStyle:{color:re,opacity:.5},smooth:w.smooth!=null?w.smooth:!1,showSymbol:!0,symbol:w.symbol?w.symbol:"circle",connectNulls:!0,symbolSize:k,data:H?K:w.data,silent:G?w.openBarDrag!==!0:!1,triggerLineEvent:ce,zlevel:9,z:9},w.isMaxMinShow&&w.data.length>0){let z=w.data.filter(Ce=>!Ce[2]).filter(Ce=>Ce[1]),W=z.reduce((Ce,Ke)=>parseFloat(Ke[1])>parseFloat(Ce[1])?Ke:Ce,z[0]),Qe=W?W[0]:"",ne=W?W[1]:"",pe;N.forEach((Ce,Ke)=>{xe(Ce).isValid()&&Ce==Qe&&(Ce.markPointOffset||(Ke>=N.length/5*4?pe=[-200,0]:Ke>=N.length/5*3?pe=[-150,0]:Ke>=N.length/5*2?pe=[-100,0]:Ke>=N.length/5*1?pe=[-50,0]:Ke>=0&&(pe=[0,0])))}),O.markPoint={symbol:"pin",symbolSize:20,label:{show:w.isMarkPointLabelShow!==!1,position:"top",align:"left",fontSize:16,backgroundColor:w.backgroundColor?w.backgroundColor:i[w.name]?i[w.name].color:w.color,borderRadius:6,shadowColor:"#666666",shadowBlur:5,shadowOffsetX:3,shadowOffsetY:3,fontWeight:"bold",padding:[4,4,4,4],lineHeight:30,color:w.markPointColor?w.markPointColor:"#fff",formatter:Ce=>{let Ke="";if(Ce.data&&Ce.data.coord&&Ce.data.coord[0]){let Ar=w.tmType?w.tmType:"YYYY-MM-DD HH:mm";Ke=xe(Ce.data.coord[0]).format(Ar)}let $e="",BA="";if(Ce.name=="Max")return $e=w.maxText?w.maxText:"最大值",w.unit.includes("m³")?BA=Ce.value?ra(Ce.value):"--":w.unit.includes("mm")?BA=Ce.value?Number(Ce.value).toFixed(1):"--":w.unit.includes("m")?BA=Ce.value?Number(Ce.value).toFixed(2):"--":BA=Ce.value,w.tmText?`${$e}: {a0|${BA}} ${w.unit}
67
67
  ${w.tmText}: {a1|${Ke}}`:`${w.tmText2?w.tmText2:"相应时间"}: {a1|${Ke}}
68
68
  ${$e}: {a0|${BA}} ${w.unit}`},rich:{a0:{fontSize:25,fontFamily:"Times New Roman"},a1:{fontSize:20,fontFamily:"Times New Roman"}}},data:[{name:"Max",label:{offset:w.markPointOffset?w.markPointOffset:pe||[-120,0]},xAxis:Qe,yAxis:ne,value:ne}]}}}else if(w.type=="markLine"){let re={},k=[];w.labelType==2?(w.name=="开始"?k=[0,0,-80,180]:w.name=="结束"&&(k=[0,180,-120,0]),re={show:!w.labelHide,position:"end",fontWeight:"bold",padding:k,fontFamily:"Times New Roman",lineHeight:20,fontSize:15}):re={show:!w.labelHide,position:"insideStartTop",fontFamily:"Times New Roman",lineHeight:20,fontSize:15},O={name:w.name,type:"line",xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,markLine:{symbol:"none",label:re,data:[{lineStyle:{type:w.markLineStyle?w.markLineStyle:w.name=="开始"||w.name=="结束"?"dashed":[5,2],dashOffset:0,color:i[w.name]?i[w.name].color:w.color,width:w.name=="开始"||w.name=="结束"?5:1},[w.data.name]:String(w.data.value),label:{color:i[w.name]?i[w.name].color:w.color,fontFamily:"Times New Roman, serif",distance:-2,position:w.position?w.position:"insideStartTop",formatter:function(ce){if(w.labelType==2){let z="";return w.name=="开始"?z=`${w.name}: ${ce.value}`:w.name=="结束"&&(z=`${w.name}: ${te(ce.value)}`),w.labelArr&&w.labelArr.forEach(W=>{z+=`{a1|
69
69
  ${W.name}: ${W.value} ${W.unit}}`}),z}else{let z="";return(f.includes(w.name)||w.name.includes("梅汛期")||w.name.includes("台汛期"))&&(z="{a0|▽}"),w.data.name=="xAxis"?w.name:` ${z}${w.name}: ${w.data.value} ${w.unit} `}},rich:{a0:{fontSize:15},a1:{color:"red",fontSize:16,fontFamily:"黑体"}}},emphasis:{lineStyle:{width:w.name=="开始"||w.name=="结束"?6:3}}}]}}}else w.type=="scatter"?O={name:w.name,type:w.type,xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,symbolSize:w.symbolSize,itemStyle:{color:i[w.name]?i[w.name].color:w.color},data:H?K:w.data,zlevel:9,z:9}:w.type=="boxplot"&&(O={name:w.name,type:w.type,xAxisIndex:w.xAxisIndex,yAxisIndex:w.yAxisIndex,itemStyle:{color:i[w.name]?i[w.name].color:w.color,borderWidth:2,borderColor:"black"},boxWidth:w.boxWidth?w.boxWidth:30,emphasis:{itemStyle:{borderWidth:2}},data:H?K:w.data,zlevel:9,z:9});return w.markArea&&(w.markArea.data?O.markArea={silent:w.markArea.silent?w.markArea.silent:!1,label:w.markArea.label?w.markArea.label:{},itemStyle:w.markArea.itemStyle?w.markArea.itemStyle:{},data:w.markArea.data}:O.markArea={silent:!0,itemStyle:{opacity:w.markArea.opacity?w.markArea.opacity:.3,color:w.markArea.color?w.markArea.color:"#BEE6E6",borderColor:w.markArea.borderColor?w.markArea.borderColor:"red",borderWidth:w.markArea.borderWidth?w.markArea.borderWidth:2},data:[[{xAxis:w.markArea.start},{xAxis:w.markArea.end}]]}),O}),De=He.map(w=>w.name),st={},tr={};if(De.includes("水位(m)")&&De.includes("库容(万m³)")&&n.chartOption.stationCode){let w=He.find(k=>k.name=="水位(m)"),q=[];for(let k=w.min;k<=w.max;k+=w.interval)q.push(k);let O=[];for(let k=0;k<q.length;k++)if(w.max==100)O.push(k*1e3);else if(q[k]==0)O.push(0);else{let ce=await X(q[k],k);O.push(ce)}He.forEach(k=>{k.name=="水位(m)"?k.offset=80:k.name=="库容(万m³)"&&(k.offset=80,k.nameGap=-70,k.splitLine.show=!1,k.minorSplitLine.show=!1,k.axisLabel.inside=!0,k.axisTick.inside=!0,ie.length>1?k.gridIndex==0?(ie[k.gridIndex].left=150,ie[k.gridIndex].right=20,ie[1].left=150,ie[1].right=20):k.gridIndex==1&&(ie[0].left=150,ie[0].right=70,ie[k.gridIndex].left=150,ie[k.gridIndex].right=70):ie.length==1&&(ie[k.gridIndex].left=150,ie[k.gridIndex].right=20),k.position="left",k.max=w.max,k.min=w.min,k.interval=w.interval,k.axisLabel.formatter=(ce,z)=>O[z]||O[z]==0?Number(O[z]).toFixed(2):"")});let se=de.find(k=>k.name=="库容"),ge=de.find(k=>k.name=="5分钟库容"),Ee=de.find(k=>k.name=="实测水位"||k.name=="水位"),re=de.find(k=>k.name=="5分钟水位");se&&se.data&&se.data.forEach(k=>{st[k[0]]=k[1]}),ge&&ge.data&&ge.data.forEach(k=>{tr[k[0]]=k[1]}),de.forEach(k=>{k.name=="库容"?k.data=Ee.data:k.name=="5分钟库容"&&(k.data=re.data)})}let nn=[...N];if(N.some(w=>bu(w))&&(nn=nn.filter(w=>{let q=xe(w);if(bu(w)&&q.minute()===0&&q.second()===0)return w})),ie.length==1?de.push({name:"a",xAxisIndex:0,yAxisIndex:0,data:n.chartOption.series.length==0?K:nn.map(w=>[w,void 0]),type:"line",z:9,zlevel:9}):de.push({name:"a",xAxisIndex:0,yAxisIndex:0,data:n.chartOption.series.length==0?K:nn.map(w=>[w,void 0]),type:"line",z:9,zlevel:9},{name:"b",xAxisIndex:1,yAxisIndex:He.findIndex(w=>w.gridIndex==1),data:n.chartOption.series.length==0?K:nn.map(w=>[w,void 0]),type:"line",z:9,zlevel:9}),ie.length==1?ie.forEach((w,q)=>{w.top=w.newTop?w.newTop:10,w.bottom=w.newBottom?w.newBottom:n.chartOption.xAxis[q].name?40:20}):ie.length==2?ie.forEach((w,q)=>{q==0?(w.top=10,w.height=n.chartOption.isTwoXAxis?"48%":"26%"):q==1&&(w.top=n.chartOption.isTwoXAxis?"52%":"30%",w.bottom=n.chartOption.xAxis[q].name?40:20)}):ie.length==3&&ie.forEach((w,q)=>{q==0?(w.top=10,w.height="26%"):(q==1||q==2)&&(w.top="30%",w.bottom=40)}),C.value={animation:!0,tooltip:{show:!(n.chartOption.isTooltipItem||n.chartOption.tooltipShow==!1),hideDelay:0,triggerOn:"mousemove",trigger:n.chartOption.tooltipType=="1"?"item":"axis",axisPointer:{animation:!1,animationDuration:1e3,animationDurationUpdate:200},formatter:function(w){if(n.chartOption.tooltipType=="1"){if(w.componentSubType=="boxplot"){let q=M[0]?M[0].unit:"",O=w.name+"<br/>";return O+=`<div style='padding-right:8px'>
@@ -118,4 +118,4 @@ ${W.name}: ${W.value} ${W.unit}}`}),z}else{let z="";return(f.includes(w.name)||w
118
118
  ${w.seriesName}: ${se[1]} ${O.unit}`,label:{offset:ce||[-120,0]}}],C.value.series[ge].markPoint={symbol:"pin",symbolSize:20,label:{show:!0,position:"top",align:"left",fontSize:16,backgroundColor:O.backgroundColor?O.backgroundColor:i[O.name]?i[O.name].color:O.color,borderRadius:6,shadowColor:"#666666",shadowBlur:5,shadowOffsetX:3,shadowOffsetY:3,fontWeight:"bold",padding:[4,4,4,4],lineHeight:30,color:O.markPointColor?O.markPointColor:"#fff",formatter:z=>{let W="",Qe=O.tmType?O.tmType:"YYYY-MM-DD HH:mm";z.data&&z.data.coord&&z.data.coord[0]&&(W=xe(z.data.coord[0]).format(Qe));let ne="",pe="";if(z.name=="Max"||z.name=="Min"){if(z.name=="Max")return ne=O.maxText?O.maxText:"最大值",O.unit.includes("m³")?pe=z.value?ra(z.value):"--":O.unit.includes("mm")?pe=z.value?Number(z.value).toFixed(1):"--":O.unit.includes("m")?pe=z.value?Number(z.value).toFixed(2):"--":pe=z.value,O.tmText?`${ne}: {a0|${pe}} ${O.unit}
119
119
  ${O.tmText}: {a1|${W}}`:`${O.tmText2?O.tmText2:"相应时间"}: {a1|${W}}
120
120
  ${ne}: {a0|${pe}} ${O.unit}`}else return`相应时间: {a1|${xe(z.data.coord[0]).format(Qe)}}
121
- ${O.name}: {a0|${z.data.coord[1]}} ${O.unit}`},rich:{a0:{fontSize:25,fontFamily:"Times New Roman"},a1:{fontSize:20,fontFamily:"Times New Roman"}}},data:k},C.value.dataZoom[0]={...(q=y.getOption())==null?void 0:q.dataZoom[0]},y.setOption(C.value,!0),y.getOption().series.map(z=>{z.markPoint&&(p[z.name]=z.markPoint)})}}}),y.on("mousedown",function(w){y.setOption({tooltip:{show:!1}}),y.dispatchAction({type:"hideTip"});let q=w.seriesIndex,O=n.chartOption.series[q],se=O.stepTM?O.stepTM:60,ge="",Ee="",re="";if(O.openBarDrag){let k={},ce={},z=n.chartOption.yAxis[O.yAxisIndex],W=[];w.componentType=="markLine"&&O.data.name=="xAxis"?W=C.value.series.map((Ce,Ke)=>Ce.name=="开始"||Ce.name=="结束"?JSON.parse(JSON.stringify(Ce)):{}):W=C.value.series.map((Ce,Ke)=>Ke==q?{data:JSON.parse(JSON.stringify(Ce.data))}:{});let Qe,ne,pe;n.chartOption.fixedTimePeriod&&(ge=n.chartOption.series.find(Ce=>Ce.name=="开始").data.value,Ee=n.chartOption.series.find(Ce=>Ce.name=="结束").data.value,re=xe(Ee).diff(xe(ge),"hour")),y.getZr().off("mousemove"),y.getZr().off("mouseup"),y.getZr().on("mousemove",function(Ce){if(w.componentType=="markLine"&&O.data.name=="xAxis"){let Ke=y.convertFromPixel({xAxisIndex:O.xAxisIndex},Ce.offsetX),$e=xe(Ke).format("YYYY-MM-DD HH:00");if($e!==Qe){const BA=xe($e),Ar=xe(N[N.length-1]),Qf=ue?xe(ue):"";if(BA.isAfter(Ar)||BA.isBefore(Qf))return;if(n.chartOption.fixedTimePeriod){if(O.name=="开始"?pe=xe($e).add(re,"hours").format("YYYY-MM-DD HH:00"):O.name=="结束"&&(pe=xe($e).add(-re,"hours").format("YYYY-MM-DD HH:00")),O.name=="开始"&&xe(pe).isAfter(Ar))return;if(O.name=="结束"&&xe(pe).isBefore(Qf))return;W.forEach(At=>{O.name=="开始"?At.name=="开始"?(At.markLine.data[0].xAxis=$e,At.markArea.data[0][0].xAxis=$e,At.markArea.data[0][1].xAxis=pe):At.name=="结束"&&(At.markLine.data[0].xAxis=pe):O.name=="结束"&&(At.name=="开始"?(At.markLine.data[0].xAxis=pe,At.markArea.data[0][0].xAxis=pe,At.markArea.data[0][1].xAxis=$e):At.name=="结束"&&(At.markLine.data[0].xAxis=$e))})}else W.forEach(At=>{O.name=="开始"?At.name=="开始"&&(At.markLine.data[0].xAxis=$e,At.markArea.data[0][0].xAxis=$e):O.name=="结束"&&(At.name=="开始"?At.markArea.data[0][1].xAxis=$e:At.name=="结束"&&(At.markLine.data[0].xAxis=$e))});y.setOption({series:W},{notMerge:!1,lazyUpdate:!0}),Qe=$e}}else{let[Ke,$e]=y.convertFromPixel({seriesIndex:q},[Ce.offsetX,Ce.offsetY]);if(xe(Ke).format("YYYY-MM-DD HH:00")!==Qe||!ne||Math.abs($e-ne)>=.5){const BA=xe(Ke).format("YYYY-MM-DD HH:00");ce[BA]=$e;let Ar=Object.keys(ce),Qf=new Set(Ar);W[q].data.forEach(Pt=>{Qf.has(Pt[0])&&(Pt[1]=ce[Pt[0]])});let At=R_(new Date(Ar[0]),new Date(Ar[Ar.length-1]),se),Sp=Object.entries(ce),bk=new Set(Ar);At.forEach(Pt=>{bk.has(Pt)||Sp.push(ee(Sp,Pt))});let jo={};Sp.forEach(Pt=>{jo[Pt[0]]=Pt[1]});let Sk=Object.keys(jo),Uk=new Set(Sk);W[q].data.forEach(Pt=>{if(Uk.has(Pt[0])){let xf="";z.name.includes("m³")?xf=ra(jo[Pt[0]]):z.name.includes("mm")?xf=jo[Pt[0]].toFixed(1):z.name.includes("m")&&(xf=jo[Pt[0]].toFixed(2)),Pt[1]=xf}}),y.setOption({series:W},{notMerge:!1,lazyUpdate:!0}),Qe=BA,ne=$e}}}),y.getZr().on("mouseup",function(){if(y.getZr().off("mousemove"),y.getZr().off("mouseup"),w.componentType=="markLine"&&O.data.name=="xAxis"){if(Qe)if(pe){const Ce=xe(N[N.length-1]),Ke=ue?xe(ue):"";O.name=="开始"&&xe(pe).isAfter(Ce)?pe=xe(Qe).add(re,"hours").format("YYYY-MM-DD HH:00"):O.name=="结束"&&xe(pe).isBefore(Ke)&&(pe=xe(Qe).add(-re,"hours").format("YYYY-MM-DD HH:00")),k={name:"开始/结束",value:O.name=="开始"?`${Qe}/${pe}`:`${pe}/${Qe}`}}else k={name:O.name,value:Qe}}else k={name:w.seriesName,data:W[q].data};k.name&&a("getNewSeriesData",k),y.getZr().on("mousemove",function(Ce){let Ke=Ce.offsetX,$e=Ce.offsetY;y.dispatchAction({type:"showTip",x:Ke,y:$e})})})}}),window.onresize=function(){y.resize()}},x=D=>{R.nextTick(()=>{y&&y.resize()})},F=(D,M)=>{y.dispatchAction({type:M?"legendSelect":"legendUnSelect",name:D})};function S(D){return D.month()===0&&D.date()===1&&D.hour()===0&&D.minute()===0}function E(D){D.preventDefault();let M=document.querySelector("body .chartMenu");M&&M.remove();let H=D.pageX,K=D.pageY,N=document.createElement("ul");N.style.position="absolute",N.style.left=H+"px",N.style.top=K+"px",N.className="chartMenu";let ue=document.createElement("li");ue.style.cursor="pointer",ue.innerHTML=`<div><img src='${mk}'><span>还原缩放</span></div>`,N.appendChild(ue);let ie=document.createElement("li");ie.style.cursor="pointer",ie.innerHTML=`<div><img src='${yk}'><span>复制图片</span></div>`,N.appendChild(ie);let Se=document.createElement("li");Se.style.cursor="pointer",Se.innerHTML=`<div><img src='${wk}'><span>导出图片</span></div>`,N.appendChild(Se),ue.addEventListener("click",()=>{y.dispatchAction({type:"dataZoom",dataZoomIndex:0,start:0,end:100})}),ie.addEventListener("click",()=>{k1(r.value,{useCORS:!0,scale:2,width:r.value.offsetWidth,height:r.value.offsetHeight+50,backgroundColor:"#fff",allowTaint:!0,removeContainer:!0}).then(He=>{const G=He.toDataURL("image/png"),de=I(G,"图片");U(de),Ai.ElMessage.success("复制成功")})}),Se.addEventListener("click",()=>{P()}),document.body.appendChild(N),document.addEventListener("click",()=>{N.parentNode&&document.body.removeChild(N)})}const I=(D,M="file")=>{const H=D.split(","),K=H[0].match(/:(.*?);/)[1],N=K.split("/")[1],ue=window.atob(H[1]);let ie=ue.length;const Se=new Uint8Array(ie);for(;ie--;)Se[ie]=ue.charCodeAt(ie);return new File([Se],`${M}.${N}`,{type:K})},U=D=>{const M=new FileReader;M.onload=H=>{const K=H.target.result.toString(),N=new Image;N.src=K,N.onload=()=>{let ue=T(N),ie=L(ue.replace("data:image/png;base64,",""),"image/png",512);navigator.clipboard.write([new ClipboardItem({"image/png":ie})])}},M.readAsDataURL(D)},T=D=>{let M=document.createElement("canvas");return M.width=D.width,M.height=D.height,M.getContext("2d").drawImage(D,0,0,D.width,D.height),M.toDataURL("image/png")},L=(D,M,H)=>{M=M||"",H=H||512;let K=window.atob(D),N=[];for(let ie=0;ie<K.length;ie+=H){let Se=K.slice(ie,ie+H),He=new Array(Se.length);for(let de=0;de<Se.length;de++)He[de]=Se.charCodeAt(de);let G=new Uint8Array(He);N.push(G)}return new Blob(N,{type:M})},P=()=>{k1(r.value,{useCORS:!0,scale:1,width:r.value.offsetWidth,height:r.value.offsetHeight+50,backgroundColor:"#fff",allowTaint:!0,removeContainer:!0}).then(D=>{const M=D.toDataURL("image/png"),H=document.createElement("a");H.href=M,H.download=n.chartOption.title,H.click()})},Z=R.ref();function V(){return Z.value?Z.value.offsetHeight:0}function X(D,M){return new Promise(H=>{Y2({STCD:n.chartOption.stationCode,rzw:D}).then(K=>{K.statusCode==200&&K.data?H(K.data):H(M*1e3)})})}function ee(D,M){if(D.length>0){let H=D.filter(N=>xe(N[0]).isBefore(xe(M))),K=D.filter(N=>xe(N[0]).isAfter(xe(M)));if(H.length==0)return[M,K[0][1]];if(K.length==0)return[M,H[H.length-1][1]];{let N=xe(M).diff(xe(H[H.length-1][0]),"seconds"),ue=K[0][1]-H[H.length-1][1],ie=xe(K[0][0]).diff(xe(H[H.length-1][0]),"seconds"),Se=N*ue/ie+H[H.length-1][1];return[M,Number(Se)]}}}function te(D){var ie;let M=(ie=n.chartOption.series.find(Se=>Se.name=="开始"))==null?void 0:ie.data.value;const H=xe(M),K=xe(D),N=H.year()===K.year();return N&&H.month()===K.month()?K.format("DD HH:mm"):N?K.format("MM-DD HH:mm"):K.format("YYYY-MM-DD HH:mm")}return e({getLegendBoxHeight:V,onChange:g}),(D,M)=>{const H=R.resolveComponent("el-checkbox"),K=R.resolveComponent("svg-icon"),N=R.resolveComponent("el-icon"),ue=R.resolveComponent("el-dropdown-item"),ie=R.resolveComponent("el-dropdown-menu"),Se=R.resolveComponent("el-dropdown"),He=R.resolveDirective("resize");return R.withDirectives((R.openBlock(),R.createElementBlock("div",{class:"box",ref_key:"chartBox",ref:r,onContextmenu:M[1]||(M[1]=G=>E(G))},[R.withDirectives((R.openBlock(),R.createElementBlock("div",_k,[R.createTextVNode(R.toDisplayString(A.chartOption.title),1)])),[[R.vShow,A.chartOption.title],[He,x]]),R.withDirectives((R.openBlock(),R.createElementBlock("div",Qk,[R.createTextVNode(R.toDisplayString(A.chartOption.subTitle),1)])),[[R.vShow,A.chartOption.subTitle],[He,x]]),R.withDirectives((R.openBlock(),R.createElementBlock("div",{class:"legend-box",ref_key:"myLegend",ref:Z},[c.value.length>1?(R.openBlock(),R.createBlock(H,{key:0,modelValue:h.value,"onUpdate:modelValue":M[0]||(M[0]=G=>h.value=G),label:"全选",onChange:d,style:{"--fill-color":"#409EFF"}},null,8,["modelValue"])):R.createCommentVNode("",!0),(R.openBlock(!0),R.createElementBlock(R.Fragment,null,R.renderList(c.value,(G,de)=>(R.openBlock(),R.createElementBlock(R.Fragment,{key:de},[G.children?R.createCommentVNode("",!0):(R.openBlock(),R.createBlock(H,{key:0,modelValue:G.isSelected,"onUpdate:modelValue":De=>G.isSelected=De,onChange:De=>g(De,G.name),style:R.normalizeStyle({"--fill-color":G.color?G.color:"#409EFF"})},{default:R.withCtx(()=>[G.icon?(R.openBlock(),R.createBlock(K,{key:0,"icon-class":G.icon,style:R.normalizeStyle({width:G.iconWidth?G.iconWidth+"px":"20px",height:G.iconHeight?G.iconHeight+"px":"20px"}),color:G.color},null,8,["icon-class","style","color"])):R.createCommentVNode("",!0),R.createElementVNode("span",{style:R.normalizeStyle({color:G.color,marginLeft:"3px"})},R.toDisplayString(G.key?G.key:G.name),5),G.children&&G.children.length>0?(R.openBlock(),R.createBlock(N,{key:1,class:"el-icon--right"},{default:R.withCtx(()=>[R.createVNode(R.unref(V1))]),_:1})):R.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","style"])),G.children&&G.children.length>0?(R.openBlock(),R.createBlock(Se,{key:1,"hide-on-click":!1},{dropdown:R.withCtx(()=>[R.createVNode(ie,null,{default:R.withCtx(()=>[(R.openBlock(!0),R.createElementBlock(R.Fragment,null,R.renderList(G.children,(De,st)=>(R.openBlock(),R.createBlock(ue,{key:st},{default:R.withCtx(()=>[R.createVNode(H,{modelValue:De.isSelected,"onUpdate:modelValue":tr=>De.isSelected=tr,onChange:tr=>g(tr,De.name),style:R.normalizeStyle({"--fill-color":De.color?De.color:"#409EFF"})},{default:R.withCtx(()=>[R.createElementVNode("div",xk,[De.icon?(R.openBlock(),R.createBlock(K,{key:0,"icon-class":De.icon,style:R.normalizeStyle({width:De.iconWidth?De.iconWidth+"px":"20px",height:De.iconHeight?De.iconHeight+"px":"20px"}),color:De.color},null,8,["icon-class","style","color"])):R.createCommentVNode("",!0)]),R.createElementVNode("span",{style:R.normalizeStyle({color:De.color,marginLeft:"3px"})},R.toDisplayString(De.key?De.key:De.name),5)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","style"])]),_:2},1024))),128))]),_:2},1024)]),default:R.withCtx(()=>[R.createVNode(H,{modelValue:G.isSelected,"onUpdate:modelValue":De=>G.isSelected=De,onChange:De=>g(De,G.name),style:R.normalizeStyle({"--fill-color":G.color?G.color:"#409EFF"})},{default:R.withCtx(()=>[G.icon?(R.openBlock(),R.createBlock(K,{key:0,"icon-class":G.icon,style:R.normalizeStyle({width:G.iconWidth?G.iconWidth+"px":"20px",height:G.iconHeight?G.iconHeight+"px":"20px"}),color:G.color},null,8,["icon-class","style","color"])):R.createCommentVNode("",!0),R.createElementVNode("span",{style:R.normalizeStyle({color:G.color,marginLeft:"3px"})},R.toDisplayString(G.key?G.key:G.name),5),G.children&&G.children.length>0?(R.openBlock(),R.createBlock(N,{key:1,class:"el-icon--right"},{default:R.withCtx(()=>[R.createVNode(R.unref(V1))]),_:1})):R.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","style"])]),_:2},1024)):R.createCommentVNode("",!0)],64))),128))])),[[He,x]]),R.createElementVNode("div",Fk,[R.createElementVNode("div",{id:A.id,style:R.normalizeStyle({width:A.width,height:A.height})},null,12,Ek)])],32)),[[He,x]])}}},[["__scopeId","data-v-ce77c76b"]]);_f.install=A=>{A.component("ElCheckbox",Ai.ElCheckbox),A.component("ElIcon",Ai.ElIcon),A.component("ElDropdown",Ai.ElDropdown),A.component("ElDropdownMenu",Ai.ElDropdownMenu),A.component("ElDropdownItem",Ai.ElDropdownItem),A.component("HydroGraph",_f)},TA.HydroGraph=_f,TA.default=_f,Object.defineProperties(TA,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
121
+ ${O.name}: {a0|${z.data.coord[1]}} ${O.unit}`},rich:{a0:{fontSize:25,fontFamily:"Times New Roman"},a1:{fontSize:20,fontFamily:"Times New Roman"}}},data:k},C.value.dataZoom[0]={...(q=y.getOption())==null?void 0:q.dataZoom[0]},y.setOption(C.value,!0),y.getOption().series.map(z=>{z.markPoint&&(p[z.name]=z.markPoint)})}}}),y.on("mousedown",function(w){y.setOption({tooltip:{show:!1}}),y.dispatchAction({type:"hideTip"});let q=w.seriesIndex,O=n.chartOption.series[q],se=O.stepTM?O.stepTM:60,ge="",Ee="",re="";if(O.openBarDrag){let k={},ce={},z=n.chartOption.yAxis[O.yAxisIndex],W=[];w.componentType=="markLine"&&O.data.name=="xAxis"?W=C.value.series.map((Ce,Ke)=>Ce.name=="开始"||Ce.name=="结束"?JSON.parse(JSON.stringify(Ce)):{}):W=C.value.series.map((Ce,Ke)=>Ke==q?{data:JSON.parse(JSON.stringify(Ce.data))}:{});let Qe,ne,pe;n.chartOption.fixedTimePeriod&&(ge=n.chartOption.series.find(Ce=>Ce.name=="开始").data.value,Ee=n.chartOption.series.find(Ce=>Ce.name=="结束").data.value,re=xe(Ee).diff(xe(ge),"hour")),y.getZr().off("mousemove"),y.getZr().off("mouseup"),y.getZr().on("mousemove",function(Ce){if(w.componentType=="markLine"&&O.data.name=="xAxis"){let Ke=y.convertFromPixel({xAxisIndex:O.xAxisIndex},Ce.offsetX),$e=xe(Ke).format("YYYY-MM-DD HH:00");if($e!==Qe){const BA=xe($e),Ar=xe(N[N.length-1]),Qf=ue?xe(ue):"";if(BA.isAfter(Ar)||BA.isBefore(Qf))return;if(n.chartOption.fixedTimePeriod){if(O.name=="开始"?pe=xe($e).add(re,"hours").format("YYYY-MM-DD HH:00"):O.name=="结束"&&(pe=xe($e).add(-re,"hours").format("YYYY-MM-DD HH:00")),O.name=="开始"&&xe(pe).isAfter(Ar))return;if(O.name=="结束"&&xe(pe).isBefore(Qf))return;W.forEach(At=>{O.name=="开始"?At.name=="开始"?(At.markLine.data[0].xAxis=$e,At.markArea.data[0][0].xAxis=$e,At.markArea.data[0][1].xAxis=pe):At.name=="结束"&&(At.markLine.data[0].xAxis=pe):O.name=="结束"&&(At.name=="开始"?(At.markLine.data[0].xAxis=pe,At.markArea.data[0][0].xAxis=pe,At.markArea.data[0][1].xAxis=$e):At.name=="结束"&&(At.markLine.data[0].xAxis=$e))})}else W.forEach(At=>{O.name=="开始"?At.name=="开始"&&(At.markLine.data[0].xAxis=$e,At.markArea.data[0][0].xAxis=$e):O.name=="结束"&&(At.name=="开始"?At.markArea.data[0][1].xAxis=$e:At.name=="结束"&&(At.markLine.data[0].xAxis=$e))});y.setOption({series:W},{notMerge:!1,lazyUpdate:!0}),Qe=$e}}else{let[Ke,$e]=y.convertFromPixel({seriesIndex:q},[Ce.offsetX,Ce.offsetY]);if(xe(Ke).format("YYYY-MM-DD HH:00")!==Qe||!ne||Math.abs($e-ne)>=.5){const BA=xe(Ke).format("YYYY-MM-DD HH:00");ce[BA]=$e;let Ar=Object.keys(ce),Qf=new Set(Ar);W[q].data.forEach(Pt=>{Qf.has(Pt[0])&&(Pt[1]=ce[Pt[0]])});let At=R_(new Date(Ar[0]),new Date(Ar[Ar.length-1]),se),Sp=Object.entries(ce),Ek=new Set(Ar);At.forEach(Pt=>{Ek.has(Pt)||Sp.push(ee(Sp,Pt))});let jo={};Sp.forEach(Pt=>{jo[Pt[0]]=Pt[1]});let bk=Object.keys(jo),Sk=new Set(bk);W[q].data.forEach(Pt=>{if(Sk.has(Pt[0])){let xf="";z.name.includes("m³")?xf=ra(jo[Pt[0]]):z.name.includes("mm")?xf=jo[Pt[0]].toFixed(1):z.name.includes("m")&&(xf=jo[Pt[0]].toFixed(2)),Pt[1]=xf}}),y.setOption({series:W},{notMerge:!1,lazyUpdate:!0}),Qe=BA,ne=$e}}}),y.getZr().on("mouseup",function(){if(y.getZr().off("mousemove"),y.getZr().off("mouseup"),w.componentType=="markLine"&&O.data.name=="xAxis"){if(Qe)if(pe){const Ce=xe(N[N.length-1]),Ke=ue?xe(ue):"";O.name=="开始"&&xe(pe).isAfter(Ce)?pe=xe(Qe).add(re,"hours").format("YYYY-MM-DD HH:00"):O.name=="结束"&&xe(pe).isBefore(Ke)&&(pe=xe(Qe).add(-re,"hours").format("YYYY-MM-DD HH:00")),k={name:"开始/结束",value:O.name=="开始"?`${Qe}/${pe}`:`${pe}/${Qe}`}}else k={name:O.name,value:Qe}}else k={name:w.seriesName,data:W[q].data};k.name&&a("getNewSeriesData",k),y.getZr().on("mousemove",function(Ce){let Ke=Ce.offsetX,$e=Ce.offsetY;y.dispatchAction({type:"showTip",x:Ke,y:$e})})})}}),window.onresize=function(){y.resize()}},x=D=>{R.nextTick(()=>{y&&y.resize()})},F=(D,M)=>{y.dispatchAction({type:M?"legendSelect":"legendUnSelect",name:D})};function S(D){return D.month()===0&&D.date()===1&&D.hour()===0&&D.minute()===0}function E(D){D.preventDefault();let M=document.querySelector("body .chartMenu");M&&M.remove();let H=D.pageX,K=D.pageY,N=document.createElement("ul");N.style.position="absolute",N.style.left=H+"px",N.style.top=K+"px",N.className="chartMenu";let ue=document.createElement("li");ue.style.cursor="pointer",ue.innerHTML=`<div><img src='${mk}'><span>还原缩放</span></div>`,N.appendChild(ue);let ie=document.createElement("li");ie.style.cursor="pointer",ie.innerHTML=`<div><img src='${yk}'><span>复制图片</span></div>`,N.appendChild(ie);let Se=document.createElement("li");Se.style.cursor="pointer",Se.innerHTML=`<div><img src='${wk}'><span>导出图片</span></div>`,N.appendChild(Se),ue.addEventListener("click",()=>{y.dispatchAction({type:"dataZoom",dataZoomIndex:0,start:0,end:100})}),ie.addEventListener("click",()=>{k1(r.value,{useCORS:!0,scale:2,width:r.value.offsetWidth,height:r.value.offsetHeight+50,backgroundColor:"#fff",allowTaint:!0,removeContainer:!0}).then(He=>{const G=He.toDataURL("image/png"),de=I(G,"图片");U(de),Ai.ElMessage.success("复制成功")})}),Se.addEventListener("click",()=>{P()}),document.body.appendChild(N),document.addEventListener("click",()=>{N.parentNode&&document.body.removeChild(N)})}const I=(D,M="file")=>{const H=D.split(","),K=H[0].match(/:(.*?);/)[1],N=K.split("/")[1],ue=window.atob(H[1]);let ie=ue.length;const Se=new Uint8Array(ie);for(;ie--;)Se[ie]=ue.charCodeAt(ie);return new File([Se],`${M}.${N}`,{type:K})},U=D=>{const M=new FileReader;M.onload=H=>{const K=H.target.result.toString(),N=new Image;N.src=K,N.onload=()=>{let ue=T(N),ie=L(ue.replace("data:image/png;base64,",""),"image/png",512);navigator.clipboard.write([new ClipboardItem({"image/png":ie})])}},M.readAsDataURL(D)},T=D=>{let M=document.createElement("canvas");return M.width=D.width,M.height=D.height,M.getContext("2d").drawImage(D,0,0,D.width,D.height),M.toDataURL("image/png")},L=(D,M,H)=>{M=M||"",H=H||512;let K=window.atob(D),N=[];for(let ie=0;ie<K.length;ie+=H){let Se=K.slice(ie,ie+H),He=new Array(Se.length);for(let de=0;de<Se.length;de++)He[de]=Se.charCodeAt(de);let G=new Uint8Array(He);N.push(G)}return new Blob(N,{type:M})},P=()=>{k1(r.value,{useCORS:!0,scale:1,width:r.value.offsetWidth,height:r.value.offsetHeight+50,backgroundColor:"#fff",allowTaint:!0,removeContainer:!0}).then(D=>{const M=D.toDataURL("image/png"),H=document.createElement("a");H.href=M,H.download=n.chartOption.title,H.click()})},Z=R.ref();function V(){return Z.value?Z.value.offsetHeight:0}function X(D,M){return new Promise(H=>{Y2({STCD:n.chartOption.stationCode,rzw:D}).then(K=>{K.statusCode==200&&K.data?H(K.data):H(M*1e3)})})}function ee(D,M){if(D.length>0){let H=D.filter(N=>xe(N[0]).isBefore(xe(M))),K=D.filter(N=>xe(N[0]).isAfter(xe(M)));if(H.length==0)return[M,K[0][1]];if(K.length==0)return[M,H[H.length-1][1]];{let N=xe(M).diff(xe(H[H.length-1][0]),"seconds"),ue=K[0][1]-H[H.length-1][1],ie=xe(K[0][0]).diff(xe(H[H.length-1][0]),"seconds"),Se=N*ue/ie+H[H.length-1][1];return[M,Number(Se)]}}}function te(D){var ie;let M=(ie=n.chartOption.series.find(Se=>Se.name=="开始"))==null?void 0:ie.data.value;const H=xe(M),K=xe(D),N=H.year()===K.year();return N&&H.month()===K.month()?K.format("DD HH:mm"):N?K.format("MM-DD HH:mm"):K.format("YYYY-MM-DD HH:mm")}return e({getLegendBoxHeight:V,onChange:g}),(D,M)=>{const H=R.resolveComponent("el-checkbox"),K=R.resolveComponent("svg-icon"),N=R.resolveComponent("el-icon"),ue=R.resolveComponent("el-dropdown-item"),ie=R.resolveComponent("el-dropdown-menu"),Se=R.resolveComponent("el-dropdown"),He=R.resolveDirective("resize");return R.withDirectives((R.openBlock(),R.createElementBlock("div",{class:"box",ref_key:"chartBox",ref:r,onContextmenu:M[1]||(M[1]=G=>E(G))},[R.withDirectives((R.openBlock(),R.createElementBlock("div",Ck,[R.createTextVNode(R.toDisplayString(A.chartOption.title),1)])),[[R.vShow,A.chartOption.title],[He,x]]),R.withDirectives((R.openBlock(),R.createElementBlock("div",_k,[R.createTextVNode(R.toDisplayString(A.chartOption.subTitle),1)])),[[R.vShow,A.chartOption.subTitle],[He,x]]),R.withDirectives((R.openBlock(),R.createElementBlock("div",{class:"legend-box",ref_key:"myLegend",ref:Z},[c.value.length>1?(R.openBlock(),R.createBlock(H,{key:0,modelValue:h.value,"onUpdate:modelValue":M[0]||(M[0]=G=>h.value=G),label:"全选",onChange:d,style:{"--fill-color":"#409EFF"}},null,8,["modelValue"])):R.createCommentVNode("",!0),(R.openBlock(!0),R.createElementBlock(R.Fragment,null,R.renderList(c.value,(G,de)=>(R.openBlock(),R.createElementBlock(R.Fragment,{key:de},[G.children?R.createCommentVNode("",!0):(R.openBlock(),R.createBlock(H,{key:0,modelValue:G.isSelected,"onUpdate:modelValue":De=>G.isSelected=De,onChange:De=>g(De,G.name),style:R.normalizeStyle({"--fill-color":G.color?G.color:"#409EFF"})},{default:R.withCtx(()=>[G.icon?(R.openBlock(),R.createBlock(K,{key:0,"icon-class":G.icon,style:R.normalizeStyle({width:G.iconWidth?G.iconWidth+"px":"20px",height:G.iconHeight?G.iconHeight+"px":"20px"}),color:G.color},null,8,["icon-class","style","color"])):R.createCommentVNode("",!0),R.createElementVNode("span",{style:R.normalizeStyle({color:G.color,marginLeft:"3px"})},R.toDisplayString(G.key?G.key:G.name),5),G.children&&G.children.length>0?(R.openBlock(),R.createBlock(N,{key:1,class:"el-icon--right"},{default:R.withCtx(()=>[R.createVNode(R.unref(V1))]),_:1})):R.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","style"])),G.children&&G.children.length>0?(R.openBlock(),R.createBlock(Se,{key:1,"hide-on-click":!1},{dropdown:R.withCtx(()=>[R.createVNode(ie,null,{default:R.withCtx(()=>[(R.openBlock(!0),R.createElementBlock(R.Fragment,null,R.renderList(G.children,(De,st)=>(R.openBlock(),R.createBlock(ue,{key:st},{default:R.withCtx(()=>[R.createVNode(H,{modelValue:De.isSelected,"onUpdate:modelValue":tr=>De.isSelected=tr,onChange:tr=>g(tr,De.name),style:R.normalizeStyle({"--fill-color":De.color?De.color:"#409EFF"})},{default:R.withCtx(()=>[R.createElementVNode("div",Qk,[De.icon?(R.openBlock(),R.createBlock(K,{key:0,"icon-class":De.icon,style:R.normalizeStyle({width:De.iconWidth?De.iconWidth+"px":"20px",height:De.iconHeight?De.iconHeight+"px":"20px"}),color:De.color},null,8,["icon-class","style","color"])):R.createCommentVNode("",!0)]),R.createElementVNode("span",{style:R.normalizeStyle({color:De.color,marginLeft:"3px"})},R.toDisplayString(De.key?De.key:De.name),5)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","style"])]),_:2},1024))),128))]),_:2},1024)]),default:R.withCtx(()=>[R.createVNode(H,{modelValue:G.isSelected,"onUpdate:modelValue":De=>G.isSelected=De,onChange:De=>g(De,G.name),style:R.normalizeStyle({"--fill-color":G.color?G.color:"#409EFF"})},{default:R.withCtx(()=>[G.icon?(R.openBlock(),R.createBlock(K,{key:0,"icon-class":G.icon,style:R.normalizeStyle({width:G.iconWidth?G.iconWidth+"px":"20px",height:G.iconHeight?G.iconHeight+"px":"20px"}),color:G.color},null,8,["icon-class","style","color"])):R.createCommentVNode("",!0),R.createElementVNode("span",{style:R.normalizeStyle({color:G.color,marginLeft:"3px"})},R.toDisplayString(G.key?G.key:G.name),5),G.children&&G.children.length>0?(R.openBlock(),R.createBlock(N,{key:1,class:"el-icon--right"},{default:R.withCtx(()=>[R.createVNode(R.unref(V1))]),_:1})):R.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","style"])]),_:2},1024)):R.createCommentVNode("",!0)],64))),128))])),[[He,x]]),R.createElementVNode("div",xk,[R.createElementVNode("div",{id:A.id,style:R.normalizeStyle({width:A.width,height:A.height})},null,12,Fk)])],32)),[[He,x]])}}};_f.install=A=>{A.component("ElCheckbox",Ai.ElCheckbox),A.component("ElIcon",Ai.ElIcon),A.component("ElDropdown",Ai.ElDropdown),A.component("ElDropdownMenu",Ai.ElDropdownMenu),A.component("ElDropdownItem",Ai.ElDropdownItem),A.component("HydroGraph",_f)},TA.HydroGraph=_f,TA.default=_f,Object.defineProperties(TA,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));