WGDashboard/src/static/app/dist/assets/peerList-9LlPuiy3.js
2025-07-22 03:23:58 +08:00

3 lines
37 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peerAssignModal-CoUWwCk3.js","assets/localeText-DkjxgEQB.js","assets/index-BaGiSoQe.js","assets/index-wGh3t2RU.css","assets/DashboardClientAssignmentStore-BUoDZ6I5.js","assets/peerAssignModal--_bmFbmn.css","assets/peerShareLinkModal-DDmGp_KD.js","assets/dayjs.min-H8Pjp0HL.js","assets/vue-datepicker-CI9txOl2.js","assets/peerShareLinkModal-DgDHiTOw.css","assets/peerJobs-kZAK-mB1.js","assets/schedulePeerJob-Bp6xBo32.js","assets/schedulePeerJob-BGJSEouo.css","assets/peerJobs-D_dDl936.css","assets/peerQRCode-BiVHr8UY.js","assets/browser-BHoir7AQ.js","assets/peerQRCode-DuWWfBch.css","assets/peerConfigurationFile-HFbRJR3C.js","assets/peerConfigurationFile-Z9ms5mIx.css","assets/peerSettings-DJBxRPdI.js","assets/peerSettings-CSjO_Okh.css","assets/peerSearchBar-3fBKUdTH.js","assets/peerSearchBar-0uWV_0iv.css","assets/peerJobsAllModal-BBEOmypX.js","assets/peerJobsLogsModal-CUk9QsM-.js","assets/editConfiguration-DkzbDT16.js","assets/editConfiguration-ChlGwssr.css","assets/selectPeers-CV6q0Qd4.js","assets/selectPeers-ChWyERy7.css","assets/peerAddModal-Dbk6LNS2.js","assets/peerAddModal-B4gIHs91.css"])))=>i.map(i=>d[i]);
import{r as A,M as de,D as H,o as ue,H as ee,x as ne,q as B,c as v,f as l,a as e,b as d,u as M,d as $,t as w,g as Q,_ as K,h as q,F,i as X,n as L,z as G,G as T,W as ce,N as ge,O as ve,P as j,w as J,j as ae,e as N,k as x,Q as R,T as oe,R as I,K as be,m as he,v as _e,S as ye}from"./index-BaGiSoQe.js";import{_ as Se}from"./protocolBadge-fuWULZA8.js";import{L as O}from"./localeText-DkjxgEQB.js";import{C as Pe,L as $e,B as we,a as xe,b as Ce,c as ke,p as Oe,d as Me,e as De,f as Ae,P as Le,h as Re,g as re}from"./index-hZ1DcfGk.js";import{d as Ie}from"./dayjs.min-H8Pjp0HL.js";const Te={class:"row gx-2 gy-2 mb-3"},Ee={class:"col-12"},Be={class:"card rounded-3 bg-transparent",style:{height:"270px"}},Ne={class:"card-header bg-transparent border-0"},Je={class:"text-muted"},Fe={class:"card-body pt-1"},je={class:"col-sm col-lg-6"},Ve={class:"card rounded-3 bg-transparent",style:{height:"270px"}},Ue={class:"card-header bg-transparent border-0 d-flex align-items-center"},Ge={class:"text-muted"},Qe={key:0,class:"text-primary fw-bold ms-auto"},ze={class:"card-body pt-1"},We={class:"col-sm col-lg-6"},qe={class:"card rounded-3 bg-transparent",style:{height:"270px"}},He={class:"card-header bg-transparent border-0 d-flex align-items-center"},Ke={class:"text-muted"},Ye={key:0,class:"text-success fw-bold ms-auto"},Ze={class:"card-body pt-1"},Xe={__name:"peerDataUsageCharts",props:{configurationPeers:Array,configurationInfo:Object},setup(o){Pe.register($e,we,xe,Ce,ke,Oe,Me,De,Ae,Le);const t=o,r=A({timestamp:[],data:[]}),i=A({timestamp:[],data:[]}),C=de(),P=H(),c=A(void 0),m=async()=>{await Q("/api/getWireguardConfigurationRealtimeTraffic",{configurationName:C.params.id},_=>{let b=Ie().format("hh:mm:ss A");(_.data.sent!==0&&_.data.recv!==0||r.value.data.length>0&&i.value.data.length>0)&&(r.value.timestamp.push(b),r.value.data.push(_.data.sent),i.value.timestamp.push(b),i.value.data.push(_.data.recv))})},a=()=>{clearInterval(c.value),c.value=void 0,t.configurationInfo.Status&&(c.value=setInterval(()=>{m()},parseInt(P.Configuration.Server.dashboard_refresh_interval)))};ue(()=>{a()}),ee(()=>t.configurationInfo.Status,()=>{a()}),ee(()=>P.Configuration.Server.dashboard_refresh_interval,()=>{a()}),ne(()=>{clearInterval(c.value),c.value=void 0});const f=B(()=>{let _=t.configurationPeers.filter(b=>b.cumu_data+b.total_data>0);return{labels:_.map(b=>b.name?b.name:`Untitled Peer - ${b.id}`),datasets:[{label:"Total Data Usage",data:_.map(b=>b.cumu_data+b.total_data),backgroundColor:_.map(b=>"#ffc107"),tooltip:{callbacks:{label:b=>`${b.formattedValue} GB`}}}]}}),g=B(()=>({labels:[...r.value.timestamp],datasets:[{label:"Data Sent",data:[...r.value.data],fill:!1,borderColor:"#198754",backgroundColor:"#198754",tension:0}]})),D=B(()=>({labels:[...i.value.timestamp],datasets:[{label:"Data Received",data:[...i.value.data],fill:!1,borderColor:"#0d6efd",backgroundColor:"#0d6efd",tension:0}]})),h=B(()=>({responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(_,b)=>`${Math.round((_+Number.EPSILON)*1e3)/1e3} GB`},grid:{display:!1}}}})),y=B(()=>({responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:_=>`${_.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!0}},y:{ticks:{callback:(_,b)=>`${Math.round((_+Number.EPSILON)*1e3)/1e3} MB/s`},grid:{display:!0}}}}));return(_,b)=>(l(),v("div",Te,[e("div",Ee,[e("div",Be,[e("div",Ne,[e("small",Je,[d(O,{t:"Peers Data Usage"})])]),e("div",Fe,[d(M(Re),{data:f.value,options:h.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),e("div",je,[e("div",Ve,[e("div",Ue,[e("small",Ge,[d(O,{t:"Real Time Received Data Usage"})]),i.value.data.length>0?(l(),v("small",Qe,w(i.value.data[i.value.data.length-1])+" MB/s ",1)):$("",!0)]),e("div",ze,[d(M(re),{options:y.value,data:D.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),e("div",We,[e("div",qe,[e("div",He,[e("small",Ke,[d(O,{t:"Real Time Sent Data Usage"})]),r.value.data.length>0?(l(),v("small",Ye,w(r.value.data[r.value.data.length-1])+" MB/s ",1)):$("",!0)]),e("div",Ze,[d(M(re),{options:y.value,data:g.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]))}},et={name:"peerSearch",components:{LocaleText:O},setup(){const o=H(),t=ce();return{store:o,wireguardConfigurationStore:t}},props:{configuration:Object},data(){return{sort:{status:T("Status"),name:T("Name"),allowed_ip:T("Allowed IPs"),restricted:T("Restricted")},interval:{5e3:T("5 Seconds"),1e4:T("10 Seconds"),3e4:T("30 Seconds"),6e4:T("1 Minutes")},display:{grid:T("Grid"),list:T("List")},searchString:"",searchStringTimeout:void 0,showDisplaySettings:!1,showMoreSettings:!1}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:o},t=>{t.status&&this.store.getConfiguration()})},updateRefreshInterval(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:o},t=>{t.status&&this.store.getConfiguration()})},updateDisplay(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_peer_list_display",value:o},t=>{t.status&&this.store.getConfiguration()})},downloadAllPeer(){Q(`/api/downloadAllPeers/${this.configuration.Name}`,{},o=>{o.data.forEach(t=>{t.fileName=t.fileName+".conf"}),window.wireguard.generateZipFiles(o,this.configuration.Name)})}}},tt={class:"d-flex flex-column gap-2 my-4"},st={class:"d-flex gap-2 peerSearchContainer"},ot={class:"dropdown"},nt={"data-bs-toggle":"dropdown",class:"btn w-100 btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},at={class:"badge text-bg-primary ms-2"},lt={class:"dropdown-menu rounded-3"},rt=["onClick"],it={class:"ms-auto"},dt={key:0,class:"bi bi-check-circle-fill"},ut={class:"dropdown"},ct={"data-bs-toggle":"dropdown",class:"btn btn-sm w-100 text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},mt={class:"badge text-bg-primary ms-2"},pt={class:"dropdown-menu rounded-3"},ft=["onClick"],gt={class:"ms-auto"},vt={key:0,class:"bi bi-check-circle-fill"},bt={class:"dropdown"},ht={"data-bs-toggle":"dropdown",class:"btn btn-sm w-100 text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},_t={class:"badge text-bg-primary ms-2"},yt={class:"dropdown-menu rounded-3"},St=["onClick"],Pt={class:"ms-auto"},$t={key:0,class:"bi bi-check-circle-fill"};function wt(o,t,r,i,C,P){const c=q("LocaleText");return l(),v("div",tt,[e("div",st,[e("div",ot,[e("button",nt,[t[4]||(t[4]=e("i",{class:"bi bi-sort-up me-2"},null,-1)),d(c,{t:"Sort By"}),e("span",at,w(this.sort[i.store.Configuration.Server.dashboard_sort]),1)]),e("ul",lt,[(l(!0),v(F,null,X(this.sort,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateSort(a)},[e("small",null,w(m),1),e("small",it,[i.store.Configuration.Server.dashboard_sort===a?(l(),v("i",dt)):$("",!0)])],8,rt)]))),256))])]),e("div",ut,[e("button",ct,[t[5]||(t[5]=e("i",{class:"bi bi-arrow-repeat me-2"},null,-1)),d(c,{t:"Refresh Interval"}),e("span",mt,w(this.interval[i.store.Configuration.Server.dashboard_refresh_interval]),1)]),e("ul",pt,[(l(!0),v(F,null,X(this.interval,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateRefreshInterval(a)},[e("small",null,w(m),1),e("small",gt,[i.store.Configuration.Server.dashboard_refresh_interval===a?(l(),v("i",vt)):$("",!0)])],8,ft)]))),256))])]),e("div",bt,[e("button",ht,[e("i",{class:L(["bi me-2","bi-"+i.store.Configuration.Server.dashboard_peer_list_display])},null,2),d(c,{t:"Display"}),e("span",_t,w(this.display[i.store.Configuration.Server.dashboard_peer_list_display]),1)]),e("ul",yt,[(l(!0),v(F,null,X(this.display,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateDisplay(a)},[e("small",null,w(m),1),e("small",Pt,[i.store.Configuration.Server.dashboard_peer_list_display===a?(l(),v("i",$t)):$("",!0)])],8,St)]))),256))])]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle ms-lg-auto",onClick:t[0]||(t[0]=m=>this.$emit("search"))},[t[6]||(t[6]=e("i",{class:"bi bi-search me-2"},null,-1)),d(c,{t:"Search"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[1]||(t[1]=m=>this.downloadAllPeer())},[t[7]||(t[7]=e("i",{class:"bi bi-download me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Download All",class:"d-sm-block d-lg-none d-xl-block"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[2]||(t[2]=m=>this.$emit("selectPeers"))},[t[8]||(t[8]=e("i",{class:"bi bi-check2-all me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Select Peers",class:"d-sm-block d-lg-none d-xl-block"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[3]||(t[3]=m=>this.$emit("jobsAll")),type:"button","aria-expanded":"false"},[t[9]||(t[9]=e("i",{class:"bi bi-person-walking me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Active Jobs",class:"d-sm-block d-lg-none d-xl-block"})])])])}const xt=K(et,[["render",wt],["__scopeId","data-v-c96b078a"]]);function Ct(o){return ge()?(ve(o),!0):!1}const me=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const kt=Object.prototype.toString,Ot=o=>kt.call(o)==="[object Object]",U=()=>{},Mt=Dt();function Dt(){var o,t;return me&&((o=window?.navigator)==null?void 0:o.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function te(o){return Array.isArray(o)?o:[o]}function At(o,t,r){return ee(o,t,{...r,immediate:!0})}const pe=me?window:void 0;function W(o){var t;const r=j(o);return(t=r?.$el)!=null?t:r}function se(...o){const t=[],r=()=>{t.forEach(m=>m()),t.length=0},i=(m,a,f,g)=>(m.addEventListener(a,f,g),()=>m.removeEventListener(a,f,g)),C=B(()=>{const m=te(j(o[0])).filter(a=>a!=null);return m.every(a=>typeof a!="string")?m:void 0}),P=At(()=>{var m,a;return[(a=(m=C.value)==null?void 0:m.map(f=>W(f)))!=null?a:[pe].filter(f=>f!=null),te(j(C.value?o[1]:o[0])),te(M(C.value?o[2]:o[1])),j(C.value?o[3]:o[2])]},([m,a,f,g])=>{if(r(),!m?.length||!a?.length||!f?.length)return;const D=Ot(g)?{...g}:g;t.push(...m.flatMap(h=>a.flatMap(y=>f.map(_=>i(h,y,_,D)))))},{flush:"post"}),c=()=>{P(),r()};return Ct(r),c}let ie=!1;function Lt(o,t,r={}){const{window:i=pe,ignore:C=[],capture:P=!0,detectIframe:c=!1,controls:m=!1}=r;if(!i)return m?{stop:U,cancel:U,trigger:U}:U;if(Mt&&!ie){ie=!0;const n={passive:!0};Array.from(i.document.body.children).forEach(S=>S.addEventListener("click",U,n)),i.document.documentElement.addEventListener("click",U,n)}let a=!0;const f=n=>j(C).some(S=>{if(typeof S=="string")return Array.from(i.document.querySelectorAll(S)).some(k=>k===n.target||n.composedPath().includes(k));{const k=W(S);return k&&(n.target===k||n.composedPath().includes(k))}});function g(n){const S=j(n);return S&&S.$.subTree.shapeFlag===16}function D(n,S){const k=j(n),E=k.$.subTree&&k.$.subTree.children;return E==null||!Array.isArray(E)?!1:E.some(z=>z.el===S.target||S.composedPath().includes(z.el))}const h=n=>{const S=W(o);if(n.target!=null&&!(!(S instanceof Element)&&g(o)&&D(o,n))&&!(!S||S===n.target||n.composedPath().includes(S))){if("detail"in n&&n.detail===0&&(a=!f(n)),!a){a=!0;return}t(n)}};let y=!1;const _=[se(i,"click",n=>{y||(y=!0,setTimeout(()=>{y=!1},0),h(n))},{passive:!0,capture:P}),se(i,"pointerdown",n=>{const S=W(o);a=!f(n)&&!!(S&&!n.composedPath().includes(S))},{passive:!0}),c&&se(i,"blur",n=>{setTimeout(()=>{var S;const k=W(o);((S=i.document.activeElement)==null?void 0:S.tagName)==="IFRAME"&&!k?.contains(i.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),b=()=>_.forEach(n=>n());return m?{stop:b,cancel:()=>{a=!1},trigger:n=>{a=!0,h(n),a=!1}}:b}const Rt={key:0,class:"position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow"},It={__name:"peerSettingsDropdownTool",props:{icon:String,title:String},emits:["click"],setup(o,{emit:t}){const r=t,i=A(!1);return(C,P)=>(l(),v("a",{class:"dropdown-item text-center px-0 rounded-3 position-relative",role:"button",onMouseenter:P[0]||(P[0]=c=>i.value=!0),onMouseleave:P[1]||(P[1]=c=>i.value=!1),onClick:P[2]||(P[2]=c=>r("click"))},[e("i",{class:L(["me-auto bi",o.icon])},null,2),d(ae,{name:"zoomReversed"},{default:J(()=>[i.value?(l(),v("span",Rt,[e("small",null,[d(O,{t:o.title},null,8,["t"])])])):$("",!0)]),_:1})],32))}},Tt=K(It,[["__scopeId","data-v-d4e41a56"]]),Et={name:"peerSettingsDropdown",components:{PeerSettingsDropdownTool:Tt,LocaleText:O},setup(){return{dashboardStore:H()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1,confirmDelete:!1}},methods:{downloadPeer(){Q("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},o=>{if(o.status){const t=new Blob([o.data.file],{type:"text/plain"}),r=URL.createObjectURL(t),i=`${o.data.fileName}.conf`,C=document.createElement("a");C.href=r,C.download=i,C.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",o.message,"danger")})},downloadQRCode(o){Q("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit(o,t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,G(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,G(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,G(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},Bt={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},Nt={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Jt={class:"text-body d-flex"},Ft={class:"ms-auto"},jt={key:1},Vt={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},Ut={key:2},Gt={class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Qt={key:1,class:"confirmDelete"},zt={style:{"white-space":"break-spaces"},class:"mb-2 d-block fw-bold"},Wt={class:"d-flex w-100 gap-2"},qt=["disabled"],Ht=["disabled"],Kt={key:1};function Yt(o,t,r,i,C,P){const c=q("LocaleText"),m=q("PeerSettingsDropdownTool");return l(),v("ul",Bt,[this.Peer.restricted?(l(),v("li",Kt,[e("a",{class:L(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:t[11]||(t[11]=a=>this.allowAccessPeer()),role:"button"},[t[25]||(t[25]=e("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(l(),x(c,{key:1,t:"Allowing Access..."})):(l(),x(c,{key:0,t:"Allow Access"}))],2)])):(l(),v(F,{key:0},[this.confirmDelete?(l(),v("li",Qt,[e("p",zt,[d(c,{t:"Are you sure to delete this peer?"})]),e("div",Wt,[e("button",{onClick:t[9]||(t[9]=a=>this.deletePeer()),disabled:this.deleteBtnDisabled,class:"flex-grow-1 ms-auto btn btn-sm bg-danger"},[d(c,{t:"Yes"})],8,qt),e("button",{disabled:this.deleteBtnDisabled,onClick:t[10]||(t[10]=a=>this.confirmDelete=!1),class:"flex-grow-1 btn btn-sm bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle"},[d(c,{t:"No"})],8,Ht)])])):(l(),v(F,{key:0},[this.Peer.status==="running"?(l(),v(F,{key:0},[e("li",Nt,[e("span",Jt,[t[12]||(t[12]=e("i",{class:"bi bi-box-arrow-in-right"},null,-1)),e("span",Ft,w(this.Peer.endpoint),1)])]),t[13]||(t[13]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1))],64)):$("",!0),this.Peer.private_key?(l(),v("li",Ut,[t[14]||(t[14]=e("div",{class:"text-center text-muted"},null,-1)),e("div",Gt,[d(m,{icon:"bi-download",title:"Download",onClick:t[0]||(t[0]=a=>this.downloadPeer())}),d(m,{icon:"bi-qr-code",title:"QR Code",onClick:t[1]||(t[1]=a=>this.$emit("qrcode"))}),d(m,{icon:"bi-body-text",title:"Configuration File",onClick:t[2]||(t[2]=a=>this.$emit("configurationFile"))}),d(m,{icon:"bi-share",title:"Share Peer",onClick:t[3]||(t[3]=a=>this.$emit("share"))})])])):(l(),v("li",jt,[e("small",Vt,[d(c,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),t[23]||(t[23]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1)),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[4]||(t[4]=a=>this.$emit("setting"))},[t[15]||(t[15]=e("i",{class:"me-auto bi bi-pen"},null,-1)),t[16]||(t[16]=N()),d(c,{t:"Peer Settings"})])]),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[5]||(t[5]=a=>this.$emit("jobs"))},[t[17]||(t[17]=e("i",{class:"me-auto bi bi-app-indicator"},null,-1)),t[18]||(t[18]=N()),d(c,{t:"Schedule Jobs"})])]),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[6]||(t[6]=a=>this.$emit("assign"))},[t[19]||(t[19]=e("i",{class:"me-auto bi bi-diagram-2"},null,-1)),t[20]||(t[20]=N()),d(c,{t:"Assign Peer"})])]),t[24]||(t[24]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1)),e("li",null,[e("a",{class:L(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:t[7]||(t[7]=a=>this.restrictPeer()),role:"button"},[t[21]||(t[21]=e("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(l(),x(c,{key:1,t:"Restricting..."})):(l(),x(c,{key:0,t:"Restrict Access"}))],2)]),e("li",null,[e("a",{class:L(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:t[8]||(t[8]=a=>this.confirmDelete=!0),role:"button"},[t[22]||(t[22]=e("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(l(),x(c,{key:1,t:"Deleting..."})):(l(),x(c,{key:0,t:"Delete"}))],2)])],64))],64))])}const Zt=K(Et,[["render",Yt],["__scopeId","data-v-d636c35d"]]),Xt={name:"peer",methods:{GetLocale:T},components:{LocaleText:O,PeerSettingsDropdown:Zt},props:{Peer:Object},data(){return{}},setup(){const o=A(null),t=A(!1),r=H();return Lt(o,i=>{t.value=!1}),{target:o,subMenuOpened:t,dashboardStore:r}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},es={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},ts={key:0,style:{"font-size":"0.8rem",color:"#28a745"},class:"d-flex align-items-center"},ss={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},os={class:"text-primary"},ns={class:"text-success"},as={key:0,class:"text-secondary"},ls={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},rs={class:"card-body pt-1",style:{"font-size":"0.9rem"}},is={class:"text-muted"},ds={class:"d-block"},us={class:"text-muted"},cs={class:"d-block"},ms={class:"d-flex align-items-end ms-auto"};function ps(o,t,r,i,C,P){const c=q("LocaleText"),m=q("PeerSettingsDropdown");return l(),v("div",{class:L(["card shadow-sm rounded-3 peerCard",{"border-warning":r.Peer.restricted}])},[e("div",null,[r.Peer.restricted?(l(),v("div",ls,[t[14]||(t[14]=e("i",{class:"bi-lock-fill me-2"},null,-1)),d(c,{t:"Access Restricted"})])):(l(),v("div",es,[e("div",{class:L(["dot ms-0",{active:r.Peer.status==="running"}])},null,2),i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"&&r.Peer.status==="running"?(l(),v("div",ts,[t[8]||(t[8]=e("i",{class:"bi bi-box-arrow-in-right me-2"},null,-1)),e("span",null,w(r.Peer.endpoint),1)])):$("",!0),e("div",ss,[e("span",os,[t[9]||(t[9]=e("i",{class:"bi bi-arrow-down"},null,-1)),e("strong",null,w((r.Peer.cumu_receive+r.Peer.total_receive).toFixed(4)),1),t[10]||(t[10]=N(" GB "))]),e("span",ns,[t[11]||(t[11]=e("i",{class:"bi bi-arrow-up"},null,-1)),e("strong",null,w((r.Peer.cumu_sent+r.Peer.total_sent).toFixed(4)),1),t[12]||(t[12]=N(" GB "))]),r.Peer.latest_handshake!=="No Handshake"?(l(),v("span",as,[t[13]||(t[13]=e("i",{class:"bi bi-arrows-angle-contract"},null,-1)),N(" "+w(P.getLatestHandshake)+" ago ",1)])):$("",!0)])]))]),e("div",rs,[e("h6",null,w(r.Peer.name?r.Peer.name:P.GetLocale("Untitled Peer")),1),e("div",{class:L(["d-flex",[i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="grid"?"gap-1 flex-column":"flex-row gap-3"]])},[e("div",{class:L({"d-flex gap-2 align-items-center":i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"})},[e("small",is,[d(c,{t:"Public Key"})]),e("small",ds,[e("samp",null,w(r.Peer.id),1)])],2),e("div",{class:L({"d-flex gap-2 align-items-center":i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"})},[e("small",us,[d(c,{t:"Allowed IPs"})]),e("small",cs,[e("samp",null,w(r.Peer.allowed_ip),1)])],2),e("div",ms,[e("div",{class:L(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[e("a",{role:"button",class:"text-body",onClick:t[0]||(t[0]=a=>this.subMenuOpened=!0)},t[15]||(t[15]=[e("h5",{class:"mb-0"},[e("i",{class:"bi bi-three-dots"})],-1)])),d(ae,{name:"slide-fade"},{default:J(()=>[this.subMenuOpened?(l(),x(m,{key:0,onQrcode:t[1]||(t[1]=a=>this.$emit("qrcode")),onConfigurationFile:t[2]||(t[2]=a=>this.$emit("configurationFile")),onSetting:t[3]||(t[3]=a=>this.$emit("setting")),onJobs:t[4]||(t[4]=a=>this.$emit("jobs")),onRefresh:t[5]||(t[5]=a=>this.$emit("refresh")),onShare:t[6]||(t[6]=a=>this.$emit("share")),onAssign:t[7]||(t[7]=a=>this.$emit("assign")),Peer:r.Peer,ref:"target"},null,8,["Peer"])):$("",!0)]),_:1})],2)])],2)])],2)}const fs=K(Xt,[["render",ps],["__scopeId","data-v-d500f94d"]]),gs={__name:"peerListModals",props:{configurationModals:Object,configurationModalSelectedPeer:Object},emits:["refresh"],setup(o,{emit:t}){const r=t,i=R(()=>I(()=>import("./peerAssignModal-CoUWwCk3.js"),__vite__mapDeps([0,1,2,3,4,5]))),C=R(()=>I(()=>import("./peerShareLinkModal-DDmGp_KD.js"),__vite__mapDeps([6,2,3,7,8,1,9]))),P=R(()=>I(()=>import("./peerJobs-kZAK-mB1.js"),__vite__mapDeps([10,11,2,3,8,7,1,12,13]))),c=R(()=>I(()=>import("./peerQRCode-BiVHr8UY.js"),__vite__mapDeps([14,15,2,3,1,16]))),m=R(()=>I(()=>import("./peerConfigurationFile-HFbRJR3C.js"),__vite__mapDeps([17,2,3,1,15,18]))),a=R(()=>I(()=>import("./peerSettings-DJBxRPdI.js"),__vite__mapDeps([19,2,3,1,20])));return(f,g)=>(l(),x(oe,{name:"zoom"},{default:J(()=>[o.configurationModals.peerSetting.modalOpen?(l(),x(M(a),{key:"PeerSettingsModal",selectedPeer:o.configurationModalSelectedPeer,onRefresh:g[0]||(g[0]=D=>r("refresh")),onClose:g[1]||(g[1]=D=>o.configurationModals.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerQRCode.modalOpen?(l(),x(M(c),{key:"PeerQRCodeModal",selectedPeer:o.configurationModalSelectedPeer,onClose:g[2]||(g[2]=D=>o.configurationModals.peerQRCode.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerScheduleJobs.modalOpen?(l(),x(M(P),{key:"PeerJobsModal",onRefresh:g[3]||(g[3]=D=>r("refresh")),selectedPeer:o.configurationModalSelectedPeer,onClose:g[4]||(g[4]=D=>o.configurationModals.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerShare.modalOpen?(l(),x(M(C),{key:"PeerShareLinkModal",onClose:g[5]||(g[5]=D=>{o.configurationModals.peerShare.modalOpen=!1}),selectedPeer:o.configurationModalSelectedPeer},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerConfigurationFile.modalOpen?(l(),x(M(m),{key:4,onClose:g[6]||(g[6]=D=>o.configurationModals.peerConfigurationFile.modalOpen=!1),selectedPeer:o.configurationModalSelectedPeer},null,8,["selectedPeer"])):$("",!0),o.configurationModals.assignPeer.modalOpen?(l(),x(M(i),{key:5,selectedPeer:o.configurationModalSelectedPeer,onClose:g[7]||(g[7]=D=>o.configurationModals.assignPeer.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0)]),_:1}))}},vs={style:{"margin-bottom":"20px",height:"1px"},id:"loadMore"},bs={__name:"peerIntersectionObserver",props:["peerListLength","showPeersCount"],emits:["loadMore"],setup(o,{emit:t}){const r=A(void 0),i=t;return ue(()=>{r.value=new IntersectionObserver(C=>{C.forEach(P=>{P.isIntersecting&&i("loadMore")})},{rootMargin:"20px",threshold:1}),r.value.observe(document.querySelector("#loadMore"))}),ne(()=>{r.value.disconnect()}),(C,P)=>(l(),v("div",vs))}},hs={class:"container-fluid"},_s={class:"d-flex align-items-sm-center flex-column flex-sm-row gap-3"},ys={class:"text-muted d-flex align-items-center gap-2"},Ss={class:"mb-0"},Ps={class:"d-flex align-items-center gap-3"},$s={class:"mb-0 display-4"},ws={class:"ms-sm-auto d-flex gap-2 flex-column"},xs={class:"card rounded-3 bg-transparent"},Cs={class:"card-body py-2 d-flex align-items-center"},ks={class:"text-muted"},Os={class:"form-check form-switch mb-0 ms-auto pe-0 me-0"},Ms=["for"],Ds={key:2,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},As=["disabled","id"],Ls={class:"d-flex gap-2"},Rs={class:"row mt-3 gy-2 gx-2 mb-2"},Is={class:"col-12 col-lg-3"},Ts={class:"card rounded-3 bg-transparent h-100"},Es={class:"card-body py-2 d-flex flex-column justify-content-center"},Bs={class:"mb-0 text-muted"},Ns={class:"col-12 col-lg-3"},Js={class:"card rounded-3 bg-transparent h-100"},Fs={class:"card-body py-2 d-flex flex-column justify-content-center"},js={class:"mb-0 text-muted"},Vs={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},Us={class:"card rounded-3 bg-transparent h-100"},Gs={class:"card-body py-2 d-flex flex-column justify-content-center"},Qs={class:"mb-0 text-muted"},zs={class:"row gx-2 gy-2 mb-2"},Ws={class:"col-12 col-lg-3"},qs={class:"card rounded-3 bg-transparent h-100"},Hs={class:"card-body d-flex"},Ks={class:"mb-0 text-muted"},Ys={class:"h4"},Zs={class:"col-12 col-lg-3"},Xs={class:"card rounded-3 bg-transparent h-100"},eo={class:"card-body d-flex"},to={class:"mb-0 text-muted"},so={class:"h4"},oo={class:"col-12 col-lg-3"},no={class:"card rounded-3 bg-transparent h-100"},ao={class:"card-body d-flex"},lo={class:"mb-0 text-muted"},ro={class:"h4 text-primary"},io={class:"col-12 col-lg-3"},uo={class:"card rounded-3 bg-transparent h-100"},co={class:"card-body d-flex"},mo={class:"mb-0 text-muted"},po={class:"h4 text-success"},fo={style:{"margin-bottom":"80px"}},go=20,vo={__name:"peerList",async setup(o){let t,r;const i=R(()=>I(()=>import("./peerSearchBar-3fBKUdTH.js"),__vite__mapDeps([21,2,3,1,22]))),C=R(()=>I(()=>import("./peerJobsAllModal-BBEOmypX.js"),__vite__mapDeps([23,11,2,3,8,7,1,12]))),P=R(()=>I(()=>import("./peerJobsLogsModal-CUk9QsM-.js"),__vite__mapDeps([24,7,2,3,1]))),c=R(()=>I(()=>import("./editConfiguration-DkzbDT16.js"),__vite__mapDeps([25,2,3,1,7,26]))),m=R(()=>I(()=>import("./selectPeers-CV6q0Qd4.js"),__vite__mapDeps([27,2,3,1,28]))),a=R(()=>I(()=>import("./peerAddModal-Dbk6LNS2.js"),__vite__mapDeps([29,2,3,1,30]))),f=H(),g=ce(),D=de(),h=A({}),y=A([]),_=A(!1),b=A({}),n=A({peerNew:{modalOpen:!1},peerSetting:{modalOpen:!1},peerScheduleJobs:{modalOpen:!1},peerQRCode:{modalOpen:!1},peerConfigurationFile:{modalOpen:!1},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1},editConfiguration:{modalOpen:!1},selectPeers:{modalOpen:!1},backupRestore:{modalOpen:!1},deleteConfiguration:{modalOpen:!1},editRawConfigurationFile:{modalOpen:!1},assignPeer:{modalOpen:!1}}),S=A(!1),k=async()=>{await Q("/api/getWireguardConfigurationInfo",{configurationName:D.params.id},p=>{p.status&&(h.value=p.data.configurationInfo,y.value=p.data.configurationPeers,y.value.forEach(s=>{s.restricted=!1}),p.data.configurationRestrictedPeers.forEach(s=>{s.restricted=!0,y.value.push(s)}))})};[t,r]=be(()=>k()),await t,r();const E=A(void 0),z=()=>{clearInterval(E.value),E.value=setInterval(async()=>{await k()},parseInt(f.Configuration.Server.dashboard_refresh_interval))};z(),ne(()=>{clearInterval(E.value),E.value=void 0}),ee(()=>f.Configuration.Server.dashboard_refresh_interval,()=>{z()});const fe=async()=>{_.value=!0,await Q("/api/toggleWireguardConfiguration",{configurationName:h.value.Name},p=>{p.status?f.newMessage("Server",`${h.value.Name} ${p.data?"is on":"is off"}`,"success"):f.newMessage("Server",p.message,"danger"),g.Configurations.find(s=>s.Name===h.value.Name).Status=p.data,h.value.Status=p.data,_.value=!1})},Y=B(()=>({connectedPeers:y.value.filter(p=>p.status==="running").length,totalUsage:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_data+p.cumu_data).reduce((p,s)=>p+s,0).toFixed(4):0,totalReceive:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_receive+p.cumu_receive).reduce((p,s)=>p+s,0).toFixed(4):0,totalSent:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_sent+p.cumu_sent).reduce((p,s)=>p+s,0).toFixed(4):0})),Z=A(10),le=B(()=>{const p=g.searchString?y.value.filter(s=>s.name.includes(g.searchString)||s.id.includes(g.searchString)||s.allowed_ip.includes(g.searchString)):y.value;return f.Configuration.Server.dashboard_sort==="restricted"?p.sort((s,u)=>s[f.Configuration.Server.dashboard_sort]<u[f.Configuration.Server.dashboard_sort]?1:s[f.Configuration.Server.dashboard_sort]>u[f.Configuration.Server.dashboard_sort]?-1:0).slice(0,Z.value):p.sort((s,u)=>s[f.Configuration.Server.dashboard_sort]<u[f.Configuration.Server.dashboard_sort]?-1:s[f.Configuration.Server.dashboard_sort]>u[f.Configuration.Server.dashboard_sort]?1:0).slice(0,Z.value)});return(p,s)=>(l(),v("div",hs,[e("div",_s,[e("div",null,[e("div",ys,[e("h5",Ss,[d(Se,{protocol:h.value.Protocol},null,8,["protocol"])])]),e("div",Ps,[e("h1",$s,[e("samp",null,w(h.value.Name),1)])])]),e("div",ws,[e("div",xs,[e("div",Cs,[e("small",ks,[d(O,{t:"Status"})]),e("div",{class:L(["dot ms-2",{active:h.value.Status}])},null,2),e("div",Os,[e("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+h.value.id},[h.value.Status&&!_.value?(l(),x(O,{key:0,t:"On"})):!h.value.Status&&!_.value?(l(),x(O,{key:1,t:"Off"})):$("",!0),_.value?(l(),v("span",Ds)):$("",!0)],8,Ms),he(e("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:_.value,type:"checkbox",role:"switch",id:"switch"+h.value.id,onChange:s[0]||(s[0]=u=>fe()),"onUpdate:modelValue":s[1]||(s[1]=u=>h.value.Status=u)},null,40,As),[[_e,h.value.Status]])])])]),e("div",Ls,[e("a",{role:"button",onClick:s[2]||(s[2]=u=>n.value.peerNew.modalOpen=!0),class:"titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},[s[29]||(s[29]=e("i",{class:"bi bi-plus-circle me-2"},null,-1)),d(O,{t:"Peer"})]),e("button",{class:"titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:s[3]||(s[3]=u=>n.value.editConfiguration.modalOpen=!0),type:"button","aria-expanded":"false"},[s[30]||(s[30]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),d(O,{t:"Configuration Settings"})])])])]),s[35]||(s[35]=e("hr",null,null,-1)),e("div",Rs,[e("div",Is,[e("div",Ts,[e("div",Es,[e("p",Bs,[e("small",null,[d(O,{t:"Address"})])]),N(" "+w(h.value.Address),1)])])]),e("div",Ns,[e("div",Js,[e("div",Fs,[e("p",js,[e("small",null,[d(O,{t:"Listen Port"})])]),N(" "+w(h.value.ListenPort),1)])])]),e("div",Vs,[e("div",Us,[e("div",Gs,[e("p",Qs,[e("small",null,[d(O,{t:"Public Key"})])]),e("samp",null,w(h.value.PublicKey),1)])])])]),e("div",zs,[e("div",Ws,[e("div",qs,[e("div",Hs,[e("div",null,[e("p",Ks,[e("small",null,[d(O,{t:"Connected Peers"})])]),e("strong",Ys,w(Y.value.connectedPeers)+" / "+w(y.value.length),1)]),s[31]||(s[31]=e("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),e("div",Zs,[e("div",Xs,[e("div",eo,[e("div",null,[e("p",to,[e("small",null,[d(O,{t:"Total Usage"})])]),e("strong",so,w(Y.value.totalUsage)+" GB",1)]),s[32]||(s[32]=e("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),e("div",oo,[e("div",no,[e("div",ao,[e("div",null,[e("p",lo,[e("small",null,[d(O,{t:"Total Received"})])]),e("strong",ro,w(Y.value.totalReceive)+" GB",1)]),s[33]||(s[33]=e("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),e("div",io,[e("div",uo,[e("div",co,[e("div",null,[e("p",mo,[e("small",null,[d(O,{t:"Total Sent"})])]),e("strong",po,w(Y.value.totalSent)+" GB",1)]),s[34]||(s[34]=e("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),d(Xe,{configurationPeers:y.value,configurationInfo:h.value},null,8,["configurationPeers","configurationInfo"]),s[36]||(s[36]=e("hr",null,null,-1)),e("div",fo,[y.value.length>0?(l(),x(xt,{key:0,onSearch:s[4]||(s[4]=u=>S.value=!0),onJobsAll:s[5]||(s[5]=u=>n.value.peerScheduleJobsAll.modalOpen=!0),onJobLogs:s[6]||(s[6]=u=>n.value.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:s[7]||(s[7]=u=>n.value.editConfiguration.modalOpen=!0),onSelectPeers:s[8]||(s[8]=u=>n.value.selectPeers.modalOpen=!0),onBackupRestore:s[9]||(s[9]=u=>n.value.backupRestore.modalOpen=!0),onDeleteConfiguration:s[10]||(s[10]=u=>n.value.deleteConfiguration.modalOpen=!0),configuration:h.value},null,8,["configuration"])):$("",!0),d(oe,{name:"peerList",tag:"div",class:"row gx-2 gy-2 z-0 position-relative"},{default:J(()=>[(l(!0),v(F,null,X(le.value,u=>(l(),v("div",{class:L(["col-12",{"col-lg-6 col-xl-4":M(f).Configuration.Server.dashboard_peer_list_display==="grid"}]),key:u.id},[d(fs,{Peer:u,onShare:V=>{n.value.peerShare.modalOpen=!0,b.value=u},onRefresh:s[11]||(s[11]=V=>k()),onJobs:V=>{n.value.peerScheduleJobs.modalOpen=!0,b.value=u},onSetting:V=>{n.value.peerSetting.modalOpen=!0,b.value=u},onQrcode:V=>{b.value=u,n.value.peerQRCode.modalOpen=!0},onConfigurationFile:V=>{b.value=u,n.value.peerConfigurationFile.modalOpen=!0},onAssign:V=>{b.value=u,n.value.assignPeer.modalOpen=!0}},null,8,["Peer","onShare","onJobs","onSetting","onQrcode","onConfigurationFile","onAssign"])],2))),128))]),_:1})]),d(ae,{name:"slideUp"},{default:J(()=>[S.value?(l(),x(M(i),{key:0,onClose:s[12]||(s[12]=u=>S.value=!1)})):$("",!0)]),_:1}),d(gs,{configurationModals:n.value,configurationModalSelectedPeer:b.value,onRefresh:s[13]||(s[13]=u=>k())},null,8,["configurationModals","configurationModalSelectedPeer"]),d(oe,{name:"zoom"},{default:J(()=>[(l(),x(ye,{key:"PeerAddModal"},{default:J(()=>[n.value.peerNew.modalOpen?(l(),x(M(a),{key:0,onClose:s[14]||(s[14]=u=>n.value.peerNew.modalOpen=!1),onAddedPeers:s[15]||(s[15]=u=>{n.value.peerNew.modalOpen=!1,k()})})):$("",!0)]),_:1})),n.value.peerScheduleJobsAll.modalOpen?(l(),x(M(C),{key:"PeerJobsAllModal",onRefresh:s[16]||(s[16]=u=>k()),onAllLogs:s[17]||(s[17]=u=>n.value.peerScheduleJobsLogs.modalOpen=!0),onClose:s[18]||(s[18]=u=>n.value.peerScheduleJobsAll.modalOpen=!1),configurationPeers:y.value},null,8,["configurationPeers"])):$("",!0),n.value.peerScheduleJobsLogs.modalOpen?(l(),x(M(P),{key:"PeerJobsLogsModal",onClose:s[19]||(s[19]=u=>n.value.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:h.value},null,8,["configurationInfo"])):$("",!0),n.value.editConfiguration.modalOpen?(l(),x(M(c),{key:"EditConfigurationModal",onEditRaw:s[20]||(s[20]=u=>n.value.editRawConfigurationFile.modalOpen=!0),onClose:s[21]||(s[21]=u=>n.value.editConfiguration.modalOpen=!1),onDataChanged:s[22]||(s[22]=u=>h.value=u),onRefresh:s[23]||(s[23]=u=>k()),onBackupRestore:s[24]||(s[24]=u=>n.value.backupRestore.modalOpen=!0),onDeleteConfiguration:s[25]||(s[25]=u=>n.value.deleteConfiguration.modalOpen=!0),configurationInfo:h.value},null,8,["configurationInfo"])):$("",!0),n.value.selectPeers.modalOpen?(l(),x(M(m),{key:3,onRefresh:s[26]||(s[26]=u=>k()),configurationPeers:y.value,onClose:s[27]||(s[27]=u=>n.value.selectPeers.modalOpen=!1)},null,8,["configurationPeers"])):$("",!0)]),_:1}),d(bs,{showPeersCount:Z.value,peerListLength:le.value.length,onLoadMore:s[28]||(s[28]=u=>Z.value+=go)},null,8,["showPeersCount","peerListLength"])]))}},Po=K(vo,[["__scopeId","data-v-f74f78f2"]]);export{Po as default};