Files
archy-demo/web-dist/assets/Home-BM_tfGHm.js

2 lines
24 KiB
JavaScript

import{d as he,c as u,f as i,F as $,P as O,E as t,m as ae,i as f,a as e,D as s,G as k,J as y,n as D,U as g,q as r,y as De,S as Ue,z as Le,A as Ne,w as re,o as Re,B as j,h as _,r as c,j as m,Y as Fe,Q as ce,x as Oe,Z as Qe,t as We}from"./index-DnbYEqLr.js";import{u as Ee}from"./loginTransition-Bm4PAghQ.js";import{P as ue}from"./api-CHkUAu4g.js";import{u as Ge,G as me}from"./goals-f4yPn45c.js";import{f as qe}from"./filebrowser-client-DRXM9PC4.js";const Ke={class:"flex items-start justify-between mb-4"},Ve={class:"w-10 h-10 rounded-xl bg-white/10 flex items-center justify-center shrink-0"},He={class:"text-xl"},ze={key:0,class:"w-1.5 h-1.5 rounded-full bg-green-400"},Je={key:1,class:"w-1.5 h-1.5 rounded-full bg-orange-400"},Ye={class:"text-lg font-semibold text-white mb-1"},Ze={class:"text-sm text-white/55 mb-4 leading-relaxed"},Xe={class:"flex items-center justify-between"},et={class:"text-xs text-white/40"},tt={class:"text-xs text-white/50 flex items-center gap-1"},st=he({__name:"EasyHome",props:{show:{type:Boolean},animate:{type:Boolean}},setup(Q){const a=Ge(),W=me,S=a.goalStatuses;function v(b){return{shop:"🏪",payments:"⚡",photos:"📸",files:"📁",lightning:"⚡",identity:"🔑",backup:"💾"}[b]||"📦"}function U(b){const x=S[b];return x==="completed"?"Done":x==="in-progress"?"In Progress":"Start"}function E(b){const x=S[b];return x==="completed"?"goal-status-badge-completed":x==="in-progress"?"goal-status-badge-in-progress":"goal-status-badge-not-started"}return(b,x)=>(r(),u("div",{class:i(["grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 mb-8 transition-opacity duration-300",{"opacity-0 pointer-events-none":!Q.show}])},[(r(!0),u($,null,O(t(W),(h,I)=>(r(),ae(t(g),{key:h.id,to:`/dashboard/goals/${h.id}`,class:i(["goal-card glass-card p-6 block",{"home-card-animate":Q.animate}]),style:D({"--card-stagger":I})},{default:f(()=>[e("div",Ke,[e("div",Ve,[e("span",He,s(v(h.icon)),1)]),e("span",{class:i(["goal-status-badge",E(h.id)])},[t(S)[h.id]==="completed"?(r(),u("span",ze)):t(S)[h.id]==="in-progress"?(r(),u("span",Je)):k("",!0),y(" "+s(U(h.id)),1)],2)]),e("h3",Ye,s(h.title),1),e("p",Ze,s(h.subtitle),1),e("div",Xe,[e("span",et,s(h.estimatedTime),1),e("span",tt,s(h.difficulty==="beginner"?"Beginner":"Intermediate"),1)])]),_:2},1032,["to","class","style"]))),128))],2))}}),ot={class:"pb-6"},at={class:"mb-4 md:mb-8 flex items-start justify-between gap-4"},nt={class:"min-h-[4.5rem]"},it={class:"text-3xl font-bold text-white mb-2 drop-shadow-[0_2px_8px_rgba(0,0,0,0.6)]"},lt={key:0,class:"typing-caret"},dt={class:"text-white/80"},rt={key:0,class:"typing-caret"},ct=["aria-selected"],ut=["aria-selected"],ht={class:"flex items-center gap-3 min-w-0"},mt={class:"min-w-0"},vt={class:"text-sm font-medium text-white"},pt={key:0,class:"text-xs text-white/60 truncate"},ft={class:"flex items-center gap-2 shrink-0"},gt=["aria-selected"],_t=["aria-selected"],bt={class:"home-card-shell"},xt={class:"home-card-inner p-6 flex flex-col h-full min-h-0"},wt={class:"home-card-header flex items-start justify-between mb-4 shrink-0"},yt={class:"home-card-text"},kt={class:"text-xl font-semibold text-white mb-1"},St={class:"text-sm text-white/70"},Ct={class:"home-card-stats grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4 flex-1 min-h-0"},jt={class:"p-4 bg-white/5 rounded-lg"},Tt={class:"text-2xl font-bold text-white"},Bt={class:"p-4 bg-white/5 rounded-lg flex items-center justify-around"},$t=["onClick","title"],It=["src","alt"],At={class:"home-card-buttons flex gap-2 mt-auto pt-4 shrink-0"},Mt={class:"home-card-shell"},Pt={class:"home-card-inner p-6 flex flex-col h-full min-h-0"},Dt={class:"home-card-header flex items-start justify-between mb-4 shrink-0"},Ut={class:"home-card-text"},Lt={class:"text-xl font-semibold text-white mb-1"},Nt={class:"text-sm text-white/70"},Rt={class:"home-card-stats grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4 flex-1 min-h-0"},Ft={class:"p-4 bg-white/5 rounded-lg"},Ot={class:"text-xs text-white/60 mb-1"},Qt={class:"text-2xl font-bold text-white"},Wt={class:"p-4 bg-white/5 rounded-lg"},Et={class:"text-xs text-white/60 mb-1"},Gt={class:"text-2xl font-bold text-white"},qt={class:"home-card-buttons flex gap-2 mt-auto pt-4 shrink-0"},Kt={class:"home-card-shell"},Vt={class:"home-card-inner p-6 flex flex-col h-full min-h-0"},Ht={class:"home-card-header flex items-start justify-between mb-4 shrink-0"},zt={class:"home-card-text"},Jt={class:"text-xl font-semibold text-white mb-1"},Yt={class:"text-sm text-white/70"},Zt={class:"home-card-stats space-y-3 mb-4 flex-1 min-h-0"},Xt={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},es={class:"flex items-center gap-3"},ts={class:"text-sm text-white/80"},ss={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},os={class:"flex items-center gap-3"},as={class:"text-sm text-white/80"},ns={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},is={class:"flex items-center gap-3"},ls={class:"text-sm text-white/80"},ds={class:"text-sm text-white/80 font-medium"},rs={class:"home-card-buttons flex gap-2 mt-auto pt-4 shrink-0"},cs={class:"home-card-shell"},us={class:"home-card-inner p-6 flex flex-col h-full min-h-0"},hs={class:"home-card-header flex items-start justify-between mb-4 shrink-0"},ms={class:"home-card-text"},vs={class:"text-xl font-semibold text-white mb-1"},ps={class:"text-sm text-white/70"},fs={class:"home-card-stats space-y-3 mb-4 flex-1 min-h-0"},gs={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},_s={class:"flex items-center gap-3"},bs={class:"text-sm text-white/80"},xs={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},ws={class:"flex items-center gap-3"},ys={class:"text-sm text-white/80"},ks={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},Ss={class:"flex items-center gap-3"},Cs={class:"text-sm text-white/80"},js={class:"text-sm text-white/50 font-medium"},Ts={class:"home-card-buttons flex gap-2 mt-auto pt-4 shrink-0"},Bs={class:"home-card-shell"},$s={class:"home-card-inner p-6 flex flex-col h-full min-h-0"},Is={class:"home-card-header flex items-start justify-between mb-4 shrink-0"},As={class:"home-card-text"},Ms={class:"text-xl font-semibold text-white mb-1"},Ps={class:"text-sm text-white/70"},Ds={class:"home-card-stats grid grid-cols-1 sm:grid-cols-3 gap-4 flex-1 min-h-0"},Us={class:"p-4 bg-white/5 rounded-lg"},Ls={class:"flex items-center justify-between mb-2"},Ns={class:"text-xs text-white/60"},Rs={class:"w-full h-2 bg-white/10 rounded-full overflow-hidden"},Fs={class:"p-4 bg-white/5 rounded-lg"},Os={class:"flex items-center justify-between mb-2"},Qs={class:"text-xs text-white/60"},Ws={class:"w-full h-2 bg-white/10 rounded-full overflow-hidden"},Es={class:"p-4 bg-white/5 rounded-lg"},Gs={class:"flex items-center justify-between mb-2"},qs={class:"text-xs text-white/60"},Ks={class:"w-full h-2 bg-white/10 rounded-full overflow-hidden"},Vs={class:"home-card-shell"},Hs={class:"home-card-inner px-6 py-6"},zs={class:"flex items-start justify-between mb-2"},Js={class:"text-xl font-semibold text-white/96 mb-1"},Ys={class:"text-sm text-white/60 mb-4"},Zs={class:"grid grid-cols-1 md:grid-cols-3 gap-3"},Xs={key:2,class:"flex flex-col items-center justify-center min-h-[40vh]"},oe="archipelago-quick-start-dismissed",eo=5,to=55,so=he({__name:"Home",setup(Q){const{t:a}=De(),W=Oe(),S=Ue(),v=c("dashboard"),U=me.slice(0,3),E=[...new Set(U.flatMap(o=>o.requiredApps))],b=Le(),x=Ee(),h=a("home.title"),I=a("home.subtitle"),G=c(""),q=c(""),K=c(!1),L=c(!1),w=c(!1),ne=c(!1),p=c(!1);let T=null;const ve=m(()=>w.value?G.value:h),pe=m(()=>w.value?q.value:I);Ne(()=>{T&&clearInterval(T),se&&clearInterval(se)}),re(()=>x.pendingWelcomeTyping,o=>{o&&(w.value=!0)}),re(()=>x.startWelcomeTyping,o=>{if(!o||ne.value)return;ne.value=!0,w.value=!0,G.value="",q.value="",K.value=!0,L.value=!1,Qe(),p.value=!0;let n=0;T=setInterval(()=>{n<h.length?(G.value=h.slice(0,n+1),n++):n<h.length+I.length?(K.value=!1,L.value=!0,q.value=I.slice(0,n-h.length+1),n++):(T&&clearInterval(T),T=null,L.value=!1,x.setStartWelcomeTyping(!1))},to)},{immediate:!0});const N=m(()=>b.packages),C=m(()=>Object.keys(N.value||{}).length),R=m(()=>Object.values(N.value||{}).filter(o=>o.state===ue.Running).length),fe=[{id:"indeedhub",name:"Indeehub",icon:"/assets/img/app-icons/indeedhub.png",bg:"#0a0a0a",padded:!0},{id:"botfights",name:"BotFights",icon:"/assets/img/app-icons/botfights.svg",bg:"",padded:!1},{id:"484-kitchen",name:"484 Kitchen",icon:"/assets/img/app-icons/484-kitchen.png",bg:"",padded:!1}],V=m(()=>C.value>0&&R.value===C.value),ge=m(()=>C.value===0?a("home.noApps"):V.value?a("home.allRunning"):`${R.value}/${C.value} ${a("home.runningLabel")}`),_e=m(()=>C.value===0?"text-white/60":V.value?"text-green-400":"text-yellow-400"),be=m(()=>C.value===0?"bg-white/40":V.value?"bg-green-400":"bg-yellow-400"),xe=m(()=>b.isConnected?a("common.connected"):a("common.disconnected")),we=m(()=>b.isConnected?"text-green-400":"text-red-400"),ye=m(()=>b.isConnected?"bg-green-400":"bg-red-400"),B=c(!1),ke=m(()=>E.every(o=>Object.keys(N.value).includes(o))),Se=m(()=>ke.value?!1:!B.value);function Ce(){try{const o=localStorage.getItem(oe);if(!o){B.value=!1;return}const n=JSON.parse(o);if(!n.dismissed){B.value=!1;return}const l=(n.loginCount||0)+1;localStorage.setItem(oe,JSON.stringify({dismissed:!0,loginCount:l})),B.value=l%eo!==0}catch{B.value=!1}}function je(){B.value=!0;try{localStorage.setItem(oe,JSON.stringify({dismissed:!0,loginCount:0}))}catch{}}Ce();const H=c(!1),ie=c(!1),le=c(""),z=c("");async function Te(){try{const o=await j.call({method:"update.status"});H.value=o.update_available}catch{}if(H.value)try{const o=await j.call({method:"update.check"});o.update&&(le.value=o.update.version,z.value=o.update.changelog.slice(0,2).join("; "))}catch{}}async function Be(){ie.value=!0;try{await j.call({method:"update.dismiss"})}catch{}}const J=c(null),Y=c(null);function A(o){if(o===0)return"0 B";const n=["B","KB","MB","GB","TB"],l=Math.floor(Math.log(o)/Math.log(1024)),F=o/Math.pow(1024,l);return`${F<10?F.toFixed(1):Math.round(F)} ${n[l]}`}const $e=m(()=>J.value!==null?A(J.value):"..."),Ie=m(()=>Y.value!==null?String(Y.value):"...");Re(async()=>{try{const o=await qe.getUsage();J.value=o.totalSize,Y.value=o.folderCount}catch{}de(),se=setInterval(de,3e4),Te(),Ae()});const M=c("--"),P=c("--"),Z=c("--");async function Ae(){try{const o=await j.call({method:"identity.get",timeout:5e3});M.value=o.did?"Active":"Inactive"}catch{M.value="--"}try{const o=await j.call({method:"dwn.health",timeout:5e3});P.value=o.status==="ok"?"Synced":o.status||"--"}catch{P.value="--"}try{const o=await j.call({method:"identity.list-credentials",timeout:5e3});Z.value=String(o.credentials?.length??0)}catch{Z.value="0"}}const X=c(!1),d=Fe({cpuPercent:0,memUsed:0,memTotal:0,memPercent:0,diskUsed:0,diskTotal:0,diskPercent:0,uptimeSecs:0}),Me=m(()=>{if(d.uptimeSecs===0)return a("home.systemMonitoring");const o=Math.floor(d.uptimeSecs/86400),n=Math.floor(d.uptimeSecs%86400/3600);if(o>0)return`Uptime: ${o}d ${n}h`;const l=Math.floor(d.uptimeSecs%3600/60);return`Uptime: ${n}h ${l}m`});function ee(o){return o>=90?"text-red-400":o>=70?"text-orange-400":"text-green-400"}function te(o){return o>=90?"bg-red-400":o>=70?"bg-orange-400":"bg-green-400"}let se=null;async function de(){try{const o=await j.call({method:"system.stats"});d.cpuPercent=o.cpu_usage_percent,d.memUsed=o.mem_used_bytes,d.memTotal=o.mem_total_bytes,d.memPercent=o.mem_total_bytes>0?o.mem_used_bytes/o.mem_total_bytes*100:0,d.diskUsed=o.disk_used_bytes,d.diskTotal=o.disk_total_bytes,d.diskPercent=o.disk_total_bytes>0?o.disk_used_bytes/o.disk_total_bytes*100:0,d.uptimeSecs=o.uptime_secs,X.value=!0}catch{X.value=!0}}function Pe(){const o=N.value.filebrowser;if(o&&o.state===ue.Running){const n=window.location.hostname;ce().open({url:`http://${n}:8083`,title:"File Browser"})}else W.push("/dashboard/cloud")}return(o,n)=>(r(),u("div",ot,[e("div",at,[e("div",nt,[e("h1",it,[y(s(ve.value),1),K.value?(r(),u("span",lt)):k("",!0)]),e("p",dt,[y(s(pe.value),1),L.value?(r(),u("span",rt)):k("",!0)])]),t(S).isChat?k("",!0):(r(),u("div",{key:0,class:i(["hidden md:flex mode-switcher flex-shrink-0 transition-opacity duration-500",{"opacity-0 pointer-events-none":w.value&&!p.value}])},[e("button",{class:i(["mode-switcher-btn",{"mode-switcher-btn-active":v.value==="dashboard"}]),role:"tab","aria-selected":v.value==="dashboard",onClick:n[0]||(n[0]=l=>v.value="dashboard")},s(t(a)("home.dashboardTab")),11,ct),e("button",{class:i(["mode-switcher-btn",{"mode-switcher-btn-active":v.value==="setup"}]),role:"tab","aria-selected":v.value==="setup",onClick:n[1]||(n[1]=l=>v.value="setup")},s(t(a)("home.setupTab")),11,ut)],2))]),H.value&&!ie.value?(r(),u("div",{key:0,role:"alert",class:i(["mb-6 glass-card p-4 flex items-center justify-between gap-4 border-l-4 border-orange-400 transition-opacity duration-300",{"opacity-0 pointer-events-none":w.value&&!p.value}])},[e("div",ht,[n[4]||(n[4]=e("svg",{class:"w-6 h-6 text-orange-400 shrink-0","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),e("div",mt,[e("p",vt,s(t(a)("home.updateAvailable",{version:le.value})),1),z.value?(r(),u("p",pt,s(z.value),1)):k("",!0)])]),e("div",ft,[_(t(g),{to:"/dashboard/settings/update",class:"glass-button rounded-lg px-4 py-2 text-sm font-medium"},{default:f(()=>[y(s(t(a)("home.updateNow")),1)]),_:1}),e("button",{onClick:Be,"aria-label":"Dismiss update notification",class:"text-white/40 hover:text-white/80 transition-colors p-1",title:"Dismiss"},[...n[5]||(n[5]=[e("svg",{class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])])],2)):k("",!0),t(S).isChat?k("",!0):(r(),u($,{key:1},[e("div",{class:i(["md:hidden mode-switcher mb-6 w-full transition-opacity duration-500",{"opacity-0 pointer-events-none":w.value&&!p.value}]),role:"tablist"},[e("button",{class:i(["mode-switcher-btn",{"mode-switcher-btn-active":v.value==="dashboard"}]),role:"tab","aria-selected":v.value==="dashboard",onClick:n[2]||(n[2]=l=>v.value="dashboard")},s(t(a)("home.dashboardTab")),11,gt),e("button",{class:i(["mode-switcher-btn",{"mode-switcher-btn-active":v.value==="setup"}]),role:"tab","aria-selected":v.value==="setup",onClick:n[3]||(n[3]=l=>v.value="setup")},s(t(a)("home.setupTab")),11,_t)],2),v.value==="setup"?(r(),ae(st,{key:0,show:!w.value||p.value,animate:p.value},null,8,["show","animate"])):(r(),u("div",{key:1,class:i(["grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8 transition-opacity duration-300",{"opacity-0 pointer-events-none":w.value&&!p.value}])},[e("div",{"data-controller-container":"",tabindex:"0",class:i(["home-card controller-focusable",{"home-card-animate":p.value}]),style:{"--card-stagger":"0"}},[e("div",bt,[e("div",xt,[e("div",wt,[e("div",yt,[e("h2",kt,s(t(a)("home.myApps")),1),e("p",St,s(t(a)("home.myAppsDesc")),1)]),_(t(g),{to:"/dashboard/apps","aria-label":t(a)("home.goToApps"),class:"text-white/60 hover:text-white transition-colors"},{default:f(()=>[...n[6]||(n[6]=[e("svg",{class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])]),_:1},8,["aria-label"])]),e("div",Ct,[e("div",jt,[n[7]||(n[7]=e("p",{class:"text-xs text-white/60 mb-1"},"Installed / Running",-1)),e("p",Tt,s(C.value)+"/"+s(R.value),1)]),e("div",Bt,[(r(),u($,null,O(fe,l=>e("button",{key:l.id,onClick:F=>t(ce)().openSession(l.id),class:"group",title:l.name},[e("div",{class:i(["w-14 h-14 rounded-xl overflow-hidden border border-white/10 transition-all group-hover:-translate-y-1 group-hover:border-white/25 group-hover:shadow-lg flex items-center justify-center",{"bg-white/5":!l.bg}]),style:D(l.bg?{background:l.bg}:{})},[e("img",{src:l.icon,alt:l.name,class:i(l.padded?"w-10 h-10 object-contain":"w-full h-full object-cover")},null,10,It)],6)],8,$t)),64))])]),e("div",At,[_(t(g),{to:"/dashboard/marketplace",class:"home-card-btn flex-1 px-4 py-2 glass-button rounded-lg text-sm font-medium text-center transition-colors"},{default:f(()=>[y(s(t(a)("home.browseStore")),1)]),_:1}),_(t(g),{to:"/dashboard/apps",class:"home-card-btn flex-1 px-4 py-2 glass-button rounded-lg text-sm font-medium text-center transition-colors"},{default:f(()=>[y(s(t(a)("home.manageApps")),1)]),_:1})])])])],2),e("div",{"data-controller-container":"",tabindex:"0",class:i(["home-card controller-focusable",{"home-card-animate":p.value}]),style:{"--card-stagger":"1"}},[e("div",Mt,[e("div",Pt,[e("div",Dt,[e("div",Ut,[e("h2",Lt,s(t(a)("home.cloud")),1),e("p",Nt,s(t(a)("home.cloudDesc")),1)]),_(t(g),{to:"/dashboard/cloud","aria-label":t(a)("home.goToCloud"),class:"text-white/60 hover:text-white transition-colors"},{default:f(()=>[...n[8]||(n[8]=[e("svg",{class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])]),_:1},8,["aria-label"])]),e("div",Rt,[e("div",Ft,[e("p",Ot,s(t(a)("home.storageUsed")),1),e("p",Qt,s($e.value),1)]),e("div",Wt,[e("p",Et,s(t(a)("home.folders")),1),e("p",Gt,s(Ie.value),1)])]),e("div",qt,[_(t(g),{to:"/dashboard/cloud",class:"home-card-btn flex-1 px-4 py-2 glass-button rounded-lg text-sm font-medium text-center transition-colors"},{default:f(()=>[y(s(t(a)("home.viewFolders")),1)]),_:1}),e("button",{onClick:Pe,class:"home-card-btn flex-1 px-4 py-2 glass-button rounded-lg text-sm font-medium text-center transition-colors"},s(t(a)("home.uploadFiles")),1)])])])],2),e("div",{"data-controller-container":"",tabindex:"0",class:i(["home-card controller-focusable",{"home-card-animate":p.value}]),style:{"--card-stagger":"2"}},[e("div",Kt,[e("div",Vt,[e("div",Ht,[e("div",zt,[e("h2",Jt,s(t(a)("home.network")),1),e("p",Yt,s(t(a)("home.networkDesc")),1)]),_(t(g),{to:"/dashboard/server","aria-label":t(a)("home.goToNetwork"),class:"text-white/60 hover:text-white transition-colors"},{default:f(()=>[...n[9]||(n[9]=[e("svg",{class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])]),_:1},8,["aria-label"])]),e("div",Zt,[e("div",Xt,[e("div",es,[e("div",{class:i(["w-2 h-2 rounded-full",be.value])},null,2),e("span",ts,s(t(a)("home.servicesStatus")),1)]),e("span",{class:i(["text-sm font-medium",_e.value])},s(ge.value),3)]),e("div",ss,[e("div",os,[e("div",{class:i(["w-2 h-2 rounded-full",ye.value])},null,2),e("span",as,s(t(a)("home.connectivity")),1)]),e("span",{class:i(["text-sm font-medium",we.value])},s(xe.value),3)]),e("div",ns,[e("div",is,[n[10]||(n[10]=e("div",{class:"w-2 h-2 rounded-full bg-blue-400"},null,-1)),e("span",ls,s(t(a)("home.runningApps")),1)]),e("span",ds,s(R.value),1)])]),e("div",rs,[_(t(g),{to:"/dashboard/server",class:"home-card-btn flex-1 px-4 py-2 glass-button rounded-lg text-sm font-medium text-center transition-colors"},{default:f(()=>[y(s(t(a)("home.manageNetwork")),1)]),_:1})])])])],2),e("div",{"data-controller-container":"",tabindex:"0",class:i(["home-card controller-focusable",{"home-card-animate":p.value}]),style:{"--card-stagger":"3"}},[e("div",cs,[e("div",us,[e("div",hs,[e("div",ms,[e("h2",vs,s(t(a)("home.web5")),1),e("p",ps,s(t(a)("home.web5Desc")),1)]),_(t(g),{to:"/dashboard/web5","aria-label":t(a)("home.goToWeb5"),class:"text-white/60 hover:text-white transition-colors"},{default:f(()=>[...n[11]||(n[11]=[e("svg",{class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])]),_:1},8,["aria-label"])]),e("div",fs,[e("div",gs,[e("div",_s,[e("div",{class:i(["w-2 h-2 rounded-full",M.value==="Active"?"bg-green-400":"bg-white/30"])},null,2),e("span",bs,s(t(a)("home.didStatus")),1)]),e("span",{class:i(["text-sm font-medium",M.value==="Active"?"text-green-400":"text-white/50"])},s(M.value),3)]),e("div",xs,[e("div",ws,[e("div",{class:i(["w-2 h-2 rounded-full",P.value==="Synced"?"bg-green-400":"bg-white/30"])},null,2),e("span",ys,s(t(a)("home.dwnSync")),1)]),e("span",{class:i(["text-sm font-medium",P.value==="Synced"?"text-green-400":"text-white/50"])},s(P.value),3)]),e("div",ks,[e("div",Ss,[n[12]||(n[12]=e("div",{class:"w-2 h-2 rounded-full bg-white/30"},null,-1)),e("span",Cs,s(t(a)("home.credentials")),1)]),e("span",js,s(Z.value),1)])]),e("div",Ts,[_(t(g),{to:"/dashboard/web5",class:"home-card-btn flex-1 px-4 py-2 glass-button rounded-lg text-sm font-medium text-center transition-colors"},{default:f(()=>[y(s(t(a)("home.manageWeb5")),1)]),_:1})])])])],2),e("div",{"data-controller-container":"",tabindex:"0",class:i(["home-card controller-focusable lg:col-span-2",{"home-card-animate":p.value}]),style:{"--card-stagger":"4"}},[e("div",Bs,[e("div",$s,[e("div",Is,[e("div",As,[e("h2",Ms,s(t(a)("home.system")),1),e("p",Ps,s(Me.value),1)]),_(t(g),{to:"/dashboard/server","aria-label":t(a)("home.goToSettings"),class:"text-white/60 hover:text-white transition-colors"},{default:f(()=>[...n[13]||(n[13]=[e("svg",{class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])]),_:1},8,["aria-label"])]),e("div",Ds,[X.value?(r(),u($,{key:1},[e("div",Us,[e("div",Ls,[e("p",Ns,s(t(a)("home.cpu")),1),e("p",{class:i(["text-sm font-medium",ee(d.cpuPercent)])},s(d.cpuPercent.toFixed(0))+"%",3)]),e("div",Rs,[e("div",{class:i(["h-full rounded-full transition-all duration-500",te(d.cpuPercent)]),style:D({width:d.cpuPercent+"%"})},null,6)])]),e("div",Fs,[e("div",Os,[e("p",Qs,s(t(a)("home.ram")),1),e("p",{class:i(["text-sm font-medium",ee(d.memPercent)])},s(A(d.memUsed))+" / "+s(A(d.memTotal)),3)]),e("div",Ws,[e("div",{class:i(["h-full rounded-full transition-all duration-500",te(d.memPercent)]),style:D({width:d.memPercent+"%"})},null,6)])]),e("div",Es,[e("div",Gs,[e("p",qs,s(t(a)("home.disk")),1),e("p",{class:i(["text-sm font-medium",ee(d.diskPercent)])},s(A(d.diskUsed))+" / "+s(A(d.diskTotal)),3)]),e("div",Ks,[e("div",{class:i(["h-full rounded-full transition-all duration-500",te(d.diskPercent)]),style:D({width:d.diskPercent+"%"})},null,6)])])],64)):(r(),u($,{key:0},O(3,l=>e("div",{key:l,class:"p-4 bg-white/5 rounded-lg animate-pulse"},[...n[14]||(n[14]=[e("div",{class:"flex items-center justify-between mb-2"},[e("div",{class:"w-8 h-3 bg-white/10 rounded"}),e("div",{class:"w-12 h-4 bg-white/10 rounded"})],-1),e("div",{class:"w-full h-2 bg-white/10 rounded-full"},null,-1)])])),64))])])])],2)],2)),v.value==="dashboard"&&Se.value?(r(),u("div",{key:2,class:i(["home-card transition-opacity duration-300",{"home-card-animate":p.value,"opacity-0 pointer-events-none":w.value&&!p.value}]),style:{"--card-stagger":"5"}},[e("div",Vs,[e("div",Hs,[e("div",zs,[e("div",null,[e("h2",Js,s(t(a)("home.quickStartGoals")),1),e("p",Ys,s(t(a)("home.quickStartDesc")),1)]),e("button",{onClick:je,"aria-label":"Dismiss Quick Start",class:"text-white/40 hover:text-white/80 transition-colors p-1 -mt-1 -mr-1",title:"Dismiss"},[...n[15]||(n[15]=[e("svg",{class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e("div",Zs,[(r(!0),u($,null,O(t(U),l=>(r(),ae(t(g),{key:l.id,to:`/dashboard/goals/${l.id}`,class:"home-card-btn path-action-button path-action-button--continue flex items-center justify-center gap-3"},{default:f(()=>[e("span",null,s(l.title),1)]),_:2},1032,["to"]))),128))])])])],2)):k("",!0)],64)),t(S).isChat?(r(),u("div",Xs,[_(t(g),{to:"/dashboard/chat",class:"glass-button rounded-lg px-8 py-4 text-lg font-medium"},{default:f(()=>[y(s(t(a)("home.openAI")),1)]),_:1})])):k("",!0)]))}}),ro=We(so,[["__scopeId","data-v-ed7f5b36"]]);export{ro as default};