import{_ as M,a as V}from"./DCtuMFER.js";import{_ as J}from"./DXaD0OjS.js";import{_ as P}from"./BGi3spfc.js";import{_ as q}from"./CyO5g1gb.js";import{_ as I}from"./gjovfe2x.js";import{_ as K}from"./DbksU3dH.js";import{_ as L}from"./DPmE0egs.js";import{_ as U}from"./BY0xeA_q.js";import{d as z,N as O,a3 as W,i as G,P as Q,a4 as X,e as s,o as t,a,l as c,c as u,w as l,m as r,F as d,r as k,q as Y,b as f,n as Z,t as y}from"./B08CJtNn.js";import"./laKVya4-.js";import"./MxJSE5eV.js";import"./BTwP6ady.js";import"./BXavTXDM.js";import"./CqE4Z78-.js";import"./fTZc3uM5.js";import"./88opOQSr.js";import"./eHv8qUqa.js";import"./rOCSnSVW.js";import"./BRNs145u.js";import"./CD8fUNjX.js";import"./CUy7HhdT.js";import"./CRXJzjwR.js";import"./xjUEazAQ.js";import"./aIDcP5lR.js";import"./NkNhW2e0.js";import"./BmXXXyAy.js";const ee={key:0,class:"flex items-center gap-2 flex-wrap o_mb-4"},te={key:1,class:"flex flex-col o_gap-6 @container/simpleresult"},re={class:"list-inside text-sm text-uiText-toned text-pretty max-w-[90ch] flex flex-col o_gap-1"},oe={class:"flex items-center o_gap-2"},se={class:"text-uiText-toned"},S="javascript",Ee=z({__name:"javascript-[pid]-[sid]",setup(ne){const{kapi:b}=O(),{setCachedData:j,addTimeToProcessedData:T}=W(),h=G(),{sid:p,pid:C}=h.params;if(!p)throw new Error("sid is required");const{trackFirstSeen:D}=Q(),{data:i,error:g,refresh:v}=X(`metrics-javascript-${p||0}`,async()=>await b("CheckJavaScriptErrors").then(e=>e.getResults(Number(p))),{transform:e=>{D(Number(C),Number(p),h.name);const m={results:Object.values(e).map(({javascript_errors:n,..._})=>({..._,errors:n||[]}))};return T(m)},getCachedData:(e,m,n)=>{if(!(n.cause==="refresh:manual"||n.cause==="refresh:hook"))return j(e)}});return(e,m)=>{const n=M,_=J,N=V,R=P,$=q,w=I,E=K,H=L,A=U;return t(),s("div",null,[a(_,{"page-key":"pMonitoringTechnicalJavascript"},{title:l(()=>[a(n,{title:"pMonitoringTechnicalJavascript","info-type":S})]),_:1}),r(i)?.results?(t(),s(d,{key:0},[a(N,{"data-count":r(i).results.length,class:"o_mb-6"},null,8,["data-count"]),r(i)?.results?.length?(t(),s("div",ee,[a(R,{"metric-key":S,onSaveSettings:r(v)},null,8,["onSaveSettings"])])):c("",!0),r(i).results.length?(t(),s("div",te,[(t(!0),s(d,null,k(r(i).results,(o,B)=>(t(),u(H,{key:B,"component-info":o.component},{default:l(()=>[a($,{status:o.errors.length?"danger":"success",title:o.errors.length?e.$t("javascriptResults.errorHeadline",{n:o.errors.length}):e.$t("javascriptResults.noErrorHeadline"),description:o.errors.length?e.$t("javascriptResults.errorSubline"):e.$t("javascriptResults.noErrorSubline"),class:"o_mb-2"},null,8,["status","title","description"]),o.errors.length?(t(),u(E,{key:0,title:e.$t("javascriptResults.errorList"),color:"error",variant:"subtle",icon:r(Y).icoError,class:"o_mt-6"},{description:l(()=>[f("ul",re,[(t(!0),s(d,null,k(o.errors,(x,F)=>(t(),s("li",{key:F},[f("div",oe,[a(w,{color:"error",variant:"solid",size:"sm"},{default:l(()=>[Z(y(x.type),1)]),_:2},1024),f("span",se,y(x.error),1)])]))),128))])]),_:2},1032,["title","icon"])):c("",!0)]),_:2},1032,["component-info"]))),128))])):c("",!0)],64)):c("",!0),r(g)?(t(),u(A,{key:1,error:r(g),refresh:r(v)},null,8,["error","refresh"])):c("",!0)])}}});export{Ee as default};
