@piwitests/server 0.19.0 → 0.20.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 (418) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{eptP4pGv.js → -f7BAm1H.js} +1 -1
  3. package/.output/public/_nuxt/{Bti38m-M.js → 4gYNA-d4.js} +1 -1
  4. package/.output/public/_nuxt/{CHEFCN8Q.js → 5A6ITZXj.js} +1 -1
  5. package/.output/public/_nuxt/{DoUy4UHi.js → 8PUUncmO.js} +2 -2
  6. package/.output/public/_nuxt/{DS636elg.js → A1pj0VnG.js} +1 -1
  7. package/.output/public/_nuxt/{B9WhzpKO.js → AbmKWFQQ.js} +1 -1
  8. package/.output/public/_nuxt/{rWNTSFD6.js → B3obW6cw.js} +3 -3
  9. package/.output/public/_nuxt/{Bu2aaVIY.js → B7FTvFWq.js} +1 -1
  10. package/.output/public/_nuxt/{CpjgB2aY.js → B8zkOmwo.js} +1 -1
  11. package/.output/public/_nuxt/B96M2gdj.js +1 -0
  12. package/.output/public/_nuxt/{FUXhyidq.js → B99fbi73.js} +1 -1
  13. package/.output/public/_nuxt/{DslPMqfa.js → B9OLmp0f.js} +1 -1
  14. package/.output/public/_nuxt/{BccXfBfI.js → BKkF4pPD.js} +1 -1
  15. package/.output/public/_nuxt/{DP8hfJ9h.js → BT3wGCTI.js} +1 -1
  16. package/.output/public/_nuxt/{B3B9Ii2A.js → BUa0V0Ly.js} +1 -1
  17. package/.output/public/_nuxt/{B3HO8kuh.js → BUkim3TM.js} +1 -1
  18. package/.output/public/_nuxt/{BVaxh6Nl.js → BVc14Ncz.js} +3 -3
  19. package/.output/public/_nuxt/{DW0xl3I6.js → BY0HxR3t.js} +1 -1
  20. package/.output/public/_nuxt/B_xAMWQS.js +2 -0
  21. package/.output/public/_nuxt/{C2_3mdPC.js → BdQoBaOv.js} +1 -1
  22. package/.output/public/_nuxt/{DT53RWbC.js → BdfhYr-u.js} +1 -1
  23. package/.output/public/_nuxt/{CtQBsNUb.js → BgRu_3tT.js} +1 -1
  24. package/.output/public/_nuxt/{SlIRLREZ.js → BiO7RBWb.js} +1 -1
  25. package/.output/public/_nuxt/BicAJ6U8.js +1 -0
  26. package/.output/public/_nuxt/{C7P1UCO2.js → Bm62iDV5.js} +1 -1
  27. package/.output/public/_nuxt/{CZfMdzfk.js → BmUfSNMV.js} +1 -1
  28. package/.output/public/_nuxt/{tvgqrYDd.js → Bnxf8nbZ.js} +1 -1
  29. package/.output/public/_nuxt/{ndShiWE8.js → Bow4tTR0.js} +1 -1
  30. package/.output/public/_nuxt/{D0HNloZ9.js → BrQEE053.js} +1 -1
  31. package/.output/public/_nuxt/{CV9-fTmY.js → BzRRzmwm.js} +1 -1
  32. package/.output/public/_nuxt/{DprVVyUQ.js → C0_yH0N7.js} +1 -1
  33. package/.output/public/_nuxt/{DLSrtpsA.js → C1gTN4Q8.js} +1 -1
  34. package/.output/public/_nuxt/{ClOqkAcc.js → C2hkrSey.js} +1 -1
  35. package/.output/public/_nuxt/{ZFiQCMUB.js → C8e1EbJI.js} +1 -1
  36. package/.output/public/_nuxt/{nv9-6vBK.js → CA9B2HE5.js} +1 -1
  37. package/.output/public/_nuxt/{KnfsST6Y.js → CAAwCT7H.js} +1 -1
  38. package/.output/public/_nuxt/{ybDYeNxd.js → CAvY22RE.js} +1 -1
  39. package/.output/public/_nuxt/{C5iG7O4O.js → CEfS4-oS.js} +1 -1
  40. package/.output/public/_nuxt/{Bp5ELvx9.js → CIoSMkpp.js} +1 -1
  41. package/.output/public/_nuxt/{C95YAaJq.js → CIrFl3MW.js} +1 -1
  42. package/.output/public/_nuxt/{DiOLdHBC.js → CJFtzlQ4.js} +1 -1
  43. package/.output/public/_nuxt/{BX9ZXe98.js → CNyV9YpI.js} +1 -1
  44. package/.output/public/_nuxt/CSJ-eOQM.js +1 -0
  45. package/.output/public/_nuxt/{fVcG504p.js → CTU1mrhq.js} +1 -1
  46. package/.output/public/_nuxt/{279D2RYp.js → CXEH9OPk.js} +1 -1
  47. package/.output/public/_nuxt/CahpB9Z2.js +5 -0
  48. package/.output/public/_nuxt/{B7NBP1C-.js → Cbh--1MW.js} +1 -1
  49. package/.output/public/_nuxt/CeG9pBAD.js +1 -0
  50. package/.output/public/_nuxt/{D55D4EYo.js → CeW8v31b.js} +1 -1
  51. package/.output/public/_nuxt/{BuMC3WjZ.js → CjPfj7ya.js} +1 -1
  52. package/.output/public/_nuxt/{HXerICAi.js → Cnsmicv2.js} +1 -1
  53. package/.output/public/_nuxt/{DgE2YE3R.js → CsLojMwR.js} +1 -1
  54. package/.output/public/_nuxt/{C9_jrmk9.js → Cus22Ud3.js} +2 -2
  55. package/.output/public/_nuxt/{DX-MDGb3.js → CwGWJbiy.js} +1 -1
  56. package/.output/public/_nuxt/{BJ0XQElc.js → Cx6gc2VW.js} +1 -1
  57. package/.output/public/_nuxt/{cHAnlQbv.js → CxyAzHr3.js} +1 -1
  58. package/.output/public/_nuxt/{BxCKKeYs.js → CzAPFPpL.js} +1 -1
  59. package/.output/public/_nuxt/{B33iXw77.js → D--H4jLI.js} +1 -1
  60. package/.output/public/_nuxt/D1POo6S4.js +10 -0
  61. package/.output/public/_nuxt/{BDicZ1gQ.js → D5tke0B5.js} +1 -1
  62. package/.output/public/_nuxt/D8nkF-OO.js +3 -0
  63. package/.output/public/_nuxt/{CzGyac8q.js → DA25RkyK.js} +1 -1
  64. package/.output/public/_nuxt/{CUtJobDm.js → DIB-5fUJ.js} +1 -1
  65. package/.output/public/_nuxt/{BPRffDuo.js → DJmoLeVt.js} +1 -1
  66. package/.output/public/_nuxt/{DGfAxLHV.js → DJxlKFGb.js} +1 -1
  67. package/.output/public/_nuxt/{81InBX9v.js → DMec-OLo.js} +1 -1
  68. package/.output/public/_nuxt/{CK_2LZBS.js → DPCxhHri.js} +1 -1
  69. package/.output/public/_nuxt/{Bn0YQDyy.js → DSqHUrvO.js} +1 -1
  70. package/.output/public/_nuxt/{BqV0l12c.js → DabzhQB1.js} +1 -1
  71. package/.output/public/_nuxt/{BfTuX0wq.js → DdwHkKfV.js} +1 -1
  72. package/.output/public/_nuxt/{C-elpgyr.js → DeY2JkR2.js} +1 -1
  73. package/.output/public/_nuxt/{DEFEpYzn.js → DfgOx_ou.js} +1 -1
  74. package/.output/public/_nuxt/DmkUdSS4.js +1 -0
  75. package/.output/public/_nuxt/{Ar3IelOY.js → DoIREDVb.js} +1 -1
  76. package/.output/public/_nuxt/DpZ1r1HA.js +1 -0
  77. package/.output/public/_nuxt/{Jo8kRmHz.js → Dpd16JVI.js} +1 -1
  78. package/.output/public/_nuxt/{BSIxhGsh.js → DqcKngf3.js} +1 -1
  79. package/.output/public/_nuxt/{BMvCSA6h.js → DrfE8IY0.js} +1 -1
  80. package/.output/public/_nuxt/{eaVkJRSa.js → DsesNydr.js} +1 -1
  81. package/.output/public/_nuxt/{zQyPuvV1.js → DtHJgCS8.js} +1 -1
  82. package/.output/public/_nuxt/Dtd4rC58.js +9 -0
  83. package/.output/public/_nuxt/{NQikbhmK.js → Du2W7Jne.js} +37 -36
  84. package/.output/public/_nuxt/{CDk0q2hV.js → DuwtTfO8.js} +1 -1
  85. package/.output/public/_nuxt/{B44A4LSJ.js → Dy-TJ0Mt.js} +1 -1
  86. package/.output/public/_nuxt/{-09h6CA9.js → Dy86h-7P.js} +1 -1
  87. package/.output/public/_nuxt/{Cdff9XNh.js → Dyeqn3aG.js} +1 -1
  88. package/.output/public/_nuxt/{Dnpkl-1q.js → FaFoMVKo.js} +1 -1
  89. package/.output/public/_nuxt/GPNI1ffD.js +4 -0
  90. package/.output/public/_nuxt/{BCMuIgP5.js → H94BMf3L.js} +1 -1
  91. package/.output/public/_nuxt/HPNQD6v3.js +1 -0
  92. package/.output/public/_nuxt/HXadJrHu.js +2 -0
  93. package/.output/public/_nuxt/{YVN7WG7q.js → KyA_4Ks-.js} +1 -1
  94. package/.output/public/_nuxt/{CYsTqbBS.js → L3kAWB2a.js} +1 -1
  95. package/.output/public/_nuxt/{Dk9fwOCm.js → McL25vkx.js} +2 -2
  96. package/.output/public/_nuxt/Nn93e_Mz.js +1 -0
  97. package/.output/public/_nuxt/UdR3DBPS.js +1 -0
  98. package/.output/public/_nuxt/{SfMRXW25.js → Und3xXFc.js} +1 -1
  99. package/.output/public/_nuxt/_mj6CfPa.js +1 -0
  100. package/.output/public/_nuxt/{BPQoBGg5.js → b-GYfcrQ.js} +1 -1
  101. package/.output/public/_nuxt/{DHDtnj7p.js → bLcjFslv.js} +1 -1
  102. package/.output/public/_nuxt/builds/latest.json +1 -1
  103. package/.output/public/_nuxt/builds/meta/e659b3e1-0e61-4971-940e-10063f9f4763.json +1 -0
  104. package/.output/public/_nuxt/entry.DmptwB51.css +1 -0
  105. package/.output/public/_nuxt/{y17lMTFy.js → hC_z4G8p.js} +1 -1
  106. package/.output/public/_nuxt/{CTxDO9fB.js → hNh4CIL0.js} +1 -1
  107. package/.output/public/_nuxt/{CGNkHojN.js → l5WKbU4h.js} +1 -1
  108. package/.output/public/_nuxt/{DcmZRa_F.js → oAClCn_h.js} +1 -1
  109. package/.output/public/_nuxt/{IvQlbZk6.js → pQqGiNch.js} +1 -1
  110. package/.output/public/_nuxt/ryMzSDUj.js +2 -0
  111. package/.output/server/chunks/_/collect.mjs +1 -1
  112. package/.output/server/chunks/_/markers.mjs +1 -1
  113. package/.output/server/chunks/_/quarantine.mjs +1 -1
  114. package/.output/server/chunks/_/users.mjs +1 -1
  115. package/.output/server/chunks/build/{BrowserBadge-D33lqUcj.mjs → BrowserBadge-MFvBwxmD.mjs} +66 -6
  116. package/.output/server/chunks/build/BrowserBadge-MFvBwxmD.mjs.map +1 -0
  117. package/.output/server/chunks/build/{Checkbox-DvUBGagc.mjs → Checkbox-4Q5d0fa0.mjs} +4 -4
  118. package/.output/server/chunks/build/Checkbox-4Q5d0fa0.mjs.map +1 -0
  119. package/.output/server/chunks/build/CiEnvCard-DB5DvBh1.mjs +1492 -0
  120. package/.output/server/chunks/build/CiEnvCard-DB5DvBh1.mjs.map +1 -0
  121. package/.output/server/chunks/build/CodeBlock-BgE-NSmE.mjs +1 -1
  122. package/.output/server/chunks/build/DashboardSidebarToggle-DCTnHiIv.mjs +1 -1
  123. package/.output/server/chunks/build/{DiagnosisPanel-B646dK4p.mjs → DiagnosisPanel-CALyEmcJ.mjs} +3 -3
  124. package/.output/server/chunks/build/DiagnosisPanel-CALyEmcJ.mjs.map +1 -0
  125. package/.output/server/chunks/build/{EmptyState-Dtlab7S9.mjs → EmptyState-DC2q_7TD.mjs} +3 -3
  126. package/.output/server/chunks/build/EmptyState-DC2q_7TD.mjs.map +1 -0
  127. package/.output/server/chunks/build/{EntityLinks-D3fp57pR.mjs → EntityLinks-BBHWssHH.mjs} +4 -4
  128. package/.output/server/chunks/build/EntityLinks-BBHWssHH.mjs.map +1 -0
  129. package/.output/server/chunks/build/{EnvManagedBadge-Bg3FSiU1.mjs → EnvManagedBadge-UwD2b9v2.mjs} +2 -2
  130. package/.output/server/chunks/build/EnvManagedBadge-UwD2b9v2.mjs.map +1 -0
  131. package/.output/server/chunks/build/{Modal-Ck2XLt8d.mjs → Modal-pSDlXzT3.mjs} +2 -2
  132. package/.output/server/chunks/build/Modal-pSDlXzT3.mjs.map +1 -0
  133. package/.output/server/chunks/build/{OpenInIdeLink-C4MXA8ya.mjs → OpenInIdeLink-CQWKKChd.mjs} +3 -3
  134. package/.output/server/chunks/build/{OpenInIdeLink-C4MXA8ya.mjs.map → OpenInIdeLink-CQWKKChd.mjs.map} +1 -1
  135. package/.output/server/chunks/build/{ProjectTestCasesTable-CxfQ5wtN.mjs → ProjectTestCasesTable-Bo61P5K1.mjs} +8 -8
  136. package/.output/server/chunks/build/{ProjectTestCasesTable-CxfQ5wtN.mjs.map → ProjectTestCasesTable-Bo61P5K1.mjs.map} +1 -1
  137. package/.output/server/chunks/build/{RovingFocusItem-BJSzTBjy.mjs → RovingFocusItem--OEHI2P3.mjs} +2 -2
  138. package/.output/server/chunks/build/RovingFocusItem--OEHI2P3.mjs.map +1 -0
  139. package/.output/server/chunks/build/RunReports-DFLv51TX.mjs +1 -1
  140. package/.output/server/chunks/build/{Select-CUqj50wi.mjs → Select-5DK9frQ7.mjs} +3 -3
  141. package/.output/server/chunks/build/Select-5DK9frQ7.mjs.map +1 -0
  142. package/.output/server/chunks/build/{SelectMenu-Db7osY7J.mjs → SelectMenu-D-2FSqBU.mjs} +939 -7
  143. package/.output/server/chunks/build/{SelectMenu-Db7osY7J.mjs.map → SelectMenu-D-2FSqBU.mjs.map} +1 -1
  144. package/.output/server/chunks/build/{SettingsField-D6iEYbEc.mjs → SettingsField-BZfx4ma1.mjs} +2 -2
  145. package/.output/server/chunks/build/SettingsField-BZfx4ma1.mjs.map +1 -0
  146. package/.output/server/chunks/build/{Slideover-DgCa80mf.mjs → Slideover-D270EZZD.mjs} +3 -3
  147. package/.output/server/chunks/build/Slideover-D270EZZD.mjs.map +1 -0
  148. package/.output/server/chunks/build/{Switch-CgUioOYB.mjs → Switch-B5Fp8ULt.mjs} +2 -2
  149. package/.output/server/chunks/build/Switch-B5Fp8ULt.mjs.map +1 -0
  150. package/.output/server/chunks/build/Table-BRk04Hd2.mjs +1 -1
  151. package/.output/server/chunks/build/{Tabs-Bbsg9wag.mjs → Tabs-BkSOnbaB.mjs} +2 -2
  152. package/.output/server/chunks/build/Tabs-BkSOnbaB.mjs.map +1 -0
  153. package/.output/server/chunks/build/{TestCaseHistoryChart-nMLPhdvD.mjs → TestCaseHistoryChart-CSi64vVA.mjs} +5 -5
  154. package/.output/server/chunks/build/TestCaseHistoryChart-CSi64vVA.mjs.map +1 -0
  155. package/.output/server/chunks/build/{TestStatusBar-j6h2Jp6A.mjs → TestStatusBar-DX3EhlyP.mjs} +2 -2
  156. package/.output/server/chunks/build/TestStatusBar-DX3EhlyP.mjs.map +1 -0
  157. package/.output/server/chunks/build/{Tooltip-BOazooWP.mjs → Tooltip-Dv4htNP6.mjs} +3 -3
  158. package/.output/server/chunks/build/Tooltip-Dv4htNP6.mjs.map +1 -0
  159. package/.output/server/chunks/build/{VisuallyHiddenInput-D6kBJxVd.mjs → VisuallyHiddenInput-BHvzNumK.mjs} +2 -2
  160. package/.output/server/chunks/build/VisuallyHiddenInput-BHvzNumK.mjs.map +1 -0
  161. package/.output/server/chunks/build/{_id_-z5N6HPyC.mjs → _id_-BdG37K7s.mjs} +12 -12
  162. package/.output/server/chunks/build/_id_-BdG37K7s.mjs.map +1 -0
  163. package/.output/server/chunks/build/{_id_-BHh65pfg.mjs → _id_-BdJs7BJZ.mjs} +57 -33
  164. package/.output/server/chunks/build/{_id_-BHh65pfg.mjs.map → _id_-BdJs7BJZ.mjs.map} +1 -1
  165. package/.output/server/chunks/build/{_id_-B78ky13D.mjs → _id_-BxA6IgWr.mjs} +96 -73
  166. package/.output/server/chunks/build/_id_-BxA6IgWr.mjs.map +1 -0
  167. package/.output/server/chunks/build/{_id_-Rzkqx55x.mjs → _id_-C_uSBiyU.mjs} +22 -23
  168. package/.output/server/chunks/build/{_id_-Rzkqx55x.mjs.map → _id_-C_uSBiyU.mjs.map} +1 -1
  169. package/.output/server/chunks/build/{about-CvSP73Ug.mjs → about-BE0UV-8-.mjs} +365 -18
  170. package/.output/server/chunks/build/about-BE0UV-8-.mjs.map +1 -0
  171. package/.output/server/chunks/build/{ai-B4VJ9K1K.mjs → ai-Cn05ch0u.mjs} +9 -9
  172. package/.output/server/chunks/build/{ai-B4VJ9K1K.mjs.map → ai-Cn05ch0u.mjs.map} +1 -1
  173. package/.output/server/chunks/build/{analytics-CJPC6t4L.mjs → analytics-Bo_B_jko.mjs} +20 -21
  174. package/.output/server/chunks/build/analytics-Bo_B_jko.mjs.map +1 -0
  175. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  176. package/.output/server/chunks/build/{default-zvbFgDJG.mjs → default-CbNHaFsy.mjs} +603 -71
  177. package/.output/server/chunks/build/default-CbNHaFsy.mjs.map +1 -0
  178. package/.output/server/chunks/build/{docs-DyuVEgtB.mjs → docs-B_llWMxx.mjs} +6 -6
  179. package/.output/server/chunks/build/{docs-DyuVEgtB.mjs.map → docs-B_llWMxx.mjs.map} +1 -1
  180. package/.output/server/chunks/build/{edit-CFR5g2Qf.mjs → edit-J0asTFg8.mjs} +4 -5
  181. package/.output/server/chunks/build/edit-J0asTFg8.mjs.map +1 -0
  182. package/.output/server/chunks/build/fetch-B4FwBOzu.mjs +1 -1
  183. package/.output/server/chunks/build/{import-CZo3djDi.mjs → import-CS9oylTN.mjs} +4 -4
  184. package/.output/server/chunks/build/import-CS9oylTN.mjs.map +1 -0
  185. package/.output/server/chunks/build/{index-Stqw0dEI.mjs → index-DE45ycdZ.mjs} +9 -9
  186. package/.output/server/chunks/build/index-DE45ycdZ.mjs.map +1 -0
  187. package/.output/server/chunks/build/{index-gCw_y4ZJ.mjs → index-e9skCi-V.mjs} +10 -11
  188. package/.output/server/chunks/build/{index-gCw_y4ZJ.mjs.map → index-e9skCi-V.mjs.map} +1 -1
  189. package/.output/server/chunks/build/{index-D7fe97l3.mjs → index-hGHlmyxj.mjs} +299 -91
  190. package/.output/server/chunks/build/index-hGHlmyxj.mjs.map +1 -0
  191. package/.output/server/chunks/build/isValueEqualOrExist-D2qw9YEr.mjs +1 -1
  192. package/.output/server/chunks/build/login-Da4u1IlW.mjs +1 -1
  193. package/.output/server/chunks/build/{mcp-B3IUvRgD.mjs → mcp-uhVCCwQM.mjs} +339 -10
  194. package/.output/server/chunks/build/mcp-uhVCCwQM.mjs.map +1 -0
  195. package/.output/server/chunks/build/{notifications-abDv0id8.mjs → notifications-fx_qnKGA.mjs} +4 -4
  196. package/.output/server/chunks/build/notifications-fx_qnKGA.mjs.map +1 -0
  197. package/.output/server/chunks/build/{pr-feedback-DjZID6q-.mjs → pr-feedback-X6-70iF0.mjs} +3 -3
  198. package/.output/server/chunks/build/pr-feedback-X6-70iF0.mjs.map +1 -0
  199. package/.output/server/chunks/build/server.mjs +24 -24
  200. package/.output/server/chunks/build/{settings-Du7YqF8i.mjs → settings-CCYe7rsc.mjs} +3 -3
  201. package/.output/server/chunks/build/settings-CCYe7rsc.mjs.map +1 -0
  202. package/.output/server/chunks/build/{storage-B4vzxd8G.mjs → storage-CJEmviCD.mjs} +5 -5
  203. package/.output/server/chunks/build/storage-CJEmviCD.mjs.map +1 -0
  204. package/.output/server/chunks/build/{test-cases-DUvaO1He.mjs → test-cases-thBbAykw.mjs} +9 -9
  205. package/.output/server/chunks/build/test-cases-thBbAykw.mjs.map +1 -0
  206. package/.output/server/chunks/build/{useAiStatus-CWvIo32Q.mjs → useAiStatus-CxjMmDDY.mjs} +8 -8
  207. package/.output/server/chunks/build/useAiStatus-CxjMmDDY.mjs.map +1 -0
  208. package/.output/server/chunks/build/{useCopyRich-BemRsKgv.mjs → useCopyRich-RJKhWoyj.mjs} +74 -44
  209. package/.output/server/chunks/build/useCopyRich-RJKhWoyj.mjs.map +1 -0
  210. package/.output/server/chunks/build/{useDesktopDownload-D49JRQSw.mjs → useDesktopDownload-BepjqxOt.mjs} +2 -2
  211. package/.output/server/chunks/build/useDesktopDownload-BepjqxOt.mjs.map +1 -0
  212. package/.output/server/chunks/build/{useOpenInIde-4GFf-kdi.mjs → useOpenInIde-BbTnPhFA.mjs} +2 -2
  213. package/.output/server/chunks/build/useOpenInIde-BbTnPhFA.mjs.map +1 -0
  214. package/.output/server/chunks/build/{useSettingsNav-C3O866KC.mjs → useSettingsNav-DnQKacz8.mjs} +4 -4
  215. package/.output/server/chunks/build/useSettingsNav-DnQKacz8.mjs.map +1 -0
  216. package/.output/server/chunks/build/useTauri-Kf3HE_42.mjs +11 -0
  217. package/.output/server/chunks/build/useTauri-Kf3HE_42.mjs.map +1 -0
  218. package/.output/server/chunks/build/{wasted-time-lYkx5YO4.mjs → wasted-time-BNTPIyrC.mjs} +4 -4
  219. package/.output/server/chunks/build/wasted-time-BNTPIyrC.mjs.map +1 -0
  220. package/.output/server/chunks/nitro/nitro.mjs +3471 -2802
  221. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  222. package/.output/server/chunks/routes/__piwi/session.get.mjs +1 -1
  223. package/.output/server/chunks/routes/api/desktop/import-local.post.mjs +88 -0
  224. package/.output/server/chunks/routes/api/desktop/import-local.post.mjs.map +1 -0
  225. package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs +1 -1
  226. package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs +1 -1
  227. package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs +1 -1
  228. package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs +1 -1
  229. package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs +1 -1
  230. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs +1 -1
  231. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs +1 -1
  232. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs +1 -1
  233. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs +1 -1
  234. package/.output/server/chunks/routes/api/failure-clusters/_id/export.get.mjs +1 -1
  235. package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs +1 -1
  236. package/.output/server/chunks/routes/api/failure-clusters/_id/fix-plan.get.mjs +1 -1
  237. package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs +1 -1
  238. package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs +1 -1
  239. package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs +1 -1
  240. package/.output/server/chunks/routes/api/files/_...path_.get.mjs +1 -1
  241. package/.output/server/chunks/routes/api/health.get.mjs +1 -1
  242. package/.output/server/chunks/routes/api/index.get2.mjs +1 -1
  243. package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
  244. package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
  245. package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
  246. package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
  247. package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
  248. package/.output/server/chunks/routes/api/index.post5.mjs +1 -1
  249. package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs +1 -1
  250. package/.output/server/chunks/routes/api/links/_id_.delete.mjs +1 -1
  251. package/.output/server/chunks/routes/api/links/_id_.patch.mjs +1 -1
  252. package/.output/server/chunks/routes/api/markers/_id_.delete.mjs +1 -1
  253. package/.output/server/chunks/routes/api/markers/_id_.put.mjs +1 -1
  254. package/.output/server/chunks/routes/api/notifications/stream.get.mjs +1 -1
  255. package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs +1 -1
  256. package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs +1 -1
  257. package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs +1 -1
  258. package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs +1 -1
  259. package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs +1 -1
  260. package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs +1 -1
  261. package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs +1 -1
  262. package/.output/server/chunks/routes/api/projects/_id/members.get.mjs +1 -1
  263. package/.output/server/chunks/routes/api/projects/_id/members.put.mjs +1 -1
  264. package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs +1 -1
  265. package/.output/server/chunks/routes/api/projects/_id/quarantine/_testCaseId_.delete.mjs +1 -1
  266. package/.output/server/chunks/routes/api/projects/_id/quarantine.get.mjs +1 -1
  267. package/.output/server/chunks/routes/api/projects/_id/quarantine.post.mjs +1 -1
  268. package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs +1 -1
  269. package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs +1 -1
  270. package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs +1 -1
  271. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs +1 -1
  272. package/.output/server/chunks/routes/api/projects/_id_.delete.mjs +1 -1
  273. package/.output/server/chunks/routes/api/projects/_id_.get.mjs +1 -1
  274. package/.output/server/chunks/routes/api/projects/_id_.put.mjs +1 -1
  275. package/.output/server/chunks/routes/api/projects/menu.get.mjs +1 -1
  276. package/.output/server/chunks/routes/api/projects/overview.get.mjs +1 -1
  277. package/.output/server/chunks/routes/api/projects.get.mjs +1 -1
  278. package/.output/server/chunks/routes/api/search.get.mjs +1 -1
  279. package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs +1 -1
  280. package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs +1 -1
  281. package/.output/server/chunks/routes/api/settings/ai/test.post.mjs +1 -1
  282. package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs +1 -1
  283. package/.output/server/chunks/routes/api/settings/ai.get.mjs +1 -1
  284. package/.output/server/chunks/routes/api/settings/ai.put.mjs +1 -1
  285. package/.output/server/chunks/routes/api/settings/pr-feedback.get.mjs +1 -1
  286. package/.output/server/chunks/routes/api/settings/pr-feedback.put.mjs +1 -1
  287. package/.output/server/chunks/routes/api/settings/smtp.get.mjs +1 -1
  288. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs +1 -1
  289. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs +1 -1
  290. package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs +1 -1
  291. package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs +1 -1
  292. package/.output/server/chunks/routes/api/stream.get.mjs +1 -1
  293. package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs +1 -1
  294. package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs +1 -1
  295. package/.output/server/chunks/routes/api/tags/_id_.delete.mjs +1 -1
  296. package/.output/server/chunks/routes/api/tags/_id_.put.mjs +1 -1
  297. package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs +1 -1
  298. package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs +1 -1
  299. package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs +1 -1
  300. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs +1 -1
  301. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs +1 -1
  302. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs +1 -1
  303. package/.output/server/chunks/routes/api/test-run-cases/_id/export.get.mjs +1 -1
  304. package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs +1 -1
  305. package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs +1 -1
  306. package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs +1 -1
  307. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs +1 -1
  308. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs +5 -3
  309. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs.map +1 -1
  310. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs +1 -1
  311. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs +1 -1
  312. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs +1 -1
  313. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs +1 -1
  314. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs +1 -1
  315. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs +1 -1
  316. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs +1 -1
  317. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs +1 -1
  318. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs +1 -1
  319. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs +1 -1
  320. package/.output/server/chunks/routes/api/test-runs/_id/gate.post.mjs +1 -1
  321. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs +1 -1
  322. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs +1 -1
  323. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs +1 -1
  324. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs +1 -1
  325. package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs +1 -1
  326. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs +1 -1
  327. package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs +1 -1
  328. package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs +1 -1
  329. package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs +1 -1
  330. package/.output/server/chunks/routes/api/test-runs/import/check.post.mjs +1 -2
  331. package/.output/server/chunks/routes/api/test-runs/import/check.post.mjs.map +1 -1
  332. package/.output/server/chunks/routes/api/test-runs/import.post.mjs +4 -128
  333. package/.output/server/chunks/routes/api/test-runs/import.post.mjs.map +1 -1
  334. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs +1 -1
  335. package/.output/server/chunks/routes/api/test-runs/setup.post.mjs +1 -1
  336. package/.output/server/chunks/routes/api/test-runs/start.post.mjs +1 -1
  337. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs +1 -1
  338. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs +1 -1
  339. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs +3 -1
  340. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs.map +1 -1
  341. package/.output/server/chunks/routes/api/traces/check.post.mjs +1 -1
  342. package/.output/server/chunks/routes/api/users/_id/index.post.mjs +1 -1
  343. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs +1 -1
  344. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs +1 -1
  345. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs +1 -1
  346. package/.output/server/chunks/routes/api/version.get.mjs +1 -1
  347. package/.output/server/chunks/routes/mcp.post.mjs +1 -1
  348. package/.output/server/chunks/routes/renderer.mjs +1 -1
  349. package/.output/server/index.mjs +1 -1
  350. package/.output/server/package.json +1 -1
  351. package/package.json +1 -1
  352. package/.output/public/_nuxt/BYDaY0Z7.js +0 -1
  353. package/.output/public/_nuxt/Bc8mOoz9.js +0 -4
  354. package/.output/public/_nuxt/BeLWlVK0.js +0 -1
  355. package/.output/public/_nuxt/BpUaY9nH.js +0 -2
  356. package/.output/public/_nuxt/CHNwfU1y.js +0 -1
  357. package/.output/public/_nuxt/CNFYDQmj.js +0 -1
  358. package/.output/public/_nuxt/CU5S9GCh.js +0 -1
  359. package/.output/public/_nuxt/CrwJAwhk.js +0 -1
  360. package/.output/public/_nuxt/CuSVQEkS.js +0 -3
  361. package/.output/public/_nuxt/CylWPruw.js +0 -1
  362. package/.output/public/_nuxt/DDDpCFpF.js +0 -1
  363. package/.output/public/_nuxt/DVDXJYq2.js +0 -2
  364. package/.output/public/_nuxt/Dgf5N4Ng.js +0 -1
  365. package/.output/public/_nuxt/DiZyJYez.js +0 -1
  366. package/.output/public/_nuxt/OSduWzyz.js +0 -1
  367. package/.output/public/_nuxt/WsxFTEFq.js +0 -10
  368. package/.output/public/_nuxt/aQgs_c6e.js +0 -9
  369. package/.output/public/_nuxt/builds/meta/ab473028-4b37-4884-b243-b8f6e5046e5e.json +0 -1
  370. package/.output/public/_nuxt/dYCKgE-3.js +0 -5
  371. package/.output/public/_nuxt/entry.CPhW41mh.css +0 -1
  372. package/.output/public/_nuxt/g26aVPxc.js +0 -1
  373. package/.output/server/chunks/_/import-runs.mjs +0 -351
  374. package/.output/server/chunks/_/import-runs.mjs.map +0 -1
  375. package/.output/server/chunks/build/BrowserBadge-D33lqUcj.mjs.map +0 -1
  376. package/.output/server/chunks/build/Checkbox-DvUBGagc.mjs.map +0 -1
  377. package/.output/server/chunks/build/CiEnvCard-CrjOM17n.mjs +0 -631
  378. package/.output/server/chunks/build/CiEnvCard-CrjOM17n.mjs.map +0 -1
  379. package/.output/server/chunks/build/DiagnosisPanel-B646dK4p.mjs.map +0 -1
  380. package/.output/server/chunks/build/EmptyState-Dtlab7S9.mjs.map +0 -1
  381. package/.output/server/chunks/build/EntityLinks-D3fp57pR.mjs.map +0 -1
  382. package/.output/server/chunks/build/EnvManagedBadge-Bg3FSiU1.mjs.map +0 -1
  383. package/.output/server/chunks/build/Modal-Ck2XLt8d.mjs.map +0 -1
  384. package/.output/server/chunks/build/RovingFocusItem-BJSzTBjy.mjs.map +0 -1
  385. package/.output/server/chunks/build/Select-CUqj50wi.mjs.map +0 -1
  386. package/.output/server/chunks/build/SettingsField-D6iEYbEc.mjs.map +0 -1
  387. package/.output/server/chunks/build/Slideover-DgCa80mf.mjs.map +0 -1
  388. package/.output/server/chunks/build/Switch-CgUioOYB.mjs.map +0 -1
  389. package/.output/server/chunks/build/Tabs-Bbsg9wag.mjs.map +0 -1
  390. package/.output/server/chunks/build/TestCaseHistoryChart-nMLPhdvD.mjs.map +0 -1
  391. package/.output/server/chunks/build/TestStatusBar-j6h2Jp6A.mjs.map +0 -1
  392. package/.output/server/chunks/build/Tooltip-BOazooWP.mjs.map +0 -1
  393. package/.output/server/chunks/build/VisuallyHiddenInput-D6kBJxVd.mjs.map +0 -1
  394. package/.output/server/chunks/build/_id_-B78ky13D.mjs.map +0 -1
  395. package/.output/server/chunks/build/_id_-z5N6HPyC.mjs.map +0 -1
  396. package/.output/server/chunks/build/about-CvSP73Ug.mjs.map +0 -1
  397. package/.output/server/chunks/build/analytics-CJPC6t4L.mjs.map +0 -1
  398. package/.output/server/chunks/build/default-zvbFgDJG.mjs.map +0 -1
  399. package/.output/server/chunks/build/edit-CFR5g2Qf.mjs.map +0 -1
  400. package/.output/server/chunks/build/import-CZo3djDi.mjs.map +0 -1
  401. package/.output/server/chunks/build/index-D7fe97l3.mjs.map +0 -1
  402. package/.output/server/chunks/build/index-Stqw0dEI.mjs.map +0 -1
  403. package/.output/server/chunks/build/mcp-B3IUvRgD.mjs.map +0 -1
  404. package/.output/server/chunks/build/notifications-abDv0id8.mjs.map +0 -1
  405. package/.output/server/chunks/build/pr-feedback-DjZID6q-.mjs.map +0 -1
  406. package/.output/server/chunks/build/settings-Du7YqF8i.mjs.map +0 -1
  407. package/.output/server/chunks/build/storage-B4vzxd8G.mjs.map +0 -1
  408. package/.output/server/chunks/build/test-cases-DUvaO1He.mjs.map +0 -1
  409. package/.output/server/chunks/build/useAiStatus-CWvIo32Q.mjs.map +0 -1
  410. package/.output/server/chunks/build/useCopyRich-BemRsKgv.mjs.map +0 -1
  411. package/.output/server/chunks/build/useDesktopDownload-D49JRQSw.mjs.map +0 -1
  412. package/.output/server/chunks/build/useOpenInIde-4GFf-kdi.mjs.map +0 -1
  413. package/.output/server/chunks/build/useSettingsNav-C3O866KC.mjs.map +0 -1
  414. package/.output/server/chunks/build/useTauri-lRT8zkLv.mjs +0 -7
  415. package/.output/server/chunks/build/useTauri-lRT8zkLv.mjs.map +0 -1
  416. package/.output/server/chunks/build/virtualizer-Cd1hhlxC.mjs +0 -940
  417. package/.output/server/chunks/build/virtualizer-Cd1hhlxC.mjs.map +0 -1
  418. package/.output/server/chunks/build/wasted-time-lYkx5YO4.mjs.map +0 -1
