var C=Object.defineProperty;var f=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var h=(a,i,n)=>i in a?C(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n,b=(a,i)=>{for(var n in i||(i={}))y.call(i,n)&&h(a,n,i[n]);if(f)for(var n of f(i))I.call(i,n)&&h(a,n,i[n]);return a};import{i as e,a5 as x,a7 as k,n as B}from"./app-JmgyQoR0.js";import{M as D}from"./MkPagination-urywMrXv.js";import{M as F}from"./MkInstanceCardMini-JsyGE_Zs.js";import{F as R}from"./split-mI9ZWkMh.js";import{b as N,a as v,c as q,D as E,g as L,h as _,t as S,u as o,l as p,j as l,K as m,E as t,z as s,i as O,F as U,G as $,q as X,I as j,J as z}from"./vue-y3KLWBaS.js";const G=a=>(j("data-v-bc973b9e"),a=a(),z(),a),J={class:"taeiyria"},K={class:"query"},P=G(()=>o("i",{class:"ph-magnifying-glass ph-bold ph-lg"},null,-1)),T={value:"all"},H={value:"federating"},Q={value:"subscribing"},W={value:"publishing"},Y={value:"suspended"},Z={value:"blocked"},ee={value:"silenced"},te={value:"notResponding"},se={value:"+pubSub"},oe={value:"-pubSub"},ne={value:"+notes"},ie={value:"-notes"},ae={value:"+users"},le={value:"-users"},de={value:"+following"},re={value:"-following"},ue={value:"+followers"},ce={value:"-followers"},pe={value:"+caughtAt"},_e={value:"-caughtAt"},ge={value:"+lastCommunicatedAt"},ve={value:"-lastCommunicatedAt"},me={class:"dqokceoi"},fe=N({__name:"about.federation",setup(a){let i=v(""),n=v("federating"),g=v("+pubSub");const w={endpoint:"federation/instances",limit:10,offsetMode:!0,params:q(()=>b({sort:g.value,host:i.value!==""?i.value:null},n.value==="federating"?{federating:!0}:n.value==="subscribing"?{subscribing:!0}:n.value==="publishing"?{publishing:!0}:n.value==="suspended"?{suspended:!0}:n.value==="blocked"?{blocked:!0}:n.value==="silenced"?{silenced:!0}:n.value==="notResponding"?{notResponding:!0}:{}))};function V(u){return u.isSuspended?"Suspended":u.isBlocked?"Blocked":u.isSilenced?"Silenced":u.isNotResponding?"Error":"Alive"}return(u,r)=>{const A=E("MkA"),M=L("tooltip");return _(),S("div",J,[o("div",K,[p(x,{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=d=>i.value=d),debounce:!0,class:""},{prefix:l(()=>[P]),label:l(()=>[m(t(s(e).ts.host),1)]),_:1},8,["modelValue"]),p(R,{style:{"margin-top":"var(--margin)"}},{default:l(()=>[p(k,{modelValue:n.value,"onUpdate:modelValue":r[1]||(r[1]=d=>n.value=d)},{label:l(()=>[m(t(s(e).ts.state),1)]),default:l(()=>[o("option",T,t(s(e).ts.all),1),o("option",H,t(s(e).ts.federating),1),o("option",Q,t(s(e).ts.subscribing),1),o("option",W,t(s(e).ts.publishing),1),o("option",Y,t(s(e).ts.suspended),1),o("option",Z,t(s(e).ts.blocked),1),o("option",ee,t(s(e).ts.silenced),1),o("option",te,t(s(e).ts.notResponding),1)]),_:1},8,["modelValue"]),p(k,{modelValue:g.value,"onUpdate:modelValue":r[2]||(r[2]=d=>g.value=d)},{label:l(()=>[m(t(s(e).ts.sort),1)]),default:l(()=>[o("option",se,t(s(e).ts.pubSub)+" ("+t(s(e).ts.descendingOrder)+") ",1),o("option",oe,t(s(e).ts.pubSub)+" ("+t(s(e).ts.ascendingOrder)+") ",1),o("option",ne,t(s(e).ts.notes)+" ("+t(s(e).ts.descendingOrder)+") ",1),o("option",ie,t(s(e).ts.notes)+" ("+t(s(e).ts.ascendingOrder)+") ",1),o("option",ae,t(s(e).ts.users)+" ("+t(s(e).ts.descendingOrder)+") ",1),o("option",le,t(s(e).ts.users)+" ("+t(s(e).ts.ascendingOrder)+") ",1),o("option",de,t(s(e).ts.following)+" ("+t(s(e).ts.descendingOrder)+") ",1),o("option",re,t(s(e).ts.following)+" ("+t(s(e).ts.ascendingOrder)+") ",1),o("option",ue,t(s(e).ts.followers)+" ("+t(s(e).ts.descendingOrder)+") ",1),o("option",ce,t(s(e).ts.followers)+" ("+t(s(e).ts.ascendingOrder)+") ",1),o("option",pe,t(s(e).ts.registeredAt)+" ("+t(s(e).ts.descendingOrder)+") ",1),o("option",_e,t(s(e).ts.registeredAt)+" ("+t(s(e).ts.ascendingOrder)+") ",1),o("option",ge,t(s(e).ts.lastCommunication)+" ("+t(s(e).ts.descendingOrder)+") ",1),o("option",ve,t(s(e).ts.lastCommunication)+" ("+t(s(e).ts.ascendingOrder)+") ",1)]),_:1},8,["modelValue"])]),_:1})]),(_(),O(D,{ref:"instances",key:i.value+n.value,pagination:w},{default:l(({items:d})=>[o("div",me,[(_(!0),S(U,null,$(d,c=>X((_(),O(A,{key:c.id,class:"instance",to:`/instance-info/${c.host}`},{default:l(()=>[p(F,{instance:c},null,8,["instance"])]),_:2},1032,["to"])),[[M,`Last communicated: ${new Date(c.lastCommunicatedAt).toLocaleString()}
Status: ${V(c)}`,void 0,{mfm:!0}]])),128))])]),_:1}))])}}}),Ve=B(fe,[["__scopeId","data-v-bc973b9e"]]);export{Ve as X};
