@koishi-ce/plugin-analytics 1.0.1 → 1.0.2

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.
@@ -13,7 +13,7 @@ import{Teleport as e,computed as t,defineComponent as n,getCurrentInstance as r,
13
13
 
14
14
  `];function k_(e,t){return t.type=e,t}function A_(e){return e.type===`section`}function j_(e){return A_(e)?N_:P_}function M_(e){if(A_(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return V(e.blocks,function(e){var n=M_(e);n>=t&&(t=n+ +(r&&(!n||A_(e)&&!e.noHeader)))}),t}return 0}function N_(e,t,n,r){var i=t.noHeader,a=I_(M_(t)),o=[],s=t.blocks||[];je(!s||U(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Ue(l,c)){var u=new Zp(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}V(s,function(n,i){var s=t.valueFormatter,c=j_(n)(s?R(R({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):L_(r,o.join(``),i?n:a.html);if(i)return d;var f=wg(t.header,`ordinal`,e.useUTC),p=E_(r,e.renderMode).nameStyle,m=T_(r);return e.renderMode===`richText`?B_(e,f,p)+a.richText+d:L_(r,`<div style="`+p+`;`+m+`;">`+xh(f)+`</div>`+d,n)}function P_(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=U(e)?e:[e],H(e,function(e,t){return wg(e,U(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:wg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=E_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:B_(e,f,v))+(o?``:V_(e,m,h,g,y)):L_(r,(s?``:d)+(a?``:R_(f,!s,v))+(o?``:z_(m,h,g,y)),n)}}function F_(e,t,n,r,i,a){if(e)return j_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function I_(e){return{html:D_[e],richText:O_[e]}}function L_(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=T_(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function R_(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+xh(e)+`</span>`}function z_(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=U(e)?e:[e],`<span style="`+i+`;`+r+`">`+H(e,function(e){return xh(e)}).join(`&nbsp;&nbsp;`)+`</span>`}function B_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function V_(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(U(t)?t.join(` `):t,a)}function H_(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return kg(n)}function U_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var W_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Es()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=Og({color:t,type:e,renderMode:n,markerId:r});return G(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};U(t)?V(t,function(e){return R(n,e)}):R(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function G_(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=U(s),l=H_(t,n),u,d,f,p;if(o>1||c&&!o){var m=K_(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=Hp(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=ec(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return k_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[k_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Me(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function K_(e,t,n,r,i){var a=t.getData(),o=fe(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?V(r,function(e){u(Hp(a,n,e),e)}):V(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(k_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var q_=ac();function J_(e,t){return e.getName(t)||e.getId(t)}var Y_=function(e){x(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=i_({count:Q_,reset:$_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(q_(this).sourceManager=new v_(this)).prepareSource();var r=this.getInitialData(e,n);tv(r,this),this.dataTask.context.data=r,q_(this).dataBeforeProcessed=r,X_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Vg(this),r=n?Ug(e):{},i=this.subType;Kg.hasClass(i)&&(i+=`Series`),L(e,t.getTheme().get(this.subType)),L(e,this.getDefaultOption()),Bs(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Hg(e,r,n)},t.prototype.mergeOption=function(e,t){e=L(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Vg(this);n&&Hg(this.option,e,n);var r=q_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);tv(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,q_(this).dataBeforeProcessed=i,X_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Se(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&Bs(e[n],`label`,t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=rv(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return q_(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=rv(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}q_(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return J(e)},t.prototype.getSourceManager=function(){return q_(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return q_(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??=Infinity;for(var c=[],l=Infinity,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return G_({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Y.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Xg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a<e.length;a++){var o=e[a],s=J_(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=he(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[J_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){K(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=J_(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=J_(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Kg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Kg);ue(Y_,n_),ue(Y_,Xg),nt(Y_,Kg);function X_(e){var t=e.name;ec(e)||(e.name=Z_(e)||t)}function Z_(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return V(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Q_(e){return e.model.getRawData().count()}function $_(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),ev}function ev(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function tv(e,t){V(Be(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,ve(nv,t))})}function nv(e,t){var n=rv(e);return n&&n.setOutputEnd((t||this).count()),t}function rv(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var iv=uo.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),av={line:ed,rect:To,roundRect:To,square:To,circle:wu,diamond:uo.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:uo.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:uo.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:iv},ov={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},sv={};V(av,function(e,t){sv[t]=new e});var cv=uo.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Tn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=sv[r];i||=(r=`rect`,sv[r]),ov[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function lv(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function uv(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?Hd(e.slice(8),new Z(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?Vd(e.slice(7),{},new Z(t,n,r,i),o?`center`:`cover`):new cv({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=lv,a&&c.setColor(a),c}function dv(e){return U(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function fv(e,t){if(e!=null)return U(e)||(e=[e,e]),[as(e[0],t[0])||0,as(q(e[1],e[0]),t[1])||0]}var pv=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return eh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Su,n=uv(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=uv(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.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:Infinity,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(Y_);function mv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=Hp(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(Hp(e,t,n[o]));return a.join(` `)}}function hv(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!U(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var gv=function(e){x(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=uv(e,-1,-1,2,2,null,a);o.attr({z2:q(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=_v,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){wl(this.childAt(0))},t.prototype.downplay=function(){Tl(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Td(f,p,o,n),jd(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Ed(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=jf(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=fv(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof _o){var S=a.style;a.useStyle(R({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(R({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Af(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):mv(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),Ul(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Pc(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Od(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Od(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return dv(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Su);function _v(e,t){this.parent.drift(e,t)}function vv(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function yv(e){return e!=null&&!K(e)&&(e={isIgnore:e}),e||{}}function bv(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:jf(t),cursorStyle:t.get(`cursor`)}}function xv(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Sv=function(){function e(e){this.group=new Su,this._SymbolCtor=e||gv}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=yv(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=bv(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);vv(e,i,r,t)&&xv(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!vv(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Td(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);vv(t,s,i,e)?(o||=xv(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=bv(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=yv(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(vv(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){mf(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function Cv(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=wv(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=H(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return Xm(t,d[0])&&(f=!0,d[0]=p),Xm(t,d[1])&&(f=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:c,baseDim:l,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function wv(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:be(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function Tv(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Ev(e,t){return!isFinite(e)||!isFinite(t)}var Dv=typeof Float32Array<`u`?Float32Array:void 0,Ov=typeof Float64Array<`u`?Float64Array:void 0;function kv(e){return Av({ctor:Dv},e).arr}function Av(e,t){var n=e.arr,r=e.ctor;if(t>gs&&(t=gs),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function jv(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function Mv(e,t,n,r,i,a,o,s){for(var c=jv(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Cv(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=Tv(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var M=l.length,ee=kv(M),N=kv(M),te=kv(M),ne=kv(M),P=[],y=0;y<m.length;y++){var re=m[y],F=y*2,ie=re*2;ee[F]=l[ie],ee[F+1]=l[ie+1],N[F]=u[ie],N[F+1]=u[ie+1],te[F]=d[ie],te[F+1]=d[ie+1],ne[F]=f[ie],ne[F+1]=f[ie+1],P[y]=p[re]}return{current:ee,next:N,stackedOnCurrent:te,stackedOnNext:ne,status:P}}var Nv=Math.min,Pv=Math.max;function Fv(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(Ev(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;Ev(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||Ev(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,ee=C-v,N=void 0,te=void 0;if(s===`x`){N=Math.abs(A),te=Math.abs(j);var ne=E>0?1:-1;p=_-ne*N*o,m=v,O=_+ne*te*o,k=v}else if(s===`y`){N=Math.abs(M),te=Math.abs(ee);var P=D>0?1:-1;p=_,m=v-P*N*o,O=_,k=v+P*te*o}else N=Math.sqrt(A*A+M*M),te=Math.sqrt(j*j+ee*ee),T=te/(te+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=Nv(O,Pv(S,_)),k=Nv(k,Pv(C,v)),O=Pv(O,Nv(S,_)),k=Pv(k,Nv(C,v)),E=O-_,D=k-v,p=_-E*N/te,m=v-D*N/te,p=Nv(p,Pv(l,_)),m=Nv(m,Pv(u,v)),p=Pv(p,Nv(l,_)),m=Pv(m,Nv(u,v)),E=_-p,D=v-m,O=_+E*te/N,k=v+D*te/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var Iv=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),Lv=function(e){x(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Iv},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Ev(n[i*2-2],n[i*2-1]);i--);for(;r<i&&Ev(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=Fv(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=za.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?yr(i,u,f,m,e,s):yr(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?_r(a,d,p,h,b):_r(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(uo),Rv=function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Iv),zv=function(e){x(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new Rv},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Ev(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Ev(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=Fv(e,n,i,a,a,1,t.smooth,o,t.connectNulls);Fv(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(uo);function Bv(){var e=ac();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var Vv=ac(),Hv=Bv(),Uv=function(){function e(){this.group=new Su,this.uid=ih(`viewChart`),this.renderTask=i_({plan:Kv,reset:qv}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Gv(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Gv(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){mf(this.group,e)},e.markUpdateMethod=function(e,t){Vv(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function Wv(e,t,n){e&&Yl(e)&&(t===`emphasis`?wl:Tl)(e,n)}function Gv(e,t,n){var r=ic(e,t),i=t&&t.highlightKey!=null?Xl(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){Wv(e,n,i)}):V(zs(r),function(t){Wv(e.getItemGraphicEl(t),n,i)})}et(Uv,[`dispose`]),st(Uv);function Kv(e){return Hv(e.model)}function qv(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&Vv(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),Jv[c]}var Jv={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function Yv(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new To({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=W(i)?function(e){i(e,d)}:null;Ed(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function Xv(e,t,n){var r=e.getArea(),i=ls(r.r0,1),a=ls(r.r,1),o=new Uu({shape:{cx:ls(e.cx,1),cy:ls(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,Ed(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function Zv(e,t,n,r,i){return e?e.type===`polar`?Xv(e,t,n):e.type===`cartesian2d`?Yv(e,t,n,r,i):null:null}function Qv(e,t){return e.type===t}var $v=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();st($v);var ey=0,ty=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ey,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&H(r,ny);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!G(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=J(this.categories)},e}();function ny(e){return K(e)&&e.value!=null?e.value:e+``}var ry=he({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function iy(e,t,n){var r;e||={};var i=Fh();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(V(ry,function(t){a[t]&&(e[t]=_e(a[t],a))}),r=a)}return r??dy(e,n),{brk:r,mapper:e}}function ay(e,t){V(ry,function(n){e[n]=t[n]})}function oy(e,t){e.freeze=We}function sy(e){return e.getExtentUnsafe(0,2)}function cy(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function ly(e){var t=cy(e,3);return t[1]-t[0]}function uy(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function dy(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():gc(),R(n,fy),n}var fy={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=cy(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){py(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),py(r,e,t,n)},freeze:function(){}};function py(e,t,n,r){Sc(n,r)&&(e[t][0]=n,e[t][1]=r)}function my(e){return hy(e)||_y(e)}function hy(e){return e.type===`interval`}function gy(e){return e.type===`time`}function _y(e){return e.type===`log`}function vy(e){return e.type===`ordinal`}function yy(e){var t=Ss(e),n=$o(10,t),r=Xo(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,ls(r*n,-t)}function by(e){return ds(e)+2}function xy(e,t){return es(e)/es(t)}function Sy(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return $o(t,e)}function Cy(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=Yo(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!xc(r[0])||!xc(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function wy(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function Ty(e,t){return e||=t,Xo(Jo(e,1))}function Ey(e,t,n){var r=sy(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Dy=function(e){x(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,ay(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new ty({}),U(i)&&(i=new ty({categories:H(i,function(e){return K(e)?e.value:e})})),r._ordinalMeta=i;var a=iy(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,oy(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:G(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=Xo(e),e},t.prototype.getTicks=function(){var e=[];return Ey(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=qo(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=sy(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(Xo(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}($v);$v.registerClass(Dy);function Oy(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=by(f);u<t-1;){var m=ls(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=Fh();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var ky=function(e){x(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=iy(r,Ih(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return I(this._cfg)},t.prototype.setConfig=function(e){var t=sy(this);this._cfg=e=I(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=by(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=sy(this),i=t.niceExtent,a=t.intervalPrecision,o=Fh(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?ls(i[0]-n,a):r[0]});for(var d=function(e,t){return Xo((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=qo(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=ls(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=ls(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?ls(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return Oy(this,e,Lh(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=ds(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),xg(ls(e.value,n,!0))},t.type=`interval`,t}($v);$v.registerClass(ky);var Ay=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},jy=function(e){x(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=iy(r,Ih(r,n),null).brk,r}return t.prototype.getLabel=function(e){return rg(e.value,Jh[ng(eg(this._minLevelUnit))]||Jh.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return ig(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=sy(this),r=Fh(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return Fh().addBreaksToTicks(o,i.breaks,n),o;o=Vy(this._minLevelUnit,this._approxInterval,s,n,uy(this),i);var c=Yh.length-1,l=0;return V(o,function(e){e.time&&(c=Math.min(c,B(Yh,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&Fh().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&Fh().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(B(Yh,ag(e.vmin,s)),B(Yh,ag(e.vmax,s))),n=0,r=0;r<Yh.length;r++)if(!Ny(Yh[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:Yh[Math.max(i,t)],upperTimeUnit:Yh[i]}}),o},t.prototype.getMinorTicks=function(e){return Oy(this,e,Lh(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return be(e)?Math.round(e):+bs(e)},t.type=`time`,t}($v),My=[[`second`,zh],[`minute`,Bh],[`hour`,Vh],[`quarter-day`,Vh*6],[`half-day`,Vh*12],[`day`,Hh*1.2],[`half-week`,Hh*3.5],[`week`,Hh*7],[`month`,Hh*31],[`quarter`,Hh*95],[`half-year`,Uh/2],[`year`,Uh]];function Ny(e,t,n,r){return og(new Date(t),e,r).getTime()===og(new Date(n),e,r).getTime()}function Py(e,t){return e/=Hh,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function Fy(e){var t=30*Hh;return e/=t,e>6?6:e>3?3:e>2?2:1}function Iy(e){return e/=Vh,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Ly(e,t){return e/=t?Bh:zh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Ry(e){return Jo(Cs(e,!0),1)}function zy(e,t,n){var r=Math.max(0,B(Yh,t)-1);return og(new Date(e),Yh[r],n).getTime()}function By(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function Vy(e,t,n,r,i,a){var o=Xh,s=0;function c(e,t,n,i,o,c,l){for(var u=By(o,e),d=t,f=new Date(d);d<n&&d<=r[1]&&(l.push({value:d}),!(s++>3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!Ny(eg(e),r[0],r[1],n)){s&&(i=[{value:zy(r[0],e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u=i[l].value,d=i[l+1].value;if(u!==d){var f=void 0,p=void 0,m=void 0,h=!1;switch(e){case`year`:f=Math.max(1,Math.round(t/Hh/365)),p=sg(n),m=mg(n);break;case`half-year`:case`quarter`:case`month`:f=Fy(t),p=cg(n),m=hg(n);break;case`week`:case`half-week`:case`day`:f=Py(t,31),p=lg(n),m=gg(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=Iy(t),p=ug(n),m=_g(n);break;case`minute`:f=Ly(t,!0),p=dg(n),m=vg(n);break;case`second`:f=Ly(t,!1),p=fg(n),m=yg(n);break;case`millisecond`:f=Ry(t),p=pg(n),m=bg(n)}d>=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l<o.length;l++)a.push(o[l])}}for(var u=[],d=[],f=0,p=0,m=0;m<o.length;++m){var h=eg(o[m]);if(tg(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?eg(o[m+1]):null))){if(d.length){p=f,d.sort(function(e,t){return e.value-t.value});for(var g=[],_=0;_<d.length;++_){var v=d[_].value;(_===0||d[_-1].value!==v)&&(g.push(d[_]),v>=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=pe(H(u,function(e){return pe(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;m<b.length;++m)for(var C=b[m],w=0;w<C.length;++w){var T=ag(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Dc(S,Oc,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=ag(r[0],n),k=ag(r[1],n);return(!E||E.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),S}var Hy=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=Hh,n[1]+=Hh),n[1]===-Infinity&&n[0]===Infinity){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-Hh}e.setExtent(n[0],n[1]);var i=Ty(t.splitNumber,10),a=uy(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=My.length,l=Math.min(Ay(My,a,0,c),c-1),u=My[l][1],d=My[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};$v.registerClass(jy);var Uy=0,Wy=1,Gy=2,Ky=function(e){x(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=ky.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[Uy]=i[Wy]=a[Uy]=a[Wy]=NaN,ay(r,t.mapperMethods);var s=Fh(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},Gy,l),r.powStub=new ky({breakParsed:l.original}),r.intervalStub=new ky({breakParsed:l.transformed}),oy(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Fh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return H(i.getTicks(e||{}),function(e){var i=e.value,o=Sy(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Lh(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return Oy(this,e,Lh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(xy(e,this.base))},scale:function(e){return Sy(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=xy(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return qy.depth=n,Jy.lookup=this._lookup,Sy(n===2?e:this.intervalStub.transformOut(e,qy),this.base,Jy)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Sc(t,n)||t<=0||n<=0)){var r=Yy,i=Yy;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[Uy]=t,r[Wy]=n);var o=this.base;this.intervalStub.setExtent2(e,i[Uy]=xy(t,o),i[Wy]=xy(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Sc(t[0],t[1])&&ks(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}($v);$v.registerClass(Ky);var qy={},Jy={},Yy=[],Xy={value:1,category:1,time:1,log:1},Zy=ac();function Qy(e){var t=e.get(`type`);return(t==null||!Ue(Xy,t)&&!$v.getClass(t))&&(t=`value`),t}function $y(e,t,n){var r=Fh(),i;switch(r&&(i=ub(e,t,n)),t){case`category`:return new Dy({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:gc()});case`time`:return new jy({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Ky({logBase:e.get(`logBase`),breakOption:i});case`value`:return new ky({breakOption:i});default:return new(($v.getClass(t))||ky)({})}}function eb(e,t,n){var r=n?cy(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Sc(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function tb(e){Zy(e).noOnMyZero=!0}function nb(e){return Zy(e).noOnMyZero}function rb(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Zh(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(G(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(W(t)){if(e.type===`category`)return function(n,r){return t(ib(e,n),n.value-e.scale.getExtent()[0],null)};var r=Fh();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(ib(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function ib(e,t){var n=e.scale;return vy(n)?n.getLabel(t):t.value}function ab(e){return e.get(`interval`)??`auto`}function ob(e){return e.type===`category`&&ab(e.getLabelModel())===0}function sb(e,t){var n={};return V(e.mapDimensionsAll(t),function(t){n[Zm(e,t)]=!0}),he(n)}function cb(e){return e===`middle`||e===`center`}function lb(e){return e.getShallow(`show`)}function ub(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Fh()||!n||!db(t)?void 0:r}function db(e){return e!==`category`}function fb(e,t,n,r,i,a){var o=_y(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=wy(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function pb(e,t){return vy(e)?e.getRawOrdinalNumber(t.value):t.value}function mb(e,t){return vy(e)&&!!t.get(`boundaryGap`)}function hb(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function gb(e){for(var t=gc(),n=gc(),r=0;r<e.length;){var i=e[r++],a=e[r++];Ev(i,a)||(_c(t,i),_c(n,a))}return[t,n]}function _b(e,t){var n=gb(e),r=n[0],i=n[1],a=gb(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function vb(e){return be(e)?e:e?.5:0}function yb(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=kv(r*2),a=0;a<r;a++){var o=Tv(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function bb(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){var p=t||e;Ev(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function xb(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Zr((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Sb(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=H(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=xb(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;V(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new ld(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Cb(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&wb(a,t))){var o=t.mapDimension(a.dim),s={};return V(a.getViewLabels(),function(e){e.tick.offInterval||(s[pb(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function wb(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(gv.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function Tb(e){for(var t=e.length/2;t>0&&Ev(e[t*2-2],e[t*2-1]);t--);return t-1}function Eb(e,t){return[e[t*2],e[t*2+1]]}function Db(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!Ev(o,e[l*2+1-i])){if(l===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function Ob(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<Zc.length;t++)if(e.get([Zc[t],`endLabel`,`show`]))return!0;return!1}function kb(e,t,n,r){if(Qv(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=Ob(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=Yv(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return Xv(t,n,r)}function Ab(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var jb=function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Su,t=new Sv;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=_e(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=Cv(r,a,_),y=g&&yb(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Cb(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Sb(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=bb(y,c,r,w,x),c=bb(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,kg(E)),m.setClipPath(kb(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,kg(E));var D=m.getClipPath();D?Ed(D,{shape:kb(this,r,!1,e).shape},e):m.setClipPath(kb(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!hb(this._stackedOnPoints,y)||!hb(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=bb(y,c,r,w,x),c=bb(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(z(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),ql(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Pc(f).seriesIndex=e.seriesIndex,Ul(f,k,A,j);var ee=vb(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:ee,smoothMonotone:N,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),ne=0;p.useStyle(z(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(ne=vb(te.get(`smooth`))),p.setShape({smooth:ee,stackedOnSmooth:ne,smoothMonotone:N,connectNulls:x}),ql(p,e,`areaStyle`),Pc(p).seriesIndex=e.seriesIndex,Ul(p,k,A,j)}var P=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=P)}),this._polyline.onHoverStateChange=P,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var re=e.get(`triggerEvent`),F=e.get(`triggerLineEvent`),ie=F===!0||re===!0||re===`line`,ae=F===!0||re===!0||re===`area`;this.packEventData(e,f,ie),p&&this.packEventData(e,p,ae)},t.prototype.packEventData=function(e,t,n){Pc(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=ic(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Ev(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new gv(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Uv.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=ic(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Uv.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;hl(this._polyline,e),t&&hl(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Lv({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new zv({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);W(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=W(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=W(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(Ob(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Ao({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=Tb(o);c>=0&&(Af(a,jf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?mv(i,e):hv(i,n)},enableTextSetter:!0},Ab(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=Db(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=Eb(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=hc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=Eb(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Vf(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=Mv(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=bb(u.stackedOnCurrent,u.current,n,i,o),d=bb(u.current,null,n,i,o),m=bb(u.stackedOnNext,u.next,n,i,o),p=bb(u.next,null,n,i,o)),_b(d,p)>3e3||c&&_b(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Td(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Td(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type=`line`,t}(Uv);function Mb(e,t){return{seriesType:e,plan:Bv(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=H(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);Xm(n,o[0])&&(o[0]=c),Xm(n,o[1])&&(o[1]=c);var l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&kv(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var Nb={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-Infinity,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=Infinity,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},Pb=function(e){return Math.round(e.length/2)};function Fb(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;G(i)?p=Nb[i]:W(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,Pb))}}}}}function Ib(e){e.registerChartView(jb),e.registerSeriesModel(pv),e.registerLayout(Mb(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Fb(`line`))}var Lb=ac(),Rb=ac(),zb={estimate:1,determine:2};function Bb(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function Vb(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:H(Ub(n,r),function(t,n){return{formattedLabel:rb(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?Wb(e,t):qb(e)}function Hb(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:Ub(i,r)}:e.type===`category`?Kb(e,t):{ticks:r.getTicks(n)}}function Ub(e,t){var n=t.getExtent(),r=[];return V(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Dc(r,kc,null),us(r),H(r,function(e){return{value:e}})}function Wb(e,t){var n=e.getLabelModel(),r=Gb(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function Gb(e,t,n){var r=Yb(e),i=ab(t),a=n.kind===zb.estimate;if(!a){var o=Zb(r,i);if(o)return o}var s,c;W(i)?s=ix(e,i,!1):(c=i===`auto`?$b(e,n):i,s=ix(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return Qb(r,i,l),!0}):Qb(r,i,l),l}function Kb(e,t){var n=Jb(e),r=ab(t),i=Zb(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),W(r))a=ix(e,r,!0);else if(r===`auto`){var s=Gb(e,e.getLabelModel(),Bb(zb.determine));o=s.labelCategoryInterval,a=H(s.labels,function(e){return e.tick})}else o=r,a=ix(e,o,!0);return Qb(n,r,{ticks:a,tickCategoryInterval:o})}function qb(e){var t=e.scale.getTicks(),n=rb(e);return{labels:H(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Jb=Xb(`axisTick`),Yb=Xb(`axisLabel`);function Xb(e){return function(t){return Rb(t)[e]||(Rb(t)[e]={list:[]})}}function Zb(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function Qb(e,t,n){return e.list.push({key:t,value:n}),n}function $b(e,t){if(t.kind===zb.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Rb(e).autoInterval=n,!0}),n}return Rb(e).autoInterval??(Rb(e).autoInterval=e.calculateCategoryInterval(t))}function ex(e,t){var n=t.kind,r=rx(e),i=rb(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=bn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=Infinity),isNaN(x)&&(x=Infinity);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===zb.estimate?(t.out.noPxChangeTryDetermine.push(_e(tx,null,e,S,c)),S):nx(e,S,c)??S}function tx(e,t,n){return nx(e,t,n)==null}function nx(e,t,n){var r=Lb(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function rx(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function ix(e,t,n){var r=rb(e),i=e.scale,a=[],o=W(t);return Ey(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var ax=ac();function ox(e){ax(e).prepare={}}function sx(e){ax(e).fullUpdate={}}function cx(e){return ax(e).prepare}function lx(e){return ax(e).fullUpdate}var ux=Tc(),dx=ac(),fx=ac();function px(e,t){var n=e.model,r=dx(lx(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function mx(e,t){return _x(px(e,t))}function hx(e,t){var n=[];return gx(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(_x(e))}),n}function gx(e,t){var n=dx(lx(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function _x(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function vx(e,t){var n=e.model.ecModel,r=dx(lx(n)).axSer;r&&bx(n,r.get(e.model.uid),t)}function yx(e,t,n){var r=px(e,t);r&&bx(e.model.ecModel,r.sers,n)}function bx(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function xx(e,t,n){var r=dx(lx(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function Sx(e,t){var n=e.model,r=dx(lx(n.ecModel)).keys;r&&V(r.get(n.uid),function(e){t(e)})}function Cx(e){var t=fx(cx(e)),n=t.keyed||=J();gx(e,function(t,r,i){var a=n.get(r)||n.set(r,J()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&Ex.liPosMinGap(e,t,o)})}function Tx(e,t){Ex[e]=t}var Ex={};function Dx(e,t,n){if(e){var r=t.ecModel,i=dx(lx(r)),a=e.model.uid,o=i.axSer||=J();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=Ax.get(Ox(s,c,n))||Ax.get(Ox(s,c,null));if(l){var u=i.keyed||=J(),d=i.keys||=J(),f=l.key,p=u.get(f)||u.set(f,J()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function Ox(e,t,n){return e+`|&`+q(t,!0)+`|&`+(n||``)}function kx(e,t){var n=Ox(t.seriesType,t.baseAxis,t.coordSysType);Ax.set(n,t),ux(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:Cx})})}var Ax=J(),jx=.8;function Mx(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=ly(r);ks(o)||(o=NaN);var s=e.getExtent(),c=Yo(s[1]-s[0]);return vy(r)?Nx(n,e,o,c):i&&Px(n,e,o,c,i),a!=null&&(n.w=ks(n.w)?Jo(a,n.w):a),n}function Nx(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function Px(e,t,n,r,i){var a=!1,o=-Infinity;V(i.key?[mx(t,i.key)]:hx(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),ks(n)&&n>0&&ks(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*jx,e.w2=e.w*n/r)}var Fx=[0,1],Ix=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),is(e,Fx,Lx(this),t)},e.prototype.coordToData=function(e,t){var n=is(e,Lx(this),Fx,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=H(Hb(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(pb(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Rx(this,n,r);return H(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(vy(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),H(this.scale.getMinorTicks(e),function(e){return H(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=Bb(zb.determine),Vb(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Mx(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=Bb(zb.determine),ex(this,e)},e}();function Lx(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Rx(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Mx(e).w;if(!i)return!1;V(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var zx=function(e){x(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Ix),Bx=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],Vx=1,Hx=2,Ux=Vx|Hx;function Wx(e,t,n){n||=Ux,t?e.dirty|=n:e.dirty&=~n}function Gx(e,t){return t||=Ux,e.dirty==null||!!(e.dirty&t)}function Kx(e){if(e)return Gx(e)&&qx(e,e.label,e),e}function qx(e,t,n){var r=t.getComputedTransform();e.transform=vf(e.transform,r);var i=e.localRect=_f(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=Uf.textMargin);for(var d=0;d<4;d++)Jx[d]=u===Uf.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===Uf.textMargin&&lf(i,Jx,!1,!1);var f=e.rect=_f(e.rect,i);return r&&f.applyTransform(r),u===Uf.minMargin&&lf(f,Jx,!1,!1),e.axisAligned=hf(r),(e.label=e.label||{}).ignore=t.ignore,Wx(e,!1),Wx(e,!0,Hx),e}var Jx=[0,0,0,0];function Yx(e,t,n){return e.transform=vf(e.transform,n),e.localRect=_f(e.localRect,t),e.rect=_f(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=hf(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function Xx(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function Zx(e,t){for(var n=0;n<Bx.length;n++){var r=Bx[n];e[r]??(e[r]=t[r])}return Kx(e)}function Qx(e){var t=e.obb;return(!t||Gx(e,Hx))&&(e.obb=t||=new yd,t.fromBoundingRect(e.localRect,e.transform),Wx(e,!1,Hx)),t}function $x(e,t,n,r,i){var a=e.length,o=Pd[t],s=Fd[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function eS(e){var t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=Kx(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(tS(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function tS(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:Qx(e).intersect(Qx(t),n,r)}var nS=null;function rS(){return nS}var iS=`expandAxisBreak`,aS=Math.PI,oS=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],sS=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],cS=ac(),lS=ac(),uS=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function dS(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=FS(e.axisName)&&cb(e.nameLocation);V(r,function(e){var t=Kx(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?Et(fS,n.transform):bt(fS),t.transform&&St(fS,fS,t.transform),Z.copy(pS,t.localRect),pS.applyTransform(fS),s?s.union(pS):Z.copy(s=new Z(0,0,0,0),pS))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Z(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var fS=yt(),pS=new Z(0,0,0,0),mS=function(e,t,n,r,i,a){if(cb(e.nameLocation)){var o=a.stOccupiedRect;o&&hS(Yx({},o,a.transGroup.transform),r,i)}else gS(a.labelInfoList,a.dirVec,r,i)};function hS(e,t,n){var r=new X;tS(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&Xx(t,r)}function gS(e,t,n,r){for(var i=X.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||hS(s,n,r)}}var _S=function(){function e(e,t,n,r){this.group=new Su,this._axisModel=e,this._api=t,this._local={},this._shared=r||new uS(mS),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=q(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=q(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:q(e.nameDirection,1),tickDirection:q(e.tickDirection,1),labelDirection:q(e.labelDirection,1),labelOffset:q(e.labelOffset,0),silent:q(e.silent,!0),axisName:r,nameLocation:Oe(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:FS(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new Su({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 X(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},V(vS,function(r){e[r]&&yS[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=_s(t-e),i,a;return vs(r)?(a=n>0?`top`:`bottom`,i=`center`):vs(r-aS)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<aS?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),vS=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],yS={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Vt(u,u,l),Vt(d,d,l));var p=R({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Rh(r.axis.scale))rS().buildAxisBreakLine(r,i,a,m);else{var h=new ed(R({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));Kd(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);G(g)&&(g=[g,g]),(G(_)||be(_))&&(_=[_,_]);var v=fv(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];V([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=uv(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){OS(t,i,s)&&bS(e,t,n,r,i,a,o,zb.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){OS(t,i,s)&&bS(e,t,n,r,i,a,o,zb.determine);var c=ES(e,i,a,r);CS(e,t.labelLayoutList,c),DS(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(FS(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new X(0,0),_=new X(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=yt();_.transform(wt(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*aS/180);var b,x;cb(u)?b=_S.innerTextLayout(e.rotation,y??e.rotation,d):(b=xS(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=De(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Ao({x:g.x,y:g.y,rotation:b.rotation,silent:_S.isLabelSilent(r),style:Mf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(ff({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=_S.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Pc(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=Kx({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:cb(u)?oS[E]:sS[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function bS(e,t,n,r,i,a,o,s){AS(t)||kS(e,t,i,s,r,o);var c=t.labelLayoutList;MS(e,r,c,a),LS(r,e.rotation,c);var l=e.optionHideOverlap;SS(r,c,l),l&&eS(pe(c,function(e){return e&&!e.label.ignore})),dS(e,n,r,c)}function xS(e,t,n,r){var i=_s(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return vs(i-aS/2)?(o=c?`bottom`:`top`,a=`center`):vs(i-aS*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<aS*1.5&&i>aS/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function SS(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(ob(r))return;function a(e,a,o){var s=Kx(t[a]),c=Kx(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=cS(s.label).labelInfo.tick;if(gy(l)&&u.notNice||vy(l)&&u.offInterval){wS(s.label);return}}if(e===!1||s.suggestIgnore){wS(s.label);return}if(c.suggestIgnore){wS(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=Zx({marginForce:f},s),c=Zx({marginForce:f},c)}tS(s,c,null,{touchThreshold:d})&&wS(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function CS(e,t,n){e.showMinorTicks||V(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=lS(r),a=cS(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){wS(r);return}}})}function wS(e){e&&(e.ignore=!0)}function TS(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(Vt(o,o,t),Vt(s,s,t));var u=new ed({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});Kd(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=lS(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function ES(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=TS(i.getTicksCoords(),n.transform,c,z(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function DS(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=z(c.getLineStyle(),z(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=TS(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function OS(e,t,n){if(AS(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),jS(e,null,null,null))}return!0}function kS(e,t,n,r,i,a){var o=i.axis,s=De(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Su;n.add(c);var l=Bb(r);if(!s||o.scale.isBlank()){jS(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(De(e.raw.labelRotate,u.get(`rotate`))||0)*aS/180,p=_S.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=Infinity,v=-Infinity;V(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=pb(o.scale,n);if(m&&m[f]){var y=m[f];K(y)&&y.textStyle&&(l=new ep(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=q(l.getShallow(`alignMinLabel`,!0),x),C=q(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=q(l.getShallow(`verticalAlignMinLabel`,!0),w),E=q(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new Ao({x:0,y:0,rotation:0,silent:_S.isLabelSilent(i),z2:D,style:Mf(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:W(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=cS(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,ff({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=_S.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var M=j.parsedBreak;A.break={start:M.vmin,end:M.vmax}}o.type===`category`&&(A.dataIndex=f),Pc(O).eventData=A,j&&IS(i,a,O,j)}h.push(O),c.add(O)}),jS(t,H(h,function(e){return{label:e,priority:cS(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function AS(e){return!!e.labelLayoutList}function jS(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function MS(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);V(n,function(n,a){var o=Kx(n);if(o){var s=o.label,c=cS(s);o.suggestIgnore=s.ignore,s.ignore=!1,ir(NS,PS);var l=t.axis;NS.x=l.dataToCoord(pb(l.scale,c.labelInfo.tick)),NS.y=e.labelOffset+e.labelDirection*i,NS.rotation=c.layoutRotation,r.add(NS),NS.updateTransform(),r.remove(NS),NS.decomposeTransform(),ir(s,NS),s.markRedraw(),Wx(o,!0),Kx(o)}})}var NS=new To,PS=new To;function FS(e){return!!e}function IS(e,t,n,r){n.on(`click`,function(n){var i={type:iS,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function LS(e,t,n){var r=Fh();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&cS(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&V(i,function(r){rS().adjustBreakLabelPair(e.axis.inverse,t,[Kx(n[r[0]]),Kx(n[r[1]])])})}}function RS(e,t,n){n||={};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),De(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function zS(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function BS(e){var t={xAxisModel:null,yAxisModel:null};return V(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,lc).models[0]}),t}function VS(e,t,n,r,i,a){for(var o=RS(e,n),s=!1,c=!1,l=0;l<t.length;l++)my(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new _S(n,r,o,i)}function HS(e,t,n){var r=RS(t,n);e.updateCfg(r)}var US=ac(),WS=3,GS=function(){function e(e,t,n,r,i){var a=vy(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(hy(e)||_y(e)||gy(e))&&(vc(l,qS(e,t.get(`dataMin`,!0))),yc(l,qS(e,t.get(`dataMax`,!0)))),Cc(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=qS(e,W(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=qS(e,W(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=JS(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!xc(u[0])&&(u[0]=NaN),!xc(u[1])&&(u[1]=NaN);var g=s||Ee(u[0])||Ee(u[1])||a&&!o,_=hy(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=qS(e,t.get(`startValue`,!0)),x=b!=null;!ks(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),ks(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),KS(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),KS(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function KS(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),wc(t))}function qS(e,t){return t==null?null:Ee(t)?NaN:e.parse(t)}function JS(e,t){var n;if(vy(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=U(r)?r:[r,r]}return[YS(n[0]),YS(n[1])]}function YS(e){return wn(typeof e==`boolean`?0:e,1)||0}function XS(e){var t=US(e.scale);return t.extent||=gc(),t}function ZS(e,t){XS(e).dimIdxInCoord=t.get(e.dim)}function QS(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||$S(n,e,i,r,t)}function $S(e,t,n,r,i){var a=XS(t),o=a.extent,s=!1;vx(t,function(r){if(r.boxCoordinateSystem){var i=Vm(r).coord,c=a.dimIdxInCoord;if(c>=0&&U(i)){var l=i[c];l!=null&&!U(l)&&_c(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;V(sb(u,n),function(e){bc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=aC(e,t,r);tC(e,new GS(e,r,o,s,c),i),a.extent=null}function eC(e,t){var n=e.scale;tC(n,new GS(n,e.model,t,!1,!1),WS)}function tC(e,t,n){e.rawExtentInfo=t,t.from=n}function nC(e,t){rC.set(e,t)}var rC=J();function iC(e,t,n,r,i){e.rawExtentInfo||eC({scale:e,model:t},i||gc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function aC(e,t,n){var r=mb(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return Sx(t,function(e){a=!!rC.get(e)||a}),a}function oC(e,t,n,r){if(n.ctnShp){var i;if(Sx(e,function(t){var n=rC.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],vc(i,a[0]),yc(i,a[1]),tb(e))}}),i){var a=t.getExtent();if(vy(t))e.onBand||t.setExtent2(1,qo(a[0],a[0]+i[0]),Jo(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=qo(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=Jo(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function sC(){Tx(`liPosMinGap`,cC)}function cC(e,t,n){var r=J(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=Qp(u);function f(n){bx(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Av(lC,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||$p(d,a))&&(l&&(a=c.transformIn(a,null)),lC.arr[m++]=a)}});var h=lC.typed?lC.arr.subarray(0,m):(lC.arr.length=m,lC.arr);lC.typed?h.sort():us(h);for(var g=Infinity,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=ks(g)?g:m>0?-2:-1,n.serUids=r}var lC=Av({ctor:Ov},50);function uC(e){return function(t,n){var r=Mx(t,{fromStat:{key:e}});if(ks(r.w2))return[-r.w2/2,r.w2/2]}}function dC(e,t){return e+`|&`+t}function fC(e){return sC(),{liPosMinGap:!vy(e.scale)}}function pC(e,t,n,r){kx(e,{key:t,seriesType:n,coordSysType:r,getMetrics:fC})}function mC(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var hC={left:0,right:0,top:0,bottom:0},gC=[`25%`,`25%`],_C=`cartesian2d`,vC=function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Ug(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Hg(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Hg(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:hC,outerBoundsContain:`all`,outerBoundsClampWidth:gC[0],outerBoundsClampHeight:gC[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(Kg),yC=Tc(),bC=`__ec_stack_`;function xC(e){return e.get(`stack`)||bC+e.seriesIndex}function SC(e,t){var n=CC(e,t);return n.columnMap=wC(n),n}function CC(e,t){var n=dC(t,_C),r=[],i=Mx(e,{fromStat:{key:n},min:1});return yx(e,n,function(e){r.push({barWidth:as(e.get(`barWidth`),i.w),barMaxWidth:as(e.get(`barMaxWidth`),i.w),barMinWidth:as(e.get(`barMinWidth`)||(DC(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:xC(e)})}),{bandWidthResult:i,seriesInfo:r}}function wC(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};V(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Ue(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=qo(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=Jo(35-o.length*4,15)+`%`;var c=as(i,t),l=as(a,1),u=(n-c)/(r+(r-1)*l);u=Jo(u,0),V(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=qo(o,i)),a&&(o=Jo(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=qo(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=Jo(u,0);var d=0,f;V(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return V(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function TC(e){return{seriesType:e,overallReset:function(t){var n=dC(e,_C);xx(t,n,function(t){var r=SC(t,e);yx(t,n,function(e){var t=r.columnMap[xC(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function EC(e){return{seriesType:e,plan:Bv(),reset:function(e){if(zS(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=Xm(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(mC(i))),p=DC(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&kv(r*3),c=p&&s&&kv(r*3),l=p&&kv(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,Yo(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,Yo(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function DC(e){return e.pipelineContext&&e.pipelineContext.large}function OC(e){return uC(dC(e,_C))}function kC(e){yC(e,function(){function t(t){var n=dC(t,_C);pC(e,n,t,_C),nC(n,OC(t))}t(`bar`),t(`pictorialBar`)})}var AC=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return eh(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)V(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(Y_);Y_.registerClass(AC);var jC=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return eh(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=jc(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=sh(AC.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:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(AC),MC=`\0__throttleOriginMethod`,NC=`\0__throttleRate`,PC=`\0__throttleType`;function FC(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function IC(e,t,n,r){var i=e[t];if(i){var a=i[MC]||i,o=i[PC];if(i[NC]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=FC(a,n,r===`debounce`),i[MC]=a,i[PC]=r,i[NC]=n}return i}}function LC(e,t){var n=e[t];n&&n[MC]&&(n.clear&&n.clear(),e[t]=n[MC])}var RC=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),zC=function(e){x(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new RC},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(uo);function BC(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Tn(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+HC(m,s+_,!1),x=u+p*y(m)+UC(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+HC(m,-s+_,!1),x=u+p*y(m)+UC(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+HC(h,s+_,!0),x=u+p*y(h)+UC(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+HC(h,-s+_,!0),x=u+p*y(h)+UC(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Tn(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function VC(e,t,n,r){if(be(r)){e.setTextConfig({rotation:r});return}if(U(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function HC(e,t,n){return t*Math.sin(e)*(n?-1:1)}function UC(e,t,n){return t*Math.cos(e)*(n?1:-1)}function WC(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;U(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:H(r,function(e){return wn(e,i)})}}var GC=Math.max,KC=Math.min,qC=function(e){x(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){mf(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=XC(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=nw[s.type](a,e);if(!t)return null;var n=pw(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=nw[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!tw[s.type](r)))){var o=!1;f&&(o=JC[s.type](p,r));var g=YC[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),aw(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?ZC(d,u,g,r,t,l,!1,!1):Ed(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=nw[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=nw[s.type](a,t),E=fw(l,T,s);Td(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!tw[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=JC[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Ad(D,e,n),D=null),D?jd(D):D=YC[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=Vf(k);A.prevValue!=null&&(A.prevValue=A.value)}}else aw(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?ZC(d,u,D,C,t,l,!0,x):Td(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&Ad(n,e,t)}).execute();var C=this._backgroundGroup||=new Su;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),lw(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),lw(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&Zv(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:H(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Ad(t,e,Pc(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(Uv),JC={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=GC(t.x,e.x),s=KC(t.x+t.width,i),c=GC(t.y,e.y),l=KC(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=KC(t.r,e.r),a=GC(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},YC={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new To({shape:R({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?zC:Uu,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=BC(iw(i),{isRoundCap:l===zC}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Td:Ed)(u,{shape:p},a)}return u}};function XC(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function ZC(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Td:Ed)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Td:Ed)(n,{shape:l},u,i)}function QC(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var $C=[`x`,`y`,`width`,`height`],ew=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],tw={cartesian2d:function(e){return!QC(e,$C)},polar:function(e){return!QC(e,ew)}},nw={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?ow(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function rw(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function iw(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function aw(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;R(u,WC(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?mw(i,a.coordinateSystem):hw(i,a.coordinateSystem),p=jf(r);Af(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:mv(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,VC(e,h===`outside`?f:h,iw(o),r.get([`label`,`rotate`]))}Hf(m,p,a.getRawValue(n),function(e){return hv(t,e)});var g=r.getModel([`emphasis`]);Ul(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),ql(e,r),rw(i)&&(e.style.fill=`none`,e.style.stroke=`none`,V(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function ow(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var sw=function(){function e(){}return e}(),cw=function(e){x(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new sw},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(uo);function lw(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Ac(e):0;if(l){var d=new cw({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new cw({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,Pc(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,uw),f.on(`mousemove`,uw)),n&&n.push(f)}var uw=FC(function(e){var t=this,n=dw(t,e.offsetX,e.offsetY);Pc(t).dataIndex=n>=0?n:null},30,!1);function dw(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function fw(e,t,n){if(Qv(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function pw(e,t,n){return new(e.type===`polar`?Uu:To)({shape:fw(t,n,e),silent:!0,z2:0})}function mw(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function hw(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function gw(e){e.registerChartView(qC),e.registerSeriesModel(jC),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,TC(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,EC(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Fb(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),kC(e)}function _w(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}V([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=R({},t),i.dispatchAction(R(t,{type:e[1],seriesIndex:n(r,t)}))})})}function vw(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=ic(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:U(l)?c.getName(l[0]):c.getName(l),selected:G(r)?r:R({},r)})}})}function yw(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(vw(`map`,`selectchanged`,t,r,e),vw(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(vw(`map`,`selected`,t,r,e),vw(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(vw(`map`,`unselected`,t,r,e),vw(`pie`,`unselected`,t,r,e))})}function bw(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}function xw(e,t,n){t=U(t)&&{coordDimensions:t}||R({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Mm(r,t).dimensions,a=new jm(i,e);return a.initData(r,n),a}var Sw=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),Cw=ac(),ww=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Sw(_e(this.getData,this),_e(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return xw(this,{coordDimensions:[`value`],encodeDefaulter:ve(cp,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=Cw(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=ms(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){Bs(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(Y_);zm({fullType:ww.type,getCoord2:function(e){return e.getShallow(`center`)}}),Math.PI*2,za.CMD;function Tw(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}var Ew=new X,Dw=new X,Ow=new X,kw=new X,Aw=new X,jw=[],Mw=new X;function Nw(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ew.fromArray(e[0]),Dw.fromArray(e[1]),Ow.fromArray(e[2]),X.sub(kw,Ew,Dw),X.sub(Aw,Ow,Dw);var n=kw.len(),r=Aw.len();if(!(n<.001||r<.001)){kw.scale(1/n),Aw.scale(1/r);var i=kw.dot(Aw);if(Math.cos(t)<i){var a=Tw(Dw.x,Dw.y,Ow.x,Ow.y,Ew.x,Ew.y,jw,!1);Mw.fromArray(jw),Mw.scaleAndAdd(Aw,a/Math.tan(Math.PI-t));var o=Ow.x===Dw.x?(Mw.y-Dw.y)/(Ow.y-Dw.y):(Mw.x-Dw.x)/(Ow.x-Dw.x);if(isNaN(o))return;o<0?X.copy(Mw,Dw):o>1&&X.copy(Mw,Ow),Mw.toArray(e[1])}}}}function Pw(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,Ew.fromArray(e[0]),Dw.fromArray(e[1]),Ow.fromArray(e[2]),X.sub(kw,Dw,Ew),X.sub(Aw,Ow,Dw);var r=kw.len(),i=Aw.len();if(!(r<.001||i<.001)&&(kw.scale(1/r),Aw.scale(1/i),kw.dot(t)<Math.cos(n))){var a=Tw(Dw.x,Dw.y,Ow.x,Ow.y,Ew.x,Ew.y,jw,!1);Mw.fromArray(jw);var o=Math.PI/2,s=o+Math.acos(Aw.dot(t))-n;if(s>=o)X.copy(Mw,Ow);else{Mw.scaleAndAdd(Aw,a/Math.tan(Math.PI/2-s));var c=Ow.x===Dw.x?(Mw.y-Dw.y)/(Ow.y-Dw.y):(Mw.x-Dw.x)/(Ow.x-Dw.x);if(isNaN(c))return;c<0?X.copy(Mw,Dw):c>1&&X.copy(Mw,Ow)}Mw.toArray(e[1])}}}function Fw(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function Iw(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Lt(r[0],r[1]),a=Lt(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Bt([],r[1],r[0],o/i),c=Bt([],r[1],r[2],o/a),l=Bt([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}}function Lw(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<Qc.length;c++){var l=Qc[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:q(i.states[l]&&i.states[l].ignore,s))||!q(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&Fw(r,!0,l,u);continue}r||(r=new Zu,e.setTextGuideLine(r),!d&&(s||!o)&&Fw(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),Fw(r,!1,l,u)}}if(r){z(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=Iw}}function Rw(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<Zc.length;r++){var i=Zc[r];n[i]=e.getModel([i,t])}return n}var zw=Math.PI/180;function Bw(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;Hw(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}$x(e,1,c,c+o)&&d(e)}function Vw(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;Kw(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!Kw(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,Hw(m,g,!1)}}Bw(l,t,n,r,1,i,a,o,s,d),Bw(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!Kw(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function Hw(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}Uw(a,r)}}}function Uw(e,t){Gw.rect=e,qx(Gw,t,Ww)}var Ww={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Gw={};function Kw(e){return e.position===`center`}function qw(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*zw,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=as(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=as(T,l);var E=w.get(`length2`);if(E=as(E,l),Math.abs(d.endAngle-d.startAngle)<o){V(h.states,p),h.ignore=!0,g&&(V(g.states,p),g.ignore=!0);return}if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,M,ee;r=d.cx,i=d.cy;var N=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,ee=`center`;else{var te=(N?(d.r+d.r0)/2*O:d.r*O)+r,ne=(N?(d.r+d.r0)/2*k:d.r*k)+i;if(A=te+O*3,j=ne+k*3,!N){var P=te+O*(T+c-d.r),re=ne+k*(T+c-d.r),F=P+(O<0?-1:1)*E,ie=re;A=x===`edge`?O<0?u+S:u+l-S:F+(O<0?-b:b),j=ie,M=[[te,ne],[P,re],[F,ie]]}ee=N?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var ae=Math.PI,oe=0,se=v.get(`rotate`);if(be(se))oe=ae/180*se;else if(y===`center`)oe=0;else if(se===`radial`||se===!0)oe=O<0?-D+ae:-D;else if(se===`tangential`||se===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var I=Math.atan2(O,k);I<0&&(I=ae*2+I),k>0&&se!==`tangential-noflip`&&(I=ae+I),oe=I-ae}if(a=!!oe,h.x=A,h.y=j,h.rotation=oe,h.setStyle({verticalAlign:`middle`}),N){h.setStyle({align:ee});var L=h.states.select;L&&(L.x+=h.x,L.y+=h.y)}else{var R=new Z(0,0,0,0);Uw(R,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new X(O,k),linePoints:M,textAlign:ee,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:R,unconstrainedWidth:R.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:N})}}),!a&&e.get(`avoidLabelOverlap`)&&Vw(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(V(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(V(v.states,p),v.ignore=!0):(Nw(x,g.minTurnAngle),Pw(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new X(x[0][0],x[0][1])})}}}var Jw=Math.PI*2,Yw=Math.PI/180,Xw=Mc(`pie`,Zw);function Zw(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=Lg(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*Yw,d=e.get(`endAngle`),f=e.get(`padAngle`)*Yw;d=d===`auto`?u-Jw:-d*Yw;var p=e.get(`minAngle`)*Yw+f,m=0;n.each(r,function(e){!isNaN(e)&&m++});var h=n.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=n.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;Ra(S,!_),u=S[0],d=S[1];var w=Qw(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(n.setLayout({viewRect:l,r:s}),n.each(r,function(e,t){var r;if(isNaN(e)){n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});return}r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?is(e,b,[c,s]):s}),O=i}),E<Jw&&m){if(E<=.001){var k=T/m;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=k;var i=0,a=0;k<f?(i=u+x*(t+1/2)*k,a=i):(i=u+x*t*k+C,a=u+x*(t+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})}})}var Qw=ac(),$w=function(e){x(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new Ao;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=R(WC(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle)){i.setShape(l);return}if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(Ed(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,Ed(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Td(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Ed(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else jd(i),Td(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),ql(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=R({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},WC(s.getModel(`itemStyle`),c)),R(i.ensureState(`select`),{x:p,y:m,shape:WC(o.getModel([`select`,`itemStyle`]),c)}),R(i.ensureState(`blur`),{shape:WC(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&R(g.ensureState(`select`),{x:p,y:m}),R(_.ensureState(`select`),{x:p,y:m}),Ul(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;Af(r,jf(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Zu,this.setTextGuideLine(d)),Lw(this,Rw(i),{stroke:s,opacity:Oe(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(Uu),eT=function(e){x(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`pie`,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new Uu({shape:I(Qw(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new $w(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){Ad(a.getItemGraphicEl(t),e,t)}).execute(),qw(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(Uv);function tT(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(be(r)&&!isNaN(r)&&r<0)})}}}function nT(e){e.registerChartView(eT),e.registerSeriesModel(ww),_w(`pie`,e.registerAction),e.registerLayout(Xw),e.registerProcessor(bw(`pie`)),e.registerProcessor(tT(`pie`))}var rT=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),iT=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new rT(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new rT(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new rT(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new rT(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new rT(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new rT(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),aT=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,oT=[],sT=Y.browser.firefox&&+Y.browser.version.split(`.`)[0]<39;function cT(e,t,n,r){return n||={},r?lT(e,t,n):sT&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?lT(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function lT(e,t,n){if(Y.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(vh(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(hh(oT,e,r,i)){n.zrX=oT[0],n.zrY=oT[1];return}}n.zrX=n.zrY=0}function uT(e){return e||window.event}function dT(e,t,n){if(t=uT(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&cT(e,i,t,n)}else{cT(e,t,t,n);var a=fT(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&aT.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function fT(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function pT(e,t,n,r){e.addEventListener(t,n,r)}function mT(e,t,n,r){e.removeEventListener(t,n,r)}var hT=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},gT=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=cT(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in yT)if(yT.hasOwnProperty(t)){var n=yT[t](this._track,e);if(n)return n}},e}();function _T(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function vT(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var yT={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=_T(r)/_T(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=vT(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},bT=`silent`;function xT(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ST}}function ST(){hT(this.event)}var CT=function(e){x(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Oi),wT=function(){function e(e,t){this.x=e,this.y=t}return e}(),TT=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],ET=new Z(0,0,0,0),DT=function(e){x(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new wT(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new CT,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new iT(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(V(TT,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=AT(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new wT(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new wT(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=xT(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new wT(e,t);if(kT(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Z(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(ET.copy(u.getBoundingRect()),u.transform&&ET.applyTransform(u.transform),ET.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(kT(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new gT;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new wT;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Oi);V([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){DT.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=AT(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||Lt(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function OT(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||bT}return!1}function kT(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=OT(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==bT)){t.target=o;break}}}function AT(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var jT=32,MT=7;function NT(e){for(var t=0;e>=jT;)t|=e&1,e>>=1;return e+t}function PT(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;FT(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function FT(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function IT(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function LT(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function RT(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function zT(e,t){var n=MT,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=RT(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=LT(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=RT(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=LT(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=MT||m>=MT);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-RT(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-LT(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=MT||g>=MT);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function BT(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<jT){a=PT(e,n,r,t),IT(e,n,r,n+a,t);return}var o=zT(e,t),s=NT(i);do{if(a=PT(e,n,r,t),a<s){var c=i;c>s&&(c=s),IT(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var VT=!1;function HT(){VT||(VT=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function UT(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var WT=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=UT}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,BT(n,UT)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(HT(),p.z=0),isNaN(p.z2)&&(HT(),p.z2=0),isNaN(p.zlevel)&&(HT(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=B(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),GT=Y.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function KT(){return new Date().getTime()}var qT=function(e){x(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=KT()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(GT(t),!e._paused&&e.update())}GT(t)},t.prototype.start=function(){this._running||(this._time=KT(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=KT(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=KT()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Di(e,t.loop);return this.addAnimator(n),n},t}(Oi),JT=300,YT=Y.domSupported,XT=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:H(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),ZT={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},QT=!1;function $T(e){var t=e.pointerType;return t===`pen`||t===`touch`}function eE(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function tE(e){e&&(e.zrByTouch=!0)}function nE(e,t){return dT(e.dom,new iE(e,t),!0)}function rE(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var iE=function(){function e(e,t){this.stopPropagation=We,this.stopImmediatePropagation=We,this.preventDefault=We,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),aE={mousedown:function(e){e=dT(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=dT(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=dT(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=dT(this.dom,e);var t=e.toElement||e.relatedTarget;rE(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){QT=!0,e=dT(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){QT||(e=dT(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=dT(this.dom,e),tE(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),aE.mousemove.call(this,e),aE.mousedown.call(this,e)},touchmove:function(e){e=dT(this.dom,e),tE(e),this.handler.processGesture(e,`change`),aE.mousemove.call(this,e)},touchend:function(e){e=dT(this.dom,e),tE(e),this.handler.processGesture(e,`end`),aE.mouseup.call(this,e),+new Date-this.__lastTouchMoment<JT&&aE.click.call(this,e)},pointerdown:function(e){aE.mousedown.call(this,e)},pointermove:function(e){$T(e)||aE.mousemove.call(this,e)},pointerup:function(e){aE.mouseup.call(this,e)},pointerout:function(e){$T(e)||aE.mouseout.call(this,e)}};V([`click`,`dblclick`,`contextmenu`],function(e){aE[e]=function(t){t=dT(this.dom,t),this.trigger(e,t)}});var oE={pointermove:function(e){$T(e)||oE.mousemove.call(this,e)},pointerup:function(e){oE.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function sE(e,t){var n=t.domHandlers;Y.pointerEventsSupported?V(XT.pointer,function(r){lE(t,r,function(t){n[r].call(e,t)})}):(Y.touchEventsSupported&&V(XT.touch,function(r){lE(t,r,function(i){n[r].call(e,i),eE(t)})}),V(XT.mouse,function(r){lE(t,r,function(i){i=uT(i),t.touching||n[r].call(e,i)})}))}function cE(e,t){Y.pointerEventsSupported?V(ZT.pointer,n):Y.touchEventsSupported||V(ZT.mouse,n);function n(n){function r(r){r=uT(r),rE(e,r.target)||(r=nE(e,r),t.domHandlers[n].call(e,r))}lE(t,n,r,{capture:!0})}}function lE(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,pT(e.domTarget,t,n,r)}function uE(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&mT(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var dE=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),fE=function(e){x(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new dE(t,aE),YT&&(r._globalHandlerScope=new dE(document,oE)),sE(r,r._localHandlerScope),r}return t.prototype.dispose=function(){uE(this._localHandlerScope),YT&&uE(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,YT&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?cE(this,t):uE(t)}},t}(Oi),pE={},mE={};function hE(e){delete mE[e]}function gE(e){if(!e)return!1;if(typeof e==`string`)return ei(e,1)<ji;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=ei(t[i].color,1);return n/=r,n<ji}return!1}var _E=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new WT,a=n.renderer||`canvas`;pE[a]||(a=he(pE)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new pE[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Y.node&&!Y.worker&&!s?new fE(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Y.touchEventsSupported:!!l,d=44,f;u&&(f=q(n.pointerSize,d)),this.handler=new DT(i,o,c,o.root,f),this.animation=new qT({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=gE(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=KT(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=KT();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Su&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,hE(this.id))},e}();function vE(e,t){var n=new _E(oe(),e,t);return mE[n.id]=n,n}function yE(e,t){pE[e]=t}var bE=``;typeof navigator<`u`&&(bE=navigator.platform||``);var xE=`rgba(0, 0, 0, 0.2)`,SE=Q.color.theme[0],CE=Qr(SE,null,null,.9),wE={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[CE,SE],aria:{decal:{decals:[{color:xE,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:xE,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:xE,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:xE,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:xE,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:xE,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:bE.match(/^Win/)?`Microsoft YaHei`:`sans-serif`,fontSize:12,fontStyle:`normal`,fontWeight:`normal`},blendMode:null,stateAnimation:{duration:300,easing:`cubicOut`},animation:`auto`,animationDuration:1e3,animationDurationUpdate:500,animationEasing:`cubicInOut`,animationEasingUpdate:`cubicInOut`,animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},TE=J();function EE(e,t,n){var r=TE.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var DE,OE,kE,AE=`\0_ec_inner`,jE=1,ME=function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new ep(r),this._locale=new ep(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=LE(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,LE(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?kE(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&V(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=J(),s=t&&t.replaceMergeMainTypeMap;op(this),V(e,function(e,t){e!=null&&(Kg.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?I(e):L(n[t],e,!0))}),s&&s.each(function(e,t){Kg.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),Kg.topologicalTravel(a,Kg.getAllClassMainTypes(),c,this);function c(t){var a=EE(this,t,zs(e[t])),o=r.get(t),c=Ws(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);nc(c,t,Kg),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;V(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=Kg.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=R({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),R(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&DE(this)}this._seriesIndices||DE(this)},t.prototype.getOption=function(){var e=I(this.option);return V(e,function(t,n){if(Kg.hasClass(n)){for(var r=zs(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!tc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[AE],e},t.prototype.setTheme=function(e){this._theme=new ep(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?pe(a,function(e){return!!e}):FE(`name`,i,a):FE(`id`,r,a):(o=[],V(zs(n),function(e){a[e]&&o.push(a[e])})),IE(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(IE(r?this.queryComponents(r):pe(this._componentsMap.get(n),function(e){return!!e}),e));function i(e){var t=n+`Index`,r=n+`Id`,i=n+`Name`;return e&&(e[t]!=null||e[r]!=null||e[i]!=null)?{mainType:n,index:e[t],id:e[r],name:e[i]}:null}function a(t){return e.filter?pe(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(W(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=G(e)?r.get(e):K(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=$s(e,null);return pe(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},t.prototype.getSeriesByType=function(e){return pe(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return pe(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){OE(this),V(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){V(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){OE(this),V(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return V(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return OE(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){OE(this);var n=[];V(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=J(n)},t.prototype.restoreData=function(e){DE(this);var t=this._componentsMap,n=[];t.each(function(e,t){Kg.hasClass(t)&&n.push(t)}),Kg.topologicalTravel(n,Kg.getAllClassMainTypes(),function(n){V(t.get(n),function(t){t&&(n!==`series`||!NE(t,e))&&t.restoreData()})})},t.internalField=function(){DE=function(e){var t=e._seriesIndices=[];V(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=J(t)},OE=function(e){},kE=function(e,t){e.option={},e.option[AE]=jE,e._componentsMap=J({series:[]}),e._componentsCount=J();var n=t.aria;K(n)&&n.enabled==null&&(n.enabled=!0),PE(t,e._theme.option),L(t,wE,!1),e._mergeOption(t,null)}}(),t}(ep);function NE(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function PE(e,t){var n=e.color&&!e.colorLayer;V(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||Kg.hasClass(r)||(typeof t==`object`?e[r]=e[r]?L(e[r],t,!1):I(t):e[r]??(e[r]=t))})}function FE(e,t,n){if(U(t)){var r=J();return V(t,function(e){e!=null&&$s(e,null)!=null&&r.set(e,!0)}),pe(n,function(t){return t&&r.get(t[e])})}var i=$s(t,null);return pe(n,function(t){return t&&i!=null&&t[e]===i})}function IE(e,t){return t.hasOwnProperty(`subType`)?pe(e,function(e){return e&&e.subType===t.subType}):e}function LE(e){var t=J();return e&&V(zs(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}ue(ME,Xg);var RE=/^(min|max)?(.+)$/,zE=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(V(zs(e.series),function(e){e&&e.data&&Se(e.data)&&Pe(e.data)}),V(zs(e.dataset),function(e){e&&e.source&&Se(e.source)&&Pe(e.source)})),e=I(e);var r=this._optionBackup,i=BE(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],I(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=I(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(var s=0,c=r.length;s<c;s++)VE(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!UE(a,this._currentMediaIndices)&&(o=H(a,function(e){return I(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function BE(e,t,n){var r=[],i,a,o=e.baseOption,s=e.timeline,c=e.options,l=e.media,u=!!e.media,d=!!(c||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||u)&&(e.options=e.media=null),a=e),u&&U(l)&&V(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),V(c,function(e){return f(e)}),V(r,function(e){return f(e.option)});function f(e){V(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function VE(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return V(e,function(e,t){var n=t.match(RE);if(!(!n||!n[1]||!n[2])){var a=n[1];HE(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function HE(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function UE(e,t){return e.join(`,`)===t.join(`,`)}var WE=V,GE=K,KE=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function qE(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=KE.length;n<r;n++){var i=KE[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?L(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?L(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function JE(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,z(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function YE(e){JE(e,`itemStyle`),JE(e,`lineStyle`),JE(e,`areaStyle`),JE(e,`label`),JE(e,`labelLine`),JE(e,`upperLabel`),JE(e,`edgeLabel`)}function XE(e,t){var n=GE(e)&&e[t],r=GE(n)&&n.textStyle;if(r)for(var i=0,a=Vs.length;i<a;i++){var o=Vs[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function ZE(e){e&&(YE(e),XE(e,`label`),e.emphasis&&XE(e.emphasis,`label`))}function QE(e){if(GE(e)){qE(e),YE(e),XE(e,`label`),XE(e,`upperLabel`),XE(e,`edgeLabel`),e.emphasis&&(XE(e.emphasis,`label`),XE(e.emphasis,`upperLabel`),XE(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(qE(t),ZE(t));var n=e.markLine;n&&(qE(n),ZE(n));var r=e.markArea;r&&ZE(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!Se(a))for(var o=0;o<a.length;o++)ZE(a[o]);V(e.categories,function(e){YE(e)})}if(i&&!Se(i))for(var o=0;o<i.length;o++)ZE(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)ZE(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)U(c[o])?(ZE(c[o][0]),ZE(c[o][1])):ZE(c[o]);e.type===`gauge`?(XE(e,`axisLabel`),XE(e,`title`),XE(e,`detail`)):e.type===`treemap`?(JE(e.breadcrumb,`itemStyle`),V(e.levels,function(e){YE(e)})):e.type===`tree`&&YE(e.leaves)}}function $E(e){return U(e)?e:e?[e]:[]}function eD(e){return(U(e)?e[0]:e)||{}}function tD(e,t){WE($E(e.series),function(e){GE(e)&&QE(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),WE(n,function(t){WE($E(e[t]),function(e){e&&(XE(e,`axisLabel`),XE(e.axisPointer,`label`))})}),WE($E(e.parallel),function(e){var t=e&&e.parallelAxisDefault;XE(t,`axisLabel`),XE(t&&t.axisPointer,`label`)}),WE($E(e.calendar),function(e){JE(e,`itemStyle`),XE(e,`dayLabel`),XE(e,`monthLabel`),XE(e,`yearLabel`)}),WE($E(e.radar),function(e){XE(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),WE($E(e.geo),function(e){GE(e)&&(ZE(e),WE($E(e.regions),function(e){ZE(e)}))}),WE($E(e.timeline),function(e){ZE(e),JE(e,`label`),JE(e,`itemStyle`),JE(e,`controlStyle`,!0);var t=e.data;U(t)&&V(t,function(e){K(e)&&(JE(e,`label`),JE(e,`itemStyle`))})}),WE($E(e.toolbox),function(e){JE(e,`iconStyle`),WE(e.feature,function(e){JE(e,`iconStyle`)})}),XE(eD(e.axisPointer),`label`),XE(eD(e.tooltip).axisPointer,`label`)}function nD(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function rD(e,t,n,r){for(var i=t.split(`,`),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]??(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function iD(e){e&&V(aD,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var aD=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],oD=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],sD=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function cD(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<sD.length;n++){var r=sD[n][1],i=sD[n][0];t[r]!=null&&(t[i]=t[r])}}function lD(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function uD(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function dD(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function fD(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&fD(e[n].children,t)}function pD(e,t){tD(e,t),e.series=zs(e.series),V(e.series,function(e){if(K(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),lD(e.label);var n=e.data;if(n&&!Se(n))for(var r=0;r<n.length;r++)lD(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=nD(e,`pointer.color`);i!=null&&rD(e,`itemStyle.color`,i)}else if(t===`bar`){cD(e),cD(e.backgroundStyle),cD(e.emphasis);var n=e.data;if(n&&!Se(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(cD(n[r]),cD(n[r]&&n[r].emphasis))}else if(t===`sunburst`){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),uD(e),fD(e.data,uD)}else t===`graph`||t===`sankey`?dD(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&z(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),iD(e)}}),e.dataRange&&(e.visualMap=e.dataRange),V(oD,function(t){var n=e[t];n&&(U(n)||(n=[n]),V(n,function(e){iD(e)}))})}var mD=Nc(hD);function hD(e){var t=J();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),V(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),gD(e))})}function gD(e){V(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=hs(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var _D=function(){function e(){this.group=new Su,this.uid=ih(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();et(_D),st(_D);var vD=ac(),yD={itemStyle:ct(Zf,!0),lineStyle:ct(Jf,!0)},bD={lineStyle:`stroke`,itemStyle:`fill`};function xD(e,t){return e.visualStyleMapper||yD[t]||(console.warn(`Unknown style type '`+t+`'.`),yD.itemStyle)}function SD(e,t){return e.visualDrawType||bD[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var CD={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=xD(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=SD(e,r),c=a[s],l=W(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||W(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||W(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=R({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},wD=new ep,TD={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=xD(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){wD.option=n[r];var o=i(wD);R(e.ensureUniqueItemVisual(t,`style`),o),wD.option.decal&&(e.setItemVisual(t,`decal`,wD.option.decal),wD.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},ED={performRawSeries:!0,overallReset:function(e){var t=J();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();vD(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=vD(e).scope,a=SD(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},DD=Math.PI;function OD(e,t){t||={},z(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Su,r=new To({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Ao({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new To({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new od({shape:{startAngle:-DD/2,endAngle:-DD/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:DD*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:DD*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var kD=function(){function e(e,t,n,r){this._stageTaskMap=J(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):jc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=J();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;V(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});je(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;V(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.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)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=J(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||i_({plan:PD,reset:FD,count:RD}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||i_({reset:AD});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=J(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;je(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):V(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,i_({reset:jD,onDirty:ND})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return W(e)&&(e={overallReset:e,seriesType:zD(e)}),e.uid=ih(`stageHandler`),t&&(e.visualType=t),e},e}();function AD(e){e.overallReset(e.ecModel,e.api,e.payload)}function jD(e){return e.dirtyOnOverallProgress&&MD}function MD(){this.agent.dirty(),this.getDownstream().dirty()}function ND(){this.agent&&this.agent.dirty()}function PD(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function FD(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=zs(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?H(t,function(e,t){return LD(t)}):ID}var ID=LD(0);function LD(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function RD(e){return e.data.count()}function zD(e){HD=null;try{e(BD,VD)}catch{}return HD}var BD={},VD={},HD;UD(BD,ME),UD(VD,Gc),BD.eachSeriesByType=BD.eachRawSeriesByType=function(e){HD=e},BD.eachComponent=function(e){e.mainType===`series`&&e.subType&&(HD=e.subType)};function UD(e,t){for(var n in t.prototype)e[n]=We}var $=Q.darkColor,WD=$.background,GD=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},KD={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},qD={darkMode:!0,color:$.theme,backgroundColor:WD,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},feature:{dataView:{backgroundColor:WD,textColor:$.primary,textareaColor:$.background,textareaBorderColor:$.border,buttonColor:$.accent50,buttonTextColor:$.neutral00}}},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:KD,y:KD,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:GD(),logAxis:GD(),valueAxis:GD(),categoryAxis:GD(),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 e=GD();return e.axisName={color:$.axisLabel},e.axisLine.lineStyle.color=$.neutral20,e}(),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}}}};qD.categoryAxis.splitLine.show=!1;var JD=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(G(e)){var i=Ze(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};V(e,function(e,i){for(var s=!1,c=0;c<a.length;c++){var l=a[c],u=i.lastIndexOf(l);if(u>0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),YD=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],XD=YD.concat([`symbolKeepAspect`]),ZD={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<YD.length;o++){var s=YD[o],c=e.get(s);W(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(R({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=he(i);function u(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<l.length;o++){var s=l[o];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?u:null}}},QD={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(e,t){for(var n=e.getItemModel(t),r=0;r<XD.length;r++){var i=XD[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function $D(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n)}}function eO(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t)}}function tO(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var nO=new Oi,rO={};function iO(e,t){rO[e]=t}function aO(e){return rO[e]}var oO={};function sO(e,t){oO[e]=t}var cO=Math.round(Math.random()*9),lO=typeof Object.defineProperty==`function`,uO=function(){function e(){this._id=`__ec_inner_`+cO++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return lO?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},e}();function dO(e){return isFinite(e)}function fO(e,t,n){var r=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=dO(r)?r:0,i=dO(i)?i:1,a=dO(a)?a:0,o=dO(o)?o:0,e.createLinearGradient(r,a,i,o)}function pO(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,c=t.r==null?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,c*=a),o=dO(o)?o:.5,s=dO(s)?s:.5,c=c>=0&&dO(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function mO(e,t,n){for(var r=t.type===`radial`?pO(e,t,n):fO(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function hO(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function gO(e){return parseInt(e,10)}function _O(e,t,n){var r=[`width`,`height`][t],i=[`clientWidth`,`clientHeight`][t],a=[`paddingLeft`,`paddingTop`][t],o=[`paddingRight`,`paddingBottom`][t];if(n[r]!=null&&n[r]!==`auto`)return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||gO(s[r])||gO(e.style[r]))-(gO(s[a])||0)-(gO(s[o])||0)||0}function vO(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:be(e)?[e]:U(e)?e:null}function yO(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&vO(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=H(n,function(e){return e/i}),r/=i)}return[n,r]}var bO=new za(!0);function xO(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function SO(e){return typeof e==`string`&&e!==`none`}function CO(e){var t=e.fill;return t!=null&&t!==`none`}function wO(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function TO(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function EO(e,t,n){var r=gt(t.image,t.__image,n);if(vt(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Ge),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function DO(e,t,n,r,i){var a,o=xO(n),s=CO(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||bO,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?mO(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?mO(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?EO(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?EO(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=yO(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&TO(e,n),s&&wO(e,n)):(s&&wO(e,n),o&&TO(e,n)),T&&e.setLineDash([])}function OO(e,t,n){var r=t.__image=gt(n.image,t.__image,t,t.onload);if(!(!r||!vt(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function kO(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=yO(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(xO(n)&&e.strokeText(i,n.x,n.y),CO(n)&&e.fillText(i,n.x,n.y)):(CO(n)&&e.fillText(i,n.x,n.y),xO(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var AO=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],jO=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function MO(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){UO(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?$i.opacity:o}(r||t.blend!==n.blend)&&(a||=(UO(e,i),!0),e.globalCompositeOperation=t.blend||$i.blend);for(var s=0;s<AO.length;s++){var c=AO[s];(r||t[c]!==n[c])&&(a||=(UO(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(UO(e,i),!0),e.shadowColor=t.shadowColor||$i.shadowColor),a}function NO(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=MO(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(UO(e,i),!0),SO(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(UO(e,i),!0),SO(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(UO(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(UO(e,i),!0),e.lineWidth=c)}for(var l=0;l<jO.length;l++){var u=jO[l],d=u[0];(r||a[d]!==o[d])&&(s||=(UO(e,i),!0),e[d]=a[d]||u[1])}return s}function PO(e,t,n,r,i){return MO(e,t.style,n&&n.style,r,i)}function FO(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function IO(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),FO(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function LO(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var RO=1,zO=2,BO=3,VO=4;function HO(e){var t=CO(e),n=xO(e);return!(e.lineDash||!(+t^n)||t&&typeof e.fill!=`string`||n&&typeof e.stroke!=`string`||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function UO(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function WO(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};GO(e,t,n),KO(e,n)}function GO(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||hO(i,a))&&(a&&(UO(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(UO(e,n),e.save(),IO(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped){t.__dirty&=-2,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof uo&&t.autoBatch&&HO(o);s||LO(r,l.transform)?(UO(e,n),FO(e,t)):u||UO(e,n),t instanceof uo?(n.lastDrawType!==RO&&(c=!0,n.lastDrawType=RO),NO(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),DO(e,t,o,u,n)):t instanceof po?(n.lastDrawType!==BO&&(c=!0,n.lastDrawType=BO),NO(e,t,l,c,n),kO(e,t,o)):t instanceof _o?(n.lastDrawType!==zO&&(c=!0,n.lastDrawType=zO),PO(e,t,l,c,n),OO(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==VO&&(c=!0,n.lastDrawType=VO),qO(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&UO(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function KO(e,t){UO(e,t),t.prevElClipPaths&&e.restore()}function qO(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),GO(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}KO(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),GO(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}KO(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var JO=new uO,YO=new pt(100),XO=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function ZO(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&JO.delete(e);var a=JO.get(e);if(a)return a;var o=z(e,{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});o.backgroundColor===`none`&&(o.backgroundColor=null);var s={repeat:`repeat`};return c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,JO.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<XO.length;++s){var c=o[XO[s]];if(c!=null&&!U(c)&&!G(c)&&!be(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=YO.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=$O(o.dashArrayX),f=ek(o.dashArrayY),p=QO(o.symbol),m=tk(d),h=nk(f),g=!i&&O.createCanvas(),_=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},v=b(),y;g&&(g.width=v.width*n,g.height=v.height*n,y=g.getContext(`2d`)),x(),a&&YO.put(l,g||_),e.image=g,e.svgElement=_,e.svgWidth=v.width,e.svgHeight=v.height;function b(){for(var e=1,t=0,n=m.length;t<n;++t)e=Os(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=Os(r,p[t].length);e*=r;var i=h*m.length*p.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function x(){y&&(y.clearRect(0,0,g.width,g.height),o.backgroundColor&&(y.fillStyle=o.backgroundColor,y.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(e<=0)return;for(var a=-h,s=0,c=0,l=0;a<v.height;){if(s%2==0){for(var u=c/2%p.length,m=0,b=0,x=0;m<v.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(b%2==0){var C=(1-o.symbolSize)*.5,w=m+d[l][b]*C,T=a+f[s]*C,E=d[l][b]*o.symbolSize,D=f[s]*o.symbolSize,O=x/2%p[u].length;k(w,T,E,D,p[u][O])}m+=d[l][b],++x,++b,b===d[l].length&&(b=0)}++l,l===d.length&&(l=0)}a+=f[s],++c,++s,s===f.length&&(s=0)}function k(e,t,a,s,c){var l=i?1:n,u=uv(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(u);d&&_.children.push(d)}else WO(y,u)}}}}function QO(e){if(!e||e.length===0)return[[`rect`]];if(G(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!G(e[n])){t=!1;break}if(t)return QO([e]);for(var r=[],n=0;n<e.length;++n)G(e[n])?r.push([e[n]]):r.push(e[n]);return r}function $O(e){if(!e||e.length===0)return[[0,0]];if(be(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!be(e[r])){n=!1;break}if(n)return $O([e]);for(var i=[],r=0;r<e.length;++r)if(be(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=H(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function ek(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(be(e)){var t=Math.ceil(e);return[t,t]}var n=H(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function tk(e){return H(e,function(e){return nk(e)})}function nk(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var rk=Nc(ik);function ik(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,`decal`);if(n){var i=r.ensureUniqueItemVisual(e,`style`);i.decal=ZO(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=ZO(i,t)}}})}var ak=1,ok=800,sk=900,ck=920,lk=1e3,uk=2e3,dk=5e3,fk=1e3,pk=1100,mk=2e3,hk=3e3,gk=4e3,_k=4500,vk=4600,yk=5e3,bk=6e3,xk=7e3,Sk={PROCESSOR:{SERIES_FILTER:ok,AXIS_STATISTICS:ck,FILTER:lk,STATISTIC:dk,STATISTICS:dk},VISUAL:{LAYOUT:fk,PROGRESSIVE_LAYOUT:pk,GLOBAL:mk,CHART:hk,POST_CHART_LAYOUT:vk,COMPONENT:gk,BRUSH:yk,CHART_ITEM:_k,ARIA:bk,DECAL:xk}},Ck=`__flagInMainProcess`,wk=`__mainProcessVersion`,Tk=`__pendingUpdate`,Ek=`__needsUpdateStatus`,Dk=/^[a-zA-Z0-9_]+$/,Ok=`__connectUpdateStatus`,kk=0,Ak=1,jk=2;function Mk(e){return function(){var t=[...arguments];if(this.isDisposed()){this.id;return}return Pk(this,e,t)}}function Nk(e){return function(){var t=[...arguments];return Pk(this,e,t)}}function Pk(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Oi.prototype[t].apply(e,n)}var Fk=function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Oi),Ik=Fk.prototype;Ik.on=Nk(`on`),Ik.off=Nk(`off`);var Lk,Rk,zk,Bk,Vk,Hk,Uk,Wk,Gk,Kk,qk,Jk,Yk,Xk,Zk,Qk,$k,eA,tA,nA=function(e){x(t,e);function t(t,n,r){var i=e.call(this,new JD)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[wk]=1,r.ssr;var c=i._zr=vE(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:q(r.useDirtyRect,s),useCoarsePointer:q(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=FC(_e(c.flush,c),17),i._updateTheme(n),i._locale=jh(r.locale||kh),i._coordSysMgr=new Lm;var l=i._api=Zk(i);function u(e,t){return e.__prio-t.__prio}return BT(uA,u),BT(cA,u),i._scheduler=new kD(i,l,cA,uA),i._messageCenter=new Fk,i._initEvents(),i.resize=_e(i.resize,i),c.animation.on(`frame`,i._onframe,i),Kk(c,i),qk(c,i),Pe(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(eA(this),this[Tk]){var r=this[Tk].silent;this[Ck]=!0,tA(this);try{Lk(this),Bk.update.call(this,null,this[Tk].updateParams)}catch(e){throw this[Ck]=!1,this[Tk]=null,e}this._zr.flush(),this[Ck]=!1,this[Tk]=null,Wk.call(this,r),Gk.call(this,r)}else if(e.unfinished){var i=ak;do{e.unfinished=!1;var a=O.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),Hk(this,t),e.performVisualTasks(t),Xk(this,this._model,n,`remain`,{}),i-=O.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[Ck]){if(this._disposed){this.id;return}var r,i,a;if(K(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[Ck]=!0,tA(this),!this._model||t){var o=new zE(this._api),s=this._theme,c=this._model=new ME;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},lA);var l={seriesTransition:a,optionChanged:!0};if(n)this[Tk]={silent:r,updateParams:l},this[Ck]=!1,this.getZr().wakeUp();else{try{Lk(this),Bk.update.call(this,null,l)}catch(e){throw this[Tk]=null,this[Ck]=!1,e}this._ssr||this._zr.flush(),this[Tk]=null,this[Ck]=!1,Wk.call(this,r),Gk.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[Ck]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[Tk]&&(r??=this[Tk].silent,i=this[Tk].updateParams,this[Tk]=null),this[Ck]=!0,tA(this);try{this._updateTheme(e),n.setTheme(this._theme),Lk(this),Bk.update.call(this,{type:`setTheme`},i)}catch(e){throw this[Ck]=!1,e}this[Ck]=!1,Wk.call(this,r),Gk.call(this,r)}}},t.prototype._updateTheme=function(e){G(e)&&(e=dA[e]),e&&(e=I(e),e&&pD(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Y.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return V(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;V(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return V(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=Infinity;if(mA[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();V(pA,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(I(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=O.createCanvas(),h=vE(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return V(u,function(e){var t=e.left-o,n=e.top-s;g+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new To({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),V(u,function(e){var t=new _o({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return Vk(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return Vk(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return Vk(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return V(sc(n,e),function(e,n){n.indexOf(`Models`)>=0&&V(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=sc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?eO(i,t):$D(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;V(iA,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&tO(i,function(e){var t=Pc(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=R({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;V(sA,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),yw(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&fc(this.getDom(),gA,``);var e=this,t=e._api,n=e._model;V(e._componentsViews,function(e){e.dispose(n,t)}),V(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete pA[e.id]},t.prototype.resize=function(e){if(!this[Ck]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[Tk]&&(r??=this[Tk].silent,n=!0,this[Tk]=null),this[Ck]=!0,tA(this);try{n&&Lk(this),Bk.update.call(this,{type:`resize`,animation:R({duration:0},e&&e.animation)})}catch(e){throw this[Ck]=!1,e}this[Ck]=!1,Wk.call(this,r),Gk.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(K(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),fA[e]){var n=fA[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=R({},e);return t.type=oA[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(K(t)||(t={silent:!!t}),aA[e.type]&&this._model){if(this[Ck]){this._pendingActions.push(e);return}var n=t.silent;Uk.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Y.browser.weChat&&this._throttledZrFlush(),Wk.call(this,n),Gk.call(this,n)}},t.prototype.updateLabelLayout=function(){nO.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Lk=function(e){ox(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),Rk(e,!0),Rk(e,!1),t.plan()},Rk=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;c<i.length;c++)i[c].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&l(t)}):n.eachSeries(l);function l(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=Ze(e.type);u=new(t?_D.getClass(d.main,d.sub):Uv.getClass(d.sub)),u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(var c=0;c<i.length;){var u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},zk=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){V([].concat(e._componentsViews,e._chartsViews),l);return}var o=dc(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=J(),V(zs(s),function(e){var t=$s(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(Ql(n)){if(t instanceof Y_)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&Pl(t,n,e._api);else{var r=Fl(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Nl(t.mainType,t.componentIndex,e._api),a&&V(a,function(e){n.type===`highlight`?wl(e):Tl(e)})}}else Zl(n)&&t instanceof Y_&&(Rl(t,n,e._api),zl(t),$k(e))}},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||l(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function l(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},Bk={prepareAndUpdate:function(e){Lk(this),Bk.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){sx(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),nO.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),Hk(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),Jk(this,r,i,e,n),nO.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive){if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}}});var a=J();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),Xk(t,n,r,e,{},a),nO.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),Uv.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),Jk(this,n,this._api,e,{}),nO.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),Uv.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),nO.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){Bk.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed){e.id;return}for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=sc(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}Vk=e,Hk=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},Uk=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=aA[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&Ze(s[0]);this[Ck]=!0,tA(this);var u=[e],d=!1;e.batch&&(d=!0,u=H(e.batch,function(t){return t=z(R({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=Zl(e),_=Ql(e);if(_&&jl(this._api),V(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=R({},t),p.type=h,f.push(p),_){var a=cc(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;zk(n,c,t,u),$k(n)}else g?(zk(n,c,t,`series`),$k(n)):l&&zk(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[Tk]?(Lk(this),Bk.update.call(this,e),this[Tk]=null):Bk[c].call(this,e)}catch(e){throw this[Ck]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[Ck]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;je(K(y)),v=z({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},Wk=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();Uk.call(this,n,e)}},Gk=function(e){!e&&this.trigger(`updated`)},Kk=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[Tk]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},qk=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=tO(n,Yl);r&&(Il(r,e,t._api),$k(t))}).on(`mouseout`,function(e){var n=e.target,r=tO(n,Yl);r&&(Ll(r,e,t._api),$k(t))}).on(`click`,function(e){var n=e.target,r=tO(n,function(e){return Pc(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=Pc(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r||=!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;BT(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),V(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&=(r===a&&r++,``),a=r,n.setZLevel(r)})}}Jk=function(e,t,r,i,a){n(t),Yk(e,t,r,i,a),V(e._chartsViews,function(e){e.__alive=!1}),Xk(e,t,r,i,a),V(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},Yk=function(e,t,n,r,i,a){V(a||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),o(i,e),c(i,e)})},Xk=function(e,t,n,r,l,u){var d=e._scheduler;l=R(l||{},{updatedSeries:t.getSeries()}),nO.trigger(`series:beforeupdate`,t,n,l);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),s(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),a(t,n),zl(t)}),d.unfinished=f||d.unfinished,nO.trigger(`series:layoutlabels`,t,n,l),nO.trigger(`series:transition`,t,n,l),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];o(t,n),c(t,n)}),i(e,t),nO.trigger(`series:afterupdate`,t,n,l)},$k=function(e){e[Ek]=!0,e.getZr().wakeUp()},tA=function(e){e[wk]=(e[wk]+1)%1e6},eA=function(e){e[Ek]&&(e.getZr().storage.traverse(function(e){Dd(e)||r(e)}),e[Ek]=!1)};function r(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i!==`emphasis`&&i!==`blur`&&i!==`select`&&t.push(i)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function i(e,t){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>q(t.get(`hoverLayerThreshold`),wE.hoverLayerThreshold)&&!Y.node&&!Y.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=yf(e);t.eachRendered(function(e){return xf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Dd(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Dd(e))return;if(e instanceof uo&&$l(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}Zk=function(e){return new(function(t){x(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){wl(t,n),$k(e)},n.prototype.leaveEmphasis=function(t,n){Tl(t,n),$k(e)},n.prototype.enterBlur=function(t){El(t),$k(e)},n.prototype.leaveBlur=function(t){Dl(t),$k(e)},n.prototype.enterSelect=function(t){Ol(t),$k(e)},n.prototype.leaveSelect=function(t){kl(t),$k(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[wk]},n.prototype.usingTHL=function(){return e._usingTHL},n}(Gc))(e)},Qk=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[Ok]=t}}V(oA,function(n,r){e._messageCenter.on(r,function(n){if(mA[e.group]&&e[Ok]!==kk){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];V(pA,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,kk),V(i,function(e){e[Ok]!==Ak&&e.dispatchAction(r)}),t(i,jk)}})})}}(),t}(Oi),rA=nA.prototype;rA.on=Mk(`on`),rA.off=Mk(`off`),rA.one=function(e,t,n){var r=this;function i(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var iA=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],aA={},oA={},sA={},cA=[],lA=[],uA=[],dA={},fA={},pA={},mA={},hA=new Date-0;new Date-0;var gA=`_echarts_instance_`;function _A(e,t,n){var r=!(n&&n.ssr);if(r){var i=vA(e);if(i)return i}var a=new nA(e,t,n);return a.id=`ec_`+hA++,pA[a.id]=a,r&&fc(e,gA,a.id),Qk(a),nO.trigger(`afterinit`,a),a}function vA(e){return pA[pc(e,gA)]}function yA(e,t){dA[e]=t}function bA(e){B(lA,e)<0&&lA.push(e)}function xA(e,t){AA(cA,e,t,uk)}function SA(e){wA(`afterinit`,e)}function CA(e){wA(`afterupdate`,e)}function wA(e,t){nO.on(e,t)}function TA(e,t,n){var r,i,a,o,s;W(t)&&(n=t,t=``),K(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;aA[r]||(je(Dk.test(r)&&Dk.test(i)),a&&je(i!==r),aA[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},sA[i]=1,a&&s&&(sA[l]=1),oA[l]=r)}function EA(e,t){Lm.register(e,t)}function DA(e,t){AA(uA,e,t,fk,`layout`,!0)}function OA(e,t){AA(uA,e,t,hk,`visual`,!0)}var kA=[];function AA(e,t,n,r,i,a){if((W(t)||K(t))&&(n=t,t=r),!(B(kA,n)>=0)){kA.push(n);var o=kD.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function jA(e,t){fA[e]=t}function MA(e,t,n){var r=aO(`registerMap`);r&&r(e,t,n)}var NA=m_;OA(mk,CD),OA(_k,TD),OA(_k,ED),OA(mk,ZD),OA(_k,QD),OA(xk,rk),bA(pD),xA(sk,mD),jA(`default`,OD),TA({type:$c,event:$c,update:$c},We),TA({type:el,event:el,update:el},We),TA({type:tl,event:il,update:tl,action:We,refineEvent:PA,publishNonRefinedEvent:!0}),TA({type:nl,event:il,update:nl,action:We,refineEvent:PA,publishNonRefinedEvent:!0}),TA({type:rl,event:il,update:rl,action:We,refineEvent:PA,publishNonRefinedEvent:!0});function PA(e,t,n,r){return{eventContent:{selected:Bl(n),isFromClick:t.isFromClick||!1}}}yA(`default`,{}),yA(`dark`,qD);var FA=[],IA={registerPreprocessor:bA,registerProcessor:xA,registerPostInit:SA,registerPostUpdate:CA,registerUpdateLifecycle:wA,registerAction:TA,registerCoordinateSystem:EA,registerLayout:DA,registerVisual:OA,registerTransform:NA,registerLoading:jA,registerMap:MA,registerImpl:iO,PRIORITY:Sk,ComponentModel:Kg,ComponentView:_D,SeriesModel:Y_,ChartView:Uv,registerComponentModel:function(e){Kg.registerClass(e)},registerComponentView:function(e){_D.registerClass(e)},registerSeriesModel:function(e){Y_.registerClass(e)},registerChartView:function(e){Uv.registerClass(e)},registerCustomSeries:function(e,t){sO(e,t)},registerSubTypeDefaulter:function(e,t){Kg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){yE(e,t)}};function LA(e){if(U(e)){V(e,function(e){LA(e)});return}B(FA,e)>=0||(FA.push(e),W(e)&&(e={install:e}),e.install(IA))}var RA=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),zA=function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,lc).models[0]},t.type=`cartesian2dAxis`,t}(Kg);ue(zA,RA);var BA={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:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.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:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},VA=L({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},BA),HA=L({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},BA),UA={category:VA,value:HA,time:L({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},HA),log:z({logBase:10},HA)};function WA(e,t,n,r){V(Xy,function(i,a){var o=L(L({},UA[a],!0),r,!0),s=function(e){x(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Vg(this),r=n?Ug(e):{};L(e,t.getTheme().get(a+`Axis`)),L(e,this.getDefaultOption()),e.type=GA(e),n&&Hg(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=ty.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=rS();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,GA)}function GA(e){return e.type||(e.data?`category`:`value`)}var KA=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return H(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),pe(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),qA=[`x`,`y`];function JA(e){return(e.type===`interval`||e.type===`time`)&&!Rh(e)}var YA=function(e){x(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=_C,t.dimensions=qA,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!JA(e)||!JA(t))){var n=cy(e,null),r=cy(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=Et([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Z(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Vt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Vt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Z(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(KA);function XA(e,t){var n=e.scale,r=e.model,i=iC(n,r,r.ecModel,e,null),a=_y(n),o=_y(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=Yo(l[0].value-l[1].value),g=Yo(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-+!!f-!!p}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=Cy(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*Jo(c,2):yy(E),D=by(E)}function j(){w=ls(k-E*f,D)}function M(){T=ls(O+E*p,D)}function ee(){k=f?ls(w+E*f,D):w}function N(){O=p?ls(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var te=e.getExtent(),ne=Yo(te[1]-te[0]);D=ps([T,w],ne,.5/m),ee(),N(),ks(D)&&(E=ls(E,D))}else{var P=C[1]-C[0];E=a?Jo(xs(P),1):Cs(P/m,2),D=by(E),b[0]?(w=C[0],A(function(){if(ee(),O=ls(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=ls(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=ls(Qo(C[0]/E)*E,D),O=ls(Zo(C[1]/E)*E,D);var e=Xo((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=Zo(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=ls(k-E*n[0],D),O=ls(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}fb(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function ZA(e,t){var n=_y(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Cy(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?$A(r,t):QA(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=by(d)),i[0]||(s[0]=ls(Zo(s[0]/u)*u,l)),i[1]||(s[1]=ls(Qo(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),fb(e,i,o,s,a,c)}function QA(e,t){var n=Ty(t.splitNumber,5),r=uy(e),i=t.minInterval,a=t.maxInterval,o=Cs(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=by(o),c=e.getExtent(),l=[ls(Qo(c[0]/o)*o,s),ls(Zo(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function $A(e,t){var n=Ty(t.splitNumber,10),r=e.getExtent(),i=uy(e),a=Jo(xs(i),1);n/i*a<=.5&&(a*=10);var o=by(a),s=[ls(Qo(r[0]/a)*a,o),ls(Zo(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function ej(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;tj(t,n,r,i,null)}function tj(e,t,n,r,i){var a=iC(e,t,r,n,i),o=hy(e)||gy(e);nj(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&oC(n,e,a,r)}function nj(e,t){rj[e.type](e,t)}var rj={interval:ZA,log:ZA,time:Hy,ordinal:We},ij=[[3,1],[0,2]],aj=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=qA,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;V(this._axesList,function(e){QS(e,1);var t=e.scale;vy(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=he(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):ej(i)}V(n,function(e){uj(e,e.__alignTo)?ej(e):XA(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};V(n.x,function(e){sj(n,`y`,e,i)}),V(n.y,function(e){sj(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Bg(e,t),i=this._rect=Rg(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(fj(a,i),!n){var c=gj(i,o,a,s,t),l=void 0;if(s)mj?(mj(this._axesList,i),fj(a,i)):l=hj(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=vj(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=hj(d,f,p,i,a,c,r))}_j(i,a,zb.determine,null,l,r),V(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}K(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,lc).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,lc).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,B(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,V(o.x,function(t,n){V(o.y,function(i,a){var o=`x`+n+`y`+a,s=new YA(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),lj(o.x),lj(o.y);function c(t){return function(n,r){if(oj(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=Qy(n),u=new zx(t,$y(n,l,!0),[0,0],l,c);u.onBand=mb(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return V(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);B(t,i)<0&&t.push(i),B(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),V(o._axesList,function(t){ZS(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;Um({targetModel:e,coordSysType:_C,coordSysProvider:r});function r(){var r=BS(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(Dx(t,e,_C),Dx(n,e,_C))},this),r},e.dimensions=qA,e.dimIdxMap=mm(qA),e}();function oj(e,t){return e.getCoordSysModel()===t}function sj(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)cj(s,i[c])&&(a=i[c]);else for(var l in i)if(Ue(i,l)&&cj(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function cj(e,t){if(!t)return!1;var n=t.scale,r=eb(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&nb(t)&&(i=!1),i}function lj(e){for(var t=he(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];my(a.scale)&&ub(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&V(r,function(e){e.__alignTo=n})}function uj(e,t){return Rh(e.scale)||Rh(t.scale)||t.scale.getTicks().length<2}function dj(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function fj(e,t){V(e.x,function(e){return pj(e,t.x,t.width)}),V(e.y,function(e){return pj(e,t.y,t.height)})}function pj(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),dj(e,t)}var mj;function hj(e,t,n,r,i,a,o){_j(r,i,zb.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=me(s,function(e){return e>0})==null;return lf(r,s,!0,!0,n),fj(i,r),c;function l(e){V(i[Pd[e]],function(t){if(lb(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(pb(t.scale,cS(o.label).labelInfo.tick));s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=cb(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[Pd[n]]-t[Pd[n]],a=t[Fd[n]]+t[Pd[n]]-(e[Fd[n]]+e[Pd[n]]);i=d(i,1-r),a=d(a,r);var o=ij[n][0],c=ij[n][1];s[o]=Jo(s[o],i),s[c]=Jo(s[c],a)}function d(e,t){return e>0&&!Ee(t)&&t>1e-4&&(e/=t),e}}function gj(e,t,n,r,i){var a=new uS(yj);return V(n,function(n){return V(n,function(n){if(lb(n.model)){var o=!r;n.axisBuilder=VS(e,t,n.model,i,a,o)}})}),a}function _j(e,t,n,r,i,a){var o=n===zb.determine;V(t,function(t){return V(t,function(t){lb(t.model)&&(HS(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Pd[1-t]]=e[Fd[t]]<=a.refContainer[Fd[t]]*.5?0:1-t==1?2:1}V(t,function(e,t){return V(e,function(e){lb(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function vj(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Rg(e.get(`outerBounds`,!0)||hC,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||B([`all`,`axisLabel`],a)<0?`all`:a,s=[ss(q(e.get(`outerBoundsClampWidth`,!0),gC[0]),t.width),ss(q(e.get(`outerBoundsClampHeight`,!0),gC[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var yj=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;mS(e,t,n,r,i,a),cb(e.nameLocation)||V(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&gS(e.labelInfoList,e.dirVec,r,i)})};function bj(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return xj(n,e,t),n.seriesInvolved&&Cj(n,e),n}function xj(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];V(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=Aj(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(V(n.getAxes(),ve(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&V(f.baseAxes,ve(p,!d||`cross`,u)),d&&V(f.otherAxes,ve(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!kj(d))){s??=d.get(`triggerTooltip`),d=r?Sj(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=Aj(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:kj(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=wj(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function Sj(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};V(s,function(e){c[e]=I(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&z(l,u.textStyle)}return e.model.getModel(`axisPointer`,new ep(c,n,r))}function Cj(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||V(e.coordSysAxesInfo[Aj(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function wj(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(Tj(a[r+`AxisId`],n.id)||Tj(a[r+`AxisIndex`],n.componentIndex)||Tj(a[r+`AxisName`],n.name))return i}}function Tj(e,t){return e===`all`||U(e)&&B(e,t)>=0||e===t}function Ej(e){var t=Dj(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=kj(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function Dj(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[Aj(e)]}function Oj(e){var t=Dj(e);return t&&t.axisPointerModel}function kj(e){return!!e.get([`handle`,`show`])}function Aj(e){return e.type+`||`+e.id}var jj={},Mj=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&Ej(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=Oj(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){jj[e]=t},t.getAxisPointerClass=function(e){return e&&jj[e]},t.type=`axis`,t}(_D),Nj=ac();function Pj(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=Nj(e).splitAreaColors,f=J(),p=0;if(d)for(var m=0;m<l.length;m++){var h=d.get(l[m].tickValue);if(h!=null){p=(h+(u-1)*m)%u;break}}var g=i.toGlobalCoord(l[0].coord),_=o.getAreaStyle();s=U(s)?s:[s];for(var m=1;m<l.length;m++){var v=i.toGlobalCoord(l[m].coord),y=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(y=g,b=c.y,x=v-y,S=c.height,g=y+x):(y=c.x,b=g,x=c.width,S=v-b,g=b+S);var C=l[m-1].tickValue;C!=null&&f.set(C,p),t.add(new To({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:z({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}Nj(e).splitAreaColors=f}}}function Fj(e){Nj(e).splitAreaColors=null}var Ij=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],Lj=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new Su,this.group.add(this._axisGroup),lb(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),V(Ij,function(e){t.get([e,`show`])&&Rj[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||ef(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){Fj(this)},t.type=`cartesianAxis`,t}(Mj),Rj={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=U(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new ed({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:z({stroke:c[x]},_),silent:!0});Kd(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new ed({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});Kd(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){Pj(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=rS(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},zj=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(Lj),Bj=function(e){x(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=zj.type,t}return t.type=`yAxis`,t}(Lj),Vj=function(e){x(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new To({shape:e.coordinateSystem.getRect(),style:z({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(_D),Hj={offset:0};function Uj(e){e.registerComponentView(Vj),e.registerComponentModel(vC),e.registerCoordinateSystem(`cartesian2d`,aj),WA(e,`x`,zA,Hj),WA(e,`y`,zA,Hj),e.registerComponentView(zj),e.registerComponentView(Bj),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var Wj=ac();function Gj(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,Qj(t,n,e),V(n,function(n){V(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,ve(Kj,e))})}),t.wrapMethod(`cloneShallow`,ve(Jj,e)),V(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,ve(qj,e))}),je(n[t.dataType]===t)}function Kj(e,t){if(Zj(this)){var n=R({},Wj(this).datas);n[this.dataType]=t,Qj(t,n,e)}else $j(t,this.dataType,Wj(this).mainData,e);return t}function qj(e,t){return e.struct&&e.struct.update(),t}function Jj(e,t){return V(Wj(t).datas,function(n,r){n!==t&&$j(n.cloneShallow(),r,t,e)}),t}function Yj(e){var t=Wj(this).mainData;return e==null||t==null?t:Wj(t).datas[e]}function Xj(){var e=Wj(this).mainData;return e==null?[{data:e}]:H(he(Wj(e).datas),function(t){return{type:t,data:Wj(e).datas[t]}})}function Zj(e){return Wj(e).mainData===e}function Qj(e,t,n){Wj(e).datas={},V(t,function(t,r){$j(t,r,e,n)})}function $j(e,t,n,r){Wj(n).datas[t]=e,Wj(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=Yj,e.getLinkedDataAll=Xj}var eM=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){W(e)&&(n=t,t=e,e=null),e||={},G(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),tM=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,U(n)?n.length:1),a.push(e);var r=new eM($s(e.name,``),i);t?nM(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=Mm(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new jm(c,n);return l.initData(a),r&&r(l),Gj({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function nM(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function rM(e,t,n){if(e&&B(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(G(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function iM(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function aM(e,t){return B(iM(e),t)>=0}function oM(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}function sM(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=Zg(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var cM=2,lM=4,uM=function(e){x(t,e);function t(t,n,r,i){var a=e.call(this)||this;a.z2=cM,a.textConfig={inside:!0},Pc(a).seriesIndex=n.seriesIndex;var o=new Ao({z2:lM,silent:t.getModel().get([`label`,`silent`])});return a.setTextContent(o),a.updateData(!0,t,n,r,i),a}return t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n||=this._seriesModel,r||=this._ecModel;var a=this;Pc(a).dataIndex=t.dataIndex;var o=t.getModel(),s=o.getModel(`emphasis`),c=t.getLayout(),l=R({},c);l.label=null;var u=t.getVisual(`style`);u.lineJoin=`bevel`;var d=t.getVisual(`decal`);d&&(u.decal=ZO(d,i)),R(l,WC(o.getModel(`itemStyle`),l,!0)),V(Zc,function(e){var t=a.ensureState(e),n=o.getModel([e,`itemStyle`]);t.style=n.getItemStyle();var r=WC(n,l);r&&(t.shape=r)}),e?(a.setShape(l),a.shape.r=c.r0,Ed(a,{shape:{r:c.r}},n,t.dataIndex)):(Td(a,{shape:l},n),jd(a)),a.useStyle(u),this._updateLabel(n);var f=o.getShallow(`cursor`);f&&a.attr(`cursor`,f),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var p=s.get(`focus`),m=p===`relative`?Be(t.getAncestorsIndices(),t.getDescendantIndices()):p===`ancestor`?t.getAncestorsIndices():p===`descendant`?t.getDescendantIndices():p;Ul(this,m,s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel(`label`),i=this.node.getLayout(),a=i.endAngle-i.startAngle,o=(i.startAngle+i.endAngle)/2,s=Math.cos(o),c=Math.sin(o),l=this,u=l.getTextContent(),d=this.node.dataIndex,f=r.get(`minAngle`)/180*Math.PI;u.ignore=!(r.get(`show`)&&!(f!=null&&Math.abs(a)<f)),V(Qc,function(r){var f=r===`normal`?n.getModel(`label`):n.getModel([r,`label`]),m=r===`normal`,h=m?u:u.ensureState(r),g=e.getFormattedLabel(d,r);m&&(g||=t.node.name),h.style=Mf(f,{},null,r!==`normal`,!0),g&&(h.style.text=g);var _=f.get(`show`);_!=null&&!m&&(h.ignore=!_);var v=p(f,`position`),y=m?l:l.states[r],b=y.style.fill;y.textConfig={outsideFill:f.get(`color`)===`inherit`?b:null,inside:v!==`outside`};var x,S=p(f,`distance`)||0,C=p(f,`align`),w=p(f,`rotate`),T=Math.PI*.5,E=Math.PI*1.5,D=Wa(w===`tangential`?Math.PI/2-o:o),O=D>T&&!vs(D-T)&&D<E;v===`outside`?(x=i.r+S,C=O?`right`:`left`):!C||C===`center`?(x=i.r0===0&&vs(a-2*Math.PI)?0:(i.r+i.r0)/2,C=`center`):C===`left`?(x=i.r0+S,C=O?`right`:`left`):C===`right`&&(x=i.r-S,C=O?`left`:`right`),h.style.align=C,h.style.verticalAlign=p(f,`verticalAlign`)||`middle`,h.x=x*s+i.cx,h.y=x*c+i.cy;var k=0;w===`radial`?k=Wa(-o)+(O?Math.PI:0):w===`tangential`?k=Wa(Math.PI/2-o)+(O?Math.PI:0):be(w)&&(k=w*Math.PI/180),h.rotation=Wa(k)});function p(e,t){return e.get(t)??r.get(t)}u.dirtyStyle()},t}(Uu),dM=`sunburst`,fM=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};pM(n);var r=this._levelModels=H(e.levels||[],function(e){return new ep(e,this,t)},this),i=tM.createTree(n,this,a);function a(e){e.wrapMethod(`getItemModel`,function(e,t){var n=r[i.getNodeByDataIndex(t).depth];return n&&(e.parentModel=n),e})}return i.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treePathInfo=oM(this.getData().tree.getNodeByDataIndex(t),this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){sM(this)},t.type=`series.`+dM,t.defaultOption={z:2,center:[`50%`,`50%`],radius:[0,`75%`],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:`rootToNode`,renderLabelForZeroData:!1,label:{rotate:`radial`,show:!0,opacity:1,align:`center`,position:`inside`,distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:`white`,borderType:`solid`,shadowBlur:0,shadowColor:`rgba(0, 0, 0, 0.2)`,shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:`descendant`},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:`expansion`,animationDuration:1e3,animationDurationUpdate:500,data:[],sort:`desc`},t}(Y_);function pM(e){var t=0;V(e.children,function(e){pM(e);var n=e.value;U(n)&&(n=n[0]),t+=n});var n=e.value;U(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),U(e.value)?e.value[0]=n:e.value=n}var mM=`sunburstRootToNode`,hM=`sunburstHighlight`,gM=`sunburstUnhighlight`;function _M(e){e.registerAction({type:mM,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`sunburst`,query:e},n);function n(t,n){var r=rM(e,[mM],t);if(r){var i=t.getViewRoot();i&&(e.direction=aM(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}}),e.registerAction({type:hM,update:`none`},function(e,t,n){e=R({},e),t.eachComponent({mainType:`series`,subType:`sunburst`,query:e},r);function r(t){var n=rM(e,[hM],t);n&&(e.dataIndex=n.node.dataIndex)}n.dispatchAction(R(e,{type:`highlight`}))}),e.registerAction({type:gM,update:`updateView`},function(e,t,n){e=R({},e),n.dispatchAction(R(e,{type:`downplay`}))})}var vM=function(e){x(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=dM,t}return t.prototype.render=function(e,t,n,r){var i=this;this.seriesModel=e,this.api=n,this.ecModel=t;var a=e.getData(),o=a.tree.root,s=e.getViewRoot(),c=this.group,l=e.get(`renderLabelForZeroData`),u=[];s.eachNode(function(e){u.push(e)}),d(u,this._oldChildren||[]),m(o,s),this._initEvents(),this._oldChildren=u;function d(e,t){if(e.length===0&&t.length===0)return;new rp(t,e,n,n).add(r).update(r).remove(ve(r,null)).execute();function n(e){return e.getId()}function r(n,r){f(n==null?null:e[n],r==null?null:t[r])}}function f(r,i){if(!l&&r&&!r.getValue()&&(r=null),r!==o&&i!==o){if(i&&i.piece)r?(i.piece.updateData(!1,r,e,t,n),a.setItemGraphicEl(r.dataIndex,i.piece)):p(i);else if(r){var s=new uM(r,e,t,n);c.add(s),a.setItemGraphicEl(r.dataIndex,s)}}}function p(e){e&&(e.piece&&=(c.remove(e.piece),null))}function m(r,a){a.depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new uM(r,e,t,n),c.add(i.virtualPiece)),a.piece.off(`click`),i.virtualPiece.on(`click`,function(e){i._rootToNode(a.parentNode)})):i.virtualPiece&&=(c.remove(i.virtualPiece),null)}},t.prototype._initEvents=function(){var e=this;this.group.off(`click`),this.group.on(`click`,function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get(`nodeClick`);if(i===`rootToNode`)e._rootToNode(r);else if(i===`link`){var a=r.getModel(),o=a.get(`link`);o&&Ag(o,a.get(`target`,!0)||`_blank`)}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:mM,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=dM,t}(Uv),yM=Mc(dM,bM);function bM(e){var t={};function n(e,n,r){if(e.depth===0)return Q.color.neutral50;for(var i=e;i&&i.depth>1;)i=i.parentNode;var a=n.getColorFromPalette(i.name||i.dataIndex+``,t);return e.depth>1&&G(a)&&(a=Xr(a,(e.depth-1)/(r-1)*.5)),a}e.eachSeriesByType(dM,function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var a=i.getModel().getModel(`itemStyle`).getItemStyle();a.fill||=n(i,e,r.root.height),R(t.ensureUniqueItemVisual(i.dataIndex,`style`),a)})})}var xM=Math.PI/180,SM=Mc(dM,CM);function CM(e,t){e.eachSeriesByType(dM,function(e){var n=e.get(`center`),r=e.get(`radius`);U(r)||(r=[0,r]),U(n)||(n=[n,n]);var i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a),s=as(n[0],i),c=as(n[1],a),l=as(r[0],o/2),u=as(r[1],o/2),d=-e.get(`startAngle`)*xM,f=e.get(`minAngle`)*xM,p=e.getData().tree.root,m=e.getViewRoot(),h=m.depth,g=e.get(`sort`);g!=null&&wM(m,g);var _=0;V(m.children,function(e){!isNaN(e.getValue())&&_++});var v=m.getValue(),y=Math.PI/(v||_)*2,b=m.depth>0,x=m.height-(b?-1:1),S=(u-l)/(x||1),C=e.get(`clockwise`),w=e.get(`stillShowZeroSum`),T=C?1:-1,E=function(t,n){if(t){var r=n;if(t!==p){var i=t.getValue(),a=v===0&&w?y:i*y;a<f&&(a=f),r=n+T*a;var u=t.depth-h-(b?-1:1),d=l+S*u,m=l+S*(u+1),g=e.getLevelModel(t);if(g){var _=g.get(`r0`,!0),x=g.get(`r`,!0),D=g.get(`radius`,!0);D!=null&&(_=D[0],x=D[1]),_!=null&&(d=as(_,o/2)),x!=null&&(m=as(x,o/2))}t.setLayout({angle:a,startAngle:n,endAngle:r,clockwise:C,cx:s,cy:c,r0:d,r:m})}if(t.children&&t.children.length){var O=0;V(t.children,function(e){O+=E(e,n+O)})}return r-n}};if(b){var D=l,O=l+S,k=Math.PI*2;p.setLayout({angle:k,startAngle:d,endAngle:d+k,clockwise:C,cx:s,cy:c,r0:D,r:O})}E(m,d)})}function wM(e,t){var n=e.children||[];e.children=TM(n,t),n.length&&V(e.children,function(e){wM(e,t)})}function TM(e,t){if(W(t)){var n=H(e,function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}});return n.sort(function(e,n){return t(e.params,n.params)}),H(n,function(t){return e[t.index]})}var r=t===`asc`;return e.sort(function(e,t){var n=(e.getValue()-t.getValue())*(r?1:-1);return n===0?(e.dataIndex-t.dataIndex)*(r?-1:1):n})}function EM(e){e.registerChartView(vM),e.registerSeriesModel(fM),e.registerLayout(SM),e.registerVisual(yM),_M(e)}var DM=ac(),OM=I,kM=_e,AM=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&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 c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Su,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=ve(jM,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}FM(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Mx(r).w>o)return!0;if(a){var s=Dj(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=DM(e).pointerEl=new Md[i.type](OM(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=DM(e).labelEl=new Ao(OM(t.label));e.add(i),NM(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=DM(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=DM(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),NM(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=rf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){hT(e.event)},onmousedown:kM(this._onHandleDragMove,this,0,0),drift:kM(this._onHandleDragMove,this),ondragend:kM(this._onHandleDragEnd,this)}),n.add(r)),FM(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);U(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,IC(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){jM(this._axisPointerModel,!t&&this._moveAnimation,this._handle,PM(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(PM(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(PM(r)),DM(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),LC(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function jM(e,t,n,r){MM(DM(n).lastProp,r)||(DM(n).lastProp=r,t?Td(n,r,e):(n.stopAnimation(),n.attr(r)))}function MM(e,t){if(K(e)&&K(t)){var n=!0;return V(t,function(t,r){n&&=MM(e[r],t)}),!!n}return e===t}function NM(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function PM(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function FM(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function IM(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function LM(e,t,n,r,i){var a=zM(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=Cg(o.get(`padding`)||0),c=o.getFont(),l=bn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),RM(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Mf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function RM(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function zM(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:ib(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};V(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),G(o)?a=o.replace(`{value}`,a):W(o)&&(a=o(s))}return a}function BM(e,t,n){var r=yt();return wt(r,r,n.rotation),Ct(r,r,n.position),Xd([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function VM(e,t,n,r,i,a){var o=_S.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),LM(t,r,i,a,{position:BM(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function HM(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function UM(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function WM(e,t,n){return Mx(e,{fromStat:{sers:H(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function GM(e,t,n){return[Jo(qo(t[0],t[1]),e-n/2),qo(e+n/2,Jo(t[0],t[1]))]}var KM=function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=qM(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=IM(r),f=JM[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}VM(t,e,RS(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=RS(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=BM(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=qM(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=qo(o[1],l[c]),l[c]=Jo(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(AM);function qM(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var JM={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:HM([t,r[0]],[t,r[1]],YM(e))}},shadow:function(e,t,n,r,i,a){var o=WM(e,i,a),s=r[1]-r[0],c=GM(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:UM([l,r[0]],[u-l,s],YM(e))}}};function YM(e){return e.dim===`x`?0:1}var XM=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.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:Q.color.accent40,throttle:40}},t}(Kg),ZM=ac(),QM=V;function $M(e,t,n){if(!Y.node){var r=t.getZr();ZM(r).records||(ZM(r).records={}),eN(r,t);var i=ZM(r).records[e]||(ZM(r).records[e]={});i.handler=n}}function eN(e,t){if(ZM(e).initialized)return;ZM(e).initialized=!0,n(`click`,ve(rN,`click`)),n(`mousemove`,ve(rN,`mousemove`)),n(`mousewheel`,ve(rN,`mousewheel`)),n(`globalout`,nN);function n(n,r){e.on(n,function(n){var i=iN(t);QM(ZM(e).records,function(e){e&&r(e,n,i.dispatchAction)}),tN(i.pendings,t)})}}function tN(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function nN(e,t,n){e.handler(`leave`,null,n)}function rN(e,t,n,r){t.handler(e,n,r)}function iN(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function aN(e,t){if(!Y.node){var n=t.getZr();(ZM(n).records||{})[e]&&(ZM(n).records[e]=null)}}var oN=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;$M(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){aN(`axisPointer`,t)},t.prototype.dispose=function(e,t){aN(`axisPointer`,t)},t.type=`axisPointer`,t}(_D);function sN(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=ic(a,e);if(o==null||o<0||U(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(H(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var cN=ac();function lN(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||_e(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){yN(i)&&(i=sN({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=yN(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||yN(i),f={},p={},m={list:[],map:{}},h={showPointer:ve(fN,p),showTooltip:ve(pN,m)};V(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);V(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=_N(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&uN(e,o,h,!1,f)}})});var g={};return V(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&V(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,vN(t),vN(e)))),g[e.key]=a}})}),V(g,function(e,t){uN(u[t],e,h,!0,f)}),mN(p,u,f),hN(m,i,e,o),gN(u,o,n),f}}function uN(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=dN(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&R(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function dN(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return V(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(ks(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),V(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function fN(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function pN(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=Aj(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function mN(e,t,n){var r=n.axesInfo=[];V(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function hN(e,t,n,r){if(yN(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function gN(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=cN(r)[i]||{},o=cN(r)[i]={};V(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&V(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}V(a,function(e,t){!o[t]&&c.push(l(e))}),V(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function _N(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function vN(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function yN(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function bN(e){Mj.registerAxisPointerClass(`CartesianAxisPointer`,KM),e.registerComponentModel(XM),e.registerComponentView(oN),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!U(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=bj(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},lN)}function xN(e){LA(Uj),LA(bN)}var SN=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(Kg);function CN(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function wN(e){if(Y.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var TN=wN([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),EN=wN([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function DN(e,t){if(!e)return t;t=Sg(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function ON(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var kN=DN(EN,`transition`),AN=DN(TN,`transform`),jN=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(Y.transform3dSupported?`will-change:transform;`:``);function MN(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function NN(e,t,n){if(!G(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=kg(t);var a=MN(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=AN+`:`,l;B([`left`,`right`],a)>-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<div style="`+[`position:absolute;width:`+o+`px;height:`+o+`px;z-index:-1;`,s+`;`+c+`;`,`border-bottom:`+m,`border-right:`+m,`background-color:`+r+`;`].join(``)+`"></div>`}function PN(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Y.transformSupported?``+AN+i:`,left`+i+`,top`+i)),kN+`:`+a}function FN(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Y.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Y.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+AN+`:`+o+`;`:[[`top`,0],[`left`,0],[TN,o]]}function IN(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=q(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),V([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function LN(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=U_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(PN(a,n,r)),o&&i.push(`background-color:`+o),V([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Sg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(IN(d)),f!=null&&i.push(`padding:`+Cg(f).join(`px `)+`px`),i.join(`;`)+`;`}function RN(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&ph(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var zN=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Y.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(G(i)?document.querySelector(i):Ce(i)?i:W(i)&&i(e.getDom()));RN(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;dT(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=ON(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.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`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=jN+LN(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+FN(i[0],i[1],!0)+(`border-color:`+kg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(G(i)&&n.get(`trigger`)===`item`&&!CN(n)&&(o=NN(n,r,i)),G(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,U(e)||(e=[e]);for(var s=0;s<e.length;s++)Ce(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(RN(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;V(FN(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,Y.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(_e(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;mh(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),BN=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),UN(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;K(e)&&Fs(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Ao({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:U_(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),V([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),V([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||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})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=HN(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;UN(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=VN(i.borderWidth||0),o=HN(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(_e(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function VN(e){return Math.max(0,e)}function HN(e){var t=VN(e.shadowBlur||0),n=VN(e.shadowOffsetX||0),r=VN(e.shadowOffsetY||0);return{left:VN(t-n),right:VN(t+n),top:VN(t-r),bottom:VN(t+r)}}function UN(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var WN=new To({shape:{x:-1,y:-1,width:2,height:2}}),GN=function(e){x(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!(Y.node||!t.getDom())){var n=e.getComponent(`tooltip`),r=this._renderMode=mc(n.get(`renderMode`));this._tooltipContent=r===`richText`?new BN(t):new zN(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(Y.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?IC(this,`_updatePosition`,50,`fixRate`):LC(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);$M(`itemTooltip`,this._api,_e(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||Y.node||!n.getDom())){var i=qN(r,n);this._ticket=``;var a=r.dataByCoordSys,o=QN(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=WN;c.x=r.x,c.y=r.y,c.update(),Pc(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=sN(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(qN(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&KN([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Pc(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;tO(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Pc(e).dataIndex==null?Pc(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=_e(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=KN([t.tooltipOption],r),o=this._renderMode,s=[],c=k_(`section`,{blocks:[],noHeader:!0}),l=[],u=new W_;V(e,function(e){V(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=zM(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=k_(`section`,{header:f,noHeader:!Me(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),V(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=ib(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,kg(m.color),o);var h=r_(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=KN([a],r).get(`valueFormatter`);p.blocks.push(_?R({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=F_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
15
15
 
16
- `:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Pc(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=KN([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new W_;h.marker=g.makeTooltipMarker(`item`,kg(h.color),d);var _=r_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?F_(y?R({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Pc(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(G(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=I(a),a.content=xh(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=KN(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new W_;this._showOrMove(d,function(){var n=I(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(G(u)){var p=e.ecModel.get(`useUTC`),m=U(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=rg(m.axisValue,d,p)),d=Dg(d,n,!0)}else if(W(u)){var g=_e(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||U(t))return{color:r||i};if(!U(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),W(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),U(t))n=as(t[0],s),r=as(t[1],c);else if(K(t)){var p=t;p.width=l[0],p.height=l[1];var m=Rg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(G(t)&&o){var h=XN(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=JN(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=ZN(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=ZN(d)?l[1]/2:d===`bottom`?l[1]:0),CN(e)){var h=YN(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&V(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&V(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&V(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&V(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){Y.node||!t.getDom()||(LC(this,`_updatePosition`),this._tooltipContent.dispose(),aN(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(_D);function KN(e,t,n){var r=t.ecModel,i;n?(i=new ep(n,r,r),i=new ep(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ep&&(o=o.get(`tooltip`,!0)),G(o)&&(o={formatter:o}),o&&(i=new ep(o,i,r)))}return i}function qN(e,t){return e.dispatchAction||_e(t.dispatchAction,t)}function JN(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function YN(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function XN(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function ZN(e){return e===`center`||e===`middle`}function QN(e,t,n){var r=cc(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=uc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Pc(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function $N(e){LA(bN),e.registerComponentModel(SN),e.registerComponentView(GN),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},We),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},We)}function eP(e,t,n){var r=O.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function tP(e){return!e.__cursors.get(0)}function nP(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var rP=function(e){x(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=Ai,typeof t==`string`?a=eP(t,n,r):K(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(He(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=nP(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=eP(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new Z(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new Z(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=Infinity,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new Z(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new Z(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=nP(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;){if(i[u].isZero()){i.splice(u,1);continue}for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;we(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||mO(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):Te(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=EO(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&V(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(Oi),iP=1e5,aP=314159,oP=void 0,sP=1,cP=2;function lP(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function uP(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function dP(e,t,n,r){var i=new rP(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,fP(i),i}function fP(e){e.__cursorStack=[],e.__cursors=J()}function pP(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function mP(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,pP({key:r})))}function hP(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function gP(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function _P(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&vP)||s.__builtin__)&&(!(n&yP)||!s.__builtin__)&&(!(n&bP)||s!==e.hoverlayer))&&t(s,a,o,i)}}var vP=1,yP=2,bP=4,xP=vP|bP,SP=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=R({},n||{}),this.dpr=n.devicePixelRatio||Ai,this._singleCanvas=i,this.root=e,e.style&&(He(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=dP(a,this,aP,0);c.initContext(),this._insertLayer(c,aP,0,!0),this._domRoot=e}else{this._width=_O(e,0,n),this._height=_O(e,1,n);var l=this._domRoot=uP(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!K(e)?{paintAll:!!e}:e||{},n=q(t.refresh,!0),r=q(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=cP),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return _P(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},yP),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=oP,n!==oP&&(!t&&n===cP&&(t=this._i.hoverlayer=this._ensureLayer(iP)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),GO(i,s,r),c&&(s.style=l)}}i&&(KO(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(iP)},e.prototype.paintOne=function(e,t){WO(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)_P(this._i,function(e){e.afterBrush&&e.afterBrush()},xP),this._paintHoverList(e);else{var i=this;GT(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(aP).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),_P(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},vP)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return _P(this._i,function(i){var a=!1;if(hP(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!tP(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}hP(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},xP),Y.wxa&&_P(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=tP(e),c=s&&O.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=cP),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(GO(o,f,a),f.setPrevPaintRect(p))}else GO(o,f,a);if(s&&O.getTime()-c>15){d++;break}}}KO(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=aP,t=0);var i=gP(this._i,e)[t];return i||(i=dP(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&L(i,this._layerConfig[e],!0),(n||r&&e!==aP)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&lP(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=gP(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),gP(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return _P(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return _P(this._i,function(n,r){e.call(t,n,r)},vP)},e.prototype.eachOtherLayer=function(e,t){return _P(this._i,function(n,r){e.call(t,n,r)},yP)},e.prototype.getLayers=function(){var e={};return _P(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}_P(n._i,function(e){e.__dirty=!1,hP(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},xP);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){se(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=mP(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}_P(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(tP(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(hP(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===oP&&(n._hoverLayerDirty=sP))},xP)},e.prototype.clear=function(){return _P(this._i,function(e){e.clear(),fP(e)},vP),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,_P(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?L(n[e],t,!0):n[e]=t,_P(this._i,function(e,t){L(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=_O(i,0,r),t=_O(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,_P(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(aP).resize(e,t)}return this},e.prototype.clearLayer=function(e){V(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[aP][0].dom;var t=new rP(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;_P(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];GO(n,l,a)}KO(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function CP(e){e.registerPainter(`canvas`,SP)}function wP(e){return typeof e==`function`||Array.isArray(e)&&e.length>0}function TP(e){if(typeof e==`function`)return e;if(!(!Array.isArray(e)||e.length===0))return(...t)=>{let n;for(let r of e.slice())n=r(...t)||n;return n}}function EP(){return typeof window<`u`&&typeof document<`u`}var DP=/^on[^a-z]/,OP=e=>DP.test(e);function kP(e){if(!OP(e))return null;let t=e.charAt(2).toLowerCase()+e.slice(3),n=t.endsWith(`Once`);return n&&(t=t.slice(0,-4)),{event:t,once:n}}function AP(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&t<2**32-1&&String(t)===e}function jP(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function MP(e,t){return e===0||t===0}function NP(e,t){if(Object.is(e,t))return typeof e!=`object`||!e;if(!jP(e)||!jP(t))return!1;let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&Object.is(e[n],t[n]))}var PP=`[vue-echarts]`;function FP(e){h(`${PP} ${e}`)}function IP(e){return null}var LP=[`getWidth`,`getHeight`,`getDom`,`getZr`,`getId`,`getOption`,`isSSR`,`getDevicePixelRatio`,`resize`,`makeActionFromEvent`,`dispatchAction`,`updateLabelLayout`,`convertToPixel`,`convertToLayout`,`convertFromPixel`,`containPixel`,`getVisual`,`renderToCanvas`,`renderToSVGString`,`getSvgDataURL`,`getDataURL`,`getConnectedDataURL`,`appendData`,`clear`];function RP(e,t,n){let r=()=>{if(n())throw Error(`ECharts has been disposed.`);let t=e.value;if(!t)throw Error(`ECharts is not initialized yet.`);return t},i={};for(let e of LP)i[e]=(...t)=>{let n=r();return Reflect.apply(n[e],n,t)};return i.dispose=t,i.isDisposed=n,i}function zP(e,t,n){let r=()=>typeof t.value==`object`?t.value:void 0;return g([n,e,()=>!!t.value,()=>r()?.throttle??100],([e,t,n,i],a,o)=>{if(!t||!e||!n)return;let s=t.getWidth(),c=t.getHeight(),l=()=>{MP(s,c)||s===t.getWidth()&&c===t.getHeight()||(t.resize(),r()?.onResize?.())},u=i?FC(l,i):void 0,d=new ResizeObserver(([e])=>{s=e.contentRect.width,c=e.contentRect.height,(u??l)()});d.observe(e),o(()=>{d.disconnect(),u?.clear()})},{flush:`sync`})}var BP={autoresize:[Boolean,Object]},VP=Symbol();function HP(e,t,n,r){let i=a(VP,void 0);return g(()=>t.value?{instance:e.value,visible:!0,type:n.value||void 0,options:{...m(i),...r.value}}:{instance:e.value,visible:!1},e=>{let{instance:t}=e;if(!t)return;if(!e.visible){t.hideLoading();return}let{type:n,options:r}=e;n?t.showLoading(n,r):t.showLoading(r)},{deep:!0,immediate:!0,flush:`sync`})}var UP={loading:Boolean,loadingType:String,loadingOptions:Object},WP={tooltip:[`tooltip`,`formatter`],dataView:[`toolbox`,`feature`,`dataView`,`optionToContent`]},GP=/-__proto__(?:-|$)/;function KP(e){return(e===`tooltip`||e.startsWith(`tooltip-`)||e===`dataView`||e.startsWith(`dataView-`))&&!e.endsWith(`-`)&&!e.includes(`--`)&&!GP.test(e)}function qP(e){let t=e.startsWith(`tooltip`)?`tooltip`:`dataView`,n=e.slice(t.length),r=n?n.slice(1).split(`-`):[],i=WP[t];if(AP(r[0]??``)){let e=r.shift();r.push(i[0],e,...i.slice(1))}else r.push(...i);return r}function JP(e,t,n){let r=Array.isArray(e);if(r!==AP(t))return;let i=r?e[Number(t)]:e[t],a;if(Array.isArray(i))a=[...i];else if(jP(i))a={...i};else if(i===void 0&&!r&&!AP(n))a={};else return;return YP(e,t,a),a}function YP(e,t,n){if(Array.isArray(e)){e[Number(t)]=n;return}e[t]=n}function XP(e,t,n,r=!1){let i=e;for(let e=0;e<t.length-1;e++){let n=JP(i,t[e],t[e+1]);if(!n)return!1;i=n}if(Array.isArray(i))return!1;let a=t[t.length-1];return(!r||i[a]===void 0)&&YP(i,a,n),!0}function ZP(t,n){let a=r(),o,s=d({}),l=d({}),p=f(!1),m=f(!1),h=(e=!1)=>{let n=[];for(let r in t)r!==`graphic`&&(KP(r)?n.push(r):e&&FP(`Invalid slot name: ${r}`));return n};h(!0);let g=[],_=g,v=g,y=()=>h().some(e=>!g.includes(e));function b(e){if(m.value=e,!e){v=[];for(let e of Object.keys(l))delete l[e]}}function x(e){if(e.length===g.length&&g.every(t=>e.includes(t)))return!1;for(let t of g)e.includes(t)||(delete l[t],delete s[t]);return g=e,!0}let S=()=>{if(_=h(),_.length===0||!m.value||!p.value)return;let n=a.vnode.el.ownerDocument;return o??=n.createElement(`div`),i(e,{to:o},_.map(e=>{let n=t[e],r=e in l?n?.(l[e]):void 0;return i(`div`,{key:e,ref:t=>{t?s[e]=t:delete s[e]},style:{display:`contents`}},r)}))};function C(e){let n=h();x(n);let r;for(let t of v)n.includes(t)||(r??={...e},XP(r,qP(t),null,!0));if(n.length===0)return v=[],r??e;r??={...e};let i=[];for(let e of n)XP(r,qP(e),n=>{if(t[e])return e in l&&Object.is(l[e],n)&&delete l[e],l[e]=n,s[e]})&&i.push(e);return v=i,r}return u(()=>{x(_)&&n()}),c(()=>{g=_,p.value=!0}),{render:S,hasNewSlots:y,patchOption:C,setReady:b}}var QP=`x-vue-echarts`,$P=Symbol.for(`vue-echarts.lifecycle`);function eF(){let e=globalThis.customElements;if(!e)return!1;let t=e.get(QP);if(t)return!!t[$P];class n extends HTMLElement{__dispose=null;disconnectedCallback(){this.__dispose&&queueMicrotask(()=>{if(!this.isConnected&&this.__dispose){let e=this.__dispose;this.__dispose=null,e()}})}}return Object.defineProperty(n,$P,{value:!0}),e.define(QP,n),!0}var tF=`onNative:`;function nF(e,t){let n=new Map,r=new Map,i=new Set,a;function o(){for(let e of n.values())e.emitter.off(e.event,e.handler);n.clear()}let s=_(()=>{i.clear();let s=e.value;for(let[e,n]of r)t[e]!==n&&r.delete(e);if(!s){o(),a=void 0;return}a&&a!==s&&o(),a=s;for(let e in t){let a=kP(e);if(!a||a.event.startsWith(`native:`)||a.event===`zr:`)continue;let o=a.event.startsWith(`zr:`),c=(o?a.event.slice(3):a.event).toLowerCase(),l=t[e],u=n.get(e);if(a.once&&r.get(e)===l)continue;if(u&&u.source===l&&wP(l)){i.add(e);continue}let d=TP(l);if(u&&(u.emitter.off(u.event,u.handler),n.delete(e)),!d)continue;let f=o?s.getZr():s,p=d;a.once&&(p=(...t)=>{n.delete(e),r.set(e,l),f.off(c,p),d(...t)}),f.on(c,p),n.set(e,{emitter:f,event:c,source:l,handler:p}),i.add(e)}for(let[e,t]of n)i.has(e)||(t.emitter.off(t.event,t.handler),n.delete(e))}),c=()=>{s(),o()};return l(c),c}function rF(e){return t(()=>{let t={};for(let n in e){if(n.startsWith(tF)){let r=n.slice(9);r&&(t[`on:${r}`]=e[n]);continue}OP(n)||(t[n]=e[n])}return t})}function iF(e){return typeof e==`string`||typeof e==`number`?String(e):void 0}function aF(e,t,n){if(!jP(e))return!0;let r=Object.create(null);for(let i of Object.keys(e)){let a=e[i];if(a!==void 0){if(n===`graphic`&&i===`$action`&&(t.hasAction=!0),n===`graphic`&&(i===`elements`||i===`children`)&&Array.isArray(a)){r[i]=oF(a,t,`graphic`,!0);continue}if(n===`option`){let e=Kg.hasClass(i);if(Array.isArray(a)||e&&jP(a)){r[i]=oF(Array.isArray(a)?a:[a],t,i===`graphic`?`graphic`:void 0,e);continue}}r[i]=n===`media`&&i===`option`?aF(a,t,`option`):aF(a,t)}}return r}function oF(e,t,n,r){let i=[];for(let a of e){let e=r?a:void 0;i.push({id:iF(e?.id),name:iF(e?.name),shape:aF(a,t,n)})}return i}function sF(e){let t=e,n={hasAction:!1},r=Object.create(null),i=Object.create(null),a=[];for(let e of Object.keys(t)){let o=t[e],s=Kg.hasClass(e);if(Array.isArray(o)||s&&jP(o)){let t=e===`options`?`option`:e===`media`?`media`:e===`graphic`?`graphic`:void 0;r[e]=oF(Array.isArray(o)?o:[o],n,t,s);continue}if(jP(o)){i[e]=aF(o,n,e===`baseOption`?`option`:void 0);continue}o!==void 0&&!s&&a.push(e)}return{collections:r,objectShapes:i,leaves:a,hasAction:n.hasAction}}function cF(e,t){return t?t.length<e.length:e.length>0}function lF(e){return e.id===void 0?e.name===void 0?void 0:`name:${e.name}`:`id:${e.id}`}function uF(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=lF(e[r]),i=lF(t[r]);if(n!==i&&(n!==void 0||i!==void 0))return!0}return!1}function dF(e,t){let n=new Map;for(let t=0;t<e.length;t++){let r=e[t];r.id!==void 0&&n.set(r.id,t)}return t.every((e,t)=>{let r=e.id===void 0?void 0:n.get(e.id);return r===void 0||r===t})}function fF(e,t){if(e===!0||t===!0)return!1;let n=Array.isArray(e),r=Array.isArray(t);if(n||r)return!n||!r||cF(e,t)||uF(e,t)||pF(e,t)!==void 0;for(let n in e){let r=t[n];if(r===void 0||fF(e[n],r))return!0}return!1}function pF(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a;if(a=i.id===void 0?t[r]?.shape:t.find(e=>e.id===i.id)?.shape,a&&fF(i.shape,a)){if(i.id!==void 0)return i;n??=i}}return n}function mF(e,t){let n;if(t.objectShapes.aria&&!e.objectShapes.aria)return null;for(let n in t.collections)if(!e.collections[n]&&!e.objectShapes[n]&&!e.leaves.includes(n)&&!Kg.hasClass(n))return null;for(let n in e.objectShapes){let r=e.objectShapes[n],i=t.objectShapes[n];if(r&&i){if(fF(r,i))return null;continue}if(!t.leaves.includes(n))return null}for(let n of e.leaves)if(!t.leaves.includes(n)&&t.collections[n]===void 0&&t.objectShapes[n]===void 0)return null;for(let r in e.collections){let i=e.collections[r];if(r===`graphic`&&t.hasAction)continue;let a=t.collections[r];if(!a&&!Kg.hasClass(r))return null;let o=cF(i,a),s=a&&!o&&uF(i,a),c=a?pF(i,a):void 0;if(c?.id!==void 0)return null;if(!(!c&&!o&&!s)){if(!Kg.hasClass(r)||a&&!dF(i,a))return null;(n??=[]).push(r)}}return n}function hF(e,t){let n=sF(t);if(!e)return{signature:n,plan:{notMerge:!1}};let r=mF(e,n);return r===null?{signature:n,plan:{notMerge:!n.hasAction}}:(r?.sort(),{signature:n,plan:r?{notMerge:!1,replaceMerge:r}:{notMerge:!1}})}var gF=`x-vue-echarts{display:block;width:100%;height:100%;min-width:0;}
16
+ `:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Pc(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=KN([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new W_;h.marker=g.makeTooltipMarker(`item`,kg(h.color),d);var _=r_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?F_(y?R({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Pc(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(G(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=I(a),a.content=xh(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=KN(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new W_;this._showOrMove(d,function(){var n=I(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(G(u)){var p=e.ecModel.get(`useUTC`),m=U(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=rg(m.axisValue,d,p)),d=Dg(d,n,!0)}else if(W(u)){var g=_e(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||U(t))return{color:r||i};if(!U(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),W(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),U(t))n=as(t[0],s),r=as(t[1],c);else if(K(t)){var p=t;p.width=l[0],p.height=l[1];var m=Rg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(G(t)&&o){var h=XN(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=JN(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=ZN(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=ZN(d)?l[1]/2:d===`bottom`?l[1]:0),CN(e)){var h=YN(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&V(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&V(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&V(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&V(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){Y.node||!t.getDom()||(LC(this,`_updatePosition`),this._tooltipContent.dispose(),aN(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(_D);function KN(e,t,n){var r=t.ecModel,i;n?(i=new ep(n,r,r),i=new ep(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ep&&(o=o.get(`tooltip`,!0)),G(o)&&(o={formatter:o}),o&&(i=new ep(o,i,r)))}return i}function qN(e,t){return e.dispatchAction||_e(t.dispatchAction,t)}function JN(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function YN(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function XN(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function ZN(e){return e===`center`||e===`middle`}function QN(e,t,n){var r=cc(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=uc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Pc(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function $N(e){LA(bN),e.registerComponentModel(SN),e.registerComponentView(GN),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},We),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},We)}function eP(e,t,n){var r=O.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function tP(e){return!e.__cursors.get(0)}function nP(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var rP=function(e){x(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=Ai,typeof t==`string`?a=eP(t,n,r):K(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(He(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=nP(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=eP(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new Z(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new Z(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=Infinity,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new Z(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new Z(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=nP(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;){if(i[u].isZero()){i.splice(u,1);continue}for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;we(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||mO(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):Te(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=EO(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&V(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(Oi),iP=1e5,aP=314159,oP=void 0,sP=1,cP=2;function lP(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function uP(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function dP(e,t,n,r){var i=new rP(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,fP(i),i}function fP(e){e.__cursorStack=[],e.__cursors=J()}function pP(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function mP(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,pP({key:r})))}function hP(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function gP(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function _P(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&vP)||s.__builtin__)&&(!(n&yP)||!s.__builtin__)&&(!(n&bP)||s!==e.hoverlayer))&&t(s,a,o,i)}}var vP=1,yP=2,bP=4,xP=vP|bP,SP=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=R({},n||{}),this.dpr=n.devicePixelRatio||Ai,this._singleCanvas=i,this.root=e,e.style&&(He(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=dP(a,this,aP,0);c.initContext(),this._insertLayer(c,aP,0,!0),this._domRoot=e}else{this._width=_O(e,0,n),this._height=_O(e,1,n);var l=this._domRoot=uP(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!K(e)?{paintAll:!!e}:e||{},n=q(t.refresh,!0),r=q(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=cP),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return _P(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},yP),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=oP,n!==oP&&(!t&&n===cP&&(t=this._i.hoverlayer=this._ensureLayer(iP)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),GO(i,s,r),c&&(s.style=l)}}i&&(KO(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(iP)},e.prototype.paintOne=function(e,t){WO(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)_P(this._i,function(e){e.afterBrush&&e.afterBrush()},xP),this._paintHoverList(e);else{var i=this;GT(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(aP).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),_P(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},vP)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return _P(this._i,function(i){var a=!1;if(hP(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!tP(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}hP(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},xP),Y.wxa&&_P(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=tP(e),c=s&&O.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=cP),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(GO(o,f,a),f.setPrevPaintRect(p))}else GO(o,f,a);if(s&&O.getTime()-c>15){d++;break}}}KO(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=aP,t=0);var i=gP(this._i,e)[t];return i||(i=dP(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&L(i,this._layerConfig[e],!0),(n||r&&e!==aP)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&lP(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=gP(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),gP(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return _P(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return _P(this._i,function(n,r){e.call(t,n,r)},vP)},e.prototype.eachOtherLayer=function(e,t){return _P(this._i,function(n,r){e.call(t,n,r)},yP)},e.prototype.getLayers=function(){var e={};return _P(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}_P(n._i,function(e){e.__dirty=!1,hP(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},xP);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){se(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=mP(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}_P(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(tP(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(hP(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===oP&&(n._hoverLayerDirty=sP))},xP)},e.prototype.clear=function(){return _P(this._i,function(e){e.clear(),fP(e)},vP),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,_P(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?L(n[e],t,!0):n[e]=t,_P(this._i,function(e,t){L(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=_O(i,0,r),t=_O(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,_P(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(aP).resize(e,t)}return this},e.prototype.clearLayer=function(e){V(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[aP][0].dom;var t=new rP(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;_P(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];GO(n,l,a)}KO(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function CP(e){e.registerPainter(`canvas`,SP)}function wP(e){return typeof e==`function`||Array.isArray(e)&&e.length>0}function TP(e){if(typeof e==`function`)return e;if(!(!Array.isArray(e)||e.length===0))return(...t)=>{let n;for(let r of e.slice())n=r(...t)||n;return n}}function EP(){return typeof window<`u`&&typeof document<`u`}var DP=/^on[^a-z]/,OP=e=>DP.test(e);function kP(e){if(!OP(e))return null;let t=e.charAt(2).toLowerCase()+e.slice(3),n=t.endsWith(`Once`);return n&&(t=t.slice(0,-4)),{event:t,once:n}}function AP(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&t<2**32-1&&String(t)===e}function jP(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function MP(e,t){return e===0||t===0}function NP(e,t){if(Object.is(e,t))return typeof e!=`object`||!e;if(!jP(e)||!jP(t))return!1;let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&Object.is(e[n],t[n]))}var PP=`[vue-echarts]`;function FP(e){h(`${PP} ${e}`)}function IP(e){return null}var LP=[`getWidth`,`getHeight`,`getDom`,`getZr`,`getId`,`getOption`,`isSSR`,`getDevicePixelRatio`,`resize`,`makeActionFromEvent`,`dispatchAction`,`updateLabelLayout`,`convertToPixel`,`convertToLayout`,`convertFromPixel`,`containPixel`,`getVisual`,`renderToCanvas`,`renderToSVGString`,`getSvgDataURL`,`getDataURL`,`getConnectedDataURL`,`appendData`,`clear`];function RP(e,t,n){let r=()=>{if(n())throw Error(`ECharts has been disposed.`);let t=e.value;if(!t)throw Error(`ECharts is not initialized yet.`);return t},i={};for(let e of LP)i[e]=(...t)=>{let n=r();return Reflect.apply(n[e],n,t)};return i.dispose=t,i.isDisposed=n,i}function zP(e,t,n){let r=()=>typeof t.value==`object`?t.value:void 0;return g([n,e,()=>!!t.value,()=>r()?.throttle??100],([e,t,n,i],a,o)=>{if(!t||!e||!n)return;let s=t.getWidth(),c=t.getHeight(),l=()=>{MP(s,c)||s===t.getWidth()&&c===t.getHeight()||(t.resize(),r()?.onResize?.())},u=i?FC(l,i):void 0,d=new ResizeObserver(([e])=>{s=e.contentRect.width,c=e.contentRect.height,(u??l)()});d.observe(e),o(()=>{d.disconnect(),u?.clear()})},{flush:`sync`})}var BP={autoresize:[Boolean,Object]},VP=FuckSymbol();function HP(e,t,n,r){let i=a(VP,void 0);return g(()=>t.value?{instance:e.value,visible:!0,type:n.value||void 0,options:{...m(i),...r.value}}:{instance:e.value,visible:!1},e=>{let{instance:t}=e;if(!t)return;if(!e.visible){t.hideLoading();return}let{type:n,options:r}=e;n?t.showLoading(n,r):t.showLoading(r)},{deep:!0,immediate:!0,flush:`sync`})}var UP={loading:Boolean,loadingType:String,loadingOptions:Object},WP={tooltip:[`tooltip`,`formatter`],dataView:[`toolbox`,`feature`,`dataView`,`optionToContent`]},GP=/-__proto__(?:-|$)/;function KP(e){return(e===`tooltip`||e.startsWith(`tooltip-`)||e===`dataView`||e.startsWith(`dataView-`))&&!e.endsWith(`-`)&&!e.includes(`--`)&&!GP.test(e)}function qP(e){let t=e.startsWith(`tooltip`)?`tooltip`:`dataView`,n=e.slice(t.length),r=n?n.slice(1).split(`-`):[],i=WP[t];if(AP(r[0]??``)){let e=r.shift();r.push(i[0],e,...i.slice(1))}else r.push(...i);return r}function JP(e,t,n){let r=Array.isArray(e);if(r!==AP(t))return;let i=r?e[Number(t)]:e[t],a;if(Array.isArray(i))a=[...i];else if(jP(i))a={...i};else if(i===void 0&&!r&&!AP(n))a={};else return;return YP(e,t,a),a}function YP(e,t,n){if(Array.isArray(e)){e[Number(t)]=n;return}e[t]=n}function XP(e,t,n,r=!1){let i=e;for(let e=0;e<t.length-1;e++){let n=JP(i,t[e],t[e+1]);if(!n)return!1;i=n}if(Array.isArray(i))return!1;let a=t[t.length-1];return(!r||i[a]===void 0)&&YP(i,a,n),!0}function ZP(t,n){let a=r(),o,s=d({}),l=d({}),p=f(!1),m=f(!1),h=(e=!1)=>{let n=[];for(let r in t)r!==`graphic`&&(KP(r)?n.push(r):e&&FP(`Invalid slot name: ${r}`));return n};h(!0);let g=[],_=g,v=g,y=()=>h().some(e=>!g.includes(e));function b(e){if(m.value=e,!e){v=[];for(let e of Object.keys(l))delete l[e]}}function x(e){if(e.length===g.length&&g.every(t=>e.includes(t)))return!1;for(let t of g)e.includes(t)||(delete l[t],delete s[t]);return g=e,!0}let S=()=>{if(_=h(),_.length===0||!m.value||!p.value)return;let n=a.vnode.el.ownerDocument;return o??=n.createElement(`div`),i(e,{to:o},_.map(e=>{let n=t[e],r=e in l?n?.(l[e]):void 0;return i(`div`,{key:e,ref:t=>{t?s[e]=t:delete s[e]},style:{display:`contents`}},r)}))};function C(e){let n=h();x(n);let r;for(let t of v)n.includes(t)||(r??={...e},XP(r,qP(t),null,!0));if(n.length===0)return v=[],r??e;r??={...e};let i=[];for(let e of n)XP(r,qP(e),n=>{if(t[e])return e in l&&Object.is(l[e],n)&&delete l[e],l[e]=n,s[e]})&&i.push(e);return v=i,r}return u(()=>{x(_)&&n()}),c(()=>{g=_,p.value=!0}),{render:S,hasNewSlots:y,patchOption:C,setReady:b}}var QP=`x-vue-echarts`,$P=FuckSymbol.for(`vue-echarts.lifecycle`);function eF(){let e=globalThis.customElements;if(!e)return!1;let t=e.get(QP);if(t)return!!t[$P];class n extends HTMLElement{__dispose=null;disconnectedCallback(){this.__dispose&&queueMicrotask(()=>{if(!this.isConnected&&this.__dispose){let e=this.__dispose;this.__dispose=null,e()}})}}return Object.defineProperty(n,$P,{value:!0}),e.define(QP,n),!0}var tF=`onNative:`;function nF(e,t){let n=new Map,r=new Map,i=new Set,a;function o(){for(let e of n.values())e.emitter.off(e.event,e.handler);n.clear()}let s=_(()=>{i.clear();let s=e.value;for(let[e,n]of r)t[e]!==n&&r.delete(e);if(!s){o(),a=void 0;return}a&&a!==s&&o(),a=s;for(let e in t){let a=kP(e);if(!a||a.event.startsWith(`native:`)||a.event===`zr:`)continue;let o=a.event.startsWith(`zr:`),c=(o?a.event.slice(3):a.event).toLowerCase(),l=t[e],u=n.get(e);if(a.once&&r.get(e)===l)continue;if(u&&u.source===l&&wP(l)){i.add(e);continue}let d=TP(l);if(u&&(u.emitter.off(u.event,u.handler),n.delete(e)),!d)continue;let f=o?s.getZr():s,p=d;a.once&&(p=(...t)=>{n.delete(e),r.set(e,l),f.off(c,p),d(...t)}),f.on(c,p),n.set(e,{emitter:f,event:c,source:l,handler:p}),i.add(e)}for(let[e,t]of n)i.has(e)||(t.emitter.off(t.event,t.handler),n.delete(e))}),c=()=>{s(),o()};return l(c),c}function rF(e){return t(()=>{let t={};for(let n in e){if(n.startsWith(tF)){let r=n.slice(9);r&&(t[`on:${r}`]=e[n]);continue}OP(n)||(t[n]=e[n])}return t})}function iF(e){return typeof e==`string`||typeof e==`number`?String(e):void 0}function aF(e,t,n){if(!jP(e))return!0;let r=Object.create(null);for(let i of Object.keys(e)){let a=e[i];if(a!==void 0){if(n===`graphic`&&i===`$action`&&(t.hasAction=!0),n===`graphic`&&(i===`elements`||i===`children`)&&Array.isArray(a)){r[i]=oF(a,t,`graphic`,!0);continue}if(n===`option`){let e=Kg.hasClass(i);if(Array.isArray(a)||e&&jP(a)){r[i]=oF(Array.isArray(a)?a:[a],t,i===`graphic`?`graphic`:void 0,e);continue}}r[i]=n===`media`&&i===`option`?aF(a,t,`option`):aF(a,t)}}return r}function oF(e,t,n,r){let i=[];for(let a of e){let e=r?a:void 0;i.push({id:iF(e?.id),name:iF(e?.name),shape:aF(a,t,n)})}return i}function sF(e){let t=e,n={hasAction:!1},r=Object.create(null),i=Object.create(null),a=[];for(let e of Object.keys(t)){let o=t[e],s=Kg.hasClass(e);if(Array.isArray(o)||s&&jP(o)){let t=e===`options`?`option`:e===`media`?`media`:e===`graphic`?`graphic`:void 0;r[e]=oF(Array.isArray(o)?o:[o],n,t,s);continue}if(jP(o)){i[e]=aF(o,n,e===`baseOption`?`option`:void 0);continue}o!==void 0&&!s&&a.push(e)}return{collections:r,objectShapes:i,leaves:a,hasAction:n.hasAction}}function cF(e,t){return t?t.length<e.length:e.length>0}function lF(e){return e.id===void 0?e.name===void 0?void 0:`name:${e.name}`:`id:${e.id}`}function uF(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=lF(e[r]),i=lF(t[r]);if(n!==i&&(n!==void 0||i!==void 0))return!0}return!1}function dF(e,t){let n=new Map;for(let t=0;t<e.length;t++){let r=e[t];r.id!==void 0&&n.set(r.id,t)}return t.every((e,t)=>{let r=e.id===void 0?void 0:n.get(e.id);return r===void 0||r===t})}function fF(e,t){if(e===!0||t===!0)return!1;let n=Array.isArray(e),r=Array.isArray(t);if(n||r)return!n||!r||cF(e,t)||uF(e,t)||pF(e,t)!==void 0;for(let n in e){let r=t[n];if(r===void 0||fF(e[n],r))return!0}return!1}function pF(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a;if(a=i.id===void 0?t[r]?.shape:t.find(e=>e.id===i.id)?.shape,a&&fF(i.shape,a)){if(i.id!==void 0)return i;n??=i}}return n}function mF(e,t){let n;if(t.objectShapes.aria&&!e.objectShapes.aria)return null;for(let n in t.collections)if(!e.collections[n]&&!e.objectShapes[n]&&!e.leaves.includes(n)&&!Kg.hasClass(n))return null;for(let n in e.objectShapes){let r=e.objectShapes[n],i=t.objectShapes[n];if(r&&i){if(fF(r,i))return null;continue}if(!t.leaves.includes(n))return null}for(let n of e.leaves)if(!t.leaves.includes(n)&&t.collections[n]===void 0&&t.objectShapes[n]===void 0)return null;for(let r in e.collections){let i=e.collections[r];if(r===`graphic`&&t.hasAction)continue;let a=t.collections[r];if(!a&&!Kg.hasClass(r))return null;let o=cF(i,a),s=a&&!o&&uF(i,a),c=a?pF(i,a):void 0;if(c?.id!==void 0)return null;if(!(!c&&!o&&!s)){if(!Kg.hasClass(r)||a&&!dF(i,a))return null;(n??=[]).push(r)}}return n}function hF(e,t){let n=sF(t);if(!e)return{signature:n,plan:{notMerge:!1}};let r=mF(e,n);return r===null?{signature:n,plan:{notMerge:!n.hasAction}}:(r?.sort(),{signature:n,plan:r?{notMerge:!1,replaceMerge:r}:{notMerge:!1}})}var gF=`x-vue-echarts{display:block;width:100%;height:100%;min-width:0;}
17
17
  x-vue-echarts>.echarts-host{display:block;width:100%;height:100%;min-width:0;}
18
18
  x-vue-echarts>.echarts-host>:first-child,x-vue-echarts>.echarts-host>:first-child>canvas{border-radius:inherit;}
19
- `;if(EP()){if(Array.isArray(document.adoptedStyleSheets)&&`replaceSync`in CSSStyleSheet.prototype){let e=new CSSStyleSheet;e.replaceSync(gF),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}else{let e=document.createElement(`style`);e.textContent=gF,document.head.appendChild(e)}}var _F=eF(),vF=Symbol(),yF=Symbol(),bF=Symbol(),xF=Symbol(),SF=n({name:`Echarts`,inheritAttrs:!1,props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...BP,...UP},emits:{},slots:Object,setup(e,{attrs:n,expose:r,slots:l}){let u=f(),d=f(),h=f(),v=f(0),y=f(0),b=a(yF,null),x=a(bF,null),S=a(xF,null),C=p(e,`autoresize`),w=p(e,`manualUpdate`),T=p(e,`loading`),E=p(e,`loadingType`),D=p(e,`loadingOptions`),O=t(()=>e.theme??m(b)??void 0),k=t(()=>e.initOptions??m(x)??void 0),A=t(()=>e.updateOptions??m(S)),j=rF(n),M=f(!1),{render:ee,hasNewSlots:N,patchOption:te,setReady:ne}=ZP(l,de),{patchOption:P,render:re}=IP({slots:l,manualUpdate:w,requestUpdate:()=>de(`graphic`)})??{},F,ie,ae=!1,oe=!1,se=!1,I=w.value,L=!1,R=!1,ce=P?`post`:`pre`;function z(){return e.option??(P&&(l.graphic||R)?{}:void 0)}function B(e){return e!==void 0&&h.value===e&&!M.value}function le(e){return!se||ae?!1:(ae=!0,e.setTheme(O.value||{}),B(e))}function ue(e,t,n,r){let i=n===`manual`;L=!1;let a=te(t),o=P?P(a):a,s=n===`graphic`,c=i||s,u,d;if(c)u=s?A.value??void 0:r;else if(A.value)u=A.value,d=null;else{let e=hF(F??void 0,a);u=!e.signature.hasAction&&(F===null||n===`theme`)?{...e.plan,notMerge:!0}:e.plan,d=e.signature}let f=!!(P&&l.graphic);if((s||R||f)&&!u?.notMerge){let e=u?.replaceMerge,t=typeof e==`string`?[e]:e;t?.includes(`graphic`)||(u={...u,replaceMerge:t?[...t,`graphic`]:[`graphic`]})}R=f,se=!0,c||(F=d),i||(ie=t),e.setOption(o,u),!(!B(e)||n===`theme`)&&le(e)&&!i&&ue(e,t,`theme`)}function de(e){let t=h.value;if(!B(t)||w.value||L)return;let n=z()??ie;n&&ue(t,n,e)}l.graphic&&!P&&FP("Detected `#graphic` slot but no extension is registered. Import from `vue-echarts/graphic` to enable it.");let V=nF(h,n);function H(){let e=h.value;h.value=void 0,ne(!1),F=void 0,ie=void 0,L=!1,R=!1,e?.dispose()}function fe(){oe=!1,I=w.value,se=!1;let t=d.value,n=_A(t,O.value,k.value);if(h.value=n,!B(n))return;ae=!0;function r(){let t=w.value?e.option:z();t&&(w.value?ue(n,t,`manual`,A.value??void 0):ue(n,t)),ne(B(n))}if(C.value){L=!0,o(()=>{B(n)&&(C.value&&!MP(t.offsetWidth,t.offsetHeight)&&(n.resize(),!B(n))||(L?(L=!1,r()):ne(!0)))});return}r()}let pe=(t,n,r)=>{if(!e.manualUpdate){FP("`setOption` is only available when `manual-update` is `true`.");return}let i=h.value;B(i)&&ue(i,t,`manual`,typeof n==`boolean`?{notMerge:n,lazyUpdate:r}:n??(r===void 0?void 0:{lazyUpdate:r}))},me=g(O,(e,t)=>{NP(e,t)||(v.value++,ae=!1)},{deep:!0,flush:`sync`}),he=g(k,(e,t)=>{NP(e,t)||(oe=!0,y.value++)},{deep:!0,flush:`sync`}),ge=g(()=>w.value?vF:e.option,(e,t)=>{if(e===vF||t===vF)return;let n=e??z();if(!n)return;let r=h.value;oe||!B(r)||L||N()||ue(r,n)},{deep:!0,flush:ce}),_e=g([w,y],()=>{h.value&&(H(),fe())}),ve=g(v,()=>{let e=h.value;if(!oe&&w.value===I&&B(e)&&!ae){if(!le(e))return;let t=ie;t&&!w.value&&!L&&!N()&&ue(e,t,`theme`)}},{flush:ce}),U=_(()=>{let t=h.value;B(t)&&(t.group=e.group??``)}),W=HP(h,T,E,D),G=zP(h,C,d);function ye(){M.value||(M.value=!0,me(),he(),ge(),_e(),ve(),U(),W(),G(),V(),H())}let be=RP(h,ye,()=>M.value),K=be.clear;return be.clear=()=>{let e=h.value;if(!B(e))return K();L=!1,F=void 0,ie=void 0,e.clear()},c(()=>{M.value||fe()}),s(()=>{if(M.value)return;M.value=!0;let e=u.value;if(_F&&e?.isConnected&&e.__dispose===null){e.__dispose=H;return}H()}),r(Object.assign({setOption:pe,get root(){return u.value??void 0},get chart(){let e=h.value;return B(e)?e:void 0}},be)),(()=>{let e=[i(`div`,{ref:d,class:`echarts-host`})];if(!M.value){let t=ee();if(t&&e.push(t),re){let t=re();t&&e.push(t)}}let t=j.value;return i(QP,{...t,ref:u,class:[`echarts`,t.class]},e)})}});LA([gw,CP,xN,Ib,$N,nT,EM]);var CF=SF;export{CF as default};
19
+ `;if(EP()){if(Array.isArray(document.adoptedStyleSheets)&&`replaceSync`in CSSStyleSheet.prototype){let e=new CSSStyleSheet;e.replaceSync(gF),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}else{let e=document.createElement(`style`);e.textContent=gF,document.head.appendChild(e)}}var _F=eF(),vF=FuckSymbol(),yF=FuckSymbol(),bF=FuckSymbol(),xF=FuckSymbol(),SF=n({name:`Echarts`,inheritAttrs:!1,props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...BP,...UP},emits:{},slots:Object,setup(e,{attrs:n,expose:r,slots:l}){let u=f(),d=f(),h=f(),v=f(0),y=f(0),b=a(yF,null),x=a(bF,null),S=a(xF,null),C=p(e,`autoresize`),w=p(e,`manualUpdate`),T=p(e,`loading`),E=p(e,`loadingType`),D=p(e,`loadingOptions`),O=t(()=>e.theme??m(b)??void 0),k=t(()=>e.initOptions??m(x)??void 0),A=t(()=>e.updateOptions??m(S)),j=rF(n),M=f(!1),{render:ee,hasNewSlots:N,patchOption:te,setReady:ne}=ZP(l,de),{patchOption:P,render:re}=IP({slots:l,manualUpdate:w,requestUpdate:()=>de(`graphic`)})??{},F,ie,ae=!1,oe=!1,se=!1,I=w.value,L=!1,R=!1,ce=P?`post`:`pre`;function z(){return e.option??(P&&(l.graphic||R)?{}:void 0)}function B(e){return e!==void 0&&h.value===e&&!M.value}function le(e){return!se||ae?!1:(ae=!0,e.setTheme(O.value||{}),B(e))}function ue(e,t,n,r){let i=n===`manual`;L=!1;let a=te(t),o=P?P(a):a,s=n===`graphic`,c=i||s,u,d;if(c)u=s?A.value??void 0:r;else if(A.value)u=A.value,d=null;else{let e=hF(F??void 0,a);u=!e.signature.hasAction&&(F===null||n===`theme`)?{...e.plan,notMerge:!0}:e.plan,d=e.signature}let f=!!(P&&l.graphic);if((s||R||f)&&!u?.notMerge){let e=u?.replaceMerge,t=typeof e==`string`?[e]:e;t?.includes(`graphic`)||(u={...u,replaceMerge:t?[...t,`graphic`]:[`graphic`]})}R=f,se=!0,c||(F=d),i||(ie=t),e.setOption(o,u),!(!B(e)||n===`theme`)&&le(e)&&!i&&ue(e,t,`theme`)}function de(e){let t=h.value;if(!B(t)||w.value||L)return;let n=z()??ie;n&&ue(t,n,e)}l.graphic&&!P&&FP("Detected `#graphic` slot but no extension is registered. Import from `vue-echarts/graphic` to enable it.");let V=nF(h,n);function H(){let e=h.value;h.value=void 0,ne(!1),F=void 0,ie=void 0,L=!1,R=!1,e?.dispose()}function fe(){oe=!1,I=w.value,se=!1;let t=d.value,n=_A(t,O.value,k.value);if(h.value=n,!B(n))return;ae=!0;function r(){let t=w.value?e.option:z();t&&(w.value?ue(n,t,`manual`,A.value??void 0):ue(n,t)),ne(B(n))}if(C.value){L=!0,o(()=>{B(n)&&(C.value&&!MP(t.offsetWidth,t.offsetHeight)&&(n.resize(),!B(n))||(L?(L=!1,r()):ne(!0)))});return}r()}let pe=(t,n,r)=>{if(!e.manualUpdate){FP("`setOption` is only available when `manual-update` is `true`.");return}let i=h.value;B(i)&&ue(i,t,`manual`,typeof n==`boolean`?{notMerge:n,lazyUpdate:r}:n??(r===void 0?void 0:{lazyUpdate:r}))},me=g(O,(e,t)=>{NP(e,t)||(v.value++,ae=!1)},{deep:!0,flush:`sync`}),he=g(k,(e,t)=>{NP(e,t)||(oe=!0,y.value++)},{deep:!0,flush:`sync`}),ge=g(()=>w.value?vF:e.option,(e,t)=>{if(e===vF||t===vF)return;let n=e??z();if(!n)return;let r=h.value;oe||!B(r)||L||N()||ue(r,n)},{deep:!0,flush:ce}),_e=g([w,y],()=>{h.value&&(H(),fe())}),ve=g(v,()=>{let e=h.value;if(!oe&&w.value===I&&B(e)&&!ae){if(!le(e))return;let t=ie;t&&!w.value&&!L&&!N()&&ue(e,t,`theme`)}},{flush:ce}),U=_(()=>{let t=h.value;B(t)&&(t.group=e.group??``)}),W=HP(h,T,E,D),G=zP(h,C,d);function ye(){M.value||(M.value=!0,me(),he(),ge(),_e(),ve(),U(),W(),G(),V(),H())}let be=RP(h,ye,()=>M.value),K=be.clear;return be.clear=()=>{let e=h.value;if(!B(e))return K();L=!1,F=void 0,ie=void 0,e.clear()},c(()=>{M.value||fe()}),s(()=>{if(M.value)return;M.value=!0;let e=u.value;if(_F&&e?.isConnected&&e.__dispose===null){e.__dispose=H;return}H()}),r(Object.assign({setOption:pe,get root(){return u.value??void 0},get chart(){let e=h.value;return B(e)?e:void 0}},be)),(()=>{let e=[i(`div`,{ref:d,class:`echarts-host`})];if(!M.value){let t=ee();if(t&&e.push(t),re){let t=re();t&&e.push(t)}}let t=j.value;return i(QP,{...t,ref:u,class:[`echarts`,t.class]},e)})}});LA([gw,CP,xN,Ib,$N,nT,EM]);var CF=SF;export{CF as default};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{icons as e,store as t}from"@koishi-ce/client";import{Fragment as n,computed as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,createSlots as ee,createTextVNode as c,createVNode as l,defineAsyncComponent as u,defineComponent as d,h as f,openBlock as p,provide as m,ref as h,renderSlot as g,resolveComponent as _,toDisplayString as v,unref as y,withCtx as b}from"vue";var x=u(()=>import(`./echarts-D6RpzsTY.js`)),S=h(`send`);function C({title:e,fields:n=[],showTab:r,options:i}){return d({render:()=>{if(!n.every(e=>t[e]))return null;let a=i(t,S.value);if(a)return f(_(`k-card`),{class:`frameless analytic-chart`},{header:()=>[f(`span`,{class:`left`},[e]),...r?[f(`span`,{class:`right`},[f(`span`,{class:`tab-item`+(S.value===`send`?` active`:``),onClick:()=>S.value=`send`},[`发送`]),f(`span`,{class:`tab-item`+(S.value===`receive`?` active`:``),onClick:()=>S.value=`receive`},[`接收`])])]:[]],default:()=>f(x,{option:a,autoresize:!0})})}})}var w={item(e){return{trigger:`item`,formatter:e}},axis(e){return{trigger:`axis`,axisPointer:{type:`cross`},formatter:e}}},T=e=>{e.slot({type:`analytic-chart`,component:C({title:`各平台消息占比`,fields:[`analytics`],showTab:!0,options({analytics:e},t){if(!e)return;let n=Object.entries(e.messageByBot).map(([e,n])=>({name:e,children:Object.entries(n).map(([e,n])=>({name:n.name||e,value:n[t]}))}));if(n.reduce((e,{children:t})=>e+t.reduce((e,{value:t})=>e+t,0),0))return{tooltip:w.item(({data:e})=>`${e.children?`平台`:`昵称`}:${e.name}<br>日均消息数量:${+e.value.toFixed(1)}`),series:[{type:`sunburst`,data:n,radius:[`0`,`65%`],nodeClick:!1,emphasis:{focus:`ancestor`},levels:[{},{label:{rotate:`tangential`}},{label:{position:`outside`,padding:3,silent:!1}}]}]}}})})},E=e=>{e.slot({type:`analytic-chart`,component:C({title:`指令调用频率`,fields:[`analytics`],options({analytics:e}){if(!e)return;let t=Object.entries(e.commandRate).sort((e,t)=>t[1]-e[1]).map(([e,t])=>({name:e,value:t}));if(t.length)return{tooltip:w.item(({data:e})=>{let t=[e.name];return t.push(`日均调用:${+e.value.toFixed(1)}`),t.join(`<br>`)}),series:[{type:`pie`,data:t,radius:[`35%`,`65%`],minShowLabelAngle:3}]}}})})},D=`日一二三四五六`,O=e=>{e.slot({type:`analytic-chart`,component:C({title:`历史消息数量`,fields:[`analytics`],showTab:!0,options({analytics:e},t){if(!e||!e.messageByDate.length)return;let n=e.messageByDate.slice(1);return{tooltip:w.axis(([e])=>{if(!e)return``;let{name:t,value:n}=e;return`${t} 星期${D[new Date(t).getDay()]}<br>消息数量:${n}`}),xAxis:{type:`category`,data:n.map((e,t)=>new Date(Date.now()-(t+1)*864e5).toLocaleDateString(`zh-CN`)).reverse()},yAxis:{type:`value`},series:{type:`line`,smooth:!0,data:n.map(e=>e[t]).reverse()}}}})})},k=e=>`${(e-.5).toFixed()}:00-${(e+.5).toFixed()}:00`,A=e=>{e.slot({type:`analytic-chart`,component:C({title:`每小时消息数量`,fields:[`analytics`],showTab:!0,options({analytics:e},t){if(e&&!e.messageByHour.every(e=>!e[t]))return{tooltip:w.axis(([n])=>{if(!n)return``;let[r=0]=n.data,{dataIndex:i}=n,a=e.messageByHour[i];return[`${k(r)}`,`日均消息数量:${+(a?.[t]||0).toFixed(1)}`].join(`<br>`)}),xAxis:{type:`value`,min:0,max:24,minInterval:1,maxInterval:4,axisLabel:{formatter:e=>`${e}:00`},axisPointer:{label:{formatter:({value:e})=>k(e)}}},yAxis:{type:`value`},series:[{data:e.messageByHour.map((e,n)=>[n+.5,e[t]||0]),type:`bar`,stack:`1`}]}}})})},j=e=>{e.plugin(O),e.plugin(A),e.plugin(T),e.plugin(E)},M={class:`content`},N={class:`title`},P={class:`value`},F={class:`left`},I={class:`right`},L=d({__name:`numeric`,props:{title:{},icon:{}},setup(e){return(t,n)=>{let r=_(`k-icon`),a=_(`k-card`);return p(),i(a,{class:`k-analytic-number`},ee({default:b(()=>[l(r,{name:e.icon},null,8,[`name`]),s(`div`,M,[s(`p`,N,v(e.title),1),s(`p`,P,[g(t.$slots,`default`,{},()=>[n[0]||=c(`-`,-1)])])])]),_:2},[t.$slots[`footer-left`]?{name:`footer`,fn:b(()=>[s(`span`,F,[g(t.$slots,`footer-left`)]),s(`span`,I,[g(t.$slots,`footer-right`,{},()=>[n[1]||=c(`-`,-1)])])]),key:`0`}:void 0]),1024)}}}),R={key:0,class:`card-grid numeric-grid`},z=d({__name:`index`,setup(e){m(`component:analytic-number`,L);let n=r(()=>{let e=t.analytics.dauHistory.slice(1),n=t.analytics.dauHistory.length-1;return n?e.reduce((e,t)=>e+t,0)/Math.min(e.length,n):0});return(e,r)=>{let i=_(`k-slot-item`),s=_(`k-slot`);return y(t).analytics?(p(),o(`div`,R,[l(s,{name:`analytic-number`},{default:b(()=>[l(i,null,{default:b(()=>[l(L,{icon:`analytic:user`,title:`用户数量`},{default:b(()=>[c(v(y(t).analytics.userCount),1)]),"footer-left":b(()=>[...r[0]||=[c(`昨日新增用户`,-1)]]),"footer-right":b(()=>[c(v(y(t).analytics.userIncrement),1)]),_:1}),l(L,{icon:`analytic:guild`,title:`群组数量`},{default:b(()=>[c(v(y(t).analytics.guildCount),1)]),"footer-left":b(()=>[...r[1]||=[c(`昨日新增群组`,-1)]]),"footer-right":b(()=>[c(v(y(t).analytics.guildIncrement),1)]),_:1}),l(L,{icon:`analytic:heart`,title:`今日 DAU`},{default:b(()=>[c(v(y(t).analytics.dauHistory[0]),1)]),"footer-left":b(()=>[...r[2]||=[c(`近期 DAU`,-1)]]),"footer-right":b(()=>[c(v(+n.value.toFixed(1)),1)]),_:1})]),_:1})]),_:1})])):a(`v-if`,!0)}}}),B=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},V=B(z,[[`__scopeId`,`data-v-41af15ac`]]),H={class:`card-grid chart-grid`},U=d({__name:`home`,setup(e){return(e,t)=>{let r=_(`k-slot`);return p(),o(n,null,[l(V),s(`div`,H,[l(r,{name:`analytic-chart`})])],64)}}}),W={},G={class:`k-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 640 512`};function K(e,t){return p(),o(`svg`,G,[...t[0]||=[s(`path`,{fill:`currentColor`,d:`M274.7 304H173.3c-95.73 0-173.3 77.6-173.3 173.3C0 496.5 15.52 512 34.66 512H413.3C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304zM413.3 480H34.66C33.2 480 32 478.8 32 477.3C32 399.4 95.4 336 173.3 336H274.7C352.6 336 416 399.4 416 477.3C416 478.8 414.8 480 413.3 480zM224 256c70.7 0 128-57.31 128-128S294.7 0 224 0C153.3 0 96 57.31 96 128S153.3 256 224 256zM224 32c52.94 0 96 43.06 96 96c0 52.93-43.06 96-96 96S128 180.9 128 128C128 75.06 171.1 32 224 32zM375.1 241C392.9 250.8 412.3 256 432 256C493.8 256 544 205.8 544 144S493.8 32 432 32c-12.83 0-25.39 2.156-37.34 6.391c-8.328 2.953-12.69 12.09-9.734 20.42c2.953 8.344 12.12 12.66 20.42 9.734C413.9 65.53 422.8 64 432 64C476.1 64 512 99.89 512 144S476.1 224 432 224c-14.08 0-27.91-3.703-39.98-10.69c-7.656-4.453-17.44-1.828-21.86 5.828C365.7 226.8 368.3 236.6 375.1 241zM490.7 320H448c-8.844 0-16 7.156-16 16S439.2 352 448 352h42.67C555.4 352 608 404.6 608 469.3C608 475.2 603.2 480 597.3 480H496c-8.844 0-16 7.156-16 16s7.156 16 16 16h101.3C620.9 512 640 492.9 640 469.3C640 386.1 573 320 490.7 320z`},null,-1)]])}var q=B(W,[[`render`,K]]),J={},Y={class:`k-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`};function X(e,t){return p(),o(`svg`,Y,[...t[0]||=[s(`path`,{fill:`currentColor`,d:`M255.1 96L267.1 84.02C300.6 51.37 347 36.51 392.6 44.1C461.5 55.58 512 115.2 512 185.1V190.9C512 232.4 494.8 272.1 464.4 300.4L283.7 469.1C276.2 476.1 266.3 480 256 480C245.7 480 235.8 476.1 228.3 469.1L47.59 300.4C17.23 272.1 0 232.4 0 190.9V185.1C0 115.2 50.52 55.58 119.4 44.1C164.1 36.51 211.4 51.37 244 84.02L255.1 96zM255.1 141.3L221.4 106.6C196.1 81.31 160 69.77 124.7 75.66C71.21 84.58 31.1 130.9 31.1 185.1V190.9C31.1 223.6 45.55 254.7 69.42 277L250.1 445.7C251.7 447.2 253.8 448 255.1 448C258.2 448 260.3 447.2 261.9 445.7L442.6 277C466.4 254.7 480 223.6 480 190.9V185.1C480 130.9 440.8 84.58 387.3 75.66C351.1 69.77 315.9 81.31 290.6 106.6L255.1 141.3z`},null,-1)]])}var Z=B(J,[[`render`,X]]),Q={},$={class:`k-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`};function te(e,t){return p(),o(`svg`,$,[...t[0]||=[s(`path`,{fill:`currentColor`,d:`M256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C172.2 512 97.87 471.8 51.19 409.6C45.88 402.5 47.31 392.5 54.37 387.2C61.44 381.9 71.47 383.3 76.78 390.4C117.7 444.8 182.7 480 256 480C379.7 480 480 379.7 480 256C480 132.3 379.7 32 256 32C166.7 32 89.51 84.3 53.55 160H144C152.8 160 160 167.2 160 176C160 184.8 152.8 192 144 192H16C7.164 192 0 184.8 0 176V48C0 39.16 7.164 32 16 32C24.84 32 32 39.16 32 48V131.1C75.66 53.29 159.6 0 256 0zM256 128C264.8 128 272 135.2 272 144V249.4L347.3 324.7C353.6 330.9 353.6 341.1 347.3 347.3C341.1 353.6 330.9 353.6 324.7 347.3L244.7 267.3C241.7 264.3 239.1 260.2 239.1 256V144C239.1 135.2 247.2 128 255.1 128H256z`},null,-1)]])}var ne=B(Q,[[`render`,te]]),re={},ie={class:`k-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`};function ae(e,t){return p(),o(`svg`,ie,[...t[0]||=[s(`path`,{fill:`currentColor`,d:`M224 256c70.7 0 128-57.31 128-128s-57.3-128-128-128C153.3 0 96 57.31 96 128S153.3 256 224 256zM224 32c52.94 0 96 43.06 96 96c0 52.93-43.06 96-96 96S128 180.9 128 128C128 75.06 171.1 32 224 32zM274.7 304H173.3C77.61 304 0 381.6 0 477.3c0 19.14 15.52 34.67 34.66 34.67h378.7C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304zM413.3 480H34.66C33.2 480 32 478.8 32 477.3C32 399.4 95.4 336 173.3 336h101.3C352.6 336 416 399.4 416 477.3C416 478.8 414.8 480 413.3 480z`},null,-1)]])}var oe=B(re,[[`render`,ae]]);e.register(`analytic:guild`,q),e.register(`analytic:heart`,Z),e.register(`analytic:history`,ne),e.register(`analytic:user`,oe);var se=e=>{e.plugin(j),e.slot({type:`home`,component:U,order:0})};export{se as default};
1
+ import{icons as e,store as t}from"@koishi-ce/client";import{Fragment as n,computed as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,createSlots as ee,createTextVNode as c,createVNode as l,defineAsyncComponent as u,defineComponent as d,h as f,openBlock as p,provide as m,ref as h,renderSlot as g,resolveComponent as _,toDisplayString as v,unref as y,withCtx as b}from"vue";var x=u(()=>import(`./echarts-BMfAiWrm.js`)),S=h(`send`);function C({title:e,fields:n=[],showTab:r,options:i}){return d({render:()=>{if(!n.every(e=>t[e]))return null;let a=i(t,S.value);if(a)return f(_(`k-card`),{class:`frameless analytic-chart`},{header:()=>[f(`span`,{class:`left`},[e]),...r?[f(`span`,{class:`right`},[f(`span`,{class:`tab-item`+(S.value===`send`?` active`:``),onClick:()=>S.value=`send`},[`发送`]),f(`span`,{class:`tab-item`+(S.value===`receive`?` active`:``),onClick:()=>S.value=`receive`},[`接收`])])]:[]],default:()=>f(x,{option:a,autoresize:!0})})}})}var w={item(e){return{trigger:`item`,formatter:e}},axis(e){return{trigger:`axis`,axisPointer:{type:`cross`},formatter:e}}},T=e=>{e.slot({type:`analytic-chart`,component:C({title:`各平台消息占比`,fields:[`analytics`],showTab:!0,options({analytics:e},t){if(!e)return;let n=Object.entries(e.messageByBot).map(([e,n])=>({name:e,children:Object.entries(n).map(([e,n])=>({name:n.name||e,value:n[t]}))}));if(n.reduce((e,{children:t})=>e+t.reduce((e,{value:t})=>e+t,0),0))return{tooltip:w.item(({data:e})=>`${e.children?`平台`:`昵称`}:${e.name}<br>日均消息数量:${+e.value.toFixed(1)}`),series:[{type:`sunburst`,data:n,radius:[`0`,`65%`],nodeClick:!1,emphasis:{focus:`ancestor`},levels:[{},{label:{rotate:`tangential`}},{label:{position:`outside`,padding:3,silent:!1}}]}]}}})})},E=e=>{e.slot({type:`analytic-chart`,component:C({title:`指令调用频率`,fields:[`analytics`],options({analytics:e}){if(!e)return;let t=Object.entries(e.commandRate).sort((e,t)=>t[1]-e[1]).map(([e,t])=>({name:e,value:t}));if(t.length)return{tooltip:w.item(({data:e})=>{let t=[e.name];return t.push(`日均调用:${+e.value.toFixed(1)}`),t.join(`<br>`)}),series:[{type:`pie`,data:t,radius:[`35%`,`65%`],minShowLabelAngle:3}]}}})})},D=`日一二三四五六`,O=e=>{e.slot({type:`analytic-chart`,component:C({title:`历史消息数量`,fields:[`analytics`],showTab:!0,options({analytics:e},t){if(!e||!e.messageByDate.length)return;let n=e.messageByDate.slice(1);return{tooltip:w.axis(([e])=>{if(!e)return``;let{name:t,value:n}=e;return`${t} 星期${D[new Date(t).getDay()]}<br>消息数量:${n}`}),xAxis:{type:`category`,data:n.map((e,t)=>new Date(Date.now()-(t+1)*864e5).toLocaleDateString(`zh-CN`)).reverse()},yAxis:{type:`value`},series:{type:`line`,smooth:!0,data:n.map(e=>e[t]).reverse()}}}})})},k=e=>`${(e-.5).toFixed()}:00-${(e+.5).toFixed()}:00`,A=e=>{e.slot({type:`analytic-chart`,component:C({title:`每小时消息数量`,fields:[`analytics`],showTab:!0,options({analytics:e},t){if(e&&!e.messageByHour.every(e=>!e[t]))return{tooltip:w.axis(([n])=>{if(!n)return``;let[r=0]=n.data,{dataIndex:i}=n,a=e.messageByHour[i];return[`${k(r)}`,`日均消息数量:${+(a?.[t]||0).toFixed(1)}`].join(`<br>`)}),xAxis:{type:`value`,min:0,max:24,minInterval:1,maxInterval:4,axisLabel:{formatter:e=>`${e}:00`},axisPointer:{label:{formatter:({value:e})=>k(e)}}},yAxis:{type:`value`},series:[{data:e.messageByHour.map((e,n)=>[n+.5,e[t]||0]),type:`bar`,stack:`1`}]}}})})},j=e=>{e.plugin(O),e.plugin(A),e.plugin(T),e.plugin(E)},M={class:`content`},N={class:`title`},P={class:`value`},F={class:`left`},I={class:`right`},L=d({__name:`numeric`,props:{title:{},icon:{}},setup(e){return(t,n)=>{let r=_(`k-icon`),a=_(`k-card`);return p(),i(a,{class:`k-analytic-number`},ee({default:b(()=>[l(r,{name:e.icon},null,8,[`name`]),s(`div`,M,[s(`p`,N,v(e.title),1),s(`p`,P,[g(t.$slots,`default`,{},()=>[n[0]||=c(`-`,-1)])])])]),_:2},[t.$slots[`footer-left`]?{name:`footer`,fn:b(()=>[s(`span`,F,[g(t.$slots,`footer-left`)]),s(`span`,I,[g(t.$slots,`footer-right`,{},()=>[n[1]||=c(`-`,-1)])])]),key:`0`}:void 0]),1024)}}}),R={key:0,class:`card-grid numeric-grid`},z=d({__name:`index`,setup(e){m(`component:analytic-number`,L);let n=r(()=>{let e=t.analytics.dauHistory.slice(1),n=t.analytics.dauHistory.length-1;return n?e.reduce((e,t)=>e+t,0)/Math.min(e.length,n):0});return(e,r)=>{let i=_(`k-slot-item`),s=_(`k-slot`);return y(t).analytics?(p(),o(`div`,R,[l(s,{name:`analytic-number`},{default:b(()=>[l(i,null,{default:b(()=>[l(L,{icon:`analytic:user`,title:`用户数量`},{default:b(()=>[c(v(y(t).analytics.userCount),1)]),"footer-left":b(()=>[...r[0]||=[c(`昨日新增用户`,-1)]]),"footer-right":b(()=>[c(v(y(t).analytics.userIncrement),1)]),_:1}),l(L,{icon:`analytic:guild`,title:`群组数量`},{default:b(()=>[c(v(y(t).analytics.guildCount),1)]),"footer-left":b(()=>[...r[1]||=[c(`昨日新增群组`,-1)]]),"footer-right":b(()=>[c(v(y(t).analytics.guildIncrement),1)]),_:1}),l(L,{icon:`analytic:heart`,title:`今日 DAU`},{default:b(()=>[c(v(y(t).analytics.dauHistory[0]),1)]),"footer-left":b(()=>[...r[2]||=[c(`近期 DAU`,-1)]]),"footer-right":b(()=>[c(v(+n.value.toFixed(1)),1)]),_:1})]),_:1})]),_:1})])):a(`v-if`,!0)}}}),B=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},V=B(z,[[`__scopeId`,`data-v-41af15ac`]]),H={class:`card-grid chart-grid`},U=d({__name:`home`,setup(e){return(e,t)=>{let r=_(`k-slot`);return p(),o(n,null,[l(V),s(`div`,H,[l(r,{name:`analytic-chart`})])],64)}}}),W={},G={class:`k-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 640 512`};function K(e,t){return p(),o(`svg`,G,[...t[0]||=[s(`path`,{fill:`currentColor`,d:`M274.7 304H173.3c-95.73 0-173.3 77.6-173.3 173.3C0 496.5 15.52 512 34.66 512H413.3C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304zM413.3 480H34.66C33.2 480 32 478.8 32 477.3C32 399.4 95.4 336 173.3 336H274.7C352.6 336 416 399.4 416 477.3C416 478.8 414.8 480 413.3 480zM224 256c70.7 0 128-57.31 128-128S294.7 0 224 0C153.3 0 96 57.31 96 128S153.3 256 224 256zM224 32c52.94 0 96 43.06 96 96c0 52.93-43.06 96-96 96S128 180.9 128 128C128 75.06 171.1 32 224 32zM375.1 241C392.9 250.8 412.3 256 432 256C493.8 256 544 205.8 544 144S493.8 32 432 32c-12.83 0-25.39 2.156-37.34 6.391c-8.328 2.953-12.69 12.09-9.734 20.42c2.953 8.344 12.12 12.66 20.42 9.734C413.9 65.53 422.8 64 432 64C476.1 64 512 99.89 512 144S476.1 224 432 224c-14.08 0-27.91-3.703-39.98-10.69c-7.656-4.453-17.44-1.828-21.86 5.828C365.7 226.8 368.3 236.6 375.1 241zM490.7 320H448c-8.844 0-16 7.156-16 16S439.2 352 448 352h42.67C555.4 352 608 404.6 608 469.3C608 475.2 603.2 480 597.3 480H496c-8.844 0-16 7.156-16 16s7.156 16 16 16h101.3C620.9 512 640 492.9 640 469.3C640 386.1 573 320 490.7 320z`},null,-1)]])}var q=B(W,[[`render`,K]]),J={},Y={class:`k-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`};function X(e,t){return p(),o(`svg`,Y,[...t[0]||=[s(`path`,{fill:`currentColor`,d:`M255.1 96L267.1 84.02C300.6 51.37 347 36.51 392.6 44.1C461.5 55.58 512 115.2 512 185.1V190.9C512 232.4 494.8 272.1 464.4 300.4L283.7 469.1C276.2 476.1 266.3 480 256 480C245.7 480 235.8 476.1 228.3 469.1L47.59 300.4C17.23 272.1 0 232.4 0 190.9V185.1C0 115.2 50.52 55.58 119.4 44.1C164.1 36.51 211.4 51.37 244 84.02L255.1 96zM255.1 141.3L221.4 106.6C196.1 81.31 160 69.77 124.7 75.66C71.21 84.58 31.1 130.9 31.1 185.1V190.9C31.1 223.6 45.55 254.7 69.42 277L250.1 445.7C251.7 447.2 253.8 448 255.1 448C258.2 448 260.3 447.2 261.9 445.7L442.6 277C466.4 254.7 480 223.6 480 190.9V185.1C480 130.9 440.8 84.58 387.3 75.66C351.1 69.77 315.9 81.31 290.6 106.6L255.1 141.3z`},null,-1)]])}var Z=B(J,[[`render`,X]]),Q={},$={class:`k-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`};function te(e,t){return p(),o(`svg`,$,[...t[0]||=[s(`path`,{fill:`currentColor`,d:`M256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C172.2 512 97.87 471.8 51.19 409.6C45.88 402.5 47.31 392.5 54.37 387.2C61.44 381.9 71.47 383.3 76.78 390.4C117.7 444.8 182.7 480 256 480C379.7 480 480 379.7 480 256C480 132.3 379.7 32 256 32C166.7 32 89.51 84.3 53.55 160H144C152.8 160 160 167.2 160 176C160 184.8 152.8 192 144 192H16C7.164 192 0 184.8 0 176V48C0 39.16 7.164 32 16 32C24.84 32 32 39.16 32 48V131.1C75.66 53.29 159.6 0 256 0zM256 128C264.8 128 272 135.2 272 144V249.4L347.3 324.7C353.6 330.9 353.6 341.1 347.3 347.3C341.1 353.6 330.9 353.6 324.7 347.3L244.7 267.3C241.7 264.3 239.1 260.2 239.1 256V144C239.1 135.2 247.2 128 255.1 128H256z`},null,-1)]])}var ne=B(Q,[[`render`,te]]),re={},ie={class:`k-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`};function ae(e,t){return p(),o(`svg`,ie,[...t[0]||=[s(`path`,{fill:`currentColor`,d:`M224 256c70.7 0 128-57.31 128-128s-57.3-128-128-128C153.3 0 96 57.31 96 128S153.3 256 224 256zM224 32c52.94 0 96 43.06 96 96c0 52.93-43.06 96-96 96S128 180.9 128 128C128 75.06 171.1 32 224 32zM274.7 304H173.3C77.61 304 0 381.6 0 477.3c0 19.14 15.52 34.67 34.66 34.67h378.7C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304zM413.3 480H34.66C33.2 480 32 478.8 32 477.3C32 399.4 95.4 336 173.3 336h101.3C352.6 336 416 399.4 416 477.3C416 478.8 414.8 480 413.3 480z`},null,-1)]])}var oe=B(re,[[`render`,ae]]);e.register(`analytic:guild`,q),e.register(`analytic:heart`,Z),e.register(`analytic:history`,ne),e.register(`analytic:user`,oe);var se=e=>{e.plugin(j),e.slot({type:`home`,component:U,order:0})};export{se as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@koishi-ce/plugin-analytics",
3
3
  "description": "Show statistics for Koishi application",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
7
7
  "typings": "lib/index.d.ts",
@@ -54,10 +54,10 @@
54
54
  "@koishi-ce/koishi": "^1.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@koishi-ce/assets": "^1.0.1",
58
- "@koishi-ce/client": "^1.0.2",
57
+ "@koishi-ce/client": "^1.0.3",
59
58
  "echarts": "^6.1.0",
60
- "@koishi-ce/koishi": "^1.0.3",
59
+ "@koishi-ce/koishi": "^1.0.4",
60
+ "vite": "^8.2.2",
61
61
  "vue-echarts": "^8.1.0"
62
62
  },
63
63
  "dependencies": {