@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.
Files changed (457) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{DzbOHjZH.js → -KQO1A4C.js} +1 -1
  3. package/.output/public/_nuxt/{BEKwVcvQ.js → 1AB111xL.js} +1 -1
  4. package/.output/public/_nuxt/{CokbKVE6.js → 2xvsvjLO.js} +1 -1
  5. package/.output/public/_nuxt/{CNzoIhwN.js → ABGJk0pu.js} +1 -1
  6. package/.output/public/_nuxt/{Cgr8IKY4.js → B2lYFco4.js} +1 -1
  7. package/.output/public/_nuxt/B33X4zrC.js +1 -0
  8. package/.output/public/_nuxt/{V1BQiRoh.js → B3NbDoBP.js} +1 -1
  9. package/.output/public/_nuxt/{ChWPXucC.js → B3sNtVnf.js} +1 -1
  10. package/.output/public/_nuxt/{too3WhRB.js → B43OGXzV.js} +1 -1
  11. package/.output/public/_nuxt/{Cf3RuiXF.js → B6Jp7fpa.js} +4 -4
  12. package/.output/public/_nuxt/{B32ySRXg.js → B7yG1G_l.js} +1 -1
  13. package/.output/public/_nuxt/{BgR7oL4p.js → BBdfPriC.js} +1 -1
  14. package/.output/public/_nuxt/{DNP5tTJo.js → BGYbnqA7.js} +1 -1
  15. package/.output/public/_nuxt/{DAeYEeCC.js → BIf1R_fu.js} +1 -1
  16. package/.output/public/_nuxt/{nUsJV5qo.js → BIksQZfR.js} +1 -1
  17. package/.output/public/_nuxt/{B8fs6GU9.js → BPKwYP2Q.js} +31 -31
  18. package/.output/public/_nuxt/{DjCfCT_5.js → BP_SWi7S.js} +1 -1
  19. package/.output/public/_nuxt/{CrFCPOnY.js → BQrSEuzu.js} +1 -1
  20. package/.output/public/_nuxt/{BpepjHwc.js → BR9H8k-L.js} +1 -1
  21. package/.output/public/_nuxt/{Dejf0f7D.js → BRKa6EQR.js} +3 -3
  22. package/.output/public/_nuxt/{BMQIO38j.js → BS0gKVuF.js} +1 -1
  23. package/.output/public/_nuxt/{BW1UOxWn.js → BV83yObd.js} +1 -1
  24. package/.output/public/_nuxt/{o5WQ5Z7k.js → BVW5qIDP.js} +1 -1
  25. package/.output/public/_nuxt/{rvaZFYoE.js → BY4oA2IH.js} +1 -1
  26. package/.output/public/_nuxt/{DZoSxwj6.js → BZekCf_x.js} +1 -1
  27. package/.output/public/_nuxt/{lRMjXqiA.js → Bb64FEFL.js} +1 -1
  28. package/.output/public/_nuxt/{2PU-adwy.js → BdFEUAlx.js} +1 -1
  29. package/.output/public/_nuxt/{CBrCcDzR.js → Bf62wdzp.js} +1 -1
  30. package/.output/public/_nuxt/{DYDGGqZ3.js → BkDfdHFm.js} +1 -1
  31. package/.output/public/_nuxt/{CqA3gM8h.js → BoRFLTAO.js} +1 -1
  32. package/.output/public/_nuxt/{DxXZN6ed.js → BpIsBP5g.js} +1 -1
  33. package/.output/public/_nuxt/{DkFbpSsi.js → BpNqHxg2.js} +1 -1
  34. package/.output/public/_nuxt/{DFw8I2FL.js → BpceIssd.js} +1 -1
  35. package/.output/public/_nuxt/{n7Htv9PJ.js → Br2K9yi_.js} +1 -1
  36. package/.output/public/_nuxt/{D4nLD93c.js → BuZOa2M3.js} +1 -1
  37. package/.output/public/_nuxt/{B32-7cBF.js → Bvfmwzgw.js} +1 -1
  38. package/.output/public/_nuxt/{h-e-Ca3f.js → Bzl2H_vl.js} +1 -1
  39. package/.output/public/_nuxt/{IdQR_Djw.js → C1K3r_fc.js} +1 -1
  40. package/.output/public/_nuxt/C219JuBV.js +1 -0
  41. package/.output/public/_nuxt/{B_80i5Ge.js → C38aZbFJ.js} +1 -1
  42. package/.output/public/_nuxt/{DHVmXA9K.js → C3r_Sv1p.js} +1 -1
  43. package/.output/public/_nuxt/{O1A-LRgV.js → C8RBRg7I.js} +1 -1
  44. package/.output/public/_nuxt/{60-Zii7v.js → CCRRqXez.js} +1 -1
  45. package/.output/public/_nuxt/{__m3KqHO.js → CJFqA_QW.js} +1 -1
  46. package/.output/public/_nuxt/{Surk4Lw-.js → CKB_doYB.js} +1 -1
  47. package/.output/public/_nuxt/{DaKVSp-6.js → CMYQpoOI.js} +1 -1
  48. package/.output/public/_nuxt/CQeMb57w.js +1 -0
  49. package/.output/public/_nuxt/{Bq2ZPvIH.js → CSYJwpXG.js} +1 -1
  50. package/.output/public/_nuxt/{ETOCcsVw.js → CTdvGdc2.js} +1 -1
  51. package/.output/public/_nuxt/CX1dcT4v.js +1 -0
  52. package/.output/public/_nuxt/{evCxpgbd.js → CdME81ij.js} +2 -2
  53. package/.output/public/_nuxt/{DKTDub7I.js → CgoAUz76.js} +1 -1
  54. package/.output/public/_nuxt/{0KrkW531.js → CoHGrO41.js} +1 -1
  55. package/.output/public/_nuxt/{BGsuOpiq.js → CpO-ABDW.js} +1 -1
  56. package/.output/public/_nuxt/CuYYdFBL.js +1 -0
  57. package/.output/public/_nuxt/{CHMpVLqo.js → D2jhe9JK.js} +1 -1
  58. package/.output/public/_nuxt/{C7RarFGi.js → D33On6AX.js} +1 -1
  59. package/.output/public/_nuxt/{Dv2B_nw_.js → D4VpoHDP.js} +1 -1
  60. package/.output/public/_nuxt/{CKZn0TUX.js → DAWn6Z7h.js} +1 -1
  61. package/.output/public/_nuxt/{rWwWS3Kj.js → DCpmQ47_.js} +1 -1
  62. package/.output/public/_nuxt/{B59-l1Cv.js → DIkLLyR6.js} +1 -1
  63. package/.output/public/_nuxt/{CFn3w5jn.js → DJS3Bf50.js} +1 -1
  64. package/.output/public/_nuxt/{F07TcX0U.js → DL20rwkA.js} +1 -1
  65. package/.output/public/_nuxt/DOuoR2Pk.js +34 -0
  66. package/.output/public/_nuxt/{BC_Wu-fv.js → DRtTLQri.js} +1 -1
  67. package/.output/public/_nuxt/{DiUGa0CT.js → DbeHHTk-.js} +1 -1
  68. package/.output/public/_nuxt/DcCNnjKl.js +1 -0
  69. package/.output/public/_nuxt/{PPFO8UVt.js → DdbrJwT-.js} +1 -1
  70. package/.output/public/_nuxt/{Cfk2_UCm.js → DfcAIbcX.js} +1 -1
  71. package/.output/public/_nuxt/{OG2n3p77.js → DgYM3eyi.js} +1 -1
  72. package/.output/public/_nuxt/{BBJ9Pu3M.js → DhA17dqR.js} +1 -1
  73. package/.output/public/_nuxt/{DvdOsTLb.js → DjZKuUMz.js} +1 -1
  74. package/.output/public/_nuxt/{DCCMLWel.js → DqnyWaSQ.js} +1 -1
  75. package/.output/public/_nuxt/Dsk4Ic18.js +7 -0
  76. package/.output/public/_nuxt/{BCK4f6Y3.js → DszOHBMG.js} +1 -1
  77. package/.output/public/_nuxt/{Cpquifvd.js → DuBBqqbF.js} +1 -1
  78. package/.output/public/_nuxt/{DWzdeQ3Z.js → DuMv-ugy.js} +1 -1
  79. package/.output/public/_nuxt/{BfshMo9k.js → Dz55UR7w.js} +2 -2
  80. package/.output/public/_nuxt/{BkhdAGx0.js → Dzz9_Z0u.js} +1 -1
  81. package/.output/public/_nuxt/{DgZlpN9l.js → HoKG9cc2.js} +1 -1
  82. package/.output/public/_nuxt/{C9jjVEQU.js → IFqRT_xJ.js} +1 -1
  83. package/.output/public/_nuxt/{i38YGG9S.js → JCFZINev.js} +1 -1
  84. package/.output/public/_nuxt/{B9Q_4Mjt.js → Kc7La4sL.js} +1 -1
  85. package/.output/public/_nuxt/N3pCB6-m.js +4 -0
  86. package/.output/public/_nuxt/{CFXonrwQ.js → WctJXszi.js} +1 -1
  87. package/.output/public/_nuxt/{CHgsEM4U.js → bAfTAihV.js} +1 -1
  88. package/.output/public/_nuxt/builds/latest.json +1 -1
  89. package/.output/public/_nuxt/builds/meta/5182c9fb-56a6-4df2-9685-4020a08ce7a5.json +1 -0
  90. package/.output/public/_nuxt/{4fB15L_7.js → d5ZB3uxF.js} +1 -1
  91. package/.output/public/_nuxt/{CIOQo6gB.js → e1zUTrBb.js} +1 -1
  92. package/.output/public/_nuxt/entry.BsmKRJzR.css +1 -0
  93. package/.output/public/_nuxt/{BtJkQ3to.js → iwD5atI2.js} +1 -1
  94. package/.output/public/_nuxt/jIF87ALb.js +1 -0
  95. package/.output/public/_nuxt/{CvCF77E-.js → k-z_VVTK.js} +2 -2
  96. package/.output/public/_nuxt/{CHSkT2s0.js → l0gdGdar.js} +1 -1
  97. package/.output/public/_nuxt/{DVdOm5Bg.js → mGJLLqyN.js} +1 -1
  98. package/.output/public/_nuxt/{CU-OXXdh.js → mfzslNx_.js} +1 -1
  99. package/.output/public/_nuxt/{CD-xwM9N.js → nCjfWTGm.js} +1 -1
  100. package/.output/public/_nuxt/{DQpa8F03.js → oNq5pd3r.js} +1 -1
  101. package/.output/public/_nuxt/qzAP_nm7.js +1 -0
  102. package/.output/public/_nuxt/{3SnTawZW.js → r3SBLxtE.js} +1 -1
  103. package/.output/public/_nuxt/{DI_-kFec.js → uKeO2H7F.js} +1 -1
  104. package/.output/public/_nuxt/{DZLrAp2i.js → xUrLy-Zn.js} +1 -1
  105. package/.output/public/_nuxt/{BY0AkhJh.js → ze9-Ill2.js} +1 -1
  106. package/.output/public/demo/seed.version.json +2 -2
  107. package/.output/public/sw.js +1 -1
  108. package/.output/server/chunks/_/markers.mjs +1 -1
  109. package/.output/server/chunks/_/users.mjs +1 -1
  110. package/.output/server/chunks/build/{BrowserBadge-BTA4QU_J.mjs → BrowserBadge-DNCp9pF-.mjs} +3 -3
  111. package/.output/server/chunks/build/BrowserBadge-DNCp9pF-.mjs.map +1 -0
  112. package/.output/server/chunks/build/{ChartCard-BqAhMip2.mjs → ChartCard-Fr557IbV.mjs} +2 -2
  113. package/.output/server/chunks/build/ChartCard-Fr557IbV.mjs.map +1 -0
  114. package/.output/server/chunks/build/{Checkbox-_1nGm_DR.mjs → Checkbox-7ZiMz60w.mjs} +5 -5
  115. package/.output/server/chunks/build/Checkbox-7ZiMz60w.mjs.map +1 -0
  116. package/.output/server/chunks/build/{CiEnvCard-DAufYuJw.mjs → CiEnvCard-DNxBVvx4.mjs} +5 -5
  117. package/.output/server/chunks/build/CiEnvCard-DNxBVvx4.mjs.map +1 -0
  118. package/.output/server/chunks/build/{CodeBlock-BVKHuYjU.mjs → CodeBlock-BGwNmJ8J.mjs} +2 -2
  119. package/.output/server/chunks/build/CodeBlock-BGwNmJ8J.mjs.map +1 -0
  120. package/.output/server/chunks/build/{DashboardNavbar-BR6j4VLd.mjs → DashboardNavbar-Bdp-OwTN.mjs} +2 -2
  121. package/.output/server/chunks/build/DashboardNavbar-Bdp-OwTN.mjs.map +1 -0
  122. package/.output/server/chunks/build/DashboardSidebarToggle-Ji6ADuqF.mjs +1 -1
  123. package/.output/server/chunks/build/{DiagnosisPanel-BnrdXDvd.mjs → DiagnosisPanel-DV1xwGu4.mjs} +6 -6
  124. package/.output/server/chunks/build/DiagnosisPanel-DV1xwGu4.mjs.map +1 -0
  125. package/.output/server/chunks/build/EntityLinks-DeOP13Kr.mjs +1 -1
  126. package/.output/server/chunks/build/{EnvManagedBadge-DdnEtjIl.mjs → EnvManagedBadge-Qpn58Nmr.mjs} +5 -5
  127. package/.output/server/chunks/build/EnvManagedBadge-Qpn58Nmr.mjs.map +1 -0
  128. package/.output/server/chunks/build/{HelpHint-D_GJzMpW.mjs → HelpHint-YEMWtKu1.mjs} +18 -2
  129. package/.output/server/chunks/build/HelpHint-YEMWtKu1.mjs.map +1 -0
  130. package/.output/server/chunks/build/{Modal-COIjm3js.mjs → Modal-CfA78Hm1.mjs} +2 -2
  131. package/.output/server/chunks/build/Modal-CfA78Hm1.mjs.map +1 -0
  132. package/.output/server/chunks/build/{OpenInIdeLink-D97W6On1.mjs → OpenInIdeLink-B92wosXu.mjs} +3 -3
  133. package/.output/server/chunks/build/{OpenInIdeLink-D97W6On1.mjs.map → OpenInIdeLink-B92wosXu.mjs.map} +1 -1
  134. package/.output/server/chunks/build/{PageStateCard-C1HFN4Nv.mjs → PageStateCard-Bwee6JTk.mjs} +10 -10
  135. package/.output/server/chunks/build/{PageStateCard-C1HFN4Nv.mjs.map → PageStateCard-Bwee6JTk.mjs.map} +1 -1
  136. package/.output/server/chunks/build/{ProjectTestCasesTable-XFBPQGIX.mjs → ProjectTestCasesTable-9418EI8J.mjs} +9 -9
  137. package/.output/server/chunks/build/ProjectTestCasesTable-9418EI8J.mjs.map +1 -0
  138. package/.output/server/chunks/build/{RunReports-ChNkmuWa.mjs → RunReports-BpJqLHY9.mjs} +2 -2
  139. package/.output/server/chunks/build/RunReports-BpJqLHY9.mjs.map +1 -0
  140. package/.output/server/chunks/build/{RunStatusBadge-CXpuCUGQ.mjs → RunStatusBadge-BhmJ_RKM.mjs} +2 -2
  141. package/.output/server/chunks/build/RunStatusBadge-BhmJ_RKM.mjs.map +1 -0
  142. package/.output/server/chunks/build/{SectionCard-zs9FDzps.mjs → SectionCard-COd9TuDq.mjs} +2 -2
  143. package/.output/server/chunks/build/SectionCard-COd9TuDq.mjs.map +1 -0
  144. package/.output/server/chunks/build/{Select-r3S5nkSY.mjs → Select-COwTIQlV.mjs} +3 -3
  145. package/.output/server/chunks/build/Select-COwTIQlV.mjs.map +1 -0
  146. package/.output/server/chunks/build/{SelectMenu-Dk6f8i9o.mjs → SelectMenu-BkyAHFCM.mjs} +4 -4
  147. package/.output/server/chunks/build/{SelectMenu-Dk6f8i9o.mjs.map → SelectMenu-BkyAHFCM.mjs.map} +1 -1
  148. package/.output/server/chunks/build/{Separator-pqpPG0up.mjs → Separator-CxZdx8kw.mjs} +2 -2
  149. package/.output/server/chunks/build/Separator-CxZdx8kw.mjs.map +1 -0
  150. package/.output/server/chunks/build/{SettingsField-Wdpzlt13.mjs → SettingsField-DDD4oqys.mjs} +5 -5
  151. package/.output/server/chunks/build/SettingsField-DDD4oqys.mjs.map +1 -0
  152. package/.output/server/chunks/build/{Slideover-02XjJjn0.mjs → Slideover-B95Rj237.mjs} +3 -3
  153. package/.output/server/chunks/build/Slideover-B95Rj237.mjs.map +1 -0
  154. package/.output/server/chunks/build/{Switch-gx_JXgCo.mjs → Switch-htSKgC38.mjs} +2 -2
  155. package/.output/server/chunks/build/Switch-htSKgC38.mjs.map +1 -0
  156. package/.output/server/chunks/build/{Table-C64RrBp3.mjs → Table-CPhhVzDv.mjs} +3 -3
  157. package/.output/server/chunks/build/Table-CPhhVzDv.mjs.map +1 -0
  158. package/.output/server/chunks/build/{TestStatusBar--u4VX_Xf.mjs → TestStatusBar-CEzt76wk.mjs} +2 -2
  159. package/.output/server/chunks/build/TestStatusBar-CEzt76wk.mjs.map +1 -0
  160. package/.output/server/chunks/build/{Tooltip-ui_BVvqr.mjs → Tooltip-7vwuDPrZ.mjs} +3 -3
  161. package/.output/server/chunks/build/Tooltip-7vwuDPrZ.mjs.map +1 -0
  162. package/.output/server/chunks/build/{VisuallyHiddenInput-mMsqmkjz.mjs → VisuallyHiddenInput-C9eJVpPW.mjs} +2 -2
  163. package/.output/server/chunks/build/VisuallyHiddenInput-C9eJVpPW.mjs.map +1 -0
  164. package/.output/server/chunks/build/{_id_-CFVnSs8B.mjs → _id_-BDqvTM9D.mjs} +19 -18
  165. package/.output/server/chunks/build/{_id_-CFVnSs8B.mjs.map → _id_-BDqvTM9D.mjs.map} +1 -1
  166. package/.output/server/chunks/build/{_id_-pkxJKe17.mjs → _id_-CE0Gso6i.mjs} +11 -11
  167. package/.output/server/chunks/build/_id_-CE0Gso6i.mjs.map +1 -0
  168. package/.output/server/chunks/build/{_id_-R6KGfZOC.mjs → _id_-CnwAyvvS.mjs} +257 -84
  169. package/.output/server/chunks/build/_id_-CnwAyvvS.mjs.map +1 -0
  170. package/.output/server/chunks/build/{_id_-DXJQABO8.mjs → _id_-Dy67M9Dj.mjs} +25 -25
  171. package/.output/server/chunks/build/{_id_-DXJQABO8.mjs.map → _id_-Dy67M9Dj.mjs.map} +1 -1
  172. package/.output/server/chunks/build/{about-CmtGYbC6.mjs → about-FB9PYAHK.mjs} +5 -5
  173. package/.output/server/chunks/build/about-FB9PYAHK.mjs.map +1 -0
  174. package/.output/server/chunks/build/{account-AbLuwiZP.mjs → account-Cn-eZqXM.mjs} +4 -4
  175. package/.output/server/chunks/build/account-Cn-eZqXM.mjs.map +1 -0
  176. package/.output/server/chunks/build/{ai-DR_slopS.mjs → ai-V3YOh3yx.mjs} +17 -17
  177. package/.output/server/chunks/build/ai-V3YOh3yx.mjs.map +1 -0
  178. package/.output/server/chunks/build/{analytics-BbT2-Tr-.mjs → analytics-BBlAEmj5.mjs} +235 -64
  179. package/.output/server/chunks/build/analytics-BBlAEmj5.mjs.map +1 -0
  180. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  181. package/.output/server/chunks/build/{db.client-DlA_u5y9.mjs → db.client-aHcD0wyX.mjs} +47 -22
  182. package/.output/server/chunks/build/db.client-aHcD0wyX.mjs.map +1 -0
  183. package/.output/server/chunks/build/{default-D6diRCW0.mjs → default-BfMirIgG.mjs} +17 -16
  184. package/.output/server/chunks/build/default-BfMirIgG.mjs.map +1 -0
  185. package/.output/server/chunks/build/{docs-DbYoZafk.mjs → docs-DtNcJCyb.mjs} +5 -5
  186. package/.output/server/chunks/build/{docs-DbYoZafk.mjs.map → docs-DtNcJCyb.mjs.map} +1 -1
  187. package/.output/server/chunks/build/{edit-CNV4xdYj.mjs → edit-Dsf11mL5.mjs} +8 -8
  188. package/.output/server/chunks/build/edit-Dsf11mL5.mjs.map +1 -0
  189. package/.output/server/chunks/build/fetch-8kznMtBM.mjs +1 -1
  190. package/.output/server/chunks/build/{help-content-BMumoQQF.mjs → help-content-DmFnuhNu.mjs} +6 -1
  191. package/.output/server/chunks/build/help-content-DmFnuhNu.mjs.map +1 -0
  192. package/.output/server/chunks/build/{index-Dw526KXV.mjs → index-BR9hw6qk.mjs} +10 -10
  193. package/.output/server/chunks/build/index-BR9hw6qk.mjs.map +1 -0
  194. package/.output/server/chunks/build/{index-dwYB76GO.mjs → index-Ba-Fifra.mjs} +4 -4
  195. package/.output/server/chunks/build/index-Ba-Fifra.mjs.map +1 -0
  196. package/.output/server/chunks/build/{index-rSHkKNna.mjs → index-BgpEKTSq.mjs} +505 -84
  197. package/.output/server/chunks/build/index-BgpEKTSq.mjs.map +1 -0
  198. package/.output/server/chunks/build/{index-DmHBPf7T.mjs → index-CULN3-en.mjs} +11 -2
  199. package/.output/server/chunks/build/index-CULN3-en.mjs.map +1 -0
  200. package/.output/server/chunks/build/{index-C3Ou18qD.mjs → index-DzEgjHlB.mjs} +14 -14
  201. package/.output/server/chunks/build/{index-C3Ou18qD.mjs.map → index-DzEgjHlB.mjs.map} +1 -1
  202. package/.output/server/chunks/build/{isValueEqualOrExist-DTJ5ejZs.mjs → isValueEqualOrExist-DBZjbD_3.mjs} +3 -3
  203. package/.output/server/chunks/build/isValueEqualOrExist-DBZjbD_3.mjs.map +1 -0
  204. package/.output/server/chunks/build/{login-Da5C8jP2.mjs → login-D2XZDuek.mjs} +3 -3
  205. package/.output/server/chunks/build/login-D2XZDuek.mjs.map +1 -0
  206. package/.output/server/chunks/build/{mcp-DM1t-9L_.mjs → mcp-CXwa3xU3.mjs} +8 -8
  207. package/.output/server/chunks/build/mcp-CXwa3xU3.mjs.map +1 -0
  208. package/.output/server/chunks/build/{notifications-BTPF0xA7.mjs → notifications-hJj8tbAT.mjs} +11 -11
  209. package/.output/server/chunks/build/notifications-hJj8tbAT.mjs.map +1 -0
  210. package/.output/server/chunks/build/server.mjs +37 -28
  211. package/.output/server/chunks/build/{settings-Bmw_JdBS.mjs → settings-Ci_7EXYQ.mjs} +8 -7
  212. package/.output/server/chunks/build/settings-Ci_7EXYQ.mjs.map +1 -0
  213. package/.output/server/chunks/build/{settings-metadata-CksLgMun.mjs → settings-metadata-Cp0dx0vm.mjs} +12 -3
  214. package/.output/server/chunks/build/settings-metadata-Cp0dx0vm.mjs.map +1 -0
  215. package/.output/server/chunks/build/{storage-BqR4acgi.mjs → storage-CM-Pd-9E.mjs} +191 -14
  216. package/.output/server/chunks/build/storage-CM-Pd-9E.mjs.map +1 -0
  217. package/.output/server/chunks/build/{tags-miPAzIr3.mjs → tags-DrCQ7QSw.mjs} +6 -6
  218. package/.output/server/chunks/build/tags-DrCQ7QSw.mjs.map +1 -0
  219. package/.output/server/chunks/build/{test-cases-D-LqhLpk.mjs → test-cases-DkGQB027.mjs} +14 -14
  220. package/.output/server/chunks/build/test-cases-DkGQB027.mjs.map +1 -0
  221. package/.output/server/chunks/build/timeout-hygiene-CNs71Iah.mjs +318 -0
  222. package/.output/server/chunks/build/timeout-hygiene-CNs71Iah.mjs.map +1 -0
  223. package/.output/server/chunks/build/{useAiStatus-FwqbA4gz.mjs → useAiStatus-ZO987RY7.mjs} +8 -7
  224. package/.output/server/chunks/build/useAiStatus-ZO987RY7.mjs.map +1 -0
  225. package/.output/server/chunks/build/{useSettingsNav-v_dFuTw9.mjs → useSettingsNav-D2knPCqF.mjs} +6 -6
  226. package/.output/server/chunks/build/useSettingsNav-D2knPCqF.mjs.map +1 -0
  227. package/.output/server/chunks/build/{users-D-GDKZmZ.mjs → users-NmAUZs3i.mjs} +6 -6
  228. package/.output/server/chunks/build/users-NmAUZs3i.mjs.map +1 -0
  229. package/.output/server/chunks/build/{virtualizer-BcC1XuFf.mjs → virtualizer-0-UBy7xl.mjs} +4 -4
  230. package/.output/server/chunks/build/virtualizer-0-UBy7xl.mjs.map +1 -0
  231. package/.output/server/chunks/build/{wasted-time-CFmeT_e2.mjs → wasted-time-L4kBV5Nh.mjs} +8 -8
  232. package/.output/server/chunks/build/wasted-time-L4kBV5Nh.mjs.map +1 -0
  233. package/.output/server/chunks/nitro/nitro.mjs +949 -684
  234. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  235. package/.output/server/chunks/routes/__piwi/session.get.mjs +51 -0
  236. package/.output/server/chunks/routes/__piwi/session.get.mjs.map +1 -0
  237. package/.output/server/chunks/routes/api/admin/stats.get.mjs +5 -1
  238. package/.output/server/chunks/routes/api/admin/stats.get.mjs.map +1 -1
  239. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs +75 -6
  240. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs.map +1 -1
  241. package/.output/server/chunks/routes/api/auth/change-password.post.mjs +1 -1
  242. package/.output/server/chunks/routes/api/auth/forgot-password.post.mjs +1 -1
  243. package/.output/server/chunks/routes/api/auth/login.post.mjs +1 -1
  244. package/.output/server/chunks/routes/api/auth/logout.post.mjs +1 -1
  245. package/.output/server/chunks/routes/api/auth/me.get.mjs +1 -1
  246. package/.output/server/chunks/routes/api/auth/oauth/_provider/callback.get.mjs +1 -1
  247. package/.output/server/chunks/routes/api/auth/oauth/_provider/login.get.mjs +1 -1
  248. package/.output/server/chunks/routes/api/auth/oauth/_provider/unlink.post.mjs +1 -1
  249. package/.output/server/chunks/routes/api/auth/reset-password.post.mjs +1 -1
  250. package/.output/server/chunks/routes/api/auth/send-verify-email.post.mjs +1 -1
  251. package/.output/server/chunks/routes/api/auth/setup.get.mjs +1 -1
  252. package/.output/server/chunks/routes/api/auth/setup.post.mjs +1 -1
  253. package/.output/server/chunks/routes/api/auth/verify-email.get.mjs +1 -1
  254. package/.output/server/chunks/routes/api/channels/_id/test.post.mjs +1 -1
  255. package/.output/server/chunks/routes/api/channels/_id_.delete.mjs +1 -1
  256. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/approve.post.mjs +1 -1
  257. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/reject.post.mjs +1 -1
  258. package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs +45 -0
  259. package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs.map +1 -0
  260. package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs +1 -1
  261. package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs +1 -1
  262. package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs +1 -1
  263. package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs +1 -1
  264. package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs +1 -1
  265. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs +1 -1
  266. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs +1 -1
  267. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs +1 -1
  268. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs +1 -1
  269. package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs +1 -1
  270. package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs +1 -1
  271. package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs +1 -1
  272. package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs +1 -1
  273. package/.output/server/chunks/routes/api/files/_...path_.get.mjs +1 -1
  274. package/.output/server/chunks/routes/api/health.get.mjs +1 -1
  275. package/.output/server/chunks/routes/api/index.get.mjs +1 -1
  276. package/.output/server/chunks/routes/api/index.get2.mjs +1 -1
  277. package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
  278. package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
  279. package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
  280. package/.output/server/chunks/routes/api/index.post.mjs +1 -1
  281. package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
  282. package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
  283. package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
  284. package/.output/server/chunks/routes/api/index.post5.mjs +1 -1
  285. package/.output/server/chunks/routes/api/index.post6.mjs +1 -1
  286. package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs +1 -1
  287. package/.output/server/chunks/routes/api/links/_id_.delete.mjs +1 -1
  288. package/.output/server/chunks/routes/api/links/_id_.patch.mjs +1 -1
  289. package/.output/server/chunks/routes/api/markers/_id_.delete.mjs +1 -1
  290. package/.output/server/chunks/routes/api/markers/_id_.put.mjs +1 -1
  291. package/.output/server/chunks/routes/api/notifications/stream.get.mjs +1 -1
  292. package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs +1 -1
  293. package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs +1 -1
  294. package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs +1 -1
  295. package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs +1 -1
  296. package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs +1 -1
  297. package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs +1 -1
  298. package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs +1 -1
  299. package/.output/server/chunks/routes/api/projects/_id/members.get.mjs +1 -1
  300. package/.output/server/chunks/routes/api/projects/_id/members.put.mjs +1 -1
  301. package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs +1 -1
  302. package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs +1 -1
  303. package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs +1 -1
  304. package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs +1 -1
  305. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs +50 -0
  306. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs.map +1 -0
  307. package/.output/server/chunks/routes/api/projects/_id_.delete.mjs +1 -1
  308. package/.output/server/chunks/routes/api/projects/_id_.get.mjs +1 -1
  309. package/.output/server/chunks/routes/api/projects/_id_.put.mjs +1 -1
  310. package/.output/server/chunks/routes/api/projects/menu.get.mjs +1 -1
  311. package/.output/server/chunks/routes/api/projects/overview.get.mjs +1 -1
  312. package/.output/server/chunks/routes/api/projects.get.mjs +1 -1
  313. package/.output/server/chunks/routes/api/search.get.mjs +1 -1
  314. package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs +1 -1
  315. package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs +1 -1
  316. package/.output/server/chunks/routes/api/settings/ai/test.post.mjs +1 -1
  317. package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs +1 -1
  318. package/.output/server/chunks/routes/api/settings/ai.get.mjs +1 -1
  319. package/.output/server/chunks/routes/api/settings/ai.put.mjs +1 -1
  320. package/.output/server/chunks/routes/api/settings/smtp/test.post.mjs +1 -1
  321. package/.output/server/chunks/routes/api/settings/smtp.get.mjs +1 -1
  322. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs +40 -0
  323. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs.map +1 -0
  324. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs +46 -0
  325. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs.map +1 -0
  326. package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs +1 -1
  327. package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs +1 -1
  328. package/.output/server/chunks/routes/api/stream.get.mjs +1 -1
  329. package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs +1 -1
  330. package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs +1 -1
  331. package/.output/server/chunks/routes/api/tags/_id_.delete.mjs +1 -1
  332. package/.output/server/chunks/routes/api/tags/_id_.put.mjs +1 -1
  333. package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs +1 -1
  334. package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs +1 -1
  335. package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs +1 -1
  336. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs +1 -1
  337. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs +1 -1
  338. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs +1 -1
  339. package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs +1 -1
  340. package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs +1 -1
  341. package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs +1 -1
  342. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs +1 -1
  343. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs +1 -1
  344. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs +1 -1
  345. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs +1 -1
  346. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs +1 -1
  347. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs +1 -1
  348. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs +1 -1
  349. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs +1 -1
  350. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs +1 -1
  351. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs +1 -1
  352. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs +1 -1
  353. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs +1 -1
  354. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs +1 -1
  355. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs +1 -1
  356. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs +1 -1
  357. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs +1 -1
  358. package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs +1 -1
  359. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs +1 -1
  360. package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs +1 -1
  361. package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs +1 -1
  362. package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs +1 -1
  363. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs +1 -1
  364. package/.output/server/chunks/routes/api/test-runs/setup.post.mjs +1 -1
  365. package/.output/server/chunks/routes/api/test-runs/start.post.mjs +1 -1
  366. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs +3 -1
  367. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs.map +1 -1
  368. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs +2 -1
  369. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs.map +1 -1
  370. package/.output/server/chunks/routes/api/traces/check.post.mjs +1 -1
  371. package/.output/server/chunks/routes/api/users/_id/api-keys/_keyId_.delete.mjs +1 -1
  372. package/.output/server/chunks/routes/api/users/_id/index.get.mjs +1 -1
  373. package/.output/server/chunks/routes/api/users/_id/index.post.mjs +1 -1
  374. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs +1 -1
  375. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs +1 -1
  376. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs +1 -1
  377. package/.output/server/chunks/routes/api/users/_id_.delete.mjs +1 -1
  378. package/.output/server/chunks/routes/api/users/_id_.patch.mjs +1 -1
  379. package/.output/server/chunks/routes/api/version.get.mjs +1 -1
  380. package/.output/server/chunks/routes/mcp.post.mjs +1 -1
  381. package/.output/server/chunks/routes/renderer.mjs +1 -1
  382. package/.output/server/database/migrations/0037_tired_hellion.sql +1 -0
  383. package/.output/server/database/migrations/0038_glamorous_ulik.sql +1 -0
  384. package/.output/server/database/migrations/meta/0037_snapshot.json +3384 -0
  385. package/.output/server/database/migrations/meta/0038_snapshot.json +3391 -0
  386. package/.output/server/database/migrations/meta/_journal.json +14 -0
  387. package/.output/server/database/migrations-pg/0038_tranquil_moira_mactaggert.sql +1 -0
  388. package/.output/server/database/migrations-pg/0039_fat_starjammers.sql +1 -0
  389. package/.output/server/database/migrations-pg/meta/0038_snapshot.json +4027 -0
  390. package/.output/server/database/migrations-pg/meta/0039_snapshot.json +4033 -0
  391. package/.output/server/database/migrations-pg/meta/_journal.json +14 -0
  392. package/.output/server/index.mjs +1 -1
  393. package/.output/server/package.json +1 -1
  394. package/package.json +1 -1
  395. package/.output/public/_nuxt/2kfkdDTz.js +0 -1
  396. package/.output/public/_nuxt/BXEDsEwG.js +0 -1
  397. package/.output/public/_nuxt/BbgBGuMG.js +0 -1
  398. package/.output/public/_nuxt/CJGJI2Of.js +0 -34
  399. package/.output/public/_nuxt/Ce4EdfL_.js +0 -4
  400. package/.output/public/_nuxt/CkpB9oBr.js +0 -1
  401. package/.output/public/_nuxt/D1tZEdSi.js +0 -1
  402. package/.output/public/_nuxt/DK9uMTYX.js +0 -1
  403. package/.output/public/_nuxt/YDWXnWou.js +0 -1
  404. package/.output/public/_nuxt/builds/meta/f549de31-8db6-4504-b526-482778a55eba.json +0 -1
  405. package/.output/public/_nuxt/entry.BxXHl1Vy.css +0 -1
  406. package/.output/public/_nuxt/wCQds5_f.js +0 -1
  407. package/.output/server/chunks/build/BrowserBadge-BTA4QU_J.mjs.map +0 -1
  408. package/.output/server/chunks/build/ChartCard-BqAhMip2.mjs.map +0 -1
  409. package/.output/server/chunks/build/Checkbox-_1nGm_DR.mjs.map +0 -1
  410. package/.output/server/chunks/build/CiEnvCard-DAufYuJw.mjs.map +0 -1
  411. package/.output/server/chunks/build/CodeBlock-BVKHuYjU.mjs.map +0 -1
  412. package/.output/server/chunks/build/DashboardNavbar-BR6j4VLd.mjs.map +0 -1
  413. package/.output/server/chunks/build/DiagnosisPanel-BnrdXDvd.mjs.map +0 -1
  414. package/.output/server/chunks/build/EnvManagedBadge-DdnEtjIl.mjs.map +0 -1
  415. package/.output/server/chunks/build/HelpHint-D_GJzMpW.mjs.map +0 -1
  416. package/.output/server/chunks/build/Modal-COIjm3js.mjs.map +0 -1
  417. package/.output/server/chunks/build/ProjectTestCasesTable-XFBPQGIX.mjs.map +0 -1
  418. package/.output/server/chunks/build/RunReports-ChNkmuWa.mjs.map +0 -1
  419. package/.output/server/chunks/build/RunStatusBadge-CXpuCUGQ.mjs.map +0 -1
  420. package/.output/server/chunks/build/SectionCard-zs9FDzps.mjs.map +0 -1
  421. package/.output/server/chunks/build/Select-r3S5nkSY.mjs.map +0 -1
  422. package/.output/server/chunks/build/Separator-pqpPG0up.mjs.map +0 -1
  423. package/.output/server/chunks/build/SettingsField-Wdpzlt13.mjs.map +0 -1
  424. package/.output/server/chunks/build/Slideover-02XjJjn0.mjs.map +0 -1
  425. package/.output/server/chunks/build/Switch-gx_JXgCo.mjs.map +0 -1
  426. package/.output/server/chunks/build/Table-C64RrBp3.mjs.map +0 -1
  427. package/.output/server/chunks/build/TestStatusBar--u4VX_Xf.mjs.map +0 -1
  428. package/.output/server/chunks/build/Tooltip-ui_BVvqr.mjs.map +0 -1
  429. package/.output/server/chunks/build/VisuallyHiddenInput-mMsqmkjz.mjs.map +0 -1
  430. package/.output/server/chunks/build/_id_-R6KGfZOC.mjs.map +0 -1
  431. package/.output/server/chunks/build/_id_-pkxJKe17.mjs.map +0 -1
  432. package/.output/server/chunks/build/about-CmtGYbC6.mjs.map +0 -1
  433. package/.output/server/chunks/build/account-AbLuwiZP.mjs.map +0 -1
  434. package/.output/server/chunks/build/ai-DR_slopS.mjs.map +0 -1
  435. package/.output/server/chunks/build/analytics-BbT2-Tr-.mjs.map +0 -1
  436. package/.output/server/chunks/build/db.client-DlA_u5y9.mjs.map +0 -1
  437. package/.output/server/chunks/build/default-D6diRCW0.mjs.map +0 -1
  438. package/.output/server/chunks/build/edit-CNV4xdYj.mjs.map +0 -1
  439. package/.output/server/chunks/build/help-content-BMumoQQF.mjs.map +0 -1
  440. package/.output/server/chunks/build/index-DmHBPf7T.mjs.map +0 -1
  441. package/.output/server/chunks/build/index-Dw526KXV.mjs.map +0 -1
  442. package/.output/server/chunks/build/index-dwYB76GO.mjs.map +0 -1
  443. package/.output/server/chunks/build/index-rSHkKNna.mjs.map +0 -1
  444. package/.output/server/chunks/build/isValueEqualOrExist-DTJ5ejZs.mjs.map +0 -1
  445. package/.output/server/chunks/build/login-Da5C8jP2.mjs.map +0 -1
  446. package/.output/server/chunks/build/mcp-DM1t-9L_.mjs.map +0 -1
  447. package/.output/server/chunks/build/notifications-BTPF0xA7.mjs.map +0 -1
  448. package/.output/server/chunks/build/settings-Bmw_JdBS.mjs.map +0 -1
  449. package/.output/server/chunks/build/settings-metadata-CksLgMun.mjs.map +0 -1
  450. package/.output/server/chunks/build/storage-BqR4acgi.mjs.map +0 -1
  451. package/.output/server/chunks/build/tags-miPAzIr3.mjs.map +0 -1
  452. package/.output/server/chunks/build/test-cases-D-LqhLpk.mjs.map +0 -1
  453. package/.output/server/chunks/build/useAiStatus-FwqbA4gz.mjs.map +0 -1
  454. package/.output/server/chunks/build/useSettingsNav-v_dFuTw9.mjs.map +0 -1
  455. package/.output/server/chunks/build/users-D-GDKZmZ.mjs.map +0 -1
  456. package/.output/server/chunks/build/virtualizer-BcC1XuFf.mjs.map +0 -1
  457. package/.output/server/chunks/build/wasted-time-CFmeT_e2.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import{d as oe,o as n,c as l,j as $,g as S,M as mt,i as d,T as Re,ac as ft,k as t,Q as ge,H as he,v as ye,f as P,p as re,q as k,m as L,t as p,F as D,G as pt,r as j,y as ne,s as Ie,_ as Me,h as w,z as ot,B as Be,ad as Le,C as st,b as gt,D as ht,l as Oe,O as Qe,A as qe,aa as Ae,x as vt,U as Ue,ae as Se,K as je,R as yt,ab as xt,af as bt,ag as kt,ah as _t,Z as $t,$ as wt}from"./B8fs6GU9.js";import{_ as Ze}from"./n7Htv9PJ.js";import{o as Ct,q as St,e as Tt,f as We,u as at,l as Pe,k as Lt,v as At}from"./CvCF77E-.js";import{_ as It,a as zt}from"./wCQds5_f.js";import{_ as Ne}from"./BBJ9Pu3M.js";import{_ as Bt}from"./CD-xwM9N.js";import{u as Ge}from"./DWzdeQ3Z.js";import{u as Ee}from"./DAeYEeCC.js";import{_ as Rt}from"./BCK4f6Y3.js";import{_ as Pt}from"./DFw8I2FL.js";import{_ as Ot}from"./0KrkW531.js";import{l as Ut,i as Et,b as Mt}from"./BfshMo9k.js";import{_ as rt}from"./2PU-adwy.js";import{_ as jt}from"./B32ySRXg.js";const Nt={class:"flex items-center justify-between gap-2"},Kt=["aria-expanded","title"],Vt={class:"text-lg font-medium inline-flex items-center gap-1 shrink-0"},Dt={key:2,class:"min-w-0 flex-1 truncate text-sm text-gray-500 dark:text-gray-400"},Ht={key:0,class:"flex items-center gap-1 shrink-0"},Ft={key:0,class:"text-sm text-gray-500 mt-1 ml-11"},qt=oe({__name:"CollapsibleSectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{},storageKey:{},defaultFolded:{type:Boolean,default:!0}},setup(e,{expose:r}){const i=e,{folded:m,toggle:o,setFolded:a}=Ut(`piwi-section-fold-${i.storageKey}`,i.defaultFolded),s=j(null);function g(){a(!1),pt(()=>s.value?.scrollIntoView({behavior:"smooth",block:"start"}))}return r({setFolded:a,reveal:g}),(c,h)=>{const C=ye,T=It,x=jt;return n(),l("div",{ref_key:"rootEl",ref:s,class:"scroll-mt-4"},[$(x,{ui:{header:"p-3 sm:px-4 sm:py-3",body:t(m)?"p-0 sm:p-0":""},class:re(t(m)&&"divide-y-0")},{header:S(()=>[d("div",Nt,[d("div",{class:"flex items-center gap-2 min-w-0 flex-1 cursor-pointer select-none rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-primary",role:"button",tabindex:"0","aria-expanded":!t(m),title:t(m)?"Expand section":"Collapse section",onClick:h[1]||(h[1]=(...A)=>t(o)&&t(o)(...A)),onKeydown:[h[2]||(h[2]=ge((...A)=>t(o)&&t(o)(...A),["enter"])),h[3]||(h[3]=ge(he((...A)=>t(o)&&t(o)(...A),["prevent"]),["space"]))]},[$(C,{name:t(m)?"i-lucide-chevron-right":"i-lucide-chevron-down",class:"size-4 shrink-0 text-gray-400"},null,8,["name"]),e.icon?(n(),P(C,{key:0,name:e.icon,class:re(["size-5 shrink-0",e.iconClass])},null,8,["name","class"])):k("",!0),d("h3",Vt,[L(p(e.title),1),e.count!=null?(n(),l(D,{key:0},[L(" ("+p(e.count)+")",1)],64)):k("",!0)]),e.help?(n(),l("span",{key:1,onClick:h[0]||(h[0]=he(()=>{},["stop"]))},[$(T,{topic:e.help},null,8,["topic"])])):k("",!0),t(m)&&c.$slots.folded?(n(),l("span",Dt,[Re(c.$slots,"folded")])):k("",!0)],40,Kt),c.$slots.actions?(n(),l("div",Ht,[Re(c.$slots,"actions")])):k("",!0)]),!t(m)&&(e.subtitle||c.$slots.subtitle)?(n(),l("p",Ft,[Re(c.$slots,"subtitle",{},()=>[L(p(e.subtitle),1)])])):k("",!0)]),default:S(()=>[mt(d("div",null,[Re(c.$slots,"default")],512),[[ft,!t(m)]])]),_:3},8,["ui","class"])],512)}}}),Ke=Object.assign(qt,{__name:"CollapsibleSectionCard"}),Zt={class:"overflow-x-auto text-xs font-mono"},Wt=oe({__name:"DiffPatch",props:{patch:{}},setup(e){return(r,i)=>(n(),l("div",Zt,[(n(!0),l(D,null,ne(("parsePatchLines"in r?r.parsePatchLines:t(St))(e.patch),(m,o)=>(n(),l("div",{key:o,class:re(["px-3 py-px whitespace-pre leading-5 min-w-0",("patchLineClass"in r?r.patchLineClass:t(Ct))[m.type]])},p(m.text||" "),3))),128))]))}}),Gt=Object.assign(Wt,{__name:"DiffPatch"}),Yt=["role","aria-checked","tabindex"],Jt={class:"flex-1 min-w-0"},Qt=["title"],Xt={key:0,class:"text-[11px] leading-4 text-gray-500 truncate"},en=oe({__name:"LocatorAlternativeRow",props:{alt:{},note:{default:void 0},copied:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1}},emits:["copy","select"],setup(e){const r=e;function i(a){return a>=80?"success":a>=50?"warning":"error"}function m(a){const{method:s,score:g,args:c}=a;return c&&(c.anchorTestId||c.anchorSelector||c.anchorRole)?"scoped to a stable ancestor — survives renames":g>=100?"most stable — purpose-built for testing":s==="getByRole"&&c&&!("name"in c)?"name-free role — survives renames":s==="getByRole"?"browser ARIA tree — semantic and stable":s==="getByLabel"?"associated <label> element":s==="getByPlaceholder"?"input placeholder":s==="getByText"?"visible text":s==="getByAltText"?"image alt text":s==="getByTitle"?"title attribute":s==="locator"&&g>=50?"stable selector":s==="locator"?"CSS class — may be fragile":""}const o=w(()=>r.note??m(r.alt));return(a,s)=>{const g=Ie,c=ye,h=Me;return n(),l("div",{class:re(["flex items-center gap-2 rounded border",[e.dense?"py-1 px-2":"py-1.5 px-2.5",e.selectable?"cursor-pointer hover:bg-elevated transition-colors focus-visible:outline-2 focus-visible:outline-primary":"",e.selectable&&e.selected?"border-primary/60 ring-1 ring-primary/50":"border-default/50"]]),role:e.selectable?"radio":void 0,"aria-checked":e.selectable?e.selected:void 0,tabindex:e.selectable?0:void 0,onClick:s[1]||(s[1]=C=>e.selectable&&a.$emit("select")),onKeydown:[s[2]||(s[2]=ge(he(C=>e.selectable&&a.$emit("select"),["prevent"]),["enter"])),s[3]||(s[3]=ge(he(C=>e.selectable&&a.$emit("select"),["prevent"]),["space"]))]},[$(g,{size:"xs",color:i(e.alt.score),variant:"subtle",class:re(["shrink-0 font-mono tabular-nums cursor-default text-center",e.dense?"min-w-[2.25rem]":"min-w-[2.5rem]"]),title:`Stability score: ${e.alt.score}/100`},{default:S(()=>[L(p(e.alt.score),1)]),_:1},8,["color","class","title"]),d("div",Jt,[d("code",{class:"text-xs font-mono block truncate",title:e.alt.locator},p(e.alt.locator),9,Qt),t(o)?(n(),l("p",Xt,p(t(o)),1)):k("",!0)]),e.alt.pickedByUser&&e.dense?(n(),P(c,{key:0,name:"i-lucide-user-check",class:"size-3.5 text-primary shrink-0",title:"Confirmed with the locator picker"})):e.alt.pickedByUser?(n(),P(g,{key:1,size:"xs",color:"primary",variant:"subtle",icon:"i-lucide-user-check",class:"shrink-0",title:"Confirmed with the locator picker on the failing page"})):k("",!0),$(h,{size:"xs",variant:"ghost",color:"neutral",icon:e.copied?"i-lucide-check":"i-lucide-copy",title:e.copied?"Copied!":"Copy",class:"shrink-0",onClick:s[0]||(s[0]=he(C=>a.$emit("copy"),["stop"]))},null,8,["icon","title"])],42,Yt)}}}),it=Object.assign(en,{__name:"LocatorAlternativeRow"}),Xe={getByTestId:"testid",getByRole:"semantic",getByLabel:"label",getByPlaceholder:"label",getByText:"text",getByAltText:"text",getByTitle:"text",locator:"css","page.locator":"css"},tn=50;function lt(e,r,i=tn){const m=r[0]??null;if(!m)return{recommended:null,durable:null,preservesConvention:!1,hasDurableAlternative:!1,suggestAddTestId:!1};const o=e?Xe[e]:void 0,a=(e?r.find(c=>c.method===e&&c.score>=i):void 0)??(o?r.find(c=>Xe[c.method]===o&&c.score>=i):void 0),g=r.find(c=>c.pickedByUser)??a??m;return{recommended:g,durable:m,preservesConvention:!!a&&g===a,hasDurableAlternative:g.locator!==m.locator,suggestAddTestId:m.score<i}}const ct={a:"link",button:"button",nav:"navigation",main:"main",article:"article",section:"region",form:"form",img:"img",figure:"figure",figcaption:"caption",blockquote:"blockquote",table:"table",ul:"list",ol:"list",li:"listitem",dialog:"dialog",output:"status",progress:"progressbar",meter:"meter",textarea:"textbox",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",details:"group",summary:"button",search:"search"},nn={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",search:"searchbox",number:"spinbutton",text:"textbox",email:"textbox",tel:"textbox",url:"textbox",password:"textbox"},on=["id","class","name","data-testid","placeholder","alt","title","aria-label","aria-level","role","type","href","multiple"];function sn(e){const r=e.attributes.role;if(r)return r;const i=e.tagName;if(!i)return null;if(i==="input"){const m=(e.attributes.type??"text").toLowerCase();return nn[m]??"textbox"}return i==="select"?e.attributes.multiple!=null?"listbox":"combobox":i==="a"?e.attributes.href!=null?"link":null:ct[i]??null}function an(e,r){if(r!=="heading")return null;const i=e.tagName.match(/^h([1-6])$/);if(i)return Number(i[1]);const m=e.attributes["aria-level"];return m&&/^\d+$/.test(m)?Number(m):null}const $e=(e,r)=>e.attributes[r]||null,pe=e=>e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),He=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),et=e=>/^[A-Za-z][A-Za-z0-9_-]*$/.test(e);function rn(e){return/[a-f0-9]{8,}/i.test(e)?10:/^(?:css|sc|emotion|styled)-/i.test(e)?15:/^(bg|text|border|shadow|opacity|font|w-|h-|m[tblrxy]?-|p[tblrxy]?-|flex|grid|gap|rounded|absolute|relative|fixed|sticky|block|inline|hidden|overflow|z-|top-|right-|bottom-|left-|inset-|justify-|items-|self-|content-|order-|col-|row-)/.test(e)?25:/__/.test(e)||/--/.test(e)?35:/^[a-z]+(-[a-z]+)+$/.test(e)||/^[a-z]+[A-Z][a-zA-Z]+$/.test(e)?40:(e.includes("_")||/^[a-z]+-[a-z0-9]{5,}$/.test(e)&&/[0-9]/.test(e),15)}function tt(e){return!!(/^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$/i.test(e)||/^[a-f0-9]{8,}$/i.test(e)||/^[a-z]+-\d+$/.test(e)||/^(emotion-|styled-|css-|sc-)/.test(e)||e.startsWith("ng-")||/^(radix-|headlessui-|mui-|mantine-|chakra-)/i.test(e)||/^:r[0-9a-z]+:$/i.test(e)||/^«r[0-9a-z]+»$/i.test(e))}function ln(e){const r=[],i=new Set,m=y=>{i.has(y.locator)||(i.add(y.locator),r.push(y))},{accessibleName:o}=e,a=e.tagName,s=sn(e),g=e.selectorCounts,c=y=>y==null||y<=1,h=e.textContent?e.textContent.replace(/\s+/g," ").trim():null,C=$e(e,"data-testid");C&&c(g?.testId)&&m({locator:`getByTestId('${pe(C)}')`,method:"getByTestId",args:{testId:C},score:100});const T=an(e,s),x=T!=null?`, level: ${T}`:"",A=y=>T!=null?{...y,level:T}:y;s&&o&&m({locator:`getByRole('${s}', { name: '${pe(o)}'${x} })`,method:"getByRole",args:A({role:s,name:o}),score:90});const z=$e(e,"aria-label");if(s&&z&&z!==o&&m({locator:`getByRole('${s}', { name: '${pe(z)}'${x} })`,method:"getByRole",args:A({role:s,name:z}),score:85}),o&&["input","select","textarea"].includes(a)){const y=$e(e,"aria-label");(e.hasLabel===void 0||e.hasLabel===!0||y===o)&&m({locator:`getByLabel('${pe(o)}')`,method:"getByLabel",args:{label:o},score:85})}const B=$e(e,"placeholder");B&&m({locator:`getByPlaceholder('${pe(B)}')`,method:"getByPlaceholder",args:{placeholder:B},score:80}),h&&h.length<80&&m({locator:`getByText('${pe(h)}')`,method:"getByText",args:{text:h},score:75});const Z=$e(e,"id");if(Z&&!tt(Z)&&c(g?.id)){const y=et(Z)?`#${Z}`:`[id="${He(Z)}"]`;m({locator:`locator('${pe(y)}')`,method:"locator",args:{selector:y},score:65})}const Y=$e(e,"name");if(Y&&c(g?.name)){const y=`[name="${He(Y)}"]`;m({locator:`locator('${pe(y)}')`,method:"locator",args:{selector:y},score:60})}const E=$e(e,"alt");E&&m({locator:`getByAltText('${pe(E)}')`,method:"getByAltText",args:{text:E},score:60});const O=$e(e,"title");O&&m({locator:`getByTitle('${pe(O)}')`,method:"getByTitle",args:{title:O},score:50});const ce=!!(C&&c(g?.testId));if(s&&!ce){const y=T!=null?`'${s}', { level: ${T} }`:`'${s}'`,H=A({role:s});let M=!1,K=!1,W=!1;for(const Q of e.ancestors??[]){if(Q.scopedRoleCount!==1)continue;if(!M&&Q.testId&&Q.testIdCount===1&&(M=!0,m({locator:`getByTestId('${pe(Q.testId)}').getByRole(${y})`,method:"getByRole",args:{...H,anchorTestId:Q.testId},score:72})),!K&&Q.id&&!tt(Q.id)&&Q.idCount===1){K=!0;const xe=et(Q.id)?`#${Q.id}`:`[id="${He(Q.id)}"]`;m({locator:`locator('${pe(xe)}').getByRole(${y})`,method:"getByRole",args:{...H,anchorSelector:xe},score:64})}const ve=Q.role||ct[Q.tag]||null;!W&&ve&&ve!==s&&Q.roleCount===1&&(W=!0,m({locator:`getByRole('${pe(ve)}').getByRole(${y})`,method:"getByRole",args:{...H,anchorRole:ve},score:55}))}const F=e.rolePosition;F&&F.role===s&&(F.count===1||T!=null&&F.levelCount===1)&&m({locator:`getByRole(${y})`,method:"getByRole",args:H,score:58})}const ee=$e(e,"class");if(ee){const y=g?.classes,H=ee.split(/\s+/).filter(M=>M.length>1&&/^[A-Za-z_-][A-Za-z0-9_-]*$/.test(M)&&c(y?.[M])).map(M=>({cls:M,score:rn(M)})).sort((M,K)=>K.score-M.score).slice(0,3);for(const{cls:M,score:K}of H)m({locator:`locator('.${pe(M)}')`,method:"locator",args:{selector:`.${M}`},score:K})}return r.sort((y,H)=>H.score-y.score)}function cn(e){const r=e.attributes,i=r["aria-label"];if(i)return i;if(e.textContent)return e.textContent;const m=r.title;if(m)return m;const o=r.placeholder;return o||null}function un(e){if(window.__piwiPickerInstalled)return;window.__piwiPickerInstalled=!0;var r=document,i=window,m=2147483600,o=e.probedAttrs,a=r.createElement("div");a.id="__piwi_picker_highlight",a.style.cssText="position:fixed;pointer-events:none;z-index:"+m+";display:none;box-sizing:border-box;border:2px solid #7c3aed;background:rgba(124,58,237,.12);border-radius:3px;",r.body.appendChild(a);var s=r.createElement("div");s.id="__piwi_picker_banner",s.style.cssText="position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:"+(m+2)+";background:#111827;color:#f9fafb;font:13px/1.5 system-ui,sans-serif;padding:10px 16px;border-radius:8px;box-shadow:0 4px 24px rgba(0,0,0,.4);max-width:80vw;",s.innerHTML='<div>Click an element to generate locators</div><div style="color:#9ca3af;margin-top:3px;font-size:11px">↑ parent · ↓ child · Esc skip</div>',r.body.appendChild(s),i.parent.postMessage({type:"pickerReady"},"*");function g(u){var b=(u.tagName||"?").toLowerCase(),I=u.getAttribute&&u.getAttribute("data-testid");if(I)return"getByTestId('"+I+"')";if(u.labels&&u.labels.length>0){var U=(u.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,80);if(U)return"getByLabel('"+U+"')"}var X=u.getAttribute&&u.getAttribute("aria-label");if(X)return"getByLabel('"+X+"')";var J=u.getAttribute&&u.getAttribute("placeholder");if(J)return"getByPlaceholder('"+J+"')";var q=u.getAttribute&&u.getAttribute("alt");if(q)return"getByAltText('"+q+"')";var ae=u.getAttribute&&u.getAttribute("title");if(ae)return"getByTitle('"+ae+"')";if(u.id)return"locator('#"+u.id+"')";var fe=(u.getAttribute&&u.getAttribute("class")||"").split(/\s+/).find(function(_){return _.length>1});return fe?"locator('."+fe+"')":b}function c(u){for(var b=[],I=u;I&&b.length<15;){var U=(I.tagName||"").toLowerCase();if(U==="body"||U==="html")break;b.push(I),I=I.parentElement}return b.length?b:[u]}var h=["button","a","input","select","textarea","summary","option"];function C(u){for(var b=0;b<Math.min(u.length,4);b++){var I=u[b],U=(I.tagName||"").toLowerCase();if(h.indexOf(U)!==-1||I.getAttribute&&(I.getAttribute("role")||I.getAttribute("data-testid")))return b}return 0}var T=[],x=0,A=null;function z(){return T[x]||null}function B(){var u=z();if(!u){a.style.display="none";return}var b=u.getBoundingClientRect();a.style.display="block",a.style.left=b.left+"px",a.style.top=b.top+"px",a.style.width=b.width+"px",a.style.height=b.height+"px";var I=r.getElementById("__piwi_picker_foot");I&&(I.textContent=g(u)+" — click to pick · ↑ parent · ↓ child · Esc skip")}var Z=s.querySelector("[style*=margin]");Z&&(Z.id="__piwi_picker_foot");function Y(u){for(var b={},I=0;I<o.length;I++){var U=o[I],X=u.getAttribute(U)||u[U];b[U]=typeof X=="string"?X.slice(0,200):X?String(X).slice(0,200):null}var J=u.getBoundingClientRect(),q={};try{var ae=function(we){return i.CSS.escape(we)},fe=function(we){try{return r.querySelectorAll(we).length}catch{return}};b["data-testid"]&&(q.testId=fe("[data-testid="+JSON.stringify(b["data-testid"])+"]")),b.id&&(q.id=fe("#"+ae(b.id))),b.name&&(q.name=fe("[name="+JSON.stringify(b.name)+"]"));var _=(b.class||"").split(/\s+/).filter(function(we){return we.length>1}).slice(0,10);if(_.length>0){for(var v={},G=0;G<_.length;G++){var le=fe("."+ae(_[G]));le!==void 0&&(v[_[G]]=le)}q.classes=v}}catch{}var Ve=null;return u.labels&&u.labels.length>0&&(Ve=(u.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,120)||null),{tagName:(u.tagName||"").toLowerCase(),attributes:b,textContent:(u.textContent||"").replace(/\s+/g," ").trim().slice(0,80)||null,center:{x:Math.round(J.x+J.width/2),y:Math.round(J.y+J.height/2)},hasLabel:!!(u.labels&&u.labels.length>0),labelText:Ve,selectorCounts:q}}function E(u){u.preventDefault(),u.stopImmediatePropagation()}function O(u){return u===s||u===a||s.contains&&s.contains(u)||u&&u.__piwiHint}var ce="top";function ee(u){ce!==u&&(ce=u,u==="bottom"?(s.style.top="auto",s.style.bottom="12px"):(s.style.top="12px",s.style.bottom="auto"))}function y(u){var b=u.target;if(!b||O(b)){a.style.display="none";return}b!==A&&(A=b,T=c(b),x=C(T)),B();var I=z();if(I){var U=I.getBoundingClientRect(),X=s.getBoundingClientRect(),J=8;U.left<X.right+J&&U.right>X.left-J&&U.top<X.bottom+J&&U.bottom>X.top-J&&ee(ce==="top"?"bottom":"top")}}function H(u){if(u==="Escape"){Te();return}u==="ArrowUp"&&(x=Math.min(x+1,T.length-1),B()),u==="ArrowDown"&&(x=Math.max(x-1,0),B())}function M(u){(u.key==="Escape"||u.key==="ArrowUp"||u.key==="ArrowDown")&&(E(u),H(u.key))}var K=[];function W(){for(var u=0;u<K.length;u++)K[u].parentNode&&K[u].parentNode.removeChild(K[u]);K=[]}function F(u){return(u||"").replace(/\s+/g," ").trim().toLowerCase()}function Q(u){var b=F(u);if(b.length<2)return[];for(var I=r.querySelectorAll("button,a,[role],h1,h2,h3,h4,h5,h6,label,summary,input,textarea,select,option,span,li,td,th,p"),U=[],X=[],J=0;J<I.length;J++){var q=I[J],ae=F(q.textContent);if(!ae){var fe=F(q.getAttribute&&(q.getAttribute("placeholder")||q.getAttribute("aria-label"))||"");fe&&(fe===b||fe.indexOf(b)!==-1)&&U.push(q);continue}ae.length>120||(ae===b?U.push(q):ae.indexOf(b)!==-1&&ae.length<b.length+30&&X.push(q))}return U.concat(X)}function ve(u,b){var I=u.getBoundingClientRect();if(I.width===0&&I.height===0)return null;var U=r.createElement("div");return U.__piwiHint=!0,U.style.cssText="position:fixed;pointer-events:none;z-index:"+(m+1)+";box-sizing:border-box;border-radius:3px;transition:opacity .3s;border:2px solid "+b+";box-shadow:0 0 0 3px "+b+"55;left:"+I.left+"px;top:"+I.top+"px;width:"+I.width+"px;height:"+I.height+"px;",r.body.appendChild(U),K.push(U),U}function xe(u){var b=u.getBoundingClientRect();i.parent.postMessage({type:"piwiScrollTo",y:b.top},"*")}function ze(u){if(W(),!(!u||!u.length)){for(var b=null,I=0;I<u.length;I++)for(var U=u[I],X=Q(U&&U.text),J=0;J<Math.min(X.length,3);J++)ve(X[J],"#f59e0b"),b||(b=X[J]);b&&xe(b),setTimeout(function(){for(var q=0;q<K.length;q++)K[q].style.opacity="0"},2600),setTimeout(W,3e3)}}var te=[],ke=0;function R(){i.parent.postMessage({type:"piwiSearchResult",count:te.length,index:te.length?ke:-1},"*")}function f(){W();var u=te[ke];u&&(ve(u,"#7c3aed"),xe(u),R())}function N(u){if(te=Q(u),ke=0,!te.length){W(),R();return}f()}function be(){te.length&&(ke=(ke+1)%te.length,f())}function me(u){var b=u.data;if(!(!b||typeof b.type!="string")){if(b.type==="piwiPickerKey"&&typeof b.key=="string")H(b.key);else if(b.type==="piwiHighlight")try{ze(b.hints)}catch{}else if(b.type==="piwiSearch")try{N(b.q)}catch{}else if(b.type==="piwiSearchNext")try{be()}catch{}else if(b.type==="piwiClearHints")try{W()}catch{}}}function ue(u){E(u);var b=z();if(!(!b||O(u.target))){var I=Y(b);a.style.display="none",W(),s.innerHTML='<div style="text-align:center;color:#9ca3af;">Analyzing element…</div>',Ce(),i.parent.postMessage({type:"elementPicked",attrs:I},"*")}}var _e=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick"];function Ce(){r.removeEventListener("mousemove",y,!0),r.removeEventListener("click",ue,!0),r.removeEventListener("keydown",M,!0),i.removeEventListener("message",me,!1);for(var u=0;u<_e.length;u++)r.removeEventListener(_e[u],E,!0)}function Te(){Ce(),W(),a.remove(),s.remove(),i.parent.postMessage({type:"pickerClosed"},"*")}r.addEventListener("mousemove",y,!0),r.addEventListener("click",ue,!0),r.addEventListener("keydown",M,!0),i.addEventListener("message",me,!1);for(var se=0;se<_e.length;se++)r.addEventListener(_e[se],E,!0);function V(){var u=Math.max(r.documentElement?r.documentElement.scrollHeight:0,r.body?r.body.scrollHeight:0);u>0&&i.parent.postMessage({type:"piwiContentHeight",height:u},"*")}V();try{if(i.ResizeObserver){var ie=new i.ResizeObserver(V);r.documentElement&&ie.observe(r.documentElement),r.body&&ie.observe(r.body)}}catch{}}function dn(e){const r=[],i=new Set,m=a=>{if(typeof a!="string")return;const s=a.trim();if(s.length<2||s.length>80)return;const g=s.toLowerCase();i.has(g)||(i.add(g),r.push({text:s}))},o=a=>a&&(a.name??a.text??a.label??a.placeholder??a.alt??a.title);m(o(e.failingLocator?.args));for(const a of e.fromElementMatch??[])m(o(a.args));for(const a of e.fromAriaSnapshot??[])m(o(a.args));return r.slice(0,6)}function mn(e){return`<script>(${String(un).replace(/<\/(script)/gi,"<\\/$1")})(${JSON.stringify(e)})<\/script>`}function fn(e){return e.replace(/<base\b[^>]*>/gi,"")}function pn(e,r){return fn(e)+mn(r)}const gn={key:0,class:"flex items-center justify-center py-20"},hn={key:1,class:"py-8 text-center"},vn={class:"text-xs text-gray-400 mt-1"},yn={key:2,class:"py-8 text-center"},xn={class:"mb-2 flex items-center gap-2 flex-wrap"},bn={key:1,class:"ml-auto inline-flex rounded-md border border-default overflow-hidden text-xs"},kn={key:0,class:"flex items-center gap-1 mb-1.5 text-xs text-gray-500"},_n={class:"tabular-nums w-11 text-center select-none"},$n={class:"ml-auto text-gray-400 tabular-nums"},wn={key:1,class:"flex items-center gap-2 mb-1.5"},Cn={key:0,class:"text-xs text-gray-500 tabular-nums"},Sn={key:1,class:"text-xs text-gray-400"},Tn={key:0,class:"absolute inset-0 flex items-center justify-center bg-white dark:bg-gray-900 z-10"},Ln=["src"],An={key:2,class:"mt-4 space-y-3"},In={class:"flex items-center gap-3 bg-elevated rounded-lg p-3"},zn={class:"flex-1 min-w-0"},Bn={class:"text-sm font-medium"},Rn={class:"text-xs"},Pn={key:0,class:"text-xs text-gray-400 ml-1"},On={key:0,class:"text-xs text-gray-500 mt-0.5 truncate"},Un={class:"space-y-1",role:"radiogroup","aria-label":"Alternative locators"},En={class:"flex-1 min-w-0"},Mn={class:"text-xs font-medium text-primary"},jn={class:"text-sm font-mono block truncate mt-0.5"},Nn={class:"flex justify-between w-full"},Kn={key:1},Vn={class:"flex gap-2"},Dn=oe({__name:"SnapshotLocatorPicker",props:qe({runId:{},testRunsCaseId:{},failingLocator:{},healing:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:qe(["close","confirmed"],["update:open"]),setup(e,{emit:r}){const i=e,m=r,o=ot(e,"open"),a=j(!1),s=j(null),g=j(null),c=j(void 0);async function h(){a.value=!0,g.value=null;try{const _=c.value?`?source=${c.value}`:"";s.value=await $fetch(`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/dom-snapshot${_}`),s.value?.source&&(c.value=s.value.source)}catch(_){g.value=_ instanceof Error?_.message:"Unknown error"}finally{a.value=!1}}const C=w(()=>s.value?.availableSources??[]);function T(_){_===c.value||a.value||(c.value=_,z.value=!1,x.value="pick-element",ee.value=0,H.value=!1,B.value=null,Z.value=[],se.value=null,N.value="",be.value=0,me.value=-1,h())}Be(o,_=>{_&&(s.value=null,z.value=!1,x.value="pick-element",ee.value=0,H.value=!1,c.value=void 0,B.value=null,Z.value=[],se.value=null,N.value="",be.value=0,me.value=-1,h())});const x=j("pick-element"),A=j(null),z=j(!1),B=j(null),Z=j([]),Y=j(void 0);function E(_){return URL.createObjectURL(new Blob([pn(_,{probedAttrs:on})],{type:"text/html"}))}Be(()=>s.value?.html,_=>{Y.value&&(URL.revokeObjectURL(Y.value),Y.value=void 0),_&&(Y.value=E(_))},{immediate:!0});const O=j(null),ce=j(0),ee=j(0),y=j(1),H=j(!1),M=w(()=>s.value?.viewport??null),K=w(()=>{const _=M.value;return!_?.width||!ce.value?1:Math.min(ce.value/_.width,1)}),W=w(()=>{const _=M.value;if(!_)return{width:"100%",height:ee.value?`${ee.value}px`:"100%"};const v=ee.value||_.height;return{width:`${Math.round(_.width*y.value)}px`,height:`${Math.round(v*y.value)}px`}}),F=w(()=>{const _=M.value;if(!_)return{width:"100%",height:ee.value?`${ee.value}px`:"100%",border:"0"};const v=ee.value||_.height;return{width:`${_.width}px`,height:`${v}px`,transform:`scale(${y.value})`,transformOrigin:"top left",border:"0"}}),Q=w(()=>Math.round(y.value*100)),ve=_=>Math.min(4,Math.max(.1,_));function xe(_){H.value=!0,y.value=ve(y.value*_)}function ze(){H.value=!1,y.value=K.value}Be([K,M],()=>{H.value||(y.value=K.value)});let te=null;Be(O,_=>{te?.disconnect(),_&&(ce.value=_.clientWidth,te=new ResizeObserver(v=>{for(const G of v)ce.value=G.contentRect.width}),te.observe(_))}),Le(()=>{te?.disconnect()}),Le(()=>{Y.value&&URL.revokeObjectURL(Y.value)});function ke(_){if(!A.value||_.source!==A.value.contentWindow)return;const v=_.data;if(v?.type==="pickerReady"){z.value=!0,f();return}if(v?.type==="piwiContentHeight"&&typeof v.height=="number"){ee.value=Math.max(v.height,M.value?.height??0);return}if(v?.type==="piwiScrollTo"&&typeof v.y=="number"){const G=O.value;G&&G.scrollTo({top:Math.max(0,v.y*y.value-80),behavior:"smooth"});return}if(v?.type==="piwiSearchResult"){be.value=typeof v.count=="number"?v.count:0,me.value=typeof v.index=="number"?v.index:-1;return}if(v?.type==="elementPicked"&&v.attrs){const{labelText:G,...le}=v.attrs;B.value={...le,accessibleName:G??cn(le)},Z.value=ln(B.value),se.value=null,x.value="review"}v?.type==="pickerClosed"&&U()}function R(_){A.value?.contentWindow?.postMessage(_,"*")}function f(){const _=dn({failingLocator:i.failingLocator,fromElementMatch:i.healing?.fromElementMatch??null,fromAriaSnapshot:i.healing?.fromAriaSnapshot??null});_.length&&R({type:"piwiHighlight",hints:_})}const N=j(""),be=j(0),me=j(-1);let ue=null;Be(N,_=>{ue&&clearTimeout(ue),ue=setTimeout(()=>R({type:"piwiSearch",q:_}),180)});function _e(){R({type:"piwiSearchNext"})}Le(()=>{ue&&clearTimeout(ue)});function Ce(_){if(!o.value||x.value!=="pick-element"||!z.value||_.key!=="ArrowUp"&&_.key!=="ArrowDown")return;const v=(document.activeElement?.tagName??"").toLowerCase();if(v==="input"||v==="textarea")return;const G=A.value?.contentWindow;G&&(_.preventDefault(),G.postMessage({type:"piwiPickerKey",key:_.key},"*"))}function Te(){A.value&&(A.value.src="about:blank")}st(()=>{window.addEventListener("message",ke),window.addEventListener("keydown",Ce,!0)}),Le(()=>{window.removeEventListener("message",ke),window.removeEventListener("keydown",Ce,!0)});const se=j(null),V=j(!1);function ie(_){se.value=_}const u=w(()=>lt(i.failingLocator.method,Z.value)),b=gt();async function I(){if(se.value){V.value=!0;try{(await $fetch(`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/locator-pick`,{method:"POST",body:{failingLocator:i.failingLocator,pickedLocator:se.value,element:B.value}})).status==="ok"?m("confirmed",se.value):b.add({title:"Pick not saved",description:"This failure has no call-site or locator signature to attach the pick to.",color:"warning",icon:"i-lucide-alert-triangle"}),o.value=!1}catch(_){b.add({title:"Could not save the pick",description:Tt(_),color:"error",icon:"i-lucide-alert-triangle"})}finally{V.value=!1}}}function U(){Te(),o.value=!1}function X(){B.value=null,Z.value=[],se.value=null,x.value="pick-element",z.value=!1,N.value="",be.value=0,me.value=-1;const _=s.value?.html;_&&(Y.value&&URL.revokeObjectURL(Y.value),Y.value=E(_))}const{copy:J}=Ge(),q=j(null);let ae=null;function fe(_,v){J(_,{toast:"Locator copied"}),q.value=v,ae&&clearTimeout(ae),ae=setTimeout(()=>{q.value=null},2e3)}return Le(()=>{ae&&clearTimeout(ae)}),(_,v)=>{const G=ye,le=Me,Ve=ht,we=Ie,Je=Bt;return n(),P(Je,{open:o.value,"onUpdate:open":v[8]||(v[8]=de=>o.value=de),ui:{content:"max-w-6xl w-[95vw]"},onAfterLeave:U},{header:S(()=>[...v[9]||(v[9]=[d("div",null,[d("h3",{class:"text-lg font-medium"},"Pick a locator from the DOM snapshot"),d("p",{class:"text-sm text-gray-500 mt-0.5"}," Click the element the failing locator should target. Use ↑↓ to walk the DOM tree. ")],-1)])]),body:S(()=>[t(a)?(n(),l("div",gn,[$(G,{name:"i-lucide-loader",class:"size-6 animate-spin text-gray-400"}),v[10]||(v[10]=d("span",{class:"ml-2 text-sm text-gray-500"},"Loading DOM snapshot...",-1))])):t(g)?(n(),l("div",hn,[$(G,{name:"i-lucide-alert-triangle",class:"size-8 text-red-300 mx-auto mb-2"}),v[12]||(v[12]=d("p",{class:"text-sm text-red-500"},"Failed to load snapshot",-1)),d("p",vn,p(t(g)),1),$(le,{size:"xs",variant:"outline",color:"neutral",class:"mt-3",onClick:h},{default:S(()=>[...v[11]||(v[11]=[L("Retry",-1)])]),_:1})])):t(s)?.status!=="ok"||!t(s).html?(n(),l("div",yn,[$(G,{name:"i-lucide-file-x",class:"size-8 text-gray-300 mx-auto mb-2"}),v[13]||(v[13]=d("p",{class:"text-sm text-gray-500"},"No DOM snapshot or ARIA data available for this execution",-1)),v[14]||(v[14]=d("p",{class:"text-xs text-gray-400 mt-1"},"This test run has no stored trace or ARIA snapshot to pick from.",-1))])):(n(),l(D,{key:3},[d("div",xn,[t(s).source?(n(),l("div",{key:0,class:re(["text-xs flex items-center gap-1",t(s).source==="aria"?"text-amber-600 dark:text-amber-400":"text-green-600 dark:text-green-400"])},[$(G,{name:t(s).source==="aria"?"i-lucide-accessibility":"i-lucide-check",class:"size-3.5 shrink-0"},null,8,["name"]),t(s).source==="aria"?(n(),l(D,{key:0},[L(" Accessibility tree from the failure-time ARIA snapshot — element styles are approximate ")],64)):(n(),l(D,{key:1},[L(" Rendered from the failure-time DOM snapshot ")],64))],2)):k("",!0),t(C).length>1?(n(),l("div",bn,[d("button",{type:"button",class:re(["px-2 py-1 flex items-center gap-1 transition-colors",t(c)==="dom"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Rendered page from the trace",onClick:v[0]||(v[0]=de=>T("dom"))},[$(G,{name:"i-lucide-layout-panel-top",class:"size-3.5"}),v[15]||(v[15]=L(" DOM ",-1))],2),d("button",{type:"button",class:re(["px-2 py-1 flex items-center gap-1 border-l border-default transition-colors",t(c)==="aria"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Accessibility tree from the ARIA snapshot",onClick:v[1]||(v[1]=de=>T("aria"))},[$(G,{name:"i-lucide-accessibility",class:"size-3.5"}),v[16]||(v[16]=L(" Tree ",-1))],2)])):k("",!0)]),t(M)?(n(),l("div",kn,[$(le,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-out",title:"Zoom out",onClick:v[2]||(v[2]=de=>xe(1/1.25))}),d("span",_n,p(t(Q))+"%",1),$(le,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-in",title:"Zoom in",onClick:v[3]||(v[3]=de=>xe(1.25))}),$(le,{size:"xs",variant:"outline",color:"neutral",class:"ml-1",onClick:ze},{default:S(()=>[...v[17]||(v[17]=[L("Fit",-1)])]),_:1}),d("span",$n,p(t(M).width)+"×"+p(t(M).height),1)])):k("",!0),t(x)==="pick-element"?(n(),l("div",wn,[$(Ve,{modelValue:t(N),"onUpdate:modelValue":v[4]||(v[4]=de=>Oe(N)?N.value=de:null),size:"xs",icon:"i-lucide-search",placeholder:"Find an element by its text…",class:"max-w-xs",onKeydown:ge(he(_e,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),t(N)&&t(be)>0?(n(),l("span",Cn,p(t(me)+1)+"/"+p(t(be)),1)):t(N)?(n(),l("span",Sn,"no matches")):k("",!0),t(be)>1?(n(),P(le,{key:2,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-chevron-down",title:"Next match (Enter)",onClick:_e})):k("",!0)])):k("",!0),d("div",{ref_key:"stageRef",ref:O,class:re(["relative border border-default rounded-lg overflow-auto",[t(x)==="pick-element"?"h-[75vh]":"h-80",t(M)?"bg-gray-100 dark:bg-gray-800":""]])},[t(z)?k("",!0):(n(),l("div",Tn,[$(G,{name:"i-lucide-loader",class:"size-5 animate-spin text-gray-400"}),v[18]||(v[18]=d("span",{class:"ml-2 text-sm text-gray-500"},"Initializing picker...",-1))])),d("div",{style:Qe(t(W))},[d("iframe",{ref_key:"iframeRef",ref:A,src:t(Y),style:Qe(t(F)),class:"bg-white",sandbox:"allow-scripts",title:"DOM snapshot"},null,12,Ln)],4)],2),t(x)==="review"&&t(B)?(n(),l("div",An,[d("div",In,[$(G,{name:"i-lucide-crosshair",class:"size-5 text-primary shrink-0"}),d("div",zn,[d("p",Bn,[v[19]||(v[19]=L(" Picked: ",-1)),d("code",Rn,p(t(B).tagName),1),t(B).attributes.id?(n(),l("code",Pn,"#"+p(t(B).attributes.id),1)):k("",!0),t(B).attributes["data-testid"]?(n(),P(we,{key:1,size:"xs",color:"primary",variant:"subtle",class:"ml-1"},{default:S(()=>[L(p(t(B).attributes["data-testid"]),1)]),_:1})):k("",!0)]),t(B).textContent?(n(),l("p",On,' "'+p(t(B).textContent)+'" ',1)):k("",!0)]),$(le,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-rotate-ccw",title:"Pick a different element",onClick:X})]),d("div",Un,[(n(!0),l(D,null,ne(t(Z),(de,De)=>(n(),P(it,{key:De,alt:de,copied:t(q)===`picked-${De}`,dense:!0,selectable:!0,selected:t(se)?.locator===de.locator,onCopy:dt=>fe(de.locator,`picked-${De}`),onSelect:dt=>ie(de)},null,8,["alt","copied","selected","onCopy","onSelect"]))),128))]),t(u).recommended?(n(),l("div",{key:0,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 flex items-center gap-3 cursor-pointer",role:"button",tabindex:"0",title:"Select this locator for Confirm",onClick:v[6]||(v[6]=de=>ie(t(u).recommended)),onKeydown:v[7]||(v[7]=ge(he(de=>ie(t(u).recommended),["prevent"]),["enter"]))},[$(G,{name:"i-lucide-star",class:"size-5 text-primary shrink-0"}),d("div",En,[d("p",Mn," Recommended (score: "+p(t(u).recommended.score)+") ",1),d("code",jn,p(t(u).recommended.locator),1)]),$(le,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(q)==="rec"?"i-lucide-check":"i-lucide-copy",onClick:v[5]||(v[5]=he(de=>fe(t(u).recommended.locator,"rec"),["stop"]))},{default:S(()=>[...v[20]||(v[20]=[L(" Copy ",-1)])]),_:1},8,["trailing-icon"])],32)):k("",!0)])):k("",!0)],64))]),footer:S(()=>[d("div",Nn,[t(x)==="review"?(n(),P(le,{key:0,size:"sm",variant:"outline",color:"neutral",icon:"i-lucide-rotate-ccw",onClick:X},{default:S(()=>[...v[21]||(v[21]=[L(" Pick a different element ",-1)])]),_:1})):(n(),l("div",Kn)),d("div",Vn,[$(le,{size:"sm",variant:"outline",color:"neutral",onClick:U},{default:S(()=>[...v[22]||(v[22]=[L("Cancel",-1)])]),_:1}),t(x)==="review"?(n(),P(le,{key:0,size:"sm",color:"primary",loading:t(V),disabled:!t(se),onClick:I},{default:S(()=>[...v[23]||(v[23]=[L(" Confirm pick ",-1)])]),_:1},8,["loading","disabled"])):k("",!0)])])]),_:1},8,["open"])}}}),Hn=Object.assign(Dn,{__name:"SnapshotLocatorPicker"});function Fn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qn(e,r){let i=0,m=null;for(let o=r;o<e.length;o++){const a=e[o];if(m){if(a==="\\"){o++;continue}a===m&&(m=null);continue}if(a==="'"||a==='"'||a==="`"){m=a;continue}if(a==="(")i++;else if(a===")"&&(i--,i===0))return o}return-1}function Zn(e,r,i){if(!e||!r||!i)return null;const m=new RegExp(`${Fn(r)}\\s*\\(`,"g");let o;for(;(o=m.exec(e))!==null;){const a=o.index,s=a>0?e[a-1]:"";if(s&&/[A-Za-z0-9_$]/.test(s))continue;const g=a+o[0].lastIndexOf("("),c=qn(e,g);if(c===-1)return null;const h=e.slice(0,a)+i+e.slice(c+1);return h===e?null:{old:e,new:h}}return null}function Wn(e,r){return`${r?`@@ ${r} @@
1
+ import{d as oe,o as n,c as l,j as $,g as S,M as mt,i as d,T as Re,ac as ft,k as t,Q as ge,H as he,v as ye,f as P,p as re,q as k,m as L,t as p,F as D,G as pt,r as j,y as ne,s as Ie,_ as Me,h as w,z as ot,B as Be,ad as Le,C as st,b as gt,D as ht,l as Oe,O as Qe,A as qe,aa as Ae,x as vt,U as Ue,ae as Se,K as je,R as yt,ab as xt,af as bt,ag as kt,ah as _t,Z as $t,$ as wt}from"./BPKwYP2Q.js";import{_ as Ze}from"./Br2K9yi_.js";import{q as Ct,u as St,e as Tt,f as We,v as at,l as Pe,k as Lt,w as At}from"./k-z_VVTK.js";import{_ as It,a as zt}from"./CQeMb57w.js";import{_ as Ne}from"./DhA17dqR.js";import{_ as Bt}from"./nCjfWTGm.js";import{u as Ge}from"./DuMv-ugy.js";import{u as Ee}from"./BIf1R_fu.js";import{_ as Rt}from"./DszOHBMG.js";import{_ as Pt}from"./BpceIssd.js";import{_ as Ot}from"./CoHGrO41.js";import{l as Ut,i as Et,b as Mt}from"./Dz55UR7w.js";import{_ as rt}from"./BdFEUAlx.js";import{_ as jt}from"./B7yG1G_l.js";const Nt={class:"flex items-center justify-between gap-2"},Kt=["aria-expanded","title"],Vt={class:"text-lg font-medium inline-flex items-center gap-1 shrink-0"},Dt={key:2,class:"min-w-0 flex-1 truncate text-sm text-gray-500 dark:text-gray-400"},Ht={key:0,class:"flex items-center gap-1 shrink-0"},Ft={key:0,class:"text-sm text-gray-500 mt-1 ml-11"},qt=oe({__name:"CollapsibleSectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{},storageKey:{},defaultFolded:{type:Boolean,default:!0}},setup(e,{expose:r}){const i=e,{folded:m,toggle:o,setFolded:a}=Ut(`piwi-section-fold-${i.storageKey}`,i.defaultFolded),s=j(null);function g(){a(!1),pt(()=>s.value?.scrollIntoView({behavior:"smooth",block:"start"}))}return r({setFolded:a,reveal:g}),(c,h)=>{const C=ye,T=It,x=jt;return n(),l("div",{ref_key:"rootEl",ref:s,class:"scroll-mt-4"},[$(x,{ui:{header:"p-3 sm:px-4 sm:py-3",body:t(m)?"p-0 sm:p-0":""},class:re(t(m)&&"divide-y-0")},{header:S(()=>[d("div",Nt,[d("div",{class:"flex items-center gap-2 min-w-0 flex-1 cursor-pointer select-none rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-primary",role:"button",tabindex:"0","aria-expanded":!t(m),title:t(m)?"Expand section":"Collapse section",onClick:h[1]||(h[1]=(...A)=>t(o)&&t(o)(...A)),onKeydown:[h[2]||(h[2]=ge((...A)=>t(o)&&t(o)(...A),["enter"])),h[3]||(h[3]=ge(he((...A)=>t(o)&&t(o)(...A),["prevent"]),["space"]))]},[$(C,{name:t(m)?"i-lucide-chevron-right":"i-lucide-chevron-down",class:"size-4 shrink-0 text-gray-400"},null,8,["name"]),e.icon?(n(),P(C,{key:0,name:e.icon,class:re(["size-5 shrink-0",e.iconClass])},null,8,["name","class"])):k("",!0),d("h3",Vt,[L(p(e.title),1),e.count!=null?(n(),l(D,{key:0},[L(" ("+p(e.count)+")",1)],64)):k("",!0)]),e.help?(n(),l("span",{key:1,onClick:h[0]||(h[0]=he(()=>{},["stop"]))},[$(T,{topic:e.help},null,8,["topic"])])):k("",!0),t(m)&&c.$slots.folded?(n(),l("span",Dt,[Re(c.$slots,"folded")])):k("",!0)],40,Kt),c.$slots.actions?(n(),l("div",Ht,[Re(c.$slots,"actions")])):k("",!0)]),!t(m)&&(e.subtitle||c.$slots.subtitle)?(n(),l("p",Ft,[Re(c.$slots,"subtitle",{},()=>[L(p(e.subtitle),1)])])):k("",!0)]),default:S(()=>[mt(d("div",null,[Re(c.$slots,"default")],512),[[ft,!t(m)]])]),_:3},8,["ui","class"])],512)}}}),Ke=Object.assign(qt,{__name:"CollapsibleSectionCard"}),Zt={class:"overflow-x-auto text-xs font-mono"},Wt=oe({__name:"DiffPatch",props:{patch:{}},setup(e){return(r,i)=>(n(),l("div",Zt,[(n(!0),l(D,null,ne(("parsePatchLines"in r?r.parsePatchLines:t(St))(e.patch),(m,o)=>(n(),l("div",{key:o,class:re(["px-3 py-px whitespace-pre leading-5 min-w-0",("patchLineClass"in r?r.patchLineClass:t(Ct))[m.type]])},p(m.text||" "),3))),128))]))}}),Gt=Object.assign(Wt,{__name:"DiffPatch"}),Yt=["role","aria-checked","tabindex"],Jt={class:"flex-1 min-w-0"},Qt=["title"],Xt={key:0,class:"text-[11px] leading-4 text-gray-500 truncate"},en=oe({__name:"LocatorAlternativeRow",props:{alt:{},note:{default:void 0},copied:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1}},emits:["copy","select"],setup(e){const r=e;function i(a){return a>=80?"success":a>=50?"warning":"error"}function m(a){const{method:s,score:g,args:c}=a;return c&&(c.anchorTestId||c.anchorSelector||c.anchorRole)?"scoped to a stable ancestor — survives renames":g>=100?"most stable — purpose-built for testing":s==="getByRole"&&c&&!("name"in c)?"name-free role — survives renames":s==="getByRole"?"browser ARIA tree — semantic and stable":s==="getByLabel"?"associated <label> element":s==="getByPlaceholder"?"input placeholder":s==="getByText"?"visible text":s==="getByAltText"?"image alt text":s==="getByTitle"?"title attribute":s==="locator"&&g>=50?"stable selector":s==="locator"?"CSS class — may be fragile":""}const o=w(()=>r.note??m(r.alt));return(a,s)=>{const g=Ie,c=ye,h=Me;return n(),l("div",{class:re(["flex items-center gap-2 rounded border",[e.dense?"py-1 px-2":"py-1.5 px-2.5",e.selectable?"cursor-pointer hover:bg-elevated transition-colors focus-visible:outline-2 focus-visible:outline-primary":"",e.selectable&&e.selected?"border-primary/60 ring-1 ring-primary/50":"border-default/50"]]),role:e.selectable?"radio":void 0,"aria-checked":e.selectable?e.selected:void 0,tabindex:e.selectable?0:void 0,onClick:s[1]||(s[1]=C=>e.selectable&&a.$emit("select")),onKeydown:[s[2]||(s[2]=ge(he(C=>e.selectable&&a.$emit("select"),["prevent"]),["enter"])),s[3]||(s[3]=ge(he(C=>e.selectable&&a.$emit("select"),["prevent"]),["space"]))]},[$(g,{size:"xs",color:i(e.alt.score),variant:"subtle",class:re(["shrink-0 font-mono tabular-nums cursor-default text-center",e.dense?"min-w-[2.25rem]":"min-w-[2.5rem]"]),title:`Stability score: ${e.alt.score}/100`},{default:S(()=>[L(p(e.alt.score),1)]),_:1},8,["color","class","title"]),d("div",Jt,[d("code",{class:"text-xs font-mono block truncate",title:e.alt.locator},p(e.alt.locator),9,Qt),t(o)?(n(),l("p",Xt,p(t(o)),1)):k("",!0)]),e.alt.pickedByUser&&e.dense?(n(),P(c,{key:0,name:"i-lucide-user-check",class:"size-3.5 text-primary shrink-0",title:"Confirmed with the locator picker"})):e.alt.pickedByUser?(n(),P(g,{key:1,size:"xs",color:"primary",variant:"subtle",icon:"i-lucide-user-check",class:"shrink-0",title:"Confirmed with the locator picker on the failing page"})):k("",!0),$(h,{size:"xs",variant:"ghost",color:"neutral",icon:e.copied?"i-lucide-check":"i-lucide-copy",title:e.copied?"Copied!":"Copy",class:"shrink-0",onClick:s[0]||(s[0]=he(C=>a.$emit("copy"),["stop"]))},null,8,["icon","title"])],42,Yt)}}}),it=Object.assign(en,{__name:"LocatorAlternativeRow"}),Xe={getByTestId:"testid",getByRole:"semantic",getByLabel:"label",getByPlaceholder:"label",getByText:"text",getByAltText:"text",getByTitle:"text",locator:"css","page.locator":"css"},tn=50;function lt(e,r,i=tn){const m=r[0]??null;if(!m)return{recommended:null,durable:null,preservesConvention:!1,hasDurableAlternative:!1,suggestAddTestId:!1};const o=e?Xe[e]:void 0,a=(e?r.find(c=>c.method===e&&c.score>=i):void 0)??(o?r.find(c=>Xe[c.method]===o&&c.score>=i):void 0),g=r.find(c=>c.pickedByUser)??a??m;return{recommended:g,durable:m,preservesConvention:!!a&&g===a,hasDurableAlternative:g.locator!==m.locator,suggestAddTestId:m.score<i}}const ct={a:"link",button:"button",nav:"navigation",main:"main",article:"article",section:"region",form:"form",img:"img",figure:"figure",figcaption:"caption",blockquote:"blockquote",table:"table",ul:"list",ol:"list",li:"listitem",dialog:"dialog",output:"status",progress:"progressbar",meter:"meter",textarea:"textbox",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",details:"group",summary:"button",search:"search"},nn={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",search:"searchbox",number:"spinbutton",text:"textbox",email:"textbox",tel:"textbox",url:"textbox",password:"textbox"},on=["id","class","name","data-testid","placeholder","alt","title","aria-label","aria-level","role","type","href","multiple"];function sn(e){const r=e.attributes.role;if(r)return r;const i=e.tagName;if(!i)return null;if(i==="input"){const m=(e.attributes.type??"text").toLowerCase();return nn[m]??"textbox"}return i==="select"?e.attributes.multiple!=null?"listbox":"combobox":i==="a"?e.attributes.href!=null?"link":null:ct[i]??null}function an(e,r){if(r!=="heading")return null;const i=e.tagName.match(/^h([1-6])$/);if(i)return Number(i[1]);const m=e.attributes["aria-level"];return m&&/^\d+$/.test(m)?Number(m):null}const $e=(e,r)=>e.attributes[r]||null,pe=e=>e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),He=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),et=e=>/^[A-Za-z][A-Za-z0-9_-]*$/.test(e);function rn(e){return/[a-f0-9]{8,}/i.test(e)?10:/^(?:css|sc|emotion|styled)-/i.test(e)?15:/^(bg|text|border|shadow|opacity|font|w-|h-|m[tblrxy]?-|p[tblrxy]?-|flex|grid|gap|rounded|absolute|relative|fixed|sticky|block|inline|hidden|overflow|z-|top-|right-|bottom-|left-|inset-|justify-|items-|self-|content-|order-|col-|row-)/.test(e)?25:/__/.test(e)||/--/.test(e)?35:/^[a-z]+(-[a-z]+)+$/.test(e)||/^[a-z]+[A-Z][a-zA-Z]+$/.test(e)?40:(e.includes("_")||/^[a-z]+-[a-z0-9]{5,}$/.test(e)&&/[0-9]/.test(e),15)}function tt(e){return!!(/^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$/i.test(e)||/^[a-f0-9]{8,}$/i.test(e)||/^[a-z]+-\d+$/.test(e)||/^(emotion-|styled-|css-|sc-)/.test(e)||e.startsWith("ng-")||/^(radix-|headlessui-|mui-|mantine-|chakra-)/i.test(e)||/^:r[0-9a-z]+:$/i.test(e)||/^«r[0-9a-z]+»$/i.test(e))}function ln(e){const r=[],i=new Set,m=y=>{i.has(y.locator)||(i.add(y.locator),r.push(y))},{accessibleName:o}=e,a=e.tagName,s=sn(e),g=e.selectorCounts,c=y=>y==null||y<=1,h=e.textContent?e.textContent.replace(/\s+/g," ").trim():null,C=$e(e,"data-testid");C&&c(g?.testId)&&m({locator:`getByTestId('${pe(C)}')`,method:"getByTestId",args:{testId:C},score:100});const T=an(e,s),x=T!=null?`, level: ${T}`:"",A=y=>T!=null?{...y,level:T}:y;s&&o&&m({locator:`getByRole('${s}', { name: '${pe(o)}'${x} })`,method:"getByRole",args:A({role:s,name:o}),score:90});const z=$e(e,"aria-label");if(s&&z&&z!==o&&m({locator:`getByRole('${s}', { name: '${pe(z)}'${x} })`,method:"getByRole",args:A({role:s,name:z}),score:85}),o&&["input","select","textarea"].includes(a)){const y=$e(e,"aria-label");(e.hasLabel===void 0||e.hasLabel===!0||y===o)&&m({locator:`getByLabel('${pe(o)}')`,method:"getByLabel",args:{label:o},score:85})}const B=$e(e,"placeholder");B&&m({locator:`getByPlaceholder('${pe(B)}')`,method:"getByPlaceholder",args:{placeholder:B},score:80}),h&&h.length<80&&m({locator:`getByText('${pe(h)}')`,method:"getByText",args:{text:h},score:75});const Z=$e(e,"id");if(Z&&!tt(Z)&&c(g?.id)){const y=et(Z)?`#${Z}`:`[id="${He(Z)}"]`;m({locator:`locator('${pe(y)}')`,method:"locator",args:{selector:y},score:65})}const Y=$e(e,"name");if(Y&&c(g?.name)){const y=`[name="${He(Y)}"]`;m({locator:`locator('${pe(y)}')`,method:"locator",args:{selector:y},score:60})}const E=$e(e,"alt");E&&m({locator:`getByAltText('${pe(E)}')`,method:"getByAltText",args:{text:E},score:60});const O=$e(e,"title");O&&m({locator:`getByTitle('${pe(O)}')`,method:"getByTitle",args:{title:O},score:50});const ce=!!(C&&c(g?.testId));if(s&&!ce){const y=T!=null?`'${s}', { level: ${T} }`:`'${s}'`,H=A({role:s});let M=!1,K=!1,W=!1;for(const Q of e.ancestors??[]){if(Q.scopedRoleCount!==1)continue;if(!M&&Q.testId&&Q.testIdCount===1&&(M=!0,m({locator:`getByTestId('${pe(Q.testId)}').getByRole(${y})`,method:"getByRole",args:{...H,anchorTestId:Q.testId},score:72})),!K&&Q.id&&!tt(Q.id)&&Q.idCount===1){K=!0;const xe=et(Q.id)?`#${Q.id}`:`[id="${He(Q.id)}"]`;m({locator:`locator('${pe(xe)}').getByRole(${y})`,method:"getByRole",args:{...H,anchorSelector:xe},score:64})}const ve=Q.role||ct[Q.tag]||null;!W&&ve&&ve!==s&&Q.roleCount===1&&(W=!0,m({locator:`getByRole('${pe(ve)}').getByRole(${y})`,method:"getByRole",args:{...H,anchorRole:ve},score:55}))}const F=e.rolePosition;F&&F.role===s&&(F.count===1||T!=null&&F.levelCount===1)&&m({locator:`getByRole(${y})`,method:"getByRole",args:H,score:58})}const ee=$e(e,"class");if(ee){const y=g?.classes,H=ee.split(/\s+/).filter(M=>M.length>1&&/^[A-Za-z_-][A-Za-z0-9_-]*$/.test(M)&&c(y?.[M])).map(M=>({cls:M,score:rn(M)})).sort((M,K)=>K.score-M.score).slice(0,3);for(const{cls:M,score:K}of H)m({locator:`locator('.${pe(M)}')`,method:"locator",args:{selector:`.${M}`},score:K})}return r.sort((y,H)=>H.score-y.score)}function cn(e){const r=e.attributes,i=r["aria-label"];if(i)return i;if(e.textContent)return e.textContent;const m=r.title;if(m)return m;const o=r.placeholder;return o||null}function un(e){if(window.__piwiPickerInstalled)return;window.__piwiPickerInstalled=!0;var r=document,i=window,m=2147483600,o=e.probedAttrs,a=r.createElement("div");a.id="__piwi_picker_highlight",a.style.cssText="position:fixed;pointer-events:none;z-index:"+m+";display:none;box-sizing:border-box;border:2px solid #7c3aed;background:rgba(124,58,237,.12);border-radius:3px;",r.body.appendChild(a);var s=r.createElement("div");s.id="__piwi_picker_banner",s.style.cssText="position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:"+(m+2)+";background:#111827;color:#f9fafb;font:13px/1.5 system-ui,sans-serif;padding:10px 16px;border-radius:8px;box-shadow:0 4px 24px rgba(0,0,0,.4);max-width:80vw;",s.innerHTML='<div>Click an element to generate locators</div><div style="color:#9ca3af;margin-top:3px;font-size:11px">↑ parent · ↓ child · Esc skip</div>',r.body.appendChild(s),i.parent.postMessage({type:"pickerReady"},"*");function g(u){var b=(u.tagName||"?").toLowerCase(),I=u.getAttribute&&u.getAttribute("data-testid");if(I)return"getByTestId('"+I+"')";if(u.labels&&u.labels.length>0){var U=(u.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,80);if(U)return"getByLabel('"+U+"')"}var X=u.getAttribute&&u.getAttribute("aria-label");if(X)return"getByLabel('"+X+"')";var J=u.getAttribute&&u.getAttribute("placeholder");if(J)return"getByPlaceholder('"+J+"')";var q=u.getAttribute&&u.getAttribute("alt");if(q)return"getByAltText('"+q+"')";var ae=u.getAttribute&&u.getAttribute("title");if(ae)return"getByTitle('"+ae+"')";if(u.id)return"locator('#"+u.id+"')";var fe=(u.getAttribute&&u.getAttribute("class")||"").split(/\s+/).find(function(_){return _.length>1});return fe?"locator('."+fe+"')":b}function c(u){for(var b=[],I=u;I&&b.length<15;){var U=(I.tagName||"").toLowerCase();if(U==="body"||U==="html")break;b.push(I),I=I.parentElement}return b.length?b:[u]}var h=["button","a","input","select","textarea","summary","option"];function C(u){for(var b=0;b<Math.min(u.length,4);b++){var I=u[b],U=(I.tagName||"").toLowerCase();if(h.indexOf(U)!==-1||I.getAttribute&&(I.getAttribute("role")||I.getAttribute("data-testid")))return b}return 0}var T=[],x=0,A=null;function z(){return T[x]||null}function B(){var u=z();if(!u){a.style.display="none";return}var b=u.getBoundingClientRect();a.style.display="block",a.style.left=b.left+"px",a.style.top=b.top+"px",a.style.width=b.width+"px",a.style.height=b.height+"px";var I=r.getElementById("__piwi_picker_foot");I&&(I.textContent=g(u)+" — click to pick · ↑ parent · ↓ child · Esc skip")}var Z=s.querySelector("[style*=margin]");Z&&(Z.id="__piwi_picker_foot");function Y(u){for(var b={},I=0;I<o.length;I++){var U=o[I],X=u.getAttribute(U)||u[U];b[U]=typeof X=="string"?X.slice(0,200):X?String(X).slice(0,200):null}var J=u.getBoundingClientRect(),q={};try{var ae=function(we){return i.CSS.escape(we)},fe=function(we){try{return r.querySelectorAll(we).length}catch{return}};b["data-testid"]&&(q.testId=fe("[data-testid="+JSON.stringify(b["data-testid"])+"]")),b.id&&(q.id=fe("#"+ae(b.id))),b.name&&(q.name=fe("[name="+JSON.stringify(b.name)+"]"));var _=(b.class||"").split(/\s+/).filter(function(we){return we.length>1}).slice(0,10);if(_.length>0){for(var v={},G=0;G<_.length;G++){var le=fe("."+ae(_[G]));le!==void 0&&(v[_[G]]=le)}q.classes=v}}catch{}var Ve=null;return u.labels&&u.labels.length>0&&(Ve=(u.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,120)||null),{tagName:(u.tagName||"").toLowerCase(),attributes:b,textContent:(u.textContent||"").replace(/\s+/g," ").trim().slice(0,80)||null,center:{x:Math.round(J.x+J.width/2),y:Math.round(J.y+J.height/2)},hasLabel:!!(u.labels&&u.labels.length>0),labelText:Ve,selectorCounts:q}}function E(u){u.preventDefault(),u.stopImmediatePropagation()}function O(u){return u===s||u===a||s.contains&&s.contains(u)||u&&u.__piwiHint}var ce="top";function ee(u){ce!==u&&(ce=u,u==="bottom"?(s.style.top="auto",s.style.bottom="12px"):(s.style.top="12px",s.style.bottom="auto"))}function y(u){var b=u.target;if(!b||O(b)){a.style.display="none";return}b!==A&&(A=b,T=c(b),x=C(T)),B();var I=z();if(I){var U=I.getBoundingClientRect(),X=s.getBoundingClientRect(),J=8;U.left<X.right+J&&U.right>X.left-J&&U.top<X.bottom+J&&U.bottom>X.top-J&&ee(ce==="top"?"bottom":"top")}}function H(u){if(u==="Escape"){Te();return}u==="ArrowUp"&&(x=Math.min(x+1,T.length-1),B()),u==="ArrowDown"&&(x=Math.max(x-1,0),B())}function M(u){(u.key==="Escape"||u.key==="ArrowUp"||u.key==="ArrowDown")&&(E(u),H(u.key))}var K=[];function W(){for(var u=0;u<K.length;u++)K[u].parentNode&&K[u].parentNode.removeChild(K[u]);K=[]}function F(u){return(u||"").replace(/\s+/g," ").trim().toLowerCase()}function Q(u){var b=F(u);if(b.length<2)return[];for(var I=r.querySelectorAll("button,a,[role],h1,h2,h3,h4,h5,h6,label,summary,input,textarea,select,option,span,li,td,th,p"),U=[],X=[],J=0;J<I.length;J++){var q=I[J],ae=F(q.textContent);if(!ae){var fe=F(q.getAttribute&&(q.getAttribute("placeholder")||q.getAttribute("aria-label"))||"");fe&&(fe===b||fe.indexOf(b)!==-1)&&U.push(q);continue}ae.length>120||(ae===b?U.push(q):ae.indexOf(b)!==-1&&ae.length<b.length+30&&X.push(q))}return U.concat(X)}function ve(u,b){var I=u.getBoundingClientRect();if(I.width===0&&I.height===0)return null;var U=r.createElement("div");return U.__piwiHint=!0,U.style.cssText="position:fixed;pointer-events:none;z-index:"+(m+1)+";box-sizing:border-box;border-radius:3px;transition:opacity .3s;border:2px solid "+b+";box-shadow:0 0 0 3px "+b+"55;left:"+I.left+"px;top:"+I.top+"px;width:"+I.width+"px;height:"+I.height+"px;",r.body.appendChild(U),K.push(U),U}function xe(u){var b=u.getBoundingClientRect();i.parent.postMessage({type:"piwiScrollTo",y:b.top},"*")}function ze(u){if(W(),!(!u||!u.length)){for(var b=null,I=0;I<u.length;I++)for(var U=u[I],X=Q(U&&U.text),J=0;J<Math.min(X.length,3);J++)ve(X[J],"#f59e0b"),b||(b=X[J]);b&&xe(b),setTimeout(function(){for(var q=0;q<K.length;q++)K[q].style.opacity="0"},2600),setTimeout(W,3e3)}}var te=[],ke=0;function R(){i.parent.postMessage({type:"piwiSearchResult",count:te.length,index:te.length?ke:-1},"*")}function f(){W();var u=te[ke];u&&(ve(u,"#7c3aed"),xe(u),R())}function N(u){if(te=Q(u),ke=0,!te.length){W(),R();return}f()}function be(){te.length&&(ke=(ke+1)%te.length,f())}function me(u){var b=u.data;if(!(!b||typeof b.type!="string")){if(b.type==="piwiPickerKey"&&typeof b.key=="string")H(b.key);else if(b.type==="piwiHighlight")try{ze(b.hints)}catch{}else if(b.type==="piwiSearch")try{N(b.q)}catch{}else if(b.type==="piwiSearchNext")try{be()}catch{}else if(b.type==="piwiClearHints")try{W()}catch{}}}function ue(u){E(u);var b=z();if(!(!b||O(u.target))){var I=Y(b);a.style.display="none",W(),s.innerHTML='<div style="text-align:center;color:#9ca3af;">Analyzing element…</div>',Ce(),i.parent.postMessage({type:"elementPicked",attrs:I},"*")}}var _e=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick"];function Ce(){r.removeEventListener("mousemove",y,!0),r.removeEventListener("click",ue,!0),r.removeEventListener("keydown",M,!0),i.removeEventListener("message",me,!1);for(var u=0;u<_e.length;u++)r.removeEventListener(_e[u],E,!0)}function Te(){Ce(),W(),a.remove(),s.remove(),i.parent.postMessage({type:"pickerClosed"},"*")}r.addEventListener("mousemove",y,!0),r.addEventListener("click",ue,!0),r.addEventListener("keydown",M,!0),i.addEventListener("message",me,!1);for(var se=0;se<_e.length;se++)r.addEventListener(_e[se],E,!0);function V(){var u=Math.max(r.documentElement?r.documentElement.scrollHeight:0,r.body?r.body.scrollHeight:0);u>0&&i.parent.postMessage({type:"piwiContentHeight",height:u},"*")}V();try{if(i.ResizeObserver){var ie=new i.ResizeObserver(V);r.documentElement&&ie.observe(r.documentElement),r.body&&ie.observe(r.body)}}catch{}}function dn(e){const r=[],i=new Set,m=a=>{if(typeof a!="string")return;const s=a.trim();if(s.length<2||s.length>80)return;const g=s.toLowerCase();i.has(g)||(i.add(g),r.push({text:s}))},o=a=>a&&(a.name??a.text??a.label??a.placeholder??a.alt??a.title);m(o(e.failingLocator?.args));for(const a of e.fromElementMatch??[])m(o(a.args));for(const a of e.fromAriaSnapshot??[])m(o(a.args));return r.slice(0,6)}function mn(e){return`<script>(${String(un).replace(/<\/(script)/gi,"<\\/$1")})(${JSON.stringify(e)})<\/script>`}function fn(e){return e.replace(/<base\b[^>]*>/gi,"")}function pn(e,r){return fn(e)+mn(r)}const gn={key:0,class:"flex items-center justify-center py-20"},hn={key:1,class:"py-8 text-center"},vn={class:"text-xs text-gray-400 mt-1"},yn={key:2,class:"py-8 text-center"},xn={class:"mb-2 flex items-center gap-2 flex-wrap"},bn={key:1,class:"ml-auto inline-flex rounded-md border border-default overflow-hidden text-xs"},kn={key:0,class:"flex items-center gap-1 mb-1.5 text-xs text-gray-500"},_n={class:"tabular-nums w-11 text-center select-none"},$n={class:"ml-auto text-gray-400 tabular-nums"},wn={key:1,class:"flex items-center gap-2 mb-1.5"},Cn={key:0,class:"text-xs text-gray-500 tabular-nums"},Sn={key:1,class:"text-xs text-gray-400"},Tn={key:0,class:"absolute inset-0 flex items-center justify-center bg-white dark:bg-gray-900 z-10"},Ln=["src"],An={key:2,class:"mt-4 space-y-3"},In={class:"flex items-center gap-3 bg-elevated rounded-lg p-3"},zn={class:"flex-1 min-w-0"},Bn={class:"text-sm font-medium"},Rn={class:"text-xs"},Pn={key:0,class:"text-xs text-gray-400 ml-1"},On={key:0,class:"text-xs text-gray-500 mt-0.5 truncate"},Un={class:"space-y-1",role:"radiogroup","aria-label":"Alternative locators"},En={class:"flex-1 min-w-0"},Mn={class:"text-xs font-medium text-primary"},jn={class:"text-sm font-mono block truncate mt-0.5"},Nn={class:"flex justify-between w-full"},Kn={key:1},Vn={class:"flex gap-2"},Dn=oe({__name:"SnapshotLocatorPicker",props:qe({runId:{},testRunsCaseId:{},failingLocator:{},healing:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:qe(["close","confirmed"],["update:open"]),setup(e,{emit:r}){const i=e,m=r,o=ot(e,"open"),a=j(!1),s=j(null),g=j(null),c=j(void 0);async function h(){a.value=!0,g.value=null;try{const _=c.value?`?source=${c.value}`:"";s.value=await $fetch(`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/dom-snapshot${_}`),s.value?.source&&(c.value=s.value.source)}catch(_){g.value=_ instanceof Error?_.message:"Unknown error"}finally{a.value=!1}}const C=w(()=>s.value?.availableSources??[]);function T(_){_===c.value||a.value||(c.value=_,z.value=!1,x.value="pick-element",ee.value=0,H.value=!1,B.value=null,Z.value=[],se.value=null,N.value="",be.value=0,me.value=-1,h())}Be(o,_=>{_&&(s.value=null,z.value=!1,x.value="pick-element",ee.value=0,H.value=!1,c.value=void 0,B.value=null,Z.value=[],se.value=null,N.value="",be.value=0,me.value=-1,h())});const x=j("pick-element"),A=j(null),z=j(!1),B=j(null),Z=j([]),Y=j(void 0);function E(_){return URL.createObjectURL(new Blob([pn(_,{probedAttrs:on})],{type:"text/html"}))}Be(()=>s.value?.html,_=>{Y.value&&(URL.revokeObjectURL(Y.value),Y.value=void 0),_&&(Y.value=E(_))},{immediate:!0});const O=j(null),ce=j(0),ee=j(0),y=j(1),H=j(!1),M=w(()=>s.value?.viewport??null),K=w(()=>{const _=M.value;return!_?.width||!ce.value?1:Math.min(ce.value/_.width,1)}),W=w(()=>{const _=M.value;if(!_)return{width:"100%",height:ee.value?`${ee.value}px`:"100%"};const v=ee.value||_.height;return{width:`${Math.round(_.width*y.value)}px`,height:`${Math.round(v*y.value)}px`}}),F=w(()=>{const _=M.value;if(!_)return{width:"100%",height:ee.value?`${ee.value}px`:"100%",border:"0"};const v=ee.value||_.height;return{width:`${_.width}px`,height:`${v}px`,transform:`scale(${y.value})`,transformOrigin:"top left",border:"0"}}),Q=w(()=>Math.round(y.value*100)),ve=_=>Math.min(4,Math.max(.1,_));function xe(_){H.value=!0,y.value=ve(y.value*_)}function ze(){H.value=!1,y.value=K.value}Be([K,M],()=>{H.value||(y.value=K.value)});let te=null;Be(O,_=>{te?.disconnect(),_&&(ce.value=_.clientWidth,te=new ResizeObserver(v=>{for(const G of v)ce.value=G.contentRect.width}),te.observe(_))}),Le(()=>{te?.disconnect()}),Le(()=>{Y.value&&URL.revokeObjectURL(Y.value)});function ke(_){if(!A.value||_.source!==A.value.contentWindow)return;const v=_.data;if(v?.type==="pickerReady"){z.value=!0,f();return}if(v?.type==="piwiContentHeight"&&typeof v.height=="number"){ee.value=Math.max(v.height,M.value?.height??0);return}if(v?.type==="piwiScrollTo"&&typeof v.y=="number"){const G=O.value;G&&G.scrollTo({top:Math.max(0,v.y*y.value-80),behavior:"smooth"});return}if(v?.type==="piwiSearchResult"){be.value=typeof v.count=="number"?v.count:0,me.value=typeof v.index=="number"?v.index:-1;return}if(v?.type==="elementPicked"&&v.attrs){const{labelText:G,...le}=v.attrs;B.value={...le,accessibleName:G??cn(le)},Z.value=ln(B.value),se.value=null,x.value="review"}v?.type==="pickerClosed"&&U()}function R(_){A.value?.contentWindow?.postMessage(_,"*")}function f(){const _=dn({failingLocator:i.failingLocator,fromElementMatch:i.healing?.fromElementMatch??null,fromAriaSnapshot:i.healing?.fromAriaSnapshot??null});_.length&&R({type:"piwiHighlight",hints:_})}const N=j(""),be=j(0),me=j(-1);let ue=null;Be(N,_=>{ue&&clearTimeout(ue),ue=setTimeout(()=>R({type:"piwiSearch",q:_}),180)});function _e(){R({type:"piwiSearchNext"})}Le(()=>{ue&&clearTimeout(ue)});function Ce(_){if(!o.value||x.value!=="pick-element"||!z.value||_.key!=="ArrowUp"&&_.key!=="ArrowDown")return;const v=(document.activeElement?.tagName??"").toLowerCase();if(v==="input"||v==="textarea")return;const G=A.value?.contentWindow;G&&(_.preventDefault(),G.postMessage({type:"piwiPickerKey",key:_.key},"*"))}function Te(){A.value&&(A.value.src="about:blank")}st(()=>{window.addEventListener("message",ke),window.addEventListener("keydown",Ce,!0)}),Le(()=>{window.removeEventListener("message",ke),window.removeEventListener("keydown",Ce,!0)});const se=j(null),V=j(!1);function ie(_){se.value=_}const u=w(()=>lt(i.failingLocator.method,Z.value)),b=gt();async function I(){if(se.value){V.value=!0;try{(await $fetch(`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/locator-pick`,{method:"POST",body:{failingLocator:i.failingLocator,pickedLocator:se.value,element:B.value}})).status==="ok"?m("confirmed",se.value):b.add({title:"Pick not saved",description:"This failure has no call-site or locator signature to attach the pick to.",color:"warning",icon:"i-lucide-alert-triangle"}),o.value=!1}catch(_){b.add({title:"Could not save the pick",description:Tt(_),color:"error",icon:"i-lucide-alert-triangle"})}finally{V.value=!1}}}function U(){Te(),o.value=!1}function X(){B.value=null,Z.value=[],se.value=null,x.value="pick-element",z.value=!1,N.value="",be.value=0,me.value=-1;const _=s.value?.html;_&&(Y.value&&URL.revokeObjectURL(Y.value),Y.value=E(_))}const{copy:J}=Ge(),q=j(null);let ae=null;function fe(_,v){J(_,{toast:"Locator copied"}),q.value=v,ae&&clearTimeout(ae),ae=setTimeout(()=>{q.value=null},2e3)}return Le(()=>{ae&&clearTimeout(ae)}),(_,v)=>{const G=ye,le=Me,Ve=ht,we=Ie,Je=Bt;return n(),P(Je,{open:o.value,"onUpdate:open":v[8]||(v[8]=de=>o.value=de),ui:{content:"max-w-6xl w-[95vw]"},onAfterLeave:U},{header:S(()=>[...v[9]||(v[9]=[d("div",null,[d("h3",{class:"text-lg font-medium"},"Pick a locator from the DOM snapshot"),d("p",{class:"text-sm text-gray-500 mt-0.5"}," Click the element the failing locator should target. Use ↑↓ to walk the DOM tree. ")],-1)])]),body:S(()=>[t(a)?(n(),l("div",gn,[$(G,{name:"i-lucide-loader",class:"size-6 animate-spin text-gray-400"}),v[10]||(v[10]=d("span",{class:"ml-2 text-sm text-gray-500"},"Loading DOM snapshot...",-1))])):t(g)?(n(),l("div",hn,[$(G,{name:"i-lucide-alert-triangle",class:"size-8 text-red-300 mx-auto mb-2"}),v[12]||(v[12]=d("p",{class:"text-sm text-red-500"},"Failed to load snapshot",-1)),d("p",vn,p(t(g)),1),$(le,{size:"xs",variant:"outline",color:"neutral",class:"mt-3",onClick:h},{default:S(()=>[...v[11]||(v[11]=[L("Retry",-1)])]),_:1})])):t(s)?.status!=="ok"||!t(s).html?(n(),l("div",yn,[$(G,{name:"i-lucide-file-x",class:"size-8 text-gray-300 mx-auto mb-2"}),v[13]||(v[13]=d("p",{class:"text-sm text-gray-500"},"No DOM snapshot or ARIA data available for this execution",-1)),v[14]||(v[14]=d("p",{class:"text-xs text-gray-400 mt-1"},"This test run has no stored trace or ARIA snapshot to pick from.",-1))])):(n(),l(D,{key:3},[d("div",xn,[t(s).source?(n(),l("div",{key:0,class:re(["text-xs flex items-center gap-1",t(s).source==="aria"?"text-amber-600 dark:text-amber-400":"text-green-600 dark:text-green-400"])},[$(G,{name:t(s).source==="aria"?"i-lucide-accessibility":"i-lucide-check",class:"size-3.5 shrink-0"},null,8,["name"]),t(s).source==="aria"?(n(),l(D,{key:0},[L(" Accessibility tree from the failure-time ARIA snapshot — element styles are approximate ")],64)):(n(),l(D,{key:1},[L(" Rendered from the failure-time DOM snapshot ")],64))],2)):k("",!0),t(C).length>1?(n(),l("div",bn,[d("button",{type:"button",class:re(["px-2 py-1 flex items-center gap-1 transition-colors",t(c)==="dom"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Rendered page from the trace",onClick:v[0]||(v[0]=de=>T("dom"))},[$(G,{name:"i-lucide-layout-panel-top",class:"size-3.5"}),v[15]||(v[15]=L(" DOM ",-1))],2),d("button",{type:"button",class:re(["px-2 py-1 flex items-center gap-1 border-l border-default transition-colors",t(c)==="aria"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Accessibility tree from the ARIA snapshot",onClick:v[1]||(v[1]=de=>T("aria"))},[$(G,{name:"i-lucide-accessibility",class:"size-3.5"}),v[16]||(v[16]=L(" Tree ",-1))],2)])):k("",!0)]),t(M)?(n(),l("div",kn,[$(le,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-out",title:"Zoom out",onClick:v[2]||(v[2]=de=>xe(1/1.25))}),d("span",_n,p(t(Q))+"%",1),$(le,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-in",title:"Zoom in",onClick:v[3]||(v[3]=de=>xe(1.25))}),$(le,{size:"xs",variant:"outline",color:"neutral",class:"ml-1",onClick:ze},{default:S(()=>[...v[17]||(v[17]=[L("Fit",-1)])]),_:1}),d("span",$n,p(t(M).width)+"×"+p(t(M).height),1)])):k("",!0),t(x)==="pick-element"?(n(),l("div",wn,[$(Ve,{modelValue:t(N),"onUpdate:modelValue":v[4]||(v[4]=de=>Oe(N)?N.value=de:null),size:"xs",icon:"i-lucide-search",placeholder:"Find an element by its text…",class:"max-w-xs",onKeydown:ge(he(_e,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),t(N)&&t(be)>0?(n(),l("span",Cn,p(t(me)+1)+"/"+p(t(be)),1)):t(N)?(n(),l("span",Sn,"no matches")):k("",!0),t(be)>1?(n(),P(le,{key:2,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-chevron-down",title:"Next match (Enter)",onClick:_e})):k("",!0)])):k("",!0),d("div",{ref_key:"stageRef",ref:O,class:re(["relative border border-default rounded-lg overflow-auto",[t(x)==="pick-element"?"h-[75vh]":"h-80",t(M)?"bg-gray-100 dark:bg-gray-800":""]])},[t(z)?k("",!0):(n(),l("div",Tn,[$(G,{name:"i-lucide-loader",class:"size-5 animate-spin text-gray-400"}),v[18]||(v[18]=d("span",{class:"ml-2 text-sm text-gray-500"},"Initializing picker...",-1))])),d("div",{style:Qe(t(W))},[d("iframe",{ref_key:"iframeRef",ref:A,src:t(Y),style:Qe(t(F)),class:"bg-white",sandbox:"allow-scripts",title:"DOM snapshot"},null,12,Ln)],4)],2),t(x)==="review"&&t(B)?(n(),l("div",An,[d("div",In,[$(G,{name:"i-lucide-crosshair",class:"size-5 text-primary shrink-0"}),d("div",zn,[d("p",Bn,[v[19]||(v[19]=L(" Picked: ",-1)),d("code",Rn,p(t(B).tagName),1),t(B).attributes.id?(n(),l("code",Pn,"#"+p(t(B).attributes.id),1)):k("",!0),t(B).attributes["data-testid"]?(n(),P(we,{key:1,size:"xs",color:"primary",variant:"subtle",class:"ml-1"},{default:S(()=>[L(p(t(B).attributes["data-testid"]),1)]),_:1})):k("",!0)]),t(B).textContent?(n(),l("p",On,' "'+p(t(B).textContent)+'" ',1)):k("",!0)]),$(le,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-rotate-ccw",title:"Pick a different element",onClick:X})]),d("div",Un,[(n(!0),l(D,null,ne(t(Z),(de,De)=>(n(),P(it,{key:De,alt:de,copied:t(q)===`picked-${De}`,dense:!0,selectable:!0,selected:t(se)?.locator===de.locator,onCopy:dt=>fe(de.locator,`picked-${De}`),onSelect:dt=>ie(de)},null,8,["alt","copied","selected","onCopy","onSelect"]))),128))]),t(u).recommended?(n(),l("div",{key:0,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 flex items-center gap-3 cursor-pointer",role:"button",tabindex:"0",title:"Select this locator for Confirm",onClick:v[6]||(v[6]=de=>ie(t(u).recommended)),onKeydown:v[7]||(v[7]=ge(he(de=>ie(t(u).recommended),["prevent"]),["enter"]))},[$(G,{name:"i-lucide-star",class:"size-5 text-primary shrink-0"}),d("div",En,[d("p",Mn," Recommended (score: "+p(t(u).recommended.score)+") ",1),d("code",jn,p(t(u).recommended.locator),1)]),$(le,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(q)==="rec"?"i-lucide-check":"i-lucide-copy",onClick:v[5]||(v[5]=he(de=>fe(t(u).recommended.locator,"rec"),["stop"]))},{default:S(()=>[...v[20]||(v[20]=[L(" Copy ",-1)])]),_:1},8,["trailing-icon"])],32)):k("",!0)])):k("",!0)],64))]),footer:S(()=>[d("div",Nn,[t(x)==="review"?(n(),P(le,{key:0,size:"sm",variant:"outline",color:"neutral",icon:"i-lucide-rotate-ccw",onClick:X},{default:S(()=>[...v[21]||(v[21]=[L(" Pick a different element ",-1)])]),_:1})):(n(),l("div",Kn)),d("div",Vn,[$(le,{size:"sm",variant:"outline",color:"neutral",onClick:U},{default:S(()=>[...v[22]||(v[22]=[L("Cancel",-1)])]),_:1}),t(x)==="review"?(n(),P(le,{key:0,size:"sm",color:"primary",loading:t(V),disabled:!t(se),onClick:I},{default:S(()=>[...v[23]||(v[23]=[L(" Confirm pick ",-1)])]),_:1},8,["loading","disabled"])):k("",!0)])])]),_:1},8,["open"])}}}),Hn=Object.assign(Dn,{__name:"SnapshotLocatorPicker"});function Fn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qn(e,r){let i=0,m=null;for(let o=r;o<e.length;o++){const a=e[o];if(m){if(a==="\\"){o++;continue}a===m&&(m=null);continue}if(a==="'"||a==='"'||a==="`"){m=a;continue}if(a==="(")i++;else if(a===")"&&(i--,i===0))return o}return-1}function Zn(e,r,i){if(!e||!r||!i)return null;const m=new RegExp(`${Fn(r)}\\s*\\(`,"g");let o;for(;(o=m.exec(e))!==null;){const a=o.index,s=a>0?e[a-1]:"";if(s&&/[A-Za-z0-9_$]/.test(s))continue;const g=a+o[0].lastIndexOf("("),c=qn(e,g);if(c===-1)return null;const h=e.slice(0,a)+i+e.slice(c+1);return h===e?null:{old:e,new:h}}return null}function Wn(e,r){return`${r?`@@ ${r} @@
2
2
  `:""}-${e.old.trimEnd()}
3
3
  +${e.new.trimEnd()}`}function Gn(e,r){const i=e??{},m=r??{},o=s=>s==null?null:typeof s=="string"?s:JSON.stringify(s),a=[];for(const s of new Set([...Object.keys(i),...Object.keys(m)])){const g=o(i[s]),c=o(m[s]);g!==c&&a.push({key:s,from:g,to:c})}return a}function Yn(e){const i=[`In ${e.location??(e.sourceLine?`line ${e.sourceLine.line}`:"the failing test")}, the Playwright locator \`${e.failing}\` no longer matches its element.`,`Replace it with \`${e.recommended}\`.`];return e.sourceLine&&i.push("","Current line:",e.sourceLine.text.trim()),i.join(`
4
4
  `)}const Jn={key:0,class:"text-xs font-mono"},Qn={key:1},Xn={class:"flex items-center gap-1"},eo={key:1,class:"rounded-lg border border-primary/50 bg-primary/10 p-3 mb-3 flex items-center gap-3"},to={class:"flex-1 min-w-0"},no={class:"text-xs font-medium text-primary flex items-center gap-1.5"},oo={class:"text-sm font-mono block truncate mt-0.5"},so={key:2,class:"flex items-center gap-2 bg-elevated rounded p-2 mb-3 border border-red-200 dark:border-red-800"},ao={class:"text-xs font-mono text-red-600 dark:text-red-400 flex-1 truncate"},ro={key:4,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 mb-3 space-y-2"},io={class:"flex items-center gap-2 min-w-0"},lo={key:0,class:"text-[11px] text-gray-500 truncate min-w-0"},co={key:0,class:"rounded border border-default overflow-hidden bg-default"},uo={class:"text-sm font-mono block truncate"},mo={key:0,class:"text-xs flex flex-wrap items-center gap-x-1.5 gap-y-0.5"},fo={class:"font-mono text-gray-500"},po={key:0,class:"font-mono text-red-500 line-through"},go={key:1,class:"text-gray-400"},ho={key:2,class:"font-mono text-green-600 dark:text-green-400"},vo={key:3,class:"text-gray-400"},yo={key:2,class:"text-xs text-gray-500"},xo={key:3,class:"text-xs text-primary/90 flex items-center gap-1"},bo={class:"flex items-center gap-2"},ko={key:5,class:"rounded-lg border border-default bg-elevated p-3 mb-3 flex items-center gap-3"},_o={class:"flex-1 min-w-0"},$o={class:"text-xs font-medium text-success-600 dark:text-success-400"},wo={class:"text-sm font-mono block truncate mt-0.5"},Co={class:"space-y-2"},So={key:6,class:"mt-3"},To={class:"space-y-2"},Lo={class:"flex items-center gap-1"},nt=3,Ao=oe({__name:"LocatorHealingPanel",props:{runId:{},testRunsCaseId:{},storageKey:{},affectedCount:{}},setup(e){const r=e,i=w(()=>r.storageKey?Ke:Ne),m=w(()=>r.storageKey?{storageKey:r.storageKey}:{}),{data:o,pending:a,error:s}=Ee(()=>`/api/test-runs/${r.runId}/cases/${r.testRunsCaseId}/locator-healing`,{lazy:!0},"$z1C7vU2CXe"),g=w(()=>!!o.value&&o.value.source!=="none"&&!!(o.value.fromElementMatch?.length||o.value.fromPriorSuccess?.length||o.value.fromAriaSnapshot?.length)),c=w(()=>o.value?o.value.fromElementMatch??o.value.fromPriorSuccess??o.value.fromAriaSnapshot??[]:[]),h=w(()=>c.value.find(R=>R.pickedByUser)??null),C=w(()=>o.value?.recommendation?o.value.recommendation:o.value?.priorNameMayBeStale||!c.value.length?null:lt(o.value?.failingLocator?.method,c.value)),T=w(()=>o.value?.priorNameMayBeStale&&o.value.fromPriorSuccess?.length?o.value.fromAriaSnapshot??[]:[]),x=w(()=>{const R=C.value;return R?.recommended?R.recommended.pickedByUser?"Confirmed with the locator picker on the failing page":R.preservesConvention?"Keeps your original locator style — minimal, idiomatic edit":R.suggestAddTestId?"Most stable available, but still fragile":"Most stable available — a sturdier style than the original":""}),A=w(()=>{const R=o.value?.priorNameMayBeStale,f=(()=>{switch(o.value?.source){case"prior-run":return R?"Pre-captured from the last passing run — the element looks changed since":"Pre-captured from the last passing run — highest confidence";case"element-match":return"The element looks renamed or moved — these are fresh locators for its current identity on the failing page";case"fingerprint":return"Matched by locator signature (line numbers shifted)";case"cross-test":return"Captured by another test in this project that uses the same locator";case"aria-snapshot":return"Generated from the failure-time ARIA snapshot — limited, no HTML attributes";default:return""}})(),N=o.value?.capturedAt;return N?`${f} · captured ${We(N)}`:f}),z=w(()=>{if(o.value?.priorNameMayBeStale)return"text-warning-600 dark:text-warning-400";switch(o.value?.source){case"prior-run":case"fingerprint":case"cross-test":return"text-success-600 dark:text-success-400";case"element-match":return"text-primary-600 dark:text-primary-400";default:return"text-warning-600 dark:text-warning-400"}}),B=w(()=>{const R=o.value?.failingLocator;return R?`${R.method}(${JSON.stringify(R.args)})`:""}),Z=je(),{data:Y}=Ee(()=>`/api/test-run-cases/${r.testRunsCaseId}/traces`,{lazy:!0},"$vsBboELop9"),E=w(()=>{const R=Y.value?.[0];if(!R)return null;const f=!!Z.public.demoMode&&R.filePath.startsWith("demo/");return at(R.filePath,Z.app?.baseURL,f)}),O=j(!1);async function ce(){await yt(`/api/test-runs/${r.runId}/cases/${r.testRunsCaseId}/locator-healing`)}const{copy:ee}=Ge(),y=j(null);let H=null;function M(R,f,N){ee(R,{toast:N}),y.value=f,H&&clearTimeout(H),H=setTimeout(()=>{y.value=null},2e3)}function K(R,f){M(R,f,"Locator copied")}Le(()=>{H&&clearTimeout(H)});const W=w(()=>C.value?.recommended??null),F=w(()=>r.affectedCount&&r.affectedCount>1&&W.value?`Same break affects ${r.affectedCount} tests in this cluster — one fix`:""),Q=w(()=>{if(W.value?.pickedByUser)return"your confirmed pick";switch(o.value?.source){case"prior-run":return"from the last passing run";case"fingerprint":return"from a prior run (line shifted)";case"cross-test":return"from another test in this project";case"element-match":return"from the current failing page";case"aria-snapshot":return"from the ARIA snapshot";default:return""}}),ve=w(()=>{const R=o.value?.sourceLine,f=W.value;if(!R||!f)return null;const N=Zn(R.text,o.value?.failingLocator?.method,f.locator);return N?{edit:N,patch:Wn(N,o.value?.location??null)}:null}),xe=w(()=>{if(ve.value)return[];const R=o.value?.failingLocator,f=W.value;return!R||!f||f.method!==R.method?[]:Gn(R.args,f.args)});function ze(){const R=W.value;!R||!o.value||M(Yn({location:o.value.location??null,sourceLine:o.value.sourceLine??null,failing:B.value,recommended:R.locator}),"fix-prompt","Fix prompt copied")}const te=j(!1),ke=w(()=>te.value?c.value:c.value.slice(0,nt));return(R,f)=>{const N=Me,be=vt,me=Ze,ue=ye,_e=Ie,Ce=Gt,Te=it,se=zt;return n(),l(D,null,[!t(a)&&!t(s)&&t(g)?(n(),P(Se(t(i)),Ue({key:0},t(m),{icon:"i-lucide-bandage",title:"Alternative locators",count:t(c).length,help:"locator-healing"}),Ae({subtitle:S(()=>[d("span",{class:re(t(z))},p(t(A)),3)]),default:S(()=>[t(o)?.healedInRunId?(n(),P(me,{key:0,class:"mb-3",color:"success",icon:"i-lucide-circle-check",variant:"subtle",title:"Locator healed"},{description:S(()=>[f[11]||(f[11]=L(" The recommended locator now passes at this call site — ",-1)),$(be,{to:`/test-runs/${t(o).healedInRunId}`,class:"underline font-medium"},{default:S(()=>[L(" see run #"+p(t(o).healedInRunId),1)]),_:1},8,["to"]),f[12]||(f[12]=L(". ",-1))]),_:1})):k("",!0),t(h)?(n(),l("div",eo,[$(ue,{name:"i-lucide-user-check",class:"size-5 text-primary shrink-0"}),d("div",to,[d("p",no,[f[14]||(f[14]=L(" Your pick ",-1)),$(_e,{size:"sm",color:"primary",variant:"subtle"},{default:S(()=>[...f[13]||(f[13]=[L("confirmed on the failing page",-1)])]),_:1})]),d("code",oo,p(t(h).locator),1)]),$(N,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(y)==="user-pick"?"i-lucide-check":"i-lucide-copy",onClick:f[1]||(f[1]=V=>K(t(h).locator,"user-pick"))},{default:S(()=>[...f[15]||(f[15]=[L(" Copy ",-1)])]),_:1},8,["trailing-icon"])])):k("",!0),t(o)?.failingLocator?(n(),l("div",so,[$(ue,{name:"i-lucide-x-circle",class:"size-4 text-red-500 shrink-0"}),d("code",ao,p(t(B)),1),$(N,{size:"xs",variant:"ghost",color:"neutral",icon:t(y)==="failing"?"i-lucide-check":"i-lucide-copy",title:t(y)==="failing"?"Copied!":"Copy",onClick:f[2]||(f[2]=V=>K(t(B),"failing"))},null,8,["icon","title"])])):k("",!0),t(o)?.priorNameMayBeStale?(n(),P(me,{key:3,class:"mb-3",color:"warning",icon:"i-lucide-alert-triangle",variant:"subtle",title:"The element's name looks changed",description:"The captured accessible name no longer appears on the failing page, so name-based alternatives (and the failing locator itself) probably no longer match. Prefer the structural options, or the failing-page candidates below."})):k("",!0),t(W)?(n(),l("div",ro,[d("div",io,[$(ue,{name:"i-lucide-star",class:"size-4 text-primary shrink-0"}),f[16]||(f[16]=d("p",{class:"text-xs font-medium text-primary shrink-0"},"Recommended fix",-1)),t(Q)?(n(),l("span",lo," · "+p(t(Q)),1)):k("",!0),f[17]||(f[17]=d("span",{class:"flex-1"},null,-1)),$(_e,{size:"xs",color:"primary",variant:"subtle",class:"font-mono tabular-nums shrink-0"},{default:S(()=>[L(p(t(W).score),1)]),_:1})]),t(ve)?(n(),l("div",co,[$(Ce,{patch:t(ve).patch},null,8,["patch"])])):(n(),l(D,{key:1},[d("code",uo,p(t(W).locator),1),t(xe).length?(n(),l("p",mo,[(n(!0),l(D,null,ne(t(xe),(V,ie)=>(n(),l(D,{key:ie},[d("span",fo,p(V.key)+":",1),V.from?(n(),l("span",po,p(V.from),1)):(n(),l("span",go,"—")),$(ue,{name:"i-lucide-arrow-right",class:"size-3 text-gray-400"}),V.to?(n(),l("span",ho,p(V.to),1)):(n(),l("span",vo,"removed"))],64))),128))])):k("",!0)],64)),t(x)?(n(),l("p",yo,p(t(x)),1)):k("",!0),t(F)?(n(),l("p",xo,[$(ue,{name:"i-lucide-layers",class:"size-3 shrink-0"}),L(p(t(F)),1)])):k("",!0),d("div",bo,[$(N,{size:"xs",color:"primary",variant:"solid","trailing-icon":t(y)==="top"?"i-lucide-check":"i-lucide-copy",onClick:f[3]||(f[3]=V=>K(t(W).locator,"top"))},{default:S(()=>[...f[18]||(f[18]=[L(" Copy locator ",-1)])]),_:1},8,["trailing-icon"]),$(N,{size:"xs",color:"neutral",variant:"outline",icon:t(y)==="fix-prompt"?"i-lucide-check":"i-lucide-sparkles",title:"Copy an instruction an AI coding agent can apply directly to the test",onClick:ze},{default:S(()=>[...f[19]||(f[19]=[L(" Copy fix prompt ",-1)])]),_:1},8,["icon"])])])):k("",!0),t(C)?.hasDurableAlternative&&t(C).durable?(n(),l("div",ko,[$(ue,{name:"i-lucide-shield-check",class:"size-5 text-success shrink-0"}),d("div",_o,[d("p",$o," Most stable option (score: "+p(t(C).durable.score)+") ",1),d("code",wo,p(t(C).durable.locator),1),f[20]||(f[20]=d("p",{class:"text-xs text-gray-500 mt-0.5"},"Sturdier, but changes the locator style",-1))]),$(N,{size:"sm",color:"neutral",variant:"outline","trailing-icon":t(y)==="durable"?"i-lucide-check":"i-lucide-copy",onClick:f[4]||(f[4]=V=>K(t(C).durable.locator,"durable"))},{default:S(()=>[...f[21]||(f[21]=[L(" Copy ",-1)])]),_:1},8,["trailing-icon"])])):k("",!0),d("div",Co,[f[22]||(f[22]=d("p",{class:"text-xs font-medium text-gray-500"},"All alternatives",-1)),(n(!0),l(D,null,ne(t(ke),(V,ie)=>(n(),P(Te,{key:ie,alt:V,copied:t(y)===`alt-${ie}`,onCopy:u=>K(V.locator,`alt-${ie}`)},null,8,["alt","copied","onCopy"]))),128)),t(c).length>nt?(n(),P(N,{key:0,size:"xs",variant:"ghost",color:"neutral",block:"",icon:t(te)?"i-lucide-chevron-up":"i-lucide-chevron-down",onClick:f[5]||(f[5]=V=>te.value=!t(te))},{default:S(()=>[L(p(t(te)?"Show fewer":`Show all ${t(c).length} alternatives`),1)]),_:1},8,["icon"])):k("",!0)]),t(T).length?(n(),l("div",So,[f[23]||(f[23]=d("p",{class:"text-xs font-medium text-gray-500 mb-2"},"From the failing page",-1)),d("div",To,[(n(!0),l(D,null,ne(t(T),(V,ie)=>(n(),P(Te,{key:ie,alt:V,note:"candidate from the failure-time ARIA snapshot",copied:t(y)===`supp-${ie}`,onCopy:u=>K(V.locator,`supp-${ie}`)},null,8,["alt","copied","onCopy"]))),128))])])):k("",!0),t(C)?.suggestAddTestId?(n(),P(me,{key:7,class:"mt-3",color:"warning",icon:"i-lucide-info",variant:"subtle",title:"All alternatives are fragile",description:"Every captured locator scores below 50. Add a stable data-testid attribute to this element in the app for a durable fix."})):k("",!0),t(o)?.source==="aria-snapshot"?(n(),P(me,{key:8,class:"mt-3",color:"info",icon:"i-lucide-info",variant:"subtle"},{description:S(()=>[f[25]||(f[25]=L(" No HTML attributes were available. ",-1)),$(se,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:S(()=>[...f[24]||(f[24]=[L("Enable Piwi fixture capture",-1)])]),_:1}),f[26]||(f[26]=L(" for full alternatives including data-testid and CSS selectors. ",-1))]),_:1})):k("",!0)]),_:2},[e.storageKey?{name:"folded",fn:S(()=>[t(C)?.recommended?(n(),l("code",Jn,p(t(C).recommended.locator),1)):(n(),l("span",Qn,p(t(c).length)+" alternative"+p(t(c).length===1?"":"s"),1))]),key:"0"}:void 0,t(E)||t(o)?.failingLocator?{name:"actions",fn:S(()=>[d("div",Xn,[t(o)?.failingLocator?(n(),P(N,{key:0,size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-mouse-pointer",title:"Open the failure-time DOM snapshot and click the element to pick a locator",onClick:f[0]||(f[0]=V=>O.value=!0)},{default:S(()=>[...f[9]||(f[9]=[L(" Pick from snapshot ",-1)])]),_:1})):k("",!0),t(E)?(n(),P(N,{key:1,to:t(E),target:"_blank",size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-crosshair",title:"Open the failure trace in the trace viewer — its Pick locator tool works on the recorded page snapshots"},{default:S(()=>[...f[10]||(f[10]=[L(" Pick from trace ",-1)])]),_:1},8,["to"])):k("",!0)])]),key:"1"}:void 0]),1040,["count"])):!t(a)&&!t(s)&&!t(g)?(n(),P(Se(t(i)),Ue({key:1},t(m),{icon:"i-lucide-bandage",title:"Alternative locators",subtitle:"No alternatives available",help:"locator-healing"}),Ae({default:S(()=>[$(me,{color:"neutral",icon:"i-lucide-info",variant:"subtle"},{description:S(()=>[f[31]||(f[31]=L(" No pre-captured alternatives — this locator has never passed in a previous run. ",-1)),$(se,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:S(()=>[...f[30]||(f[30]=[L("Enable Piwi dashboard fixtures",-1)])]),_:1}),f[32]||(f[32]=L(" to capture element attributes at test time, or use “Pick from snapshot” above to choose a locator by hand on the failure-time page. ",-1))]),_:1})]),_:2},[e.storageKey?{name:"folded",fn:S(()=>[f[27]||(f[27]=d("span",null,"No alternatives available",-1))]),key:"0"}:void 0,t(E)||t(o)?.failingLocator?{name:"actions",fn:S(()=>[d("div",Lo,[t(o)?.failingLocator?(n(),P(N,{key:0,size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-mouse-pointer",title:"Open the failure-time DOM snapshot and click the element to pick a locator",onClick:f[6]||(f[6]=V=>O.value=!0)},{default:S(()=>[...f[28]||(f[28]=[L(" Pick from snapshot ",-1)])]),_:1})):k("",!0),t(E)?(n(),P(N,{key:1,to:t(E),target:"_blank",size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-crosshair",title:"Open the failure trace in the trace viewer — its Pick locator tool works on the recorded page snapshots"},{default:S(()=>[...f[29]||(f[29]=[L(" Pick from trace ",-1)])]),_:1},8,["to"])):k("",!0)])]),key:"1"}:void 0]),1040)):k("",!0),t(o)?.failingLocator?(n(),P(Hn,{key:2,open:t(O),"onUpdate:open":f[7]||(f[7]=V=>Oe(O)?O.value=V:null),"run-id":e.runId,"test-runs-case-id":e.testRunsCaseId,"failing-locator":t(o).failingLocator,healing:t(o),onConfirmed:ce,onClose:f[8]||(f[8]=V=>O.value=!1)},null,8,["open","run-id","test-runs-case-id","failing-locator","healing"])):k("",!0)],64)}}}),wa=Object.assign(Ao,{__name:"LocatorHealingPanel"}),Io={key:1,class:"space-y-2"},zo={class:"text-xs font-medium text-gray-500 dark:text-gray-400 sm:w-40 shrink-0"},Bo={class:"flex flex-wrap items-center gap-1.5 min-w-0 text-xs font-mono"},Ro={class:"rounded bg-red-50 px-1.5 py-0.5 text-red-700 dark:bg-red-950/30 dark:text-red-400 break-all"},Po={class:"rounded bg-green-50 px-1.5 py-0.5 text-green-700 dark:bg-green-950/30 dark:text-green-400 break-all"},Oo={key:0,class:"text-xs text-gray-400 dark:text-gray-500"},Uo={key:0},Eo=oe({__name:"EnvironmentDiffCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const i=e,m=w(()=>i.storageKey?Ke:Ne),o=w(()=>i.storageKey?{storageKey:i.storageKey}:{}),{data:a,pending:s,error:g}=Ee(()=>`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/environment-diff`,{lazy:!0},"$yASgALxNz3"),c=w(()=>a.value?.entries??[]),h=w(()=>c.value.filter(z=>!z.informational)),C=w(()=>c.value.filter(z=>z.informational)),T=w(()=>{const z=a.value?.baseline;if(!z)return"";const B=z.startTime?` · ${We(new Date(z.startTime))}`:"";return`vs last pass in run #${z.runId}${B}`}),x=w(()=>{if(a.value?.status!=="ok")return"No passing baseline to compare against";const z=h.value.length;return z===0?"Identical to last pass — no environment drift":`${z} change${z===1?"":"s"}: ${h.value.map(B=>B.label).join(", ")}`}),A=j(null);return r({reveal:()=>A.value?.reveal?.()}),(z,B)=>{const Z=Ze,Y=ye;return!t(s)&&!t(g)&&t(a)?.status==="ok"?(n(),P(Se(t(m)),Ue({key:0,ref_key:"card",ref:A},t(o),{icon:"i-lucide-git-compare-arrows",title:"Environment diff",count:t(h).length||void 0,help:"environment-diff",subtitle:t(T)}),Ae({default:S(()=>[t(c).length===0?(n(),P(Z,{key:0,color:"success",icon:"i-lucide-check-circle",variant:"subtle",description:"The environment is identical to the last passing run — environment drift is unlikely to explain this failure."})):(n(),l("div",Io,[(n(!0),l(D,null,ne(t(h),E=>(n(),l("div",{key:E.key,class:"rounded-lg border border-default p-3 flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-3"},[d("span",zo,p(E.label),1),d("div",Bo,[d("code",Ro,p(E.failing??"(unset)"),1),$(Y,{name:"i-lucide-arrow-left",class:"size-3 shrink-0 text-gray-400"}),d("code",Po,p(E.baseline??"(unset)"),1)])]))),128)),t(C).length>0?(n(),l("p",Oo,[B[0]||(B[0]=L(" Also changed (varies naturally between runs): ",-1)),(n(!0),l(D,null,ne(t(C),(E,O)=>(n(),l("span",{key:E.key},[L(p(E.label.toLowerCase())+" "+p(E.baseline??"—")+" → "+p(E.failing??"—"),1),O<t(C).length-1?(n(),l("span",Uo,", ")):k("",!0)]))),128))])):k("",!0)]))]),_:2},[e.storageKey?{name:"folded",fn:S(()=>[d("span",null,p(t(x)),1)]),key:"0"}:void 0]),1040,["count","subtitle"])):k("",!0)}}}),Ca=Object.assign(Eo,{__name:"EnvironmentDiffCard"}),Mo={class:"absolute top-4 left-4 text-white/70 text-sm font-medium"},jo=["src","alt"],No=oe({__name:"ScreenshotLightbox",props:{images:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:r}){const i=e,m=r,o=w(()=>i.modelValue!==null);function a(){m("update:modelValue",null)}function s(){i.modelValue!==null&&i.modelValue>0&&m("update:modelValue",i.modelValue-1)}function g(){i.modelValue!==null&&i.modelValue<i.images.length-1&&m("update:modelValue",i.modelValue+1)}const c=w(()=>i.modelValue===null?null:i.images[i.modelValue]??null);function h(C){o.value&&(C.key==="Escape"&&a(),C.key==="ArrowLeft"&&s(),C.key==="ArrowRight"&&g())}return st(()=>window.addEventListener("keydown",h)),xt(()=>window.removeEventListener("keydown",h)),(C,T)=>{const x=ye;return n(),P(bt,{to:"body"},[$(kt,{name:"lightbox"},{default:S(()=>[o.value?(n(),l("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/90",onClick:he(a,["self"])},[d("button",{class:"absolute top-4 right-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:a},[$(x,{name:"i-lucide-x",class:"size-6"})]),d("div",Mo,p((e.modelValue??0)+1)+" / "+p(e.images.length),1),e.images.length>1&&(e.modelValue??0)>0?(n(),l("button",{key:0,class:"absolute left-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:s},[$(x,{name:"i-lucide-chevron-left",class:"size-6"})])):k("",!0),c.value?(n(),l("img",{key:1,src:c.value.src,alt:c.value.name,class:"max-h-[90vh] max-w-[90vw] object-contain rounded-lg",onClick:T[0]||(T[0]=he(()=>{},["stop"]))},null,8,jo)):k("",!0),e.images.length>1&&(e.modelValue??0)<e.images.length-1?(n(),l("button",{key:2,class:"absolute right-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:g},[$(x,{name:"i-lucide-chevron-right",class:"size-6"})])):k("",!0)])):k("",!0)]),_:1})])}}}),ut=Object.assign(_t(No,[["__scopeId","data-v-c02b1e9b"]]),{__name:"ScreenshotLightbox"}),Ko={class:"flex justify-end mb-2"},Vo={key:1,class:"rounded overflow-hidden border border-default bg-gray-50 dark:bg-gray-900"},Do=["src"],Ho={key:2,class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},Fo={class:"rounded overflow-hidden border border-red-200 dark:border-red-900 bg-gray-50 dark:bg-gray-900"},qo=["src"],Zo={class:"rounded overflow-hidden border border-green-200 dark:border-green-900 bg-gray-50 dark:bg-gray-900"},Wo={class:"px-2 py-1 text-[10px] font-medium text-green-600 dark:text-green-400"},Go=["src"],Yo=oe({__name:"VisualDiffCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const i=e,m=w(()=>i.storageKey?Ke:Ne),o=w(()=>i.storageKey?{storageKey:i.storageKey}:{}),a=je(),{data:s,pending:g,error:c}=Ee(()=>`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/visual-diff`,{lazy:!0},"$nTbSHl3faK"),h=w(()=>s.value?.status==="ok"?s.value.diff??null:null),C=j("overlay"),T=[{label:"Overlay",value:"overlay"},{label:"Side by side",value:"side-by-side"}],x=w(()=>h.value?Pe(h.value.path,"image/png",a.app?.baseURL):""),A=w(()=>h.value?Pe(h.value.failingPath,null,a.app?.baseURL):""),z=w(()=>h.value?Pe(h.value.baselinePath,null,a.app?.baseURL):""),B=w(()=>h.value?(h.value.changedPixelRatio*100).toFixed(2):"0"),Z=w(()=>{const ee=h.value?.changedPixelRatio??0;return ee>.1?"error":ee>.01?"warning":"success"}),Y=w(()=>h.value?h.value.dimensionMismatch?`${B.value}% changed — dimensions differ, unreliable`:`${B.value}% of pixels changed vs last pass`:"No comparable screenshots"),E=w(()=>h.value?[{src:A.value,name:"Failing screenshot"},{src:z.value,name:"Last passing screenshot"},{src:x.value,name:"Diff overlay"}]:[]),O=j(null),ce=j(null);return r({reveal:()=>ce.value?.reveal?.()}),(ee,y)=>{const H=Ie,M=Ze,K=Rt,W=ut;return!t(g)&&!t(c)&&t(h)?(n(),P(Se(t(m)),Ue({key:0,ref_key:"card",ref:ce},t(o),{icon:"i-lucide-images",title:"Visual diff",help:"visual-diff"}),Ae({subtitle:S(()=>[d("span",null,"vs last pass in run #"+p(t(h).baselineRunId),1)]),actions:S(()=>[$(H,{color:t(Z),variant:"subtle",size:"sm",class:"font-mono tabular-nums"},{default:S(()=>[L(p(t(B))+"% changed ",1)]),_:1},8,["color"])]),default:S(()=>[t(h).dimensionMismatch?(n(),P(M,{key:0,class:"mb-3",color:"warning",icon:"i-lucide-alert-triangle",variant:"subtle",title:"Screenshot dimensions differ",description:"The failing and passing screenshots have different sizes (viewport change?). They are compared on a padded canvas, so the changed-pixel ratio is inflated and unreliable."})):k("",!0),d("div",Ko,[$(K,{modelValue:t(C),"onUpdate:modelValue":y[0]||(y[0]=F=>Oe(C)?C.value=F:null),items:T,size:"xs",content:!1,ui:{list:"overflow-x-auto",trigger:"shrink-0"}},null,8,["modelValue"])]),t(C)==="overlay"?(n(),l("div",Vo,[d("img",{src:t(x),alt:"Diff overlay (red = changed pixels)",class:"w-full max-h-96 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open diff overlay in lightbox",onClick:y[1]||(y[1]=F=>O.value=2),onKeydown:[y[2]||(y[2]=ge(F=>O.value=2,["enter"])),y[3]||(y[3]=ge(he(F=>O.value=2,["prevent"]),["space"]))]},null,40,Do),y[11]||(y[11]=d("p",{class:"px-2 py-1 text-[10px] text-gray-500"},"Red pixels mark differences against the last passing run",-1))])):(n(),l("div",Ho,[d("div",Fo,[y[12]||(y[12]=d("p",{class:"px-2 py-1 text-[10px] font-medium text-red-600 dark:text-red-400"},"Failing",-1)),d("img",{src:t(A),alt:"Failing screenshot",class:"w-full max-h-80 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open failing screenshot in lightbox",onClick:y[4]||(y[4]=F=>O.value=0),onKeydown:[y[5]||(y[5]=ge(F=>O.value=0,["enter"])),y[6]||(y[6]=ge(he(F=>O.value=0,["prevent"]),["space"]))]},null,40,qo)]),d("div",Zo,[d("p",Wo," Last pass (run #"+p(t(h).baselineRunId)+") ",1),d("img",{src:t(z),alt:"Last passing screenshot",class:"w-full max-h-80 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open last passing screenshot in lightbox",onClick:y[7]||(y[7]=F=>O.value=1),onKeydown:[y[8]||(y[8]=ge(F=>O.value=1,["enter"])),y[9]||(y[9]=ge(he(F=>O.value=1,["prevent"]),["space"]))]},null,40,Go)])])),$(W,{modelValue:t(O),"onUpdate:modelValue":y[10]||(y[10]=F=>Oe(O)?O.value=F:null),images:t(E)},null,8,["modelValue","images"])]),_:2},[e.storageKey?{name:"folded",fn:S(()=>[d("span",null,p(t(Y)),1)]),key:"0"}:void 0]),1040)):k("",!0)}}}),Sa=Object.assign(Yo,{__name:"VisualDiffCard"}),Jo={class:"max-h-96 overflow-y-auto"},Qo={key:0,class:"mt-2 text-xs text-gray-400 dark:text-gray-500"},Fe=2e4,Xo=oe({__name:"DomSnapshotCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const i=e,m=w(()=>i.storageKey?Ke:Ne),o=w(()=>i.storageKey?{storageKey:i.storageKey}:{}),{data:a,pending:s,error:g}=Ee(()=>`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/dom-snapshot`,{lazy:!0},"$AxHFpokm2o"),c=w(()=>(a.value?.html??"").slice(0,Fe)),h=w(()=>(a.value?.html?.length??0)>Fe),C=w(()=>{const z=a.value;return!z||z.status!=="ok"?"":`${Math.round((z.html?.length??0)/1024)} KB · rendered from the uploaded trace${z.snapshotName?` (${z.snapshotName})`:""}`}),{copy:T,copied:x}=Ge(),A=j(null);return r({reveal:()=>A.value?.reveal?.()}),(z,B)=>{const Z=Me,Y=Pt,E=Ot;return!t(s)&&!t(g)&&t(a)?.status==="ok"&&t(a).html?(n(),P(Se(t(m)),Ue({key:0,ref_key:"card",ref:A},t(o),{icon:"i-lucide-file-code",title:"DOM snapshot",help:"dom-snapshot",subtitle:t(C)}),Ae({actions:S(()=>[$(Y,{text:t(x)?"Copied!":"Copy full HTML"},{default:S(()=>[$(Z,{size:"xs",variant:"ghost",color:"neutral",icon:t(x)?"i-lucide-check":"i-lucide-clipboard",onClick:B[0]||(B[0]=O=>t(T)(t(a).html))},null,8,["icon"])]),_:1},8,["text"])]),default:S(()=>[d("div",Jo,[$(E,{code:t(c),lang:"xml"},null,8,["code"])]),t(h)||t(a).truncated?(n(),l("p",Qo,[t(h)?(n(),l(D,{key:0},[L("Showing the first "+p(Math.round(Fe/1e3))+"k characters — use Copy for the full document.",1)],64)):(n(),l(D,{key:1},[L("The snapshot was truncated to its size cap.")],64))])):k("",!0)]),_:2},[e.storageKey?{name:"folded",fn:S(()=>[d("span",null,"Failure-time HTML extracted from the trace — "+p(Math.round((t(a).html.length??0)/1024))+" KB",1)]),key:"0"}:void 0]),1040,["subtitle"])):k("",!0)}}}),Ta=Object.assign(Xo,{__name:"DomSnapshotCard"}),es={class:"rounded-md border border-default overflow-hidden"},ts={class:"text-xs font-semibold text-gray-600 dark:text-gray-300 flex-1"},ns={key:0,class:"text-gray-400 font-normal ml-1"},os={key:0},ss=oe({__name:"TestEvidenceSection",props:qe({icon:{},label:{},count:{},collapsible:{type:Boolean}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(e){const r=e,i=ot(e,"open"),m=w(()=>r.collapsible===!1||i.value);return(o,a)=>{const s=ye;return n(),l("div",es,[(n(),P(Se(e.collapsible===!1?"div":"button"),{class:re(["w-full flex items-center gap-1.5 px-3 py-2 bg-elevated border-b border-default text-left",e.collapsible!==!1&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer"]),onClick:a[0]||(a[0]=g=>e.collapsible!==!1&&(i.value=!i.value))},{default:S(()=>[$(s,{name:e.icon,class:"size-3.5 shrink-0 text-primary/70"},null,8,["name"]),d("span",ts,[L(p(e.label),1),e.count!=null?(n(),l("span",ns,"("+p(e.count)+")",1)):k("",!0)]),e.collapsible!==!1?(n(),P(s,{key:0,name:i.value?"i-lucide-chevron-up":"i-lucide-chevron-down",class:"size-3.5 text-gray-400"},null,8,["name"])):k("",!0)]),_:1},8,["class"])),t(m)?(n(),l("div",os,[Re(o.$slots,"default")])):k("",!0)])}}}),Ye=Object.assign(ss,{__name:"TestEvidenceSection"}),as={class:"grid grid-cols-2 gap-2 p-2 bg-gray-50 dark:bg-gray-900"},rs=["aria-label","onClick","onKeydown"],is=["src","alt"],ls={class:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/30"},cs={class:"absolute bottom-0 inset-x-0 px-1.5 py-0.5 text-[10px] text-white bg-black/50 truncate"},us=oe({__name:"TestEvidenceScreenshots",props:{attachments:{}},setup(e){const r=e,i=je();function m(s){return s.split("/").pop()||s}const o=w(()=>r.attachments.filter(s=>Et(s.path,s.contentType)).map(s=>({src:Pe(s.path,s.contentType,i.app?.baseURL),name:s.name||m(s.path)}))),a=j(null);return(s,g)=>{const c=ye,h=ut,C=Ye;return t(o).length>0?(n(),P(C,{key:0,icon:"i-lucide-image",label:"Screenshots",count:t(o).length,collapsible:!1},{default:S(()=>[d("div",as,[(n(!0),l(D,null,ne(t(o),(T,x)=>(n(),l("div",{key:T.src,class:"relative group cursor-pointer rounded overflow-hidden border border-default outline-none focus-visible:outline-2 focus-visible:outline-primary",role:"button",tabindex:"0","aria-label":`View screenshot ${T.name}`,onClick:A=>a.value=x,onKeydown:[ge(A=>a.value=x,["enter"]),ge(he(A=>a.value=x,["prevent"]),["space"])]},[d("img",{src:T.src,alt:T.name,class:"w-full h-28 object-cover object-top transition-opacity group-hover:opacity-80",loading:"lazy"},null,8,is),d("div",ls,[$(c,{name:"i-lucide-zoom-in",class:"size-5 text-white"})]),d("p",cs,p(T.name),1)],40,rs))),128))]),$(h,{modelValue:t(a),"onUpdate:modelValue":g[0]||(g[0]=T=>Oe(a)?a.value=T:null),images:t(o)},null,8,["modelValue","images"])]),_:1},8,["count"])):k("",!0)}}}),La=Object.assign(us,{__name:"TestEvidenceScreenshots"}),ds={class:"m-0"},ms={class:"bg-black rounded overflow-hidden"},fs=["src"],ps=["title"],gs=oe({__name:"VideoPlayer",props:{src:{},label:{}},setup(e){return(r,i)=>(n(),l("figure",ds,[d("div",ms,[d("video",{src:e.src,controls:"",preload:"metadata",class:"w-full max-h-96"}," Your browser does not support the video tag. ",8,fs)]),e.label?(n(),l("figcaption",{key:0,class:"mt-1 text-xs text-gray-400 truncate",title:e.label},p(e.label),9,ps)):k("",!0)]))}}),hs=Object.assign(gs,{__name:"VideoPlayer"}),vs={class:"space-y-2 p-2 bg-gray-50 dark:bg-gray-900"},ys=oe({__name:"TestEvidenceVideos",props:{attachments:{}},setup(e){const r=e,i=je();function m(a){return a.split("/").pop()||a}const o=w(()=>r.attachments.filter(a=>Mt(a.path,a.contentType)).map(a=>({src:Pe(a.path,a.contentType,i.app?.baseURL),name:a.name||m(a.path)})));return(a,s)=>{const g=hs,c=Ye;return t(o).length>0?(n(),P(c,{key:0,icon:"i-lucide-video",label:"Videos",count:t(o).length,collapsible:!1},{default:S(()=>[d("div",vs,[(n(!0),l(D,null,ne(t(o),h=>(n(),P(g,{key:h.src,src:h.src,label:h.name},null,8,["src","label"]))),128))])]),_:1},8,["count"])):k("",!0)}}}),Aa=Object.assign(ys,{__name:"TestEvidenceVideos"}),xs={class:"flex items-center justify-between gap-2"},bs={class:"flex items-center gap-2 min-w-0"},ks={class:"text-sm truncate"},_s={key:0,class:"text-xs text-gray-400 shrink-0"},$s={key:1,class:"text-xs text-gray-400 shrink-0"},ws={class:"flex items-center gap-1.5 shrink-0"},Cs=oe({__name:"TraceListItem",props:{trace:{},showTime:{type:Boolean,default:!0}},setup(e){const r=e,i=je(),m=w(()=>(i.app?.baseURL??"/").replace(/\/$/,"")),o=w(()=>!!i.public.demoMode&&r.trace.filePath.startsWith("demo/")),a=w(()=>r.trace.filePath.split("/").pop()||r.trace.filePath),s=w(()=>at(r.trace.filePath,i.app?.baseURL,o.value)),g=w(()=>o.value?`${m.value}/${r.trace.filePath}`:`${m.value}/api/files/${At(r.trace.filePath)}`);return(c,h)=>{const C=ye,T=Me;return n(),l("div",xs,[d("div",bs,[$(C,{name:"i-lucide-file-archive",class:"size-4 text-gray-400 shrink-0"}),d("span",ks,p(t(a)),1),e.trace.size?(n(),l("span",_s,p(("formatBytes"in c?c.formatBytes:t(Lt))(e.trace.size)),1)):k("",!0),e.showTime?(n(),l("span",$s,p(("formatRelativeTime"in c?c.formatRelativeTime:t(We))(e.trace.createdAt)),1)):k("",!0)]),d("div",ws,[$(T,{to:t(s),target:"_blank",icon:"i-lucide-bug-play",size:"xs",label:"View trace"},null,8,["to"]),$(T,{to:t(g),target:"_blank",icon:"i-lucide-download",size:"xs",color:"neutral",variant:"soft",label:"Download"},null,8,["to"])])])}}}),Ss=Object.assign(Cs,{__name:"TraceListItem"}),Ts={key:0,class:"flex items-center justify-center py-4"},Ls={key:1,class:"divide-y divide-default"},As=oe({__name:"TestEvidenceTraces",props:{traces:{},loading:{type:Boolean}},setup(e){return(r,i)=>{const m=ye,o=Ss,a=Ye;return e.loading||e.traces.length>0?(n(),P(a,{key:0,icon:"i-lucide-bug-play",label:"Traces",count:e.traces.length||null,collapsible:!1},{default:S(()=>[e.loading&&!e.traces.length?(n(),l("div",Ts,[$(m,{name:"i-lucide-loader-circle",class:"size-4 animate-spin text-gray-400"})])):(n(),l("div",Ls,[(n(!0),l(D,null,ne(e.traces,s=>(n(),P(o,{key:s.id,trace:s,class:"px-3 py-2"},null,8,["trace"]))),128))]))]),_:1},8,["count"])):k("",!0)}}}),Ia=Object.assign(As,{__name:"TestEvidenceTraces"}),Is={class:"space-y-2"},zs={key:0,class:"rounded-lg border border-default overflow-hidden"},Bs=["title"],Rs={key:2,class:"truncate text-gray-400 dark:text-gray-500"},Ps={class:"font-mono"},Os={key:0,class:"overflow-x-auto text-xs font-mono leading-relaxed py-1"},Us={class:"min-w-max"},Es={key:1,class:"rounded-lg border border-dashed border-default"},Ms=["onClick"],js={key:0,class:"px-3 pb-2 space-y-1"},Ns=["title"],Ks={key:0,class:"truncate font-mono shrink-0"},Vs=oe({__name:"TraceCallStack",props:{frames:{},projectKey:{},projectName:{}},setup(e){const r=e,i=w(()=>{if(!r.frames.some(T=>T.inProject))return r.frames.map((T,x)=>({kind:"frame",frame:T,frameIndex:x}));const c=[];let h=[];const C=()=>{h.length!==0&&(c.push({kind:"group",frames:h,key:`group-${c.length}`}),h=[])};return r.frames.forEach((T,x)=>{T.inProject?(C(),c.push({kind:"frame",frame:T,frameIndex:x})):h.push(T)}),C(),c}),m=w(()=>{const g=r.frames.findIndex(c=>c.inProject);return g>=0?g:0}),o=j(new Set);function a(g){const c=new Set(o.value);c.has(g)?c.delete(g):c.add(g),o.value=c}function s(g){return g.source?g.source.lines.map((c,h)=>{const C=g.source.startLine+h;return{lineNo:C,text:c,failing:C===g.line}}):[]}return(g,c)=>{const h=ye,C=rt,T=Ie;return n(),l("div",Is,[(n(!0),l(D,null,ne(t(i),x=>(n(),l(D,{key:x.kind==="frame"?`f-${x.frameIndex}`:x.key},[x.kind==="frame"?(n(),l("div",zs,[d("div",{class:re(["flex items-center gap-2 px-3 py-1.5 bg-elevated/40 text-xs",x.frame.source?"border-b border-default":""])},[$(h,{name:x.frameIndex===t(m)?"i-lucide-circle-x":"i-lucide-corner-left-up",class:re([x.frameIndex===t(m)?"text-red-500":"text-gray-400","size-3.5 shrink-0"])},null,8,["name","class"]),x.frame.inProject?(n(),P(C,{key:0,"file-path":x.frame.file,line:x.frame.line,column:x.frame.column,"project-key":e.projectKey,"project-name":e.projectName,class:"min-w-0"},null,8,["file-path","line","column","project-key","project-name"])):(n(),l("code",{key:1,class:"truncate text-gray-500 dark:text-gray-400",title:x.frame.absFile||x.frame.file},p(x.frame.file)+":"+p(x.frame.line),9,Bs)),x.frame.functionName?(n(),l("span",Rs,[c[0]||(c[0]=L(" in ",-1)),d("span",Ps,p(x.frame.functionName),1)])):k("",!0),$(T,{color:x.frameIndex===t(m)?"error":"neutral",variant:"subtle",size:"xs",class:"ml-auto shrink-0"},{default:S(()=>[L(p(x.frameIndex===t(m)?"Failed here":"Caller"),1)]),_:2},1032,["color"])],2),x.frame.source?(n(),l("div",Os,[d("div",Us,[(n(!0),l(D,null,ne(s(x.frame),A=>(n(),l("div",{key:A.lineNo,class:re(["px-3 whitespace-pre flex",A.failing?"bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300 font-medium":"text-gray-600 dark:text-gray-400"])},[d("span",{class:re(["w-10 shrink-0 text-right pr-3 tabular-nums select-none",A.failing?"text-red-400 dark:text-red-500":"text-gray-300 dark:text-gray-600"])},p(A.lineNo),3),d("span",null,p(A.text),1)],2))),128))])])):k("",!0)])):(n(),l("div",Es,[d("button",{type:"button",class:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300",onClick:A=>a(x.key)},[$(h,{name:t(o).has(x.key)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5 shrink-0"},null,8,["name"]),L(" "+p(x.frames.length)+" frame"+p(x.frames.length===1?"":"s")+" in dependencies ",1)],8,Ms),t(o).has(x.key)?(n(),l("div",js,[(n(!0),l(D,null,ne(x.frames,(A,z)=>(n(),l("div",{key:z,class:"flex items-center gap-2 text-xs text-gray-400 dark:text-gray-500 min-w-0"},[$(h,{name:"i-lucide-corner-left-up",class:"size-3 shrink-0"}),d("code",{class:"truncate",title:A.absFile||A.file},p(A.file)+":"+p(A.line),9,Ns),A.functionName?(n(),l("span",Ks,p(A.functionName),1)):k("",!0)]))),128))])):k("",!0)]))],64))),128))])}}}),za=Object.assign(Vs,{__name:"TraceCallStack"}),Ds={class:"space-y-2"},Hs={class:"flex items-center gap-2 px-3 py-1.5 bg-elevated/40 border-b border-default text-xs"},Fs={class:"overflow-x-auto text-xs font-mono leading-relaxed py-1"},qs={class:"min-w-max"},Zs=oe({__name:"TestSourceStack",props:{frames:{},projectKey:{},projectName:{}},setup(e){function r(i){return i.split(`
@@ -1,2 +1,2 @@
1
- import{r as f,h as l}from"./B8fs6GU9.js";const d="piwi-diagnosis-notifications";function I(){const i=f("default"),s=new Set,t=f(!0);"Notification"in window&&(i.value=Notification.permission),localStorage.getItem(d)==="false"&&(t.value=!1);const n=l(()=>"Notification"in window),c=l(()=>n.value&&i.value==="granted"&&t.value);async function m(){if(!n.value)return;const e=await Notification.requestPermission();i.value=e}function g(){t.value=!t.value,localStorage.setItem(d,String(t.value))}function v(e,o){r({clusterId:o,summary:e.summary,rootCause:e.rootCause,category:e.category,confidence:e.confidence})}function r(e){if(!c.value||s.has(e.clusterId))return;const o=[e.summary||e.rootCause];e.category&&o.push(`Category: ${e.category}`),e.confidence&&o.push(`Confidence: ${e.confidence}`);const u=o.join(`
1
+ import{r as f,h as l}from"./BPKwYP2Q.js";const d="piwi-diagnosis-notifications";function I(){const i=f("default"),s=new Set,t=f(!0);"Notification"in window&&(i.value=Notification.permission),localStorage.getItem(d)==="false"&&(t.value=!1);const n=l(()=>"Notification"in window),c=l(()=>n.value&&i.value==="granted"&&t.value);async function m(){if(!n.value)return;const e=await Notification.requestPermission();i.value=e}function g(){t.value=!t.value,localStorage.setItem(d,String(t.value))}function v(e,o){r({clusterId:o,summary:e.summary,rootCause:e.rootCause,category:e.category,confidence:e.confidence})}function r(e){if(!c.value||s.has(e.clusterId))return;const o=[e.summary||e.rootCause];e.category&&o.push(`Category: ${e.category}`),e.confidence&&o.push(`Confidence: ${e.confidence}`);const u=o.join(`
2
2
  `);if(!u)return;const a=new Notification("Piwi diagnosis complete",{body:u,tag:`diagnosis-${e.clusterId}`,icon:"/logo.svg"});a.onclick=()=>{window.focus(),a.close()},s.add(e.clusterId)}return{permission:i,supported:n,active:c,requestPermission:m,toggleEnabled:g,notify:v,notifyFromPayload:r}}export{I as u};
@@ -1,4 +1,4 @@
1
- import{_ as ke,a as Re}from"./B32-7cBF.js";import{d as Q,o as n,c as d,f as _,g as u,i as e,j as l,v as X,p as F,t as c,l as se,k as t,q as y,m,h as f,_ as Z,x as oe,F as D,y as W,r as J,C as we,s as $e,K as Ce,e as Te,aa as Fe}from"./B8fs6GU9.js";import{_ as je}from"./DHVmXA9K.js";import{_ as Se}from"./DNP5tTJo.js";import{_ as Pe,a as ze}from"./C9jjVEQU.js";import{_ as Ie}from"./Surk4Lw-.js";import{_ as Ue}from"./CHSkT2s0.js";import{_ as Ne}from"./n7Htv9PJ.js";import{_ as Ve}from"./o5WQ5Z7k.js";import{_ as Ae}from"./CrFCPOnY.js";import{_ as ie}from"./CHMpVLqo.js";import{_ as Ee}from"./D4nLD93c.js";import{_ as De}from"./DZLrAp2i.js";import{_ as le}from"./BBJ9Pu3M.js";import{f as ne,h as ue,A as M,e as Oe}from"./CvCF77E-.js";import{a as Be,d as Le,_ as We}from"./wCQds5_f.js";import{_ as He}from"./0KrkW531.js";import{_ as de}from"./B32ySRXg.js";import{u as re}from"./DAeYEeCC.js";import{u as Me}from"./O1A-LRgV.js";import{u as Ke}from"./BtJkQ3to.js";import"./BGsuOpiq.js";import"./D1tZEdSi.js";import"./DVdOm5Bg.js";import"./4fB15L_7.js";import"./CKZn0TUX.js";import"./YDWXnWou.js";import"./B_80i5Ge.js";import"./BC_Wu-fv.js";import"./3SnTawZW.js";import"./DWzdeQ3Z.js";const Ge={class:"flex items-center gap-3 flex-wrap"},Ye={class:"flex items-center gap-1.5"},qe={key:0,class:"text-gray-500"},Je={key:1},Qe={key:2},Xe={class:"flex items-center gap-1.5 cursor-pointer select-none text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors"},Ze=Q({__name:"HomeFilters",props:{modelValue:{},availableEnvironments:{}},emits:["update:modelValue"],setup(O,{emit:w}){const $=O,v=w,U=f({get:()=>$.modelValue.environments,set:P=>v("update:modelValue",{...$.modelValue,environments:P})}),T=f({get:()=>$.modelValue.fullRunsOnly,set:P=>v("update:modelValue",{...$.modelValue,fullRunsOnly:P})}),A=f(()=>$.modelValue.environments.length>0||!$.modelValue.fullRunsOnly);function j(){v("update:modelValue",{environments:[],fullRunsOnly:!0})}return(P,b)=>{const N=X,a=je,s=Se,x=Z;return n(),d("div",Ge,[O.availableEnvironments.length>0?(n(),_(a,{key:0,modelValue:t(U),"onUpdate:modelValue":b[0]||(b[0]=g=>se(U)?U.value=g:null),items:O.availableEnvironments,multiple:"",placeholder:"All environments",size:"sm",class:"min-w-[160px]"},{default:u(({modelValue:g})=>[e("div",Ye,[l(N,{name:"i-lucide-server",class:F(["size-3.5 shrink-0",g.length?"text-primary":"text-gray-400"])},null,8,["class"]),g.length?g.length===1?(n(),d("span",Je,c(g[0]),1)):(n(),d("span",Qe,c(g.length)+" environments",1)):(n(),d("span",qe,"All environments"))])]),_:1},8,["modelValue","items"])):y("",!0),e("label",Xe,[l(s,{modelValue:t(T),"onUpdate:modelValue":b[1]||(b[1]=g=>se(T)?T.value=g:null),size:"sm"},null,8,["modelValue"]),b[2]||(b[2]=m(" Full runs only ",-1))]),t(A)?(n(),_(x,{key:1,variant:"ghost",size:"sm",color:"neutral",icon:"i-lucide-x",onClick:j},{default:u(()=>[...b[3]||(b[3]=[m(" Reset ",-1)])]),_:1})):y("",!0)])}}}),et=Object.assign(Ze,{__name:"HomeFilters"}),tt={class:"hidden md:block overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0"},st={key:0,class:"flex flex-wrap gap-1 mt-0.5"},nt={class:"w-40"},rt={key:1,class:"text-gray-400 text-sm"},at={class:"text-xs text-gray-500 dark:text-gray-400"},ot={key:0},it={key:1,class:"text-gray-400 text-sm"},lt={key:0,class:"tabular-nums text-sm text-gray-600 dark:text-gray-400"},ut={key:1,class:"text-gray-400"},dt={class:"space-y-2 md:hidden"},ct={class:"flex items-start justify-between gap-2"},mt={key:0,class:"flex flex-wrap gap-1"},pt={class:"flex items-center justify-between gap-2 text-xs"},gt={class:"text-gray-500 dark:text-gray-400 truncate"},ft={key:1,class:"text-gray-400"},yt={key:2,class:"shrink-0 tabular-nums text-gray-500 dark:text-gray-400"},_t=Q({__name:"ProjectTrendTable",props:{projects:{},limit:{default:10}},setup(O){const w=O,$={failing:0,flaky:1,passing:2,unknown:3},v=J(!1),U=f(()=>w.projects.length>w.limit),T=f(()=>{const a=[...w.projects].sort((s,x)=>{const g=$[s.tendency]-$[x.tendency];if(g!==0)return g;const V=s.latestFullRun?new Date(s.latestFullRun.startTime).getTime():0;return(x.latestFullRun?new Date(x.latestFullRun.startTime).getTime():0)-V});return v.value?a:a.slice(0,w.limit)});function A(a){return a>=90?"text-green-600 dark:text-green-400":a>=50?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400"}function j(a){switch(a){case"failing":return"text-red-700 dark:text-red-400 bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800";case"flaky":return"text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800";case"passing":return"text-green-700 dark:text-green-400 bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800";default:return"text-gray-500 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 border-gray-200 dark:border-gray-700"}}function P(a){return a==="unknown"?"Unknown":a.charAt(0).toUpperCase()+a.slice(1)}function b(a){switch(a){case"failing":return"i-lucide-trending-down";case"flaky":return"i-lucide-shuffle";case"passing":return"i-lucide-trending-up";default:return"i-lucide-minus"}}const N=[{accessorKey:"name",header:"Project"},{id:"recentRuns",header:"Last 20 runs"},{accessorKey:"tendency",header:"Tendency"},{id:"passRate",header:"Pass rate"},{id:"latestRun",header:"Latest run"},{id:"tests",header:"Tests"}];return(a,s)=>{const x=Z,g=oe,V=Ve,h=Ae,S=X,z=ie,E=Ee,k=De,K=le;return n(),_(K,{icon:"i-lucide-layout-dashboard",title:"Project health",help:"home.project-health"},{actions:u(()=>[t(U)&&!t(v)?(n(),_(x,{key:0,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-down",onClick:s[0]||(s[0]=r=>v.value=!0)},{default:u(()=>[m(" Show all "+c(w.projects.length),1)]),_:1})):t(v)?(n(),_(x,{key:1,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-up",onClick:s[1]||(s[1]=r=>v.value=!1)},{default:u(()=>[...s[2]||(s[2]=[m(" Show less ",-1)])]),_:1})):y("",!0),l(x,{to:"/projects",variant:"outline",size:"sm"},{default:u(()=>[...s[3]||(s[3]=[m("View all",-1)])]),_:1})]),default:u(()=>[e("div",tt,[l(E,{data:t(T),columns:N,ui:{base:"min-w-[700px]",td:"py-3",th:"py-3 text-xs uppercase tracking-wide"}},{"name-cell":u(({row:r})=>[l(g,{to:`/projects/${r.original.id}`,class:"font-medium text-primary hover:underline truncate block max-w-[200px]"},{default:u(()=>[m(c(r.original.label||r.original.name),1)]),_:2},1032,["to"]),r.original.tags.length>0?(n(),d("div",st,[(n(!0),d(D,null,W(r.original.tags,C=>(n(),_(V,{key:C.id,text:C.text,color:C.color},null,8,["text","color"]))),128))])):y("",!0)]),"recentRuns-cell":u(({row:r})=>[e("div",nt,[l(h,{runs:r.original.recentRuns,height:28},null,8,["runs"])])]),"tendency-cell":u(({row:r})=>[e("span",{class:F(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium border whitespace-nowrap",j(r.original.tendency)])},[l(S,{name:b(r.original.tendency),class:"size-3 shrink-0"},null,8,["name"]),m(" "+c(P(r.original.tendency)),1)],2)]),"passRate-cell":u(({row:r})=>[r.original.latestFullRun?(n(),d("span",{key:0,class:F(["font-semibold tabular-nums text-sm",A(("passRate"in a?a.passRate:t(M))(r.original.latestFullRun))])},c(("passRate"in a?a.passRate:t(M))(r.original.latestFullRun))+"% ",3)):(n(),d("span",rt,"—"))]),"latestRun-cell":u(({row:r})=>[r.original.latestFullRun?(n(),_(g,{key:0,to:`/test-runs/${r.original.latestFullRun.id}`,class:"flex items-center gap-2 min-w-[140px] hover:opacity-80 transition-opacity"},{default:u(()=>[l(z,{status:r.original.latestFullRun.status},null,8,["status"]),e("div",at,[e("div",null,c(("formatRelativeTime"in a?a.formatRelativeTime:t(ne))(r.original.latestFullRun.startTime)),1),r.original.latestFullRun.duration?(n(),d("div",ot,c(("formatDuration"in a?a.formatDuration:t(ue))(r.original.latestFullRun.duration)),1)):y("",!0)])]),_:2},1032,["to"])):(n(),d("span",it,"No full runs"))]),"tests-cell":u(({row:r})=>[r.original.latestFullRun?(n(),d("span",lt,c(r.original.latestFullRun.passedTests)+"/"+c(r.original.latestFullRun.totalTests),1)):(n(),d("span",ut,"—"))]),_:1},8,["data"])]),e("div",dt,[(n(!0),d(D,null,W(t(T),r=>(n(),d("div",{key:r.id,class:"rounded-lg border border-default p-3 space-y-2"},[e("div",ct,[l(g,{to:`/projects/${r.id}`,class:"font-medium text-primary hover:underline truncate"},{default:u(()=>[m(c(r.label||r.name),1)]),_:2},1032,["to"]),e("span",{class:F(["inline-flex shrink-0 items-center gap-1 rounded border px-1.5 py-0.5 text-xs font-medium whitespace-nowrap",j(r.tendency)])},[l(S,{name:b(r.tendency),class:"size-3 shrink-0"},null,8,["name"]),m(" "+c(P(r.tendency)),1)],2)]),r.tags.length>0?(n(),d("div",mt,[(n(!0),d(D,null,W(r.tags,C=>(n(),_(V,{key:C.id,text:C.text,color:C.color},null,8,["text","color"]))),128))])):y("",!0),l(h,{runs:r.recentRuns,height:24},null,8,["runs"]),e("div",pt,[r.latestFullRun?(n(),_(g,{key:0,to:`/test-runs/${r.latestFullRun.id}`,class:"flex items-center gap-1.5 min-w-0 hover:opacity-80"},{default:u(()=>[l(z,{status:r.latestFullRun.status},null,8,["status"]),e("span",gt,c(("formatRelativeTime"in a?a.formatRelativeTime:t(ne))(r.latestFullRun.startTime)),1)]),_:2},1032,["to"])):(n(),d("span",ft,"No full runs")),r.latestFullRun?(n(),d("span",yt,[e("span",{class:F(["font-semibold",A(("passRate"in a?a.passRate:t(M))(r.latestFullRun))])},c(("passRate"in a?a.passRate:t(M))(r.latestFullRun))+"% ",3),m(" · "+c(r.latestFullRun.passedTests)+"/"+c(r.latestFullRun.totalTests),1)])):y("",!0)])]))),128))]),t(T).length===0?(n(),_(k,{key:0,text:"No projects yet",padded:!1,class:"py-8"})):y("",!0)]),_:1})}}}),xt=Object.assign(_t,{__name:"ProjectTrendTable"}),ht={class:"flex items-center gap-3"},vt={class:"p-2 bg-primary/10 rounded-lg shrink-0"},bt={class:"text-xl font-semibold inline-flex items-center gap-1"},kt={class:"text-sm text-gray-500 dark:text-gray-400"},Rt={class:"flex flex-col items-center shrink-0"},wt={key:1},$t={key:0,class:"w-px flex-1 mt-2 min-h-6 bg-gray-200 dark:bg-gray-700"},Ct={class:"flex-1 pb-6"},Tt={class:"flex items-center gap-2 mb-1"},Ft={class:"font-medium"},jt={class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},St={class:"border-t border-gray-200 dark:border-gray-700 pt-4 mt-2"},Pt={key:0,class:"mt-4 space-y-6"},zt={class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},It={class:"flex items-center justify-between text-sm text-gray-500 dark:text-gray-400"},Ut=`// tests/fixtures.ts
1
+ import{_ as ke,a as Re}from"./Bvfmwzgw.js";import{d as Q,o as n,c as d,f as _,g as u,i as e,j as l,v as X,p as F,t as c,l as se,k as t,q as y,m,h as f,_ as Z,x as oe,F as D,y as W,r as J,C as we,s as $e,K as Ce,e as Te,aa as Fe}from"./BPKwYP2Q.js";import{_ as je}from"./C3r_Sv1p.js";import{_ as Se}from"./BGYbnqA7.js";import{_ as Pe,a as ze}from"./IFqRT_xJ.js";import{_ as Ie}from"./CKB_doYB.js";import{_ as Ue}from"./l0gdGdar.js";import{_ as Ne}from"./Br2K9yi_.js";import{_ as Ve}from"./BVW5qIDP.js";import{_ as Ee}from"./BQrSEuzu.js";import{_ as ie}from"./D2jhe9JK.js";import{_ as Ae}from"./BuZOa2M3.js";import{_ as De}from"./xUrLy-Zn.js";import{_ as le}from"./DhA17dqR.js";import{f as ne,h as ue,B as M,e as Oe}from"./k-z_VVTK.js";import{a as Be,d as Le,_ as We}from"./CQeMb57w.js";import{_ as He}from"./CoHGrO41.js";import{_ as de}from"./B7yG1G_l.js";import{u as re}from"./BIf1R_fu.js";import{u as Me}from"./C8RBRg7I.js";import{u as Ke}from"./iwD5atI2.js";import"./CpO-ABDW.js";import"./jIF87ALb.js";import"./mGJLLqyN.js";import"./d5ZB3uxF.js";import"./DAWn6Z7h.js";import"./C219JuBV.js";import"./C38aZbFJ.js";import"./DRtTLQri.js";import"./r3SBLxtE.js";import"./DuMv-ugy.js";const Ge={class:"flex items-center gap-3 flex-wrap"},Ye={class:"flex items-center gap-1.5"},qe={key:0,class:"text-gray-500"},Je={key:1},Qe={key:2},Xe={class:"flex items-center gap-1.5 cursor-pointer select-none text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors"},Ze=Q({__name:"HomeFilters",props:{modelValue:{},availableEnvironments:{}},emits:["update:modelValue"],setup(O,{emit:w}){const $=O,v=w,U=f({get:()=>$.modelValue.environments,set:P=>v("update:modelValue",{...$.modelValue,environments:P})}),T=f({get:()=>$.modelValue.fullRunsOnly,set:P=>v("update:modelValue",{...$.modelValue,fullRunsOnly:P})}),E=f(()=>$.modelValue.environments.length>0||!$.modelValue.fullRunsOnly);function j(){v("update:modelValue",{environments:[],fullRunsOnly:!0})}return(P,b)=>{const N=X,a=je,s=Se,x=Z;return n(),d("div",Ge,[O.availableEnvironments.length>0?(n(),_(a,{key:0,modelValue:t(U),"onUpdate:modelValue":b[0]||(b[0]=g=>se(U)?U.value=g:null),items:O.availableEnvironments,multiple:"",placeholder:"All environments",size:"sm",class:"min-w-[160px]"},{default:u(({modelValue:g})=>[e("div",Ye,[l(N,{name:"i-lucide-server",class:F(["size-3.5 shrink-0",g.length?"text-primary":"text-gray-400"])},null,8,["class"]),g.length?g.length===1?(n(),d("span",Je,c(g[0]),1)):(n(),d("span",Qe,c(g.length)+" environments",1)):(n(),d("span",qe,"All environments"))])]),_:1},8,["modelValue","items"])):y("",!0),e("label",Xe,[l(s,{modelValue:t(T),"onUpdate:modelValue":b[1]||(b[1]=g=>se(T)?T.value=g:null),size:"sm"},null,8,["modelValue"]),b[2]||(b[2]=m(" Full runs only ",-1))]),t(E)?(n(),_(x,{key:1,variant:"ghost",size:"sm",color:"neutral",icon:"i-lucide-x",onClick:j},{default:u(()=>[...b[3]||(b[3]=[m(" Reset ",-1)])]),_:1})):y("",!0)])}}}),et=Object.assign(Ze,{__name:"HomeFilters"}),tt={class:"hidden md:block overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0"},st={key:0,class:"flex flex-wrap gap-1 mt-0.5"},nt={class:"w-40"},rt={key:1,class:"text-gray-400 text-sm"},at={class:"text-xs text-gray-500 dark:text-gray-400"},ot={key:0},it={key:1,class:"text-gray-400 text-sm"},lt={key:0,class:"tabular-nums text-sm text-gray-600 dark:text-gray-400"},ut={key:1,class:"text-gray-400"},dt={class:"space-y-2 md:hidden"},ct={class:"flex items-start justify-between gap-2"},mt={key:0,class:"flex flex-wrap gap-1"},pt={class:"flex items-center justify-between gap-2 text-xs"},gt={class:"text-gray-500 dark:text-gray-400 truncate"},ft={key:1,class:"text-gray-400"},yt={key:2,class:"shrink-0 tabular-nums text-gray-500 dark:text-gray-400"},_t=Q({__name:"ProjectTrendTable",props:{projects:{},limit:{default:10}},setup(O){const w=O,$={failing:0,flaky:1,passing:2,unknown:3},v=J(!1),U=f(()=>w.projects.length>w.limit),T=f(()=>{const a=[...w.projects].sort((s,x)=>{const g=$[s.tendency]-$[x.tendency];if(g!==0)return g;const V=s.latestFullRun?new Date(s.latestFullRun.startTime).getTime():0;return(x.latestFullRun?new Date(x.latestFullRun.startTime).getTime():0)-V});return v.value?a:a.slice(0,w.limit)});function E(a){return a>=90?"text-green-600 dark:text-green-400":a>=50?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400"}function j(a){switch(a){case"failing":return"text-red-700 dark:text-red-400 bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800";case"flaky":return"text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800";case"passing":return"text-green-700 dark:text-green-400 bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800";default:return"text-gray-500 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 border-gray-200 dark:border-gray-700"}}function P(a){return a==="unknown"?"Unknown":a.charAt(0).toUpperCase()+a.slice(1)}function b(a){switch(a){case"failing":return"i-lucide-trending-down";case"flaky":return"i-lucide-shuffle";case"passing":return"i-lucide-trending-up";default:return"i-lucide-minus"}}const N=[{accessorKey:"name",header:"Project"},{id:"recentRuns",header:"Last 20 runs"},{accessorKey:"tendency",header:"Tendency"},{id:"passRate",header:"Pass rate"},{id:"latestRun",header:"Latest run"},{id:"tests",header:"Tests"}];return(a,s)=>{const x=Z,g=oe,V=Ve,h=Ee,S=X,z=ie,A=Ae,k=De,K=le;return n(),_(K,{icon:"i-lucide-layout-dashboard",title:"Project health",help:"home.project-health"},{actions:u(()=>[t(U)&&!t(v)?(n(),_(x,{key:0,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-down",onClick:s[0]||(s[0]=r=>v.value=!0)},{default:u(()=>[m(" Show all "+c(w.projects.length),1)]),_:1})):t(v)?(n(),_(x,{key:1,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-up",onClick:s[1]||(s[1]=r=>v.value=!1)},{default:u(()=>[...s[2]||(s[2]=[m(" Show less ",-1)])]),_:1})):y("",!0),l(x,{to:"/projects",variant:"outline",size:"sm"},{default:u(()=>[...s[3]||(s[3]=[m("View all",-1)])]),_:1})]),default:u(()=>[e("div",tt,[l(A,{data:t(T),columns:N,ui:{base:"min-w-[700px]",td:"py-3",th:"py-3 text-xs uppercase tracking-wide"}},{"name-cell":u(({row:r})=>[l(g,{to:`/projects/${r.original.id}`,class:"font-medium text-primary hover:underline truncate block max-w-[200px]"},{default:u(()=>[m(c(r.original.label||r.original.name),1)]),_:2},1032,["to"]),r.original.tags.length>0?(n(),d("div",st,[(n(!0),d(D,null,W(r.original.tags,C=>(n(),_(V,{key:C.id,text:C.text,color:C.color},null,8,["text","color"]))),128))])):y("",!0)]),"recentRuns-cell":u(({row:r})=>[e("div",nt,[l(h,{runs:r.original.recentRuns,height:28},null,8,["runs"])])]),"tendency-cell":u(({row:r})=>[e("span",{class:F(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium border whitespace-nowrap",j(r.original.tendency)])},[l(S,{name:b(r.original.tendency),class:"size-3 shrink-0"},null,8,["name"]),m(" "+c(P(r.original.tendency)),1)],2)]),"passRate-cell":u(({row:r})=>[r.original.latestFullRun?(n(),d("span",{key:0,class:F(["font-semibold tabular-nums text-sm",E(("passRate"in a?a.passRate:t(M))(r.original.latestFullRun))])},c(("passRate"in a?a.passRate:t(M))(r.original.latestFullRun))+"% ",3)):(n(),d("span",rt,"—"))]),"latestRun-cell":u(({row:r})=>[r.original.latestFullRun?(n(),_(g,{key:0,to:`/test-runs/${r.original.latestFullRun.id}`,class:"flex items-center gap-2 min-w-[140px] hover:opacity-80 transition-opacity"},{default:u(()=>[l(z,{status:r.original.latestFullRun.status},null,8,["status"]),e("div",at,[e("div",null,c(("formatRelativeTime"in a?a.formatRelativeTime:t(ne))(r.original.latestFullRun.startTime)),1),r.original.latestFullRun.duration?(n(),d("div",ot,c(("formatDuration"in a?a.formatDuration:t(ue))(r.original.latestFullRun.duration)),1)):y("",!0)])]),_:2},1032,["to"])):(n(),d("span",it,"No full runs"))]),"tests-cell":u(({row:r})=>[r.original.latestFullRun?(n(),d("span",lt,c(r.original.latestFullRun.passedTests)+"/"+c(r.original.latestFullRun.totalTests),1)):(n(),d("span",ut,"—"))]),_:1},8,["data"])]),e("div",dt,[(n(!0),d(D,null,W(t(T),r=>(n(),d("div",{key:r.id,class:"rounded-lg border border-default p-3 space-y-2"},[e("div",ct,[l(g,{to:`/projects/${r.id}`,class:"font-medium text-primary hover:underline truncate"},{default:u(()=>[m(c(r.label||r.name),1)]),_:2},1032,["to"]),e("span",{class:F(["inline-flex shrink-0 items-center gap-1 rounded border px-1.5 py-0.5 text-xs font-medium whitespace-nowrap",j(r.tendency)])},[l(S,{name:b(r.tendency),class:"size-3 shrink-0"},null,8,["name"]),m(" "+c(P(r.tendency)),1)],2)]),r.tags.length>0?(n(),d("div",mt,[(n(!0),d(D,null,W(r.tags,C=>(n(),_(V,{key:C.id,text:C.text,color:C.color},null,8,["text","color"]))),128))])):y("",!0),l(h,{runs:r.recentRuns,height:24},null,8,["runs"]),e("div",pt,[r.latestFullRun?(n(),_(g,{key:0,to:`/test-runs/${r.latestFullRun.id}`,class:"flex items-center gap-1.5 min-w-0 hover:opacity-80"},{default:u(()=>[l(z,{status:r.latestFullRun.status},null,8,["status"]),e("span",gt,c(("formatRelativeTime"in a?a.formatRelativeTime:t(ne))(r.latestFullRun.startTime)),1)]),_:2},1032,["to"])):(n(),d("span",ft,"No full runs")),r.latestFullRun?(n(),d("span",yt,[e("span",{class:F(["font-semibold",E(("passRate"in a?a.passRate:t(M))(r.latestFullRun))])},c(("passRate"in a?a.passRate:t(M))(r.latestFullRun))+"% ",3),m(" · "+c(r.latestFullRun.passedTests)+"/"+c(r.latestFullRun.totalTests),1)])):y("",!0)])]))),128))]),t(T).length===0?(n(),_(k,{key:0,text:"No projects yet",padded:!1,class:"py-8"})):y("",!0)]),_:1})}}}),xt=Object.assign(_t,{__name:"ProjectTrendTable"}),ht={class:"flex items-center gap-3"},vt={class:"p-2 bg-primary/10 rounded-lg shrink-0"},bt={class:"text-xl font-semibold inline-flex items-center gap-1"},kt={class:"text-sm text-gray-500 dark:text-gray-400"},Rt={class:"flex flex-col items-center shrink-0"},wt={key:1},$t={key:0,class:"w-px flex-1 mt-2 min-h-6 bg-gray-200 dark:bg-gray-700"},Ct={class:"flex-1 pb-6"},Tt={class:"flex items-center gap-2 mb-1"},Ft={class:"font-medium"},jt={class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},St={class:"border-t border-gray-200 dark:border-gray-700 pt-4 mt-2"},Pt={key:0,class:"mt-4 space-y-6"},zt={class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},It={class:"flex items-center justify-between text-sm text-gray-500 dark:text-gray-400"},Ut=`// tests/fixtures.ts
2
2
  import { test as base, expect } from '@playwright/test'
3
3
  import { piwiFixtures } from '@piwitests/reporter'
4
4
 
@@ -15,7 +15,7 @@ import { test as base } from '@playwright/test'
15
15
  import { extendPiwiFixtures } from '@piwitests/reporter'
16
16
 
17
17
  export const test = extendPiwiFixtures(base)
18
- export { expect } from '@playwright/test'`,At=Q({__name:"GetStartedWizard",setup(O){const w=Ce(),$=f(()=>!!w.public.authEnabled),v=J("http://localhost:3000");we(()=>{v.value=window.location.origin});const U=f(()=>$.value?`
18
+ export { expect } from '@playwright/test'`,Et=Q({__name:"GetStartedWizard",setup(O){const w=Ce(),$=f(()=>!!w.public.authEnabled),v=J("http://localhost:3000");we(()=>{v.value=window.location.origin});const U=f(()=>$.value?`
19
19
  apiKey: process.env.PIWI_API_KEY,`:""),T=f(()=>`import { defineConfig } from '@playwright/test'
20
20
 
21
21
  export default defineConfig({
@@ -29,7 +29,7 @@ export default defineConfig({
29
29
  use: {
30
30
  trace: 'retain-on-failure',
31
31
  },
32
- })`),A=f(()=>`import { defineConfig } from '@playwright/test'
32
+ })`),E=f(()=>`import { defineConfig } from '@playwright/test'
33
33
  import PiwiDashboard from '@piwitests/reporter'
34
34
 
35
35
  export default PiwiDashboard.wrapConfig(
@@ -43,4 +43,4 @@ export default PiwiDashboard.wrapConfig(
43
43
  serverUrl: '${v.value}',
44
44
  projectName: 'my-project',${U.value}
45
45
  },
46
- )`),j=f(()=>{const a=[{title:"Start the dashboard",description:"You're already here — the dashboard is running.",done:!0},{title:"Install the reporter",description:"Add the Piwi reporter to your Playwright project.",code:"npm install --save-dev @piwitests/reporter",lang:"bash"}];return $.value&&a.push({title:"Create an API key",description:"Authentication is enabled on this instance, so the reporter needs a key to submit results. Create one, then set it as PIWI_API_KEY in your CI secrets (used by the snippet below).",action:"create-api-key"}),a.push({title:"Configure Playwright",description:"Add the reporter to your playwright.config.ts.",code:T.value,lang:"typescript"},{title:"Run your tests",description:"Results appear in the dashboard automatically. The project is created on first submit.",code:"npx playwright test",lang:"bash"}),a.map((s,x)=>({id:x+1,...s}))}),P=["zero","one","two","three","four","five","six"],b=f(()=>P[j.value.length]??String(j.value.length)),N=J(!1);return(a,s)=>{const x=X,g=We,V=$e,h=Z,S=He,z=Be,E=de;return n(),_(E,null,{header:u(()=>[e("div",ht,[e("div",vt,[l(x,{name:"i-lucide-rocket",class:"size-5 text-primary"})]),e("div",null,[e("h2",bt,[s[1]||(s[1]=m(" Get started in 60 seconds ",-1)),l(g,{topic:"home.get-started"})]),e("p",kt,"Send your first test run in "+c(t(b))+" steps",1)])])]),footer:u(()=>[e("div",It,[e("span",null,[s[18]||(s[18]=m("Need more options? See the ",-1)),l(z,{to:"reporter","no-icon":"",class:"text-primary hover:underline"},{default:u(()=>[...s[17]||(s[17]=[m("full reporter docs",-1)])]),_:1}),s[19]||(s[19]=m(".",-1))]),l(h,{to:t(Le)("demo/"),target:"_blank",variant:"ghost",size:"sm",color:"neutral","trailing-icon":"i-lucide-external-link"},{default:u(()=>[...s[20]||(s[20]=[m(" View demo with sample data ",-1)])]),_:1},8,["to"])])]),default:u(()=>[e("div",null,[(n(!0),d(D,null,W(t(j),(k,K)=>(n(),d("div",{key:k.id,class:"flex gap-4"},[e("div",Rt,[e("div",{class:F(["flex size-8 items-center justify-center rounded-full text-sm font-semibold",k.done?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-primary/10 text-primary"])},[k.done?(n(),_(x,{key:0,name:"i-lucide-check",class:"size-4"})):(n(),d("span",wt,c(k.id),1))],2),K<t(j).length-1?(n(),d("div",$t)):y("",!0)]),e("div",Ct,[e("div",Tt,[e("h3",Ft,c(k.title),1),k.done?(n(),_(V,{key:0,color:"success",variant:"subtle",size:"xs"},{default:u(()=>[...s[2]||(s[2]=[m("Done",-1)])]),_:1})):y("",!0)]),e("p",jt,c(k.description),1),k.action==="create-api-key"?(n(),_(h,{key:0,to:"/settings/users",icon:"i-lucide-key-round",size:"sm",variant:"soft"},{default:u(()=>[...s[3]||(s[3]=[m(" Create an API key ",-1)])]),_:1})):y("",!0),k.code?(n(),_(S,{key:1,code:k.code,lang:k.lang},null,8,["code","lang"])):y("",!0)])]))),128)),e("div",St,[e("button",{class:"flex items-center gap-2 text-sm font-medium text-gray-600 dark:text-gray-300 hover:text-primary dark:hover:text-primary transition-colors w-full text-left",onClick:s[0]||(s[0]=k=>N.value=!t(N))},[l(x,{name:"i-lucide-chevron-right",class:F(["size-4 transition-transform duration-200",t(N)?"rotate-90":""])},null,8,["class"]),s[4]||(s[4]=m(" Go further — simpler config & capture fixtures ",-1))]),t(N)?(n(),d("div",Pt,[e("div",null,[s[5]||(s[5]=e("h4",{class:"font-medium text-sm mb-1"},[m(" Simpler config with "),e("code",{class:"text-primary text-xs"},"wrapConfig")],-1)),s[6]||(s[6]=e("p",{class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},[m(" Instead of manually adding the reporter array entry, "),e("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded"},"wrapConfig"),m(" auto-injects the reporter and chains the global setup in one call. It also registers the run on the dashboard "),e("em",null,"before"),m(" your "),e("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded"},"globalSetup"),m(" runs, so the dashboard shows an initializing state during setup. ")],-1)),l(S,{code:t(A),lang:"typescript"},null,8,["code"])]),e("div",null,[s[14]||(s[14]=e("h4",{class:"font-medium text-sm mb-1"},[m(" Capture fixtures — network, Web Vitals, console & locator healing with "),e("code",{class:"text-primary text-xs"},"piwiFixtures")],-1)),e("p",zt,[s[8]||(s[8]=m(" Extend your Playwright ",-1)),s[9]||(s[9]=e("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded"},"test",-1)),s[10]||(s[10]=m(" with ",-1)),s[11]||(s[11]=e("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded"},"piwiFixtures",-1)),s[12]||(s[12]=m(" to automatically capture network timing, browser Web Vitals, console errors, ARIA snapshots on failure, and the locator snapshots that power locator healing. See the ",-1)),l(z,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:u(()=>[...s[7]||(s[7]=[m("capture fixtures guide",-1)])]),_:1}),s[13]||(s[13]=m(". ",-1))]),s[15]||(s[15]=e("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500 mb-2"}," Option A — extend your existing fixtures ",-1)),l(S,{code:Ut,lang:"typescript",class:"mb-3"}),l(S,{code:Nt,lang:"typescript",class:"mb-4"}),s[16]||(s[16]=e("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500 mb-2"}," Option B — one-line extend ",-1)),l(S,{code:Vt,lang:"typescript"})])])):y("",!0)])])]),_:1})}}}),Et=Object.assign(At,{__name:"GetStartedWizard"}),Dt={key:0,class:"p-6"},Ot={key:1,class:"p-6 space-y-8","aria-busy":"true"},Bt={class:"grid grid-cols-1 xl:grid-cols-3 gap-6 items-start"},Lt={class:"xl:col-span-2 space-y-3"},Wt={class:"space-y-3"},Ht={key:2,class:"p-6 space-y-8"},Mt={key:1,class:"flex flex-wrap items-center gap-x-8 gap-y-3 text-sm border border-gray-200 dark:border-gray-700 rounded-xl px-6 py-4 bg-gray-50 dark:bg-gray-900/50"},Kt={class:"flex items-center gap-1.5"},Gt={class:"font-semibold tabular-nums"},Yt={class:"flex items-center gap-1.5"},qt={class:"flex items-center gap-1.5"},Jt={key:0,class:"flex items-center gap-1.5"},Qt={class:"font-semibold tabular-nums"},Xt={class:"flex items-center gap-1.5"},Zt={class:"font-semibold tabular-nums"},es={key:2,class:"grid grid-cols-1 xl:grid-cols-3 gap-6 items-start"},ts={class:"xl:col-span-2"},ss={class:"divide-y divide-gray-100 dark:divide-gray-800 text-sm"},ns={class:"flex-1 min-w-0"},rs={class:"font-medium truncate"},as={class:"text-xs text-gray-400"},os={class:"text-right tabular-nums shrink-0"},is={key:0,class:"text-xs text-gray-400"},ls={key:3,class:"text-center py-12 text-gray-500 dark:text-gray-400"},us={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"},ds={class:"flex flex-col gap-3 h-full"},cs={class:"p-2 bg-primary/10 rounded-lg w-fit"},ms={class:"text-xs font-semibold uppercase tracking-wide text-primary mb-1"},ps={class:"font-semibold mb-1"},gs={class:"text-sm text-gray-600 dark:text-gray-400"},ae=6,Ks=Q({__name:"index",setup(O){Te({title:"Piwi Dashboard"});const{data:w,error:$,refresh:v,status:U}=re("/api/projects/overview",{lazy:!0,default:()=>[]},"$cnA6-rHww6"),{data:T,error:A,refresh:j}=re("/api/test-runs/recent",{lazy:!0},"$LEgADC56ri");Me(()=>Promise.all([v(),j()]));const P=f(()=>U.value==="pending"&&!w.value?.length),b=f(()=>$.value||A.value);function N(){v(),j()}const a=Ke("piwi-home-filters",{default:()=>({environments:[],fullRunsOnly:!0}),encode:i=>JSON.stringify(i),decode:i=>{try{return i?JSON.parse(i):{environments:[],fullRunsOnly:!0}}catch{return{environments:[],fullRunsOnly:!0}}}}),s=f(()=>{const i=new Set;for(const o of T.value??[])o.environment&&i.add(o.environment);for(const o of w.value??[])for(const R of o.recentRuns)R.environment&&i.add(R.environment);return[...i].sort()});function x(i){return a.value.environments.length===0?!0:!!i&&a.value.environments.includes(i)}const g=f(()=>{let i=T.value??[];return a.value.fullRunsOnly&&(i=i.filter(o=>o.isFullRun)),a.value.environments.length>0&&(i=i.filter(o=>x(o.environment))),i}),V=f(()=>{let i=w.value??[];return a.value.environments.length>0&&(i=i.map(o=>({...o,recentRuns:o.recentRuns.filter(R=>x(R.environment))})).filter(o=>o.recentRuns.length>0)),i}),h=f(()=>{const i=V.value,o=i.length,R=i.filter(I=>I.tendency==="failing").length,H=i.filter(I=>I.tendency==="flaky").length;let B=0,G=0;for(const I of i)I.latestFullRun&&(B+=I.latestFullRun.passedTests,G+=I.latestFullRun.totalTests);const Y=G>0?Math.round(B/G*100):null,te=Date.now()-1440*60*1e3,L=g.value.filter(I=>new Date(I.startTime).getTime()>te).length;return{totalProjects:o,failingNow:R,flakyNow:H,avgPassRate:Y,runs24h:L}}),S=new Set(["running","initialising","finalizing"]),z=J(!1),E=f(()=>[...g.value].sort((o,R)=>{const H=S.has(o.status)?0:1,B=S.has(R.status)?0:1;return H!==B?H-B:new Date(R.startTime).getTime()-new Date(o.startTime).getTime()})),k=f(()=>z.value?E.value:E.value.slice(0,ae)),K=f(()=>E.value.length>ae),r=f(()=>g.value.length>0),C=f(()=>(w.value?.length??0)>0),ee=f(()=>a.value.fullRunsOnly?(T.value??[]).filter(R=>x(R.environment)).filter(R=>!R.isFullRun).length:0);function ce(){a.value={...a.value,fullRunsOnly:!1}}function me(i){const o=M(i);return o>=90?"text-green-600 dark:text-green-400":o>=50?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400"}function pe(i){return S.has(i)?"border-l-blue-400":i==="passed"?"border-l-green-500":i==="failed"||i==="timedout"||i==="interrupted"?"border-l-red-500":"border-l-gray-300 dark:border-l-gray-600"}const ge=[{icon:"i-lucide-radio",tagline:"Watch your CI run live",title:"Live streaming",description:"Follow test execution in real time. Investigate failures while the suite is still running — no waiting for the CI job to finish."},{icon:"i-lucide-layers",tagline:"10 failures, 2 root causes",title:"Failure clustering",description:"Tests sharing the same error are grouped automatically. Triage one cluster instead of scrolling through unrelated failures."},{icon:"i-lucide-brain-circuit",tagline:"Diagnosis grounded in your code",title:"AI diagnosis",description:"AI analyzes failure clusters using your actual SCM diff, trace files, and run history — not a generic prompt."},{icon:"i-lucide-archive",tagline:"Every run, forever",title:"Permanent test intelligence",description:"Test results, traces, and HTML reports stored permanently. Compare runs, track flakiness trends, and never lose a CI result again."}];return(i,o)=>{const R=ke,H=Re,B=et,G=ze,Y=Z,te=Ie,L=Ue,I=Ne,q=X,fe=xt,ye=ie,_e=oe,xe=le,he=Et,ve=de,be=Pe;return n(),_(be,{id:"home"},{header:u(()=>[l(G,null,Fe({leading:u(()=>[l(R),l(H,{items:[{label:"Home",icon:"i-lucide-house",to:"/"}]})]),_:2},[t(C)?{name:"trailing",fn:u(()=>[l(B,{modelValue:t(a),"onUpdate:modelValue":o[0]||(o[0]=p=>se(a)?a.value=p:null),"available-environments":t(s)},null,8,["modelValue","available-environments"])]),key:"0"}:void 0]),1024)]),body:u(()=>[t(b)?(n(),d("div",Dt,[l(te,{text:`Couldn't load the dashboard: ${t(Oe)(t(b))}`},{action:u(()=>[l(Y,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:N},{default:u(()=>[...o[3]||(o[3]=[m(" Retry ",-1)])]),_:1})]),_:1},8,["text"])])):t(P)?(n(),d("div",Ot,[o[4]||(o[4]=e("span",{class:"sr-only",role:"status"},"Loading dashboard…",-1)),l(L,{class:"h-14 w-full rounded-xl"}),e("div",Bt,[e("div",Lt,[l(L,{class:"h-7 w-40"}),l(L,{class:"h-72 w-full rounded-lg"})]),e("div",Wt,[l(L,{class:"h-7 w-32"}),(n(),d(D,null,W(5,p=>l(L,{key:p,class:"h-12 w-full rounded-lg"})),64))])])])):(n(),d("div",Ht,[t(ee)>0?(n(),_(I,{key:0,icon:"i-lucide-info",color:"primary",variant:"subtle",title:t(ee)===1?"1 partial run is hidden":`${t(ee)} partial runs are hidden`,description:"The “Full runs only” filter hides runs that only cover part of the suite (e.g. a single spec or --grep).",actions:[{label:"Show them",color:"primary",variant:"solid",size:"xs",onClick:ce}]},null,8,["title","actions"])):y("",!0),t(C)?(n(),d("div",Mt,[e("div",Kt,[l(q,{name:"i-lucide-folder",class:"size-4 text-primary shrink-0"}),e("span",Gt,c(t(h).totalProjects),1),o[5]||(o[5]=e("span",{class:"text-gray-500"},"projects",-1))]),e("div",Yt,[e("div",{class:F(["w-2 h-2 rounded-full shrink-0",t(h).failingNow>0?"bg-red-500":"bg-green-500"])},null,2),e("span",{class:F(["font-semibold tabular-nums",t(h).failingNow>0?"text-red-600 dark:text-red-400":""])},c(t(h).failingNow),3),o[6]||(o[6]=e("span",{class:"text-gray-500"},"failing now",-1))]),e("div",qt,[e("div",{class:F(["w-2 h-2 rounded-full shrink-0",t(h).flakyNow>0?"bg-amber-400":"bg-gray-300 dark:bg-gray-600"])},null,2),e("span",{class:F(["font-semibold tabular-nums",t(h).flakyNow>0?"text-amber-600 dark:text-amber-400":""])},c(t(h).flakyNow),3),o[7]||(o[7]=e("span",{class:"text-gray-500"},"flaky",-1))]),t(h).avgPassRate!==null?(n(),d("div",Jt,[l(q,{name:"i-lucide-check-circle",class:"size-4 text-green-500 shrink-0"}),e("span",Qt,c(t(h).avgPassRate)+"%",1),o[8]||(o[8]=e("span",{class:"text-gray-500"},"avg pass rate",-1))])):y("",!0),e("div",Xt,[l(q,{name:"i-lucide-play-circle",class:"size-4 text-primary shrink-0"}),e("span",Zt,c(t(h).runs24h),1),o[9]||(o[9]=e("span",{class:"text-gray-500"},"runs today",-1))])])):y("",!0),t(C)||t(r)?(n(),d("div",es,[e("div",ts,[t(C)?(n(),_(fe,{key:0,projects:t(V)},null,8,["projects"])):y("",!0)]),t(r)?(n(),_(xe,{key:0,icon:"i-lucide-activity",title:"Recent activity"},{actions:u(()=>[t(K)&&!t(z)?(n(),_(Y,{key:0,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-down",onClick:o[1]||(o[1]=p=>z.value=!0)},{default:u(()=>[m(" Show all "+c(t(E).length),1)]),_:1})):t(z)?(n(),_(Y,{key:1,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-up",onClick:o[2]||(o[2]=p=>z.value=!1)},{default:u(()=>[...o[10]||(o[10]=[m(" Show less ",-1)])]),_:1})):y("",!0)]),default:u(()=>[e("div",ss,[(n(!0),d(D,null,W(t(k),p=>(n(),_(_e,{key:p.id,to:`/test-runs/${p.id}`,class:F(["flex items-center gap-3 py-3 pl-3 border-l-2 hover:bg-gray-50 dark:hover:bg-gray-800/60 rounded-r transition-colors",pe(p.status)])},{default:u(()=>[l(ye,{status:p.status},null,8,["status"]),e("div",ns,[e("div",rs,c(p.projectLabel||p.projectName),1),e("div",as,"Run #"+c(p.id)+" · "+c(("formatRelativeTime"in i?i.formatRelativeTime:t(ne))(p.startTime)),1)]),e("div",os,[e("div",{class:F(me(p))},c(("passRate"in i?i.passRate:t(M))(p))+"%",3),p.duration?(n(),d("div",is,c(("formatDuration"in i?i.formatDuration:t(ue))(p.duration)),1)):y("",!0)])]),_:2},1032,["to","class"]))),128))])]),_:1})):y("",!0)])):y("",!0),t(C)&&!t(r)&&t(V).length===0?(n(),d("div",ls,[l(q,{name:"i-lucide-filter-x",class:"size-8 mx-auto mb-2 opacity-40"}),o[11]||(o[11]=e("p",null,"No runs match the current filters.",-1))])):y("",!0),t(C)?y("",!0):(n(),d(D,{key:4},[l(he),e("div",us,[(n(),d(D,null,W(ge,p=>l(ve,{key:p.title,class:"flex flex-col"},{default:u(()=>[e("div",ds,[e("div",cs,[l(q,{name:p.icon,class:"size-5 text-primary"},null,8,["name"])]),e("div",null,[e("p",ms,c(p.tagline),1),e("h3",ps,c(p.title),1),e("p",gs,c(p.description),1)])])]),_:2},1024)),64))])],64))]))]),_:1})}}});export{Ks as default};
46
+ )`),j=f(()=>{const a=[{title:"Start the dashboard",description:"You're already here — the dashboard is running.",done:!0},{title:"Install the reporter",description:"Add the Piwi reporter to your Playwright project.",code:"npm install --save-dev @piwitests/reporter",lang:"bash"}];return $.value&&a.push({title:"Create an API key",description:"Authentication is enabled on this instance, so the reporter needs a key to submit results. Create one, then set it as PIWI_API_KEY in your CI secrets (used by the snippet below).",action:"create-api-key"}),a.push({title:"Configure Playwright",description:"Add the reporter to your playwright.config.ts.",code:T.value,lang:"typescript"},{title:"Run your tests",description:"Results appear in the dashboard automatically. The project is created on first submit.",code:"npx playwright test",lang:"bash"}),a.map((s,x)=>({id:x+1,...s}))}),P=["zero","one","two","three","four","five","six"],b=f(()=>P[j.value.length]??String(j.value.length)),N=J(!1);return(a,s)=>{const x=X,g=We,V=$e,h=Z,S=He,z=Be,A=de;return n(),_(A,null,{header:u(()=>[e("div",ht,[e("div",vt,[l(x,{name:"i-lucide-rocket",class:"size-5 text-primary"})]),e("div",null,[e("h2",bt,[s[1]||(s[1]=m(" Get started in 60 seconds ",-1)),l(g,{topic:"home.get-started"})]),e("p",kt,"Send your first test run in "+c(t(b))+" steps",1)])])]),footer:u(()=>[e("div",It,[e("span",null,[s[18]||(s[18]=m("Need more options? See the ",-1)),l(z,{to:"reporter","no-icon":"",class:"text-primary hover:underline"},{default:u(()=>[...s[17]||(s[17]=[m("full reporter docs",-1)])]),_:1}),s[19]||(s[19]=m(".",-1))]),l(h,{to:t(Le)("demo/"),target:"_blank",variant:"ghost",size:"sm",color:"neutral","trailing-icon":"i-lucide-external-link"},{default:u(()=>[...s[20]||(s[20]=[m(" View demo with sample data ",-1)])]),_:1},8,["to"])])]),default:u(()=>[e("div",null,[(n(!0),d(D,null,W(t(j),(k,K)=>(n(),d("div",{key:k.id,class:"flex gap-4"},[e("div",Rt,[e("div",{class:F(["flex size-8 items-center justify-center rounded-full text-sm font-semibold",k.done?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-primary/10 text-primary"])},[k.done?(n(),_(x,{key:0,name:"i-lucide-check",class:"size-4"})):(n(),d("span",wt,c(k.id),1))],2),K<t(j).length-1?(n(),d("div",$t)):y("",!0)]),e("div",Ct,[e("div",Tt,[e("h3",Ft,c(k.title),1),k.done?(n(),_(V,{key:0,color:"success",variant:"subtle",size:"xs"},{default:u(()=>[...s[2]||(s[2]=[m("Done",-1)])]),_:1})):y("",!0)]),e("p",jt,c(k.description),1),k.action==="create-api-key"?(n(),_(h,{key:0,to:"/settings/users",icon:"i-lucide-key-round",size:"sm",variant:"soft"},{default:u(()=>[...s[3]||(s[3]=[m(" Create an API key ",-1)])]),_:1})):y("",!0),k.code?(n(),_(S,{key:1,code:k.code,lang:k.lang},null,8,["code","lang"])):y("",!0)])]))),128)),e("div",St,[e("button",{class:"flex items-center gap-2 text-sm font-medium text-gray-600 dark:text-gray-300 hover:text-primary dark:hover:text-primary transition-colors w-full text-left",onClick:s[0]||(s[0]=k=>N.value=!t(N))},[l(x,{name:"i-lucide-chevron-right",class:F(["size-4 transition-transform duration-200",t(N)?"rotate-90":""])},null,8,["class"]),s[4]||(s[4]=m(" Go further — simpler config & capture fixtures ",-1))]),t(N)?(n(),d("div",Pt,[e("div",null,[s[5]||(s[5]=e("h4",{class:"font-medium text-sm mb-1"},[m(" Simpler config with "),e("code",{class:"text-primary text-xs"},"wrapConfig")],-1)),s[6]||(s[6]=e("p",{class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},[m(" Instead of manually adding the reporter array entry, "),e("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded"},"wrapConfig"),m(" auto-injects the reporter and chains the global setup in one call. It also registers the run on the dashboard "),e("em",null,"before"),m(" your "),e("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded"},"globalSetup"),m(" runs, so the dashboard shows an initializing state during setup. ")],-1)),l(S,{code:t(E),lang:"typescript"},null,8,["code"])]),e("div",null,[s[14]||(s[14]=e("h4",{class:"font-medium text-sm mb-1"},[m(" Capture fixtures — network, Web Vitals, console & locator healing with "),e("code",{class:"text-primary text-xs"},"piwiFixtures")],-1)),e("p",zt,[s[8]||(s[8]=m(" Extend your Playwright ",-1)),s[9]||(s[9]=e("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded"},"test",-1)),s[10]||(s[10]=m(" with ",-1)),s[11]||(s[11]=e("code",{class:"text-xs bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded"},"piwiFixtures",-1)),s[12]||(s[12]=m(" to automatically capture network timing, browser Web Vitals, console errors, ARIA snapshots on failure, and the locator snapshots that power locator healing. See the ",-1)),l(z,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:u(()=>[...s[7]||(s[7]=[m("capture fixtures guide",-1)])]),_:1}),s[13]||(s[13]=m(". ",-1))]),s[15]||(s[15]=e("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500 mb-2"}," Option A — extend your existing fixtures ",-1)),l(S,{code:Ut,lang:"typescript",class:"mb-3"}),l(S,{code:Nt,lang:"typescript",class:"mb-4"}),s[16]||(s[16]=e("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500 mb-2"}," Option B — one-line extend ",-1)),l(S,{code:Vt,lang:"typescript"})])])):y("",!0)])])]),_:1})}}}),At=Object.assign(Et,{__name:"GetStartedWizard"}),Dt={key:0,class:"p-6"},Ot={key:1,class:"p-6 space-y-8","aria-busy":"true"},Bt={class:"grid grid-cols-1 xl:grid-cols-3 gap-6 items-start"},Lt={class:"xl:col-span-2 space-y-3"},Wt={class:"space-y-3"},Ht={key:2,class:"p-6 space-y-8"},Mt={key:1,class:"flex flex-wrap items-center gap-x-8 gap-y-3 text-sm border border-gray-200 dark:border-gray-700 rounded-xl px-6 py-4 bg-gray-50 dark:bg-gray-900/50"},Kt={class:"flex items-center gap-1.5"},Gt={class:"font-semibold tabular-nums"},Yt={class:"flex items-center gap-1.5"},qt={class:"flex items-center gap-1.5"},Jt={key:0,class:"flex items-center gap-1.5"},Qt={class:"font-semibold tabular-nums"},Xt={class:"flex items-center gap-1.5"},Zt={class:"font-semibold tabular-nums"},es={key:2,class:"grid grid-cols-1 xl:grid-cols-3 gap-6 items-start"},ts={class:"xl:col-span-2"},ss={class:"divide-y divide-gray-100 dark:divide-gray-800 text-sm"},ns={class:"flex-1 min-w-0"},rs={class:"font-medium truncate"},as={class:"text-xs text-gray-400"},os={class:"text-right tabular-nums shrink-0"},is={key:0,class:"text-xs text-gray-400"},ls={key:3,class:"text-center py-12 text-gray-500 dark:text-gray-400"},us={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"},ds={class:"flex flex-col gap-3 h-full"},cs={class:"p-2 bg-primary/10 rounded-lg w-fit"},ms={class:"text-xs font-semibold uppercase tracking-wide text-primary mb-1"},ps={class:"font-semibold mb-1"},gs={class:"text-sm text-gray-600 dark:text-gray-400"},ae=6,Ks=Q({__name:"index",setup(O){Te({title:"Piwi Dashboard"});const{data:w,error:$,refresh:v,status:U}=re("/api/projects/overview",{lazy:!0,default:()=>[]},"$cnA6-rHww6"),{data:T,error:E,refresh:j}=re("/api/test-runs/recent",{lazy:!0},"$LEgADC56ri");Me(()=>Promise.all([v(),j()]));const P=f(()=>U.value==="pending"&&!w.value?.length),b=f(()=>$.value||E.value);function N(){v(),j()}const a=Ke("piwi-home-filters",{default:()=>({environments:[],fullRunsOnly:!0}),encode:i=>JSON.stringify(i),decode:i=>{try{return i?JSON.parse(i):{environments:[],fullRunsOnly:!0}}catch{return{environments:[],fullRunsOnly:!0}}}}),s=f(()=>{const i=new Set;for(const o of T.value??[])o.environment&&i.add(o.environment);for(const o of w.value??[])for(const R of o.recentRuns)R.environment&&i.add(R.environment);return[...i].sort()});function x(i){return a.value.environments.length===0?!0:!!i&&a.value.environments.includes(i)}const g=f(()=>{let i=T.value??[];return a.value.fullRunsOnly&&(i=i.filter(o=>o.isFullRun)),a.value.environments.length>0&&(i=i.filter(o=>x(o.environment))),i}),V=f(()=>{let i=w.value??[];return a.value.environments.length>0&&(i=i.map(o=>({...o,recentRuns:o.recentRuns.filter(R=>x(R.environment))})).filter(o=>o.recentRuns.length>0)),i}),h=f(()=>{const i=V.value,o=i.length,R=i.filter(I=>I.tendency==="failing").length,H=i.filter(I=>I.tendency==="flaky").length;let B=0,G=0;for(const I of i)I.latestFullRun&&(B+=I.latestFullRun.passedTests,G+=I.latestFullRun.totalTests);const Y=G>0?Math.round(B/G*100):null,te=Date.now()-1440*60*1e3,L=g.value.filter(I=>new Date(I.startTime).getTime()>te).length;return{totalProjects:o,failingNow:R,flakyNow:H,avgPassRate:Y,runs24h:L}}),S=new Set(["running","initialising","finalizing"]),z=J(!1),A=f(()=>[...g.value].sort((o,R)=>{const H=S.has(o.status)?0:1,B=S.has(R.status)?0:1;return H!==B?H-B:new Date(R.startTime).getTime()-new Date(o.startTime).getTime()})),k=f(()=>z.value?A.value:A.value.slice(0,ae)),K=f(()=>A.value.length>ae),r=f(()=>g.value.length>0),C=f(()=>(w.value?.length??0)>0),ee=f(()=>a.value.fullRunsOnly?(T.value??[]).filter(R=>x(R.environment)).filter(R=>!R.isFullRun).length:0);function ce(){a.value={...a.value,fullRunsOnly:!1}}function me(i){const o=M(i);return o>=90?"text-green-600 dark:text-green-400":o>=50?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400"}function pe(i){return S.has(i)?"border-l-blue-400":i==="passed"?"border-l-green-500":i==="failed"||i==="timedout"||i==="interrupted"?"border-l-red-500":"border-l-gray-300 dark:border-l-gray-600"}const ge=[{icon:"i-lucide-radio",tagline:"Watch your CI run live",title:"Live streaming",description:"Follow test execution in real time. Investigate failures while the suite is still running — no waiting for the CI job to finish."},{icon:"i-lucide-layers",tagline:"10 failures, 2 root causes",title:"Failure clustering",description:"Tests sharing the same error are grouped automatically. Triage one cluster instead of scrolling through unrelated failures."},{icon:"i-lucide-brain-circuit",tagline:"Diagnosis grounded in your code",title:"AI diagnosis",description:"AI analyzes failure clusters using your actual SCM diff, trace files, and run history — not a generic prompt."},{icon:"i-lucide-archive",tagline:"Every run, forever",title:"Permanent test intelligence",description:"Test results, traces, and HTML reports stored permanently. Compare runs, track flakiness trends, and never lose a CI result again."}];return(i,o)=>{const R=ke,H=Re,B=et,G=ze,Y=Z,te=Ie,L=Ue,I=Ne,q=X,fe=xt,ye=ie,_e=oe,xe=le,he=At,ve=de,be=Pe;return n(),_(be,{id:"home"},{header:u(()=>[l(G,null,Fe({leading:u(()=>[l(R),l(H,{items:[{label:"Home",icon:"i-lucide-house",to:"/"}]})]),_:2},[t(C)?{name:"trailing",fn:u(()=>[l(B,{modelValue:t(a),"onUpdate:modelValue":o[0]||(o[0]=p=>se(a)?a.value=p:null),"available-environments":t(s)},null,8,["modelValue","available-environments"])]),key:"0"}:void 0]),1024)]),body:u(()=>[t(b)?(n(),d("div",Dt,[l(te,{text:`Couldn't load the dashboard: ${t(Oe)(t(b))}`},{action:u(()=>[l(Y,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:N},{default:u(()=>[...o[3]||(o[3]=[m(" Retry ",-1)])]),_:1})]),_:1},8,["text"])])):t(P)?(n(),d("div",Ot,[o[4]||(o[4]=e("span",{class:"sr-only",role:"status"},"Loading dashboard…",-1)),l(L,{class:"h-14 w-full rounded-xl"}),e("div",Bt,[e("div",Lt,[l(L,{class:"h-7 w-40"}),l(L,{class:"h-72 w-full rounded-lg"})]),e("div",Wt,[l(L,{class:"h-7 w-32"}),(n(),d(D,null,W(5,p=>l(L,{key:p,class:"h-12 w-full rounded-lg"})),64))])])])):(n(),d("div",Ht,[t(ee)>0?(n(),_(I,{key:0,icon:"i-lucide-info",color:"primary",variant:"subtle",title:t(ee)===1?"1 partial run is hidden":`${t(ee)} partial runs are hidden`,description:"The “Full runs only” filter hides runs that only cover part of the suite (e.g. a single spec or --grep).",actions:[{label:"Show them",color:"primary",variant:"solid",size:"xs",onClick:ce}]},null,8,["title","actions"])):y("",!0),t(C)?(n(),d("div",Mt,[e("div",Kt,[l(q,{name:"i-lucide-folder",class:"size-4 text-primary shrink-0"}),e("span",Gt,c(t(h).totalProjects),1),o[5]||(o[5]=e("span",{class:"text-gray-500"},"projects",-1))]),e("div",Yt,[e("div",{class:F(["w-2 h-2 rounded-full shrink-0",t(h).failingNow>0?"bg-red-500":"bg-green-500"])},null,2),e("span",{class:F(["font-semibold tabular-nums",t(h).failingNow>0?"text-red-600 dark:text-red-400":""])},c(t(h).failingNow),3),o[6]||(o[6]=e("span",{class:"text-gray-500"},"failing now",-1))]),e("div",qt,[e("div",{class:F(["w-2 h-2 rounded-full shrink-0",t(h).flakyNow>0?"bg-amber-400":"bg-gray-300 dark:bg-gray-600"])},null,2),e("span",{class:F(["font-semibold tabular-nums",t(h).flakyNow>0?"text-amber-600 dark:text-amber-400":""])},c(t(h).flakyNow),3),o[7]||(o[7]=e("span",{class:"text-gray-500"},"flaky",-1))]),t(h).avgPassRate!==null?(n(),d("div",Jt,[l(q,{name:"i-lucide-check-circle",class:"size-4 text-green-500 shrink-0"}),e("span",Qt,c(t(h).avgPassRate)+"%",1),o[8]||(o[8]=e("span",{class:"text-gray-500"},"avg pass rate",-1))])):y("",!0),e("div",Xt,[l(q,{name:"i-lucide-play-circle",class:"size-4 text-primary shrink-0"}),e("span",Zt,c(t(h).runs24h),1),o[9]||(o[9]=e("span",{class:"text-gray-500"},"runs today",-1))])])):y("",!0),t(C)||t(r)?(n(),d("div",es,[e("div",ts,[t(C)?(n(),_(fe,{key:0,projects:t(V)},null,8,["projects"])):y("",!0)]),t(r)?(n(),_(xe,{key:0,icon:"i-lucide-activity",title:"Recent activity"},{actions:u(()=>[t(K)&&!t(z)?(n(),_(Y,{key:0,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-down",onClick:o[1]||(o[1]=p=>z.value=!0)},{default:u(()=>[m(" Show all "+c(t(A).length),1)]),_:1})):t(z)?(n(),_(Y,{key:1,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-up",onClick:o[2]||(o[2]=p=>z.value=!1)},{default:u(()=>[...o[10]||(o[10]=[m(" Show less ",-1)])]),_:1})):y("",!0)]),default:u(()=>[e("div",ss,[(n(!0),d(D,null,W(t(k),p=>(n(),_(_e,{key:p.id,to:`/test-runs/${p.id}`,class:F(["flex items-center gap-3 py-3 pl-3 border-l-2 hover:bg-gray-50 dark:hover:bg-gray-800/60 rounded-r transition-colors",pe(p.status)])},{default:u(()=>[l(ye,{status:p.status},null,8,["status"]),e("div",ns,[e("div",rs,c(p.projectLabel||p.projectName),1),e("div",as,"Run #"+c(p.id)+" · "+c(("formatRelativeTime"in i?i.formatRelativeTime:t(ne))(p.startTime)),1)]),e("div",os,[e("div",{class:F(me(p))},c(("passRate"in i?i.passRate:t(M))(p))+"%",3),p.duration?(n(),d("div",is,c(("formatDuration"in i?i.formatDuration:t(ue))(p.duration)),1)):y("",!0)])]),_:2},1032,["to","class"]))),128))])]),_:1})):y("",!0)])):y("",!0),t(C)&&!t(r)&&t(V).length===0?(n(),d("div",ls,[l(q,{name:"i-lucide-filter-x",class:"size-8 mx-auto mb-2 opacity-40"}),o[11]||(o[11]=e("p",null,"No runs match the current filters.",-1))])):y("",!0),t(C)?y("",!0):(n(),d(D,{key:4},[l(he),e("div",us,[(n(),d(D,null,W(ge,p=>l(ve,{key:p.title,class:"flex flex-col"},{default:u(()=>[e("div",ds,[e("div",cs,[l(q,{name:p.icon,class:"size-5 text-primary"},null,8,["name"])]),e("div",null,[e("p",ms,c(p.tagline),1),e("h3",ps,c(p.title),1),e("p",gs,c(p.description),1)])])]),_:2},1024)),64))])],64))]))]),_:1})}}});export{Ks as default};
@@ -1 +1 @@
1
- import{a0 as m,a1 as y,a3 as g,o as i,f as h,g as b,k as t,c as l,p as o,T as d,m as u,t as c,q as n,V as k,h as x,a6 as q}from"./B8fs6GU9.js";const C={slots:{root:"rounded-lg overflow-hidden",header:"p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"p-4 sm:p-6",footer:"p-4 sm:px-6"},variants:{variant:{solid:{root:"bg-inverted text-inverted",title:"text-inverted",description:"text-dimmed"},outline:{root:"bg-default ring ring-default divide-y divide-default"},soft:{root:"bg-elevated/50 divide-y divide-default"},subtle:{root:"bg-elevated/50 ring ring-default divide-y divide-default"}}},defaultVariants:{variant:"outline"}},V={__name:"UCard",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},variant:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(p){const f=p,s=m(),e=y("card",f),v=g(),a=x(()=>q({extend:C,...v.ui?.card||{}})({variant:e.variant}));return(r,S)=>(i(),h(t(k),{as:t(e).as,"data-slot":"root",class:o(a.value.root({class:[t(e).ui?.root,t(e).class]}))},{default:b(()=>[s.header||t(e).title||s.title||t(e).description||s.description?(i(),l("div",{key:0,"data-slot":"header",class:o(a.value.header({class:t(e).ui?.header}))},[d(r.$slots,"header",{},()=>[t(e).title||s.title?(i(),l("div",{key:0,"data-slot":"title",class:o(a.value.title({class:t(e).ui?.title}))},[d(r.$slots,"title",{},()=>[u(c(t(e).title),1)])],2)):n("",!0),t(e).description||s.description?(i(),l("div",{key:1,"data-slot":"description",class:o(a.value.description({class:t(e).ui?.description}))},[d(r.$slots,"description",{},()=>[u(c(t(e).description),1)])],2)):n("",!0)])],2)):n("",!0),s.default?(i(),l("div",{key:1,"data-slot":"body",class:o(a.value.body({class:t(e).ui?.body}))},[d(r.$slots,"default")],2)):n("",!0),s.footer?(i(),l("div",{key:2,"data-slot":"footer",class:o(a.value.footer({class:t(e).ui?.footer}))},[d(r.$slots,"footer")],2)):n("",!0)]),_:3},8,["as","class"]))}};export{V as _};
1
+ import{a0 as m,a1 as y,a3 as g,o as i,f as h,g as b,k as t,c as l,p as o,T as d,m as u,t as c,q as n,V as k,h as x,a6 as q}from"./BPKwYP2Q.js";const C={slots:{root:"rounded-lg overflow-hidden",header:"p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"p-4 sm:p-6",footer:"p-4 sm:px-6"},variants:{variant:{solid:{root:"bg-inverted text-inverted",title:"text-inverted",description:"text-dimmed"},outline:{root:"bg-default ring ring-default divide-y divide-default"},soft:{root:"bg-elevated/50 divide-y divide-default"},subtle:{root:"bg-elevated/50 ring ring-default divide-y divide-default"}}},defaultVariants:{variant:"outline"}},V={__name:"UCard",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},variant:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(p){const f=p,s=m(),e=y("card",f),v=g(),a=x(()=>q({extend:C,...v.ui?.card||{}})({variant:e.variant}));return(r,S)=>(i(),h(t(k),{as:t(e).as,"data-slot":"root",class:o(a.value.root({class:[t(e).ui?.root,t(e).class]}))},{default:b(()=>[s.header||t(e).title||s.title||t(e).description||s.description?(i(),l("div",{key:0,"data-slot":"header",class:o(a.value.header({class:t(e).ui?.header}))},[d(r.$slots,"header",{},()=>[t(e).title||s.title?(i(),l("div",{key:0,"data-slot":"title",class:o(a.value.title({class:t(e).ui?.title}))},[d(r.$slots,"title",{},()=>[u(c(t(e).title),1)])],2)):n("",!0),t(e).description||s.description?(i(),l("div",{key:1,"data-slot":"description",class:o(a.value.description({class:t(e).ui?.description}))},[d(r.$slots,"description",{},()=>[u(c(t(e).description),1)])],2)):n("",!0)])],2)):n("",!0),s.default?(i(),l("div",{key:1,"data-slot":"body",class:o(a.value.body({class:t(e).ui?.body}))},[d(r.$slots,"default")],2)):n("",!0),s.footer?(i(),l("div",{key:2,"data-slot":"footer",class:o(a.value.footer({class:t(e).ui?.footer}))},[d(r.$slots,"footer")],2)):n("",!0)]),_:3},8,["as","class"]))}};export{V as _};
@@ -1 +1 @@
1
- import{d as a,o,c as n,i as l,T as s,O as i,p as m}from"./B8fs6GU9.js";const r=a({__name:"TableScroller",props:{minWidth:{},bleed:{type:Boolean,default:!0}},setup(e){return(t,c)=>(o(),n("div",{class:m(["overflow-x-auto",e.bleed?"-mx-4 px-4 sm:mx-0 sm:px-0":""])},[l("div",{style:i(e.minWidth?{minWidth:e.minWidth}:void 0)},[s(t.$slots,"default")],4)],2))}}),p=Object.assign(r,{__name:"TableScroller"});export{p as _};
1
+ import{d as a,o,c as n,i as l,T as s,O as i,p as m}from"./BPKwYP2Q.js";const r=a({__name:"TableScroller",props:{minWidth:{},bleed:{type:Boolean,default:!0}},setup(e){return(t,c)=>(o(),n("div",{class:m(["overflow-x-auto",e.bleed?"-mx-4 px-4 sm:mx-0 sm:px-0":""])},[l("div",{style:i(e.minWidth?{minWidth:e.minWidth}:void 0)},[s(t.$slots,"default")],4)],2))}}),p=Object.assign(r,{__name:"TableScroller"});export{p as _};
@@ -1 +1 @@
1
- import{Y as G,d as K,S as O,X as J,aq as T,o as i,c as B,f,g as v,T as C,k as e,U as _,Q as W,H as Z,ae as D,V as $,q as x,F as ee,h as m,a_ as E,aL as P,j as R,aA as ae,a0 as re,a1 as te,a3 as se,a4 as le,a5 as ie,aM as oe,aN as ne,i as de,p as c,v as j,m as N,t as M,a6 as ue}from"./B8fs6GU9.js";import{i as L}from"./CKZn0TUX.js";import{u as ce}from"./D1tZEdSi.js";import{u as pe}from"./YDWXnWou.js";import{V as fe}from"./DVdOm5Bg.js";import{R as ve}from"./B_80i5Ge.js";import{L as U}from"./BC_Wu-fv.js";const[be]=G("CheckboxGroupRoot");function A(o){return o==="indeterminate"}function H(o){return A(o)?"indeterminate":o?"checked":"unchecked"}const[me,he]=G("CheckboxRoot");var ge=K({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,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:["update:modelValue"],setup(o,{emit:h}){const r=o,l=h,{forwardRef:g,currentElement:a}=O(),s=be(null),d=J(r,"modelValue",l,{defaultValue:r.defaultValue??r.falseValue,passive:r.modelValue===void 0}),p=m(()=>s?.disabled.value||r.disabled),q=m(()=>P(d.value,r.trueValue)),u=m(()=>E(s?.modelValue.value)?d.value==="indeterminate"?"indeterminate":q.value:L(s.modelValue.value,r.value));function z(){if(E(s?.modelValue.value))d.value==="indeterminate"?d.value=r.trueValue:d.value=q.value?r.falseValue:r.trueValue;else{const t=[...s.modelValue.value||[]];if(L(t,r.value)){const y=t.findIndex(I=>P(I,r.value));t.splice(y,1)}else t.push(r.value);s.modelValue.value=t}}const F=ce(a),k=pe(),S=T(),V=m(()=>{if(!S["aria-label"])return r.id&&a.value?document.querySelector(`[for="${r.id}"]`)?.innerText:void 0});return he({disabled:p,state:u}),(t,y)=>(i(),B(ee,null,[(i(),f(D(e(s)?.rovingFocus.value?e(ve):e($)),_({...t.$attrs,...e(k)},{id:t.id,ref:e(g),role:"checkbox","as-child":t.asChild,as:t.as,type:t.as==="button"?"button":void 0,"aria-checked":e(A)(u.value)?"mixed":u.value,"aria-required":t.required,"aria-label":t.$attrs["aria-label"]||V.value,"data-state":e(H)(u.value),"data-disabled":p.value?"":void 0,disabled:p.value,focusable:e(s)?.rovingFocus.value?!p.value:void 0,onKeydown:W(Z(()=>{},["prevent"]),["enter"]),onClick:z}),{default:v(()=>[C(t.$slots,"default",{modelValue:e(d),state:u.value})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])),e(F)&&t.name&&!e(s)?(i(),f(e(fe),_({key:0,type:"checkbox",checked:!!u.value,name:t.name,value:t.value,disabled:p.value,required:t.required},e(k)),null,16,["checked","name","value","disabled","required"])):x("v-if",!0)],64))}}),ye=ge,qe=K({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(o){const{forwardRef:h}=O(),r=me();return(l,g)=>(i(),f(e(ae),{present:l.forceMount||e(A)(e(r).state.value)||e(r).state.value===!0},{default:v(()=>[R(e($),_({ref:e(h),"data-state":e(H)(e(r).state.value),"data-disabled":e(r).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":l.asChild,as:l.as},l.$attrs),{default:v(()=>[C(l.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),ke=qe;const Ve={slots:{root:"relative flex items-start",container:"flex items-center",base:"rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-3",indicator:"flex items-center justify-center size-full text-inverted",icon:"shrink-0 size-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:{root:""},card:{root:"border border-muted rounded-lg"}},indicator:{start:{root:"flex-row",wrapper:"ms-2"},end:{root:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{base:"size-3",container:"h-4",wrapper:"text-xs"},sm:{base:"size-3.5",container:"h-4",wrapper:"text-xs"},md:{base:"size-4",container:"h-5",wrapper:"text-sm"},lg:{base:"size-4.5",container:"h-5",wrapper:"text-sm"},xl:{base:"size-5",container:"h-6",wrapper:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{root:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},highlight:{true:""},checked:{true:""}},compoundVariants:[{size:"xs",variant:"card",class:{root:"p-2.5"}},{size:"sm",variant:"card",class:{root:"p-3"}},{size:"md",variant:"card",class:{root:"p-3.5"}},{size:"lg",variant:"card",class:{root:"p-4"}},{size:"xl",variant:"card",class:{root:"p-4.5"}},{color:"primary",variant:"card",class:{root:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{root:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{root:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{root:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{root:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{root:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{root:"has-data-[state=checked]:border-inverted"}},{variant:"card",disabled:!0,class:{root:"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"}},Ie=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:{as:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},indicator:{type:null,required:!1},highlight:{type:Boolean,required:!1},icon:{type:null,required:!1},indeterminateIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},name:{type:String,required:!1},value:{type:null,required:!1},id:{type:String,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},trueValue:{type:null,required:!1},falseValue:{type:null,required:!1}},emits:["change","update:modelValue"],setup(o,{emit:h}){const r=o,l=re(),g=h,a=te("checkbox",r),s=se(),d=le(ie(a,"required","value","defaultValue","modelValue","trueValue","falseValue"),g),{id:p,emitFormChange:q,emitFormInput:u,size:z,color:F,highlight:k,name:S,disabled:V,ariaAttrs:t}=oe(r),y=p.value??ne(),I=T(),Q=m(()=>{const{"data-state":b,...w}=I;return w}),n=m(()=>ue({extend:Ve,...s.ui?.checkbox||{}})({size:z.value??a.size,color:F.value??a.color,variant:a.variant,indicator:a.indicator,highlight:k.value??a.highlight,required:a.required,disabled:V.value}));function X(b){const w=new Event("change",{target:{value:b}});g("change",w),q(),u()}return(b,w)=>(i(),f(e($),{as:!e(a).variant||e(a).variant==="list"?e(a).as:e(U),"data-slot":b.$attrs["data-slot"]??"root",class:c(n.value.root({class:[e(a).ui?.root,e(a).class]}))},{default:v(()=>[de("div",{"data-slot":"container",class:c(n.value.container({class:e(a).ui?.container}))},[R(e(ye),_({id:e(y)},{...e(d),...Q.value,...e(t)},{name:e(S),disabled:e(V),"data-slot":"base",class:n.value.base({class:e(a).ui?.base}),"onUpdate:modelValue":X}),{default:v(({state:Y})=>[R(e(ke),{"data-slot":"indicator",class:c(n.value.indicator({class:e(a).ui?.indicator}))},{default:v(()=>[Y==="indeterminate"?(i(),f(j,{key:0,name:e(a).indeterminateIcon||e(s).ui.icons.minus,"data-slot":"icon",class:c(n.value.icon({class:e(a).ui?.icon}))},null,8,["name","class"])):(i(),f(j,{key:1,name:e(a).icon||e(s).ui.icons.check,"data-slot":"icon",class:c(n.value.icon({class:e(a).ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","name","disabled","class"])],2),e(a).label||l.label||e(a).description||l.description?(i(),B("div",{key:0,"data-slot":"wrapper",class:c(n.value.wrapper({class:e(a).ui?.wrapper}))},[e(a).label||l.label?(i(),f(D(!e(a).variant||e(a).variant==="list"?e(U):"p"),{key:0,for:e(y),"data-slot":"label",class:c(n.value.label({class:e(a).ui?.label}))},{default:v(()=>[C(b.$slots,"label",{label:e(a).label},()=>[N(M(e(a).label),1)])]),_:3},8,["for","class"])):x("",!0),e(a).description||l.description?(i(),B("p",{key:1,"data-slot":"description",class:c(n.value.description({class:e(a).ui?.description}))},[C(b.$slots,"description",{description:e(a).description},()=>[N(M(e(a).description),1)])],2)):x("",!0)],2)):x("",!0)]),_:3},8,["as","data-slot","class"]))}});export{Ie as _};
1
+ import{Y as G,d as K,S as O,X as J,aq as T,o as i,c as B,f,g as v,T as C,k as e,U as _,Q as W,H as Z,ae as D,V as $,q as x,F as ee,h as m,a_ as E,aL as P,j as R,aA as ae,a0 as re,a1 as te,a3 as se,a4 as le,a5 as ie,aM as oe,aN as ne,i as de,p as c,v as j,m as N,t as M,a6 as ue}from"./BPKwYP2Q.js";import{i as L}from"./DAWn6Z7h.js";import{u as ce}from"./jIF87ALb.js";import{u as pe}from"./C219JuBV.js";import{V as fe}from"./mGJLLqyN.js";import{R as ve}from"./C38aZbFJ.js";import{L as U}from"./DRtTLQri.js";const[be]=G("CheckboxGroupRoot");function A(o){return o==="indeterminate"}function H(o){return A(o)?"indeterminate":o?"checked":"unchecked"}const[me,he]=G("CheckboxRoot");var ge=K({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,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:["update:modelValue"],setup(o,{emit:h}){const r=o,l=h,{forwardRef:g,currentElement:a}=O(),s=be(null),d=J(r,"modelValue",l,{defaultValue:r.defaultValue??r.falseValue,passive:r.modelValue===void 0}),p=m(()=>s?.disabled.value||r.disabled),q=m(()=>P(d.value,r.trueValue)),u=m(()=>E(s?.modelValue.value)?d.value==="indeterminate"?"indeterminate":q.value:L(s.modelValue.value,r.value));function z(){if(E(s?.modelValue.value))d.value==="indeterminate"?d.value=r.trueValue:d.value=q.value?r.falseValue:r.trueValue;else{const t=[...s.modelValue.value||[]];if(L(t,r.value)){const y=t.findIndex(I=>P(I,r.value));t.splice(y,1)}else t.push(r.value);s.modelValue.value=t}}const F=ce(a),k=pe(),S=T(),V=m(()=>{if(!S["aria-label"])return r.id&&a.value?document.querySelector(`[for="${r.id}"]`)?.innerText:void 0});return he({disabled:p,state:u}),(t,y)=>(i(),B(ee,null,[(i(),f(D(e(s)?.rovingFocus.value?e(ve):e($)),_({...t.$attrs,...e(k)},{id:t.id,ref:e(g),role:"checkbox","as-child":t.asChild,as:t.as,type:t.as==="button"?"button":void 0,"aria-checked":e(A)(u.value)?"mixed":u.value,"aria-required":t.required,"aria-label":t.$attrs["aria-label"]||V.value,"data-state":e(H)(u.value),"data-disabled":p.value?"":void 0,disabled:p.value,focusable:e(s)?.rovingFocus.value?!p.value:void 0,onKeydown:W(Z(()=>{},["prevent"]),["enter"]),onClick:z}),{default:v(()=>[C(t.$slots,"default",{modelValue:e(d),state:u.value})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])),e(F)&&t.name&&!e(s)?(i(),f(e(fe),_({key:0,type:"checkbox",checked:!!u.value,name:t.name,value:t.value,disabled:p.value,required:t.required},e(k)),null,16,["checked","name","value","disabled","required"])):x("v-if",!0)],64))}}),ye=ge,qe=K({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(o){const{forwardRef:h}=O(),r=me();return(l,g)=>(i(),f(e(ae),{present:l.forceMount||e(A)(e(r).state.value)||e(r).state.value===!0},{default:v(()=>[R(e($),_({ref:e(h),"data-state":e(H)(e(r).state.value),"data-disabled":e(r).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":l.asChild,as:l.as},l.$attrs),{default:v(()=>[C(l.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),ke=qe;const Ve={slots:{root:"relative flex items-start",container:"flex items-center",base:"rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-3",indicator:"flex items-center justify-center size-full text-inverted",icon:"shrink-0 size-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:{root:""},card:{root:"border border-muted rounded-lg"}},indicator:{start:{root:"flex-row",wrapper:"ms-2"},end:{root:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{base:"size-3",container:"h-4",wrapper:"text-xs"},sm:{base:"size-3.5",container:"h-4",wrapper:"text-xs"},md:{base:"size-4",container:"h-5",wrapper:"text-sm"},lg:{base:"size-4.5",container:"h-5",wrapper:"text-sm"},xl:{base:"size-5",container:"h-6",wrapper:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{root:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},highlight:{true:""},checked:{true:""}},compoundVariants:[{size:"xs",variant:"card",class:{root:"p-2.5"}},{size:"sm",variant:"card",class:{root:"p-3"}},{size:"md",variant:"card",class:{root:"p-3.5"}},{size:"lg",variant:"card",class:{root:"p-4"}},{size:"xl",variant:"card",class:{root:"p-4.5"}},{color:"primary",variant:"card",class:{root:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{root:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{root:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{root:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{root:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{root:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{root:"has-data-[state=checked]:border-inverted"}},{variant:"card",disabled:!0,class:{root:"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"}},Ie=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:{as:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},indicator:{type:null,required:!1},highlight:{type:Boolean,required:!1},icon:{type:null,required:!1},indeterminateIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},name:{type:String,required:!1},value:{type:null,required:!1},id:{type:String,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},trueValue:{type:null,required:!1},falseValue:{type:null,required:!1}},emits:["change","update:modelValue"],setup(o,{emit:h}){const r=o,l=re(),g=h,a=te("checkbox",r),s=se(),d=le(ie(a,"required","value","defaultValue","modelValue","trueValue","falseValue"),g),{id:p,emitFormChange:q,emitFormInput:u,size:z,color:F,highlight:k,name:S,disabled:V,ariaAttrs:t}=oe(r),y=p.value??ne(),I=T(),Q=m(()=>{const{"data-state":b,...w}=I;return w}),n=m(()=>ue({extend:Ve,...s.ui?.checkbox||{}})({size:z.value??a.size,color:F.value??a.color,variant:a.variant,indicator:a.indicator,highlight:k.value??a.highlight,required:a.required,disabled:V.value}));function X(b){const w=new Event("change",{target:{value:b}});g("change",w),q(),u()}return(b,w)=>(i(),f(e($),{as:!e(a).variant||e(a).variant==="list"?e(a).as:e(U),"data-slot":b.$attrs["data-slot"]??"root",class:c(n.value.root({class:[e(a).ui?.root,e(a).class]}))},{default:v(()=>[de("div",{"data-slot":"container",class:c(n.value.container({class:e(a).ui?.container}))},[R(e(ye),_({id:e(y)},{...e(d),...Q.value,...e(t)},{name:e(S),disabled:e(V),"data-slot":"base",class:n.value.base({class:e(a).ui?.base}),"onUpdate:modelValue":X}),{default:v(({state:Y})=>[R(e(ke),{"data-slot":"indicator",class:c(n.value.indicator({class:e(a).ui?.indicator}))},{default:v(()=>[Y==="indeterminate"?(i(),f(j,{key:0,name:e(a).indeterminateIcon||e(s).ui.icons.minus,"data-slot":"icon",class:c(n.value.icon({class:e(a).ui?.icon}))},null,8,["name","class"])):(i(),f(j,{key:1,name:e(a).icon||e(s).ui.icons.check,"data-slot":"icon",class:c(n.value.icon({class:e(a).ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","name","disabled","class"])],2),e(a).label||l.label||e(a).description||l.description?(i(),B("div",{key:0,"data-slot":"wrapper",class:c(n.value.wrapper({class:e(a).ui?.wrapper}))},[e(a).label||l.label?(i(),f(D(!e(a).variant||e(a).variant==="list"?e(U):"p"),{key:0,for:e(y),"data-slot":"label",class:c(n.value.label({class:e(a).ui?.label}))},{default:v(()=>[C(b.$slots,"label",{label:e(a).label},()=>[N(M(e(a).label),1)])]),_:3},8,["for","class"])):x("",!0),e(a).description||l.description?(i(),B("p",{key:1,"data-slot":"description",class:c(n.value.description({class:e(a).ui?.description}))},[C(b.$slots,"description",{description:e(a).description},()=>[N(M(e(a).description),1)])],2)):x("",!0)],2)):x("",!0)]),_:3},8,["as","data-slot","class"]))}});export{Ie as _};
@@ -1 +1 @@
1
- import{cd as z,I as m,ce as E,cf as L,h as d,a9 as o,cg as i,ch as q}from"./B8fs6GU9.js";function A(t){const s=[o(t.method)?.toUpperCase()||"GET",o(t.baseURL)];for(const e of[t.query||t.params]){const a=o(e);if(!a)continue;const n={};for(const[f,c]of Object.entries(a))n[o(f)]=o(c);s.push(n)}if(t.body){const e=o(t.body);if(!e)s.push(i(e));else if(e instanceof ArrayBuffer)s.push(i(Object.fromEntries([...new Uint8Array(e).entries()].map(([a,n])=>[a,n.toString()]))));else if(e instanceof FormData){const a=[];for(const n of e.entries()){const[f,c]=n;a.push([f,c instanceof File?`${c.name}:${c.size}:${c.lastModified}`:c])}s.push(i(a))}else if(q(e))s.push(i(m(e)));else try{s.push(i(e))}catch{console.warn("[useFetch] Failed to hash body",e)}}return s}const _=z({name:"createUseFetch",factory(t={}){function s(e,a,n){const[f={},c]=typeof a=="string"?[{},a]:[a,n],y=typeof t=="function"?t(f):t,{server:F,lazy:b,default:v,transform:g,pick:w,watch:h,immediate:O,getCachedData:$,deep:D,dedupe:U,timeout:k,...r}={...typeof t=="function"?{}:y,...f,...typeof t=="function"?y:{}},u=d(()=>o(e)),j=d(()=>o(r.key)||"$f"+i([c,typeof u.value=="string"?u.value:"",...A(r)]));if(!r.baseURL&&typeof u.value=="string"&&u.value[0]==="/"&&u.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const l=m({...E,...r,cache:typeof r.cache=="boolean"?void 0:r.cache}),p={server:F,lazy:b,default:v,transform:g,pick:w,immediate:O,getCachedData:$,deep:D,dedupe:U,timeout:k,watch:h===!1?[]:[...h||[],l]};return h===!1&&(p._keyTriggersExecute=!1),L(j,(S,{signal:x})=>(r.$fetch||globalThis.$fetch)(u.value,{signal:x,...l}),p)}return s}}),K=_.__nuxt_factory();_.__nuxt_factory({lazy:!0,_functionName:"useLazyFetch"});export{K as u};
1
+ import{cc as z,I as m,cd as E,ce as L,h as d,a9 as o,cf as i,cg as q}from"./BPKwYP2Q.js";function A(t){const s=[o(t.method)?.toUpperCase()||"GET",o(t.baseURL)];for(const e of[t.query||t.params]){const a=o(e);if(!a)continue;const n={};for(const[f,c]of Object.entries(a))n[o(f)]=o(c);s.push(n)}if(t.body){const e=o(t.body);if(!e)s.push(i(e));else if(e instanceof ArrayBuffer)s.push(i(Object.fromEntries([...new Uint8Array(e).entries()].map(([a,n])=>[a,n.toString()]))));else if(e instanceof FormData){const a=[];for(const n of e.entries()){const[f,c]=n;a.push([f,c instanceof File?`${c.name}:${c.size}:${c.lastModified}`:c])}s.push(i(a))}else if(q(e))s.push(i(m(e)));else try{s.push(i(e))}catch{console.warn("[useFetch] Failed to hash body",e)}}return s}const _=z({name:"createUseFetch",factory(t={}){function s(e,a,n){const[f={},c]=typeof a=="string"?[{},a]:[a,n],y=typeof t=="function"?t(f):t,{server:F,lazy:b,default:v,transform:g,pick:w,watch:h,immediate:O,getCachedData:$,deep:D,dedupe:U,timeout:k,...r}={...typeof t=="function"?{}:y,...f,...typeof t=="function"?y:{}},u=d(()=>o(e)),j=d(()=>o(r.key)||"$f"+i([c,typeof u.value=="string"?u.value:"",...A(r)]));if(!r.baseURL&&typeof u.value=="string"&&u.value[0]==="/"&&u.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const l=m({...E,...r,cache:typeof r.cache=="boolean"?void 0:r.cache}),p={server:F,lazy:b,default:v,transform:g,pick:w,immediate:O,getCachedData:$,deep:D,dedupe:U,timeout:k,watch:h===!1?[]:[...h||[],l]};return h===!1&&(p._keyTriggersExecute=!1),L(j,(S,{signal:x})=>(r.$fetch||globalThis.$fetch)(u.value,{signal:x,...l}),p)}return s}}),K=_.__nuxt_factory();_.__nuxt_factory({lazy:!0,_functionName:"useLazyFetch"});export{K as u};