@piwitests/server 0.15.0 → 0.16.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/{DzbOHjZH.js → -KQO1A4C.js} +1 -1
- package/.output/public/_nuxt/{BEKwVcvQ.js → 1AB111xL.js} +1 -1
- package/.output/public/_nuxt/{CokbKVE6.js → 2xvsvjLO.js} +1 -1
- package/.output/public/_nuxt/{CNzoIhwN.js → ABGJk0pu.js} +1 -1
- package/.output/public/_nuxt/{Cgr8IKY4.js → B2lYFco4.js} +1 -1
- package/.output/public/_nuxt/B33X4zrC.js +1 -0
- package/.output/public/_nuxt/{V1BQiRoh.js → B3NbDoBP.js} +1 -1
- package/.output/public/_nuxt/{ChWPXucC.js → B3sNtVnf.js} +1 -1
- package/.output/public/_nuxt/{too3WhRB.js → B43OGXzV.js} +1 -1
- package/.output/public/_nuxt/{Cf3RuiXF.js → B6Jp7fpa.js} +4 -4
- package/.output/public/_nuxt/{B32ySRXg.js → B7yG1G_l.js} +1 -1
- package/.output/public/_nuxt/{BgR7oL4p.js → BBdfPriC.js} +1 -1
- package/.output/public/_nuxt/{DNP5tTJo.js → BGYbnqA7.js} +1 -1
- package/.output/public/_nuxt/{DAeYEeCC.js → BIf1R_fu.js} +1 -1
- package/.output/public/_nuxt/{nUsJV5qo.js → BIksQZfR.js} +1 -1
- package/.output/public/_nuxt/{B8fs6GU9.js → BPKwYP2Q.js} +31 -31
- package/.output/public/_nuxt/{DjCfCT_5.js → BP_SWi7S.js} +1 -1
- package/.output/public/_nuxt/{CrFCPOnY.js → BQrSEuzu.js} +1 -1
- package/.output/public/_nuxt/{BpepjHwc.js → BR9H8k-L.js} +1 -1
- package/.output/public/_nuxt/{Dejf0f7D.js → BRKa6EQR.js} +3 -3
- package/.output/public/_nuxt/{BMQIO38j.js → BS0gKVuF.js} +1 -1
- package/.output/public/_nuxt/{BW1UOxWn.js → BV83yObd.js} +1 -1
- package/.output/public/_nuxt/{o5WQ5Z7k.js → BVW5qIDP.js} +1 -1
- package/.output/public/_nuxt/{rvaZFYoE.js → BY4oA2IH.js} +1 -1
- package/.output/public/_nuxt/{DZoSxwj6.js → BZekCf_x.js} +1 -1
- package/.output/public/_nuxt/{lRMjXqiA.js → Bb64FEFL.js} +1 -1
- package/.output/public/_nuxt/{2PU-adwy.js → BdFEUAlx.js} +1 -1
- package/.output/public/_nuxt/{CBrCcDzR.js → Bf62wdzp.js} +1 -1
- package/.output/public/_nuxt/{DYDGGqZ3.js → BkDfdHFm.js} +1 -1
- package/.output/public/_nuxt/{CqA3gM8h.js → BoRFLTAO.js} +1 -1
- package/.output/public/_nuxt/{DxXZN6ed.js → BpIsBP5g.js} +1 -1
- package/.output/public/_nuxt/{DkFbpSsi.js → BpNqHxg2.js} +1 -1
- package/.output/public/_nuxt/{DFw8I2FL.js → BpceIssd.js} +1 -1
- package/.output/public/_nuxt/{n7Htv9PJ.js → Br2K9yi_.js} +1 -1
- package/.output/public/_nuxt/{D4nLD93c.js → BuZOa2M3.js} +1 -1
- package/.output/public/_nuxt/{B32-7cBF.js → Bvfmwzgw.js} +1 -1
- package/.output/public/_nuxt/{h-e-Ca3f.js → Bzl2H_vl.js} +1 -1
- package/.output/public/_nuxt/{IdQR_Djw.js → C1K3r_fc.js} +1 -1
- package/.output/public/_nuxt/C219JuBV.js +1 -0
- package/.output/public/_nuxt/{B_80i5Ge.js → C38aZbFJ.js} +1 -1
- package/.output/public/_nuxt/{DHVmXA9K.js → C3r_Sv1p.js} +1 -1
- package/.output/public/_nuxt/{O1A-LRgV.js → C8RBRg7I.js} +1 -1
- package/.output/public/_nuxt/{60-Zii7v.js → CCRRqXez.js} +1 -1
- package/.output/public/_nuxt/{__m3KqHO.js → CJFqA_QW.js} +1 -1
- package/.output/public/_nuxt/{Surk4Lw-.js → CKB_doYB.js} +1 -1
- package/.output/public/_nuxt/{DaKVSp-6.js → CMYQpoOI.js} +1 -1
- package/.output/public/_nuxt/CQeMb57w.js +1 -0
- package/.output/public/_nuxt/{Bq2ZPvIH.js → CSYJwpXG.js} +1 -1
- package/.output/public/_nuxt/{ETOCcsVw.js → CTdvGdc2.js} +1 -1
- package/.output/public/_nuxt/CX1dcT4v.js +1 -0
- package/.output/public/_nuxt/{evCxpgbd.js → CdME81ij.js} +2 -2
- package/.output/public/_nuxt/{DKTDub7I.js → CgoAUz76.js} +1 -1
- package/.output/public/_nuxt/{0KrkW531.js → CoHGrO41.js} +1 -1
- package/.output/public/_nuxt/{BGsuOpiq.js → CpO-ABDW.js} +1 -1
- package/.output/public/_nuxt/CuYYdFBL.js +1 -0
- package/.output/public/_nuxt/{CHMpVLqo.js → D2jhe9JK.js} +1 -1
- package/.output/public/_nuxt/{C7RarFGi.js → D33On6AX.js} +1 -1
- package/.output/public/_nuxt/{Dv2B_nw_.js → D4VpoHDP.js} +1 -1
- package/.output/public/_nuxt/{CKZn0TUX.js → DAWn6Z7h.js} +1 -1
- package/.output/public/_nuxt/{rWwWS3Kj.js → DCpmQ47_.js} +1 -1
- package/.output/public/_nuxt/{B59-l1Cv.js → DIkLLyR6.js} +1 -1
- package/.output/public/_nuxt/{CFn3w5jn.js → DJS3Bf50.js} +1 -1
- package/.output/public/_nuxt/{F07TcX0U.js → DL20rwkA.js} +1 -1
- package/.output/public/_nuxt/DOuoR2Pk.js +34 -0
- package/.output/public/_nuxt/{BC_Wu-fv.js → DRtTLQri.js} +1 -1
- package/.output/public/_nuxt/{DiUGa0CT.js → DbeHHTk-.js} +1 -1
- package/.output/public/_nuxt/DcCNnjKl.js +1 -0
- package/.output/public/_nuxt/{PPFO8UVt.js → DdbrJwT-.js} +1 -1
- package/.output/public/_nuxt/{Cfk2_UCm.js → DfcAIbcX.js} +1 -1
- package/.output/public/_nuxt/{OG2n3p77.js → DgYM3eyi.js} +1 -1
- package/.output/public/_nuxt/{BBJ9Pu3M.js → DhA17dqR.js} +1 -1
- package/.output/public/_nuxt/{DvdOsTLb.js → DjZKuUMz.js} +1 -1
- package/.output/public/_nuxt/{DCCMLWel.js → DqnyWaSQ.js} +1 -1
- package/.output/public/_nuxt/Dsk4Ic18.js +7 -0
- package/.output/public/_nuxt/{BCK4f6Y3.js → DszOHBMG.js} +1 -1
- package/.output/public/_nuxt/{Cpquifvd.js → DuBBqqbF.js} +1 -1
- package/.output/public/_nuxt/{DWzdeQ3Z.js → DuMv-ugy.js} +1 -1
- package/.output/public/_nuxt/{BfshMo9k.js → Dz55UR7w.js} +2 -2
- package/.output/public/_nuxt/{BkhdAGx0.js → Dzz9_Z0u.js} +1 -1
- package/.output/public/_nuxt/{DgZlpN9l.js → HoKG9cc2.js} +1 -1
- package/.output/public/_nuxt/{C9jjVEQU.js → IFqRT_xJ.js} +1 -1
- package/.output/public/_nuxt/{i38YGG9S.js → JCFZINev.js} +1 -1
- package/.output/public/_nuxt/{B9Q_4Mjt.js → Kc7La4sL.js} +1 -1
- package/.output/public/_nuxt/N3pCB6-m.js +4 -0
- package/.output/public/_nuxt/{CFXonrwQ.js → WctJXszi.js} +1 -1
- package/.output/public/_nuxt/{CHgsEM4U.js → bAfTAihV.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/5182c9fb-56a6-4df2-9685-4020a08ce7a5.json +1 -0
- package/.output/public/_nuxt/{4fB15L_7.js → d5ZB3uxF.js} +1 -1
- package/.output/public/_nuxt/{CIOQo6gB.js → e1zUTrBb.js} +1 -1
- package/.output/public/_nuxt/entry.BsmKRJzR.css +1 -0
- package/.output/public/_nuxt/{BtJkQ3to.js → iwD5atI2.js} +1 -1
- package/.output/public/_nuxt/jIF87ALb.js +1 -0
- package/.output/public/_nuxt/{CvCF77E-.js → k-z_VVTK.js} +2 -2
- package/.output/public/_nuxt/{CHSkT2s0.js → l0gdGdar.js} +1 -1
- package/.output/public/_nuxt/{DVdOm5Bg.js → mGJLLqyN.js} +1 -1
- package/.output/public/_nuxt/{CU-OXXdh.js → mfzslNx_.js} +1 -1
- package/.output/public/_nuxt/{CD-xwM9N.js → nCjfWTGm.js} +1 -1
- package/.output/public/_nuxt/{DQpa8F03.js → oNq5pd3r.js} +1 -1
- package/.output/public/_nuxt/qzAP_nm7.js +1 -0
- package/.output/public/_nuxt/{3SnTawZW.js → r3SBLxtE.js} +1 -1
- package/.output/public/_nuxt/{DI_-kFec.js → uKeO2H7F.js} +1 -1
- package/.output/public/_nuxt/{DZLrAp2i.js → xUrLy-Zn.js} +1 -1
- package/.output/public/_nuxt/{BY0AkhJh.js → ze9-Ill2.js} +1 -1
- package/.output/public/demo/seed.version.json +2 -2
- package/.output/public/sw.js +1 -1
- package/.output/server/chunks/_/markers.mjs +1 -1
- package/.output/server/chunks/_/users.mjs +1 -1
- package/.output/server/chunks/build/{BrowserBadge-BTA4QU_J.mjs → BrowserBadge-DNCp9pF-.mjs} +3 -3
- package/.output/server/chunks/build/BrowserBadge-DNCp9pF-.mjs.map +1 -0
- package/.output/server/chunks/build/{ChartCard-BqAhMip2.mjs → ChartCard-Fr557IbV.mjs} +2 -2
- package/.output/server/chunks/build/ChartCard-Fr557IbV.mjs.map +1 -0
- package/.output/server/chunks/build/{Checkbox-_1nGm_DR.mjs → Checkbox-7ZiMz60w.mjs} +5 -5
- package/.output/server/chunks/build/Checkbox-7ZiMz60w.mjs.map +1 -0
- package/.output/server/chunks/build/{CiEnvCard-DAufYuJw.mjs → CiEnvCard-DNxBVvx4.mjs} +5 -5
- package/.output/server/chunks/build/CiEnvCard-DNxBVvx4.mjs.map +1 -0
- package/.output/server/chunks/build/{CodeBlock-BVKHuYjU.mjs → CodeBlock-BGwNmJ8J.mjs} +2 -2
- package/.output/server/chunks/build/CodeBlock-BGwNmJ8J.mjs.map +1 -0
- package/.output/server/chunks/build/{DashboardNavbar-BR6j4VLd.mjs → DashboardNavbar-Bdp-OwTN.mjs} +2 -2
- package/.output/server/chunks/build/DashboardNavbar-Bdp-OwTN.mjs.map +1 -0
- package/.output/server/chunks/build/DashboardSidebarToggle-Ji6ADuqF.mjs +1 -1
- package/.output/server/chunks/build/{DiagnosisPanel-BnrdXDvd.mjs → DiagnosisPanel-DV1xwGu4.mjs} +6 -6
- package/.output/server/chunks/build/DiagnosisPanel-DV1xwGu4.mjs.map +1 -0
- package/.output/server/chunks/build/EntityLinks-DeOP13Kr.mjs +1 -1
- package/.output/server/chunks/build/{EnvManagedBadge-DdnEtjIl.mjs → EnvManagedBadge-Qpn58Nmr.mjs} +5 -5
- package/.output/server/chunks/build/EnvManagedBadge-Qpn58Nmr.mjs.map +1 -0
- package/.output/server/chunks/build/{HelpHint-D_GJzMpW.mjs → HelpHint-YEMWtKu1.mjs} +18 -2
- package/.output/server/chunks/build/HelpHint-YEMWtKu1.mjs.map +1 -0
- package/.output/server/chunks/build/{Modal-COIjm3js.mjs → Modal-CfA78Hm1.mjs} +2 -2
- package/.output/server/chunks/build/Modal-CfA78Hm1.mjs.map +1 -0
- package/.output/server/chunks/build/{OpenInIdeLink-D97W6On1.mjs → OpenInIdeLink-B92wosXu.mjs} +3 -3
- package/.output/server/chunks/build/{OpenInIdeLink-D97W6On1.mjs.map → OpenInIdeLink-B92wosXu.mjs.map} +1 -1
- package/.output/server/chunks/build/{PageStateCard-C1HFN4Nv.mjs → PageStateCard-Bwee6JTk.mjs} +10 -10
- package/.output/server/chunks/build/{PageStateCard-C1HFN4Nv.mjs.map → PageStateCard-Bwee6JTk.mjs.map} +1 -1
- package/.output/server/chunks/build/{ProjectTestCasesTable-XFBPQGIX.mjs → ProjectTestCasesTable-9418EI8J.mjs} +9 -9
- package/.output/server/chunks/build/ProjectTestCasesTable-9418EI8J.mjs.map +1 -0
- package/.output/server/chunks/build/{RunReports-ChNkmuWa.mjs → RunReports-BpJqLHY9.mjs} +2 -2
- package/.output/server/chunks/build/RunReports-BpJqLHY9.mjs.map +1 -0
- package/.output/server/chunks/build/{RunStatusBadge-CXpuCUGQ.mjs → RunStatusBadge-BhmJ_RKM.mjs} +2 -2
- package/.output/server/chunks/build/RunStatusBadge-BhmJ_RKM.mjs.map +1 -0
- package/.output/server/chunks/build/{SectionCard-zs9FDzps.mjs → SectionCard-COd9TuDq.mjs} +2 -2
- package/.output/server/chunks/build/SectionCard-COd9TuDq.mjs.map +1 -0
- package/.output/server/chunks/build/{Select-r3S5nkSY.mjs → Select-COwTIQlV.mjs} +3 -3
- package/.output/server/chunks/build/Select-COwTIQlV.mjs.map +1 -0
- package/.output/server/chunks/build/{SelectMenu-Dk6f8i9o.mjs → SelectMenu-BkyAHFCM.mjs} +4 -4
- package/.output/server/chunks/build/{SelectMenu-Dk6f8i9o.mjs.map → SelectMenu-BkyAHFCM.mjs.map} +1 -1
- package/.output/server/chunks/build/{Separator-pqpPG0up.mjs → Separator-CxZdx8kw.mjs} +2 -2
- package/.output/server/chunks/build/Separator-CxZdx8kw.mjs.map +1 -0
- package/.output/server/chunks/build/{SettingsField-Wdpzlt13.mjs → SettingsField-DDD4oqys.mjs} +5 -5
- package/.output/server/chunks/build/SettingsField-DDD4oqys.mjs.map +1 -0
- package/.output/server/chunks/build/{Slideover-02XjJjn0.mjs → Slideover-B95Rj237.mjs} +3 -3
- package/.output/server/chunks/build/Slideover-B95Rj237.mjs.map +1 -0
- package/.output/server/chunks/build/{Switch-gx_JXgCo.mjs → Switch-htSKgC38.mjs} +2 -2
- package/.output/server/chunks/build/Switch-htSKgC38.mjs.map +1 -0
- package/.output/server/chunks/build/{Table-C64RrBp3.mjs → Table-CPhhVzDv.mjs} +3 -3
- package/.output/server/chunks/build/Table-CPhhVzDv.mjs.map +1 -0
- package/.output/server/chunks/build/{TestStatusBar--u4VX_Xf.mjs → TestStatusBar-CEzt76wk.mjs} +2 -2
- package/.output/server/chunks/build/TestStatusBar-CEzt76wk.mjs.map +1 -0
- package/.output/server/chunks/build/{Tooltip-ui_BVvqr.mjs → Tooltip-7vwuDPrZ.mjs} +3 -3
- package/.output/server/chunks/build/Tooltip-7vwuDPrZ.mjs.map +1 -0
- package/.output/server/chunks/build/{VisuallyHiddenInput-mMsqmkjz.mjs → VisuallyHiddenInput-C9eJVpPW.mjs} +2 -2
- package/.output/server/chunks/build/VisuallyHiddenInput-C9eJVpPW.mjs.map +1 -0
- package/.output/server/chunks/build/{_id_-CFVnSs8B.mjs → _id_-BDqvTM9D.mjs} +19 -18
- package/.output/server/chunks/build/{_id_-CFVnSs8B.mjs.map → _id_-BDqvTM9D.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-pkxJKe17.mjs → _id_-CE0Gso6i.mjs} +11 -11
- package/.output/server/chunks/build/_id_-CE0Gso6i.mjs.map +1 -0
- package/.output/server/chunks/build/{_id_-R6KGfZOC.mjs → _id_-CnwAyvvS.mjs} +257 -84
- package/.output/server/chunks/build/_id_-CnwAyvvS.mjs.map +1 -0
- package/.output/server/chunks/build/{_id_-DXJQABO8.mjs → _id_-Dy67M9Dj.mjs} +25 -25
- package/.output/server/chunks/build/{_id_-DXJQABO8.mjs.map → _id_-Dy67M9Dj.mjs.map} +1 -1
- package/.output/server/chunks/build/{about-CmtGYbC6.mjs → about-FB9PYAHK.mjs} +5 -5
- package/.output/server/chunks/build/about-FB9PYAHK.mjs.map +1 -0
- package/.output/server/chunks/build/{account-AbLuwiZP.mjs → account-Cn-eZqXM.mjs} +4 -4
- package/.output/server/chunks/build/account-Cn-eZqXM.mjs.map +1 -0
- package/.output/server/chunks/build/{ai-DR_slopS.mjs → ai-V3YOh3yx.mjs} +17 -17
- package/.output/server/chunks/build/ai-V3YOh3yx.mjs.map +1 -0
- package/.output/server/chunks/build/{analytics-BbT2-Tr-.mjs → analytics-BBlAEmj5.mjs} +235 -64
- package/.output/server/chunks/build/analytics-BBlAEmj5.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/{db.client-DlA_u5y9.mjs → db.client-aHcD0wyX.mjs} +47 -22
- package/.output/server/chunks/build/db.client-aHcD0wyX.mjs.map +1 -0
- package/.output/server/chunks/build/{default-D6diRCW0.mjs → default-BfMirIgG.mjs} +17 -16
- package/.output/server/chunks/build/default-BfMirIgG.mjs.map +1 -0
- package/.output/server/chunks/build/{docs-DbYoZafk.mjs → docs-DtNcJCyb.mjs} +5 -5
- package/.output/server/chunks/build/{docs-DbYoZafk.mjs.map → docs-DtNcJCyb.mjs.map} +1 -1
- package/.output/server/chunks/build/{edit-CNV4xdYj.mjs → edit-Dsf11mL5.mjs} +8 -8
- package/.output/server/chunks/build/edit-Dsf11mL5.mjs.map +1 -0
- package/.output/server/chunks/build/fetch-8kznMtBM.mjs +1 -1
- package/.output/server/chunks/build/{help-content-BMumoQQF.mjs → help-content-DmFnuhNu.mjs} +6 -1
- package/.output/server/chunks/build/help-content-DmFnuhNu.mjs.map +1 -0
- package/.output/server/chunks/build/{index-Dw526KXV.mjs → index-BR9hw6qk.mjs} +10 -10
- package/.output/server/chunks/build/index-BR9hw6qk.mjs.map +1 -0
- package/.output/server/chunks/build/{index-dwYB76GO.mjs → index-Ba-Fifra.mjs} +4 -4
- package/.output/server/chunks/build/index-Ba-Fifra.mjs.map +1 -0
- package/.output/server/chunks/build/{index-rSHkKNna.mjs → index-BgpEKTSq.mjs} +505 -84
- package/.output/server/chunks/build/index-BgpEKTSq.mjs.map +1 -0
- package/.output/server/chunks/build/{index-DmHBPf7T.mjs → index-CULN3-en.mjs} +11 -2
- package/.output/server/chunks/build/index-CULN3-en.mjs.map +1 -0
- package/.output/server/chunks/build/{index-C3Ou18qD.mjs → index-DzEgjHlB.mjs} +14 -14
- package/.output/server/chunks/build/{index-C3Ou18qD.mjs.map → index-DzEgjHlB.mjs.map} +1 -1
- package/.output/server/chunks/build/{isValueEqualOrExist-DTJ5ejZs.mjs → isValueEqualOrExist-DBZjbD_3.mjs} +3 -3
- package/.output/server/chunks/build/isValueEqualOrExist-DBZjbD_3.mjs.map +1 -0
- package/.output/server/chunks/build/{login-Da5C8jP2.mjs → login-D2XZDuek.mjs} +3 -3
- package/.output/server/chunks/build/login-D2XZDuek.mjs.map +1 -0
- package/.output/server/chunks/build/{mcp-DM1t-9L_.mjs → mcp-CXwa3xU3.mjs} +8 -8
- package/.output/server/chunks/build/mcp-CXwa3xU3.mjs.map +1 -0
- package/.output/server/chunks/build/{notifications-BTPF0xA7.mjs → notifications-hJj8tbAT.mjs} +11 -11
- package/.output/server/chunks/build/notifications-hJj8tbAT.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +37 -28
- package/.output/server/chunks/build/{settings-Bmw_JdBS.mjs → settings-Ci_7EXYQ.mjs} +8 -7
- package/.output/server/chunks/build/settings-Ci_7EXYQ.mjs.map +1 -0
- package/.output/server/chunks/build/{settings-metadata-CksLgMun.mjs → settings-metadata-Cp0dx0vm.mjs} +12 -3
- package/.output/server/chunks/build/settings-metadata-Cp0dx0vm.mjs.map +1 -0
- package/.output/server/chunks/build/{storage-BqR4acgi.mjs → storage-CM-Pd-9E.mjs} +191 -14
- package/.output/server/chunks/build/storage-CM-Pd-9E.mjs.map +1 -0
- package/.output/server/chunks/build/{tags-miPAzIr3.mjs → tags-DrCQ7QSw.mjs} +6 -6
- package/.output/server/chunks/build/tags-DrCQ7QSw.mjs.map +1 -0
- package/.output/server/chunks/build/{test-cases-D-LqhLpk.mjs → test-cases-DkGQB027.mjs} +14 -14
- package/.output/server/chunks/build/test-cases-DkGQB027.mjs.map +1 -0
- package/.output/server/chunks/build/timeout-hygiene-CNs71Iah.mjs +318 -0
- package/.output/server/chunks/build/timeout-hygiene-CNs71Iah.mjs.map +1 -0
- package/.output/server/chunks/build/{useAiStatus-FwqbA4gz.mjs → useAiStatus-ZO987RY7.mjs} +8 -7
- package/.output/server/chunks/build/useAiStatus-ZO987RY7.mjs.map +1 -0
- package/.output/server/chunks/build/{useSettingsNav-v_dFuTw9.mjs → useSettingsNav-D2knPCqF.mjs} +6 -6
- package/.output/server/chunks/build/useSettingsNav-D2knPCqF.mjs.map +1 -0
- package/.output/server/chunks/build/{users-D-GDKZmZ.mjs → users-NmAUZs3i.mjs} +6 -6
- package/.output/server/chunks/build/users-NmAUZs3i.mjs.map +1 -0
- package/.output/server/chunks/build/{virtualizer-BcC1XuFf.mjs → virtualizer-0-UBy7xl.mjs} +4 -4
- package/.output/server/chunks/build/virtualizer-0-UBy7xl.mjs.map +1 -0
- package/.output/server/chunks/build/{wasted-time-CFmeT_e2.mjs → wasted-time-L4kBV5Nh.mjs} +8 -8
- package/.output/server/chunks/build/wasted-time-L4kBV5Nh.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +949 -684
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/__piwi/session.get.mjs +51 -0
- package/.output/server/chunks/routes/__piwi/session.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/admin/stats.get.mjs +5 -1
- package/.output/server/chunks/routes/api/admin/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs +75 -6
- package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/auth/change-password.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/forgot-password.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/login.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/logout.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/me.get.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/oauth/_provider/callback.get.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/oauth/_provider/login.get.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/oauth/_provider/unlink.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/reset-password.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/send-verify-email.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/setup.get.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/setup.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/verify-email.get.mjs +1 -1
- package/.output/server/chunks/routes/api/channels/_id/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/channels/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/approve.post.mjs +1 -1
- package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/reject.post.mjs +1 -1
- package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs +45 -0
- package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/files/_...path_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get2.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post6.mjs +1 -1
- package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs +1 -1
- package/.output/server/chunks/routes/api/links/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/links/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/markers/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/markers/_id_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/notifications/stream.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/members.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/members.put.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs +50 -0
- package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/projects/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_id_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/menu.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/overview.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects.get.mjs +1 -1
- package/.output/server/chunks/routes/api/search.get.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/ai/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/ai.get.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/ai.put.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/smtp/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/smtp.get.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs +40 -0
- package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs +46 -0
- package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs.map +1 -0
- package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs +1 -1
- package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs +1 -1
- package/.output/server/chunks/routes/api/stream.get.mjs +1 -1
- package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/tags/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/tags/_id_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/recent.get.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/setup.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/start.post.mjs +1 -1
- package/.output/server/chunks/routes/api/test-runs/submit.post.mjs +3 -1
- package/.output/server/chunks/routes/api/test-runs/submit.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/test-runs/upload.post.mjs +2 -1
- package/.output/server/chunks/routes/api/test-runs/upload.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/traces/check.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id/api-keys/_keyId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id/invite.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id/projects.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id/projects.put.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/version.get.mjs +1 -1
- package/.output/server/chunks/routes/mcp.post.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/database/migrations/0037_tired_hellion.sql +1 -0
- package/.output/server/database/migrations/0038_glamorous_ulik.sql +1 -0
- package/.output/server/database/migrations/meta/0037_snapshot.json +3384 -0
- package/.output/server/database/migrations/meta/0038_snapshot.json +3391 -0
- package/.output/server/database/migrations/meta/_journal.json +14 -0
- package/.output/server/database/migrations-pg/0038_tranquil_moira_mactaggert.sql +1 -0
- package/.output/server/database/migrations-pg/0039_fat_starjammers.sql +1 -0
- package/.output/server/database/migrations-pg/meta/0038_snapshot.json +4027 -0
- package/.output/server/database/migrations-pg/meta/0039_snapshot.json +4033 -0
- package/.output/server/database/migrations-pg/meta/_journal.json +14 -0
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/2kfkdDTz.js +0 -1
- package/.output/public/_nuxt/BXEDsEwG.js +0 -1
- package/.output/public/_nuxt/BbgBGuMG.js +0 -1
- package/.output/public/_nuxt/CJGJI2Of.js +0 -34
- package/.output/public/_nuxt/Ce4EdfL_.js +0 -4
- package/.output/public/_nuxt/CkpB9oBr.js +0 -1
- package/.output/public/_nuxt/D1tZEdSi.js +0 -1
- package/.output/public/_nuxt/DK9uMTYX.js +0 -1
- package/.output/public/_nuxt/YDWXnWou.js +0 -1
- package/.output/public/_nuxt/builds/meta/f549de31-8db6-4504-b526-482778a55eba.json +0 -1
- package/.output/public/_nuxt/entry.BxXHl1Vy.css +0 -1
- package/.output/public/_nuxt/wCQds5_f.js +0 -1
- package/.output/server/chunks/build/BrowserBadge-BTA4QU_J.mjs.map +0 -1
- package/.output/server/chunks/build/ChartCard-BqAhMip2.mjs.map +0 -1
- package/.output/server/chunks/build/Checkbox-_1nGm_DR.mjs.map +0 -1
- package/.output/server/chunks/build/CiEnvCard-DAufYuJw.mjs.map +0 -1
- package/.output/server/chunks/build/CodeBlock-BVKHuYjU.mjs.map +0 -1
- package/.output/server/chunks/build/DashboardNavbar-BR6j4VLd.mjs.map +0 -1
- package/.output/server/chunks/build/DiagnosisPanel-BnrdXDvd.mjs.map +0 -1
- package/.output/server/chunks/build/EnvManagedBadge-DdnEtjIl.mjs.map +0 -1
- package/.output/server/chunks/build/HelpHint-D_GJzMpW.mjs.map +0 -1
- package/.output/server/chunks/build/Modal-COIjm3js.mjs.map +0 -1
- package/.output/server/chunks/build/ProjectTestCasesTable-XFBPQGIX.mjs.map +0 -1
- package/.output/server/chunks/build/RunReports-ChNkmuWa.mjs.map +0 -1
- package/.output/server/chunks/build/RunStatusBadge-CXpuCUGQ.mjs.map +0 -1
- package/.output/server/chunks/build/SectionCard-zs9FDzps.mjs.map +0 -1
- package/.output/server/chunks/build/Select-r3S5nkSY.mjs.map +0 -1
- package/.output/server/chunks/build/Separator-pqpPG0up.mjs.map +0 -1
- package/.output/server/chunks/build/SettingsField-Wdpzlt13.mjs.map +0 -1
- package/.output/server/chunks/build/Slideover-02XjJjn0.mjs.map +0 -1
- package/.output/server/chunks/build/Switch-gx_JXgCo.mjs.map +0 -1
- package/.output/server/chunks/build/Table-C64RrBp3.mjs.map +0 -1
- package/.output/server/chunks/build/TestStatusBar--u4VX_Xf.mjs.map +0 -1
- package/.output/server/chunks/build/Tooltip-ui_BVvqr.mjs.map +0 -1
- package/.output/server/chunks/build/VisuallyHiddenInput-mMsqmkjz.mjs.map +0 -1
- package/.output/server/chunks/build/_id_-R6KGfZOC.mjs.map +0 -1
- package/.output/server/chunks/build/_id_-pkxJKe17.mjs.map +0 -1
- package/.output/server/chunks/build/about-CmtGYbC6.mjs.map +0 -1
- package/.output/server/chunks/build/account-AbLuwiZP.mjs.map +0 -1
- package/.output/server/chunks/build/ai-DR_slopS.mjs.map +0 -1
- package/.output/server/chunks/build/analytics-BbT2-Tr-.mjs.map +0 -1
- package/.output/server/chunks/build/db.client-DlA_u5y9.mjs.map +0 -1
- package/.output/server/chunks/build/default-D6diRCW0.mjs.map +0 -1
- package/.output/server/chunks/build/edit-CNV4xdYj.mjs.map +0 -1
- package/.output/server/chunks/build/help-content-BMumoQQF.mjs.map +0 -1
- package/.output/server/chunks/build/index-DmHBPf7T.mjs.map +0 -1
- package/.output/server/chunks/build/index-Dw526KXV.mjs.map +0 -1
- package/.output/server/chunks/build/index-dwYB76GO.mjs.map +0 -1
- package/.output/server/chunks/build/index-rSHkKNna.mjs.map +0 -1
- package/.output/server/chunks/build/isValueEqualOrExist-DTJ5ejZs.mjs.map +0 -1
- package/.output/server/chunks/build/login-Da5C8jP2.mjs.map +0 -1
- package/.output/server/chunks/build/mcp-DM1t-9L_.mjs.map +0 -1
- package/.output/server/chunks/build/notifications-BTPF0xA7.mjs.map +0 -1
- package/.output/server/chunks/build/settings-Bmw_JdBS.mjs.map +0 -1
- package/.output/server/chunks/build/settings-metadata-CksLgMun.mjs.map +0 -1
- package/.output/server/chunks/build/storage-BqR4acgi.mjs.map +0 -1
- package/.output/server/chunks/build/tags-miPAzIr3.mjs.map +0 -1
- package/.output/server/chunks/build/test-cases-D-LqhLpk.mjs.map +0 -1
- package/.output/server/chunks/build/useAiStatus-FwqbA4gz.mjs.map +0 -1
- package/.output/server/chunks/build/useSettingsNav-v_dFuTw9.mjs.map +0 -1
- package/.output/server/chunks/build/users-D-GDKZmZ.mjs.map +0 -1
- package/.output/server/chunks/build/virtualizer-BcC1XuFf.mjs.map +0 -1
- package/.output/server/chunks/build/wasted-time-CFmeT_e2.mjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as Vt}from"./
|
|
1
|
+
import{_ as Vt}from"./Bvfmwzgw.js";import{d as fe,b as ut,o as s,f as R,g as r,i as n,p as J,k as e,j as u,m as _,t as o,c as a,F as V,M as at,l as Re,ai as ot,v as ke,q as k,s as be,x as Ne,_ as _e,E as dt,y as oe,aj as Gt,h as M,r as O,G as Ie,O as he,H as Ue,n as Xe,z as He,B as me,ak as rt,D as Xt,P as ct,A as qt,u as Ae,w as je,af as Yt,C as Jt,ab as mt,a as Zt,K as Qt,e as es}from"./BPKwYP2Q.js";import{_ as ft}from"./BpceIssd.js";import{_ as ts}from"./ze9-Ill2.js";import{_ as ss}from"./BIksQZfR.js";import{_ as ns,a as as}from"./IFqRT_xJ.js";import{_ as os,b as rs,a as ls,c as is,d as us}from"./DuBBqqbF.js";import{_ as ds}from"./Dzz9_Z0u.js";import{_ as Se}from"./CQeMb57w.js";import{_ as gt}from"./oNq5pd3r.js";import{_ as qe}from"./B7yG1G_l.js";import{_ as cs}from"./BR9H8k-L.js";import{u as ms,_ as fs}from"./Dz55UR7w.js";import{p as pt,h as xe,k as Ve,x as gs,w as ps,d as yt,j as xt,i as Le,f as ht,a as ys,c as xs,g as ie}from"./k-z_VVTK.js";import{b as vt}from"./Bb64FEFL.js";import{u as Ye}from"./DuMv-ugy.js";import{_ as hs}from"./C1K3r_fc.js";import{_ as kt}from"./BGYbnqA7.js";import{_ as vs}from"./DbeHHTk-.js";import{_ as bt}from"./BdFEUAlx.js";import{_ as ks}from"./DcCNnjKl.js";import{u as bs}from"./DJS3Bf50.js";import{_ as _s}from"./CKB_doYB.js";import{_ as _t}from"./CgoAUz76.js";import{_ as wt}from"./xUrLy-Zn.js";import{_ as ws}from"./DhA17dqR.js";import{_ as Je}from"./BuZOa2M3.js";import{_ as $t}from"./BBdfPriC.js";import{_ as $s}from"./DjZKuUMz.js";import{_ as Ct}from"./nCjfWTGm.js";import{u as Me}from"./BIf1R_fu.js";import{_ as Cs}from"./C3r_Sv1p.js";import{_ as Rs}from"./D2jhe9JK.js";import{_ as Ts}from"./Br2K9yi_.js";import{u as Is}from"./uKeO2H7F.js";import{u as Ss,s as zs}from"./C8RBRg7I.js";import"./iwD5atI2.js";import"./DszOHBMG.js";import"./C38aZbFJ.js";import"./r3SBLxtE.js";import"./D7W_4Sqc.js";import"./CoHGrO41.js";import"./ABGJk0pu.js";import"./jIF87ALb.js";import"./DAWn6Z7h.js";import"./C219JuBV.js";import"./mGJLLqyN.js";import"./DRtTLQri.js";import"./DgYM3eyi.js";import"./d5ZB3uxF.js";import"./B43OGXzV.js";import"./CpO-ABDW.js";const Ds={class:"flex items-center gap-3 flex-1 min-w-0 justify-between"},Fs={class:"flex items-center gap-3 min-w-0"},Ps={class:"text-sm font-semibold truncate flex items-center gap-1"},js={class:"flex items-center gap-3 shrink-0 max-sm:hidden"},Ms={class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},Ns={class:"text-gray-700 dark:text-gray-300"},As={class:"text-xs text-green-600 dark:text-green-400 tabular-nums whitespace-nowrap"},Bs={class:"text-xs text-red-600 dark:text-red-400 tabular-nums whitespace-nowrap"},Us={class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},Ls={class:"text-xs text-amber-600 dark:text-amber-400 tabular-nums whitespace-nowrap",title:"Tests that never ran (maxFailures cutoff or a serial-group failure)"},Es={class:"text-xs text-orange-600 dark:text-orange-400 tabular-nums whitespace-nowrap"},Os={class:"text-xs text-gray-400 tabular-nums whitespace-nowrap"},Ws={class:"grid grid-cols-1 lg:grid-cols-12 gap-4"},Ks={class:"space-y-3"},Hs={class:"flex items-start gap-3"},Vs={class:"flex items-center gap-2.5 min-w-0 flex-1"},Gs={class:"min-w-0 flex-1"},Xs={class:"flex items-center gap-2"},qs={class:"text-base font-bold shrink-0 flex items-center gap-1"},Ys={class:"text-xs text-gray-500 ml-auto whitespace-nowrap"},Js={class:"p-2 space-y-1 min-w-32"},Zs=["onClick"],Qs={class:"grid grid-cols-3 sm:grid-cols-5 gap-2"},en={class:"text-xl font-bold mt-0.5"},tn={class:"relative"},sn={class:"text-xl font-bold mt-0.5 text-green-600 dark:text-green-400"},nn={class:"text-xl font-bold mt-0.5 text-red-600 dark:text-red-400"},an={class:"text-xl font-bold mt-0.5 text-gray-600 dark:text-gray-400"},on={class:"text-xl font-bold mt-0.5 text-amber-600 dark:text-amber-400"},rn={key:0,class:"flex items-center gap-3"},ln={class:"flex-1 max-w-md"},un={class:"flex items-center gap-3 text-xs shrink-0"},dn={class:"flex items-center gap-1"},cn={class:"font-medium tabular-nums"},mn={key:0,class:"flex items-center gap-1"},fn={class:"font-medium tabular-nums"},gn={key:1,class:"flex items-center gap-1"},pn={class:"font-medium tabular-nums text-orange-600 dark:text-orange-400"},yn={key:2,class:"flex items-center gap-1"},xn={class:"font-medium tabular-nums text-amber-600 dark:text-amber-400"},hn={key:0,class:"flex items-center gap-3"},vn={class:"flex-1 min-w-0"},kn={key:1,class:"space-y-1.5 text-sm"},bn={class:"text-xs tabular-nums text-gray-400 dark:text-gray-500 shrink-0"},_n={key:0,class:"flex items-center justify-between gap-2 min-w-0"},wn={class:"truncate"},$n={class:"text-xs tabular-nums text-gray-400 dark:text-gray-500 shrink-0"},Cn={class:"space-y-3 text-sm"},Rn={key:0},Tn={class:"flex flex-wrap gap-1.5"},In={key:1,class:"flex items-center gap-1"},Sn={key:3},zn={class:"bg-gray-50 dark:bg-gray-900 p-2.5 rounded text-xs font-mono overflow-x-auto max-h-48 overflow-y-auto"},Dn={class:"m-0"},Fn=fe({__name:"RunSummary",props:{testRun:{},displayProgress:{},allReports:{},showCustomData:{type:Boolean},finalizing:{type:Boolean},activeFilter:{},totalWastedTime:{}},emits:["update:showCustomData","filter-status","label-updated"],setup(t,{emit:b}){const w=t,F=b,$=ut(),l=M(()=>w.testRun?.storageStats),C=M(()=>!!(w.testRun?.metadata?.ci||w.testRun?.environment||w.testRun?.playwrightVersion||w.testRun?.reporterVersion)),m=M(()=>!!w.testRun?.metadata?.scm),D=M(()=>!!(l.value?.totalFiles||w.finalizing)),K=M(()=>!!(w.testRun?.metadata?.tags?.length||w.testRun?.metadata?.projectDescription||w.testRun?.metadata?.relatedIssue||w.testRun?.metadata?.customData||w.testRun?.links?.length)),{summaryColSpanClass:E,blockColSpanClass:N}=ms(()=>[C,m,D,K].filter(z=>z.value).length),{copy:I,copied:A}=Ye(),H=O("file-line"),U=O(!1),j=M(()=>w.testRun?.testCases?w.testRun.testCases.filter(z=>z.status==="failed"||z.status==="timedout").map(z=>({filePath:(z.filePath||z.location?.split(":")[0])??"",title:z.title,line:z.location&&parseInt(z.location.split(":")[1]??"",10)||null,projectName:z.browser?.projectName||null})):[]);function g(){return vt(j.value,{mode:H.value})}async function f(){const z=g();z&&(U.value=!0,await I(z,{toast:"Retry command copied"}),setTimeout(()=>{U.value=!1},2e3))}const d=M(()=>U.value?"Copied!":yt(g()));function c(){const z=w.testRun;if(!z)return"";const i=z.status==="passed"?"✅":z.status==="failed"?"❌":z.status==="running"?"🔄":"⚠️",ue=z.label?` — ${z.label}`:"",h=z.project?.label??z.project?.name??"",T=z.totalTests??0,G=z.passedTests??0,te=z.failedTests??0,de=z.skippedTests??0,Y=z.didNotRunTests??0,v=z.flakyTests??0,q=xe(z.duration),ae=v>0?` · ${v} flaky`:"",se=Y>0?` · ${Y} didn't run`:"";return[`*Run #${z.id}*${ue}`,`Status: ${i} ${z.status} | Project: ${h}`,`Tests: ${T} total · ${G} passed · ${te} failed · ${de} skipped${se}${ae}`,`Duration: ${q}`].join(`
|
|
2
2
|
`)}const S=O(""),y=O(!1),x=O(!1);let P=!1;const Q=O(null);function Z(){P=!1,S.value=w.testRun?.label??"",y.value=!0,Ie(()=>Q.value?.focus())}async function ne(){if(x.value)return;if(P){P=!1;return}const z=w.testRun;if(z){x.value=!0;try{await $fetch(`/api/test-runs/${z.id}`,{method:"PATCH",body:{label:S.value||null}}),y.value=!1,F("label-updated")}catch(i){const ue=i&&typeof i=="object"&&"data"in i?i.data?.message:"Failed to save label";$.add({title:"Error",description:ue||"Failed to save label",color:"error"})}finally{x.value=!1}}}function ee(){P=!0,y.value=!1}function B(z){z.key==="Enter"?ne():z.key==="Escape"&&ee()}return(z,i)=>{const ue=os,h=ke,T=be,G=ds,te=Se,de=gt,Y=Ne,v=ft,q=_e,ae=dt,se=qe,ge=rs,Ce=ls,re=Gt,we=is,ze=cs,ye=fs;return s(),R(ye,{"storage-key":"test-run"},{folded:r(()=>[n("div",Ds,[n("div",Fs,[u(ue,{status:t.testRun?.status??"",size:"sm"},null,8,["status"]),n("span",Ps,[_(" Run #"+o(t.testRun?.id)+" ",1),e(y)?(s(),a(V,{key:0},[at(n("input",{ref_key:"labelInputRef",ref:Q,"onUpdate:modelValue":i[0]||(i[0]=p=>Re(S)?S.value=p:null),type:"text",placeholder:"Add a label...",class:"inline-block w-40 text-sm font-normal border-b border-dashed border-gray-400 bg-transparent outline-none focus:border-primary px-0.5 py-0",onKeydown:B,onBlur:ne},null,544),[[ot,e(S)]]),e(x)?(s(),R(h,{key:0,name:"i-lucide-loader-circle",class:"size-3.5 text-gray-400 animate-spin shrink-0"})):k("",!0)],64)):(s(),a(V,{key:1},[t.testRun?.label?(s(),a("span",{key:0,class:"font-normal text-gray-500 ml-1.5 cursor-pointer hover:text-gray-700 dark:hover:text-gray-300 border-b border-dashed border-transparent hover:border-gray-400",onClick:Z},"— "+o(t.testRun.label),1)):(s(),a("button",{key:1,class:"text-xs text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 border-b border-dashed border-transparent hover:border-gray-400 ml-1",title:"Add a label",onClick:Z}," + label "))],64))]),t.testRun?.shardTotal&&t.testRun.shardTotal>1?(s(),R(T,{key:0,color:"neutral",variant:"soft",size:"sm",class:"shrink-0",title:`Shard ${t.testRun.shardsFinished??0}/${t.testRun.shardTotal}`},{default:r(()=>[u(h,{name:"i-lucide-layout-grid",class:"size-3 mr-1"}),_(" "+o(t.testRun.shardsFinished??0)+"/"+o(t.testRun.shardTotal),1)]),_:1},8,["title"])):k("",!0)]),n("div",js,[n("span",Ms,[i[12]||(i[12]=_(" T: ",-1)),n("strong",Ns,o(t.displayProgress?.totalTests??t.testRun?.totalTests??0),1)]),n("span",As,[i[13]||(i[13]=_(" P: ",-1)),n("strong",null,o(t.displayProgress?.passedTests??t.testRun?.passedTests??0),1)]),n("span",Bs,[i[14]||(i[14]=_(" F: ",-1)),n("strong",null,o(t.displayProgress?.failedTests??t.testRun?.failedTests??0),1)]),n("span",Us,[i[15]||(i[15]=_(" S: ",-1)),n("strong",null,o(t.displayProgress?.skippedTests??t.testRun?.skippedTests??0),1)]),n("span",Ls,[i[16]||(i[16]=_(" DNR: ",-1)),n("strong",null,o(t.testRun?.didNotRunTests??0),1)]),n("span",Es,[i[17]||(i[17]=_(" Fl: ",-1)),n("strong",null,o(t.testRun?.flakyTests??0),1)]),u(G,{passed:t.displayProgress?.passedTests??t.testRun?.passedTests??0,failed:t.displayProgress?.failedTests??t.testRun?.failedTests??0,skipped:t.displayProgress?.skippedTests??t.testRun?.skippedTests??0,flaky:t.testRun?.flakyTests??0,"did-not-run":t.testRun?.didNotRunTests??0,total:t.displayProgress?.totalTests??t.testRun?.totalTests??0},null,8,["passed","failed","skipped","flaky","did-not-run","total"]),n("span",Os,o(("formatDuration"in z?z.formatDuration:e(xe))(t.testRun?.duration)),1)])])]),default:r(()=>[n("div",Ws,[n("div",{class:J(e(E))},[u(se,{class:"shadow-xs h-full"},{default:r(()=>[n("div",Ks,[n("div",Hs,[n("div",Vs,[u(ue,{status:t.testRun?.status??"",size:"md"},null,8,["status"]),n("div",Gs,[n("div",Xs,[n("h2",qs,[_(" Run #"+o(t.testRun?.id)+" ",1),e(y)?(s(),a(V,{key:0},[at(n("input",{ref_key:"labelInputRef",ref:Q,"onUpdate:modelValue":i[1]||(i[1]=p=>Re(S)?S.value=p:null),type:"text",placeholder:"Add a label...",class:"inline-block w-48 text-sm font-normal border-b border-dashed border-gray-400 bg-transparent outline-none focus:border-primary px-0.5 py-0",onKeydown:B,onBlur:ne},null,544),[[ot,e(S)]]),e(x)?(s(),R(h,{key:0,name:"i-lucide-loader-circle",class:"size-3.5 text-gray-400 animate-spin shrink-0"})):k("",!0)],64)):(s(),a(V,{key:1},[t.testRun?.label?(s(),a("span",{key:0,class:"font-normal text-gray-500 ml-1.5 cursor-pointer hover:text-gray-700 dark:hover:text-gray-300 border-b border-dashed border-transparent hover:border-gray-400",onClick:Z},"— "+o(t.testRun.label),1)):(s(),a("button",{key:1,class:"text-xs text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 border-b border-dashed border-transparent hover:border-gray-400 ml-1.5",title:"Add a label",onClick:Z}," + label "))],64)),u(te,{topic:"run.summary"})]),t.testRun?.shardTotal&&t.testRun.shardTotal>1?(s(),R(T,{key:0,color:"neutral",variant:"soft",size:"sm",class:"shrink-0",title:`Shard ${t.testRun.shardsFinished??0}/${t.testRun.shardTotal}`},{default:r(()=>[u(h,{name:"i-lucide-layout-grid",class:"size-3 mr-1"}),_(" "+o(t.testRun.shardsFinished??0)+"/"+o(t.testRun.shardTotal),1)]),_:1},8,["title"])):k("",!0),t.testRun?.precedingMarker?(s(),R(v,{key:1,text:`This run started after: ${t.testRun.precedingMarker.label}`},{default:r(()=>[u(Y,{to:`/projects/${t.testRun.projectId}?tab=timeline`,class:"shrink-0 inline-flex items-center gap-1"},{default:r(()=>[i[18]||(i[18]=n("span",{class:"text-xs text-muted"},"After",-1)),u(de,{marker:t.testRun.precedingMarker,size:"xs"},null,8,["marker"])]),_:1},8,["to"])]),_:1},8,["text"])):k("",!0),n("span",Ys,o(t.testRun?.project?.label??t.testRun?.project?.name)+" · Started "+o(("prettyDateFormat"in z?z.prettyDateFormat:e(pt))(t.testRun?.startTime)),1),u(v,{text:e(A)?"Copied!":"Copy run summary"},{default:r(()=>[u(q,{size:"xs",variant:"ghost",color:"neutral",icon:e(A)?"i-lucide-check":"i-lucide-clipboard",class:"shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",onClick:i[2]||(i[2]=p=>e(I)(c(),{toast:"Run summary copied"}))},null,8,["icon"])]),_:1},8,["text"]),e(j).length>0?(s(),R(ae,{key:2},{content:r(()=>[n("div",Js,[i[20]||(i[20]=n("p",{class:"text-xs font-medium text-gray-500 px-2 py-1"},"Mode",-1)),(s(),a(V,null,oe(["file-line","grep","file"],p=>n("button",{key:p,class:J(["w-full text-left px-2 py-1 text-sm rounded hover:bg-gray-100 dark:hover:bg-gray-800",e(H)===p?"bg-primary/10 text-primary":""]),onClick:ve=>H.value=p},o(p==="file-line"?"File:line":p==="grep"?"Title (grep)":"File only"),11,Zs)),64))])]),default:r(()=>[u(q,{size:"xs",color:"warning",variant:"subtle",icon:e(U)?"i-lucide-check":"i-lucide-play",title:e(d),onClick:i[3]||(i[3]=p=>f())},{default:r(()=>[...i[19]||(i[19]=[_(" Retry ",-1)])]),_:1},8,["icon","title"])]),_:1})):k("",!0)])])])]),n("div",Qs,[n("button",{class:J(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="all"?"bg-gray-200 dark:bg-gray-700 ring-2 ring-gray-400 dark:ring-gray-500":"bg-gray-50 dark:bg-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800"]),onClick:i[4]||(i[4]=p=>F("filter-status","all"))},[i[21]||(i[21]=n("p",{class:"text-xs font-medium text-gray-500 uppercase tracking-wider"},"Total",-1)),n("p",en,o(t.displayProgress?.totalTests??t.testRun?.totalTests??0),1)],2),n("div",tn,[n("button",{class:J(["rounded-lg p-3 text-left w-full h-full transition-colors cursor-pointer",t.activeFilter==="passed"?"bg-green-100 dark:bg-green-900/30 ring-2 ring-green-400 dark:ring-green-600":"bg-green-50 dark:bg-green-900/20 hover:bg-green-100 dark:hover:bg-green-900/30"]),onClick:i[5]||(i[5]=p=>F("filter-status","passed"))},[i[22]||(i[22]=n("p",{class:"text-xs font-medium text-green-700 dark:text-green-400 uppercase tracking-wider"},"Passed",-1)),n("p",sn,o(t.displayProgress?.passedTests??t.testRun?.passedTests??0),1)],2),(t.testRun?.flakyTests??0)>0?(s(),a("button",{key:0,class:J(["absolute top-1.5 right-1.5 inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-xs font-semibold leading-none tabular-nums transition-colors cursor-pointer",t.activeFilter==="flaky"?"bg-orange-200 dark:bg-orange-800/60 text-orange-800 dark:text-orange-200 ring-2 ring-orange-400 dark:ring-orange-600":"bg-orange-100 dark:bg-orange-900/40 text-orange-700 dark:text-orange-300 hover:bg-orange-200 dark:hover:bg-orange-800/60"]),title:"Flaky — passed only after a retry (a subset of passed). Click to filter.",onClick:i[6]||(i[6]=p=>F("filter-status","flaky"))},[u(h,{name:"i-lucide-shuffle",class:"size-3"}),_(" "+o(t.testRun?.flakyTests??0),1)],2)):k("",!0)]),n("button",{class:J(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="failed"?"bg-red-100 dark:bg-red-900/30 ring-2 ring-red-400 dark:ring-red-600":"bg-red-50 dark:bg-red-900/20 hover:bg-red-100 dark:hover:bg-red-900/30"]),onClick:i[7]||(i[7]=p=>F("filter-status","failed"))},[i[23]||(i[23]=n("p",{class:"text-xs font-medium text-red-700 dark:text-red-400 uppercase tracking-wider"},"Failed",-1)),n("p",nn,o(t.displayProgress?.failedTests??t.testRun?.failedTests??0),1)],2),n("button",{class:J(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="skipped"?"bg-gray-200 dark:bg-gray-700 ring-2 ring-gray-400 dark:ring-gray-500":"bg-gray-50 dark:bg-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800"]),onClick:i[8]||(i[8]=p=>F("filter-status","skipped"))},[i[24]||(i[24]=n("p",{class:"text-xs font-medium text-gray-500 uppercase tracking-wider"},"Skipped",-1)),n("p",an,o(t.displayProgress?.skippedTests??t.testRun?.skippedTests??0),1)],2),n("button",{class:J(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="didnotrun"?"bg-amber-100 dark:bg-amber-900/30 ring-2 ring-amber-400 dark:ring-amber-600":"bg-amber-50 dark:bg-amber-900/20 hover:bg-amber-100 dark:hover:bg-amber-900/30"]),title:"Tests that never ran (maxFailures cutoff or a serial-group failure)",onClick:i[9]||(i[9]=p=>F("filter-status","didnotrun"))},[i[25]||(i[25]=n("p",{class:"text-xs font-medium text-amber-700 dark:text-amber-400 uppercase tracking-wider"}," Didn't run ",-1)),n("p",on,o(t.testRun?.didNotRunTests??0),1)],2)]),n("div",null,[t.testRun?(s(),a("div",rn,[n("div",ln,[u(G,{passed:t.displayProgress?.passedTests??t.testRun?.passedTests??0,failed:t.displayProgress?.failedTests??t.testRun?.failedTests??0,skipped:t.displayProgress?.skippedTests??t.testRun?.skippedTests??0,flaky:t.testRun?.flakyTests??0,"did-not-run":t.testRun?.didNotRunTests??0,total:t.displayProgress?.totalTests??t.testRun?.totalTests??0},null,8,["passed","failed","skipped","flaky","did-not-run","total"])]),n("div",un,[n("div",dn,[u(h,{name:"i-lucide-clock",class:"size-3.5 text-gray-400"}),n("span",cn,o(("formatDuration"in z?z.formatDuration:e(xe))(t.testRun?.duration)),1)]),t.testRun?.avgTestDuration?(s(),a("div",mn,[u(h,{name:"i-lucide-gauge",class:"size-3.5 text-gray-400"}),i[26]||(i[26]=n("span",{class:"text-gray-500 hidden sm:inline"},"Avg",-1)),n("span",fn,o(("formatDuration"in z?z.formatDuration:e(xe))(t.testRun.avgTestDuration)),1)])):k("",!0),t.testRun?.p90TestDuration?(s(),a("div",gn,[u(h,{name:"i-lucide-arrow-up-right",class:"size-3.5 text-orange-500"}),i[27]||(i[27]=n("span",{class:"text-gray-500 hidden sm:inline"},"P90",-1)),n("span",pn,o(("formatDuration"in z?z.formatDuration:e(xe))(t.testRun.p90TestDuration)),1)])):k("",!0),t.totalWastedTime&&t.totalWastedTime>0?(s(),a("div",yn,[u(h,{name:"i-lucide-clock",class:"size-3.5 text-amber-500"}),i[28]||(i[28]=n("span",{class:"text-gray-500 hidden sm:inline"},"Wasted",-1)),n("span",xn,o(("formatDuration"in z?z.formatDuration:e(xe))(t.totalWastedTime)),1)])):k("",!0)])])):k("",!0)])])]),_:1})],2),e(C)?(s(),R(ge,{key:0,ci:t.testRun?.metadata?.ci,environment:t.testRun?.environment,"playwright-version":t.testRun?.playwrightVersion,"reporter-version":t.testRun?.reporterVersion,class:J(e(N))},null,8,["ci","environment","playwright-version","reporter-version","class"])):k("",!0),e(m)?(s(),R(Ce,{key:1,scm:t.testRun.metadata.scm,class:J(e(N))},null,8,["scm","class"])):k("",!0),e(D)?(s(),R(we,{key:2,class:J(e(N)),title:"Storage",icon:"i-lucide-database",help:"run.reports",subtitle:e(l)?.totalFiles?`${e(l).totalFiles} files · ${("formatBytes"in z?z.formatBytes:e(Ve))(e(l).totalSize)}`:void 0},{default:r(()=>[t.finalizing?(s(),a("div",hn,[u(h,{name:"i-lucide-upload",class:"size-5 text-info shrink-0 animate-pulse"}),n("div",vn,[i[29]||(i[29]=n("div",{class:"flex items-center justify-between mb-1"},[n("span",{class:"text-sm font-medium"},"Finalizing test run"),n("span",{class:"text-xs text-gray-500"},"Uploading reports & traces…")],-1)),u(re,{value:null,size:"sm",color:"info",class:"rounded-full animate-pulse"})])])):k("",!0),e(l)?.totalFiles?(s(),a("div",kn,[(s(!0),a(V,null,oe(t.allReports,p=>(s(),a("div",{key:p.label,class:"flex items-center justify-between gap-2 min-w-0"},[u(q,{href:`/api/files/${("getFileApiPath"in z?z.getFileApiPath:e(ps))(p.path)}`,icon:("reportIcon"in z?z.reportIcon:e(gs))(p.type),target:"_blank",size:"xs",variant:"outline",class:"min-w-0",ui:{label:"truncate"}},{default:r(()=>[_(o(p.label),1)]),_:2},1032,["href","icon"]),n("span",bn,o(("formatBytes"in z?z.formatBytes:e(Ve))(p.size)),1)]))),128)),e(l).testCaseFilesCount>0?(s(),a("div",_n,[n("span",wn,"Test files ("+o(e(l).testCaseFilesCount)+")",1),n("span",$n,o(("formatBytes"in z?z.formatBytes:e(Ve))(e(l).testCaseFilesSize)),1)])):k("",!0)])):k("",!0)]),_:1},8,["class","subtitle"])):k("",!0),e(K)?(s(),R(we,{key:3,class:J(e(N)),title:"Other",icon:"i-lucide-tags",help:"run.metadata"},{default:r(()=>[n("div",Cn,[t.testRun.metadata.tags&&t.testRun.metadata.tags.length>0?(s(),a("div",Rn,[n("div",Tn,[(s(!0),a(V,null,oe(t.testRun.metadata.tags,p=>(s(),R(T,{key:p,color:"neutral",variant:"soft",size:"sm"},{default:r(()=>[_(o(p),1)]),_:2},1024))),128))])])):k("",!0),t.testRun.metadata.relatedIssue?(s(),a("p",In,[u(h,{name:"i-lucide-link",class:"w-3.5 h-3.5 text-gray-400 shrink-0"}),n("span",null,o(t.testRun.metadata.relatedIssue),1)])):k("",!0),u(ze,{"entity-type":"test_run","entity-id":t.testRun.id,links:t.testRun.links??null,onUpdated:i[10]||(i[10]=p=>z.$emit("label-updated"))},null,8,["entity-id","links"]),t.testRun.metadata.customData?(s(),R(q,{key:2,size:"xs",variant:"ghost",color:"neutral",icon:t.showCustomData?"i-lucide-chevron-up":"i-lucide-chevron-down",onClick:i[11]||(i[11]=p=>F("update:showCustomData",!t.showCustomData))},{default:r(()=>[...i[30]||(i[30]=[_(" Custom data ",-1)])]),_:1},8,["icon"])):k("",!0),t.showCustomData&&t.testRun.metadata.customData?(s(),a("div",Sn,[n("div",zn,[n("pre",Dn,o(JSON.stringify(t.testRun.metadata.customData,null,2)),1)])])):k("",!0)])]),_:1},8,["class"])):k("",!0)])]),_:1})}}}),Pn=Object.assign(Fn,{__name:"RunSummary"}),jn={class:"rounded-lg border border-default text-sm flex flex-col flex-1 min-h-0"},Mn={class:"flex items-center justify-end px-3 py-1.5 border-b border-default bg-elevated shrink-0"},Nn=["disabled","title"],An={class:"overflow-y-auto flex-1 min-h-0"},Bn=["onClick"],Un={key:1,class:"font-medium truncate min-w-0 text-muted"},Ln={key:2,class:"flex items-center gap-1 shrink-0"},En={class:"flex items-center gap-2 shrink-0 tabular-nums"},On={key:0,class:"text-xs text-red-600 dark:text-red-400 font-medium"},Wn={key:1,class:"text-xs text-green-600 dark:text-green-400"},Kn={key:2,class:"text-xs text-muted"},Hn={key:3,class:"text-xs text-amber-600 dark:text-amber-400"},Vn={key:4,class:"text-xs text-info"},Gn=["href","onClick"],Xn={class:"flex items-center gap-2 shrink-0"},qn={key:0,class:"text-xs text-info"},Yn={key:1,class:"text-xs text-muted tabular-nums"},Jn={key:0,class:"text-center py-8 text-muted"},Zn=fe({__name:"TestCasesTree",props:{testCases:{},suites:{},hasFilter:{type:Boolean},highlightedCaseId:{},projectKey:{},projectName:{}},setup(t){const b=t,w=M(()=>{const g=new Map;for(const f of b.suites)g.set(`${f.filePath}${f.suitePath.join("")}`,f);return g});function F(g){return g==="timedOut"||g==="timedout"?"failed":g}function $(g){return g==="fixme"||g==="slow"?"warning":g==="fail"?"error":g==="skip"?"neutral":g==="tag"?"primary":"info"}function l(g){switch(g){case"fixme":return"i-lucide-wrench";case"skip":return"i-lucide-skip-forward";case"slow":return"i-lucide-timer";case"fail":return"i-lucide-x-circle";case"tag":return"i-lucide-tag";default:return null}}function C(g){return g.type==="tag"?g.description??g.type:g.type}function m(g){const f={passed:0,failed:0,skipped:0,didnotrun:0,running:0,total:0};for(const d of g){const c=F(d.status);c in f&&f[c]++,f.total++}return f}const D=O(new Set),K=M(()=>D.value.size===0);function E(g){return b.hasFilter?!0:!D.value.has(g)}function N(g){if(b.hasFilter)return;const f=new Set(D.value);f.has(g)?f.delete(g):f.add(g),D.value=f}function I(){const g=[],f=new Map;for(const d of b.testCases){const c=d.filePath??"unknown";f.has(c)||f.set(c,[]),f.get(c).push(d)}for(const[d,c]of f){g.push(`file:${d}`);const S=new Set;for(const y of c){const x=y.suitePath??[];for(let P=1;P<=x.length;P++)S.add(`group:${d}${x.slice(0,P).join("")}`)}for(const y of S)g.push(y)}return g}function A(){D.value=new Set(I())}function H(){D.value=new Set}function U(g,f,d,c,S){const y=f.filter(Q=>(Q.suitePath??[]).length===c.length),x=f.filter(Q=>(Q.suitePath??[]).length>c.length),P=new Map;for(const Q of x){const Z=(Q.suitePath??[])[c.length];P.has(Z)||P.set(Z,[]),P.get(Z).push(Q)}for(const[Q,Z]of P){const ne=[...c,Q],ee=`group:${d}${ne.join("")}`,B=w.value.get(`${d}${ne.join("")}`);g.push({kind:"group",depth:S,key:ee,label:Q,stats:m(Z),mode:B?.mode??"default",annotations:B?.annotations??[]}),E(ee)&&U(g,Z,d,ne,S+1)}for(const Q of y)g.push({kind:"test",depth:S,key:`test:${Q.id}`,test:Q})}const j=M(()=>{const g=[],f=new Map;for(const d of b.testCases){const c=d.filePath??"unknown";f.has(c)||f.set(c,[]),f.get(c).push(d)}for(const[d,c]of[...f.entries()].sort(([S],[y])=>S.localeCompare(y))){const S=`file:${d}`;g.push({kind:"group",depth:0,key:S,label:d,stats:m(c)}),E(S)&&U(g,c,d,[],1)}return g});return(g,f)=>{const d=ke,c=bt,S=be,y=_e;return s(),a("div",jn,[n("div",Mn,[n("button",{class:J(["flex items-center gap-1 text-xs transition-colors",t.hasFilter?"text-muted cursor-not-allowed opacity-50":"text-muted hover:text-default"]),disabled:t.hasFilter,title:t.hasFilter?"Clear filters to collapse/expand":K.value?"Collapse all":"Expand all",onClick:f[0]||(f[0]=x=>K.value?A():H())},[u(d,{name:K.value?"i-lucide-fold-vertical":"i-lucide-unfold-vertical",class:"size-3.5"},null,8,["name"]),_(" "+o(K.value?"Collapse all":"Expand all"),1)],10,Nn)]),n("div",An,[(s(!0),a(V,null,oe(j.value,x=>(s(),a(V,{key:x.key},[x.kind==="group"?(s(),a("div",{key:0,class:J(["flex items-center gap-2 py-2 pr-4 border-b border-default last:border-b-0 select-none sticky",[x.depth===0?"bg-elevated":"bg-default",!t.hasFilter&&"cursor-pointer"]]),style:he({paddingLeft:`${x.depth*20+12}px`,top:`${x.depth*36}px`,zIndex:20-x.depth}),onClick:P=>N(x.key)},[u(d,{name:E(x.key)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5 text-muted shrink-0"},null,8,["name"]),u(d,{name:x.depth===0?"i-lucide-file-code-2":"i-lucide-folder-open",class:J(["size-4 shrink-0",x.depth===0?"text-blue-500":"text-amber-500"])},null,8,["name","class"]),x.depth===0?(s(),a("span",{key:0,class:"min-w-0",onClick:f[1]||(f[1]=Ue(()=>{},["stop"]))},[u(c,{"file-path":x.label,"project-key":t.projectKey,"project-name":t.projectName,class:"font-medium text-default"},null,8,["file-path","project-key","project-name"])])):(s(),a("span",Un,o(x.label),1)),x.depth>0?(s(),a("div",Ln,[x.mode==="parallel"?(s(),R(S,{key:0,color:"success",variant:"soft",size:"xs"},{default:r(()=>[...f[2]||(f[2]=[_("parallel",-1)])]),_:1})):k("",!0),x.mode==="serial"?(s(),R(S,{key:1,color:"warning",variant:"soft",size:"xs"},{default:r(()=>[...f[3]||(f[3]=[_("serial",-1)])]),_:1})):k("",!0),(s(!0),a(V,null,oe(x.annotations,P=>(s(),R(S,{key:`${P.type}:${P.description??""}`,color:$(P.type),variant:"soft",size:"xs",title:P.type!=="tag"?P.description??void 0:void 0,class:"gap-1"},{default:r(()=>[l(P.type)?(s(),R(d,{key:0,name:l(P.type),class:"size-2.5 shrink-0"},null,8,["name"])):k("",!0),_(" "+o(C(P)),1)]),_:2},1032,["color","title"]))),128))])):k("",!0),f[4]||(f[4]=n("div",{class:"flex-1"},null,-1)),n("div",En,[x.stats.failed>0?(s(),a("span",On,o(x.stats.failed)+" failed ",1)):k("",!0),x.stats.passed>0?(s(),a("span",Wn,o(x.stats.passed)+" passed ",1)):k("",!0),x.stats.skipped>0?(s(),a("span",Kn,o(x.stats.skipped)+" skipped",1)):k("",!0),x.stats.didnotrun>0?(s(),a("span",Hn,o(x.stats.didnotrun)+" didn't run ",1)):k("",!0),x.stats.running>0?(s(),a("span",Vn,o(x.stats.running)+" running",1)):k("",!0)])],14,Bn)):(s(),a("div",{key:1,class:J(["flex items-center gap-2 pr-3 py-1.5 border-b border-default last:border-b-0 hover:bg-gray-50 dark:hover:bg-gray-900/40 transition-colors",t.highlightedCaseId===x.test.id?"animate-pulse bg-yellow-100 dark:bg-yellow-900/30":""]),style:he({paddingLeft:`${x.depth*20+12}px`})},[u(d,{name:"i-lucide-flask-conical",class:"size-3.5 text-muted shrink-0"}),u(S,{color:("getStatusColor"in g?g.getStatusColor:e(Le))(x.test.status==="timedOut"||x.test.status==="timedout"?"failed":x.test.status),size:"xs",class:"capitalize shrink-0"},{default:r(()=>[_(o(("formatStatusLabel"in g?g.formatStatusLabel:e(xt))(x.test.status)),1)]),_:2},1032,["color"]),(s(!0),a(V,null,oe(x.test.testAnnotations??[],P=>(s(),R(S,{key:`${P.type}:${P.description??""}`,color:$(P.type),variant:"soft",size:"xs",title:P.type!=="tag"?P.description??void 0:void 0,class:"shrink-0 gap-1"},{default:r(()=>[l(P.type)?(s(),R(d,{key:0,name:l(P.type),class:"size-2.5 shrink-0"},null,8,["name"])):k("",!0),_(" "+o(C(P)),1)]),_:2},1032,["color","title"]))),128)),n("a",{href:`/test-run-cases/${x.test.id}`,class:"text-primary hover:underline truncate flex-1 min-w-0",onClick:Ue(P=>("navigateTo"in g?g.navigateTo:e(Xe))(`/test-run-cases/${x.test.id}`),["prevent"])},o(x.test.title),9,Gn),n("div",Xn,[x.test.status==="running"?(s(),a("span",qn,"In progress...")):x.test.duration?(s(),a("span",Yn,o(("formatDuration"in g?g.formatDuration:e(xe))(x.test.duration)),1)):k("",!0),x.test.workerIndex!=null?(s(),R(S,{key:2,color:"neutral",variant:"soft",size:"xs",class:"font-mono",title:`Worker ${x.test.workerIndex}`},{default:r(()=>[_(" w"+o(x.test.workerIndex),1)]),_:2},1032,["title"])):k("",!0),(x.test.retries??0)>0?(s(),R(S,{key:3,color:"warning",variant:"soft",size:"xs"},{default:r(()=>[_(o(x.test.retries)+"x ",1)]),_:2},1024)):k("",!0),u(y,{to:`/test-run-cases/${x.test.id}`,size:"xs",variant:"outline"},{default:r(()=>[...f[5]||(f[5]=[_(" View ",-1)])]),_:1},8,["to"])])],6))],64))),128)),j.value.length===0?(s(),a("div",Jn,[u(d,{name:"i-lucide-search-x",class:"size-6 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),f[6]||(f[6]=n("p",{class:"text-sm"},"No test cases match your filters.",-1))])):k("",!0)])])}}}),Qn=Object.assign(Zn,{__name:"TestCasesTree"}),ea={class:"flex flex-col min-h-0"},ta={class:"flex items-center rounded-md border border-default overflow-hidden"},sa={key:0,class:"text-sm text-gray-500 tabular-nums inline-flex items-center gap-1"},na={key:1,class:"text-sm text-gray-500 tabular-nums inline-flex items-center gap-1"},aa={class:"flex flex-wrap items-center gap-1"},oa=["onClick"],ra={key:0,class:"flex-1 min-h-0 max-lg:h-[70dvh] overflow-x-auto overflow-y-hidden rounded-lg border border-default"},la=["aria-rowcount"],ia=["aria-sort","aria-label","title","onClick"],ua={key:1,class:"truncate"},da={class:"px-3 py-2 flex items-center min-w-0",role:"cell"},ca={class:"px-3 py-2 min-w-0 space-y-0.5",role:"cell"},ma={class:"flex items-center gap-1.5 min-w-0"},fa=["href","title","onClick"],ga={class:"px-3 py-2 flex items-center",role:"cell"},pa={class:"px-3 py-2 flex items-center whitespace-nowrap",role:"cell"},ya={key:0,class:"text-info text-xs"},xa={key:1},ha={class:"px-3 py-2 flex items-center",role:"cell"},va={class:"px-3 py-2 flex items-center tabular-nums",role:"cell"},ka={key:0,class:"px-3 py-2 flex items-center whitespace-nowrap",role:"cell"},ba={key:0,class:"text-amber-600 dark:text-amber-400"},_a={key:1,class:"text-gray-400"},wa={class:"px-3 py-2 flex items-center justify-end",role:"cell"},$a={class:"flex-1 min-h-0 flex items-center justify-center py-10 text-sm text-gray-500"},Ca={key:1,class:"text-center py-10 text-gray-500"},Ra={key:2,class:"text-center py-10 text-gray-500"},Ta=fe({__name:"TestCasesList",props:qt({testCases:{},suites:{},isLive:{type:Boolean},failureClusterFilter:{},projectKey:{},projectName:{}},{search:{default:""},searchModifiers:{},activeStatuses:{default:()=>[]},activeStatusesModifiers:{},browserFilter:{default:"all"},browserFilterModifiers:{}}),emits:["update:search","update:activeStatuses","update:browserFilter"],setup(t,{expose:b}){const{treeView:w,setTreeView:F}=bs("test-cases"),$=t,l=He(t,"search"),C=He(t,"activeStatuses"),m=He(t,"browserFilter"),D=O(!1),K=O(!1),E=[{label:"Passed",value:"passed",color:"green"},{label:"Failed",value:"failed",color:"red"},{label:"Skipped",value:"skipped",color:"gray"},{label:"Didn't run",value:"didnotrun",color:"amber"},{label:"Flaky",value:"flaky",color:"orange"}];function N(h){C.value.indexOf(h)>=0?C.value=C.value.filter(G=>G!==h):C.value=[...C.value,h]}const I=M(()=>{const h=new Set;for(const G of $.testCases){const te=G.browser?.projectName;te&&h.add(te)}const T=[{label:"All browsers",value:"all"}];for(const G of[...h].sort())T.push({label:G,value:G});return T});function A(h,T){return T==="failed"?h.status==="failed"||h.status==="timedOut"||h.status==="timedout":T==="flaky"?(h.retries??0)>0:h.status===T}const H=M(()=>{let h=$.testCases;if($.failureClusterFilter!=null&&(h=h.filter(T=>T.failureClusterId===$.failureClusterFilter)),C.value.length>0&&(h=h.filter(T=>C.value.some(G=>A(T,G)))),m.value!=="all"&&(h=h.filter(T=>T.browser?.projectName===m.value)),l.value){const T=l.value.toLowerCase();h=h.filter(G=>G.title.toLowerCase().includes(T)||G.location&&G.location.toLowerCase().includes(T))}return D.value&&(h=h.filter(T=>T.isNewRegression)),K.value&&(h=h.filter(T=>T.isNewFlaky)),h}),U=O(null),j=O("asc");function g(h){U.value!==h?(U.value=h,j.value="asc"):j.value==="asc"?j.value="desc":U.value=null}function f(h){return U.value!==h?"i-lucide-chevrons-up-down":j.value==="asc"?"i-lucide-chevron-up":"i-lucide-chevron-down"}function d(h,T){switch(T){case"browser":return h.browser?.projectName??"";case"title":return h.title??"";case"status":return h.status??"";case"duration":return h.duration??0;case"workerIndex":return h.workerIndex??-1;case"retries":return h.retries??0;case"wastedTimeMs":return h.wastedTimeMs??0;default:return""}}function c(h){if(h==null)return"";const T=Math.round(Math.abs(h));if(T===0)return"0s";const G=h<0?"−":"";if(T<1e3)return`${G}${T}ms`;const te=T/1e3;if(te<60)return`${G}${Number.isInteger(te)?te:te.toFixed(1)}s`;const de=Math.floor(te/60),Y=Math.round(te%60);return Y?`${G}${de}m ${Y}s`:`${G}${de}m`}const S=M(()=>{const h=H.value,T=U.value;if(!T)return h;const G=j.value==="asc"?1:-1;return[...h].sort((te,de)=>{const Y=d(te,T),v=d(de,T);return typeof Y=="number"&&typeof v=="number"?(Y-v)*G:String(Y).localeCompare(String(v))*G})}),y=M(()=>$.testCases.some(h=>(h.wastedTimeMs??0)>0)),x=M(()=>{const h=[{key:"browser",label:"Browser",sortable:!0,width:"3.25rem",align:"left",icon:"i-lucide-monitor"},{key:"title",label:"Test case",sortable:!0,width:"minmax(12rem, 3fr)",align:"left"},{key:"status",label:"Status",sortable:!0,width:"6rem",align:"left"},{key:"duration",label:"Duration",sortable:!0,width:"7rem",align:"left"},{key:"workerIndex",label:"Worker",sortable:!0,width:"6rem",align:"left"},{key:"retries",label:"Retries",sortable:!0,width:"6.5rem",align:"left"}];return y.value&&h.push({key:"wastedTimeMs",label:"Wasted",sortable:!0,width:"6rem",align:"left"}),h.push({key:"actions",label:"Actions",sortable:!1,width:"7.5rem",align:"right"}),h}),P=M(()=>x.value.map(h=>h.width).join(" ")),Q=M(()=>y.value?"55rem":"49rem"),Z=M(()=>l.value!==""||C.value.length>0||m.value!=="all"||$.failureClusterFilter!=null),ne=O(null),ee=O(!1),B=O(null);function z(h){return h.scrollHeight-h.scrollTop-h.clientHeight<50}function i(h){const T=h.target;T&&(ee.value=!z(T))}me(()=>$.isLive,h=>{h||(ee.value=!1)}),me(()=>S.value.length,()=>{!$.isLive||ee.value||Ie(()=>ne.value?.scrollToBottom())});function ue(h){F(!1),B.value=h;const T=()=>{const G=S.value.findIndex(te=>te.id===h);G>=0&&ne.value?.scrollToItem(G,{behavior:"smooth"})};Ie(()=>{ne.value?T():setTimeout(T,60),setTimeout(()=>{B.value=null},3e3)})}return b({scrollToCase:ue}),(h,T)=>{const G=ke,te=Se,de=Xt,Y=hs,v=kt,q=vs,ae=Qn,se=ks,ge=be,Ce=bt,re=_e,we=rt("DynamicScrollerItem"),ze=rt("DynamicScroller"),ye=ct;return s(),a("div",ea,[u(q,{class:"mb-4 shrink-0"},{start:r(()=>[n("div",ta,[n("button",{class:J(["px-2 py-1 text-xs transition-colors",e(w)?"text-muted hover:bg-elevated/60":"bg-primary text-white dark:text-white"]),title:"Flat list",onClick:T[0]||(T[0]=p=>e(F)(!1))},[u(G,{name:"i-lucide-list",class:"size-3.5"})],2),n("button",{class:J(["px-2 py-1 text-xs transition-colors",e(w)?"bg-primary text-white dark:text-white":"text-muted hover:bg-elevated/60"]),title:"Tree view",onClick:T[1]||(T[1]=p=>e(F)(!0))},[u(G,{name:"i-lucide-folder-tree",class:"size-3.5"})],2)]),t.isLive?(s(),a("span",sa,[_(o(t.testCases.length)+" completed ",1),u(te,{topic:"run.live"})])):(s(),a("span",na,[_(o(S.value.length)+o(S.value.length!==t.testCases.length?` / ${t.testCases.length}`:"")+" cases ",1),u(te,{topic:"run.test-cases"})]))]),default:r(()=>[u(de,{modelValue:l.value,"onUpdate:modelValue":T[2]||(T[2]=p=>l.value=p),placeholder:"Search test cases...",icon:"i-lucide-search",size:"sm",class:"min-w-48 max-sm:flex-1"},null,8,["modelValue"]),n("div",aa,[(s(),a(V,null,oe(E,p=>n("button",{key:p.value,class:J(["inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium transition-colors whitespace-nowrap",C.value.includes(p.value)?p.color==="green"?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":p.color==="red"?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":p.color==="orange"?"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400":"bg-gray-200 text-gray-700 dark:bg-gray-700 dark:text-gray-300":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"]),onClick:ve=>N(p.value)},[n("span",{class:J(["size-2 rounded-full shrink-0",p.color==="green"?"bg-green-500":p.color==="red"?"bg-red-500":p.color==="orange"?"bg-orange-500":"bg-gray-400"])},null,2),_(" "+o(p.label),1)],10,oa)),64))]),u(Y,{modelValue:m.value,"onUpdate:modelValue":T[3]||(T[3]=p=>m.value=p),items:I.value,size:"sm",class:"w-36"},null,8,["modelValue","items"]),t.isLive?k("",!0):(s(),R(v,{key:0,modelValue:D.value,"onUpdate:modelValue":T[4]||(T[4]=p=>D.value=p),label:"New regressions",size:"sm"},null,8,["modelValue"])),t.isLive?k("",!0):(s(),R(v,{key:1,modelValue:K.value,"onUpdate:modelValue":T[5]||(T[5]=p=>K.value=p),label:"New flaky",size:"sm"},null,8,["modelValue"]))]),_:1}),e(w)&&t.testCases.length>0?(s(),R(ae,{key:0,"test-cases":S.value,suites:t.suites,"has-filter":Z.value,"highlighted-case-id":B.value,"project-key":t.projectKey,"project-name":t.projectName,class:"flex-1 min-h-0"},null,8,["test-cases","suites","has-filter","highlighted-case-id","project-key","project-name"])):e(w)?k("",!0):(s(),a(V,{key:1},[S.value.length>0?(s(),a("div",ra,[n("div",{class:"flex flex-col h-full",role:"table","aria-label":"Test cases","aria-rowcount":S.value.length+1,style:he({minWidth:Q.value})},[n("div",{class:"grid shrink-0 bg-elevated/50 border-b border-default",role:"row",style:he({gridTemplateColumns:P.value})},[(s(!0),a(V,null,oe(x.value,p=>(s(),a(V,{key:p.key},[p.sortable?(s(),a("button",{key:0,type:"button",role:"columnheader","aria-sort":U.value===p.key?j.value==="asc"?"ascending":"descending":"none","aria-label":p.icon?p.label:void 0,title:p.icon?p.label:void 0,class:J(["flex items-center gap-1 min-w-0 px-3 py-2 text-sm font-semibold select-none cursor-pointer hover:text-highlighted transition-colors",p.align==="right"?"justify-end":""]),onClick:ve=>g(p.key)},[p.icon?(s(),R(G,{key:0,name:p.icon,class:"shrink-0 size-4"},null,8,["name"])):(s(),a("span",ua,o(p.label),1)),u(G,{name:f(p.key),class:J(["shrink-0 size-3.5",U.value===p.key?"":"opacity-40"])},null,8,["name","class"])],10,ia)):(s(),a("div",{key:1,role:"columnheader",class:J(["px-3 py-2 text-sm font-semibold",p.align==="right"?"text-right":""])},o(p.label),3))],64))),128))],4),u(ye,null,{fallback:r(()=>[n("div",$a,[u(G,{name:"i-lucide-loader-circle",class:"size-4 mr-2 animate-spin"}),T[9]||(T[9]=_(" Loading test cases… ",-1))])]),default:r(()=>[u(ze,{ref_key:"scrollerRef",ref:ne,items:S.value,"min-item-size":44,"key-field":"id",role:"rowgroup",class:"flex-1 min-h-0",onScrollPassive:i},{default:r(({item:p,index:ve,active:De})=>[u(we,{item:p,active:De,"size-dependencies":[p.title,p.location,p.isNewRegression,p.isNewFlaky],"data-index":ve},{default:r(()=>[n("div",{class:J(["grid items-center border-b border-default text-sm transition-colors hover:bg-gray-50 dark:hover:bg-gray-900/50",B.value===p.id?"animate-pulse bg-yellow-100 dark:bg-yellow-900/30":""]),role:"row",style:he({gridTemplateColumns:P.value})},[n("div",da,[u(se,{browser:p.browser},null,8,["browser"])]),n("div",ca,[n("div",ma,[p.isNewRegression?(s(),R(ge,{key:0,color:"error",variant:"solid",size:"xs",class:"uppercase tracking-wider"},{default:r(()=>[...T[6]||(T[6]=[_(" NEW ",-1)])]),_:1})):k("",!0),p.isNewFlaky?(s(),R(ge,{key:1,color:"info",variant:"solid",size:"xs",class:"uppercase tracking-wider"},{default:r(()=>[...T[7]||(T[7]=[_(" FLAKY ",-1)])]),_:1})):k("",!0),n("a",{href:`/test-run-cases/${p.id}`,class:"text-primary hover:underline font-medium truncate",title:p.title,onClick:Ue(Ze=>("navigateTo"in h?h.navigateTo:e(Xe))(`/test-run-cases/${p.id}`),["prevent"])},o(p.title),9,fa)]),p.location?(s(),R(Ce,{key:0,location:p.location,"project-key":t.projectKey,"project-name":t.projectName,class:"text-xs text-gray-400 dark:text-gray-500"},null,8,["location","project-key","project-name"])):k("",!0)]),n("div",ga,[u(ge,{color:("getStatusColor"in h?h.getStatusColor:e(Le))(p.status==="timedOut"||p.status==="timedout"?"failed":p.status),class:"capitalize"},{default:r(()=>[_(o(("formatStatusLabel"in h?h.formatStatusLabel:e(xt))(p.status)),1)]),_:2},1032,["color"])]),n("div",pa,[p.status==="running"?(s(),a("span",ya,"In progress...")):(s(),a("span",xa,o(c(p.duration)),1))]),n("div",ha,[p.workerIndex!=null?(s(),R(ge,{key:0,color:"neutral",variant:"soft",class:"font-mono text-xs"},{default:r(()=>[_(o(p.workerIndex),1)]),_:2},1024)):k("",!0)]),n("div",va,o(p.retries&&p.retries>0?p.retries:""),1),y.value?(s(),a("div",ka,[p.wastedTimeMs?(s(),a("span",ba,o(c(p.wastedTimeMs)),1)):(s(),a("span",_a,"—"))])):k("",!0),n("div",wa,[u(re,{to:`/test-run-cases/${p.id}`,size:"sm",variant:"outline"},{default:r(()=>[...T[8]||(T[8]=[_(" View details ",-1)])]),_:1},8,["to"])])],6)]),_:2},1032,["item","active","size-dependencies","data-index"])]),_:1},8,["items"])]),_:1})],12,la)])):t.testCases.length===0?(s(),a("div",Ca,[u(G,{name:"i-lucide-beaker",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),T[10]||(T[10]=n("p",null,"No test cases recorded for this run.",-1))])):(s(),a("div",Ra,[u(G,{name:"i-lucide-search-x",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),T[11]||(T[11]=n("p",null,"No test cases match your filters.",-1))]))],64))])}}}),Ia=Object.assign(Ta,{__name:"TestCasesList"}),Sa={key:2,class:"p-4"},za={key:3,class:"p-4"},Da={key:4,class:"p-4"},Fa={key:5,class:"space-y-6 p-4"},Pa={class:"flex items-center gap-1.5 text-sm text-muted"},ja={class:"grid grid-cols-1 sm:grid-cols-3 gap-4"},Ma={class:"space-y-1"},Na={class:"text-xl font-semibold"},Aa={key:0},Ba={key:1},Ua={class:"space-y-1"},La={key:1,class:"text-xl font-semibold text-muted"},Ea={class:"space-y-1"},Oa={class:"space-y-0.5 text-sm"},Wa={key:0,class:"text-red-500"},Ka={key:1,class:"text-green-600"},Ha={key:2,class:"text-purple-500"},Va={key:3,class:"text-muted"},Ga={class:"space-y-1"},Xa={class:"font-medium text-primary hover:underline truncate"},qa={class:"text-gray-400 text-xs ml-auto shrink-0"},Ya={class:"space-y-1"},Ja={class:"font-medium text-primary hover:underline truncate"},Za={class:"space-y-1"},Qa={class:"font-medium text-primary hover:underline truncate"},eo={class:"space-y-1"},to={class:"font-medium text-primary hover:underline truncate"},so={class:"text-gray-400 text-xs ml-auto shrink-0"},no={class:"space-y-1"},ao={class:"font-medium text-primary hover:underline truncate"},oo={class:"grid grid-cols-2 gap-4"},ro={key:0},lo={class:"space-y-1"},io={class:"text-red-500 font-mono shrink-0"},uo={class:"truncate text-primary hover:underline"},co={key:1},mo={class:"space-y-1"},fo={class:"text-green-500 font-mono shrink-0"},go={class:"truncate text-primary hover:underline"},po={class:"space-y-1"},yo={class:"flex-1 truncate text-primary hover:underline"},xo={class:"text-gray-500 font-mono text-xs shrink-0"},ho={class:"w-24 h-2 rounded-full bg-gray-100 shrink-0"},vo={key:0,class:"flex items-center gap-1.5 text-xs text-amber-600 mb-3"},ko={class:"flex items-end gap-2 h-20"},bo={class:"text-xs text-gray-500"},_o={class:"text-xs text-gray-400"},wo={class:"space-y-1"},$o={class:"truncate"},Co=fe({__name:"RunInsights",props:{testRunId:{},runStatus:{},refreshKey:{}},setup(t){const b=t,w=M(()=>{if(!l.value)return"";const N=l.value.passRateDelta;return N>0?"text-green-600":N<0?"text-red-600":"text-muted"}),F=M(()=>{if(!l.value)return"";const N=l.value.passRateDelta;return N>0?"i-lucide-trending-up":N<0?"i-lucide-trending-down":"i-lucide-minus"}),$=M(()=>l.value?.avgDurationDelta==null?"":l.value.avgDurationDelta>0?"text-red-600":"text-green-600"),l=O(null),C=O(!1),m=O(null),D=M(()=>b.runStatus==="running"||b.runStatus==="initialising"||b.runStatus==="finalizing");async function K(){if(!b.testRunId||D.value){l.value=null;return}C.value=!0,m.value=null;try{l.value=await $fetch(`/api/test-runs/${b.testRunId}/insights`)}catch(N){console.error("[RunInsights] failed to load",N),m.value=N?.data?.message||N?.message||"Failed to load insights"}finally{C.value=!1}}me(()=>b.testRunId,K,{immediate:!0}),me(()=>b.refreshKey,(N,I)=>{N!==I&&N!==void 0&&K()});function E(N){return N==null?"—":N<1e3?`${N}ms`:`${(N/1e3).toFixed(1)}s`}return(N,I)=>{const A=_e,H=_s,U=_t,j=wt,g=ke,f=Se,d=ws,c=be,S=Ne;return e(m)?(s(),R(H,{key:0,text:e(m),padded:""},{action:r(()=>[u(A,{size:"sm",onClick:K},{default:r(()=>[...I[0]||(I[0]=[_("Retry",-1)])]),_:1})]),_:1},8,["text"])):e(C)?(s(),R(U,{key:1,padded:""})):e(D)?(s(),a("div",Sa,[u(j,{icon:"i-lucide-loader-circle",text:"Run in progress"},{default:r(()=>[...I[1]||(I[1]=[n("p",{class:"text-sm text-muted max-w-sm text-center"}," Insights are computed once the run finishes. Switch back here when the run completes. ",-1)])]),_:1})])):e(l)?e(l).hasBaseline?(s(),a("div",Fa,[n("div",Pa,[u(g,{name:"i-lucide-sparkles",class:"size-4 shrink-0 text-primary/70"}),I[3]||(I[3]=n("span",null,"Automatic highlights from this run",-1)),u(f,{topic:"run.insights"})]),u(d,{icon:"i-lucide-bar-chart-3","icon-class":"text-blue-500",title:"Run summary"},{default:r(()=>[n("div",ja,[n("div",Ma,[I[4]||(I[4]=n("p",{class:"text-xs text-muted"},"Pass rate",-1)),n("p",Na,o(e(l).passRate)+"%",1),n("div",{class:J(["flex items-center gap-1 text-xs",e(w)])},[u(g,{name:e(F),class:"size-3.5"},null,8,["name"]),e(l).passRateDelta!==0?(s(),a("span",Aa,o(e(l).passRateDelta>0?"+":"")+o(e(l).passRateDelta)+"pp vs baseline",1)):(s(),a("span",Ba,"Same as baseline"))],2)]),n("div",Ua,[I[5]||(I[5]=n("p",{class:"text-xs text-muted"},"Avg duration",-1)),e(l).avgDurationDelta!==null?(s(),a("p",{key:0,class:J(["text-xl font-semibold",e($)])},o(e(l).avgDurationDelta>0?"+":"")+o(e(l).avgDurationDelta)+"% ",3)):(s(),a("p",La,"—")),I[6]||(I[6]=n("p",{class:"text-xs text-muted"},"vs baseline (passing tests)",-1))]),n("div",Ea,[I[7]||(I[7]=n("p",{class:"text-xs text-muted"},"Changes",-1)),n("div",Oa,[e(l).newRegressions.length>0?(s(),a("p",Wa," +"+o(e(l).newRegressions.length)+" regressed ",1)):k("",!0),e(l).recovered.length>0?(s(),a("p",Ka,"+"+o(e(l).recovered.length)+" fixed",1)):k("",!0),e(l).newFlaky.length>0?(s(),a("p",Ha,"+"+o(e(l).newFlaky.length)+" flaky",1)):k("",!0),!e(l).newRegressions.length&&!e(l).recovered.length&&!e(l).newFlaky.length?(s(),a("p",Va," No status changes ")):k("",!0)])])])]),_:1}),e(l).newRegressions.length>0?(s(),R(d,{key:0,icon:"i-lucide-alert-circle","icon-class":"text-red-500",title:"New regressions",count:e(l).newRegressions.length},{default:r(()=>[n("div",Ga,[(s(!0),a(V,null,oe(e(l).newRegressions,y=>(s(),R(S,{key:y.testRunsCaseId,to:`/test-run-cases/${y.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-red-50 dark:hover:bg-red-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[u(c,{color:"error",variant:"solid",size:"xs"},{default:r(()=>[...I[8]||(I[8]=[_("NEW",-1)])]),_:1}),n("span",Xa,o(y.title),1),n("span",qa,o(E(y.duration)),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):k("",!0),e(l).recurrences.length>0?(s(),R(d,{key:1,icon:"i-lucide-refresh-cw","icon-class":"text-amber-500",title:"Recurring failures",count:e(l).recurrences.length},{default:r(()=>[n("div",Ya,[(s(!0),a(V,null,oe(e(l).recurrences,y=>(s(),R(S,{key:y.testRunsCaseId,to:`/test-run-cases/${y.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-amber-50 dark:hover:bg-amber-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[u(c,{color:"warning",variant:"solid",size:"xs"},{default:r(()=>[...I[9]||(I[9]=[_("RECURRING",-1)])]),_:1}),n("span",Ja,o(y.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):k("",!0),e(l).recovered.length>0?(s(),R(d,{key:2,icon:"i-lucide-check-circle","icon-class":"text-green-500",title:"Fixed tests",count:e(l).recovered.length},{default:r(()=>[n("div",Za,[(s(!0),a(V,null,oe(e(l).recovered,y=>(s(),R(S,{key:y.testRunsCaseId,to:`/test-run-cases/${y.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-green-50 dark:hover:bg-green-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[u(c,{color:"success",variant:"solid",size:"xs"},{default:r(()=>[...I[10]||(I[10]=[_("FIXED",-1)])]),_:1}),n("span",Qa,o(y.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):k("",!0),e(l).newFlaky.length>0?(s(),R(d,{key:3,icon:"i-lucide-flask","icon-class":"text-purple-500",title:"New flaky tests",count:e(l).newFlaky.length},{default:r(()=>[n("div",eo,[(s(!0),a(V,null,oe(e(l).newFlaky,y=>(s(),R(S,{key:y.testRunsCaseId,to:`/test-run-cases/${y.testRunsCaseId}?tab=history`,class:"flex items-center gap-2 text-sm hover:bg-purple-50 dark:hover:bg-purple-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[u(c,{color:"info",variant:"solid",size:"xs"},{default:r(()=>[...I[11]||(I[11]=[_("FLAKY",-1)])]),_:1}),n("span",to,o(y.title),1),n("span",so,o(E(y.duration)),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):k("",!0),e(l).flakyOnRetry.length>0?(s(),R(d,{key:4,icon:"i-lucide-repeat","icon-class":"text-orange-500",title:"Passed on retry",count:e(l).flakyOnRetry.length,subtitle:"Tests that passed but needed one or more retries"},{default:r(()=>[n("div",no,[(s(!0),a(V,null,oe(e(l).flakyOnRetry,y=>(s(),R(S,{key:y.testRunsCaseId,to:`/test-run-cases/${y.testRunsCaseId}?tab=history`,class:"flex items-center gap-2 text-sm hover:bg-orange-50 dark:hover:bg-orange-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[u(c,{color:"warning",variant:"subtle",size:"xs"},{default:r(()=>[_("×"+o(y.retries),1)]),_:2},1024),n("span",ao,o(y.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):k("",!0),e(l).mostRegressed.length>0||e(l).mostImproved.length>0?(s(),R(d,{key:5,icon:"i-lucide-trending-up","icon-class":"text-blue-500",title:"Performance changes"},{default:r(()=>[n("div",oo,[e(l).mostRegressed.length>0?(s(),a("div",ro,[I[12]||(I[12]=n("p",{class:"text-xs font-medium text-red-500 mb-2"},"Most regressed",-1)),n("div",lo,[(s(!0),a(V,null,oe(e(l).mostRegressed,y=>(s(),R(S,{key:y.testRunsCaseId,to:`/test-run-cases/${y.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-red-50 dark:hover:bg-red-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[n("span",io,"+"+o(y.pctChange)+"%",1),n("span",uo,o(y.title),1)]),_:2},1032,["to"]))),128))])])):k("",!0),e(l).mostImproved.length>0?(s(),a("div",co,[I[13]||(I[13]=n("p",{class:"text-xs font-medium text-green-500 mb-2"},"Most improved",-1)),n("div",mo,[(s(!0),a(V,null,oe(e(l).mostImproved,y=>(s(),R(S,{key:y.testRunsCaseId,to:`/test-run-cases/${y.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-green-50 dark:hover:bg-green-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[n("span",fo,o(y.pctChange)+"%",1),n("span",go,o(y.title),1)]),_:2},1032,["to"]))),128))])])):k("",!0)])]),_:1})):k("",!0),e(l).slowestTests.length>0?(s(),R(d,{key:6,icon:"i-lucide-clock","icon-class":"text-amber-500",title:"Slowest tests"},{default:r(()=>[n("div",po,[(s(!0),a(V,null,oe(e(l).slowestTests,y=>(s(),R(S,{key:y.testRunsCaseId,to:`/test-run-cases/${y.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-amber-50 dark:hover:bg-amber-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[n("div",yo,o(y.title),1),n("div",xo,o(E(y.duration)),1),n("div",ho,[n("div",{class:"h-full rounded-full bg-amber-400",style:he({width:Math.min(100,y.duration/(e(l).slowestTests[0]?.duration||1)*100)+"%"})},null,4)])]),_:2},1032,["to"]))),128))])]),_:1})):k("",!0),e(l).workerImbalance.length>1?(s(),R(d,{key:7,icon:"i-lucide-users","icon-class":"text-gray-500",title:"Worker distribution"},{default:r(()=>[e(l).workerImbalanceWarning?(s(),a("div",vo,[u(g,{name:"i-lucide-alert-triangle",class:"size-3.5 shrink-0"}),n("span",null,o(e(l).workerImbalanceWarning),1)])):k("",!0),n("div",ko,[(s(!0),a(V,null,oe(e(l).workerImbalance,y=>(s(),a("div",{key:y.workerIndex,class:"flex-1 flex flex-col items-center gap-1"},[n("span",bo,o(y.count),1),n("div",{class:"w-full bg-blue-400 rounded-t",style:he({height:Math.max(4,y.count/Math.max(...e(l).workerImbalance.map(x=>x.count))*60)+"px"})},null,4),n("span",_o,"W"+o(y.workerIndex),1)]))),128))])]),_:1})):k("",!0),e(l).clusterNew.length>0?(s(),R(d,{key:8,icon:"i-lucide-layers","icon-class":"text-purple-500",title:"New failure clusters",count:e(l).clusterNew.length},{default:r(()=>[n("div",wo,[(s(!0),a(V,null,oe(e(l).clusterNew,y=>(s(),R(S,{key:y.clusterId,to:`/failure-clusters/${y.clusterId}`,class:"flex items-center gap-2 text-sm text-primary hover:underline"},{default:r(()=>[n("span",$o,o(y.signature),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):k("",!0)])):(s(),a("div",Da,[u(j,{icon:"i-lucide-git-compare-arrows",text:"No baseline run found"},{default:r(()=>[...I[2]||(I[2]=[n("p",{class:"text-sm text-muted max-w-sm text-center"}," Insights compare this run against the most recent passing run in the same project. No previous passing run exists yet — once you have at least two completed runs, comparisons will appear here automatically. ",-1)])]),_:1})])):(s(),a("div",za,[u(j,{text:"No insights yet"})]))}}}),Ro=Object.assign(Co,{__name:"RunInsights"}),To=fe({__name:"ClusterDiagnosis",props:{clusterId:{}},setup(t){return(b,w)=>{const F=$s;return s(),R(F,{"cluster-id":t.clusterId},null,8,["cluster-id"])}}}),Io=Object.assign(To,{__name:"ClusterDiagnosis"}),So={class:"pt-4 space-y-3"},zo={key:0,class:"flex items-center justify-center py-8 text-gray-500 gap-2"},Do={class:"flex items-center justify-between gap-3"},Fo={class:"text-sm text-gray-500 dark:text-gray-400 inline-flex items-center gap-1"},Po={class:"min-w-0 space-y-0.5"},jo=["title"],Mo={key:0,class:"text-xs text-gray-500 truncate block"},No={class:"font-mono"},Ao={key:1,class:"text-gray-400 text-xs"},Bo={key:1,class:"text-gray-400 text-xs"},Uo={class:"text-sm tabular-nums"},Lo={key:0,class:"flex flex-wrap gap-1"},Eo={key:1,class:"text-gray-400 text-xs"},Oo={key:0,class:"flex items-center gap-1 text-xs text-gray-500"},Wo={key:2,class:"text-gray-400 text-xs"},Ko={key:0,class:"text-xs font-medium text-warning-500"},Ho={key:1,class:"text-sm text-gray-500 whitespace-nowrap"},Vo={key:0,class:"ml-1 text-xs text-gray-400"},Go={class:"flex justify-end gap-2"},Xo={key:2,class:"flex flex-col items-center justify-center py-8 text-gray-500 gap-2"},qo=fe({__name:"FailureGroups",props:{refreshKey:{}},emits:["selectCluster"],async setup(t,{emit:b}){let w,F;const $=b,l=t,m=Ae().params.id,{data:D,pending:K,refresh:E}=([w,F]=je(()=>Me(`/api/test-runs/${m}/failure-groups`,{lazy:!0,server:!1},"$qddF1IOQ64")),w=await w,F(),w);me(()=>l.refreshKey,(d,c)=>{d!==c&&d!==void 0&&E()});const N=O(null),{copy:I,copied:A}=Ye(),H=M(()=>D.value?D.value.flatMap(d=>d.cases.filter(c=>!c.passedOnRetry).map(c=>({filePath:c.filePath,title:c.title,line:null,projectName:null}))):[]),U=M(()=>vt(H.value));function j(){const d=U.value;d&&I(d,{toast:"Retry command copied"})}const g=[{accessorKey:"signature",header:ie("Signature")},{accessorKey:"errorType",header:ie("Type")},{accessorKey:"status",header:ie("Status")},{accessorKey:"caseCount",header:ie("Tests")},{accessorKey:"signals",header:"Signals"},{accessorKey:"diagnosis",header:"AI"},{accessorKey:"firstSeenRunId",header:ie("Known since")},{id:"actions",header:"Actions"}],f=M(()=>D.value?.reduce((d,c)=>d+c.caseCount,0)??0);return(d,c)=>{const S=ke,y=Se,x=_e,P=be,Q=Ne,Z=Je,ne=$t,ee=qe,B=Io,z=Ct;return s(),a(V,null,[n("div",So,[e(K)?(s(),a("div",zo,[u(S,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),c[2]||(c[2]=n("span",null,"Grouping failures...",-1))])):e(D)&&e(D).length?(s(),a(V,{key:1},[n("div",Do,[n("p",Fo,[_(o(e(f))+" failing "+o(e(f)===1?"test":"tests")+" across "+o(e(D).length)+" "+o(e(D).length===1?"group":"groups")+" ",1),u(y,{topic:"cluster.concept"})]),e(H).length>0?(s(),R(x,{key:0,size:"xs",variant:"outline",color:"neutral",icon:e(A)?"i-lucide-check":"i-lucide-play",title:e(A)?"Copied!":("copyPreview"in d?d.copyPreview:e(yt))(e(U)),onClick:c[0]||(c[0]=i=>j())},{default:r(()=>[...c[3]||(c[3]=[_(" Copy retry command ",-1)])]),_:1},8,["icon","title"])):k("",!0)]),u(ee,{ui:{body:"p-0 sm:p-0"}},{default:r(()=>[u(ne,{"min-width":"46rem",bleed:!1},{default:r(()=>[u(Z,{data:e(D),columns:g},{"actions-header":r(()=>[...c[4]||(c[4]=[n("div",{class:"text-right"},"Actions",-1)])]),"signature-cell":r(({row:i})=>[n("div",Po,[n("span",{class:J(["text-sm block truncate",i.original.title?"":"font-mono"]),title:i.original.signature},o(i.original.title||i.original.signature),11,jo),i.original.selector?(s(),a("span",Mo,[c[5]||(c[5]=_(" Locator: ",-1)),n("code",No,o(i.original.selector),1)])):k("",!0)])]),"errorType-cell":r(({row:i})=>[i.original.errorType?(s(),R(P,{key:0,color:("clusterErrorTypeColor"in d?d.clusterErrorTypeColor:e(xs))(i.original.errorType),variant:"subtle",size:"sm"},{default:r(()=>[_(o(i.original.errorType),1)]),_:2},1032,["color"])):(s(),a("span",Ao,"—"))]),"status-cell":r(({row:i})=>[i.original.status?(s(),R(P,{key:0,color:("clusterStatusColor"in d?d.clusterStatusColor:e(ys))(i.original.status),variant:"subtle",size:"sm"},{default:r(()=>[_(o(i.original.status),1)]),_:2},1032,["color"])):(s(),a("span",Bo,"—"))]),"caseCount-cell":r(({row:i})=>[n("span",Uo,o(i.original.caseCount),1)]),"signals-cell":r(({row:i})=>[i.original.isNew||i.original.flaky||i.original.workerCorrelated||i.original.locatorHealing?(s(),a("div",Lo,[i.original.isNew?(s(),R(P,{key:0,color:"warning",variant:"subtle",size:"sm"},{default:r(()=>[...c[6]||(c[6]=[_(" New ",-1)])]),_:1})):k("",!0),i.original.flaky?(s(),R(P,{key:1,color:"warning",variant:"outline",size:"sm"},{default:r(()=>[...c[7]||(c[7]=[_(" Flaky ",-1)])]),_:1})):k("",!0),i.original.workerCorrelated?(s(),R(P,{key:2,color:"info",variant:"outline",size:"sm",title:"All failures ran on the same worker"},{default:r(()=>[...c[8]||(c[8]=[_(" Same worker ",-1)])]),_:1})):k("",!0),i.original.locatorHealing?.healed?(s(),R(P,{key:3,color:"success",variant:"subtle",size:"sm",icon:"i-lucide-circle-check",title:"The recommended locator already passes at this call site in a later run"},{default:r(()=>[...c[9]||(c[9]=[_(" Healed ",-1)])]),_:1})):i.original.locatorHealing?(s(),R(P,{key:4,color:"success",variant:"outline",size:"sm",icon:"i-lucide-bandage",title:`Locator fix available: ${i.original.locatorHealing.recommended} — open the cluster to apply it`},{default:r(()=>[...c[10]||(c[10]=[_(" Locator fix ",-1)])]),_:1},8,["title"])):k("",!0)])):(s(),a("span",Eo,"—"))]),"diagnosis-cell":r(({row:i})=>[i.original.diagnosis?.status==="running"?(s(),a("div",Oo,[u(S,{name:"i-lucide-loader-2",class:"size-3 animate-spin"}),c[11]||(c[11]=_(" Running ",-1))])):i.original.diagnosis?.status==="completed"&&i.original.diagnosis.category?(s(),R(P,{key:1,color:"neutral",variant:"subtle",size:"sm",class:"gap-1"},{default:r(()=>[u(S,{name:"i-lucide-sparkles",class:"size-3"}),_(" "+o(i.original.diagnosis.category),1)]),_:2},1024)):(s(),a("span",Wo,"—"))]),"firstSeenRunId-cell":r(({row:i})=>[i.original.isNew?(s(),a("span",Ko,"New in this run")):(s(),a("div",Ho,[u(Q,{to:`/test-runs/${i.original.firstSeenRunId}`,class:"text-primary hover:underline"},{default:r(()=>[_(" run #"+o(i.original.firstSeenRunId),1)]),_:2},1032,["to"]),i.original.firstSeenAt?(s(),a("span",Vo," ("+o(("formatRelativeTime"in d?d.formatRelativeTime:e(ht))(i.original.firstSeenAt))+") ",1)):k("",!0)]))]),"actions-cell":r(({row:i})=>[n("div",Go,[u(x,{size:"sm",color:"primary",variant:"soft",onClick:ue=>$("selectCluster",i.original.clusterId)},{default:r(()=>[...c[12]||(c[12]=[_(" Filter ",-1)])]),_:1},8,["onClick"]),u(x,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-sparkles",onClick:ue=>N.value=i.original.clusterId},{default:r(()=>[...c[13]||(c[13]=[_(" Diagnose ",-1)])]),_:1},8,["onClick"]),u(x,{to:`/failure-clusters/${i.original.clusterId}`,size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:r(()=>[...c[14]||(c[14]=[_(" View ",-1)])]),_:1},8,["to"])])]),_:1},8,["data"])]),_:1})]),_:1})],64)):(s(),a("div",Xo,[u(S,{name:"i-lucide-party-popper",class:"size-6"}),c[15]||(c[15]=n("span",null,"No failure groups — failed tests without error details are not grouped",-1))]))]),u(z,{open:e(N)!==null,title:"AI Diagnosis",ui:{content:"max-w-2xl"},"onUpdate:open":c[1]||(c[1]=i=>{i||(N.value=null)})},{body:r(()=>[e(N)!==null?(s(),R(B,{key:0,"cluster-id":e(N)},null,8,["cluster-id"])):k("",!0)]),_:1},8,["open"])],64)}}}),Yo=Object.assign(qo,{__name:"FailureGroups"}),Jo={class:"pt-4"},Zo={key:2,class:"space-y-4"},Qo={class:"flex flex-wrap items-center gap-2 text-sm"},er={class:"text-gray-500 inline-flex items-center gap-1"},tr={key:0,class:"text-gray-400"},sr={key:0,class:"flex flex-wrap items-center gap-2"},nr={class:"text-sm text-gray-500"},ar={key:1,class:"flex items-center gap-2"},or={class:"text-sm text-gray-500"},rr={class:"space-y-3"},lr={class:"flex items-center gap-2 text-sm font-medium"},ir={class:"flex flex-wrap items-center gap-2 text-sm font-mono"},ur={key:0,class:"text-xs text-gray-400 font-sans"},dr={class:"flex flex-wrap items-center gap-2"},cr={class:"flex items-center gap-1.5 flex-1 min-w-0"},mr={class:"flex-1 text-xs bg-gray-100 dark:bg-gray-800 px-3 py-1.5 rounded font-mono truncate select-all"},fr={key:3,class:"text-sm text-gray-500 flex items-center gap-2"},gr={class:"px-4 py-3 text-sm font-medium flex items-center gap-2 border-b border-default"},pr={class:"overflow-x-auto"},yr={class:"w-full min-w-[36rem] text-sm"},xr={class:"px-4 py-2 text-gray-500"},hr={class:"px-4 py-2 font-mono text-xs"},vr={key:0,class:"text-green-700 dark:text-green-400"},kr={key:1,class:"text-gray-400"},br={class:"px-4 py-2 font-mono text-xs"},_r={key:0,class:"text-red-700 dark:text-red-400"},wr={key:1,class:"text-gray-400"},$r=fe({__name:"RegressionContext",props:{refreshKey:{}},async setup(t){let b,w;const $=Ae().params.id,l=t,{data:C,pending:m,refresh:D}=([b,w]=je(()=>Me(`/api/test-runs/${$}/regression-context`,{lazy:!0,server:!1},"$AcrCJopY1M")),b=await b,w(),b);me(()=>l.refreshKey,(I,A)=>{I!==A&&I!==void 0&&D()});const{copy:K,copied:E}=Ye();function N(){K(C.value?.commitRange?.gitCommand)}return(I,A)=>{const H=_t,U=wt,j=ke,g=Se,f=Ne,d=be,c=_e,S=qe;return s(),a("div",Jo,[e(m)?(s(),R(H,{key:0,text:"Looking for last passing run…"})):e(C)?.hasGreen?(s(),a("div",Zo,[n("div",Qo,[u(j,{name:"i-lucide-circle-check",class:"size-4 text-green-500 shrink-0"}),n("span",er,[A[0]||(A[0]=_("Last passing run: ",-1)),u(g,{topic:"run.regression"})]),u(f,{to:`/test-runs/${e(C).lastGreenRunId}`,class:"font-medium text-primary hover:underline"},{default:r(()=>[_(" Run #"+o(e(C).lastGreenRunId),1)]),_:1},8,["to"]),e(C).lastGreenRunAt?(s(),a("span",tr," ("+o(("formatRelativeTime"in I?I.formatRelativeTime:e(ht))(e(C).lastGreenRunAt))+") ",1)):k("",!0)]),(e(C).newFailures??0)>0?(s(),a("div",sr,[u(d,{color:"error",variant:"soft",size:"lg"},{default:r(()=>[_(o(e(C).newFailures)+" new "+o(e(C).newFailures===1?"failure":"failures"),1)]),_:1}),n("span",nr,o(e(C).newFailures===1?"test":"tests")+" that "+o((e(C).newFailures===1,"passed"))+" in run #"+o(e(C).lastGreenRunId)+" but "+o(e(C).newFailures===1?"fails":"fail")+" here ",1)])):(s(),a("div",ar,[u(d,{color:"warning",variant:"soft",size:"lg"},{default:r(()=>[...A[1]||(A[1]=[_(" No new regressions ",-1)])]),_:1}),n("span",or,"All failing tests were also failing before run #"+o(e(C).lastGreenRunId),1)])),e(C).commitRange?(s(),R(S,{key:2,ui:{body:"p-4 sm:p-4"}},{default:r(()=>[n("div",rr,[n("div",lr,[u(j,{name:"i-lucide-git-commit-horizontal",class:"size-4"}),A[2]||(A[2]=_(" Commits introduced since last passing run ",-1))]),n("div",ir,[u(d,{color:"success",variant:"soft",size:"sm"},{default:r(()=>[_(o(e(C).commitRange.fromShort),1)]),_:1}),u(j,{name:"i-lucide-arrow-right",class:"size-3 text-gray-400"}),u(d,{color:"error",variant:"soft",size:"sm"},{default:r(()=>[_(o(e(C).commitRange.toShort),1)]),_:1}),e(C).currentBranch||e(C).lastGreenBranch?(s(),a("span",ur," on "+o(e(C).currentBranch||e(C).lastGreenBranch),1)):k("",!0)]),n("div",dr,[e(C).commitRange.compareUrl?(s(),R(c,{key:0,to:e(C).commitRange.compareUrl,target:"_blank",external:"",icon:"i-lucide-external-link",size:"sm",variant:"soft",color:"primary"},{default:r(()=>[...A[3]||(A[3]=[_(" View commits ",-1)])]),_:1},8,["to"])):k("",!0),n("div",cr,[n("code",mr,o(e(C).commitRange.gitCommand),1),u(c,{icon:e(E)?"i-lucide-check":"i-lucide-clipboard",size:"xs",color:"neutral",variant:"ghost",title:e(E)?"Copied!":"Copy git command",onClick:N},null,8,["icon","title"])])])])]),_:1})):!e(C).currentCommit||!e(C).lastGreenCommit?(s(),a("div",fr,[u(j,{name:"i-lucide-git-branch",class:"size-4 shrink-0"}),A[4]||(A[4]=_(" No commit info available — enable ",-1)),A[5]||(A[5]=n("code",{class:"font-mono text-xs"},"collectScmInfo: true",-1)),A[6]||(A[6]=_(" in the reporter to see commit ranges ",-1))])):k("",!0),e(C).metadataDiff&&e(C).metadataDiff.length>0?(s(),R(S,{key:4,ui:{body:"p-0 sm:p-0"}},{default:r(()=>[n("div",gr,[u(j,{name:"i-lucide-sliders-horizontal",class:"size-4"}),A[7]||(A[7]=_(" What changed between runs ",-1))]),n("div",pr,[n("table",yr,[A[8]||(A[8]=n("thead",null,[n("tr",{class:"text-xs text-gray-500 uppercase tracking-wider border-b border-default"},[n("th",{class:"text-left px-4 py-2 font-medium w-32"},"Field"),n("th",{class:"text-left px-4 py-2 font-medium"},"Last passing"),n("th",{class:"text-left px-4 py-2 font-medium"},"This run")])],-1)),n("tbody",null,[(s(!0),a(V,null,oe(e(C).metadataDiff,y=>(s(),a("tr",{key:y.key,class:"border-b last:border-b-0 border-default"},[n("td",xr,o(y.label),1),n("td",hr,[y.before?(s(),a("span",vr,o(y.before),1)):(s(),a("span",kr,"—"))]),n("td",br,[y.after?(s(),a("span",_r,o(y.after),1)):(s(),a("span",wr,"—"))])]))),128))])])])]),_:1})):k("",!0)])):(s(),R(U,{key:1,icon:"i-lucide-history",text:"No previous passing run found for this project"}))])}}}),Cr=Object.assign($r,{__name:"RegressionContext"}),Rr={class:"flex items-center justify-between mb-2"},Tr={class:"text-xs text-gray-500 inline-flex items-center gap-1"},Ir={class:"flex items-center gap-1"},Sr={class:"p-2 flex flex-col gap-2 min-w-56"},zr=fe({__name:"TimelineHeader",props:{workerCount:{},shardTotal:{},testCount:{},hookCount:{},waitCount:{},spanTypes:{},live:{type:Boolean}},emits:["reset","toggleSpan"],setup(t){return(b,w)=>{const F=Se,$=_e,l=kt,C=dt;return s(),a("div",Rr,[n("span",Tr,[n("span",null,[_(o(t.workerCount)+" worker"+o(t.workerCount>1?"s":"")+" ",1),t.shardTotal&&t.shardTotal>1?(s(),a(V,{key:0},[_(" · "+o(t.shardTotal)+" shard"+o(t.shardTotal>1?"s":""),1)],64)):k("",!0),_(" · "+o(t.testCount)+" tests ",1),t.hookCount>0?(s(),a(V,{key:1},[_(" · "+o(t.hookCount)+" hooks ",1)],64)):k("",!0),t.waitCount>0?(s(),a(V,{key:2},[_(" · "+o(t.waitCount)+" waits ",1)],64)):k("",!0)]),u(F,{topic:"run.timeline"})]),n("div",Ir,[t.spanTypes.length>1?(s(),R(C,{key:0,content:{align:"end"}},{content:r(()=>[n("div",Sr,[(s(!0),a(V,null,oe(t.spanTypes,m=>(s(),R(l,{key:m.key,"model-value":m.checked,label:m.label,"onUpdate:modelValue":D=>b.$emit("toggleSpan",m.key,D===!0)},null,8,["model-value","label","onUpdate:modelValue"]))),128))])]),default:r(()=>[u($,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-list-filter","trailing-icon":"i-lucide-chevron-down",title:"Show or hide span types"},{default:r(()=>[...w[1]||(w[1]=[_(" Span types ",-1)])]),_:1})]),_:1})):k("",!0),t.live?k("",!0):(s(),R($,{key:1,size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-rotate-ccw",onClick:w[0]||(w[0]=m=>b.$emit("reset"))},{default:r(()=>[...w[2]||(w[2]=[_(" Reset view ",-1)])]),_:1}))])])}}}),Dr=Object.assign(zr,{__name:"TimelineHeader"}),Ee={barHeight:24,rowGap:8,labelWidth:80,sidePadding:16,axisHeight:28,get rowHeight(){return this.barHeight+this.rowGap}},Fr={passed:"#16a34a",failed:"#dc2626",timedOut:"#ea580c",running:"#2563eb",initialising:"#2563eb",skipped:"#9ca3af",cancelled:"#a1a1aa",interrupted:"#ea580c",flaky:"#ca8a04"},Te={fill:"#facc15",stroke:"#ca8a04",swatch:"#f59e0b"};function We(t){return Fr[t]||"#a1a1aa"}function Rt(t){return We(t)+"66"}function Tt(t){return We(t)}function Oe(t){return t<1e3?`${t}ms`:t<6e4?`${(t/1e3).toFixed(1)}s`:`${Math.floor(t/6e4)}m ${Math.floor(t%6e4/1e3)}s`}const Pr=["y","width","height"],jr=["y1","x2","y2"],Mr=["x1","y1","x2","y2"],Nr=["x1","y1","x2","y2"],Ar=["x","y"],Br=["y"],Ur=fe({__name:"TimelineGrid",props:{workerRows:{},shardGroups:{},tickMarks:{},contentWidth:{},shardTotal:{}},setup(t){const{barHeight:b,rowGap:w,axisHeight:F,rowHeight:$}=Ee;return(l,C)=>(s(),a("g",null,[(s(!0),a(V,null,oe(t.workerRows,(m,D)=>(s(),a("rect",{key:"bg-"+D,x:0,y:D*e($)+e(F),width:t.contentWidth,height:e($),class:J(D%2===1?"fill-black/[0.03] dark:fill-white/[0.03]":"fill-transparent")},null,10,Pr))),128)),(s(!0),a(V,null,oe(t.shardGroups.slice(1),m=>(s(),a("line",{key:"shard-sep-"+m.rowRange[0],x1:0,y1:m.rowRange[0]*e($)+e(F)-e(w)/2,x2:t.contentWidth,y2:m.rowRange[0]*e($)+e(F)-e(w)/2,stroke:"currentColor","stroke-dasharray":"4,3",class:"stroke-gray-400 dark:stroke-gray-500"},null,8,jr))),128)),n("line",{x1:e(Ee).labelWidth,y1:e(F),x2:t.contentWidth,y2:e(F),stroke:"currentColor",class:"stroke-gray-300 dark:stroke-gray-600"},null,8,Mr),(s(!0),a(V,null,oe(t.tickMarks,m=>(s(),a("g",{key:m.ms},[n("line",{x1:m.x,y1:e(F)-4,x2:m.x,y2:e(F),stroke:"currentColor",class:"stroke-gray-300 dark:stroke-gray-600"},null,8,Nr),n("text",{x:m.x,y:e(F)-8,"text-anchor":"middle",class:"fill-gray-400 text-[10px]"},o(m.label),9,Ar)]))),128)),(s(!0),a(V,null,oe(t.workerRows,(m,D)=>(s(),a("text",{key:"label-"+D,x:6,y:D*e($)+e(F)+e(b)/2+4,class:"fill-gray-500 text-[11px] font-medium"},o(m.shardIndex!=null&&t.shardTotal&&t.shardTotal>1?`S${m.shardIndex} W${m.workerIndex}`:`Worker ${m.workerIndex}`),9,Br))),128))]))}}),Lr=Object.assign(Ur,{__name:"TimelineGrid"}),Er=["x","y","width","height","fill","stroke"],Or=["x","y"],Wr=["x","y","width","height","fill","stroke"],Kr=["x1","y1","x2","y2","stroke"],Hr=["x1","y1","x2","y2","stroke"],Vr=["x","y"],Gr=["cx","cy"],Xr=["cx","cy"],qr=["x","y","width","height","fill"],Yr=["x","y"],Jr=fe({__name:"TimelineBar",props:{item:{},x:{},y:{},width:{}},emits:["select","hover","move","leave"],setup(t,{emit:b}){const w=t,F=b,{barHeight:$}=Ee,l=M(()=>["setup","hook","fixture"].includes(w.item.kind)),C=M(()=>w.item.testCaseId!=null),m=M(()=>C.value?"cursor-pointer":"cursor-default");function D(){w.item.testCaseId!=null&&F("select",w.item.testCaseId)}return(K,E)=>(s(),a("g",{class:"timeline-bar-group",onMouseenter:E[0]||(E[0]=N=>F("hover",t.item,N)),onMousemove:E[1]||(E[1]=N=>F("move",N)),onMouseleave:E[2]||(E[2]=N=>F("leave"))},[l.value?(s(),a(V,{key:0},[n("rect",{x:t.x,y:t.y,width:t.width,height:e($),rx:3,ry:3,fill:e(Rt)(t.item.status),stroke:e(Tt)(t.item.status),"stroke-width":"1","stroke-dasharray":"3,2",class:J(["timeline-bar-shape transition-opacity duration-100 opacity-80",m.value]),onClick:D},null,10,Er),t.width>60?(s(),a("text",{key:0,x:t.x+4,y:t.y+e($)/2+4,class:"fill-gray-600 dark:fill-gray-300 text-[9px] font-medium pointer-events-none"},o(t.item.title),9,Or)):k("",!0)],64)):t.item.kind==="wait"?(s(),a(V,{key:1},[n("rect",{x:t.x,y:t.y-3,width:t.width,height:e($)+6,rx:2,ry:2,fill:e(Te).fill,"fill-opacity":"0.28",stroke:e(Te).stroke,"stroke-width":"1.5",class:J(["timeline-bar-shape transition-opacity duration-100 opacity-90",m.value]),onClick:D},null,10,Wr),t.width>4?(s(),a("line",{key:0,x1:t.x+1,y1:t.y-3,x2:t.x+t.width-1,y2:t.y+e($)+3,stroke:e(Te).stroke,"stroke-width":"1","stroke-opacity":"0.25",class:"pointer-events-none"},null,8,Kr)):k("",!0),t.width>4?(s(),a("line",{key:1,x1:t.x+t.width-1,y1:t.y-3,x2:t.x+1,y2:t.y+e($)+3,stroke:e(Te).stroke,"stroke-width":"1","stroke-opacity":"0.25",class:"pointer-events-none"},null,8,Hr)):k("",!0),t.width>50?(s(),a("text",{key:2,x:t.x+4,y:t.y+e($)/2+4,class:"fill-yellow-800 dark:fill-yellow-200 text-[9px] font-bold pointer-events-none"}," wasted "+o(e(Oe)(t.item.duration)),9,Vr)):k("",!0)],64)):t.item.status==="running"?(s(),a(V,{key:2},[n("circle",{cx:t.x+6,cy:t.y+e($)/2,r:"3",fill:"#2563eb",filter:"url(#glow)",class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:D},null,8,Gr),n("circle",{cx:t.x+6,cy:t.y+e($)/2,r:"5",fill:"none",stroke:"#2563eb","stroke-width":"1.5","stroke-opacity":"0.4",filter:"url(#glow)",class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:D},null,8,Xr)],64)):(s(),a(V,{key:3},[n("rect",{x:t.x,y:t.y,width:t.width,height:e($),rx:3,ry:3,fill:e(We)(t.item.status),class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:D},null,8,qr),t.width>40?(s(),a("text",{key:0,x:t.x+4,y:t.y+e($)/2+4,class:"fill-white text-[10px] font-medium pointer-events-none"},o(e(Oe)(t.item.duration)),9,Yr)):k("",!0)],64))],32))}}),Zr=Object.assign(Jr,{__name:"TimelineBar"}),Qr={class:"flex items-center gap-2 mb-1"},el={class:"font-medium text-gray-900 dark:text-white max-w-64 truncate"},tl={class:"flex items-center gap-3 text-gray-500"},sl={class:"capitalize"},nl={key:0,class:"italic truncate max-w-48"},al=340,ol=fe({__name:"TimelineTooltip",props:{item:{},pos:{}},setup(t){const b=t,w=M(()=>{const $=b.item;return $?$.kind==="test"?{backgroundColor:We($.status)}:$.kind==="wait"?{backgroundColor:Te.swatch+"66",borderColor:Te.swatch}:{backgroundColor:Rt($.status),borderColor:Tt($.status)}:{}}),F=M(()=>{const{x:$,y:l}=b.pos;if(typeof window>"u")return{left:`${$+12}px`,top:`${l-10}px`};const C=$+12+al>window.innerWidth,m=l+90>window.innerHeight;return{left:C?void 0:`${$+12}px`,right:C?`${window.innerWidth-$+12}px`:void 0,top:m?void 0:`${l-10}px`,bottom:m?`${window.innerHeight-l+10}px`:void 0}});return($,l)=>(s(),R(Yt,{to:"body"},[t.item?(s(),a("div",{key:0,class:"fixed z-[9999] pointer-events-none rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 px-3 py-2 text-xs shadow-lg",style:he(F.value)},[n("div",Qr,[n("span",{class:J(["inline-block size-2.5 rounded-full shrink-0",{"border border-dashed":t.item.kind!=="test"}]),style:he(w.value)},null,6),n("span",el,[t.item.kind!=="test"?(s(),a("span",{key:0,class:J(["uppercase text-[10px] tracking-wider mr-1",t.item.kind==="wait"?"text-amber-500":"text-gray-500"])},o(t.item.kind),3)):k("",!0),_(" "+o(t.item.title),1)])]),n("div",tl,[n("span",sl,o(t.item.status),1),n("span",null,o(e(Oe)(t.item.duration)),1),n("span",null,"Worker "+o(t.item.workerIndex),1),t.item.parentTitle?(s(),a("span",nl," for "+o(t.item.parentTitle),1)):k("",!0)])],4)):k("",!0)]))}}),rl=Object.assign(ol,{__name:"TimelineTooltip"}),ll=["Wait for timeout*","*waitForTimeout*"];function il(t){const b=t.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${b}$`,"i")}const lt=new Map;function ul(t){let b=lt.get(t);return b||(b=il(t),lt.set(t,b)),b}function dl(t,b){if(!b||b.length===0)return!1;const w=t.title??"",F=t.location??"";for(const $ of b){const l=ul($);if(l.test(w)||F&&l.test(F))return!0}return!1}function cl(t){const b=new Map;for(const w of t){const F=w.workerIndex;if(F==null||F<0)continue;const $=w.shardIndex??null,l=`${$??"null"}|${F}`;let C=b.get(l);C||(C={shardIndex:$,workerIndex:F,cases:[]},b.set(l,C)),C.cases.push(w)}return[...b.values()].sort((w,F)=>{const $=w.shardIndex??1/0,l=F.shardIndex??1/0;return $!==l?$-l:w.workerIndex-F.workerIndex})}function Be(t){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?t:null;if(t instanceof Date)return t.getTime();const b=new Date(t).getTime();return Number.isNaN(b)?null:b}function ml(t,b){return t.category==="wait"?dl(t,b)?"wait":null:t.category==="hook"||t.category==="fixture"?t.category:null}function fl(t){const b=M(()=>t.wastedPatterns&&t.wastedPatterns.length>0?t.wastedPatterns:ll),w=M(()=>cl(t.testCases)),F=M(()=>{const m=w.value,D=b.value;let K=1/0;for(const H of m)for(const U of H.cases){const j=Be(U.startedAt);j!=null&&j>0&&(K=Math.min(K,j))}const E=Number.isFinite(K),N=H=>Math.max(0,(Be(H)??K)-K),I=[],A=new Map;if(m.forEach((H,U)=>{const j=[],g=E?H.cases:[...H.cases].sort((d,c)=>(Be(d.startedAt)??0)-(Be(c.startedAt)??0));let f=0;for(const d of g){const c=d.duration??1e3,S=E?N(d.startedAt):f;j.push({key:`t${d.id}`,kind:"test",testCaseId:d.id,title:d.title,status:d.status,workerIndex:H.workerIndex,start:S,duration:c,rowIndex:U}),f=S+c,(d.stepEvents??[]).forEach((x,P)=>{const Q=ml(x,D);if(!Q)return;const Z=x.duration||0,ne=E?N(x.startedAt):f;j.push({key:`s${d.id}:${P}`,kind:Q,testCaseId:d.id,title:x.title,status:x.status||"passed",workerIndex:H.workerIndex,start:ne,duration:Z,rowIndex:U,parentTitle:d.title}),f=ne+Z})}j.sort((d,c)=>d.start-c.start),I.push(...j),A.has(H.workerIndex)||A.set(H.workerIndex,f)}),t.setupSteps&&t.setupSteps.length>0){const H=new Map;m.forEach((U,j)=>{H.has(U.workerIndex)||H.set(U.workerIndex,j)}),t.setupSteps.forEach((U,j)=>{const g=U.workerIndex;if(g==null||g<0)return;const f=H.get(g);if(f==null)return;const d=U.duration||0;let c;E?c=N(U.startedAt):(c=A.get(g)??0,A.set(g,c+d)),I.push({key:`setup${g}:${j}`,kind:"setup",testCaseId:null,title:`[Setup] ${U.title}`,status:U.status||"passed",workerIndex:g,start:c,duration:d,rowIndex:f,parentTitle:null})})}return I}),$=M(()=>w.value.map(m=>({shardIndex:m.shardIndex,workerIndex:m.workerIndex}))),l=M(()=>{const m=[];for(let D=0;D<$.value.length;D++){const K=$.value[D],E=m[m.length-1];!E||E.shardIndex!==K.shardIndex?m.push({shardIndex:K.shardIndex,rowRange:[D,D]}):E.rowRange[1]=D}return m}),C=M(()=>{let m=0;for(const D of F.value)m=Math.max(m,D.start+D.duration);return m||6e4});return{timelineData:F,workerRows:$,shardGroups:l,maxTime:C}}const it=1.12,gl=10,pl=100,Ge=[10,20,50,100,200,500,1e3,2e3,5e3,1e4,15e3,3e4,6e4,12e4,3e5,6e5,9e5,18e5,36e5];function yl(t){const{containerRef:b,maxTime:w,rowCount:F,hasData:$,live:l}=t,{labelWidth:C,sidePadding:m,axisHeight:D,rowHeight:K}=Ee,E=O(1),N=O(0),I=O(!1),A=O(0),H=O(0),U=M(()=>.5*E.value),j=M(()=>w.value*U.value+C+m),g=M(()=>F.value*K+D);function f(v){return v.start*U.value+C}function d(v){return Math.max(v.duration*U.value,3)}function c(v){return v.rowIndex*K+D}function S(){const v=b.value?.clientWidth;if(!v||w.value<=0)return 1;const q=(v-C)/w.value;return Math.min(1,q/.5)}function y(){const v=S();v>0&&(E.value=v,N.value=0)}function x(v){if(!b.value)return v;const q=b.value.clientWidth;return j.value<=q?0:Math.max(q-j.value,Math.min(0,v))}function P(v,q){const ae=Math.max(S(),Math.min(gl,v)),se=ae/E.value;E.value=ae,N.value=x(q-(q-N.value)*se)}const Q=M(()=>{const v=pl/U.value;let q=Ge.find(se=>se>=v)??Ge[Ge.length-1];for(;w.value/q>1e3;)q*=2;const ae=[];for(let se=0;se<=w.value;se+=q)ae.push({ms:se,x:se*U.value+C,label:Oe(se)});return ae});function Z(v){if(l())return;const q=v.deltaY>0?1/it:it,ae=b.value?.getBoundingClientRect();P(E.value*q,ae?v.clientX-ae.left:0)}const ne=4,ee=new Map;let B=null,z=0,i=1,ue=0;function h(v,q){B=v,A.value=q,H.value=N.value}function T(v){if(!l()&&!(v.pointerType==="mouse"&&v.button!==0)){if(ee.set(v.pointerId,{x:v.clientX,y:v.clientY}),ee.size===1)h(v.pointerId,v.clientX);else if(ee.size===2){B=null,I.value=!1;for(const ge of ee.keys())b.value?.setPointerCapture?.(ge);const[q,ae]=[...ee.values()];z=Math.hypot(q.x-ae.x,q.y-ae.y)||1,i=E.value;const se=b.value?.getBoundingClientRect();ue=(q.x+ae.x)/2-(se?.left??0)}v.preventDefault()}}function G(v){if(!(l()||!ee.has(v.pointerId))){if(ee.set(v.pointerId,{x:v.clientX,y:v.clientY}),ee.size>=2){const[q,ae]=[...ee.values()],se=Math.hypot(q.x-ae.x,q.y-ae.y)||1;P(i*(se/z),ue);return}I.value?N.value=x(H.value+(v.clientX-A.value)):B===v.pointerId&&Math.abs(v.clientX-A.value)>ne&&(b.value?.setPointerCapture?.(v.pointerId),I.value=!0,N.value=x(H.value+(v.clientX-A.value)))}}function te(v){if(ee.delete(v.pointerId),B===v.pointerId&&(B=null),b.value?.releasePointerCapture?.(v.pointerId),ee.size===1){const[q]=[...ee.entries()];h(q[0],q[1].x)}else ee.size===0&&(I.value=!1)}function de(){y()}let Y=null;return Jt(()=>{Ie(y),b.value&&(Y=new ResizeObserver(()=>y()),Y.observe(b.value))}),mt(()=>{Y?.disconnect()}),me(()=>[l(),$.value,w.value,F.value],([v,q])=>{v&&q&&Ie(y)}),{panX:N,isPanning:I,pxPerMs:U,contentWidth:j,contentHeight:g,getBarX:f,getBarWidth:d,getBarTop:c,tickMarks:Q,onWheel:Z,onPointerDown:T,onPointerMove:G,onPointerUp:te,resetView:de}}const xl={key:0,class:"relative select-none"},hl=["width","height"],vl={key:1,class:"text-center py-10 text-gray-500"},kl=fe({__name:"WorkersTimeline",props:{testCases:{},setupSteps:{},shardTotal:{},live:{type:Boolean},wastedPatterns:{}},emits:["selectTestCase"],setup(t,{emit:b}){const w=t,F=b,{timelineData:$,workerRows:l,shardGroups:C,maxTime:m}=fl(w),D=O(null),K=M(()=>l.value.length),E=M(()=>$.value.length>0),{panX:N,isPanning:I,contentWidth:A,contentHeight:H,getBarX:U,getBarWidth:j,getBarTop:g,tickMarks:f,onWheel:d,onPointerDown:c,onPointerMove:S,onPointerUp:y,resetView:x}=yl({containerRef:D,maxTime:m,rowCount:K,hasData:E,live:()=>w.live}),P=M(()=>$.value.filter(Y=>Y.kind==="test").length),Q=M(()=>$.value.filter(Y=>Y.kind!=="test"&&Y.kind!=="wait").length),Z=M(()=>$.value.filter(Y=>Y.kind==="wait").length),ne=["test","setup","hook","fixture","wait"],ee={test:"Tests",setup:"Setup (beforeAll/afterAll)",hook:"Hooks",fixture:"Fixtures",wait:"Wasted waits"},B=O({}),z=M(()=>$.value.filter(Y=>!B.value[Y.kind])),i=M(()=>{const Y=new Set($.value.map(v=>v.kind));return ne.filter(v=>Y.has(v)).map(v=>({key:v,label:ee[v],checked:!B.value[v]}))});function ue(Y,v){B.value={...B.value,[Y]:!v}}const h=O(null),T=O({x:0,y:0});me(z,Y=>{h.value&&(h.value=Y.find(v=>v.key===h.value.key)??null)});function G(Y,v){h.value=Y,T.value={x:v.clientX,y:v.clientY}}function te(Y){T.value={x:Y.clientX,y:Y.clientY}}function de(){h.value=null}return(Y,v)=>{const q=Dr,ae=Lr,se=Zr,ge=rl,Ce=ke;return e($).length>0?(s(),a("div",xl,[u(q,{"worker-count":e(l).length,"shard-total":t.shardTotal,"test-count":P.value,"hook-count":Q.value,"wait-count":Z.value,"span-types":i.value,live:t.live,onToggleSpan:ue,onReset:e(x)},null,8,["worker-count","shard-total","test-count","hook-count","wait-count","span-types","live","onReset"]),n("div",{ref_key:"containerRef",ref:D,class:J(["relative overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700 touch-pan-y",{"cursor-grab":!e(I),"cursor-grabbing":e(I)}]),style:he({height:e(H)+"px"}),onWheel:v[1]||(v[1]=Ue((...re)=>e(d)&&e(d)(...re),["prevent"])),onPointerdown:v[2]||(v[2]=(...re)=>e(c)&&e(c)(...re)),onPointermove:v[3]||(v[3]=(...re)=>e(S)&&e(S)(...re)),onPointerup:v[4]||(v[4]=(...re)=>e(y)&&e(y)(...re)),onPointercancel:v[5]||(v[5]=(...re)=>e(y)&&e(y)(...re)),onPointerleave:v[6]||(v[6]=(...re)=>e(y)&&e(y)(...re))},[(s(),a("svg",{class:"overflow-visible",style:he({transform:`translateX(${e(N)}px)`}),width:e(A),height:e(H)},[v[7]||(v[7]=n("defs",null,[n("filter",{id:"glow"},[n("feGaussianBlur",{stdDeviation:"2.5",result:"blur"}),n("feMerge",null,[n("feMergeNode",{in:"blur"}),n("feMergeNode",{in:"SourceGraphic"})])])],-1)),u(ae,{"worker-rows":e(l),"shard-groups":e(C),"tick-marks":e(f),"content-width":e(A),"shard-total":t.shardTotal},null,8,["worker-rows","shard-groups","tick-marks","content-width","shard-total"]),(s(!0),a(V,null,oe(z.value,re=>(s(),R(se,{key:re.key,item:re,x:e(U)(re),y:e(g)(re),width:e(j)(re),onSelect:v[0]||(v[0]=we=>F("selectTestCase",we)),onHover:G,onMove:te,onLeave:de},null,8,["item","x","y","width"]))),128))],12,hl))],38),u(ge,{item:h.value,pos:T.value},null,8,["item","pos"])])):(s(),a("div",vl,[u(Ce,{name:"i-lucide-rows-3",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),v[8]||(v[8]=n("p",null,"No worker data available for this run.",-1))]))}}}),bl=Object.assign(kl,{__name:"WorkersTimeline"}),_l={key:0,class:"space-y-4"},wl={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},$l={class:"flex items-center gap-2 py-1.5"},Cl={class:"font-medium"},Rl={key:0,class:"flex"},Tl={key:1,class:"flex items-center justify-center py-6 text-gray-500 gap-2"},Il={class:"flex flex-wrap gap-2 mt-1"},Sl={class:"flex flex-wrap gap-4 text-sm"},zl={key:3,class:"text-sm text-gray-500"},Dl={class:"flex flex-wrap gap-4 text-sm"},Fl={key:0,class:"text-gray-400"},Pl={key:0,class:"text-gray-400"},jl={key:0},Ml={key:1,class:"text-gray-400"},Nl={key:0},Al={key:1,class:"text-gray-400"},Bl={key:0,class:"text-gray-400"},Ul={key:0,class:"text-gray-400"},Ll={key:4,class:"text-center py-8 text-gray-500"},El={key:5,class:"text-center py-8 text-gray-500"},Ol={key:1,class:"text-center py-10 text-gray-500"},Wl=fe({__name:"RunCompare",props:{testRun:{}},setup(t){const b=t,F=Ae().params.id,$=O(null),l=O([]),C=M(()=>b.testRun?.status==="running"||b.testRun?.status==="finalizing");me(()=>b.testRun?.projectId,async f=>{if(!(!f||C.value)){try{$.value=await $fetch(`/api/projects/${f}`)}catch(d){console.error("Failed to fetch project for RunCompare",d)}try{const d=await $fetch(`/api/projects/${f}/markers`);l.value=d.markers??[]}catch{}}},{immediate:!0});const m=M(()=>{if(!N.value||!b.testRun)return[];const f=new Date(N.value.startTime).getTime(),d=new Date(b.testRun.startTime).getTime(),c=Math.min(f,d),S=Math.max(f,d),y=new Set([N.value.environment,b.testRun.environment].filter(x=>x!=null));return l.value.filter(x=>{const P=new Date(x.occurredAt).getTime();return P<=c||P>=S?!1:x.environment==null||y.has(x.environment)})}),D=M(()=>$.value?.testRuns?$.value.testRuns.filter(f=>f.id!==Number(F)).slice(0,50).map(f=>({label:`Run #${f.id} — ${pt(f.startTime,{dateOnly:!0})} (${f.status})`,value:f.id})):[]),K=M(()=>{if(!$.value?.testRuns)return null;const f=[...$.value.testRuns].sort((c,S)=>new Date(S.startTime).getTime()-new Date(c.startTime).getTime()),d=f.findIndex(c=>c.id===Number(F));return d>=0&&d<f.length-1?f[d+1].id:null}),E=O(void 0),N=O(null),I=O(!1);me(E,async f=>{if(!f?.value){N.value=null;return}I.value=!0;try{N.value=await $fetch(`/api/test-runs/${f.value}`)}catch{}finally{I.value=!1}});function A(){if(K.value){const f=D.value.find(d=>d.value===K.value);f&&(E.value=f)}}const H=M(()=>b.testRun??null),{comparisonData:U,comparisonSummary:j}=Is(N,H),g=[{accessorKey:"title",header:ie("Test case")},{accessorKey:"statusA",header:ie("Status A")},{accessorKey:"statusB",header:ie("Status B")},{accessorKey:"durationA",header:ie("Duration A")},{accessorKey:"durationB",header:ie("Duration B")},{accessorKey:"delta",header:ie("Delta")},{accessorKey:"percentChange",header:ie("Change")}];return(f,d)=>{const c=Cs,S=Rs,y=_e,x=ke,P=gt,Q=Ts,Z=be,ne=Je,ee=$t;return s(),a("div",null,[t.testRun&&!C.value?(s(),a("div",_l,[n("div",wl,[n("div",null,[d[1]||(d[1]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run A (baseline)",-1)),u(c,{modelValue:E.value,"onUpdate:modelValue":d[0]||(d[0]=B=>E.value=B),items:D.value,placeholder:"Select a baseline run..."},null,8,["modelValue","items"])]),n("div",null,[d[2]||(d[2]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run B (this run)",-1)),n("div",$l,[u(S,{status:t.testRun.status},null,8,["status"]),n("span",Cl,"#"+o(t.testRun.id),1)])])]),K.value?(s(),a("div",Rl,[u(y,{icon:"i-lucide-arrow-left-right",size:"sm",variant:"outline",label:"Compare with previous run",onClick:A})])):k("",!0),I.value?(s(),a("div",Tl,[u(x,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),d[3]||(d[3]=n("span",null,"Loading baseline data...",-1))])):m.value.length>0?(s(),R(Q,{key:2,color:"warning",variant:"subtle",icon:"i-lucide-milestone",title:`${m.value.length} timeline marker${m.value.length>1?"s":""} between these runs`},{description:r(()=>[n("div",Il,[(s(!0),a(V,null,oe(m.value,B=>(s(),R(P,{key:B.id,marker:B,size:"sm"},null,8,["marker"]))),128))])]),_:1},8,["title"])):N.value&&e(U).length>0?(s(),a(V,{key:3},[n("div",Sl,[d[4]||(d[4]=n("span",{class:"text-xs font-semibold text-gray-500 uppercase tracking-wider mr-1"},"Status",-1)),e(j).newFailures>0?(s(),R(Z,{key:0,color:"error",variant:"soft",size:"lg"},{default:r(()=>[_(o(e(j).newFailures)+" new failure"+o(e(j).newFailures>1?"s":""),1)]),_:1})):k("",!0),e(j).recovered>0?(s(),R(Z,{key:1,color:"success",variant:"soft",size:"lg"},{default:r(()=>[_(o(e(j).recovered)+" recovered ",1)]),_:1})):k("",!0),e(j).stillFailing>0?(s(),R(Z,{key:2,color:"warning",variant:"soft",size:"lg"},{default:r(()=>[_(o(e(j).stillFailing)+" still failing ",1)]),_:1})):k("",!0),e(j).newFailures===0&&e(j).recovered===0&&e(j).stillFailing===0?(s(),a("span",zl,"No status changes")):k("",!0)]),n("div",Dl,[d[5]||(d[5]=n("span",{class:"text-xs font-semibold text-gray-500 uppercase tracking-wider mr-1"},"Duration changes",-1)),e(j).regressed>0?(s(),R(Z,{key:0,color:"error",variant:"soft",size:"lg"},{default:r(()=>[_(o(e(j).regressed)+" regressed ",1)]),_:1})):k("",!0),e(j).improved>0?(s(),R(Z,{key:1,color:"success",variant:"soft",size:"lg"},{default:r(()=>[_(o(e(j).improved)+" improved ",1)]),_:1})):k("",!0),u(Z,{color:"neutral",variant:"soft",size:"lg"},{default:r(()=>[_(o(e(j).unchanged)+" unchanged ",1)]),_:1})]),u(ee,{"min-width":"48rem",bleed:!1},{default:r(()=>[u(ne,{data:e(U),columns:g,ui:{base:"table-fixed border-separate border-spacing-0 min-w-[48rem]",thead:"[&>tr]:bg-elevated/50 [&>tr]:after:content-none",tbody:"[&>tr]:last:[&>td]:border-b-0",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"statusA-cell":r(({row:B})=>[B.original.statusA?(s(),R(Z,{key:1,color:("getStatusColor"in f?f.getStatusColor:e(Le))(B.original.statusA),class:"capitalize"},{default:r(()=>[_(o(B.original.statusA),1)]),_:2},1032,["color"])):(s(),a("span",Fl,"—"))]),"statusB-cell":r(({row:B})=>[B.original.statusB?(s(),R(Z,{key:1,color:("getStatusColor"in f?f.getStatusColor:e(Le))(B.original.statusB),class:"capitalize"},{default:r(()=>[_(o(B.original.statusB),1)]),_:2},1032,["color"])):(s(),a("span",Pl,"—"))]),"durationA-cell":r(({row:B})=>[B.original.durationA!==null?(s(),a("span",jl,o(("formatDuration"in f?f.formatDuration:e(xe))(B.original.durationA)),1)):(s(),a("span",Ml,"—"))]),"durationB-cell":r(({row:B})=>[B.original.durationB!==null?(s(),a("span",Nl,o(("formatDuration"in f?f.formatDuration:e(xe))(B.original.durationB)),1)):(s(),a("span",Al,"—"))]),"delta-cell":r(({row:B})=>[B.original.delta===null?(s(),a("span",Bl,"—")):(s(),a("span",{key:1,class:J(B.original.delta>0?"text-red-600":B.original.delta<0?"text-green-600":"text-gray-500")},o(B.original.delta>0?"+":"")+o(("formatDuration"in f?f.formatDuration:e(xe))(B.original.delta)),3))]),"percentChange-cell":r(({row:B})=>[B.original.percentChange===null?(s(),a("span",Ul,"—")):(s(),a("span",{key:1,class:J(B.original.percentChange>10?"text-red-600 font-medium":B.original.percentChange<-10?"text-green-600 font-medium":"text-gray-500")},o(B.original.percentChange>0?"+":"")+o(B.original.percentChange)+"% ",3))]),_:1},8,["data"])]),_:1})],64)):E.value&&!I.value?(s(),a("div",Ll,[u(x,{name:"i-lucide-git-compare-arrows",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),d[6]||(d[6]=n("p",null,"No comparison data available.",-1))])):(s(),a("div",El,[u(x,{name:"i-lucide-arrow-left-right",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),d[7]||(d[7]=n("p",null,"Select a baseline run to compare.",-1))]))])):C.value?(s(),a("div",Ol,[u(x,{name:"i-lucide-git-compare-arrows",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),d[8]||(d[8]=n("p",null,"Comparison is available after the run finishes.",-1))])):k("",!0)])}}}),Kl=Object.assign(Wl,{__name:"RunCompare"}),Hl={class:"flex flex-col overflow-hidden"},Vl={key:0,class:"flex-1 flex items-center justify-center text-gray-500 gap-2"},Gl={class:"text-xs font-mono break-all"},Xl={key:0,class:"text-gray-400"},ql={key:1,class:"text-red-600 font-medium"},Yl={key:2,class:"flex-1 flex items-center justify-center text-center text-gray-500"},Jl=fe({__name:"SlowEndpoints",props:{refreshKey:{}},emits:["endpointsCount"],async setup(t,{emit:b}){let w,F;const l=Ae().params.id,C=t,m=b,{data:D,pending:K,refresh:E}=([w,F]=je(()=>Me(`/api/test-runs/${l}/network-requests`,{lazy:!0,server:!1},"$DE3r8oSbIq")),w=await w,F(),w);me(D,I=>{m("endpointsCount",I?.length??0)}),me(()=>C.refreshKey,(I,A)=>{I!==A&&I!==void 0&&E()});const N=[{accessorKey:"method",header:ie("Method")},{accessorKey:"route",header:ie("Route")},{accessorKey:"count",header:ie("Calls")},{accessorKey:"avgDuration",header:ie("Avg")},{accessorKey:"p90Duration",header:ie("P90")},{accessorKey:"maxDuration",header:ie("Max")},{accessorKey:"errorRate",header:ie("Errors")}];return(I,A)=>{const H=ke,U=be,j=Je;return s(),a("div",Hl,[e(K)?(s(),a("div",Vl,[u(H,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),A[0]||(A[0]=n("span",null,"Loading network data...",-1))])):e(D)&&e(D).length>0?(s(),R(j,{key:1,sticky:"",data:e(D),columns:N,class:"flex-1 min-h-0",ui:{base:"table-fixed border-separate border-spacing-0 min-w-[44rem]",thead:"[&>tr]:bg-elevated/50 [&>tr]:after:content-none",tbody:"[&>tr]:last:[&>td]:border-b-0 [&>tr]:hover:bg-gray-50 dark:[&>tr]:hover:bg-gray-900/50",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"method-cell":r(({row:g})=>[u(U,{color:g.original.method==="GET"?"info":g.original.method==="POST"?"success":g.original.method==="PUT"||g.original.method==="PATCH"?"warning":g.original.method==="DELETE"?"error":"neutral",variant:"soft",class:"font-mono text-xs"},{default:r(()=>[_(o(g.original.method),1)]),_:2},1032,["color"])]),"route-cell":r(({row:g})=>[n("code",Gl,o(g.original.route),1)]),"avgDuration-cell":r(({row:g})=>[n("span",{class:J(g.original.avgDuration>1e3?"text-red-600 font-medium":g.original.avgDuration>500?"text-orange-500 font-medium":"")},o(("formatDuration"in I?I.formatDuration:e(xe))(g.original.avgDuration)),3)]),"p90Duration-cell":r(({row:g})=>[n("span",{class:J(g.original.p90Duration>2e3?"text-red-600 font-medium":g.original.p90Duration>1e3?"text-orange-500":"")},o(("formatDuration"in I?I.formatDuration:e(xe))(g.original.p90Duration)),3)]),"errorRate-cell":r(({row:g})=>[g.original.errorRate===0?(s(),a("span",Xl,"0%")):(s(),a("span",ql,o(g.original.errorRate)+"%",1))]),_:1},8,["data"])):(s(),a("div",Yl,[u(H,{name:"i-lucide-wifi-off",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),A[1]||(A[1]=n("p",null,[_(" No network request data. Add the "),n("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 rounded font-mono"},"@piwitests/reporter"),_(" fixtures to your test setup. ")],-1))]))])}}}),Zl=Object.assign(Jl,{__name:"SlowEndpoints"}),Ql={class:"inline-flex items-center justify-center w-5 h-5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors ml-1"},ei={key:0,class:"flex items-center gap-2 mb-3 shrink-0"},Qi=fe({__name:"[id]",async setup(t){let b,w;const F=Ae(),$=Zt(),l=F.params.id,C=!!Qt().public.demoMode,{data:m,refresh:D}=([b,w]=je(()=>Me(`/api/test-runs/${l}`,"$D01RBpMFGT")),b=await b,w(),b),K=m.value?.projectId,{data:E,refresh:N}=K?([b,w]=je(()=>Me(`/api/projects/${K}/latest-run`,{key:`latest-run-${K}`},"$e4OLHgXNMR")),b=await b,w(),b):{data:O(null),refresh:async()=>{}};Ss(N);const I=M(()=>E.value?.id??m.value?.project?.latestRunId??null),A=M(()=>E.value?.status??m.value?.project?.latestRunStatus??null),H=M(()=>A.value==="running"||A.value==="finalizing");es(M(()=>({title:`Test run #${l}${m.value?.project?` — ${m.value.project.name}`:""} — Piwi Dashboard`})));const U=ut(),j=O(!1),g=O(!1),f=M(()=>m.value?.status==="running"||m.value?.status==="finalizing"),d=O(!1),c=O([]),S=new Map,y=O(null);let x=null;const P=O([]);me([f,m],()=>{f.value&&c.value.length>0?P.value=[...c.value]:m.value?.testCases?P.value=m.value.testCases:P.value=[]},{immediate:!0});function Q(L){for(const W of L){const le=`${W.title}@@${W.location}@@${JSON.stringify(W.browser)}`;S.has(le)||(S.set(le,!0),c.value=[...c.value,W])}P.value=[...c.value]}let Z=[],ne=null;function ee(){if(Z.length===0)return;const L=Z;Z=[];for(const W of L){const le=W.data;if(W.type==="init")y.value={totalTests:le.totalTests,passedTests:le.passedTests,failedTests:le.failedTests,skippedTests:le.skippedTests};else if(W.type==="test-begin"){const X=le;if(X.stepCategory)continue;const $e=`${X.title}@@${X.location}@@${JSON.stringify(X.browser)}`;S.has($e)||(S.set($e,!0),c.value=[...c.value,{id:c.value.length+1,title:X.title,filePath:X.filePath,suitePath:X.suitePath??void 0,status:"running",location:X.location,workerIndex:X.workerIndex??null,startedAt:X.startedAt??Date.now(),browser:X.browser??null}],P.value=[...c.value])}else if(W.type==="test-completed"){const X=le;if(X.stepCategory)continue;const $e=`${X.title}@@${X.location}@@${JSON.stringify(X.browser)}`;if(S.has($e)){const Fe=c.value.findIndex(pe=>`${pe.title}@@${pe.location}@@${JSON.stringify(pe.browser)}`===$e);if(Fe>=0){const pe=c.value[Fe],Pe=[...c.value];Pe[Fe]={...pe,filePath:X.filePath??pe.filePath,suitePath:X.suitePath??pe.suitePath,status:X.status,duration:X.duration,error:X.error,stepEvents:X.stepEvents??pe.stepEvents,wastedTimeMs:X.wastedTimeMs??pe.wastedTimeMs,workerIndex:X.workerIndex??pe.workerIndex,startedAt:X.startedAt?X.startedAt:pe.startedAt,browser:X.browser??pe.browser},c.value=Pe,P.value=[...Pe]}}else S.set($e,!0),c.value=[...c.value,{id:c.value.length+1,title:X.title,filePath:X.filePath,suitePath:X.suitePath??void 0,status:X.status,duration:X.duration,location:X.location,error:X.error,stepEvents:X.stepEvents??null,wastedTimeMs:X.wastedTimeMs??null,workerIndex:X.workerIndex??null,startedAt:X.startedAt??void 0,browser:X.browser??null}],P.value=[...c.value]}else W.type==="run-progress"?y.value=le:W.type==="run-finalizing"?(d.value=!0,y.value=le):W.type==="run-finished"&&(d.value=!1,T(),D(),ve.value++,B())}}function B(L=0){C||L>=5||setTimeout(async()=>{await D(),B(L+1)},1500*(L+1))}function z(L){Z.push(L),ne&&clearTimeout(ne),ne=setTimeout(ee,200)}let i=null;function ue(){i||(m.value?.testCases?.length&&Q(m.value.testCases),i=zs(L=>{L.scope==="run"&&L.runId===Number(l)?z(L.event):L.scope==="global"&&L.event.runId===Number(l)&&L.event.type==="run-started"&&D()}))}function h(){if(C){ue();return}x||f.value&&(m.value?.testCases?.length&&Q(m.value.testCases),x=new EventSource(`/api/test-runs/${l}/stream`),x.onmessage=L=>{try{z(JSON.parse(L.data))}catch{}},x.onerror=()=>{})}function T(){x&&(x.close(),x=null),i&&(i(),i=null)}const G=M(()=>f.value||C&&m.value?.status==="initialising");me(G,L=>{L?h():T()},{immediate:!0}),mt(()=>{T()});let te=null;const de=O([]);me(P,L=>{te===null&&(te=requestAnimationFrame(()=>{de.value=L,te=null}))},{immediate:!0});const Y=M(()=>f.value&&y.value?y.value:m.value?{totalTests:m.value.totalTests,passedTests:m.value.passedTests,failedTests:m.value.failedTests,skippedTests:m.value.skippedTests}:null);async function v(){j.value=!1,g.value=!0;try{await $fetch(`/api/test-runs/${l}`,{method:"DELETE"}),U.add({title:"Test run deleted",color:"success"}),await Xe(`/projects/${m.value?.project?.id}`)}catch(L){const W=L&&typeof L=="object"&&"data"in L?L.data?.message:void 0;U.add({title:"Delete failed",description:W||"An error occurred",color:"error"})}finally{g.value=!1}}const q=O(!1),ae=O(""),se=O([]),ge=O("all"),Ce=M(()=>se.value.length===1?se.value[0]:"all");function re(L){se.value=!L||L==="all"?[]:[L]}const we=M(()=>m.value?.reports||[]),ze=M(()=>{const L=P.value;return L?L.reduce((W,le)=>W+(le.wastedTimeMs??0),0):0}),ye=O("test-cases"),p=O(null),ve=O(0),De=O(0);function Ze(){p.value=null}const Qe=M(()=>m.value&&m.value.failedTests>0),It=M(()=>{if(!m.value?.testCases)return 0;const L=new Set;for(const W of m.value.testCases)W.failureClusterId!=null&&L.add(W.failureClusterId);return L.size}),et=M(()=>{const L=f.value?P.value:m.value?.testCases;if(!L||L.length===0)return 0;const W=new Set;for(const le of L)le.workerIndex!=null&&le.workerIndex>=0&&W.add(le.workerIndex);return W.size}),tt=M(()=>[{label:`Test cases (${P.value.length})`,icon:"i-lucide-beaker",value:"test-cases",slot:"test-cases"},{label:"Insights",icon:"i-lucide-sparkles",value:"insights",slot:"insights"},...Qe.value?[{label:`Failure groups (${It.value})`,icon:"i-lucide-layers",value:"failure-groups",slot:"failure-groups"}]:[],...Qe.value?[{label:"Regression",icon:"i-lucide-git-pull-request-arrow",value:"regression",slot:"regression"}]:[],{label:`Timeline${et.value>0?` (${et.value})`:""}`,icon:"i-lucide-timeline",value:"workers",slot:"workers"},{label:"Compare",icon:"i-lucide-git-compare-arrows",value:"compare",slot:"compare"},{label:`Slow endpoints${De.value>0?` (${De.value})`:""}`,icon:"i-lucide-network",value:"endpoints",slot:"endpoints"}]),St={"test-cases":"overflow-hidden flex flex-col",endpoints:"overflow-hidden flex flex-col"},st=M(()=>tt.value.map(L=>L.value));typeof F.query.tab=="string"&&st.value.includes(F.query.tab)&&(ye.value=F.query.tab),me(st,L=>{L.includes(ye.value)||(ye.value="test-cases")}),me(ye,L=>{F.query.tab!==L&&$.replace({query:{...F.query,tab:L}})});const nt=O(null);function zt(L){ye.value="test-cases",Ie(()=>{nt.value?.scrollToCase(L)})}function Dt(L){p.value=L,ye.value="test-cases"}return(L,W)=>{const le=Vt,X=Ne,$e=ke,Fe=ft,pe=ts,Pe=ss,Ft=as,Pt=Pn,jt=be,Ke=_e,Mt=Ia,Nt=Ro,At=Yo,Bt=Cr,Ut=bl,Lt=Kl,Et=Zl,Ot=us,Wt=ns,Kt=Ct,Ht=ct;return s(),a(V,null,[u(Wt,{id:"test-run-detail"},{header:r(()=>[u(Ft,null,{leading:r(()=>[u(le),u(pe,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},...e(m)?.project?.id?[{label:e(m).project.label||e(m).project.name||"Project",to:`/projects/${e(m).project.id}`,slot:"project"}]:[{label:"Project"}],{label:`Run #${e(l)}`+(e(m)?.label?` — ${e(m).label}`:"")}]},{project:r(({item:ce})=>[u(X,{to:ce?.to,class:"text-sm font-medium text-[var(--ui-text-muted)] hover:text-[var(--ui-text)] transition-colors"},{default:r(()=>[_(o(ce?.label),1)]),_:2},1032,["to"]),I.value&&I.value!==Number(e(l))?(s(),R(Fe,{key:0,text:H.value?"Go to running run":"Go to latest run"},{default:r(()=>[u(X,{to:`/test-runs/${I.value}`},{default:r(()=>[n("span",Ql,[u($e,{name:"i-lucide-circle-play",class:J(["w-3.5 h-3.5 text-blue-500",{"animate-pulse":H.value}])},null,8,["class"])])]),_:1},8,["to"])]),_:1},8,["text"])):k("",!0)]),_:1},8,["items"])]),right:r(()=>[u(Pe,{actions:[{label:"Refresh",icon:"i-lucide-refresh-cw",onClick:()=>e(D)()},{label:"Delete",icon:"i-lucide-trash-2",color:"error",variant:"soft",loading:e(g),onClick:()=>j.value=!0}]},null,8,["actions"])]),_:1})]),body:r(()=>[u(Ot,{modelValue:e(ye),"onUpdate:modelValue":W[5]||(W[5]=ce=>Re(ye)?ye.value=ce:null),"tab-items":tt.value,"tab-panel-class":St},{summary:r(()=>[e(m)?(s(),R(Pt,{key:0,"test-run":e(m),"display-progress":Y.value,"all-reports":we.value,"show-custom-data":e(q),finalizing:e(d),"active-filter":Ce.value,"total-wasted-time":ze.value,"onUpdate:showCustomData":W[0]||(W[0]=ce=>q.value=ce),onFilterStatus:re,onLabelUpdated:e(D)},null,8,["test-run","display-progress","all-reports","show-custom-data","finalizing","active-filter","total-wasted-time","onLabelUpdated"])):k("",!0)]),"tab-test-cases":r(()=>[e(p)!=null?(s(),a("div",ei,[u(jt,{color:"info",variant:"subtle",size:"sm"},{default:r(()=>[...W[8]||(W[8]=[_(" Filtered by failure group ",-1)])]),_:1}),u(Ke,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-x",label:"Clear filter",onClick:Ze})])):k("",!0),u(Mt,{ref_key:"testCasesListRef",ref:nt,search:e(ae),"onUpdate:search":W[1]||(W[1]=ce=>Re(ae)?ae.value=ce:null),"active-statuses":e(se),"onUpdate:activeStatuses":W[2]||(W[2]=ce=>Re(se)?se.value=ce:null),"browser-filter":e(ge),"onUpdate:browserFilter":W[3]||(W[3]=ce=>Re(ge)?ge.value=ce:null),"test-cases":e(P),suites:e(m)?.suites??[],"is-live":f.value,"failure-cluster-filter":e(p),"project-key":e(m)?.projectId,"project-name":e(m)?.project?.name,class:"flex-1 min-h-0"},null,8,["search","active-statuses","browser-filter","test-cases","suites","is-live","failure-cluster-filter","project-key","project-name"])]),"tab-insights":r(()=>[u(Nt,{"test-run-id":Number(e(l)),"run-status":e(m)?.status??"","refresh-key":e(ve),class:"flex-1 min-h-0 p-4"},null,8,["test-run-id","run-status","refresh-key"])]),"tab-failure-groups":r(()=>[u(At,{"refresh-key":e(ve),onSelectCluster:Dt},null,8,["refresh-key"])]),"tab-regression":r(()=>[u(Bt,{"refresh-key":e(ve)},null,8,["refresh-key"])]),"tab-workers":r(()=>[u(Ut,{"test-cases":e(de),"setup-steps":e(m)?.setupSteps??null,"shard-total":e(m)?.shardTotal??null,live:f.value,"wasted-patterns":e(m)?.wastedWaitPatterns??null,onSelectTestCase:zt},null,8,["test-cases","setup-steps","shard-total","live","wasted-patterns"])]),"tab-compare":r(()=>[u(Lt,{"test-run":e(m)},null,8,["test-run"])]),"tab-endpoints":r(()=>[u(Et,{"refresh-key":e(ve),class:"flex-1 min-h-0",onEndpointsCount:W[4]||(W[4]=ce=>De.value=ce)},null,8,["refresh-key"])]),_:1},8,["modelValue","tab-items"])]),_:1}),u(Ht,null,{default:r(()=>[u(Kt,{open:e(j),title:"Delete test run","onUpdate:open":W[7]||(W[7]=ce=>j.value=ce)},{body:r(()=>[n("p",null,[W[9]||(W[9]=_(" Are you sure you want to delete ",-1)),n("strong",null,"Test Run #"+o(e(m)?.id),1),W[10]||(W[10]=_("? This will also remove all associated test results, reports, and traces. This action cannot be undone. ",-1))])]),footer:r(()=>[u(Ke,{color:"neutral",variant:"ghost",label:"Cancel",onClick:W[6]||(W[6]=ce=>j.value=!1)}),u(Ke,{color:"error",label:"Delete",icon:"i-lucide-trash-2",loading:e(g),onClick:v},null,8,["loading"])]),_:1},8,["open"])]),_:1})],64)}}});export{Qi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a_ as l,aL as s}from"./
|
|
1
|
+
import{a_ as l,aL as s}from"./BPKwYP2Q.js";function t(r,i){return l(r)?!1:Array.isArray(r)?r.some(a=>s(a,i)):s(r,i)}export{t as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o,u as s,w as c,n as u,o as p,c as i}from"./
|
|
1
|
+
import{d as o,u as s,w as c,n as u,o as p,c as i}from"./BPKwYP2Q.js";const d=o({__name:"compare",async setup(_){let t,n;const e=s(),a=e.params.id;{const r=new URLSearchParams;r.set("tab","compare"),e.query.runA&&r.set("runA",String(e.query.runA)),e.query.runB&&r.set("runB",String(e.query.runB)),[t,n]=c(()=>u(`/projects/${a}?${r.toString()}`,{replace:!0})),await t,n()}return(r,m)=>(p(),i("div"))}});export{d as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as ra}from"./n7Htv9PJ.js";import{aJ as oa,d as oe,X as Ve,W as Re,S as pe,o as i,c as y,j as s,g as o,T as M,k as e,U as X,H as Pe,V as ge,f as w,q as k,F as re,h as K,ax as ia,aE as na,Y as ze,aK as qe,Q as da,r as b,aL as ua,aA as ca,a0 as pa,a1 as ma,a3 as fa,a4 as va,a5 as ya,aM as ba,aN as ha,i as d,p as D,m as V,t as _,y as je,ae as $e,a6 as ga,aF as be,w as _a,b as ka,L as wa,C as Ca,P as xa,ak as Aa,_ as qa,s as $a,v as Ua,D as Ia,l as he,I as Va,K as Ra}from"./B8fs6GU9.js";import{_ as Pa}from"./D4nLD93c.js";import{_ as za}from"./BgR7oL4p.js";import{_ as ja}from"./BBJ9Pu3M.js";import{_ as Sa}from"./PPFO8UVt.js";import{_ as Ka}from"./IdQR_Djw.js";import{o as Da,s as ue,l as Ue,a as Ea,u as Fa,_ as Ba}from"./DzbOHjZH.js";import{_ as Ga}from"./CD-xwM9N.js";import{_ as Ma}from"./wCQds5_f.js";import{_ as Oa}from"./0KrkW531.js";import{L as Ie}from"./BC_Wu-fv.js";import{u as Se}from"./D1tZEdSi.js";import{V as Ke}from"./DVdOm5Bg.js";import{u as De}from"./YDWXnWou.js";import{R as Ta}from"./B_80i5Ge.js";import{_ as La}from"./DHVmXA9K.js";import{p as ce,g as le}from"./CvCF77E-.js";import{u as Na}from"./DAeYEeCC.js";import{u as Ha}from"./DWzdeQ3Z.js";import"./4fB15L_7.js";import"./B32ySRXg.js";import"./3SnTawZW.js";import"./BGsuOpiq.js";const Wa="radio.select";function Ya(S,A,u){oa(Wa,u,{originalEvent:S,value:A})}var Ja=oe({inheritAttrs:!1,__name:"Radio",props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},checked:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:checked","select"],setup(S,{emit:A}){const u=S,h=A,g=Ve(u,"checked",h,{passive:u.checked===void 0}),{value:l}=Re(u),{forwardRef:I,currentElement:x}=pe(),R=Se(x),C=De(),P=K(()=>u.id&&x.value?document.querySelector(`[for="${u.id}"]`)?.innerText??u.value:void 0);function q(p){u.disabled||Ya(p,u.value,z=>{h("select",z),!z?.defaultPrevented&&(g.value=!0,R.value&&z.stopPropagation())})}return(p,z)=>(i(),y(re,null,[s(e(ge),X({id:p.id,ref:e(I),role:"radio",type:p.as==="button"?"button":void 0,as:p.as,"aria-checked":e(g)??!1,"aria-label":P.value,"as-child":p.asChild,disabled:p.disabled?"":void 0,"data-state":e(g)?"checked":"unchecked","data-disabled":p.disabled?"":void 0,value:e(l),required:p.required,name:p.name},{...e(C),...p.$attrs},{onClick:Pe(q,["stop"])}),{default:o(()=>[M(p.$slots,"default",{checked:e(g)})]),_:3},16,["id","type","as","aria-checked","aria-label","as-child","disabled","data-state","data-disabled","value","required","name"]),e(R)&&p.name?(i(),w(e(Ke),X({key:0,type:"radio",tabindex:"-1",value:e(l),checked:!!e(g),name:p.name,disabled:p.disabled,required:p.required},e(C)),null,16,["value","checked","name","disabled","required"])):k("v-if",!0)],64))}}),Qa=Ja;const[Xa,Za]=ze("RadioGroupRoot");var et=oe({__name:"RadioGroupRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],setup(S,{emit:A}){const u=S,h=A,{forwardRef:g,currentElement:l}=pe(),I=Ve(u,"modelValue",h,{defaultValue:u.defaultValue,passive:u.modelValue===void 0}),{disabled:x,loop:R,orientation:C,name:P,required:q,dir:p}=Re(u),z=ia(p),$=Se(l);return Za({modelValue:I,changeModelValue:m=>{I.value=m},disabled:x,loop:R,orientation:C,name:P?.value,required:q}),(m,c)=>(i(),w(e(na),{"as-child":"",orientation:e(C),dir:e(z),loop:e(R)},{default:o(()=>[s(e(ge),{ref:e(g),role:"radiogroup","data-disabled":e(x)?"":void 0,"as-child":m.asChild,as:m.as,"aria-orientation":e(C),"aria-required":e(q),dir:e(z)},{default:o(()=>[M(m.$slots,"default",{modelValue:e(I)}),e($)&&e(P)?(i(),w(e(Ke),{key:0,required:e(q),disabled:e(x),value:e(I),name:e(P)},null,8,["required","disabled","value","name"])):k("v-if",!0)]),_:3},8,["data-disabled","as-child","as","aria-orientation","aria-required","dir"])]),_:3},8,["orientation","dir","loop"]))}}),at=et;const[tt,st]=ze("RadioGroupItem");var lt=oe({inheritAttrs:!1,__name:"RadioGroupItem",props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["select"],setup(S,{emit:A}){const u=S,h=A,{forwardRef:g,currentElement:l}=pe(),I=Xa(),x=K(()=>I.disabled.value||u.disabled),R=K(()=>I.required.value||u.required),C=K(()=>ua(I.modelValue?.value,u.value));st({disabled:x,checked:C});const P=b(!1),q=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];qe("keydown",$=>{q.includes($.key)&&(P.value=!0)}),qe("keyup",()=>{P.value=!1});function p(){setTimeout(()=>{P.value&&l.value?.click()},0)}const z=De();return($,m)=>(i(),w(e(Ta),{checked:C.value,disabled:x.value,"as-child":"",focusable:!x.value,active:C.value},{default:o(()=>[s(Qa,X({...e(z),...$.$attrs,...u},{ref:e(g),checked:C.value,required:R.value,disabled:x.value,"onUpdate:checked":m[0]||(m[0]=c=>e(I).changeModelValue($.value)),onSelect:m[1]||(m[1]=c=>h("select",c)),onKeydown:m[2]||(m[2]=da(Pe(()=>{},["prevent"]),["enter"])),onFocus:p}),{default:o(()=>[M($.$slots,"default",{checked:C.value,required:R.value,disabled:x.value})]),_:3},16,["checked","required","disabled"])]),_:3},8,["checked","disabled","focusable","active"]))}}),rt=lt,ot=oe({__name:"RadioGroupIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(S){const{forwardRef:A}=pe(),u=tt();return(h,g)=>(i(),w(e(ca),{present:h.forceMount||e(u).checked.value},{default:o(()=>[s(e(ge),X({ref:e(A),"data-state":e(u).checked.value?"checked":"unchecked","data-disabled":e(u).disabled.value?"":void 0,"as-child":h.asChild,as:h.as},h.$attrs),{default:o(()=>[M(h.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),it=ot;const nt={slots:{root:"relative",fieldset:"flex gap-x-2",legend:"mb-1 block font-medium text-default",item:"flex items-start",container:"flex items-center",base:"rounded-full ring ring-inset ring-accented overflow-hidden focus-visible:outline-3",indicator:"flex items-center justify-center size-full after:bg-default after:rounded-full",wrapper:"w-full",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"outline-primary/25 focus-visible:ring-primary",indicator:"bg-primary"},secondary:{base:"outline-secondary/25 focus-visible:ring-secondary",indicator:"bg-secondary"},success:{base:"outline-success/25 focus-visible:ring-success",indicator:"bg-success"},info:{base:"outline-info/25 focus-visible:ring-info",indicator:"bg-info"},warning:{base:"outline-warning/25 focus-visible:ring-warning",indicator:"bg-warning"},error:{base:"outline-error/25 focus-visible:ring-error",indicator:"bg-error"},neutral:{base:"outline-inverted/25 focus-visible:ring-inverted",indicator:"bg-inverted"}},variant:{list:{item:""},card:{item:"border border-muted rounded-lg"},table:{item:"border border-muted"}},orientation:{horizontal:{fieldset:"flex-row"},vertical:{fieldset:"flex-col"}},indicator:{start:{item:"flex-row",wrapper:"ms-2"},end:{item:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{fieldset:"gap-y-0.5",legend:"text-xs",base:"size-3",item:"text-xs",container:"h-4",indicator:"after:size-1"},sm:{fieldset:"gap-y-0.5",legend:"text-xs",base:"size-3.5",item:"text-xs",container:"h-4",indicator:"after:size-1"},md:{fieldset:"gap-y-1",legend:"text-sm",base:"size-4",item:"text-sm",container:"h-5",indicator:"after:size-1.5"},lg:{fieldset:"gap-y-1",legend:"text-sm",base:"size-4.5",item:"text-sm",container:"h-5",indicator:"after:size-1.5"},xl:{fieldset:"gap-y-1.5",legend:"text-base",base:"size-5",item:"text-base",container:"h-6",indicator:"after:size-2"}},highlight:{true:""},disabled:{true:{item:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},required:{true:{legend:"after:content-['*'] after:ms-0.5 after:text-error"}}},compoundVariants:[{size:"xs",variant:["card","table"],class:{item:"p-2.5"}},{size:"sm",variant:["card","table"],class:{item:"p-3"}},{size:"md",variant:["card","table"],class:{item:"p-3.5"}},{size:"lg",variant:["card","table"],class:{item:"p-4"}},{size:"xl",variant:["card","table"],class:{item:"p-4.5"}},{orientation:"horizontal",variant:"table",class:{item:"first-of-type:rounded-s-lg last-of-type:rounded-e-lg",fieldset:"gap-0 -space-x-px"}},{orientation:"vertical",variant:"table",class:{item:"first-of-type:rounded-t-lg last-of-type:rounded-b-lg",fieldset:"gap-0 -space-y-px"}},{color:"primary",variant:"card",class:{item:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{item:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{item:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{item:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{item:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{item:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{item:"has-data-[state=checked]:border-inverted"}},{color:"primary",variant:"table",class:{item:"has-data-[state=checked]:bg-primary/10 has-data-[state=checked]:border-primary/50 has-data-[state=checked]:z-[1]"}},{color:"secondary",variant:"table",class:{item:"has-data-[state=checked]:bg-secondary/10 has-data-[state=checked]:border-secondary/50 has-data-[state=checked]:z-[1]"}},{color:"success",variant:"table",class:{item:"has-data-[state=checked]:bg-success/10 has-data-[state=checked]:border-success/50 has-data-[state=checked]:z-[1]"}},{color:"info",variant:"table",class:{item:"has-data-[state=checked]:bg-info/10 has-data-[state=checked]:border-info/50 has-data-[state=checked]:z-[1]"}},{color:"warning",variant:"table",class:{item:"has-data-[state=checked]:bg-warning/10 has-data-[state=checked]:border-warning/50 has-data-[state=checked]:z-[1]"}},{color:"error",variant:"table",class:{item:"has-data-[state=checked]:bg-error/10 has-data-[state=checked]:border-error/50 has-data-[state=checked]:z-[1]"}},{color:"neutral",variant:"table",class:{item:"has-data-[state=checked]:bg-elevated has-data-[state=checked]:border-inverted/50 has-data-[state=checked]:z-[1]"}},{variant:["card","table"],disabled:!0,class:{item:"cursor-not-allowed"}},{color:"primary",highlight:!0,class:{base:"ring-primary"}},{color:"secondary",highlight:!0,class:{base:"ring-secondary"}},{color:"success",highlight:!0,class:{base:"ring-success"}},{color:"info",highlight:!0,class:{base:"ring-info"}},{color:"warning",highlight:!0,class:{base:"ring-warning"}},{color:"error",highlight:!0,class:{base:"ring-error"}},{color:"neutral",highlight:!0,class:{base:"ring-inverted"}}],defaultVariants:{size:"md",color:"primary",variant:"list",indicator:"start"}},dt={__name:"URadioGroup",props:{as:{type:null,required:!1},legend:{type:String,required:!1},valueKey:{type:null,required:!1,default:"value"},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},size:{type:null,required:!1},variant:{type:null,required:!1},color:{type:null,required:!1},highlight:{type:Boolean,required:!1},orientation:{type:null,required:!1,default:"vertical"},indicator:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["change","update:modelValue"],setup(S,{emit:A}){const u=S,h=A,g=pa(),l=ma("radioGroup",u),I=fa(),x=va(ya(l,"as","loop","required"),h),{emitFormChange:R,emitFormInput:C,color:P,name:q,size:p,highlight:z,id:$,disabled:m,ariaAttrs:c}=ba(u,{bind:!1}),O=$.value??ha(),j=K(()=>ga({extend:nt,...I.ui?.radioGroup||{}})({size:p.value??l.size,color:P.value??l.color,highlight:z.value??l.highlight,disabled:m.value,required:l.required,orientation:l.orientation,variant:l.variant,indicator:l.indicator}));function me(f){if(f===null)return{id:`${O}:null`,value:void 0,label:void 0};if(typeof f=="string"||typeof f=="number"||typeof f=="bigint")return{id:`${O}:${f}`,value:String(f),label:String(f)};const G=be(f,l.valueKey),n=be(f,l.labelKey),T=be(f,l.descriptionKey);return{...f,value:G,label:n,description:T,id:`${O}:${G}`}}const fe=K(()=>l.items?l.items.map(me):[]);function B(f){const G=new Event("change",{target:{value:f}});h("change",G),R(),C()}return(f,G)=>(i(),w(e(at),X({id:e(O)},e(x),{"model-value":e(l).modelValue,"default-value":e(l).defaultValue,orientation:e(l).orientation,name:e(q),disabled:e(m),"data-slot":"root",class:j.value.root({class:[e(l).ui?.root,e(l).class]}),"onUpdate:modelValue":B}),{default:o(()=>[d("fieldset",X({"data-slot":"fieldset",class:j.value.fieldset({class:e(l).ui?.fieldset})},e(c)),[e(l).legend||g.legend?(i(),y("legend",{key:0,"data-slot":"legend",class:D(j.value.legend({class:e(l).ui?.legend}))},[M(f.$slots,"legend",{},()=>[V(_(e(l).legend),1)])],2)):k("",!0),(i(!0),y(re,null,je(fe.value,n=>(i(),w($e(!e(l).variant||e(l).variant==="list"?"div":e(Ie)),{key:n.value,"data-slot":"item",class:D(j.value.item({class:[e(l).ui?.item,n.ui?.item,n.class],disabled:n.disabled||e(m)}))},{default:o(()=>[d("div",{"data-slot":"container",class:D(j.value.container({class:[e(l).ui?.container,n.ui?.container]}))},[s(e(rt),{id:n.id,value:n.value,disabled:n.disabled||e(m),"data-slot":"base",class:D(j.value.base({class:[e(l).ui?.base,n.ui?.base],disabled:n.disabled||e(m)}))},{default:o(()=>[s(e(it),{"data-slot":"indicator",class:D(j.value.indicator({class:[e(l).ui?.indicator,n.ui?.indicator]}))},null,8,["class"])]),_:2},1032,["id","value","disabled","class"])],2),n.label||g.label||n.description||g.description?(i(),y("div",{key:0,"data-slot":"wrapper",class:D(j.value.wrapper({class:[e(l).ui?.wrapper,n.ui?.wrapper]}))},[n.label||g.label?(i(),w($e(!e(l).variant||e(l).variant==="list"?e(Ie):"p"),{key:0,for:n.id,"data-slot":"label",class:D(j.value.label({class:[e(l).ui?.label,n.ui?.label],disabled:n.disabled||e(m)}))},{default:o(()=>[M(f.$slots,"label",{item:n,modelValue:e(l).modelValue},()=>[V(_(n.label),1)])]),_:2},1032,["for","class"])):k("",!0),n.description||g.description?(i(),y("p",{key:1,"data-slot":"description",class:D(j.value.description({class:[e(l).ui?.description,n.ui?.description],disabled:n.disabled||e(m)}))},[M(f.$slots,"description",{item:n,modelValue:e(l).modelValue},()=>[V(_(n.description),1)])],2)):k("",!0)],2)):k("",!0)]),_:2},1032,["class"]))),128))],16)]),_:3},16,["id","model-value","default-value","orientation","name","disabled","class"]))}},ut={class:"space-y-6"},ct={class:"text-muted"},pt={key:0,class:"flex items-center gap-1 text-sm"},mt={key:1,class:"text-muted"},ft={class:"text-sm text-muted"},vt={class:"flex items-center gap-1 justify-end"},yt={class:"text-center py-12"},bt={class:"flex justify-center mb-4"},ht={class:"flex w-full justify-end gap-2"},gt={class:"inline-flex items-center gap-1"},_t={class:"space-y-4"},kt={key:0,class:"rounded-lg border border-primary/30 bg-primary/5 p-4 space-y-4"},wt={key:0,class:"space-y-4"},Ct={class:"rounded-lg bg-elevated p-3 font-mono text-sm break-all select-all"},xt={class:"flex gap-2"},At={key:1,class:"space-y-3"},qt={class:"flex gap-2"},$t={key:1,class:"space-y-2"},Ut={class:"flex-1 min-w-0"},It={class:"flex items-center gap-2"},Vt={class:"font-medium truncate"},Rt={class:"text-xs text-muted mt-1 flex flex-wrap gap-x-4"},Pt={class:"font-mono"},zt={key:0},jt={key:1,class:"italic"},St={key:2,class:"text-center text-muted py-6 text-sm"},Kt={class:"inline-flex items-center gap-1"},Dt={class:"space-y-6"},Et={key:0,class:"text-[var(--ui-text-muted)]"},Ft={key:1},us=oe({__name:"users",async setup(S){let A,u;const{data:h,refresh:g}=([A,u]=_a(()=>Na("/api/users","$0NE568_-ln")),A=await A,u(),A),l=ka(),{copy:I}=Ha(),{authState:x}=wa(),R=Ra(),C=K(()=>h.value?.users||[]),P=K(()=>h.value?.authEnabled||!1),q=K(()=>R.public.authEnabled?x.value.user?.role==="administrator":!0),p=K(()=>x.value.user?.id??null),z=[{accessorKey:"username",header:le("Username")},{accessorKey:"name",header:le("Name")},{accessorKey:"email",header:le("Email")},{accessorKey:"role",header:le("Role")},{accessorKey:"createdAt",header:le("Created")},{accessorKey:"actions",header:""}],$=b(!1),m=Da({username:ue().min(3,"Username must be at least 3 characters"),password:Fa([ue().min(6,"Password must be at least 6 characters"),Ue("").transform(()=>{})]).optional(),role:Ea(["administrator","reporter","user"]),name:ue().optional(),email:ue().email().optional().or(Ue(""))}),c=Va({username:"",password:"",role:"user",name:"",email:""}),O=[{label:"Administrator",value:"administrator"},{label:"Reporter",value:"reporter"},{label:"User",value:"user"}];async function j(){try{const r={...c,password:c.password||void 0};await $fetch("/api/users",{method:"POST",body:r}),l.add({title:"User created",description:`User ${c.username} has been created successfully`,color:"success"}),$.value=!1,c.username="",c.password="",c.role="user",c.name="",c.email="",await g()}catch(r){const a=r&&typeof r=="object"&&"data"in r?r.data?.message:void 0;l.add({title:"Failed to create user",description:a||"An error occurred",color:"error"})}}async function me(r){f.value=r,B.value=!0}async function fe(){const r=f.value;if(r){B.value=!1,f.value=null;try{await $fetch(`/api/users/${r.id}`,{method:"DELETE"}),l.add({title:"User deleted",description:`User ${r.username} has been deleted`,color:"success"}),await g()}catch(a){const U=a&&typeof a=="object"&&"data"in a?a.data?.message:void 0;l.add({title:"Failed to delete user",description:U||"An error occurred",color:"error"})}}}const B=b(!1),f=b(null);function G(r){switch(r){case"administrator":return"primary";case"reporter":return"info";case"user":return"neutral";default:return"neutral"}}const n=b(null),T=b(!1),ie=b([]);async function Ee(r){n.value=r,T.value=!0,await _e(r.id)}async function _e(r){try{const a=await $fetch(`/api/users/${r}/api-keys`);ie.value=a.apiKeys}catch{ie.value=[]}}async function ke(){n.value&&await _e(n.value.id)}const L=b(!1),N=b(""),H=b(""),E=b(null),we=b("http://localhost:3000");Ca(()=>{we.value=window.location.origin});const Fe=K(()=>`['@piwitests/reporter', {
|
|
1
|
+
import{_ as ra}from"./Br2K9yi_.js";import{aJ as oa,d as oe,X as Ve,W as Re,S as pe,o as i,c as y,j as s,g as o,T as M,k as e,U as X,H as Pe,V as ge,f as w,q as k,F as re,h as K,ax as ia,aE as na,Y as ze,aK as qe,Q as da,r as b,aL as ua,aA as ca,a0 as pa,a1 as ma,a3 as fa,a4 as va,a5 as ya,aM as ba,aN as ha,i as d,p as D,m as V,t as _,y as je,ae as $e,a6 as ga,aF as be,w as _a,b as ka,L as wa,C as Ca,P as xa,ak as Aa,_ as qa,s as $a,v as Ua,D as Ia,l as he,I as Va,K as Ra}from"./BPKwYP2Q.js";import{_ as Pa}from"./BuZOa2M3.js";import{_ as za}from"./BBdfPriC.js";import{_ as ja}from"./DhA17dqR.js";import{_ as Sa}from"./DdbrJwT-.js";import{_ as Ka}from"./C1K3r_fc.js";import{o as Da,s as ue,l as Ue,a as Ea,u as Fa,_ as Ba}from"./-KQO1A4C.js";import{_ as Ga}from"./nCjfWTGm.js";import{_ as Ma}from"./CQeMb57w.js";import{_ as Oa}from"./CoHGrO41.js";import{L as Ie}from"./DRtTLQri.js";import{u as Se}from"./jIF87ALb.js";import{V as Ke}from"./mGJLLqyN.js";import{u as De}from"./C219JuBV.js";import{R as Ta}from"./C38aZbFJ.js";import{_ as La}from"./C3r_Sv1p.js";import{p as ce,g as le}from"./k-z_VVTK.js";import{u as Na}from"./BIf1R_fu.js";import{u as Ha}from"./DuMv-ugy.js";import"./d5ZB3uxF.js";import"./B7yG1G_l.js";import"./r3SBLxtE.js";import"./CpO-ABDW.js";const Wa="radio.select";function Ya(S,A,u){oa(Wa,u,{originalEvent:S,value:A})}var Ja=oe({inheritAttrs:!1,__name:"Radio",props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},checked:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:checked","select"],setup(S,{emit:A}){const u=S,h=A,g=Ve(u,"checked",h,{passive:u.checked===void 0}),{value:l}=Re(u),{forwardRef:I,currentElement:x}=pe(),R=Se(x),C=De(),P=K(()=>u.id&&x.value?document.querySelector(`[for="${u.id}"]`)?.innerText??u.value:void 0);function q(p){u.disabled||Ya(p,u.value,z=>{h("select",z),!z?.defaultPrevented&&(g.value=!0,R.value&&z.stopPropagation())})}return(p,z)=>(i(),y(re,null,[s(e(ge),X({id:p.id,ref:e(I),role:"radio",type:p.as==="button"?"button":void 0,as:p.as,"aria-checked":e(g)??!1,"aria-label":P.value,"as-child":p.asChild,disabled:p.disabled?"":void 0,"data-state":e(g)?"checked":"unchecked","data-disabled":p.disabled?"":void 0,value:e(l),required:p.required,name:p.name},{...e(C),...p.$attrs},{onClick:Pe(q,["stop"])}),{default:o(()=>[M(p.$slots,"default",{checked:e(g)})]),_:3},16,["id","type","as","aria-checked","aria-label","as-child","disabled","data-state","data-disabled","value","required","name"]),e(R)&&p.name?(i(),w(e(Ke),X({key:0,type:"radio",tabindex:"-1",value:e(l),checked:!!e(g),name:p.name,disabled:p.disabled,required:p.required},e(C)),null,16,["value","checked","name","disabled","required"])):k("v-if",!0)],64))}}),Qa=Ja;const[Xa,Za]=ze("RadioGroupRoot");var et=oe({__name:"RadioGroupRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],setup(S,{emit:A}){const u=S,h=A,{forwardRef:g,currentElement:l}=pe(),I=Ve(u,"modelValue",h,{defaultValue:u.defaultValue,passive:u.modelValue===void 0}),{disabled:x,loop:R,orientation:C,name:P,required:q,dir:p}=Re(u),z=ia(p),$=Se(l);return Za({modelValue:I,changeModelValue:m=>{I.value=m},disabled:x,loop:R,orientation:C,name:P?.value,required:q}),(m,c)=>(i(),w(e(na),{"as-child":"",orientation:e(C),dir:e(z),loop:e(R)},{default:o(()=>[s(e(ge),{ref:e(g),role:"radiogroup","data-disabled":e(x)?"":void 0,"as-child":m.asChild,as:m.as,"aria-orientation":e(C),"aria-required":e(q),dir:e(z)},{default:o(()=>[M(m.$slots,"default",{modelValue:e(I)}),e($)&&e(P)?(i(),w(e(Ke),{key:0,required:e(q),disabled:e(x),value:e(I),name:e(P)},null,8,["required","disabled","value","name"])):k("v-if",!0)]),_:3},8,["data-disabled","as-child","as","aria-orientation","aria-required","dir"])]),_:3},8,["orientation","dir","loop"]))}}),at=et;const[tt,st]=ze("RadioGroupItem");var lt=oe({inheritAttrs:!1,__name:"RadioGroupItem",props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["select"],setup(S,{emit:A}){const u=S,h=A,{forwardRef:g,currentElement:l}=pe(),I=Xa(),x=K(()=>I.disabled.value||u.disabled),R=K(()=>I.required.value||u.required),C=K(()=>ua(I.modelValue?.value,u.value));st({disabled:x,checked:C});const P=b(!1),q=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];qe("keydown",$=>{q.includes($.key)&&(P.value=!0)}),qe("keyup",()=>{P.value=!1});function p(){setTimeout(()=>{P.value&&l.value?.click()},0)}const z=De();return($,m)=>(i(),w(e(Ta),{checked:C.value,disabled:x.value,"as-child":"",focusable:!x.value,active:C.value},{default:o(()=>[s(Qa,X({...e(z),...$.$attrs,...u},{ref:e(g),checked:C.value,required:R.value,disabled:x.value,"onUpdate:checked":m[0]||(m[0]=c=>e(I).changeModelValue($.value)),onSelect:m[1]||(m[1]=c=>h("select",c)),onKeydown:m[2]||(m[2]=da(Pe(()=>{},["prevent"]),["enter"])),onFocus:p}),{default:o(()=>[M($.$slots,"default",{checked:C.value,required:R.value,disabled:x.value})]),_:3},16,["checked","required","disabled"])]),_:3},8,["checked","disabled","focusable","active"]))}}),rt=lt,ot=oe({__name:"RadioGroupIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(S){const{forwardRef:A}=pe(),u=tt();return(h,g)=>(i(),w(e(ca),{present:h.forceMount||e(u).checked.value},{default:o(()=>[s(e(ge),X({ref:e(A),"data-state":e(u).checked.value?"checked":"unchecked","data-disabled":e(u).disabled.value?"":void 0,"as-child":h.asChild,as:h.as},h.$attrs),{default:o(()=>[M(h.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),it=ot;const nt={slots:{root:"relative",fieldset:"flex gap-x-2",legend:"mb-1 block font-medium text-default",item:"flex items-start",container:"flex items-center",base:"rounded-full ring ring-inset ring-accented overflow-hidden focus-visible:outline-3",indicator:"flex items-center justify-center size-full after:bg-default after:rounded-full",wrapper:"w-full",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"outline-primary/25 focus-visible:ring-primary",indicator:"bg-primary"},secondary:{base:"outline-secondary/25 focus-visible:ring-secondary",indicator:"bg-secondary"},success:{base:"outline-success/25 focus-visible:ring-success",indicator:"bg-success"},info:{base:"outline-info/25 focus-visible:ring-info",indicator:"bg-info"},warning:{base:"outline-warning/25 focus-visible:ring-warning",indicator:"bg-warning"},error:{base:"outline-error/25 focus-visible:ring-error",indicator:"bg-error"},neutral:{base:"outline-inverted/25 focus-visible:ring-inverted",indicator:"bg-inverted"}},variant:{list:{item:""},card:{item:"border border-muted rounded-lg"},table:{item:"border border-muted"}},orientation:{horizontal:{fieldset:"flex-row"},vertical:{fieldset:"flex-col"}},indicator:{start:{item:"flex-row",wrapper:"ms-2"},end:{item:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{fieldset:"gap-y-0.5",legend:"text-xs",base:"size-3",item:"text-xs",container:"h-4",indicator:"after:size-1"},sm:{fieldset:"gap-y-0.5",legend:"text-xs",base:"size-3.5",item:"text-xs",container:"h-4",indicator:"after:size-1"},md:{fieldset:"gap-y-1",legend:"text-sm",base:"size-4",item:"text-sm",container:"h-5",indicator:"after:size-1.5"},lg:{fieldset:"gap-y-1",legend:"text-sm",base:"size-4.5",item:"text-sm",container:"h-5",indicator:"after:size-1.5"},xl:{fieldset:"gap-y-1.5",legend:"text-base",base:"size-5",item:"text-base",container:"h-6",indicator:"after:size-2"}},highlight:{true:""},disabled:{true:{item:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},required:{true:{legend:"after:content-['*'] after:ms-0.5 after:text-error"}}},compoundVariants:[{size:"xs",variant:["card","table"],class:{item:"p-2.5"}},{size:"sm",variant:["card","table"],class:{item:"p-3"}},{size:"md",variant:["card","table"],class:{item:"p-3.5"}},{size:"lg",variant:["card","table"],class:{item:"p-4"}},{size:"xl",variant:["card","table"],class:{item:"p-4.5"}},{orientation:"horizontal",variant:"table",class:{item:"first-of-type:rounded-s-lg last-of-type:rounded-e-lg",fieldset:"gap-0 -space-x-px"}},{orientation:"vertical",variant:"table",class:{item:"first-of-type:rounded-t-lg last-of-type:rounded-b-lg",fieldset:"gap-0 -space-y-px"}},{color:"primary",variant:"card",class:{item:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{item:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{item:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{item:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{item:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{item:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{item:"has-data-[state=checked]:border-inverted"}},{color:"primary",variant:"table",class:{item:"has-data-[state=checked]:bg-primary/10 has-data-[state=checked]:border-primary/50 has-data-[state=checked]:z-[1]"}},{color:"secondary",variant:"table",class:{item:"has-data-[state=checked]:bg-secondary/10 has-data-[state=checked]:border-secondary/50 has-data-[state=checked]:z-[1]"}},{color:"success",variant:"table",class:{item:"has-data-[state=checked]:bg-success/10 has-data-[state=checked]:border-success/50 has-data-[state=checked]:z-[1]"}},{color:"info",variant:"table",class:{item:"has-data-[state=checked]:bg-info/10 has-data-[state=checked]:border-info/50 has-data-[state=checked]:z-[1]"}},{color:"warning",variant:"table",class:{item:"has-data-[state=checked]:bg-warning/10 has-data-[state=checked]:border-warning/50 has-data-[state=checked]:z-[1]"}},{color:"error",variant:"table",class:{item:"has-data-[state=checked]:bg-error/10 has-data-[state=checked]:border-error/50 has-data-[state=checked]:z-[1]"}},{color:"neutral",variant:"table",class:{item:"has-data-[state=checked]:bg-elevated has-data-[state=checked]:border-inverted/50 has-data-[state=checked]:z-[1]"}},{variant:["card","table"],disabled:!0,class:{item:"cursor-not-allowed"}},{color:"primary",highlight:!0,class:{base:"ring-primary"}},{color:"secondary",highlight:!0,class:{base:"ring-secondary"}},{color:"success",highlight:!0,class:{base:"ring-success"}},{color:"info",highlight:!0,class:{base:"ring-info"}},{color:"warning",highlight:!0,class:{base:"ring-warning"}},{color:"error",highlight:!0,class:{base:"ring-error"}},{color:"neutral",highlight:!0,class:{base:"ring-inverted"}}],defaultVariants:{size:"md",color:"primary",variant:"list",indicator:"start"}},dt={__name:"URadioGroup",props:{as:{type:null,required:!1},legend:{type:String,required:!1},valueKey:{type:null,required:!1,default:"value"},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},size:{type:null,required:!1},variant:{type:null,required:!1},color:{type:null,required:!1},highlight:{type:Boolean,required:!1},orientation:{type:null,required:!1,default:"vertical"},indicator:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["change","update:modelValue"],setup(S,{emit:A}){const u=S,h=A,g=pa(),l=ma("radioGroup",u),I=fa(),x=va(ya(l,"as","loop","required"),h),{emitFormChange:R,emitFormInput:C,color:P,name:q,size:p,highlight:z,id:$,disabled:m,ariaAttrs:c}=ba(u,{bind:!1}),O=$.value??ha(),j=K(()=>ga({extend:nt,...I.ui?.radioGroup||{}})({size:p.value??l.size,color:P.value??l.color,highlight:z.value??l.highlight,disabled:m.value,required:l.required,orientation:l.orientation,variant:l.variant,indicator:l.indicator}));function me(f){if(f===null)return{id:`${O}:null`,value:void 0,label:void 0};if(typeof f=="string"||typeof f=="number"||typeof f=="bigint")return{id:`${O}:${f}`,value:String(f),label:String(f)};const G=be(f,l.valueKey),n=be(f,l.labelKey),T=be(f,l.descriptionKey);return{...f,value:G,label:n,description:T,id:`${O}:${G}`}}const fe=K(()=>l.items?l.items.map(me):[]);function B(f){const G=new Event("change",{target:{value:f}});h("change",G),R(),C()}return(f,G)=>(i(),w(e(at),X({id:e(O)},e(x),{"model-value":e(l).modelValue,"default-value":e(l).defaultValue,orientation:e(l).orientation,name:e(q),disabled:e(m),"data-slot":"root",class:j.value.root({class:[e(l).ui?.root,e(l).class]}),"onUpdate:modelValue":B}),{default:o(()=>[d("fieldset",X({"data-slot":"fieldset",class:j.value.fieldset({class:e(l).ui?.fieldset})},e(c)),[e(l).legend||g.legend?(i(),y("legend",{key:0,"data-slot":"legend",class:D(j.value.legend({class:e(l).ui?.legend}))},[M(f.$slots,"legend",{},()=>[V(_(e(l).legend),1)])],2)):k("",!0),(i(!0),y(re,null,je(fe.value,n=>(i(),w($e(!e(l).variant||e(l).variant==="list"?"div":e(Ie)),{key:n.value,"data-slot":"item",class:D(j.value.item({class:[e(l).ui?.item,n.ui?.item,n.class],disabled:n.disabled||e(m)}))},{default:o(()=>[d("div",{"data-slot":"container",class:D(j.value.container({class:[e(l).ui?.container,n.ui?.container]}))},[s(e(rt),{id:n.id,value:n.value,disabled:n.disabled||e(m),"data-slot":"base",class:D(j.value.base({class:[e(l).ui?.base,n.ui?.base],disabled:n.disabled||e(m)}))},{default:o(()=>[s(e(it),{"data-slot":"indicator",class:D(j.value.indicator({class:[e(l).ui?.indicator,n.ui?.indicator]}))},null,8,["class"])]),_:2},1032,["id","value","disabled","class"])],2),n.label||g.label||n.description||g.description?(i(),y("div",{key:0,"data-slot":"wrapper",class:D(j.value.wrapper({class:[e(l).ui?.wrapper,n.ui?.wrapper]}))},[n.label||g.label?(i(),w($e(!e(l).variant||e(l).variant==="list"?e(Ie):"p"),{key:0,for:n.id,"data-slot":"label",class:D(j.value.label({class:[e(l).ui?.label,n.ui?.label],disabled:n.disabled||e(m)}))},{default:o(()=>[M(f.$slots,"label",{item:n,modelValue:e(l).modelValue},()=>[V(_(n.label),1)])]),_:2},1032,["for","class"])):k("",!0),n.description||g.description?(i(),y("p",{key:1,"data-slot":"description",class:D(j.value.description({class:[e(l).ui?.description,n.ui?.description],disabled:n.disabled||e(m)}))},[M(f.$slots,"description",{item:n,modelValue:e(l).modelValue},()=>[V(_(n.description),1)])],2)):k("",!0)],2)):k("",!0)]),_:2},1032,["class"]))),128))],16)]),_:3},16,["id","model-value","default-value","orientation","name","disabled","class"]))}},ut={class:"space-y-6"},ct={class:"text-muted"},pt={key:0,class:"flex items-center gap-1 text-sm"},mt={key:1,class:"text-muted"},ft={class:"text-sm text-muted"},vt={class:"flex items-center gap-1 justify-end"},yt={class:"text-center py-12"},bt={class:"flex justify-center mb-4"},ht={class:"flex w-full justify-end gap-2"},gt={class:"inline-flex items-center gap-1"},_t={class:"space-y-4"},kt={key:0,class:"rounded-lg border border-primary/30 bg-primary/5 p-4 space-y-4"},wt={key:0,class:"space-y-4"},Ct={class:"rounded-lg bg-elevated p-3 font-mono text-sm break-all select-all"},xt={class:"flex gap-2"},At={key:1,class:"space-y-3"},qt={class:"flex gap-2"},$t={key:1,class:"space-y-2"},Ut={class:"flex-1 min-w-0"},It={class:"flex items-center gap-2"},Vt={class:"font-medium truncate"},Rt={class:"text-xs text-muted mt-1 flex flex-wrap gap-x-4"},Pt={class:"font-mono"},zt={key:0},jt={key:1,class:"italic"},St={key:2,class:"text-center text-muted py-6 text-sm"},Kt={class:"inline-flex items-center gap-1"},Dt={class:"space-y-6"},Et={key:0,class:"text-[var(--ui-text-muted)]"},Ft={key:1},us=oe({__name:"users",async setup(S){let A,u;const{data:h,refresh:g}=([A,u]=_a(()=>Na("/api/users","$0NE568_-ln")),A=await A,u(),A),l=ka(),{copy:I}=Ha(),{authState:x}=wa(),R=Ra(),C=K(()=>h.value?.users||[]),P=K(()=>h.value?.authEnabled||!1),q=K(()=>R.public.authEnabled?x.value.user?.role==="administrator":!0),p=K(()=>x.value.user?.id??null),z=[{accessorKey:"username",header:le("Username")},{accessorKey:"name",header:le("Name")},{accessorKey:"email",header:le("Email")},{accessorKey:"role",header:le("Role")},{accessorKey:"createdAt",header:le("Created")},{accessorKey:"actions",header:""}],$=b(!1),m=Da({username:ue().min(3,"Username must be at least 3 characters"),password:Fa([ue().min(6,"Password must be at least 6 characters"),Ue("").transform(()=>{})]).optional(),role:Ea(["administrator","reporter","user"]),name:ue().optional(),email:ue().email().optional().or(Ue(""))}),c=Va({username:"",password:"",role:"user",name:"",email:""}),O=[{label:"Administrator",value:"administrator"},{label:"Reporter",value:"reporter"},{label:"User",value:"user"}];async function j(){try{const r={...c,password:c.password||void 0};await $fetch("/api/users",{method:"POST",body:r}),l.add({title:"User created",description:`User ${c.username} has been created successfully`,color:"success"}),$.value=!1,c.username="",c.password="",c.role="user",c.name="",c.email="",await g()}catch(r){const a=r&&typeof r=="object"&&"data"in r?r.data?.message:void 0;l.add({title:"Failed to create user",description:a||"An error occurred",color:"error"})}}async function me(r){f.value=r,B.value=!0}async function fe(){const r=f.value;if(r){B.value=!1,f.value=null;try{await $fetch(`/api/users/${r.id}`,{method:"DELETE"}),l.add({title:"User deleted",description:`User ${r.username} has been deleted`,color:"success"}),await g()}catch(a){const U=a&&typeof a=="object"&&"data"in a?a.data?.message:void 0;l.add({title:"Failed to delete user",description:U||"An error occurred",color:"error"})}}}const B=b(!1),f=b(null);function G(r){switch(r){case"administrator":return"primary";case"reporter":return"info";case"user":return"neutral";default:return"neutral"}}const n=b(null),T=b(!1),ie=b([]);async function Ee(r){n.value=r,T.value=!0,await _e(r.id)}async function _e(r){try{const a=await $fetch(`/api/users/${r}/api-keys`);ie.value=a.apiKeys}catch{ie.value=[]}}async function ke(){n.value&&await _e(n.value.id)}const L=b(!1),N=b(""),H=b(""),E=b(null),we=b("http://localhost:3000");Ca(()=>{we.value=window.location.origin});const Fe=K(()=>`['@piwitests/reporter', {
|
|
2
2
|
serverUrl: '${we.value}',
|
|
3
3
|
apiKey: '${E.value??""}', // or set PIWI_API_KEY and use apiKey: process.env.PIWI_API_KEY
|
|
4
4
|
}]`);function Be(){N.value="",H.value="",E.value=null,L.value=!0}function Ce(){L.value=!1,E.value=null}async function Ge(){if(n.value)try{const r={name:N.value};H.value&&(r.expiresAt=new Date(H.value).toISOString());const a=await $fetch(`/api/users/${n.value.id}/api-keys`,{method:"POST",body:r});E.value=a.key,await ke()}catch(r){const a=r&&typeof r=="object"&&"data"in r?r.data?.message:void 0;l.add({title:"Failed to create API key",description:a||"An error occurred",color:"error"})}}function Me(){I(E.value,{toast:"API key copied to clipboard"})}function Oe(){E.value=null,L.value=!1}const Z=b(!1),ee=b(null);function Te(r){ee.value=r,Z.value=!0}async function Le(){if(!n.value||!ee.value)return;const r=ee.value;Z.value=!1,ee.value=null;try{await $fetch(`/api/users/${n.value.id}/api-keys/${r.id}`,{method:"DELETE"}),l.add({title:"API key revoked",description:`Key "${r.name}" has been revoked`,color:"success"}),await ke()}catch(a){const U=a&&typeof a=="object"&&"data"in a?a.data?.message:void 0;l.add({title:"Failed to revoke API key",description:U||"An error occurred",color:"error"})}}function Ne(r){return R.public.authEnabled?q.value||p.value===r.id:!0}const ne=b(null),ae=b(!1),W=b(!1),Y=b([]),J=b([]);async function He(r){ne.value=r,ae.value=!0;try{const a=await $fetch("/api/projects/menu");J.value=a.map(U=>({...U,label:U.label||U.name}))}catch{J.value=[]}try{const a=await $fetch(`/api/users/${r.id}/projects`);W.value=a.global,Y.value=J.value.filter(U=>a.projectIds.includes(U.id))}catch{W.value=!1,Y.value=[]}}async function We(){const r=ne.value;if(r)try{await $fetch(`/api/users/${r.id}/projects`,{method:"PUT",body:{global:W.value,projectIds:Y.value.map(a=>a.id)}}),l.add({title:"Project access updated",description:`Access for ${r.username} has been updated`,color:"success"}),ae.value=!1}catch(a){const U=a&&typeof a=="object"&&"data"in a?a.data?.message:void 0;l.add({title:"Failed to update project access",description:U||"An error occurred",color:"error"})}}const ve=b(null);async function Ye(r){if(!r.email){l.add({title:"No email address",description:"Set an email address for this user first.",color:"error"});return}ve.value=r.id;try{await $fetch(`/api/users/${r.id}/invite`,{method:"POST"}),l.add({title:"Invite sent",description:`Invitation sent to ${r.email}`,color:"success"})}catch(a){const U=a&&typeof a=="object"&&"data"in a?a.data?.message:void 0;l.add({title:"Failed to send invite",description:U||"An error occurred",color:"error"})}finally{ve.value=null}}return(r,a)=>{const U=ra,v=qa,ye=Ua,Je=$a,Qe=Pa,Xe=za,xe=ja,Q=Ia,F=Sa,Ze=Ka,ea=Ba,te=Ga,se=xa,Ae=Ma,aa=Oa,ta=dt,sa=Aa("UDivider"),la=La;return i(),y(re,null,[d("div",ut,[e(P)?k("",!0):(i(),w(U,{key:0,icon:"i-lucide-info",color:"primary",variant:"subtle",title:"Authentication is disabled",description:"Authentication is currently disabled. You can manage users here, but they will only be used when authentication is enabled via the PIWI_AUTH_ENABLED environment variable."})),e(C).length>0?(i(),w(xe,{key:1,title:"Users",count:e(C).length,help:"settings.users"},{actions:o(()=>[e(q)?(i(),w(v,{key:0,label:"Add user",icon:"i-lucide-user-plus",size:"sm",onClick:a[0]||(a[0]=t=>$.value=!0)})):k("",!0)]),default:o(()=>[s(Xe,{"min-width":"44rem",bleed:!1},{default:o(()=>[s(Qe,{data:e(C),columns:z,sticky:"",class:"max-h-[32rem]"},{"username-cell":o(({row:t})=>[V(_(t.original.username),1)]),"name-cell":o(({row:t})=>[d("span",ct,_(t.original.name||"-"),1)]),"email-cell":o(({row:t})=>[t.original.email?(i(),y("span",pt,[V(_(t.original.email)+" ",1),t.original.emailVerified?(i(),w(ye,{key:0,name:"i-lucide-circle-check-big",class:"size-3.5 text-success-500",title:"Email verified"})):k("",!0)])):(i(),y("span",mt,"—"))]),"role-cell":o(({row:t})=>[s(Je,{color:G(t.original.role),variant:"subtle"},{default:o(()=>[V(_(t.original.role),1)]),_:2},1032,["color"])]),"createdAt-cell":o(({row:t})=>[d("span",ft,_(("prettyDateFormat"in r?r.prettyDateFormat:e(ce))(t.original.createdAt,{dateOnly:!0})),1)]),"actions-cell":o(({row:t})=>[d("div",vt,[e(q)&&t.original.email&&!t.original.oauthProvider?(i(),w(v,{key:0,icon:"i-lucide-send",color:"neutral",variant:"ghost",size:"sm",title:"Send invite email","aria-label":"Send invite email",loading:e(ve)===t.original.id,onClick:de=>Ye(t.original)},null,8,["loading","onClick"])):k("",!0),e(q)&&t.original.role!=="administrator"?(i(),w(v,{key:1,icon:"i-lucide-folder-lock",color:"neutral",variant:"ghost",size:"sm",title:"Project access","aria-label":"Project access",onClick:de=>He(t.original)},null,8,["onClick"])):k("",!0),Ne(t.original)?(i(),w(v,{key:2,icon:"i-lucide-key",color:"neutral",variant:"ghost",size:"sm",title:"Manage API keys","aria-label":"Manage API keys",onClick:de=>Ee(t.original)},null,8,["onClick"])):k("",!0),e(q)?(i(),w(v,{key:3,icon:"i-lucide-trash-2",color:"error",variant:"ghost",size:"sm",title:"Delete user","aria-label":"Delete user",onClick:de=>me(t.original)},null,8,["onClick"])):k("",!0)])]),_:1},8,["data"])]),_:1})]),_:1},8,["count"])):(i(),w(xe,{key:2,title:"Users",count:0,help:"settings.users"},{default:o(()=>[d("div",yt,[d("div",bt,[s(ye,{name:"i-lucide-users",class:"text-4xl text-muted"})]),a[21]||(a[21]=d("h3",{class:"text-lg font-semibold mb-2"},"No users yet",-1)),a[22]||(a[22]=d("p",{class:"text-muted mb-4"},"Create your first user to get started with authentication",-1)),e(q)?(i(),w(v,{key:0,label:"Add user",icon:"i-lucide-user-plus",onClick:a[1]||(a[1]=t=>$.value=!0)})):k("",!0)])]),_:1}))]),s(se,null,{default:o(()=>[s(te,{open:e($),title:"Add new user","onUpdate:open":a[8]||(a[8]=t=>$.value=t)},{body:o(()=>[s(ea,{schema:e(m),state:e(c),class:"space-y-5"},{default:o(()=>[s(F,{label:"Username",name:"username",required:""},{default:o(()=>[s(Q,{modelValue:e(c).username,"onUpdate:modelValue":a[2]||(a[2]=t=>e(c).username=t),placeholder:"Enter username",class:"w-full"},null,8,["modelValue"])]),_:1}),s(F,{label:"Password",name:"password",description:"Leave blank to let the user set their own password via invite email"},{default:o(()=>[s(Q,{modelValue:e(c).password,"onUpdate:modelValue":a[3]||(a[3]=t=>e(c).password=t),type:"password",placeholder:"Leave blank to send invite",class:"w-full"},null,8,["modelValue"])]),_:1}),s(F,{label:"Display name",name:"name"},{default:o(()=>[s(Q,{modelValue:e(c).name,"onUpdate:modelValue":a[4]||(a[4]=t=>e(c).name=t),placeholder:"Enter display name (optional)",class:"w-full"},null,8,["modelValue"])]),_:1}),s(F,{label:"Email",name:"email",description:"Optional — needed for invites and notifications"},{default:o(()=>[s(Q,{modelValue:e(c).email,"onUpdate:modelValue":a[5]||(a[5]=t=>e(c).email=t),type:"email",placeholder:"user@example.com (optional)",class:"w-full"},null,8,["modelValue"])]),_:1}),s(F,{label:"Role",name:"role",required:""},{default:o(()=>[s(Ze,{modelValue:e(c).role,"onUpdate:modelValue":a[6]||(a[6]=t=>e(c).role=t),items:O,class:"w-full"},null,8,["modelValue"])]),_:1})]),_:1},8,["schema","state"])]),footer:o(()=>[d("div",ht,[s(v,{type:"button",color:"neutral",variant:"ghost",label:"Cancel",onClick:a[7]||(a[7]=t=>$.value=!1)}),s(v,{type:"submit",label:"Create user",icon:"i-lucide-user-plus",onClick:j})])]),_:1},8,["open"])]),_:1}),s(se,null,{default:o(()=>[s(te,{open:e(T),title:`API keys – ${e(n)?.username}`,size:"xl","onUpdate:open":a[12]||(a[12]=t=>{T.value=t,t||Ce()})},{title:o(()=>[d("span",gt,[V(" API keys – "+_(e(n)?.username)+" ",1),s(Ae,{topic:"settings.api-keys"})])]),body:o(()=>[d("div",_t,[a[26]||(a[26]=d("p",{class:"text-sm text-muted"},[V(" API keys allow the Playwright reporter (and other CI tools) to submit test results without a username/password login. Each key is shown "),d("strong",null,"only once"),V(" at creation time — store it in a CI secret immediately. ")],-1)),e(L)?(i(),y("div",kt,[e(E)?(i(),y("div",wt,[s(U,{icon:"i-lucide-triangle-alert",color:"warning",variant:"subtle",title:"Save your API key now",description:"This key will never be shown again. Copy it and store it in your CI secret manager immediately."}),d("div",Ct,_(e(E)),1),d("div",xt,[s(v,{label:"Copy to clipboard",icon:"i-lucide-clipboard",color:"primary",size:"sm",onClick:Me}),s(v,{label:"Done",variant:"ghost",size:"sm",onClick:Oe})]),d("div",null,[a[23]||(a[23]=d("p",{class:"text-xs font-semibold uppercase tracking-wide text-muted mb-2"}," Use it in your reporter config ",-1)),s(aa,{code:e(Fe),lang:"typescript"},null,8,["code"])])])):(i(),y("div",At,[a[24]||(a[24]=d("h4",{class:"font-medium text-sm"},"Create new API key",-1)),s(F,{label:"Key name",name:"name",required:""},{default:o(()=>[s(Q,{modelValue:e(N),"onUpdate:modelValue":a[9]||(a[9]=t=>he(N)?N.value=t:null),placeholder:"e.g. GitHub Actions CI",size:"sm"},null,8,["modelValue"])]),_:1}),s(F,{label:"Expires at (optional)",name:"expiresAt"},{default:o(()=>[s(Q,{modelValue:e(H),"onUpdate:modelValue":a[10]||(a[10]=t=>he(H)?H.value=t:null),type:"date",size:"sm",min:new Date().toISOString().split("T")[0]},null,8,["modelValue","min"])]),_:1}),d("div",qt,[s(v,{label:"Generate key",icon:"i-lucide-key",size:"sm",disabled:!e(N).trim(),onClick:Ge},null,8,["disabled"]),s(v,{color:"neutral",variant:"ghost",label:"Cancel",size:"sm",onClick:Ce})])]))])):k("",!0),e(ie).length>0?(i(),y("div",$t,[(i(!0),y(re,null,je(e(ie),t=>(i(),y("div",{key:t.id,class:"flex items-center justify-between rounded-lg border border-default px-4 py-3"},[d("div",Ut,[d("div",It,[s(ye,{name:"i-lucide-key",class:"text-muted shrink-0"}),d("span",Vt,_(t.name),1)]),d("div",Rt,[d("span",null,[a[25]||(a[25]=V("Prefix: ",-1)),d("code",Pt,"pd_"+_(t.keyPrefix)+"…",1)]),d("span",null,"Created: "+_(("prettyDateFormat"in r?r.prettyDateFormat:e(ce))(t.createdAt,{dateOnly:!0})),1),t.lastUsedAt?(i(),y("span",zt,"Last used: "+_(("prettyDateFormat"in r?r.prettyDateFormat:e(ce))(t.lastUsedAt,{dateOnly:!0})),1)):(i(),y("span",jt,"Never used")),t.expiresAt?(i(),y("span",{key:2,class:D(new Date(t.expiresAt)<new Date?"text-error":"")}," Expires: "+_(("prettyDateFormat"in r?r.prettyDateFormat:e(ce))(t.expiresAt,{dateOnly:!0})),3)):k("",!0)])]),s(v,{icon:"i-lucide-trash-2",color:"error",variant:"ghost",size:"sm",title:"Revoke key",onClick:de=>Te(t)},null,8,["onClick"])]))),128))])):e(L)?k("",!0):(i(),y("div",St," No API keys yet. Create one to allow CI access. "))])]),footer:o(()=>[s(v,{color:"neutral",variant:"ghost",label:"Close",onClick:a[11]||(a[11]=t=>T.value=!1)}),e(L)?k("",!0):(i(),w(v,{key:0,label:"Create API key",icon:"i-lucide-plus",onClick:Be}))]),_:1},8,["open","title"])]),_:1}),s(se,null,{default:o(()=>[s(te,{open:e(B),title:"Delete user","onUpdate:open":a[14]||(a[14]=t=>B.value=t)},{body:o(()=>[d("p",null,[a[27]||(a[27]=V(" Are you sure you want to delete user ",-1)),d("strong",null,_(e(f)?.username),1),a[28]||(a[28]=V("? This action cannot be undone. ",-1))])]),footer:o(()=>[s(v,{color:"neutral",variant:"ghost",label:"Cancel",onClick:a[13]||(a[13]=t=>B.value=!1)}),s(v,{color:"error",label:"Delete user",icon:"i-lucide-trash-2",onClick:fe})]),_:1},8,["open"])]),_:1}),s(se,null,{default:o(()=>[s(te,{open:e(Z),title:"Revoke API key","onUpdate:open":a[16]||(a[16]=t=>Z.value=t)},{body:o(()=>[d("p",null,[a[29]||(a[29]=V(" Revoke API key ",-1)),d("strong",null,'"'+_(e(ee)?.name)+'"',1),a[30]||(a[30]=V("? Any CI pipeline using it will stop working immediately. ",-1))])]),footer:o(()=>[s(v,{color:"neutral",variant:"ghost",label:"Cancel",onClick:a[15]||(a[15]=t=>Z.value=!1)}),s(v,{color:"error",label:"Revoke",icon:"i-lucide-trash-2",onClick:Le})]),_:1},8,["open"])]),_:1}),s(se,null,{default:o(()=>[s(te,{open:e(ae),title:`Project access – ${e(ne)?.username}`,size:"xl","onUpdate:open":a[20]||(a[20]=t=>ae.value=t)},{title:o(()=>[d("span",Kt,[V(" Project access – "+_(e(ne)?.username)+" ",1),s(Ae,{topic:"project.members"})])]),body:o(()=>[d("div",Dt,[a[31]||(a[31]=d("p",{class:"text-sm text-muted"}," Control which projects this user can access. Users without any project access will see no projects. ",-1)),s(ta,{"model-value":e(W)?"global":"specific",items:[{value:"global",label:"Global access",description:"Access to all projects (current and future)"},{value:"specific",label:"Specific projects",description:"Access only to selected projects"}],"onUpdate:modelValue":a[17]||(a[17]=t=>W.value=t==="global")},null,8,["model-value"]),e(W)?k("",!0):(i(),y(re,{key:0},[s(sa),s(F,{label:"Specific projects",description:`Select from ${e(J).length>0?e(J).length:"0"} available projects`},{default:o(()=>[s(la,{modelValue:e(Y),"onUpdate:modelValue":a[18]||(a[18]=t=>he(Y)?Y.value=t:null),items:e(J),by:"id",multiple:"",searchable:"",class:"w-full",placeholder:"Search and select projects…"},{default:o(({modelValue:t})=>[t.length===0?(i(),y("span",Et,"Select projects…")):(i(),y("span",Ft,_(t.length)+" project(s) selected",1))]),_:1},8,["modelValue","items"])]),_:1},8,["description"])],64))])]),footer:o(()=>[s(v,{color:"neutral",variant:"ghost",label:"Cancel",onClick:a[19]||(a[19]=t=>ae.value=!1)}),s(v,{label:"Save",icon:"i-lucide-check",onClick:We})]),_:1},8,["open","title"])]),_:1})],64)}}});export{us as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./
|
|
1
|
+
import{r}from"./BPKwYP2Q.js";function n(i){const o=`piwi-tree-view-${i}`,t=r(!1);try{const e=document.cookie.match(new RegExp(`(?:^|;\\s*)${o}=([^;]*)`));e&&(t.value=e[1]==="true")}catch{}function c(e){t.value=e,document.cookie=`${o}=${e}; path=/; max-age=31536000; sameSite=lax`}return{treeView:t,setTreeView:c}}export{n as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as ie}from"./
|
|
1
|
+
import{_ as ie}from"./bAfTAihV.js";import{d as re,b as de,w as N,c as r,j as a,aa as ce,k as s,g as d,F as y,f as v,h as R,r as k,o as n,i,D as ue,l as me,_ as pe,m as c,v as fe,t as p,q as _,y as W,s as _e,p as ge,I as ye,K as ve}from"./BPKwYP2Q.js";import{_ as he}from"./CoHGrO41.js";import{_ as ke}from"./CQeMb57w.js";import{_ as xe}from"./DhA17dqR.js";import{_ as be}from"./DdbrJwT-.js";import{_ as Se}from"./C1K3r_fc.js";import{_ as we}from"./BpceIssd.js";import{_ as Te}from"./Br2K9yi_.js";import{u as A}from"./BIf1R_fu.js";import"./k-z_VVTK.js";import"./DuMv-ugy.js";import"./r3SBLxtE.js";import"./B7yG1G_l.js";import"./DRtTLQri.js";import"./jIF87ALb.js";const Pe={class:"space-y-6"},Ue={class:"space-y-3"},Ce={key:0,class:"flex items-center gap-2 text-sm text-success-600 dark:text-success-400"},Ie={key:1,class:"flex items-center gap-2 text-sm text-warning-600 dark:text-warning-400"},Me={key:2,class:"grid grid-cols-2 gap-2 text-sm"},$e={class:"font-mono"},Ve={class:"font-mono"},Ee={key:3,class:"text-sm text-muted space-y-1"},De={class:"flex items-center gap-2 w-full"},ze={key:0,class:"mb-4 p-4 rounded-lg border border-primary/30 bg-primary/5 space-y-3"},Ne={class:"grid grid-cols-2 gap-3"},Re={class:"flex justify-end gap-2"},We={key:1,class:"text-sm text-muted py-4 text-center"},Ae={class:"space-y-2"},Oe={class:"flex-1 min-w-0"},Fe={class:"font-medium text-sm flex items-center gap-1.5"},Be={class:"text-xs text-muted"},Le={key:3,class:"ml-1 text-primary text-xs"},je={class:"flex items-center gap-1"},He={key:0,class:"text-sm text-muted py-4 text-center"},qe={class:"space-y-2"},Je={class:"flex-1 min-w-0 space-y-0.5"},Ke={class:"font-medium text-sm"},Qe={class:"text-xs text-muted flex flex-wrap gap-x-3"},Xe={key:0},Ye={key:1},Ge={key:2,class:"text-warning-500"},Ze={class:"flex flex-wrap gap-1 mt-1"},et={class:"flex items-center gap-1"},vt=re({__name:"notifications",async setup(tt){let f,x;const u=de(),j=ve(),I=R(()=>j.public.authEnabled),H=["PIWI_SMTP_HOST","PIWI_SMTP_PORT","PIWI_SMTP_USER","PIWI_SMTP_PASS","PIWI_SMTP_FROM","PIWI_SMTP_FROM_NAME","PIWI_SMTP_SECURE"],{data:m}=([f,x]=N(()=>A("/api/settings/smtp","$gVOXSKoU4Q")),f=await f,x(),f),h=k(""),M=k(!1);async function q(){if(h.value){M.value=!0;try{const o=await $fetch("/api/settings/smtp/test",{method:"POST",body:{to:h.value}});o.success?u.add({title:"Test email sent",description:`Check ${h.value}`,color:"success"}):u.add({title:"Send failed",description:o.error||"Unknown error",color:"error"})}catch(o){u.add({title:"Send failed",description:String(o?.message??o),color:"error"})}finally{M.value=!1}}}const{data:J,refresh:O}=I.value?([f,x]=N(()=>A("/api/channels","$fv1jJkJo5B")),f=await f,x(),f):{data:k(null),refresh:()=>{}},$=R(()=>J.value?.channels??[]),b=k(!1),l=ye({name:"",type:"email",address:"",webhookUrl:"",url:"",secret:"",global:!1}),V=k(!1),E=k(null),K=[{label:"Email",value:"email"},{label:"Slack webhook",value:"slack"},{label:"Webhook",value:"webhook"}];async function Q(){V.value=!0;try{const o={};l.type==="email"?o.address=l.address:l.type==="slack"?o.webhookUrl=l.webhookUrl:l.type==="webhook"&&(o.url=l.url,l.secret&&(o.secret=l.secret)),await $fetch("/api/channels",{method:"POST",body:{name:l.name,type:l.type,config:o,global:l.global}}),b.value=!1,Object.assign(l,{name:"",type:"email",address:"",webhookUrl:"",url:"",secret:"",global:!1}),await O(),u.add({title:"Channel created",color:"success"})}catch(o){u.add({title:"Failed to create channel",description:String(o?.message??o),color:"error"})}finally{V.value=!1}}async function X(o){try{await $fetch(`/api/channels/${o}`,{method:"DELETE"}),await O(),u.add({title:"Channel deleted",color:"success"})}catch(e){u.add({title:"Failed to delete channel",description:String(e?.message??e),color:"error"})}}async function Y(o){E.value=o;try{const e=await $fetch(`/api/channels/${o}/test`,{method:"POST"});e.success?u.add({title:"Test notification sent",color:"success"}):u.add({title:"Test failed",description:e.error,color:"error"})}catch(e){u.add({title:"Test failed",description:String(e?.message??e),color:"error"})}finally{E.value=null}}const{data:G,refresh:F}=I.value?([f,x]=N(()=>A("/api/subscriptions","$WhEQp2PfoM")),f=await f,x(),f):{data:k(null),refresh:()=>{}},D=R(()=>G.value?.subscriptions??[]);async function Z(o){try{await $fetch(`/api/subscriptions/${o}`,{method:"DELETE"}),await F(),u.add({title:"Subscription removed",color:"success"})}catch(e){u.add({title:"Failed to remove subscription",description:String(e?.message??e),color:"error"})}}async function ee(o){const e=o.mutedUntil&&new Date(o.mutedUntil)>new Date;try{await $fetch(`/api/subscriptions/${o.id}`,{method:"PATCH",body:{mutedUntil:e?null:new Date(Date.now()+10080*60*1e3).toISOString()}}),await F(),u.add({title:e?"Unmuted":"Muted for 7 days",color:"success"})}catch(U){u.add({title:"Failed to update subscription",description:String(U?.message??U),color:"error"})}}function P(o){return o.mutedUntil&&new Date(o.mutedUntil)>new Date}function B(o){return o==="personal_email"?"i-lucide-user-round":o==="email"?"i-lucide-mail":o==="slack"?"i-lucide-slack":"i-lucide-webhook"}function te(o){return o.replace(/\./g," › ")}return(o,e)=>{const U=ie,C=fe,se=he,oe=ke,S=ue,g=pe,z=xe,w=be,ne=Se,L=_e,le=we,ae=Te;return n(),r("div",Pe,[a(z,{icon:"i-lucide-mail",title:"SMTP email delivery",help:"settings.smtp"},ce({subtitle:d(()=>[e[9]||(e[9]=c(" Configure SMTP via environment variables. The connection cannot be changed here. ",-1))]),actions:d(()=>[s(m)?.configured?(n(),v(U,{key:0,"env-vars":H,size:"md"})):_("",!0)]),default:d(()=>[i("div",Ue,[s(m)?.configured?(n(),r("div",Ce,[a(C,{name:"i-lucide-circle-check-big",class:"size-4"}),e[10]||(e[10]=c(" Configured ",-1))])):(n(),r("div",Ie,[a(C,{name:"i-lucide-circle-alert",class:"size-4"}),e[11]||(e[11]=c(" Not configured ",-1))])),s(m)?.configured?(n(),r("div",Me,[e[12]||(e[12]=i("div",{class:"text-muted"},"Host",-1)),i("div",$e,p(s(m)?.host)+":"+p(s(m)?.port),1),e[13]||(e[13]=i("div",{class:"text-muted"},"From",-1)),i("div",null,p(s(m)?.fromName?`${s(m).fromName} <${s(m).from}>`:s(m)?.from),1),e[14]||(e[14]=i("div",{class:"text-muted"},"User",-1)),i("div",Ve,p(s(m)?.user),1),e[15]||(e[15]=i("div",{class:"text-muted"},"TLS",-1)),i("div",null,p(s(m)?.secure?"Yes (port 465)":"STARTTLS / plain"),1)])):_("",!0),s(m)?.configured?_("",!0):(n(),r("div",Ee,[e[16]||(e[16]=i("p",null,"Set these environment variables to enable email notifications:",-1)),a(se,{code:`PIWI_SMTP_HOST=smtp.example.com
|
|
2
2
|
PIWI_SMTP_PORT=465
|
|
3
3
|
PIWI_SMTP_USER=user@example.com
|
|
4
4
|
PIWI_SMTP_PASS=secret
|