diff --git a/assets/frps/static/index-ky4re_ta.js b/assets/frps/static/index-Q42Pu2_S.js similarity index 99% rename from assets/frps/static/index-ky4re_ta.js rename to assets/frps/static/index-Q42Pu2_S.js index cf7b8c3b..45293e05 100644 --- a/assets/frps/static/index-ky4re_ta.js +++ b/assets/frps/static/index-Q42Pu2_S.js @@ -81,4 +81,4 @@ PERFORMANCE OF THIS SOFTWARE. `:"
",g=c.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],d,null,h)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=dt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,h=u.getData(c),d=this._renderMode,v=r.positionDefault,p=bl([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=p.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(f,c),y=new up;g.marker=y.makeTooltipMarker("item",ku(g.color),d);var _=FS(u.formatTooltip(f,!1,c)),b=p.get("order"),x=p.get("valueFormatter"),w=_.frag,S=w?WS(x?ue({valueFormatter:x},w):w,y,d,b,a.get("useUTC"),p.get("textStyle")):_.text,C="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,S,g,C,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=dt(n),o=a.tooltipConfig,s=o.option||{};if(Ee(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(a.componentMainType,a.componentIndex);f&&u.push(f),u.push({formatter:s.content});var c=r.positionDefault,h=bl(u,this._tooltipModel,c?{position:c}:null),d=h.get("content"),v=Math.random()+"",p=new up;this._showOrMove(h,function(){var m=tt(h.get("formatterParams")||{});this._showTooltipContent(h,d,m,v,r.offsetX,r.offsetY,r.position,n,p)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var d=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),p=v.color;if(h)if(Ee(h)){var m=r.ecModel.get("useUTC"),g=ye(i)?i[0]:i,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;d=h,y&&(d=Ph(g.axisValue,d,m)),d=pE(d,i,!0)}else if(Ye(h)){var _=xt(function(b,x){b===this._ticket&&(c.setContent(x,f,r,p,l),this._updatePosition(r,l,o,s,c,i,u))},this);this._ticket=a,d=h(i,a,_)}else d=h;c.setContent(d,f,r,p,l),c.show(r,p),this._updatePosition(r,l,o,s,c,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||ye(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ye(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Ye(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,f],contentSize:c.slice()})),ye(n))i=yt(n[0],u),a=yt(n[1],f);else if(Re(n)){var p=n;p.width=c[0],p.height=c[1];var m=Ls(p,{width:u,height:f});i=m.x,a=m.y,h=null,d=null}else if(Ee(n)&&l){var g=$ee(n,v,c,r.get("borderWidth"));i=g[0],a=g[1]}else{var g=Bee(i,a,o,u,f,h?null:20,d?null:20);i=g[0],a=g[1]}if(h&&(i-=CC(h)?c[0]/2:h==="right"?c[0]:0),d&&(a-=CC(d)?c[1]/2:d==="bottom"?c[1]:0),_D(r)){var g=Fee(i,a,o,u,f);i=g[0],a=g[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],f=r[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&R(u,function(h,d){var v=c[d]||{},p=h.seriesDataIndices||[],m=v.seriesDataIndices||[];o=o&&h.value===v.value&&h.axisType===v.axisType&&h.axisId===v.axisId&&p.length===m.length,o&&R(p,function(g,y){var _=m[y];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),a&&R(h.seriesDataIndices,function(g){var y=g.seriesIndex,_=n[y],b=a[y];_&&b&&b.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){He.node||!n.getDom()||(wm(this,"_updatePosition"),this._tooltipContent.dispose(),Fm("itemTooltip",n))},t.type="tooltip",t}(Mi);function bl(e,t,r){var n=t.ecModel,i;r?(i=new sr(r,n,n),i=new sr(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof sr&&(o=o.get("tooltip",!0)),Ee(o)&&(o={formatter:o}),o&&(i=new sr(o,i,n)))}return i}function xC(e,t){return e.dispatchAction||xt(t.dispatchAction,t)}function Bee(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function Fee(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function $ee(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function CC(e){return e==="center"||e==="middle"}function Hee(e,t,r){var n=v0(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=lf(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=dt(u).tooltipConfig;if(f&&f.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const zee=Nee;function Vee(e){va(yD),e.registerComponentModel(See),e.registerComponentView(zee),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Er),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Er)}var Wee=function(e){ge(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Mt),Gee=function(e){ge(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=Ze(r.get("textBaseline"),r.get("textVerticalAlign")),f=new mr({style:ha(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=r.get("subtext"),d=new mr({style:ha(s,{text:h,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),p=r.get("sublink"),m=r.get("triggerEvent",!0);f.silent=!v&&!m,d.silent=!p&&!m,v&&f.on("click",function(){bS(v,"_"+r.get("target"))}),p&&d.on("click",function(){bS(p,"_"+r.get("subtarget"))}),dt(f).eventData=dt(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),h&&a.add(d);var g=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=g.width,y.height=g.height;var _=Ls(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var b={align:l,verticalAlign:u};f.setStyle(b),d.setStyle(b),g=a.getBoundingRect();var x=_.margin,w=r.getItemStyle(["color","opacity"]);w.fill=r.get("backgroundColor");var S=new Gt({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:r.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(S)}},t.type="title",t}(Mi);function Uee(e){e.registerComponentModel(Wee),e.registerComponentView(Gee)}var Yee=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},jee=function(e){ge(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),ye(n)&&R(n,function(a,o){Ee(a)&&(a={type:a}),n[o]=st(a,Yee(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(Mt);const $m=jee;var jo=Ot,Hm=R,wc=Ur,qee=function(e){ge(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new wc),this.group.add(this._selectorGroup=new wc),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},h=r.get("padding"),d=Ls(f,c,h),v=this.layoutInner(r,o,d,a,l,u),p=Ls(ht({width:v.width,height:v.height},f),c,h);this.group.x=p.x-v.x,this.group.y=p.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=bee(v,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),f=je(),c=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),Hm(n.getData(),function(d,v){var p=d.get("name");if(!this.newlineDisabled&&(p===""||p===` `)){var m=new wc;m.newline=!0,u.add(m);return}var g=i.getSeriesByName(p)[0];if(!f.get(p))if(g){var y=g.getData(),_=y.getVisual("legendLineStyle")||{},b=y.getVisual("legendIcon"),x=y.getVisual("style"),w=this._createItem(g,p,v,d,n,r,_,x,b,c,a);w.on("click",jo(TC,p,null,a,h)).on("mouseover",jo(zm,g.name,null,a,h)).on("mouseout",jo(Vm,g.name,null,a,h)),f.set(p,!0)}else i.eachRawSeries(function(S){if(!f.get(p)&&S.legendVisualProvider){var C=S.legendVisualProvider;if(!C.containName(p))return;var M=C.indexOfName(p),A=C.getItemVisual(M,"style"),P=C.getItemVisual(M,"legendIcon"),E=uo(A.fill);E&&E[3]===0&&(E[3]=.2,A=ue(ue({},A),{fill:s0(E,"rgba")}));var L=this._createItem(S,p,v,d,n,r,{},A,P,c,a);L.on("click",jo(TC,null,p,a,h)).on("mouseover",jo(zm,null,p,a,h)).on("mouseout",jo(Vm,null,p,a,h)),f.set(p,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();Hm(r,function(u){var f=u.type,c=new mr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);E0(c,{normal:h,emphasis:d},{defaultText:u.title}),um(c)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,f,c,h){var d=r.visualDrawType,v=o.get("itemWidth"),p=o.get("itemHeight"),m=o.isSelected(n),g=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var b=Kee(f,a,l,u,d,m,h),x=new wc,w=a.getModel("textStyle");if(Ye(r.getLegendIcon)&&(!_||_==="inherit"))x.add(r.getLegendIcon({itemWidth:v,itemHeight:p,icon:f,iconRotate:g,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var S=_==="inherit"&&r.getData().getVisual("symbol")?g==="inherit"?r.getData().getVisual("symbolRotate"):g:0;x.add(Xee({itemWidth:v,itemHeight:p,icon:f,iconRotate:S,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?v+5:-5,M=s,A=o.get("formatter"),P=n;Ee(A)&&A?P=A.replace("{name}",n??""):Ye(A)&&(P=A(n));var E=m?w.getTextColor():a.get("inactiveColor");x.add(new mr({style:ha(w,{text:P,x:C,y:p/2,fill:E,align:M,verticalAlign:"middle"},{inheritColor:E})}));var L=new Gt({shape:x.getBoundingRect(),invisible:!0}),O=a.getModel("tooltip");return O.get("show")&&A0({el:L,componentModel:o,itemName:n,itemTooltipOption:O.option}),x.add(L),x.eachChild(function(N){N.silent=!0}),L.silent=!c,this.getContentGroup().add(x),um(x),x.__legendDataIndex=i,x},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ru(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){ru("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],v=r.get("selectorButtonGap",!0),p=r.getOrient().index,m=p===0?"width":"height",g=p===0?"height":"width",y=p===0?"y":"x";s==="end"?d[p]+=f[m]+v:c[p]+=h[m]+v,d[1-p]+=f[g]/2-h[g]/2,u.x=d[0],u.y=d[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[m]=f[m]+v+h[m],_[g]=Math.max(f[g],h[g]),_[y]=Math.min(0,h[y]+d[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Mi);function Kee(e,t,r,n,i,a,o){function s(m,g){m.lineWidth==="auto"&&(m.lineWidth=g.lineWidth>0?2:0),Hm(m,function(y,_){m[_]==="inherit"&&(m[_]=g[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:Mm(c,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=t.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=v==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function Xee(e){var t=e.icon||"roundRect",r=j0(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function TC(e,t,r,n){Vm(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),zm(e,t,r,n)}function xD(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;ni[o],m=[-d.x,-d.y];n||(m[a]=f[u]);var g=[0,0],y=[-v.x,-v.y],_=Ze(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:g[a]+=v[o]+_}y[1-a]+=d[s]/2-v[s]/2,f.setPosition(m),c.setPosition(g),h.setPosition(y);var x={x:0,y:0};if(x[o]=p?i[o]:d[o],x[s]=Math.max(d[s],v[s]),x[l]=Math.min(0,v[l]+y[1-a]),c.__rectSize=i[o],p){var w={x:0,y:0};w[o]=Math.max(i[o]-v[o]-_,0),w[s]=x[s],c.setClipPath(new Gt({shape:w})),c.__rectSize=w[o]}else h.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(r);return S.pageIndex!=null&&Or(f,{x:S.contentPosition[0],y:S.contentPosition[1]},p?r:null),this._updatePageInfoView(r,S),x},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,d=i.childOfName(f);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Ee(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=Rp[o],l=kp[o],u=this._findTargetItemIndex(n),f=i.children(),c=f[u],h=f.length,d=h?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return v;var p=b(c);v.contentPosition[o]=-p.s;for(var m=u+1,g=p,y=p,_=null;m<=h;++m)_=b(f[m]),(!_&&y.e>g.s+a||_&&!x(_,g.s))&&(y.i>g.i?g=y:g=_,g&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=g.i),++v.pageCount)),y=_;for(var m=u-1,g=p,y=p,_=null;m>=-1;--m)_=b(f[m]),(!_||!x(y,_.s))&&g.i=S&&w.s<=S+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(CD);const rte=tte;function nte(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function ite(e){va(TD),e.registerComponentModel(ete),e.registerComponentView(rte),nte(e)}function ate(e){va(TD),va(ite)}va([tJ,$Q,GJ,vQ,Uee,Vee,ate,_ee]);function ote(e,t,r){const n=Z0(document.getElementById(e),"macarons");n.showLoading();const i={title:{text:"Network Traffic",subtext:"today",left:"center"},tooltip:{trigger:"item",formatter:function(a){return Mu.fileSize(a.data.value)+" ("+a.percent+"%)"}},legend:{orient:"vertical",left:"left",data:["Traffic In","Traffic Out"]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[{value:t,name:"Traffic In"},{value:r,name:"Traffic Out"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};n.setOption(i),n.hideLoading()}function ste(e,t){const r=Z0(document.getElementById(e),"macarons");r.showLoading();const n={title:{text:"Proxies",subtext:"now",left:"center"},tooltip:{trigger:"item",formatter:function(i){return String(i.data.value)}},legend:{orient:"vertical",left:"left",data:[]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};t.proxyTypeCount.tcp!=null&&t.proxyTypeCount.tcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.tcp,name:"TCP"}),n.legend.data.push("TCP")),t.proxyTypeCount.udp!=null&&t.proxyTypeCount.udp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.udp,name:"UDP"}),n.legend.data.push("UDP")),t.proxyTypeCount.http!=null&&t.proxyTypeCount.http!=0&&(n.series[0].data.push({value:t.proxyTypeCount.http,name:"HTTP"}),n.legend.data.push("HTTP")),t.proxyTypeCount.https!=null&&t.proxyTypeCount.https!=0&&(n.series[0].data.push({value:t.proxyTypeCount.https,name:"HTTPS"}),n.legend.data.push("HTTPS")),t.proxyTypeCount.stcp!=null&&t.proxyTypeCount.stcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.stcp,name:"STCP"}),n.legend.data.push("STCP")),t.proxyTypeCount.sudp!=null&&t.proxyTypeCount.sudp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.sudp,name:"SUDP"}),n.legend.data.push("SUDP")),t.proxyTypeCount.xtcp!=null&&t.proxyTypeCount.xtcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.xtcp,name:"XTCP"}),n.legend.data.push("XTCP")),r.setOption(n),r.hideLoading()}function lte(e,t,r){const n={width:"600px",height:"400px"},i=Z0(document.getElementById(e),"macarons",n);i.showLoading(),t=t.reverse(),r=r.reverse();let a=new Date;a=new Date(a.getFullYear(),a.getMonth(),a.getDate()-6);const o=[];for(let l=0;l<7;l++)o.push(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()),a=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1);const s={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(l){let u="";l.length>0&&(u+=l[0].name+"
");for(const f of l){const c='';u+=c+f.seriesName+": "+Mu.fileSize(f.value)+"
"}return u}},legend:{data:["Traffic In","Traffic Out"]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:o}],yAxis:[{type:"value",axisLabel:{formatter:function(l){return Mu.fileSize(l)}}}],series:[{name:"Traffic In",type:"bar",data:t},{name:"Traffic Out",type:"bar",data:r}]};i.setOption(s),i.hideLoading()}const PC=ie({__name:"LongSpan",props:{content:{},length:{}},setup(e){return(t,r)=>{const n=Hs;return G(),ce(ft,null,[Z(n,{content:t.content,placement:"top"},{default:j(()=>[qt(ee("span",null,be(t.content.slice(0,t.length))+"...",513),[[Kn,t.content.length>t.length]])]),_:1},8,["content"]),qt(ee("span",null,be(t.content),513),[[Kn,t.content.length<30]])],64)}}}),ute={class:"source"},fte=ee("div",{id:"traffic",style:{width:"400px",height:"250px","margin-bottom":"30px"}},null,-1),cte=ee("div",{id:"proxies",style:{width:"400px",height:"250px"}},null,-1),dte=ie({__name:"ServerOverview",setup(e){let t=$({version:"",bindPort:0,kcpBindPort:0,quicBindPort:0,vhostHTTPPort:0,vhostHTTPSPort:0,tcpmuxHTTPConnectPort:0,subdomainHost:"",maxPoolCount:0,maxPortsPerClient:"",allowPortsStr:"",tlsForce:!1,heartbeatTimeout:0,clientCounts:0,curConns:0,proxyCounts:0});return(()=>{fetch("../api/serverinfo",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value.version=n.version,t.value.bindPort=n.bindPort,t.value.kcpBindPort=n.kcpBindPort,t.value.quicBindPort=n.quicBindPort,t.value.vhostHTTPPort=n.vhostHTTPPort,t.value.vhostHTTPSPort=n.vhostHTTPSPort,t.value.tcpmuxHTTPConnectPort=n.tcpmuxHTTPConnectPort,t.value.subdomainHost=n.subdomainHost,t.value.maxPoolCount=n.maxPoolCount,t.value.maxPortsPerClient=n.maxPortsPerClient,t.value.maxPortsPerClient=="0"&&(t.value.maxPortsPerClient="no limit"),t.value.allowPortsStr=n.allowPortsStr,t.value.tlsForce=n.tlsForce,t.value.heartbeatTimeout=n.heartbeatTimeout,t.value.clientCounts=n.clientCounts,t.value.curConns=n.curConns,t.value.proxyCounts=0,n.proxyTypeCount!=null&&(n.proxyTypeCount.tcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.tcp),n.proxyTypeCount.udp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.udp),n.proxyTypeCount.http!=null&&(t.value.proxyCounts+=n.proxyTypeCount.http),n.proxyTypeCount.https!=null&&(t.value.proxyCounts+=n.proxyTypeCount.https),n.proxyTypeCount.stcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.stcp),n.proxyTypeCount.sudp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.sudp),n.proxyTypeCount.xtcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.xtcp)),ote("traffic",n.totalTrafficIn,n.totalTrafficOut),ste("proxies",n)}).catch(()=>{Wl({showClose:!0,message:"Get server info from frps failed!",type:"warning"})})})(),(n,i)=>{const a=sA,o=oA,s=$A,l=FA;return G(),ce("div",null,[Z(l,null,{default:j(()=>[Z(s,{md:12},{default:j(()=>[ee("div",ute,[Z(o,{"label-position":"left","label-width":"220px",class:"server_info"},{default:j(()=>[Z(a,{label:"Version"},{default:j(()=>[ee("span",null,be(T(t).version),1)]),_:1}),Z(a,{label:"BindPort"},{default:j(()=>[ee("span",null,be(T(t).bindPort),1)]),_:1}),T(t).kcpBindPort!=0?(G(),de(a,{key:0,label:"KCP Bind Port"},{default:j(()=>[ee("span",null,be(T(t).kcpBindPort),1)]),_:1})):Ae("",!0),T(t).quicBindPort!=0?(G(),de(a,{key:1,label:"QUIC Bind Port"},{default:j(()=>[ee("span",null,be(T(t).quicBindPort),1)]),_:1})):Ae("",!0),T(t).vhostHTTPPort!=0?(G(),de(a,{key:2,label:"Http Port"},{default:j(()=>[ee("span",null,be(T(t).vhostHTTPPort),1)]),_:1})):Ae("",!0),T(t).vhostHTTPSPort!=0?(G(),de(a,{key:3,label:"Https Port"},{default:j(()=>[ee("span",null,be(T(t).vhostHTTPSPort),1)]),_:1})):Ae("",!0),T(t).tcpmuxHTTPConnectPort!=0?(G(),de(a,{key:4,label:"TCPMux HTTPConnect Port"},{default:j(()=>[ee("span",null,be(T(t).tcpmuxHTTPConnectPort),1)]),_:1})):Ae("",!0),T(t).subdomainHost!=""?(G(),de(a,{key:5,label:"Subdomain Host"},{default:j(()=>[Z(PC,{content:T(t).subdomainHost,length:30},null,8,["content"])]),_:1})):Ae("",!0),Z(a,{label:"Max PoolCount"},{default:j(()=>[ee("span",null,be(T(t).maxPoolCount),1)]),_:1}),Z(a,{label:"Max Ports Per Client"},{default:j(()=>[ee("span",null,be(T(t).maxPortsPerClient),1)]),_:1}),T(t).allowPortsStr!=""?(G(),de(a,{key:6,label:"Allow Ports"},{default:j(()=>[Z(PC,{content:T(t).allowPortsStr,length:30},null,8,["content"])]),_:1})):Ae("",!0),T(t).tlsForce===!0?(G(),de(a,{key:7,label:"TLS Force"},{default:j(()=>[ee("span",null,be(T(t).tlsForce),1)]),_:1})):Ae("",!0),Z(a,{label:"HeartBeat Timeout"},{default:j(()=>[ee("span",null,be(T(t).heartbeatTimeout),1)]),_:1}),Z(a,{label:"Client Counts"},{default:j(()=>[ee("span",null,be(T(t).clientCounts),1)]),_:1}),Z(a,{label:"Current Connections"},{default:j(()=>[ee("span",null,be(T(t).curConns),1)]),_:1}),Z(a,{label:"Proxy Counts"},{default:j(()=>[ee("span",null,be(T(t).proxyCounts),1)]),_:1})]),_:1})])]),_:1}),Z(s,{md:12},{default:j(()=>[fte,cte]),_:1})]),_:1})])}}});class qs{constructor(t){zt(this,"name");zt(this,"type");zt(this,"annotations");zt(this,"encryption");zt(this,"compression");zt(this,"conns");zt(this,"trafficIn");zt(this,"trafficOut");zt(this,"lastStartTime");zt(this,"lastCloseTime");zt(this,"status");zt(this,"clientVersion");zt(this,"addr");zt(this,"port");zt(this,"customDomains");zt(this,"hostHeaderRewrite");zt(this,"locations");zt(this,"subdomain");var r,n,i,a,o;if(this.name=t.name,this.type="",this.annotations=new Map,(r=t.conf)!=null&&r.annotations)for(const s in t.conf.annotations)this.annotations.set(s,t.conf.annotations[s]);this.encryption=!1,this.compression=!1,this.encryption=((i=(n=t.conf)==null?void 0:n.transport)==null?void 0:i.useEncryption)||this.encryption,this.compression=((o=(a=t.conf)==null?void 0:a.transport)==null?void 0:o.useCompression)||this.compression,this.conns=t.curConns,this.trafficIn=t.todayTrafficIn,this.trafficOut=t.todayTrafficOut,this.lastStartTime=t.lastStartTime,this.lastCloseTime=t.lastCloseTime,this.status=t.status,this.clientVersion=t.clientVersion,this.addr="",this.port=0,this.customDomains="",this.hostHeaderRewrite="",this.locations="",this.subdomain=""}}class hte extends qs{constructor(t){super(t),this.type="tcp",t.conf!=null?(this.addr=":"+t.conf.remotePort,this.port=t.conf.remotePort):(this.addr="",this.port=0)}}class vte extends qs{constructor(t){super(t),this.type="udp",t.conf!=null?(this.addr=":"+t.conf.remotePort,this.port=t.conf.remotePort):(this.addr="",this.port=0)}}class pte extends qs{constructor(t,r,n){super(t),this.type="http",this.port=r,t.conf&&(this.customDomains=t.conf.customDomains||this.customDomains,this.hostHeaderRewrite=t.conf.hostHeaderRewrite,this.locations=t.conf.locations,t.conf.subdomain&&(this.subdomain=`${t.conf.subdomain}.${n}`))}}class gte extends qs{constructor(t,r,n){super(t),this.type="https",this.port=r,t.conf!=null&&(this.customDomains=t.conf.customDomains||this.customDomains,t.conf.subdomain&&(this.subdomain=`${t.conf.subdomain}.${n}`))}}class mte extends qs{constructor(t){super(t),this.type="stcp"}}class yte extends qs{constructor(t){super(t),this.type="sudp"}}const _te=["id"],bte=ie({__name:"Traffic",props:{proxyName:{}},setup(e){const t=e;return(()=>{let n="../api/traffic/"+t.proxyName;fetch(n,{credentials:"include"}).then(i=>i.json()).then(i=>{lte(t.proxyName,i.trafficIn,i.trafficOut)}).catch(i=>{Wl({showClose:!0,message:"Get traffic info failed!"+i,type:"warning"})})})(),(n,i)=>(G(),ce("div",{id:n.proxyName,style:{width:"600px",height:"400px"}},null,8,_te))}}),wte={key:2},Ste={class:"annotation-key"},xte=ie({__name:"ProxyViewExpand",props:{row:{},proxyType:{}},setup(e){const t=e,r=()=>{const n=[];return t.row.annotations&&t.row.annotations.forEach((i,a)=>{n.push({key:a,value:i})}),n};return(n,i)=>{const a=sA,o=oA,s=VA,l=wW;return G(),ce(ft,null,[n.proxyType==="http"||n.proxyType==="https"?(G(),de(o,{key:0,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:j(()=>[Z(a,{label:"Name"},{default:j(()=>[ee("span",null,be(n.row.name),1)]),_:1}),Z(a,{label:"Type"},{default:j(()=>[ee("span",null,be(n.row.type),1)]),_:1}),Z(a,{label:"Domains"},{default:j(()=>[ee("span",null,be(n.row.customDomains),1)]),_:1}),Z(a,{label:"SubDomain"},{default:j(()=>[ee("span",null,be(n.row.subdomain),1)]),_:1}),Z(a,{label:"locations"},{default:j(()=>[ee("span",null,be(n.row.locations),1)]),_:1}),Z(a,{label:"HostRewrite"},{default:j(()=>[ee("span",null,be(n.row.hostHeaderRewrite),1)]),_:1}),Z(a,{label:"Encryption"},{default:j(()=>[ee("span",null,be(n.row.encryption),1)]),_:1}),Z(a,{label:"Compression"},{default:j(()=>[ee("span",null,be(n.row.compression),1)]),_:1}),Z(a,{label:"Last Start"},{default:j(()=>[ee("span",null,be(n.row.lastStartTime),1)]),_:1}),Z(a,{label:"Last Close"},{default:j(()=>[ee("span",null,be(n.row.lastCloseTime),1)]),_:1})]),_:1})):(G(),de(o,{key:1,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:j(()=>[Z(a,{label:"Name"},{default:j(()=>[ee("span",null,be(n.row.name),1)]),_:1}),Z(a,{label:"Type"},{default:j(()=>[ee("span",null,be(n.row.type),1)]),_:1}),Z(a,{label:"Addr"},{default:j(()=>[ee("span",null,be(n.row.addr),1)]),_:1}),Z(a,{label:"Encryption"},{default:j(()=>[ee("span",null,be(n.row.encryption),1)]),_:1}),Z(a,{label:"Compression"},{default:j(()=>[ee("span",null,be(n.row.compression),1)]),_:1}),Z(a,{label:"Last Start"},{default:j(()=>[ee("span",null,be(n.row.lastStartTime),1)]),_:1}),Z(a,{label:"Last Close"},{default:j(()=>[ee("span",null,be(n.row.lastCloseTime),1)]),_:1})]),_:1})),n.row.annotations&&n.row.annotations.size>0?(G(),ce("div",wte,[Z(s),Z(l,{class:"title-text",size:"large"},{default:j(()=>[mt("Annotations")]),_:1}),ee("ul",null,[(G(!0),ce(ft,null,Hp(r(),u=>(G(),ce("li",null,[ee("span",Ste,be(u.key),1),ee("span",null,be(u.value),1)]))),256))])])):Ae("",!0)],64)}}}),Cte={class:"flex items-center",style:{"margin-right":"30px"}},Ks=ie({__name:"ProxyView",props:{proxies:{},proxyType:{}},emits:["refresh"],setup(e,{emit:t}){const r=t,n=$(!1),i=$(""),a=(l,u)=>Mu.fileSize(l.trafficIn),o=(l,u)=>Mu.fileSize(l.trafficOut),s=()=>{fetch("/api/proxies?status=offline",{method:"DELETE",credentials:"include"}).then(l=>{l.ok?(Wl({message:"Successfully cleared offline proxies",type:"success"}),r("refresh")):Wl({message:"Failed to clear offline proxies: "+l.status+" "+l.statusText,type:"warning"})}).catch(l=>{Wl({message:"Failed to clear offline proxies: "+l.message,type:"warning"})})};return(l,u)=>{const f=yg,c=eV,h=q6,d=gW,v=N8,p=pW,m=bte,g=p6;return G(),ce(ft,null,[ee("div",null,[Z(h,{icon:null,style:{width:"100%","margin-left":"30px","margin-bottom":"20px"}},{title:j(()=>[ee("span",null,be(l.proxyType),1)]),content:j(()=>[]),extra:j(()=>[ee("div",Cte,[Z(c,{title:"Are you sure to clear all data of offline proxies?",onConfirm:s},{reference:j(()=>[Z(f,null,{default:j(()=>[mt("ClearOfflineProxies")]),_:1})]),_:1}),Z(f,{onClick:u[0]||(u[0]=y=>l.$emit("refresh"))},{default:j(()=>[mt("Refresh")]),_:1})])]),_:1}),Z(p,{data:l.proxies,"default-sort":{prop:"name",order:"ascending"},style:{width:"100%"}},{default:j(()=>[Z(d,{type:"expand"},{default:j(y=>[Z(xte,{row:y.row,proxyType:l.proxyType},null,8,["row","proxyType"])]),_:1}),Z(d,{label:"Name",prop:"name",sortable:""}),Z(d,{label:"Port",prop:"port",sortable:""}),Z(d,{label:"Connections",prop:"conns",sortable:""}),Z(d,{label:"Traffic In",prop:"trafficIn",formatter:a,sortable:""}),Z(d,{label:"Traffic Out",prop:"trafficOut",formatter:o,sortable:""}),Z(d,{label:"ClientVersion",prop:"clientVersion",sortable:""}),Z(d,{label:"Status",prop:"status",sortable:""},{default:j(y=>[y.row.status==="online"?(G(),de(v,{key:0,type:"success"},{default:j(()=>[mt(be(y.row.status),1)]),_:2},1024)):(G(),de(v,{key:1,type:"danger"},{default:j(()=>[mt(be(y.row.status),1)]),_:2},1024))]),_:1}),Z(d,{label:"Operations"},{default:j(y=>[Z(f,{type:"primary",name:y.row.name,style:{"margin-bottom":"10px"},onClick:_=>{i.value=y.row.name,n.value=!0}},{default:j(()=>[mt("Traffic ")]),_:2},1032,["name","onClick"])]),_:1})]),_:1},8,["data"])]),Z(g,{modelValue:n.value,"onUpdate:modelValue":u[1]||(u[1]=y=>n.value=y),"destroy-on-close":"true",title:i.value,width:"700px"},{default:j(()=>[Z(m,{proxyName:i.value},null,8,["proxyName"])]),_:1},8,["modelValue","title"])],64)}}}),Tte=ie({__name:"ProxiesTCP",setup(e){let t=$([]);const r=()=>{fetch("../api/proxy/tcp",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value=[];for(let i of n.proxies)t.value.push(new hte(i))})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"tcp",onRefresh:r},null,8,["proxies"]))}}),Mte=ie({__name:"ProxiesUDP",setup(e){let t=$([]);const r=()=>{fetch("../api/proxy/udp",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value=[];for(let i of n.proxies)t.value.push(new vte(i))})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"udp",onRefresh:r},null,8,["proxies"]))}}),Ate=ie({__name:"ProxiesHTTP",setup(e){let t=$([]);const r=()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhostHTTPPort,i=a.subdomainHost,!(n==null||n==0)&&fetch("../api/proxy/http",{credentials:"include"}).then(o=>o.json()).then(o=>{t.value=[];for(let s of o.proxies)t.value.push(new pte(s,n,i))})})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"http",onRefresh:r},null,8,["proxies"]))}}),Pte=ie({__name:"ProxiesHTTPS",setup(e){let t=$([]);const r=()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhostHTTPSPort,i=a.subdomainHost,!(n==null||n==0)&&fetch("../api/proxy/https",{credentials:"include"}).then(o=>o.json()).then(o=>{t.value=[];for(let s of o.proxies)t.value.push(new gte(s,n,i))})})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"https",onRefresh:r},null,8,["proxies"]))}}),Ete=ie({__name:"ProxiesSTCP",setup(e){let t=$([]);const r=()=>{fetch("../api/proxy/stcp",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value=[];for(let i of n.proxies)t.value.push(new mte(i))})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"stcp",onRefresh:r},null,8,["proxies"]))}}),Lte=ie({__name:"ProxiesSUDP",setup(e){let t=$([]);const r=()=>{fetch("../api/proxy/sudp",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value=[];for(let i of n.proxies)t.value.push(new yte(i))})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"sudp",onRefresh:r},null,8,["proxies"]))}}),Dte=jG({history:uG(),routes:[{path:"/",name:"ServerOverview",component:dte},{path:"/proxies/tcp",name:"ProxiesTCP",component:Tte},{path:"/proxies/udp",name:"ProxiesUDP",component:Mte},{path:"/proxies/http",name:"ProxiesHTTP",component:Ate},{path:"/proxies/https",name:"ProxiesHTTPS",component:Pte},{path:"/proxies/stcp",name:"ProxiesSTCP",component:Ete},{path:"/proxies/sudp",name:"ProxiesSUDP",component:Lte}]}),MD=oR(GW);MD.use(Dte);MD.mount("#app")});export default Ite(); +`||u==="")){var f=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&f:n[u]=f}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function Qee(e){e.registerAction("legendToggleSelect","legendselectchanged",Ot(wl,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Ot(wl,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Ot(wl,"inverseSelect")),e.registerAction("legendSelect","legendselected",Ot(wl,"select")),e.registerAction("legendUnSelect","legendunselected",Ot(wl,"unSelect"))}function TD(e){e.registerComponentModel($m),e.registerComponentView(CD),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Zee),e.registerSubTypeDefaulter("legend",function(){return"plain"}),Qee(e)}var Jee=function(e){ge(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=Rh(r);e.prototype.init.call(this,r,n,i),MC(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),MC(this,this.option,r)},t.type="legend.scroll",t.defaultOption=rE($m.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}($m);function MC(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Ds(t,r,{type:"box",ignoreSize:!!i})}const ete=Jee;var AC=Ur,Rp=["width","height"],kp=["x","y"],tte=function(e){ge(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new AC),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new AC)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var f=this._controllerGroup,c=n.get("pageIconSize",!0),h=ye(c)?c:[c,c];v("pagePrev",0);var d=n.getModel("pageTextStyle");f.add(new mr({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(p,m){var g=p+"DataIndex",y=M0(n.get("pageIcons",!0)[n.getOrient().name][m],{onclick:xt(u._pageGo,u,g,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=p,f.add(y)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,f=Rp[u],c=kp[u],h=Rp[1-u],d=kp[1-u];o&&ru("horizontal",l,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),p=l.getBoundingRect(),m=[-p.x,-p.y],g=tt(i);o&&(g[f]=i[f]-p[f]-v);var y=this._layoutContentAndController(r,a,g,u,f,h,d,c);if(o){if(s==="end")m[u]+=y[f]+v;else{var _=p[f]+v;m[u]-=_,y[c]-=_}y[f]+=p[f]+v,m[1-u]+=y[d]+y[h]/2-p[h]/2,y[h]=Math.max(y[h],p[h]),y[d]=Math.min(y[d],p[d]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;ru(r.get("orient"),f,r.get("itemGap"),a?i.width:null,a?null:i.height),ru("horizontal",h,r.get("pageButtonItemGap",!0));var d=f.getBoundingRect(),v=h.getBoundingRect(),p=this._showController=d[o]>i[o],m=[-d.x,-d.y];n||(m[a]=f[u]);var g=[0,0],y=[-v.x,-v.y],_=Ze(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:g[a]+=v[o]+_}y[1-a]+=d[s]/2-v[s]/2,f.setPosition(m),c.setPosition(g),h.setPosition(y);var x={x:0,y:0};if(x[o]=p?i[o]:d[o],x[s]=Math.max(d[s],v[s]),x[l]=Math.min(0,v[l]+y[1-a]),c.__rectSize=i[o],p){var w={x:0,y:0};w[o]=Math.max(i[o]-v[o]-_,0),w[s]=x[s],c.setClipPath(new Gt({shape:w})),c.__rectSize=w[o]}else h.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(r);return S.pageIndex!=null&&Or(f,{x:S.contentPosition[0],y:S.contentPosition[1]},p?r:null),this._updatePageInfoView(r,S),x},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,d=i.childOfName(f);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Ee(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=Rp[o],l=kp[o],u=this._findTargetItemIndex(n),f=i.children(),c=f[u],h=f.length,d=h?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return v;var p=b(c);v.contentPosition[o]=-p.s;for(var m=u+1,g=p,y=p,_=null;m<=h;++m)_=b(f[m]),(!_&&y.e>g.s+a||_&&!x(_,g.s))&&(y.i>g.i?g=y:g=_,g&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=g.i),++v.pageCount)),y=_;for(var m=u-1,g=p,y=p,_=null;m>=-1;--m)_=b(f[m]),(!_||!x(y,_.s))&&g.i=S&&w.s<=S+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(CD);const rte=tte;function nte(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function ite(e){va(TD),e.registerComponentModel(ete),e.registerComponentView(rte),nte(e)}function ate(e){va(TD),va(ite)}va([tJ,$Q,GJ,vQ,Uee,Vee,ate,_ee]);function ote(e,t,r){const n=Z0(document.getElementById(e),"macarons");n.showLoading();const i={title:{text:"Network Traffic",subtext:"today",left:"center"},tooltip:{trigger:"item",formatter:function(a){return Mu.fileSize(a.data.value)+" ("+a.percent+"%)"}},legend:{orient:"vertical",left:"left",data:["Traffic In","Traffic Out"]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[{value:t,name:"Traffic In"},{value:r,name:"Traffic Out"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};n.setOption(i),n.hideLoading()}function ste(e,t){const r=Z0(document.getElementById(e),"macarons");r.showLoading();const n={title:{text:"Proxies",subtext:"now",left:"center"},tooltip:{trigger:"item",formatter:function(i){return String(i.data.value)}},legend:{orient:"vertical",left:"left",data:[]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};t.proxyTypeCount.tcp!=null&&t.proxyTypeCount.tcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.tcp,name:"TCP"}),n.legend.data.push("TCP")),t.proxyTypeCount.udp!=null&&t.proxyTypeCount.udp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.udp,name:"UDP"}),n.legend.data.push("UDP")),t.proxyTypeCount.http!=null&&t.proxyTypeCount.http!=0&&(n.series[0].data.push({value:t.proxyTypeCount.http,name:"HTTP"}),n.legend.data.push("HTTP")),t.proxyTypeCount.https!=null&&t.proxyTypeCount.https!=0&&(n.series[0].data.push({value:t.proxyTypeCount.https,name:"HTTPS"}),n.legend.data.push("HTTPS")),t.proxyTypeCount.stcp!=null&&t.proxyTypeCount.stcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.stcp,name:"STCP"}),n.legend.data.push("STCP")),t.proxyTypeCount.sudp!=null&&t.proxyTypeCount.sudp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.sudp,name:"SUDP"}),n.legend.data.push("SUDP")),t.proxyTypeCount.xtcp!=null&&t.proxyTypeCount.xtcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.xtcp,name:"XTCP"}),n.legend.data.push("XTCP")),r.setOption(n),r.hideLoading()}function lte(e,t,r){const n={width:"600px",height:"400px"},i=Z0(document.getElementById(e),"macarons",n);i.showLoading(),t=t.reverse(),r=r.reverse();let a=new Date;a=new Date(a.getFullYear(),a.getMonth(),a.getDate()-6);const o=[];for(let l=0;l<7;l++)o.push(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()),a=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1);const s={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(l){let u="";l.length>0&&(u+=l[0].name+"
");for(const f of l){const c='';u+=c+f.seriesName+": "+Mu.fileSize(f.value)+"
"}return u}},legend:{data:["Traffic In","Traffic Out"]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:o}],yAxis:[{type:"value",axisLabel:{formatter:function(l){return Mu.fileSize(l)}}}],series:[{name:"Traffic In",type:"bar",data:t},{name:"Traffic Out",type:"bar",data:r}]};i.setOption(s),i.hideLoading()}const PC=ie({__name:"LongSpan",props:{content:{},length:{}},setup(e){return(t,r)=>{const n=Hs;return G(),ce(ft,null,[Z(n,{content:t.content,placement:"top"},{default:j(()=>[qt(ee("span",null,be(t.content.slice(0,t.length))+"...",513),[[Kn,t.content.length>t.length]])]),_:1},8,["content"]),qt(ee("span",null,be(t.content),513),[[Kn,t.content.length<30]])],64)}}}),ute={class:"source"},fte=ee("div",{id:"traffic",style:{width:"400px",height:"250px","margin-bottom":"30px"}},null,-1),cte=ee("div",{id:"proxies",style:{width:"400px",height:"250px"}},null,-1),dte=ie({__name:"ServerOverview",setup(e){let t=$({version:"",bindPort:0,kcpBindPort:0,quicBindPort:0,vhostHTTPPort:0,vhostHTTPSPort:0,tcpmuxHTTPConnectPort:0,subdomainHost:"",maxPoolCount:0,maxPortsPerClient:"",allowPortsStr:"",tlsForce:!1,heartbeatTimeout:0,clientCounts:0,curConns:0,proxyCounts:0});return(()=>{fetch("../api/serverinfo",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value.version=n.version,t.value.bindPort=n.bindPort,t.value.kcpBindPort=n.kcpBindPort,t.value.quicBindPort=n.quicBindPort,t.value.vhostHTTPPort=n.vhostHTTPPort,t.value.vhostHTTPSPort=n.vhostHTTPSPort,t.value.tcpmuxHTTPConnectPort=n.tcpmuxHTTPConnectPort,t.value.subdomainHost=n.subdomainHost,t.value.maxPoolCount=n.maxPoolCount,t.value.maxPortsPerClient=n.maxPortsPerClient,t.value.maxPortsPerClient=="0"&&(t.value.maxPortsPerClient="no limit"),t.value.allowPortsStr=n.allowPortsStr,t.value.tlsForce=n.tlsForce,t.value.heartbeatTimeout=n.heartbeatTimeout,t.value.clientCounts=n.clientCounts,t.value.curConns=n.curConns,t.value.proxyCounts=0,n.proxyTypeCount!=null&&(n.proxyTypeCount.tcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.tcp),n.proxyTypeCount.udp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.udp),n.proxyTypeCount.http!=null&&(t.value.proxyCounts+=n.proxyTypeCount.http),n.proxyTypeCount.https!=null&&(t.value.proxyCounts+=n.proxyTypeCount.https),n.proxyTypeCount.stcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.stcp),n.proxyTypeCount.sudp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.sudp),n.proxyTypeCount.xtcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.xtcp)),ote("traffic",n.totalTrafficIn,n.totalTrafficOut),ste("proxies",n)}).catch(()=>{Wl({showClose:!0,message:"Get server info from frps failed!",type:"warning"})})})(),(n,i)=>{const a=sA,o=oA,s=$A,l=FA;return G(),ce("div",null,[Z(l,null,{default:j(()=>[Z(s,{md:12},{default:j(()=>[ee("div",ute,[Z(o,{"label-position":"left","label-width":"220px",class:"server_info"},{default:j(()=>[Z(a,{label:"Version"},{default:j(()=>[ee("span",null,be(T(t).version),1)]),_:1}),Z(a,{label:"BindPort"},{default:j(()=>[ee("span",null,be(T(t).bindPort),1)]),_:1}),T(t).kcpBindPort!=0?(G(),de(a,{key:0,label:"KCP Bind Port"},{default:j(()=>[ee("span",null,be(T(t).kcpBindPort),1)]),_:1})):Ae("",!0),T(t).quicBindPort!=0?(G(),de(a,{key:1,label:"QUIC Bind Port"},{default:j(()=>[ee("span",null,be(T(t).quicBindPort),1)]),_:1})):Ae("",!0),T(t).vhostHTTPPort!=0?(G(),de(a,{key:2,label:"Http Port"},{default:j(()=>[ee("span",null,be(T(t).vhostHTTPPort),1)]),_:1})):Ae("",!0),T(t).vhostHTTPSPort!=0?(G(),de(a,{key:3,label:"Https Port"},{default:j(()=>[ee("span",null,be(T(t).vhostHTTPSPort),1)]),_:1})):Ae("",!0),T(t).tcpmuxHTTPConnectPort!=0?(G(),de(a,{key:4,label:"TCPMux HTTPConnect Port"},{default:j(()=>[ee("span",null,be(T(t).tcpmuxHTTPConnectPort),1)]),_:1})):Ae("",!0),T(t).subdomainHost!=""?(G(),de(a,{key:5,label:"Subdomain Host"},{default:j(()=>[Z(PC,{content:T(t).subdomainHost,length:30},null,8,["content"])]),_:1})):Ae("",!0),Z(a,{label:"Max PoolCount"},{default:j(()=>[ee("span",null,be(T(t).maxPoolCount),1)]),_:1}),Z(a,{label:"Max Ports Per Client"},{default:j(()=>[ee("span",null,be(T(t).maxPortsPerClient),1)]),_:1}),T(t).allowPortsStr!=""?(G(),de(a,{key:6,label:"Allow Ports"},{default:j(()=>[Z(PC,{content:T(t).allowPortsStr,length:30},null,8,["content"])]),_:1})):Ae("",!0),T(t).tlsForce===!0?(G(),de(a,{key:7,label:"TLS Force"},{default:j(()=>[ee("span",null,be(T(t).tlsForce),1)]),_:1})):Ae("",!0),Z(a,{label:"HeartBeat Timeout"},{default:j(()=>[ee("span",null,be(T(t).heartbeatTimeout),1)]),_:1}),Z(a,{label:"Client Counts"},{default:j(()=>[ee("span",null,be(T(t).clientCounts),1)]),_:1}),Z(a,{label:"Current Connections"},{default:j(()=>[ee("span",null,be(T(t).curConns),1)]),_:1}),Z(a,{label:"Proxy Counts"},{default:j(()=>[ee("span",null,be(T(t).proxyCounts),1)]),_:1})]),_:1})])]),_:1}),Z(s,{md:12},{default:j(()=>[fte,cte]),_:1})]),_:1})])}}});class qs{constructor(t){zt(this,"name");zt(this,"type");zt(this,"annotations");zt(this,"encryption");zt(this,"compression");zt(this,"conns");zt(this,"trafficIn");zt(this,"trafficOut");zt(this,"lastStartTime");zt(this,"lastCloseTime");zt(this,"status");zt(this,"clientVersion");zt(this,"addr");zt(this,"port");zt(this,"customDomains");zt(this,"hostHeaderRewrite");zt(this,"locations");zt(this,"subdomain");var r,n,i,a,o;if(this.name=t.name,this.type="",this.annotations=new Map,(r=t.conf)!=null&&r.annotations)for(const s in t.conf.annotations)this.annotations.set(s,t.conf.annotations[s]);this.encryption=!1,this.compression=!1,this.encryption=((i=(n=t.conf)==null?void 0:n.transport)==null?void 0:i.useEncryption)||this.encryption,this.compression=((o=(a=t.conf)==null?void 0:a.transport)==null?void 0:o.useCompression)||this.compression,this.conns=t.curConns,this.trafficIn=t.todayTrafficIn,this.trafficOut=t.todayTrafficOut,this.lastStartTime=t.lastStartTime,this.lastCloseTime=t.lastCloseTime,this.status=t.status,this.clientVersion=t.clientVersion,this.addr="",this.port=0,this.customDomains="",this.hostHeaderRewrite="",this.locations="",this.subdomain=""}}class hte extends qs{constructor(t){super(t),this.type="tcp",t.conf!=null?(this.addr=":"+t.conf.remotePort,this.port=t.conf.remotePort):(this.addr="",this.port=0)}}class vte extends qs{constructor(t){super(t),this.type="udp",t.conf!=null?(this.addr=":"+t.conf.remotePort,this.port=t.conf.remotePort):(this.addr="",this.port=0)}}class pte extends qs{constructor(t,r,n){super(t),this.type="http",this.port=r,t.conf&&(this.customDomains=t.conf.customDomains||this.customDomains,this.hostHeaderRewrite=t.conf.hostHeaderRewrite,this.locations=t.conf.locations,t.conf.subdomain&&(this.subdomain=`${t.conf.subdomain}.${n}`))}}class gte extends qs{constructor(t,r,n){super(t),this.type="https",this.port=r,t.conf!=null&&(this.customDomains=t.conf.customDomains||this.customDomains,t.conf.subdomain&&(this.subdomain=`${t.conf.subdomain}.${n}`))}}class mte extends qs{constructor(t){super(t),this.type="stcp"}}class yte extends qs{constructor(t){super(t),this.type="sudp"}}const _te=["id"],bte=ie({__name:"Traffic",props:{proxyName:{}},setup(e){const t=e;return(()=>{let n="../api/traffic/"+t.proxyName;fetch(n,{credentials:"include"}).then(i=>i.json()).then(i=>{lte(t.proxyName,i.trafficIn,i.trafficOut)}).catch(i=>{Wl({showClose:!0,message:"Get traffic info failed!"+i,type:"warning"})})})(),(n,i)=>(G(),ce("div",{id:n.proxyName,style:{width:"600px",height:"400px"}},null,8,_te))}}),wte={key:2},Ste={class:"annotation-key"},xte=ie({__name:"ProxyViewExpand",props:{row:{},proxyType:{}},setup(e){const t=e,r=()=>{const n=[];return t.row.annotations&&t.row.annotations.forEach((i,a)=>{n.push({key:a,value:i})}),n};return(n,i)=>{const a=sA,o=oA,s=VA,l=wW;return G(),ce(ft,null,[n.proxyType==="http"||n.proxyType==="https"?(G(),de(o,{key:0,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:j(()=>[Z(a,{label:"Name"},{default:j(()=>[ee("span",null,be(n.row.name),1)]),_:1}),Z(a,{label:"Type"},{default:j(()=>[ee("span",null,be(n.row.type),1)]),_:1}),Z(a,{label:"Domains"},{default:j(()=>[ee("span",null,be(n.row.customDomains),1)]),_:1}),Z(a,{label:"SubDomain"},{default:j(()=>[ee("span",null,be(n.row.subdomain),1)]),_:1}),Z(a,{label:"locations"},{default:j(()=>[ee("span",null,be(n.row.locations),1)]),_:1}),Z(a,{label:"HostRewrite"},{default:j(()=>[ee("span",null,be(n.row.hostHeaderRewrite),1)]),_:1}),Z(a,{label:"Encryption"},{default:j(()=>[ee("span",null,be(n.row.encryption),1)]),_:1}),Z(a,{label:"Compression"},{default:j(()=>[ee("span",null,be(n.row.compression),1)]),_:1}),Z(a,{label:"Last Start"},{default:j(()=>[ee("span",null,be(n.row.lastStartTime),1)]),_:1}),Z(a,{label:"Last Close"},{default:j(()=>[ee("span",null,be(n.row.lastCloseTime),1)]),_:1})]),_:1})):(G(),de(o,{key:1,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:j(()=>[Z(a,{label:"Name"},{default:j(()=>[ee("span",null,be(n.row.name),1)]),_:1}),Z(a,{label:"Type"},{default:j(()=>[ee("span",null,be(n.row.type),1)]),_:1}),Z(a,{label:"Addr"},{default:j(()=>[ee("span",null,be(n.row.addr),1)]),_:1}),Z(a,{label:"Encryption"},{default:j(()=>[ee("span",null,be(n.row.encryption),1)]),_:1}),Z(a,{label:"Compression"},{default:j(()=>[ee("span",null,be(n.row.compression),1)]),_:1}),Z(a,{label:"Last Start"},{default:j(()=>[ee("span",null,be(n.row.lastStartTime),1)]),_:1}),Z(a,{label:"Last Close"},{default:j(()=>[ee("span",null,be(n.row.lastCloseTime),1)]),_:1})]),_:1})),n.row.annotations&&n.row.annotations.size>0?(G(),ce("div",wte,[Z(s),Z(l,{class:"title-text",size:"large"},{default:j(()=>[mt("Annotations")]),_:1}),ee("ul",null,[(G(!0),ce(ft,null,Hp(r(),u=>(G(),ce("li",null,[ee("span",Ste,be(u.key),1),ee("span",null,be(u.value),1)]))),256))])])):Ae("",!0)],64)}}}),Cte={class:"flex items-center",style:{"margin-right":"30px"}},Ks=ie({__name:"ProxyView",props:{proxies:{},proxyType:{}},emits:["refresh"],setup(e,{emit:t}){const r=t,n=$(!1),i=$(""),a=(l,u)=>Mu.fileSize(l.trafficIn),o=(l,u)=>Mu.fileSize(l.trafficOut),s=()=>{fetch("../api/proxies?status=offline",{method:"DELETE",credentials:"include"}).then(l=>{l.ok?(Wl({message:"Successfully cleared offline proxies",type:"success"}),r("refresh")):Wl({message:"Failed to clear offline proxies: "+l.status+" "+l.statusText,type:"warning"})}).catch(l=>{Wl({message:"Failed to clear offline proxies: "+l.message,type:"warning"})})};return(l,u)=>{const f=yg,c=eV,h=q6,d=gW,v=N8,p=pW,m=bte,g=p6;return G(),ce(ft,null,[ee("div",null,[Z(h,{icon:null,style:{width:"100%","margin-left":"30px","margin-bottom":"20px"}},{title:j(()=>[ee("span",null,be(l.proxyType),1)]),content:j(()=>[]),extra:j(()=>[ee("div",Cte,[Z(c,{title:"Are you sure to clear all data of offline proxies?",onConfirm:s},{reference:j(()=>[Z(f,null,{default:j(()=>[mt("ClearOfflineProxies")]),_:1})]),_:1}),Z(f,{onClick:u[0]||(u[0]=y=>l.$emit("refresh"))},{default:j(()=>[mt("Refresh")]),_:1})])]),_:1}),Z(p,{data:l.proxies,"default-sort":{prop:"name",order:"ascending"},style:{width:"100%"}},{default:j(()=>[Z(d,{type:"expand"},{default:j(y=>[Z(xte,{row:y.row,proxyType:l.proxyType},null,8,["row","proxyType"])]),_:1}),Z(d,{label:"Name",prop:"name",sortable:""}),Z(d,{label:"Port",prop:"port",sortable:""}),Z(d,{label:"Connections",prop:"conns",sortable:""}),Z(d,{label:"Traffic In",prop:"trafficIn",formatter:a,sortable:""}),Z(d,{label:"Traffic Out",prop:"trafficOut",formatter:o,sortable:""}),Z(d,{label:"ClientVersion",prop:"clientVersion",sortable:""}),Z(d,{label:"Status",prop:"status",sortable:""},{default:j(y=>[y.row.status==="online"?(G(),de(v,{key:0,type:"success"},{default:j(()=>[mt(be(y.row.status),1)]),_:2},1024)):(G(),de(v,{key:1,type:"danger"},{default:j(()=>[mt(be(y.row.status),1)]),_:2},1024))]),_:1}),Z(d,{label:"Operations"},{default:j(y=>[Z(f,{type:"primary",name:y.row.name,style:{"margin-bottom":"10px"},onClick:_=>{i.value=y.row.name,n.value=!0}},{default:j(()=>[mt("Traffic ")]),_:2},1032,["name","onClick"])]),_:1})]),_:1},8,["data"])]),Z(g,{modelValue:n.value,"onUpdate:modelValue":u[1]||(u[1]=y=>n.value=y),"destroy-on-close":"true",title:i.value,width:"700px"},{default:j(()=>[Z(m,{proxyName:i.value},null,8,["proxyName"])]),_:1},8,["modelValue","title"])],64)}}}),Tte=ie({__name:"ProxiesTCP",setup(e){let t=$([]);const r=()=>{fetch("../api/proxy/tcp",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value=[];for(let i of n.proxies)t.value.push(new hte(i))})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"tcp",onRefresh:r},null,8,["proxies"]))}}),Mte=ie({__name:"ProxiesUDP",setup(e){let t=$([]);const r=()=>{fetch("../api/proxy/udp",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value=[];for(let i of n.proxies)t.value.push(new vte(i))})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"udp",onRefresh:r},null,8,["proxies"]))}}),Ate=ie({__name:"ProxiesHTTP",setup(e){let t=$([]);const r=()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhostHTTPPort,i=a.subdomainHost,!(n==null||n==0)&&fetch("../api/proxy/http",{credentials:"include"}).then(o=>o.json()).then(o=>{t.value=[];for(let s of o.proxies)t.value.push(new pte(s,n,i))})})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"http",onRefresh:r},null,8,["proxies"]))}}),Pte=ie({__name:"ProxiesHTTPS",setup(e){let t=$([]);const r=()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhostHTTPSPort,i=a.subdomainHost,!(n==null||n==0)&&fetch("../api/proxy/https",{credentials:"include"}).then(o=>o.json()).then(o=>{t.value=[];for(let s of o.proxies)t.value.push(new gte(s,n,i))})})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"https",onRefresh:r},null,8,["proxies"]))}}),Ete=ie({__name:"ProxiesSTCP",setup(e){let t=$([]);const r=()=>{fetch("../api/proxy/stcp",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value=[];for(let i of n.proxies)t.value.push(new mte(i))})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"stcp",onRefresh:r},null,8,["proxies"]))}}),Lte=ie({__name:"ProxiesSUDP",setup(e){let t=$([]);const r=()=>{fetch("../api/proxy/sudp",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value=[];for(let i of n.proxies)t.value.push(new yte(i))})};return r(),(n,i)=>(G(),de(Ks,{proxies:T(t),proxyType:"sudp",onRefresh:r},null,8,["proxies"]))}}),Dte=jG({history:uG(),routes:[{path:"/",name:"ServerOverview",component:dte},{path:"/proxies/tcp",name:"ProxiesTCP",component:Tte},{path:"/proxies/udp",name:"ProxiesUDP",component:Mte},{path:"/proxies/http",name:"ProxiesHTTP",component:Ate},{path:"/proxies/https",name:"ProxiesHTTPS",component:Pte},{path:"/proxies/stcp",name:"ProxiesSTCP",component:Ete},{path:"/proxies/sudp",name:"ProxiesSUDP",component:Lte}]}),MD=oR(GW);MD.use(Dte);MD.mount("#app")});export default Ite(); diff --git a/assets/frps/static/index.html b/assets/frps/static/index.html index 53028f23..0a1966e8 100644 --- a/assets/frps/static/index.html +++ b/assets/frps/static/index.html @@ -4,7 +4,7 @@ frps dashboard - +