@ovalbee/reportifact 0.0.1 → 0.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.
- package/README.md +2 -1
- package/dist/{Chart.vue_vue_type_style_index_0_lang-BYILFTfl.js → Chart.vue_vue_type_style_index_0_lang-Bp14Es_r.js} +2341 -2290
- package/dist/Chart.vue_vue_type_style_index_0_lang-Dj7m6i3v.cjs +1 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BTA6fIp9.js +2640 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-CZ8Y2pXG.cjs +2 -0
- package/dist/index-3DTuh2Dr.cjs +47 -0
- package/dist/{index-DFz2A8yJ.js → index-DevYhXSC.js} +9252 -8377
- package/dist/portable/ReportifactFigure.vue.d.ts +4 -0
- package/dist/reportifact.cjs +1 -1
- package/dist/reportifact.js +3 -3
- package/dist/style.css +1 -1
- package/dist/widgets/chart.cjs +1 -1
- package/dist/widgets/chart.js +1 -1
- package/dist/widgets/figure.cjs +1 -1
- package/dist/widgets/figure.js +37 -37
- package/dist/widgets/timeline.cjs +1 -1
- package/dist/widgets/timeline.js +1 -1
- package/package.json +9 -8
- package/dist/Chart.vue_vue_type_style_index_0_lang-B4novMFC.cjs +0 -1
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BIyC7N9b.cjs +0 -2
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BnrgKBMh.js +0 -2598
- package/dist/index-DmTzvbys.cjs +0 -47
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const B=require("vue"),o=require("./index-3DTuh2Dr.cjs"),_r=require("./useFetch-BfOAq-Kg.cjs"),xr=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs");function Zt(i,r,e,t,a,n,s,l){var u=a-i,c=n-r,h=e-i,v=t-r,f=Math.sqrt(h*h+v*v);h/=f,v/=f;var p=u*h+c*v,g=p/f;g*=f;var d=s[0]=i+g*h,S=s[1]=r+g*v;return Math.sqrt((d-a)*(d-a)+(S-n)*(S-n))}var oe=new o.Point,U=new o.Point,$=new o.Point,se=new o.Point,J=new o.Point,Oe=[],Z=new o.Point;function Ar(i,r){if(r<=180&&r>0){r=r/180*Math.PI,oe.fromArray(i[0]),U.fromArray(i[1]),$.fromArray(i[2]),o.Point.sub(se,oe,U),o.Point.sub(J,$,U);var e=se.len(),t=J.len();if(!(e<.001||t<.001)){se.scale(1/e),J.scale(1/t);var a=se.dot(J),n=Math.cos(r);if(n<a){var s=Zt(U.x,U.y,$.x,$.y,oe.x,oe.y,Oe);Z.fromArray(Oe),Z.scaleAndAdd(J,s/Math.tan(Math.PI-r));var l=$.x!==U.x?(Z.x-U.x)/($.x-U.x):(Z.y-U.y)/($.y-U.y);if(isNaN(l))return;l<0?o.Point.copy(Z,U):l>1&&o.Point.copy(Z,$),Z.toArray(i[1])}}}}function wr(i,r,e){if(e<=180&&e>0){e=e/180*Math.PI,oe.fromArray(i[0]),U.fromArray(i[1]),$.fromArray(i[2]),o.Point.sub(se,U,oe),o.Point.sub(J,$,U);var t=se.len(),a=J.len();if(!(t<.001||a<.001)){se.scale(1/t),J.scale(1/a);var n=se.dot(r),s=Math.cos(e);if(n<s){var l=Zt(U.x,U.y,$.x,$.y,oe.x,oe.y,Oe);Z.fromArray(Oe);var u=Math.PI/2,c=Math.acos(J.dot(r)),h=u+c-e;if(h>=u)o.Point.copy(Z,$);else{Z.scaleAndAdd(J,l/Math.tan(Math.PI/2-h));var v=$.x!==U.x?(Z.x-U.x)/($.x-U.x):(Z.y-U.y)/($.y-U.y);if(isNaN(v))return;v<0?o.Point.copy(Z,U):v>1&&o.Point.copy(Z,$)}Z.toArray(i[1])}}}}function Ue(i,r,e,t){var a=e==="normal",n=a?i:i.ensureState(e);n.ignore=r;var s=t.get("smooth");s=s===!0?.3:Math.max(+s,0)||0,n.shape=n.shape||{},n.shape.smooth=s;var l=t.getModel("lineStyle").getLineStyle();a?i.useStyle(l):n.style=l}function Ir(i,r){var e=r.smooth,t=r.points;if(t)if(i.moveTo(t[0][0],t[0][1]),e>0&&t.length>=3){var a=o.dist(t[0],t[1]),n=o.dist(t[1],t[2]);if(!a||!n){i.lineTo(t[1][0],t[1][1]),i.lineTo(t[2][0],t[2][1]);return}var s=Math.min(a,n)*e,l=o.lerp([],t[1],t[0],s/a),u=o.lerp([],t[1],t[2],s/n),c=o.lerp([],l,u,.5);i.bezierCurveTo(l[0],l[1],l[0],l[1],c[0],c[1]),i.bezierCurveTo(u[0],u[1],u[0],u[1],t[2][0],t[2][1])}else for(var h=1;h<t.length;h++)i.lineTo(t[h][0],t[h][1])}function Mr(i,r,e){var t=i.getTextGuideLine(),a=i.getTextContent();if(!a){t&&i.removeTextGuideLine();return}for(var n=r.normal,s=n.get("show"),l=a.ignore,u=0;u<o.DISPLAY_STATES.length;u++){var c=o.DISPLAY_STATES[u],h=r[c],v=c==="normal";if(h){var f=h.get("show"),p=v?l:o.retrieve2(a.states[c]&&a.states[c].ignore,l);if(p||!o.retrieve2(f,s)){var g=v?t:t&&t.states[c];g&&(g.ignore=!0),t&&Ue(t,!0,c,h);continue}t||(t=new o.Polyline,i.setTextGuideLine(t),!v&&(l||!s)&&Ue(t,!0,"normal",r.normal),i.stateProxy&&(t.stateProxy=i.stateProxy)),Ue(t,!1,c,h)}}if(t){o.defaults(t.style,e),t.style.fill=null;var d=n.get("showAbove"),S=i.textGuideLineConfig=i.textGuideLineConfig||{};S.showAbove=d||!1,t.buildPath=Ir}}function Dr(i,r){r=r||"labelLine";for(var e={normal:i.getModel(r)},t=0;t<o.SPECIAL_STATES.length;t++){var a=o.SPECIAL_STATES[t];e[a]=i.getModel([a,r])}return e}var Lr=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.hasSymbolVisual=!0,e}return r.prototype.getInitialData=function(e){if(process.env.NODE_ENV!=="production"){var t=e.coordinateSystem;if(t!=="polar"&&t!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return o.createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getLegendIcon=function(e){var t=new o.Group,a=o.createSymbol("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(a),a.setStyle(e.lineStyle);var n=this.getData().getVisual("symbol"),s=this.getData().getVisual("symbolRotate"),l=n==="none"?"circle":n,u=e.itemHeight*.8,c=o.createSymbol(l,(e.itemWidth-u)/2,(e.itemHeight-u)/2,u,u,e.itemStyle.fill);t.add(c),c.setStyle(e.itemStyle);var h=e.iconRotate==="inherit"?s:e.iconRotate||0;return c.rotation=h*Math.PI/180,c.setOrigin([e.itemWidth/2,e.itemHeight/2]),l.indexOf("empty")>-1&&(c.style.stroke=c.style.fill,c.style.fill=o.tokens.color.neutral00,c.style.lineWidth=2),t},r.type="series.line",r.dependencies=["grid","polar"],r.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},r})(o.SeriesModel),rt=(function(i){o.__extends(r,i);function r(e,t,a,n){var s=i.call(this)||this;return s.updateData(e,t,a,n),s}return r.prototype._createSymbol=function(e,t,a,n,s,l){this.removeAll();var u=o.createSymbol(e,-1,-1,2,2,null,l);u.attr({z2:o.retrieve2(s,100),culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),u.drift=Pr,this._symbolType=e,this.add(u)},r.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},r.prototype.getSymbolType=function(){return this._symbolType},r.prototype.getSymbolPath=function(){return this.childAt(0)},r.prototype.highlight=function(){o.enterEmphasis(this.childAt(0))},r.prototype.downplay=function(){o.leaveEmphasis(this.childAt(0))},r.prototype.setZ=function(e,t){var a=this.childAt(0);a.zlevel=e,a.z=t},r.prototype.setDraggable=function(e,t){var a=this.childAt(0);a.draggable=e,a.cursor=!t&&e?"move":a.cursor},r.prototype.updateData=function(e,t,a,n){this.silent=!1;var s=e.getItemVisual(t,"symbol")||"circle",l=e.hostModel,u=r.getSymbolSize(e,t),c=r.getSymbolZ2(e,t),h=s!==this._symbolType,v=n&&n.disableAnimation;if(h){var f=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(s,e,t,u,c,f)}else{var p=this.childAt(0);p.silent=!1;var g={scaleX:u[0]/2,scaleY:u[1]/2};v?p.attr(g):o.updateProps(p,g,l,t),o.saveOldStyle(p)}if(this._updateCommon(e,t,u,a,n),h){var p=this.childAt(0);if(!v){var g={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,o.initProps(p,g,l,t)}}v&&this.childAt(0).stopAnimation("leave")},r.prototype._updateCommon=function(e,t,a,n,s){var l=this.childAt(0),u=e.hostModel,c,h,v,f,p,g,d,S,m;if(n&&(c=n.emphasisItemStyle,h=n.blurItemStyle,v=n.selectItemStyle,f=n.focus,p=n.blurScope,d=n.labelStatesModels,S=n.hoverScale,m=n.cursorStyle,g=n.emphasisDisabled),!n||e.hasItemOption){var y=n&&n.itemModel?n.itemModel:e.getItemModel(t),b=y.getModel("emphasis");c=b.getModel("itemStyle").getItemStyle(),v=y.getModel(["select","itemStyle"]).getItemStyle(),h=y.getModel(["blur","itemStyle"]).getItemStyle(),f=b.get("focus"),p=b.get("blurScope"),g=b.get("disabled"),d=o.getLabelStatesModels(y),S=b.getShallow("scale"),m=y.getShallow("cursor")}var D=e.getItemVisual(t,"symbolRotate");l.attr("rotation",(D||0)*Math.PI/180||0);var I=o.normalizeSymbolOffset(e.getItemVisual(t,"symbolOffset"),a);I&&(l.x=I[0],l.y=I[1]),m&&l.attr("cursor",m);var x=e.getItemVisual(t,"style"),_=x.fill;if(l instanceof o.ZRImage){var w=l.style;l.useStyle(o.extend({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},x))}else l.__isEmptyBrush?l.useStyle(o.extend({},x)):l.useStyle(x),l.style.decal=null,l.setColor(_,s&&s.symbolInnerColor),l.style.strokeNoScale=!0;var P=e.getItemVisual(t,"liftZ"),A=this._z2;P!=null?A==null&&(this._z2=l.z2,l.z2+=P):A!=null&&(l.z2=A,this._z2=null);var M=s&&s.useNameLabel;o.setLabelStyle(l,d,{labelFetcher:u,labelDataIndex:t,defaultText:L,inheritColor:_,defaultOpacity:x.opacity});function L(E){return M?e.getName(E):o.getDefaultLabel(e,E)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var T=l.ensureState("emphasis");T.style=c,l.ensureState("select").style=v,l.ensureState("blur").style=h;var V=S==null||S===!0?Math.max(1.1,3/this._sizeY):isFinite(S)&&S>0?+S:1;T.scaleX=this._sizeX*V,T.scaleY=this._sizeY*V,this.setSymbolScale(1),o.toggleHoverEmphasis(this,f,p,g)},r.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},r.prototype.fadeOut=function(e,t,a){var n=this.childAt(0),s=o.getECData(this).dataIndex,l=a&&a.animation;if(this.silent=n.silent=!0,a&&a.fadeLabel){var u=n.getTextContent();u&&o.removeElement(u,{style:{opacity:0}},t,{dataIndex:s,removeOpt:l,cb:function(){n.removeTextContent()}})}else n.removeTextContent();o.removeElement(n,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:s,cb:e,removeOpt:l})},r.getSymbolSize=function(e,t){return o.normalizeSymbolSize(e.getItemVisual(t,"symbolSize"))},r.getSymbolZ2=function(e,t){return e.getItemVisual(t,"z2")},r})(o.Group);function Pr(i,r){this.parent.drift(i,r)}function Me(i,r,e,t){return r&&!isNaN(r[0])&&!isNaN(r[1])&&!(t&&t.isIgnore&&t.isIgnore(e))&&!(t&&t.clipShape&&!t.clipShape.contain(r[0],r[1]))&&i.getItemVisual(e,"symbol")!=="none"}function lt(i){return i!=null&&!o.isObject(i)&&(i={isIgnore:i}),i||{}}function ut(i){var r=i.hostModel,e=r.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:r.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:r.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:o.getLabelStatesModels(r),cursorStyle:r.get("cursor")}}function ct(i,r,e,t,a,n,s){var l=new i(r,e,t,a);return l.setPosition(n),r.setItemGraphicEl(e,l),s.add(l),l}var Cr=(function(){function i(r){this.group=new o.Group,this._SymbolCtor=r||rt}return i.prototype.updateData=function(r,e){this._progressiveEls=null,e=lt(e);var t=this.group,a=r.hostModel,n=this._data,s=this._SymbolCtor,l=e.disableAnimation,u=this._seriesScope=ut(r),c={disableAnimation:l},h=e.getSymbolPoint||function(v){return r.getItemLayout(v)};n||t.removeAll(),r.diff(n).add(function(v){var f=h(v);Me(r,f,v,e)&&ct(s,r,v,u,c,f,t)}).update(function(v,f){var p=n.getItemGraphicEl(f),g=h(v);if(!Me(r,g,v,e)){t.remove(p);return}var d=r.getItemVisual(v,"symbol")||"circle",S=p&&p.getSymbolType&&p.getSymbolType();if(!p||S&&S!==d)t.remove(p),p=new s(r,v,u,c),p.setPosition(g);else{p.updateData(r,v,u,c);var m={x:g[0],y:g[1]};l?p.attr(m):o.updateProps(p,m,a)}t.add(p),r.setItemGraphicEl(v,p)}).remove(function(v){var f=n.getItemGraphicEl(v);f&&f.fadeOut(function(){t.remove(f)},a)}).execute(),this._getSymbolPoint=h,this._data=r},i.prototype.updateLayout=function(r){var e=this._data;if(e)for(var t=this,a=e.getStore(),n=0,s=a.count();n<s;n++){var l=e.getItemGraphicEl(n),u=t._getSymbolPoint(n);Me(e,u,n,r)?(l=l||ct(t._SymbolCtor,e,n,t._seriesScope,{disableAnimation:!0},u,t.group),l.stopAnimation(),l.setPosition(u),l.markRedraw()):l&&(t.group.remove(l),e.setItemGraphicEl(n,null))}},i.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=ut(r),this._data=null,this.group.removeAll()},i.prototype.incrementalUpdate=function(r,e,t,a){this._progressiveEls=[],a=lt(a);function n(c){c.isGroup||(c.incremental=t,c.ensureState("emphasis").hoverLayer=o.HOVER_LAYER_FOR_INCREMENTAL)}for(var s=r.start;s<r.end;s++){var l=e.getItemLayout(s);if(Me(e,l,s,a)){var u=new this._SymbolCtor(e,s,this._seriesScope);u.traverse(n),u.setPosition(l),this.group.add(u),e.setItemGraphicEl(s,u),this._progressiveEls.push(u)}}},i.prototype.eachRendered=function(r){o.traverseElements(this._progressiveEls||this.group,r)},i.prototype.remove=function(r){var e=this.group,t=this._data;t&&r?t.eachItemGraphicEl(function(a){a.fadeOut(function(){e.remove(a)},t.hostModel)}):e.removeAll()},i})();function qt(i,r,e){var t=i.getBaseAxis(),a=i.getOtherAxis(t),n=Tr(a,e),s=t.dim,l=a.dim,u=r.mapDimension(l),c=r.mapDimension(s),h=l==="x"||l==="radius"?1:0,v=o.map(i.dimensions,function(g){return r.mapDimension(g)}),f=!1,p=r.getCalculationInfo("stackResultDimension");return o.isDimensionStacked(r,v[0])&&(f=!0,v[0]=p),o.isDimensionStacked(r,v[1])&&(f=!0,v[1]=p),{dataDimsForPoint:v,valueStart:n,valueAxisDim:l,baseAxisDim:s,stacked:!!f,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:r.getCalculationInfo("stackedOverDimension")}}function Tr(i,r){var e=0,t=i.scale.getExtent();return r==="start"?e=t[0]:r==="end"?e=t[1]:o.isNumber(r)&&!isNaN(r)?e=r:t[0]>0?e=t[0]:t[1]<0&&(e=t[1]),e}function jt(i,r,e,t){var a=NaN;i.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),t)),isNaN(a)&&(a=i.valueStart);var n=i.baseDataOffset,s=[];return s[n]=e.get(i.baseDim,t),s[1-n]=a,r.dataToPoint(s)}function q(i,r){return!isFinite(i)||!isFinite(r)}function Er(i,r){var e=[];return r.diff(i).add(function(t){e.push({cmd:"+",idx:t})}).update(function(t,a){e.push({cmd:"=",idx:a,idx1:t})}).remove(function(t){e.push({cmd:"-",idx:t})}).execute(),e}function Vr(i,r,e,t,a,n,s,l){for(var u=Er(i,r),c=[],h=[],v=[],f=[],p=[],g=[],d=[],S=qt(a,r,s),m=i.getLayout("points")||[],y=r.getLayout("points")||[],b=0;b<u.length;b++){var D=u[b],I=!0,x=void 0,_=void 0;switch(D.cmd){case"=":x=D.idx*2,_=D.idx1*2;var w=m[x],P=m[x+1],A=y[_],M=y[_+1];(isNaN(w)||isNaN(P))&&(w=A,P=M),c.push(w,P),h.push(A,M),v.push(e[x],e[x+1]),f.push(t[_],t[_+1]),d.push(r.getRawIndex(D.idx1));break;case"+":var L=D.idx,T=S.dataDimsForPoint,V=a.dataToPoint([r.get(T[0],L),r.get(T[1],L)]);_=L*2,c.push(V[0],V[1]),h.push(y[_],y[_+1]);var E=jt(S,a,r,L);v.push(E[0],E[1]),f.push(t[_],t[_+1]),d.push(r.getRawIndex(L));break;case"-":I=!1}I&&(p.push(D),g.push(g.length))}g.sort(function(W,j){return d[W]-d[j]});for(var R=c.length,k=o.createFloat32Array(R),C=o.createFloat32Array(R),O=o.createFloat32Array(R),N=o.createFloat32Array(R),z=[],b=0;b<g.length;b++){var G=g[b],F=b*2,H=G*2;k[F]=c[H],k[F+1]=c[H+1],C[F]=h[H],C[F+1]=h[H+1],O[F]=v[H],O[F+1]=v[H+1],N[F]=f[H],N[F+1]=f[H+1],z[b]=p[G]}return{current:k,next:C,stackedOnCurrent:O,stackedOnNext:N,status:z}}var ae=Math.min,ie=Math.max;function Je(i,r,e,t,a,n,s,l,u){for(var c,h,v,f,p,g,d=e,S=0;S<t;S++){var m=r[d*2],y=r[d*2+1];if(d>=a||d<0)break;if(q(m,y)){if(u){d+=n;continue}break}if(d===e)i[n>0?"moveTo":"lineTo"](m,y),v=m,f=y;else{var b=m-c,D=y-h;if(b*b+D*D<.5){d+=n;continue}if(s>0){for(var I=d+n,x=r[I*2],_=r[I*2+1];x===m&&_===y&&S<t;)S++,I+=n,d+=n,x=r[I*2],_=r[I*2+1],m=r[d*2],y=r[d*2+1],b=m-c,D=y-h;var w=S+1;if(u)for(;q(x,_)&&w<t;)w++,I+=n,x=r[I*2],_=r[I*2+1];var P=.5,A=0,M=0,L=void 0,T=void 0;if(w>=t||q(x,_))p=m,g=y;else{A=x-c,M=_-h;var V=m-c,E=x-m,R=y-h,k=_-y,C=void 0,O=void 0;if(l==="x"){C=Math.abs(V),O=Math.abs(E);var N=A>0?1:-1;p=m-N*C*s,g=y,L=m+N*O*s,T=y}else if(l==="y"){C=Math.abs(R),O=Math.abs(k);var z=M>0?1:-1;p=m,g=y-z*C*s,L=m,T=y+z*O*s}else C=Math.sqrt(V*V+R*R),O=Math.sqrt(E*E+k*k),P=O/(O+C),p=m-A*s*(1-P),g=y-M*s*(1-P),L=m+A*s*P,T=y+M*s*P,L=ae(L,ie(x,m)),T=ae(T,ie(_,y)),L=ie(L,ae(x,m)),T=ie(T,ae(_,y)),A=L-m,M=T-y,p=m-A*C/O,g=y-M*C/O,p=ae(p,ie(c,m)),g=ae(g,ie(h,y)),p=ie(p,ae(c,m)),g=ie(g,ae(h,y)),A=m-p,M=y-g,L=m+A*O/C,T=y+M*O/C}i.bezierCurveTo(v,f,p,g,m,y),v=L,f=T}else i.lineTo(m,y)}c=m,h=y,d+=n}return S}var Kt=(function(){function i(){this.smooth=0,this.smoothConstraint=!0}return i})(),kr=(function(i){o.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="ec-polyline",t}return r.prototype.getDefaultStyle=function(){return{stroke:o.tokens.color.neutral99,fill:null}},r.prototype.getDefaultShape=function(){return new Kt},r.prototype.buildPath=function(e,t){var a=t.points,n=0,s=a.length/2;if(t.connectNulls){for(;s>0&&q(a[s*2-2],a[s*2-1]);s--);for(;n<s&&q(a[n*2],a[n*2+1]);n++);}for(;n<s;)n+=Je(e,a,n,s,s,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},r.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,n=a.data,s=o.PathProxy.CMD,l,u,c=t==="x",h=[],v=0;v<n.length;){var f=n[v++],p=void 0,g=void 0,d=void 0,S=void 0,m=void 0,y=void 0,b=void 0;switch(f){case s.M:l=n[v++],u=n[v++];break;case s.L:if(p=n[v++],g=n[v++],b=c?(e-l)/(p-l):(e-u)/(g-u),b<=1&&b>=0){var D=c?(g-u)*b+u:(p-l)*b+l;return c?[e,D]:[D,e]}l=p,u=g;break;case s.C:p=n[v++],g=n[v++],d=n[v++],S=n[v++],m=n[v++],y=n[v++];var I=c?o.cubicRootAt(l,p,d,m,e,h):o.cubicRootAt(u,g,S,y,e,h);if(I>0)for(var x=0;x<I;x++){var _=h[x];if(_<=1&&_>=0){var D=c?o.cubicAt(u,g,S,y,_):o.cubicAt(l,p,d,m,_);return c?[e,D]:[D,e]}}l=m,u=y;break}}},r})(o.Path),Rr=(function(i){o.__extends(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r})(Kt),Or=(function(i){o.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="ec-polygon",t}return r.prototype.getDefaultShape=function(){return new Rr},r.prototype.buildPath=function(e,t){var a=t.points,n=t.stackedOnPoints,s=0,l=a.length/2,u=t.smoothMonotone;if(t.connectNulls){for(;l>0&&q(a[l*2-2],a[l*2-1]);l--);for(;s<l&&q(a[s*2],a[s*2+1]);s++);}for(;s<l;){var c=Je(e,a,s,l,l,1,t.smooth,u,t.connectNulls);Je(e,n,s+c-1,c,l,-1,t.stackedOnSmooth,u,t.connectNulls),s+=c+1,e.closePath()}},r})(o.Path);function Ne(i,r){return i.type===r}function ht(i){var r=i.dimensions;return r[0]==="lng"&&r[1]==="lat"&&!!i.getViewRect}function vt(i,r){if(i.length===r.length){for(var e=0;e<i.length;e++)if(i[e]!==r[e])return;return!0}}function pt(i){for(var r=o.initExtentForUnion(),e=o.initExtentForUnion(),t=0;t<i.length;){var a=i[t++],n=i[t++];q(a,n)||(o.unionExtentFromNumber(r,a),o.unionExtentFromNumber(e,n))}return[r,e]}function ft(i,r){var e=pt(i),t=e[0],a=e[1],n=pt(r),s=n[0],l=n[1];return Math.max(Math.abs(t[0]-s[0]),Math.abs(a[0]-l[0]),Math.abs(t[1]-s[1]),Math.abs(a[1]-l[1]))}function gt(i){return o.isNumber(i)?i:i?.5:0}function Nr(i,r,e){if(e.valueDim==null)return[];for(var t=r.count(),a=o.createFloat32Array(t*2),n=0;n<t;n++){var s=jt(e,i,r,n);a[n*2]=s[0],a[n*2+1]=s[1]}return a}function ne(i,r,e,t,a){var n=e.getBaseAxis(),s=n.dim==="x"||n.dim==="radius"?0:1,l=[],u=0,c=[],h=[],v=[],f=[];if(a){for(u=0;u<i.length;u+=2){var p=r||i;q(p[u],p[u+1])||f.push(i[u],i[u+1])}i=f}for(u=0;u<i.length-2;u+=2)switch(v[0]=i[u+2],v[1]=i[u+3],h[0]=i[u],h[1]=i[u+1],l.push(h[0],h[1]),t){case"end":c[s]=v[s],c[1-s]=h[1-s],l.push(c[0],c[1]);break;case"middle":var g=(h[s]+v[s])/2,d=[];c[s]=d[s]=g,c[1-s]=h[1-s],d[1-s]=v[1-s],l.push(c[0],c[1]),l.push(d[0],d[1]);break;default:c[s]=h[s],c[1-s]=v[1-s],l.push(c[0],c[1])}return l.push(i[u++],i[u++]),l}function zr(i,r){var e=[],t=i.length,a,n;function s(h,v,f){var p=h.coord,g=(f-p)/(v.coord-p),d=o.lerp$1(g,[h.color,v.color]);return{coord:f,color:d}}for(var l=0;l<t;l++){var u=i[l],c=u.coord;if(c<0)a=u;else if(c>r){n?e.push(s(n,u,r)):a&&e.push(s(a,u,0),s(a,u,r));break}else a&&(e.push(s(a,u,0)),a=null),e.push(u),n=u}return e}function Gr(i,r,e){var t=i.getVisual("visualMeta");if(!(!t||!t.length||!i.count())){if(r.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var a,n,s=t.length-1;s>=0;s--){var l=i.getDimensionInfo(t[s].dimension);if(a=l&&l.coordDim,a==="x"||a==="y"){n=t[s];break}}if(!n){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=r.getAxis(a),c=o.map(n.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),h=c.length,v=n.outerColors.slice();h&&c[0].coord>c[h-1].coord&&(c.reverse(),v.reverse());var f=zr(c,a==="x"?e.getWidth():e.getHeight()),p=f.length;if(!p&&h)return c[0].coord<0?v[1]?v[1]:c[h-1].color:v[0]?v[0]:c[0].color;var g=10,d=f[0].coord-g,S=f[p-1].coord+g,m=S-d;if(m<.001)return"transparent";o.each(f,function(b){b.offset=(b.coord-d)/m}),f.push({offset:p?f[p-1].offset:.5,color:v[1]||"transparent"}),f.unshift({offset:p?f[0].offset:.5,color:v[0]||"transparent"});var y=new o.LinearGradient(0,0,0,0,f,!0);return y[a]=d,y[a+"2"]=S,y}}function Fr(i,r,e){var t=i.get("showAllSymbol"),a=t==="auto";if(!(t&&!a)){var n=e.getAxesByScale("ordinal")[0];if(n&&!(a&&Hr(n,r))){var s=r.mapDimension(n.dim),l={};return o.each(n.getViewLabels(),function(u){u.tick.offInterval||(l[o.getTickValueOutermost(n.scale,u.tick)]=1)}),function(u){return!l.hasOwnProperty(r.get(s,u))}}}}function Hr(i,r){var e=i.getExtent(),t=Math.abs(e[1]-e[0])/i.scale.count();isNaN(t)&&(t=0);for(var a=r.count(),n=Math.max(1,Math.round(a/5)),s=0;s<a;s+=n)if(rt.getSymbolSize(r,s)[i.isHorizontal()?1:0]*1.5>t)return!1;return!0}function Br(i){for(var r=i.length/2;r>0&&q(i[r*2-2],i[r*2-1]);r--);return r-1}function dt(i,r){return[i[r*2],i[r*2+1]]}function Ur(i,r,e){for(var t=i.length/2,a=e==="x"?0:1,n,s,l=0,u=-1,c=0;c<t;c++)if(s=i[c*2+a],!q(s,i[c*2+1-a])){if(c===0){n=s;continue}if(n<=r&&s>=r||n>=r&&s<=r){u=c;break}l=c,n=s}return{range:[l,u],t:(r-n)/(s-n)}}function Jt(i){if(i.get(["endLabel","show"]))return!0;for(var r=0;r<o.SPECIAL_STATES.length;r++)if(i.get([o.SPECIAL_STATES[r],"endLabel","show"]))return!0;return!1}function We(i,r,e,t){if(Ne(r,"cartesian2d")){var a=t.getModel("endLabel"),n=a.get("valueAnimation"),s=t.getData(),l={lastFrameIndex:0},u=Jt(t)?function(p,g){i._endLabelOnDuring(p,g,s,l,n,a,r)}:null,c=r.getBaseAxis().isHorizontal(),h=o.createGridClipPath(r,e,t,function(){var p=i._endLabel;p&&e&&l.originalX!=null&&p.attr({x:l.originalX,y:l.originalY})},u);if(!t.get("clip",!0)){var v=h.shape,f=Math.max(v.width,v.height);c?(v.y-=f,v.height+=f*2):(v.x-=f,v.width+=f*2)}return u&&u(1,h),h}else return process.env.NODE_ENV!=="production"&&t.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),o.createPolarClipPath(r,e,t)}function Wr(i,r){var e=r.getBaseAxis(),t=e.isHorizontal(),a=e.inverse,n=t?a?"right":"left":"center",s=t?"middle":a?"top":"bottom";return{normal:{align:i.get("align")||n,verticalAlign:i.get("verticalAlign")||s}}}var $r=(function(i){o.__extends(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.init=function(){var e=new o.Group,t=new Cr;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=o.bind(this._changePolyState,this)},r.prototype.render=function(e,t,a){var n=e.coordinateSystem,s=this.group,l=e.getData(),u=e.getModel("lineStyle"),c=e.getModel("areaStyle"),h=l.getLayout("points")||[],v=n.type==="polar",f=this._coordSys,p=this._symbolDraw,g=this._polyline,d=this._polygon,S=this._lineGroup,m=!t.ssr&&e.get("animation"),y=!c.isEmpty(),b=c.get("origin"),D=qt(n,l,b),I=y&&Nr(n,l,D),x=e.get("showSymbol"),_=e.get("connectNulls"),w=x&&!v&&Fr(e,l,n),P=this._data;P&&P.eachItemGraphicEl(function(Y,ge){Y.__temp&&(s.remove(Y),P.setItemGraphicEl(ge,null))}),x||p.remove(),s.add(S);var A=v?!1:e.get("step"),M;n&&n.getArea&&e.get("clip",!0)&&(M=n.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var L=Gr(l,n,a)||l.getVisual("style")[l.getVisual("drawType")];if(!(g&&f.type===n.type&&A===this._step))x&&p.updateData(l,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(Y){return[h[Y*2],h[Y*2+1]]}}),m&&this._initSymbolLabelAnimation(l,n,M),A&&(I&&(I=ne(I,h,n,A,_)),h=ne(h,null,n,A,_)),g=this._newPolyline(h),y?d=this._newPolygon(h,I):d&&(S.remove(d),d=this._polygon=null),v||this._initOrUpdateEndLabel(e,n,o.convertToColorString(L)),S.setClipPath(We(this,n,!0,e));else{y&&!d?d=this._newPolygon(h,I):d&&!y&&(S.remove(d),d=this._polygon=null),v||this._initOrUpdateEndLabel(e,n,o.convertToColorString(L));var T=S.getClipPath();if(T){var V=We(this,n,!1,e);o.initProps(T,{shape:V.shape},e)}else S.setClipPath(We(this,n,!0,e));x&&p.updateData(l,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(Y){return[h[Y*2],h[Y*2+1]]}}),(!vt(this._stackedOnPoints,I)||!vt(this._points,h))&&(m?this._doUpdateAnimation(l,I,n,a,A,b,_):(A&&(I&&(I=ne(I,h,n,A,_)),h=ne(h,null,n,A,_)),g.setShape({points:h}),d&&d.setShape({points:h,stackedOnPoints:I})))}var E=e.getModel("emphasis"),R=E.get("focus"),k=E.get("blurScope"),C=E.get("disabled");if(g.useStyle(o.defaults(u.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),o.setStatesStylesFromModel(g,e,"lineStyle"),g.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var O=g.getState("emphasis").style;O.lineWidth=+g.style.lineWidth+1}o.getECData(g).seriesIndex=e.seriesIndex,o.toggleHoverEmphasis(g,R,k,C);var N=gt(e.get("smooth")),z=e.get("smoothMonotone");if(g.setShape({smooth:N,smoothMonotone:z,connectNulls:_}),d){var G=l.getCalculationInfo("stackedOnSeries"),F=0;d.useStyle(o.defaults(c.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),G&&(F=gt(G.get("smooth"))),d.setShape({smooth:N,stackedOnSmooth:F,smoothMonotone:z,connectNulls:_}),o.setStatesStylesFromModel(d,e,"areaStyle"),o.getECData(d).seriesIndex=e.seriesIndex,o.toggleHoverEmphasis(d,R,k,C)}var H=this._changePolyState;l.eachItemGraphicEl(function(Y){Y&&(Y.onHoverStateChange=H)}),this._polyline.onHoverStateChange=H,this._data=l,this._coordSys=n,this._stackedOnPoints=I,this._points=h,this._step=A,this._valueOrigin=b;var W=e.get("triggerEvent"),j=e.get("triggerLineEvent");process.env.NODE_ENV!=="production"&&j&&o.warnDeprecated("triggerLineEvent","Use the `triggerEvent` option instead.");var he=j===!0||W===!0||W==="line",re=j===!0||W===!0||W==="area";this.packEventData(e,g,he),d&&this.packEventData(e,d,re)},r.prototype.packEventData=function(e,t,a){o.getECData(t).eventData=a?{componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line",selfType:t===this._polygon?"area":"line"}:null},r.prototype.highlight=function(e,t,a,n){var s=e.getData(),l=o.queryDataIndex(s,n);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var u=s.getLayout("points"),c=s.getItemGraphicEl(l);if(!c){var h=u[l*2],v=u[l*2+1];if(q(h,v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,v))return;var f=e.get("zlevel")||0,p=e.get("z")||0;c=new rt(s,l),c.x=h,c.y=v,c.setZ(f,p);var g=c.getSymbolPath().getTextContent();g&&(g.zlevel=f,g.z=p,g.z2=this._polyline.z2+1),c.__temp=!0,s.setItemGraphicEl(l,c),c.stopSymbolAnimation(!0),this.group.add(c)}c.highlight()}else o.ChartView.prototype.highlight.call(this,e,t,a,n)},r.prototype.downplay=function(e,t,a,n){var s=e.getData(),l=o.queryDataIndex(s,n);if(this._changePolyState("normal"),l!=null&&l>=0){var u=s.getItemGraphicEl(l);u&&(u.__temp?(s.setItemGraphicEl(l,null),this.group.remove(u)):u.downplay())}else o.ChartView.prototype.downplay.call(this,e,t,a,n)},r.prototype._changePolyState=function(e){var t=this._polygon;o.setStatesFlag(this._polyline,e),t&&o.setStatesFlag(t,e)},r.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new kr({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},r.prototype._newPolygon=function(e,t){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new Or({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},r.prototype._initSymbolLabelAnimation=function(e,t,a){var n,s,l=t.getBaseAxis(),u=l.inverse;t.type==="cartesian2d"?(n=l.isHorizontal(),s=!1):t.type==="polar"&&(n=l.dim==="angle",s=!0);var c=e.hostModel,h=c.get("animationDuration");o.isFunction(h)&&(h=h(null));var v=c.get("animationDelay")||0,f=o.isFunction(v)?v(null):v;e.eachItemGraphicEl(function(p,g){var d=p;if(d){var S=[p.x,p.y],m=void 0,y=void 0,b=void 0;if(a)if(s){var D=a,I=t.pointToCoord(S);n?(m=D.startAngle,y=D.endAngle,b=-I[1]/180*Math.PI):(m=D.r0,y=D.r,b=I[0])}else{var x=a;n?(m=x.x,y=x.x+x.width,b=p.x):(m=x.y+x.height,y=x.y,b=p.y)}var _=y===m?0:(b-m)/(y-m);u&&(_=1-_);var w=o.isFunction(v)?v(g):h*_+f,P=d.getSymbolPath(),A=P.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:w}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:w}),P.disableLabelAnimation=!0}})},r.prototype._initOrUpdateEndLabel=function(e,t,a){var n=e.getModel("endLabel");if(Jt(e)){var s=e.getData(),l=this._polyline,u=s.getLayout("points");if(!u){l.removeTextContent(),this._endLabel=null;return}var c=this._endLabel;c||(c=this._endLabel=new o.ZRText({z2:200}),c.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var h=Br(u);h>=0&&(o.setLabelStyle(l,o.getLabelStatesModels(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:h,defaultText:function(v,f,p){return p!=null?o.getDefaultInterpolatedLabel(s,p):o.getDefaultLabel(s,v)},enableTextSetter:!0},Wr(n,t)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},r.prototype._endLabelOnDuring=function(e,t,a,n,s,l,u){var c=this._endLabel,h=this._polyline;if(c){e<1&&n.originalX==null&&(n.originalX=c.x,n.originalY=c.y);var v=a.getLayout("points"),f=a.hostModel,p=f.get("connectNulls"),g=l.get("precision"),d=l.get("distance")||0,S=u.getBaseAxis(),m=S.isHorizontal(),y=S.inverse,b=t.shape,D=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,I=(m?d:0)*(y?-1:1),x=(m?0:-d)*(y?-1:1),_=m?"x":"y",w=Ur(v,D,_),P=w.range,A=P[1]-P[0],M=void 0;if(A>=1){if(A>1&&!p){var L=dt(v,P[0]);c.attr({x:L[0]+I,y:L[1]+x}),s&&(M=f.getRawValue(P[0]))}else{var L=h.getPointOn(D,_);L&&c.attr({x:L[0]+I,y:L[1]+x});var T=f.getRawValue(P[0]),V=f.getRawValue(P[1]);s&&(M=o.interpolateRawValues(a,g,T,V,w.t))}n.lastFrameIndex=P[0]}else{var E=e===1||n.lastFrameIndex>0?P[0]:0,L=dt(v,E);s&&(M=f.getRawValue(E)),c.attr({x:L[0]+I,y:L[1]+x})}if(s){var R=o.labelInner(c);typeof R.setLabelText=="function"&&R.setLabelText(M)}}},r.prototype._doUpdateAnimation=function(e,t,a,n,s,l,u){var c=this._polyline,h=this._polygon,v=e.hostModel,f=Vr(this._data,e,this._stackedOnPoints,t,this._coordSys,a,this._valueOrigin),p=f.current,g=f.stackedOnCurrent,d=f.next,S=f.stackedOnNext;if(s&&(g=ne(f.stackedOnCurrent,f.current,a,s,u),p=ne(f.current,null,a,s,u),S=ne(f.stackedOnNext,f.next,a,s,u),d=ne(f.next,null,a,s,u)),ft(p,d)>3e3||h&&ft(g,S)>3e3){c.stopAnimation(),c.setShape({points:d}),h&&(h.stopAnimation(),h.setShape({points:d,stackedOnPoints:S}));return}c.shape.__points=f.current,c.shape.points=p;var m={shape:{points:d}};f.current!==p&&(m.shape.__points=f.next),c.stopAnimation(),o.updateProps(c,m,v),h&&(h.setShape({points:p,stackedOnPoints:g}),h.stopAnimation(),o.updateProps(h,{shape:{stackedOnPoints:S}},v),c.shape.points!==h.shape.points&&(h.shape.points=c.shape.points));for(var y=[],b=f.status,D=0;D<b.length;D++){var I=b[D].cmd;if(I==="="){var x=e.getItemGraphicEl(b[D].idx1);x&&y.push({el:x,ptIdx:D})}}c.animators&&c.animators.length&&c.animators[0].during(function(){h&&h.dirtyShape();for(var _=c.shape.__points,w=0;w<y.length;w++){var P=y[w].el,A=y[w].ptIdx*2;P.x=_[A],P.y=_[A+1],P.markRedraw()}})},r.prototype.remove=function(e){var t=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(n,s){n.__temp&&(t.remove(n),a.setItemGraphicEl(s,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},r.type="line",r})(o.ChartView);function Xr(i,r){return{seriesType:i,plan:o.createRenderPlanner(),reset:function(e){var t=e.getData(),a=e.coordinateSystem;if(e.pipelineContext,!!a){var n=o.map(a.dimensions,function(v){return t.mapDimension(v)}).slice(0,2),s=n.length,l=t.getCalculationInfo("stackResultDimension");o.isDimensionStacked(t,n[0])&&(n[0]=l),o.isDimensionStacked(t,n[1])&&(n[1]=l);var u=t.getStore(),c=t.getDimensionIndex(n[0]),h=t.getDimensionIndex(n[1]);return s&&{progress:function(v,f){for(var p=v.end-v.start,g=o.createFloat32Array(p*s),d=[],S=[],m=v.start,y=0;m<v.end;m++){var b=void 0;if(s===1){var D=u.get(c,m);b=a.dataToPoint(D,null,S)}else d[0]=u.get(c,m),d[1]=u.get(h,m),b=a.dataToPoint(d,null,S);g[y++]=b[0],g[y++]=b[1]}f.setLayout("points",g),f.setLayout("pointsRange",{start:v.start,end:v.end})}}}}}}var Yr={average:function(i){for(var r=0,e=0,t=0;t<i.length;t++)isNaN(i[t])||(r+=i[t],e++);return e===0?NaN:r/e},sum:function(i){for(var r=0,e=0;e<i.length;e++)r+=i[e]||0;return r},max:function(i){for(var r=-1/0,e=0;e<i.length;e++)i[e]>r&&(r=i[e]);return isFinite(r)?r:NaN},min:function(i){for(var r=1/0,e=0;e<i.length;e++)i[e]<r&&(r=i[e]);return isFinite(r)?r:NaN},nearest:function(i){return i[0]}},Zr=function(i){return Math.round(i.length/2)};function Qt(i){return{seriesType:i,reset:function(r,e,t){var a=r.getData(),n=r.get("sampling"),s=r.coordinateSystem,l=a.count();if(l>10&&s.type==="cartesian2d"&&n){var u=s.getBaseAxis(),c=s.getOtherAxis(u),h=u.getExtent(),v=t.getDevicePixelRatio(),f=Math.abs(h[1]-h[0])*(v||1),p=Math.round(l/f);if(isFinite(p)&&p>1){n==="lttb"?r.setData(a.lttbDownSample(a.mapDimension(c.dim),1/p)):n==="minmax"&&r.setData(a.minmaxDownSample(a.mapDimension(c.dim),1/p));var g=void 0;o.isString(n)?g=Yr[n]:o.isFunction(n)&&(g=n),g&&r.setData(a.downSample(a.mapDimension(c.dim),1/p,g,Zr))}}}}}function er(i){i.registerChartView($r),i.registerSeriesModel(Lr),i.registerLayout(Xr("line")),i.registerVisual({seriesType:"line",reset:function(r){var e=r.getData(),t=r.getModel("lineStyle").getLineStyle();t&&!t.stroke&&(t.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",t)}}),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,Qt("line"))}var Qe=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(e,t){return o.createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getMarkerPosition=function(e,t,a){var n=this.coordinateSystem;if(n&&n.clampData){var s=n.clampData(e),l=n.dataToPoint(s);if(a)o.each(n.getAxes(),function(f,p){if(f.type==="category"&&t!=null){var g=f.getTicksCoords(),d=f.getTickModel().get("alignWithLabel"),S=s[p],m=t[p]==="x1"||t[p]==="y1";if(m&&!d&&(S+=1),g.length<2)return;if(g.length===2){l[p]=f.toGlobalCoord(f.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,D=1,I=0;I<g.length;I++){var x=g[I].coord,_=I===g.length-1?g[I-1].tickValue+D:g[I].tickValue;if(_===S){b=x;break}else if(_<S)y=x;else if(y!=null&&_>S){b=(x+y)/2;break}I===1&&(D=_-g[0].tickValue)}b==null&&(y?y&&(b=g[g.length-1].coord):b=g[0].coord),l[p]=f.toGlobalCoord(b)}});else{var u=this.getData(),c=u.getLayout("offset"),h=u.getLayout("size"),v=n.getBaseAxis().isHorizontal()?0:1;l[v]+=c+h/2}return l}return[NaN,NaN]},r.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},r.type="series.__base_bar__",r.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},r})(o.SeriesModel);o.SeriesModel.registerClass(Qe);var qr=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(){return o.createSeriesData(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},r.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},r.prototype.__preparePipelineContext=function(e,t){var a=o.preparePipelineContext(this,e,t);return a.progressiveRender&&(a.large=!0),a},r.prototype.brushSelector=function(e,t,a){return a.rect(t.getItemLayout(e))},r.type="series."+o.SERIES_TYPE_BAR,r.dependencies=["grid","polar"],r.defaultOption=o.inheritDefaultOption(Qe.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:o.tokens.color.primary,borderWidth:2}},realtimeSort:!1}),r})(Qe),jr=(function(){function i(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return i})(),ze=(function(i){o.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="sausage",t}return r.prototype.getDefaultShape=function(){return new jr},r.prototype.buildPath=function(e,t){var a=t.cx,n=t.cy,s=Math.max(t.r0||0,0),l=Math.max(t.r,0),u=(l-s)*.5,c=s+u,h=t.startAngle,v=t.endAngle,f=t.clockwise,p=Math.PI*2,g=f?v-h<p:h-v<p;g||(h=v-(f?p:-p));var d=Math.cos(h),S=Math.sin(h),m=Math.cos(v),y=Math.sin(v);g?(e.moveTo(d*s+a,S*s+n),e.arc(d*c+a,S*c+n,u,-Math.PI+h,h,!f)):e.moveTo(d*l+a,S*l+n),e.arc(a,n,l,h,v,!f),e.arc(m*c+a,y*c+n,u,v-Math.PI*2,v-Math.PI,!f),s!==0&&e.arc(a,n,s,v,h,f)},r})(o.Path);function Kr(i,r){r=r||{};var e=r.isRoundCap;return function(t,a,n){var s=a.position;if(!s||s instanceof Array)return o.calculateTextPosition(t,a,n);var l=i(s),u=a.distance!=null?a.distance:5,c=this.shape,h=c.cx,v=c.cy,f=c.r,p=c.r0,g=(f+p)/2,d=c.startAngle,S=c.endAngle,m=(d+S)/2,y=e?Math.abs(f-p)/2:0,b=Math.cos,D=Math.sin,I=h+f*b(d),x=v+f*D(d),_="left",w="top";switch(l){case"startArc":I=h+(p-u)*b(m),x=v+(p-u)*D(m),_="center",w="top";break;case"insideStartArc":I=h+(p+u)*b(m),x=v+(p+u)*D(m),_="center",w="bottom";break;case"startAngle":I=h+g*b(d)+De(d,u+y,!1),x=v+g*D(d)+Le(d,u+y,!1),_="right",w="middle";break;case"insideStartAngle":I=h+g*b(d)+De(d,-u+y,!1),x=v+g*D(d)+Le(d,-u+y,!1),_="left",w="middle";break;case"middle":I=h+g*b(m),x=v+g*D(m),_="center",w="middle";break;case"endArc":I=h+(f+u)*b(m),x=v+(f+u)*D(m),_="center",w="bottom";break;case"insideEndArc":I=h+(f-u)*b(m),x=v+(f-u)*D(m),_="center",w="top";break;case"endAngle":I=h+g*b(S)+De(S,u+y,!0),x=v+g*D(S)+Le(S,u+y,!0),_="left",w="middle";break;case"insideEndAngle":I=h+g*b(S)+De(S,-u+y,!0),x=v+g*D(S)+Le(S,-u+y,!0),_="right",w="middle";break;default:return o.calculateTextPosition(t,a,n)}return t=t||{},t.x=I,t.y=x,t.align=_,t.verticalAlign=w,t}}function Jr(i,r,e,t){if(o.isNumber(t)){i.setTextConfig({rotation:t});return}else if(o.isArray(r)){i.setTextConfig({rotation:0});return}var a=i.shape,n=a.clockwise?a.startAngle:a.endAngle,s=a.clockwise?a.endAngle:a.startAngle,l=(n+s)/2,u,c=e(r);switch(c){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=l;break;case"startAngle":case"insideStartAngle":u=n;break;case"endAngle":case"insideEndAngle":u=s;break;default:i.setTextConfig({rotation:0});return}var h=Math.PI*1.5-u;c==="middle"&&h>Math.PI/2&&h<Math.PI*1.5&&(h-=Math.PI),i.setTextConfig({rotation:h})}function De(i,r,e){return r*Math.sin(i)*(e?-1:1)}function Le(i,r,e){return r*Math.cos(i)*(e?1:-1)}function Se(i,r,e){var t=i.get("borderRadius");if(t==null)return e?{cornerRadius:0}:null;o.isArray(t)||(t=[t,t,t,t]);var a=Math.abs(r.r||0-r.r0||0);return{cornerRadius:o.map(t,function(n){return o.parsePercent$1(n,a)})}}var $e=Math.max,Xe=Math.min,Qr=(function(i){o.__extends(r,i);function r(){var e=i.call(this)||this;return e.type=o.SERIES_TYPE_BAR,e._isFirstFrame=!0,e}return r.prototype.render=function(e,t,a,n){this._model=e,this._removeOnRenderedListener(a),this._updateDrawMode(e);var s=e.get("coordinateSystem");s==="cartesian2d"||s==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,a):this._renderNormal(e,t,a,n)):process.env.NODE_ENV!=="production"&&o.warn("Only cartesian2d and polar supported for bar.")},r.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},r.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},r.prototype.eachRendered=function(e){o.traverseElements(this._progressiveEls||this.group,e)},r.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},r.prototype._renderNormal=function(e,t,a,n){var s=this.group,l=e.getData(),u=this._data,c=e.coordinateSystem,h=c.getBaseAxis(),v;c.type==="cartesian2d"?v=h.isHorizontal():c.type==="polar"&&(v=h.dim==="angle");var f=e.isAnimationEnabled()?e:null,p=ea(e,c);p&&this._enableRealtimeSort(p,l,a);var g=e.get("clip",!0)||p,d=c.getArea();s.removeClipPath();var S=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),b=y.get("borderRadius")||0,D=[],I=this._backgroundEls,x=n&&n.isInitSort,_=n&&n.type==="changeAxisOrder";function w(M){var L=Pe[c.type](l,M);if(!L)return null;var T=sa(c,v,L);return T.useStyle(y.getItemStyle()),c.type==="cartesian2d"?T.setShape("r",b):T.setShape("cornerRadius",b),D[M]=T,T}l.diff(u).add(function(M){var L=l.getItemModel(M),T=Pe[c.type](l,M,L);if(T&&(m&&w(M),!(!l.hasValue(M)||!_t[c.type](T)))){var V=!1;g&&(V=mt[c.type](d,T));var E=yt[c.type](e,l,M,T,v,f,h.model,!1,S);p&&(E.forceLabelAnimation=!0),xt(E,l,M,L,T,e,v,c.type==="polar"),x?E.attr({shape:T}):p?St(p,f,E,T,M,v,!1,!1):o.initProps(E,{shape:T},e,M),l.setItemGraphicEl(M,E),s.add(E),E.ignore=V}}).update(function(M,L){var T=l.getItemModel(M),V=Pe[c.type](l,M,T);if(V){if(m){var E=void 0;I.length===0?E=w(L):(E=I[L],E.useStyle(y.getItemStyle()),c.type==="cartesian2d"?E.setShape("r",b):E.setShape("cornerRadius",b),D[M]=E);var R=Pe[c.type](l,M),k=rr(v,R,c);o.updateProps(E,{shape:k},f,M)}var C=u.getItemGraphicEl(L);if(!l.hasValue(M)||!_t[c.type](V)){s.remove(C);return}var O=!1;g&&(O=mt[c.type](d,V),O&&s.remove(C));var N=C&&(C.type==="sector"&&S||C.type==="sausage"&&!S);if(N&&(C&&o.removeElementWithFadeOut(C,e,L),C=null),C?o.saveOldStyle(C):C=yt[c.type](e,l,M,V,v,f,h.model,!0,S),p&&(C.forceLabelAnimation=!0),_){var z=C.getTextContent();if(z){var G=o.labelInner(z);G.prevValue!=null&&(G.prevValue=G.value)}}else xt(C,l,M,T,V,e,v,c.type==="polar");x?C.attr({shape:V}):p?St(p,f,C,V,M,v,!0,_):o.updateProps(C,{shape:V},e,M,null),l.setItemGraphicEl(M,C),C.ignore=O,s.add(C)}}).remove(function(M){var L=u.getItemGraphicEl(M);L&&o.removeElementWithFadeOut(L,e,M)}).execute();var P=this._backgroundGroup||(this._backgroundGroup=new o.Group);P.removeAll();for(var A=0;A<D.length;++A)P.add(D[A]);s.add(P),this._backgroundEls=D,this._data=l},r.prototype._renderLarge=function(e,t,a){this._clear(),wt(e,this.group),this._updateLargeClip(e)},r.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),wt(t,this.group,this._progressiveEls,!0)},r.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&o.createClipPath(e.coordinateSystem,!1,e),a=this.group;t?a.setClipPath(t):a.removeClipPath()},r.prototype._enableRealtimeSort=function(e,t,a){var n=this;if(t.count()){var s=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,a),this._isFirstFrame=!1;else{var l=function(u){var c=t.getItemGraphicEl(u),h=c&&c.shape;return h&&Math.abs(s.isHorizontal()?h.height:h.width)||0};this._onRendered=function(){n._updateSortWithinSameData(t,l,s,a)},a.getZr().on("rendered",this._onRendered)}}},r.prototype._dataSort=function(e,t,a){var n=[];return e.each(e.mapDimension(t.dim),function(s,l){var u=a(l);u=u??NaN,n.push({dataIndex:l,mappedValue:u,ordinalNumber:s})}),n.sort(function(s,l){return l.mappedValue-s.mappedValue}),{ordinalNumbers:o.map(n,function(s){return s.ordinalNumber})}},r.prototype._isOrderChangedWithinSameData=function(e,t,a){for(var n=a.scale,s=e.mapDimension(a.dim),l=Number.MAX_VALUE,u=0,c=n.getOrdinalMeta().categories.length;u<c;++u){var h=e.rawIndexOf(s,n.getRawOrdinalNumber(u)),v=h<0?Number.MIN_VALUE:t(e.indexOfRawIndex(h));if(v>l)return!0;l=v}return!1},r.prototype._isOrderDifferentInView=function(e,t){for(var a=t.scale,n=a.getExtent(),s=Math.max(0,n[0]),l=Math.min(n[1],a.getOrdinalMeta().categories.length-1);s<=l;++s)if(e.ordinalNumbers[s]!==a.getRawOrdinalNumber(s))return!0},r.prototype._updateSortWithinSameData=function(e,t,a,n){if(this._isOrderChangedWithinSameData(e,t,a)){var s=this._dataSort(e,a,t);this._isOrderDifferentInView(s,a)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:s}))}},r.prototype._dispatchInitSort=function(e,t,a){var n=t.baseAxis,s=this._dataSort(e,n,function(l){return e.get(e.mapDimension(t.otherAxis.dim),l)});a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:s})},r.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},r.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},r.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},r.prototype._clear=function(e){var t=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(n){o.removeElementWithFadeOut(n,e,o.getECData(n).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},r.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},r.type=o.SERIES_TYPE_BAR,r})(o.ChartView),mt={cartesian2d:function(i,r){var e=r.width<0?-1:1,t=r.height<0?-1:1;e<0&&(r.x+=r.width,r.width=-r.width),t<0&&(r.y+=r.height,r.height=-r.height);var a=i.x+i.width,n=i.y+i.height,s=$e(r.x,i.x),l=Xe(r.x+r.width,a),u=$e(r.y,i.y),c=Xe(r.y+r.height,n),h=l<s,v=c<u;return r.x=h&&s>a?l:s,r.y=v&&u>n?c:u,r.width=h?0:l-s,r.height=v?0:c-u,e<0&&(r.x+=r.width,r.width=-r.width),t<0&&(r.y+=r.height,r.height=-r.height),h||v},polar:function(i,r){var e=r.r0<=r.r?1:-1;if(e<0){var t=r.r;r.r=r.r0,r.r0=t}var a=Xe(r.r,i.r),n=$e(r.r0,i.r0);r.r=a,r.r0=n;var s=a-n<0;if(e<0){var t=r.r;r.r=r.r0,r.r0=t}return s}},yt={cartesian2d:function(i,r,e,t,a,n,s,l,u){var c=new o.Rect({shape:o.extend({},t),z2:1});if(c.__dataIndex=e,c.name="item",n){var h=c.shape,v=a?"height":"width";h[v]=0}return c},polar:function(i,r,e,t,a,n,s,l,u){var c=!a&&u?ze:o.Sector,h=new c({shape:t,z2:1});h.name="item";var v=tr(a);if(h.calculateTextPosition=Kr(v,{isRoundCap:c===ze}),n){var f=h.shape,p=a?"r":"endAngle",g={};f[p]=a?t.r0:t.startAngle,g[p]=t[p],(l?o.updateProps:o.initProps)(h,{shape:g},n)}return h}};function ea(i,r){var e=i.get("realtimeSort",!0),t=r.getBaseAxis();if(process.env.NODE_ENV!=="production"&&e&&(t.type!=="category"&&o.warn("`realtimeSort` will not work because this bar series is not based on a category axis."),r.type!=="cartesian2d"&&o.warn("`realtimeSort` will not work because this bar series is not on cartesian2d.")),e&&t.type==="category"&&r.type==="cartesian2d")return{baseAxis:t,otherAxis:r.getOtherAxis(t)}}function St(i,r,e,t,a,n,s,l){var u,c;n?(c={x:t.x,width:t.width},u={y:t.y,height:t.height}):(c={y:t.y,height:t.height},u={x:t.x,width:t.width}),l||(s?o.updateProps:o.initProps)(e,{shape:u},r,a,null);var h=r?i.baseAxis.model:null;(s?o.updateProps:o.initProps)(e,{shape:c},h,a)}function bt(i,r){for(var e=0;e<r.length;e++)if(!isFinite(i[r[e]]))return!0;return!1}var ta=["x","y","width","height"],ra=["cx","cy","r","startAngle","endAngle"],_t={cartesian2d:function(i){return!bt(i,ta)},polar:function(i){return!bt(i,ra)}},Pe={cartesian2d:function(i,r,e){var t=i.getItemLayout(r);if(!t)return null;var a=e?ia(e,t):0,n=t.width>0?1:-1,s=t.height>0?1:-1;return{x:t.x+n*a/2,y:t.y+s*a/2,width:t.width-n*a,height:t.height-s*a}},polar:function(i,r,e){var t=i.getItemLayout(r);return{cx:t.cx,cy:t.cy,r0:t.r0,r:t.r,startAngle:t.startAngle,endAngle:t.endAngle,clockwise:t.clockwise}}};function aa(i){return i.startAngle!=null&&i.endAngle!=null&&i.startAngle===i.endAngle}function tr(i){return(function(r){var e=r?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}})(i)}function xt(i,r,e,t,a,n,s,l){var u=r.getItemVisual(e,"style");if(l){if(!n.get("roundCap")){var h=i.shape,v=Se(t.getModel("itemStyle"),h,!0);o.extend(h,v),i.setShape(h)}}else{var c=t.get(["itemStyle","borderRadius"])||0;i.setShape("r",c)}i.useStyle(u);var f=t.getShallow("cursor");f&&i.attr("cursor",f);var p=l?s?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":s?la(a,n.coordinateSystem):ua(a,n.coordinateSystem),g=o.getLabelStatesModels(t);o.setLabelStyle(i,g,{labelFetcher:n,labelDataIndex:e,defaultText:o.getDefaultLabel(n.getData(),e),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:p});var d=i.getTextContent();if(l&&d){var S=t.get(["label","position"]);i.textConfig.inside=S==="middle"?!0:null,Jr(i,S==="outside"?p:S,tr(s),t.get(["label","rotate"]))}o.setLabelValueAnimation(d,g,n.getRawValue(e),function(y){return o.getDefaultInterpolatedLabel(r,y)});var m=t.getModel(["emphasis"]);o.toggleHoverEmphasis(i,m.get("focus"),m.get("blurScope"),m.get("disabled")),o.setStatesStylesFromModel(i,t),aa(a)&&(i.style.fill="none",i.style.stroke="none",o.each(i.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function ia(i,r){var e=i.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var t=i.get(["itemStyle","borderWidth"])||0,a=isNaN(r.width)?Number.MAX_VALUE:Math.abs(r.width),n=isNaN(r.height)?Number.MAX_VALUE:Math.abs(r.height);return Math.min(t,a,n)}var na=(function(){function i(){}return i})(),At=(function(i){o.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="largeBar",t}return r.prototype.getDefaultShape=function(){return new na},r.prototype.buildPath=function(e,t){for(var a=t.points,n=this.baseDimIdx,s=1-this.baseDimIdx,l=[],u=[],c=this.barWidth,h=0;h<a.length;h+=3)u[n]=c,u[s]=a[h+2],l[n]=a[h+n],l[s]=a[h+s],e.rect(l[0],l[1],u[0],u[1])},r})(o.Path);function wt(i,r,e,t){var a=i.getData(),n=a.getLayout("valueAxisHorizontal")?1:0,s=a.getLayout("largeDataIndices"),l=a.getLayout("size"),u=i.getModel("backgroundStyle"),c=a.getLayout("largeBackgroundPoints"),h=t?o.getIncrementalId(i):0;if(c){var v=new At({shape:{points:c},incremental:h,silent:!0,z2:0});v.baseDimIdx=n,v.largeDataIndices=s,v.barWidth=l,v.useStyle(u.getItemStyle()),r.add(v),e&&e.push(v)}var f=new At({shape:{points:a.getLayout("largePoints")},incremental:h,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=n,f.largeDataIndices=s,f.barWidth=l,r.add(f),f.useStyle(a.getVisual("style")),f.style.stroke=null,o.getECData(f).seriesIndex=i.seriesIndex,i.get("silent")||(f.on("mousedown",It),f.on("mousemove",It)),e&&e.push(f)}var It=o.throttle(function(i){var r=this,e=oa(r,i.offsetX,i.offsetY);o.getECData(r).dataIndex=e>=0?e:null},30,!1);function oa(i,r,e){for(var t=i.baseDimIdx,a=1-t,n=i.shape.points,s=i.largeDataIndices,l=[],u=[],c=i.barWidth,h=0,v=n.length/3;h<v;h++){var f=h*3;if(u[t]=c,u[a]=n[f+2],l[t]=n[f+t],l[a]=n[f+a],u[a]<0&&(l[a]+=u[a],u[a]=-u[a]),r>=l[0]&&r<=l[0]+u[0]&&e>=l[1]&&e<=l[1]+u[1])return s[h]}return-1}function rr(i,r,e){if(Ne(e,"cartesian2d")){var t=r,a=e.getArea();return{x:i?t.x:a.x,y:i?a.y:t.y,width:i?t.width:a.width,height:i?a.height:t.height}}else{var a=e.getArea(),n=r;return{cx:a.cx,cy:a.cy,r0:i?a.r0:n.r0,r:i?a.r:n.r,startAngle:i?n.startAngle:0,endAngle:i?n.endAngle:Math.PI*2}}}function sa(i,r,e){var t=i.type==="polar"?o.Sector:o.Rect;return new t({shape:rr(r,e,i),silent:!0,z2:0})}function la(i,r){if(i.height===0){var e=r.getOtherAxis(r.getBaseAxis());return e.inverse?"bottom":"top"}return i.height>0?"bottom":"top"}function ua(i,r){if(i.width===0){var e=r.getOtherAxis(r.getBaseAxis());return e.inverse?"left":"right"}return i.width>=0?"right":"left"}function ca(i){i.registerChartView(Qr),i.registerSeriesModel(qr),i.registerLayout(i.PRIORITY.VISUAL.LAYOUT,o.createCrossSeriesLayoutHandler(o.SERIES_TYPE_BAR)),i.registerLayout(i.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,o.createProgressiveLayout(o.SERIES_TYPE_BAR)),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,Qt(o.SERIES_TYPE_BAR)),i.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(r,e){var t=r.componentType||"series";e.eachComponent({mainType:t,query:r},function(a){r.sortInfo&&a.axis.setCategorySortInfo(r.sortInfo)})}),o.registerBarGridAxisHandlers(i)}function ar(i){return{seriesType:i,reset:function(r,e){var t=e.findComponents({mainType:"legend"});if(!(!t||!t.length)){var a=r.getData();a.filterSelf(function(n){for(var s=a.getName(n),l=0;l<t.length;l++)if(!t[l].isSelected(s))return!1;return!0})}}}}function at(i,r,e){r=o.isArray(r)&&{coordDimensions:r}||o.extend({encodeDefine:i.getEncode()},r);var t=i.getSource(),a=o.prepareSeriesDataSchema(t,r).dimensions,n=new o.SeriesData(a,i);return n.initData(t,e),n}var ir=(function(){function i(r,e){this._getDataWithEncodedVisual=r,this._getRawData=e}return i.prototype.getAllNames=function(){var r=this._getRawData();return r.mapArray(r.getName)},i.prototype.containName=function(r){var e=this._getRawData();return e.indexOfName(r)>=0},i.prototype.indexOfName=function(r){var e=this._getDataWithEncodedVisual();return e.indexOfName(r)},i.prototype.getItemVisual=function(r,e){var t=this._getDataWithEncodedVisual();return t.getItemVisual(r,e)},i})(),le="pie",ha=o.makeInner(),nr=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.init=function(e){i.prototype.init.apply(this,arguments),this.legendVisualProvider=new ir(o.bind(this.getData,this),o.bind(this.getRawData,this)),this._defaultLabelLine(e)},r.prototype.mergeOption=function(){i.prototype.mergeOption.apply(this,arguments)},r.prototype.getInitialData=function(){return at(this,{coordDimensions:["value"],encodeDefaulter:o.curry(o.makeSeriesEncodeForNameBased,this)})},r.prototype.getDataParams=function(e){var t=this.getData(),a=ha(t),n=a.seats;if(!n){var s=[];t.each(t.mapDimension("value"),function(u){s.push(u)}),n=a.seats=o.getPercentSeats(s,t.hostModel.get("percentPrecision"))}var l=i.prototype.getDataParams.call(this,e);return l.percent=n[e]||0,l.$vars.push("percent"),l},r.prototype._defaultLabelLine=function(e){o.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,a=e.emphasis.labelLine;t.show=t.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},r.type="series."+le,r.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"},r})(o.SeriesModel);o.registerLayOutOnCoordSysUsage({fullType:nr.type,getCoord2:function(i){return i.getShallow("center")}});var va=Math.PI/180;function Mt(i,r,e,t,a,n,s,l,u,c){if(i.length<2)return;function h(d){for(var S=d.rB,m=S*S,y=0;y<d.list.length;y++){var b=d.list[y],D=Math.abs(b.label.y-e),I=t+b.len,x=I*I,_=Math.sqrt(Math.abs((1-D*D/m)*x)),w=r+(_+b.len2)*a,P=w-b.label.x,A=b.targetTextWidth-P*a;or(b,A,!0),b.label.x=w}}function v(d){for(var S={list:[],maxY:0},m={list:[],maxY:0},y=0;y<d.length;y++)if(d[y].labelAlignTo==="none"){var b=d[y],D=b.label.y>e?m:S,I=Math.abs(b.label.y-e);if(I>=D.maxY){var x=b.label.x-r-b.len2*a,_=t+b.len,w=Math.abs(x)<_?Math.sqrt(I*I/(1-x*x/_/_)):_;D.rB=w,D.maxY=I}D.list.push(b)}h(S),h(m)}for(var f=i.length,p=0;p<f;p++)if(i[p].position==="outer"&&i[p].labelAlignTo==="labelLine"){var g=i[p].label.x-c;i[p].linePoints[1][0]+=g,i[p].label.x=c}o.shiftLayoutOnXY(i,1,u,u+s)&&v(i)}function pa(i,r,e,t,a,n,s,l){for(var u=[],c=[],h=Number.MAX_VALUE,v=-Number.MAX_VALUE,f=0;f<i.length;f++){var p=i[f].label;Ye(i[f])||(p.x<r?(h=Math.min(h,p.x),u.push(i[f])):(v=Math.max(v,p.x),c.push(i[f])))}for(var f=0;f<i.length;f++){var g=i[f];if(!Ye(g)&&g.linePoints){if(g.labelStyleWidth!=null)continue;var p=g.label,d=g.linePoints,S=void 0;g.labelAlignTo==="edge"?p.x<r?S=d[2][0]-g.labelDistance-s-g.edgeDistance:S=s+a-g.edgeDistance-d[2][0]-g.labelDistance:g.labelAlignTo==="labelLine"?p.x<r?S=h-s-g.bleedMargin:S=s+a-v-g.bleedMargin:p.x<r?S=p.x-s-g.bleedMargin:S=s+a-p.x-g.bleedMargin,g.targetTextWidth=S,or(g,S,!1)}}Mt(c,r,e,t,1,a,n,s,l,v),Mt(u,r,e,t,-1,a,n,s,l,h);for(var f=0;f<i.length;f++){var g=i[f];if(!Ye(g)&&g.linePoints){var p=g.label,d=g.linePoints,m=g.labelAlignTo==="edge",y=p.style.padding,b=y?y[1]+y[3]:0,D=p.style.backgroundColor?0:b,I=g.rect.width+D,x=d[1][0]-d[2][0];m?p.x<r?d[2][0]=s+g.edgeDistance+I+g.labelDistance:d[2][0]=s+a-g.edgeDistance-I-g.labelDistance:(p.x<r?d[2][0]=p.x+g.labelDistance:d[2][0]=p.x-g.labelDistance,d[1][0]=d[2][0]+x),d[1][1]=d[2][1]=p.y}}}function or(i,r,e){if(i.labelStyleWidth==null){var t=i.label,a=t.style,n=i.rect,s=a.backgroundColor,l=a.padding,u=l?l[1]+l[3]:0,c=a.overflow,h=n.width+(s?0:u);if(r<h||e){if(c&&c.match("break")){t.setStyle("backgroundColor",null),t.setStyle("width",r-u);var v=t.getBoundingRect();t.setStyle("width",Math.ceil(v.width)),t.setStyle("backgroundColor",s)}else{var f=r-u,p=r<h?f:e?f>i.unconstrainedWidth?null:f:null;t.setStyle("width",p)}sr(n,t)}}}function sr(i,r){Dt.rect=i,o.computeLabelGeometry(Dt,r,fa)}var fa={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Dt={};function Ye(i){return i.position==="center"}function ga(i){var r=i.getData(),e=[],t,a,n=!1,s=(i.get("minShowLabelAngle")||0)*va,l=r.getLayout("viewRect"),u=r.getLayout("r"),c=l.width,h=l.x,v=l.y,f=l.height;function p(x){x.ignore=!0}function g(x){if(!x.ignore)return!0;for(var _ in x.states)if(x.states[_].ignore===!1)return!0;return!1}r.each(function(x){var _=r.getItemGraphicEl(x),w=_.shape,P=_.getTextContent(),A=_.getTextGuideLine(),M=r.getItemModel(x),L=M.getModel("label"),T=L.get("position")||M.get(["emphasis","label","position"]),V=L.get("distanceToLabelLine"),E=L.get("alignTo"),R=o.parsePercent(L.get("edgeDistance"),c),k=L.get("bleedMargin");k==null&&(k=Math.min(c,f)>200?10:2);var C=M.getModel("labelLine"),O=C.get("length");O=o.parsePercent(O,c);var N=C.get("length2");if(N=o.parsePercent(N,c),Math.abs(w.endAngle-w.startAngle)<s){o.each(P.states,p),P.ignore=!0,A&&(o.each(A.states,p),A.ignore=!0);return}if(g(P)){var z=(w.startAngle+w.endAngle)/2,G=Math.cos(z),F=Math.sin(z),H,W,j,he;t=w.cx,a=w.cy;var re=T==="inside"||T==="inner";if(T==="center")H=w.cx,W=w.cy,he="center";else{var Y=(re?(w.r+w.r0)/2*G:w.r*G)+t,ge=(re?(w.r+w.r0)/2*F:w.r*F)+a;if(H=Y+G*3,W=ge+F*3,!re){var it=Y+G*(O+u-w.r),nt=ge+F*(O+u-w.r),ot=it+(G<0?-1:1)*N,st=nt;E==="edge"?H=G<0?h+R:h+c-R:H=ot+(G<0?-V:V),W=st,j=[[Y,ge],[it,nt],[ot,st]]}he=re?"center":E==="edge"?G>0?"right":"left":G>0?"left":"right"}var de=Math.PI,ve=0,ue=L.get("rotate");if(o.isNumber(ue))ve=ue*(de/180);else if(T==="center")ve=0;else if(ue==="radial"||ue===!0){var Sr=G<0?-z+de:-z;ve=Sr}else if(ue==="tangential"||ue==="tangential-noflip"&&T!=="outside"&&T!=="outer"){var pe=Math.atan2(G,F);pe<0&&(pe=de*2+pe);var br=F>0;br&&ue!=="tangential-noflip"&&(pe=de+pe),ve=pe-de}if(n=!!ve,P.x=H,P.y=W,P.rotation=ve,P.setStyle({verticalAlign:"middle"}),re){P.setStyle({align:he});var Be=P.states.select;Be&&(Be.x+=P.x,Be.y+=P.y)}else{var He=new o.BoundingRect(0,0,0,0);sr(He,P),e.push({label:P,labelLine:A,position:T,len:O,len2:N,minTurnAngle:C.get("minTurnAngle"),maxSurfaceAngle:C.get("maxSurfaceAngle"),surfaceNormal:new o.Point(G,F),linePoints:j,textAlign:he,labelDistance:V,labelAlignTo:E,edgeDistance:R,bleedMargin:k,rect:He,unconstrainedWidth:He.width,labelStyleWidth:P.style.width})}_.setTextConfig({inside:re})}}),!n&&i.get("avoidLabelOverlap")&&pa(e,t,a,u,c,f,h,v);for(var d=0;d<e.length;d++){var S=e[d],m=S.label,y=S.labelLine,b=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:S.textAlign}),b&&(o.each(m.states,p),m.ignore=!0);var D=m.states.select;D&&(D.x+=m.x,D.y+=m.y)}if(y){var I=S.linePoints;b||!I?(o.each(y.states,p),y.ignore=!0):(Ar(I,S.minTurnAngle),wr(I,S.surfaceNormal,S.maxSurfaceAngle),y.setShape({points:I}),m.__hostTarget.textGuideLineConfig={anchor:new o.Point(I[0][0],I[0][1])})}}}var Lt=Math.PI*2,Ce=Math.PI/180,da=o.createSimpleOverallStageHandler(le,ma);function ma(i,r){i.eachSeriesByType(le,function(e){var t=e.getData(),a=t.mapDimension("value"),n=o.getCircleLayout(e,r),s=n.cx,l=n.cy,u=n.r,c=n.r0,h=n.viewRect,v=-e.get("startAngle")*Ce,f=e.get("endAngle"),p=e.get("padAngle")*Ce;f=f==="auto"?v-Lt:-f*Ce;var g=e.get("minAngle")*Ce,d=g+p,S=0;t.each(a,function(R){!isNaN(R)&&S++});var m=t.getSum(a),y=Math.PI/(m||S)*2,b=e.get("clockwise"),D=e.get("roseType"),I=e.get("stillShowZeroSum"),x=t.getDataExtent(a);x[0]=0;var _=b?1:-1,w=[v,f],P=_*p/2;o.normalizeArcAngles(w,!b),v=w[0],f=w[1];var A=lr(e);A.startAngle=v,A.endAngle=f,A.clockwise=b,A.cx=s,A.cy=l,A.r=u,A.r0=c;var M=Math.abs(f-v),L=M,T=0,V=v;if(t.setLayout({viewRect:h,r:u}),t.each(a,function(R,k){var C;if(isNaN(R)){t.setItemLayout(k,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:s,cy:l,r0:c,r:D?NaN:u});return}D!=="area"?C=m===0&&I?y:R*y:C=M/S,C<d?(C=d,L-=d):T+=R;var O=V+_*C,N=0,z=0;p>C?(N=V+_*C/2,z=N):(N=V+P,z=O-P),t.setItemLayout(k,{angle:C,startAngle:N,endAngle:z,clockwise:b,cx:s,cy:l,r0:c,r:D?o.linearMap(R,x,[c,u]):u}),V=O}),L<Lt&&S)if(L<=.001){var E=M/S;t.each(a,function(R,k){if(!isNaN(R)){var C=t.getItemLayout(k);C.angle=E;var O=0,N=0;E<p?(O=v+_*(k+1/2)*E,N=O):(O=v+_*k*E+P,N=v+_*(k+1)*E-P),C.startAngle=O,C.endAngle=N}})}else y=L/T,V=v,t.each(a,function(R,k){if(!isNaN(R)){var C=t.getItemLayout(k),O=C.angle===d?d:R*y,N=0,z=0;O<p?(N=V+_*O/2,z=N):(N=V+P,z=V+_*O-P),C.startAngle=N,C.endAngle=z,V+=_*O}})})}var lr=o.makeInner(),ya=(function(i){o.__extends(r,i);function r(e,t,a){var n=i.call(this)||this;n.z2=2;var s=new o.ZRText;return n.setTextContent(s),n.updateData(e,t,a,!0),n}return r.prototype.updateData=function(e,t,a,n){var s=this,l=e.hostModel,u=e.getItemModel(t),c=u.getModel("emphasis"),h=e.getItemLayout(t),v=o.extend(Se(u.getModel("itemStyle"),h,!0),h);if(isNaN(v.startAngle)){s.setShape(v);return}if(n){s.setShape(v);var f=l.getShallow("animationType");l.ecModel.ssr?(o.initProps(s,{scaleX:0,scaleY:0},l,{dataIndex:t,isFrom:!0}),s.originX=v.cx,s.originY=v.cy):f==="scale"?(s.shape.r=h.r0,o.initProps(s,{shape:{r:h.r}},l,t)):a!=null?(s.setShape({startAngle:a,endAngle:a}),o.initProps(s,{shape:{startAngle:h.startAngle,endAngle:h.endAngle}},l,t)):(s.shape.endAngle=h.startAngle,o.updateProps(s,{shape:{endAngle:h.endAngle}},l,t))}else o.saveOldStyle(s),o.updateProps(s,{shape:v},l,t);s.useStyle(e.getItemVisual(t,"style")),o.setStatesStylesFromModel(s,u);var p=(h.startAngle+h.endAngle)/2,g=l.get("selectedOffset"),d=Math.cos(p)*g,S=Math.sin(p)*g,m=u.getShallow("cursor");m&&s.attr("cursor",m),this._updateLabel(l,e,t),s.ensureState("emphasis").shape=o.extend({r:h.r+(c.get("scale")&&c.get("scaleSize")||0)},Se(c.getModel("itemStyle"),h)),o.extend(s.ensureState("select"),{x:d,y:S,shape:Se(u.getModel(["select","itemStyle"]),h)}),o.extend(s.ensureState("blur"),{shape:Se(u.getModel(["blur","itemStyle"]),h)});var y=s.getTextGuideLine(),b=s.getTextContent();y&&o.extend(y.ensureState("select"),{x:d,y:S}),o.extend(b.ensureState("select"),{x:d,y:S}),o.toggleHoverEmphasis(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},r.prototype._updateLabel=function(e,t,a){var n=this,s=t.getItemModel(a),l=s.getModel("labelLine"),u=t.getItemVisual(a,"style"),c=u&&u.fill,h=u&&u.opacity;o.setLabelStyle(n,o.getLabelStatesModels(s),{labelFetcher:t.hostModel,labelDataIndex:a,inheritColor:c,defaultOpacity:h,defaultText:e.getFormattedLabel(a,"normal")||t.getName(a)});var v=n.getTextContent();n.setTextConfig({position:null,rotation:null}),v.attr({z2:10});var f=s.get(["label","position"]);if(f!=="outside"&&f!=="outer")n.removeTextGuideLine();else{var p=this.getTextGuideLine();p||(p=new o.Polyline,this.setTextGuideLine(p)),Mr(this,Dr(s),{stroke:c,opacity:o.retrieve3(l.get(["lineStyle","opacity"]),h,1)})}},r})(o.Sector),Sa=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=le,e.ignoreLabelLineUpdate=!0,e}return r.prototype.render=function(e,t,a,n){var s=e.getData(),l=this._data,u=this.group,c;if(!l&&s.count()>0){for(var h=s.getItemLayout(0),v=1;isNaN(h&&h.startAngle)&&v<s.count();++v)h=s.getItemLayout(v);h&&(c=h.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),s.count()===0&&e.get("showEmptyCircle")){var f=lr(e),p=new o.Sector({shape:o.clone(f)});p.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=p,u.add(p)}s.diff(l).add(function(g){var d=new ya(s,g,c);s.setItemGraphicEl(g,d),u.add(d)}).update(function(g,d){var S=l.getItemGraphicEl(d);S.updateData(s,g,c),S.off("click"),u.add(S),s.setItemGraphicEl(g,S)}).remove(function(g){var d=l.getItemGraphicEl(g);o.removeElementWithFadeOut(d,e,g)}).execute(),ga(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=s)},r.prototype.dispose=function(){},r.prototype.containPoint=function(e,t){var a=t.getData(),n=a.getItemLayout(0);if(n){var s=e[0]-n.cx,l=e[1]-n.cy,u=Math.sqrt(s*s+l*l);return u<=n.r&&u>=n.r0}},r.type=le,r})(o.ChartView);function ba(i){return{seriesType:i,reset:function(r,e){var t=r.getData();t.filterSelf(function(a){var n=t.mapDimension("value"),s=t.get(n,a);return!(o.isNumber(s)&&!isNaN(s)&&s<0)})}}}function _a(i){i.registerChartView(Sa),i.registerSeriesModel(nr),o.createLegacyDataSelectAction(le,i.registerAction),i.registerLayout(da),i.registerProcessor(ar(le)),i.registerProcessor(ba(le))}function xa(i){var r=i.polar;if(r){o.isArray(r)||(r=[r]);var e=[];o.each(r,function(t,a){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),i.radar=i.radar||[],o.isArray(i.radar)||(i.radar=[i.radar]),i.radar.push(t)):e.push(t)}),i.polar=e}o.each(i.series,function(t){t&&t.type==="radar"&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}var xe="radar",Aa=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.hasSymbolVisual=!0,e}return r.prototype.init=function(e){i.prototype.init.apply(this,arguments),this.legendVisualProvider=new ir(o.bind(this.getData,this),o.bind(this.getRawData,this))},r.prototype.getInitialData=function(e,t){return at(this,{generateCoord:"indicator_",generateCoordCount:1/0})},r.prototype.formatTooltip=function(e,t,a){var n=this.getData(),s=this.coordinateSystem,l=s.getIndicatorAxes(),u=this.getData().getName(e),c=u===""?this.name:u,h=o.retrieveVisualColorForTooltipMarker(this,e);return o.createTooltipMarkup("section",{header:c,sortBlocks:!0,blocks:o.map(l,function(v){var f=n.get(n.mapDimension(v.dim),e);return o.createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:h,name:v.name,value:f,sortParam:f})})})},r.prototype.getTooltipPosition=function(e){if(e!=null){for(var t=this.getData(),a=this.coordinateSystem,n=t.getValues(o.map(a.dimensions,function(c){return t.mapDimension(c)}),e),s=0,l=n.length;s<l;s++)if(!isNaN(n[s])){var u=a.getIndicatorAxes();return a.coordToPoint(u[s].dataToCoord(n[s]),s)}}},r.type="series."+xe,r.dependencies=["radar"],r.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},r})(o.SeriesModel),wa=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=xe,e}return r.prototype.render=function(e,t,a){var n=e.coordinateSystem,s=this.group,l=e.getData(),u=this._data;function c(f,p){var g=f.getItemVisual(p,"symbol")||"circle";if(g!=="none"){var d=o.normalizeSymbolSize(f.getItemVisual(p,"symbolSize")),S=o.createSymbol(g,-1,-1,2,2),m=f.getItemVisual(p,"symbolRotate")||0;return S.attr({style:{strokeNoScale:!0},z2:100,scaleX:d[0]/2,scaleY:d[1]/2,rotation:m*Math.PI/180||0}),S}}function h(f,p,g,d,S,m){g.removeAll();for(var y=0;y<p.length-1;y++){var b=c(d,S);b&&(b.__dimIdx=y,f[y]?(b.setPosition(f[y]),o.graphic[m?"initProps":"updateProps"](b,{x:p[y][0],y:p[y][1]},e,S)):b.setPosition(p[y]),g.add(b))}}function v(f){return o.map(f,function(p){return[n.cx,n.cy]})}l.diff(u).add(function(f){var p=l.getItemLayout(f);if(p){var g=new o.Polygon,d=new o.Polyline,S={shape:{points:p}};g.shape.points=v(p),d.shape.points=v(p),o.initProps(g,S,e,f),o.initProps(d,S,e,f);var m=new o.Group,y=new o.Group;m.add(d),m.add(g),m.add(y),h(d.shape.points,p,y,l,f,!0),l.setItemGraphicEl(f,m)}}).update(function(f,p){var g=u.getItemGraphicEl(p),d=g.childAt(0),S=g.childAt(1),m=g.childAt(2),y={shape:{points:l.getItemLayout(f)}};y.shape.points&&(h(d.shape.points,y.shape.points,m,l,f,!1),o.saveOldStyle(S),o.saveOldStyle(d),o.updateProps(d,y,e),o.updateProps(S,y,e),l.setItemGraphicEl(f,g))}).remove(function(f){s.remove(u.getItemGraphicEl(f))}).execute(),l.eachItemGraphicEl(function(f,p){var g=l.getItemModel(p),d=f.childAt(0),S=f.childAt(1),m=f.childAt(2),y=l.getItemVisual(p,"style"),b=y.fill;s.add(f),d.useStyle(o.defaults(g.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:b})),o.setStatesStylesFromModel(d,g,"lineStyle"),o.setStatesStylesFromModel(S,g,"areaStyle");var D=g.getModel("areaStyle"),I=D.isEmpty()&&D.parentModel.isEmpty();S.ignore=I,o.each(["emphasis","select","blur"],function(_){var w=g.getModel([_,"areaStyle"]),P=w.isEmpty()&&w.parentModel.isEmpty();S.ensureState(_).ignore=P&&I;var A=g.getModel([_,"lineStyle"]).getLineStyle();d.ensureState(_).style=A;var M=w.getAreaStyle();S.ensureState(_).style=M;var L=g.getModel([_,"itemStyle"]).getItemStyle();m.eachChild(function(T){T.ensureState(_).style=o.clone(L)})}),S.useStyle(o.defaults(g.getModel("areaStyle").getAreaStyle(),{fill:b,opacity:.7,decal:y.decal}));var x=g.getModel("emphasis");m.eachChild(function(_){if(_ instanceof o.ZRImage){var w=_.style;_.useStyle(o.extend({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},y))}else _.useStyle(y),_.setColor(b),_.style.strokeNoScale=!0;var P=l.getStore().get(l.getDimensionIndex(_.__dimIdx),p);(P==null||isNaN(P))&&(P=""),o.setLabelStyle(_,o.getLabelStatesModels(g),{labelFetcher:l.hostModel,labelDataIndex:p,labelDimIndex:_.__dimIdx,defaultText:P,inheritColor:b,defaultOpacity:y.opacity})}),o.toggleHoverEmphasis(f,x.get("focus"),x.get("blurScope"),x.get("disabled"))}),this._data=l},r.prototype.remove=function(){this.group.removeAll(),this._data=null},r.type=xe,r})(o.ChartView),me=o.axisDefault.value,_e="radar",ur=_e,Ia=_e,cr=5;function Te(i,r){return o.defaults({show:r},i)}var Ma=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),a=this.get("clockwise"),n=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),c=this.get("axisName"),h=this.get(["axisName","show"]),v=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),p=this.get("triggerEvent"),g=o.map(this.get("indicator")||[],function(d){d.max!=null&&d.max>0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var S=c;d.color!=null&&(S=o.defaults({color:d.color},c));var m=o.merge(o.clone(d),{boundaryGap:e,splitNumber:t,clockwise:a,scale:n,axisLine:s,axisTick:l,axisLabel:u,name:d.text,showName:h,nameLocation:"end",nameGap:f,nameTextStyle:S,triggerEvent:p},!1);if(o.isString(v)){var y=m.name;m.name=v.replace("{value}",y??"")}else o.isFunction(v)&&(m.name=v(m.name,m));var b=new o.Model(m,null,this.ecModel);return o.mixin(b,o.AxisModelCommonMixin.prototype),b.mainType="radar",b.componentIndex=this.componentIndex,b.uid=o.getUID("ec_radar"),b},this);this._indicatorModels=g},r.prototype.getIndicatorModels=function(){return this._indicatorModels},r.type=ur,r.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,clockwise:!1,axisName:{show:!0,color:o.tokens.color.axisLabel},boundaryGap:[0,0],splitNumber:cr,axisNameGap:15,scale:!1,shape:"polygon",axisLine:o.merge({lineStyle:{color:o.tokens.color.neutral20}},me.axisLine),axisLabel:Te(me.axisLabel,!1),axisTick:Te(me.axisTick,!1),splitLine:Te(me.splitLine,!0),splitArea:Te(me.splitArea,!0),indicator:[]},r})(o.ComponentModel),Da=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){var n=this.group;n.removeAll(),this._buildAxes(e,a),this._buildSplitLineAndArea(e)},r.prototype._buildAxes=function(e,t){var a=e.coordinateSystem,n=a.getIndicatorAxes(),s=o.map(n,function(l){var u=l.model.get("showName")?l.name:"",c=new o.AxisBuilder(l.model,t,{axisName:u,position:[a.cx,a.cy],rotation:l.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return c});o.each(s,function(l){l.build(),this.group.add(l.group)},this)},r.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,a=t.getIndicatorAxes();if(!a.length)return;var n=e.get("shape"),s=e.getModel("splitLine"),l=e.getModel("splitArea"),u=s.getModel("lineStyle"),c=l.getModel("areaStyle"),h=s.get("show"),v=l.get("show"),f=u.get("color"),p=c.get("color"),g=o.isArray(f)?f:[f],d=o.isArray(p)?p:[p],S=[],m=[];function y(E,R,k){var C=k%R.length;return E[C]=E[C]||[],C}if(n==="circle")for(var b=a[0].getTicksCoords(),D=t.cx,I=t.cy,x=0;x<b.length;x++){if(h){var _=y(S,g,x);S[_].push(new o.Circle({shape:{cx:D,cy:I,r:b[x].coord}}))}if(v&&x<b.length-1){var _=y(m,d,x);m[_].push(new o.Ring({shape:{cx:D,cy:I,r0:b[x].coord,r:b[x+1].coord}}))}}else for(var w,P=o.map(a,function(E,R){var k=E.getTicksCoords();return w=w==null?k.length-1:Math.min(k.length-1,w),o.map(k,function(C){return t.coordToPoint(C.coord,R)})}),A=[],x=0;x<=w;x++){for(var M=[],L=0;L<a.length;L++)M.push(P[L][x]);if(M[0]?M.push(M[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+x),h){var _=y(S,g,x);S[_].push(new o.Polyline({shape:{points:M}}))}if(v&&A){var _=y(m,d,x-1);m[_].push(new o.Polygon({shape:{points:M.concat(A)}}))}A=M.slice().reverse()}var T=u.getLineStyle(),V=c.getAreaStyle();o.each(m,function(E,R){this.group.add(o.mergePath(E,{style:o.defaults({stroke:"none",fill:d[R%d.length]},V),silent:!0}))},this),o.each(S,function(E,R){this.group.add(o.mergePath(E,{style:o.defaults({fill:"none",stroke:g[R%g.length]},T),silent:!0}))},this)},r.type="radar",r})(o.ComponentView),La=(function(i){o.__extends(r,i);function r(e,t,a){var n=i.call(this,e,t,a)||this;return n.type="value",n.angle=0,n.name="",n}return r})(o.Axis),Pa=(function(){function i(r,e,t){this.type=_e,this.dimensions=[],this._model=r,this._indicatorAxes=o.map(r.getIndicatorModels(),function(a,n){var s="indicator_"+n,l=new La(s,new o.IntervalScale);return l.name=a.get("name"),l.model=a,a.axis=l,this.dimensions.push(s),l},this),this.resize(r,t)}return i.prototype.getIndicatorAxes=function(){return this._indicatorAxes},i.prototype.dataToPoint=function(r,e){var t=this._indicatorAxes[e];return this.coordToPoint(t.dataToCoord(r),e)},i.prototype.coordToPoint=function(r,e){var t=this._indicatorAxes[e],a=t.angle,n=this.cx+r*Math.cos(a),s=this.cy-r*Math.sin(a);return[n,s]},i.prototype.pointToData=function(r){var e=r[0]-this.cx,t=r[1]-this.cy,a=Math.sqrt(e*e+t*t);e/=a,t/=a;for(var n=Math.atan2(-t,e),s=1/0,l,u=-1,c=0;c<this._indicatorAxes.length;c++){var h=this._indicatorAxes[c],v=Math.abs(n-h.angle);v<s&&(l=h,u=c,s=v)}return[u,+(l&&l.coordToData(a))]},i.prototype.resize=function(r,e){var t=o.createBoxLayoutReference(r,e).refContainer,a=r.get("center"),n=r.get("clockwise")||!1,s=Math.min(t.width,t.height)/2;this.cx=o.parsePercent(a[0],t.width)+t.x,this.cy=o.parsePercent(a[1],t.height)+t.y,this.startAngle=r.get("startAngle")*Math.PI/180;var l=r.get("radius");(o.isString(l)||o.isNumber(l))&&(l=[0,l]),this.r0=o.parsePercent(l[0],s),this.r=o.parsePercent(l[1],s);var u=n?-1:1;o.each(this._indicatorAxes,function(c,h){c.setExtent(this.r0,this.r);var v=this.startAngle+u*h*Math.PI*2/this._indicatorAxes.length;v=Math.atan2(Math.sin(v),Math.cos(v)),c.angle=v},this)},i.prototype.update=function(r,e){var t=this._indicatorAxes,a=this._model,n=o.ensureValidSplitNumber(a.get("splitNumber"),cr),s=new o.IntervalScale;s.setExtent(0,n),s.setConfig({interval:1}),o.each(t,function(l){o.scaleRawExtentInfoCreate(l,o.AXIS_EXTENT_INFO_BUILD_FROM_COORD_SYS_UPDATE),o.scaleCalcAlign(l,s)})},i.prototype.convertToPixel=function(r,e,t){return console.warn("Not implemented."),null},i.prototype.convertFromPixel=function(r,e,t){return console.warn("Not implemented."),null},i.prototype.containPoint=function(r){return console.warn("Not implemented."),!1},i.create=function(r,e){var t=[];return r.eachComponent(ur,function(a){var n=new i(a,r,e);t.push(n),a.coordinateSystem=n}),r.eachSeriesByType(Ia,function(a){if(a.get("coordinateSystem")===_e){var n=a.coordinateSystem=t[a.get("radarIndex")||0];n&&o.each(n.getIndicatorAxes(),function(s){o.associateSeriesWithAxis(s,a,_e)})}}),t},i.dimensions=[],i})();function hr(i){i.registerCoordinateSystem("radar",Pa),i.registerComponentModel(Ma),i.registerComponentView(Da),i.registerVisual({seriesType:"radar",reset:function(r){var e=r.getData();e.each(function(t){e.setItemVisual(t,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}var Ca=o.createSimpleOverallStageHandler(xe,Ta);function Ta(i){i.eachSeriesByType(xe,function(r){var e=r.getData(),t=[],a=r.coordinateSystem;if(a){var n=a.getIndicatorAxes();o.each(n,function(s,l){e.each(e.mapDimension(n[l].dim),function(u,c){t[c]=t[c]||[];var h=a.dataToPoint(u,l);t[c][l]=Pt(h)?h:Ct(a)})}),e.each(function(s){var l=o.find(t[s],function(u){return Pt(u)})||Ct(a);t[s].push(l.slice()),e.setItemLayout(s,t[s])})}})}function Pt(i){return!isNaN(i[0])&&!isNaN(i[1])}function Ct(i){return[i.cx,i.cy]}function Ea(i){o.use(hr),i.registerChartView(wa),i.registerSeriesModel(Aa),i.registerLayout(Ca),i.registerProcessor(ar("radar")),i.registerPreprocessor(xa)}var Ae=o.each,Va=o.isObject,Ge=-1,X=(function(){function i(r){var e=r.mappingMethod,t=r.type,a=this.option=o.clone(r);this.type=t,this.mappingMethod=e,this._normalizeData=Oa[e];var n=i.visualHandlers[t];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[e],e==="piecewise"?(Ze(a),ka(a)):e==="category"?a.categories?Ra(a):Ze(a,!0):(o.assert(e!=="linear"||a.dataExtent),Ze(a))}return i.prototype.mapValueToVisual=function(r){var e=this._normalizeData(r);return this._normalizedToVisual(e,r)},i.prototype.getNormalizer=function(){return o.bind(this._normalizeData,this)},i.listVisualTypes=function(){return o.keys(i.visualHandlers)},i.isValidType=function(r){return i.visualHandlers.hasOwnProperty(r)},i.eachVisual=function(r,e,t){o.isObject(r)?o.each(r,e,t):e.call(t,r)},i.mapVisual=function(r,e,t){var a,n=o.isArray(r)?[]:o.isObject(r)?{}:(a=!0,null);return i.eachVisual(r,function(s,l){var u=e.call(t,s,l);a?n=u:n[l]=u}),n},i.retrieveVisuals=function(r){var e={},t;return r&&Ae(i.visualHandlers,function(a,n){r.hasOwnProperty(n)&&(e[n]=r[n],t=!0)}),t?e:null},i.prepareVisualTypes=function(r){if(o.isArray(r))r=r.slice();else if(Va(r)){var e=[];Ae(r,function(t,a){e.push(a)}),r=e}else return[];return r.sort(function(t,a){return a==="color"&&t!=="color"&&t.indexOf("color")===0?1:-1}),r},i.dependsOn=function(r,e){return e==="color"?!!(r&&r.indexOf(e)===0):r===e},i.findPieceIndex=function(r,e,t){for(var a,n=1/0,s=0,l=e.length;s<l;s++){var u=e[s].value;if(u!=null){if(u===r||o.isString(u)&&u===r+"")return s;t&&f(u,s)}}for(var s=0,l=e.length;s<l;s++){var c=e[s],h=c.interval,v=c.close;if(h){if(h[0]===-1/0){if(Ve(v[1],r,h[1]))return s}else if(h[1]===1/0){if(Ve(v[0],h[0],r))return s}else if(Ve(v[0],h[0],r)&&Ve(v[1],r,h[1]))return s;t&&f(h[0],s),t&&f(h[1],s)}}if(t)return r===1/0?e.length-1:r===-1/0?0:a;function f(p,g){var d=Math.abs(p-r);d<n&&(n=d,a=g)}},i.visualHandlers={color:{applyVisual:ye("color"),getColorMapper:function(){var r=this.option;return o.bind(r.mappingMethod==="category"?function(e,t){return!t&&(e=this._normalizeData(e)),be.call(this,e)}:function(e,t,a){var n=!!a;return!t&&(e=this._normalizeData(e)),a=o.fastLerp(e,r.parsedVisual,a),n?a:o.stringify(a,"rgba")},this)},_normalizedToVisual:{linear:function(r){return o.stringify(o.fastLerp(r,this.option.parsedVisual),"rgba")},category:be,piecewise:function(r,e){var t=tt.call(this,e);return t==null&&(t=o.stringify(o.fastLerp(r,this.option.parsedVisual),"rgba")),t},fixed:ce}},colorHue:Ee(function(r,e){return o.modifyHSL(r,e)}),colorSaturation:Ee(function(r,e){return o.modifyHSL(r,null,e)}),colorLightness:Ee(function(r,e){return o.modifyHSL(r,null,null,e)}),colorAlpha:Ee(function(r,e){return o.modifyAlpha(r,e)}),decal:{applyVisual:ye("decal"),_normalizedToVisual:{linear:null,category:be,piecewise:null,fixed:null}},opacity:{applyVisual:ye("opacity"),_normalizedToVisual:et([0,1])},liftZ:{applyVisual:ye("liftZ"),_normalizedToVisual:{linear:ce,category:ce,piecewise:ce,fixed:ce}},symbol:{applyVisual:function(r,e,t){var a=this.mapValueToVisual(r);t("symbol",a)},_normalizedToVisual:{linear:Tt,category:be,piecewise:function(r,e){var t=tt.call(this,e);return t==null&&(t=Tt.call(this,r)),t},fixed:ce}},symbolSize:{applyVisual:ye("symbolSize"),_normalizedToVisual:et([0,1])}},i})();function ka(i){var r=i.pieceList;i.hasSpecialVisual=!1,o.each(r,function(e,t){e.originIndex=t,e.visual!=null&&(i.hasSpecialVisual=!0)})}function Ra(i){var r=i.categories,e=i.categoryMap={},t=i.visual;if(Ae(r,function(s,l){e[s]=l}),!o.isArray(t)){var a=[];o.isObject(t)?Ae(t,function(s,l){var u=e[l];a[u??Ge]=s}):a[Ge]=t,t=vr(i,a)}for(var n=r.length-1;n>=0;n--)t[n]==null&&(delete e[r[n]],r.pop())}function Ze(i,r){var e=i.visual,t=[];o.isObject(e)?Ae(e,function(n){t.push(n)}):e!=null&&t.push(e);var a={color:1,symbol:1};!r&&t.length===1&&!a.hasOwnProperty(i.type)&&(t[1]=t[0]),vr(i,t)}function Ee(i){return{applyVisual:function(r,e,t){var a=this.mapValueToVisual(r);t("color",i(e("color"),a))},_normalizedToVisual:et([0,1])}}function Tt(i){var r=this.option.visual;return r[Math.round(o.linearMap(i,[0,1],[0,r.length-1],!0))]||{}}function ye(i){return function(r,e,t){t(i,this.mapValueToVisual(r))}}function be(i){var r=this.option.visual;return r[this.option.loop&&i!==Ge?i%r.length:i]}function ce(){return this.option.visual[0]}function et(i){return{linear:function(r){return o.linearMap(r,i,this.option.visual,!0)},category:be,piecewise:function(r,e){var t=tt.call(this,e);return t==null&&(t=o.linearMap(r,i,this.option.visual,!0)),t},fixed:ce}}function tt(i){var r=this.option,e=r.pieceList;if(r.hasSpecialVisual){var t=X.findPieceIndex(i,e),a=e[t];if(a&&a.visual)return a.visual[this.type]}}function vr(i,r){return i.visual=r,i.type==="color"&&(i.parsedVisual=o.map(r,function(e){var t=o.parse(e);return!t&&process.env.NODE_ENV!=="production"&&o.warn("'"+e+"' is an illegal color, fallback to '#000000'",!0),t||[0,0,0,1]})),r}var Oa={linear:function(i){return o.linearMap(i,this.option.dataExtent,[0,1],!0)},piecewise:function(i){var r=this.option.pieceList,e=X.findPieceIndex(i,r,!0);if(e!=null)return o.linearMap(e,[0,r.length-1],[0,1],!0)},category:function(i){var r=this.option.categories?this.option.categoryMap[i]:i;return r??Ge},fixed:o.noop};function Ve(i,r,e){return i?r<=e:r<e}var Na=(function(){function i(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return i})(),za=(function(i){o.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="pointer",t}return r.prototype.getDefaultShape=function(){return new Na},r.prototype.buildPath=function(e,t){var a=Math.cos,n=Math.sin,s=t.r,l=t.width,u=t.angle,c=t.x-a(u)*l*(l>=s/3?1:2),h=t.y-n(u)*l*(l>=s/3?1:2);u=t.angle-Math.PI/2,e.moveTo(c,h),e.lineTo(t.x+a(u)*l,t.y+n(u)*l),e.lineTo(t.x+a(t.angle)*s,t.y+n(t.angle)*s),e.lineTo(t.x-a(u)*l,t.y-n(u)*l),e.lineTo(c,h)},r})(o.Path);function Ga(i,r){var e=i.get("center"),t=r.getWidth(),a=r.getHeight(),n=Math.min(t,a),s=o.parsePercent(e[0],r.getWidth()),l=o.parsePercent(e[1],r.getHeight()),u=o.parsePercent(i.get("radius"),n/2);return{cx:s,cy:l,r:u}}function ke(i,r){var e=i==null?"":i+"";return r&&(o.isString(r)?e=r.replace("{value}",e):o.isFunction(r)&&(e=r(i))),e}var Fa=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){this.group.removeAll();var n=e.get(["axisLine","lineStyle","color"]),s=Ga(e,a);this._renderMain(e,t,a,n,s),this._data=e.getData()},r.prototype.dispose=function(){},r.prototype._renderMain=function(e,t,a,n,s){var l=this.group,u=e.get("clockwise"),c=-e.get("startAngle")/180*Math.PI,h=-e.get("endAngle")/180*Math.PI,v=e.getModel("axisLine"),f=v.get("roundCap"),p=f?ze:o.Sector,g=v.get("show"),d=v.getModel("lineStyle"),S=d.get("width"),m=[c,h];o.normalizeArcAngles(m,!u),c=m[0],h=m[1];for(var y=h-c,b=c,D=[],I=0;g&&I<n.length;I++){var x=Math.min(Math.max(n[I][0],0),1);h=c+y*x;var _=new p({shape:{startAngle:b,endAngle:h,cx:s.cx,cy:s.cy,clockwise:u,r0:s.r-S,r:s.r},silent:!0});_.setStyle({fill:n[I][1]}),_.setStyle(d.getLineStyle(["color","width"])),D.push(_),b=h}D.reverse(),o.each(D,function(P){return l.add(P)});var w=function(P){if(P<=0)return n[0][1];var A;for(A=0;A<n.length;A++)if(n[A][0]>=P&&(A===0?0:n[A-1][0])<P)return n[A][1];return n[A-1][1]};this._renderTicks(e,t,a,w,s,c,h,u,S),this._renderTitleAndDetail(e,t,a,w,s),this._renderAnchor(e,s),this._renderPointer(e,t,a,w,s,c,h,u,S)},r.prototype._renderTicks=function(e,t,a,n,s,l,u,c,h){for(var v=this.group,f=s.cx,p=s.cy,g=s.r,d=+e.get("min"),S=+e.get("max"),m=e.getModel("splitLine"),y=e.getModel("axisTick"),b=e.getModel("axisLabel"),D=e.get("splitNumber"),I=y.get("splitNumber"),x=o.parsePercent(m.get("length"),g),_=o.parsePercent(y.get("length"),g),w=l,P=(u-l)/D,A=P/I,M=m.getModel("lineStyle").getLineStyle(),L=y.getModel("lineStyle").getLineStyle(),T=m.get("distance"),V,E,R=0;R<=D;R++){if(V=Math.cos(w),E=Math.sin(w),m.get("show")){var k=T?T+h:h,C=new o.Line({shape:{x1:V*(g-k)+f,y1:E*(g-k)+p,x2:V*(g-x-k)+f,y2:E*(g-x-k)+p},style:M,silent:!0});M.stroke==="auto"&&C.setStyle({stroke:n(R/D)}),v.add(C)}if(b.get("show")){var k=b.get("distance")+T,O=ke(o.round(R*(S-d)/D+d,o.DEFAULT_PRECISION_FOR_ROUNDING_ERROR),b.get("formatter")),N=n(R/D),z=V*(g-x-k)+f,G=E*(g-x-k)+p,F=b.get("rotate"),H=0;F==="radial"?(H=-w+2*Math.PI,H>Math.PI/2&&(H+=Math.PI)):F==="tangential"?H=-w-Math.PI/2:o.isNumber(F)&&(H=F*Math.PI/180),H===0?v.add(new o.ZRText({style:o.createTextStyle(b,{text:O,x:z,y:G,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:V<-.4?"left":V>.4?"right":"center"},{inheritColor:N}),silent:!0})):v.add(new o.ZRText({style:o.createTextStyle(b,{text:O,x:z,y:G,verticalAlign:"middle",align:"center"},{inheritColor:N}),silent:!0,originX:z,originY:G,rotation:H}))}if(y.get("show")&&R!==D){var k=y.get("distance");k=k?k+h:h;for(var W=0;W<=I;W++){V=Math.cos(w),E=Math.sin(w);var j=new o.Line({shape:{x1:V*(g-k)+f,y1:E*(g-k)+p,x2:V*(g-_-k)+f,y2:E*(g-_-k)+p},silent:!0,style:L});L.stroke==="auto"&&j.setStyle({stroke:n((R+W/I)/D)}),v.add(j),w+=A}w-=A}else w+=P}},r.prototype._renderPointer=function(e,t,a,n,s,l,u,c,h){var v=this.group,f=this._data,p=this._progressEls,g=[],d=e.get(["pointer","show"]),S=e.getModel("progress"),m=S.get("show"),y=e.getData(),b=y.mapDimension("value"),D=+e.get("min"),I=+e.get("max"),x=[D,I],_=[l,u];function w(A,M){var L=y.getItemModel(A),T=L.getModel("pointer"),V=o.parsePercent(T.get("width"),s.r),E=o.parsePercent(T.get("length"),s.r),R=e.get(["pointer","icon"]),k=T.get("offsetCenter"),C=o.parsePercent(k[0],s.r),O=o.parsePercent(k[1],s.r),N=T.get("keepAspect"),z;return R?z=o.createSymbol(R,C-V/2,O-E,V,E,null,N):z=new za({shape:{angle:-Math.PI/2,width:V,r:E,x:C,y:O}}),z.rotation=-(M+Math.PI/2),z.x=s.cx,z.y=s.cy,z}function P(A,M){var L=S.get("roundCap"),T=L?ze:o.Sector,V=S.get("overlap"),E=V?S.get("width"):h/y.count(),R=V?s.r-E:s.r-(A+1)*E,k=V?s.r:s.r-A*E,C=new T({shape:{startAngle:l,endAngle:M,cx:s.cx,cy:s.cy,clockwise:c,r0:R,r:k}});return V&&(C.z2=o.linearMap(y.get(b,A),[D,I],[100,0],!0)),C}(m||d)&&(y.diff(f).add(function(A){var M=y.get(b,A);if(d){var L=w(A,l);o.initProps(L,{rotation:-((isNaN(+M)?_[0]:o.linearMap(M,x,_,!0))+Math.PI/2)},e),v.add(L),y.setItemGraphicEl(A,L)}if(m){var T=P(A,l),V=S.get("clip");o.initProps(T,{shape:{endAngle:o.linearMap(M,x,_,V)}},e),v.add(T),o.setCommonECData(e.seriesIndex,y.dataType,A,T),g[A]=T}}).update(function(A,M){var L=y.get(b,A);if(d){var T=f.getItemGraphicEl(M),V=T?T.rotation:l,E=w(A,V);E.rotation=V,o.updateProps(E,{rotation:-((isNaN(+L)?_[0]:o.linearMap(L,x,_,!0))+Math.PI/2)},e),v.add(E),y.setItemGraphicEl(A,E)}if(m){var R=p[M],k=R?R.shape.endAngle:l,C=P(A,k),O=S.get("clip");o.updateProps(C,{shape:{endAngle:o.linearMap(L,x,_,O)}},e),v.add(C),o.setCommonECData(e.seriesIndex,y.dataType,A,C),g[A]=C}}).execute(),y.each(function(A){var M=y.getItemModel(A),L=M.getModel("emphasis"),T=L.get("focus"),V=L.get("blurScope"),E=L.get("disabled"),R=n(o.linearMap(y.get(b,A),x,[0,1],!0));if(d){var k=y.getItemGraphicEl(A),C=y.getItemVisual(A,"style"),O=C.fill;if(k instanceof o.ZRImage){var N=k.style;k.useStyle(o.extend({image:N.image,x:N.x,y:N.y,width:N.width,height:N.height},C))}else k.useStyle(C),k.type!=="pointer"&&k.setColor(O);k.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",R),k.z2EmphasisLift=0,o.setStatesStylesFromModel(k,M),o.toggleHoverEmphasis(k,T,V,E)}if(m){var z=g[A];z.useStyle(y.getItemVisual(A,"style")),z.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),z.style.fill==="auto"&&z.setStyle("fill",R),z.z2EmphasisLift=0,o.setStatesStylesFromModel(z,M),o.toggleHoverEmphasis(z,T,V,E)}}),this._progressEls=g)},r.prototype._renderAnchor=function(e,t){var a=e.getModel("anchor"),n=a.get("show");if(n){var s=a.get("size"),l=a.get("icon"),u=a.get("offsetCenter"),c=a.get("keepAspect"),h=o.createSymbol(l,t.cx-s/2+o.parsePercent(u[0],t.r),t.cy-s/2+o.parsePercent(u[1],t.r),s,s,null,c);h.z2=a.get("showAbove")?1:0,h.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(h)}},r.prototype._renderTitleAndDetail=function(e,t,a,n,s){var l=this,u=e.getData(),c=u.mapDimension("value"),h=+e.get("min"),v=+e.get("max"),f=new o.Group,p=[],g=[],d=e.isAnimationEnabled(),S=e.get(["pointer","showAbove"]);u.diff(this._data).add(function(m){p[m]=new o.ZRText({silent:!0}),g[m]=new o.ZRText({silent:!0})}).update(function(m,y){p[m]=l._titleEls[y],g[m]=l._detailEls[y]}).execute(),u.each(function(m){var y=u.getItemModel(m),b=u.get(c,m),D=new o.Group,I=n(o.linearMap(b,[h,v],[0,1],!0)),x=y.getModel("title");if(x.get("show")){var _=x.get("offsetCenter"),w=s.cx+o.parsePercent(_[0],s.r),P=s.cy+o.parsePercent(_[1],s.r),A=p[m];A.attr({z2:S?0:2,style:o.createTextStyle(x,{x:w,y:P,text:u.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:I})}),D.add(A)}var M=y.getModel("detail");if(M.get("show")){var L=M.get("offsetCenter"),T=s.cx+o.parsePercent(L[0],s.r),V=s.cy+o.parsePercent(L[1],s.r),E=o.parsePercent(M.get("width"),s.r),R=o.parsePercent(M.get("height"),s.r),k=e.get(["progress","show"])?u.getItemVisual(m,"style").fill:I,A=g[m],C=M.get("formatter");A.attr({z2:S?0:2,style:o.createTextStyle(M,{x:T,y:V,text:ke(b,C),width:isNaN(E)?null:E,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:k})}),o.setLabelValueAnimation(A,{normal:M},b,function(N){return ke(N,C)}),d&&o.animateLabelValue(A,m,u,e,{getFormattedLabel:function(N,z,G,F,H,W){return ke(W?W.interpolatedValue:b,C)}}),D.add(A)}f.add(D)}),this.group.add(f),this._titleEls=p,this._detailEls=g},r.type="gauge",r})(o.ChartView),Ha=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.visualStyleAccessPath="itemStyle",e}return r.prototype.getInitialData=function(e,t){return at(this,["value"])},r.type="series.gauge",r.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,o.tokens.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:o.tokens.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:o.tokens.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:o.tokens.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:o.tokens.color.neutral00,borderWidth:0,borderColor:o.tokens.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:o.tokens.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:o.tokens.color.transparent,borderWidth:0,borderColor:o.tokens.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:o.tokens.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},r})(o.SeriesModel);function Ba(i){i.registerChartView(Fa),i.registerSeriesModel(Ha)}var Ua=256,Wa=(function(){function i(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var r=o.platformApi.createCanvas();this.canvas=r}return i.prototype.update=function(r,e,t,a,n,s){var l=this._getBrush(),u=this._getGradient(n,"inRange"),c=this._getGradient(n,"outOfRange"),h=this.pointSize+this.blurSize,v=this.canvas,f=v.getContext("2d"),p=r.length;v.width=e,v.height=t;for(var g=0;g<p;++g){var d=r[g],S=d[0],m=d[1],y=d[2],b=a(y);f.globalAlpha=b,f.drawImage(l,S-h,m-h)}if(!v.width||!v.height)return v;for(var D=f.getImageData(0,0,v.width,v.height),I=D.data,x=0,_=I.length,w=this.minOpacity,P=this.maxOpacity,A=P-w;x<_;){var b=I[x+3]/256,M=Math.floor(b*(Ua-1))*4;if(b>0){var L=s(b)?u:c;b>0&&(b=b*A+w),I[x++]=L[M],I[x++]=L[M+1],I[x++]=L[M+2],I[x++]=L[M+3]*b*256}else x+=4}return f.putImageData(D,0,0),v},i.prototype._getBrush=function(){var r=this._brushCanvas||(this._brushCanvas=o.platformApi.createCanvas()),e=this.pointSize+this.blurSize,t=e*2;r.width=t,r.height=t;var a=r.getContext("2d");return a.clearRect(0,0,t,t),a.shadowOffsetX=t,a.shadowBlur=this.blurSize,a.shadowColor=o.tokens.color.neutral99,a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),r},i.prototype._getGradient=function(r,e){for(var t=this._gradientPixels,a=t[e]||(t[e]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],s=0,l=0;l<256;l++)r[e](l/255,!0,n),a[s++]=n[0],a[s++]=n[1],a[s++]=n[2],a[s++]=n[3];return a},i})();function $a(i,r,e){var t=i[1]-i[0];r=o.map(r,function(s){return{interval:[(s.interval[0]-i[0])/t,(s.interval[1]-i[0])/t]}});var a=r.length,n=0;return function(s){var l;for(l=n;l<a;l++){var u=r[l].interval;if(u[0]<=s&&s<=u[1]){n=l;break}}if(l===a)for(l=n-1;l>=0;l--){var u=r[l].interval;if(u[0]<=s&&s<=u[1]){n=l;break}}return l>=0&&l<a&&e[l]}}function Xa(i,r){var e=i[1]-i[0];return r=[(r[0]-i[0])/e,(r[1]-i[0])/e],function(t){return t>=r[0]&&t<=r[1]}}var Ya=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){var n;if(t.eachComponent("visualMap",function(l){l.eachTargetSeries(function(u){u===e&&(n=l)})}),process.env.NODE_ENV!=="production"&&!n)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var s=e.coordinateSystem;s.type==="cartesian2d"||s.type==="calendar"||s.type==="matrix"?this._renderOnGridLike(e,a,0,e.getData().count()):ht(s)&&this._renderOnGeo(s,e,n,a)},r.prototype.incrementalPrepareRender=function(e,t,a){this.group.removeAll()},r.prototype.incrementalRender=function(e,t,a,n){var s=t.coordinateSystem;s&&(ht(s)?this.render(t,a,n):(this._progressiveEls=[],this._renderOnGridLike(t,n,e.start,e.end,!0)))},r.prototype.eachRendered=function(e){o.traverseElements(this._progressiveEls||this.group,e)},r.prototype._renderOnGridLike=function(e,t,a,n,s){var l=e.coordinateSystem,u=Ne(l,"cartesian2d"),c=Ne(l,"matrix"),h,v,f,p;if(u){var g=l.getAxis("x"),d=l.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(g.type==="category"&&d.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(g.onBand&&d.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}h=o.calcBandWidth(g).w+.5,v=o.calcBandWidth(d).w+.5,f=g.scale.getExtent(),p=d.scale.getExtent()}for(var S=this.group,m=e.getData(),y=e.getModel(["emphasis","itemStyle"]).getItemStyle(),b=e.getModel(["blur","itemStyle"]).getItemStyle(),D=e.getModel(["select","itemStyle"]).getItemStyle(),I=e.get(["itemStyle","borderRadius"]),x=o.getLabelStatesModels(e),_=e.getModel("emphasis"),w=_.get("focus"),P=_.get("blurScope"),A=_.get("disabled"),M=u||c?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],L=a;L<n;L++){var T=void 0,V=m.getItemVisual(L,"style");if(u){var E=m.get(M[0],L),R=m.get(M[1],L);if(isNaN(m.get(M[2],L))||isNaN(E)||isNaN(R)||E<f[0]||E>f[1]||R<p[0]||R>p[1])continue;var k=l.dataToPoint([E,R]);T=new o.Rect({shape:{x:k[0]-h/2,y:k[1]-v/2,width:h,height:v},style:V})}else if(c){var C=l.dataToLayout([m.get(M[0],L),m.get(M[1],L)]).rect;if(o.eqNaN(C.x))continue;T=new o.Rect({z2:1,shape:C,style:V})}else{if(isNaN(m.get(M[1],L)))continue;var O=l.dataToLayout([m.get(M[0],L)]),C=O.contentRect||O.rect;if(o.eqNaN(C.x)||o.eqNaN(C.y))continue;T=new o.Rect({z2:1,shape:C,style:V})}if(m.hasItemOption){var N=m.getItemModel(L),z=N.getModel("emphasis");y=z.getModel("itemStyle").getItemStyle(),b=N.getModel(["blur","itemStyle"]).getItemStyle(),D=N.getModel(["select","itemStyle"]).getItemStyle(),I=N.get(["itemStyle","borderRadius"]),w=z.get("focus"),P=z.get("blurScope"),A=z.get("disabled"),x=o.getLabelStatesModels(N)}T.shape.r=I;var G=e.getRawValue(L),F="-";G&&G[2]!=null&&(F=G[2]+""),o.setLabelStyle(T,x,{labelFetcher:e,labelDataIndex:L,defaultOpacity:V.opacity,defaultText:F}),T.ensureState("emphasis").style=y,T.ensureState("blur").style=b,T.ensureState("select").style=D,o.toggleHoverEmphasis(T,w,P,A),T.incremental=o.getIncrementalId(e,s),s&&(T.states.emphasis.hoverLayer=o.HOVER_LAYER_FOR_INCREMENTAL),S.add(T),m.setItemGraphicEl(L,T),this._progressiveEls&&this._progressiveEls.push(T)}},r.prototype._renderOnGeo=function(e,t,a,n){var s=a.targetVisuals.inRange,l=a.targetVisuals.outOfRange,u=t.getData(),c=this._hmLayer||this._hmLayer||new Wa;c.blurSize=t.get("blurSize"),c.pointSize=t.get("pointSize"),c.minOpacity=t.get("minOpacity"),c.maxOpacity=t.get("maxOpacity");var h=e.getViewRect().clone(),v=e.getRoamTransform();h.applyTransform(v);var f=Math.max(h.x,0),p=Math.max(h.y,0),g=Math.min(h.width+h.x,n.getWidth()),d=Math.min(h.height+h.y,n.getHeight()),S=g-f,m=d-p,y=[u.mapDimension("lng"),u.mapDimension("lat"),u.mapDimension("value")],b=u.mapArray(y,function(_,w,P){var A=e.dataToPoint([_,w]);return A[0]-=f,A[1]-=p,A.push(P),A}),D=a.getExtent(),I=a.type==="visualMap.continuous"?Xa(D,a.option.range):$a(D,a.getPieceList(),a.option.selected);c.update(b,S,m,s.color.getNormalizer(),{inRange:s.color.getColorMapper(),outOfRange:l.color.getColorMapper()},I);var x=new o.ZRImage({style:{width:S,height:m,x:f,y:p,image:c.canvas},silent:!0});this.group.add(x)},r.type="heatmap",r})(o.ChartView),Za=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(e,t){return o.createSeriesData(null,this,{generateCoord:"value"})},r.prototype.preventIncremental=function(){var e=o.CoordinateSystemManager.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},r.type="series.heatmap",r.dependencies=["grid","geo","calendar","matrix"],r.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:o.tokens.color.primary}}},r})(o.SeriesModel);function qa(i){i.registerChartView(Ya),i.registerSeriesModel(Za)}var Et=o.each;function Vt(i){if(i){for(var r in i)if(i.hasOwnProperty(r))return!0}}function kt(i,r,e){var t={};return Et(r,function(n){var s=t[n]=a();Et(i[n],function(l,u){if(X.isValidType(u)){var c={type:u,visual:l};e&&e(c,n),s[u]=new X(c),u==="opacity"&&(c=o.clone(c),c.type="colorAlpha",s.__hidden.__alphaForOpacity=new X(c))}})}),t;function a(){var n=function(){};n.prototype.__hidden=n.prototype;var s=new n;return s}}function ja(i,r,e){var t;o.each(e,function(a){r.hasOwnProperty(a)&&Vt(r[a])&&(t=!0)}),t&&o.each(e,function(a){r.hasOwnProperty(a)&&Vt(r[a])?i[a]=o.clone(r[a]):delete i[a]})}function Ka(i,r,e,t){var a={};return o.each(i,function(n){var s=X.prepareVisualTypes(r[n]);a[n]=s}),{progress:function(s,l){var u;t!=null&&(u=l.getDimensionIndex(t));function c(I){return o.getItemVisualFromData(l,v,I)}function h(I,x){o.setItemVisualFromData(l,v,I,x)}for(var v,f=l.getStore();(v=s.next())!=null;){var p=l.getRawDataItem(v);if(!(p&&p.visualMap===!1))for(var g=t!=null?f.get(u,v):v,d=e(g),S=r[d],m=a[d],y=0,b=m.length;y<b;y++){var D=m[y];S[D]&&S[D].applyVisual(g,c,h)}}}}}var pr={get:function(i,r,e){var t=o.clone((Ja[i]||{})[r]);return e&&o.isArray(t)?t[t.length-1]:t}},Ja={color:{active:["#006edd","#e0ffff"],inactive:[o.tokens.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Rt=X.mapVisual,Qa=X.eachVisual,ei=o.isArray,qe=o.each,ti=o.asc,ri=o.linearMap,Fe=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return r.prototype.init=function(e,t,a){this.mergeDefaultAndTheme(e,a)},r.prototype.optionUpdated=function(e,t){var a=this.option;!t&&ja(a,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},r.prototype.resetVisual=function(e){var t=this.stateList;e=o.bind(e,this),this.controllerVisuals=kt(this.option.controller,t,e),this.targetVisuals=kt(this.option.target,t,e)},r.prototype.getItemSymbol=function(){return null},r.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var a=[];return qe(t,function(u){if(u.seriesIndex!=null)a.push(u.seriesIndex);else if(u.seriesId!=null){var c;e.ecModel.eachSeries(function(h){h.id===u.seriesId&&(c=h)}),c&&a.push(c.componentIndex)}}),a}var n=this.option.seriesId,s=this.option.seriesIndex;s==null&&n==null&&(s="all");var l=o.queryReferringComponents(this.ecModel,"series",{index:s,id:n},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return o.map(l,function(u){return u.componentIndex})},r.prototype.eachTargetSeries=function(e,t){o.each(this.getTargetSeriesIndices(),function(a){var n=this.ecModel.getSeriesByIndex(a);n&&e.call(t,n)},this)},r.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(a){a===e&&(t=!0)}),t},r.prototype.formatValueText=function(e,t,a){var n=this.option,s=n.precision,l=this.dataBound,u=n.formatter,c;a=a||["<",">"],o.isArray(e)&&(e=e.slice(),c=!0);var h=t?e:c?[v(e[0]),v(e[1])]:v(e);if(o.isString(u))return u.replace("{value}",c?h[0]:h).replace("{value2}",c?h[1]:h);if(o.isFunction(u))return c?u(e[0],e[1]):u(e);if(c)return e[0]===l[0]?a[0]+" "+h[1]:e[1]===l[1]?a[1]+" "+h[0]:h[0]+" - "+h[1];return h;function v(f){return f===l[0]?"min":f===l[1]?"max":(+f).toFixed(Math.min(s,20))}},r.prototype.resetExtent=function(){var e=this.option,t=ti([e.min,e.max]);this._dataExtent=t},r.prototype.getDimension=function(e){var t=this,a=this.option.seriesTargets;if(a){var n=o.find(a,function(s){return s.seriesIndex!=null&&s.seriesIndex===e||s.seriesId!=null&&s.seriesId===t.ecModel.getSeriesByIndex(e).id});if(n)return n.dimension}return this.option.dimension},r.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,a=this.getDimension(t);if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,s=n.length-1;s>=0;s--){var l=n[s],u=e.getDimensionInfo(l);if(!u.isCalculationCoord)return u.storeDimIndex}},r.prototype.getExtent=function(){return this._dataExtent.slice()},r.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,a={inRange:t.inRange,outOfRange:t.outOfRange},n=t.target||(t.target={}),s=t.controller||(t.controller={});o.merge(n,a),o.merge(s,a);var l=this.isCategory();u.call(this,n),u.call(this,s),c.call(this,n,"inRange","outOfRange"),h.call(this,s);function u(v){ei(t.color)&&!v.inRange&&(v.inRange={color:t.color.slice().reverse()}),v.inRange=v.inRange||{color:e.get("gradientColor")}}function c(v,f,p){var g=v[f],d=v[p];g&&!d&&(d=v[p]={},qe(g,function(S,m){if(X.isValidType(m)){var y=pr.get(m,"inactive",l);y!=null&&(d[m]=y,m==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function h(v){var f=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,p=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,g=this.get("inactiveColor"),d=this.getItemSymbol(),S=d||"roundRect";qe(this.stateList,function(m){var y=this.itemSize,b=v[m];b||(b=v[m]={color:l?g:[g]}),b.symbol==null&&(b.symbol=f&&o.clone(f)||(l?S:[S])),b.symbolSize==null&&(b.symbolSize=p&&o.clone(p)||(l?y[0]:[y[0],y[0]])),b.symbol=Rt(b.symbol,function(x){return x==="none"?S:x});var D=b.symbolSize;if(D!=null){var I=-1/0;Qa(D,function(x){x>I&&(I=x)}),b.symbolSize=Rt(D,function(x){return ri(x,[0,I],[0,y[0]],!0)})}},this)}},r.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},r.prototype.isCategory=function(){return!!this.option.categories},r.prototype.setSelected=function(e){},r.prototype.getSelected=function(){return null},r.prototype.getValueState=function(e){return null},r.prototype.getVisualMeta=function(e){return null},r.type="visualMap",r.dependencies=["series"],r.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:o.tokens.color.transparent,borderColor:o.tokens.color.borderTint,contentColor:o.tokens.color.theme[0],inactiveColor:o.tokens.color.disabled,borderWidth:0,padding:o.tokens.size.m,textGap:10,precision:0,textStyle:{color:o.tokens.color.secondary}},r})(o.ComponentModel),Ot=[20,140],ai=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.optionUpdated=function(e,t){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},r.prototype.resetItemSize=function(){i.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Ot[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Ot[1])},r.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):o.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},r.prototype.completeVisualOption=function(){i.prototype.completeVisualOption.apply(this,arguments),o.each(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},r.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},r.prototype.getSelected=function(){var e=this.getExtent(),t=o.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},r.prototype.getValueState=function(e){var t=this.option.range,a=this.getExtent(),n=o.retrieve2(this.option.unboundedRange,!0);return(n&&t[0]<=a[0]||t[0]<=e)&&(n&&t[1]>=a[1]||e<=t[1])?"inRange":"outOfRange"},r.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(a){var n=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){e[0]<=l&&l<=e[1]&&n.push(u)},this),t.push({seriesId:a.id,dataIndex:n})},this),t},r.prototype.getVisualMeta=function(e){var t=Nt(this,"outOfRange",this.getExtent()),a=Nt(this,"inRange",this.option.range.slice()),n=[];function s(p,g){n.push({value:p,color:e(p,g)})}for(var l=0,u=0,c=a.length,h=t.length;u<h&&(!a.length||t[u]<=a[0]);u++)t[u]<a[l]&&s(t[u],"outOfRange");for(var v=1;l<c;l++,v=0)v&&n.length&&s(a[l],"outOfRange"),s(a[l],"inRange");for(var v=1;u<h;u++)(!a.length||a[a.length-1]<t[u])&&(v&&(n.length&&s(n[n.length-1].value,"outOfRange"),v=0),s(t[u],"outOfRange"));var f=n.length;return{stops:n,outerColors:[f?n[0].color:"transparent",f?n[f-1].color:"transparent"]}},r.type="visualMap.continuous",r.defaultOption=o.inheritDefaultOption(Fe.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:o.tokens.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:o.tokens.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:o.tokens.color.shadow}}),r})(Fe);function Nt(i,r,e){if(e[0]===e[1])return e.slice();for(var t=200,a=(e[1]-e[0])/t,n=e[0],s=[],l=0;l<=t&&n<e[1];l++)s.push(n),n+=a;return s.push(e[1]),s}var fr=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return r.prototype.init=function(e,t){this.ecModel=e,this.api=t},r.prototype.render=function(e,t,a,n){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,t,a,n)},r.prototype.renderBackground=function(e){var t=this.visualMapModel,a=o.normalizeCssArray(t.get("padding")||0),n=e.getBoundingRect();e.add(new o.Rect({z2:-1,silent:!0,shape:{x:n.x-a[3],y:n.y-a[0],width:n.width+a[3]+a[1],height:n.height+a[0]+a[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},r.prototype.getControllerVisual=function(e,t,a){a=a||{};var n=a.forceState,s=this.visualMapModel,l={};if(t==="color"){var u=s.get("contentColor");l.color=u}function c(p){return l[p]}function h(p,g){l[p]=g}var v=s.controllerVisuals[n||s.getValueState(e)],f=X.prepareVisualTypes(v);return o.each(f,function(p){var g=v[p];a.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",g=v.__alphaForOpacity),X.dependsOn(p,t)&&g&&g.applyVisual(e,c,h)}),l[t]},r.prototype.positionGroup=function(e){var t=this.visualMapModel,a=this.api,n=o.createBoxLayoutReference(t,a).refContainer;o.positionElement(e,t.getBoxLayoutParams(),n)},r.prototype.doRender=function(e,t,a,n){},r.type="visualMap",r})(o.ComponentView),zt=[["left","right","width"],["top","bottom","height"]];function gr(i,r,e){var t=i.option,a=t.align;if(a!=null&&a!=="auto")return a;for(var n={width:r.getWidth(),height:r.getHeight()},s=t.orient==="horizontal"?1:0,l=zt[s],u=[0,null,10],c={},h=0;h<3;h++)c[zt[1-s][h]]=u[h],c[l[h]]=h===2?e[0]:t[l[h]];var v=[["x","width",3],["y","height",0]][s],f=o.getLayoutRect(c,n,t.padding);return l[(f.margin[v[2]]||0)+f[v[0]]+f[v[1]]*.5<n[v[1]]*.5?0:1]}function Re(i,r){return o.each(i||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(r?r.componentIndex:"")}),i}var K=o.linearMap,ii=o.each,Gt=Math.min,je=Math.max,ni=12,oi=6,si=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return r.prototype.init=function(e,t){i.prototype.init.call(this,e,t),this._hoverLinkFromSeriesMouseOver=o.bind(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=o.bind(this._hideIndicator,this)},r.prototype.doRender=function(e,t,a,n){(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},r.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var a=e.get("text");this._renderEndsText(t,a,0),this._renderEndsText(t,a,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},r.prototype._renderEndsText=function(e,t,a){if(t){var n=t[1-a];n=n!=null?n+"":"";var s=this.visualMapModel,l=s.get("textGap"),u=s.itemSize,c=this._shapes.mainGroup,h=this._applyTransform([u[0]/2,a===0?-l:u[1]+l],c),v=this._applyTransform(a===0?"bottom":"top",c),f=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new o.ZRText({style:o.createTextStyle(p,{x:h[0],y:h[1],verticalAlign:p.get("verticalAlign")||(f==="horizontal"?"middle":v),align:p.get("align")||(f==="horizontal"?v:"center"),text:n})}))}},r.prototype._renderBar=function(e){var t=this.visualMapModel,a=this._shapes,n=t.itemSize,s=this._orient,l=this._useHandle,u=gr(t,this.api,n),c=a.mainGroup=this._createBarGroup(u),h=new o.Group;c.add(h),h.add(a.outOfRange=Ft()),h.add(a.inRange=Ft(null,l?Bt(this._orient):null,o.bind(this._dragHandle,this,"all",!1),o.bind(this._dragHandle,this,"all",!0))),h.setClipPath(new o.Rect({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var v=t.textStyleModel.getTextRect("国"),f=je(v.width,v.height);l&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(t,c,0,n,f,s),this._createHandle(t,c,1,n,f,s)),this._createIndicator(t,c,n,f,s),e.add(c)},r.prototype._createHandle=function(e,t,a,n,s,l){var u=o.bind(this._dragHandle,this,a,!1),c=o.bind(this._dragHandle,this,a,!0),h=o.parsePercent$1(e.get("handleSize"),n[0]),v=o.createSymbol(e.get("handleIcon"),-h/2,-h/2,h,h,null,!0),f=Bt(this._orient);v.attr({cursor:f,draggable:!0,drift:u,ondragend:c,onmousemove:function(m){o.stop(m.event)}}),v.x=n[0]/2,v.useStyle(e.getModel("handleStyle").getItemStyle()),v.setStyle({strokeNoScale:!0,strokeFirst:!0}),v.style.lineWidth*=2,v.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),o.setAsHighDownDispatcher(v,!0),t.add(v);var p=this.visualMapModel.textStyleModel,g=new o.ZRText({cursor:f,draggable:!0,drift:u,onmousemove:function(m){o.stop(m.event)},ondragend:c,style:o.createTextStyle(p,{x:0,y:0,text:""})});g.ensureState("blur").style={opacity:.1},g.stateTransition={duration:200},this.group.add(g);var d=[h,0],S=this._shapes;S.handleThumbs[a]=v,S.handleLabelPoints[a]=d,S.handleLabels[a]=g},r.prototype._createIndicator=function(e,t,a,n,s){var l=o.parsePercent$1(e.get("indicatorSize"),a[0]),u=o.createSymbol(e.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);u.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var c=e.getModel("indicatorStyle").getItemStyle();if(u instanceof o.ZRImage){var h=u.style;u.useStyle(o.extend({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},c))}else u.useStyle(c);t.add(u);var v=this.visualMapModel.textStyleModel,f=new o.ZRText({silent:!0,invisible:!0,style:o.createTextStyle(v,{x:0,y:0,text:""})});this.group.add(f);var p=[(s==="horizontal"?n/2:oi)+a[0]/2,0],g=this._shapes;g.indicator=u,g.indicatorLabel=f,g.indicatorLabelPoint=p,this._firstShowIndicator=!0},r.prototype._dragHandle=function(e,t,a,n){if(this._useHandle){if(this._dragging=!t,!t){var s=this._applyTransform([a,n],this._shapes.mainGroup,!0);this._updateInterval(e,s[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():Ht(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},r.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),a=e.getExtent(),n=[0,e.itemSize[1]];this._handleEnds=[K(t[0],a,n,!0),K(t[1],a,n,!0)]},r.prototype._updateInterval=function(e,t){t=t||0;var a=this.visualMapModel,n=this._handleEnds,s=[0,a.itemSize[1]];o.sliderMove(t,n,s,e,0);var l=a.getExtent();this._dataInterval=[K(n[0],s,l,!0),K(n[1],s,l,!0)]},r.prototype._updateView=function(e){var t=this.visualMapModel,a=t.getExtent(),n=this._shapes,s=[0,t.itemSize[1]],l=e?s:this._handleEnds,u=this._createBarVisual(this._dataInterval,a,l,"inRange"),c=this._createBarVisual(a,a,s,"outOfRange");n.inRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),n.outOfRange.setStyle({fill:c.barColor}).setShape("points",c.barPoints),this._updateHandle(l,u)},r.prototype._createBarVisual=function(e,t,a,n){var s={forceState:n,convertOpacityToAlpha:!0},l=this._makeColorGradient(e,s),u=[this.getControllerVisual(e[0],"symbolSize",s),this.getControllerVisual(e[1],"symbolSize",s)],c=this._createBarPoints(a,u);return{barColor:new o.LinearGradient(0,0,0,1,l),barPoints:c,handlesColor:[l[0].color,l[l.length-1].color]}},r.prototype._makeColorGradient=function(e,t){var a=100,n=[],s=(e[1]-e[0])/a;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var l=1;l<a;l++){var u=e[0]+s*l;if(u>e[1])break;n.push({color:this.getControllerVisual(u,"color",t),offset:l/a})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},r.prototype._createBarPoints=function(e,t){var a=this.visualMapModel.itemSize;return[[a[0]-t[0],e[0]],[a[0],e[0]],[a[0],e[1]],[a[0]-t[1],e[1]]]},r.prototype._createBarGroup=function(e){var t=this._orient,a=this.visualMapModel.get("inverse");return new o.Group(t==="horizontal"&&!a?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:t==="horizontal"&&a?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:t==="vertical"&&!a?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},r.prototype._updateHandle=function(e,t){if(this._useHandle){var a=this._shapes,n=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels,u=n.itemSize,c=n.getExtent(),h=this._applyTransform("left",a.mainGroup);ii([0,1],function(v){var f=s[v];f.setStyle("fill",t.handlesColor[v]),f.y=e[v];var p=K(e[v],[0,u[1]],c,!0),g=this.getControllerVisual(p,"symbolSize");f.scaleX=f.scaleY=g/u[0],f.x=u[0]-g/2;var d=o.applyTransform$1(a.handleLabelPoints[v],o.getTransform(f,this.group));if(this._orient==="horizontal"){var S=h==="left"||h==="top"?(u[0]-g)/2:(u[0]-g)/-2;d[1]+=S}l[v].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},r.prototype._showIndicator=function(e,t,a,n){var s=this.visualMapModel,l=s.getExtent(),u=s.itemSize,c=[0,u[1]],h=this._shapes,v=h.indicator;if(v){v.attr("invisible",!1);var f={convertOpacityToAlpha:!0},p=this.getControllerVisual(e,"color",f),g=this.getControllerVisual(e,"symbolSize"),d=K(e,l,c,!0),S=u[0]-g/2,m={x:v.x,y:v.y};v.y=d,v.x=S;var y=o.applyTransform$1(h.indicatorLabelPoint,o.getTransform(v,this.group)),b=h.indicatorLabel;b.attr("invisible",!1);var D=this._applyTransform("left",h.mainGroup),I=this._orient,x=I==="horizontal";b.setStyle({text:(a||"")+s.formatValueText(t),verticalAlign:x?D:"middle",align:x?"center":D});var _={x:S,y:d,style:{fill:p}},w={style:{x:y[0],y:y[1]}};if(s.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var P={duration:100,easing:"cubicInOut",additive:!0};v.x=m.x,v.y=m.y,v.animateTo(_,P),b.animateTo(w,P)}else v.attr(_),b.attr(w);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this.api.enterBlur(A[M])}},r.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var a=e.visualMapModel.itemSize,n=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);n[1]=Gt(je(0,n[1]),a[1]),e._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=a[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},r.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},r.prototype._doHoverLinkToSeries=function(e,t){var a=this.visualMapModel,n=a.itemSize;if(a.option.hoverLink){var s=[0,n[1]],l=a.getExtent();e=Gt(je(s[0],e),s[1]);var u=li(a,l,s),c=[e-u,e+u],h=K(e,s,l,!0),v=[K(c[0],s,l,!0),K(c[1],s,l,!0)];c[0]<s[0]&&(v[0]=-1/0),c[1]>s[1]&&(v[1]=1/0),t&&(v[0]===-1/0?this._showIndicator(h,v[1],"< ",u):v[1]===1/0?this._showIndicator(h,v[0],"> ",u):this._showIndicator(h,h,"≈ ",u));var f=this._hoverLinkDataIndices,p=[];(t||Ht(a))&&(p=this._hoverLinkDataIndices=a.findTargetDataIndices(v));var g=o.compressBatches(f,p);this._dispatchHighDown("downplay",Re(g[0],a)),this._dispatchHighDown("highlight",Re(g[1],a))}},r.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(o.findEventDispatcher(e.target,function(u){var c=o.getECData(u);if(c.dataIndex!=null)return t=c,!0},!0),!!t){var a=this.ecModel.getSeriesByIndex(t.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(a)){var s=a.getData(t.dataType),l=s.getStore().get(n.getDataDimensionIndex(s),t.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},r.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var a=0;a<t.length;a++)this.api.leaveBlur(t[a])},r.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Re(e,this.visualMapModel)),e.length=0},r.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},r.prototype._applyTransform=function(e,t,a,n){var s=o.getTransform(t,n?null:this.group);return o.isArray(e)?o.applyTransform$1(e,s,a):o.transformDirection(e,s,a)},r.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},r.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},r.type="visualMap.continuous",r})(fr);function Ft(i,r,e,t){return new o.Polygon({shape:{points:i},draggable:!!e,cursor:r,drift:e,onmousemove:function(a){o.stop(a.event)},ondragend:t})}function li(i,r,e){var t=ni/2,a=i.get("hoverLinkDataSize");return a&&(t=K(a,r,e,!0)/2),t}function Ht(i){var r=i.get("hoverLinkOnHandle");return!!(r??i.get("realtime"))}function Bt(i){return i==="vertical"?"ns-resize":"ew-resize"}var ui={type:"selectDataRange",event:"dataRangeSelected",update:"update"},ci=function(i,r){r.eachComponent({mainType:"visualMap",query:i},function(e){e.setSelected(i.selected)})},hi=[{createOnAllSeries:!0,reset:function(i,r){var e=[];return r.eachComponent("visualMap",function(t){var a=i.pipelineContext;!t.isTargetSeries(i)||a&&a.large||e.push(Ka(t.stateList,t.targetVisuals,o.bind(t.getValueState,t),t.getDataDimensionIndex(i.getData())))}),e}},{createOnAllSeries:!0,reset:function(i,r){var e=i.getData(),t=[];r.eachComponent("visualMap",function(a){if(a.isTargetSeries(i)){var n=a.getVisualMeta(o.bind(vi,null,i,a))||{stops:[],outerColors:[]},s=a.getDataDimensionIndex(e);s>=0&&(n.dimension=s,t.push(n))}}),i.getData().setVisual("visualMeta",t)}}];function vi(i,r,e,t){for(var a=r.targetVisuals[t],n=X.prepareVisualTypes(a),s={color:o.getVisualFromData(i.getData(),"color")},l=0,u=n.length;l<u;l++){var c=n[l],h=a[c==="opacity"?"__alphaForOpacity":c];h&&h.applyVisual(e,v,f)}return s.color;function v(p){return s[p]}function f(p,g){s[p]=g}}var Ke=o.each;function pi(i){var r=i&&i.visualMap;o.isArray(r)||(r=r?[r]:[]),Ke(r,function(e){if(e){fe(e,"splitList")&&!fe(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;if(t&&o.isArray(t)&&Ke(t,function(n){o.isObject(n)&&(fe(n,"start")&&!fe(n,"min")&&(n.min=n.start),fe(n,"end")&&!fe(n,"max")&&(n.max=n.end))}),process.env.NODE_ENV!=="production"){var a=e.seriesTargets;a&&o.isArray(a)&&Ke(a,function(n){(!o.isObject(n)||n.dimension==null)&&console.warn("Each seriesTarget should have a dimension property"),n.seriesIndex==null&&n.seriesId==null&&console.warn("Each seriesTarget should have either seriesIndex or seriesId")})}}})}function fe(i,r){return i&&i.hasOwnProperty&&i.hasOwnProperty(r)}var Ut=!1;function dr(i){Ut||(Ut=!0,i.registerSubTypeDefaulter("visualMap",function(r){return!r.categories&&(!(r.pieces?r.pieces.length>0:r.splitNumber>0)||r.calculable)?"continuous":"piecewise"}),i.registerAction(ui,ci),o.each(hi,function(r){i.registerVisual(i.PRIORITY.VISUAL.COMPONENT,r)}),i.registerPreprocessor(pi))}function fi(i){i.registerComponentModel(ai),i.registerComponentView(si),dr(i)}var gi=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e._pieceList=[],e}return r.prototype.optionUpdated=function(e,t){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],di[this._mode].call(this,this._pieceList),this._resetSelected(e,t);var n=this.option.categories;this.resetVisual(function(s,l){a==="categories"?(s.mappingMethod="category",s.categories=o.clone(n)):(s.dataExtent=this.getExtent(),s.mappingMethod="piecewise",s.pieceList=o.map(this._pieceList,function(u){return u=o.clone(u),l!=="inRange"&&(u.visual=null),u}))})},r.prototype.completeVisualOption=function(){var e=this.option,t={},a=X.listVisualTypes(),n=this.isCategory();o.each(e.pieces,function(l){o.each(a,function(u){l.hasOwnProperty(u)&&(t[u]=1)})}),o.each(t,function(l,u){var c=!1;o.each(this.stateList,function(h){c=c||s(e,h,u)||s(e.target,h,u)},this),!c&&o.each(this.stateList,function(h){(e[h]||(e[h]={}))[u]=pr.get(u,h==="inRange"?"active":"inactive",n)})},this);function s(l,u,c){return l&&l[u]&&l[u].hasOwnProperty(c)}i.prototype.completeVisualOption.apply(this,arguments)},r.prototype._resetSelected=function(e,t){var a=this.option,n=this._pieceList,s=(t?a:e).selected||{};if(a.selected=s,o.each(n,function(u,c){var h=this.getSelectedMapKey(u);s.hasOwnProperty(h)||(s[h]=!0)},this),a.selectedMode==="single"){var l=!1;o.each(n,function(u,c){var h=this.getSelectedMapKey(u);s[h]&&(l?s[h]=!1:l=!0)},this)}},r.prototype.getItemSymbol=function(){return this.get("itemSymbol")},r.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},r.prototype.getPieceList=function(){return this._pieceList},r.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},r.prototype.setSelected=function(e){this.option.selected=o.clone(e)},r.prototype.getValueState=function(e){var t=X.findPieceIndex(e,this._pieceList);return t!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},r.prototype.findTargetDataIndices=function(e){var t=[],a=this._pieceList;return this.eachTargetSeries(function(n){var s=[],l=n.getData();l.each(this.getDataDimensionIndex(l),function(u,c){var h=X.findPieceIndex(u,a);h===e&&s.push(c)},this),t.push({seriesId:n.id,dataIndex:s})},this),t},r.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var a=e.interval||[];t=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return t},r.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],a=["",""],n=this;function s(h,v){var f=n.getRepresentValue({interval:h});v||(v=n.getValueState(f));var p=e(f,v);h[0]===-1/0?a[0]=p:h[1]===1/0?a[1]=p:t.push({value:h[0],color:p},{value:h[1],color:p})}var l=this._pieceList.slice();if(!l.length)l.push({interval:[-1/0,1/0]});else{var u=l[0].interval[0];u!==-1/0&&l.unshift({interval:[-1/0,u]}),u=l[l.length-1].interval[1],u!==1/0&&l.push({interval:[u,1/0]})}var c=-1/0;return o.each(l,function(h){var v=h.interval;v&&(v[0]>c&&s([c,v[0]],"outOfRange"),s(v.slice()),c=v[1])},this),{stops:t,outerColors:a}},r.type="visualMap.piecewise",r.defaultOption=o.inheritDefaultOption(Fe.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),r})(Fe),di={splitNumber:function(i){var r=this.option,e=Math.min(r.precision,20),t=this.getExtent(),a=r.splitNumber;a=Math.max(parseInt(a,10),1),r.splitNumber=a;for(var n=(t[1]-t[0])/a;+n.toFixed(e)!==n&&e<5;)e++;r.precision=e,n=+n.toFixed(e),r.minOpen&&i.push({interval:[-1/0,t[0]],close:[0,0]});for(var s=0,l=t[0];s<a;l+=n,s++){var u=s===a-1?t[1]:l+n;i.push({interval:[l,u],close:[1,1]})}r.maxOpen&&i.push({interval:[t[1],1/0],close:[0,0]}),o.reformIntervals(i),o.each(i,function(c,h){c.index=h,c.text=this.formatValueText(c.interval)},this)},categories:function(i){var r=this.option;o.each(r.categories,function(e){i.push({text:this.formatValueText(e,!0),value:e})},this),Wt(r,i)},pieces:function(i){var r=this.option;o.each(r.pieces,function(e,t){o.isObject(e)||(e={value:e});var a={text:"",index:t};if(e.label!=null&&(a.text=e.label),e.hasOwnProperty("value")){var n=a.value=e.value;a.interval=[n,n],a.close=[1,1]}else{for(var s=a.interval=[],l=a.close=[0,0],u=[1,0,1],c=[-1/0,1/0],h=[],v=0;v<2;v++){for(var f=[["gte","gt","min"],["lte","lt","max"]][v],p=0;p<3&&s[v]==null;p++)s[v]=e[f[p]],l[v]=u[p],h[v]=p===2;s[v]==null&&(s[v]=c[v])}h[0]&&s[1]===1/0&&(l[0]=0),h[1]&&s[0]===-1/0&&(l[1]=0),process.env.NODE_ENV!=="production"&&s[0]>s[1]&&console.warn("Piece "+t+"is illegal: "+s+" lower bound should not greater then uppper bound."),s[0]===s[1]&&l[0]&&l[1]&&(a.value=s[0])}a.visual=X.retrieveVisuals(e),i.push(a)},this),Wt(r,i),o.reformIntervals(i),o.each(i,function(e){var t=e.close,a=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,a)},this)}};function Wt(i,r){var e=i.inverse;(i.orient==="vertical"?!e:e)&&r.reverse()}var mi=(function(i){o.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,a=t.get("textGap"),n=t.textStyleModel,s=this._getItemAlign(),l=t.itemSize,u=this._getViewData(),c=u.endsText,h=o.retrieve(t.get("showLabel",!0),!c),v=!t.get("selectedMode");c&&this._renderEndsText(e,c[0],l,h,s),o.each(u.viewPieceList,function(f){var p=f.piece,g=new o.Group;g.onclick=o.bind(this._onItemClick,this,p),this._enableHoverLink(g,f.indexInModelPieceList);var d=t.getRepresentValue(p);if(this._createItemSymbol(g,d,[0,0,l[0],l[1]],v),h){var S=this.visualMapModel.getValueState(d),m=n.get("align")||s;g.add(new o.ZRText({style:o.createTextStyle(n,{x:m==="right"?-a:l[0]+a,y:l[1]/2,text:p.text,verticalAlign:n.get("verticalAlign")||"middle",align:m,opacity:o.retrieve2(n.get("opacity"),S==="outOfRange"?.5:1)}),silent:v}))}e.add(g)},this),c&&this._renderEndsText(e,c[1],l,h,s),o.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},r.prototype._enableHoverLink=function(e,t){var a=this;e.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(s){var l=a.visualMapModel;l.option.hoverLink&&a.api.dispatchAction({type:s,batch:Re(l.findTargetDataIndices(t),l)})}},r.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient==="vertical")return gr(e,this.api,e.itemSize);var a=t.align;return(!a||a==="auto")&&(a="left"),a},r.prototype._renderEndsText=function(e,t,a,n,s){if(t){var l=new o.Group,u=this.visualMapModel.textStyleModel;l.add(new o.ZRText({style:o.createTextStyle(u,{x:n?s==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:n?s:"center",text:t})})),e.add(l)}},r.prototype._getViewData=function(){var e=this.visualMapModel,t=o.map(e.getPieceList(),function(l,u){return{piece:l,indexInModelPieceList:u}}),a=e.get("text"),n=e.get("orient"),s=e.get("inverse");return(n==="horizontal"?s:!s)?t.reverse():a&&(a=a.slice().reverse()),{viewPieceList:t,endsText:a}},r.prototype._createItemSymbol=function(e,t,a,n){var s=o.createSymbol(this.getControllerVisual(t,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(t,"color"));s.silent=n,e.add(s)},r.prototype._onItemClick=function(e){var t=this.visualMapModel,a=t.option,n=a.selectedMode;if(n){var s=o.clone(a.selected),l=t.getSelectedMapKey(e);n==="single"||n===!0?(s[l]=!0,o.each(s,function(u,c){s[c]=c===l})):s[l]=!s[l],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:s})}},r.type="visualMap.piecewise",r})(fr);function yi(i){i.registerComponentModel(gi),i.registerComponentView(mi),dr(i)}function Si(i){o.use(fi),o.use(yi)}function we(i,r,e){const t=i==null?void 0:i[r];return typeof t=="string"?t:e}function Q(){return{animationDurationUpdate:0,backgroundColor:"transparent"}}function ee(i,r,e={}){return{text:we(i,"title",r),left:"center",top:4,...e,textStyle:{...e.textStyle??{},fontSize:14}}}function Ie(i="15%"){return{left:"3%",right:"4%",bottom:i,containLabel:!0}}function te(i={}){return{...i,textStyle:{fontSize:12,...i.textStyle??{}}}}function mr(i){const r=typeof i=="object"&&i!==null&&"value"in i?i.value:i;if(!Array.isArray(r)||r.length<3)return null;const e=r.slice(0,3).map(Number);return e.every(Number.isFinite)?e:null}function bi(i){if(!i.length)return{min:0,max:0};const r=i.map(e=>{var t;return(t=mr(e))==null?void 0:t[2]}).filter(e=>typeof e=="number");return r.length?{min:Math.min(...r),max:Math.max(...r)}:{min:0,max:0}}function $t(i,r,e){const[t,a]=e?[1,0]:[0,1];return new o.LinearGradient(0,0,t,a,[{offset:0,color:i},{offset:1,color:r}])}const _i=(i,r)=>{const e=(r==null?void 0:r.horizontal)===!0||(r==null?void 0:r.horizontal)==="true",t={type:"category",data:i.xAxis,axisLabel:{rotate:e?0:90}},a={type:"value"};return{...Q(),title:ee(r,"Gradient Bar Chart"),tooltip:te({trigger:"axis",axisPointer:{type:"shadow"}}),grid:Ie(),xAxis:e?a:t,yAxis:e?{...t,inverse:!0}:a,series:[{type:"bar",barMaxWidth:32,data:i.data,itemStyle:{color:$t("#83bff6","#188df0",e)},emphasis:{itemStyle:{color:$t("#2378f7","#83bff6",e)}}}]}},xi=(i,r)=>({...Q(),title:ee(r,"Grouped Bar Chart"),tooltip:te({trigger:"axis",axisPointer:{type:"shadow"}}),legend:{data:i.legend,bottom:0},grid:Ie(),xAxis:{type:"category",data:i.xAxis,axisLabel:{rotate:i.xAxis.length>8?30:0}},yAxis:{type:"value"},series:i.series.map(e=>({name:e.name,type:"bar",emphasis:{focus:"series"},data:e.data}))});function Xt(i){if(typeof i=="number")return i;if(typeof i=="object"&&i!==null&&"value"in i){const r=Number(i.value);return Number.isFinite(r)?r:0}return 0}function Ai(i){if(typeof i=="object"&&i!==null&&"clickId"in i){const r=i.clickId;return typeof r=="string"?r:void 0}}function wi(i,r){return r.map((e,t)=>{const a=Xt(e),n=i.reduce((u,c)=>u+Xt(c.data[t]),0),s=n?a/n:0,l=Ai(e);return l?{value:s,clickId:l}:s})}const Ii=(i,r)=>({...Q(),title:ee(r,"Normalized Bar Chart"),tooltip:te({trigger:"axis",axisPointer:{type:"shadow"},formatter:e=>{const t=e.reduce((a,n)=>a+n.value,0);return e.map(a=>{const n=t?(a.value/t*100).toFixed(1):0;return`${a.seriesName}: ${a.value} (${n}%)`}).join("<br/>")}}),legend:{data:i.legend,bottom:0},grid:Ie(),xAxis:{type:"category",data:i.xAxis},yAxis:{type:"value",max:1,axisLabel:{formatter:e=>`${e*100}%`}},series:i.series.map(e=>({name:e.name,type:"bar",stack:"total",emphasis:{focus:"series"},data:wi(i.series,e.data)}))}),Mi=(i,r)=>({...Q(),title:ee(r,"Stacked Bar Chart"),tooltip:te({trigger:"axis",axisPointer:{type:"shadow"}}),legend:{data:i.legend,bottom:0},grid:Ie(),xAxis:{type:"category",data:i.xAxis,axisLabel:{rotate:i.xAxis.length>8?30:0}},yAxis:{type:"value"},series:i.series.map(e=>({name:e.name,type:"bar",stack:"total",emphasis:{focus:"series"},...e.color?{itemStyle:{color:e.color}}:{},data:e.data}))});function Yt(i,r){return`${Number.isInteger(i)?String(i):i.toFixed(2).replace(/\.?0+$/,"")}${r}`}const Di=(i,r)=>{const e=i.unit??we(r,"unit","%"),t=i.name??we(r,"seriesName",""),a=Number(i.value)||0,n=Yt(a,e);return{...Q(),title:ee(r,t||"Gauge",{top:8}),tooltip:te({formatter:`{b}: {c}${e}`}),series:[{type:"gauge",startAngle:200,endAngle:-20,min:0,max:100,splitNumber:10,center:["50%","55%"],radius:"74%",itemStyle:{color:"#58D9F9",shadowColor:"rgba(0,138,255,0.45)",shadowBlur:7,shadowOffsetX:1,shadowOffsetY:1},progress:{show:!0,roundCap:!0,width:10},pointer:{icon:"path://M2090.36389,615.30999 L2090.36389,615.30999 C2091.48372,615.30999 2092.40383,616.194028 2092.44859,617.312956 L2096.90698,728.755929 C2097.05155,732.369577 2094.2393,735.416212 2090.62566,735.56078 C2090.53845,735.564269 2090.45117,735.566014 2090.36389,735.566014 L2090.36389,735.566014 C2086.74736,735.566014 2083.81557,732.63423 2083.81557,729.017692 C2083.81557,728.930412 2083.81732,728.84314 2083.82081,728.755929 L2088.2792,617.312956 C2088.32396,616.194028 2089.24407,615.30999 2090.36389,615.30999 Z",length:"64%",width:12,offsetCenter:[0,"5%"]},axisLine:{roundCap:!0,lineStyle:{width:10}},axisTick:{splitNumber:2,length:7,lineStyle:{width:1.5,color:"#999"}},splitLine:{length:9,lineStyle:{width:2,color:"#999"}},axisLabel:{distance:14,color:"#999",fontSize:9},title:{show:!1},detail:{backgroundColor:"#fff",borderColor:"#999",borderWidth:2,width:Math.max(72,Math.min(104,n.length*11+16)),lineHeight:28,height:28,borderRadius:7,offsetCenter:[0,"42%"],valueAnimation:!0,formatter:s=>Yt(Number(s)||0,e),rich:{},color:"#464646",fontSize:n.length>=7?18:20,fontWeight:"bolder"},data:[{value:a,name:t}]}]}},Li=(i,r)=>{const e=Number(i.value)||0,t=i.grade??Pi(e);return{...Q(),title:ee(r,"Assistance Score",{top:8}),series:[{type:"gauge",startAngle:180,endAngle:0,center:["50%","69%"],radius:"78%",min:0,max:1,splitNumber:20,axisLine:{lineStyle:{width:7,color:[[.3,"#FF6E76"],[.6,"#FDDD60"],[.9,"#58D9F9"],[1,"#7CFFB2"]]}},pointer:{icon:"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",length:"10%",width:16,offsetCenter:[0,"-55%"],itemStyle:{color:"auto"}},axisTick:{length:7,lineStyle:{color:"auto",width:1}},splitLine:{length:10,lineStyle:{color:"auto",width:2}},axisLabel:{color:"#464646",fontSize:9,distance:-30,rotate:"tangential",formatter(a){return Math.abs(a-.15)<.001?"Minimal":Math.abs(a-.45)<.001?"Partial":Math.abs(a-.75)<.001?"Strong":Math.abs(a-.95)<.001?"Production":""}},title:{offsetCenter:[0,"26%"],fontSize:14},detail:{fontSize:24,offsetCenter:[0,"-20%"],valueAnimation:!0,formatter(a){return a.toFixed(2)},color:"inherit"},data:[{value:e,name:t}]}]}};function Pi(i){return i>=.9?"Production-grade":i>=.6?"Strong assist":i>=.3?"Partial assist":"Minimal assist"}const Ci=(i,r)=>{const{min:e,max:t}=bi(i.data);return{...Q(),title:ee(r,"Heatmap"),tooltip:te({position:"top",formatter:a=>{const[n,s,l]=mr(a.data)??[0,0,0];return`${i.yAxis[s]} / ${i.xAxis[n]}: ${l}`}}),grid:{height:"60%",top:"14%"},xAxis:{type:"category",data:i.xAxis,splitArea:{show:!0}},yAxis:{type:"category",data:i.yAxis,splitArea:{show:!0}},visualMap:{min:e,max:t,calculable:!0,orient:"horizontal",left:"center",bottom:0},series:[{type:"heatmap",data:i.data,label:{show:!0},emphasis:{itemStyle:{shadowBlur:10}}}]}},Ti=(i,r)=>({...Q(),title:ee(r,"Line Chart"),tooltip:te({trigger:"axis"}),legend:{data:i.legend||[],left:"center",bottom:0},grid:Ie(),xAxis:{type:"category",boundaryGap:!1,data:i.xAxis||[]},yAxis:{type:"value"},series:(i.series||[]).map(e=>({type:"line",smooth:(r==null?void 0:r.smooth)!==!1,...e}))});function Ei(i){return i.includes(",")?i.split(",").map(r=>r.trim()):i}const Vi=(i,r)=>({...Q(),title:ee(r,"Pie Chart"),tooltip:te({trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"}),legend:{orient:"vertical",left:"left"},series:[{name:we(r,"seriesName","Data"),type:"pie",radius:Ei(we(r,"radius","50%")),data:Array.isArray(i)?i:i.data,label:{textBorderWidth:0},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}),ki=(i,r)=>{const e=i.series.length>1;return{...Q(),title:ee(r,"Radar Chart"),tooltip:te(),legend:e?{data:i.legend||i.series.map(t=>t.name),bottom:0}:void 0,radar:{indicator:i.indicator},series:[{type:"radar",data:i.series.map(t=>({name:t.name,value:t.value}))}]}},Ri={pie:Vi,line:Ti,radar:ki,"bar-normalized":Ii,heatmap:Ci,"bar-gradient":_i,"bar-grouped":xi,"bar-stacked":Mi,"custom-gauge":Di,"gauge-grade":Li};function Oi(i,r,e){const t=Ri[i];return t(r,e)}const Ni="400px";function yr(i,r=Ni){const e=i==null?void 0:i.height;return typeof e=="number"&&Number.isFinite(e)&&e>0?`${e}px`:typeof e=="string"&&e.trim()?e:r}const zi=B.defineComponent({__name:"Chart",props:{url:{default:void 0},src:{default:void 0},data:{default:void 0},type:{},options:{default:void 0}},emits:["row-click"],setup(i,{expose:r,emit:e}){o.use([o.install,_a,er,Ea,ca,qa,Ba,o.install$1,o.install$2,o.install$3,o.install$4,hr,Si]);const t=B.ref(!1);let a=null;B.onMounted(()=>{t.value=document.documentElement.classList.contains("dark"),a=new MutationObserver(()=>{t.value=document.documentElement.classList.contains("dark")}),a.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),B.onUnmounted(()=>{a==null||a.disconnect()});const n=i,s=e,l=B.ref(null),u=B.ref(null),c=B.computed(()=>n.data===void 0?n.src??n.url??"":""),h=B.computed(()=>yr(n.options));function v(_){const w=m(_)?_:null;u.value=(w==null?void 0:w.click)??null,l.value=D(Oi(n.type,_,n.options),u.value)}const{loading:f,error:p,fetchData:g}=_r.useFetch(c,{async onSuccess(_){v(await _.json())}}),d=B.computed(()=>n.data===void 0&&f.value),S=B.computed(()=>n.data!==void 0?null:n.src||n.url?p.value:"Resource not found in asset");B.watch(()=>n.data,_=>{_!==void 0&&v(_)},{immediate:!0,deep:!0});function m(_){return typeof _=="object"&&_!==null}function y(_){const w=b(_);w&&s("row-click",w)}function b(_){var A,M;if(!m(_)||!m(_.data))return null;const w=_.data.clickId;if(typeof w!="string")return null;const P=(M=(A=u.value)==null?void 0:A.payloads)==null?void 0:M[w];return P===void 0?null:m(P)?"payload"in P?P.payload:typeof P.src=="string"?{action:"load-report-payload",src:P.src}:null:P}function D(_,w){const P=(w==null?void 0:w.payloads)??{},A=_.series,M=Array.isArray(A)?A.map(L=>I(L,P)):I(A,P);return{..._,series:M}}function I(_,w){if(!m(_))return _;const P=Array.isArray(_.data)?_.data.map(A=>!m(A)||typeof A.clickId!="string"?A:A.clickId in w?{...A,cursor:"pointer"}:A):_.data;return{..._,cursor:"default",data:P}}function x(){n.data!==void 0?v(n.data):g()}return r({refresh:x}),(_,w)=>(B.openBlock(),B.createBlock(xr._sfc_main,{loading:!l.value&&d.value,error:S.value},{skeleton:B.withCtx(()=>[B.createElementVNode("div",{class:"reportifact-chart-skeleton",style:B.normalizeStyle({"--reportifact-chart-height":h.value})},[...w[0]||(w[0]=[B.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"200px",height:"24px","margin-bottom":"16px"}},null,-1),B.createElementVNode("div",{class:"reportifact-skeleton-line reportifact-chart-skeleton-body"},null,-1)])],4)]),default:B.withCtx(()=>[B.createElementVNode("div",{class:"reportifact-chart-container",style:B.normalizeStyle({"--reportifact-chart-height":h.value})},[l.value?(B.openBlock(),B.createBlock(B.unref(o.src_default),{key:0,option:l.value,theme:t.value?"dark":void 0,autoresize:!0,class:"reportifact-chart",onClick:y},null,8,["option","theme"])):B.createCommentVNode("",!0)],4)]),_:1},8,["loading","error"]))}});exports._sfc_main=zi;exports.install=er;exports.resolveChartHeight=yr;
|