@piwitests/server 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{DbmGeOus.js → 5nOoVJzL.js} +1 -1
- package/.output/public/_nuxt/6DSY_93j.js +1 -0
- package/.output/public/_nuxt/7vRR5W2L.js +1 -0
- package/.output/public/_nuxt/{DM3bDZC6.js → 9Dtlg-K4.js} +1 -1
- package/.output/public/_nuxt/9Yziijlb.js +1 -0
- package/.output/public/_nuxt/{BakMHV79.js → B-onBCAB.js} +1 -1
- package/.output/public/_nuxt/B2bK5uNR.js +1 -0
- package/.output/public/_nuxt/{BkM2KXUo.js → B63B19Iv.js} +2 -2
- package/.output/public/_nuxt/{BFxvHlO9.js → B77w1Eib.js} +1 -1
- package/.output/public/_nuxt/{Drw8yQg6.js → BC5bqlfM.js} +1 -1
- package/.output/public/_nuxt/{CJ1rmnk4.js → BF5JDf9_.js} +1 -1
- package/.output/public/_nuxt/BFVrl1ss.js +1 -0
- package/.output/public/_nuxt/{CjtjQV60.js → BIHMeNW-.js} +1 -1
- package/.output/public/_nuxt/BKqOGcst.js +1 -0
- package/.output/public/_nuxt/{Bme1UkOl.js → BLqooxh5.js} +1 -1
- package/.output/public/_nuxt/{D0Kop4bS.js → BMfTUMYy.js} +1 -1
- package/.output/public/_nuxt/{V9p3z39z.js → BOrnSpTA.js} +1 -1
- package/.output/public/_nuxt/{DEvYVl9M.js → BPQNVV4M.js} +1 -1
- package/.output/public/_nuxt/{DuOH5jcQ.js → BSKLNgre.js} +1 -1
- package/.output/public/_nuxt/BTCWUyBX.js +1 -0
- package/.output/public/_nuxt/BUYmGTVP.js +1 -0
- package/.output/public/_nuxt/{CgkXEZMo.js → BWddBCom.js} +1 -1
- package/.output/public/_nuxt/{B33YjaHr.js → BYQ9lXQb.js} +1 -1
- package/.output/public/_nuxt/BYWQ47QQ.js +5 -0
- package/.output/public/_nuxt/{BvAfKk6C.js → BYnqoVCE.js} +1 -1
- package/.output/public/_nuxt/{-COcylA_.js → BaU2hm4B.js} +1 -1
- package/.output/public/_nuxt/{6Z_ZwH8I.js → BbXvpkBp.js} +1 -1
- package/.output/public/_nuxt/Bb_925DD.js +1 -0
- package/.output/public/_nuxt/BcHU1KNK.js +1 -0
- package/.output/public/_nuxt/BdUGUwvE.js +1 -0
- package/.output/public/_nuxt/{DPZBpFOX.js → BeQq85yJ.js} +2 -2
- package/.output/public/_nuxt/Bg8yOdSf.js +1 -0
- package/.output/public/_nuxt/BhzfJaPC.js +1 -0
- package/.output/public/_nuxt/{D1vqYZsL.js → Bkb-0yS0.js} +4 -4
- package/.output/public/_nuxt/BmweLu9g.js +2 -0
- package/.output/public/_nuxt/Boyv6hLW.js +1 -0
- package/.output/public/_nuxt/{BtSGUY-7.js → Bq4xEWLF.js} +4 -4
- package/.output/public/_nuxt/{CMuzkARi.js → BraJd4EA.js} +1 -1
- package/.output/public/_nuxt/BvXrhZ8k.js +1 -0
- package/.output/public/_nuxt/{B8H4XydJ.js → Bw4oIhct.js} +1 -1
- package/.output/public/_nuxt/BxSrScjV.js +1 -0
- package/.output/public/_nuxt/Byqt8JHG.js +1 -0
- package/.output/public/_nuxt/{C5TrTuWv.js → BzBaMPgu.js} +3 -3
- package/.output/public/_nuxt/{BKrWWV14.js → C1-8_6cB.js} +1 -1
- package/.output/public/_nuxt/{CjBktNrC.js → C7SG50jD.js} +1 -1
- package/.output/public/_nuxt/{BkxRbXIj.js → C8WgBDU1.js} +1 -1
- package/.output/public/_nuxt/C8uZoJVq.js +1 -0
- package/.output/public/_nuxt/{Bg93Rnts.js → CBQXv4bU.js} +2 -2
- package/.output/public/_nuxt/CDEmotIt.js +1 -0
- package/.output/public/_nuxt/CIBOv3Ge.js +2 -0
- package/.output/public/_nuxt/CO7j4p5r.js +1 -0
- package/.output/public/_nuxt/COMhp7lz.js +1 -0
- package/.output/public/_nuxt/{CsV7pmcT.js → CPiLUjjx.js} +1 -1
- package/.output/public/_nuxt/{D_y2VS8k.js → CTYlay1H.js} +1 -1
- package/.output/public/_nuxt/{VACXezo0.js → CVEk4D8I.js} +1 -1
- package/.output/public/_nuxt/{P5uOaRUZ.js → CbuK1HIv.js} +1 -1
- package/.output/public/_nuxt/{opyDpgSw.js → CdLqOMvN.js} +1 -1
- package/.output/public/_nuxt/CdM2qNYM.js +2 -0
- package/.output/public/_nuxt/Ch8sGLqE.js +1 -0
- package/.output/public/_nuxt/CkdznmkX.js +1 -0
- package/.output/public/_nuxt/{B1LUinhp.js → Cmuwgbf4.js} +1 -1
- package/.output/public/_nuxt/{Ce5_Tq63.js → CnRNwiuE.js} +1 -1
- package/.output/public/_nuxt/{Bp3FRuEm.js → CnsaoeEq.js} +1 -1
- package/.output/public/_nuxt/{BUnwEAjq.js → Cp0V2FeW.js} +1 -1
- package/.output/public/_nuxt/Cvw4EFTy.js +17 -0
- package/.output/public/_nuxt/CwDej2Lz.js +1 -0
- package/.output/public/_nuxt/D-wlhH6J.js +1 -0
- package/.output/public/_nuxt/D5Mhpp98.js +1 -0
- package/.output/public/_nuxt/{CDTeSrLO.js → D8ixf-ZR.js} +5 -5
- package/.output/public/_nuxt/{DMWfVJCj.js → DBvdRbTA.js} +2 -2
- package/.output/public/_nuxt/DDho3MJD.js +1 -0
- package/.output/public/_nuxt/DEGHW4pO.js +1 -0
- package/.output/public/_nuxt/{BoNKdx5o.js → DHSYRMJp.js} +1 -1
- package/.output/public/_nuxt/DH_LEqhd.js +2 -0
- package/.output/public/_nuxt/{BVLqydCr.js → DIqik40e.js} +1 -1
- package/.output/public/_nuxt/DLwuL-qR.js +1 -0
- package/.output/public/_nuxt/{CIpF9l75.js → DPDFGVb_.js} +2 -2
- package/.output/public/_nuxt/DRNHuVn4.js +2 -0
- package/.output/public/_nuxt/{DcR0Mmdl.js → DUtYU4Sb.js} +1 -1
- package/.output/public/_nuxt/{opwuUqHG.js → DWl73MJR.js} +1 -1
- package/.output/public/_nuxt/{BCGljaM0.js → DWz_bHNP.js} +1 -1
- package/.output/public/_nuxt/{DGq4A2Pd.js → D_SCB-z2.js} +1 -1
- package/.output/public/_nuxt/{DMAiMrNr.js → D_j436ND.js} +1 -1
- package/.output/public/_nuxt/DamzjN7l.js +1 -0
- package/.output/public/_nuxt/Db5xe__T.js +1 -0
- package/.output/public/_nuxt/{CpcrljrH.js → DcUBmKKE.js} +1 -1
- package/.output/public/_nuxt/DiP18sFE.js +1 -0
- package/.output/public/_nuxt/Die1200X.js +1 -0
- package/.output/public/_nuxt/{BN1zZw5b.js → DihSeDlY.js} +4 -4
- package/.output/public/_nuxt/{DzZpIs4W.js → DkGXOZRW.js} +1 -1
- package/.output/public/_nuxt/{C7fq_rHE.js → DnOtRv65.js} +1 -1
- package/.output/public/_nuxt/DnV-BkUA.js +1 -0
- package/.output/public/_nuxt/DpeRrg68.js +1 -0
- package/.output/public/_nuxt/Dq6_-84R.js +1 -0
- package/.output/public/_nuxt/DqKFKS1b.js +1 -0
- package/.output/public/_nuxt/DrbO0dl5.js +6 -0
- package/.output/public/_nuxt/{Qo6oszaF.js → Ds8_6Fzl.js} +1 -1
- package/.output/public/_nuxt/{BtbpLWDs.js → DvewDI9t.js} +1 -1
- package/.output/public/_nuxt/E26Y1NWH.js +1 -0
- package/.output/public/_nuxt/Hp-_W7z4.js +1 -0
- package/.output/public/_nuxt/OanUGF_v.js +1 -0
- package/.output/public/_nuxt/{CX_G-FHC.js → RSS6R9Te.js} +13 -13
- package/.output/public/_nuxt/{BmzxRbcg.js → VqLetC2g.js} +1 -1
- package/.output/public/_nuxt/WCZdf9Ln.js +1 -0
- package/.output/public/_nuxt/{DF6Mes5z.js → Yl6iqHwK.js} +4 -4
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/03f2d81b-8c58-4ea8-9a9d-7553c8ca4af6.json +1 -0
- package/.output/public/_nuxt/{entry.DzPSf_u5.css → entry.DVKh2Fd6.css} +1 -1
- package/.output/public/_nuxt/iUf7K_JR.js +1 -0
- package/.output/public/_nuxt/{C8Paf_V1.js → kDEwM7SQ.js} +1 -1
- package/.output/public/_nuxt/{Bd8B-yeR.js → knaDbxMJ.js} +1 -1
- package/.output/public/_nuxt/lnpLc047.js +1 -0
- package/.output/public/_nuxt/{CD8ZzAFC.js → mhvG7mu8.js} +1 -1
- package/.output/public/_nuxt/{BgABj4Ty.js → qUaN2ZW8.js} +4 -4
- package/.output/public/_nuxt/qeqzb80l.js +1 -0
- package/.output/public/_nuxt/{Fsw2W4TA.js → uj92NYTx.js} +2 -2
- package/.output/public/_nuxt/vOZZ2cLi.js +1 -0
- package/.output/public/_nuxt/{CGHV0Y2d.js → zAFiz2Mg.js} +1 -1
- package/.output/public/demo/seed.version.json +2 -2
- package/.output/server/chunks/build/{Alert-He-UxEt6.mjs → Alert-BhTWQzM5.mjs} +2 -2
- package/.output/server/chunks/build/Alert-BhTWQzM5.mjs.map +1 -0
- package/.output/server/chunks/build/{Breadcrumb-DEP2dVCZ.mjs → Breadcrumb-BJnPB2AW.mjs} +3 -3
- package/.output/server/chunks/build/Breadcrumb-BJnPB2AW.mjs.map +1 -0
- package/.output/server/chunks/build/{BreadcrumbNav-y6nMDYcR.mjs → BreadcrumbNav-C6Cun6tF.mjs} +3 -3
- package/.output/server/chunks/build/BreadcrumbNav-C6Cun6tF.mjs.map +1 -0
- package/.output/server/chunks/build/{BrowserBadge-DIASU8Gf.mjs → BrowserBadge-T1KRMIXA.mjs} +4 -4
- package/.output/server/chunks/build/BrowserBadge-T1KRMIXA.mjs.map +1 -0
- package/.output/server/chunks/build/{ChartCard-ZTsCvItQ.mjs → ChartCard-D_asI_WF.mjs} +2 -2
- package/.output/server/chunks/build/ChartCard-D_asI_WF.mjs.map +1 -0
- package/.output/server/chunks/build/{ChartMarkerTooltip-u_1DUHh-.mjs → ChartMarkerTooltip-DscESDg7.mjs} +3 -3
- package/.output/server/chunks/build/ChartMarkerTooltip-DscESDg7.mjs.map +1 -0
- package/.output/server/chunks/build/{Checkbox-BisdHf8n.mjs → Checkbox-Y9ZiIRkJ.mjs} +6 -6
- package/.output/server/chunks/build/Checkbox-Y9ZiIRkJ.mjs.map +1 -0
- package/.output/server/chunks/build/{CodeBlock-B8BNtZAe.mjs → CodeBlock-Bnn_ps9O.mjs} +4 -4
- package/.output/server/chunks/build/CodeBlock-Bnn_ps9O.mjs.map +1 -0
- package/.output/server/chunks/build/{DashboardNavbar-D7-3zBUU.mjs → DashboardNavbar-D37dPEtR.mjs} +3 -3
- package/.output/server/chunks/build/DashboardNavbar-D37dPEtR.mjs.map +1 -0
- package/.output/server/chunks/build/{DashboardSidebarToggle-C3HdHvlE.mjs → DashboardSidebarToggle-DzwsZHVx.mjs} +2 -2
- package/.output/server/chunks/build/DashboardSidebarToggle-DzwsZHVx.mjs.map +1 -0
- package/.output/server/chunks/build/{DataLocationCard-CC2-lHiP.mjs → DataLocationCard-CUXgZQEs.mjs} +4 -4
- package/.output/server/chunks/build/DataLocationCard-CUXgZQEs.mjs.map +1 -0
- package/.output/server/chunks/build/{DesktopRunLocallyButton-iNzrDsEs.mjs → DesktopRunLocallyButton-BCmQklj6.mjs} +15 -76
- package/.output/server/chunks/build/DesktopRunLocallyButton-BCmQklj6.mjs.map +1 -0
- package/.output/server/chunks/build/{DiagnosisPanel-BVb2LgHu.mjs → DiagnosisPanel-haHS2azn.mjs} +7 -7
- package/.output/server/chunks/build/DiagnosisPanel-haHS2azn.mjs.map +1 -0
- package/.output/server/chunks/build/{DiagnosisResult-xVgZlfKK.mjs → DiagnosisResult-DqTIOelM.mjs} +10 -10
- package/.output/server/chunks/build/DiagnosisResult-DqTIOelM.mjs.map +1 -0
- package/.output/server/chunks/build/{DurationValue-UX9uajQJ.mjs → DurationValue-D6fQEi5S.mjs} +2 -2
- package/.output/server/chunks/build/DurationValue-D6fQEi5S.mjs.map +1 -0
- package/.output/server/chunks/build/{EmptyState-DC2q_7TD.mjs → EmptyState-C-mCzGhO.mjs} +2 -2
- package/.output/server/chunks/build/EmptyState-C-mCzGhO.mjs.map +1 -0
- package/.output/server/chunks/build/{EntityLinks-Dzn73fbq.mjs → EntityLinks-CRJQM9Vy.mjs} +3 -3
- package/.output/server/chunks/build/EntityLinks-CRJQM9Vy.mjs.map +1 -0
- package/.output/server/chunks/build/{EnvManagedBadge-C-agmABK.mjs → EnvManagedBadge-hyelwXrw.mjs} +4 -4
- package/.output/server/chunks/build/EnvManagedBadge-hyelwXrw.mjs.map +1 -0
- package/.output/server/chunks/build/{ErrorState-CktYyeEZ.mjs → ErrorState-9UPssp7w.mjs} +2 -2
- package/.output/server/chunks/build/ErrorState-9UPssp7w.mjs.map +1 -0
- package/.output/server/chunks/build/{FeatureUnavailable-DHFkwI7t.mjs → FeatureUnavailable-CDw3__eq.mjs} +3 -3
- package/.output/server/chunks/build/FeatureUnavailable-CDw3__eq.mjs.map +1 -0
- package/.output/server/chunks/build/{FormField-GYHKiSI6.mjs → FormField-8vSc-3mb.mjs} +2 -2
- package/.output/server/chunks/build/FormField-8vSc-3mb.mjs.map +1 -0
- package/.output/server/chunks/build/{GetStartedWizard-BpcGYsm2.mjs → GetStartedWizard-Dp_tjhry.mjs} +4 -4
- package/.output/server/chunks/build/GetStartedWizard-Dp_tjhry.mjs.map +1 -0
- package/.output/server/chunks/build/{HelpHint-plioHKA0.mjs → HelpHint-Bfyo3ar6.mjs} +4 -4
- package/.output/server/chunks/build/HelpHint-Bfyo3ar6.mjs.map +1 -0
- package/.output/server/chunks/build/{LoadingState-CwpfmI0W.mjs → LoadingState-CxfFwac9.mjs} +2 -2
- package/.output/server/chunks/build/LoadingState-CxfFwac9.mjs.map +1 -0
- package/.output/server/chunks/build/{MarkerBadge-Biz5--h2.mjs → MarkerBadge-DmubzeuF.mjs} +2 -2
- package/.output/server/chunks/build/MarkerBadge-DmubzeuF.mjs.map +1 -0
- package/.output/server/chunks/build/{MetaStripGroup-A0a72vt5.mjs → MetaStripGroup-C-cNBfC9.mjs} +6 -6
- package/.output/server/chunks/build/MetaStripGroup-C-cNBfC9.mjs.map +1 -0
- package/.output/server/chunks/build/{Modal-hKLvVFNp.mjs → Modal-DcNzjvnm.mjs} +2 -2
- package/.output/server/chunks/build/Modal-DcNzjvnm.mjs.map +1 -0
- package/.output/server/chunks/build/{NavbarActions-_YjrSUat.mjs → NavbarActions-VCHW0u67.mjs} +2 -2
- package/.output/server/chunks/build/NavbarActions-VCHW0u67.mjs.map +1 -0
- package/.output/server/chunks/build/{NavigationMenu-RfBOyS32.mjs → NavigationMenu-DG6V0R9Y.mjs} +4 -4
- package/.output/server/chunks/build/NavigationMenu-DG6V0R9Y.mjs.map +1 -0
- package/.output/server/chunks/build/{OpenInIdeLink-Jp6SzEtD.mjs → OpenInIdeLink-CLj2cTkc.mjs} +5 -5
- package/.output/server/chunks/build/{OpenInIdeLink-Jp6SzEtD.mjs.map → OpenInIdeLink-CLj2cTkc.mjs.map} +1 -1
- package/.output/server/chunks/build/{ProjectTestCasesTable-DxOTfhi4.mjs → ProjectTestCasesTable-BNd5Fn_G.mjs} +15 -15
- package/.output/server/chunks/build/{ProjectTestCasesTable-DxOTfhi4.mjs.map → ProjectTestCasesTable-BNd5Fn_G.mjs.map} +1 -1
- package/.output/server/chunks/build/{RovingFocusItem-BOSx1Z9Z.mjs → RovingFocusItem-DkZadRuK.mjs} +2 -2
- package/.output/server/chunks/build/RovingFocusItem-DkZadRuK.mjs.map +1 -0
- package/.output/server/chunks/build/{RunReports-nuLb-Nm3.mjs → RunReports-CnyGcU8K.mjs} +3 -3
- package/.output/server/chunks/build/RunReports-CnyGcU8K.mjs.map +1 -0
- package/.output/server/chunks/build/{RunStatusBadge-CvWmcFYM.mjs → RunStatusBadge-DTqX18X-.mjs} +3 -3
- package/.output/server/chunks/build/RunStatusBadge-DTqX18X-.mjs.map +1 -0
- package/.output/server/chunks/build/{SectionCard-DHAFvJxm.mjs → SectionCard-taTpPtua.mjs} +3 -3
- package/.output/server/chunks/build/SectionCard-taTpPtua.mjs.map +1 -0
- package/.output/server/chunks/build/{Select-CEyw7HGK.mjs → Select-BChKOOsc.mjs} +3 -3
- package/.output/server/chunks/build/Select-BChKOOsc.mjs.map +1 -0
- package/.output/server/chunks/build/{SelectMenu-C02Hs2_F.mjs → SelectMenu-DLkMyBsW.mjs} +4 -4
- package/.output/server/chunks/build/{SelectMenu-C02Hs2_F.mjs.map → SelectMenu-DLkMyBsW.mjs.map} +1 -1
- package/.output/server/chunks/build/{Separator-lrN70ODV.mjs → Separator-Dn-4PN3P.mjs} +2 -2
- package/.output/server/chunks/build/Separator-Dn-4PN3P.mjs.map +1 -0
- package/.output/server/chunks/build/{SettingsField-tRmytcEJ.mjs → SettingsField-BLO1C7uY.mjs} +6 -6
- package/.output/server/chunks/build/SettingsField-BLO1C7uY.mjs.map +1 -0
- package/.output/server/chunks/build/{Slideover-D6cRIqch.mjs → Slideover-BiDJaQrt.mjs} +3 -3
- package/.output/server/chunks/build/Slideover-BiDJaQrt.mjs.map +1 -0
- package/.output/server/chunks/build/{Switch-R2n82ncQ.mjs → Switch-Ca3fYrSH.mjs} +4 -4
- package/.output/server/chunks/build/Switch-Ca3fYrSH.mjs.map +1 -0
- package/.output/server/chunks/build/{Table-qZdnm9t2.mjs → Table-DQb34a0A.mjs} +2 -2
- package/.output/server/chunks/build/Table-DQb34a0A.mjs.map +1 -0
- package/.output/server/chunks/build/{Tabs-BDP7MWl4.mjs → Tabs-_ALhm_oG.mjs} +3 -3
- package/.output/server/chunks/build/Tabs-_ALhm_oG.mjs.map +1 -0
- package/.output/server/chunks/build/{TestCaseHistoryChart-CKDXQ2GI.mjs → TestCaseHistoryChart-D-TEUsZ8.mjs} +3 -3
- package/.output/server/chunks/build/TestCaseHistoryChart-D-TEUsZ8.mjs.map +1 -0
- package/.output/server/chunks/build/{TestMetaBadges-BlyKmfeP.mjs → TestMetaBadges-G2dAHnT-.mjs} +2 -2
- package/.output/server/chunks/build/TestMetaBadges-G2dAHnT-.mjs.map +1 -0
- package/.output/server/chunks/build/{TestStatusBar-CvsmKJ4D.mjs → TestStatusBar-CseETAdn.mjs} +2 -2
- package/.output/server/chunks/build/TestStatusBar-CseETAdn.mjs.map +1 -0
- package/.output/server/chunks/build/{Textarea-DpmpM-lN.mjs → Textarea-CXOoRq7y.mjs} +2 -2
- package/.output/server/chunks/build/Textarea-CXOoRq7y.mjs.map +1 -0
- package/.output/server/chunks/build/{Tooltip-BI3WQErw.mjs → Tooltip-trltUr5c.mjs} +2 -2
- package/.output/server/chunks/build/Tooltip-trltUr5c.mjs.map +1 -0
- package/.output/server/chunks/build/{VisuallyHiddenInput-D4E5aJCQ.mjs → VisuallyHiddenInput-CGURvg3N.mjs} +2 -2
- package/.output/server/chunks/build/VisuallyHiddenInput-CGURvg3N.mjs.map +1 -0
- package/.output/server/chunks/build/{_id_-w7YCSiiy.mjs → _id_-B-G4eG5U.mjs} +40 -40
- package/.output/server/chunks/build/{_id_-w7YCSiiy.mjs.map → _id_-B-G4eG5U.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-T965GKYC.mjs → _id_-Cnzg8n21.mjs} +41 -38
- package/.output/server/chunks/build/_id_-Cnzg8n21.mjs.map +1 -0
- package/.output/server/chunks/build/{_id_-wiULjAVc.mjs → _id_-Dp_d6gT7.mjs} +62 -54
- package/.output/server/chunks/build/{_id_-wiULjAVc.mjs.map → _id_-Dp_d6gT7.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-26komi8G.mjs → _id_-t2AWaYuK.mjs} +46 -46
- package/.output/server/chunks/build/{_id_-26komi8G.mjs.map → _id_-t2AWaYuK.mjs.map} +1 -1
- package/.output/server/chunks/build/{about-B3V_OEiu.mjs → about-BFsHkJwE.mjs} +8 -8
- package/.output/server/chunks/build/about-BFsHkJwE.mjs.map +1 -0
- package/.output/server/chunks/build/{account-DpBdYE46.mjs → account-CZAq8kVg.mjs} +8 -8
- package/.output/server/chunks/build/account-CZAq8kVg.mjs.map +1 -0
- package/.output/server/chunks/build/{ai-DYhpzbqp.mjs → ai-BGP3GcCR.mjs} +20 -20
- package/.output/server/chunks/build/{ai-DYhpzbqp.mjs.map → ai-BGP3GcCR.mjs.map} +1 -1
- package/.output/server/chunks/build/{analytics-CZJEU0an.mjs → analytics-CXl5OWV-.mjs} +25 -25
- package/.output/server/chunks/build/{analytics-CZJEU0an.mjs.map → analytics-CXl5OWV-.mjs.map} +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/{default-CQa_bmAf.mjs → default-4ixAePum.mjs} +208 -76
- package/.output/server/chunks/build/default-4ixAePum.mjs.map +1 -0
- package/.output/server/chunks/build/{docs-C8bndVXg.mjs → docs-Cgsd01H9.mjs} +16 -16
- package/.output/server/chunks/build/{docs-C8bndVXg.mjs.map → docs-Cgsd01H9.mjs.map} +1 -1
- package/.output/server/chunks/build/{edit-BdfF9er2.mjs → edit-BEQ-ozj9.mjs} +436 -40
- package/.output/server/chunks/build/edit-BEQ-ozj9.mjs.map +1 -0
- package/.output/server/chunks/build/{fetch-tkz5_OA-.mjs → fetch-B5TVXZ1s.mjs} +2 -2
- package/.output/server/chunks/build/fetch-B5TVXZ1s.mjs.map +1 -0
- package/.output/server/chunks/build/{forgot-password-swZRcvXE.mjs → forgot-password-mqE1mpDI.mjs} +4 -4
- package/.output/server/chunks/build/forgot-password-mqE1mpDI.mjs.map +1 -0
- package/.output/server/chunks/build/{help-content-C876a9WD.mjs → help-content-Bc99BajS.mjs} +6 -1
- package/.output/server/chunks/build/help-content-Bc99BajS.mjs.map +1 -0
- package/.output/server/chunks/build/{import-B27Sv7h5.mjs → import-DqDDTcSc.mjs} +14 -14
- package/.output/server/chunks/build/import-DqDDTcSc.mjs.map +1 -0
- package/.output/server/chunks/build/{index-ID913tUa.mjs → index-Bpdj6TXV.mjs} +5 -5
- package/.output/server/chunks/build/index-Bpdj6TXV.mjs.map +1 -0
- package/.output/server/chunks/build/{index-Dq6nk6OB.mjs → index-DBFsIsjA.mjs} +180 -188
- package/.output/server/chunks/build/{index-Dq6nk6OB.mjs.map → index-DBFsIsjA.mjs.map} +1 -1
- package/.output/server/chunks/build/{index-C7m32bRI.mjs → index-DSufXCZq.mjs} +22 -18
- package/.output/server/chunks/build/index-DSufXCZq.mjs.map +1 -0
- package/.output/server/chunks/build/{index-BdZmxLtC.mjs → index-WXE60AXk.mjs} +24 -24
- package/.output/server/chunks/build/{index-BdZmxLtC.mjs.map → index-WXE60AXk.mjs.map} +1 -1
- package/.output/server/chunks/build/{index-ByWTzqF6.mjs → index-okKjrRhL.mjs} +15 -4
- package/.output/server/chunks/build/index-okKjrRhL.mjs.map +1 -0
- package/.output/server/chunks/build/{isValueEqualOrExist-D4lZ8uRY.mjs → isValueEqualOrExist-C-9DzL4K.mjs} +2 -2
- package/.output/server/chunks/build/isValueEqualOrExist-C-9DzL4K.mjs.map +1 -0
- package/.output/server/chunks/build/{login-hxCF06JT.mjs → login-eQ88UoBW.mjs} +6 -6
- package/.output/server/chunks/build/login-eQ88UoBW.mjs.map +1 -0
- package/.output/server/chunks/build/{mcp-BVW1llyW.mjs → mcp-frcSP2Zg.mjs} +13 -13
- package/.output/server/chunks/build/mcp-frcSP2Zg.mjs.map +1 -0
- package/.output/server/chunks/build/{notifications-Dn-evqXM.mjs → notifications-DAtRd5V6.mjs} +14 -14
- package/.output/server/chunks/build/notifications-DAtRd5V6.mjs.map +1 -0
- package/.output/server/chunks/build/{performance-CV8qm94u.mjs → performance-BcQzGXE7.mjs} +13 -13
- package/.output/server/chunks/build/performance-BcQzGXE7.mjs.map +1 -0
- package/.output/server/chunks/build/{pr-feedback-gKDz8LyA.mjs → pr-feedback-BHtgvegy.mjs} +11 -11
- package/.output/server/chunks/build/pr-feedback-BHtgvegy.mjs.map +1 -0
- package/.output/server/chunks/build/{reset-password-DtEISa1I.mjs → reset-password-DMHrp14-.mjs} +4 -4
- package/.output/server/chunks/build/reset-password-DMHrp14-.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +32 -32
- package/.output/server/chunks/build/{settings-BJDnuLpc.mjs → settings-Bo5OETop.mjs} +11 -11
- package/.output/server/chunks/build/settings-Bo5OETop.mjs.map +1 -0
- package/.output/server/chunks/build/{settings-metadata-DnAK4Rzg.mjs → settings-metadata-BHbsWQ2g.mjs} +2 -2
- package/.output/server/chunks/build/settings-metadata-BHbsWQ2g.mjs.map +1 -0
- package/.output/server/chunks/build/{setup-BO9tXa_G.mjs → setup-DAXcxuNY.mjs} +18 -18
- package/.output/server/chunks/build/{setup-BO9tXa_G.mjs.map → setup-DAXcxuNY.mjs.map} +1 -1
- package/.output/server/chunks/build/{storage-zN92cA9q.mjs → storage-BPK0fVwx.mjs} +12 -12
- package/.output/server/chunks/build/storage-BPK0fVwx.mjs.map +1 -0
- package/.output/server/chunks/build/{tags-CJFnoyQc.mjs → tags-CoxErA5m.mjs} +8 -8
- package/.output/server/chunks/build/tags-CoxErA5m.mjs.map +1 -0
- package/.output/server/chunks/build/{test-cases-0Q6rT73d.mjs → test-cases-D8rn-0le.mjs} +27 -27
- package/.output/server/chunks/build/test-cases-D8rn-0le.mjs.map +1 -0
- package/.output/server/chunks/build/{test-functions-DVRJgiWo.mjs → test-functions-pWs9mhbJ.mjs} +12 -12
- package/.output/server/chunks/build/test-functions-pWs9mhbJ.mjs.map +1 -0
- package/.output/server/chunks/build/{useCopyRich-BM9GTjJi.mjs → useCopyRich-BqVfhnoH.mjs} +27 -16
- package/.output/server/chunks/build/{useCopyRich-BM9GTjJi.mjs.map → useCopyRich-BqVfhnoH.mjs.map} +1 -1
- package/.output/server/chunks/build/{useDesktopDownload-Dyf0fR47.mjs → useDesktopDownload-l80DQJ9e.mjs} +2 -2
- package/.output/server/chunks/build/useDesktopDownload-l80DQJ9e.mjs.map +1 -0
- package/.output/server/chunks/build/{useDesktopLocalRuns-k7Gw3Fv3.mjs → useDesktopLocalRuns-Dil3YzyU.mjs} +68 -6
- package/.output/server/chunks/build/useDesktopLocalRuns-Dil3YzyU.mjs.map +1 -0
- package/.output/server/chunks/build/{useDesktopProjectLink-WwLte59P.mjs → useDesktopProjectLink-BnIONB--.mjs} +21 -4
- package/.output/server/chunks/build/useDesktopProjectLink-BnIONB--.mjs.map +1 -0
- package/.output/server/chunks/build/{useFormControl-8skMOTIf.mjs → useFormControl-CXKztoWk.mjs} +2 -2
- package/.output/server/chunks/build/useFormControl-CXKztoWk.mjs.map +1 -0
- package/.output/server/chunks/build/{useOpenInIde-D74FmDNg.mjs → useOpenInIde-CbbYW3pd.mjs} +2 -2
- package/.output/server/chunks/build/useOpenInIde-CbbYW3pd.mjs.map +1 -0
- package/.output/server/chunks/build/{useSettingsNav-BLTHducV.mjs → useSettingsNav-C6NpD4Ab.mjs} +2 -2
- package/.output/server/chunks/build/useSettingsNav-C6NpD4Ab.mjs.map +1 -0
- package/.output/server/chunks/build/{users-C9bjOBde.mjs → users-C2MuCf5G.mjs} +9 -9
- package/.output/server/chunks/build/users-C2MuCf5G.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +677 -670
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/03FA4-rI.js +0 -1
- package/.output/public/_nuxt/5a7jHE9s.js +0 -1
- package/.output/public/_nuxt/7ZHq6PCI.js +0 -1
- package/.output/public/_nuxt/98sAB6Gu.js +0 -1
- package/.output/public/_nuxt/B--J7VNt.js +0 -1
- package/.output/public/_nuxt/B69RP95P.js +0 -1
- package/.output/public/_nuxt/B8Xm4_S_.js +0 -1
- package/.output/public/_nuxt/BBhrClA9.js +0 -1
- package/.output/public/_nuxt/BPXqL9vK.js +0 -1
- package/.output/public/_nuxt/BWMSVSNM.js +0 -1
- package/.output/public/_nuxt/B_r0xHVS.js +0 -1
- package/.output/public/_nuxt/BevElZaK.js +0 -1
- package/.output/public/_nuxt/BfA6lfg4.js +0 -1
- package/.output/public/_nuxt/BjaRappk.js +0 -1
- package/.output/public/_nuxt/Bn0jaRxI.js +0 -1
- package/.output/public/_nuxt/BrUBOQ0y.js +0 -1
- package/.output/public/_nuxt/BwEN1fJ1.js +0 -1
- package/.output/public/_nuxt/C-XjxjG5.js +0 -1
- package/.output/public/_nuxt/C3W_wyr9.js +0 -1
- package/.output/public/_nuxt/C7D5Wl7T.js +0 -1
- package/.output/public/_nuxt/COuZu9FO.js +0 -2
- package/.output/public/_nuxt/CX5Q0dZ8.js +0 -1
- package/.output/public/_nuxt/Cf4MFOuf.js +0 -1
- package/.output/public/_nuxt/Cq33x7yV.js +0 -1
- package/.output/public/_nuxt/Cu2Q4iPh.js +0 -1
- package/.output/public/_nuxt/CyLcEDg2.js +0 -2
- package/.output/public/_nuxt/D1Y43xM1.js +0 -2
- package/.output/public/_nuxt/D2rZosKf.js +0 -6
- package/.output/public/_nuxt/D7jpwkRG.js +0 -5
- package/.output/public/_nuxt/D8NAb7VE.js +0 -1
- package/.output/public/_nuxt/D8vguZKg.js +0 -17
- package/.output/public/_nuxt/DH5H1DJh.js +0 -1
- package/.output/public/_nuxt/DL8knjzi.js +0 -1
- package/.output/public/_nuxt/DMsm-RGQ.js +0 -1
- package/.output/public/_nuxt/DMtrFQqi.js +0 -2
- package/.output/public/_nuxt/DVEGfqtt.js +0 -2
- package/.output/public/_nuxt/DaNC-xl1.js +0 -1
- package/.output/public/_nuxt/DcLbz6DV.js +0 -1
- package/.output/public/_nuxt/DhYznn-U.js +0 -1
- package/.output/public/_nuxt/DhuRRlmK.js +0 -1
- package/.output/public/_nuxt/DuO5wfAC.js +0 -1
- package/.output/public/_nuxt/DvEsAuE9.js +0 -1
- package/.output/public/_nuxt/Dz6g_QJT.js +0 -1
- package/.output/public/_nuxt/DzzNS-K1.js +0 -1
- package/.output/public/_nuxt/LwoTUb-r.js +0 -1
- package/.output/public/_nuxt/OfPjZaky.js +0 -1
- package/.output/public/_nuxt/T5UuMUxA.js +0 -1
- package/.output/public/_nuxt/UY8pjaZA.js +0 -1
- package/.output/public/_nuxt/YmCeJkZ2.js +0 -1
- package/.output/public/_nuxt/builds/meta/70224ee0-4d1f-45d2-b380-2ecb18064bf1.json +0 -1
- package/.output/public/_nuxt/fXUwH_3d.js +0 -1
- package/.output/public/_nuxt/sVV8xB9f.js +0 -1
- package/.output/public/_nuxt/xa5UHCot.js +0 -1
- package/.output/server/chunks/build/Alert-He-UxEt6.mjs.map +0 -1
- package/.output/server/chunks/build/Breadcrumb-DEP2dVCZ.mjs.map +0 -1
- package/.output/server/chunks/build/BreadcrumbNav-y6nMDYcR.mjs.map +0 -1
- package/.output/server/chunks/build/BrowserBadge-DIASU8Gf.mjs.map +0 -1
- package/.output/server/chunks/build/ChartCard-ZTsCvItQ.mjs.map +0 -1
- package/.output/server/chunks/build/ChartMarkerTooltip-u_1DUHh-.mjs.map +0 -1
- package/.output/server/chunks/build/Checkbox-BisdHf8n.mjs.map +0 -1
- package/.output/server/chunks/build/CodeBlock-B8BNtZAe.mjs.map +0 -1
- package/.output/server/chunks/build/DashboardNavbar-D7-3zBUU.mjs.map +0 -1
- package/.output/server/chunks/build/DashboardSidebarToggle-C3HdHvlE.mjs.map +0 -1
- package/.output/server/chunks/build/DataLocationCard-CC2-lHiP.mjs.map +0 -1
- package/.output/server/chunks/build/DesktopRunLocallyButton-iNzrDsEs.mjs.map +0 -1
- package/.output/server/chunks/build/DiagnosisPanel-BVb2LgHu.mjs.map +0 -1
- package/.output/server/chunks/build/DiagnosisResult-xVgZlfKK.mjs.map +0 -1
- package/.output/server/chunks/build/DurationValue-UX9uajQJ.mjs.map +0 -1
- package/.output/server/chunks/build/EmptyState-DC2q_7TD.mjs.map +0 -1
- package/.output/server/chunks/build/EntityLinks-Dzn73fbq.mjs.map +0 -1
- package/.output/server/chunks/build/EnvManagedBadge-C-agmABK.mjs.map +0 -1
- package/.output/server/chunks/build/ErrorState-CktYyeEZ.mjs.map +0 -1
- package/.output/server/chunks/build/FeatureUnavailable-DHFkwI7t.mjs.map +0 -1
- package/.output/server/chunks/build/FormField-GYHKiSI6.mjs.map +0 -1
- package/.output/server/chunks/build/GetStartedWizard-BpcGYsm2.mjs.map +0 -1
- package/.output/server/chunks/build/HelpHint-plioHKA0.mjs.map +0 -1
- package/.output/server/chunks/build/LoadingState-CwpfmI0W.mjs.map +0 -1
- package/.output/server/chunks/build/MarkerBadge-Biz5--h2.mjs.map +0 -1
- package/.output/server/chunks/build/MetaStripGroup-A0a72vt5.mjs.map +0 -1
- package/.output/server/chunks/build/Modal-hKLvVFNp.mjs.map +0 -1
- package/.output/server/chunks/build/NavbarActions-_YjrSUat.mjs.map +0 -1
- package/.output/server/chunks/build/NavigationMenu-RfBOyS32.mjs.map +0 -1
- package/.output/server/chunks/build/RovingFocusItem-BOSx1Z9Z.mjs.map +0 -1
- package/.output/server/chunks/build/RunReports-nuLb-Nm3.mjs.map +0 -1
- package/.output/server/chunks/build/RunStatusBadge-CvWmcFYM.mjs.map +0 -1
- package/.output/server/chunks/build/SectionCard-DHAFvJxm.mjs.map +0 -1
- package/.output/server/chunks/build/Select-CEyw7HGK.mjs.map +0 -1
- package/.output/server/chunks/build/Separator-lrN70ODV.mjs.map +0 -1
- package/.output/server/chunks/build/SettingsField-tRmytcEJ.mjs.map +0 -1
- package/.output/server/chunks/build/Slideover-D6cRIqch.mjs.map +0 -1
- package/.output/server/chunks/build/Switch-R2n82ncQ.mjs.map +0 -1
- package/.output/server/chunks/build/Table-qZdnm9t2.mjs.map +0 -1
- package/.output/server/chunks/build/Tabs-BDP7MWl4.mjs.map +0 -1
- package/.output/server/chunks/build/TestCaseHistoryChart-CKDXQ2GI.mjs.map +0 -1
- package/.output/server/chunks/build/TestMetaBadges-BlyKmfeP.mjs.map +0 -1
- package/.output/server/chunks/build/TestStatusBar-CvsmKJ4D.mjs.map +0 -1
- package/.output/server/chunks/build/Textarea-DpmpM-lN.mjs.map +0 -1
- package/.output/server/chunks/build/Tooltip-BI3WQErw.mjs.map +0 -1
- package/.output/server/chunks/build/VisuallyHiddenInput-D4E5aJCQ.mjs.map +0 -1
- package/.output/server/chunks/build/_id_-T965GKYC.mjs.map +0 -1
- package/.output/server/chunks/build/about-B3V_OEiu.mjs.map +0 -1
- package/.output/server/chunks/build/account-DpBdYE46.mjs.map +0 -1
- package/.output/server/chunks/build/default-CQa_bmAf.mjs.map +0 -1
- package/.output/server/chunks/build/edit-BdfF9er2.mjs.map +0 -1
- package/.output/server/chunks/build/fetch-tkz5_OA-.mjs.map +0 -1
- package/.output/server/chunks/build/forgot-password-swZRcvXE.mjs.map +0 -1
- package/.output/server/chunks/build/help-content-C876a9WD.mjs.map +0 -1
- package/.output/server/chunks/build/import-B27Sv7h5.mjs.map +0 -1
- package/.output/server/chunks/build/index-ByWTzqF6.mjs.map +0 -1
- package/.output/server/chunks/build/index-C7m32bRI.mjs.map +0 -1
- package/.output/server/chunks/build/index-ID913tUa.mjs.map +0 -1
- package/.output/server/chunks/build/isValueEqualOrExist-D4lZ8uRY.mjs.map +0 -1
- package/.output/server/chunks/build/login-hxCF06JT.mjs.map +0 -1
- package/.output/server/chunks/build/mcp-BVW1llyW.mjs.map +0 -1
- package/.output/server/chunks/build/notifications-Dn-evqXM.mjs.map +0 -1
- package/.output/server/chunks/build/performance-CV8qm94u.mjs.map +0 -1
- package/.output/server/chunks/build/pr-feedback-gKDz8LyA.mjs.map +0 -1
- package/.output/server/chunks/build/reset-password-DtEISa1I.mjs.map +0 -1
- package/.output/server/chunks/build/settings-BJDnuLpc.mjs.map +0 -1
- package/.output/server/chunks/build/settings-metadata-DnAK4Rzg.mjs.map +0 -1
- package/.output/server/chunks/build/storage-zN92cA9q.mjs.map +0 -1
- package/.output/server/chunks/build/tags-CJFnoyQc.mjs.map +0 -1
- package/.output/server/chunks/build/test-cases-0Q6rT73d.mjs.map +0 -1
- package/.output/server/chunks/build/test-functions-DVRJgiWo.mjs.map +0 -1
- package/.output/server/chunks/build/useDesktopDownload-Dyf0fR47.mjs.map +0 -1
- package/.output/server/chunks/build/useDesktopLocalRuns-k7Gw3Fv3.mjs.map +0 -1
- package/.output/server/chunks/build/useDesktopProjectLink-WwLte59P.mjs.map +0 -1
- package/.output/server/chunks/build/useFormControl-8skMOTIf.mjs.map +0 -1
- package/.output/server/chunks/build/useOpenInIde-D74FmDNg.mjs.map +0 -1
- package/.output/server/chunks/build/useSettingsNav-BLTHducV.mjs.map +0 -1
- package/.output/server/chunks/build/users-C9bjOBde.mjs.map +0 -1
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{d as pe,b as Je,o,f as F,g as A,j as k,_ as Ie,m as P,i as p,k as t,l as Le,r as G,K as xt,h as L,A as ze,c as u,P as vt,V as Oe,ae as bt,S as _e,C as $e,p as we,q as me,v as C,t as _,F as te,L as kt,y as ge,s as Pe,H as at,J as Ee,af as Ae,B as rt,E as _t,R as et,I as We,ac as Re,G as $t,W as Ne,ag as Se,T as wt,ad as Ct,ah as Tt,ai as St,aj as At,a0 as Lt,a1 as Rt}from"./C5TrTuWv.js";import{_ as it,a as It}from"./B69RP95P.js";import{_ as zt}from"./BrUBOQ0y.js";import{u as Pt}from"./CsV7pmcT.js";import{a as He,u as Ue}from"./T5UuMUxA.js";import{e as lt,u as Bt,v as Et,f as Ye,w as ct,n as Me,x as Ot}from"./DMtrFQqi.js";import{_ as Ge}from"./BBhrClA9.js";import{_ as je}from"./DMAiMrNr.js";import{_ as Mt}from"./6Z_ZwH8I.js";import{_ as Nt}from"./DhYznn-U.js";import{_ as Ut}from"./DuOH5jcQ.js";import{_ as jt}from"./B1LUinhp.js";import{u as Dt,i as Kt,b as Vt}from"./CX_G-FHC.js";import{f as Ht}from"./D-c8ZSws.js";import{_ as ut}from"./D0Kop4bS.js";import{_ as Ft}from"./C8Paf_V1.js";const qt={class:"w-64 p-1 space-y-0.5"},Zt={class:"flex items-center justify-between px-2 pt-1 pb-1"},Wt=pe({__name:"ExportMenu",props:{endpoint:{},baseName:{}},setup(e){const r=e,{download:a}=Pt(),{copy:c}=He(),n=Je(),s=G(!1),l=G(""),f=L(()=>(ze().app?.baseURL??"/").replace(/\/$/,""));function i(T){return`${f.value}${T}`}async function m(T){s.value=!1,await a(i(`${r.endpoint}?format=${T}`),`${r.baseName}.${T}`,{binary:T==="zip"})}function v(){s.value=!1,window.open(i(`${r.endpoint}?format=html&print=1`),"_blank")}async function R(T,$,S){l.value=$;try{const K=await fetch(i(T));if(!K.ok)throw new Error(`Request failed (${K.status})`);const M=await K.text();c(S?S(M):M,{toast:`${$} copied`}),s.value=!1}catch(K){n.add({title:`Could not copy ${$.toLowerCase()}`,description:lt(K),color:"error"})}finally{l.value=""}}function g(){return R(`${r.endpoint}?format=md`,"Report")}return(T,$)=>{const S=Ie,K=it,M=zt,Z=xt;return o(),F(Z,{open:t(s),"onUpdate:open":$[4]||($[4]=E=>Le(s)?s.value=E:null)},{content:A(()=>[p("div",qt,[p("div",Zt,[$[6]||($[6]=p("p",{class:"text-xs font-medium text-gray-500"},"Download",-1)),k(K,{topic:"export.offline"})]),k(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-code",title:"One self-contained HTML file with screenshots and video embedded",onClick:$[0]||($[0]=E=>m("html"))},{default:A(()=>[...$[7]||($[7]=[P(" HTML — single file ",-1)])]),_:1}),k(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-archive",title:"Report plus the raw artifacts, including trace archives and data.json",onClick:$[1]||($[1]=E=>m("zip"))},{default:A(()=>[...$[8]||($[8]=[P(" ZIP — with all evidence ",-1)])]),_:1}),k(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-printer",title:"Opens the report with your browser's print dialog, for Save as PDF",onClick:v},{default:A(()=>[...$[9]||($[9]=[P(" PDF — via print ",-1)])]),_:1}),k(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-text",title:"The Markdown report as a file",onClick:$[2]||($[2]=E=>m("md"))},{default:A(()=>[...$[10]||($[10]=[P(" Markdown ",-1)])]),_:1}),k(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-json",title:"Everything the report contains, machine-readable",onClick:$[3]||($[3]=E=>m("json"))},{default:A(()=>[...$[11]||($[11]=[P(" JSON ",-1)])]),_:1}),k(M,{class:"my-1"}),$[13]||($[13]=p("p",{class:"text-xs font-medium text-gray-500 px-2 pt-1 pb-1"},"Copy to clipboard",-1)),k(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-clipboard-list",loading:t(l)==="Report",title:"The whole investigation as Markdown, for an issue or a chat",onClick:g},{default:A(()=>[...$[12]||($[12]=[P(" Report (Markdown) ",-1)])]),_:1},8,["loading"])])]),default:A(()=>[k(S,{icon:"i-lucide-share",size:"xs",color:"neutral",variant:"outline",title:"Take this investigation away"},{default:A(()=>[...$[5]||($[5]=[P(" Export ",-1)])]),_:1})]),_:1},8,["open"])}}}),ja=Object.assign(Wt,{__name:"ExportMenu"}),Jt={class:"flex items-center justify-between gap-2"},Yt=["aria-expanded","title"],Gt={class:"text-lg font-medium inline-flex items-center gap-1 shrink-0"},Qt={key:2,class:"min-w-0 flex-1 truncate text-sm text-gray-500 dark:text-gray-400"},Xt={key:0,class:"flex items-center gap-1 shrink-0"},en={key:0,class:"text-sm text-gray-500 mt-1 ml-11"},tn=pe({__name:"CollapsibleSectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{},storageKey:{},defaultFolded:{type:Boolean,default:!0}},setup(e,{expose:r}){const a=e,{folded:c,toggle:n,setFolded:s}=Dt(`piwi-section-fold-${a.storageKey}`,a.defaultFolded),l=G(null);function f(){s(!1),kt(()=>l.value?.scrollIntoView({behavior:"smooth",block:"start"}))}return r({setFolded:s,reveal:f}),(i,m)=>{const v=we,R=it,g=Ft;return o(),u("div",{ref_key:"rootEl",ref:l,class:"scroll-mt-4"},[k(g,{ui:{header:"p-3 sm:px-4 sm:py-3",body:t(c)?"p-0 sm:p-0":""},class:me(t(c)&&"divide-y-0")},{header:A(()=>[p("div",Jt,[p("div",{class:"flex items-center gap-2 min-w-0 flex-1 cursor-pointer select-none rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-primary",role:"button",tabindex:"0","aria-expanded":!t(c),title:t(c)?"Expand section":"Collapse section",onClick:m[1]||(m[1]=(...T)=>t(n)&&t(n)(...T)),onKeydown:[m[2]||(m[2]=_e((...T)=>t(n)&&t(n)(...T),["enter"])),m[3]||(m[3]=_e($e((...T)=>t(n)&&t(n)(...T),["prevent"]),["space"]))]},[k(v,{name:t(c)?"i-lucide-chevron-right":"i-lucide-chevron-down",class:"size-4 shrink-0 text-gray-400"},null,8,["name"]),e.icon?(o(),F(v,{key:0,name:e.icon,class:me(["size-5 shrink-0",e.iconClass])},null,8,["name","class"])):C("",!0),p("h3",Gt,[P(_(e.title),1),e.count!=null?(o(),u(te,{key:0},[P(" ("+_(e.count)+")",1)],64)):C("",!0)]),e.help?(o(),u("span",{key:1,onClick:m[0]||(m[0]=$e(()=>{},["stop"]))},[k(R,{topic:e.help},null,8,["topic"])])):C("",!0),t(c)&&i.$slots.folded?(o(),u("span",Qt,[Oe(i.$slots,"folded")])):C("",!0)],40,Yt),i.$slots.actions?(o(),u("div",Xt,[Oe(i.$slots,"actions")])):C("",!0)]),!t(c)&&(e.subtitle||i.$slots.subtitle)?(o(),u("p",en,[Oe(i.$slots,"subtitle",{},()=>[P(_(e.subtitle),1)])])):C("",!0)]),default:A(()=>[vt(p("div",null,[Oe(i.$slots,"default")],512),[[bt,!t(c)]])]),_:3},8,["ui","class"])],512)}}}),De=Object.assign(tn,{__name:"CollapsibleSectionCard"}),nn=/('(?:\\.|[^'])*'|"(?:\\.|[^"])*")|([A-Za-z_$][\w$]*)(?=\s*\()|([A-Za-z_$][\w$]*)(?=\s*:)|(true|false|null|\d+)|([{}(),.])/g;function on(e){const r=[],a=new RegExp(nn.source,"g");let c=0,n;for(;(n=a.exec(e))!==null;){n.index>c&&r.push({kind:"plain",text:e.slice(c,n.index)});const s=n[1]?"string":n[2]?"method":n[3]?"option":n[4]?"literal":"punctuation";r.push({kind:s,text:n[0]}),c=a.lastIndex}return c<e.length&&r.push({kind:"plain",text:e.slice(c)}),r}const sn=["title"],an=pe({__name:"LocatorCode",props:{locator:{},truncate:{type:Boolean,default:!1}},setup(e){const r=e,a={method:"text-violet-700 dark:text-violet-300",string:"text-green-700 dark:text-green-300",option:"text-blue-700 dark:text-blue-300",literal:"text-amber-700 dark:text-amber-300",punctuation:"text-gray-500 dark:text-gray-400",plain:""},c=L(()=>on(r.locator));return(n,s)=>(o(),u("code",{class:me(["font-mono",e.truncate?"block truncate":"break-words"]),title:e.locator},[(o(!0),u(te,null,ge(t(c),(l,f)=>(o(),u("span",{key:f,class:me(a[l.kind])},_(l.text),3))),128))],10,sn))}}),Qe=Object.assign(an,{__name:"LocatorCode"}),rn={class:"overflow-x-auto text-xs font-mono"},ln=pe({__name:"DiffPatch",props:{patch:{}},setup(e){return(r,a)=>(o(),u("div",rn,[(o(!0),u(te,null,ge(("parsePatchLines"in r?r.parsePatchLines:t(Et))(e.patch),(c,n)=>(o(),u("div",{key:n,class:me(["px-3 py-px whitespace-pre leading-5 min-w-0",("patchLineClass"in r?r.patchLineClass:t(Bt))[c.type]])},_(c.text||" "),3))),128))]))}}),cn=Object.assign(ln,{__name:"DiffPatch"}),un=["role","aria-checked","tabindex"],dn={class:"flex-1 min-w-0"},pn={key:0,class:"text-[11px] leading-4 text-gray-500 truncate"},fn=pe({__name:"LocatorAlternativeRow",props:{alt:{},note:{default:void 0},copied:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1}},emits:["copy","select"],setup(e){const r=e;function a(s){return s>=80?"success":s>=50?"warning":"error"}function c(s){const{method:l,score:f,args:i}=s;return i&&(i.anchorTestId||i.anchorSelector||i.anchorRole)?"scoped to a stable ancestor — survives renames":f>=100?"most stable — purpose-built for testing":l==="getByRole"&&i&&!("name"in i)?"name-free role — survives renames":l==="getByRole"?"browser ARIA tree — semantic and stable":l==="getByLabel"?"associated <label> element":l==="getByPlaceholder"?"input placeholder":l==="getByText"?"visible text":l==="getByAltText"?"image alt text":l==="getByTitle"?"title attribute":l==="locator"&&f>=50?"stable selector":l==="locator"?"CSS class — may be fragile":""}const n=L(()=>r.note??c(r.alt));return(s,l)=>{const f=Pe,i=Qe,m=we,v=Ie;return o(),u("div",{class:me(["flex items-center gap-2 rounded border",[e.dense?"py-1 px-2":"py-1.5 px-2.5",e.selectable?"cursor-pointer hover:bg-elevated transition-colors focus-visible:outline-2 focus-visible:outline-primary":"",e.selectable&&e.selected?"border-primary/60 ring-1 ring-primary/50":"border-default/50"]]),role:e.selectable?"radio":void 0,"aria-checked":e.selectable?e.selected:void 0,tabindex:e.selectable?0:void 0,onClick:l[1]||(l[1]=R=>e.selectable&&s.$emit("select")),onKeydown:[l[2]||(l[2]=_e($e(R=>e.selectable&&s.$emit("select"),["prevent"]),["enter"])),l[3]||(l[3]=_e($e(R=>e.selectable&&s.$emit("select"),["prevent"]),["space"]))]},[k(f,{size:"xs",color:a(e.alt.score),variant:"subtle",class:me(["shrink-0 font-mono tabular-nums cursor-default text-center",e.dense?"min-w-[2.25rem]":"min-w-[2.5rem]"]),title:`Stability score: ${e.alt.score}/100`},{default:A(()=>[P(_(e.alt.score),1)]),_:1},8,["color","class","title"]),p("div",dn,[k(i,{locator:e.alt.locator,truncate:"",class:"text-xs"},null,8,["locator"]),t(n)?(o(),u("p",pn,_(t(n)),1)):C("",!0)]),e.alt.pickedByUser&&e.dense?(o(),F(m,{key:0,name:"i-lucide-user-check",class:"size-3.5 text-primary shrink-0",title:"Confirmed with the locator picker"})):e.alt.pickedByUser?(o(),F(f,{key:1,size:"xs",color:"primary",variant:"subtle",icon:"i-lucide-user-check",class:"shrink-0",title:"Confirmed with the locator picker on the failing page"})):C("",!0),k(v,{size:"xs",variant:"ghost",color:"neutral",icon:e.copied?"i-lucide-check":"i-lucide-copy",title:e.copied?"Copied!":"Copy",class:"shrink-0",onClick:l[0]||(l[0]=$e(R=>s.$emit("copy"),["stop"]))},null,8,["icon","title"])],42,un)}}}),dt=Object.assign(fn,{__name:"LocatorAlternativeRow"}),tt={getByTestId:"testid",getByRole:"semantic",getByLabel:"label",getByPlaceholder:"label",getByText:"text",getByAltText:"text",getByTitle:"text",locator:"css","page.locator":"css"},mn=50;function pt(e,r,a=mn){const c=r[0]??null;if(!c)return{recommended:null,durable:null,preservesConvention:!1,hasDurableAlternative:!1,suggestAddTestId:!1};const n=e?tt[e]:void 0,s=(e?r.find(i=>i.method===e&&i.score>=a):void 0)??(n?r.find(i=>tt[i.method]===n&&i.score>=a):void 0),f=r.find(i=>i.pickedByUser)??s??c;return{recommended:f,durable:c,preservesConvention:!!s&&f===s,hasDurableAlternative:f.locator!==c.locator,suggestAddTestId:c.score<a}}const ft={a:"link",button:"button",nav:"navigation",main:"main",article:"article",section:"region",form:"form",img:"img",figure:"figure",figcaption:"caption",blockquote:"blockquote",table:"table",caption:"caption",thead:"rowgroup",tbody:"rowgroup",tfoot:"rowgroup",tr:"row",td:"cell",ul:"list",ol:"list",li:"listitem",dialog:"dialog",output:"status",progress:"progressbar",meter:"meter",textarea:"textbox",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",details:"group",summary:"button",search:"search"},gn={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",search:"searchbox",number:"spinbutton",text:"textbox",email:"textbox",tel:"textbox",url:"textbox",password:"textbox"},hn=["id","class","name","data-testid","placeholder","alt","title","aria-label","aria-level","role","type","href","multiple"];function yn(e){const r=e.attributes.role;if(r)return r;const a=e.tagName;if(!a)return null;if(a==="input"){const c=(e.attributes.type??"text").toLowerCase();return gn[c]??"textbox"}return a==="select"?e.attributes.multiple!=null?"listbox":"combobox":a==="a"?e.attributes.href!=null?"link":null:ft[a]??null}function xn(e,r){if(r!=="heading")return null;const a=e.tagName.match(/^h([1-6])$/);if(a)return Number(a[1]);const c=e.attributes["aria-level"];return c&&/^\d+$/.test(c)?Number(c):null}const Ce=(e,r)=>e.attributes[r]||null,xe=e=>e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),Ve=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),nt=e=>/^[A-Za-z][A-Za-z0-9_-]*$/.test(e);function vn(e){return/[a-f0-9]{8,}/i.test(e)?10:/^(?:css|sc|emotion|styled)-/i.test(e)?15:/^(bg|text|border|shadow|opacity|font|w-|h-|m[tblrxy]?-|p[tblrxy]?-|flex|grid|gap|rounded|absolute|relative|fixed|sticky|block|inline|hidden|overflow|z-|top-|right-|bottom-|left-|inset-|justify-|items-|self-|content-|order-|col-|row-)/.test(e)?25:/__/.test(e)||/--/.test(e)?35:/^[a-z]+(-[a-z]+)+$/.test(e)||/^[a-z]+[A-Z][a-zA-Z]+$/.test(e)?40:(e.includes("_")||/^[a-z]+-[a-z0-9]{5,}$/.test(e)&&/[0-9]/.test(e),15)}function ot(e){return!!(/^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$/i.test(e)||/^[a-f0-9]{8,}$/i.test(e)||/^[a-z]+-\d{4,}$/.test(e)||/^(tab|panel|input|select|option|dialog|modal|popup|tooltip|menu|listbox|combobox|checkbox|radio|textarea|button|field|label|accordion|collapse|step|slider|toggle|switch|dropdown|overlay|portal|layer)-\d+$/i.test(e)||/^(emotion-|styled-|css-|sc-)/.test(e)||e.startsWith("ng-")||/^(radix-|headlessui-|mui-|mantine-|chakra-)/i.test(e)||/^:r[0-9a-z]+:$/i.test(e)||/^«r[0-9a-z]+»$/i.test(e))}const bn=new Set(["data-test","data-test-id","data-qa","data-qa-id","data-cy","data-e2e"]);function kn(e){const r=[],a=new Set,c=h=>{a.has(h.locator)||(a.add(h.locator),r.push(h))},{accessibleName:n}=e,s=e.tagName,l=yn(e),f=e.selectorCounts,i=h=>h==null||h<=1,m=h=>h!=null&&h>1?45:0,v=e.textContent?e.textContent.replace(/\s+/g," ").trim():null,R=Ce(e,"data-testid");R&&i(f?.testId)&&c({locator:`getByTestId('${xe(R)}')`,method:"getByTestId",args:{testId:R},score:100});const g=xn(e,l),T=g!=null?`, level: ${g}`:"",$=h=>g!=null?{...h,level:g}:h;l&&n&&c({locator:`getByRole('${l}', { name: '${xe(n)}'${T} })`,method:"getByRole",args:$({role:l,name:n}),score:90-m(f?.roleName)});const S=Ce(e,"aria-label");if(l&&S&&S!==n&&c({locator:`getByRole('${l}', { name: '${xe(S)}'${T} })`,method:"getByRole",args:$({role:l,name:S}),score:85-m(f?.roleName)}),n&&["input","select","textarea"].includes(s)){const h=Ce(e,"aria-label");(e.hasLabel===void 0||e.hasLabel===!0||h===n)&&c({locator:`getByLabel('${xe(n)}')`,method:"getByLabel",args:{label:n},score:85})}const K=Ce(e,"placeholder");K&&c({locator:`getByPlaceholder('${xe(K)}')`,method:"getByPlaceholder",args:{placeholder:K},score:80-m(f?.placeholder)}),v&&v.length<80&&c({locator:`getByText('${xe(v)}')`,method:"getByText",args:{text:v},score:75-m(f?.text)});const M=Ce(e,"id");if(M&&!ot(M)&&i(f?.id)){const h=nt(M)?`#${M}`:`[id="${Ve(M)}"]`;c({locator:`locator('${xe(h)}')`,method:"locator",args:{selector:h},score:65})}const Z=Ce(e,"name");if(Z&&i(f?.name)){const h=`[name="${Ve(Z)}"]`;c({locator:`locator('${xe(h)}')`,method:"locator",args:{selector:h},score:60})}const E=Ce(e,"alt");E&&c({locator:`getByAltText('${xe(E)}')`,method:"getByAltText",args:{text:E},score:60-m(f?.alt)});const W=Ce(e,"title");W&&c({locator:`getByTitle('${xe(W)}')`,method:"getByTitle",args:{title:W},score:50-m(f?.title)});const J=!!(R&&i(f?.testId)),x=(h,V,O)=>{let N=!1,Q=!1,ve=!1,he=!1,ue=!1;for(const Y of e.ancestors??[]){if(V(Y)!==1)continue;if(!N&&Y.testId&&Y.testIdCount===1&&(N=!0,c({locator:`getByTestId('${xe(Y.testId)}').${h.expr}`,method:h.method,args:{...h.args,anchorTestId:Y.testId},score:O.testId})),!Q&&Y.id&&!ot(Y.id)&&Y.idCount===1){Q=!0;const B=nt(Y.id)?`#${Y.id}`:`[id="${Ve(Y.id)}"]`;c({locator:`locator('${xe(B)}').${h.expr}`,method:h.method,args:{...h.args,anchorSelector:B},score:O.id})}if(!he&&Y.dataAttr&&Y.dataAttrCount===1){he=!0;const{name:B,value:ae}=Y.dataAttr,w=`[${B}="${Ve(ae)}"]`;c({locator:`locator('${xe(w)}').${h.expr}`,method:h.method,args:{...h.args,anchorSelector:w},score:bn.has(B)?O.testData:O.data})}const de=Y.role||ft[Y.tag]||null;!ve&&de&&de!==h.role&&Y.roleCount===1&&(ve=!0,c({locator:`getByRole('${xe(de)}').${h.expr}`,method:h.method,args:{...h.args,anchorRole:de},score:O.role})),!ue&&de&&Y.filterText&&Y.filterRoleCount===1&&(ue=!0,c({locator:`getByRole('${xe(de)}').filter({ hasText: '${xe(Y.filterText)}' }).${h.expr}`,method:h.method,args:{...h.args,anchorRole:de,anchorHasText:Y.filterText},score:O.filter}))}};if(l&&!J){const h=g!=null?`'${l}', { level: ${g} }`:`'${l}'`,V=$({role:l});x({expr:`getByRole(${h})`,method:"getByRole",args:V,role:l},N=>N.scopedRoleCount,{testId:72,testData:70,id:64,data:60,role:55,filter:53});const O=e.rolePosition;O&&O.role===l&&(O.count===1||g!=null&&O.levelCount===1)&&c({locator:`getByRole(${h})`,method:"getByRole",args:V,score:58})}else!l&&v&&v.length<80&&!J&&x({expr:`getByText('${xe(v)}')`,method:"getByText",args:{text:v},role:null},h=>h.scopedTextCount,{testId:68,testData:66,id:60,data:56,role:51,filter:49});const j=Ce(e,"class");if(j){const h=f?.classes,V=j.split(/\s+/).filter(O=>O.length>1&&/^[A-Za-z_-][A-Za-z0-9_-]*$/.test(O)&&i(h?.[O])).map(O=>({cls:O,score:vn(O)})).sort((O,N)=>N.score-O.score).slice(0,3);for(const{cls:O,score:N}of V)c({locator:`locator('.${xe(O)}')`,method:"locator",args:{selector:`.${O}`},score:N})}return r.sort((h,V)=>V.score-h.score)}function _n(e){const r=e.attributes,a=r["aria-label"];if(a)return a;if(e.textContent)return e.textContent;const c=r.title;if(c)return c;const n=r.placeholder;return n||null}function $n(e,r){const{keep:a,tagRoles:c,inputRoles:n,roleSources:s,includeStructural:l,includeLabelText:f}=r,i={};for(const S of a){const K=e.getAttribute(S)??e[S];i[S]=typeof K=="string"?K.slice(0,200):K?String(K).slice(0,200):null}const m=e.getBoundingClientRect(),v={};try{const S=e.ownerDocument,K=E=>S.defaultView.CSS.escape(E),M=E=>{try{return S.querySelectorAll(E).length}catch{return}};i["data-testid"]&&(v.testId=M(`[data-testid=${JSON.stringify(i["data-testid"])}]`)),i.id&&(v.id=M(`#${K(i.id)}`)),i.name&&(v.name=M(`[name=${JSON.stringify(i.name)}]`)),i.placeholder&&(v.placeholder=M(`[placeholder=${JSON.stringify(i.placeholder)}]`)),i.alt&&(v.alt=M(`[alt=${JSON.stringify(i.alt)}]`)),i.title&&(v.title=M(`[title=${JSON.stringify(i.title)}]`));const Z=(i.class||"").split(/\s+/).filter(E=>E.length>1).slice(0,10);if(Z.length>0){const E={};for(const W of Z){const J=M(`.${K(W)}`);J!==void 0&&(E[W]=J)}v.classes=E}}catch{}let R=null;const g=[];if(l&&c&&n&&s)try{const S=e.ownerDocument,K=B=>S.defaultView.CSS.escape(B),M=B=>{try{return S.querySelectorAll(B).length}catch{return}},Z=new Map,E=new Map,W=B=>{const ae=Z.get(B);if(ae!==void 0)return ae;let w;const d=B.getAttribute("role");if(d)w=d;else{const q=(B.tagName||"").toLowerCase();q==="input"?w=n[(B.getAttribute("type")||"text").toLowerCase()]??"textbox":q==="select"?w=B.getAttribute("multiple")!=null?"listbox":"combobox":q==="a"?w=B.getAttribute("href")!=null?"link":null:w=c[q]??null}return Z.set(B,w),w},J=B=>{const ae=/^h([1-6])$/.exec((B.tagName||"").toLowerCase());if(ae)return Number(ae[1]);const w=B.getAttribute("aria-level");return w&&/^\d+$/.test(w)?Number(w):null},x=W(e),j=x==="heading"?J(e):null,h=B=>{const ae=B.getAttribute("aria-label");if(ae)return ae;const w=(B.textContent||"").replace(/\s+/g," ").trim();return w||B.getAttribute("title")||B.getAttribute("placeholder")||null},V=h(e),O=(e.textContent||"").replace(/\s+/g," ").trim(),N=O?O.toLowerCase():null,Q=B=>{const ae=E.get(B);if(ae!==void 0)return ae;const w=(B.textContent||"").replace(/\s+/g," ").trim().toLowerCase();return E.set(B,w),w},ve=2,he=(B,ae)=>{if(!N)return-1;const w=B.querySelectorAll("*");if(w.length>ae)return-1;let d=0;for(let q=0;q<w.length;q++){const ne=w[q];if(Q(ne).indexOf(N)===-1)continue;let y=!1;const z=ne.children;for(let D=0;D<z.length;D++)if(Q(z[D]).indexOf(N)!==-1){y=!0;break}if(y||d++,d>=ve)return d}return d},ue=S.querySelectorAll(s),Y=ue.length<=4e3,de=!!x&&Y;if(de){let B=0,ae=-1,w=0,d=0;for(let q=0;q<ue.length;q++){const ne=ue[q];W(ne)===x&&(ne===e&&(ae=B),B++,j!=null&&J(ne)===j&&w++,V!=null&&h(ne)===V&&d++)}V!=null&&(v.roleName=d),ae!==-1&&(R={role:x,count:B,index:ae,...j!=null?{levelCount:w}:{}})}if(N){const B=he(S.body||S.documentElement,4e3);B>=0&&(v.text=B)}if(de||N){const B=["form","nav","main","article","section","dialog","table","li","tr"],ae=/^data-(v-[0-9a-f]+|reactid|react-checksum|svelte-\w+|ng-\w+|ember\w*)$/i,w=/^data-(index|idx|i|key|row|rownum|col|column|position|pos|order|sort|offset|page)$/i,d=["data-test","data-test-id","data-qa","data-qa-id","data-cy","data-e2e"],q=(U,se)=>!U||U.slice(0,5)!=="data-"||U==="data-testid"||ae.test(U)||w.test(U)?!1:!!se&&se.length<=120,ne=U=>{const se=U.attributes;if(!se)return null;let le=null;for(let fe=0;fe<se.length;fe++){const ce=se[fe].name,ye=se[fe].value;if(q(ce,ye)){if(d.indexOf(ce.toLowerCase())!==-1)return{name:ce,value:ye};le||(le={name:ce,value:ye})}}return le},y=U=>{let se=0;for(let le=0;le<ue.length;le++)W(ue[le])===U&&se++;return se},z=U=>(U.textContent||"").replace(/\s+/g," ").trim(),D=U=>{const se=U.replace(/[^A-Za-z]/g,"").length;return se<2?!1:U.replace(/[^0-9]/g,"").length<=se},H=U=>!!U&&U.length<=60&&U!==O&&D(U),re=U=>{const se=U.querySelector('h1,h2,h3,h4,h5,h6,[role="heading"]');if(se){const fe=z(se);if(H(fe))return fe}const le=U.querySelectorAll("*");if(le.length>200)return null;for(let fe=0;fe<le.length;fe++){const ce=le[fe];if(ce===e||ce.children.length>0)continue;const ye=z(ce);if(H(ye))return ye}return null},X=(U,se)=>{const le=se.toLowerCase();let fe=0;for(let ce=0;ce<ue.length;ce++)W(ue[ce])===U&&Q(ue[ce]).indexOf(le)!==-1&&fe++;return fe};let oe=e.parentElement,ee=0;for(;oe&&ee<12&&g.length<4;){ee++;const U=(oe.tagName||"").toLowerCase();if(U==="body"||U==="html")break;const se=oe.getAttribute("data-testid"),le=oe.getAttribute("id"),fe=oe.getAttribute("role"),ce=oe.getAttribute("aria-label"),ye=fe||(B.includes(U)?c[U]:null)||null,Te=ne(oe);if(se||le||ye||ce||Te){let I=-1;if(de){const be=oe.querySelectorAll(s);if(be.length<=2e3){I=0;for(let Be=0;Be<be.length;Be++){const Ke=be[Be];W(Ke)===x&&(j!=null&&J(Ke)!==j||I++)}}}const b=he(oe,2e3);let ie=null;try{ye&&Y&&(ie=re(oe))}catch{ie=null}g.push({tag:U,depth:ee,testId:se||null,id:le||null,role:fe||null,ariaLabel:ce||null,...I>=0?{scopedRoleCount:I}:{},...b>=0?{scopedTextCount:b}:{},...se?{testIdCount:M(`[data-testid=${JSON.stringify(se)}]`)}:{},...le?{idCount:M(`#${K(le)}`)}:{},...ye&&Y?{roleCount:y(ye)}:{},...ie?{filterText:ie,filterRoleCount:X(ye,ie)}:{},...Te?{dataAttr:Te,dataAttrCount:M(`[${Te.name}=${JSON.stringify(Te.value)}]`)}:{}})}oe=oe.parentElement}}}catch{}const T=!!(e.labels&&e.labels.length>0),$=f?T&&(e.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,120)||null:void 0;return{tagName:e.tagName?.toLowerCase?.()??"unknown",attributes:i,textContent:(e.textContent||"").replace(/\s+/g," ").trim().slice(0,80),center:{x:Math.round(m.x+m.width/2),y:Math.round(m.y+m.height/2)},hasLabel:T,...f?{labelText:$}:{},selectorCounts:v,...l?{rolePosition:R,ancestors:g}:{}}}function wn(e){const r=globalThis,a=r.document;if(!a||!a.body){e.transport==="postMessage"?r.parent.postMessage({type:"pickerClosed"},"*"):r.__piwiPickState="skipped";return}const c=2147483600,n=a.createElement("div");n.id="__piwi_picker_highlight",n.style.cssText=`position:fixed;pointer-events:none;z-index:${c};display:none;box-sizing:border-box;border:2px solid #a855f7;background:rgba(168,85,247,.14);border-radius:4px;box-shadow:0 0 0 1px rgba(255,255,255,.9),0 0 0 3px rgba(59,7,100,.55),inset 0 0 0 1px rgba(255,255,255,.5);`;const s=a.createElement("div");s.id="__piwi_picker_banner",s.style.cssText=`position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:${c+2};background:#111827;color:#f9fafb;font:13px/1.5 system-ui,sans-serif;border:1px solid #312e81;padding:10px 16px;border-radius:10px;box-shadow:0 4px 24px rgba(0,0,0,.5);max-width:min(680px,86vw);`;const l=y=>{const z=oe=>oe.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),D=/('(?:\\.|[^'])*'|"(?:\\.|[^"])*")|([A-Za-z_$][\w$]*)(?=\s*\()|([A-Za-z_$][\w$]*)(?=\s*:)|(true|false|null|\d+)|([{}(),.])/g;let H="",re=0,X;for(;(X=D.exec(y))!==null;){X.index>re&&(H+=z(y.slice(re,X.index)));const oe=X[1]?"#86efac":X[2]?"#d8b4fe":X[3]?"#93c5fd":X[4]?"#fcd34d":"#9ca3af";H+=`<span style="color:${oe}">${z(X[0])}</span>`,re=D.lastIndex}return re<y.length&&(H+=z(y.slice(re))),H},f="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace",i=y=>`<code style="font-family:${f}">${l(y)}</code>`,m=a.createElement("div");m.innerHTML=e.transport==="postMessage"?"Click an element to generate locators":e.failing?`Piwi locator picker — click the element that should replace ${i(e.failing)}`:"Piwi inspector — click any element to generate locators for it";const v=a.createElement("div");v.id="__piwi_picker_locator",v.style.cssText=`display:none;margin-top:7px;padding:5px 9px;border-radius:7px;background:#0b1120;border:1px solid #4c1d95;font:13.5px/1.55 ${f};word-break:break-word;overflow-wrap:anywhere;`;const R=a.createElement("div");R.id="__piwi_picker_foot",R.style.cssText="color:#9ca3af;margin-top:6px;font-size:12px;",R.textContent="↑ parent · ↓ child · Esc skip",s.appendChild(m),s.appendChild(v),s.appendChild(R);const g=a.createElement("div");g.id="__piwi_picker_label",g.style.cssText=`position:fixed;pointer-events:none;z-index:${c+1};display:none;box-sizing:border-box;max-width:min(620px,92vw);background:#0b1120;color:#f9fafb;border:1px solid #7c3aed;border-radius:7px;padding:4px 8px;font:12.5px/1.45 ${f};white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 4px 18px rgba(0,0,0,.5);`,a.body.appendChild(n),a.body.appendChild(g),a.body.appendChild(s);const T=y=>y.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),$=y=>{const z=(y.tagName||"?").toLowerCase(),D=y.getAttribute&&y.getAttribute("data-testid");if(D)return`getByTestId('${T(D)}')`;if(y.labels&&y.labels.length>0){const U=(y.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,80);if(U)return`getByLabel('${T(U)}')`}const H=y.getAttribute&&y.getAttribute("aria-label");if(H)return`getByLabel('${T(H)}')`;const re=y.getAttribute&&y.getAttribute("placeholder");if(re)return`getByPlaceholder('${T(re)}')`;const X=y.getAttribute&&y.getAttribute("alt");if(X)return`getByAltText('${T(X)}')`;const oe=y.getAttribute&&y.getAttribute("title");if(oe)return`getByTitle('${T(oe)}')`;if(y.id)return`locator('#${T(y.id)}')`;const ee=(y.getAttribute&&y.getAttribute("class")||"").split(/\s+/).find(U=>U.length>1);return ee?`locator('.${T(ee)}')`:z},S=y=>{const z=[];let D=y;for(;D&&z.length<15;){const H=(D.tagName||"").toLowerCase();if(H==="body"||H==="html")break;z.push(D),D=D.parentElement}return z.length?z:[y]},K=["button","a","input","select","textarea","summary","option"],M=y=>{for(let z=0;z<Math.min(y.length,4);z++){const D=y[z],H=(D.tagName||"").toLowerCase();if(K.includes(H)||D.getAttribute&&(D.getAttribute("role")||D.getAttribute("data-testid")))return z}return 0},Z=y=>{const z=r.__piwiDescribeElement;if(typeof z=="function")try{const D=z(y);if(typeof D=="string"&&D)return D}catch{}return $(y)};let E=[],W=0,J=null,x=null;const j=y=>{g.style.display="block";const z=g.getBoundingClientRect(),D=r.innerWidth||a.documentElement.clientWidth||0,H=r.innerHeight||a.documentElement.clientHeight||0;let re=y.top-z.height-6;re<4&&(re=y.bottom+6),re+z.height>H-4&&(re=Math.max(4,H-z.height-4));let X=y.left;X+z.width>D-6&&(X=D-z.width-6),X<6&&(X=6),g.style.left=X+"px",g.style.top=re+"px"},h=()=>E[W]??null,V=()=>{const y=h();if(!y){n.style.display="none",g.style.display="none";return}const z=y.getBoundingClientRect();if(n.style.display="block",n.style.left=z.left+"px",n.style.top=z.top+"px",n.style.width=z.width+"px",n.style.height=z.height+"px",y!==x){x=y;const D=(y.tagName||"?").toLowerCase(),H=l(Z(y));g.innerHTML=`<span style="color:#c4b5fd"><${D}></span> ${H}`,v.innerHTML=H,v.style.display="block"}j(z),R.textContent="click to pick · ↑ parent · ↓ child · Esc skip"},O=y=>{y.preventDefault(),y.stopImmediatePropagation()},N=y=>y===s||y===n||y===g||s.contains&&s.contains(y)||!!(y&&y.__piwiHint);let Q="top";const ve=y=>{Q!==y&&(Q=y,y==="bottom"?(s.style.top="auto",s.style.bottom="12px"):(s.style.top="12px",s.style.bottom="auto"))},he=y=>{const z=y.target;if(!z||N(z)){n.style.display="none",g.style.display="none";return}z!==J&&(J=z,E=S(z),W=M(E)),V();const D=h();if(D){const H=D.getBoundingClientRect(),re=s.getBoundingClientRect(),X=8;H.left<re.right+X&&H.right>re.left-X&&H.top<re.bottom+X&&H.bottom>re.top-X&&ve(Q==="top"?"bottom":"top")}},ue=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick"],Y=()=>{a.removeEventListener("mousemove",he,!0),a.removeEventListener("click",d,!0),a.removeEventListener("keydown",q,!0),e.transport==="postMessage"&&r.removeEventListener("message",ne,!1)},de=()=>{for(const y of ue)a.removeEventListener(y,O,!0)},B=()=>{n.remove(),g.remove(),s.remove()},ae=y=>{if(Y(),n.style.display="none",g.style.display="none",e.transport==="postMessage"){const z=r.__piwiProbe,D=typeof z=="function"?z(y,e.probeArg):null;r.__piwiSnapshotExtras?.onPick?.(),a.addEventListener("click",O,!0),a.addEventListener("keydown",O,!0),R.textContent="Analyzing element…",r.parent.postMessage({type:"elementPicked",attrs:D},"*")}else de(),r.__piwiPickedElement=y,r.__piwiPickState="picked",R.textContent="Analyzing element…"},w=()=>{Y(),e.transport==="postMessage"?(a.removeEventListener("click",O,!0),a.removeEventListener("keydown",O,!0),de(),r.__piwiSnapshotExtras?.onClose?.(),B(),r.parent.postMessage({type:"pickerClosed"},"*")):(de(),r.__piwiPickState="skipped",B())},d=y=>{O(y);const z=h();!z||N(y.target)||ae(z)},q=y=>{if(y.key==="Escape"){O(y),w();return}(y.key==="ArrowUp"||y.key==="ArrowDown")&&(O(y),y.key==="ArrowUp"?W=Math.min(W+1,E.length-1):W=Math.max(W-1,0),V())},ne=y=>{const z=y.data;!z||typeof z.type!="string"||z.type!=="piwiPickerKey"||typeof z.key!="string"||q({key:z.key,preventDefault(){},stopImmediatePropagation(){}})};r.__piwiPickCleanup=B,a.addEventListener("mousemove",he,!0),a.addEventListener("click",d,!0),a.addEventListener("keydown",q,!0);for(const y of ue)a.addEventListener(y,O,!0);e.transport==="postMessage"&&(r.addEventListener("message",ne,!1),r.parent.postMessage({type:"pickerReady"},"*"))}function Cn(){var e=document,r=window,a=2147483600,c=[];function n(){for(var x=0;x<c.length;x++)c[x].parentNode&&c[x].parentNode.removeChild(c[x]);c=[]}function s(x){return(x||"").replace(/\s+/g," ").trim().toLowerCase()}function l(x){var j=s(x);if(j.length<2)return[];for(var h=e.querySelectorAll("button,a,[role],h1,h2,h3,h4,h5,h6,label,summary,input,textarea,select,option,span,li,td,th,p"),V=[],O=[],N=0;N<h.length;N++){var Q=h[N],ve=s(Q.textContent);if(!ve){var he=s(Q.getAttribute&&(Q.getAttribute("placeholder")||Q.getAttribute("aria-label"))||"");he&&(he===j||he.indexOf(j)!==-1)&&V.push(Q);continue}ve.length>120||(ve===j?V.push(Q):ve.indexOf(j)!==-1&&ve.length<j.length+30&&O.push(Q))}return V.concat(O)}function f(x,j){var h=x.getBoundingClientRect();if(h.width===0&&h.height===0)return null;var V=e.createElement("div");return V.__piwiHint=!0,V.style.cssText="position:fixed;pointer-events:none;z-index:"+(a+1)+";box-sizing:border-box;border-radius:3px;transition:opacity .3s;border:2px solid "+j+";box-shadow:0 0 0 3px "+j+"55;left:"+h.left+"px;top:"+h.top+"px;width:"+h.width+"px;height:"+h.height+"px;",e.body.appendChild(V),c.push(V),V}function i(x){var j=x.getBoundingClientRect();r.parent.postMessage({type:"piwiScrollTo",y:j.top},"*")}function m(x){if(n(),!(!x||!x.length)){for(var j=null,h=0;h<x.length;h++)for(var V=x[h],O=l(V&&V.text),N=0;N<Math.min(O.length,3);N++)f(O[N],"#f59e0b"),j||(j=O[N]);j&&i(j),setTimeout(function(){for(var Q=0;Q<c.length;Q++)c[Q].style.opacity="0"},2600),setTimeout(n,3e3)}}var v=[],R=0;function g(){r.parent.postMessage({type:"piwiSearchResult",count:v.length,index:v.length?R:-1},"*")}function T(){n();var x=v[R];x&&(f(x,"#7c3aed"),i(x),g())}function $(x){if(v=l(x),R=0,!v.length){n(),g();return}T()}function S(){v.length&&(R=(R+1)%v.length,T())}function K(x){var j=x.data;if(!(!j||typeof j.type!="string")){if(j.type==="piwiHighlight")try{m(j.hints)}catch{}else if(j.type==="piwiSearch")try{$(j.q)}catch{}else if(j.type==="piwiSearchNext")try{S()}catch{}else if(j.type==="piwiClearHints")try{n()}catch{}}}r.addEventListener("message",K,!1);function M(x){x.preventDefault(),x.stopImmediatePropagation()}for(var Z=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick","contextmenu","submit","beforeinput","input","change","paste","cut","drop","dragstart","keypress","keyup","touchstart","touchend"],E=0;E<Z.length;E++)e.addEventListener(Z[E],M,!0);r.__piwiSnapshotExtras={onPick:function(){n()},onClose:function(){n(),r.removeEventListener("message",K,!1);for(var x=0;x<Z.length;x++)e.removeEventListener(Z[x],M,!0)}};function W(){var x=Math.max(e.documentElement?e.documentElement.scrollHeight:0,e.body?e.body.scrollHeight:0);x>0&&r.parent.postMessage({type:"piwiContentHeight",height:x},"*")}W();try{if(r.ResizeObserver){var J=new r.ResizeObserver(W);e.documentElement&&J.observe(e.documentElement),e.body&&J.observe(e.body)}}catch{}}function Tn(e){const r=[],a=new Set,c=s=>{if(typeof s!="string")return;const l=s.trim();if(l.length<2||l.length>80)return;const f=l.toLowerCase();a.has(f)||(a.add(f),r.push({text:l}))},n=s=>s&&(s.name??s.text??s.label??s.placeholder??s.alt??s.title);c(n(e.failingLocator?.args));for(const s of e.fromElementMatch??[])c(n(s.args));for(const s of e.fromAriaSnapshot??[])c(n(s.args));return r.slice(0,6)}const qe=e=>e.replace(/<\/(script)/gi,"<\\/$1");function Sn(e){const a={transport:"postMessage",probeArg:{keep:e.probedAttrs,includeStructural:!1,includeLabelText:!0}},c=qe(String($n)),n=qe(String(Cn)),s=qe(String(wn));return`<script>globalThis.__piwiProbe = (${c});(${n})();(${s})(${JSON.stringify(a)});<\/script>`}function An(e){return e.replace(/<base\b[^>]*>/gi,"")}function Ln(e,r){return An(e)+Sn(r)}const Rn={key:0,class:"flex items-center justify-center py-20"},In={key:1,class:"py-8 text-center"},zn={class:"text-xs text-gray-400 mt-1"},Pn={key:2,class:"py-8 text-center"},Bn={class:"mb-2 flex items-center gap-2 flex-wrap"},En={key:1,class:"ml-auto inline-flex rounded-md border border-default overflow-hidden text-xs"},On={key:0,class:"flex items-center gap-1 mb-1.5 text-xs text-gray-500"},Mn={class:"tabular-nums w-11 text-center select-none"},Nn={class:"ml-auto text-gray-400 tabular-nums"},Un={key:1,class:"flex items-center gap-2 mb-1.5"},jn={key:0,class:"text-xs text-gray-500 tabular-nums"},Dn={key:1,class:"text-xs text-gray-400"},Kn={key:0,class:"absolute inset-0 flex items-center justify-center bg-white dark:bg-gray-900 z-10"},Vn=["src"],Hn={key:2,class:"mt-4 space-y-3"},Fn={class:"flex items-center gap-3 bg-elevated rounded-lg p-3"},qn={class:"flex-1 min-w-0"},Zn={class:"text-sm font-medium"},Wn={class:"text-xs"},Jn={key:0,class:"text-xs text-gray-400 ml-1"},Yn={key:0,class:"text-xs text-gray-500 mt-0.5 truncate"},Gn={class:"space-y-1",role:"radiogroup","aria-label":"Alternative locators"},Qn={class:"flex-1 min-w-0"},Xn={class:"text-xs font-medium text-primary"},eo={class:"flex justify-between w-full"},to={key:1},no={class:"flex gap-2"},oo=pe({__name:"SnapshotLocatorPicker",props:We({runId:{},testRunsCaseId:{},failingLocator:{},healing:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:We(["close","confirmed"],["update:open"]),setup(e,{emit:r}){const a=e,c=r,n=at(e,"open"),s=G(!1),l=G(null),f=G(null),i=G(void 0);async function m(){s.value=!0,f.value=null;try{const I=new URLSearchParams({inlineStyles:"1"});i.value&&I.set("source",i.value);const b=`?${I.toString()}`;l.value=await $fetch(`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/dom-snapshot${b}`),l.value?.source&&(i.value=l.value.source)}catch(I){f.value=I instanceof Error?I.message:"Unknown error"}finally{s.value=!1}}const v=L(()=>l.value?.availableSources??[]);function R(I){I===i.value||s.value||(i.value=I,$.value=!1,g.value="pick-element",J.value=0,j.value=!1,S.value=null,K.value=[],H.value=null,w.value="",d.value=0,q.value=-1,m())}Ee(n,I=>{I&&(l.value=null,$.value=!1,g.value="pick-element",J.value=0,j.value=!1,i.value=void 0,S.value=null,K.value=[],H.value=null,w.value="",d.value=0,q.value=-1,m())});const g=G("pick-element"),T=G(null),$=G(!1),S=G(null),K=G([]),M=G(void 0);function Z(I){return URL.createObjectURL(new Blob([Ln(I,{probedAttrs:hn})],{type:"text/html"}))}Ee(()=>l.value?.html,I=>{M.value&&(URL.revokeObjectURL(M.value),M.value=void 0),I&&(M.value=Z(I))},{immediate:!0});const E=G(null),W=G(0),J=G(0),x=G(1),j=G(!1),h=L(()=>l.value?.viewport??null),V=L(()=>{const I=h.value;return!I?.width||!W.value?1:Math.min(W.value/I.width,1)}),O=L(()=>{const I=h.value;if(!I)return{width:"100%",height:J.value?`${J.value}px`:"100%"};const b=J.value||I.height;return{width:`${Math.round(I.width*x.value)}px`,height:`${Math.round(b*x.value)}px`}}),N=L(()=>{const I=h.value;if(!I)return{width:"100%",height:J.value?`${J.value}px`:"100%",border:"0"};const b=J.value||I.height;return{width:`${I.width}px`,height:`${b}px`,transform:`scale(${x.value})`,transformOrigin:"top left",border:"0"}}),Q=L(()=>Math.round(x.value*100)),ve=I=>Math.min(4,Math.max(.1,I));function he(I){j.value=!0,x.value=ve(x.value*I)}function ue(){j.value=!1,x.value=V.value}Ee([V,h],()=>{j.value||(x.value=V.value)});let Y=null;Ee(E,I=>{Y?.disconnect(),I&&(W.value=I.clientWidth,Y=new ResizeObserver(b=>{for(const ie of b)W.value=ie.contentRect.width}),Y.observe(I))}),Ae(()=>{Y?.disconnect()}),Ae(()=>{M.value&&URL.revokeObjectURL(M.value)});function de(I){if(!T.value||I.source!==T.value.contentWindow)return;const b=I.data;if(b?.type==="pickerReady"){$.value=!0,ae();return}if(b?.type==="piwiContentHeight"&&typeof b.height=="number"){J.value=Math.max(b.height,h.value?.height??0);return}if(b?.type==="piwiScrollTo"&&typeof b.y=="number"){const ie=E.value;ie&&ie.scrollTo({top:Math.max(0,b.y*x.value-80),behavior:"smooth"});return}if(b?.type==="piwiSearchResult"){d.value=typeof b.count=="number"?b.count:0,q.value=typeof b.index=="number"?b.index:-1;return}if(b?.type==="elementPicked"&&b.attrs){const{labelText:ie,...be}=b.attrs;S.value={...be,accessibleName:ie??_n(be)},K.value=kn(S.value),H.value=null,g.value="review"}b?.type==="pickerClosed"&&se()}function B(I){T.value?.contentWindow?.postMessage(I,"*")}function ae(){const I=Tn({failingLocator:a.failingLocator,fromElementMatch:a.healing?.fromElementMatch??null,fromAriaSnapshot:a.healing?.fromAriaSnapshot??null});I.length&&B({type:"piwiHighlight",hints:I})}const w=G(""),d=G(0),q=G(-1);let ne=null;Ee(w,I=>{ne&&clearTimeout(ne),ne=setTimeout(()=>B({type:"piwiSearch",q:I}),180)});function y(){B({type:"piwiSearchNext"})}Ae(()=>{ne&&clearTimeout(ne)});function z(I){if(!n.value||g.value!=="pick-element"||!$.value||I.key!=="ArrowUp"&&I.key!=="ArrowDown")return;const b=(document.activeElement?.tagName??"").toLowerCase();if(b==="input"||b==="textarea")return;const ie=T.value?.contentWindow;ie&&(I.preventDefault(),ie.postMessage({type:"piwiPickerKey",key:I.key},"*"))}function D(){T.value&&(T.value.src="about:blank")}rt(()=>{window.addEventListener("message",de),window.addEventListener("keydown",z,!0)}),Ae(()=>{window.removeEventListener("message",de),window.removeEventListener("keydown",z,!0)});const H=G(null),re=G(!1);function X(I){H.value=I}const oe=L(()=>pt(a.failingLocator.method,K.value)),ee=Je();async function U(){if(H.value){re.value=!0;try{(await $fetch(`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/locator-pick`,{method:"POST",body:{failingLocator:a.failingLocator,pickedLocator:H.value,element:S.value}})).status==="ok"?c("confirmed",H.value):ee.add({title:"Pick not saved",description:"This failure has no call-site or locator signature to attach the pick to.",color:"warning",icon:"i-lucide-alert-triangle"}),n.value=!1}catch(I){ee.add({title:"Could not save the pick",description:lt(I),color:"error",icon:"i-lucide-alert-triangle"})}finally{re.value=!1}}}function se(){D(),n.value=!1}function le(){S.value=null,K.value=[],H.value=null,g.value="pick-element",$.value=!1,w.value="",d.value=0,q.value=-1;const I=l.value?.html;I&&(M.value&&URL.revokeObjectURL(M.value),M.value=Z(I))}const{copy:fe}=He(),ce=G(null);let ye=null;function Te(I,b){fe(I,{toast:"Locator copied"}),ce.value=b,ye&&clearTimeout(ye),ye=setTimeout(()=>{ce.value=null},2e3)}return Ae(()=>{ye&&clearTimeout(ye)}),(I,b)=>{const ie=we,be=Ie,Be=_t,Ke=Pe,gt=Qe,ht=Mt;return o(),F(ht,{open:n.value,"onUpdate:open":b[8]||(b[8]=ke=>n.value=ke),ui:{content:"max-w-6xl w-[95vw]"},onAfterLeave:se},{header:A(()=>[...b[9]||(b[9]=[p("div",null,[p("h3",{class:"text-lg font-medium"},"Pick a locator from the DOM snapshot"),p("p",{class:"text-sm text-gray-500 mt-0.5"}," Click the element the failing locator should target. Use ↑↓ to walk the DOM tree. ")],-1)])]),body:A(()=>[t(s)?(o(),u("div",Rn,[k(ie,{name:"i-lucide-loader",class:"size-6 animate-spin text-gray-400"}),b[10]||(b[10]=p("span",{class:"ml-2 text-sm text-gray-500"},"Loading DOM snapshot...",-1))])):t(f)?(o(),u("div",In,[k(ie,{name:"i-lucide-alert-triangle",class:"size-8 text-red-300 mx-auto mb-2"}),b[12]||(b[12]=p("p",{class:"text-sm text-red-500"},"Failed to load snapshot",-1)),p("p",zn,_(t(f)),1),k(be,{size:"xs",variant:"outline",color:"neutral",class:"mt-3",onClick:m},{default:A(()=>[...b[11]||(b[11]=[P("Retry",-1)])]),_:1})])):t(l)?.status!=="ok"||!t(l).html?(o(),u("div",Pn,[k(ie,{name:"i-lucide-file-x",class:"size-8 text-gray-300 mx-auto mb-2"}),b[13]||(b[13]=p("p",{class:"text-sm text-gray-500"},"No DOM snapshot or ARIA data available for this execution",-1)),b[14]||(b[14]=p("p",{class:"text-xs text-gray-400 mt-1"},"This test run has no stored trace or ARIA snapshot to pick from.",-1))])):(o(),u(te,{key:3},[p("div",Bn,[t(l).source?(o(),u("div",{key:0,class:me(["text-xs flex items-center gap-1",t(l).source==="aria"?"text-amber-600 dark:text-amber-400":"text-green-600 dark:text-green-400"])},[k(ie,{name:t(l).source==="aria"?"i-lucide-accessibility":"i-lucide-check",class:"size-3.5 shrink-0"},null,8,["name"]),t(l).source==="aria"?(o(),u(te,{key:0},[P(" Accessibility tree from the failure-time ARIA snapshot — element styles are approximate ")],64)):(o(),u(te,{key:1},[P(" Rendered from the failure-time DOM snapshot ")],64))],2)):C("",!0),t(v).length>1?(o(),u("div",En,[p("button",{type:"button",class:me(["px-2 py-1 flex items-center gap-1 transition-colors",t(i)==="dom"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Rendered page from the trace",onClick:b[0]||(b[0]=ke=>R("dom"))},[k(ie,{name:"i-lucide-layout-panel-top",class:"size-3.5"}),b[15]||(b[15]=P(" DOM ",-1))],2),p("button",{type:"button",class:me(["px-2 py-1 flex items-center gap-1 border-l border-default transition-colors",t(i)==="aria"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Accessibility tree from the ARIA snapshot",onClick:b[1]||(b[1]=ke=>R("aria"))},[k(ie,{name:"i-lucide-accessibility",class:"size-3.5"}),b[16]||(b[16]=P(" Tree ",-1))],2)])):C("",!0)]),t(h)?(o(),u("div",On,[k(be,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-out",title:"Zoom out",onClick:b[2]||(b[2]=ke=>he(1/1.25))}),p("span",Mn,_(t(Q))+"%",1),k(be,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-in",title:"Zoom in",onClick:b[3]||(b[3]=ke=>he(1.25))}),k(be,{size:"xs",variant:"outline",color:"neutral",class:"ml-1",onClick:ue},{default:A(()=>[...b[17]||(b[17]=[P("Fit",-1)])]),_:1}),p("span",Nn,_(t(h).width)+"×"+_(t(h).height),1)])):C("",!0),t(g)==="pick-element"?(o(),u("div",Un,[k(Be,{modelValue:t(w),"onUpdate:modelValue":b[4]||(b[4]=ke=>Le(w)?w.value=ke:null),size:"xs",icon:"i-lucide-search",placeholder:"Find an element by its text…",class:"max-w-xs",onKeydown:_e($e(y,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),t(w)&&t(d)>0?(o(),u("span",jn,_(t(q)+1)+"/"+_(t(d)),1)):t(w)?(o(),u("span",Dn,"no matches")):C("",!0),t(d)>1?(o(),F(be,{key:2,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-chevron-down",title:"Next match (Enter)",onClick:y})):C("",!0)])):C("",!0),p("div",{ref_key:"stageRef",ref:E,class:me(["relative border border-default rounded-lg overflow-auto",[t(g)==="pick-element"?"h-[75vh]":"h-80",t(h)?"bg-gray-100 dark:bg-gray-800":""]])},[t($)?C("",!0):(o(),u("div",Kn,[k(ie,{name:"i-lucide-loader",class:"size-5 animate-spin text-gray-400"}),b[18]||(b[18]=p("span",{class:"ml-2 text-sm text-gray-500"},"Initializing picker...",-1))])),p("div",{style:et(t(O))},[p("iframe",{ref_key:"iframeRef",ref:T,src:t(M),style:et(t(N)),class:"bg-white",sandbox:"allow-scripts",title:"DOM snapshot"},null,12,Vn)],4)],2),t(g)==="review"&&t(S)?(o(),u("div",Hn,[p("div",Fn,[k(ie,{name:"i-lucide-crosshair",class:"size-5 text-primary shrink-0"}),p("div",qn,[p("p",Zn,[b[19]||(b[19]=P(" Picked: ",-1)),p("code",Wn,_(t(S).tagName),1),t(S).attributes.id?(o(),u("code",Jn,"#"+_(t(S).attributes.id),1)):C("",!0),t(S).attributes["data-testid"]?(o(),F(Ke,{key:1,size:"xs",color:"primary",variant:"subtle",class:"ml-1"},{default:A(()=>[P(_(t(S).attributes["data-testid"]),1)]),_:1})):C("",!0)]),t(S).textContent?(o(),u("p",Yn,' "'+_(t(S).textContent)+'" ',1)):C("",!0)]),k(be,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-rotate-ccw",title:"Pick a different element",onClick:le})]),p("div",Gn,[(o(!0),u(te,null,ge(t(K),(ke,Fe)=>(o(),F(dt,{key:Fe,alt:ke,copied:t(ce)===`picked-${Fe}`,dense:!0,selectable:!0,selected:t(H)?.locator===ke.locator,onCopy:yt=>Te(ke.locator,`picked-${Fe}`),onSelect:yt=>X(ke)},null,8,["alt","copied","selected","onCopy","onSelect"]))),128))]),t(oe).recommended?(o(),u("div",{key:0,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 flex items-center gap-3 cursor-pointer",role:"button",tabindex:"0",title:"Select this locator for Confirm",onClick:b[6]||(b[6]=ke=>X(t(oe).recommended)),onKeydown:b[7]||(b[7]=_e($e(ke=>X(t(oe).recommended),["prevent"]),["enter"]))},[k(ie,{name:"i-lucide-star",class:"size-5 text-primary shrink-0"}),p("div",Qn,[p("p",Xn," Recommended (score: "+_(t(oe).recommended.score)+") ",1),k(gt,{locator:t(oe).recommended.locator,truncate:"",class:"text-sm mt-0.5"},null,8,["locator"])]),k(be,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(ce)==="rec"?"i-lucide-check":"i-lucide-copy",onClick:b[5]||(b[5]=$e(ke=>Te(t(oe).recommended.locator,"rec"),["stop"]))},{default:A(()=>[...b[20]||(b[20]=[P(" Copy ",-1)])]),_:1},8,["trailing-icon"])],32)):C("",!0)])):C("",!0)],64))]),footer:A(()=>[p("div",eo,[t(g)==="review"?(o(),F(be,{key:0,size:"sm",variant:"outline",color:"neutral",icon:"i-lucide-rotate-ccw",onClick:le},{default:A(()=>[...b[21]||(b[21]=[P(" Pick a different element ",-1)])]),_:1})):(o(),u("div",to)),p("div",no,[k(be,{size:"sm",variant:"outline",color:"neutral",onClick:se},{default:A(()=>[...b[22]||(b[22]=[P("Cancel",-1)])]),_:1}),t(g)==="review"?(o(),F(be,{key:0,size:"sm",color:"primary",loading:t(re),disabled:!t(H),onClick:U},{default:A(()=>[...b[23]||(b[23]=[P(" Confirm pick ",-1)])]),_:1},8,["loading","disabled"])):C("",!0)])])]),_:1},8,["open"])}}}),so=Object.assign(oo,{__name:"SnapshotLocatorPicker"});function ao(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ro(e,r){let a=0,c=null;for(let n=r;n<e.length;n++){const s=e[n];if(c){if(s==="\\"){n++;continue}s===c&&(c=null);continue}if(s==="'"||s==='"'||s==="`"){c=s;continue}if(s==="(")a++;else if(s===")"&&(a--,a===0))return n}return-1}function io(e,r,a){if(!e||!r||!a)return null;const c=new RegExp(`${ao(r)}\\s*\\(`,"g");let n;for(;(n=c.exec(e))!==null;){const s=n.index,l=s>0?e[s-1]:"";if(l&&/[A-Za-z0-9_$]/.test(l))continue;const f=s+n[0].lastIndexOf("("),i=ro(e,f);if(i===-1)return null;const m=e.slice(0,s)+a+e.slice(i+1);return m===e?null:{old:e,new:m}}return null}function lo(e,r){return`${r?`@@ ${r} @@
|
|
2
|
-
`:""}-${e.old.trimEnd()}
|
|
3
|
-
+${e.new.trimEnd()}`}function co(e,r){const a=e??{},c=r??{},n=l=>l==null?null:typeof l=="string"?l:JSON.stringify(l),s=[];for(const l of new Set([...Object.keys(a),...Object.keys(c)])){const f=n(a[l]),i=n(c[l]);f!==i&&s.push({key:l,from:f,to:i})}return s}function uo(e){const a=[`In ${e.location??(e.sourceLine?`line ${e.sourceLine.line}`:"the failing test")}, the Playwright locator \`${e.failing}\` no longer matches its element.`,`Replace it with \`${e.recommended}\`.`];return e.sourceLine&&a.push("","Current line:",e.sourceLine.text.trim()),a.join(`
|
|
4
|
-
`)}const po={key:1},fo={class:"flex items-center gap-1"},mo={key:1,class:"rounded-lg border border-primary/50 bg-primary/10 p-3 mb-3 flex items-center gap-3"},go={class:"flex-1 min-w-0"},ho={class:"text-xs font-medium text-primary flex items-center gap-1.5"},yo={key:2,class:"bg-elevated rounded p-2 mb-3 border border-red-200 dark:border-red-800"},xo={class:"flex items-center gap-2"},vo={class:"text-xs font-mono text-red-600 dark:text-red-400 flex-1 truncate"},bo={key:0,class:"flex items-center gap-2 mt-1.5 pl-6"},ko={class:"text-xs text-gray-500"},_o={class:"font-medium text-gray-700 dark:text-gray-300"},$o={key:4,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 mb-3 space-y-2"},wo={class:"flex items-center gap-2 min-w-0"},Co={key:0,class:"text-[11px] text-gray-500 truncate min-w-0"},To={key:0,class:"rounded border border-default overflow-hidden bg-default"},So={key:0,class:"text-xs flex flex-wrap items-center gap-x-1.5 gap-y-0.5"},Ao={class:"font-mono text-gray-500"},Lo={key:0,class:"font-mono text-red-500 line-through"},Ro={key:1,class:"text-gray-400"},Io={key:2,class:"font-mono text-green-600 dark:text-green-400"},zo={key:3,class:"text-gray-400"},Po={key:2,class:"text-xs text-gray-500"},Bo={key:3,class:"text-xs text-primary/90 flex items-center gap-1"},Eo={class:"flex items-center gap-2"},Oo={key:5,class:"rounded-lg border border-default bg-elevated p-3 mb-3 flex items-center gap-3"},Mo={class:"flex-1 min-w-0"},No={class:"text-xs font-medium text-success-600 dark:text-success-400"},Uo={class:"space-y-2"},jo={key:6,class:"mt-3"},Do={class:"space-y-2"},Ko={class:"flex items-center gap-1"},st=3,Vo=pe({__name:"LocatorHealingPanel",props:{runId:{},testRunsCaseId:{},storageKey:{},affectedCount:{},aiIntents:{}},setup(e){const r=e,a=L(()=>r.storageKey?De:je),c=L(()=>r.storageKey?{storageKey:r.storageKey}:{}),{data:n,pending:s,error:l}=Ue(()=>`/api/test-runs/${r.runId}/cases/${r.testRunsCaseId}/locator-healing`,{lazy:!0},"$Zgad3xb7ix"),f=L(()=>!!n.value&&n.value.source!=="none"&&!!(n.value.fromElementMatch?.length||n.value.fromPriorSuccess?.length||n.value.fromAriaSnapshot?.length)),i=L(()=>n.value?n.value.fromElementMatch??n.value.fromPriorSuccess??n.value.fromAriaSnapshot??[]:[]),m=L(()=>i.value.find(w=>w.pickedByUser)??null),v=L(()=>n.value?.recommendation?n.value.recommendation:n.value?.priorNameMayBeStale||!i.value.length?null:pt(n.value?.failingLocator?.method,i.value)),R=L(()=>n.value?.priorNameMayBeStale&&n.value.fromPriorSuccess?.length?n.value.fromAriaSnapshot??[]:[]),g=L(()=>{const w=v.value;return w?.recommended?w.recommended.pickedByUser?"Confirmed with the locator picker on the failing page":w.preservesConvention?"Keeps your original locator style — minimal, idiomatic edit":w.suggestAddTestId?"Most stable available, but still fragile":"Most stable available — a sturdier style than the original":""}),T=L(()=>{const w=n.value?.priorNameMayBeStale,d=(()=>{switch(n.value?.source){case"prior-run":return w?"Pre-captured from the last passing run — the element looks changed since":"Pre-captured from the last passing run — highest confidence";case"element-match":return"The element looks renamed or moved — these are fresh locators for its current identity on the failing page";case"fingerprint":return"Matched by locator signature (line numbers shifted)";case"cross-test":return"Captured by another test in this project that uses the same locator";case"aria-snapshot":return"Generated from the failure-time ARIA snapshot — limited, no HTML attributes";default:return""}})(),q=n.value?.capturedAt;return q?`${d} · captured ${Ye(q)}`:d}),$=L(()=>{if(n.value?.priorNameMayBeStale)return"text-warning-600 dark:text-warning-400";switch(n.value?.source){case"prior-run":case"fingerprint":case"cross-test":return"text-success-600 dark:text-success-400";case"element-match":return"text-primary-600 dark:text-primary-400";default:return"text-warning-600 dark:text-warning-400"}}),S=L(()=>{const w=n.value?.failingLocator;return w?`${w.method}(${JSON.stringify(w.args)})`:""});function K(w){return w.toLowerCase().replace(/[\s'"`{}[\]]/g,"")}const M=L(()=>{if(!r.aiIntents?.length||!S.value)return null;const w=K(S.value);return r.aiIntents.find(d=>K(d.locator)===w)??null}),Z=ze(),{data:E}=Ue(()=>`/api/test-run-cases/${r.testRunsCaseId}/traces`,{lazy:!0},"$eLKRphd7VZ"),W=L(()=>{const w=E.value?.[0];if(!w)return null;const d=!!Z.public.demoMode&&w.filePath.startsWith("demo/");return ct(w.filePath,Z.app?.baseURL,d)}),J=G(!1);async function x(){await wt(`/api/test-runs/${r.runId}/cases/${r.testRunsCaseId}/locator-healing`)}const{copy:j}=He(),h=G(null);let V=null;function O(w,d,q){j(w,{toast:q}),h.value=d,V&&clearTimeout(V),V=setTimeout(()=>{h.value=null},2e3)}function N(w,d){O(w,d,"Locator copied")}Ae(()=>{V&&clearTimeout(V)});const Q=L(()=>v.value?.recommended??null),ve=L(()=>r.affectedCount&&r.affectedCount>1&&Q.value?`Same break affects ${r.affectedCount} tests in this cluster — one fix`:""),he=L(()=>{if(Q.value?.pickedByUser)return"your confirmed pick";switch(n.value?.source){case"prior-run":return"from the last passing run";case"fingerprint":return"from a prior run (line shifted)";case"cross-test":return"from another test in this project";case"element-match":return"from the current failing page";case"aria-snapshot":return"from the ARIA snapshot";default:return""}}),ue=L(()=>{const w=n.value?.sourceLine,d=Q.value;if(!w||!d)return null;const q=io(w.text,n.value?.failingLocator?.method,d.locator);return q?{edit:q,patch:lo(q,n.value?.location??null)}:null}),Y=L(()=>{if(ue.value)return[];const w=n.value?.failingLocator,d=Q.value;return!w||!d||d.method!==w.method?[]:co(w.args,d.args)});function de(){const w=Q.value;!w||!n.value||O(uo({location:n.value.location??null,sourceLine:n.value.sourceLine??null,failing:S.value,recommended:w.locator}),"fix-prompt","Fix prompt copied")}const B=G(!1),ae=L(()=>B.value?i.value:i.value.slice(0,st));return(w,d)=>{const q=Qe,ne=Ie,y=$t,z=Ge,D=we,H=Pe,re=cn,X=dt,oe=It;return o(),u(te,null,[!t(s)&&!t(l)&&t(f)?(o(),F(Se(t(a)),Ne({key:0},t(c),{icon:"i-lucide-bandage",title:"Alternative locators",count:t(i).length,help:"locator-healing"}),Re({subtitle:A(()=>[p("span",{class:me(t($))},_(t(T)),3)]),default:A(()=>[t(n)?.healedInRunId?(o(),F(z,{key:0,class:"mb-3",color:"success",icon:"i-lucide-circle-check",variant:"subtle",title:"Locator healed"},{description:A(()=>[d[11]||(d[11]=P(" The recommended locator now passes at this call site — ",-1)),k(y,{to:`/test-runs/${t(n).healedInRunId}`,class:"underline font-medium"},{default:A(()=>[P(" see run #"+_(t(n).healedInRunId),1)]),_:1},8,["to"]),d[12]||(d[12]=P(". ",-1))]),_:1})):C("",!0),t(m)?(o(),u("div",mo,[k(D,{name:"i-lucide-user-check",class:"size-5 text-primary shrink-0"}),p("div",go,[p("p",ho,[d[14]||(d[14]=P(" Your pick ",-1)),k(H,{size:"sm",color:"primary",variant:"subtle"},{default:A(()=>[...d[13]||(d[13]=[P("confirmed on the failing page",-1)])]),_:1})]),k(q,{locator:t(m).locator,truncate:"",class:"text-sm mt-0.5"},null,8,["locator"])]),k(ne,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(h)==="user-pick"?"i-lucide-check":"i-lucide-copy",onClick:d[1]||(d[1]=ee=>N(t(m).locator,"user-pick"))},{default:A(()=>[...d[15]||(d[15]=[P(" Copy ",-1)])]),_:1},8,["trailing-icon"])])):C("",!0),t(n)?.failingLocator?(o(),u("div",yo,[p("div",xo,[k(D,{name:"i-lucide-x-circle",class:"size-4 text-red-500 shrink-0"}),p("code",vo,_(t(S)),1),k(ne,{size:"xs",variant:"ghost",color:"neutral",icon:t(h)==="failing"?"i-lucide-check":"i-lucide-copy",title:t(h)==="failing"?"Copied!":"Copy",onClick:d[2]||(d[2]=ee=>N(t(S),"failing"))},null,8,["icon","title"])]),t(M)?(o(),u("div",bo,[k(D,{name:"i-lucide-wand-sparkles",class:"size-3.5 text-primary shrink-0"}),p("span",ko,[d[19]||(d[19]=P(" Compiled from prompt ",-1)),p("span",_o,"“"+_(t(M).template)+"”",1),t(M).kind==="run"?(o(),u(te,{key:0},[d[16]||(d[16]=P(" (a ",-1)),d[17]||(d[17]=p("code",{class:"text-xs"},"piwiRun",-1)),d[18]||(d[18]=P(" flow step)",-1))],64)):C("",!0)])])):C("",!0)])):C("",!0),t(n)?.priorNameMayBeStale?(o(),F(z,{key:3,class:"mb-3",color:"warning",icon:"i-lucide-alert-triangle",variant:"subtle",title:"The element's name looks changed",description:"The captured accessible name no longer appears on the failing page, so name-based alternatives (and the failing locator itself) probably no longer match. Prefer the structural options, or the failing-page candidates below."})):C("",!0),t(Q)?(o(),u("div",$o,[p("div",wo,[k(D,{name:"i-lucide-star",class:"size-4 text-primary shrink-0"}),d[20]||(d[20]=p("p",{class:"text-xs font-medium text-primary shrink-0"},"Recommended fix",-1)),t(he)?(o(),u("span",Co," · "+_(t(he)),1)):C("",!0),d[21]||(d[21]=p("span",{class:"flex-1"},null,-1)),k(H,{size:"xs",color:"primary",variant:"subtle",class:"font-mono tabular-nums shrink-0"},{default:A(()=>[P(_(t(Q).score),1)]),_:1})]),t(ue)?(o(),u("div",To,[k(re,{patch:t(ue).patch},null,8,["patch"])])):(o(),u(te,{key:1},[k(q,{locator:t(Q).locator,truncate:"",class:"text-sm"},null,8,["locator"]),t(Y).length?(o(),u("p",So,[(o(!0),u(te,null,ge(t(Y),(ee,U)=>(o(),u(te,{key:U},[p("span",Ao,_(ee.key)+":",1),ee.from?(o(),u("span",Lo,_(ee.from),1)):(o(),u("span",Ro,"—")),k(D,{name:"i-lucide-arrow-right",class:"size-3 text-gray-400"}),ee.to?(o(),u("span",Io,_(ee.to),1)):(o(),u("span",zo,"removed"))],64))),128))])):C("",!0)],64)),t(g)?(o(),u("p",Po,_(t(g)),1)):C("",!0),t(ve)?(o(),u("p",Bo,[k(D,{name:"i-lucide-layers",class:"size-3 shrink-0"}),P(_(t(ve)),1)])):C("",!0),p("div",Eo,[k(ne,{size:"xs",color:"primary",variant:"solid","trailing-icon":t(h)==="top"?"i-lucide-check":"i-lucide-copy",onClick:d[3]||(d[3]=ee=>N(t(Q).locator,"top"))},{default:A(()=>[...d[22]||(d[22]=[P(" Copy locator ",-1)])]),_:1},8,["trailing-icon"]),k(ne,{size:"xs",color:"neutral",variant:"outline",icon:t(h)==="fix-prompt"?"i-lucide-check":"i-lucide-sparkles",title:"Copy an instruction an AI coding agent can apply directly to the test",onClick:de},{default:A(()=>[...d[23]||(d[23]=[P(" Copy fix prompt ",-1)])]),_:1},8,["icon"])])])):C("",!0),t(v)?.hasDurableAlternative&&t(v).durable?(o(),u("div",Oo,[k(D,{name:"i-lucide-shield-check",class:"size-5 text-success shrink-0"}),p("div",Mo,[p("p",No," Most stable option (score: "+_(t(v).durable.score)+") ",1),k(q,{locator:t(v).durable.locator,truncate:"",class:"text-sm mt-0.5"},null,8,["locator"]),d[24]||(d[24]=p("p",{class:"text-xs text-gray-500 mt-0.5"},"Sturdier, but changes the locator style",-1))]),k(ne,{size:"sm",color:"neutral",variant:"outline","trailing-icon":t(h)==="durable"?"i-lucide-check":"i-lucide-copy",onClick:d[4]||(d[4]=ee=>N(t(v).durable.locator,"durable"))},{default:A(()=>[...d[25]||(d[25]=[P(" Copy ",-1)])]),_:1},8,["trailing-icon"])])):C("",!0),p("div",Uo,[d[26]||(d[26]=p("p",{class:"text-xs font-medium text-gray-500"},"All alternatives",-1)),(o(!0),u(te,null,ge(t(ae),(ee,U)=>(o(),F(X,{key:U,alt:ee,copied:t(h)===`alt-${U}`,onCopy:se=>N(ee.locator,`alt-${U}`)},null,8,["alt","copied","onCopy"]))),128)),t(i).length>st?(o(),F(ne,{key:0,size:"xs",variant:"ghost",color:"neutral",block:"",icon:t(B)?"i-lucide-chevron-up":"i-lucide-chevron-down",onClick:d[5]||(d[5]=ee=>B.value=!t(B))},{default:A(()=>[P(_(t(B)?"Show fewer":`Show all ${t(i).length} alternatives`),1)]),_:1},8,["icon"])):C("",!0)]),t(R).length?(o(),u("div",jo,[d[27]||(d[27]=p("p",{class:"text-xs font-medium text-gray-500 mb-2"},"From the failing page",-1)),p("div",Do,[(o(!0),u(te,null,ge(t(R),(ee,U)=>(o(),F(X,{key:U,alt:ee,note:"candidate from the failure-time ARIA snapshot",copied:t(h)===`supp-${U}`,onCopy:se=>N(ee.locator,`supp-${U}`)},null,8,["alt","copied","onCopy"]))),128))])])):C("",!0),t(v)?.suggestAddTestId?(o(),F(z,{key:7,class:"mt-3",color:"warning",icon:"i-lucide-info",variant:"subtle",title:"All alternatives are fragile",description:"Every captured locator scores below 50. Add a stable data-testid attribute to this element in the app for a durable fix."})):C("",!0),t(n)?.source==="aria-snapshot"?(o(),F(z,{key:8,class:"mt-3",color:"info",icon:"i-lucide-info",variant:"subtle"},{description:A(()=>[d[29]||(d[29]=P(" No HTML attributes were available. ",-1)),k(oe,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:A(()=>[...d[28]||(d[28]=[P("Enable Piwi fixture capture",-1)])]),_:1}),d[30]||(d[30]=P(" for full alternatives including data-testid and CSS selectors. ",-1))]),_:1})):C("",!0)]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[t(v)?.recommended?(o(),F(q,{key:0,locator:t(v).recommended.locator,class:"text-xs"},null,8,["locator"])):(o(),u("span",po,_(t(i).length)+" alternative"+_(t(i).length===1?"":"s"),1))]),key:"0"}:void 0,t(W)||t(n)?.failingLocator?{name:"actions",fn:A(()=>[p("div",fo,[t(n)?.failingLocator?(o(),F(ne,{key:0,size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-mouse-pointer",title:"Open the failure-time DOM snapshot and click the element to pick a locator",onClick:d[0]||(d[0]=ee=>J.value=!0)},{default:A(()=>[...d[9]||(d[9]=[P(" Pick from snapshot ",-1)])]),_:1})):C("",!0),t(W)?(o(),F(ne,{key:1,to:t(W),target:"_blank",size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-crosshair",title:"Open the failure trace in the trace viewer — its Pick locator tool works on the recorded page snapshots"},{default:A(()=>[...d[10]||(d[10]=[P(" Pick from trace ",-1)])]),_:1},8,["to"])):C("",!0)])]),key:"1"}:void 0]),1040,["count"])):!t(s)&&!t(l)&&!t(f)?(o(),F(Se(t(a)),Ne({key:1},t(c),{icon:"i-lucide-bandage",title:"Alternative locators",subtitle:"No alternatives available",help:"locator-healing"}),Re({default:A(()=>[k(z,{color:"neutral",icon:"i-lucide-info",variant:"subtle"},{description:A(()=>[d[35]||(d[35]=P(" No pre-captured alternatives — this locator has never passed in a previous run. ",-1)),k(oe,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:A(()=>[...d[34]||(d[34]=[P("Enable Piwi dashboard fixtures",-1)])]),_:1}),d[36]||(d[36]=P(" to capture element attributes at test time, or use “Pick from snapshot” above to choose a locator by hand on the failure-time page. ",-1))]),_:1})]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[d[31]||(d[31]=p("span",null,"No alternatives available",-1))]),key:"0"}:void 0,t(W)||t(n)?.failingLocator?{name:"actions",fn:A(()=>[p("div",Ko,[t(n)?.failingLocator?(o(),F(ne,{key:0,size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-mouse-pointer",title:"Open the failure-time DOM snapshot and click the element to pick a locator",onClick:d[6]||(d[6]=ee=>J.value=!0)},{default:A(()=>[...d[32]||(d[32]=[P(" Pick from snapshot ",-1)])]),_:1})):C("",!0),t(W)?(o(),F(ne,{key:1,to:t(W),target:"_blank",size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-crosshair",title:"Open the failure trace in the trace viewer — its Pick locator tool works on the recorded page snapshots"},{default:A(()=>[...d[33]||(d[33]=[P(" Pick from trace ",-1)])]),_:1},8,["to"])):C("",!0)])]),key:"1"}:void 0]),1040)):C("",!0),t(n)?.failingLocator?(o(),F(so,{key:2,open:t(J),"onUpdate:open":d[7]||(d[7]=ee=>Le(J)?J.value=ee:null),"run-id":e.runId,"test-runs-case-id":e.testRunsCaseId,"failing-locator":t(n).failingLocator,healing:t(n),onConfirmed:x,onClose:d[8]||(d[8]=ee=>J.value=!1)},null,8,["open","run-id","test-runs-case-id","failing-locator","healing"])):C("",!0)],64)}}}),Da=Object.assign(Vo,{__name:"LocatorHealingPanel"}),Ho={key:1,class:"space-y-2"},Fo={class:"text-xs font-medium text-gray-500 dark:text-gray-400 sm:w-40 shrink-0"},qo={class:"flex flex-wrap items-center gap-1.5 min-w-0 text-xs font-mono"},Zo={class:"rounded bg-red-50 px-1.5 py-0.5 text-red-700 dark:bg-red-950/30 dark:text-red-400 break-all"},Wo={class:"rounded bg-green-50 px-1.5 py-0.5 text-green-700 dark:bg-green-950/30 dark:text-green-400 break-all"},Jo={key:0,class:"text-xs text-gray-400 dark:text-gray-500"},Yo={key:0},Go=pe({__name:"EnvironmentDiffCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const a=e,c=L(()=>a.storageKey?De:je),n=L(()=>a.storageKey?{storageKey:a.storageKey}:{}),{data:s,pending:l,error:f}=Ue(()=>`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/environment-diff`,{lazy:!0},"$0pD8W6UYqF"),i=L(()=>s.value?.entries??[]),m=L(()=>i.value.filter($=>!$.informational)),v=L(()=>i.value.filter($=>$.informational)),R=L(()=>{const $=s.value?.baseline;if(!$)return"";const S=$.startTime?` · ${Ye(new Date($.startTime))}`:"";return`vs last pass in run #${$.runId}${S}`}),g=L(()=>{if(s.value?.status!=="ok")return"No passing baseline to compare against";const $=m.value.length;return $===0?"Identical to last pass — no environment drift":`${$} change${$===1?"":"s"}: ${m.value.map(S=>S.label).join(", ")}`}),T=G(null);return r({reveal:()=>T.value?.reveal?.()}),($,S)=>{const K=Ge,M=we;return!t(l)&&!t(f)&&t(s)?.status==="ok"?(o(),F(Se(t(c)),Ne({key:0,ref_key:"card",ref:T},t(n),{icon:"i-lucide-git-compare-arrows",title:"Environment diff",count:t(m).length||void 0,help:"environment-diff",subtitle:t(R)}),Re({default:A(()=>[t(i).length===0?(o(),F(K,{key:0,color:"success",icon:"i-lucide-check-circle",variant:"subtle",description:"The environment is identical to the last passing run — environment drift is unlikely to explain this failure."})):(o(),u("div",Ho,[(o(!0),u(te,null,ge(t(m),Z=>(o(),u("div",{key:Z.key,class:"rounded-lg border border-default p-3 flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-3"},[p("span",Fo,_(Z.label),1),p("div",qo,[p("code",Zo,_(Z.failing??"(unset)"),1),k(M,{name:"i-lucide-arrow-left",class:"size-3 shrink-0 text-gray-400"}),p("code",Wo,_(Z.baseline??"(unset)"),1)])]))),128)),t(v).length>0?(o(),u("p",Jo,[S[0]||(S[0]=P(" Also changed (varies naturally between runs): ",-1)),(o(!0),u(te,null,ge(t(v),(Z,E)=>(o(),u("span",{key:Z.key},[P(_(Z.label.toLowerCase())+" "+_(Z.baseline??"—")+" → "+_(Z.failing??"—"),1),E<t(v).length-1?(o(),u("span",Yo,", ")):C("",!0)]))),128))])):C("",!0)]))]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[p("span",null,_(t(g)),1)]),key:"0"}:void 0]),1040,["count","subtitle"])):C("",!0)}}}),Ka=Object.assign(Go,{__name:"EnvironmentDiffCard"}),Qo={class:"absolute top-4 left-4 text-white/70 text-sm font-medium"},Xo=["src","alt"],es=pe({__name:"ScreenshotLightbox",props:{images:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:r}){const a=e,c=r,n=L(()=>a.modelValue!==null);function s(){c("update:modelValue",null)}function l(){a.modelValue!==null&&a.modelValue>0&&c("update:modelValue",a.modelValue-1)}function f(){a.modelValue!==null&&a.modelValue<a.images.length-1&&c("update:modelValue",a.modelValue+1)}const i=L(()=>a.modelValue===null?null:a.images[a.modelValue]??null);function m(v){n.value&&(v.key==="Escape"&&s(),v.key==="ArrowLeft"&&l(),v.key==="ArrowRight"&&f())}return rt(()=>window.addEventListener("keydown",m)),Ct(()=>window.removeEventListener("keydown",m)),(v,R)=>{const g=we;return o(),F(Tt,{to:"body"},[k(St,{name:"lightbox"},{default:A(()=>[n.value?(o(),u("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/90",onClick:$e(s,["self"])},[p("button",{class:"absolute top-4 right-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:s},[k(g,{name:"i-lucide-x",class:"size-6"})]),p("div",Qo,_((e.modelValue??0)+1)+" / "+_(e.images.length),1),e.images.length>1&&(e.modelValue??0)>0?(o(),u("button",{key:0,class:"absolute left-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:l},[k(g,{name:"i-lucide-chevron-left",class:"size-6"})])):C("",!0),i.value?(o(),u("img",{key:1,src:i.value.src,alt:i.value.name,class:"max-h-[90vh] max-w-[90vw] object-contain rounded-lg",onClick:R[0]||(R[0]=$e(()=>{},["stop"]))},null,8,Xo)):C("",!0),e.images.length>1&&(e.modelValue??0)<e.images.length-1?(o(),u("button",{key:2,class:"absolute right-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:f},[k(g,{name:"i-lucide-chevron-right",class:"size-6"})])):C("",!0)])):C("",!0)]),_:1})])}}}),mt=Object.assign(At(es,[["__scopeId","data-v-c02b1e9b"]]),{__name:"ScreenshotLightbox"}),ts={class:"flex justify-end mb-2"},ns={key:1,class:"rounded overflow-hidden border border-default bg-gray-50 dark:bg-gray-900"},os=["src"],ss={key:2,class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},as={class:"rounded overflow-hidden border border-red-200 dark:border-red-900 bg-gray-50 dark:bg-gray-900"},rs=["src"],is={class:"rounded overflow-hidden border border-green-200 dark:border-green-900 bg-gray-50 dark:bg-gray-900"},ls={class:"px-2 py-1 text-[10px] font-medium text-green-600 dark:text-green-400"},cs=["src"],us=pe({__name:"VisualDiffCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const a=e,c=L(()=>a.storageKey?De:je),n=L(()=>a.storageKey?{storageKey:a.storageKey}:{}),s=ze(),{data:l,pending:f,error:i}=Ue(()=>`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/visual-diff`,{lazy:!0},"$QAhY8Q5pJg"),m=L(()=>l.value?.status==="ok"?l.value.diff??null:null),v=G("overlay"),R=[{label:"Overlay",value:"overlay"},{label:"Side by side",value:"side-by-side"}],g=L(()=>m.value?Me(m.value.path,"image/png",s.app?.baseURL):""),T=L(()=>m.value?Me(m.value.failingPath,null,s.app?.baseURL):""),$=L(()=>m.value?Me(m.value.baselinePath,null,s.app?.baseURL):""),S=L(()=>m.value?(m.value.changedPixelRatio*100).toFixed(2):"0"),K=L(()=>{const J=m.value?.changedPixelRatio??0;return J>.1?"error":J>.01?"warning":"success"}),M=L(()=>m.value?m.value.dimensionMismatch?`${S.value}% changed — dimensions differ, unreliable`:`${S.value}% of pixels changed vs last pass`:"No comparable screenshots"),Z=L(()=>m.value?[{src:T.value,name:"Failing screenshot"},{src:$.value,name:"Last passing screenshot"},{src:g.value,name:"Diff overlay"}]:[]),E=G(null),W=G(null);return r({reveal:()=>W.value?.reveal?.()}),(J,x)=>{const j=Pe,h=Ge,V=Nt,O=mt;return!t(f)&&!t(i)&&t(m)?(o(),F(Se(t(c)),Ne({key:0,ref_key:"card",ref:W},t(n),{icon:"i-lucide-images",title:"Visual diff",help:"visual-diff"}),Re({subtitle:A(()=>[p("span",null,"vs last pass in run #"+_(t(m).baselineRunId),1)]),actions:A(()=>[k(j,{color:t(K),variant:"subtle",size:"sm",class:"font-mono tabular-nums"},{default:A(()=>[P(_(t(S))+"% changed ",1)]),_:1},8,["color"])]),default:A(()=>[t(m).dimensionMismatch?(o(),F(h,{key:0,class:"mb-3",color:"warning",icon:"i-lucide-alert-triangle",variant:"subtle",title:"Screenshot dimensions differ",description:"The failing and passing screenshots have different sizes (viewport change?). They are compared on a padded canvas, so the changed-pixel ratio is inflated and unreliable."})):C("",!0),p("div",ts,[k(V,{modelValue:t(v),"onUpdate:modelValue":x[0]||(x[0]=N=>Le(v)?v.value=N:null),items:R,size:"xs",content:!1,ui:{list:"overflow-x-auto",trigger:"shrink-0"}},null,8,["modelValue"])]),t(v)==="overlay"?(o(),u("div",ns,[p("img",{src:t(g),alt:"Diff overlay (red = changed pixels)",class:"w-full max-h-96 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open diff overlay in lightbox",onClick:x[1]||(x[1]=N=>E.value=2),onKeydown:[x[2]||(x[2]=_e(N=>E.value=2,["enter"])),x[3]||(x[3]=_e($e(N=>E.value=2,["prevent"]),["space"]))]},null,40,os),x[11]||(x[11]=p("p",{class:"px-2 py-1 text-[10px] text-gray-500"},"Red pixels mark differences against the last passing run",-1))])):(o(),u("div",ss,[p("div",as,[x[12]||(x[12]=p("p",{class:"px-2 py-1 text-[10px] font-medium text-red-600 dark:text-red-400"},"Failing",-1)),p("img",{src:t(T),alt:"Failing screenshot",class:"w-full max-h-80 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open failing screenshot in lightbox",onClick:x[4]||(x[4]=N=>E.value=0),onKeydown:[x[5]||(x[5]=_e(N=>E.value=0,["enter"])),x[6]||(x[6]=_e($e(N=>E.value=0,["prevent"]),["space"]))]},null,40,rs)]),p("div",is,[p("p",ls," Last pass (run #"+_(t(m).baselineRunId)+") ",1),p("img",{src:t($),alt:"Last passing screenshot",class:"w-full max-h-80 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open last passing screenshot in lightbox",onClick:x[7]||(x[7]=N=>E.value=1),onKeydown:[x[8]||(x[8]=_e(N=>E.value=1,["enter"])),x[9]||(x[9]=_e($e(N=>E.value=1,["prevent"]),["space"]))]},null,40,cs)])])),k(O,{modelValue:t(E),"onUpdate:modelValue":x[10]||(x[10]=N=>Le(E)?E.value=N:null),images:t(Z)},null,8,["modelValue","images"])]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[p("span",null,_(t(M)),1)]),key:"0"}:void 0]),1040)):C("",!0)}}}),Va=Object.assign(us,{__name:"VisualDiffCard"}),ds={class:"max-h-96 overflow-y-auto"},ps={key:0,class:"mt-2 text-xs text-gray-400 dark:text-gray-500"},Ze=2e4,fs=pe({__name:"DomSnapshotCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const a=e,c=L(()=>a.storageKey?De:je),n=L(()=>a.storageKey?{storageKey:a.storageKey}:{}),{data:s,pending:l,error:f}=Ue(()=>`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/dom-snapshot`,{lazy:!0},"$rAu-vOWv77"),i=L(()=>(s.value?.html??"").slice(0,Ze)),m=L(()=>(s.value?.html?.length??0)>Ze),v=L(()=>{const $=s.value;return!$||$.status!=="ok"?"":`${Math.round(($.html?.length??0)/1024)} KB · rendered from the uploaded trace${$.snapshotName?` (${$.snapshotName})`:""}`}),{copy:R,copied:g}=He(),T=G(null);return r({reveal:()=>T.value?.reveal?.()}),($,S)=>{const K=Ie,M=Ut,Z=jt;return!t(l)&&!t(f)&&t(s)?.status==="ok"&&t(s).html?(o(),F(Se(t(c)),Ne({key:0,ref_key:"card",ref:T},t(n),{icon:"i-lucide-file-code",title:"DOM snapshot",help:"dom-snapshot",subtitle:t(v)}),Re({actions:A(()=>[k(M,{text:t(g)?"Copied!":"Copy full HTML"},{default:A(()=>[k(K,{size:"xs",variant:"ghost",color:"neutral",icon:t(g)?"i-lucide-check":"i-lucide-clipboard",onClick:S[0]||(S[0]=E=>t(R)(t(s).html))},null,8,["icon"])]),_:1},8,["text"])]),default:A(()=>[p("div",ds,[k(Z,{code:t(i),lang:"xml"},null,8,["code"])]),t(m)||t(s).truncated?(o(),u("p",ps,[t(m)?(o(),u(te,{key:0},[P("Showing the first "+_(Math.round(Ze/1e3))+"k characters — use Copy for the full document.",1)],64)):(o(),u(te,{key:1},[P("The snapshot was truncated to its size cap.")],64))])):C("",!0)]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[p("span",null,"Failure-time HTML extracted from the trace — "+_(Math.round((t(s).html.length??0)/1024))+" KB",1)]),key:"0"}:void 0]),1040,["subtitle"])):C("",!0)}}}),Ha=Object.assign(fs,{__name:"DomSnapshotCard"}),ms={class:"rounded-md border border-default overflow-hidden"},gs={class:"text-xs font-semibold text-gray-600 dark:text-gray-300 flex-1"},hs={key:0,class:"text-gray-400 font-normal ml-1"},ys={key:0},xs=pe({__name:"TestEvidenceSection",props:We({icon:{},label:{},count:{},collapsible:{type:Boolean}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(e){const r=e,a=at(e,"open"),c=L(()=>r.collapsible===!1||a.value);return(n,s)=>{const l=we;return o(),u("div",ms,[(o(),F(Se(e.collapsible===!1?"div":"button"),{class:me(["w-full flex items-center gap-1.5 px-3 py-2 bg-elevated border-b border-default text-left",e.collapsible!==!1&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer"]),onClick:s[0]||(s[0]=f=>e.collapsible!==!1&&(a.value=!a.value))},{default:A(()=>[k(l,{name:e.icon,class:"size-3.5 shrink-0 text-primary/70"},null,8,["name"]),p("span",gs,[P(_(e.label),1),e.count!=null?(o(),u("span",hs,"("+_(e.count)+")",1)):C("",!0)]),e.collapsible!==!1?(o(),F(l,{key:0,name:a.value?"i-lucide-chevron-up":"i-lucide-chevron-down",class:"size-3.5 text-gray-400"},null,8,["name"])):C("",!0)]),_:1},8,["class"])),t(c)?(o(),u("div",ys,[Oe(n.$slots,"default")])):C("",!0)])}}}),Xe=Object.assign(xs,{__name:"TestEvidenceSection"}),vs={class:"grid grid-cols-2 gap-2 p-2 bg-gray-50 dark:bg-gray-900"},bs=["aria-label","onClick","onKeydown"],ks=["src","alt"],_s={class:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/30"},$s={class:"absolute bottom-0 inset-x-0 px-1.5 py-0.5 text-[10px] text-white bg-black/50 truncate"},ws=pe({__name:"TestEvidenceScreenshots",props:{attachments:{}},setup(e){const r=e,a=ze();function c(l){return l.split("/").pop()||l}const n=L(()=>r.attachments.filter(l=>Kt(l.path,l.contentType)).map(l=>({src:Me(l.path,l.contentType,a.app?.baseURL),name:l.name||c(l.path)}))),s=G(null);return(l,f)=>{const i=we,m=mt,v=Xe;return t(n).length>0?(o(),F(v,{key:0,icon:"i-lucide-image",label:"Screenshots",count:t(n).length,collapsible:!1},{default:A(()=>[p("div",vs,[(o(!0),u(te,null,ge(t(n),(R,g)=>(o(),u("div",{key:R.src,class:"relative group cursor-pointer rounded overflow-hidden border border-default outline-none focus-visible:outline-2 focus-visible:outline-primary",role:"button",tabindex:"0","aria-label":`View screenshot ${R.name}`,onClick:T=>s.value=g,onKeydown:[_e(T=>s.value=g,["enter"]),_e($e(T=>s.value=g,["prevent"]),["space"])]},[p("img",{src:R.src,alt:R.name,class:"w-full h-28 object-cover object-top transition-opacity group-hover:opacity-80",loading:"lazy"},null,8,ks),p("div",_s,[k(i,{name:"i-lucide-zoom-in",class:"size-5 text-white"})]),p("p",$s,_(R.name),1)],40,bs))),128))]),k(m,{modelValue:t(s),"onUpdate:modelValue":f[0]||(f[0]=R=>Le(s)?s.value=R:null),images:t(n)},null,8,["modelValue","images"])]),_:1},8,["count"])):C("",!0)}}}),Fa=Object.assign(ws,{__name:"TestEvidenceScreenshots"}),Cs={class:"m-0"},Ts={class:"bg-black rounded overflow-hidden"},Ss=["src"],As=["title"],Ls=pe({__name:"VideoPlayer",props:{src:{},label:{}},setup(e){return(r,a)=>(o(),u("figure",Cs,[p("div",Ts,[p("video",{src:e.src,controls:"",preload:"metadata",class:"w-full max-h-96"}," Your browser does not support the video tag. ",8,Ss)]),e.label?(o(),u("figcaption",{key:0,class:"mt-1 text-xs text-gray-400 truncate",title:e.label},_(e.label),9,As)):C("",!0)]))}}),Rs=Object.assign(Ls,{__name:"VideoPlayer"}),Is={class:"space-y-2 p-2 bg-gray-50 dark:bg-gray-900"},zs=pe({__name:"TestEvidenceVideos",props:{attachments:{}},setup(e){const r=e,a=ze();function c(s){return s.split("/").pop()||s}const n=L(()=>r.attachments.filter(s=>Vt(s.path,s.contentType)).map(s=>({src:Me(s.path,s.contentType,a.app?.baseURL),name:s.name||c(s.path)})));return(s,l)=>{const f=Rs,i=Xe;return t(n).length>0?(o(),F(i,{key:0,icon:"i-lucide-video",label:"Videos",count:t(n).length,collapsible:!1},{default:A(()=>[p("div",Is,[(o(!0),u(te,null,ge(t(n),m=>(o(),F(f,{key:m.src,src:m.src,label:m.name},null,8,["src","label"]))),128))])]),_:1},8,["count"])):C("",!0)}}}),qa=Object.assign(zs,{__name:"TestEvidenceVideos"}),Ps={class:"flex items-center justify-between gap-2"},Bs={class:"flex items-center gap-2 min-w-0"},Es={class:"text-sm truncate"},Os={key:0,class:"text-xs text-gray-400 shrink-0"},Ms={key:1,class:"text-xs text-gray-400 shrink-0"},Ns={class:"flex items-center gap-1.5 shrink-0"},Us=pe({__name:"TraceListItem",props:{trace:{},showTime:{type:Boolean,default:!0}},setup(e){const r=e,a=ze(),c=L(()=>(a.app?.baseURL??"/").replace(/\/$/,"")),n=L(()=>!!a.public.demoMode&&r.trace.filePath.startsWith("demo/")),s=L(()=>r.trace.filePath.split("/").pop()||r.trace.filePath),l=L(()=>ct(r.trace.filePath,a.app?.baseURL,n.value)),f=L(()=>n.value?`${c.value}/${r.trace.filePath}`:`${c.value}/api/files/${Ot(r.trace.filePath)}`);return(i,m)=>{const v=we,R=Ie;return o(),u("div",Ps,[p("div",Bs,[k(v,{name:"i-lucide-file-archive",class:"size-4 text-gray-400 shrink-0"}),p("span",Es,_(t(s)),1),e.trace.size?(o(),u("span",Os,_(("formatBytes"in i?i.formatBytes:t(Ht))(e.trace.size)),1)):C("",!0),e.showTime?(o(),u("span",Ms,_(("formatRelativeTime"in i?i.formatRelativeTime:t(Ye))(e.trace.createdAt)),1)):C("",!0)]),p("div",Ns,[k(R,{to:t(l),target:"_blank",icon:"i-lucide-bug-play",size:"xs",label:"View trace"},null,8,["to"]),k(R,{to:t(f),target:"_blank",icon:"i-lucide-download",size:"xs",color:"neutral",variant:"soft",label:"Download"},null,8,["to"])])])}}}),js=Object.assign(Us,{__name:"TraceListItem"}),Ds={key:0,class:"flex items-center justify-center py-4"},Ks={key:1,class:"divide-y divide-default"},Vs=pe({__name:"TestEvidenceTraces",props:{traces:{},loading:{type:Boolean}},setup(e){return(r,a)=>{const c=we,n=js,s=Xe;return e.loading||e.traces.length>0?(o(),F(s,{key:0,icon:"i-lucide-bug-play",label:"Traces",count:e.traces.length||null,collapsible:!1},{default:A(()=>[e.loading&&!e.traces.length?(o(),u("div",Ds,[k(c,{name:"i-lucide-loader-circle",class:"size-4 animate-spin text-gray-400"})])):(o(),u("div",Ks,[(o(!0),u(te,null,ge(e.traces,l=>(o(),F(n,{key:l.id,trace:l,class:"px-3 py-2"},null,8,["trace"]))),128))]))]),_:1},8,["count"])):C("",!0)}}}),Za=Object.assign(Vs,{__name:"TestEvidenceTraces"}),Hs={class:"space-y-2"},Fs={key:0,class:"rounded-lg border border-default overflow-hidden"},qs=["title"],Zs={key:2,class:"truncate text-gray-400 dark:text-gray-500"},Ws={class:"font-mono"},Js={key:0,class:"overflow-x-auto text-xs font-mono leading-relaxed py-1"},Ys={class:"min-w-max"},Gs={key:1,class:"rounded-lg border border-dashed border-default"},Qs=["onClick"],Xs={key:0,class:"px-3 pb-2 space-y-1"},ea=["title"],ta={key:0,class:"truncate font-mono shrink-0"},na=pe({__name:"TraceCallStack",props:{frames:{},projectKey:{},projectName:{}},setup(e){const r=e,a=L(()=>{if(!r.frames.some(R=>R.inProject))return r.frames.map((R,g)=>({kind:"frame",frame:R,frameIndex:g}));const i=[];let m=[];const v=()=>{m.length!==0&&(i.push({kind:"group",frames:m,key:`group-${i.length}`}),m=[])};return r.frames.forEach((R,g)=>{R.inProject?(v(),i.push({kind:"frame",frame:R,frameIndex:g})):m.push(R)}),v(),i}),c=L(()=>{const f=r.frames.findIndex(i=>i.inProject);return f>=0?f:0}),n=G(new Set);function s(f){const i=new Set(n.value);i.has(f)?i.delete(f):i.add(f),n.value=i}function l(f){return f.source?f.source.lines.map((i,m)=>{const v=f.source.startLine+m;return{lineNo:v,text:i,failing:v===f.line}}):[]}return(f,i)=>{const m=we,v=ut,R=Pe;return o(),u("div",Hs,[(o(!0),u(te,null,ge(t(a),g=>(o(),u(te,{key:g.kind==="frame"?`f-${g.frameIndex}`:g.key},[g.kind==="frame"?(o(),u("div",Fs,[p("div",{class:me(["flex items-center gap-2 px-3 py-1.5 bg-elevated/40 text-xs",g.frame.source?"border-b border-default":""])},[k(m,{name:g.frameIndex===t(c)?"i-lucide-circle-x":"i-lucide-corner-left-up",class:me([g.frameIndex===t(c)?"text-red-500":"text-gray-400","size-3.5 shrink-0"])},null,8,["name","class"]),g.frame.inProject?(o(),F(v,{key:0,"file-path":g.frame.file,line:g.frame.line,column:g.frame.column,"project-key":e.projectKey,"project-name":e.projectName,class:"min-w-0"},null,8,["file-path","line","column","project-key","project-name"])):(o(),u("code",{key:1,class:"truncate text-gray-500 dark:text-gray-400",title:g.frame.absFile||g.frame.file},_(g.frame.file)+":"+_(g.frame.line),9,qs)),g.frame.functionName?(o(),u("span",Zs,[i[0]||(i[0]=P(" in ",-1)),p("span",Ws,_(g.frame.functionName),1)])):C("",!0),k(R,{color:g.frameIndex===t(c)?"error":"neutral",variant:"subtle",size:"xs",class:"ml-auto shrink-0"},{default:A(()=>[P(_(g.frameIndex===t(c)?"Failed here":"Caller"),1)]),_:2},1032,["color"])],2),g.frame.source?(o(),u("div",Js,[p("div",Ys,[(o(!0),u(te,null,ge(l(g.frame),T=>(o(),u("div",{key:T.lineNo,class:me(["px-3 whitespace-pre flex",T.failing?"bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300 font-medium":"text-gray-600 dark:text-gray-400"])},[p("span",{class:me(["w-10 shrink-0 text-right pr-3 tabular-nums select-none",T.failing?"text-red-400 dark:text-red-500":"text-gray-300 dark:text-gray-600"])},_(T.lineNo),3),p("span",null,_(T.text),1)],2))),128))])])):C("",!0)])):(o(),u("div",Gs,[p("button",{type:"button",class:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300",onClick:T=>s(g.key)},[k(m,{name:t(n).has(g.key)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5 shrink-0"},null,8,["name"]),P(" "+_(g.frames.length)+" frame"+_(g.frames.length===1?"":"s")+" in dependencies ",1)],8,Qs),t(n).has(g.key)?(o(),u("div",Xs,[(o(!0),u(te,null,ge(g.frames,(T,$)=>(o(),u("div",{key:$,class:"flex items-center gap-2 text-xs text-gray-400 dark:text-gray-500 min-w-0"},[k(m,{name:"i-lucide-corner-left-up",class:"size-3 shrink-0"}),p("code",{class:"truncate",title:T.absFile||T.file},_(T.file)+":"+_(T.line),9,ea),T.functionName?(o(),u("span",ta,_(T.functionName),1)):C("",!0)]))),128))])):C("",!0)]))],64))),128))])}}}),Wa=Object.assign(na,{__name:"TraceCallStack"}),oa={class:"space-y-2"},sa={class:"flex items-center gap-2 px-3 py-1.5 bg-elevated/40 border-b border-default text-xs"},aa={class:"overflow-x-auto text-xs font-mono leading-relaxed py-1"},ra={class:"min-w-max"},ia=pe({__name:"TestSourceStack",props:{frames:{},projectKey:{},projectName:{}},setup(e){function r(a){return a.split(`
|
|
5
|
-
`).map(c=>({text:c,failing:c.startsWith(">")}))}return(a,c)=>{const n=we,s=ut,l=Pe;return o(),u("div",oa,[(o(!0),u(te,null,ge(e.frames,(f,i)=>(o(),u("div",{key:`${f.file}:${f.line}:${i}`,class:"rounded-lg border border-default overflow-hidden"},[p("div",sa,[k(n,{name:i===0?"i-lucide-circle-x":"i-lucide-corner-left-up",class:me([i===0?"text-red-500":"text-gray-400","size-3.5 shrink-0"])},null,8,["name","class"]),k(s,{"file-path":f.file,line:f.line,"project-key":e.projectKey,"project-name":e.projectName,class:"min-w-0"},null,8,["file-path","line","project-key","project-name"]),k(l,{color:i===0?"error":"neutral",variant:"subtle",size:"xs",class:"ml-auto shrink-0"},{default:A(()=>[P(_(i===0?"Failed here":"Caller"),1)]),_:2},1032,["color"])]),p("div",aa,[p("div",ra,[(o(!0),u(te,null,ge(r(f.snippet),(m,v)=>(o(),u("div",{key:v,class:me(["px-3 whitespace-pre",m.failing?"bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300 font-medium":"text-gray-600 dark:text-gray-400"])},_(m.text),3))),128))])])]))),128))])}}}),Ja=Object.assign(ia,{__name:"TestSourceStack"}),la={class:"space-y-3 text-sm"},ca={key:0,class:"flex flex-col gap-0.5"},ua={class:"text-xs font-mono break-all"},da={key:1,class:"flex flex-col gap-0.5"},pa={class:"text-xs font-mono break-all"},fa={class:"grid grid-cols-1 gap-3 sm:grid-cols-2"},ma={class:"text-xs font-medium text-gray-500 dark:text-gray-400"},ga={key:0,class:"text-xs text-gray-400"},ha={key:1,class:"mt-1 space-y-0.5"},ya={class:"text-gray-400"},xa={class:"text-xs font-medium text-gray-500 dark:text-gray-400"},va={key:0,class:"text-xs text-gray-400"},ba={key:1,class:"mt-1 space-y-0.5"},ka={key:0,class:"text-gray-400"},_a={class:"text-gray-400"},$a=pe({__name:"PageStateCard",props:{pageState:{},storageKey:{},plain:{type:Boolean}},setup(e){const r=e,a=L(()=>r.plain?"div":r.storageKey?De:je),c=L(()=>r.plain?{}:{icon:"i-lucide-database",title:"App state at test end",help:"page-state",...r.storageKey?{storageKey:r.storageKey}:{}}),n=l=>[l.httpOnly?"HttpOnly":null,l.secure?"Secure":null,l.sameSite??null].filter(Boolean).join(", "),s=L(()=>{const l=r.pageState;return[`${l.localStorage.length} localStorage`,`${l.sessionStorage.length} sessionStorage`,`${l.cookies.length} cookie${l.cookies.length===1?"":"s"}`].join(" · ")});return(l,f)=>(o(),F(Se(t(a)),Lt(Rt(t(c))),Re({default:A(()=>[p("div",la,[e.pageState.url?(o(),u("div",ca,[f[0]||(f[0]=p("span",{class:"text-xs font-medium text-gray-500 dark:text-gray-400"},"URL",-1)),p("code",ua,_(e.pageState.url)+_(e.pageState.hash??""),1)])):C("",!0),e.pageState.historyState?(o(),u("div",da,[f[1]||(f[1]=p("span",{class:"text-xs font-medium text-gray-500 dark:text-gray-400"},"History state",-1)),p("code",pa,_(e.pageState.historyState),1)])):C("",!0),p("div",fa,[(o(!0),u(te,null,ge({localStorage:e.pageState.localStorage,sessionStorage:e.pageState.sessionStorage},(i,m)=>(o(),u("div",{key:m},[p("span",ma,_(m)+" ("+_(i.length)+")",1),i.length===0?(o(),u("p",ga,"empty")):(o(),u("ul",ha,[(o(!0),u(te,null,ge(i,v=>(o(),u("li",{key:v.key,class:"text-xs font-mono truncate"},[P(_(v.key)+" ",1),p("span",ya,"("+_(v.length)+" ch)",1)]))),128))]))]))),128))]),p("div",null,[p("span",xa,"Cookies ("+_(e.pageState.cookies.length)+")",1),e.pageState.cookies.length===0?(o(),u("p",va,"none")):(o(),u("ul",ba,[(o(!0),u(te,null,ge(e.pageState.cookies,i=>(o(),u("li",{key:i.name+i.domain,class:"text-xs font-mono truncate"},[P(_(i.name)+" ",1),n(i)?(o(),u("span",ka,"["+_(n(i))+"]",1)):C("",!0),p("span",_a,"· "+_(i.domain),1)]))),128))]))]),f[2]||(f[2]=p("p",{class:"text-[11px] text-gray-400 dark:text-gray-500"}," Storage values and cookie values are never captured — key names, lengths and flags only. ",-1))])]),_:2},[e.storageKey&&!e.plain?{name:"folded",fn:A(()=>[p("span",null,_(t(s)),1)]),key:"0"}:void 0]),1040))}}),Ya=Object.assign($a,{__name:"PageStateCard"});function Ga(e={}){const r=G(!1),a=Je();let c=null;async function n(s,l,f={}){try{typeof ClipboardItem<"u"?await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([s],{type:"text/plain"}),"text/html":new Blob([l],{type:"text/html"})})]):await navigator.clipboard.writeText(s),r.value=!0,c&&clearTimeout(c),c=setTimeout(()=>{r.value=!1,c=null},e.duration??2e3),f.toast&&a.add({title:typeof f.toast=="string"?f.toast:"Copied to clipboard",icon:"i-lucide-check",color:"success",duration:2e3})}catch{}}return{copyRich:n,copied:r}}export{Xe as _,Fa as a,qa as b,Za as c,Wa as d,Ja as e,Ya as f,cn as g,De as h,Da as i,Ka as j,Va as k,Ha as l,ja as m,js as n,Rs as o,mt as p,Ga as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as h,b as U,c as r,j as t,g as s,o as i,k as l,F as _,i as o,G as $,m,C as B,E as V,l as C,_ as F,p as E,r as c}from"./C5TrTuWv.js";import{_ as N}from"./BBhrClA9.js";import{_ as S}from"./DH5H1DJh.js";import{_ as I}from"./C8Paf_V1.js";import"./D_y2VS8k.js";const T={class:"min-h-screen flex items-center justify-center bg-elevated/50"},j={class:"flex items-center gap-2"},P={class:"mt-4 text-center"},q={class:"mt-4 text-center"},D=h({__name:"forgot-password",setup(z){const f=U(),a=c(""),n=c(!1),d=c(!1);async function p(){if(a.value){n.value=!0;try{await $fetch("/api/auth/forgot-password",{method:"POST",body:{email:a.value}}),d.value=!0}catch{f.add({title:"Something went wrong",description:"Please try again.",color:"error"})}finally{n.value=!1}}}return(A,e)=>{const x=E,g=N,u=$,y=V,k=S,v=F,w=I;return i(),r("div",T,[t(w,{class:"w-full max-w-md"},{header:s(()=>[o("div",j,[t(x,{name:"i-lucide-key-round",class:"size-6"}),e[1]||(e[1]=o("h1",{class:"text-2xl font-bold"},"Forgot password",-1))])]),default:s(()=>[l(d)?(i(),r(_,{key:0},[t(g,{color:"success",icon:"i-lucide-mail-check",title:"Check your email",description:"If an account with that email exists, a reset link has been sent."}),o("div",P,[t(u,{to:"/login",class:"text-sm text-gray-500 hover:text-gray-700 dark:hover:text-gray-300"},{default:s(()=>[...e[2]||(e[2]=[m(" Back to login ",-1)])]),_:1})])],64)):(i(),r(_,{key:1},[e[5]||(e[5]=o("p",{class:"text-sm text-gray-500 mb-4"}," Enter your email address and we'll send you a link to reset your password. ",-1)),o("form",{class:"space-y-4",onSubmit:B(p,["prevent"])},[t(k,{label:"Email",name:"email",required:""},{default:s(()=>[t(y,{modelValue:l(a),"onUpdate:modelValue":e[0]||(e[0]=b=>C(a)?a.value=b:null),type:"email",placeholder:"you@example.com",autocomplete:"email",disabled:l(n),class:"w-full"},null,8,["modelValue","disabled"])]),_:1}),t(v,{type:"submit",block:"",loading:l(n)},{default:s(()=>[...e[3]||(e[3]=[m("Send reset link",-1)])]),_:1},8,["loading"])],32),o("div",q,[t(u,{to:"/login",class:"text-sm text-gray-500 hover:text-gray-700 dark:hover:text-gray-300"},{default:s(()=>[...e[4]||(e[4]=[m(" Back to login ",-1)])]),_:1})])],64))]),_:1})])}}});export{D as default};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{b as ie,J as H,B as ye,an as he,r as x,h as K,ao as be,N as Ve,d as _e,k as e,o as m,c as h,j as u,p as ke,m as C,i as a,t as $,g as B,_ as Ce,F as J,y as oe,q as Q,v as T,A as qe,f as X,l as He,G as We,L as Ye}from"./C5TrTuWv.js";import{_ as Ge}from"./B69RP95P.js";import{i as Xe,g as Je,f as Ke,d as Qe,e as Ze,h as et}from"./CX_G-FHC.js";import{_ as tt}from"./BfA6lfg4.js";import{f as we,n as st}from"./DMtrFQqi.js";import{_ as nt}from"./BBhrClA9.js";import{f as at}from"./D-c8ZSws.js";import{u as ot}from"./CGHV0Y2d.js";import{u as it}from"./opwuUqHG.js";const rt=globalThis.setInterval,re=Symbol("cluster-diagnosis");function lt(g){const b=ie(),o=x(""),r=x(""),k=x([]),S=x([]),_=K(()=>!!r.value),R=x(null),P=x([]),E=x(0),U=x(0),O=x(null),l=x(null),p=x(!1),s=x(null),i=x(!1);let c=null,f=null,d=!0;function z(){const n={};return o.value.trim()&&(n.baseCommit=o.value.trim()),k.value.length&&(n.selectedCommitShas=k.value),n}async function D(){p.value=!0;try{const n=await $fetch(`/api/failure-clusters/${g}/context`,{query:{...z(),format:"json"}});R.value=n.text,P.value=n.sections,E.value=n.tokenEstimate,U.value=n.imageTokenEstimate??0,O.value=n.coverage,l.value=n.scmChanges??null}catch{R.value="(failed to load context)",P.value=[],E.value=0,U.value=0,O.value=null,l.value=null}finally{p.value=!1}}async function I(n){try{await $fetch(`/api/failure-clusters/${g}/base-commit`,{method:"PATCH",body:{commit:n||null}}),r.value=n}catch{}}function L(){c&&(clearInterval(c),c=null)}function j(){if(c)return;let n=0;c=rt(async()=>{n+=3e3,await q(),(!s.value||s.value.status!=="running"||n>=12e4)&&L()},3e3)}async function q(){try{const n=await $fetch(`/api/failure-clusters/${g}/diagnosis`);s.value=n.diagnosis}catch{}}async function W(n={}){i.value=!0;try{const w=n.force?`/api/failure-clusters/${g}/diagnose?force=true`:`/api/failure-clusters/${g}/diagnose`,F={};n.additionalContext&&(F.additionalContext=n.additionalContext),o.value.trim()&&(F.baseCommit=o.value.trim()),k.value.length&&(F.selectedCommitShas=k.value),n.images?.length&&(F.images=n.images),s.value=await $fetch(w,{method:"POST",body:Object.keys(F).length?F:void 0}),s.value?.status==="running"&&j()}catch(w){w?.statusCode===409?j():b.add({title:"Diagnosis failed",description:String(w?.message??w),color:"error"})}finally{i.value=!1}}return H(o,n=>{d||(f&&clearTimeout(f),f=setTimeout(()=>D(),900),n!==r.value&&I(n))}),H(k,()=>{d||D()},{deep:!0}),H(s,n=>{n?.status==="running"?j():L()}),ye(async()=>{try{const n=await $fetch(`/api/failure-clusters/${g}/diagnosis`);s.value=n.diagnosis,n.manualBaseCommit&&(r.value=n.manualBaseCommit,o.value=n.manualBaseCommit);const w=n.diagnosis?.details;w?.selectedCommitShas&&Array.isArray(w.selectedCommitShas)&&(k.value=w.selectedCommitShas),w?.autoSelectedCommits&&Array.isArray(w.autoSelectedCommits)&&(S.value=w.autoSelectedCommits)}catch{}d=!1,D(),s.value?.status==="running"&&j()}),he(()=>{L(),f&&clearTimeout(f)}),{clusterId:g,baseCommit:o,savedBaseCommit:r,selectedCommitShas:k,autoSelectedCommits:S,baseCommitIsPinned:_,contextText:R,contextSections:P,tokenEstimate:E,imageTokenEstimate:U,coverage:O,scmChanges:l,contextLoading:p,refreshContext:D,diagnosis:s,posting:i,runDiagnosis:W}}function ct(g){const b=lt(g);return Ve(re,b),b}function zs(){const g=be(re);if(!g)throw new Error("useClusterDiagnosis() must be used under a page that called provideClusterDiagnosis()");return g}function ut(g){const b=be(re,null);if(b)return b;if(g==null)throw new Error("useOrProvideClusterDiagnosis() requires a clusterId when used outside provideClusterDiagnosis()");return ct(g)}const dt={key:0,class:"flex items-center gap-1.5 text-xs text-gray-400 py-1"},ft={key:1,class:"space-y-1.5"},mt={class:"flex items-center justify-between"},gt={class:"text-xs font-medium text-gray-500"},pt={class:"text-gray-400 font-normal"},vt={class:"flex gap-0.5"},xt={class:"grid grid-cols-4 gap-1.5"},yt=["onClick"],ht={class:"relative"},bt=["src","alt"],_t={class:"absolute top-0.5 right-0.5"},kt={class:"px-1 py-0.5 bg-elevated space-y-0.5"},Ct=["title"],wt={class:"flex items-center gap-1 flex-wrap"},St={key:0,class:"text-[8px] text-gray-400 leading-tight"},Tt={key:1,class:"text-[8px] text-gray-400 leading-tight truncate"},$t={key:2,class:"text-[8px] text-gray-400 leading-tight ml-auto"},xe=8,Dt=_e({__name:"DiagnosisScreenshots",props:{affectedTestCases:{}},emits:["update:images"],setup(g,{emit:b}){const o=g,r=b,k=qe();async function S(s){const i=(s.type||"image/webp").split(";")[0].trim();return new Promise((c,f)=>{const d=new FileReader;d.onload=()=>{const z=d.result.split(",")[1];z!=null?c({data:z,mediaType:i}):f(new Error("Failed to read blob"))},d.onerror=f,d.readAsDataURL(s)})}const _=x([]),R=x(!1);async function P(){if(!o.affectedTestCases.length)return;R.value=!0,_.value=[];const s=[];for(const i of o.affectedTestCases){if(s.length>=xe)break;try{const c=await $fetch(`/api/test-run-cases/${i.recentTestRunsCaseId}`);for(const f of c.attachments??[]){if(!Xe(f.path,f.contentType))continue;if(s.length>=xe)break;const d=f.name||f.path.split("/").pop()||"screenshot",z=st(f.path,f.contentType,k.app?.baseURL,!0);try{const D=await fetch(z);if(!D.ok)continue;const I=await D.blob(),{data:L,mediaType:j}=await S(I);s.push({src:`data:${j};base64,${L}`,data:L,mediaType:j,name:d,selected:!0,caseTitle:i.title,status:c.status,retries:c.retries,browser:c.browser,startTime:c.testRun?.startTime??null})}catch{}}}catch{}}_.value=s,R.value=!1,E()}function E(){r("update:images",_.value.filter(s=>s.selected).map(({name:s,mediaType:i,data:c})=>({name:s,mediaType:i,data:c})))}function U(s){_.value[s].selected=!_.value[s].selected,E()}function O(){_.value.forEach(s=>s.selected=!0),E()}function l(){_.value.forEach(s=>s.selected=!1),E()}const p=K(()=>_.value.filter(s=>s.selected).length);return ye(P),(s,i)=>{const c=ke,f=Ce;return e(R)?(m(),h("div",dt,[u(c,{name:"i-lucide-loader-2",class:"size-3 animate-spin"}),i[0]||(i[0]=C(" Loading screenshots from test evidence… ",-1))])):e(_).length?(m(),h("div",ft,[a("div",mt,[a("span",gt,[i[1]||(i[1]=C(" Test screenshots ",-1)),a("span",pt,"("+$(e(p))+"/"+$(e(_).length)+" will be sent to AI)",1)]),a("div",vt,[u(f,{size:"xs",color:"neutral",variant:"ghost",onClick:O},{default:B(()=>[...i[2]||(i[2]=[C("All",-1)])]),_:1}),u(f,{size:"xs",color:"neutral",variant:"ghost",onClick:l},{default:B(()=>[...i[3]||(i[3]=[C("None",-1)])]),_:1})])]),a("div",xt,[(m(!0),h(J,null,oe(e(_),(d,z)=>(m(),h("div",{key:z,class:Q(["cursor-pointer rounded overflow-hidden border-2 transition-all",d.selected?"border-primary":"border-default opacity-50"]),onClick:D=>U(z)},[a("div",ht,[a("img",{src:d.src,alt:d.name,class:"w-full h-14 object-cover object-top"},null,8,bt),a("div",_t,[u(c,{name:d.selected?"i-lucide-check-circle-2":"i-lucide-circle",class:Q(["size-3.5 drop-shadow",d.selected?"text-primary":"text-gray-300"])},null,8,["name","class"])])]),a("div",kt,[a("p",{class:"text-[9px] text-gray-700 dark:text-gray-300 truncate font-medium leading-tight",title:d.caseTitle},$(d.caseTitle),9,Ct),a("div",wt,[a("span",{class:Q(["text-[8px] px-1 rounded leading-tight font-medium",d.status==="passed"?"bg-success/15 text-success":d.status==="failed"?"bg-error/15 text-error":"bg-neutral/15 text-gray-500"])},$(d.status),3),d.retries>0?(m(),h("span",St,"retry "+$(d.retries),1)):T("",!0),d.browser?(m(),h("span",Tt,$(d.browser),1)):T("",!0),d.startTime?(m(),h("span",$t,$(e(we)(d.startTime)),1)):T("",!0)])])],10,yt))),128))])])):T("",!0)}}}),At=Object.assign(Dt,{__name:"DiagnosisScreenshots"});function zt(g){const b=x(""),o=x(null),r=x("idle"),k=x(null),S=x(null);let _=null;function R(){_&&(_.abort(),_=null),r.value==="streaming"&&(r.value="cancelled")}function P(){R(),b.value="",o.value=null,r.value="idle",k.value=null,S.value=null}async function E(l={}){b.value="",o.value=null,S.value=null,k.value=null,r.value="streaming";const p=e(g);_=new AbortController;const s=new URLSearchParams;l.force&&s.set("force","true");const i=`/api/failure-clusters/${p}/diagnose/stream${s.toString()?"?"+s.toString():""}`;try{const c=await $fetch.raw(i,{method:"POST",body:{additionalContext:l.additionalContext,images:l.images,baseCommit:l.baseCommit,selectedCommitShas:l.selectedCommitShas,scope:l.scope,testRunsCaseId:l.testRunsCaseId},responseType:"stream",signal:_.signal,ignoreResponseError:!0}),f=c._data??c.body;if(!f)throw new Error("No response body from streaming endpoint");let d;if(f instanceof ReadableStream)d=f.getReader();else if(f instanceof Uint8Array||f instanceof ArrayBuffer){const L=new TextDecoder().decode(f instanceof ArrayBuffer?new Uint8Array(f):f);O(L),r.value==="streaming"&&(r.value="error",S.value="Stream ended without a result event");return}else if(typeof f?.getReader=="function")d=f.getReader();else if(f?.pipeThrough)d=f.getReader();else throw new Error("Unsupported stream response format");const z=new TextDecoder;let D="";for(;;){const{done:I,value:L}=await d.read();if(I)break;D+=z.decode(L,{stream:!0});const j=D.split(`
|
|
2
|
-
|
|
3
|
-
`);D=j.pop()||"";let q=!1;for(const W of j){const n=U(W);if(n){if(n.event==="result")k.value=n.data,r.value="complete",q=!0;else if(n.event==="thinking"){const w=n.data;b.value+=w.text}else if(n.event==="stage")o.value=n.data.stage;else if(n.event==="error"){const w=n.data;S.value=w.message,r.value="error"}}}if(q)break}if(D.trim()){const I=U(D.trim());I&&(I.event==="result"?(k.value=I.data,r.value="complete"):I.event==="error"&&(S.value=I.data.message,r.value="error"))}r.value==="streaming"&&(S.value||(r.value="complete"))}catch(c){if(c?.name==="AbortError"){r.value="cancelled";return}S.value=String(c?.message??c),r.value="error"}finally{_=null}}function U(l){if(!l.trim())return null;const p=l.split(`
|
|
4
|
-
`);let s="message",i="";for(const c of p)c.startsWith("event: ")?s=c.slice(7).trim():c.startsWith("data: ")?i+=c.slice(6):c.startsWith(":");if(!i)return null;try{return{event:s,data:JSON.parse(i)}}catch{return{event:s,data:i}}}function O(l){const p=l.split(`
|
|
5
|
-
|
|
6
|
-
`);for(const s of p){const i=U(s);if(i)if(i.event==="result")k.value=i.data,r.value="complete";else if(i.event==="thinking"){const c=i.data;b.value+=c.text}else i.event==="stage"?o.value=i.data.stage:i.event==="error"&&(S.value=i.data.message,r.value="error")}}return he(()=>{R()}),{thinkingText:b,stage:o,status:r,result:k,error:S,startStream:E,cancel:R,reset:P}}const Rt=200*1024,Et=5*1024*1024,It=["image/jpeg","image/png","image/gif","image/webp"];function Bt(g){return new Promise((b,o)=>{const r=new FileReader;r.onload=()=>{const k=r.result.split(",")[1];k!==void 0?b(k):o(new Error("Failed to read file"))},r.onerror=o,r.readAsDataURL(g)})}function Pt(){const g=ie(),b=x([]),o=x([]),r=x(!1);async function k(l){for(const p of Array.from(l))if(It.includes(p.type)){if(p.size>Et){g.add({title:"Image too large",description:`${p.name} exceeds 5 MB`,color:"error"});continue}const s=await Bt(p),i=`data:${p.type};base64,${s}`;o.value.push({name:p.name,mediaType:p.type,data:s,preview:i,size:p.size})}else{if(p.size>Rt){g.add({title:"File too large",description:`${p.name} exceeds 200 KB`,color:"error"});continue}const s=await p.text();b.value.push({name:p.name,content:s,size:p.size})}}function S(l){l.preventDefault(),r.value=!0}function _(l){l.currentTarget?.contains(l.relatedTarget)||(r.value=!1)}function R(l){l.preventDefault(),r.value=!1,l.dataTransfer?.files?.length&&k(l.dataTransfer.files)}function P(l){b.value.splice(l,1)}function E(l){o.value.splice(l,1)}function U(){return b.value.length?`## Attached Files
|
|
7
|
-
|
|
8
|
-
${b.value.map(p=>`### ${p.name}
|
|
9
|
-
\`\`\`
|
|
10
|
-
${p.content}
|
|
11
|
-
\`\`\``).join(`
|
|
12
|
-
|
|
13
|
-
`)}`:""}function O(){return o.value.map(l=>({name:l.name,mediaType:l.mediaType,data:l.data}))}return{files:b,images:o,dragOver:r,processFiles:k,onDragOver:S,onDragLeave:_,onDrop:R,removeFile:P,removeImage:E,filesMarkdown:U,imagesPayload:O}}const Ut={class:"space-y-4"},jt={class:"pb-2 border-b border-default"},Ft={class:"flex items-center justify-between gap-2"},Ot={class:"flex items-center gap-1.5"},Lt={class:"text-xs text-gray-400"},Nt={class:"flex items-center gap-1.5"},Mt={key:0,class:"flex items-center gap-2 px-3 py-2 rounded-lg bg-elevated/50 border border-default text-xs"},Vt={class:"text-gray-500"},qt={key:1,class:"flex items-center gap-2 px-3 py-2 rounded-lg bg-elevated/50 border border-default text-xs"},Ht={class:"flex items-center gap-1 mb-1"},Wt={key:0,class:"text-primary"},Yt={key:0},Gt={class:"flex items-center gap-2 px-3 pb-2 pt-1 border-t border-default"},Xt={key:0,class:"text-xs text-primary"},Jt={key:1,class:"text-xs text-gray-400"},Kt={key:0,class:"flex flex-wrap gap-2"},Qt={class:"max-w-40 truncate"},Zt={class:"text-gray-400"},es=["onClick"],ts={key:1,class:"flex flex-wrap gap-2"},ss=["src","alt"],ns={class:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg flex items-center justify-center"},as=["onClick"],os={class:"text-xs text-gray-500 text-center mt-0.5 w-16 truncate"},is={key:3,class:"pt-1"},rs={key:4,class:"rounded-lg border border-default overflow-hidden"},ls={class:"flex items-center justify-between gap-2 px-3 py-2 bg-elevated/30 border-b border-default"},cs={class:"flex items-center gap-2 text-sm text-gray-500"},us={key:0,class:"inline-flex items-center gap-1 text-xs text-gray-400"},ds={key:1,class:"text-gray-400 italic"},fs={class:"px-3 py-1.5 border-t border-default text-xs text-gray-400 flex items-center gap-2"},ms={key:5,class:"rounded-lg border border-warning/40 bg-warning/5 p-3 space-y-2"},gs={class:"flex items-center gap-2 text-sm"},ps={class:"flex items-center gap-2 pt-1"},vs={class:"text-xs text-gray-400"},xs={key:4,class:"flex flex-col items-center justify-center p-8 text-center text-gray-400 border border-dashed border-default rounded-lg"},ys={class:"text-sm inline-flex items-center gap-1"},hs={class:"pt-1 text-center"},bs=_e({__name:"DiagnosisPanel",props:{clusterId:{},lastSeenRunId:{},affectedTestCases:{}},setup(g){const b=g,{diagnosis:o,posting:r,contextText:k,contextSections:S,tokenEstimate:_,imageTokenEstimate:R,contextLoading:P,coverage:E,baseCommit:U,selectedCommitShas:O,refreshContext:l,runDiagnosis:p}=ut(b.clusterId),{aiStatus:s}=ot();ie();const{permission:i,active:c,requestPermission:f,toggleEnabled:d}=it(),{thinkingText:z,stage:D,status:I,result:L,error:j,startStream:q,cancel:W}=zt(K(()=>b.clusterId??0)),n=Pt(),{files:w,images:F,dragOver:le,processFiles:Se,onDragOver:ce,onDragLeave:ue,onDrop:de,removeFile:Te,removeImage:$e}=n,N=x(""),fe=x(null),me=x([]),Z=K(()=>[...me.value,...F.value.length?n.imagesPayload():[]]),V=x(!1),Y=x(!1),se=x(null),ee=x(null);function ge(v){se.value=v,V.value=!0}const De=K(()=>{const v=o.value?.details;if(!v)return[];const t=[];if(Array.isArray(v.evidence)&&t.push(...v.evidence),Array.isArray(v.hypotheses))for(const A of v.hypotheses)Array.isArray(A?.evidence)&&t.push(...A.evidence);return et(t)});H(z,()=>{Ye(()=>{ee.value&&(ee.value.scrollTop=ee.value.scrollHeight)})}),H(L,v=>{v&&(o.value=v)}),H(()=>o.value?.details,v=>{if(!v)return;const t=v;typeof t.additionalContext=="string"&&t.additionalContext.trim()&&!N.value&&(N.value=t.additionalContext)},{immediate:!0});function Ae(v){N.value=N.value?`${N.value}
|
|
14
|
-
|
|
15
|
-
${v}`:v,Y.value=!0}function pe(){const v=[];N.value.trim()&&v.push(N.value.trim());const t=n.filesMarkdown();return t&&v.push(t),v.join(`
|
|
16
|
-
|
|
17
|
-
`)}async function ne(v=!1){await q({force:v,additionalContext:pe()||void 0,baseCommit:U.value.trim()||void 0,selectedCommitShas:O.value.length?[...O.value]:void 0,images:Z.value.length?Z.value:void 0})}async function ze(v=!1){await p({force:v,additionalContext:pe()||void 0,images:Z.value.length?Z.value:void 0})}function Re(){o.value=null}function ve(v){return v.status==="running"&&Date.now()-new Date(v.updatedAt).getTime()>300*1e3}function te(){return I.value==="streaming"}function Ee(){return!te()&&(!o.value||o.value.status==="failed"||ve(o.value))}function Ie(){return!te()&&o.value&&(o.value.status==="completed"||o.value.status==="failed")}return(v,t)=>{const A=ke,ae=Ge,Be=Je,M=Ce,Pe=Qe,Ue=Ke,je=tt,Fe=At,Oe=nt,Le=Ze,Ne=We;return m(),h("div",Ut,[a("div",jt,[a("div",Ft,[a("div",Ot,[u(A,{name:"i-lucide-sparkles",class:"size-4 text-primary shrink-0"}),t[17]||(t[17]=a("span",{class:"text-sm font-semibold"},"Diagnosis",-1)),u(ae,{topic:"cluster.diagnosis"}),a("span",Lt,[t[15]||(t[15]=C(" — ",-1)),u(A,{name:"i-lucide-triangle-alert",class:"size-3 shrink-0 inline"}),t[16]||(t[16]=C(" AI-generated, verify before applying ",-1))])]),a("div",Nt,[u(Be,{"context-endpoint":`/api/failure-clusters/${g.clusterId}/context`},null,8,["context-endpoint"]),u(M,{icon:e(V)?"i-lucide-eye-off":"i-lucide-eye",size:"xs",color:"neutral",variant:"outline",loading:e(P),onClick:t[0]||(t[0]=y=>V.value=!e(V))},{default:B(()=>[C($(e(V)?"Hide context":"Show context"),1)]),_:1},8,["icon","loading"]),e(o)&&e(o).status==="completed"?(m(),X(M,{key:0,icon:"i-lucide-refresh-cw",size:"xs",color:"primary",variant:"soft",loading:e(r),onClick:t[1]||(t[1]=y=>ne(!0))},{default:B(()=>[...t[18]||(t[18]=[C(" Re-diagnose ",-1)])]),_:1},8,["loading"])):T("",!0)])])]),e(i)==="granted"&&e(s)?.configured?(m(),h("div",Mt,[u(A,{name:"i-lucide-bell",class:Q(["size-3.5 shrink-0",e(c)?"text-primary":"text-gray-400"])},null,8,["class"]),a("span",Vt,$(e(c)?"Diagnosis notifications on":"Diagnosis notifications off"),1),u(M,{size:"xs",color:e(c)?"neutral":"primary",variant:"outline",onClick:e(d)},{default:B(()=>[C($(e(c)?"Disable":"Enable"),1)]),_:1},8,["color","onClick"])])):e(i)==="default"&&e(s)?.configured?(m(),h("div",qt,[u(A,{name:"i-lucide-bell",class:"size-3.5 text-gray-400 shrink-0"}),t[20]||(t[20]=a("span",{class:"text-gray-500"},"Notify when diagnosis completes?",-1)),u(M,{size:"xs",color:"neutral",variant:"outline",onClick:e(f)},{default:B(()=>[...t[19]||(t[19]=[C("Enable",-1)])]),_:1},8,["onClick"])])):T("",!0),e(s)?.configured?(m(),X(Pe,{key:2,sections:e(S),"not-applicable":e(E)?.notApplicable,"token-estimate":e(_),loading:e(P),onViewSection:ge,onOpen:t[2]||(t[2]=y=>V.value=!0)},null,8,["sections","not-applicable","token-estimate","loading"])):T("",!0),u(Ue,{open:e(V),sections:e(S),"token-estimate":e(_),"image-token-estimate":e(R),loading:e(P),"focus-section":e(se),"cited-sections":e(De),"not-applicable-sections":e(E)?.notApplicable,"onUpdate:open":t[3]||(t[3]=y=>{V.value=y,y||(se.value=null)}),onRefresh:e(l)},null,8,["open","sections","token-estimate","image-token-estimate","loading","focus-section","cited-sections","not-applicable-sections","onRefresh"]),e(s)?.configured?(m(),h(J,{key:3},[a("div",null,[a("div",Ht,[a("button",{class:"flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 text-left",onClick:t[4]||(t[4]=y=>Y.value=!e(Y))},[u(A,{name:e(Y)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5"},null,8,["name"]),t[21]||(t[21]=C(" Additional context ",-1)),e(w).length||e(F).length||e(N).trim()?(m(),h("span",Wt," ("+$(e(w).length+e(F).length+(e(N).trim()?1:0))+") ",1)):T("",!0)]),u(ae,{topic:"cluster.context-input"})]),e(Y)?(m(),h("div",Yt,[a("div",{class:Q(["rounded-lg border-2 transition-colors",e(le)?"border-primary bg-primary/5 border-solid":"border-dashed border-default"]),onDragover:t[8]||(t[8]=(...y)=>e(ce)&&e(ce)(...y)),onDragleave:t[9]||(t[9]=(...y)=>e(ue)&&e(ue)(...y)),onDrop:t[10]||(t[10]=(...y)=>e(de)&&e(de)(...y))},[u(je,{modelValue:e(N),"onUpdate:modelValue":t[5]||(t[5]=y=>He(N)?N.value=y:null),placeholder:"e.g. We deployed a new auth middleware yesterday\\u2026",rows:3,class:"w-full text-sm border-0 bg-transparent focus:ring-0"},null,8,["modelValue"]),a("div",Gt,[a("input",{ref_key:"fileInputRef",ref:fe,type:"file",multiple:"",class:"hidden",accept:".txt,.log,.md,.json,.ts,.js,.py,.sql,.xml,.yaml,.yml,.html,.css,.env,image/*",onChange:t[6]||(t[6]=y=>e(Se)(y.target.files))},null,544),u(M,{icon:"i-lucide-paperclip",size:"xs",color:"neutral",variant:"ghost",onClick:t[7]||(t[7]=y=>e(fe)?.click())},{default:B(()=>[...t[22]||(t[22]=[C(" Attach files ",-1)])]),_:1}),e(le)?(m(),h("span",Xt,"Drop files here\\u2026")):(m(),h("span",Jt,"or drag & drop text files and images"))])],34)])):T("",!0)]),e(w).length?(m(),h("div",Kt,[(m(!0),h(J,null,oe(e(w),(y,G)=>(m(),h("div",{key:G,class:"flex items-center gap-1.5 bg-elevated rounded-full px-2.5 py-1 text-xs border border-default"},[u(A,{name:"i-lucide-file-text",class:"size-3 text-gray-500 shrink-0"}),a("span",Qt,$(y.name),1),a("span",Zt,$(("formatBytes"in v?v.formatBytes:e(at))(y.size)),1),a("button",{class:"text-gray-400 hover:text-error ml-0.5",onClick:Me=>e(Te)(G)},[u(A,{name:"i-lucide-x",class:"size-3"})],8,es)]))),128))])):T("",!0),e(F).length?(m(),h("div",ts,[(m(!0),h(J,null,oe(e(F),(y,G)=>(m(),h("div",{key:G,class:"relative group"},[a("img",{src:y.preview,alt:y.name,class:"h-16 w-16 object-cover rounded-lg border border-default"},null,8,ss),a("div",ns,[a("button",{class:"text-white",onClick:Me=>e($e)(G)},[u(A,{name:"i-lucide-x",class:"size-4"})],8,as)]),a("p",os,$(y.name),1)]))),128))])):T("",!0),g.affectedTestCases?.length?(m(),X(Fe,{key:2,"affected-test-cases":g.affectedTestCases,"onUpdate:images":t[11]||(t[11]=y=>me.value=y)},null,8,["affected-test-cases"])):T("",!0),Ee()?(m(),h("div",is,[u(M,{icon:"i-lucide-sparkles",size:"sm",color:"primary",variant:"solid",loading:e(r),onClick:t[12]||(t[12]=y=>ne())},{default:B(()=>[...t[23]||(t[23]=[C(" Diagnose with AI ",-1)])]),_:1},8,["loading"])])):T("",!0),te()?(m(),h("div",rs,[a("div",ls,[a("div",cs,[u(A,{name:"i-lucide-loader-2",class:"size-4 animate-spin text-primary"}),t[24]||(t[24]=a("span",null,"Analyzing failure cluster",-1)),e(D)?(m(),h("span",us,[u(A,{name:"i-lucide-workflow",class:"size-3"}),C(" "+$(e(D)==="research"?"Researching patterns":"Diagnosing root cause"),1)])):T("",!0)]),u(M,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-x",title:"Cancel diagnosis",onClick:e(W)},null,8,["onClick"])]),a("div",{ref_key:"thinkingContainer",ref:ee,class:"max-h-64 overflow-y-auto p-3 text-xs font-mono leading-relaxed whitespace-pre-wrap break-words text-gray-600 dark:text-gray-400 bg-elevated/10"},[e(z)?(m(),h(J,{key:0},[C($(e(z))+" ",1),t[25]||(t[25]=a("span",{class:"inline-block w-2 h-4 bg-primary/60 animate-pulse ml-0.5 align-text-bottom"},null,-1))],64)):(m(),h("span",ds,"Waiting for model response\\u2026"))],512),a("div",fs,[u(A,{name:"i-lucide-file-text",class:"size-3"}),a("span",null,$(e(z).length.toLocaleString())+" characters received",1)])])):T("",!0),e(o)?.status==="running"&&!ve(e(o))&&!te()?(m(),h("div",ms,[a("div",gs,[u(A,{name:"i-lucide-alert-triangle",class:"size-4 text-warning shrink-0"}),t[26]||(t[26]=a("span",{class:"font-medium text-warning-700 dark:text-warning-400"},"Diagnosis was interrupted",-1))]),t[29]||(t[29]=a("p",{class:"text-xs text-gray-500"}," A previous diagnosis started but never completed — the server may have restarted. You can restart it below. ",-1)),a("div",ps,[u(M,{icon:"i-lucide-refresh-cw",size:"xs",color:"warning",variant:"solid",loading:e(r),onClick:t[13]||(t[13]=y=>ne(!0))},{default:B(()=>[...t[27]||(t[27]=[C(" Restart diagnosis ",-1)])]),_:1},8,["loading"]),u(M,{size:"xs",color:"neutral",variant:"ghost",loading:e(r),onClick:Re},{default:B(()=>[...t[28]||(t[28]=[C(" Dismiss ",-1)])]),_:1},8,["loading"])]),a("p",vs,"Started "+$(e(we)(e(o).updatedAt)),1)])):T("",!0),e(j)?(m(),X(Oe,{key:6,color:"error",icon:"i-lucide-alert-circle",title:"Streaming diagnosis failed",description:e(j),class:"mt-2"},{actions:B(()=>[u(M,{size:"xs",color:"neutral",variant:"outline",onClick:t[14]||(t[14]=y=>ze(!0))},{default:B(()=>[...t[30]||(t[30]=[C(" Retry (fallback) ",-1)])]),_:1})]),_:1},8,["description"])):T("",!0),Ie()?(m(),X(Le,{key:7,diagnosis:e(o),"last-seen-run-id":g.lastSeenRunId,onViewSection:ge,onPrefillContext:Ae},null,8,["diagnosis","last-seen-run-id"])):T("",!0)],64)):(m(),h("div",xs,[u(A,{name:"i-lucide-sparkles",class:"size-8 mb-2 opacity-30"}),a("p",ys,[t[31]||(t[31]=C(" AI diagnosis is not configured ",-1)),u(ae,{topic:"cluster.ai-setup"})]),u(M,{to:"/settings/ai",size:"xs",color:"neutral",variant:"outline",class:"mt-3"},{default:B(()=>[...t[32]||(t[32]=[C(" Configure in Settings ",-1)])]),_:1}),t[33]||(t[33]=a("p",{class:"text-xs text-gray-400 mt-4 max-w-xs"},[C(" Use the "),a("strong",null,"Show context"),C(" button above to inspect the full diagnosis context and copy it for use with your own AI tool. ")],-1))])),a("div",hs,[u(Ne,{to:"/mcp",class:"inline-flex items-center gap-1 text-xs text-gray-400 hover:text-primary transition-colors"},{default:B(()=>[u(A,{name:"i-lucide-bot",class:"size-3"}),t[34]||(t[34]=C(" Query this cluster from your AI agent via the MCP server ",-1))]),_:1})])])}}}),Rs=Object.assign(bs,{__name:"DiagnosisPanel"});export{Rs as _,ct as p,zs as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a2 as $,a3 as j,a5 as z,ao as y,aZ as S,r as V,aU as w,a_ as P,J as B,o,f as C,g as b,i as q,q as s,k as t,c as u,j as N,V as n,m as c,t as f,v as m,X as F,h,a8 as D,N as g,bn as K,bo as O}from"./C5TrTuWv.js";import{L as W}from"./D_y2VS8k.js";const E={slots:{root:"",wrapper:"",labelWrapper:"flex content-center items-center justify-between gap-1",label:"block font-medium text-default",container:"relative",description:"text-muted",error:"mt-2 text-error",hint:"text-muted",help:"mt-2 text-muted"},variants:{size:{xs:{root:"text-xs"},sm:{root:"text-xs"},md:{root:"text-sm"},lg:{root:"text-sm"},xl:{root:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},orientation:{vertical:{container:"mt-1"},horizontal:{root:"flex justify-between place-items-baseline gap-2"}}},defaultVariants:{size:"md"}},L=["id"],U=["id"],A=["id"],J=["id"],G={__name:"UFormField",props:{as:{type:null,required:!1},name:{type:String,required:!1},errorPattern:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},help:{type:String,required:!1},error:{type:[Boolean,String],required:!1,default:void 0},hint:{type:String,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},eagerValidation:{type:Boolean,required:!1},validateOnInputDelay:{type:Number,required:!1},orientation:{type:null,required:!1,default:"vertical"},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(x){const _=x,l=$(),e=j("formField",_),I=z(),a=h(()=>D({extend:E,...I.ui?.formField||{}})({size:e.size,required:e.required,orientation:e.orientation})),k=y(S,null),i=h(()=>e.error||k?.value?.find(r=>r.name===e.name||e.errorPattern&&r.name?.match(e.errorPattern))?.message),d=V(w()),p=d.value,v=y(P,void 0);return B(d,()=>{v&&e.name&&(v.value[e.name]={id:d.value,pattern:e.errorPattern})},{immediate:!0}),g(K,d),g(O,h(()=>({error:i.value,name:e.name,size:e.size,eagerValidation:e.eagerValidation,validateOnInputDelay:e.validateOnInputDelay,errorPattern:e.errorPattern,hint:e.hint,description:e.description,help:e.help,ariaId:p}))),(r,T)=>(o(),C(t(F),{as:t(e).as,"data-orientation":t(e).orientation,"data-slot":"root",class:s(a.value.root({class:[t(e).ui?.root,t(e).class]}))},{default:b(()=>[q("div",{"data-slot":"wrapper",class:s(a.value.wrapper({class:t(e).ui?.wrapper}))},[t(e).label||l.label?(o(),u("div",{key:0,"data-slot":"labelWrapper",class:s(a.value.labelWrapper({class:t(e).ui?.labelWrapper}))},[N(t(W),{for:d.value,"data-slot":"label",class:s(a.value.label({class:t(e).ui?.label}))},{default:b(()=>[n(r.$slots,"label",{label:t(e).label},()=>[c(f(t(e).label),1)])]),_:3},8,["for","class"]),t(e).hint||l.hint?(o(),u("span",{key:0,id:`${t(p)}-hint`,"data-slot":"hint",class:s(a.value.hint({class:t(e).ui?.hint}))},[n(r.$slots,"hint",{hint:t(e).hint},()=>[c(f(t(e).hint),1)])],10,L)):m("",!0)],2)):m("",!0),t(e).description||l.description?(o(),u("p",{key:1,id:`${t(p)}-description`,"data-slot":"description",class:s(a.value.description({class:t(e).ui?.description}))},[n(r.$slots,"description",{description:t(e).description},()=>[c(f(t(e).description),1)])],10,U)):m("",!0)],2),q("div",{class:s([(t(e).label||!!l.label||t(e).description||!!l.description)&&a.value.container({class:t(e).ui?.container})])},[n(r.$slots,"default",{error:i.value}),t(e).error!==!1&&(typeof i.value=="string"&&i.value||l.error)?(o(),u("div",{key:0,id:`${t(p)}-error`,"data-slot":"error",class:s(a.value.error({class:t(e).ui?.error}))},[n(r.$slots,"error",{error:i.value},()=>[c(f(i.value),1)])],10,A)):t(e).help||l.help?(o(),u("div",{key:1,id:`${t(p)}-help`,"data-slot":"help",class:s(a.value.help({class:t(e).ui?.help}))},[n(r.$slots,"help",{help:t(e).help},()=>[c(f(t(e).help),1)])],10,J)):m("",!0)],2)]),_:3},8,["as","data-orientation","class"]))}};export{G as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as c,o as n,c as o,F as l,y as m,f as p,g as f,m as _,t as u,k as t,v as g,A as d,_ as h}from"./C5TrTuWv.js";import{y,n as k}from"./DMtrFQqi.js";import{f as x}from"./D-c8ZSws.js";const R={key:0,class:"flex flex-wrap gap-1"},b=c({__name:"RunReports",props:{reports:{}},setup(a){const r=d();return(s,B)=>{const i=h;return a.reports?.length?(n(),o("div",R,[(n(!0),o(l,null,m(a.reports,e=>(n(),p(i,{key:`${e.type}-${e.path}`,href:t(k)(e.path,null,t(r).app?.baseURL),icon:("reportIcon"in s?s.reportIcon:t(y))(e.type),title:e.size?t(x)(e.size):e.label,target:"_blank",size:"xs",variant:"outline"},{default:f(()=>[_(u(e.label),1)]),_:2},1032,["href","icon","title"]))),128))])):g("",!0)}}}),I=Object.assign(b,{__name:"RunReports"});export{I as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as m,J as h,o as n,f as o,W as p,bY as g,bq as E,h as d,c as f,v as B,F as y,y as V}from"./C5TrTuWv.js";var k=m({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(i){const e=i,{primitiveElement:s,currentElement:l}=E(),t=d(()=>e.checked??e.value);return h(t,(r,a)=>{if(!l.value)return;const u=l.value,b=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(b,"value").set;if(v&&r!==a){const _=new Event("input",{bubbles:!0}),q=new Event("change",{bubbles:!0});v.call(u,r),u.dispatchEvent(_),u.dispatchEvent(q)}}),(r,a)=>(n(),o(g,p({ref_key:"primitiveElement",ref:s},{...e,...r.$attrs},{as:"input"}),null,16))}}),c=k,A=m({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(i){const e=i,s=d(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),l=d(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((t,r)=>typeof t=="object"?Object.entries(t).map(([a,u])=>({name:`${e.name}[${r}][${a}]`,value:u})):{name:`${e.name}[${r}]`,value:t}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([t,r])=>({name:`${e.name}[${t}]`,value:r})):[]);return(t,r)=>(n(),f(y,null,[B(" We render single input if it's required "),s.value?(n(),o(c,p({key:t.name},{...e,...t.$attrs},{name:t.name,value:t.value}),null,16,["name","value"])):(n(!0),f(y,{key:1},V(l.value,a=>(n(),o(c,p({key:a.name},{ref_for:!0},{...e,...t.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))],2112))}}),I=A;export{I as V};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aa as P,p as L}from"./C5TrTuWv.js";const y=43200,k=1440,C=Symbol.for("constructDateFrom");function x(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&C in e?e[C](t):e instanceof Date?new e.constructor(t):new Date(t)}function g(e,t){return x(e,e)}let _={};function A(){return _}function W(e){const t=g(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function D(e,...t){const n=x.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function w(e,t){const n=+g(e)-+g(t);return n<0?-1:n>0?1:n}function z(e){return x(e,Date.now())}function E(e,t,n){const[r,a]=D(n?.in,e,t),u=r.getFullYear()-a.getFullYear(),o=r.getMonth()-a.getMonth();return u*12+o}function $(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function j(e,t){return+g(e)-+g(t)}function R(e,t){const n=g(e);return n.setHours(23,59,59,999),n}function X(e,t){const n=g(e),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Y(e,t){const n=g(e);return+R(n)==+X(n)}function U(e,t,n){const[r,a,u]=D(n?.in,e,e,t),o=w(a,u),i=Math.abs(E(a,u));if(i<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-o*i);let l=w(a,u)===-o;Y(r)&&i===1&&w(r,u)===1&&(l=!1);const d=o*(i-+l);return d===0?0:d}function V(e,t,n){const r=j(e,t)/1e3;return $(n?.roundingMethod)(r)}const q={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},H=(e,t,n)=>{let r;const a=q[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function v(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const B={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},G={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Q={date:v({formats:B,defaultWidth:"full"}),time:v({formats:J,defaultWidth:"full"}),dateTime:v({formats:G,defaultWidth:"full"})},K={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Z=(e,t,n,r)=>K[e];function p(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):o;a=e.formattingValues[i]||e.formattingValues[o]}else{const o=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;a=e.values[i]||e.values[o]}const u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}const ee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},te={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ne={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},re={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ae={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},se={ordinalNumber:oe,era:p({values:ee,defaultWidth:"wide"}),quarter:p({values:te,defaultWidth:"wide",argumentCallback:e=>e-1}),month:p({values:ne,defaultWidth:"wide"}),day:p({values:re,defaultWidth:"wide"}),dayPeriod:p({values:ae,defaultWidth:"wide",formattingValues:ie,defaultFormattingWidth:"wide"})};function b(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],u=t.match(a);if(!u)return null;const o=u[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?ce(i,h=>h.test(o)):ue(i,h=>h.test(o));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(o.length);return{value:d,rest:f}}}function ue(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ce(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function le(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],u=t.match(e.parsePattern);if(!u)return null;let o=e.valueCallback?e.valueCallback(u[0]):u[0];o=n.valueCallback?n.valueCallback(o):o;const i=t.slice(a.length);return{value:o,rest:i}}}const de=/^(\d+)(th|st|nd|rd)?/i,fe=/\d+/i,he={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},me={any:[/^b/i,/^(a|c)/i]},ge={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pe={any:[/1/i,/2/i,/3/i,/4/i]},be={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ye={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},we={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Me={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ve={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},De={ordinalNumber:le({matchPattern:de,parsePattern:fe,valueCallback:e=>parseInt(e,10)}),era:b({matchPatterns:he,defaultMatchWidth:"wide",parsePatterns:me,defaultParseWidth:"any"}),quarter:b({matchPatterns:ge,defaultMatchWidth:"wide",parsePatterns:pe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:b({matchPatterns:be,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),day:b({matchPatterns:we,defaultMatchWidth:"wide",parsePatterns:Me,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:ve,defaultMatchWidth:"any",parsePatterns:xe,defaultParseWidth:"any"})},N={code:"en-US",formatDistance:H,formatLong:Q,formatRelative:Z,localize:se,match:De,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Se(e,t,n){const r=A(),a=n?.locale??r.locale??N,u=2520,o=w(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const i=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:o}),[l,d]=D(n?.in,...o>0?[t,e]:[e,t]),f=V(d,l),h=(W(d)-W(l))/1e3,c=Math.round((f-h)/60);let s;if(c<2)return n?.includeSeconds?f<5?a.formatDistance("lessThanXSeconds",5,i):f<10?a.formatDistance("lessThanXSeconds",10,i):f<20?a.formatDistance("lessThanXSeconds",20,i):f<40?a.formatDistance("halfAMinute",0,i):f<60?a.formatDistance("lessThanXMinutes",1,i):a.formatDistance("xMinutes",1,i):c===0?a.formatDistance("lessThanXMinutes",1,i):a.formatDistance("xMinutes",c,i);if(c<45)return a.formatDistance("xMinutes",c,i);if(c<90)return a.formatDistance("aboutXHours",1,i);if(c<k){const m=Math.round(c/60);return a.formatDistance("aboutXHours",m,i)}else{if(c<u)return a.formatDistance("xDays",1,i);if(c<y){const m=Math.round(c/k);return a.formatDistance("xDays",m,i)}else if(c<y*2)return s=Math.round(c/y),a.formatDistance("aboutXMonths",s,i)}if(s=U(d,l),s<12){const m=Math.round(c/y);return a.formatDistance("xMonths",m,i)}else{const m=s%12,M=Math.trunc(s/12);return m<3?a.formatDistance("aboutXYears",M,i):m<9?a.formatDistance("overXYears",M,i):a.formatDistance("almostXYears",M+1,i)}}function Pe(e,t){return Se(e,z(e),t)}const ke=["years","months","weeks","days","hours","minutes","seconds"];function Ce(e,t){const r=A().locale??N,a=ke,u=" ";return r.formatDistance?a.reduce((i,l)=>{const d=`x${l.replace(/(^.)/,h=>h.toUpperCase())}`,f=e[l];return f!==void 0&&e[l]?i.concat(r.formatDistance(d,f)):i},[]).join(u):""}const We="piwi:",O=["critical","high","medium","low"];new Set(O);function Le(e){return typeof e=="string"&&e.trim().toLowerCase().startsWith(We)}function _e(e){return O.includes(e)?e:void 0}function ze(e){return({column:t})=>{const n=t.getIsSorted();return P("button",{class:"flex items-center gap-1 font-semibold select-none cursor-pointer hover:text-highlighted transition-colors",onClick:()=>t.toggleSorting()},[e,P(L,{name:n==="asc"?"i-lucide-chevron-up":n==="desc"?"i-lucide-chevron-down":"i-lucide-chevrons-up-down",class:["shrink-0 size-3.5",!n&&"opacity-40"]})])}}function Ee(e,t={}){if(e==null||e==="")return"N/A";let n;if(e instanceof Date)n=e;else{const r=typeof e=="number"?e:Number(e);!Number.isNaN(r)&&String(e).trim()!==""?n=new Date(r<1e12?r*1e3:r):n=new Date(e)}return Number.isNaN(n.getTime())?"N/A":t.dateOnly?n.toLocaleDateString():n.toLocaleString()}function $e(e){return e?Pe(new Date(e),{addSuffix:!0}):"N/A"}function je(e){if(e==null)return"N/A";const t=Math.round(Math.abs(e));return t===0?"0 seconds":(e<0?"−":"")+Ce({seconds:t/1e3})}function Re(e){if(e==null)return null;const t=Math.round(Math.abs(e)),n=e<0?"−":"";if(t<1e3)return{value:n+t,unit:"ms"};const r=t/1e3;return r<60?{value:n+Math.round(r*10)/10,unit:"s"}:{value:n+Math.round(r/60*10)/10,unit:"m"}}function Xe(e){switch(e){case"html":return"i-lucide-layout-dashboard";case"monocart":return"i-lucide-bar-chart-2";case"blob":return"i-lucide-download";default:return"i-lucide-file-text"}}function Ye(e){if(!e)return"i-lucide-globe";const t=e.toLowerCase();return t.includes("chrome")||t.includes("chromium")?"i-simple-icons-googlechrome":t.includes("firefox")?"i-simple-icons-firefoxbrowser":t.includes("safari")||t.includes("webkit")?"i-simple-icons-safari":t.includes("edge")?"i-simple-icons-microsoftedge":"i-lucide-globe"}function Ue(e){if(!e)return"#6b7280";const t=e.toLowerCase();return t.includes("chrome")||t.includes("chromium")?"#4285F4":t.includes("firefox")?"#FF7139":t.includes("safari")||t.includes("webkit")?"#007AFF":t.includes("edge")?"#0078D7":"#6b7280"}function Te(e){switch(e){case"passed":return"success";case"failed":return"error";case"timedout":return"warning";case"timedOut":return"warning";case"interrupted":return"warning";case"cancelled":return"neutral";case"initialising":return"info";case"running":return"info";case"finalizing":return"info";default:return"neutral"}}function S(e){return e==="timedOut"?"timedout":e}function Ve(e){switch(S(e)){case"passed":return"i-lucide-check-circle-2";case"failed":case"timedout":return"i-lucide-x-circle";case"didnotrun":return"i-lucide-circle-slash";case"running":case"initialising":case"finalizing":return"i-lucide-loader-circle";default:return"i-lucide-minus-circle"}}function qe(e){switch(S(e)){case"passed":return"text-emerald-600 dark:text-emerald-400";case"failed":case"timedout":return"text-rose-600 dark:text-rose-400";case"didnotrun":return"text-amber-600 dark:text-amber-400";case"running":case"initialising":case"finalizing":return"text-blue-600 dark:text-blue-400";default:return"text-zinc-400 dark:text-zinc-500"}}function He(e){const t=S(e);return t==="running"||t==="initialising"||t==="finalizing"}function Be(e){return e==="timedOut"||e==="timedout"?"failed":e==="didnotrun"?"didn't run":e==="never-run"?"never run":e}function Je(e){return e&&{open:"warning",resolved:"success",ignored:"neutral"}[e]||"neutral"}function Ge(e){switch(e){case"diagnosis-verified":return{label:"Fix verified",color:"success",icon:"i-lucide-badge-check",hint:"The tests went green and the change touched the files the diagnosis named."};case"stopped-failing":return{label:"Stopped failing",color:"info",icon:"i-lucide-check",hint:"The tests went green. Nothing corroborates which change did it."};case"regressed":return{label:"Regressed",color:"error",icon:"i-lucide-undo-2",hint:"A fix was recorded for this cluster and it did not hold — the failure came back."};default:return null}}function Qe(e){return e&&{timeout:"warning",assertion:"error","strict-mode":"info",navigation:"secondary",crash:"error",unknown:"neutral"}[e]||"neutral"}const T=["#ef4444","#f97316","#f59e0b","#84cc16","#10b981","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#d946ef","#ec4899"];function Ke(){return T[Math.floor(Math.random()*T.length)]}function I(e){return!e.startsWith(".")&&!e.startsWith("/")?e:e.replace(".data/storage/","")}function Ze(e,t,n="/",r=!1){const a=(n||"/").replace(/\/$/,""),u=new URLSearchParams,o=/\.[a-z0-9]+$/i.test(e);t&&!o&&u.set("contentType",t),r&&u.set("compress","1");const i=u.toString();return`${a}/api/files/${I(e)}${i?`?${i}`:""}`}function et(e,t="/",n=!1){const r=(t||"/").replace(/\/$/,""),o=`${typeof location>"u"?"":location.origin}${r}/${n?"":"api/files/"}${I(e)}`;return`${r}/trace-viewer/?trace=${encodeURIComponent(o)}`}function tt(e,t="Unknown error"){if(e&&typeof e=="object"){const n=e;return n.data?.message??n.message??t}return t}function nt(e,t){const n=t.trim().toLowerCase();return n?e.filter(r=>r.message.toLowerCase().includes(n)||r.author.toLowerCase().includes(n)||r.sha.includes(n)||r.shortSha.includes(n)):e}function rt(e){switch(e){case"added":return{icon:"i-lucide-file-plus",color:"text-green-500",badgeColor:"success"};case"removed":return{icon:"i-lucide-file-minus",color:"text-red-500",badgeColor:"error"};case"renamed":return{icon:"i-lucide-file-symlink",color:"text-blue-500",badgeColor:"info"};default:return{icon:"i-lucide-file-pen-line",color:"text-gray-400",badgeColor:"neutral"}}}const at={add:"bg-green-50 dark:bg-green-950/30 text-green-800 dark:text-green-300",remove:"bg-red-50 dark:bg-red-950/30 text-red-800 dark:text-red-300",hunk:"bg-blue-50 dark:bg-blue-950/20 text-blue-500 dark:text-blue-400",context:"text-gray-600 dark:text-gray-400"};function it(e){return e.split(`
|
|
2
|
-
`).map(t=>t.startsWith("+")&&!t.startsWith("+++")?{type:"add",text:t}:t.startsWith("-")&&!t.startsWith("---")?{type:"remove",text:t}:t.startsWith("@@")?{type:"hunk",text:t}:{type:"context",text:t})}const Fe="\x1B",Ae={30:"#000000",31:"#dc2626",32:"#16a34a",33:"#d97706",34:"#2563eb",35:"#9333ea",36:"#0891b2",37:"#9ca3af"},Ne={40:"#000000",41:"#dc2626",42:"#16a34a",43:"#d97706",44:"#2563eb",45:"#9333ea",46:"#0891b2",47:"#9ca3af"},F=new RegExp(`${Fe}\\[([0-9;]*)m`,"g");function Oe(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function ot(e){const t=[];let n=0,r,a,u=!1,o=!1,i=!1,l=!1;const d=c=>{if(!c)return;const s=[];u&&s.push("font-weight:600"),o&&s.push("opacity:.7"),i&&s.push("font-style:italic"),l&&s.push("text-decoration:underline"),r&&s.push(`color:${r}`),a&&s.push(`background:${a}`);const m=Oe(c);t.push(s.length?`<span style="${s.join(";")}">${m}</span>`:m)},f=c=>{for(const s of c)s===0?(r=void 0,a=void 0,u=!1,o=!1,i=!1,l=!1):s===1?u=!0:s===2?o=!0:s===3?i=!0:s===4?l=!0:s===22?(u=!1,o=!1):s===23?i=!1:s===24?l=!1:s>=30&&s<=37?r=Ae[s]:s===39?r=void 0:s>=40&&s<=47?a=Ne[s]:s===49&&(a=void 0)};let h;for(;(h=F.exec(e))!==null;){d(e.slice(n,h.index)),n=F.lastIndex;const c=h[1]?h[1].split(";").map(Number):[0];f(c)}return d(e.slice(n)),t.join("")}function st(e,t=120){if(!e)return"";const n=e.replace(/\n/g," · ");return n.length<=t?n:n.slice(0,t)+"…"}function ut(e){return e.totalTests>0?Math.round(e.passedTests/e.totalTests*100):0}function ct(e){return e==="flaky"?"warning":e==="never-run"?"neutral":e==="didnotrun"?"warning":Te(e)}function lt(e){switch(e.toUpperCase()){case"GET":return"info";case"POST":return"success";case"DELETE":return"error";case"PUT":case"PATCH":return"warning";default:return"neutral"}}function dt(e){return!e||e<=0?"neutral":e>=500?"error":e>=400?"warning":"success"}export{Ve as A,He as B,Ye as C,Ue as D,Ke as E,ut as F,Re as G,je as a,Je as b,Qe as c,Ge as d,tt as e,$e as f,nt as g,st as h,ze as i,Te as j,Be as k,ct as l,Le as m,Ze as n,lt as o,Ee as p,dt as q,ot as r,rt as s,_e as t,at as u,it as v,et as w,I as x,Xe as y,qe as z};
|