'),gt=h('
:: ');const mt=()=>{const l=Be();if(!Fe())return l("/setup",{replace:!0}),null;let r;const[n]=Z(),{fetchProxies:i,proxies:c,selectProxyInGroup:u,proxyProviders:m,updateProviderByProviderName:L,updateAllProvider:d,proxyGroupLatencyTest:D,proxyProviderLatencyTest:p,proxyGroupLatencyTestingMap:C,proxyProviderLatencyTestingMap:P,isAllProviderUpdating:S,updatingMap:g}=ne(),E=b(()=>c().filter(f=>!f.hidden)),{speedGroupByName:M}=Ue(),[$,k]=je(ie({}),{name:"collapsedMap",storage:localStorage}),z=(f,w)=>{k(V=>({...V,[f]:w}))};Re(i);const X=async(f,w)=>{f.stopPropagation(),D(w)},U=(f,w)=>{f.stopPropagation(),p(w)},o=(f,w)=>{f.stopPropagation(),L(w)},_=async f=>{f.stopPropagation(),d()},[K,fe]=ie("proxies"),xe=()=>[{type:"proxies",name:n("proxies"),count:E().length},{type:"proxyProviders",name:n("proxyProviders"),count:m().length}];return(()=>{var f=at(),w=f.firstChild,V=w.firstChild,re=V.nextSibling,se=w.nextSibling;return t(V,e(F,{get each(){return xe()},children:v=>(()=>{var s=ct(),O=s.firstChild,Q=O.nextSibling;return s.$$click=()=>fe(v.type),t(O,()=>v.name),t(Q,()=>v.count),x(()=>q(s,B(K()===v.type&&"tab-active","tab-sm sm:tab-md tab gap-2 px-2"))),s})()})),t(w,e(Y,{get when(){return K()==="proxyProviders"},get children(){return e(W,{class:"btn btn-circle btn-sm",get disabled(){return S()},onClick:v=>_(v),get icon(){return e(ae,{get class(){return B(S()&&"animate-spin text-success")}})}})}}),re),t(re,e(W,{class:"btn-circle btn-primary btn-sm",onClick:()=>r==null?void 0:r.showModal(),get icon(){return e(He,{})}})),t(se,e(Y,{get when(){return K()==="proxies"},get children(){var v=ve();return t(v,e(F,{get each(){return E()},children:s=>{const O=b(()=>Ye(ce(s.all??[],G()),he())),Q=[(()=>{var a=ot(),y=a.firstChild,T=y.firstChild,j=T.nextSibling;return t(T,()=>s.name),t(j,()=>{var N;return(N=s.all)==null?void 0:N.length}),t(a,e(W,{class:"btn-circle btn-sm",get disabled(){return C()[s.name]},onClick:N=>X(N,s.name),get icon(){return e(oe,{get class(){return B(C()[s.name]&&"animate-pulse text-success")}})}}),null),a})(),(()=>{var a=dt(),y=a.firstChild,T=y.firstChild,j=y.nextSibling,N=j.firstChild;return t(y,()=>s.type,T),t(y,()=>{var R;return((R=s.now)==null?void 0:R.length)>0&&` :: ${s.now}`},null),t(j,()=>te(M()[s.name]??0).toString(),N),a})(),e(Y,{get when(){return!$()[s.name]},get children(){return e(ge,{get proxyNameList(){return O()},get now(){return s.now}})}})];return e(de,{get isOpen(){return $()[s.name]},title:Q,onCollapse:a=>z(s.name,a),get children(){return e(F,{get each(){return O()},children:a=>e(ue,{proxyName:a,get isSelected(){return s.now===a},onClick:()=>void u(s,a)})})}})}})),x(()=>q(v,B("grid grid-cols-1 place-items-start gap-2",ee()?"sm:grid-cols-2":"sm:grid-cols-1"))),v}}),null),t(se,e(Y,{get when(){return K()==="proxyProviders"},get children(){var v=ve();return t(v,e(F,{get each(){return m()},children:s=>{const O=b(()=>ce(s.proxies.map(a=>a.name)??[],G())),Q=[(()=>{var a=ut(),y=a.firstChild,T=y.firstChild,j=T.nextSibling,N=y.nextSibling;return t(T,()=>s.name),t(j,()=>s.proxies.length),t(N,e(W,{class:"btn btn-circle btn-sm",get disabled(){return g()[s.name]},onClick:R=>o(R,s.name),get icon(){return e(ae,{get class(){return B(g()[s.name]&&"animate-spin text-success")}})}}),null),t(N,e(W,{class:"btn btn-circle btn-sm",get disabled(){return P()[s.name]},onClick:R=>U(R,s.name),get icon(){return e(oe,{get class(){return B(P()[s.name]&&"animate-pulse text-success")}})}}),null),a})(),e(it,{get subscriptionInfo(){return s.subscriptionInfo}}),(()=>{var a=gt(),y=a.firstChild,T=y.nextSibling;return T.nextSibling,t(a,()=>s.vehicleType,y),t(a,()=>n("updated"),T),t(a,()=>Qe(s.updatedAt),null),a})(),e(Y,{get when(){return!$()[s.name]},get children(){return e(ge,{get proxyNameList(){return O()}})}})];return e(de,{get isOpen(){return $()[s.name]},title:Q,onCollapse:a=>z(s.name,a),get children(){return e(F,{get each(){return O()},children:a=>e(ue,{proxyName:a})})}})}})),x(()=>q(v,B("grid grid-cols-1 place-items-start gap-2",ee()?"sm:grid-cols-2":"sm:grid-cols-1"))),v}}),null),t(f,e(Ve,{ref:v=>r=v}),null),f})()};ze(["click"]);export{mt as default};