@@ -0,0 +1,5 @@
1
+ import{d as te,b as Je,o as n,f as P,g as C,j as k,_ as Ae,m as z,i as u,k as t,l as ze,r as U,J as gt,h as S,A as Re,c,O as ht,V as Oe,ae as vt,S as pe,C as ge,p as ve,q as ae,v as $,t as v,F as H,K as yt,y as se,s as Be,E as st,H as Ee,af as Le,B as at,I as xt,Q as Xe,G as We,ac as Ie,D as bt,W as je,ag as Se,T as kt,ad as _t,ah as $t,ai as wt,aj as Ct,a0 as St,a1 as Tt}from"./Du2W7Jne.js";import{_ as rt,a as Lt}from"./Bm62iDV5.js";import{_ as zt}from"./Dy-TJ0Mt.js";import{u as It}from"./BgRu_3tT.js";import{u as He}from"./DSqHUrvO.js";import{g as it,u as At,v as Rt,f as Ge,w as lt,n as Ue,x as Bt}from"./DuwtTfO8.js";import{_ as Ye}from"./BrQEE053.js";import{_ as Ne}from"./C0_yH0N7.js";import{_ as Pt}from"./BUkim3TM.js";import{u as Me}from"./B8zkOmwo.js";import{_ as Et}from"./CxyAzHr3.js";import{_ as Ot}from"./BT3wGCTI.js";import{_ as Ut}from"./B3obW6cw.js";import{k as jt,i as Mt,b as Nt}from"./Cnsmicv2.js";import{f as Kt}from"./D-c8ZSws.js";import{_ as ct}from"./DJmoLeVt.js";import{_ as Dt}from"./-f7BAm1H.js";const Vt={class:"w-64 p-1 space-y-0.5"},Ht={class:"flex items-center justify-between px-2 pt-1 pb-1"},Ft=te({__name:"ExportMenu",props:{endpoint:{},baseName:{}},setup(e){const r=e,{download:i}=It(),{copy:d}=He(),s=Je(),a=U(!1),o=U(""),p=S(()=>(Re().app?.baseURL??"/").replace(/\/$/,""));function l(L){return`${p.value}${L}`}async function g(L){a.value=!1,await i(l(`${r.endpoint}?format=${L}`),`${r.baseName}.${L}`,{binary:L==="zip"})}function T(){a.value=!1,window.open(l(`${r.endpoint}?format=html&print=1`),"_blank")}async function I(L,x,A){o.value=x;try{const j=await fetch(l(L));if(!j.ok)throw new Error(`Request failed (${j.status})`);const D=await j.text();d(A?A(D):D,{toast:`${x} copied`}),a.value=!1}catch(j){s.add({title:`Could not copy ${x.toLowerCase()}`,description:it(j),color:"error"})}finally{o.value=""}}function b(){return I(`${r.endpoint}?format=md`,"Report")}return(L,x)=>{const A=Ae,j=rt,D=zt,E=gt;return n(),P(E,{open:t(a),"onUpdate:open":x[4]||(x[4]=B=>ze(a)?a.value=B:null)},{content:C(()=>[u("div",Vt,[u("div",Ht,[x[6]||(x[6]=u("p",{class:"text-xs font-medium text-gray-500"},"Download",-1)),k(j,{topic:"export.offline"})]),k(A,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-code",title:"One self-contained HTML file with screenshots and video embedded",onClick:x[0]||(x[0]=B=>g("html"))},{default:C(()=>[...x[7]||(x[7]=[z(" HTML — single file ",-1)])]),_:1}),k(A,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-archive",title:"Report plus the raw artifacts, including trace archives and data.json",onClick:x[1]||(x[1]=B=>g("zip"))},{default:C(()=>[...x[8]||(x[8]=[z(" ZIP — with all evidence ",-1)])]),_:1}),k(A,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-printer",title:"Opens the report with your browser's print dialog, for Save as PDF",onClick:T},{default:C(()=>[...x[9]||(x[9]=[z(" PDF — via print ",-1)])]),_:1}),k(A,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-text",title:"The Markdown report as a file",onClick:x[2]||(x[2]=B=>g("md"))},{default:C(()=>[...x[10]||(x[10]=[z(" Markdown ",-1)])]),_:1}),k(A,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-json",title:"Everything the report contains, machine-readable",onClick:x[3]||(x[3]=B=>g("json"))},{default:C(()=>[...x[11]||(x[11]=[z(" JSON ",-1)])]),_:1}),k(D,{class:"my-1"}),x[13]||(x[13]=u("p",{class:"text-xs font-medium text-gray-500 px-2 pt-1 pb-1"},"Copy to clipboard",-1)),k(A,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-clipboard-list",loading:t(o)==="Report",title:"The whole investigation as Markdown, for an issue or a chat",onClick:b},{default:C(()=>[...x[12]||(x[12]=[z(" Report (Markdown) ",-1)])]),_:1},8,["loading"])])]),default:C(()=>[k(A,{icon:"i-lucide-share",size:"xs",color:"neutral",variant:"outline",title:"Take this investigation away"},{default:C(()=>[...x[5]||(x[5]=[z(" Export ",-1)])]),_:1})]),_:1},8,["open"])}}}),Ba=Object.assign(Ft,{__name:"ExportMenu"}),qt={class:"flex items-center justify-between gap-2"},Zt=["aria-expanded","title"],Wt={class:"text-lg font-medium inline-flex items-center gap-1 shrink-0"},Jt={key:2,class:"min-w-0 flex-1 truncate text-sm text-gray-500 dark:text-gray-400"},Gt={key:0,class:"flex items-center gap-1 shrink-0"},Yt={key:0,class:"text-sm text-gray-500 mt-1 ml-11"},Qt=te({__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:d,toggle:s,setFolded:a}=jt(`piwi-section-fold-${i.storageKey}`,i.defaultFolded),o=U(null);function p(){a(!1),yt(()=>o.value?.scrollIntoView({behavior:"smooth",block:"start"}))}return r({setFolded:a,reveal:p}),(l,g)=>{const T=ve,I=rt,b=Dt;return n(),c("div",{ref_key:"rootEl",ref:o,class:"scroll-mt-4"},[k(b,{ui:{header:"p-3 sm:px-4 sm:py-3",body:t(d)?"p-0 sm:p-0":""},class:ae(t(d)&&"divide-y-0")},{header:C(()=>[u("div",qt,[u("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(d),title:t(d)?"Expand section":"Collapse section",onClick:g[1]||(g[1]=(...L)=>t(s)&&t(s)(...L)),onKeydown:[g[2]||(g[2]=pe((...L)=>t(s)&&t(s)(...L),["enter"])),g[3]||(g[3]=pe(ge((...L)=>t(s)&&t(s)(...L),["prevent"]),["space"]))]},[k(T,{name:t(d)?"i-lucide-chevron-right":"i-lucide-chevron-down",class:"size-4 shrink-0 text-gray-400"},null,8,["name"]),e.icon?(n(),P(T,{key:0,name:e.icon,class:ae(["size-5 shrink-0",e.iconClass])},null,8,["name","class"])):$("",!0),u("h3",Wt,[z(v(e.title),1),e.count!=null?(n(),c(H,{key:0},[z(" ("+v(e.count)+")",1)],64)):$("",!0)]),e.help?(n(),c("span",{key:1,onClick:g[0]||(g[0]=ge(()=>{},["stop"]))},[k(I,{topic:e.help},null,8,["topic"])])):$("",!0),t(d)&&l.$slots.folded?(n(),c("span",Jt,[Oe(l.$slots,"folded")])):$("",!0)],40,Zt),l.$slots.actions?(n(),c("div",Gt,[Oe(l.$slots,"actions")])):$("",!0)]),!t(d)&&(e.subtitle||l.$slots.subtitle)?(n(),c("p",Yt,[Oe(l.$slots,"subtitle",{},()=>[z(v(e.subtitle),1)])])):$("",!0)]),default:C(()=>[ht(u("div",null,[Oe(l.$slots,"default")],512),[[vt,!t(d)]])]),_:3},8,["ui","class"])],512)}}}),Ke=Object.assign(Qt,{__name:"CollapsibleSectionCard"}),Xt={class:"overflow-x-auto text-xs font-mono"},en=te({__name:"DiffPatch",props:{patch:{}},setup(e){return(r,i)=>(n(),c("div",Xt,[(n(!0),c(H,null,se(("parsePatchLines"in r?r.parsePatchLines:t(Rt))(e.patch),(d,s)=>(n(),c("div",{key:s,class:ae(["px-3 py-px whitespace-pre leading-5 min-w-0",("patchLineClass"in r?r.patchLineClass:t(At))[d.type]])},v(d.text||" "),3))),128))]))}}),tn=Object.assign(en,{__name:"DiffPatch"}),nn=["role","aria-checked","tabindex"],on={class:"flex-1 min-w-0"},sn=["title"],an={key:0,class:"text-[11px] leading-4 text-gray-500 truncate"},rn=te({__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 d(a){const{method:o,score:p,args:l}=a;return l&&(l.anchorTestId||l.anchorSelector||l.anchorRole)?"scoped to a stable ancestor — survives renames":p>=100?"most stable — purpose-built for testing":o==="getByRole"&&l&&!("name"in l)?"name-free role — survives renames":o==="getByRole"?"browser ARIA tree — semantic and stable":o==="getByLabel"?"associated <label> element":o==="getByPlaceholder"?"input placeholder":o==="getByText"?"visible text":o==="getByAltText"?"image alt text":o==="getByTitle"?"title attribute":o==="locator"&&p>=50?"stable selector":o==="locator"?"CSS class — may be fragile":""}const s=S(()=>r.note??d(r.alt));return(a,o)=>{const p=Be,l=ve,g=Ae;return n(),c("div",{class:ae(["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:o[1]||(o[1]=T=>e.selectable&&a.$emit("select")),onKeydown:[o[2]||(o[2]=pe(ge(T=>e.selectable&&a.$emit("select"),["prevent"]),["enter"])),o[3]||(o[3]=pe(ge(T=>e.selectable&&a.$emit("select"),["prevent"]),["space"]))]},[k(p,{size:"xs",color:i(e.alt.score),variant:"subtle",class:ae(["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:C(()=>[z(v(e.alt.score),1)]),_:1},8,["color","class","title"]),u("div",on,[u("code",{class:"text-xs font-mono block truncate",title:e.alt.locator},v(e.alt.locator),9,sn),t(s)?(n(),c("p",an,v(t(s)),1)):$("",!0)]),e.alt.pickedByUser&&e.dense?(n(),P(l,{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(p,{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"})):$("",!0),k(g,{size:"xs",variant:"ghost",color:"neutral",icon:e.copied?"i-lucide-check":"i-lucide-copy",title:e.copied?"Copied!":"Copy",class:"shrink-0",onClick:o[0]||(o[0]=ge(T=>a.$emit("copy"),["stop"]))},null,8,["icon","title"])],42,nn)}}}),ut=Object.assign(rn,{__name:"LocatorAlternativeRow"}),et={getByTestId:"testid",getByRole:"semantic",getByLabel:"label",getByPlaceholder:"label",getByText:"text",getByAltText:"text",getByTitle:"text",locator:"css","page.locator":"css"},ln=50;function dt(e,r,i=ln){const d=r[0]??null;if(!d)return{recommended:null,durable:null,preservesConvention:!1,hasDurableAlternative:!1,suggestAddTestId:!1};const s=e?et[e]:void 0,a=(e?r.find(l=>l.method===e&&l.score>=i):void 0)??(s?r.find(l=>et[l.method]===s&&l.score>=i):void 0),p=r.find(l=>l.pickedByUser)??a??d;return{recommended:p,durable:d,preservesConvention:!!a&&p===a,hasDurableAlternative:p.locator!==d.locator,suggestAddTestId:d.score<i}}const ft={a:"link",button:"button",nav:"navigation",main:"main",article:"article",section:"region",form:"form",img:"img",figure:"figure",figcaption:"caption",blockquote:"blockquote",table:"table",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"},cn={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"},un=["id","class","name","data-testid","placeholder","alt","title","aria-label","aria-level","role","type","href","multiple"];function dn(e){const r=e.attributes.role;if(r)return r;const i=e.tagName;if(!i)return null;if(i==="input"){const d=(e.attributes.type??"text").toLowerCase();return cn[d]??"textbox"}return i==="select"?e.attributes.multiple!=null?"listbox":"combobox":i==="a"?e.attributes.href!=null?"link":null:ft[i]??null}function fn(e,r){if(r!=="heading")return null;const i=e.tagName.match(/^h([1-6])$/);if(i)return Number(i[1]);const d=e.attributes["aria-level"];return d&&/^\d+$/.test(d)?Number(d):null}const $e=(e,r)=>e.attributes[r]||null,me=e=>e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),qe=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),tt=e=>/^[A-Za-z][A-Za-z0-9_-]*$/.test(e);function mn(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 nt(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 pn(e){const r=[],i=new Set,d=y=>{i.has(y.locator)||(i.add(y.locator),r.push(y))},{accessibleName:s}=e,a=e.tagName,o=dn(e),p=e.selectorCounts,l=y=>y==null||y<=1,g=e.textContent?e.textContent.replace(/\s+/g," ").trim():null,T=$e(e,"data-testid");T&&l(p?.testId)&&d({locator:`getByTestId('${me(T)}')`,method:"getByTestId",args:{testId:T},score:100});const I=fn(e,o),b=I!=null?`, level: ${I}`:"",L=y=>I!=null?{...y,level:I}:y;o&&s&&d({locator:`getByRole('${o}', { name: '${me(s)}'${b} })`,method:"getByRole",args:L({role:o,name:s}),score:90});const x=$e(e,"aria-label");if(o&&x&&x!==s&&d({locator:`getByRole('${o}', { name: '${me(x)}'${b} })`,method:"getByRole",args:L({role:o,name:x}),score:85}),s&&["input","select","textarea"].includes(a)){const y=$e(e,"aria-label");(e.hasLabel===void 0||e.hasLabel===!0||y===s)&&d({locator:`getByLabel('${me(s)}')`,method:"getByLabel",args:{label:s},score:85})}const A=$e(e,"placeholder");A&&d({locator:`getByPlaceholder('${me(A)}')`,method:"getByPlaceholder",args:{placeholder:A},score:80}),g&&g.length<80&&d({locator:`getByText('${me(g)}')`,method:"getByText",args:{text:g},score:75});const j=$e(e,"id");if(j&&!nt(j)&&l(p?.id)){const y=tt(j)?`#${j}`:`[id="${qe(j)}"]`;d({locator:`locator('${me(y)}')`,method:"locator",args:{selector:y},score:65})}const D=$e(e,"name");if(D&&l(p?.name)){const y=`[name="${qe(D)}"]`;d({locator:`locator('${me(y)}')`,method:"locator",args:{selector:y},score:60})}const E=$e(e,"alt");E&&d({locator:`getByAltText('${me(E)}')`,method:"getByAltText",args:{text:E},score:60});const B=$e(e,"title");B&&d({locator:`getByTitle('${me(B)}')`,method:"getByTitle",args:{title:B},score:50});const le=!!(T&&l(p?.testId));if(o&&!le){const y=I!=null?`'${o}', { level: ${I} }`:`'${o}'`,q=L({role:o});let M=!1,V=!1,G=!1;for(const Y of e.ancestors??[]){if(Y.scopedRoleCount!==1)continue;if(!M&&Y.testId&&Y.testIdCount===1&&(M=!0,d({locator:`getByTestId('${me(Y.testId)}').getByRole(${y})`,method:"getByRole",args:{...q,anchorTestId:Y.testId},score:72})),!V&&Y.id&&!nt(Y.id)&&Y.idCount===1){V=!0;const ye=tt(Y.id)?`#${Y.id}`:`[id="${qe(Y.id)}"]`;d({locator:`locator('${me(ye)}').getByRole(${y})`,method:"getByRole",args:{...q,anchorSelector:ye},score:64})}const he=Y.role||ft[Y.tag]||null;!G&&he&&he!==o&&Y.roleCount===1&&(G=!0,d({locator:`getByRole('${me(he)}').getByRole(${y})`,method:"getByRole",args:{...q,anchorRole:he},score:55}))}const Z=e.rolePosition;Z&&Z.role===o&&(Z.count===1||I!=null&&Z.levelCount===1)&&d({locator:`getByRole(${y})`,method:"getByRole",args:q,score:58})}const ee=$e(e,"class");if(ee){const y=p?.classes,q=ee.split(/\s+/).filter(M=>M.length>1&&/^[A-Za-z_-][A-Za-z0-9_-]*$/.test(M)&&l(y?.[M])).map(M=>({cls:M,score:mn(M)})).sort((M,V)=>V.score-M.score).slice(0,3);for(const{cls:M,score:V}of q)d({locator:`locator('.${me(M)}')`,method:"locator",args:{selector:`.${M}`},score:V})}return r.sort((y,q)=>q.score-y.score)}function gn(e){const r=e.attributes,i=r["aria-label"];if(i)return i;if(e.textContent)return e.textContent;const d=r.title;if(d)return d;const s=r.placeholder;return s||null}function hn(e){if(window.__piwiPickerInstalled)return;window.__piwiPickerInstalled=!0;var r=document,i=window,d=2147483600,s=e.probedAttrs,a=r.createElement("div");a.id="__piwi_picker_highlight",a.style.cssText="position:fixed;pointer-events:none;z-index:"+d+";display:none;box-sizing:border-box;border:2px solid #7c3aed;background:rgba(124,58,237,.12);border-radius:3px;",r.body.appendChild(a);var o=r.createElement("div");o.id="__piwi_picker_banner",o.style.cssText="position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:"+(d+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;",o.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(o),i.parent.postMessage({type:"pickerReady"},"*");function p(f){var w=(f.tagName||"?").toLowerCase(),R=f.getAttribute&&f.getAttribute("data-testid");if(R)return"getByTestId('"+R+"')";if(f.labels&&f.labels.length>0){var N=(f.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,80);if(N)return"getByLabel('"+N+"')"}var X=f.getAttribute&&f.getAttribute("aria-label");if(X)return"getByLabel('"+X+"')";var W=f.getAttribute&&f.getAttribute("placeholder");if(W)return"getByPlaceholder('"+W+"')";var J=f.getAttribute&&f.getAttribute("alt");if(J)return"getByAltText('"+J+"')";var fe=f.getAttribute&&f.getAttribute("title");if(fe)return"getByTitle('"+fe+"')";if(f.id)return"locator('#"+f.id+"')";var _=(f.getAttribute&&f.getAttribute("class")||"").split(/\s+/).find(function(h){return h.length>1});return _?"locator('."+_+"')":w}function l(f){for(var w=[],R=f;R&&w.length<15;){var N=(R.tagName||"").toLowerCase();if(N==="body"||N==="html")break;w.push(R),R=R.parentElement}return w.length?w:[f]}var g=["button","a","input","select","textarea","summary","option"];function T(f){for(var w=0;w<Math.min(f.length,4);w++){var R=f[w],N=(R.tagName||"").toLowerCase();if(g.indexOf(N)!==-1||R.getAttribute&&(R.getAttribute("role")||R.getAttribute("data-testid")))return w}return 0}var I=[],b=0,L=null;function x(){return I[b]||null}function A(){var f=x();if(!f){a.style.display="none";return}var w=f.getBoundingClientRect();a.style.display="block",a.style.left=w.left+"px",a.style.top=w.top+"px",a.style.width=w.width+"px",a.style.height=w.height+"px";var R=r.getElementById("__piwi_picker_foot");R&&(R.textContent=p(f)+" — click to pick · ↑ parent · ↓ child · Esc skip")}var j=o.querySelector("[style*=margin]");j&&(j.id="__piwi_picker_foot");function D(f){for(var w={},R=0;R<s.length;R++){var N=s[R],X=f.getAttribute(N)||f[N];w[N]=typeof X=="string"?X.slice(0,200):X?String(X).slice(0,200):null}var W=f.getBoundingClientRect(),J={};try{var fe=function(we){return i.CSS.escape(we)},_=function(we){try{return r.querySelectorAll(we).length}catch{return}};w["data-testid"]&&(J.testId=_("[data-testid="+JSON.stringify(w["data-testid"])+"]")),w.id&&(J.id=_("#"+fe(w.id))),w.name&&(J.name=_("[name="+JSON.stringify(w.name)+"]"));var h=(w.class||"").split(/\s+/).filter(function(we){return we.length>1}).slice(0,10);if(h.length>0){for(var Q={},oe=0;oe<h.length;oe++){var De=_("."+fe(h[oe]));De!==void 0&&(Q[h[oe]]=De)}J.classes=Q}}catch{}var Ve=null;return f.labels&&f.labels.length>0&&(Ve=(f.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,120)||null),{tagName:(f.tagName||"").toLowerCase(),attributes:w,textContent:(f.textContent||"").replace(/\s+/g," ").trim().slice(0,80)||null,center:{x:Math.round(W.x+W.width/2),y:Math.round(W.y+W.height/2)},hasLabel:!!(f.labels&&f.labels.length>0),labelText:Ve,selectorCounts:J}}function E(f){f.preventDefault(),f.stopImmediatePropagation()}function B(f){return f===o||f===a||o.contains&&o.contains(f)||f&&f.__piwiHint}var le="top";function ee(f){le!==f&&(le=f,f==="bottom"?(o.style.top="auto",o.style.bottom="12px"):(o.style.top="12px",o.style.bottom="auto"))}function y(f){var w=f.target;if(!w||B(w)){a.style.display="none";return}w!==L&&(L=w,I=l(w),b=T(I)),A();var R=x();if(R){var N=R.getBoundingClientRect(),X=o.getBoundingClientRect(),W=8;N.left<X.right+W&&N.right>X.left-W&&N.top<X.bottom+W&&N.bottom>X.top-W&&ee(le==="top"?"bottom":"top")}}function q(f){if(f==="Escape"){F();return}f==="ArrowUp"&&(b=Math.min(b+1,I.length-1),A()),f==="ArrowDown"&&(b=Math.max(b-1,0),A())}function M(f){E(f),q(f.key)}var V=[];function G(){for(var f=0;f<V.length;f++)V[f].parentNode&&V[f].parentNode.removeChild(V[f]);V=[]}function Z(f){return(f||"").replace(/\s+/g," ").trim().toLowerCase()}function Y(f){var w=Z(f);if(w.length<2)return[];for(var R=r.querySelectorAll("button,a,[role],h1,h2,h3,h4,h5,h6,label,summary,input,textarea,select,option,span,li,td,th,p"),N=[],X=[],W=0;W<R.length;W++){var J=R[W],fe=Z(J.textContent);if(!fe){var _=Z(J.getAttribute&&(J.getAttribute("placeholder")||J.getAttribute("aria-label"))||"");_&&(_===w||_.indexOf(w)!==-1)&&N.push(J);continue}fe.length>120||(fe===w?N.push(J):fe.indexOf(w)!==-1&&fe.length<w.length+30&&X.push(J))}return N.concat(X)}function he(f,w){var R=f.getBoundingClientRect();if(R.width===0&&R.height===0)return null;var N=r.createElement("div");return N.__piwiHint=!0,N.style.cssText="position:fixed;pointer-events:none;z-index:"+(d+1)+";box-sizing:border-box;border-radius:3px;transition:opacity .3s;border:2px solid "+w+";box-shadow:0 0 0 3px "+w+"55;left:"+R.left+"px;top:"+R.top+"px;width:"+R.width+"px;height:"+R.height+"px;",r.body.appendChild(N),V.push(N),N}function ye(f){var w=f.getBoundingClientRect();i.parent.postMessage({type:"piwiScrollTo",y:w.top},"*")}function Pe(f){if(G(),!(!f||!f.length)){for(var w=null,R=0;R<f.length;R++)for(var N=f[R],X=Y(N&&N.text),W=0;W<Math.min(X.length,3);W++)he(X[W],"#f59e0b"),w||(w=X[W]);w&&ye(w),setTimeout(function(){for(var J=0;J<V.length;J++)V[J].style.opacity="0"},2600),setTimeout(G,3e3)}}var ne=[],ke=0;function O(){i.parent.postMessage({type:"piwiSearchResult",count:ne.length,index:ne.length?ke:-1},"*")}function m(){G();var f=ne[ke];f&&(he(f,"#7c3aed"),ye(f),O())}function K(f){if(ne=Y(f),ke=0,!ne.length){G(),O();return}m()}function xe(){ne.length&&(ke=(ke+1)%ne.length,m())}function de(f){var w=f.data;if(!(!w||typeof w.type!="string")){if(w.type==="piwiPickerKey"&&typeof w.key=="string")q(w.key);else if(w.type==="piwiHighlight")try{Pe(w.hints)}catch{}else if(w.type==="piwiSearch")try{K(w.q)}catch{}else if(w.type==="piwiSearchNext")try{xe()}catch{}else if(w.type==="piwiClearHints")try{G()}catch{}}}function ce(f){E(f);var w=x();if(!(!w||B(f.target))){var R=D(w);a.style.display="none",G(),o.innerHTML='<div style="text-align:center;color:#9ca3af;">Analyzing element…</div>',ue(),i.parent.postMessage({type:"elementPicked",attrs:R},"*")}}var _e=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick","contextmenu","submit","beforeinput","input","change","paste","cut","drop","dragstart","keypress","keyup","touchstart","touchend"];function Te(){for(var f=0;f<_e.length;f++)r.addEventListener(_e[f],E,!0)}function Ce(){r.removeEventListener("mousemove",y,!0),r.removeEventListener("click",ce,!0),r.removeEventListener("keydown",M,!0),i.removeEventListener("message",de,!1)}function ue(){Ce(),r.addEventListener("click",E,!0),r.addEventListener("keydown",E,!0)}function F(){Ce();for(var f=0;f<_e.length;f++)r.removeEventListener(_e[f],E,!0);r.removeEventListener("click",E,!0),r.removeEventListener("keydown",E,!0),G(),a.remove(),o.remove(),i.parent.postMessage({type:"pickerClosed"},"*")}r.addEventListener("mousemove",y,!0),r.addEventListener("click",ce,!0),r.addEventListener("keydown",M,!0),i.addEventListener("message",de,!1),Te();function re(){var f=Math.max(r.documentElement?r.documentElement.scrollHeight:0,r.body?r.body.scrollHeight:0);f>0&&i.parent.postMessage({type:"piwiContentHeight",height:f},"*")}re();try{if(i.ResizeObserver){var be=new i.ResizeObserver(re);r.documentElement&&be.observe(r.documentElement),r.body&&be.observe(r.body)}}catch{}}function vn(e){const r=[],i=new Set,d=a=>{if(typeof a!="string")return;const o=a.trim();if(o.length<2||o.length>80)return;const p=o.toLowerCase();i.has(p)||(i.add(p),r.push({text:o}))},s=a=>a&&(a.name??a.text??a.label??a.placeholder??a.alt??a.title);d(s(e.failingLocator?.args));for(const a of e.fromElementMatch??[])d(s(a.args));for(const a of e.fromAriaSnapshot??[])d(s(a.args));return r.slice(0,6)}function yn(e){return`<script>(${String(hn).replace(/<\/(script)/gi,"<\\/$1")})(${JSON.stringify(e)})<\/script>`}function xn(e){return e.replace(/<base\b[^>]*>/gi,"")}function bn(e,r){return xn(e)+yn(r)}const kn={key:0,class:"flex items-center justify-center py-20"},_n={key:1,class:"py-8 text-center"},$n={class:"text-xs text-gray-400 mt-1"},wn={key:2,class:"py-8 text-center"},Cn={class:"mb-2 flex items-center gap-2 flex-wrap"},Sn={key:1,class:"ml-auto inline-flex rounded-md border border-default overflow-hidden text-xs"},Tn={key:0,class:"flex items-center gap-1 mb-1.5 text-xs text-gray-500"},Ln={class:"tabular-nums w-11 text-center select-none"},zn={class:"ml-auto text-gray-400 tabular-nums"},In={key:1,class:"flex items-center gap-2 mb-1.5"},An={key:0,class:"text-xs text-gray-500 tabular-nums"},Rn={key:1,class:"text-xs text-gray-400"},Bn={key:0,class:"absolute inset-0 flex items-center justify-center bg-white dark:bg-gray-900 z-10"},Pn=["src"],En={key:2,class:"mt-4 space-y-3"},On={class:"flex items-center gap-3 bg-elevated rounded-lg p-3"},Un={class:"flex-1 min-w-0"},jn={class:"text-sm font-medium"},Mn={class:"text-xs"},Nn={key:0,class:"text-xs text-gray-400 ml-1"},Kn={key:0,class:"text-xs text-gray-500 mt-0.5 truncate"},Dn={class:"space-y-1",role:"radiogroup","aria-label":"Alternative locators"},Vn={class:"flex-1 min-w-0"},Hn={class:"text-xs font-medium text-primary"},Fn={class:"text-sm font-mono block truncate mt-0.5"},qn={class:"flex justify-between w-full"},Zn={key:1},Wn={class:"flex gap-2"},Jn=te({__name:"SnapshotLocatorPicker",props:We({runId:{},testRunsCaseId:{},failingLocator:{},healing:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:We(["close","confirmed"],["update:open"]),setup(e,{emit:r}){const i=e,d=r,s=st(e,"open"),a=U(!1),o=U(null),p=U(null),l=U(void 0);async function g(){a.value=!0,p.value=null;try{const _=new URLSearchParams({inlineStyles:"1"});l.value&&_.set("source",l.value);const h=`?${_.toString()}`;o.value=await $fetch(`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/dom-snapshot${h}`),o.value?.source&&(l.value=o.value.source)}catch(_){p.value=_ instanceof Error?_.message:"Unknown error"}finally{a.value=!1}}const T=S(()=>o.value?.availableSources??[]);function I(_){_===l.value||a.value||(l.value=_,x.value=!1,b.value="pick-element",ee.value=0,q.value=!1,A.value=null,j.value=[],ue.value=null,K.value="",xe.value=0,de.value=-1,g())}Ee(s,_=>{_&&(o.value=null,x.value=!1,b.value="pick-element",ee.value=0,q.value=!1,l.value=void 0,A.value=null,j.value=[],ue.value=null,K.value="",xe.value=0,de.value=-1,g())});const b=U("pick-element"),L=U(null),x=U(!1),A=U(null),j=U([]),D=U(void 0);function E(_){return URL.createObjectURL(new Blob([bn(_,{probedAttrs:un})],{type:"text/html"}))}Ee(()=>o.value?.html,_=>{D.value&&(URL.revokeObjectURL(D.value),D.value=void 0),_&&(D.value=E(_))},{immediate:!0});const B=U(null),le=U(0),ee=U(0),y=U(1),q=U(!1),M=S(()=>o.value?.viewport??null),V=S(()=>{const _=M.value;return!_?.width||!le.value?1:Math.min(le.value/_.width,1)}),G=S(()=>{const _=M.value;if(!_)return{width:"100%",height:ee.value?`${ee.value}px`:"100%"};const h=ee.value||_.height;return{width:`${Math.round(_.width*y.value)}px`,height:`${Math.round(h*y.value)}px`}}),Z=S(()=>{const _=M.value;if(!_)return{width:"100%",height:ee.value?`${ee.value}px`:"100%",border:"0"};const h=ee.value||_.height;return{width:`${_.width}px`,height:`${h}px`,transform:`scale(${y.value})`,transformOrigin:"top left",border:"0"}}),Y=S(()=>Math.round(y.value*100)),he=_=>Math.min(4,Math.max(.1,_));function ye(_){q.value=!0,y.value=he(y.value*_)}function Pe(){q.value=!1,y.value=V.value}Ee([V,M],()=>{q.value||(y.value=V.value)});let ne=null;Ee(B,_=>{ne?.disconnect(),_&&(le.value=_.clientWidth,ne=new ResizeObserver(h=>{for(const Q of h)le.value=Q.contentRect.width}),ne.observe(_))}),Le(()=>{ne?.disconnect()}),Le(()=>{D.value&&URL.revokeObjectURL(D.value)});function ke(_){if(!L.value||_.source!==L.value.contentWindow)return;const h=_.data;if(h?.type==="pickerReady"){x.value=!0,m();return}if(h?.type==="piwiContentHeight"&&typeof h.height=="number"){ee.value=Math.max(h.height,M.value?.height??0);return}if(h?.type==="piwiScrollTo"&&typeof h.y=="number"){const Q=B.value;Q&&Q.scrollTo({top:Math.max(0,h.y*y.value-80),behavior:"smooth"});return}if(h?.type==="piwiSearchResult"){xe.value=typeof h.count=="number"?h.count:0,de.value=typeof h.index=="number"?h.index:-1;return}if(h?.type==="elementPicked"&&h.attrs){const{labelText:Q,...oe}=h.attrs;A.value={...oe,accessibleName:Q??gn(oe)},j.value=pn(A.value),ue.value=null,b.value="review"}h?.type==="pickerClosed"&&R()}function O(_){L.value?.contentWindow?.postMessage(_,"*")}function m(){const _=vn({failingLocator:i.failingLocator,fromElementMatch:i.healing?.fromElementMatch??null,fromAriaSnapshot:i.healing?.fromAriaSnapshot??null});_.length&&O({type:"piwiHighlight",hints:_})}const K=U(""),xe=U(0),de=U(-1);let ce=null;Ee(K,_=>{ce&&clearTimeout(ce),ce=setTimeout(()=>O({type:"piwiSearch",q:_}),180)});function _e(){O({type:"piwiSearchNext"})}Le(()=>{ce&&clearTimeout(ce)});function Te(_){if(!s.value||b.value!=="pick-element"||!x.value||_.key!=="ArrowUp"&&_.key!=="ArrowDown")return;const h=(document.activeElement?.tagName??"").toLowerCase();if(h==="input"||h==="textarea")return;const Q=L.value?.contentWindow;Q&&(_.preventDefault(),Q.postMessage({type:"piwiPickerKey",key:_.key},"*"))}function Ce(){L.value&&(L.value.src="about:blank")}at(()=>{window.addEventListener("message",ke),window.addEventListener("keydown",Te,!0)}),Le(()=>{window.removeEventListener("message",ke),window.removeEventListener("keydown",Te,!0)});const ue=U(null),F=U(!1);function re(_){ue.value=_}const be=S(()=>dt(i.failingLocator.method,j.value)),f=Je();async function w(){if(ue.value){F.value=!0;try{(await $fetch(`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/locator-pick`,{method:"POST",body:{failingLocator:i.failingLocator,pickedLocator:ue.value,element:A.value}})).status==="ok"?d("confirmed",ue.value):f.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"}),s.value=!1}catch(_){f.add({title:"Could not save the pick",description:it(_),color:"error",icon:"i-lucide-alert-triangle"})}finally{F.value=!1}}}function R(){Ce(),s.value=!1}function N(){A.value=null,j.value=[],ue.value=null,b.value="pick-element",x.value=!1,K.value="",xe.value=0,de.value=-1;const _=o.value?.html;_&&(D.value&&URL.revokeObjectURL(D.value),D.value=E(_))}const{copy:X}=He(),W=U(null);let J=null;function fe(_,h){X(_,{toast:"Locator copied"}),W.value=h,J&&clearTimeout(J),J=setTimeout(()=>{W.value=null},2e3)}return Le(()=>{J&&clearTimeout(J)}),(_,h)=>{const Q=ve,oe=Ae,De=xt,Ve=Be,we=Pt;return n(),P(we,{open:s.value,"onUpdate:open":h[8]||(h[8]=ie=>s.value=ie),ui:{content:"max-w-6xl w-[95vw]"},onAfterLeave:R},{header:C(()=>[...h[9]||(h[9]=[u("div",null,[u("h3",{class:"text-lg font-medium"},"Pick a locator from the DOM snapshot"),u("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:C(()=>[t(a)?(n(),c("div",kn,[k(Q,{name:"i-lucide-loader",class:"size-6 animate-spin text-gray-400"}),h[10]||(h[10]=u("span",{class:"ml-2 text-sm text-gray-500"},"Loading DOM snapshot...",-1))])):t(p)?(n(),c("div",_n,[k(Q,{name:"i-lucide-alert-triangle",class:"size-8 text-red-300 mx-auto mb-2"}),h[12]||(h[12]=u("p",{class:"text-sm text-red-500"},"Failed to load snapshot",-1)),u("p",$n,v(t(p)),1),k(oe,{size:"xs",variant:"outline",color:"neutral",class:"mt-3",onClick:g},{default:C(()=>[...h[11]||(h[11]=[z("Retry",-1)])]),_:1})])):t(o)?.status!=="ok"||!t(o).html?(n(),c("div",wn,[k(Q,{name:"i-lucide-file-x",class:"size-8 text-gray-300 mx-auto mb-2"}),h[13]||(h[13]=u("p",{class:"text-sm text-gray-500"},"No DOM snapshot or ARIA data available for this execution",-1)),h[14]||(h[14]=u("p",{class:"text-xs text-gray-400 mt-1"},"This test run has no stored trace or ARIA snapshot to pick from.",-1))])):(n(),c(H,{key:3},[u("div",Cn,[t(o).source?(n(),c("div",{key:0,class:ae(["text-xs flex items-center gap-1",t(o).source==="aria"?"text-amber-600 dark:text-amber-400":"text-green-600 dark:text-green-400"])},[k(Q,{name:t(o).source==="aria"?"i-lucide-accessibility":"i-lucide-check",class:"size-3.5 shrink-0"},null,8,["name"]),t(o).source==="aria"?(n(),c(H,{key:0},[z(" Accessibility tree from the failure-time ARIA snapshot — element styles are approximate ")],64)):(n(),c(H,{key:1},[z(" Rendered from the failure-time DOM snapshot ")],64))],2)):$("",!0),t(T).length>1?(n(),c("div",Sn,[u("button",{type:"button",class:ae(["px-2 py-1 flex items-center gap-1 transition-colors",t(l)==="dom"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Rendered page from the trace",onClick:h[0]||(h[0]=ie=>I("dom"))},[k(Q,{name:"i-lucide-layout-panel-top",class:"size-3.5"}),h[15]||(h[15]=z(" DOM ",-1))],2),u("button",{type:"button",class:ae(["px-2 py-1 flex items-center gap-1 border-l border-default transition-colors",t(l)==="aria"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Accessibility tree from the ARIA snapshot",onClick:h[1]||(h[1]=ie=>I("aria"))},[k(Q,{name:"i-lucide-accessibility",class:"size-3.5"}),h[16]||(h[16]=z(" Tree ",-1))],2)])):$("",!0)]),t(M)?(n(),c("div",Tn,[k(oe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-out",title:"Zoom out",onClick:h[2]||(h[2]=ie=>ye(1/1.25))}),u("span",Ln,v(t(Y))+"%",1),k(oe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-in",title:"Zoom in",onClick:h[3]||(h[3]=ie=>ye(1.25))}),k(oe,{size:"xs",variant:"outline",color:"neutral",class:"ml-1",onClick:Pe},{default:C(()=>[...h[17]||(h[17]=[z("Fit",-1)])]),_:1}),u("span",zn,v(t(M).width)+"×"+v(t(M).height),1)])):$("",!0),t(b)==="pick-element"?(n(),c("div",In,[k(De,{modelValue:t(K),"onUpdate:modelValue":h[4]||(h[4]=ie=>ze(K)?K.value=ie:null),size:"xs",icon:"i-lucide-search",placeholder:"Find an element by its text…",class:"max-w-xs",onKeydown:pe(ge(_e,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),t(K)&&t(xe)>0?(n(),c("span",An,v(t(de)+1)+"/"+v(t(xe)),1)):t(K)?(n(),c("span",Rn,"no matches")):$("",!0),t(xe)>1?(n(),P(oe,{key:2,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-chevron-down",title:"Next match (Enter)",onClick:_e})):$("",!0)])):$("",!0),u("div",{ref_key:"stageRef",ref:B,class:ae(["relative border border-default rounded-lg overflow-auto",[t(b)==="pick-element"?"h-[75vh]":"h-80",t(M)?"bg-gray-100 dark:bg-gray-800":""]])},[t(x)?$("",!0):(n(),c("div",Bn,[k(Q,{name:"i-lucide-loader",class:"size-5 animate-spin text-gray-400"}),h[18]||(h[18]=u("span",{class:"ml-2 text-sm text-gray-500"},"Initializing picker...",-1))])),u("div",{style:Xe(t(G))},[u("iframe",{ref_key:"iframeRef",ref:L,src:t(D),style:Xe(t(Z)),class:"bg-white",sandbox:"allow-scripts",title:"DOM snapshot"},null,12,Pn)],4)],2),t(b)==="review"&&t(A)?(n(),c("div",En,[u("div",On,[k(Q,{name:"i-lucide-crosshair",class:"size-5 text-primary shrink-0"}),u("div",Un,[u("p",jn,[h[19]||(h[19]=z(" Picked: ",-1)),u("code",Mn,v(t(A).tagName),1),t(A).attributes.id?(n(),c("code",Nn,"#"+v(t(A).attributes.id),1)):$("",!0),t(A).attributes["data-testid"]?(n(),P(Ve,{key:1,size:"xs",color:"primary",variant:"subtle",class:"ml-1"},{default:C(()=>[z(v(t(A).attributes["data-testid"]),1)]),_:1})):$("",!0)]),t(A).textContent?(n(),c("p",Kn,' "'+v(t(A).textContent)+'" ',1)):$("",!0)]),k(oe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-rotate-ccw",title:"Pick a different element",onClick:N})]),u("div",Dn,[(n(!0),c(H,null,se(t(j),(ie,Fe)=>(n(),P(ut,{key:Fe,alt:ie,copied:t(W)===`picked-${Fe}`,dense:!0,selectable:!0,selected:t(ue)?.locator===ie.locator,onCopy:pt=>fe(ie.locator,`picked-${Fe}`),onSelect:pt=>re(ie)},null,8,["alt","copied","selected","onCopy","onSelect"]))),128))]),t(be).recommended?(n(),c("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:h[6]||(h[6]=ie=>re(t(be).recommended)),onKeydown:h[7]||(h[7]=pe(ge(ie=>re(t(be).recommended),["prevent"]),["enter"]))},[k(Q,{name:"i-lucide-star",class:"size-5 text-primary shrink-0"}),u("div",Vn,[u("p",Hn," Recommended (score: "+v(t(be).recommended.score)+") ",1),u("code",Fn,v(t(be).recommended.locator),1)]),k(oe,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(W)==="rec"?"i-lucide-check":"i-lucide-copy",onClick:h[5]||(h[5]=ge(ie=>fe(t(be).recommended.locator,"rec"),["stop"]))},{default:C(()=>[...h[20]||(h[20]=[z(" Copy ",-1)])]),_:1},8,["trailing-icon"])],32)):$("",!0)])):$("",!0)],64))]),footer:C(()=>[u("div",qn,[t(b)==="review"?(n(),P(oe,{key:0,size:"sm",variant:"outline",color:"neutral",icon:"i-lucide-rotate-ccw",onClick:N},{default:C(()=>[...h[21]||(h[21]=[z(" Pick a different element ",-1)])]),_:1})):(n(),c("div",Zn)),u("div",Wn,[k(oe,{size:"sm",variant:"outline",color:"neutral",onClick:R},{default:C(()=>[...h[22]||(h[22]=[z("Cancel",-1)])]),_:1}),t(b)==="review"?(n(),P(oe,{key:0,size:"sm",color:"primary",loading:t(F),disabled:!t(ue),onClick:w},{default:C(()=>[...h[23]||(h[23]=[z(" Confirm pick ",-1)])]),_:1},8,["loading","disabled"])):$("",!0)])])]),_:1},8,["open"])}}}),Gn=Object.assign(Jn,{__name:"SnapshotLocatorPicker"});function Yn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Qn(e,r){let i=0,d=null;for(let s=r;s<e.length;s++){const a=e[s];if(d){if(a==="\\"){s++;continue}a===d&&(d=null);continue}if(a==="'"||a==='"'||a==="`"){d=a;continue}if(a==="(")i++;else if(a===")"&&(i--,i===0))return s}return-1}function Xn(e,r,i){if(!e||!r||!i)return null;const d=new RegExp(`${Yn(r)}\\s*\\(`,"g");let s;for(;(s=d.exec(e))!==null;){const a=s.index,o=a>0?e[a-1]:"";if(o&&/[A-Za-z0-9_$]/.test(o))continue;const p=a+s[0].lastIndexOf("("),l=Qn(e,p);if(l===-1)return null;const g=e.slice(0,a)+i+e.slice(l+1);return g===e?null:{old:e,new:g}}return null}function eo(e,r){return`${r?`@@ ${r} @@
2
+ `:""}-${e.old.trimEnd()}
3
+ +${e.new.trimEnd()}`}function to(e,r){const i=e??{},d=r??{},s=o=>o==null?null:typeof o=="string"?o:JSON.stringify(o),a=[];for(const o of new Set([...Object.keys(i),...Object.keys(d)])){const p=s(i[o]),l=s(d[o]);p!==l&&a.push({key:o,from:p,to:l})}return a}function no(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
+ `)}const oo={key:0,class:"text-xs font-mono"},so={key:1},ao={class:"flex items-center gap-1"},ro={key:1,class:"rounded-lg border border-primary/50 bg-primary/10 p-3 mb-3 flex items-center gap-3"},io={class:"flex-1 min-w-0"},lo={class:"text-xs font-medium text-primary flex items-center gap-1.5"},co={class:"text-sm font-mono block truncate mt-0.5"},uo={key:2,class:"flex items-center gap-2 bg-elevated rounded p-2 mb-3 border border-red-200 dark:border-red-800"},fo={class:"text-xs font-mono text-red-600 dark:text-red-400 flex-1 truncate"},mo={key:4,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 mb-3 space-y-2"},po={class:"flex items-center gap-2 min-w-0"},go={key:0,class:"text-[11px] text-gray-500 truncate min-w-0"},ho={key:0,class:"rounded border border-default overflow-hidden bg-default"},vo={class:"text-sm font-mono block truncate"},yo={key:0,class:"text-xs flex flex-wrap items-center gap-x-1.5 gap-y-0.5"},xo={class:"font-mono text-gray-500"},bo={key:0,class:"font-mono text-red-500 line-through"},ko={key:1,class:"text-gray-400"},_o={key:2,class:"font-mono text-green-600 dark:text-green-400"},$o={key:3,class:"text-gray-400"},wo={key:2,class:"text-xs text-gray-500"},Co={key:3,class:"text-xs text-primary/90 flex items-center gap-1"},So={class:"flex items-center gap-2"},To={key:5,class:"rounded-lg border border-default bg-elevated p-3 mb-3 flex items-center gap-3"},Lo={class:"flex-1 min-w-0"},zo={class:"text-xs font-medium text-success-600 dark:text-success-400"},Io={class:"text-sm font-mono block truncate mt-0.5"},Ao={class:"space-y-2"},Ro={key:6,class:"mt-3"},Bo={class:"space-y-2"},Po={class:"flex items-center gap-1"},ot=3,Eo=te({__name:"LocatorHealingPanel",props:{runId:{},testRunsCaseId:{},storageKey:{},affectedCount:{}},setup(e){const r=e,i=S(()=>r.storageKey?Ke:Ne),d=S(()=>r.storageKey?{storageKey:r.storageKey}:{}),{data:s,pending:a,error:o}=Me(()=>`/api/test-runs/${r.runId}/cases/${r.testRunsCaseId}/locator-healing`,{lazy:!0},"$z1C7vU2CXe"),p=S(()=>!!s.value&&s.value.source!=="none"&&!!(s.value.fromElementMatch?.length||s.value.fromPriorSuccess?.length||s.value.fromAriaSnapshot?.length)),l=S(()=>s.value?s.value.fromElementMatch??s.value.fromPriorSuccess??s.value.fromAriaSnapshot??[]:[]),g=S(()=>l.value.find(O=>O.pickedByUser)??null),T=S(()=>s.value?.recommendation?s.value.recommendation:s.value?.priorNameMayBeStale||!l.value.length?null:dt(s.value?.failingLocator?.method,l.value)),I=S(()=>s.value?.priorNameMayBeStale&&s.value.fromPriorSuccess?.length?s.value.fromAriaSnapshot??[]:[]),b=S(()=>{const O=T.value;return O?.recommended?O.recommended.pickedByUser?"Confirmed with the locator picker on the failing page":O.preservesConvention?"Keeps your original locator style — minimal, idiomatic edit":O.suggestAddTestId?"Most stable available, but still fragile":"Most stable available — a sturdier style than the original":""}),L=S(()=>{const O=s.value?.priorNameMayBeStale,m=(()=>{switch(s.value?.source){case"prior-run":return O?"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""}})(),K=s.value?.capturedAt;return K?`${m} · captured ${Ge(K)}`:m}),x=S(()=>{if(s.value?.priorNameMayBeStale)return"text-warning-600 dark:text-warning-400";switch(s.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"}}),A=S(()=>{const O=s.value?.failingLocator;return O?`${O.method}(${JSON.stringify(O.args)})`:""}),j=Re(),{data:D}=Me(()=>`/api/test-run-cases/${r.testRunsCaseId}/traces`,{lazy:!0},"$vsBboELop9"),E=S(()=>{const O=D.value?.[0];if(!O)return null;const m=!!j.public.demoMode&&O.filePath.startsWith("demo/");return lt(O.filePath,j.app?.baseURL,m)}),B=U(!1);async function le(){await kt(`/api/test-runs/${r.runId}/cases/${r.testRunsCaseId}/locator-healing`)}const{copy:ee}=He(),y=U(null);let q=null;function M(O,m,K){ee(O,{toast:K}),y.value=m,q&&clearTimeout(q),q=setTimeout(()=>{y.value=null},2e3)}function V(O,m){M(O,m,"Locator copied")}Le(()=>{q&&clearTimeout(q)});const G=S(()=>T.value?.recommended??null),Z=S(()=>r.affectedCount&&r.affectedCount>1&&G.value?`Same break affects ${r.affectedCount} tests in this cluster — one fix`:""),Y=S(()=>{if(G.value?.pickedByUser)return"your confirmed pick";switch(s.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""}}),he=S(()=>{const O=s.value?.sourceLine,m=G.value;if(!O||!m)return null;const K=Xn(O.text,s.value?.failingLocator?.method,m.locator);return K?{edit:K,patch:eo(K,s.value?.location??null)}:null}),ye=S(()=>{if(he.value)return[];const O=s.value?.failingLocator,m=G.value;return!O||!m||m.method!==O.method?[]:to(O.args,m.args)});function Pe(){const O=G.value;!O||!s.value||M(no({location:s.value.location??null,sourceLine:s.value.sourceLine??null,failing:A.value,recommended:O.locator}),"fix-prompt","Fix prompt copied")}const ne=U(!1),ke=S(()=>ne.value?l.value:l.value.slice(0,ot));return(O,m)=>{const K=Ae,xe=bt,de=Ye,ce=ve,_e=Be,Te=tn,Ce=ut,ue=Lt;return n(),c(H,null,[!t(a)&&!t(o)&&t(p)?(n(),P(Se(t(i)),je({key:0},t(d),{icon:"i-lucide-bandage",title:"Alternative locators",count:t(l).length,help:"locator-healing"}),Ie({subtitle:C(()=>[u("span",{class:ae(t(x))},v(t(L)),3)]),default:C(()=>[t(s)?.healedInRunId?(n(),P(de,{key:0,class:"mb-3",color:"success",icon:"i-lucide-circle-check",variant:"subtle",title:"Locator healed"},{description:C(()=>[m[11]||(m[11]=z(" The recommended locator now passes at this call site — ",-1)),k(xe,{to:`/test-runs/${t(s).healedInRunId}`,class:"underline font-medium"},{default:C(()=>[z(" see run #"+v(t(s).healedInRunId),1)]),_:1},8,["to"]),m[12]||(m[12]=z(". ",-1))]),_:1})):$("",!0),t(g)?(n(),c("div",ro,[k(ce,{name:"i-lucide-user-check",class:"size-5 text-primary shrink-0"}),u("div",io,[u("p",lo,[m[14]||(m[14]=z(" Your pick ",-1)),k(_e,{size:"sm",color:"primary",variant:"subtle"},{default:C(()=>[...m[13]||(m[13]=[z("confirmed on the failing page",-1)])]),_:1})]),u("code",co,v(t(g).locator),1)]),k(K,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(y)==="user-pick"?"i-lucide-check":"i-lucide-copy",onClick:m[1]||(m[1]=F=>V(t(g).locator,"user-pick"))},{default:C(()=>[...m[15]||(m[15]=[z(" Copy ",-1)])]),_:1},8,["trailing-icon"])])):$("",!0),t(s)?.failingLocator?(n(),c("div",uo,[k(ce,{name:"i-lucide-x-circle",class:"size-4 text-red-500 shrink-0"}),u("code",fo,v(t(A)),1),k(K,{size:"xs",variant:"ghost",color:"neutral",icon:t(y)==="failing"?"i-lucide-check":"i-lucide-copy",title:t(y)==="failing"?"Copied!":"Copy",onClick:m[2]||(m[2]=F=>V(t(A),"failing"))},null,8,["icon","title"])])):$("",!0),t(s)?.priorNameMayBeStale?(n(),P(de,{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."})):$("",!0),t(G)?(n(),c("div",mo,[u("div",po,[k(ce,{name:"i-lucide-star",class:"size-4 text-primary shrink-0"}),m[16]||(m[16]=u("p",{class:"text-xs font-medium text-primary shrink-0"},"Recommended fix",-1)),t(Y)?(n(),c("span",go," · "+v(t(Y)),1)):$("",!0),m[17]||(m[17]=u("span",{class:"flex-1"},null,-1)),k(_e,{size:"xs",color:"primary",variant:"subtle",class:"font-mono tabular-nums shrink-0"},{default:C(()=>[z(v(t(G).score),1)]),_:1})]),t(he)?(n(),c("div",ho,[k(Te,{patch:t(he).patch},null,8,["patch"])])):(n(),c(H,{key:1},[u("code",vo,v(t(G).locator),1),t(ye).length?(n(),c("p",yo,[(n(!0),c(H,null,se(t(ye),(F,re)=>(n(),c(H,{key:re},[u("span",xo,v(F.key)+":",1),F.from?(n(),c("span",bo,v(F.from),1)):(n(),c("span",ko,"—")),k(ce,{name:"i-lucide-arrow-right",class:"size-3 text-gray-400"}),F.to?(n(),c("span",_o,v(F.to),1)):(n(),c("span",$o,"removed"))],64))),128))])):$("",!0)],64)),t(b)?(n(),c("p",wo,v(t(b)),1)):$("",!0),t(Z)?(n(),c("p",Co,[k(ce,{name:"i-lucide-layers",class:"size-3 shrink-0"}),z(v(t(Z)),1)])):$("",!0),u("div",So,[k(K,{size:"xs",color:"primary",variant:"solid","trailing-icon":t(y)==="top"?"i-lucide-check":"i-lucide-copy",onClick:m[3]||(m[3]=F=>V(t(G).locator,"top"))},{default:C(()=>[...m[18]||(m[18]=[z(" Copy locator ",-1)])]),_:1},8,["trailing-icon"]),k(K,{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:Pe},{default:C(()=>[...m[19]||(m[19]=[z(" Copy fix prompt ",-1)])]),_:1},8,["icon"])])])):$("",!0),t(T)?.hasDurableAlternative&&t(T).durable?(n(),c("div",To,[k(ce,{name:"i-lucide-shield-check",class:"size-5 text-success shrink-0"}),u("div",Lo,[u("p",zo," Most stable option (score: "+v(t(T).durable.score)+") ",1),u("code",Io,v(t(T).durable.locator),1),m[20]||(m[20]=u("p",{class:"text-xs text-gray-500 mt-0.5"},"Sturdier, but changes the locator style",-1))]),k(K,{size:"sm",color:"neutral",variant:"outline","trailing-icon":t(y)==="durable"?"i-lucide-check":"i-lucide-copy",onClick:m[4]||(m[4]=F=>V(t(T).durable.locator,"durable"))},{default:C(()=>[...m[21]||(m[21]=[z(" Copy ",-1)])]),_:1},8,["trailing-icon"])])):$("",!0),u("div",Ao,[m[22]||(m[22]=u("p",{class:"text-xs font-medium text-gray-500"},"All alternatives",-1)),(n(!0),c(H,null,se(t(ke),(F,re)=>(n(),P(Ce,{key:re,alt:F,copied:t(y)===`alt-${re}`,onCopy:be=>V(F.locator,`alt-${re}`)},null,8,["alt","copied","onCopy"]))),128)),t(l).length>ot?(n(),P(K,{key:0,size:"xs",variant:"ghost",color:"neutral",block:"",icon:t(ne)?"i-lucide-chevron-up":"i-lucide-chevron-down",onClick:m[5]||(m[5]=F=>ne.value=!t(ne))},{default:C(()=>[z(v(t(ne)?"Show fewer":`Show all ${t(l).length} alternatives`),1)]),_:1},8,["icon"])):$("",!0)]),t(I).length?(n(),c("div",Ro,[m[23]||(m[23]=u("p",{class:"text-xs font-medium text-gray-500 mb-2"},"From the failing page",-1)),u("div",Bo,[(n(!0),c(H,null,se(t(I),(F,re)=>(n(),P(Ce,{key:re,alt:F,note:"candidate from the failure-time ARIA snapshot",copied:t(y)===`supp-${re}`,onCopy:be=>V(F.locator,`supp-${re}`)},null,8,["alt","copied","onCopy"]))),128))])])):$("",!0),t(T)?.suggestAddTestId?(n(),P(de,{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."})):$("",!0),t(s)?.source==="aria-snapshot"?(n(),P(de,{key:8,class:"mt-3",color:"info",icon:"i-lucide-info",variant:"subtle"},{description:C(()=>[m[25]||(m[25]=z(" No HTML attributes were available. ",-1)),k(ue,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:C(()=>[...m[24]||(m[24]=[z("Enable Piwi fixture capture",-1)])]),_:1}),m[26]||(m[26]=z(" for full alternatives including data-testid and CSS selectors. ",-1))]),_:1})):$("",!0)]),_:2},[e.storageKey?{name:"folded",fn:C(()=>[t(T)?.recommended?(n(),c("code",oo,v(t(T).recommended.locator),1)):(n(),c("span",so,v(t(l).length)+" alternative"+v(t(l).length===1?"":"s"),1))]),key:"0"}:void 0,t(E)||t(s)?.failingLocator?{name:"actions",fn:C(()=>[u("div",ao,[t(s)?.failingLocator?(n(),P(K,{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:m[0]||(m[0]=F=>B.value=!0)},{default:C(()=>[...m[9]||(m[9]=[z(" Pick from snapshot ",-1)])]),_:1})):$("",!0),t(E)?(n(),P(K,{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:C(()=>[...m[10]||(m[10]=[z(" Pick from trace ",-1)])]),_:1},8,["to"])):$("",!0)])]),key:"1"}:void 0]),1040,["count"])):!t(a)&&!t(o)&&!t(p)?(n(),P(Se(t(i)),je({key:1},t(d),{icon:"i-lucide-bandage",title:"Alternative locators",subtitle:"No alternatives available",help:"locator-healing"}),Ie({default:C(()=>[k(de,{color:"neutral",icon:"i-lucide-info",variant:"subtle"},{description:C(()=>[m[31]||(m[31]=z(" No pre-captured alternatives — this locator has never passed in a previous run. ",-1)),k(ue,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:C(()=>[...m[30]||(m[30]=[z("Enable Piwi dashboard fixtures",-1)])]),_:1}),m[32]||(m[32]=z(" 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:C(()=>[m[27]||(m[27]=u("span",null,"No alternatives available",-1))]),key:"0"}:void 0,t(E)||t(s)?.failingLocator?{name:"actions",fn:C(()=>[u("div",Po,[t(s)?.failingLocator?(n(),P(K,{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:m[6]||(m[6]=F=>B.value=!0)},{default:C(()=>[...m[28]||(m[28]=[z(" Pick from snapshot ",-1)])]),_:1})):$("",!0),t(E)?(n(),P(K,{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:C(()=>[...m[29]||(m[29]=[z(" Pick from trace ",-1)])]),_:1},8,["to"])):$("",!0)])]),key:"1"}:void 0]),1040)):$("",!0),t(s)?.failingLocator?(n(),P(Gn,{key:2,open:t(B),"onUpdate:open":m[7]||(m[7]=F=>ze(B)?B.value=F:null),"run-id":e.runId,"test-runs-case-id":e.testRunsCaseId,"failing-locator":t(s).failingLocator,healing:t(s),onConfirmed:le,onClose:m[8]||(m[8]=F=>B.value=!1)},null,8,["open","run-id","test-runs-case-id","failing-locator","healing"])):$("",!0)],64)}}}),Pa=Object.assign(Eo,{__name:"LocatorHealingPanel"}),Oo={key:1,class:"space-y-2"},Uo={class:"text-xs font-medium text-gray-500 dark:text-gray-400 sm:w-40 shrink-0"},jo={class:"flex flex-wrap items-center gap-1.5 min-w-0 text-xs font-mono"},Mo={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"},No={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"},Ko={key:0,class:"text-xs text-gray-400 dark:text-gray-500"},Do={key:0},Vo=te({__name:"EnvironmentDiffCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const i=e,d=S(()=>i.storageKey?Ke:Ne),s=S(()=>i.storageKey?{storageKey:i.storageKey}:{}),{data:a,pending:o,error:p}=Me(()=>`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/environment-diff`,{lazy:!0},"$yASgALxNz3"),l=S(()=>a.value?.entries??[]),g=S(()=>l.value.filter(x=>!x.informational)),T=S(()=>l.value.filter(x=>x.informational)),I=S(()=>{const x=a.value?.baseline;if(!x)return"";const A=x.startTime?` · ${Ge(new Date(x.startTime))}`:"";return`vs last pass in run #${x.runId}${A}`}),b=S(()=>{if(a.value?.status!=="ok")return"No passing baseline to compare against";const x=g.value.length;return x===0?"Identical to last pass — no environment drift":`${x} change${x===1?"":"s"}: ${g.value.map(A=>A.label).join(", ")}`}),L=U(null);return r({reveal:()=>L.value?.reveal?.()}),(x,A)=>{const j=Ye,D=ve;return!t(o)&&!t(p)&&t(a)?.status==="ok"?(n(),P(Se(t(d)),je({key:0,ref_key:"card",ref:L},t(s),{icon:"i-lucide-git-compare-arrows",title:"Environment diff",count:t(g).length||void 0,help:"environment-diff",subtitle:t(I)}),Ie({default:C(()=>[t(l).length===0?(n(),P(j,{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(),c("div",Oo,[(n(!0),c(H,null,se(t(g),E=>(n(),c("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"},[u("span",Uo,v(E.label),1),u("div",jo,[u("code",Mo,v(E.failing??"(unset)"),1),k(D,{name:"i-lucide-arrow-left",class:"size-3 shrink-0 text-gray-400"}),u("code",No,v(E.baseline??"(unset)"),1)])]))),128)),t(T).length>0?(n(),c("p",Ko,[A[0]||(A[0]=z(" Also changed (varies naturally between runs): ",-1)),(n(!0),c(H,null,se(t(T),(E,B)=>(n(),c("span",{key:E.key},[z(v(E.label.toLowerCase())+" "+v(E.baseline??"—")+" → "+v(E.failing??"—"),1),B<t(T).length-1?(n(),c("span",Do,", ")):$("",!0)]))),128))])):$("",!0)]))]),_:2},[e.storageKey?{name:"folded",fn:C(()=>[u("span",null,v(t(b)),1)]),key:"0"}:void 0]),1040,["count","subtitle"])):$("",!0)}}}),Ea=Object.assign(Vo,{__name:"EnvironmentDiffCard"}),Ho={class:"absolute top-4 left-4 text-white/70 text-sm font-medium"},Fo=["src","alt"],qo=te({__name:"ScreenshotLightbox",props:{images:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:r}){const i=e,d=r,s=S(()=>i.modelValue!==null);function a(){d("update:modelValue",null)}function o(){i.modelValue!==null&&i.modelValue>0&&d("update:modelValue",i.modelValue-1)}function p(){i.modelValue!==null&&i.modelValue<i.images.length-1&&d("update:modelValue",i.modelValue+1)}const l=S(()=>i.modelValue===null?null:i.images[i.modelValue]??null);function g(T){s.value&&(T.key==="Escape"&&a(),T.key==="ArrowLeft"&&o(),T.key==="ArrowRight"&&p())}return at(()=>window.addEventListener("keydown",g)),_t(()=>window.removeEventListener("keydown",g)),(T,I)=>{const b=ve;return n(),P($t,{to:"body"},[k(wt,{name:"lightbox"},{default:C(()=>[s.value?(n(),c("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/90",onClick:ge(a,["self"])},[u("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},[k(b,{name:"i-lucide-x",class:"size-6"})]),u("div",Ho,v((e.modelValue??0)+1)+" / "+v(e.images.length),1),e.images.length>1&&(e.modelValue??0)>0?(n(),c("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:o},[k(b,{name:"i-lucide-chevron-left",class:"size-6"})])):$("",!0),l.value?(n(),c("img",{key:1,src:l.value.src,alt:l.value.name,class:"max-h-[90vh] max-w-[90vw] object-contain rounded-lg",onClick:I[0]||(I[0]=ge(()=>{},["stop"]))},null,8,Fo)):$("",!0),e.images.length>1&&(e.modelValue??0)<e.images.length-1?(n(),c("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:p},[k(b,{name:"i-lucide-chevron-right",class:"size-6"})])):$("",!0)])):$("",!0)]),_:1})])}}}),mt=Object.assign(Ct(qo,[["__scopeId","data-v-c02b1e9b"]]),{__name:"ScreenshotLightbox"}),Zo={class:"flex justify-end mb-2"},Wo={key:1,class:"rounded overflow-hidden border border-default bg-gray-50 dark:bg-gray-900"},Jo=["src"],Go={key:2,class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},Yo={class:"rounded overflow-hidden border border-red-200 dark:border-red-900 bg-gray-50 dark:bg-gray-900"},Qo=["src"],Xo={class:"rounded overflow-hidden border border-green-200 dark:border-green-900 bg-gray-50 dark:bg-gray-900"},es={class:"px-2 py-1 text-[10px] font-medium text-green-600 dark:text-green-400"},ts=["src"],ns=te({__name:"VisualDiffCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const i=e,d=S(()=>i.storageKey?Ke:Ne),s=S(()=>i.storageKey?{storageKey:i.storageKey}:{}),a=Re(),{data:o,pending:p,error:l}=Me(()=>`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/visual-diff`,{lazy:!0},"$nTbSHl3faK"),g=S(()=>o.value?.status==="ok"?o.value.diff??null:null),T=U("overlay"),I=[{label:"Overlay",value:"overlay"},{label:"Side by side",value:"side-by-side"}],b=S(()=>g.value?Ue(g.value.path,"image/png",a.app?.baseURL):""),L=S(()=>g.value?Ue(g.value.failingPath,null,a.app?.baseURL):""),x=S(()=>g.value?Ue(g.value.baselinePath,null,a.app?.baseURL):""),A=S(()=>g.value?(g.value.changedPixelRatio*100).toFixed(2):"0"),j=S(()=>{const ee=g.value?.changedPixelRatio??0;return ee>.1?"error":ee>.01?"warning":"success"}),D=S(()=>g.value?g.value.dimensionMismatch?`${A.value}% changed — dimensions differ, unreliable`:`${A.value}% of pixels changed vs last pass`:"No comparable screenshots"),E=S(()=>g.value?[{src:L.value,name:"Failing screenshot"},{src:x.value,name:"Last passing screenshot"},{src:b.value,name:"Diff overlay"}]:[]),B=U(null),le=U(null);return r({reveal:()=>le.value?.reveal?.()}),(ee,y)=>{const q=Be,M=Ye,V=Et,G=mt;return!t(p)&&!t(l)&&t(g)?(n(),P(Se(t(d)),je({key:0,ref_key:"card",ref:le},t(s),{icon:"i-lucide-images",title:"Visual diff",help:"visual-diff"}),Ie({subtitle:C(()=>[u("span",null,"vs last pass in run #"+v(t(g).baselineRunId),1)]),actions:C(()=>[k(q,{color:t(j),variant:"subtle",size:"sm",class:"font-mono tabular-nums"},{default:C(()=>[z(v(t(A))+"% changed ",1)]),_:1},8,["color"])]),default:C(()=>[t(g).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."})):$("",!0),u("div",Zo,[k(V,{modelValue:t(T),"onUpdate:modelValue":y[0]||(y[0]=Z=>ze(T)?T.value=Z:null),items:I,size:"xs",content:!1,ui:{list:"overflow-x-auto",trigger:"shrink-0"}},null,8,["modelValue"])]),t(T)==="overlay"?(n(),c("div",Wo,[u("img",{src:t(b),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]=Z=>B.value=2),onKeydown:[y[2]||(y[2]=pe(Z=>B.value=2,["enter"])),y[3]||(y[3]=pe(ge(Z=>B.value=2,["prevent"]),["space"]))]},null,40,Jo),y[11]||(y[11]=u("p",{class:"px-2 py-1 text-[10px] text-gray-500"},"Red pixels mark differences against the last passing run",-1))])):(n(),c("div",Go,[u("div",Yo,[y[12]||(y[12]=u("p",{class:"px-2 py-1 text-[10px] font-medium text-red-600 dark:text-red-400"},"Failing",-1)),u("img",{src:t(L),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]=Z=>B.value=0),onKeydown:[y[5]||(y[5]=pe(Z=>B.value=0,["enter"])),y[6]||(y[6]=pe(ge(Z=>B.value=0,["prevent"]),["space"]))]},null,40,Qo)]),u("div",Xo,[u("p",es," Last pass (run #"+v(t(g).baselineRunId)+") ",1),u("img",{src:t(x),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]=Z=>B.value=1),onKeydown:[y[8]||(y[8]=pe(Z=>B.value=1,["enter"])),y[9]||(y[9]=pe(ge(Z=>B.value=1,["prevent"]),["space"]))]},null,40,ts)])])),k(G,{modelValue:t(B),"onUpdate:modelValue":y[10]||(y[10]=Z=>ze(B)?B.value=Z:null),images:t(E)},null,8,["modelValue","images"])]),_:2},[e.storageKey?{name:"folded",fn:C(()=>[u("span",null,v(t(D)),1)]),key:"0"}:void 0]),1040)):$("",!0)}}}),Oa=Object.assign(ns,{__name:"VisualDiffCard"}),os={class:"max-h-96 overflow-y-auto"},ss={key:0,class:"mt-2 text-xs text-gray-400 dark:text-gray-500"},Ze=2e4,as=te({__name:"DomSnapshotCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const i=e,d=S(()=>i.storageKey?Ke:Ne),s=S(()=>i.storageKey?{storageKey:i.storageKey}:{}),{data:a,pending:o,error:p}=Me(()=>`/api/test-runs/${i.runId}/cases/${i.testRunsCaseId}/dom-snapshot`,{lazy:!0},"$AxHFpokm2o"),l=S(()=>(a.value?.html??"").slice(0,Ze)),g=S(()=>(a.value?.html?.length??0)>Ze),T=S(()=>{const x=a.value;return!x||x.status!=="ok"?"":`${Math.round((x.html?.length??0)/1024)} KB · rendered from the uploaded trace${x.snapshotName?` (${x.snapshotName})`:""}`}),{copy:I,copied:b}=He(),L=U(null);return r({reveal:()=>L.value?.reveal?.()}),(x,A)=>{const j=Ae,D=Ot,E=Ut;return!t(o)&&!t(p)&&t(a)?.status==="ok"&&t(a).html?(n(),P(Se(t(d)),je({key:0,ref_key:"card",ref:L},t(s),{icon:"i-lucide-file-code",title:"DOM snapshot",help:"dom-snapshot",subtitle:t(T)}),Ie({actions:C(()=>[k(D,{text:t(b)?"Copied!":"Copy full HTML"},{default:C(()=>[k(j,{size:"xs",variant:"ghost",color:"neutral",icon:t(b)?"i-lucide-check":"i-lucide-clipboard",onClick:A[0]||(A[0]=B=>t(I)(t(a).html))},null,8,["icon"])]),_:1},8,["text"])]),default:C(()=>[u("div",os,[k(E,{code:t(l),lang:"xml"},null,8,["code"])]),t(g)||t(a).truncated?(n(),c("p",ss,[t(g)?(n(),c(H,{key:0},[z("Showing the first "+v(Math.round(Ze/1e3))+"k characters — use Copy for the full document.",1)],64)):(n(),c(H,{key:1},[z("The snapshot was truncated to its size cap.")],64))])):$("",!0)]),_:2},[e.storageKey?{name:"folded",fn:C(()=>[u("span",null,"Failure-time HTML extracted from the trace — "+v(Math.round((t(a).html.length??0)/1024))+" KB",1)]),key:"0"}:void 0]),1040,["subtitle"])):$("",!0)}}}),Ua=Object.assign(as,{__name:"DomSnapshotCard"}),rs={class:"rounded-md border border-default overflow-hidden"},is={class:"text-xs font-semibold text-gray-600 dark:text-gray-300 flex-1"},ls={key:0,class:"text-gray-400 font-normal ml-1"},cs={key:0},us=te({__name:"TestEvidenceSection",props:We({icon:{},label:{},count:{},collapsible:{type:Boolean}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(e){const r=e,i=st(e,"open"),d=S(()=>r.collapsible===!1||i.value);return(s,a)=>{const o=ve;return n(),c("div",rs,[(n(),P(Se(e.collapsible===!1?"div":"button"),{class:ae(["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]=p=>e.collapsible!==!1&&(i.value=!i.value))},{default:C(()=>[k(o,{name:e.icon,class:"size-3.5 shrink-0 text-primary/70"},null,8,["name"]),u("span",is,[z(v(e.label),1),e.count!=null?(n(),c("span",ls,"("+v(e.count)+")",1)):$("",!0)]),e.collapsible!==!1?(n(),P(o,{key:0,name:i.value?"i-lucide-chevron-up":"i-lucide-chevron-down",class:"size-3.5 text-gray-400"},null,8,["name"])):$("",!0)]),_:1},8,["class"])),t(d)?(n(),c("div",cs,[Oe(s.$slots,"default")])):$("",!0)])}}}),Qe=Object.assign(us,{__name:"TestEvidenceSection"}),ds={class:"grid grid-cols-2 gap-2 p-2 bg-gray-50 dark:bg-gray-900"},fs=["aria-label","onClick","onKeydown"],ms=["src","alt"],ps={class:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/30"},gs={class:"absolute bottom-0 inset-x-0 px-1.5 py-0.5 text-[10px] text-white bg-black/50 truncate"},hs=te({__name:"TestEvidenceScreenshots",props:{attachments:{}},setup(e){const r=e,i=Re();function d(o){return o.split("/").pop()||o}const s=S(()=>r.attachments.filter(o=>Mt(o.path,o.contentType)).map(o=>({src:Ue(o.path,o.contentType,i.app?.baseURL),name:o.name||d(o.path)}))),a=U(null);return(o,p)=>{const l=ve,g=mt,T=Qe;return t(s).length>0?(n(),P(T,{key:0,icon:"i-lucide-image",label:"Screenshots",count:t(s).length,collapsible:!1},{default:C(()=>[u("div",ds,[(n(!0),c(H,null,se(t(s),(I,b)=>(n(),c("div",{key:I.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 ${I.name}`,onClick:L=>a.value=b,onKeydown:[pe(L=>a.value=b,["enter"]),pe(ge(L=>a.value=b,["prevent"]),["space"])]},[u("img",{src:I.src,alt:I.name,class:"w-full h-28 object-cover object-top transition-opacity group-hover:opacity-80",loading:"lazy"},null,8,ms),u("div",ps,[k(l,{name:"i-lucide-zoom-in",class:"size-5 text-white"})]),u("p",gs,v(I.name),1)],40,fs))),128))]),k(g,{modelValue:t(a),"onUpdate:modelValue":p[0]||(p[0]=I=>ze(a)?a.value=I:null),images:t(s)},null,8,["modelValue","images"])]),_:1},8,["count"])):$("",!0)}}}),ja=Object.assign(hs,{__name:"TestEvidenceScreenshots"}),vs={class:"m-0"},ys={class:"bg-black rounded overflow-hidden"},xs=["src"],bs=["title"],ks=te({__name:"VideoPlayer",props:{src:{},label:{}},setup(e){return(r,i)=>(n(),c("figure",vs,[u("div",ys,[u("video",{src:e.src,controls:"",preload:"metadata",class:"w-full max-h-96"}," Your browser does not support the video tag. ",8,xs)]),e.label?(n(),c("figcaption",{key:0,class:"mt-1 text-xs text-gray-400 truncate",title:e.label},v(e.label),9,bs)):$("",!0)]))}}),_s=Object.assign(ks,{__name:"VideoPlayer"}),$s={class:"space-y-2 p-2 bg-gray-50 dark:bg-gray-900"},ws=te({__name:"TestEvidenceVideos",props:{attachments:{}},setup(e){const r=e,i=Re();function d(a){return a.split("/").pop()||a}const s=S(()=>r.attachments.filter(a=>Nt(a.path,a.contentType)).map(a=>({src:Ue(a.path,a.contentType,i.app?.baseURL),name:a.name||d(a.path)})));return(a,o)=>{const p=_s,l=Qe;return t(s).length>0?(n(),P(l,{key:0,icon:"i-lucide-video",label:"Videos",count:t(s).length,collapsible:!1},{default:C(()=>[u("div",$s,[(n(!0),c(H,null,se(t(s),g=>(n(),P(p,{key:g.src,src:g.src,label:g.name},null,8,["src","label"]))),128))])]),_:1},8,["count"])):$("",!0)}}}),Ma=Object.assign(ws,{__name:"TestEvidenceVideos"}),Cs={class:"flex items-center justify-between gap-2"},Ss={class:"flex items-center gap-2 min-w-0"},Ts={class:"text-sm truncate"},Ls={key:0,class:"text-xs text-gray-400 shrink-0"},zs={key:1,class:"text-xs text-gray-400 shrink-0"},Is={class:"flex items-center gap-1.5 shrink-0"},As=te({__name:"TraceListItem",props:{trace:{},showTime:{type:Boolean,default:!0}},setup(e){const r=e,i=Re(),d=S(()=>(i.app?.baseURL??"/").replace(/\/$/,"")),s=S(()=>!!i.public.demoMode&&r.trace.filePath.startsWith("demo/")),a=S(()=>r.trace.filePath.split("/").pop()||r.trace.filePath),o=S(()=>lt(r.trace.filePath,i.app?.baseURL,s.value)),p=S(()=>s.value?`${d.value}/${r.trace.filePath}`:`${d.value}/api/files/${Bt(r.trace.filePath)}`);return(l,g)=>{const T=ve,I=Ae;return n(),c("div",Cs,[u("div",Ss,[k(T,{name:"i-lucide-file-archive",class:"size-4 text-gray-400 shrink-0"}),u("span",Ts,v(t(a)),1),e.trace.size?(n(),c("span",Ls,v(("formatBytes"in l?l.formatBytes:t(Kt))(e.trace.size)),1)):$("",!0),e.showTime?(n(),c("span",zs,v(("formatRelativeTime"in l?l.formatRelativeTime:t(Ge))(e.trace.createdAt)),1)):$("",!0)]),u("div",Is,[k(I,{to:t(o),target:"_blank",icon:"i-lucide-bug-play",size:"xs",label:"View trace"},null,8,["to"]),k(I,{to:t(p),target:"_blank",icon:"i-lucide-download",size:"xs",color:"neutral",variant:"soft",label:"Download"},null,8,["to"])])])}}}),Rs=Object.assign(As,{__name:"TraceListItem"}),Bs={key:0,class:"flex items-center justify-center py-4"},Ps={key:1,class:"divide-y divide-default"},Es=te({__name:"TestEvidenceTraces",props:{traces:{},loading:{type:Boolean}},setup(e){return(r,i)=>{const d=ve,s=Rs,a=Qe;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:C(()=>[e.loading&&!e.traces.length?(n(),c("div",Bs,[k(d,{name:"i-lucide-loader-circle",class:"size-4 animate-spin text-gray-400"})])):(n(),c("div",Ps,[(n(!0),c(H,null,se(e.traces,o=>(n(),P(s,{key:o.id,trace:o,class:"px-3 py-2"},null,8,["trace"]))),128))]))]),_:1},8,["count"])):$("",!0)}}}),Na=Object.assign(Es,{__name:"TestEvidenceTraces"}),Os={class:"space-y-2"},Us={key:0,class:"rounded-lg border border-default overflow-hidden"},js=["title"],Ms={key:2,class:"truncate text-gray-400 dark:text-gray-500"},Ns={class:"font-mono"},Ks={key:0,class:"overflow-x-auto text-xs font-mono leading-relaxed py-1"},Ds={class:"min-w-max"},Vs={key:1,class:"rounded-lg border border-dashed border-default"},Hs=["onClick"],Fs={key:0,class:"px-3 pb-2 space-y-1"},qs=["title"],Zs={key:0,class:"truncate font-mono shrink-0"},Ws=te({__name:"TraceCallStack",props:{frames:{},projectKey:{},projectName:{}},setup(e){const r=e,i=S(()=>{if(!r.frames.some(I=>I.inProject))return r.frames.map((I,b)=>({kind:"frame",frame:I,frameIndex:b}));const l=[];let g=[];const T=()=>{g.length!==0&&(l.push({kind:"group",frames:g,key:`group-${l.length}`}),g=[])};return r.frames.forEach((I,b)=>{I.inProject?(T(),l.push({kind:"frame",frame:I,frameIndex:b})):g.push(I)}),T(),l}),d=S(()=>{const p=r.frames.findIndex(l=>l.inProject);return p>=0?p:0}),s=U(new Set);function a(p){const l=new Set(s.value);l.has(p)?l.delete(p):l.add(p),s.value=l}function o(p){return p.source?p.source.lines.map((l,g)=>{const T=p.source.startLine+g;return{lineNo:T,text:l,failing:T===p.line}}):[]}return(p,l)=>{const g=ve,T=ct,I=Be;return n(),c("div",Os,[(n(!0),c(H,null,se(t(i),b=>(n(),c(H,{key:b.kind==="frame"?`f-${b.frameIndex}`:b.key},[b.kind==="frame"?(n(),c("div",Us,[u("div",{class:ae(["flex items-center gap-2 px-3 py-1.5 bg-elevated/40 text-xs",b.frame.source?"border-b border-default":""])},[k(g,{name:b.frameIndex===t(d)?"i-lucide-circle-x":"i-lucide-corner-left-up",class:ae([b.frameIndex===t(d)?"text-red-500":"text-gray-400","size-3.5 shrink-0"])},null,8,["name","class"]),b.frame.inProject?(n(),P(T,{key:0,"file-path":b.frame.file,line:b.frame.line,column:b.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(),c("code",{key:1,class:"truncate text-gray-500 dark:text-gray-400",title:b.frame.absFile||b.frame.file},v(b.frame.file)+":"+v(b.frame.line),9,js)),b.frame.functionName?(n(),c("span",Ms,[l[0]||(l[0]=z(" in ",-1)),u("span",Ns,v(b.frame.functionName),1)])):$("",!0),k(I,{color:b.frameIndex===t(d)?"error":"neutral",variant:"subtle",size:"xs",class:"ml-auto shrink-0"},{default:C(()=>[z(v(b.frameIndex===t(d)?"Failed here":"Caller"),1)]),_:2},1032,["color"])],2),b.frame.source?(n(),c("div",Ks,[u("div",Ds,[(n(!0),c(H,null,se(o(b.frame),L=>(n(),c("div",{key:L.lineNo,class:ae(["px-3 whitespace-pre flex",L.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"])},[u("span",{class:ae(["w-10 shrink-0 text-right pr-3 tabular-nums select-none",L.failing?"text-red-400 dark:text-red-500":"text-gray-300 dark:text-gray-600"])},v(L.lineNo),3),u("span",null,v(L.text),1)],2))),128))])])):$("",!0)])):(n(),c("div",Vs,[u("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:L=>a(b.key)},[k(g,{name:t(s).has(b.key)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5 shrink-0"},null,8,["name"]),z(" "+v(b.frames.length)+" frame"+v(b.frames.length===1?"":"s")+" in dependencies ",1)],8,Hs),t(s).has(b.key)?(n(),c("div",Fs,[(n(!0),c(H,null,se(b.frames,(L,x)=>(n(),c("div",{key:x,class:"flex items-center gap-2 text-xs text-gray-400 dark:text-gray-500 min-w-0"},[k(g,{name:"i-lucide-corner-left-up",class:"size-3 shrink-0"}),u("code",{class:"truncate",title:L.absFile||L.file},v(L.file)+":"+v(L.line),9,qs),L.functionName?(n(),c("span",Zs,v(L.functionName),1)):$("",!0)]))),128))])):$("",!0)]))],64))),128))])}}}),Ka=Object.assign(Ws,{__name:"TraceCallStack"}),Js={class:"space-y-2"},Gs={class:"flex items-center gap-2 px-3 py-1.5 bg-elevated/40 border-b border-default text-xs"},Ys={class:"overflow-x-auto text-xs font-mono leading-relaxed py-1"},Qs={class:"min-w-max"},Xs=te({__name:"TestSourceStack",props:{frames:{},projectKey:{},projectName:{}},setup(e){function r(i){return i.split(`
5
+ `).map(d=>({text:d,failing:d.startsWith(">")}))}return(i,d)=>{const s=ve,a=ct,o=Be;return n(),c("div",Js,[(n(!0),c(H,null,se(e.frames,(p,l)=>(n(),c("div",{key:`${p.file}:${p.line}:${l}`,class:"rounded-lg border border-default overflow-hidden"},[u("div",Gs,[k(s,{name:l===0?"i-lucide-circle-x":"i-lucide-corner-left-up",class:ae([l===0?"text-red-500":"text-gray-400","size-3.5 shrink-0"])},null,8,["name","class"]),k(a,{"file-path":p.file,line:p.line,"project-key":e.projectKey,"project-name":e.projectName,class:"min-w-0"},null,8,["file-path","line","project-key","project-name"]),k(o,{color:l===0?"error":"neutral",variant:"subtle",size:"xs",class:"ml-auto shrink-0"},{default:C(()=>[z(v(l===0?"Failed here":"Caller"),1)]),_:2},1032,["color"])]),u("div",Ys,[u("div",Qs,[(n(!0),c(H,null,se(r(p.snippet),(g,T)=>(n(),c("div",{key:T,class:ae(["px-3 whitespace-pre",g.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"])},v(g.text),3))),128))])])]))),128))])}}}),Da=Object.assign(Xs,{__name:"TestSourceStack"}),ea={class:"space-y-3 text-sm"},ta={key:0,class:"flex flex-col gap-0.5"},na={class:"text-xs font-mono break-all"},oa={key:1,class:"flex flex-col gap-0.5"},sa={class:"text-xs font-mono break-all"},aa={class:"grid grid-cols-1 gap-3 sm:grid-cols-2"},ra={class:"text-xs font-medium text-gray-500 dark:text-gray-400"},ia={key:0,class:"text-xs text-gray-400"},la={key:1,class:"mt-1 space-y-0.5"},ca={class:"text-gray-400"},ua={class:"text-xs font-medium text-gray-500 dark:text-gray-400"},da={key:0,class:"text-xs text-gray-400"},fa={key:1,class:"mt-1 space-y-0.5"},ma={key:0,class:"text-gray-400"},pa={class:"text-gray-400"},ga=te({__name:"PageStateCard",props:{pageState:{},storageKey:{},plain:{type:Boolean}},setup(e){const r=e,i=S(()=>r.plain?"div":r.storageKey?Ke:Ne),d=S(()=>r.plain?{}:{icon:"i-lucide-database",title:"App state at test end",help:"page-state",...r.storageKey?{storageKey:r.storageKey}:{}}),s=o=>[o.httpOnly?"HttpOnly":null,o.secure?"Secure":null,o.sameSite??null].filter(Boolean).join(", "),a=S(()=>{const o=r.pageState;return[`${o.localStorage.length} localStorage`,`${o.sessionStorage.length} sessionStorage`,`${o.cookies.length} cookie${o.cookies.length===1?"":"s"}`].join(" · ")});return(o,p)=>(n(),P(Se(t(i)),St(Tt(t(d))),Ie({default:C(()=>[u("div",ea,[e.pageState.url?(n(),c("div",ta,[p[0]||(p[0]=u("span",{class:"text-xs font-medium text-gray-500 dark:text-gray-400"},"URL",-1)),u("code",na,v(e.pageState.url)+v(e.pageState.hash??""),1)])):$("",!0),e.pageState.historyState?(n(),c("div",oa,[p[1]||(p[1]=u("span",{class:"text-xs font-medium text-gray-500 dark:text-gray-400"},"History state",-1)),u("code",sa,v(e.pageState.historyState),1)])):$("",!0),u("div",aa,[(n(!0),c(H,null,se({localStorage:e.pageState.localStorage,sessionStorage:e.pageState.sessionStorage},(l,g)=>(n(),c("div",{key:g},[u("span",ra,v(g)+" ("+v(l.length)+")",1),l.length===0?(n(),c("p",ia,"empty")):(n(),c("ul",la,[(n(!0),c(H,null,se(l,T=>(n(),c("li",{key:T.key,class:"text-xs font-mono truncate"},[z(v(T.key)+" ",1),u("span",ca,"("+v(T.length)+" ch)",1)]))),128))]))]))),128))]),u("div",null,[u("span",ua,"Cookies ("+v(e.pageState.cookies.length)+")",1),e.pageState.cookies.length===0?(n(),c("p",da,"none")):(n(),c("ul",fa,[(n(!0),c(H,null,se(e.pageState.cookies,l=>(n(),c("li",{key:l.name+l.domain,class:"text-xs font-mono truncate"},[z(v(l.name)+" ",1),s(l)?(n(),c("span",ma,"["+v(s(l))+"]",1)):$("",!0),u("span",pa,"· "+v(l.domain),1)]))),128))]))]),p[2]||(p[2]=u("p",{class:"text-[11px] text-gray-400 dark:text-gray-500"}," Storage values and cookie values are never captured — key names, lengths and flags only. ",-1))])]),_:2},[e.storageKey&&!e.plain?{name:"folded",fn:C(()=>[u("span",null,v(t(a)),1)]),key:"0"}:void 0]),1040))}}),Va=Object.assign(ga,{__name:"PageStateCard"});function Ha(e={}){const r=U(!1),i=Je();let d=null;async function s(a,o,p={}){try{typeof ClipboardItem<"u"?await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([o],{type:"text/html"})})]):await navigator.clipboard.writeText(a),r.value=!0,d&&clearTimeout(d),d=setTimeout(()=>{r.value=!1,d=null},e.duration??2e3),p.toast&&i.add({title:typeof p.toast=="string"?p.toast:"Copied to clipboard",icon:"i-lucide-check",color:"success",duration:2e3})}catch{}}return{copyRich:s,copied:r}}export{Qe as _,ja as a,Ma as b,Na as c,Ka as d,Da as e,Va as f,tn as g,Ke as h,Pa as i,Ea as j,Oa as k,Ua as l,Ba as m,Rs as n,_s as o,mt as p,Ha as u};
@@ -1 +1 @@
1
- import{b$ as e}from"./NQikbhmK.js";import{h as a}from"./BjaRappk.js";const n=[{id:"account",label:"Account",icon:"i-lucide-user-round",to:"/settings/account",authOnly:!0,fields:[{id:"account.display-name",label:"Display name",help:"account.display-name"},{id:"account.email",label:"Email address",help:"account.email"},{id:"account.connected-accounts",label:"Connected accounts",help:"account.connected-accounts"},{id:"account.password",label:"Password",help:"account.password"},{id:"account.auth-toggle",label:"Authentication",help:"settings.auth-toggle",envOnly:!0}]},{id:"users",label:"Users",icon:"i-lucide-users",to:"/settings/users",roles:[e.ADMINISTRATOR],authOnly:!0,introHelp:"settings.users",fields:[{id:"users.list",label:"Users & roles",help:"settings.users"},{id:"users.api-keys",label:"API keys",help:"settings.api-keys"}]},{id:"notifications",label:"Notifications",icon:"i-lucide-bell",to:"/settings/notifications",fields:[{id:"notifications.smtp",label:"SMTP email delivery",help:"settings.smtp",envOnly:!0},{id:"notifications.test-email",label:"Send test email",help:"notifications.test-email"},{id:"notifications.channels",label:"Notification channels",help:"notifications.channels"},{id:"notifications.subscriptions",label:"My subscriptions",help:"notifications.subscriptions"}]},{id:"tags",label:"Tags",icon:"i-lucide-tags",to:"/settings/tags",roles:[e.ADMINISTRATOR],introHelp:"settings.tags",fields:[{id:"tags.list",label:"Tags",help:"settings.tags"}]},{id:"storage",label:"Storage",icon:"i-lucide-hard-drive",to:"/settings/storage",roles:[e.ADMINISTRATOR],fields:[{id:"storage.backend",label:"Storage backend",help:"settings.storage-backend",envOnly:!0},{id:"storage.stats",label:"Storage statistics",help:"settings.storage-stats"},{id:"storage.cleanup",label:"Cleanup old test runs",help:"settings.cleanup"}]},{id:"wasted-time",label:"Wasted time",icon:"i-lucide-hourglass",to:"/settings/wasted-time",roles:[e.ADMINISTRATOR],introHelp:"settings.wasted-time",fields:[{id:"wasted-time.patterns",label:"Wasted-time patterns",help:"settings.wasted-time"}]},{id:"timeout-hygiene",label:"Timeout hygiene",icon:"i-lucide-scissors",to:"/settings/timeout-hygiene",roles:[e.ADMINISTRATOR],introHelp:"settings.timeout-hygiene",fields:[{id:"timeout-hygiene.thresholds",label:"Detection thresholds",help:"settings.timeout-hygiene"}]},{id:"pr-feedback",label:"Pull requests",icon:"i-lucide-git-pull-request",to:"/settings/pr-feedback",roles:[e.ADMINISTRATOR],introHelp:"settings.pr-feedback",fields:[{id:"pr-feedback.settings",label:"Pull-request feedback",help:"settings.pr-feedback"}]},{id:"ai",label:"AI diagnosis",icon:"i-lucide-sparkles",to:"/settings/ai",roles:[e.ADMINISTRATOR],fields:[{id:"ai.diagnosis",label:"Diagnosis model",help:"settings.ai-provider"},{id:"ai.research",label:"Research model",help:"settings.ai-research"},{id:"ai.embedding",label:"Embedding model",help:"settings.embedding-model"},{id:"ai.auto-diagnose",label:"Auto-diagnose",help:"settings.auto-diagnose"},{id:"ai.context-limits",label:"Diagnosis context limits",help:"settings.ai-limits"},{id:"ai.instructions",label:"Global analysis instructions",help:"settings.ai-instructions"},{id:"ai.scm-token",label:"Repository access token",help:"project.scm-token"},{id:"ai.privacy",label:"Privacy notice",help:"settings.privacy"}]},{id:"about",label:"About",icon:"i-lucide-info",to:"/settings/about",fields:[]}];function o(t){return a(t.help)}function r(t){const i=new Set;for(const s of t.fields)for(const l of o(s))i.add(l);return[...i]}function g(t){const i=n.find(s=>s.id===t);if(!i)throw new Error(`Unknown settings page: ${t}`);return i}export{n as S,g,r as p};
1
+ import{bW as e}from"./Du2W7Jne.js";import{h as a}from"./BjaRappk.js";const n=[{id:"account",label:"Account",icon:"i-lucide-user-round",to:"/settings/account",authOnly:!0,fields:[{id:"account.display-name",label:"Display name",help:"account.display-name"},{id:"account.email",label:"Email address",help:"account.email"},{id:"account.connected-accounts",label:"Connected accounts",help:"account.connected-accounts"},{id:"account.password",label:"Password",help:"account.password"},{id:"account.auth-toggle",label:"Authentication",help:"settings.auth-toggle",envOnly:!0}]},{id:"users",label:"Users",icon:"i-lucide-users",to:"/settings/users",roles:[e.ADMINISTRATOR],authOnly:!0,introHelp:"settings.users",fields:[{id:"users.list",label:"Users & roles",help:"settings.users"},{id:"users.api-keys",label:"API keys",help:"settings.api-keys"}]},{id:"notifications",label:"Notifications",icon:"i-lucide-bell",to:"/settings/notifications",fields:[{id:"notifications.smtp",label:"SMTP email delivery",help:"settings.smtp",envOnly:!0},{id:"notifications.test-email",label:"Send test email",help:"notifications.test-email"},{id:"notifications.channels",label:"Notification channels",help:"notifications.channels"},{id:"notifications.subscriptions",label:"My subscriptions",help:"notifications.subscriptions"}]},{id:"tags",label:"Tags",icon:"i-lucide-tags",to:"/settings/tags",roles:[e.ADMINISTRATOR],introHelp:"settings.tags",fields:[{id:"tags.list",label:"Tags",help:"settings.tags"}]},{id:"storage",label:"Storage",icon:"i-lucide-hard-drive",to:"/settings/storage",roles:[e.ADMINISTRATOR],fields:[{id:"storage.backend",label:"Storage backend",help:"settings.storage-backend",envOnly:!0},{id:"storage.stats",label:"Storage statistics",help:"settings.storage-stats"},{id:"storage.cleanup",label:"Cleanup old test runs",help:"settings.cleanup"}]},{id:"wasted-time",label:"Wasted time",icon:"i-lucide-hourglass",to:"/settings/wasted-time",roles:[e.ADMINISTRATOR],introHelp:"settings.wasted-time",fields:[{id:"wasted-time.patterns",label:"Wasted-time patterns",help:"settings.wasted-time"}]},{id:"timeout-hygiene",label:"Timeout hygiene",icon:"i-lucide-scissors",to:"/settings/timeout-hygiene",roles:[e.ADMINISTRATOR],introHelp:"settings.timeout-hygiene",fields:[{id:"timeout-hygiene.thresholds",label:"Detection thresholds",help:"settings.timeout-hygiene"}]},{id:"pr-feedback",label:"Pull requests",icon:"i-lucide-git-pull-request",to:"/settings/pr-feedback",roles:[e.ADMINISTRATOR],introHelp:"settings.pr-feedback",fields:[{id:"pr-feedback.settings",label:"Pull-request feedback",help:"settings.pr-feedback"}]},{id:"ai",label:"AI diagnosis",icon:"i-lucide-sparkles",to:"/settings/ai",roles:[e.ADMINISTRATOR],fields:[{id:"ai.diagnosis",label:"Diagnosis model",help:"settings.ai-provider"},{id:"ai.research",label:"Research model",help:"settings.ai-research"},{id:"ai.embedding",label:"Embedding model",help:"settings.embedding-model"},{id:"ai.auto-diagnose",label:"Auto-diagnose",help:"settings.auto-diagnose"},{id:"ai.context-limits",label:"Diagnosis context limits",help:"settings.ai-limits"},{id:"ai.instructions",label:"Global analysis instructions",help:"settings.ai-instructions"},{id:"ai.scm-token",label:"Repository access token",help:"project.scm-token"},{id:"ai.privacy",label:"Privacy notice",help:"settings.privacy"}]},{id:"about",label:"About",icon:"i-lucide-info",to:"/settings/about",fields:[]}];function o(t){return a(t.help)}function r(t){const i=new Set;for(const s of t.fields)for(const l of o(s))i.add(l);return[...i]}function g(t){const i=n.find(s=>s.id===t);if(!i)throw new Error(`Unknown settings page: ${t}`);return i}export{n as S,g,r as p};
@@ -0,0 +1 @@
1
+ import{aN as We,$ as ke,d as P,Y as Ye,b7 as Ne,bM as qt,aA as nt,Z as Fe,H as Me,o as c,f as _,g,V as w,k as e,v as H,K as ue,X as Y,c2 as Te,r as G,c3 as Re,b8 as It,bC as St,bA as st,j as A,S as Se,C as we,c4 as wt,B as ge,ad as He,h as V,c5 as ut,aB as Ee,W as F,U as ae,c6 as dt,aL as kt,a2 as pt,c7 as Et,c8 as zt,bz as ct,c9 as Bt,c as W,F as se,y as De,ag as ft,Q as At,ca as Ft,l as vt,bG as Lt,av as Tt,cb as Ot,bR as Vt,bK as Kt,bJ as Pt,bL as Rt,bH as Dt,bN as mt,bB as $t,bI as Mt,a0 as qe,bP as Nt,bh as Ht,aD as Gt,m as Ce,t as ve,a1 as Le,bQ as jt,aI as xe,a3 as Ut,E as Wt,a4 as Yt,a5 as Qt,a6 as Jt,a7 as Xt,bi as Zt,aO as ea,bS as ta,aZ as aa,b4 as et,aQ as je,b5 as fe,q as K,i as Be,p as Pe,aJ as tt,bq as la,_ as ia,bj as oa,I as ra,G as at,bT as lt,bc as Ae,ax as na,a_ as sa,a8 as ua,cc as da,bE as pa,cd as ca}from"./Du2W7Jne.js";import{u as fa}from"./UdR3DBPS.js";import{V as va}from"./DmkUdSS4.js";import{u as ma}from"./B99fbi73.js";function $e(n,r,a){const l=n.findIndex(d=>We(d,r)),i=n.findIndex(d=>We(d,a));if(l===-1||i===-1)return[];const[o,t]=[l,i].sort((d,b)=>d-b);return n.slice(o,t+1)}function ga(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}function it(n){return n?.querySelector("[data-state=checked]")}function ba(n,r,a){return n===void 0?!1:Array.isArray(n)?n.some(l=>me(l,r,a)):me(n,r,a)}function me(n,r,a){return n===void 0||r===void 0?!1:typeof n=="string"?n===r:typeof a=="function"?a(n,r):typeof a=="string"?n?.[a]===r?.[a]:We(n,r)}const[Oe,ha]=ke("ListboxRoot");var ya=P({__name:"ListboxRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"vertical"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:"toggle"},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(n,{expose:r,emit:a}){const l=n,i=a,{multiple:o,highlightOnHover:t,orientation:d,disabled:b,selectionBehavior:B,dir:I}=Ye(l),{getItems:z}=Ne({isProvider:!0}),{handleTypeaheadSearch:v}=qt(),{primitiveElement:h,currentElement:m}=Te(),p=ga(),C=nt(I),k=fa(m),$=G(),S=G(!1),L=G(!0),E=Fe(l,"modelValue",i,{defaultValue:l.defaultValue??(o.value?[]:void 0),passive:l.modelValue===void 0,deep:!0});function de(u){if(S.value=!0,l.multiple){const x=Array.isArray(E.value)?[...E.value]:[],q=x.findIndex(O=>me(O,u,l.by));l.selectionBehavior==="toggle"?(q===-1?x.push(u):x.splice(q,1),E.value=x):(E.value=[u],$.value=u)}else l.selectionBehavior==="toggle"&&me(E.value,u,l.by)?E.value=void 0:E.value=u;setTimeout(()=>{S.value=!1},1)}const T=G(null),ie=G(null),X=G(!1),oe=G(!1),pe=Re(),be=Re(),re=Re();function ce(){return z().map(u=>u.ref).filter(u=>u.dataset.disabled!=="")}function N(u,x=!0,q){if(!u)return;T.value=u,(q??L.value)&&T.value.focus(),x&&T.value.scrollIntoView({block:"nearest"});const O=z().find(j=>j.ref===u);i("highlight",O)}function R(u){if(X.value)re.trigger(u);else{const x=z().find(q=>me(q.value,u,l.by));x&&(T.value=x.ref,N(x.ref))}}function Q(u){if(T.value&&T.value.isConnected){if(u.ctrlKey||u.metaKey||u.altKey)return;u.preventDefault(),u.stopPropagation(),oe.value||T.value.click()}}function J(u){if(L.value){if(S.value=!0,X.value)be.trigger(u);else{const x=u.altKey||u.ctrlKey||u.metaKey;if(x&&u.key==="a"&&o.value){const q=z(),O=q.map(ye=>ye.value);E.value=[...O],u.preventDefault();const j=q.at(-1);j&&N(j.ref)}else if(!x){const q=v(u.key,z());q&&N(q)}}setTimeout(()=>{S.value=!1},1)}}function ne(){oe.value=!0}function he(){ue(()=>{oe.value=!1})}function Z(){ue(()=>{const u=new KeyboardEvent("keydown",{key:"PageUp"});y(u)})}function ee(u){const x=T.value;x?.isConnected&&(ie.value=x),T.value=null,i("leave",u)}function Ve(u){const x=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if(u.currentTarget?.dispatchEvent(x),i("entryFocus",x),!x.defaultPrevented)if(ie.value)N(ie.value);else{const q=ce()?.[0];N(q)}}function y(u){const x=It(u,d.value,C.value);if(!x)return;let q=ce();if(T.value){if(x==="last")q.reverse();else if(x==="prev"||x==="next"){x==="prev"&&q.reverse();const O=q.indexOf(T.value);q=q.slice(O+1)}Ge(u,q[0])}if(q.length){const O=!T.value&&x==="prev"?q.length-1:0;N(q[O])}if(X.value)return be.trigger(u)}function Ge(u,x){if(!(X.value||l.selectionBehavior!=="replace"||!o.value||!Array.isArray(E.value)||(u.altKey||u.ctrlKey||u.metaKey)&&!u.shiftKey)&&u.shiftKey){const O=z().filter(_e=>_e.ref.dataset.disabled!=="");let j=O.find(_e=>_e.ref===x)?.value;if(u.key===p.END?j=O.at(-1)?.value:u.key===p.HOME&&(j=O[0]?.value),!j||!$.value)return;const ye=$e(O.map(_e=>_e.value),$.value,j);E.value=ye}}async function Ie(u,x=!0){if(St)if(await ue(),X.value)pe.trigger({event:u,scroll:x});else{const q=ce(),O=q.find(ye=>ye.dataset.state==="checked"),j=x?void 0:!1;O?N(O,x,j):q.length&&N(q[0],x,j)}}let ze=!1;return Me(E,()=>{if(!S.value){const u=ze;ze=!0,ue(()=>{Ie(void 0,u)})}},{immediate:!0,deep:!0}),r({highlightedElement:T,highlightItem:R,highlightFirstItem:Z,highlightSelected:Ie,getItems:z}),ha({modelValue:E,onValueChange:de,multiple:o,orientation:d,dir:C,disabled:b,highlightOnHover:t,highlightedElement:T,isVirtual:X,virtualFocusHook:pe,virtualKeydownHook:be,virtualHighlightHook:re,by:l.by,firstValue:$,selectionBehavior:B,focusable:L,onLeave:ee,onEnter:Ve,changeHighlight:N,onKeydownEnter:Q,onKeydownNavigation:y,onKeydownTypeAhead:J,onCompositionStart:ne,onCompositionEnd:he,highlightFirstItem:Z}),(u,x)=>(c(),_(e(Y),{ref_key:"primitiveElement",ref:h,as:u.as,"as-child":u.asChild,dir:e(C),"data-disabled":e(b)?"":void 0,onPointerleave:ee,onFocusout:x[0]||(x[0]=async q=>{const O=q.relatedTarget||q.target;await ue(),T.value&&e(m)&&!e(m).contains(O)&&ee(q)})},{default:g(()=>[w(u.$slots,"default",{modelValue:e(E)}),e(k)&&u.name?(c(),_(e(va),{key:0,name:u.name,value:e(E),disabled:e(b),required:u.required},null,8,["name","value","disabled","required"])):H("v-if",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}}),_a=ya,xa=P({__name:"ListboxContent",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const{CollectionSlot:r}=Ne(),a=Oe(),l=st(!1,10);return(i,o)=>(c(),_(e(r),null,{default:g(()=>[A(e(Y),{role:"listbox",as:i.as,"as-child":i.asChild,tabindex:e(a).focusable.value?e(a).highlightedElement.value?"-1":"0":"-1","aria-orientation":e(a).orientation.value,"aria-multiselectable":!!e(a).multiple.value,"data-orientation":e(a).orientation.value,onMousedown:o[0]||(o[0]=we(t=>l.value=!0,["left"])),onFocus:o[1]||(o[1]=t=>{e(l)||e(a).onEnter(t)}),onKeydown:[o[2]||(o[2]=Se(t=>{e(a).orientation.value==="vertical"&&(t.key==="ArrowLeft"||t.key==="ArrowRight")||e(a).orientation.value==="horizontal"&&(t.key==="ArrowUp"||t.key==="ArrowDown")||(t.preventDefault(),e(a).focusable.value&&e(a).onKeydownNavigation(t))},["down","up","left","right","home","end"])),Se(e(a).onKeydownEnter,["enter"]),e(a).onKeydownTypeAhead]},{default:g(()=>[w(i.$slots,"default")]),_:3},8,["as","as-child","tabindex","aria-orientation","aria-multiselectable","data-orientation","onKeydown"])]),_:3}))}}),Ca=xa,qa=P({__name:"ListboxFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(n,{emit:r}){const a=n,i=Fe(a,"modelValue",r,{defaultValue:"",passive:a.modelValue===void 0}),o=Oe(),{primitiveElement:t,currentElement:d}=Te(),b=V(()=>a.disabled||o.disabled.value||!1),B=G();wt(()=>B.value=o.highlightedElement.value?.id),ge(()=>{o.focusable.value=!1,setTimeout(()=>{a.autoFocus&&d.value?.focus()},1)}),He(()=>{o.focusable.value=!0});const{isComposing:I,handleCompositionStart:z,handleCompositionEnd:v}=ut(k=>{i.value=k.target.value,o.onCompositionEnd(),o.highlightFirstItem()});function h(){o.onCompositionStart(),z()}function m(k){I.value||(i.value=k.target.value,o.highlightFirstItem())}function p(k){I.value||(k.preventDefault(),o.onKeydownNavigation(k))}function C(k){I.value||o.onKeydownEnter(k)}return(k,$)=>(c(),_(e(Y),{ref_key:"primitiveElement",ref:t,as:k.as,"as-child":k.asChild,value:e(i),disabled:b.value?"":void 0,"data-disabled":b.value?"":void 0,"aria-disabled":b.value??void 0,"aria-activedescendant":B.value,type:"text",onKeydown:[Se(p,["down","up","home","end"]),Se(C,["enter"])],onInput:m,onCompositionstart:h,onCompositionend:e(v)},{default:g(()=>[w(k.$slots,"default",{modelValue:e(i)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onCompositionend"]))}}),Ia=qa;const[Il,Sa]=ke("ListboxGroup");var wa=P({__name:"ListboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const r=n,a=Ee(void 0,"reka-listbox-group");return Sa({id:a}),(l,i)=>(c(),_(e(Y),F({role:"group"},r,{"aria-labelledby":e(a)}),{default:g(()=>[w(l.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),ka=wa;const Ea="listbox.select",[za,Ba]=ke("ListboxItem");var Aa=P({__name:"ListboxItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["select"],setup(n,{emit:r}){const a=n,l=r,i=Ee(void 0,"reka-listbox-item"),{CollectionItem:o}=Ne(),{forwardRef:t,currentElement:d}=ae(),b=Oe(),B=V(()=>d.value!=null&&d.value===b.highlightedElement.value),I=V(()=>ba(b.modelValue.value,a.value,b.by)),z=V(()=>b.disabled.value||a.disabled);async function v(m){l("select",m),!m?.defaultPrevented&&!z.value&&m&&(b.onValueChange(a.value),b.changeHighlight(d.value))}function h(m){const p={originalEvent:m,value:a.value};kt(Ea,v,p)}return Ba({isSelected:I}),(m,p)=>(c(),_(e(o),{value:m.value},{default:g(()=>[dt([B.value,I.value,z.value,e(b).focusable.value],()=>A(e(Y),F({id:e(i)},m.$attrs,{ref:e(t),role:"option",tabindex:e(b).focusable.value?B.value?"0":"-1":-1,"aria-selected":I.value,as:m.as,"as-child":m.asChild,disabled:z.value?"":void 0,"data-disabled":z.value?"":void 0,"data-highlighted":B.value?"":void 0,"data-state":I.value?"checked":"unchecked",onClick:h,onKeydown:Se(we(h,["prevent"]),["space"]),onPointermove:p[0]||(p[0]=()=>{e(b).highlightedElement.value!==e(d)&&e(b).highlightOnHover.value&&e(b).changeHighlight(e(d),!1,!1)})}),{default:g(()=>[w(m.$slots,"default")]),_:3},16,["id","tabindex","aria-selected","as","as-child","disabled","data-disabled","data-highlighted","data-state","onKeydown"]),p,1)]),_:3},8,["value"]))}}),Fa=Aa,La=P({__name:"ListboxItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(n){const r=n;ae();const a=za();return(l,i)=>e(a).isSelected.value?(c(),_(e(Y),F({key:0,"aria-hidden":"true"},r),{default:g(()=>[w(l.$slots,"default")]),_:3},16)):H("v-if",!0)}}),Ta=La,Oa=P({__name:"ListboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(n){const r=n,a=pt(),l=Oe(),i=Et(),{getItems:o}=Ne();l.isVirtual.value=!0;const t=V(()=>{const v=i.value;if(v){const h=window.getComputedStyle(v);return{start:Number.parseFloat(h.paddingBlockStart||h.paddingTop),end:Number.parseFloat(h.paddingBlockEnd||h.paddingBottom)}}else return{start:0,end:0}}),d=ma({get scrollPaddingStart(){return t.value.start},get scrollPaddingEnd(){return t.value.end},get count(){return r.options.length},get horizontal(){return l.orientation.value==="horizontal"},estimateSize(v){return typeof r.estimateSize=="function"?r.estimateSize(v):r.estimateSize??28},getScrollElement(){return i.value},overscan:r.overscan??12}),b=V(()=>d.value.getVirtualItems().map(v=>{const h=a.default({option:r.options[v.index],virtualizer:d.value,virtualItem:v})[0],m=h.type===se&&Array.isArray(h.children)?h.children.find(p=>typeof p.type!="symbol"):h;return{item:v,is:Ft(m,{key:`${v.key}`,"data-index":v.index,"aria-setsize":r.options.length,"aria-posinset":v.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${v.start}px)`,overflowAnchor:"none"}})}}));l.virtualFocusHook.on(({event:v,scroll:h})=>{const m=r.options.findIndex(p=>Array.isArray(l.modelValue.value)?me(p,l.modelValue.value[0],l.by):me(p,l.modelValue.value,l.by));m!==-1?(v?.preventDefault(),d.value.scrollToIndex(m,{align:"start"}),requestAnimationFrame(()=>{const p=it(i.value);p&&(l.changeHighlight(p,h,h?void 0:!1),v&&p?.focus())})):h?l.highlightFirstItem():requestAnimationFrame(()=>{const p=o().find(C=>C.ref.dataset.disabled!=="")?.ref;p&&l.changeHighlight(p,!1,!1)})}),l.virtualHighlightHook.on(v=>{const h=r.options.findIndex(m=>me(m,v,l.by));d.value.scrollToIndex(h,{align:"start"}),requestAnimationFrame(()=>{const m=it(i.value);m&&l.changeHighlight(m)})});const B=st("",1e3),I=V(()=>{const v=h=>r.textContent?r.textContent(h):h?.toString().toLowerCase();return r.options.map((h,m)=>({index:m,textContent:v(h)}))});function z(v,h){if(!l.firstValue?.value||!l.multiple.value||!Array.isArray(l.modelValue.value))return;const p=o().filter(k=>k.ref.dataset.disabled!=="").find(k=>k.ref===l.highlightedElement.value)?.value;if(!p)return;let C=null;switch(h){case"prev":case"next":{C=$e(r.options,l.firstValue.value,p);break}case"first":{C=$e(r.options,l.firstValue.value,r.options?.[0]);break}case"last":{C=$e(r.options,l.firstValue.value,r.options.at(-1));break}}l.modelValue.value=C}return l.virtualKeydownHook.on(v=>{const h=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!h)return;let p=zt[v.key];if(h&&v.key==="a"&&l.multiple.value?(v.preventDefault(),l.modelValue.value=[...r.options],p="last"):v.shiftKey&&p&&z(v,p),["first","last"].includes(p)){v.preventDefault();const C=p==="first"?0:r.options.length-1;d.value.scrollToIndex(C),requestAnimationFrame(()=>{const k=o(),$=p==="first"?k[0]:k.at(-1);$&&l.changeHighlight($.ref)})}else if(!p&&!h){B.value+=v.key;const C=Number(ct()?.getAttribute("data-index")),k=I.value[C].textContent,$=I.value.map(E=>E.textContent??""),S=Bt($,B.value,k),L=I.value.find(E=>E.textContent===S);L&&(d.value.scrollToIndex(L.index,{align:"start"}),requestAnimationFrame(()=>{const E=i.value.querySelector(`[data-index="${L.index}"]`);E instanceof HTMLElement&&l.changeHighlight(E)}))}}),(v,h)=>(c(),W("div",{"data-reka-virtualizer":"",style:At({position:"relative",width:"100%",height:`${e(d).getTotalSize()}px`})},[(c(!0),W(se,null,De(b.value,({is:m,item:p})=>(c(),_(ft(m),{key:p.index}))),128))],4))}}),Va=Oa;const[le,Ka]=ke("ComboboxRoot");var Pa=P({__name:"ComboboxRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","update:open"],setup(n,{expose:r,emit:a}){const l=n,i=a,{primitiveElement:o,currentElement:t}=Te(),{multiple:d,disabled:b,ignoreFilter:B,resetSearchTermOnSelect:I,openOnFocus:z,openOnClick:v,dir:h,resetModelValueOnClear:m,highlightOnHover:p}=Ye(l),C=nt(h),k=Fe(l,"modelValue",i,{defaultValue:l.defaultValue??(d.value?[]:void 0),passive:l.modelValue===void 0,deep:!0}),$=Fe(l,"open",i,{defaultValue:l.defaultOpen,passive:l.open===void 0});async function S(R){$.value=R,re.value="",R?(await ue(),o.value?.highlightSelected(),E.value=!0,T.value?.focus()):(E.value=!1,setTimeout(()=>{!R&&l.resetSearchTermOnBlur&&L.trigger()},1))}const L=Re(),E=G(!1),de=G(!1),T=G(),ie=G(),X=V(()=>o.value?.highlightedElement??void 0),oe=G(new Map),pe=G(new Map),{contains:be}=Ot({sensitivity:"base"}),re=G(""),ce=V(R=>{if(!re.value||l.ignoreFilter||de.value)return{count:oe.value.size,items:R?.items??new Map,groups:R?.groups??new Set(pe.value.keys())};let Q=0;const J=new Map,ne=new Set;for(const[he,Z]of oe.value){const ee=be(Z,re.value);J.set(he,ee?1:0),ee&&Q++}for(const[he,Z]of pe.value)for(const ee of Z)if(J.get(ee)>0){ne.add(he);break}return{count:Q,items:J,groups:ne}}),N=Tt();return ge(()=>{N?.exposed&&(N.exposed.highlightItem=o.value?.highlightItem,N.exposed.highlightFirstItem=o.value?.highlightFirstItem,N.exposed.highlightSelected=o.value?.highlightSelected)}),r({filtered:ce,highlightedElement:X,highlightItem:o.value?.highlightItem,highlightFirstItem:o.value?.highlightFirstItem,highlightSelected:o.value?.highlightSelected}),Ka({modelValue:k,multiple:d,disabled:b,open:$,onOpenChange:S,contentId:"",isUserInputted:E,isVirtual:de,inputElement:T,highlightedElement:X,onInputElementChange:R=>T.value=R,triggerElement:ie,onTriggerElementChange:R=>ie.value=R,parentElement:t,resetSearchTermOnSelect:I,onResetSearchTerm:L.on,allItems:oe,allGroups:pe,filterSearch:re,filterState:ce,ignoreFilter:B,openOnFocus:z,openOnClick:v,resetModelValueOnClear:m}),(R,Q)=>(c(),_(e(Lt),null,{default:g(()=>[A(e(_a),F({ref_key:"primitiveElement",ref:o},R.$attrs,{modelValue:e(k),"onUpdate:modelValue":Q[0]||(Q[0]=J=>vt(k)?k.value=J:null),style:{pointerEvents:e($)?"auto":void 0},as:R.as,"as-child":R.asChild,dir:e(C),multiple:e(d),name:R.name,required:R.required,disabled:e(b),"highlight-on-hover":e(p),by:l.by,onHighlight:Q[1]||(Q[1]=J=>i("highlight",J))}),{default:g(()=>[w(R.$slots,"default",{open:e($),modelValue:e(k)})]),_:3},16,["modelValue","style","as","as-child","dir","multiple","name","required","disabled","highlight-on-hover","by"])]),_:3}))}}),Ra=Pa,Da=P({__name:"ComboboxAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const{forwardRef:r}=ae();return(a,l)=>(c(),_(e(Vt),{"as-child":"",reference:a.reference},{default:g(()=>[A(e(Y),F({ref:e(r),"as-child":a.asChild,as:a.as},a.$attrs),{default:g(()=>[w(a.$slots,"default")]),_:3},16,["as-child","as"])]),_:3},8,["reference"]))}}),$a=Da;const[Ma,Na]=ke("ComboboxContent");var Ha=P({__name:"ComboboxContentImpl",props:{position:{type:String,required:!1,default:"inline"},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(n,{emit:r}){const a=n,l=r,{position:i}=Ye(a),o=le(),t=V(()=>o.ignoreFilter.value?o.allItems.value.size===0:o.filterState.value.count===0),{forwardRef:d,currentElement:b}=ae();Kt(a.bodyLock),Pt(),Rt(o.parentElement);const B=V(()=>a.position==="popper"?a:{}),I=Dt(B.value),z={boxSizing:"border-box","--reka-combobox-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-combobox-content-available-width":"var(--reka-popper-available-width)","--reka-combobox-content-available-height":"var(--reka-popper-available-height)","--reka-combobox-trigger-width":"var(--reka-popper-anchor-width)","--reka-combobox-trigger-height":"var(--reka-popper-anchor-height)"};Na({position:i});const v=G(!1);ge(()=>{o.inputElement.value&&(v.value=b.value.contains(o.inputElement.value),v.value&&o.inputElement.value.focus())}),He(()=>{const m=ct();v.value&&(!m||m===document.body)&&o.triggerElement.value?.focus()});function h(m){if(o.parentElement.value?.contains(m))return!0;const C=(m instanceof Element?m.closest("label"):null)?.control;return!!C&&!!o.parentElement.value?.contains(C)}return(m,p)=>(c(),_(e(Ca),{"as-child":""},{default:g(()=>[A(e(mt),{"as-child":"",onMountAutoFocus:p[5]||(p[5]=we(()=>{},["prevent"])),onUnmountAutoFocus:p[6]||(p[6]=we(()=>{},["prevent"]))},{default:g(()=>[A(e($t),{"as-child":"","disable-outside-pointer-events":m.disableOutsidePointerEvents,onDismiss:p[0]||(p[0]=C=>e(o).onOpenChange(!1)),onFocusOutside:p[1]||(p[1]=C=>{h(C.target)&&C.preventDefault(),l("focusOutside",C)}),onInteractOutside:p[2]||(p[2]=C=>l("interactOutside",C)),onEscapeKeyDown:p[3]||(p[3]=C=>l("escapeKeyDown",C)),onPointerDownOutside:p[4]||(p[4]=C=>{h(C.target)&&C.preventDefault(),l("pointerDownOutside",C)})},{default:g(()=>[(c(),_(ft(e(i)==="popper"?e(Mt):e(Y)),F({...m.$attrs,...e(I)},{id:e(o).contentId,ref:e(d),"memo-dependencies":e(i)==="popper"?[e(o).filterSearch.value,e(o).filterState.value]:void 0,"data-state":e(o).open.value?"open":"closed","data-empty":t.value?"":void 0,style:{display:a.hideWhenEmpty&&t.value?"none":"flex",flexDirection:"column",outline:"none",...e(i)==="popper"?z:{}}}),{default:g(()=>[w(m.$slots,"default")]),_:3},16,["id","memo-dependencies","data-state","data-empty","style"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),Ga=Ha,ja=P({__name:"ComboboxArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(n){const r=n,a=le(),l=Ma();return ae(),(i,o)=>e(a).open.value&&e(l).position.value==="popper"?(c(),_(e(Nt),qe(F({key:0},r)),{default:g(()=>[w(i.$slots,"default")]),_:3},16)):H("v-if",!0)}}),Ua=ja,Wa=P({__name:"ComboboxCancel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const r=n;ae();const a=le();function l(){a.filterSearch.value="",a.inputElement.value&&(a.inputElement.value.value="",a.inputElement.value.focus()),a.resetModelValueOnClear?.value&&(a.modelValue.value=a.multiple.value?[]:null)}return(i,o)=>(c(),_(e(Y),F({type:i.as==="button"?"button":void 0},r,{tabindex:"-1",onClick:l}),{default:g(()=>[w(i.$slots,"default")]),_:3},16,["type"]))}}),Ya=Wa,Qa=P({__name:"ComboboxContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(n,{emit:r}){const i=Ht(n,r),{forwardRef:o}=ae(),t=le();return t.contentId||=Ee(void 0,"reka-combobox-content"),(d,b)=>(c(),_(e(Gt),{present:d.forceMount||e(t).open.value},{default:g(()=>[A(Ga,F({...e(i),...d.$attrs},{ref:e(o)}),{default:g(()=>[w(d.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),Ja=Qa,Xa=P({__name:"ComboboxEmpty",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const r=n,a=le(),l=V(()=>a.ignoreFilter.value?a.allItems.value.size===0:a.filterState.value.count===0);return(i,o)=>l.value?(c(),_(e(Y),qe(F({key:0},r)),{default:g(()=>[w(i.$slots,"default",{},()=>[o[0]||(o[0]=Ce("No options"))])]),_:3},16)):H("v-if",!0)}}),Za=Xa;const[gt,el]=ke("ComboboxGroup");var tl=P({__name:"ComboboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const r=n,a=Ee(void 0,"reka-combobox-group"),l=le(),i=V(()=>l.ignoreFilter.value?!0:l.filterSearch.value?l.filterState.value.groups.has(a):!0),o=el({id:a,labelId:""});return ge(()=>{l.allGroups.value.has(a)||l.allGroups.value.set(a,new Set)}),He(()=>{l.allGroups.value.delete(a)}),(t,d)=>(c(),_(e(ka),F({id:e(a),"aria-labelledby":e(o).labelId},r,{hidden:i.value?void 0:!0}),{default:g(()=>[w(t.$slots,"default")]),_:3},16,["id","aria-labelledby","hidden"]))}}),Ue=tl,al=P({__name:"ComboboxInput",props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(n,{emit:r}){const a=n,l=r,i=le(),o=Oe(),{primitiveElement:t,currentElement:d}=Te(),b=Fe(a,"modelValue",l,{passive:a.modelValue===void 0});ge(()=>{d.value&&i.onInputElementChange(d.value)});const{isComposing:B,handleCompositionStart:I,handleCompositionEnd:z}=ut(S=>{const L=S.target;L&&h(L.value)});function v(S){B.value||(S.preventDefault(),i.open.value||i.onOpenChange(!0))}function h(S){i.open.value?i.filterSearch.value=S:(i.onOpenChange(!0),ue(()=>{S&&(i.filterSearch.value=S,o.highlightFirstItem())}))}function m(S){B.value||h(S.target.value)}function p(){i.openOnFocus.value&&!i.open.value&&i.onOpenChange(!0)}function C(S){if(!i.open.value)return;const L=S.relatedTarget;if(!L)return;const E=i.parentElement.value?.contains(L),de=document.getElementById(i.contentId)?.contains(L);!E&&!de&&requestAnimationFrame(()=>{if(!i.open.value)return;const T=document.activeElement;!i.parentElement.value?.contains(T)&&!document.getElementById(i.contentId)?.contains(T)&&i.onOpenChange(!1)})}function k(){i.openOnClick.value&&!i.open.value&&i.onOpenChange(!0)}function $(){const S=i.modelValue.value;a.displayValue?b.value=a.displayValue(S):!i.multiple.value&&S&&!Array.isArray(S)&&typeof S!="object"?b.value=S.toString():b.value="",ue(()=>{b.value=b.value})}return i.onResetSearchTerm(()=>{$()}),Me(i.modelValue,async()=>{!i.isUserInputted.value&&i.resetSearchTermOnSelect.value&&$()},{immediate:!0,deep:!0}),Me(i.filterState,(S,L)=>{!i.isVirtual.value&&L.count===0&&o.highlightFirstItem()}),(S,L)=>(c(),_(e(Ia),{ref_key:"primitiveElement",ref:t,modelValue:e(b),"onUpdate:modelValue":L[0]||(L[0]=E=>vt(b)?b.value=E:null),as:S.as,"as-child":S.asChild,"auto-focus":S.autoFocus,disabled:S.disabled,"aria-expanded":e(i).open.value,"aria-controls":e(i).contentId,"aria-autocomplete":"list",role:"combobox",autocomplete:"off",onClick:k,onInput:m,onKeydown:Se(v,["down","up"]),onFocus:p,onBlur:C,onCompositionstart:e(I),onCompositionend:e(z)},{default:g(()=>[w(S.$slots,"default")]),_:3},8,["modelValue","as","as-child","auto-focus","disabled","aria-expanded","aria-controls","onCompositionstart","onCompositionend"]))}}),ll=al,il=P({__name:"ComboboxItem",props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(n,{emit:r}){const a=n,l=r,i=Ee(void 0,"reka-combobox-item"),o=le(),t=gt(null),{primitiveElement:d,currentElement:b}=Te();if(a.value==="")throw new Error("A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.");const B=V(()=>{if(o.isVirtual.value||o.ignoreFilter.value||!o.filterSearch.value)return!0;{const I=o.filterState.value.items.get(i);return I===void 0?!0:I>0}});return ge(()=>{o.allItems.value.set(i,a.textValue||b.value.textContent||b.value.innerText);const I=t?.id;I&&(o.allGroups.value.has(I)?o.allGroups.value.get(I)?.add(i):o.allGroups.value.set(I,new Set([i])))}),He(()=>{o.allItems.value.delete(i)}),(I,z)=>B.value?dt([B.value,e(o).filterSearch.value,e(o).disabled.value,I.disabled,a.value,a.as,a.asChild,...Object.values(I.$attrs)],()=>(c(),_(e(Fa),F({key:0},a,{id:e(i),ref_key:"primitiveElement",ref:d,disabled:e(o).disabled.value||I.disabled,onSelect:z[0]||(z[0]=v=>{l("select",v),!v.defaultPrevented&&(!e(o).multiple.value&&!I.disabled&&!e(o).disabled.value?(v.preventDefault(),e(o).onOpenChange(!1),e(o).modelValue.value=a.value):e(o).multiple.value&&e(o).inputElement.value?.focus())})}),{default:g(()=>[w(I.$slots,"default",{},()=>[Ce(ve(I.value),1)])]),_:3},16,["id","disabled"])),z,1):H("v-if",!0)}}),ot=il,ol=P({__name:"ComboboxItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(n){const r=n;return(a,l)=>(c(),_(e(Ta),qe(Le(r)),{default:g(()=>[w(a.$slots,"default")]),_:3},16))}}),rl=ol,nl=P({__name:"ComboboxLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(n){const r=n;ae();const a=gt({id:"",labelId:""});return a.labelId||=Ee(void 0,"reka-combobox-group-label"),(l,i)=>(c(),_(e(Y),F(r,{id:e(a).labelId}),{default:g(()=>[w(l.$slots,"default")]),_:3},16,["id"]))}}),sl=nl,ul=P({__name:"ComboboxPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(n){const r=n;return(a,l)=>(c(),_(e(jt),qe(Le(r)),{default:g(()=>[w(a.$slots,"default")]),_:3},16))}}),dl=ul,pl=P({__name:"ComboboxSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const r=n;return ae(),(a,l)=>(c(),_(e(Y),F(r,{"aria-hidden":"true"}),{default:g(()=>[w(a.$slots,"default")]),_:3},16))}}),cl=pl,fl=P({__name:"ComboboxTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const r=n,{forwardRef:a,currentElement:l}=ae(),i=le(),o=V(()=>r.disabled||i.disabled.value||!1);return ge(()=>{l.value&&i.onTriggerElementChange(l.value)}),(t,d)=>(c(),_(e(Y),F(r,{ref:e(a),type:t.as==="button"?"button":void 0,tabindex:"-1","aria-label":"Show popup","aria-haspopup":"listbox","aria-expanded":e(i).open.value,"aria-controls":e(i).contentId,"data-state":e(i).open.value?"open":"closed",disabled:o.value,"data-disabled":o.value?"":void 0,"aria-disabled":o.value??void 0,onClick:d[0]||(d[0]=b=>e(i).onOpenChange(!e(i).open.value))}),{default:g(()=>[w(t.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","disabled","data-disabled","aria-disabled"]))}}),vl=fl,ml=P({__name:"ComboboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(n){const r=n,a=le();return a.isVirtual.value=!0,(l,i)=>(c(),_(Va,qe(Le(r)),{default:g(o=>[w(l.$slots,"default",qe(Le(o)))]),_:3},16))}}),gl=ml;function bl(n,r){if(typeof n!="object"||n===null)return!1;const a=xe(n,r);return a!=null&&a!==""}function rt(n,r){return r?{xs:44,sm:48,md:52,lg:56,xl:60}[n]:{xs:24,sm:28,md:32,lg:36,xl:40}[n]}function hl(n,r,a,l){const i=rt(r,!0),o=rt(r,!1);return l?()=>i:a?t=>bl(n[t],a)?i:o:()=>o}const yl={slots:{base:["relative group rounded-md inline-flex items-center disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed",value:"truncate pointer-events-none",placeholder:"truncate text-dimmed",arrow:"fill-bg stroke-default",content:["max-h-[min(15rem,var(--reka-select-content-available-height,15rem))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col","max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"],viewport:"relative scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:["group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"],itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemWrapper:"flex-1 flex flex-col min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",input:"border-b border-default",focusScope:"flex flex-col min-h-0",trailingClear:"p-0"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-2 text-xs"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-2.5 text-xs"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-2.5 text-sm"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-3 text-sm"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailingIcon:"size-6",empty:"p-3 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented hover:bg-elevated disabled:bg-default",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented hover:bg-accented/75 disabled:bg-elevated",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent focus:outline-none"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},position:{popper:{content:"data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]"},"item-aligned":{content:""}},multiple:{true:""},virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"outline-success/25 focus-visible:outline-3 focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"outline-info/25 focus-visible:outline-3 focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"outline-error/25 focus-visible:outline-3 focus-visible:ring-error"},{color:"primary",variant:["soft","ghost"],class:"outline-primary/25 focus-visible:outline-3"},{color:"secondary",variant:["soft","ghost"],class:"outline-secondary/25 focus-visible:outline-3"},{color:"success",variant:["soft","ghost"],class:"outline-success/25 focus-visible:outline-3"},{color:"info",variant:["soft","ghost"],class:"outline-info/25 focus-visible:outline-3"},{color:"warning",variant:["soft","ghost"],class:"outline-warning/25 focus-visible:outline-3"},{color:"error",variant:["soft","ghost"],class:"outline-error/25 focus-visible:outline-3"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted"},{color:"neutral",variant:["soft","ghost"],class:"outline-inverted/25 focus-visible:outline-3"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline",position:"popper"}},Sl=Object.assign({inheritAttrs:!1},{__name:"USelectMenu",props:at({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:at(["change","blur","focus","create","clear","highlight","update:modelValue","update:open"],["update:searchTerm"]),setup(n,{expose:r,emit:a}){const l=n,i=a,o=pt(),t=Ut("selectMenu",l),d=Wt(n,"searchTerm",{type:String,default:""}),{t:b}=Yt(),B=Qt(),{filterGroups:I}=ca(),z=Jt(Xt(t,"modelValue","defaultValue","open","defaultOpen","required","multiple","resetSearchTermOnBlur","resetSearchTermOnSelect","resetModelValueOnClear","highlightOnHover","by"),i),v=Zt(fe(()=>t.portal)),h=fe(()=>Ae(t.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:"popper"})),m=fe(()=>Ae(t.arrow,{rounded:!0})),p=V(()=>typeof t.clear=="object"?t.clear:{}),C=fe(()=>t.virtualize?Ae(typeof t.virtualize=="boolean"?{}:t.virtualize,{estimateSize:hl(x.value,ne.value||"md",t.descriptionKey,!!o["item-description"])}):!1),k=fe(()=>Ae(t.searchInput,{placeholder:b("selectMenu.search"),variant:"none"})),{emitFormBlur:$,emitFormFocus:S,emitFormInput:L,emitFormChange:E,size:de,color:T,id:ie,name:X,highlight:oe,disabled:pe,ariaAttrs:be}=ea(l),{orientation:re,size:ce}=ta(l),{isLeading:N,isTrailing:R,leadingIconName:Q,trailingIconName:J}=aa(fe(()=>Ae(t,{trailingIcon:B.ui.icons.chevronDown}))),ne=V(()=>ce.value||de.value),[he,Z]=et(),[ee,Ve]=et({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),y=V(()=>ua({extend:yl,...B.ui?.selectMenu||{}})({color:T.value??t.color,variant:t.variant,size:ne?.value??t.size,loading:t.loading,highlight:oe.value??t.highlight,leading:N.value||!!t.avatar||!!o.leading,trailing:R.value||!!o.trailing,fieldGroup:re.value,virtualize:!!t.virtualize,multiple:t.multiple}));function Ge(f){if(t.multiple&&Array.isArray(f)){const D=f.map(s=>lt(ze.value,s,{labelKey:t.labelKey,valueKey:t.valueKey,by:t.by})).filter(s=>s!=null&&s!=="");return D.length>0?D.join(", "):void 0}return lt(ze.value,f,{labelKey:t.labelKey,valueKey:t.valueKey,by:t.by})}const Ie=V(()=>t.items?.length?pa(t.items)?t.items:[t.items]:[]),ze=V(()=>Ie.value.flatMap(f=>f)),u=V(()=>{if(t.ignoreFilter||!d.value)return Ie.value;const f=Array.isArray(t.filterFields)?t.filterFields:[t.labelKey];return I(Ie.value,d.value,{fields:f,isStructural:D=>M(D)&&!!D.type&&["label","separator"].includes(D.type)})}),x=V(()=>u.value.flatMap(f=>f)),q=V(()=>{if(!t.createItem||!d.value)return!1;const f=t.valueKey?{[t.valueKey]:d.value}:d.value;return typeof t.createItem=="object"&&t.createItem.when==="always"||t.createItem==="always"?!x.value.find(D=>da(D,f,t.by??t.valueKey)):!x.value.length}),O=V(()=>typeof t.createItem=="object"?t.createItem.position:"bottom"),j=je("triggerRef");function ye(){t.autofocus&&j.value?.$el?.focus({focusVisible:!0})}ge(()=>{setTimeout(()=>{ye()},t.autofocusDelay)});function _e(f){if(na(t.modelValue)===f)return;t.modelModifiers?.trim&&(typeof f=="string"||f===null||f===void 0)&&(f=f?.trim()??null),t.modelModifiers?.number&&(f=sa(f)),t.modelModifiers?.nullable&&(f??=null),t.modelModifiers?.optional&&!t.modelModifiers?.nullable&&f!==null&&(f??=void 0);const D=new Event("change",{target:{value:f}});i("change",D),E(),L(),t.resetSearchTermOnSelect&&(d.value="")}const Qe=G(!1);function bt(f){Qe.value=f;let D;if(f){const s=new FocusEvent("focus");i("focus",s),S(),clearTimeout(D)}else{const s=new FocusEvent("blur");i("blur",s),$(),t.resetSearchTermOnBlur&&(D=setTimeout(()=>{d.value=""},100))}}function ht(f){f.preventDefault(),f.stopPropagation(),i("create",d.value)}function yt(f,D){if(M(D)){if(D.disabled){f.preventDefault();return}D.onSelect?.(f)}}function M(f){return typeof f=="object"&&f!==null}function _t(f){return t.multiple&&Array.isArray(f)?f.length===0:f==null||f===""}function xt(){i("clear")}const Je=je("viewportRef"),Xe=je("comboboxRootRef");return Me(()=>t.items,async()=>{!Qe.value||!t.createItem||(await ue(),Xe.value?.highlightFirstItem?.())},{flush:"post"}),r({triggerRef:fe(()=>j.value?.$el),viewportRef:fe(()=>Je.value)}),(f,D)=>(c(),W(se,null,[A(e(he),null,{default:g(()=>[A(e(ot),{"data-slot":"item",class:K(y.value.item({class:e(t).ui?.item})),value:d.value,onSelect:ht},{default:g(()=>[Be("span",{"data-slot":"itemLabel",class:K(y.value.itemLabel({class:e(t).ui?.itemLabel}))},[w(f.$slots,"create-item-label",{item:d.value},()=>[Ce(ve(e(b)("selectMenu.create",{label:d.value})),1)])],2)]),_:3},8,["class","value"])]),_:3}),A(e(ee),null,{default:g(({item:s,index:te})=>[M(s)&&s.type==="label"?(c(),_(e(sl),{key:0,"data-slot":"label",class:K(y.value.label({class:[e(t).ui?.label,s.ui?.label,s.class]}))},{default:g(()=>[Ce(ve(e(xe)(s,e(t).labelKey)),1)]),_:2},1032,["class"])):M(s)&&s.type==="separator"?(c(),_(e(cl),{key:1,"data-slot":"separator",class:K(y.value.separator({class:[e(t).ui?.separator,s.ui?.separator,s.class]}))},null,8,["class"])):(c(),_(e(ot),{key:2,"data-slot":"item",class:K(y.value.item({class:[e(t).ui?.item,M(s)&&s.ui?.item,M(s)&&s.class]})),disabled:M(s)&&s.disabled,value:e(t).valueKey&&M(s)?e(xe)(s,e(t).valueKey):s,onSelect:U=>yt(U,s)},{default:g(()=>[w(f.$slots,"item",{item:s,index:te,ui:y.value},()=>[w(f.$slots,"item-leading",{item:s,index:te,ui:y.value},()=>[M(s)&&s.icon?(c(),_(Pe,{key:0,name:s.icon,"data-slot":"itemLeadingIcon",class:K(y.value.itemLeadingIcon({class:[e(t).ui?.itemLeadingIcon,s.ui?.itemLeadingIcon]}))},null,8,["name","class"])):M(s)&&s.avatar?(c(),_(tt,F({key:1,size:s.ui?.itemLeadingAvatarSize||e(t).ui?.itemLeadingAvatarSize||y.value.itemLeadingAvatarSize()},s.avatar,{"data-slot":"itemLeadingAvatar",class:y.value.itemLeadingAvatar({class:[e(t).ui?.itemLeadingAvatar,s.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):M(s)&&s.chip?(c(),_(la,F({key:2,size:s.ui?.itemLeadingChipSize||e(t).ui?.itemLeadingChipSize||y.value.itemLeadingChipSize(),inset:"",standalone:""},s.chip,{"data-slot":"itemLeadingChip",class:y.value.itemLeadingChip({class:[e(t).ui?.itemLeadingChip,s.ui?.itemLeadingChip]})}),null,16,["size","class"])):H("",!0)]),Be("span",{"data-slot":"itemWrapper",class:K(y.value.itemWrapper({class:[e(t).ui?.itemWrapper,M(s)&&s.ui?.itemWrapper]}))},[Be("span",{"data-slot":"itemLabel",class:K(y.value.itemLabel({class:[e(t).ui?.itemLabel,M(s)&&s.ui?.itemLabel]}))},[w(f.$slots,"item-label",{item:s,index:te},()=>[Ce(ve(M(s)?e(xe)(s,e(t).labelKey):s),1)])],2),M(s)&&(e(xe)(s,e(t).descriptionKey)||o["item-description"])?(c(),W("span",{key:0,"data-slot":"itemDescription",class:K(y.value.itemDescription({class:[e(t).ui?.itemDescription,M(s)&&s.ui?.itemDescription]}))},[w(f.$slots,"item-description",{item:s,index:te},()=>[Ce(ve(e(xe)(s,e(t).descriptionKey)),1)])],2)):H("",!0)],2),Be("span",{"data-slot":"itemTrailing",class:K(y.value.itemTrailing({class:[e(t).ui?.itemTrailing,M(s)&&s.ui?.itemTrailing]}))},[w(f.$slots,"item-trailing",{item:s,index:te,ui:y.value}),A(e(rl),{"as-child":""},{default:g(()=>[A(Pe,{name:e(t).selectedIcon||e(B).ui.icons.check,"data-slot":"itemTrailingIcon",class:K(y.value.itemTrailingIcon({class:[e(t).ui?.itemTrailingIcon,M(s)&&s.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:2},1032,["class","disabled","value","onSelect"]))]),_:3}),A(e(Ra),F({ref_key:"comboboxRootRef",ref:Xe},e(z),{"ignore-filter":"","as-child":"",name:e(X),disabled:e(pe),"onUpdate:modelValue":_e,"onUpdate:open":bt}),{default:g(({modelValue:s,open:te})=>[A(e($a),{"as-child":""},{default:g(()=>[A(e(vl),F({id:e(ie),ref_key:"triggerRef",ref:j,"data-slot":"base",class:y.value.base({class:[e(t).ui?.base,e(t).class]}),tabindex:"0"},{...f.$attrs,...e(be)}),{default:g(()=>[e(N)||e(t).avatar||o.leading?(c(),W("span",{key:0,"data-slot":"leading",class:K(y.value.leading({class:e(t).ui?.leading}))},[w(f.$slots,"leading",{modelValue:s,open:te,ui:y.value},()=>[e(N)&&e(Q)?(c(),_(Pe,{key:0,name:e(Q),"data-slot":"leadingIcon",class:K(y.value.leadingIcon({class:e(t).ui?.leadingIcon}))},null,8,["name","class"])):e(t).avatar?(c(),_(tt,F({key:1,size:e(t).ui?.itemLeadingAvatarSize||y.value.itemLeadingAvatarSize()},e(t).avatar,{"data-slot":"itemLeadingAvatar",class:y.value.itemLeadingAvatar({class:e(t).ui?.itemLeadingAvatar})}),null,16,["size","class"])):H("",!0)])],2)):H("",!0),w(f.$slots,"default",{modelValue:s,open:te,ui:y.value},()=>[(c(!0),W(se,null,De([Ge(s)],U=>(c(),W(se,{key:U},[U!=null?(c(),W("span",{key:0,"data-slot":"value",class:K(y.value.value({class:e(t).ui?.value}))},ve(U),3)):(c(),W("span",{key:1,"data-slot":"placeholder",class:K(y.value.placeholder({class:e(t).ui?.placeholder}))},ve(e(t).placeholder??" "),3))],64))),128))]),e(R)||o.trailing||e(t).clear?(c(),W("span",{key:1,"data-slot":"trailing",class:K(y.value.trailing({class:e(t).ui?.trailing}))},[w(f.$slots,"trailing",{modelValue:s,open:te,ui:y.value},()=>[e(t).clear&&!_t(s)?(c(),_(e(Ya),{key:0,"as-child":""},{default:g(()=>[A(ia,F({as:"span",icon:e(t).clearIcon||e(B).ui.icons.close,size:ne.value,variant:"link",color:"neutral",tabindex:"-1"},p.value,{"data-slot":"trailingClear",class:y.value.trailingClear({class:e(t).ui?.trailingClear}),onClick:we(xt,["stop"])}),null,16,["icon","size","class"])]),_:1})):e(J)?(c(),_(Pe,{key:1,name:e(J),"data-slot":"trailingIcon",class:K(y.value.trailingIcon({class:e(t).ui?.trailingIcon}))},null,8,["name","class"])):H("",!0)])],2)):H("",!0)]),_:2},1040,["id","class"])]),_:2},1024),A(e(dl),qe(Le(e(v))),{default:g(()=>[A(e(oa),null,{default:g(()=>[A(e(Ja),F({"data-slot":"content",class:y.value.content({class:e(t).ui?.content})},h.value),{default:g(()=>[A(e(mt),{trapped:"","data-slot":"focusScope",class:K(y.value.focusScope({class:e(t).ui?.focusScope}))},{default:g(()=>[w(f.$slots,"content-top"),e(t).searchInput?(c(),_(e(ll),{key:0,modelValue:d.value,"onUpdate:modelValue":D[1]||(D[1]=U=>d.value=U),"display-value":()=>d.value,"as-child":""},{default:g(()=>[A(ra,F({autofocus:"",autocomplete:"off",size:ne.value},k.value,{"model-modifiers":{trim:e(t).modelModifiers?.trim},"data-slot":"input",class:y.value.input({class:e(t).ui?.input}),onChange:D[0]||(D[0]=we(()=>{},["stop"]))}),null,16,["size","model-modifiers","class"])]),_:1},8,["modelValue","display-value"])):H("",!0),A(e(Za),{"data-slot":"empty",class:K(y.value.empty({class:e(t).ui?.empty}))},{default:g(()=>[w(f.$slots,"empty",{searchTerm:d.value},()=>[Ce(ve(d.value?e(b)("selectMenu.noMatch",{searchTerm:d.value}):e(b)("selectMenu.noData")),1)])]),_:3},8,["class"]),Be("div",{ref_key:"viewportRef",ref:Je,role:"presentation","data-slot":"viewport",class:K(y.value.viewport({class:e(t).ui?.viewport}))},[e(t).virtualize?(c(),W(se,{key:0},[q.value&&O.value==="top"?(c(),_(e(Z),{key:0})):H("",!0),A(e(gl),F({options:x.value,"text-content":U=>M(U)?e(xe)(U,e(t).labelKey):String(U)},C.value),{default:g(({option:U,virtualItem:Ke})=>[A(e(Ve),{item:U,index:Ke.index},null,8,["item","index"])]),_:1},16,["options","text-content"]),q.value&&O.value==="bottom"?(c(),_(e(Z),{key:1})):H("",!0)],64)):(c(),W(se,{key:1},[q.value&&O.value==="top"?(c(),_(e(Ue),{key:0,"data-slot":"group",class:K(y.value.group({class:e(t).ui?.group}))},{default:g(()=>[A(e(Z))]),_:1},8,["class"])):H("",!0),(c(!0),W(se,null,De(u.value,(U,Ke)=>(c(),_(e(Ue),{key:`group-${Ke}`,"data-slot":"group",class:K(y.value.group({class:e(t).ui?.group}))},{default:g(()=>[(c(!0),W(se,null,De(U,(Ct,Ze)=>(c(),_(e(Ve),{key:`group-${Ke}-${Ze}`,item:Ct,index:Ze},null,8,["item","index"]))),128))]),_:2},1032,["class"]))),128)),q.value&&O.value==="bottom"?(c(),_(e(Ue),{key:1,"data-slot":"group",class:K(y.value.group({class:e(t).ui?.group}))},{default:g(()=>[A(e(Z))]),_:1},8,["class"])):H("",!0)],64))],2),w(f.$slots,"content-bottom")]),_:3},8,["class"]),e(t).arrow?(c(),_(e(Ua),F({key:0},m.value,{"data-slot":"arrow",class:y.value.arrow({class:e(t).ui?.arrow})}),null,16,["class"])):H("",!0)]),_:3},16,["class"])]),_:3})]),_:3},16)]),_:3},16,["name","disabled"])],64))}});export{Fa as L,Sl as _,Ta as a,Ia as b,Ca as c,Va as d,ka as e,_a as f,hl as g,Il as i};
@@ -1 +1 @@
1
- import{_ as O}from"./ZFiQCMUB.js";import{_ as z}from"./DLSrtpsA.js";import{u as B,w as I,C as M,O as k,a as V,_ as L}from"./DX-MDGb3.js";import{d as P,n as j,o as n,c as d,k as t,j as s,g as E,Q as H,i as o,t as l,m as U,q as W,v as h,f as q,h as y,r as F}from"./NQikbhmK.js";const Q={class:"w-full relative"},X={key:0},A={class:"p-2 text-sm text-gray-900 dark:text-gray-100"},G={class:"font-semibold mb-1"},J={class:"space-y-0.5"},K={key:0,class:"text-gray-400 text-xs"},Y="rgb(148, 163, 184)",Z=P({__name:"TestCaseHistoryChart",props:{data:{},height:{default:200},markers:{default:()=>[]}},emits:["marker-click"],setup(p,{emit:f}){const i=p,x=f,v=y(()=>i.markers),c=y(()=>!i.data||i.data.length===0?[]:[...i.data].sort((a,m)=>new Date(a.startTime).getTime()-new Date(m.startTime).getTime()).map(a=>({id:a.id,runId:a.runId,date:new Date(a.startTime),duration:a.duration??void 0,status:a.status,runStatus:a.runStatus}))),b=e=>e.date,C=e=>e.duration,S=e=>e==="passed"?"rgb(34, 197, 94)":e==="failed"||e==="timedOut"?"rgb(239, 68, 68)":"rgb(156, 163, 175)",_=F(null),{tooltipData:r,tooltipPos:g,markerTooltip:T,markerTooltipPos:w,onRenderComplete:D}=B(_,c,{x:e=>e.date,series:[{y:e=>e.duration,color:e=>S(e.status)}],radius:5,hoverRadius:8,strokeWidth:2,hoverStrokeWidth:3,onClick:e=>j(`/test-runs/${e.runId}`),markers:v,onMarkerClick:e=>x("marker-click",e.id)}),R=[{color:"rgb(34, 197, 94)",label:"Passed"},{color:"rgb(239, 68, 68)",label:"Failed"},{color:"rgb(156, 163, 175)",label:"Skipped"}];return(e,a)=>{const m=O,$=z,N=L;return n(),d("div",Q,[t(c).length>0?(n(),d("div",X,[s(t(V),{ref_key:"xyContainerRef",ref:_,data:t(c),height:p.height,padding:{top:10,right:10,bottom:0,left:0},"on-render-complete":t(D)},{default:E(()=>[s(t(I),{x:b,y:C,color:[Y],"curve-type":t(M).MonotoneX,"line-width":1.5},null,8,["color","curve-type"]),s(t(k),{type:"x","tick-format":u=>new Date(u).toLocaleDateString("en-US",{month:"short",day:"numeric"})},null,8,["tick-format"]),s(t(k),{type:"y",label:"Duration (ms)","tick-format":u=>`${u}ms`},null,8,["tick-format"])]),_:1},8,["data","height","on-render-complete"]),t(r)?(n(),d("div",{key:0,class:"fixed z-50 pointer-events-none bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700",style:H({left:`${t(g).x}px`,top:`${t(g).y}px`})},[o("div",A,[o("div",G,l(new Date(t(r).date).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})),1),o("div",J,[o("div",null,[a[0]||(a[0]=U(" Status: ",-1)),o("span",{class:W(["font-medium capitalize",t(r).status==="passed"?"text-green-600":t(r).status==="failed"||t(r).status==="timedOut"?"text-red-600":""])},l(t(r).status),3)]),o("div",null,"Duration: "+l(t(r).duration)+"ms",1),t(r).runStatus?(n(),d("div",K," Run status: "+l(t(r).runStatus),1)):h("",!0)]),a[1]||(a[1]=o("div",{class:"text-gray-400 text-xs mt-1"},"Click to view run details",-1))])],4)):h("",!0),s(m,{marker:t(T),pos:t(w)},null,8,["marker","pos"])])):(n(),q($,{key:1,text:"No history data available to display chart"})),s(N,{items:R,dense:""})])}}}),ot=Object.assign(Z,{__name:"TestCaseHistoryChart"});export{ot as _};
1
+ import{_ as O}from"./C8e1EbJI.js";import{_ as z}from"./C1gTN4Q8.js";import{u as B,w as I,C as M,O as k,a as V,_ as L}from"./CwGWJbiy.js";import{d as P,n as j,o as n,c as d,k as t,j as s,g as E,Q as H,i as o,t as l,m as U,q as W,v as h,f as q,h as y,r as F}from"./Du2W7Jne.js";const Q={class:"w-full relative"},X={key:0},A={class:"p-2 text-sm text-gray-900 dark:text-gray-100"},G={class:"font-semibold mb-1"},J={class:"space-y-0.5"},K={key:0,class:"text-gray-400 text-xs"},Y="rgb(148, 163, 184)",Z=P({__name:"TestCaseHistoryChart",props:{data:{},height:{default:200},markers:{default:()=>[]}},emits:["marker-click"],setup(p,{emit:f}){const i=p,x=f,v=y(()=>i.markers),c=y(()=>!i.data||i.data.length===0?[]:[...i.data].sort((a,m)=>new Date(a.startTime).getTime()-new Date(m.startTime).getTime()).map(a=>({id:a.id,runId:a.runId,date:new Date(a.startTime),duration:a.duration??void 0,status:a.status,runStatus:a.runStatus}))),b=e=>e.date,C=e=>e.duration,S=e=>e==="passed"?"rgb(34, 197, 94)":e==="failed"||e==="timedOut"?"rgb(239, 68, 68)":"rgb(156, 163, 175)",_=F(null),{tooltipData:r,tooltipPos:g,markerTooltip:T,markerTooltipPos:w,onRenderComplete:D}=B(_,c,{x:e=>e.date,series:[{y:e=>e.duration,color:e=>S(e.status)}],radius:5,hoverRadius:8,strokeWidth:2,hoverStrokeWidth:3,onClick:e=>j(`/test-runs/${e.runId}`),markers:v,onMarkerClick:e=>x("marker-click",e.id)}),R=[{color:"rgb(34, 197, 94)",label:"Passed"},{color:"rgb(239, 68, 68)",label:"Failed"},{color:"rgb(156, 163, 175)",label:"Skipped"}];return(e,a)=>{const m=O,$=z,N=L;return n(),d("div",Q,[t(c).length>0?(n(),d("div",X,[s(t(V),{ref_key:"xyContainerRef",ref:_,data:t(c),height:p.height,padding:{top:10,right:10,bottom:0,left:0},"on-render-complete":t(D)},{default:E(()=>[s(t(I),{x:b,y:C,color:[Y],"curve-type":t(M).MonotoneX,"line-width":1.5},null,8,["color","curve-type"]),s(t(k),{type:"x","tick-format":u=>new Date(u).toLocaleDateString("en-US",{month:"short",day:"numeric"})},null,8,["tick-format"]),s(t(k),{type:"y",label:"Duration (ms)","tick-format":u=>`${u}ms`},null,8,["tick-format"])]),_:1},8,["data","height","on-render-complete"]),t(r)?(n(),d("div",{key:0,class:"fixed z-50 pointer-events-none bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700",style:H({left:`${t(g).x}px`,top:`${t(g).y}px`})},[o("div",A,[o("div",G,l(new Date(t(r).date).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})),1),o("div",J,[o("div",null,[a[0]||(a[0]=U(" Status: ",-1)),o("span",{class:W(["font-medium capitalize",t(r).status==="passed"?"text-green-600":t(r).status==="failed"||t(r).status==="timedOut"?"text-red-600":""])},l(t(r).status),3)]),o("div",null,"Duration: "+l(t(r).duration)+"ms",1),t(r).runStatus?(n(),d("div",K," Run status: "+l(t(r).runStatus),1)):h("",!0)]),a[1]||(a[1]=o("div",{class:"text-gray-400 text-xs mt-1"},"Click to view run details",-1))])],4)):h("",!0),s(m,{marker:t(T),pos:t(w)},null,8,["marker","pos"])])):(n(),q($,{key:1,text:"No history data available to display chart"})),s(N,{items:R,dense:""})])}}}),ot=Object.assign(Z,{__name:"TestCaseHistoryChart"});export{ot as _};
@@ -1 +1 @@
1
- import{d as i,o as a,c as t,V as n,F as r,y as c,f as d,g as _,i as m,t as b,_ as u}from"./NQikbhmK.js";const p={class:"flex items-center gap-1.5"},f={class:"hidden sm:inline"},g=i({__name:"NavbarActions",props:{actions:{},size:{default:"md"}},setup(s){return(l,k)=>{const o=u;return a(),t("div",p,[n(l.$slots,"leading"),(a(!0),t(r,null,c(s.actions,e=>(a(),d(o,{key:e.label,icon:e.icon,size:s.size,color:e.color,variant:e.variant,to:e.to,loading:e.loading,disabled:e.disabled,"aria-label":e.label,title:e.label,onClick:v=>e.onClick?.()},{default:_(()=>[m("span",f,b(e.label),1)]),_:2},1032,["icon","size","color","variant","to","loading","disabled","aria-label","title","onClick"]))),128)),n(l.$slots,"default")])}}}),B=Object.assign(g,{__name:"NavbarActions"});export{B as _};
1
+ import{d as i,o as a,c as t,V as n,F as r,y as c,f as d,g as _,i as m,t as b,_ as u}from"./Du2W7Jne.js";const p={class:"flex items-center gap-1.5"},f={class:"hidden sm:inline"},g=i({__name:"NavbarActions",props:{actions:{},size:{default:"md"}},setup(s){return(l,k)=>{const o=u;return a(),t("div",p,[n(l.$slots,"leading"),(a(!0),t(r,null,c(s.actions,e=>(a(),d(o,{key:e.label,icon:e.icon,size:s.size,color:e.color,variant:e.variant,to:e.to,loading:e.loading,disabled:e.disabled,"aria-label":e.label,title:e.label,onClick:v=>e.onClick?.()},{default:_(()=>[m("span",f,b(e.label),1)]),_:2},1032,["icon","size","color","variant","to","loading","disabled","aria-label","title","onClick"]))),128)),n(l.$slots,"default")])}}}),B=Object.assign(g,{__name:"NavbarActions"});export{B as _};
@@ -1,4 +1,4 @@
1
- import{r as ne,d as ce,o as p,c as f,k as c,i as x,V as Xe,j as S,p as ke,_ as _e,h as E,Q as it,F as M,y as Y,t as w,v as $,b as at,f as j,g as Q,m as R,A as zt,q as J,H as ye,K as It,an as Et,l as Pt,L as Lt,s as Bt,ao as Dt}from"./NQikbhmK.js";import{u as De}from"./Bn0YQDyy.js";import{g as qt,f as Ft}from"./CDk0q2hV.js";import{_ as qe}from"./C7P1UCO2.js";import{_ as Nt}from"./B3HO8kuh.js";import{_ as jt}from"./D0HNloZ9.js";import{_ as Mt}from"./BPRffDuo.js";import{h as Ke,_ as Ot}from"./rWNTSFD6.js";import{_ as Ht}from"./eaVkJRSa.js";function Zt(t,e=!1){const s=ne(e);try{const i=document.cookie.match(new RegExp(`(?:^|;\\s*)${t}=([^;]*)`));i&&(s.value=i[1]==="true")}catch{}function r(){document.cookie=`${t}=${s.value}; path=/; max-age=31536000; sameSite=lax`}function n(){s.value=!s.value,r()}function a(i){s.value=i,r()}return{folded:s,toggle:n,setFolded:a}}function Ut(t){return Zt(`piwi-summary-fold-${t}`,!1)}const Vt={class:"flex items-center gap-3"},Qt={class:"ml-auto shrink-0"},Gt={key:1,class:"relative"},Wt={class:"absolute top-1 right-1 z-10"},Xt=ce({__name:"FoldableSummary",props:{storageKey:{}},setup(t){const e=t,{folded:s,toggle:r}=Ut(e.storageKey);return(n,a)=>{const i=ke,l=_e;return p(),f("div",null,[c(s)?(p(),f("div",{key:0,class:"border border-gray-200 dark:border-gray-800 rounded-xl p-2.5 shadow-xs cursor-pointer select-none",onClick:a[0]||(a[0]=(...o)=>c(r)&&c(r)(...o))},[x("div",Vt,[Xe(n.$slots,"folded"),x("div",Qt,[S(i,{name:"i-lucide-chevron-down",class:"size-4 text-gray-400"})])])])):(p(),f("div",Gt,[x("div",Wt,[S(l,{icon:"i-lucide-chevron-up",size:"xs",color:"neutral",variant:"ghost",onClick:c(r),title:"Collapse summary"},null,8,["onClick"])]),Xe(n.$slots,"default")]))])}}}),Er=Object.assign(Xt,{__name:"FoldableSummary"});function Pr(t){const e=E(t),s=E(()=>{const n=e.value;return n===0||n>=5?"lg:col-span-12":n===4?"lg:col-span-4":n===1?"lg:col-span-9":"lg:col-span-6"}),r=E(()=>{const n=e.value;return n===0?"":n===3||n===4?"lg:col-span-2":"lg:col-span-3"});return{metadataBlockCount:e,summaryColSpanClass:s,blockColSpanClass:r}}const Kt=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp"]),Jt=new Set(["image/png","image/jpeg","image/gif","image/svg+xml","image/webp"]),Yt=new Set([".webm",".mp4",".ogg",".mov"]),es=new Set(["video/webm","video/mp4","video/ogg","video/quicktime"]);function Lr(t,e){const s="."+(t.toLowerCase().split(".").pop()||"");return!!(Kt.has(s)||e&&Jt.has(e.toLowerCase()))}function Br(t,e){const s="."+(t.toLowerCase().split(".").pop()||"");return!!(Yt.has(s)||e&&es.has(e.toLowerCase()))}function Dr(t){return t.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"")}const ts={class:"rounded-lg border border-default overflow-hidden bg-muted min-h-16"},ss={key:0,class:"flex items-center gap-2 p-4 text-sm text-gray-500"},ns={key:0,class:"text-sm font-bold text-gray-900 dark:text-white mt-4 mb-0.5 first:mt-0"},rs={key:1,class:"font-semibold text-gray-700 dark:text-gray-200 mt-2 mb-0.5"},is={key:2,class:"my-1 px-2 py-0.5 rounded bg-yellow-50 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 italic"},as={key:3,class:"text-gray-600 dark:text-gray-400 flex gap-1.5"},os={key:4,class:"text-gray-600 dark:text-gray-400"},ls={key:5,class:"h-2"},cs={key:6,class:"mt-2 px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded-t text-[10px] uppercase tracking-wide"},us={key:7,class:"overflow-x-auto bg-gray-50 dark:bg-gray-900/40"},ps=["innerHTML"],ds={key:8,class:"h-1 bg-gray-100 dark:bg-gray-800/50 rounded-b mb-2"},hs={key:2,class:"p-3 text-xs text-gray-400 italic"},gs=ce({__name:"MarkdownPreview",props:{text:{},loading:{type:Boolean},maxHeight:{}},setup(t){const e=t;function s(n){const a=[];let i=!1,l="",o=[];for(const d of n.split(`
1
+ import{r as ne,d as ce,o as p,c as f,k as c,i as x,V as Xe,j as S,p as ke,_ as _e,h as E,Q as it,F as M,y as Y,t as w,v as $,b as at,f as j,g as Q,m as R,A as zt,q as J,H as ye,K as It,an as Et,l as Pt,L as Lt,s as Bt,aq as Dt}from"./Du2W7Jne.js";import{u as De}from"./DSqHUrvO.js";import{g as qt,f as Ft}from"./DuwtTfO8.js";import{_ as qe}from"./Bm62iDV5.js";import{_ as Nt}from"./BUkim3TM.js";import{_ as jt}from"./BrQEE053.js";import{_ as Mt}from"./DJmoLeVt.js";import{h as Ke,_ as Ot}from"./B3obW6cw.js";import{_ as Ht}from"./DsesNydr.js";function Zt(t,e=!1){const s=ne(e);try{const i=document.cookie.match(new RegExp(`(?:^|;\\s*)${t}=([^;]*)`));i&&(s.value=i[1]==="true")}catch{}function r(){document.cookie=`${t}=${s.value}; path=/; max-age=31536000; sameSite=lax`}function n(){s.value=!s.value,r()}function a(i){s.value=i,r()}return{folded:s,toggle:n,setFolded:a}}function Ut(t){return Zt(`piwi-summary-fold-${t}`,!1)}const Vt={class:"flex items-center gap-3"},Qt={class:"ml-auto shrink-0"},Gt={key:1,class:"relative"},Wt={class:"absolute top-1 right-1 z-10"},Xt=ce({__name:"FoldableSummary",props:{storageKey:{}},setup(t){const e=t,{folded:s,toggle:r}=Ut(e.storageKey);return(n,a)=>{const i=ke,l=_e;return p(),f("div",null,[c(s)?(p(),f("div",{key:0,class:"border border-gray-200 dark:border-gray-800 rounded-xl p-2.5 shadow-xs cursor-pointer select-none",onClick:a[0]||(a[0]=(...o)=>c(r)&&c(r)(...o))},[x("div",Vt,[Xe(n.$slots,"folded"),x("div",Qt,[S(i,{name:"i-lucide-chevron-down",class:"size-4 text-gray-400"})])])])):(p(),f("div",Gt,[x("div",Wt,[S(l,{icon:"i-lucide-chevron-up",size:"xs",color:"neutral",variant:"ghost",onClick:c(r),title:"Collapse summary"},null,8,["onClick"])]),Xe(n.$slots,"default")]))])}}}),Er=Object.assign(Xt,{__name:"FoldableSummary"});function Pr(t){const e=E(t),s=E(()=>{const n=e.value;return n===0||n>=5?"lg:col-span-12":n===4?"lg:col-span-4":n===1?"lg:col-span-9":"lg:col-span-6"}),r=E(()=>{const n=e.value;return n===0?"":n===3||n===4?"lg:col-span-2":"lg:col-span-3"});return{metadataBlockCount:e,summaryColSpanClass:s,blockColSpanClass:r}}const Kt=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp"]),Jt=new Set(["image/png","image/jpeg","image/gif","image/svg+xml","image/webp"]),Yt=new Set([".webm",".mp4",".ogg",".mov"]),es=new Set(["video/webm","video/mp4","video/ogg","video/quicktime"]);function Lr(t,e){const s="."+(t.toLowerCase().split(".").pop()||"");return!!(Kt.has(s)||e&&Jt.has(e.toLowerCase()))}function Br(t,e){const s="."+(t.toLowerCase().split(".").pop()||"");return!!(Yt.has(s)||e&&es.has(e.toLowerCase()))}function Dr(t){return t.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"")}const ts={class:"rounded-lg border border-default overflow-hidden bg-muted min-h-16"},ss={key:0,class:"flex items-center gap-2 p-4 text-sm text-gray-500"},ns={key:0,class:"text-sm font-bold text-gray-900 dark:text-white mt-4 mb-0.5 first:mt-0"},rs={key:1,class:"font-semibold text-gray-700 dark:text-gray-200 mt-2 mb-0.5"},is={key:2,class:"my-1 px-2 py-0.5 rounded bg-yellow-50 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 italic"},as={key:3,class:"text-gray-600 dark:text-gray-400 flex gap-1.5"},os={key:4,class:"text-gray-600 dark:text-gray-400"},ls={key:5,class:"h-2"},cs={key:6,class:"mt-2 px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded-t text-[10px] uppercase tracking-wide"},us={key:7,class:"overflow-x-auto bg-gray-50 dark:bg-gray-900/40"},ps=["innerHTML"],ds={key:8,class:"h-1 bg-gray-100 dark:bg-gray-800/50 rounded-b mb-2"},hs={key:2,class:"p-3 text-xs text-gray-400 italic"},gs=ce({__name:"MarkdownPreview",props:{text:{},loading:{type:Boolean},maxHeight:{}},setup(t){const e=t;function s(n){const a=[];let i=!1,l="",o=[];for(const d of n.split(`
2
2
  `))if(!i)d.startsWith("```")?(i=!0,l=d.slice(3).trim(),o=[]):d.startsWith("## ")?a.push({kind:"h2",text:d.slice(3)}):d.startsWith("### ")?a.push({kind:"h3",text:d.slice(4)}):d.startsWith("> ")?a.push({kind:"note",text:d.slice(2)}):d.startsWith("- ")?a.push({kind:"bullet",text:d.slice(2)}):d.trim()===""?a.push({kind:"blank"}):a.push({kind:"text",text:d});else if(d==="```"){const h=o.join(`
3
3
  `);if(o.length){const{html:m}=Ke(h,l);a.push({kind:"code-start",lang:l||"code"}),a.push({kind:"code-block",html:m}),a.push({kind:"code-end"})}i=!1}else o.push(d);if(i&&o.length){const{html:d}=Ke(o.join(`
4
4
  `),l);a.push({kind:"code-start",lang:l||"code"}),a.push({kind:"code-block",html:d}),a.push({kind:"code-end"})}return a}const r=E(()=>e.text?s(e.text):[]);return(n,a)=>{const i=ke;return p(),f("div",ts,[t.loading?(p(),f("div",ss,[S(i,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),a[0]||(a[0]=x("span",null,"Fetching context… (includes SCM diff lookup)",-1))])):c(r).length?(p(),f("div",{key:1,class:"overflow-auto p-3 text-xs font-mono leading-relaxed",style:it({maxHeight:t.maxHeight??"45vh"})},[(p(!0),f(M,null,Y(c(r),(l,o)=>(p(),f(M,{key:o},[l.kind==="h2"?(p(),f("div",ns,w(l.text),1)):l.kind==="h3"?(p(),f("div",rs,w(l.text),1)):l.kind==="note"?(p(),f("div",is,w(l.text),1)):l.kind==="bullet"?(p(),f("div",as,[a[1]||(a[1]=x("span",{class:"text-gray-400 shrink-0"},"·",-1)),x("span",null,w(l.text),1)])):l.kind==="text"?(p(),f("div",os,w(l.text),1)):l.kind==="blank"?(p(),f("div",ls)):l.kind==="code-start"?(p(),f("div",cs,w(l.lang||"code"),1)):l.kind==="code-block"?(p(),f("div",us,[x("pre",{class:"hljs px-2 py-1 !bg-transparent whitespace-pre-wrap",innerHTML:l.html},null,8,ps)])):l.kind==="code-end"?(p(),f("div",ds)):$("",!0)],64))),128))],4)):(p(),f("div",hs,"No context loaded"))])}}}),ot=Object.assign(gs,{__name:"MarkdownPreview"}),fs=ce({__name:"CopyAiPromptButton",props:{contextEndpoint:{}},setup(t){const e=t,{copy:s,copied:r}=De(),n=at(),a=ne(!1),i=E(()=>(zt().app?.baseURL??"/").replace(/\/$/,""));async function l(){a.value=!0;try{const o=await fetch(`${i.value}${e.contextEndpoint}?format=prompt`);if(!o.ok)throw new Error(`Request failed (${o.status})`);s(await o.text(),{toast:"AI prompt copied"})}catch(o){n.add({title:"Could not copy the prompt",description:qt(o),color:"error"})}finally{a.value=!1}}return(o,d)=>{const h=_e;return p(),j(h,{icon:c(r)?"i-lucide-check":"i-lucide-clipboard-copy",size:"xs",color:"neutral",variant:"outline",loading:c(a),title:"Copy the exact request Piwi would send to the model — to reuse it elsewhere, or to check what it contains",onClick:l},{default:Q(()=>[R(w(c(r)?"Copied":"Copy prompt"),1)]),_:1},8,["icon","loading"])}}}),qr=Object.assign(fs,{__name:"CopyAiPromptButton"}),Se=[{id:"clusterSummary",label:"Failure cluster summary",short:"Cluster"},{id:"sampleError",label:"Raw error message",short:"Error"},{id:"representativeExecution",label:"Representative execution overview",short:"Execution"},{id:"executionError",label:"Representative execution error",short:"Error"},{id:"runContext",label:"Run context (partial run, parallelism, flaky class)",short:"Run context"},{id:"testAnnotations",label:"Test annotations (@fixme/@flaky …)",short:"Annotations"},{id:"affectedTests",label:"Affected tests",short:"Tests"},{id:"testSource",label:"Test source code",short:"Source"},{id:"sourceFiles",label:"Full source files (suspect + imports)",short:"Files"},{id:"steps",label:"Test steps",short:"Steps"},{id:"failingSteps",label:"Failing steps",short:"Steps"},{id:"console",label:"Browser console logs",short:"Console"},{id:"networkRequests",label:"Network requests",short:"Network"},{id:"serverLogs",label:"Backend server logs",short:"Server logs"},{id:"serverTraces",label:"Server traces (spans)",short:"Traces"},{id:"webVitals",label:"Web vitals",short:"Web vitals"},{id:"appState",label:"App state at test end (URL/storage/cookies)",short:"App state"},{id:"ariaSnapshot",label:"ARIA snapshot",short:"ARIA"},{id:"domSnapshot",label:"DOM snapshot from trace (failure time)",short:"DOM"},{id:"screenshots",label:"Screenshots (attached as images)",short:"Screenshots"},{id:"visualDiff",label:"Visual diff vs last passing screenshot",short:"Visual diff"},{id:"browserDistribution",label:"Browser distribution",short:"Browsers"},{id:"recurrenceFlakiness",label:"Recurrence & flakiness",short:"Flakiness"},{id:"baselineComparison",label:"Compared to last pass (duration/vitals/steps)",short:"Baseline"},{id:"environmentDiff",label:"Environment diff vs last pass",short:"Env diff"},{id:"retryProgression",label:"Retry progression (per-attempt errors)",short:"Retries"},{id:"passedPeers",label:"Passing peers in same file",short:"Peers"},{id:"scmInvestigation",label:"SCM diff since last green",short:"SCM diff"},{id:"selectedCommits",label:"Manually selected commits",short:"Commits"},{id:"priorDiagnosis",label:"Prior diagnosis & triage",short:"Prior"},{id:"tracePointers",label:"Trace files",short:"Traces"},{id:"artifacts",label:"Attachments & artifacts (video, HAR)",short:"Artifacts"},{id:"nearestAriaNames",label:"Nearest matching ARIA names from snapshot",short:"Nearest ARIA"},{id:"alreadyGreen",label:"Baseline freshness / already-green check",short:"Already green"},{id:"topSuspectedCommit",label:"Top suspected commit",short:"Top commit"},{id:"failingAction",label:"Failing action from trace parsing",short:"Trace"},{id:"traceCallStack",label:"Full call stack with source (from trace)",short:"Call stack"},{id:"traceNetwork",label:"Network activity from trace (all requests)",short:"Trace net"},{id:"locatorHealing",label:"Alternative locators from prior success",short:"Alt locators"}],lt=new Set(Se.map(t=>t.id)),ct=Object.fromEntries(Se.map(t=>[t.id,t.short]));function ks(t){return lt.has(t)}function Fr(t){const e=new Set;for(const s of t)if(s)for(const r of String(s).matchAll(/\[([a-zA-Z][a-zA-Z0-9]*)]/g))lt.has(r[1])&&e.add(r[1]);return[...e]}const xs={class:"rounded-lg border border-default bg-elevated/30 px-2.5 py-2"},ms={key:0,class:"flex items-center gap-2 text-xs text-gray-400"},bs={key:1,class:"flex flex-wrap items-center gap-1.5"},ys={class:"text-xs font-medium text-gray-500 inline-flex items-center gap-1"},ws=["title","onClick"],vs={key:0,class:"text-xs text-gray-400"},$s=ce({__name:"DiagnosisCoverageStrip",props:{sections:{},notApplicable:{},tokenEstimate:{},loading:{type:Boolean}},emits:["view-section","open"],setup(t,{emit:e}){const s=t,r=e,n=E(()=>s.sections.map(l=>({id:l.id,short:ct[l.id]??l.title??l.id,truncated:l.truncated}))),a=E(()=>Math.max(0,Se.length-s.sections.length)),i=E(()=>{const l=s.tokenEstimate;return l?l>=1e3?`${(l/1e3).toFixed(1)}k`:String(l):""});return(l,o)=>{const d=ke,h=qe;return p(),f("div",xs,[t.loading&&!t.sections.length?(p(),f("div",ms,[S(d,{name:"i-lucide-loader-circle",class:"size-3.5 animate-spin"}),o[1]||(o[1]=R(" Building context… ",-1))])):(p(),f("div",bs,[x("span",ys,[S(d,{name:"i-lucide-layers",class:"size-3.5"}),o[2]||(o[2]=R(" Context ",-1)),S(h,{topic:"cluster.coverage"})]),(p(!0),f(M,null,Y(c(n),m=>(p(),f("button",{key:m.id,type:"button",class:"inline-flex items-center gap-1 rounded-full border border-default bg-default px-2 py-0.5 text-xs hover:border-primary/50 transition-colors",title:m.truncated?`${m.short} (truncated)`:m.short,onClick:b=>r("view-section",m.id)},[S(d,{name:m.truncated?"i-lucide-scissors":"i-lucide-check",class:J(["size-3",m.truncated?"text-warning":"text-success"])},null,8,["name","class"]),R(" "+w(m.short),1)],8,ws))),128)),c(n).length?$("",!0):(p(),f("span",vs,"No evidence sections yet")),x("button",{type:"button",class:"ml-auto text-xs text-gray-400 hover:text-primary transition-colors whitespace-nowrap",onClick:o[0]||(o[0]=m=>r("open"))},[c(a)?(p(),f(M,{key:0},[R(w(c(a))+" not included · ",1)],64)):$("",!0),c(i)?(p(),f(M,{key:1},[R("~"+w(c(i))+" tokens",1)],64)):$("",!0),S(d,{name:"i-lucide-arrow-right",class:"size-3 inline align-text-bottom"})])]))])}}}),Nr=Object.assign($s,{__name:"DiagnosisCoverageStrip"}),_s={class:"flex items-center justify-between w-full"},Ss={class:"flex items-center gap-2"},Cs={class:"font-semibold inline-flex items-center gap-1"},As={class:"text-xs text-gray-400"},Rs={class:"flex items-center gap-1"},Ts={class:"rounded-lg border border-default bg-elevated/30 p-3 mb-4"},zs={class:"flex items-center justify-between gap-2 mb-2"},Is={class:"text-xs font-medium text-gray-500 uppercase tracking-wide inline-flex items-center gap-1"},Es={class:"text-xs text-gray-400"},Ps={class:"flex flex-wrap gap-1.5"},Ls=["title"],Bs={class:"text-xs text-gray-400 mt-2"},Ds={class:"space-y-4"},qs={class:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-2"},Fs={class:"space-y-2"},Ns=["data-section-id"],js={key:0,class:"text-center text-gray-400 py-8 text-sm"},Ms=ce({__name:"DiagnosisContextModal",props:{open:{type:Boolean},sections:{},tokenEstimate:{},imageTokenEstimate:{},loading:{type:Boolean},focusSection:{},citedSections:{},notApplicableSections:{}},emits:["update:open","refresh"],setup(t,{emit:e}){const s=t,r=E(()=>{const v=new Map;for(const y of s.sections)v.has(y.id)||v.set(y.id,y);return v}),n=E(()=>new Set(Object.keys(s.notApplicableSections??{}))),a=E(()=>new Set(s.citedSections??[])),i=E(()=>Se.map(v=>{if(n.value.has(v.id))return{id:v.id,short:v.short,label:v.label,state:"notApplicable",cited:a.value.has(v.id)};const y=r.value.get(v.id),L=y?y.truncated?"truncated":"present":"absent";return{id:v.id,short:v.short,label:v.label,state:L,cited:a.value.has(v.id)}})),l=E(()=>{const v={present:0,truncated:0,absent:0,notApplicable:0};for(const y of i.value)v[y.state]++;return v}),o={present:"bg-emerald-500",truncated:"bg-amber-500",absent:"bg-gray-300 dark:bg-gray-600",notApplicable:"bg-purple-400"};function d(v){if(v.state==="notApplicable"){const y=s.notApplicableSections?.[v.id];return`${v.label}: not applicable${y?` — ${y}`:""}`}return`${v.label}: ${v.state}${v.cited?" · cited by the diagnosis":""}`}const h=e,{copy:m,copied:b}=De(),z=E(()=>{const v=[],y=["clusterSummary","sampleError","representativeExecution","executionError","runContext"],L=["testAnnotations","testSource","steps","failingSteps","console","networkRequests","serverLogs","serverTraces","webVitals","ariaSnapshot"],ee=["recurrenceFlakiness","baselineComparison","retryProgression","passedPeers","browserDistribution","affectedTests"],re=["scmInvestigation","selectedCommits"],te=["priorDiagnosis","tracePointers","artifacts"],q=(P,F)=>{const le=s.sections.filter(Re=>P.includes(Re.id));le.length>0&&v.push({label:F,items:le})};return q(y,"Primary"),q(L,"Test Evidence"),q(ee,"Analysis"),q(re,"SCM"),q(te,"Other"),v}),_=ne(null);ye(()=>[s.open,s.focusSection],async([v,y])=>{if(!v||!y)return;await It();const L=document.querySelector(`[data-section-id="${y}"]`);L&&(L.scrollIntoView({behavior:"smooth",block:"start"}),_.value=y,setTimeout(()=>{_.value===y&&(_.value=null)},2500))});function H(v){let y=`## ${v.title}`;const L=[];return L.push(`${v.chars} chars`),v.truncated&&L.push("truncated"),v.items!=null&&L.push(`${v.items} items`),L.length&&(y+=` — ${L.join(", ")}`),y}return(v,y)=>{const L=qe,ee=_e,re=ke,te=ot,q=Nt;return p(),j(q,{open:t.open,title:"Context sent to AI",ui:{content:"max-w-5xl"},"onUpdate:open":y[2]||(y[2]=P=>h("update:open",P))},{header:Q(()=>[x("div",_s,[x("div",Ss,[x("span",Cs,[y[3]||(y[3]=R(" Context sent to AI ",-1)),S(L,{topic:"cluster.context-preview"})]),x("span",As,[R(" ~"+w(t.tokenEstimate)+" tokens",1),t.imageTokenEstimate?(p(),f(M,{key:0},[R(" ("+w(t.tokenEstimate-t.imageTokenEstimate)+" text + "+w(t.imageTokenEstimate)+" image)",1)],64)):$("",!0)])]),x("div",Rs,[S(ee,{icon:"i-lucide-refresh-cw",size:"xs",color:"neutral",variant:"ghost",loading:t.loading,onClick:y[0]||(y[0]=P=>h("refresh"))},null,8,["loading"]),S(ee,{icon:"i-lucide-x",size:"xs",color:"neutral",variant:"ghost",onClick:y[1]||(y[1]=P=>h("update:open",!1))})])])]),body:Q(()=>[y[7]||(y[7]=x("p",{class:"text-xs text-gray-500 dark:text-gray-400 mb-3"},"Copy individual sections or the full context below.",-1)),x("div",Ts,[x("div",zs,[x("p",Is,[y[4]||(y[4]=R(" Data coverage ",-1)),S(L,{topic:"cluster.coverage"})]),x("p",Es,w(c(l).present)+" present · "+w(c(l).truncated)+" truncated · "+w(c(l).absent)+" absent"+w(c(l).notApplicable?` · ${c(l).notApplicable} n/a`:""),1)]),x("div",Ps,[(p(!0),f(M,null,Y(c(i),P=>(p(),f("span",{key:P.id,class:J(["inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-xs",[P.cited?"border-primary text-primary":"border-default",P.state==="absent"?"text-gray-400 opacity-70":"",P.state==="notApplicable"?"text-purple-500 border-purple-300 dark:border-purple-700":""]]),title:d(P)},[x("span",{class:J(["size-1.5 rounded-full shrink-0",o[P.state]])},null,2),R(" "+w(P.short)+" ",1),P.cited?(p(),j(re,{key:0,name:"i-lucide-quote",class:"size-2.5 shrink-0"})):$("",!0)],10,Ls))),128))]),x("p",Bs,[y[5]||(y[5]=R(" Absent or truncated evidence lowers the diagnosis confidence. ",-1)),S(re,{name:"i-lucide-quote",class:"size-2.5 inline"}),y[6]||(y[6]=R(" marks sections the diagnosis cited. ",-1))])]),x("div",Ds,[(p(!0),f(M,null,Y(c(z),P=>(p(),f("div",{key:P.label},[x("p",qs,w(P.label),1),x("div",Fs,[(p(!0),f(M,null,Y(P.items,F=>(p(),f("div",{key:F.id,"data-section-id":F.id,class:J(["relative rounded-lg transition-shadow",c(_)===F.id?"ring-2 ring-primary":c(a).has(F.id)?"ring-1 ring-primary/40":""])},[S(te,{text:H(F)+`
@@ -1 +1 @@
1
- import{_ as k}from"./D0HNloZ9.js";import{d as _,f as r,g as l,k as b,o as n,c as a,t as u,m as h,F as g,y as V,h as f,i as y,v,ac as x,V as p}from"./NQikbhmK.js";import{_ as B}from"./C7P1UCO2.js";import{_ as $}from"./CZfMdzfk.js";import{_ as E}from"./B9WhzpKO.js";import{h as M}from"./BjaRappk.js";const F={key:0},S={key:1},q={class:"font-mono text-xs"},A={key:0},C={key:2},N=_({__name:"EnvManagedAlert",props:{envVars:{},title:{},description:{}},setup(e){const t=e,c=f(()=>t.title??"Managed by environment variables");return(o,s)=>{const d=k;return n(),r(d,{icon:"i-lucide-lock",color:"neutral",variant:"subtle",title:b(c)},{description:l(()=>[e.description?(n(),a("span",F,u(e.description),1)):e.envVars?.length?(n(),a("span",S,[s[0]||(s[0]=h(" These settings are pinned by ",-1)),(n(!0),a(g,null,V(e.envVars,(i,m)=>(n(),a(g,{key:i},[y("code",q,u(i),1),m<e.envVars.length-1?(n(),a("span",A,", ")):v("",!0)],64))),128)),s[1]||(s[1]=h(" and cannot be changed here. Edit the environment and restart to change them. ",-1))])):(n(),a("span",C," These settings are pinned by environment variables and cannot be changed here. "))]),_:1},8,["title"])}}}),z=Object.assign(N,{__name:"EnvManagedAlert"}),T={class:"inline-flex items-center gap-1"},j=_({__name:"SettingsField",props:{label:{},help:{},envVars:{},envManaged:{type:Boolean},description:{},hint:{},required:{type:Boolean},name:{},disabled:{type:Boolean}},setup(e){const t=e,c=f(()=>{if(t.envVars)return t.envVars;if(t.help)return M(t.help)});return(o,s)=>{const d=B,i=$,m=E;return n(),r(m,{label:e.label,description:e.description,hint:e.hint,required:e.required,name:e.name,disabled:e.disabled||e.envManaged},x({label:l(()=>[y("span",T,[h(u(e.label)+" ",1),e.help?(n(),r(d,{key:0,topic:e.help},null,8,["topic"])):v("",!0),e.envManaged?(n(),r(i,{key:1,"env-vars":b(c)},null,8,["env-vars"])):v("",!0)])]),default:l(()=>[p(o.$slots,"default")]),_:2},[o.$slots.trailing?{name:"trailing",fn:l(()=>[p(o.$slots,"trailing")]),key:"0"}:void 0]),1032,["label","description","hint","required","name","disabled"])}}}),G=Object.assign(j,{__name:"SettingsField"});export{z as _,G as a};
1
+ import{_ as k}from"./BrQEE053.js";import{d as _,f as r,g as l,k as b,o as n,c as a,t as u,m as h,F as g,y as V,h as f,i as y,v,ac as x,V as p}from"./Du2W7Jne.js";import{_ as B}from"./Bm62iDV5.js";import{_ as $}from"./BmUfSNMV.js";import{_ as E}from"./AbmKWFQQ.js";import{h as M}from"./BjaRappk.js";const F={key:0},S={key:1},q={class:"font-mono text-xs"},A={key:0},C={key:2},N=_({__name:"EnvManagedAlert",props:{envVars:{},title:{},description:{}},setup(e){const t=e,c=f(()=>t.title??"Managed by environment variables");return(o,s)=>{const d=k;return n(),r(d,{icon:"i-lucide-lock",color:"neutral",variant:"subtle",title:b(c)},{description:l(()=>[e.description?(n(),a("span",F,u(e.description),1)):e.envVars?.length?(n(),a("span",S,[s[0]||(s[0]=h(" These settings are pinned by ",-1)),(n(!0),a(g,null,V(e.envVars,(i,m)=>(n(),a(g,{key:i},[y("code",q,u(i),1),m<e.envVars.length-1?(n(),a("span",A,", ")):v("",!0)],64))),128)),s[1]||(s[1]=h(" and cannot be changed here. Edit the environment and restart to change them. ",-1))])):(n(),a("span",C," These settings are pinned by environment variables and cannot be changed here. "))]),_:1},8,["title"])}}}),z=Object.assign(N,{__name:"EnvManagedAlert"}),T={class:"inline-flex items-center gap-1"},j=_({__name:"SettingsField",props:{label:{},help:{},envVars:{},envManaged:{type:Boolean},description:{},hint:{},required:{type:Boolean},name:{},disabled:{type:Boolean}},setup(e){const t=e,c=f(()=>{if(t.envVars)return t.envVars;if(t.help)return M(t.help)});return(o,s)=>{const d=B,i=$,m=E;return n(),r(m,{label:e.label,description:e.description,hint:e.hint,required:e.required,name:e.name,disabled:e.disabled||e.envManaged},x({label:l(()=>[y("span",T,[h(u(e.label)+" ",1),e.help?(n(),r(d,{key:0,topic:e.help},null,8,["topic"])):v("",!0),e.envManaged?(n(),r(i,{key:1,"env-vars":b(c)},null,8,["env-vars"])):v("",!0)])]),default:l(()=>[p(o.$slots,"default")]),_:2},[o.$slots.trailing?{name:"trailing",fn:l(()=>[p(o.$slots,"trailing")]),key:"0"}:void 0]),1032,["label","description","hint","required","name","disabled"])}}}),G=Object.assign(j,{__name:"SettingsField"});export{z as _,G as a};