const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./VkTn1L45.js","./BXyDg5m4.js","./Dk4AzF7j.js","./entry.CN1Tt2no.css","./BnFHREeV.js","./D5F0NbWF.js","./88opOQSr.js","./AdvisorContent.D0MVqE5M.css"])))=>i.map(i=>d[i]);
import{d as x,u as A,a3 as B,v as P,P as E,z as N,k,c as I,o as $,w as h,a as v,s as z,p as S,m as o,e as b,b as r,t as l,_ as T,q as j,ab as D,n as C,A as O,ac as F,ca as V,aO as H,cb as L,R as q,g as i,cc as J,J as K,i as Q,Q as W,j as Y,l as M,Y as G,B as X,ag as Z}from"./Dk4AzF7j.js";import{_ as ee}from"./C_tXuDKt.js";import{d as te,s as oe}from"./CJbRX-Xv.js";import{_ as se}from"./BnFHREeV.js";const ne=D(()=>F(()=>import("./VkTn1L45.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url).then(c=>c.default||c)),ae={class:"flex items-center"},re={class:"sr-only"},ce={class:"text-xl text-uiText-toned"},ie={class:"text-uiText-muted font-normal"},le=x({__name:"MoreInfo",props:{title:{default:""},description:{default:""},infoType:{}},setup(c){const a=c,{tippyTheme:m}=A();B();const e=P(!1);te({[oe.advisor]:()=>e.value=!e.value});const{tracker:n}=E();return N(()=>{e.value&&n("advisor_info","click",`Open advisor info for ${a.infoType}`)}),(t,s)=>{const u=T,d=z,f=ne,p=ee,_=k("tippy");return $(),I(p,{open:o(e),"onUpdate:open":s[0]||(s[0]=g=>O(e)?e.value=g:null),ui:{content:"max-w-[500px]"}},{title:h(()=>[r("span",ce,[C(l(t.$t("Advisor"))+": ",1),r("span",ie,l(t.$t(`pageName.${t.title}`)),1)])]),body:h(()=>[v(f,{"info-type":t.infoType},null,8,["info-type"])]),default:h(()=>[v(d,{variant:"soft",color:"secondary",size:"sm",class:"flex items-center"},{default:h(()=>[S(($(),b("span",ae,[r("span",re,l(t.$t("MoreInfo")),1),v(u,{name:o(j).icoInfo,class:"size-5"},null,8,["name"])])),[[_,{content:t.$t("MoreInfo"),theme:o(m)}]])]),_:1})]),_:1},8,["open"])}}}),Te=Object.assign(le,{__name:"MoreInfo"}),ue={class:"flex items-center o_gap-2"},pe={class:""},_e={class:"text-xs"},me=x({__name:"CollectDataInfo",props:{dataCount:{default:0}},setup(c){const a=P(!1),{start:m,stop:e}=V(()=>{a.value=!0},500);H(()=>{m()}),L(()=>{e()});const n=q();i(()=>n.memories.finishFullRun),i(()=>n.memories.registeredProject);const{getProjectMemories:t}=J(),{t:s}=K(),u=i(()=>t?t.receivedTools.length:0),d=i(()=>t?t.receivedTools.length<18:!1),f=i(()=>{if(!t)return 0;const y=Math.round(u.value/19*100);return s("projectProgressInPercent",{n:y})}),{pid:p,sid:_}=Q().params,g=W();Y(()=>u.value,async()=>{!p||!_||n.memories.registeredProject?.includes(`${p}-${_}`)&&(n.memories.finishFullRun?.includes(`${p}-${_}`)||u.value===19&&(await n.addFinishFullRun(Number(p),Number(_)),g.add({title:s("projectEvent.notification.firstResultsAvailableTitle"),description:s("projectEvent.notification.firstResultsAvailableDescription"),color:"success",icon:"i-heroicons-check-circle"}),U()))});const U=()=>{setTimeout(()=>{window.location.reload()},2e3)};return(y,$e)=>{const R=T,w=se;return o(a)&&(o(d)||y.dataCount===0)?($(),I(w,{key:0,color:"info",variant:"subtle",ui:{root:"p-00 o_p-3"}},{description:h(()=>[r("div",ue,[v(R,{name:o(j).icoHourglass,class:"size-4"},null,8,["name"]),r("div",pe,[C(l(y.$t("noStatsOnProject"))+" ",1),r("span",_e,"("+l(o(f))+")",1)])])]),_:1})):M("",!0)}}}),je=Object.assign(me,{__name:"CollectDataInfo"}),de={class:"text-uiText-toned flex items-center font-medium o_gap-1"},fe=["href","aria-label"],he={class:"sr-only"},ve=x({__name:"MetricPageHeader",props:{component:{}},setup(c){const a=c,m=G(),e=i(()=>a.component?.url?a.component.url:m.selectCurrentSystem?.components?.find(s=>s.id===Number(a.component.id))?.url),n=X(),t=i(()=>n.value==="dark"?"light":"dark");return(s,u)=>{const d=T,f=k("tippy");return $(),b("header",null,[r("h3",de,[Z(s.$slots,"default"),o(e)?.length?S(($(),b("a",{key:0,href:o(e),target:"_blank",rel:"noopener noreferrer",class:"o_ml-2 flex items-center","aria-label":s.$t("goto")+": "+o(e)},[v(d,{name:o(j).icoExternalLink,class:"size-4 o_opacity-60"},null,8,["name"]),r("span",he,l(s.$t("goto"))+": "+l(o(e)),1)],8,fe)),[[f,{theme:o(t),content:`${s.$t("externalLink")}: ${o(e)}`}]]):M("",!0)])])}}}),Pe=Object.assign(ve,{__name:"MetricPageHeader"});export{Te as _,je as a,Pe as b};
