Files
YG_FT/frontend/dist/assets/install-Drze69x2.js
2026-07-27 09:12:03 +08:00

2 lines
27 KiB
JavaScript

import{_ as J,J as Bt,a1 as tt,aN as it,O as wt,K as Xt,r as qt,aU as Jt,aV as $t,Y,$ as jt,X as Ct,a8 as lt,aW as Qt,aM as Kt,a7 as vt,a9 as Ot,ad as nt,a3 as K,aX as ht,aY as Yt,aa as zt,W as xt,aZ as te,a_ as ee,U as st,s as x,R as Rt,u as q,a$ as ae,b0 as ft,ah as Vt,b1 as ct,ak as re,b2 as gt,d as mt,ae as pt,b3 as yt,a4 as et,b4 as bt,aQ as at,az as ie,b5 as ne,a0 as oe,E as Gt,b6 as le,b7 as se,af as ue,b8 as ve,b9 as he,S as St,ba as dt,bb as fe,bc as _t,ac as ce,v as ge,aj as me}from"./install-BpCXA-5u.js";var pe=(function(l){J(a,l);function a(){var t=l!==null&&l.apply(this,arguments)||this;return t.type=a.type,t.hasSymbolVisual=!0,t}return a.prototype.getInitialData=function(t){return Bt(null,this,{useEncodeDefaulter:!0})},a.prototype.getLegendIcon=function(t){var e=new tt,o=it("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(o),o.setStyle(t.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),n=r==="none"?"circle":r,u=t.itemHeight*.8,s=it(n,(t.itemWidth-u)/2,(t.itemHeight-u)/2,u,u,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var h=t.iconRotate==="inherit"?i:t.iconRotate||0;return s.rotation=h*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),n.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill=wt.color.neutral00,s.style.lineWidth=2),e},a.type="series.line",a.dependencies=["grid","polar"],a.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},a})(Xt),ut=(function(l){J(a,l);function a(t,e,o,r){var i=l.call(this)||this;return i.updateData(t,e,o,r),i}return a.prototype._createSymbol=function(t,e,o,r,i,n){this.removeAll();var u=it(t,-1,-1,2,2,null,n);u.attr({z2:qt(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),u.drift=ye,this._symbolType=t,this.add(u)},a.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},a.prototype.getSymbolType=function(){return this._symbolType},a.prototype.getSymbolPath=function(){return this.childAt(0)},a.prototype.highlight=function(){Jt(this.childAt(0))},a.prototype.downplay=function(){$t(this.childAt(0))},a.prototype.setZ=function(t,e){var o=this.childAt(0);o.zlevel=t,o.z=e},a.prototype.setDraggable=function(t,e){var o=this.childAt(0);o.draggable=t,o.cursor=!e&&t?"move":o.cursor},a.prototype.updateData=function(t,e,o,r){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",n=t.hostModel,u=a.getSymbolSize(t,e),s=a.getSymbolZ2(t,e),h=i!==this._symbolType,v=r&&r.disableAnimation;if(h){var c=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(i,t,e,u,s,c)}else{var f=this.childAt(0);f.silent=!1;var g={scaleX:u[0]/2,scaleY:u[1]/2};v?f.attr(g):Y(f,g,n,e),jt(f)}if(this._updateCommon(t,e,u,o,r),h){var f=this.childAt(0);if(!v){var g={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Ct(f,g,n,e)}}v&&this.childAt(0).stopAnimation("leave")},a.prototype._updateCommon=function(t,e,o,r,i){var n=this.childAt(0),u=t.hostModel,s,h,v,c,f,g,m,S,p;if(r&&(s=r.emphasisItemStyle,h=r.blurItemStyle,v=r.selectItemStyle,c=r.focus,f=r.blurScope,m=r.labelStatesModels,S=r.hoverScale,p=r.cursorStyle,g=r.emphasisDisabled),!r||t.hasItemOption){var y=r&&r.itemModel?r.itemModel:t.getItemModel(e),b=y.getModel("emphasis");s=b.getModel("itemStyle").getItemStyle(),v=y.getModel(["select","itemStyle"]).getItemStyle(),h=y.getModel(["blur","itemStyle"]).getItemStyle(),c=b.get("focus"),f=b.get("blurScope"),g=b.get("disabled"),m=lt(y),S=b.getShallow("scale"),p=y.getShallow("cursor")}var I=t.getItemVisual(e,"symbolRotate");n.attr("rotation",(I||0)*Math.PI/180||0);var D=Qt(t.getItemVisual(e,"symbolOffset"),o);D&&(n.x=D[0],n.y=D[1]),p&&n.attr("cursor",p);var _=t.getItemVisual(e,"style"),d=_.fill;if(n instanceof Kt){var k=n.style;n.useStyle(vt({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},_))}else n.__isEmptyBrush?n.useStyle(vt({},_)):n.useStyle(_),n.style.decal=null,n.setColor(d,i&&i.symbolInnerColor),n.style.strokeNoScale=!0;var A=t.getItemVisual(e,"liftZ"),E=this._z2;A!=null?E==null&&(this._z2=n.z2,n.z2+=A):E!=null&&(n.z2=E,this._z2=null);var L=i&&i.useNameLabel;Ot(n,m,{labelFetcher:u,labelDataIndex:e,defaultText:P,inheritColor:d,defaultOpacity:_.opacity});function P(O){return L?t.getName(O):zt(t,O)}this._sizeX=o[0]/2,this._sizeY=o[1]/2;var T=n.ensureState("emphasis");T.style=s,n.ensureState("select").style=v,n.ensureState("blur").style=h;var R=S==null||S===!0?Math.max(1.1,3/this._sizeY):isFinite(S)&&S>0?+S:1;T.scaleX=this._sizeX*R,T.scaleY=this._sizeY*R,this.setSymbolScale(1),nt(this,c,f,g)},a.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},a.prototype.fadeOut=function(t,e,o){var r=this.childAt(0),i=K(this).dataIndex,n=o&&o.animation;if(this.silent=r.silent=!0,o&&o.fadeLabel){var u=r.getTextContent();u&&ht(u,{style:{opacity:0}},e,{dataIndex:i,removeOpt:n,cb:function(){r.removeTextContent()}})}else r.removeTextContent();ht(r,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:i,cb:t,removeOpt:n})},a.getSymbolSize=function(t,e){return Yt(t.getItemVisual(e,"symbolSize"))},a.getSymbolZ2=function(t,e){return t.getItemVisual(e,"z2")},a})(tt);function ye(l,a){this.parent.drift(l,a)}function Q(l,a,t,e){return a&&!isNaN(a[0])&&!isNaN(a[1])&&!(e&&e.isIgnore&&e.isIgnore(t))&&!(e&&e.clipShape&&!e.clipShape.contain(a[0],a[1]))&&l.getItemVisual(t,"symbol")!=="none"}function Dt(l){return l!=null&&!ee(l)&&(l={isIgnore:l}),l||{}}function It(l){var a=l.hostModel,t=a.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:a.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:a.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:lt(a),cursorStyle:a.get("cursor")}}function Et(l,a,t,e,o,r,i){var n=new l(a,t,e,o);return n.setPosition(r),a.setItemGraphicEl(t,n),i.add(n),n}var be=(function(){function l(a){this.group=new tt,this._SymbolCtor=a||ut}return l.prototype.updateData=function(a,t){this._progressiveEls=null,t=Dt(t);var e=this.group,o=a.hostModel,r=this._data,i=this._SymbolCtor,n=t.disableAnimation,u=this._seriesScope=It(a),s={disableAnimation:n},h=t.getSymbolPoint||function(v){return a.getItemLayout(v)};r||e.removeAll(),a.diff(r).add(function(v){var c=h(v);Q(a,c,v,t)&&Et(i,a,v,u,s,c,e)}).update(function(v,c){var f=r.getItemGraphicEl(c),g=h(v);if(!Q(a,g,v,t)){e.remove(f);return}var m=a.getItemVisual(v,"symbol")||"circle",S=f&&f.getSymbolType&&f.getSymbolType();if(!f||S&&S!==m)e.remove(f),f=new i(a,v,u,s),f.setPosition(g);else{f.updateData(a,v,u,s);var p={x:g[0],y:g[1]};n?f.attr(p):Y(f,p,o)}e.add(f),a.setItemGraphicEl(v,f)}).remove(function(v){var c=r.getItemGraphicEl(v);c&&c.fadeOut(function(){e.remove(c)},o)}).execute(),this._getSymbolPoint=h,this._data=a},l.prototype.updateLayout=function(a){var t=this._data;if(t)for(var e=this,o=t.getStore(),r=0,i=o.count();r<i;r++){var n=t.getItemGraphicEl(r),u=e._getSymbolPoint(r);Q(t,u,r,a)?(n=n||Et(e._SymbolCtor,t,r,e._seriesScope,{disableAnimation:!0},u,e.group),n.stopAnimation(),n.setPosition(u),n.markRedraw()):n&&(e.group.remove(n),t.setItemGraphicEl(r,null))}},l.prototype.incrementalPrepareUpdate=function(a){this._seriesScope=It(a),this._data=null,this.group.removeAll()},l.prototype.incrementalUpdate=function(a,t,e,o){this._progressiveEls=[],o=Dt(o);function r(s){s.isGroup||(s.incremental=e,s.ensureState("emphasis").hoverLayer=te)}for(var i=a.start;i<a.end;i++){var n=t.getItemLayout(i);if(Q(t,n,i,o)){var u=new this._SymbolCtor(t,i,this._seriesScope);u.traverse(r),u.setPosition(n),this.group.add(u),t.setItemGraphicEl(i,u),this._progressiveEls.push(u)}}},l.prototype.eachRendered=function(a){xt(this._progressiveEls||this.group,a)},l.prototype.remove=function(a){var t=this.group,e=this._data;e&&a?e.eachItemGraphicEl(function(o){o.fadeOut(function(){t.remove(o)},e.hostModel)}):t.removeAll()},l})();function Ft(l,a,t){var e=l.getBaseAxis(),o=l.getOtherAxis(e),r=Se(o,t),i=e.dim,n=o.dim,u=a.mapDimension(n),s=a.mapDimension(i),h=n==="x"||n==="radius"?1:0,v=st(l.dimensions,function(g){return a.mapDimension(g)}),c=!1,f=a.getCalculationInfo("stackResultDimension");return x(a,v[0])&&(c=!0,v[0]=f),x(a,v[1])&&(c=!0,v[1]=f),{dataDimsForPoint:v,valueStart:r,valueAxisDim:n,baseAxisDim:i,stacked:!!c,valueDim:u,baseDim:s,baseDataOffset:h,stackedOverDimension:a.getCalculationInfo("stackedOverDimension")}}function Se(l,a){var t=0,e=l.scale.getExtent();return a==="start"?t=e[0]:a==="end"?t=e[1]:Rt(a)&&!isNaN(a)?t=a:e[0]>0?t=e[0]:e[1]<0&&(t=e[1]),t}function Nt(l,a,t,e){var o=NaN;l.stacked&&(o=t.get(t.getCalculationInfo("stackedOverDimension"),e)),isNaN(o)&&(o=l.valueStart);var r=l.baseDataOffset,i=[];return i[r]=t.get(l.baseDim,e),i[1-r]=o,a.dataToPoint(i)}function V(l,a){return!isFinite(l)||!isFinite(a)}function de(l,a){var t=[];return a.diff(l).add(function(e){t.push({cmd:"+",idx:e})}).update(function(e,o){t.push({cmd:"=",idx:o,idx1:e})}).remove(function(e){t.push({cmd:"-",idx:e})}).execute(),t}function _e(l,a,t,e,o,r,i,n){for(var u=de(l,a),s=[],h=[],v=[],c=[],f=[],g=[],m=[],S=Ft(o,a,i),p=l.getLayout("points")||[],y=a.getLayout("points")||[],b=0;b<u.length;b++){var I=u[b],D=!0,_=void 0,d=void 0;switch(I.cmd){case"=":_=I.idx*2,d=I.idx1*2;var k=p[_],A=p[_+1],E=y[d],L=y[d+1];(isNaN(k)||isNaN(A))&&(k=E,A=L),s.push(k,A),h.push(E,L),v.push(t[_],t[_+1]),c.push(e[d],e[d+1]),m.push(a.getRawIndex(I.idx1));break;case"+":var P=I.idx,T=S.dataDimsForPoint,R=o.dataToPoint([a.get(T[0],P),a.get(T[1],P)]);d=P*2,s.push(R[0],R[1]),h.push(y[d],y[d+1]);var O=Nt(S,o,a,P);v.push(O[0],O[1]),c.push(e[d],e[d+1]),m.push(a.getRawIndex(P));break;case"-":D=!1}D&&(f.push(I),g.push(g.length))}g.sort(function(X,j){return m[X]-m[j]});for(var z=s.length,M=q(z),w=q(z),C=q(z),H=q(z),U=[],b=0;b<g.length;b++){var $=g[b],G=b*2,F=$*2;M[G]=s[F],M[G+1]=s[F+1],w[G]=h[F],w[G+1]=h[F+1],C[G]=v[F],C[G+1]=v[F+1],H[G]=c[F],H[G+1]=c[F+1],U[b]=f[$]}return{current:M,next:w,stackedOnCurrent:C,stackedOnNext:H,status:U}}var W=Math.min,Z=Math.max;function ot(l,a,t,e,o,r,i,n,u){for(var s,h,v,c,f,g,m=t,S=0;S<e;S++){var p=a[m*2],y=a[m*2+1];if(m>=o||m<0)break;if(V(p,y)){if(u){m+=r;continue}break}if(m===t)l[r>0?"moveTo":"lineTo"](p,y),v=p,c=y;else{var b=p-s,I=y-h;if(b*b+I*I<.5){m+=r;continue}if(i>0){for(var D=m+r,_=a[D*2],d=a[D*2+1];_===p&&d===y&&S<e;)S++,D+=r,m+=r,_=a[D*2],d=a[D*2+1],p=a[m*2],y=a[m*2+1],b=p-s,I=y-h;var k=S+1;if(u)for(;V(_,d)&&k<e;)k++,D+=r,_=a[D*2],d=a[D*2+1];var A=.5,E=0,L=0,P=void 0,T=void 0;if(k>=e||V(_,d))f=p,g=y;else{E=_-s,L=d-h;var R=p-s,O=_-p,z=y-h,M=d-y,w=void 0,C=void 0;if(n==="x"){w=Math.abs(R),C=Math.abs(O);var H=E>0?1:-1;f=p-H*w*i,g=y,P=p+H*C*i,T=y}else if(n==="y"){w=Math.abs(z),C=Math.abs(M);var U=L>0?1:-1;f=p,g=y-U*w*i,P=p,T=y+U*C*i}else w=Math.sqrt(R*R+z*z),C=Math.sqrt(O*O+M*M),A=C/(C+w),f=p-E*i*(1-A),g=y-L*i*(1-A),P=p+E*i*A,T=y+L*i*A,P=W(P,Z(_,p)),T=W(T,Z(d,y)),P=Z(P,W(_,p)),T=Z(T,W(d,y)),E=P-p,L=T-y,f=p-E*w/C,g=y-L*w/C,f=W(f,Z(s,p)),g=W(g,Z(h,y)),f=Z(f,W(s,p)),g=Z(g,W(h,y)),E=p-f,L=y-g,P=p+E*C/w,T=y+L*C/w}l.bezierCurveTo(v,c,f,g,p,y),v=P,c=T}else l.lineTo(p,y)}s=p,h=y,m+=r}return S}var Mt=(function(){function l(){this.smooth=0,this.smoothConstraint=!0}return l})(),De=(function(l){J(a,l);function a(t){var e=l.call(this,t)||this;return e.type="ec-polyline",e}return a.prototype.getDefaultStyle=function(){return{stroke:wt.color.neutral99,fill:null}},a.prototype.getDefaultShape=function(){return new Mt},a.prototype.buildPath=function(t,e){var o=e.points,r=0,i=o.length/2;if(e.connectNulls){for(;i>0&&V(o[i*2-2],o[i*2-1]);i--);for(;r<i&&V(o[r*2],o[r*2+1]);r++);}for(;r<i;)r+=ot(t,o,r,i,i,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},a.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var o=this.path,r=o.data,i=ae.CMD,n,u,s=e==="x",h=[],v=0;v<r.length;){var c=r[v++],f=void 0,g=void 0,m=void 0,S=void 0,p=void 0,y=void 0,b=void 0;switch(c){case i.M:n=r[v++],u=r[v++];break;case i.L:if(f=r[v++],g=r[v++],b=s?(t-n)/(f-n):(t-u)/(g-u),b<=1&&b>=0){var I=s?(g-u)*b+u:(f-n)*b+n;return s?[t,I]:[I,t]}n=f,u=g;break;case i.C:f=r[v++],g=r[v++],m=r[v++],S=r[v++],p=r[v++],y=r[v++];var D=s?ft(n,f,m,p,t,h):ft(u,g,S,y,t,h);if(D>0)for(var _=0;_<D;_++){var d=h[_];if(d<=1&&d>=0){var I=s?ct(u,g,S,y,d):ct(n,f,m,p,d);return s?[t,I]:[I,t]}}n=p,u=y;break}}},a})(Vt),Ie=(function(l){J(a,l);function a(){return l!==null&&l.apply(this,arguments)||this}return a})(Mt),Ee=(function(l){J(a,l);function a(t){var e=l.call(this,t)||this;return e.type="ec-polygon",e}return a.prototype.getDefaultShape=function(){return new Ie},a.prototype.buildPath=function(t,e){var o=e.points,r=e.stackedOnPoints,i=0,n=o.length/2,u=e.smoothMonotone;if(e.connectNulls){for(;n>0&&V(o[n*2-2],o[n*2-1]);n--);for(;i<n&&V(o[i*2],o[i*2+1]);i++);}for(;i<n;){var s=ot(t,o,i,n,n,1,e.smooth,u,e.connectNulls);ot(t,r,i+s-1,s,n,-1,e.stackedOnSmooth,u,e.connectNulls),i+=s+1,t.closePath()}},a})(Vt);function Pt(l,a){if(l.length===a.length){for(var t=0;t<l.length;t++)if(l[t]!==a[t])return;return!0}}function At(l){for(var a=_t(),t=_t(),e=0;e<l.length;){var o=l[e++],r=l[e++];V(o,r)||(dt(a,o),dt(t,r))}return[a,t]}function Lt(l,a){var t=At(l),e=t[0],o=t[1],r=At(a),i=r[0],n=r[1];return Math.max(Math.abs(e[0]-i[0]),Math.abs(o[0]-n[0]),Math.abs(e[1]-i[1]),Math.abs(o[1]-n[1]))}function kt(l){return Rt(l)?l:l?.5:0}function Pe(l,a,t){if(t.valueDim==null)return[];for(var e=a.count(),o=q(e*2),r=0;r<e;r++){var i=Nt(t,l,a,r);o[r*2]=i[0],o[r*2+1]=i[1]}return o}function B(l,a,t,e,o){var r=t.getBaseAxis(),i=r.dim==="x"||r.dim==="radius"?0:1,n=[],u=0,s=[],h=[],v=[],c=[];if(o){for(u=0;u<l.length;u+=2){var f=a||l;V(f[u],f[u+1])||c.push(l[u],l[u+1])}l=c}for(u=0;u<l.length-2;u+=2)switch(v[0]=l[u+2],v[1]=l[u+3],h[0]=l[u],h[1]=l[u+1],n.push(h[0],h[1]),e){case"end":s[i]=v[i],s[1-i]=h[1-i],n.push(s[0],s[1]);break;case"middle":var g=(h[i]+v[i])/2,m=[];s[i]=m[i]=g,s[1-i]=h[1-i],m[1-i]=v[1-i],n.push(s[0],s[1]),n.push(m[0],m[1]);break;default:s[i]=h[i],s[1-i]=v[1-i],n.push(s[0],s[1])}return n.push(l[u++],l[u++]),n}function Ae(l,a){var t=[],e=l.length,o,r;function i(h,v,c){var f=h.coord,g=(c-f)/(v.coord-f),m=fe(g,[h.color,v.color]);return{coord:c,color:m}}for(var n=0;n<e;n++){var u=l[n],s=u.coord;if(s<0)o=u;else if(s>a){r?t.push(i(r,u,a)):o&&t.push(i(o,u,0),i(o,u,a));break}else o&&(t.push(i(o,u,0)),o=null),t.push(u),r=u}return t}function Le(l,a,t){var e=l.getVisual("visualMeta");if(!(!e||!e.length||!l.count())&&a.type==="cartesian2d"){for(var o,r,i=e.length-1;i>=0;i--){var n=l.getDimensionInfo(e[i].dimension);if(o=n&&n.coordDim,o==="x"||o==="y"){r=e[i];break}}if(r){var u=a.getAxis(o),s=st(r.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),h=s.length,v=r.outerColors.slice();h&&s[0].coord>s[h-1].coord&&(s.reverse(),v.reverse());var c=Ae(s,o==="x"?t.getWidth():t.getHeight()),f=c.length;if(!f&&h)return s[0].coord<0?v[1]?v[1]:s[h-1].color:v[0]?v[0]:s[0].color;var g=10,m=c[0].coord-g,S=c[f-1].coord+g,p=S-m;if(p<.001)return"transparent";Gt(c,function(b){b.offset=(b.coord-m)/p}),c.push({offset:f?c[f-1].offset:.5,color:v[1]||"transparent"}),c.unshift({offset:f?c[0].offset:.5,color:v[0]||"transparent"});var y=new se(0,0,0,0,c,!0);return y[o]=m,y[o+"2"]=S,y}}}function ke(l,a,t){var e=l.get("showAllSymbol"),o=e==="auto";if(!(e&&!o)){var r=t.getAxesByScale("ordinal")[0];if(r&&!(o&&Te(r,a))){var i=a.mapDimension(r.dim),n={};return Gt(r.getViewLabels(),function(u){u.tick.offInterval||(n[le(r.scale,u.tick)]=1)}),function(u){return!n.hasOwnProperty(a.get(i,u))}}}}function Te(l,a){var t=l.getExtent(),e=Math.abs(t[1]-t[0])/l.scale.count();isNaN(e)&&(e=0);for(var o=a.count(),r=Math.max(1,Math.round(o/5)),i=0;i<o;i+=r)if(ut.getSymbolSize(a,i)[l.isHorizontal()?1:0]*1.5>e)return!1;return!0}function we(l){for(var a=l.length/2;a>0&&V(l[a*2-2],l[a*2-1]);a--);return a-1}function Tt(l,a){return[l[a*2],l[a*2+1]]}function Ce(l,a,t){for(var e=l.length/2,o=t==="x"?0:1,r,i,n=0,u=-1,s=0;s<e;s++)if(i=l[s*2+o],!V(i,l[s*2+1-o])){if(s===0){r=i;continue}if(r<=a&&i>=a||r>=a&&i<=a){u=s;break}n=s,r=i}return{range:[n,u],t:(a-r)/(i-r)}}function Ht(l){if(l.get(["endLabel","show"]))return!0;for(var a=0;a<St.length;a++)if(l.get([St[a],"endLabel","show"]))return!0;return!1}function rt(l,a,t,e){if(ue(a,"cartesian2d")){var o=e.getModel("endLabel"),r=o.get("valueAnimation"),i=e.getData(),n={lastFrameIndex:0},u=Ht(e)?function(f,g){l._endLabelOnDuring(f,g,i,n,r,o,a)}:null,s=a.getBaseAxis().isHorizontal(),h=ve(a,t,e,function(){var f=l._endLabel;f&&t&&n.originalX!=null&&f.attr({x:n.originalX,y:n.originalY})},u);if(!e.get("clip",!0)){var v=h.shape,c=Math.max(v.width,v.height);s?(v.y-=c,v.height+=c*2):(v.x-=c,v.width+=c*2)}return u&&u(1,h),h}else return he(a,t,e)}function Oe(l,a){var t=a.getBaseAxis(),e=t.isHorizontal(),o=t.inverse,r=e?o?"right":"left":"center",i=e?"middle":o?"top":"bottom";return{normal:{align:l.get("align")||r,verticalAlign:l.get("verticalAlign")||i}}}var ze=(function(l){J(a,l);function a(){return l!==null&&l.apply(this,arguments)||this}return a.prototype.init=function(){var t=new tt,e=new be;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t,this._changePolyState=re(this._changePolyState,this)},a.prototype.render=function(t,e,o){var r=t.coordinateSystem,i=this.group,n=t.getData(),u=t.getModel("lineStyle"),s=t.getModel("areaStyle"),h=n.getLayout("points")||[],v=r.type==="polar",c=this._coordSys,f=this._symbolDraw,g=this._polyline,m=this._polygon,S=this._lineGroup,p=!e.ssr&&t.get("animation"),y=!s.isEmpty(),b=s.get("origin"),I=Ft(r,n,b),D=y&&Pe(r,n,I),_=t.get("showSymbol"),d=t.get("connectNulls"),k=_&&!v&&ke(t,n,r),A=this._data;A&&A.eachItemGraphicEl(function(N,Zt){N.__temp&&(i.remove(N),A.setItemGraphicEl(Zt,null))}),_||f.remove(),i.add(S);var E=v?!1:t.get("step"),L;r&&r.getArea&&t.get("clip",!0)&&(L=r.getArea(),L.width!=null?(L.x-=.1,L.y-=.1,L.width+=.2,L.height+=.2):L.r0&&(L.r0-=.5,L.r+=.5)),this._clipShapeForSymbol=L;var P=Le(n,r,o)||n.getVisual("style")[n.getVisual("drawType")];if(!(g&&c.type===r.type&&E===this._step))_&&f.updateData(n,{isIgnore:k,clipShape:L,disableAnimation:!0,getSymbolPoint:function(N){return[h[N*2],h[N*2+1]]}}),p&&this._initSymbolLabelAnimation(n,r,L),E&&(D&&(D=B(D,h,r,E,d)),h=B(h,null,r,E,d)),g=this._newPolyline(h),y?m=this._newPolygon(h,D):m&&(S.remove(m),m=this._polygon=null),v||this._initOrUpdateEndLabel(t,r,gt(P)),S.setClipPath(rt(this,r,!0,t));else{y&&!m?m=this._newPolygon(h,D):m&&!y&&(S.remove(m),m=this._polygon=null),v||this._initOrUpdateEndLabel(t,r,gt(P));var T=S.getClipPath();if(T){var R=rt(this,r,!1,t);Ct(T,{shape:R.shape},t)}else S.setClipPath(rt(this,r,!0,t));_&&f.updateData(n,{isIgnore:k,clipShape:L,disableAnimation:!0,getSymbolPoint:function(N){return[h[N*2],h[N*2+1]]}}),(!Pt(this._stackedOnPoints,D)||!Pt(this._points,h))&&(p?this._doUpdateAnimation(n,D,r,o,E,b,d):(E&&(D&&(D=B(D,h,r,E,d)),h=B(h,null,r,E,d)),g.setShape({points:h}),m&&m.setShape({points:h,stackedOnPoints:D})))}var O=t.getModel("emphasis"),z=O.get("focus"),M=O.get("blurScope"),w=O.get("disabled");if(g.useStyle(mt(u.getLineStyle(),{fill:"none",stroke:P,lineJoin:"bevel"})),pt(g,t,"lineStyle"),g.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var C=g.getState("emphasis").style;C.lineWidth=+g.style.lineWidth+1}K(g).seriesIndex=t.seriesIndex,nt(g,z,M,w);var H=kt(t.get("smooth")),U=t.get("smoothMonotone");if(g.setShape({smooth:H,smoothMonotone:U,connectNulls:d}),m){var $=n.getCalculationInfo("stackedOnSeries"),G=0;m.useStyle(mt(s.getAreaStyle(),{fill:P,opacity:.7,lineJoin:"bevel",decal:n.getVisual("style").decal})),$&&(G=kt($.get("smooth"))),m.setShape({smooth:H,stackedOnSmooth:G,smoothMonotone:U,connectNulls:d}),pt(m,t,"areaStyle"),K(m).seriesIndex=t.seriesIndex,nt(m,z,M,w)}var F=this._changePolyState;n.eachItemGraphicEl(function(N){N&&(N.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=n,this._coordSys=r,this._stackedOnPoints=D,this._points=h,this._step=E,this._valueOrigin=b;var X=t.get("triggerEvent"),j=t.get("triggerLineEvent"),Ut=j===!0||X===!0||X==="line",Wt=j===!0||X===!0||X==="area";this.packEventData(t,g,Ut),m&&this.packEventData(t,m,Wt)},a.prototype.packEventData=function(t,e,o){K(e).eventData=o?{componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line",selfType:e===this._polygon?"area":"line"}:null},a.prototype.highlight=function(t,e,o,r){var i=t.getData(),n=yt(i,r);if(this._changePolyState("emphasis"),!(n instanceof Array)&&n!=null&&n>=0){var u=i.getLayout("points"),s=i.getItemGraphicEl(n);if(!s){var h=u[n*2],v=u[n*2+1];if(V(h,v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,v))return;var c=t.get("zlevel")||0,f=t.get("z")||0;s=new ut(i,n),s.x=h,s.y=v,s.setZ(c,f);var g=s.getSymbolPath().getTextContent();g&&(g.zlevel=c,g.z=f,g.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(n,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else et.prototype.highlight.call(this,t,e,o,r)},a.prototype.downplay=function(t,e,o,r){var i=t.getData(),n=yt(i,r);if(this._changePolyState("normal"),n!=null&&n>=0){var u=i.getItemGraphicEl(n);u&&(u.__temp?(i.setItemGraphicEl(n,null),this.group.remove(u)):u.downplay())}else et.prototype.downplay.call(this,t,e,o,r)},a.prototype._changePolyState=function(t){var e=this._polygon;bt(this._polyline,t),e&&bt(e,t)},a.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new De({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},a.prototype._newPolygon=function(t,e){var o=this._polygon;return o&&this._lineGroup.remove(o),o=new Ee({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(o),this._polygon=o,o},a.prototype._initSymbolLabelAnimation=function(t,e,o){var r,i,n=e.getBaseAxis(),u=n.inverse;e.type==="cartesian2d"?(r=n.isHorizontal(),i=!1):e.type==="polar"&&(r=n.dim==="angle",i=!0);var s=t.hostModel,h=s.get("animationDuration");at(h)&&(h=h(null));var v=s.get("animationDelay")||0,c=at(v)?v(null):v;t.eachItemGraphicEl(function(f,g){var m=f;if(m){var S=[f.x,f.y],p=void 0,y=void 0,b=void 0;if(o)if(i){var I=o,D=e.pointToCoord(S);r?(p=I.startAngle,y=I.endAngle,b=-D[1]/180*Math.PI):(p=I.r0,y=I.r,b=D[0])}else{var _=o;r?(p=_.x,y=_.x+_.width,b=f.x):(p=_.y+_.height,y=_.y,b=f.y)}var d=y===p?0:(b-p)/(y-p);u&&(d=1-d);var k=at(v)?v(g):h*d+c,A=m.getSymbolPath(),E=A.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:k}),E&&E.animateFrom({style:{opacity:0}},{duration:300,delay:k}),A.disableLabelAnimation=!0}})},a.prototype._initOrUpdateEndLabel=function(t,e,o){var r=t.getModel("endLabel");if(Ht(t)){var i=t.getData(),n=this._polyline,u=i.getLayout("points");if(!u){n.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new ie({z2:200}),s.ignoreClip=!0,n.setTextContent(this._endLabel),n.disableLabelAnimation=!0);var h=we(u);h>=0&&(Ot(n,lt(t,"endLabel"),{inheritColor:o,labelFetcher:t,labelDataIndex:h,defaultText:function(v,c,f){return f!=null?ce(i,f):zt(i,v)},enableTextSetter:!0},Oe(r,e)),n.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},a.prototype._endLabelOnDuring=function(t,e,o,r,i,n,u){var s=this._endLabel,h=this._polyline;if(s){t<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var v=o.getLayout("points"),c=o.hostModel,f=c.get("connectNulls"),g=n.get("precision"),m=n.get("distance")||0,S=u.getBaseAxis(),p=S.isHorizontal(),y=S.inverse,b=e.shape,I=y?p?b.x:b.y+b.height:p?b.x+b.width:b.y,D=(p?m:0)*(y?-1:1),_=(p?0:-m)*(y?-1:1),d=p?"x":"y",k=Ce(v,I,d),A=k.range,E=A[1]-A[0],L=void 0;if(E>=1){if(E>1&&!f){var P=Tt(v,A[0]);s.attr({x:P[0]+D,y:P[1]+_}),i&&(L=c.getRawValue(A[0]))}else{var P=h.getPointOn(I,d);P&&s.attr({x:P[0]+D,y:P[1]+_});var T=c.getRawValue(A[0]),R=c.getRawValue(A[1]);i&&(L=ne(o,g,T,R,k.t))}r.lastFrameIndex=A[0]}else{var O=t===1||r.lastFrameIndex>0?A[0]:0,P=Tt(v,O);i&&(L=c.getRawValue(O)),s.attr({x:P[0]+D,y:P[1]+_})}if(i){var z=oe(s);typeof z.setLabelText=="function"&&z.setLabelText(L)}}},a.prototype._doUpdateAnimation=function(t,e,o,r,i,n,u){var s=this._polyline,h=this._polygon,v=t.hostModel,c=_e(this._data,t,this._stackedOnPoints,e,this._coordSys,o,this._valueOrigin),f=c.current,g=c.stackedOnCurrent,m=c.next,S=c.stackedOnNext;if(i&&(g=B(c.stackedOnCurrent,c.current,o,i,u),f=B(c.current,null,o,i,u),S=B(c.stackedOnNext,c.next,o,i,u),m=B(c.next,null,o,i,u)),Lt(f,m)>3e3||h&&Lt(g,S)>3e3){s.stopAnimation(),s.setShape({points:m}),h&&(h.stopAnimation(),h.setShape({points:m,stackedOnPoints:S}));return}s.shape.__points=c.current,s.shape.points=f;var p={shape:{points:m}};c.current!==f&&(p.shape.__points=c.next),s.stopAnimation(),Y(s,p,v),h&&(h.setShape({points:f,stackedOnPoints:g}),h.stopAnimation(),Y(h,{shape:{stackedOnPoints:S}},v),s.shape.points!==h.shape.points&&(h.shape.points=s.shape.points));for(var y=[],b=c.status,I=0;I<b.length;I++){var D=b[I].cmd;if(D==="="){var _=t.getItemGraphicEl(b[I].idx1);_&&y.push({el:_,ptIdx:I})}}s.animators&&s.animators.length&&s.animators[0].during(function(){h&&h.dirtyShape();for(var d=s.shape.__points,k=0;k<y.length;k++){var A=y[k].el,E=y[k].ptIdx*2;A.x=d[E],A.y=d[E+1],A.markRedraw()}})},a.prototype.remove=function(t){var e=this.group,o=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),o&&o.eachItemGraphicEl(function(r,i){r.__temp&&(e.remove(r),o.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},a.type="line",a})(et);function Re(l,a){return{seriesType:l,plan:ge(),reset:function(t){var e=t.getData(),o=t.coordinateSystem;if(t.pipelineContext,!!o){var r=st(o.dimensions,function(v){return e.mapDimension(v)}).slice(0,2),i=r.length,n=e.getCalculationInfo("stackResultDimension");x(e,r[0])&&(r[0]=n),x(e,r[1])&&(r[1]=n);var u=e.getStore(),s=e.getDimensionIndex(r[0]),h=e.getDimensionIndex(r[1]);return i&&{progress:function(v,c){for(var f=v.end-v.start,g=q(f*i),m=[],S=[],p=v.start,y=0;p<v.end;p++){var b=void 0;if(i===1){var I=u.get(s,p);b=o.dataToPoint(I,null,S)}else m[0]=u.get(s,p),m[1]=u.get(h,p),b=o.dataToPoint(m,null,S);g[y++]=b[0],g[y++]=b[1]}c.setLayout("points",g),c.setLayout("pointsRange",{start:v.start,end:v.end})}}}}}}function Ge(l){l.registerChartView(ze),l.registerSeriesModel(pe),l.registerLayout(Re("line")),l.registerVisual({seriesType:"line",reset:function(a){var t=a.getData(),e=a.getModel("lineStyle").getLineStyle();e&&!e.stroke&&(e.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",e)}}),l.registerProcessor(l.PRIORITY.PROCESSOR.STATISTIC,me("line"))}export{Ge as i};