@oscharko-dev/keiko 0.3.8 → 0.3.9

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 (287) hide show
  1. package/dist/ui/csp-hashes.json +28 -27
  2. package/dist/ui/static/404.html +1 -1
  3. package/dist/ui/static/__next.__PAGE__.txt +2 -2
  4. package/dist/ui/static/__next._full.txt +11 -12
  5. package/dist/ui/static/__next._head.txt +1 -1
  6. package/dist/ui/static/__next._index.txt +3 -3
  7. package/dist/ui/static/__next._tree.txt +1 -1
  8. package/dist/ui/static/_next/static/chunks/03la2o0tcodk_.js +1 -0
  9. package/dist/ui/static/_next/static/chunks/061l2tjhvak63.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/{440of1tk-svp7.js → 0d5rtaf3-jc-x.js} +1 -1
  11. package/dist/ui/static/_next/static/chunks/0lorosh9iyl5i.js +7 -0
  12. package/dist/ui/static/_next/static/chunks/0ncsz59mr16k6.js +1 -0
  13. package/dist/ui/static/_next/static/chunks/{2ris2qfh-i8yp.js → 0ovebg0sbcqct.js} +1 -1
  14. package/dist/ui/static/_next/static/chunks/0q76qswp80ci1.js +1 -0
  15. package/dist/ui/static/_next/static/chunks/0rvhrleg8f98b.js +1 -0
  16. package/dist/ui/static/_next/static/chunks/0umcj95dn7ptb.js +1 -0
  17. package/dist/ui/static/_next/static/chunks/{1d7s5tsir6fhz.js → 1_m1z_f54hkji.js} +1 -1
  18. package/dist/ui/static/_next/static/chunks/1kfsvai94yvr2.js +1 -0
  19. package/dist/ui/static/_next/static/chunks/1pcygmx7pvpwp.js +4 -0
  20. package/dist/ui/static/_next/static/chunks/1q2pujkdoaygu.js +1 -0
  21. package/dist/ui/static/_next/static/chunks/1ziptu5xlzq_p.js +1 -0
  22. package/dist/ui/static/_next/static/chunks/{0q1jeqzmpadwy.js → 2b7g5wrm7slyv.js} +1 -1
  23. package/dist/ui/static/_next/static/chunks/2bzjr2ai0a8hq.js +1 -0
  24. package/dist/ui/static/_next/static/chunks/{1um8zhr3ig3xv.js → 2ksqufkg3ptp1.js} +1 -1
  25. package/dist/ui/static/_next/static/chunks/2lz9ujlsm75kc.js +3 -0
  26. package/dist/ui/static/_next/static/chunks/{0rt2s2w_savnr.js → 2ohow-fui5d_w.js} +1 -1
  27. package/dist/ui/static/_next/static/chunks/2qhtb4qq3arii.js +1 -0
  28. package/dist/ui/static/_next/static/chunks/2r_lex4m5unw5.js +3 -0
  29. package/dist/ui/static/_next/static/chunks/{2643eg8cfungj.js → 2rcawuh-77fnp.js} +1 -1
  30. package/dist/ui/static/_next/static/chunks/2sji-23jqwpol.js +1 -0
  31. package/dist/ui/static/_next/static/chunks/3-4iik5ytvbed.js +1 -0
  32. package/dist/ui/static/_next/static/chunks/36z66lssar4oh.js +1 -0
  33. package/dist/ui/static/_next/static/chunks/3ljwwkelljh81.js +1 -0
  34. package/dist/ui/static/_next/static/chunks/3mmcvq93ws1o_.js +1 -0
  35. package/dist/ui/static/_next/static/chunks/{2ghf_333iydt2.js → 3mw_ni1a9rykb.js} +1 -1
  36. package/dist/ui/static/_next/static/chunks/3oqygeiv31fa7.js +1 -0
  37. package/dist/ui/static/_next/static/chunks/3p83_dt4-z7q2.js +1 -0
  38. package/dist/ui/static/_next/static/chunks/3r74c2jeognx2.js +1 -0
  39. package/dist/ui/static/_next/static/chunks/3yu-e53axqbxi.js +1 -0
  40. package/dist/ui/static/_next/static/chunks/3zn27dbqgst19.js +1 -0
  41. package/dist/ui/static/_not-found/__next._full.txt +19 -14
  42. package/dist/ui/static/_not-found/__next._head.txt +1 -1
  43. package/dist/ui/static/_not-found/__next._index.txt +3 -3
  44. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
  45. package/dist/ui/static/_not-found/__next._not-found.txt +1 -1
  46. package/dist/ui/static/_not-found/__next._tree.txt +1 -1
  47. package/dist/ui/static/_not-found.html +1 -1
  48. package/dist/ui/static/_not-found.txt +19 -14
  49. package/dist/ui/static/atlassian-connectors/__next._full.txt +21 -17
  50. package/dist/ui/static/atlassian-connectors/__next._head.txt +1 -1
  51. package/dist/ui/static/atlassian-connectors/__next._index.txt +3 -3
  52. package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
  53. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +2 -2
  54. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.txt +2 -2
  55. package/dist/ui/static/atlassian-connectors.html +1 -1
  56. package/dist/ui/static/atlassian-connectors.txt +21 -17
  57. package/dist/ui/static/index.html +1 -1
  58. package/dist/ui/static/index.txt +11 -12
  59. package/dist/ui/static/launch/__next._full.txt +14 -15
  60. package/dist/ui/static/launch/__next._head.txt +1 -1
  61. package/dist/ui/static/launch/__next._index.txt +3 -3
  62. package/dist/ui/static/launch/__next._tree.txt +1 -1
  63. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +2 -2
  64. package/dist/ui/static/launch/__next.launch.txt +1 -1
  65. package/dist/ui/static/launch.html +1 -1
  66. package/dist/ui/static/launch.txt +14 -15
  67. package/dist/ui/static/local-knowledge/__next._full.txt +23 -25
  68. package/dist/ui/static/local-knowledge/__next._head.txt +1 -1
  69. package/dist/ui/static/local-knowledge/__next._index.txt +3 -3
  70. package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
  71. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +2 -2
  72. package/dist/ui/static/local-knowledge/__next.local-knowledge.txt +1 -1
  73. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +20 -19
  74. package/dist/ui/static/local-knowledge/capsule/__next._head.txt +1 -1
  75. package/dist/ui/static/local-knowledge/capsule/__next._index.txt +3 -3
  76. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
  77. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +2 -2
  78. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.txt +2 -2
  79. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.txt +1 -1
  80. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  81. package/dist/ui/static/local-knowledge/capsule.txt +20 -19
  82. package/dist/ui/static/local-knowledge.html +1 -1
  83. package/dist/ui/static/local-knowledge.txt +23 -25
  84. package/node_modules/@oscharko-dev/keiko-cli/package.json +13 -13
  85. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  86. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway-setup-audit.d.ts +35 -0
  87. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway-setup-audit.d.ts.map +1 -0
  88. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway-setup-audit.js +98 -0
  89. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts +6 -0
  90. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts.map +1 -1
  91. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.js +1 -1
  92. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +6 -4
  93. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  94. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.js +4 -3
  95. package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-analyzer.d.ts.map +1 -1
  96. package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-analyzer.js +4 -0
  97. package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/bffWire.d.ts +19 -4
  98. package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/bffWire.d.ts.map +1 -1
  99. package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/bffWire.js +12 -0
  100. package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/index.d.ts +2 -2
  101. package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/index.d.ts.map +1 -1
  102. package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/index.js +1 -1
  103. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  104. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  105. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  106. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  107. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  108. package/node_modules/@oscharko-dev/keiko-git/dist/index.d.ts +1 -1
  109. package/node_modules/@oscharko-dev/keiko-git/dist/index.d.ts.map +1 -1
  110. package/node_modules/@oscharko-dev/keiko-git/dist/index.js +1 -1
  111. package/node_modules/@oscharko-dev/keiko-git/dist/resolve.d.ts +11 -0
  112. package/node_modules/@oscharko-dev/keiko-git/dist/resolve.d.ts.map +1 -1
  113. package/node_modules/@oscharko-dev/keiko-git/dist/resolve.js +11 -1
  114. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  115. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  116. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  117. package/node_modules/@oscharko-dev/keiko-harness/package.json +6 -6
  118. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts.map +1 -1
  119. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.js +22 -9
  120. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.d.ts.map +1 -1
  121. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.js +15 -6
  122. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  123. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  124. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  125. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/salience.d.ts +1 -1
  126. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/salience.d.ts.map +1 -1
  127. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/salience.js +32 -8
  128. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  129. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  130. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  131. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  132. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  133. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  134. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  135. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  136. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  137. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  138. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  139. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  140. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  141. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  142. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  143. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/embedding.d.ts +1 -1
  144. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/embedding.d.ts.map +1 -1
  145. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/embedding.js +24 -7
  146. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts +3 -1
  147. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
  148. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +3 -3
  149. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/promptEnhancer/generator.d.ts.map +1 -1
  150. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/promptEnhancer/generator.js +45 -4
  151. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  152. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  153. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +3 -3
  154. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  155. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  156. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  157. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  158. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  159. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  160. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts +11 -0
  161. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts.map +1 -1
  162. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.js +144 -53
  163. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.d.ts.map +1 -1
  164. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.js +70 -15
  165. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts.map +1 -1
  166. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.js +11 -6
  167. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts +15 -0
  168. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts.map +1 -0
  169. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.js +40 -0
  170. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts.map +1 -1
  171. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.js +5 -1
  172. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-admission.d.ts +17 -0
  173. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-admission.d.ts.map +1 -0
  174. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-admission.js +62 -0
  175. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +3 -1
  176. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  177. package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +8 -0
  178. package/node_modules/@oscharko-dev/keiko-server/dist/files.d.ts +15 -0
  179. package/node_modules/@oscharko-dev/keiko-server/dist/files.d.ts.map +1 -1
  180. package/node_modules/@oscharko-dev/keiko-server/dist/files.js +61 -7
  181. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
  182. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +36 -6
  183. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts +2 -0
  184. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  185. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +120 -6
  186. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts +10 -1
  187. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts.map +1 -1
  188. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.js +20 -6
  189. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts +3 -0
  190. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts.map +1 -1
  191. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.js +3 -1
  192. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +5 -1
  193. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts.map +1 -1
  194. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +72 -29
  195. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts +2 -1
  196. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts.map +1 -1
  197. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.js +24 -11
  198. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.d.ts.map +1 -1
  199. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.js +15 -10
  200. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/uiRoutes.d.ts.map +1 -1
  201. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/uiRoutes.js +8 -0
  202. package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.d.ts.map +1 -1
  203. package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.js +7 -2
  204. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts.map +1 -1
  205. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.js +4 -1
  206. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts +1 -0
  207. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts.map +1 -1
  208. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.js +27 -0
  209. package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts +1 -0
  210. package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts.map +1 -1
  211. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/mutex.d.ts +1 -0
  212. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/mutex.d.ts.map +1 -1
  213. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/mutex.js +52 -1
  214. package/node_modules/@oscharko-dev/keiko-server/package.json +21 -21
  215. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  216. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  217. package/node_modules/@oscharko-dev/keiko-tools/package.json +5 -5
  218. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  219. package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/modelRoutedTestDesign.d.ts.map +1 -1
  220. package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/modelRoutedTestDesign.js +25 -4
  221. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  222. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  223. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  224. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  225. package/package.json +25 -25
  226. package/release-impact.catalog.json +56 -2
  227. package/vendor/{oscharko-dev-keiko-cli-0.3.8.tgz → oscharko-dev-keiko-cli-0.3.9.tgz} +0 -0
  228. package/vendor/{oscharko-dev-keiko-connectors-0.3.8.tgz → oscharko-dev-keiko-connectors-0.3.9.tgz} +0 -0
  229. package/vendor/oscharko-dev-keiko-contracts-0.3.9.tgz +0 -0
  230. package/vendor/{oscharko-dev-keiko-evaluations-0.3.8.tgz → oscharko-dev-keiko-evaluations-0.3.9.tgz} +0 -0
  231. package/vendor/{oscharko-dev-keiko-evidence-0.3.8.tgz → oscharko-dev-keiko-evidence-0.3.9.tgz} +0 -0
  232. package/vendor/oscharko-dev-keiko-git-0.3.9.tgz +0 -0
  233. package/vendor/oscharko-dev-keiko-harness-0.3.9.tgz +0 -0
  234. package/vendor/oscharko-dev-keiko-local-knowledge-0.3.9.tgz +0 -0
  235. package/vendor/oscharko-dev-keiko-memory-capture-0.3.9.tgz +0 -0
  236. package/vendor/{oscharko-dev-keiko-memory-consolidation-0.3.8.tgz → oscharko-dev-keiko-memory-consolidation-0.3.9.tgz} +0 -0
  237. package/vendor/{oscharko-dev-keiko-memory-governance-0.3.8.tgz → oscharko-dev-keiko-memory-governance-0.3.9.tgz} +0 -0
  238. package/vendor/{oscharko-dev-keiko-memory-retrieval-0.3.8.tgz → oscharko-dev-keiko-memory-retrieval-0.3.9.tgz} +0 -0
  239. package/vendor/{oscharko-dev-keiko-memory-vault-0.3.8.tgz → oscharko-dev-keiko-memory-vault-0.3.9.tgz} +0 -0
  240. package/vendor/oscharko-dev-keiko-model-gateway-0.3.9.tgz +0 -0
  241. package/vendor/{oscharko-dev-keiko-quality-intelligence-0.3.8.tgz → oscharko-dev-keiko-quality-intelligence-0.3.9.tgz} +0 -0
  242. package/vendor/oscharko-dev-keiko-sandbox-0.3.9.tgz +0 -0
  243. package/vendor/oscharko-dev-keiko-sdk-0.3.9.tgz +0 -0
  244. package/vendor/{oscharko-dev-keiko-security-0.3.8.tgz → oscharko-dev-keiko-security-0.3.9.tgz} +0 -0
  245. package/vendor/oscharko-dev-keiko-server-0.3.9.tgz +0 -0
  246. package/vendor/{oscharko-dev-keiko-tools-0.3.8.tgz → oscharko-dev-keiko-tools-0.3.9.tgz} +0 -0
  247. package/vendor/oscharko-dev-keiko-verification-0.3.9.tgz +0 -0
  248. package/vendor/oscharko-dev-keiko-workflows-0.3.9.tgz +0 -0
  249. package/vendor/{oscharko-dev-keiko-workspace-0.3.8.tgz → oscharko-dev-keiko-workspace-0.3.9.tgz} +0 -0
  250. package/dist/ui/static/_next/static/chunks/086nnnmz_fywd.js +0 -1
  251. package/dist/ui/static/_next/static/chunks/0j7newhpahad3.js +0 -4
  252. package/dist/ui/static/_next/static/chunks/0qzc6iq46cys8.js +0 -1
  253. package/dist/ui/static/_next/static/chunks/0w9yukh2frhl7.js +0 -3
  254. package/dist/ui/static/_next/static/chunks/12tubu4vls8ub.js +0 -1
  255. package/dist/ui/static/_next/static/chunks/15dlwl7oa5tcy.js +0 -1
  256. package/dist/ui/static/_next/static/chunks/1k1foyy560lcg.js +0 -1
  257. package/dist/ui/static/_next/static/chunks/1nrtmr69b4b8b.js +0 -3
  258. package/dist/ui/static/_next/static/chunks/1xfdw53h1onrd.js +0 -1
  259. package/dist/ui/static/_next/static/chunks/2e2nqd6u2hlue.js +0 -1
  260. package/dist/ui/static/_next/static/chunks/2gnfi9geipm26.js +0 -1
  261. package/dist/ui/static/_next/static/chunks/2gsud81bhet1a.js +0 -1
  262. package/dist/ui/static/_next/static/chunks/2homfxfhdb03_.js +0 -7
  263. package/dist/ui/static/_next/static/chunks/2qmmts3k57-yo.js +0 -1
  264. package/dist/ui/static/_next/static/chunks/2wuojl4wm2nz2.js +0 -1
  265. package/dist/ui/static/_next/static/chunks/36ptysojb77co.js +0 -1
  266. package/dist/ui/static/_next/static/chunks/39fa_n4fmmm_n.js +0 -1
  267. package/dist/ui/static/_next/static/chunks/3d6nm9igh3-oe.js +0 -1
  268. package/dist/ui/static/_next/static/chunks/3jvnor1lofqja.js +0 -1
  269. package/dist/ui/static/_next/static/chunks/3vln5dgrjjzxf.js +0 -1
  270. package/dist/ui/static/_next/static/chunks/3vwy5ym45warf.js +0 -1
  271. package/dist/ui/static/_next/static/chunks/3w8dtm11s4f_j.js +0 -1
  272. package/dist/ui/static/_next/static/chunks/3z9z-4k1kedfm.js +0 -1
  273. package/dist/ui/static/_next/static/chunks/41utq0q7no-vg.js +0 -1
  274. package/vendor/oscharko-dev-keiko-contracts-0.3.8.tgz +0 -0
  275. package/vendor/oscharko-dev-keiko-git-0.3.8.tgz +0 -0
  276. package/vendor/oscharko-dev-keiko-harness-0.3.8.tgz +0 -0
  277. package/vendor/oscharko-dev-keiko-local-knowledge-0.3.8.tgz +0 -0
  278. package/vendor/oscharko-dev-keiko-memory-capture-0.3.8.tgz +0 -0
  279. package/vendor/oscharko-dev-keiko-model-gateway-0.3.8.tgz +0 -0
  280. package/vendor/oscharko-dev-keiko-sandbox-0.3.8.tgz +0 -0
  281. package/vendor/oscharko-dev-keiko-sdk-0.3.8.tgz +0 -0
  282. package/vendor/oscharko-dev-keiko-server-0.3.8.tgz +0 -0
  283. package/vendor/oscharko-dev-keiko-verification-0.3.8.tgz +0 -0
  284. package/vendor/oscharko-dev-keiko-workflows-0.3.8.tgz +0 -0
  285. /package/dist/ui/static/_next/static/{HRXN4QzQnsMCEYDtmAj6R → OQjH4YxsBFEgdy9rVbrsH}/_buildManifest.js +0 -0
  286. /package/dist/ui/static/_next/static/{HRXN4QzQnsMCEYDtmAj6R → OQjH4YxsBFEgdy9rVbrsH}/_clientMiddlewareManifest.js +0 -0
  287. /package/dist/ui/static/_next/static/{HRXN4QzQnsMCEYDtmAj6R → OQjH4YxsBFEgdy9rVbrsH}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,60865,e=>{"use strict";e.s(["NATIVE_BLOCK_STYLE",0,{display:"block"},"NATIVE_FIELDSET_RESET_STYLE",0,{margin:0,minWidth:0,padding:0,border:0},"NATIVE_FIELDSET_STYLE",0,{margin:0,minWidth:0},"NATIVE_HEADING_STYLE",0,{margin:0,fontWeight:"inherit"},"NATIVE_LIST_KEEP_PADDING_STYLE",0,{listStyle:"none",margin:0},"NATIVE_LIST_STYLE",0,{listStyle:"none",margin:0,padding:0}]);},67914,e=>{"use strict";var i=e.i(10582),n=e.i(87032),t=e.i(5353),r=e.i(50850);function a(e){return e.findIndex(e=>!0!==e.disabled);}function l(e,i,n){if(0===e.length)return-1;for(let r of e.keys()){var t;let a=(i+(r+1)*n+e.length)%e.length;if((null==(t=e[a])?void 0:t.disabled)!==!0)return a;}return-1;}function o(e){let{active:r,index:a,onCommit:l,onOptionKeyDown:o,option:s,selected:u,setOptionRef:d}=e,c=(0,n.useRef)(null),g=(0,n.useRef)(null),h=(0,n.useRef)(null),[q,f]=(0,n.useState)(null),p=()=>{null!==h.current&&(clearTimeout(h.current),h.current=null),f(null);},m=()=>{null!==h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{let e=g.current,i=c.current;if(null===e||null===i||e.scrollWidth<=e.clientWidth)return;let n=i.getBoundingClientRect(),t=Math.min(520,window.innerWidth-32),r=n.right+8+t<=window.innerWidth-16?"top-left":"top-right";f({left:"top-left"===r?n.right+8:n.left-8,placement:r,top:n.top-6});},1500);};return(0,n.useEffect)(()=>p,[]),(0,i.jsxs)("button",{ref:e=>{c.current=e,d(a,e);},"aria-selected":u,className:`ksel-option${r?" ksel-option-active":""}`,"data-disabled":!0===s.disabled?"true":void 0,disabled:s.disabled,onBlur:p,onClick:()=>l(s),onFocus:m,onKeyDown:e=>o(e,a),onPointerEnter:m,onPointerLeave:p,role:"option",type:"button",children:[(0,i.jsxs)("span",{className:"ksel-option-copy",children:[(0,i.jsx)("span",{className:"ksel-option-label",ref:g,children:s.label}),void 0!==s.description?(0,i.jsx)("span",{className:"ksel-option-desc",children:s.description}):null]}),void 0!==s.badge?(0,i.jsx)("span",{className:"ksel-option-badge",children:s.badge}):null,null!==q?(0,t.createPortal)((0,i.jsx)("div",{className:"ksel-overflow-tooltip","data-placement":q.placement,role:"tooltip",style:{left:`${q.left.toString()}px`,top:`${q.top.toString()}px`},children:s.label}),document.body):null]});}function s(e){let{activeIndex:n,flatOptions:t,menuId:r,onCommit:a,onOptionKeyDown:l,section:s,sectionIndex:u,selectedIndex:d,setOptionRef:c}=e,g=void 0!==s.label?`${r}-section-${u.toString()}`:void 0;return(0,i.jsxs)("div",{className:"ksel-section",role:void 0!==s.label?"group":"presentation","aria-labelledby":g,children:[void 0!==s.label?(0,i.jsx)("div",{className:"ksel-section-label",id:g,children:s.label}):null,s.options.map(e=>{var r;let u=t.findIndex(i=>i.value===e.value&&i.sectionLabel===s.label),g=t[u];return void 0===g?null:(0,i.jsx)(o,{active:u===n,index:u,onCommit:a,onOptionKeyDown:l,option:g,selected:u===d,setOptionRef:c},`${null!=(r=s.label)?r:"section"}-${e.value}`);})]});}function u(e){var n;let{activeIndex:r,ariaLabel:a,flatOptions:l,menuClassName:o,menuCountLabel:u,menuId:d,menuLabel:c,menuRef:g,menuTitle:h,onCommit:q,onOptionKeyDown:f,placeholder:p,position:m,selectedIndex:v,sections:y,setOptionRef:w,showMenuHeader:b}=e;return(0,t.createPortal)((0,i.jsxs)("div",{ref:g,className:["ksel-menu",m.attached?"ksel-menu-attached":"",m.openUp?"ksel-menu-open-up":"ksel-menu-open-down",null!=o?o:""].filter(e=>e.length>0).join(" "),style:{left:`${m.left.toString()}px`,top:`${m.top.toString()}px`,width:`${m.width.toString()}px`,"--ksel-option-height":`${m.optionHeight.toString()}px`,fontFamily:m.fontFamily,fontSize:m.fontSize,fontWeight:m.fontWeight,letterSpacing:m.letterSpacing,lineHeight:m.lineHeight},children:[b?(0,i.jsxs)("div",{className:"ksel-menu-head",children:[(0,i.jsx)("div",{className:"ksel-menu-title",children:null!=(n=null!=h?h:a)?n:p}),(0,i.jsx)("div",{className:"ksel-menu-note",children:null!=u?u:`${l.length.toString()} options`})]}):null,(0,i.jsx)("div",{className:"ksel-menu-scroll",role:"listbox",id:d,"aria-label":c,style:{maxHeight:`${m.maxHeight.toString()}px`},children:y.map((e,n)=>{var t;return(0,i.jsx)(s,{activeIndex:r,flatOptions:l,menuId:d,onCommit:q,onOptionKeyDown:f,section:e,sectionIndex:n,selectedIndex:v,setOptionRef:w},`${null!=(t=e.label)?t:"section"}-${n.toString()}`);})})]}),document.body);}e.s(["default",0,function(e){var t,o,s,d,c,g;let{value:h,sections:q,onValueChange:f,onOpen:p,disabled:m=!1,placeholder:v,ariaLabel:y,ariaDescribedBy:w,ariaLabelledBy:b,triggerClassName:L,menuClassName:S,menuTitle:E,menuCountLabel:x,showMenuHeader:k=!0,leadingVisual:A,mono:T=!1,showChevron:R=!0,menuMinWidth:I,attached:N=!0,triggerStyle:C,autoFocus:Q=!1}=e,O=(0,r.useTranslate)(),D=(0,n.useRef)(null),P=(0,n.useRef)(null),M=(0,n.useRef)([]),_=(0,n.useId)(),[j,F]=(0,n.useState)(!1),[U,z]=(0,n.useState)(-1),[G,K]=(0,n.useState)(null),[B,$]=(0,n.useState)(!1),W=(0,n.useMemo)(()=>q.flatMap((e,i)=>e.options.map((n,t)=>{var r;return{...n,key:`${null!=(r=e.label)?r:"section"}-${i.toString()}-${n.value}-${t.toString()}`,sectionLabel:e.label};})),[q]),V=W.findIndex(e=>e.value===h),H=-1===V?null:W[V],J=null!=v?v:O("select.placeholder"),Y=null!=(t=null==H?void 0:H.label)?t:J,Z=null!=(o=null==H?void 0:H.description)?o:null,X=null!=(s=null!=E?E:y)?s:J,ee=()=>{F(!1),z(-1);},ei=e=>{var i,n;if(m||0===W.length)return;let t=void 0!==e&&(null==(i=W[e])?void 0:i.disabled)!==!0?e:V>=0&&(null==(n=W[V])?void 0:n.disabled)!==!0?V:a(W);F(!0),z(t),null==p||p();};function en(e){var i;e.disabled||(f(e.value),ee(),null==(i=D.current)||i.focus());}(0,n.useEffect)(()=>{if(!j)return;let e=e=>{let i=e.target;null!==D.current&&i instanceof Node&&D.current.contains(i)||null!==P.current&&i instanceof Node&&P.current.contains(i)||ee();},i=()=>ee();return window.addEventListener("pointerdown",e,!0),window.addEventListener("blur",i),()=>{window.removeEventListener("pointerdown",e,!0),window.removeEventListener("blur",i);};},[j]),(0,n.useLayoutEffect)(()=>{if(!j||null===D.current)return;let e=()=>{var e;let i=null==(e=D.current)?void 0:e.getBoundingClientRect();if(void 0===i)return;let n=Math.min(void 0!==I&&i.width<Math.min(I,96)?I:i.width,window.innerWidth-32),t=N&&1>Math.abs(n-i.width),r=t?-1:6,a=window.innerHeight-i.bottom-16,l=i.top-16,o=a<Math.max(96,2*i.height)&&l>a;$(o);let s=o?l:a,u=50*!!k+2,d=Math.max(i.height,Math.min(Math.max(i.height,s-u),380)),c=d+u,g=window.getComputedStyle(D.current);K({left:Math.min(Math.max(16,i.left),window.innerWidth-n-16),width:n,top:o?Math.max(16,i.top-c-r):Math.min(i.bottom+r,window.innerHeight-16-c),optionHeight:Math.max(28,Math.min(i.height,30)),maxHeight:d,openUp:o,attached:t,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,letterSpacing:g.letterSpacing,lineHeight:g.lineHeight});};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0);};},[j,N,I,k]),(0,n.useLayoutEffect)(()=>{if(!j||null===G||!G.openUp||null===D.current||null===P.current)return;let e=D.current.getBoundingClientRect(),i=P.current.getBoundingClientRect();if(i.height<=0)return;let n=G.attached?-1:6,t=Math.max(16,e.top-i.height-n);.5>Math.abs(t-G.top)||K(e=>null===e?e:{...e,top:t});},[j,G]),(0,n.useEffect)(()=>{var e,i;j&&!(U<0)&&(null==(e=M.current[U])||e.focus(),null==(i=M.current[U])||i.scrollIntoView({block:"nearest"}));},[j,U]),(0,n.useEffect)(()=>{if(!j)return;let e=e=>{var i,n;if("Escape"===e.key){ee(),null==(i=D.current)||i.focus();return;}if(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if((n=e.target)instanceof HTMLElement&&("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"SELECT"===n.tagName||n.isContentEditable))return;let i=function(e,i,n){for(let t=1;t<=e.length;t+=1){let r=(i+t)%e.length,a=e[r];if(void 0!==a&&!0!==a.disabled&&a.label.toLowerCase().startsWith(n))return r;}return-1;}(W,U>=0?U:Math.max(V,0),e.key.toLowerCase());-1!==i&&z(i);}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e);},[j,U,W,V]);let et=["ksel-trigger",(d={disabled:m,mono:T,open:j,openUp:B,position:G,triggerClassName:L}).mono?"mono":"",null!=(c=d.triggerClassName)?c:"",d.open?"ksel-trigger-open":"",d.open&&(null==(g=d.position)?void 0:g.attached)===!0?d.openUp?"ksel-trigger-open-up":"ksel-trigger-open-down":"",d.disabled?"ksel-trigger-disabled":""].filter(e=>e.length>0).join(" "),er=j&&null!==G?(0,i.jsx)(u,{activeIndex:U,ariaLabel:y,flatOptions:W,menuClassName:S,menuCountLabel:x,menuId:_,menuLabel:X,menuRef:P,menuTitle:E,onCommit:en,onOptionKeyDown:function(e,i){var n,t;if("Escape"===e.key){e.preventDefault(),ee(),null==(n=D.current)||n.focus();return;}if("Tab"===e.key){e.preventDefault(),ee(),null==(t=D.current)||t.focus();return;}if("ArrowDown"===e.key){e.preventDefault(),z(l(W,i,1));return;}if("ArrowUp"===e.key){e.preventDefault(),z(l(W,i,-1));return;}if("Home"===e.key){e.preventDefault(),z(a(W));return;}if("End"===e.key){e.preventDefault(),z(l(W,0,-1));return;}if("Enter"===e.key||" "===e.key){e.preventDefault();let n=W[i];void 0!==n&&en(n);}},placeholder:v,position:G,selectedIndex:V,sections:q,setOptionRef:(e,i)=>{M.current[e]=i;},showMenuHeader:k}):null;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{ref:D,"aria-controls":_,"aria-describedby":w,"aria-expanded":j,"aria-haspopup":"listbox","aria-label":y,"aria-labelledby":b,autoFocus:Q,className:et,disabled:m,onClick:()=>{j?ee():ei();},onKeyDown:function(e){if(!m){if("ArrowDown"===e.key||"ArrowUp"===e.key){e.preventDefault(),ei(V>=0?V:a(W));return;}("Enter"===e.key||" "===e.key)&&(e.preventDefault(),j?ee():ei());}},role:"combobox",style:C,type:"button",children:[void 0!==A?(0,i.jsx)("span",{className:"ksel-trigger-leading",children:A}):null,(0,i.jsxs)("span",{className:"ksel-trigger-copy",children:[(0,i.jsx)("span",{className:"ksel-trigger-label",children:Y}),null!==Z?(0,i.jsx)("span",{className:"ksel-trigger-desc",children:Z}):null]}),R?(0,i.jsx)("span",{"aria-hidden":"true",className:`ksel-trigger-caret${j?" ksel-trigger-caret-open":""}`,children:(0,i.jsx)("svg",{fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",children:(0,i.jsx)("path",{d:"M2.25 4.5 6 8.25 9.75 4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}):null]}),er]});}]);},29673,e=>{"use strict";e.s(["decodeBase64ArrayBuffer",0,function(e){let i=atob(e),n=new ArrayBuffer(i.length),t=new Uint8Array(n);for(let e=0;e<i.length;e+=1)t[e]=i.codePointAt(e);return n;},"toExactArrayBuffer",0,function(e){let i=new ArrayBuffer(e.byteLength);return new Uint8Array(i).set(e),i;}]);},64666,30852,e=>{"use strict";var i=e.i(87032),n=e.i(50850);let t={"common.cancel":"Cancel","common.retry":"Retry","common.status":"Status","common.saving":"Saving…","common.delete":"Delete","common.edit":"Edit","common.browse":"Browse","common.dismiss":"Dismiss","common.error.unexpected":"An unexpected error occurred.","qi.review.prefix":"Review:","qi.review.open":"Open","qi.review.approved":"Approved","qi.review.changesRequested":"Changes requested","qi.review.rejected":"Rejected","qi.review.withdrawn":"Withdrawn","qi.review.decision":"Review decision","qi.review.finalNote":"This review decision is final - reopen to change it.","qi.review.approve":"Approve","qi.review.reject":"Reject","qi.review.requestChanges":"Request changes","qi.review.withdraw":"Withdraw","qi.review.reopen":"Reopen","qi.review.announce":'Candidate "{title}" marked {state}. ({nonce})',"qi.status.running":"Running","qi.status.succeeded":"Succeeded","qi.status.degraded":"Degraded","qi.status.failed":"Failed","qi.status.cancelled":"Cancelled","qi.severity.prefix":"Severity:","qi.quality.notAvailable":"Quality score not available","qi.quality.unavailableLabel":"Unavailable","qi.quality.outOf100":"out of 100","qi.weakTest.aria":"Weak test flagged by the quality judge: {rationale}","qi.weakTest.label":"Weak test","qi.quality.dimension.verifiability":"Verifiability","qi.quality.dimension.atomicity":"Atomicity","qi.quality.dimension.determinism":"Determinism","qi.quality.dimension.acFidelity":"AC fidelity","qi.quality.verdict.strong":"Strong","qi.quality.verdict.weak":"Weak","qi.quality.verdict.aria":"Quality judge verdict: {label}, {score} out of 100. {rationale}","qi.quality.verdict.title":"Quality verdict","qi.quality.dimensions":"Quality dimensions","qi.candidate.metadata":"Test case metadata","qi.candidate.steps":"Steps","qi.candidate.expected":"Expected","qi.candidate.quality":"Quality","qi.candidate.scenario":"Scenario","qi.candidate.preconditions":"Preconditions","qi.candidate.expectedResults":"Expected results","qi.candidate.evidence":"Evidence","qi.candidate.tags":"Tags","qi.candidate.empty.title":"No test cases","qi.candidate.empty.body":"This run produced no generated test cases.","qi.candidate.list":"Test case list","qi.candidate.showMore":"Show more test cases ({count} remaining)","qi.run.summary":"Run summary","qi.run.testCases":"Test cases","qi.run.findings":"Findings","qi.run.quality":"Quality","qi.run.review":"Review","qi.run.requested":"Requested","qi.run.completed":"Completed","qi.run.degradedNotice":"This run completed with degraded model processing. Persisted model-stage evidence: {reason}.","qi.run.generatedTestCases":"Generated test cases","qi.run.aria":"Quality Intelligence run {runId}","qi.run.loading":"Loading run…","qi.run.loaded":"Run loaded: {count} test cases.","qi.run.notFound":"Run not found.","qi.finding.logicDefect":"Logic defect","qi.finding.faithfulnessDefect":"Faithfulness defect","qi.finding.semanticDefect":"Semantic defect","qi.finding.mutationDefect":"Mutation defect","qi.finding.policyViolation":"Policy violation","qi.finding.manualRejection":"Manual rejection","qi.finding.coverageGap":"Coverage gap","qi.finding.testQuality":"Test quality","qi.finding.list":"Findings list","qi.finding.showMore":"Show more findings ({count} remaining)","qi.coverage.title":"Coverage","qi.coverage.covered":"Covered","qi.coverage.weaklyCovered":"Weakly covered","qi.coverage.uncovered":"Uncovered","qi.coverage.percentAria":"Coverage: {percent} percent, {covered} of {total} requirements covered","qi.coverage.summary.oneGap":"{covered} of {total} requirements covered · 1 gap","qi.coverage.summary.manyGaps":"{covered} of {total} requirements covered · {gaps} gaps","qi.coverage.gapRadar":"Gap radar","qi.coverage.gapRadarCount":"Gap radar ({count})","qi.coverage.gapList":"Uncovered and weakly covered atoms","qi.coverage.atomAria":"Atom {atomId}: {label}","qi.coverage.requirementAria":'Requirement "{excerpt}" (atom {atomId}): {label}',"qi.coverage.showMoreGaps":"Show more gaps ({count} remaining)","qi.drift.title":"Drift detection","qi.drift.livingTests":"Living tests","qi.drift.recheck":"Re-check drift","qi.drift.fresh":"No drift - every test is current.","qi.drift.staleSingle":"1 test is stale - source changed since this run.","qi.drift.staleMany":"{count} tests are stale - source changed since this run.","qi.drift.regeneratedSingle":"Regenerated 1 test as a new run ({preserved} preserved).","qi.drift.regeneratedMany":"Regenerated {count} tests as a new run ({preserved} preserved).","qi.drift.checking":"Checking…","qi.drift.regenerating":"Regenerating…","qi.drift.regenerateSingle":"Regenerate 1 stale test","qi.drift.regenerateMany":"Regenerate {count} stale tests","qi.drift.unavailable":"Drift fingerprints are recorded for this run, but this card has no current source handle. Reopen it from the connected source or start a new run from the current source.","qi.edit.formAria":"Edit {title}","qi.edit.eyebrow":"Edit test case","qi.edit.save":"Save","qi.edit.discardConfirm":"Unsaved changes - press Escape or activate Cancel again to discard them.","qi.edit.title":"Title","qi.edit.preconditions":"Preconditions (one per line)","qi.edit.steps":"Steps (one per line)","qi.edit.expectedResults":"Expected results (one per line)","qi.edit.priority":"Priority","qi.edit.riskClass":"Risk class","qi.edit.tags":"Tags (comma-separated)","qi.governance.title":"Review governance","qi.governance.auditLabel":"Audit display label","qi.governance.auditPlaceholder":"Display name for audit notes","qi.governance.help":"Stored as display metadata only. Governance identity is resolved by the server.","qi.governance.required":"Add a display label for audit notes; review identity is resolved by the server.","qi.export.title":"Export","qi.export.scopeApproved":"Exports approved test cases only.","qi.export.scopeAll":"Exports all test cases, including unapproved.","qi.export.approvedOnly":"Approved only","qi.export.format":"Format","qi.export.exporting":"Exporting…","qi.export.preview":"Preview","qi.export.download":"Download","qi.export.downloaded":"Downloaded {filename}","qi.export.omittedByQualityGate":"{count} candidate(s) were dropped by the deliverable-quality gate and are not in this artifact.","qi.export.previewReady":"Export preview ready below.","qi.export.previewSummary":"{count} test cases · {bytes} bytes","qi.export.qualityCenterPreviewOnly":"Quality Center is preview-only. Configure a connector to enable live export.","qi.export.externalPreviewOnly":"External target - preview only. Configure a connector to enable live export.","qi.export.previewAria":"Export preview","qi.hub.openRunAria":"Open run {runId} — {status}, {requestedAt}, {count} test cases, review {review}","qi.hub.openRunTitle":"Open run {runId}","qi.hub.testCaseCount":"{count} test cases","qi.hub.deleteRunAria":"Delete run {requestedAt}","qi.hub.confirmDeleteGroup":"Confirm deleting run {requestedAt}","qi.hub.confirmDeleteAria":"Confirm delete of run {requestedAt}","qi.hub.deleting":"Deleting…","qi.hub.deletingWait":"Deleting run, please wait","qi.hub.confirmDelete":"Confirm delete","qi.hub.deleted":"Run deleted.","qi.hub.runsAria":"Quality Intelligence runs","qi.hub.runs":"Runs","qi.hub.loadingRuns":"Loading runs…","qi.hub.listLoaded":"Run list loaded: {shown} of {total} runs.","qi.hub.empty.title":"No runs yet","qi.hub.empty.body":"Start a run above - generated test cases open as cards on your workspace.","qi.hub.runList":"Run list","qi.hub.showMoreRuns":"Show more runs ({count} remaining)","qi.hub.truncated":"Showing {shown} of {total} runs.","qi.hub.retention":"New runs are deleted automatically after {days} days, and only the newest {max} runs under that policy are kept. Export anything you need to keep.","qi.hub.retentionPolicy":"Retention policy for new runs","qi.hub.retentionOption":"{days} days · up to {max} runs","qi.launcher.workflow.source":"Source","qi.launcher.workflow.aria":"Quality Intelligence workflow","qi.launcher.workflow.deterministic":"deterministic","qi.launcher.workflow.generate":"Generate","qi.launcher.workflow.judge":"Judge","qi.launcher.progress.stage":"Stage: {stage} · ","qi.launcher.progress.candidatesOne":"{count} test case","qi.launcher.progress.candidatesMany":"{count} test cases","qi.launcher.progress.findingsOne":" · {count} finding","qi.launcher.progress.findingsMany":" · {count} findings","qi.launcher.workflow.coverage":"Coverage","qi.launcher.workflow.validate":"Validate","qi.launcher.workflow.finalize":"Finalize","qi.launcher.generationModel":"Quality Intelligence generation model","qi.launcher.judgeModel":"Quality Intelligence judge model","qi.launcher.noChatModel":"No chat model","qi.launcher.noJudgeModel":"No judge model","qi.launcher.preflightStatus":"Model preflight: {status}","qi.launcher.judgeUnavailable.noCompatible":"No compatible judge model is available. Runs can still succeed, but Quality will be unavailable.","qi.launcher.judgeUnavailable.preflight":"The selected judge model is unavailable. Runs can still succeed, but Quality will be unavailable.","qi.launcher.requirements":"Requirements","qi.launcher.requirementsPlaceholder":"Paste requirements or acceptance criteria, one statement per line.","qi.launcher.filePath":"File path","qi.launcher.folderPath":"Folder path","qi.launcher.chooseLocalFile":"Choose a local file…","qi.launcher.chooseLocalFolder":"Choose a local folder…","qi.launcher.nativeDialogUnavailable":"Native dialogs are unavailable on this platform. Enter the path manually.","qi.launcher.loadingKnowledgePods":"Loading Knowledge Pods…","qi.launcher.noReadyKnowledgePods":"No ready Knowledge Pods","qi.launcher.noKnowledgePodSets":"No Knowledge Pod Sets","qi.launcher.startAria":"Start a Quality Intelligence run","qi.launcher.newRun":"New run","qi.launcher.source.requirements":"Requirements","qi.launcher.source.file":"File","qi.launcher.source.fileLower":"file","qi.launcher.source.folder":"Folder","qi.launcher.source.folderLower":"folder","qi.launcher.source.figmaSnapshot":"Figma snapshot","qi.launcher.source.figmaSnapshotLower":"Figma snapshot","qi.launcher.source.image":"Image","qi.launcher.source.imageLower":"image","qi.launcher.connectedSingle":"Connected {source}","qi.launcher.connectedSources":"Connected sources ({count})","qi.launcher.connectedSourcesAria":"Connected sources","qi.launcher.manualOverridesSingle":"Manual input below overrides the connected source for this run.","qi.launcher.manualOverridesMultiple":"Manual input below overrides the connected sources for this run.","qi.launcher.generateUsesConnectedSingle":"Generate uses the connected {source}.","qi.launcher.generateUsesAllConnected":"Generate uses all connected sources.","qi.launcher.sourceLabel":"Source label","qi.launcher.sourceLabelPlaceholder":"e.g. Funds Transfer - acceptance criteria","qi.launcher.manualLabelHint":"Applies to manual input only - connected sources use their own labels.","qi.launcher.sourceType":"Source type","qi.launcher.policyProfile":"Policy profile","qi.launcher.policy":"Policy","qi.launcher.seedOptional":"Seed (optional)","qi.launcher.seedPlaceholder":"e.g. 42","qi.launcher.seed":"seed","qi.launcher.seedError":"Seed must be a non-negative integer.","qi.launcher.generateTestCases":"Generate test cases","qi.launcher.generateHint":"Add requirements text, a folder path, a file path, select a Knowledge Pod, select a Knowledge Pod Set, or connect a source to generate."},r={"common.cancel":"Abbrechen","common.retry":"Erneut versuchen","common.status":"Status","common.saving":"Speichere…","common.delete":"Löschen","common.edit":"Bearbeiten","common.browse":"Durchsuchen","common.dismiss":"Ausblenden","common.error.unexpected":"Ein unerwarteter Fehler ist aufgetreten.","qi.review.prefix":"Review:","qi.review.open":"Offen","qi.review.approved":"Freigegeben","qi.review.changesRequested":"Änderungen angefordert","qi.review.rejected":"Abgelehnt","qi.review.withdrawn":"Zurückgezogen","qi.review.decision":"Review-Entscheidung","qi.review.finalNote":"Diese Review-Entscheidung ist final - öffne sie erneut, um sie zu ändern.","qi.review.approve":"Freigeben","qi.review.reject":"Ablehnen","qi.review.requestChanges":"Änderungen anfordern","qi.review.withdraw":"Zurückziehen","qi.review.reopen":"Erneut öffnen","qi.review.announce":"Kandidat „{title}“ wurde als „{state}“ markiert. ({nonce})","qi.status.running":"Läuft","qi.status.succeeded":"Erfolgreich","qi.status.degraded":"Eingeschränkt","qi.status.failed":"Fehlgeschlagen","qi.status.cancelled":"Abgebrochen","qi.severity.prefix":"Schweregrad:","qi.quality.notAvailable":"Qualitätswert nicht verfügbar","qi.quality.unavailableLabel":"Nicht verfügbar","qi.quality.outOf100":"von 100","qi.weakTest.aria":"Schwacher Test vom Qualitäts-Judge markiert: {rationale}","qi.weakTest.label":"Schwacher Test","qi.quality.dimension.verifiability":"Verifizierbarkeit","qi.quality.dimension.atomicity":"Atomarität","qi.quality.dimension.determinism":"Determinismus","qi.quality.dimension.acFidelity":"AC-Treue","qi.quality.verdict.strong":"Stark","qi.quality.verdict.weak":"Schwach","qi.quality.verdict.aria":"Urteil des Qualitäts-Judge: {label}, {score} von 100. {rationale}","qi.quality.verdict.title":"Qualitätsurteil","qi.quality.dimensions":"Qualitätsdimensionen","qi.candidate.metadata":"Testfall-Metadaten","qi.candidate.steps":"Schritte","qi.candidate.expected":"Erwartet","qi.candidate.quality":"Qualität","qi.candidate.scenario":"Szenario","qi.candidate.preconditions":"Voraussetzungen","qi.candidate.expectedResults":"Erwartete Ergebnisse","qi.candidate.evidence":"Evidenz","qi.candidate.tags":"Tags","qi.candidate.empty.title":"Keine Testfälle","qi.candidate.empty.body":"Dieser Lauf hat keine generierten Testfälle erzeugt.","qi.candidate.list":"Testfallliste","qi.candidate.showMore":"Weitere Testfälle anzeigen ({count} verbleibend)","qi.run.summary":"Laufzusammenfassung","qi.run.testCases":"Testfälle","qi.run.findings":"Findings","qi.run.quality":"Qualität","qi.run.review":"Review","qi.run.requested":"Angefordert","qi.run.completed":"Abgeschlossen","qi.run.degradedNotice":"Dieser Lauf wurde mit eingeschränkter Modellverarbeitung abgeschlossen. Persistierte Evidenz der Modellphase: {reason}.","qi.run.generatedTestCases":"Generierte Testfälle","qi.run.aria":"Quality-Intelligence-Lauf {runId}","qi.run.loading":"Lauf wird geladen…","qi.run.loaded":"Lauf geladen: {count} Testfälle.","qi.run.notFound":"Lauf nicht gefunden.","qi.finding.logicDefect":"Logikfehler","qi.finding.faithfulnessDefect":"Faithfulness-Fehler","qi.finding.semanticDefect":"Semantischer Fehler","qi.finding.mutationDefect":"Mutationsfehler","qi.finding.policyViolation":"Policy-Verstoß","qi.finding.manualRejection":"Manuelle Ablehnung","qi.finding.coverageGap":"Coverage-Lücke","qi.finding.testQuality":"Testqualität","qi.finding.list":"Finding-Liste","qi.finding.showMore":"Weitere Findings anzeigen ({count} verbleibend)","qi.coverage.title":"Coverage","qi.coverage.covered":"Abgedeckt","qi.coverage.weaklyCovered":"Schwach abgedeckt","qi.coverage.uncovered":"Nicht abgedeckt","qi.coverage.percentAria":"Coverage: {percent} Prozent, {covered} von {total} Anforderungen abgedeckt","qi.coverage.summary.oneGap":"{covered} von {total} Anforderungen abgedeckt · 1 Lücke","qi.coverage.summary.manyGaps":"{covered} von {total} Anforderungen abgedeckt · {gaps} Lücken","qi.coverage.gapRadar":"Lückenradar","qi.coverage.gapRadarCount":"Lückenradar ({count})","qi.coverage.gapList":"Nicht oder nur schwach abgedeckte Atome","qi.coverage.atomAria":"Atom {atomId}: {label}","qi.coverage.requirementAria":"Anforderung „{excerpt}“ (Atom {atomId}): {label}","qi.coverage.showMoreGaps":"Weitere Lücken anzeigen ({count} verbleibend)","qi.drift.title":"Drift-Erkennung","qi.drift.livingTests":"Living Tests","qi.drift.recheck":"Drift erneut prüfen","qi.drift.fresh":"Kein Drift - alle Tests sind aktuell.","qi.drift.staleSingle":"1 Test ist veraltet - die Quelle hat sich seit diesem Lauf geändert.","qi.drift.staleMany":"{count} Tests sind veraltet - die Quelle hat sich seit diesem Lauf geändert.","qi.drift.regeneratedSingle":"1 Test wurde als neuer Lauf neu generiert ({preserved} beibehalten).","qi.drift.regeneratedMany":"{count} Tests wurden als neuer Lauf neu generiert ({preserved} beibehalten).","qi.drift.checking":"Prüfe…","qi.drift.regenerating":"Generiere neu…","qi.drift.regenerateSingle":"1 veralteten Test neu generieren","qi.drift.regenerateMany":"{count} veraltete Tests neu generieren","qi.drift.unavailable":"Für diesen Lauf sind Drift-Fingerprints vorhanden, aber diese Karte hat keinen aktuellen Quellenbezug. Öffne sie erneut aus der verbundenen Quelle oder starte einen neuen Lauf mit der aktuellen Quelle.","qi.edit.formAria":"{title} bearbeiten","qi.edit.eyebrow":"Testfall bearbeiten","qi.edit.save":"Speichern","qi.edit.discardConfirm":"Es gibt ungespeicherte Änderungen - drücke Escape oder aktiviere Abbrechen erneut, um sie zu verwerfen.","qi.edit.title":"Titel","qi.edit.preconditions":"Voraussetzungen (eine pro Zeile)","qi.edit.steps":"Schritte (einer pro Zeile)","qi.edit.expectedResults":"Erwartete Ergebnisse (eines pro Zeile)","qi.edit.priority":"Priorität","qi.edit.riskClass":"Risikoklasse","qi.edit.tags":"Tags (durch Kommas getrennt)","qi.governance.title":"Review-Governance","qi.governance.auditLabel":"Anzeigename für Audit-Notizen","qi.governance.auditPlaceholder":"Name für Audit-Notizen","qi.governance.help":"Wird nur als Anzeigemetadatum gespeichert. Die Governance-Identität wird serverseitig aufgelöst.","qi.governance.required":"Gib einen Anzeigenamen für Audit-Notizen an; die Review-Identität wird serverseitig aufgelöst.","qi.export.title":"Export","qi.export.scopeApproved":"Exportiert nur freigegebene Testfälle.","qi.export.scopeAll":"Exportiert alle Testfälle, auch nicht freigegebene.","qi.export.approvedOnly":"Nur freigegebene","qi.export.format":"Format","qi.export.exporting":"Export läuft…","qi.export.preview":"Vorschau","qi.export.download":"Herunterladen","qi.export.downloaded":"{filename} heruntergeladen","qi.export.omittedByQualityGate":"{count} Kandidat(en) wurden vom Deliverable-Quality-Gate ausgeschlossen und sind nicht in diesem Artefakt enthalten.","qi.export.previewReady":"Exportvorschau ist unten verfügbar.","qi.export.previewSummary":"{count} Testfälle · {bytes} Bytes","qi.export.qualityCenterPreviewOnly":"Quality Center ist nur als Vorschau verfügbar. Konfiguriere einen Connector, um den Live-Export zu aktivieren.","qi.export.externalPreviewOnly":"Externes Ziel - nur Vorschau. Konfiguriere einen Connector, um den Live-Export zu aktivieren.","qi.export.previewAria":"Exportvorschau","qi.hub.openRunAria":"Lauf {runId} öffnen - {status}, {requestedAt}, {count} Testfälle, Review {review}","qi.hub.openRunTitle":"Lauf {runId} öffnen","qi.hub.testCaseCount":"{count} Testfälle","qi.hub.deleteRunAria":"Lauf vom {requestedAt} löschen","qi.hub.confirmDeleteGroup":"Löschen des Laufs vom {requestedAt} bestätigen","qi.hub.confirmDeleteAria":"Löschen des Laufs vom {requestedAt} bestätigen","qi.hub.deleting":"Wird gelöscht…","qi.hub.deletingWait":"Lauf wird gelöscht, bitte warten","qi.hub.confirmDelete":"Löschen bestätigen","qi.hub.deleted":"Lauf gelöscht.","qi.hub.runsAria":"Quality-Intelligence-Läufe","qi.hub.runs":"Läufe","qi.hub.loadingRuns":"Läufe werden geladen…","qi.hub.listLoaded":"Laufliste geladen: {shown} von {total} Läufen.","qi.hub.empty.title":"Noch keine Läufe","qi.hub.empty.body":"Starte oben einen Lauf - generierte Testfälle öffnen sich als Karten im Workspace.","qi.hub.runList":"Laufliste","qi.hub.showMoreRuns":"Weitere Läufe anzeigen ({count} verbleibend)","qi.hub.truncated":"{shown} von {total} Läufen werden angezeigt.","qi.hub.retention":"Neue Läufe werden nach {days} Tagen automatisch gelöscht, und nur die neuesten {max} Läufe dieser Richtlinie bleiben erhalten. Exportiere alles, was du behalten möchtest.","qi.hub.retentionPolicy":"Aufbewahrungsrichtlinie für neue Läufe","qi.hub.retentionOption":"{days} Tage · bis zu {max} Läufe","qi.launcher.workflow.source":"Quelle","qi.launcher.workflow.aria":"Quality-Intelligence-Workflow","qi.launcher.workflow.deterministic":"deterministisch","qi.launcher.workflow.generate":"Generieren","qi.launcher.workflow.judge":"Judge","qi.launcher.progress.stage":"Phase: {stage} · ","qi.launcher.progress.candidatesOne":"{count} Testfall","qi.launcher.progress.candidatesMany":"{count} Testfälle","qi.launcher.progress.findingsOne":" · {count} Finding","qi.launcher.progress.findingsMany":" · {count} Findings","qi.launcher.workflow.coverage":"Coverage","qi.launcher.workflow.validate":"Validieren","qi.launcher.workflow.finalize":"Abschließen","qi.launcher.generationModel":"Generierungsmodell für Quality Intelligence","qi.launcher.judgeModel":"Judge-Modell für Quality Intelligence","qi.launcher.noChatModel":"Kein Chat-Modell","qi.launcher.noJudgeModel":"Kein Judge-Modell","qi.launcher.preflightStatus":"Modell-Preflight: {status}","qi.launcher.judgeUnavailable.noCompatible":"Kein kompatibles Judge-Modell ist verfügbar. Läufe können dennoch erfolgreich sein, aber Quality ist nicht verfügbar.","qi.launcher.judgeUnavailable.preflight":"Das ausgewählte Judge-Modell ist nicht verfügbar. Läufe können dennoch erfolgreich sein, aber Quality ist nicht verfügbar.","qi.launcher.requirements":"Anforderungen","qi.launcher.requirementsPlaceholder":"Füge Anforderungen oder Akzeptanzkriterien ein, jeweils eine Aussage pro Zeile.","qi.launcher.filePath":"Dateipfad","qi.launcher.folderPath":"Ordnerpfad","qi.launcher.chooseLocalFile":"Lokale Datei auswählen…","qi.launcher.chooseLocalFolder":"Lokalen Ordner auswählen…","qi.launcher.nativeDialogUnavailable":"Native Dialoge sind auf dieser Plattform nicht verfügbar. Gib den Pfad manuell ein.","qi.launcher.loadingKnowledgePods":"Knowledge Pods werden geladen…","qi.launcher.noReadyKnowledgePods":"Keine bereiten Knowledge Pods","qi.launcher.noKnowledgePodSets":"Keine Knowledge Pod Sets","qi.launcher.startAria":"Quality-Intelligence-Lauf starten","qi.launcher.newRun":"Neuer Lauf","qi.launcher.source.requirements":"Anforderungen","qi.launcher.source.file":"Datei","qi.launcher.source.fileLower":"Datei","qi.launcher.source.folder":"Ordner","qi.launcher.source.folderLower":"Ordner","qi.launcher.source.figmaSnapshot":"Figma-Snapshot","qi.launcher.source.figmaSnapshotLower":"Figma-Snapshot","qi.launcher.source.image":"Bild","qi.launcher.source.imageLower":"Bild","qi.launcher.connectedSingle":"Verbunden: {source}","qi.launcher.connectedSources":"Verbundene Quellen ({count})","qi.launcher.connectedSourcesAria":"Verbundene Quellen","qi.launcher.manualOverridesSingle":"Die manuelle Eingabe unten ersetzt die verbundene Quelle für diesen Lauf.","qi.launcher.manualOverridesMultiple":"Die manuelle Eingabe unten ersetzt die verbundenen Quellen für diesen Lauf.","qi.launcher.generateUsesConnectedSingle":"Generierung nutzt die verbundene Quelle: {source}.","qi.launcher.generateUsesAllConnected":"Generierung nutzt alle verbundenen Quellen.","qi.launcher.sourceLabel":"Quellenlabel","qi.launcher.sourceLabelPlaceholder":"z. B. Zahlungsfreigabe - Akzeptanzkriterien","qi.launcher.manualLabelHint":"Gilt nur für manuelle Eingaben - verbundene Quellen nutzen eigene Labels.","qi.launcher.sourceType":"Quellentyp","qi.launcher.policyProfile":"Policy-Profil","qi.launcher.policy":"Policy","qi.launcher.seedOptional":"Seed (optional)","qi.launcher.seedPlaceholder":"z. B. 42","qi.launcher.seed":"Seed","qi.launcher.seedError":"Der Seed muss eine nicht negative ganze Zahl sein.","qi.launcher.generateTestCases":"Testfälle generieren","qi.launcher.generateHint":"Füge Anforderungen, einen Ordnerpfad oder einen Dateipfad hinzu, wähle einen Knowledge Pod oder ein Knowledge Pod Set aus oder verbinde eine Quelle."};function a(e){return"de"===e?r:t;}function l(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.replace(/\{(\w+)\}/gu,(e,n)=>{let t=i[n];return void 0===t?e:String(t);});}e.s(["translateQi",0,function(e,i,n){var r;return l(null!=(r=a(e)[i])?r:t[i],n);},"useQiTranslate",0,function(){let e=(0,n.useLocale)();return(0,i.useMemo)(()=>{let i=a(e);return(e,n)=>{var r;return l(null!=(r=i[e])?r:t[e],n);};},[e]);}],64666);var o=e.i(76055),s=e.i(70045);async function u(e,i){return(0,s.bffFetchJson)(e,i);}async function d(){return u("/api/quality-intelligence/runs");}async function c(e){return u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}`);}async function g(e){let i="QI_RUN_FAILED",n=`HTTP ${e.status.toString()}`;try{var t,r,a,l;let o=await e.json();i=null!=(t=null==(a=o.error)?void 0:a.code)?t:i,n=null!=(r=null==(l=o.error)?void 0:l.message)?r:n;}catch{}return new o.ApiError(i,n,e.status);}async function h(e,i,n){var t,r;let a=await fetch("/api/quality-intelligence/runs",{method:"POST",headers:{Accept:"text/event-stream","Content-Type":"application/json","X-Keiko-CSRF":"1"},body:JSON.stringify(e),signal:i}),l=null!=(t=a.headers.get("content-type"))?t:"";if(!a.ok||!l.includes("text/event-stream"))throw await g(a);let s=a.body;if(null===s)throw new o.ApiError("QI_NO_STREAM","The server did not return a progress stream.",a.status);let u=s.getReader(),d=new TextDecoder(),c="";try{for(;!i.aborted;){let e=await u.read();if(e.done)break;if((c+=d.decode(e.value,{stream:!0})).length>262144)throw new o.ApiError("QI_STREAM_BUFFER_OVERFLOW","The Quality Intelligence progress stream exceeded the client buffer limit.",a.status);let i=c.split("\n");for(let e of(c=null!=(r=i.pop())?r:"",i)){let i=e.trim();if(i.startsWith("data:"))try{n(JSON.parse(i.slice(5).trim()));}catch{}}}}finally{await u.cancel().catch(()=>{}),u.releaseLock();}}async function q(e){return u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}`,{method:"DELETE"});}async function f(e){await u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}/cancel`,{method:"POST",body:"{}"});}async function p(){return u("/api/quality-intelligence/model-policy");}async function m(e){return u("/api/quality-intelligence/model-policy",{method:"PUT",body:JSON.stringify({modelPolicy:e})});}async function v(e){return u("/api/quality-intelligence/model-policy/preflight",{method:"POST",body:JSON.stringify({modelPolicy:e})});}async function y(e,i,n,t){return u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}/review`,{method:"POST",body:JSON.stringify({action:i,...(void 0!==n?{candidateId:n}:{}),...(void 0!==t?{reviewerLabel:t}:{})})});}async function w(e,i,n,t){return(await u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}/edit`,{method:"POST",body:JSON.stringify({candidateId:i,edited:n,...(void 0!==t?{editorLabel:t}:{})})})).candidate;}async function b(e,i){return u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}/re-check`,{method:"POST",body:JSON.stringify({sources:i})});}async function L(e,i){return u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}/regenerate-stale`,{method:"POST",body:JSON.stringify({sources:i})});}async function S(e,i,n){var t,r;return u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}/export`,{method:"POST",body:JSON.stringify({adapter:i,dryRun:null!=(t=null==n?void 0:n.dryRun)&&t,approvedOnly:null==(r=null==n?void 0:n.approvedOnly)||r})});}async function E(e,i,n){var t;return u(`/api/quality-intelligence/runs/${encodeURIComponent(e)}/traceability`,{method:"POST",body:JSON.stringify({format:i,approvedOnly:null==(t=null==n?void 0:n.approvedOnly)||t})});}e.s(["cancelQiRun",0,f,"deleteQiRun",0,q,"editQiCandidate",0,w,"exportQiRun",0,S,"exportQiRunTraceability",0,E,"fetchQiModelPolicy",0,p,"fetchQiRunDetail",0,c,"fetchQiRuns",0,d,"preflightQiModelPolicy",0,v,"reCheckQiRun",0,b,"regenerateStaleQiRun",0,L,"reviewQiRun",0,y,"saveQiModelPolicy",0,m,"startQiRun",0,h],30852);},25195,e=>{"use strict";let i=["qi:short-30d","qi:standard-90d","qi:long-365d"],n="qi:short-30d",t=new Set(i);function r(e){return"string"==typeof e&&t.has(e);}e.s(["QUALITY_INTELLIGENCE_DEFAULT_RETENTION_POLICY_ID",0,n,"QUALITY_INTELLIGENCE_RETENTION_POLICY_IDS",0,i,"isQualityIntelligenceRetentionPolicyId",0,r,"resolveQualityIntelligenceRetentionPolicyId",0,function(e){return r(e)?e:n;}]);},87898,89437,e=>{"use strict";let i=["running","succeeded","failed","cancelled"];e.s(["QUALITY_INTELLIGENCE_ERROR_CODES",0,["QI_BAD_SOURCE","QI_CAPABILITY_UNAVAILABLE","QI_CAPSULE_UNAVAILABLE","QI_FIGMA_SNAPSHOT_UNAVAILABLE","QI_IMAGE_DESCRIPTION_UNAVAILABLE","QI_IMAGE_UNAVAILABLE","QI_MODEL_INCOMPATIBLE","QI_MODEL_NOT_CONFIGURED","QI_MODEL_SCHEMA_VIOLATION","QI_MODEL_TIMEOUT","QI_MODEL_UNAVAILABLE","QI_NO_EVIDENCE_DIR","QI_NO_SOURCES","QI_PROMPT_TOO_LARGE","QI_RUN_FAILED","QI_SOURCE_DENIED","QI_SOURCE_EMPTY","QI_SOURCE_TOO_LARGE","QI_SOURCE_UNSUPPORTED","QI_WORKSPACE_NOT_FOUND"],"QUALITY_INTELLIGENCE_RUN_STATUSES",0,i,"deriveQualityIntelligenceTerminalDegradation",0,function(e,i){if("succeeded"!==e)return;let n=null==i?void 0:i[0];if(void 0!==n)return{degraded:!0,reasonSummary:n.reasonSummary};},"isQualityIntelligenceJudgeEligible",0,function(e){return"chat"===e.kind&&e.structuredOutput&&!0===e.supportsResponseFormat;}],87898);var n=e.i(10582),t=e.i(76055),r=e.i(64666);function a(e,i){return i("open"===e?"qi.review.open":"approved"===e?"qi.review.approved":"changes-requested"===e?"qi.review.changesRequested":"rejected"===e?"qi.review.rejected":"qi.review.withdrawn");}let l={open:"qi-review-open",approved:"qi-review-approved","changes-requested":"qi-review-changes",rejected:"qi-review-rejected",withdrawn:"qi-review-withdrawn"};function o(e,i){return`${i} (${e})`;}let s={running:"qi-badge-running",succeeded:"qi-badge-succeeded",failed:"qi-badge-failed",cancelled:"qi-badge-cancelled"};function u(e){return i.includes(e);}function d(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e,i)=>(0,r.translateQi)("en",e,i),n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return u(e)?i("succeeded"===e&&n?"qi.status.degraded":"running"===e?"qi.status.running":"succeeded"===e?"qi.status.succeeded":"failed"===e?"qi.status.failed":"qi.status.cancelled"):e;}let c={critical:"qi-sev-critical",high:"qi-sev-high",medium:"qi-sev-medium",low:"qi-sev-low"};function g(e){let{height:i=20,width:t="100%"}=e;return(0,n.jsx)("div",{"aria-hidden":"true",className:"qi-skeleton",style:{height:i,width:t}});}e.s(["CandidateQualityVerdictNote",0,function(e){let{verdict:i}=e,t=(0,r.useQiTranslate)(),a=Math.round(i.score),l=t("strong"===i.verdict?"qi.quality.verdict.strong":"qi.quality.verdict.weak");return(0,n.jsxs)("div",{role:"note","aria-label":t("qi.quality.verdict.aria",{label:l,score:a,rationale:i.overallRationale}),className:"qi-cand-block","data-testid":"qi-quality-verdict",children:[(0,n.jsx)("p",{className:"qi-cand-block-label",children:t("qi.quality.verdict.title")}),(0,n.jsxs)("p",{children:[l," - ",a.toString(),"/100"]}),(0,n.jsx)("ul",{className:"qi-cand-list","aria-label":t("qi.quality.dimensions"),children:i.dimensions.map(e=>{var i;return(0,n.jsxs)("li",{children:[(i=e.name,"verifiability"===i?t("qi.quality.dimension.verifiability"):"atomicity"===i?t("qi.quality.dimension.atomicity"):"determinism"===i?t("qi.quality.dimension.determinism"):"ac-fidelity"===i?t("qi.quality.dimension.acFidelity"):i)," ",Math.round(e.score).toString(),":"," ",e.rationale]},e.name);})})]});},"ErrorState",0,function(e){let{message:i,onRetry:t}=e,a=(0,r.useQiTranslate)();return(0,n.jsxs)("div",{role:"alert","aria-live":"assertive",className:"lk-alert","data-testid":"qi-error-state",children:[i,(0,n.jsx)("button",{type:"button",className:"lk-alert-retry",onClick:t,children:a("common.retry")})]});},"LoadingSkeleton",0,function(){return(0,n.jsx)("div",{"data-testid":"qi-loading-state","aria-busy":"true",style:{display:"flex",flexDirection:"column",gap:8,padding:"12px 0"},children:[1,2,3].map(e=>(0,n.jsxs)("div",{className:"qi-skeleton-row",children:[(0,n.jsx)(g,{height:14,width:"60%"}),(0,n.jsx)(g,{height:12,width:"40%"})]},e))});},"QualityScoreBadge",0,function(e){let{score:i}=e,t=(0,r.useQiTranslate)();if(null===i)return(0,n.jsx)("span",{className:"qi-badge qi-badge-default","data-testid":"qi-quality-badge",children:t("qi.quality.unavailableLabel")});let a=Math.round(i);return(0,n.jsxs)("span",{className:`qi-badge ${a>=90?"qi-quality-high":a>=70?"qi-quality-mid":"qi-quality-low"}`,"data-testid":"qi-quality-badge",children:[a.toString(),(0,n.jsxs)("span",{className:"sr-only",children:[" ",t("qi.quality.outOf100")]})]});},"ReviewBadge",0,function(e){let{state:i}=e,t=(0,r.useQiTranslate)();return(0,n.jsxs)("span",{className:`qi-review-badge ${l[i]}`,children:[(0,n.jsxs)("span",{className:"sr-only",children:[t("qi.review.prefix")," "]}),a(i,t)]});},"SeverityBadge",0,function(e){let{severity:i}=e,t=(0,r.useQiTranslate)(),a="critical"===i||"high"===i||"medium"===i||"low"===i?c[i]:"qi-sev-low";return(0,n.jsxs)("span",{className:`qi-sev ${a}`,children:[(0,n.jsxs)("span",{className:"sr-only",children:[t("qi.severity.prefix")," "]}),i]});},"StatusBadge",0,function(e){let{status:i,degraded:t=!1}=e,a=(0,r.useQiTranslate)(),l="succeeded"===i&&t,o=d(i,a,l),c=u(i)&&!l?s[i]:"qi-badge-default";return(0,n.jsx)("span",{className:`qi-badge ${c}`,children:o});},"WeakTestFlag",0,function(e){let{flag:i}=e,t=(0,r.useQiTranslate)();return(0,n.jsxs)("div",{role:"note","aria-label":t("qi.weakTest.aria",{rationale:i.rationale}),className:"qi-weak-flag","data-testid":"qi-weak-flag",children:[(0,n.jsxs)("span",{className:"qi-weak-flag-badge",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"qi-weak-flag-icon",children:"⚠"}),t("qi.weakTest.label")]}),(0,n.jsx)("p",{className:"qi-weak-flag-reason",children:i.rationale})]});},"formatCodedError",0,o,"formatDate",0,function(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"});}catch{return e;}},"formatError",0,function(e){return e instanceof t.ApiError?o(e.code,e.message):e instanceof Error?e.message:(0,r.translateQi)("en","common.error.unexpected");},"reviewLabel",0,a,"runStatusLabel",0,d],89437);}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,60865,e=>{"use strict";e.s(["NATIVE_BLOCK_STYLE",0,{display:"block"},"NATIVE_FIELDSET_RESET_STYLE",0,{margin:0,minWidth:0,padding:0,border:0},"NATIVE_FIELDSET_STYLE",0,{margin:0,minWidth:0},"NATIVE_HEADING_STYLE",0,{margin:0,fontWeight:"inherit"},"NATIVE_LIST_KEEP_PADDING_STYLE",0,{listStyle:"none",margin:0},"NATIVE_LIST_STYLE",0,{listStyle:"none",margin:0,padding:0}]);},67914,e=>{"use strict";var t=e.i(10582),n=e.i(87032),r=e.i(5353),a=e.i(50850);function s(e){return e.findIndex(e=>!0!==e.disabled);}function l(e,t,n){if(0===e.length)return-1;for(let a of e.keys()){var r;let s=(t+(a+1)*n+e.length)%e.length;if((null==(r=e[s])?void 0:r.disabled)!==!0)return s;}return-1;}function i(e){let{active:a,index:s,onCommit:l,onOptionKeyDown:i,option:o,selected:u,setOptionRef:c}=e,d=(0,n.useRef)(null),m=(0,n.useRef)(null),p=(0,n.useRef)(null),[f,g]=(0,n.useState)(null),v=()=>{null!==p.current&&(clearTimeout(p.current),p.current=null),g(null);},h=()=>{null!==p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{let e=m.current,t=d.current;if(null===e||null===t||e.scrollWidth<=e.clientWidth)return;let n=t.getBoundingClientRect(),r=Math.min(520,window.innerWidth-32),a=n.right+8+r<=window.innerWidth-16?"top-left":"top-right";g({left:"top-left"===a?n.right+8:n.left-8,placement:a,top:n.top-6});},1500);};return(0,n.useEffect)(()=>v,[]),(0,t.jsxs)("button",{ref:e=>{d.current=e,c(s,e);},"aria-selected":u,className:`ksel-option${a?" ksel-option-active":""}`,"data-disabled":!0===o.disabled?"true":void 0,disabled:o.disabled,onBlur:v,onClick:()=>l(o),onFocus:h,onKeyDown:e=>i(e,s),onPointerEnter:h,onPointerLeave:v,role:"option",type:"button",children:[(0,t.jsxs)("span",{className:"ksel-option-copy",children:[(0,t.jsx)("span",{className:"ksel-option-label",ref:m,children:o.label}),void 0!==o.description?(0,t.jsx)("span",{className:"ksel-option-desc",children:o.description}):null]}),void 0!==o.badge?(0,t.jsx)("span",{className:"ksel-option-badge",children:o.badge}):null,null!==f?(0,r.createPortal)((0,t.jsx)("div",{className:"ksel-overflow-tooltip","data-placement":f.placement,role:"tooltip",style:{left:`${f.left.toString()}px`,top:`${f.top.toString()}px`},children:o.label}),document.body):null]});}function o(e){let{activeIndex:n,flatOptions:r,menuId:a,onCommit:s,onOptionKeyDown:l,section:o,sectionIndex:u,selectedIndex:c,setOptionRef:d}=e,m=void 0!==o.label?`${a}-section-${u.toString()}`:void 0;return(0,t.jsxs)("div",{className:"ksel-section",role:void 0!==o.label?"group":"presentation","aria-labelledby":m,children:[void 0!==o.label?(0,t.jsx)("div",{className:"ksel-section-label",id:m,children:o.label}):null,o.options.map(e=>{var a;let u=r.findIndex(t=>t.value===e.value&&t.sectionLabel===o.label),m=r[u];return void 0===m?null:(0,t.jsx)(i,{active:u===n,index:u,onCommit:s,onOptionKeyDown:l,option:m,selected:u===c,setOptionRef:d},`${null!=(a=o.label)?a:"section"}-${e.value}`);})]});}function u(e){var n;let{activeIndex:a,ariaLabel:s,flatOptions:l,menuClassName:i,menuCountLabel:u,menuId:c,menuLabel:d,menuRef:m,menuTitle:p,onCommit:f,onOptionKeyDown:g,placeholder:v,position:h,selectedIndex:k,sections:w,setOptionRef:b,showMenuHeader:T}=e;return(0,r.createPortal)((0,t.jsxs)("div",{ref:m,className:["ksel-menu",h.attached?"ksel-menu-attached":"",h.openUp?"ksel-menu-open-up":"ksel-menu-open-down",null!=i?i:""].filter(e=>e.length>0).join(" "),style:{left:`${h.left.toString()}px`,top:`${h.top.toString()}px`,width:`${h.width.toString()}px`,"--ksel-option-height":`${h.optionHeight.toString()}px`,fontFamily:h.fontFamily,fontSize:h.fontSize,fontWeight:h.fontWeight,letterSpacing:h.letterSpacing,lineHeight:h.lineHeight},children:[T?(0,t.jsxs)("div",{className:"ksel-menu-head",children:[(0,t.jsx)("div",{className:"ksel-menu-title",children:null!=(n=null!=p?p:s)?n:v}),(0,t.jsx)("div",{className:"ksel-menu-note",children:null!=u?u:`${l.length.toString()} options`})]}):null,(0,t.jsx)("div",{className:"ksel-menu-scroll",role:"listbox",id:c,"aria-label":d,style:{maxHeight:`${h.maxHeight.toString()}px`},children:w.map((e,n)=>{var r;return(0,t.jsx)(o,{activeIndex:a,flatOptions:l,menuId:c,onCommit:f,onOptionKeyDown:g,section:e,sectionIndex:n,selectedIndex:k,setOptionRef:b},`${null!=(r=e.label)?r:"section"}-${n.toString()}`);})})]}),document.body);}e.s(["default",0,function(e){var r,i,o,c,d,m;let{value:p,sections:f,onValueChange:g,onOpen:v,disabled:h=!1,placeholder:k,ariaLabel:w,ariaDescribedBy:b,ariaLabelledBy:T,triggerClassName:_,menuClassName:y,menuTitle:E,menuCountLabel:x,showMenuHeader:C=!0,leadingVisual:S,mono:j=!1,showChevron:N=!0,menuMinWidth:W,attached:I=!0,triggerStyle:R,autoFocus:M=!1}=e,B=(0,a.useTranslate)(),L=(0,n.useRef)(null),A=(0,n.useRef)(null),D=(0,n.useRef)([]),P=(0,n.useId)(),[$,G]=(0,n.useState)(!1),[O,F]=(0,n.useState)(-1),[H,K]=(0,n.useState)(null),[U,V]=(0,n.useState)(!1),z=(0,n.useMemo)(()=>f.flatMap((e,t)=>e.options.map((n,r)=>{var a;return{...n,key:`${null!=(a=e.label)?a:"section"}-${t.toString()}-${n.value}-${r.toString()}`,sectionLabel:e.label};})),[f]),q=z.findIndex(e=>e.value===p),Y=-1===q?null:z[q],J=null!=k?k:B("select.placeholder"),X=null!=(r=null==Y?void 0:Y.label)?r:J,Q=null!=(i=null==Y?void 0:Y.description)?i:null,Z=null!=(o=null!=E?E:w)?o:J,ee=()=>{G(!1),F(-1);},et=e=>{var t,n;if(h||0===z.length)return;let r=void 0!==e&&(null==(t=z[e])?void 0:t.disabled)!==!0?e:q>=0&&(null==(n=z[q])?void 0:n.disabled)!==!0?q:s(z);G(!0),F(r),null==v||v();};function en(e){var t;e.disabled||(g(e.value),ee(),null==(t=L.current)||t.focus());}(0,n.useEffect)(()=>{if(!$)return;let e=e=>{let t=e.target;null!==L.current&&t instanceof Node&&L.current.contains(t)||null!==A.current&&t instanceof Node&&A.current.contains(t)||ee();},t=()=>ee();return window.addEventListener("pointerdown",e,!0),window.addEventListener("blur",t),()=>{window.removeEventListener("pointerdown",e,!0),window.removeEventListener("blur",t);};},[$]),(0,n.useLayoutEffect)(()=>{if(!$||null===L.current)return;let e=()=>{var e;let t=null==(e=L.current)?void 0:e.getBoundingClientRect();if(void 0===t)return;let n=Math.min(void 0!==W&&t.width<Math.min(W,96)?W:t.width,window.innerWidth-32),r=I&&1>Math.abs(n-t.width),a=r?-1:6,s=window.innerHeight-t.bottom-16,l=t.top-16,i=s<Math.max(96,2*t.height)&&l>s;V(i);let o=i?l:s,u=50*!!C+2,c=Math.max(t.height,Math.min(Math.max(t.height,o-u),380)),d=c+u,m=window.getComputedStyle(L.current);K({left:Math.min(Math.max(16,t.left),window.innerWidth-n-16),width:n,top:i?Math.max(16,t.top-d-a):Math.min(t.bottom+a,window.innerHeight-16-d),optionHeight:Math.max(28,Math.min(t.height,30)),maxHeight:c,openUp:i,attached:r,fontFamily:m.fontFamily,fontSize:m.fontSize,fontWeight:m.fontWeight,letterSpacing:m.letterSpacing,lineHeight:m.lineHeight});};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0);};},[$,I,W,C]),(0,n.useLayoutEffect)(()=>{if(!$||null===H||!H.openUp||null===L.current||null===A.current)return;let e=L.current.getBoundingClientRect(),t=A.current.getBoundingClientRect();if(t.height<=0)return;let n=H.attached?-1:6,r=Math.max(16,e.top-t.height-n);.5>Math.abs(r-H.top)||K(e=>null===e?e:{...e,top:r});},[$,H]),(0,n.useEffect)(()=>{var e,t;$&&!(O<0)&&(null==(e=D.current[O])||e.focus(),null==(t=D.current[O])||t.scrollIntoView({block:"nearest"}));},[$,O]),(0,n.useEffect)(()=>{if(!$)return;let e=e=>{var t,n;if("Escape"===e.key){ee(),null==(t=L.current)||t.focus();return;}if(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if((n=e.target)instanceof HTMLElement&&("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"SELECT"===n.tagName||n.isContentEditable))return;let t=function(e,t,n){for(let r=1;r<=e.length;r+=1){let a=(t+r)%e.length,s=e[a];if(void 0!==s&&!0!==s.disabled&&s.label.toLowerCase().startsWith(n))return a;}return-1;}(z,O>=0?O:Math.max(q,0),e.key.toLowerCase());-1!==t&&F(t);}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e);},[$,O,z,q]);let er=["ksel-trigger",(c={disabled:h,mono:j,open:$,openUp:U,position:H,triggerClassName:_}).mono?"mono":"",null!=(d=c.triggerClassName)?d:"",c.open?"ksel-trigger-open":"",c.open&&(null==(m=c.position)?void 0:m.attached)===!0?c.openUp?"ksel-trigger-open-up":"ksel-trigger-open-down":"",c.disabled?"ksel-trigger-disabled":""].filter(e=>e.length>0).join(" "),ea=$&&null!==H?(0,t.jsx)(u,{activeIndex:O,ariaLabel:w,flatOptions:z,menuClassName:y,menuCountLabel:x,menuId:P,menuLabel:Z,menuRef:A,menuTitle:E,onCommit:en,onOptionKeyDown:function(e,t){var n,r;if("Escape"===e.key){e.preventDefault(),ee(),null==(n=L.current)||n.focus();return;}if("Tab"===e.key){e.preventDefault(),ee(),null==(r=L.current)||r.focus();return;}if("ArrowDown"===e.key){e.preventDefault(),F(l(z,t,1));return;}if("ArrowUp"===e.key){e.preventDefault(),F(l(z,t,-1));return;}if("Home"===e.key){e.preventDefault(),F(s(z));return;}if("End"===e.key){e.preventDefault(),F(l(z,0,-1));return;}if("Enter"===e.key||" "===e.key){e.preventDefault();let n=z[t];void 0!==n&&en(n);}},placeholder:k,position:H,selectedIndex:q,sections:f,setOptionRef:(e,t)=>{D.current[e]=t;},showMenuHeader:C}):null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{ref:L,"aria-controls":P,"aria-describedby":b,"aria-expanded":$,"aria-haspopup":"listbox","aria-label":w,"aria-labelledby":T,autoFocus:M,className:er,disabled:h,onClick:()=>{$?ee():et();},onKeyDown:function(e){if(!h){if("ArrowDown"===e.key||"ArrowUp"===e.key){e.preventDefault(),et(q>=0?q:s(z));return;}("Enter"===e.key||" "===e.key)&&(e.preventDefault(),$?ee():et());}},role:"combobox",style:R,type:"button",children:[void 0!==S?(0,t.jsx)("span",{className:"ksel-trigger-leading",children:S}):null,(0,t.jsxs)("span",{className:"ksel-trigger-copy",children:[(0,t.jsx)("span",{className:"ksel-trigger-label",children:X}),null!==Q?(0,t.jsx)("span",{className:"ksel-trigger-desc",children:Q}):null]}),N?(0,t.jsx)("span",{"aria-hidden":"true",className:`ksel-trigger-caret${$?" ksel-trigger-caret-open":""}`,children:(0,t.jsx)("svg",{fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",children:(0,t.jsx)("path",{d:"M2.25 4.5 6 8.25 9.75 4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}):null]}),ea]});}]);},17463,e=>{"use strict";e.s(["createSameOriginApiEventSource",0,function(e){if("u"<typeof EventSource)return null;let t=function(e){let t,n=e.trim();if(0===n.length||/[\u0000-\u001f\u007f]/u.test(n)||"null"===window.location.origin)return null;try{t=new URL(n,window.location.origin);}catch{return null;}return t.origin!==window.location.origin||""!==t.username||""!==t.password||!t.pathname.startsWith("/api/")||t.hash.length>0?null:`${t.pathname}${t.search}`;}(e);return null===t?null:new EventSource(t);}]);},25202,e=>{"use strict";let t=new Set(),n=0;function r(){return n>0;}function a(){let e=r();for(let n of t)n(e);}e.s(["backgroundBrowserStreamsSuspended",0,r,"reserveInteractiveBrowserStreamCapacity",0,function(){1===(n+=1)&&a();let e=!1;return()=>{e||(e=!0,0===(n=Math.max(0,n-1))&&a());};},"subscribeBrowserStreamCapacity",0,function(e){return t.add(e),()=>{t.delete(e);};}]);},72859,e=>{"use strict";let t;var n=e.i(17463),r=e.i(25202),a=e.i(75297);let s=new Map(),l=new WeakMap(),i=!1,o=0;function u(e,t,n){var r;null==(r=e.removeEventListener)||r.call(e,t,n);}function c(){return"u">typeof document&&"hidden"===document.visibilityState;}function d(e){void 0!==e.reconnectTimer&&(window.clearTimeout(e.reconnectTimer),e.reconnectTimer=void 0);}function m(e,t){var n;let r=e.dispatchersByType.get(t);return void 0!==r||(r=n=>{l.set(n,e.sourceGeneration),function(e,t,n){var r;let a=t.lastEventId;if(!/^\d+$/u.test(a))return;let s=Number(a);Number.isSafeInteger(s)&&!(s<0)&&(e.lastEventId=n?s:Math.max(null!=(r=e.lastEventId)?r:0,s));}(e,n,"editor-debug:snapshot-required"===t);let r=e.subscribersByType.get(t);if(void 0!==r&&0!==r.size)for(let e of r)e(n);},e.dispatchersByType.set(t,r),null==(n=e.source)||n.addEventListener(t,r)),r;}function p(e){if(null!==e.source){for(let[t,n]of e.dispatchersByType)u(e.source,t,n);e.source.close(),e.source=null;}}function f(e){if(0===e.refCount||null!==e.source||0===e.essentialRefCount&&(0,r.backgroundBrowserStreamsSuspended)()||c()||"u"<typeof EventSource)return;let t=(0,n.createSameOriginApiEventSource)(function(e){if(void 0===e.lastEventId)return e.url;let t=new URL(e.url,window.location.origin);return t.searchParams.set("lastEventId",String(e.lastEventId)),`${t.pathname}${t.search}`;}(e));if(null!==t)for(let n of(e.sourceGeneration=o+=1,e.source=t,t.onopen=()=>{e.reconnectAttempts=0;},t.onerror=()=>{if(p(e),!(0===e.refCount||void 0!==e.reconnectTimer||c())&&"u">typeof EventSource){let t;e.reconnectTimer=window.setTimeout(()=>{e.reconnectTimer=void 0,f(e);},(t=Math.min(3e4,1e3*2**e.reconnectAttempts),e.reconnectAttempts+=1,t+(0,a.secureRandomInt)(500)));}},e.subscribersByType.keys()))t.addEventListener(n,m(e,n));}function g(e){for(let t of s.values())t.essentialRefCount>0?f(t):e?(d(t),p(t)):f(t);}function v(){if(c()){for(let e of s.values())d(e),p(e);return;}for(let e of s.values())f(e);}function h(){i&&!(s.size>0)&&"u">typeof document&&(document.removeEventListener("visibilitychange",v),i=!1,null==t||t(),t=void 0);}e.s(["resetSharedEventSourcesForTests",0,function(){for(let e of s.values())d(e),p(e);s.clear(),o=0,h();},"sharedEventSourceGeneration",0,function(e){var t;return null!=(t=l.get(e))?t:0;},"subscribeSharedEventSource",0,function(e,n,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=function(e){let n=s.get(e);if(void 0!==n)return n;let a={url:e,source:null,subscribersByType:new Map(),dispatchersByType:new Map(),refCount:0,essentialRefCount:0,lastEventId:void 0,reconnectAttempts:0,reconnectTimer:void 0,sourceGeneration:0};return s.set(e,a),!i&&"u">typeof document&&(document.addEventListener("visibilitychange",v),i=!0,t=(0,r.subscribeBrowserStreamCapacity)(g)),a;}(e),c="background"!==l.priority;for(let e of(o.refCount+=1,c&&(o.essentialRefCount+=1),n)){var k;let t=null!=(k=o.subscribersByType.get(e))?k:new Set();t.add(a),o.subscribersByType.set(e,t),m(o,e);}f(o);let w=!1;return()=>{if(!w){for(let e of(w=!0,n)){let t=o.subscribersByType.get(e);if(null==t||t.delete(a),(null==t?void 0:t.size)===0){o.subscribersByType.delete(e);let t=o.dispatchersByType.get(e);void 0!==t&&null!==o.source&&u(o.source,e,t);}}o.refCount-=1,c&&(o.essentialRefCount-=1),o.refCount>0&&0===o.essentialRefCount&&(0,r.backgroundBrowserStreamsSuspended)()&&(d(o),p(o)),o.refCount>0||(d(o),p(o),s.delete(e),h());}};}]);},28804,e=>{"use strict";var t=e.i(87032);function n(e){if(e.hidden)return!1;let t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&"collapse"!==t.visibility;}e.s(["useDialogTabTrap",0,function(e){(0,t.useEffect)(()=>{let t=t=>{if("Tab"!==t.key)return;let r=e.current;if(null===r)return;let a=Array.from(r.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(n),s=document.activeElement;if(0===a.length||!r.contains(s)){var l;t.preventDefault(),(null!=(l=t.shiftKey?a.at(-1):a[0])?l:r).focus();return;}let i=a[0],o=a.at(-1);if(void 0===i||void 0===o)return;let u=s===r;t.shiftKey&&(s===i||u)?(t.preventDefault(),o.focus()):t.shiftKey||s!==o||(t.preventDefault(),i.focus());};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t);};},[e]);}]);},42293,e=>{e.v({lazyWidgetScope:"TerminalWidget-module__P2UrDq__lazyWidgetScope"});},39762,e=>{"use strict";var t=e.i(10158);let n=t.WORKSPACE_CONTRACT_SCHEMA_VERSION,r=Object.freeze(["trusted","restricted"]),a=Object.freeze(["human-grant","derived-from-trusted-root","human-revocation","identity-changed","manifest-changed","trust-basis-changed","policy","state-unavailable"]),s=["kind","schemaVersion","projectId","trust","decidedBy","reason","revision"];function l(e){return r.includes(e);}function i(e){return a.includes(e);}e.s(["isWorkspaceTrustStatus",0,function(e){try{var r,a;let o;if(!(0,t.isWorkspaceRecord)(e)||!(0,t.hasOnlyWorkspaceKeys)(e,s))return!1;let u="string"==typeof e.projectId&&e.projectId.length>0&&e.projectId.length<=4096&&!e.projectId.includes("\0");return["workspace-trust-status"===e.kind,e.schemaVersion===n,u,l(e.trust),"server"===e.decidedBy,i(e.reason),null===e.revision||(0,t.isWorkspaceRevision)(e.revision)].every(Boolean)&&l(e.trust)&&i(e.reason)&&(r=e.trust,o="human-grant"===(a=e.reason)||"derived-from-trusted-root"===a,"trusted"===r?o:!o);}catch{return!1;}}]);},95492,e=>{"use strict";var t=e.i(39762),n=e.i(76055),r=e.i(70045);let a="/api/editor/verification/trust",s="keiko:workspace-trust-changed";function l(e){return(r,a)=>function(e,r,a){if(!(0,t.isWorkspaceTrustStatus)(r)||r.projectId!==a)throw new n.ApiError("CONTRACT_VALIDATION_FAILED",`BFF response for ${e} failed contract validation: workspace trust status invalid.`,502);return r;}(r,a,e);}async function i(e){let t=new URLSearchParams({projectId:e});return(0,r.bffFetchJson)(`${a}?${t.toString()}`,void 0,{validator:l(e),parseFailureMessage:()=>"workspace trust request rejected"});}async function o(e,t){let n=await(0,r.bffFetchJson)(a,{method:"grant"===t?"POST":"DELETE",body:JSON.stringify({projectId:e})},{validator:l(e),parseFailureMessage:()=>"workspace trust request rejected"});return window.dispatchEvent(new CustomEvent(s,{detail:{projectId:e}})),n;}e.s(["WORKSPACE_TRUST_CHANGED_EVENT",0,s,"fetchWorkspaceTrustStatus",0,i,"mutateWorkspaceTrust",0,o,"workspaceTrustEventProjectId",0,function(e){if(!(e instanceof CustomEvent))return null;let t=e.detail;if("object"!=typeof t||null===t||Array.isArray(t))return null;let n=t.projectId;return"string"==typeof n&&n.length>0?n:null;},"workspaceTrustFailure",0,function(e){if(e instanceof Error&&"code"in e&&"string"==typeof e.code&&(!("correlationId"in e)||void 0===e.correlationId||"string"==typeof e.correlationId))return void 0===e.correlationId?{code:e.code}:{code:e.code,correlationId:e.correlationId};}]);},82454,e=>{e.v({cmpAlert:"WorkspaceTrust-module__Cm_wMG__cmpAlert",cmpBadge:"WorkspaceTrust-module__Cm_wMG__cmpBadge",cmpBanner:"WorkspaceTrust-module__Cm_wMG__cmpBanner",cmpBannerCopy:"WorkspaceTrust-module__Cm_wMG__cmpBannerCopy",cmpBannerReason:"WorkspaceTrust-module__Cm_wMG__cmpBannerReason",cmpBannerTitle:"WorkspaceTrust-module__Cm_wMG__cmpBannerTitle",cmpButton:"WorkspaceTrust-module__Cm_wMG__cmpButton",cmpCard:"WorkspaceTrust-module__Cm_wMG__cmpCard",cmpCardCopy:"WorkspaceTrust-module__Cm_wMG__cmpCardCopy",cmpCardReason:"WorkspaceTrust-module__Cm_wMG__cmpCardReason",cmpCardTitle:"WorkspaceTrust-module__Cm_wMG__cmpCardTitle",cmpDanger:"WorkspaceTrust-module__Cm_wMG__cmpDanger",cmpDialog:"WorkspaceTrust-module__Cm_wMG__cmpDialog",cmpDialogActions:"WorkspaceTrust-module__Cm_wMG__cmpDialogActions",cmpDialogBackdrop:"WorkspaceTrust-module__Cm_wMG__cmpDialogBackdrop",cmpDialogTitle:"WorkspaceTrust-module__Cm_wMG__cmpDialogTitle",cmpEditorBanner:"WorkspaceTrust-module__Cm_wMG__cmpEditorBanner",cmpEditorMain:"WorkspaceTrust-module__Cm_wMG__cmpEditorMain",cmpEditorPanes:"WorkspaceTrust-module__Cm_wMG__cmpEditorPanes",cmpEmpty:"WorkspaceTrust-module__Cm_wMG__cmpEmpty",cmpFailureDetails:"WorkspaceTrust-module__Cm_wMG__cmpFailureDetails",cmpHelp:"WorkspaceTrust-module__Cm_wMG__cmpHelp",cmpIntro:"WorkspaceTrust-module__Cm_wMG__cmpIntro",cmpList:"WorkspaceTrust-module__Cm_wMG__cmpList",cmpPanel:"WorkspaceTrust-module__Cm_wMG__cmpPanel",cmpPanelHeader:"WorkspaceTrust-module__Cm_wMG__cmpPanelHeader",cmpPanelTitle:"WorkspaceTrust-module__Cm_wMG__cmpPanelTitle",cmpPath:"WorkspaceTrust-module__Cm_wMG__cmpPath",cmpPrimary:"WorkspaceTrust-module__Cm_wMG__cmpPrimary",cmpState:"WorkspaceTrust-module__Cm_wMG__cmpState"});},24096,e=>{"use strict";var t=e.i(10582),n=e.i(87032),r=e.i(5353),a=e.i(50850),s=e.i(28804),l=e.i(8245),i=e.i(82454);let o={"human-grant":"workspaceTrust.reason.humanGrant","derived-from-trusted-root":"workspaceTrust.reason.derivedFromTrustedRoot","human-revocation":"workspaceTrust.reason.humanRevocation","identity-changed":"workspaceTrust.reason.identityChanged","manifest-changed":"workspaceTrust.reason.manifestChanged","trust-basis-changed":"workspaceTrust.reason.trustBasisChanged",policy:"workspaceTrust.reason.policy","state-unavailable":"workspaceTrust.reason.stateUnavailable"},u={editor:"workspaceTrust.banner.editor",commands:"workspaceTrust.banner.commands",languages:"workspaceTrust.banner.languages"};function c(e){return o[e];}function d(e){let{failure:n}=e,r=(0,a.useTranslate)();return void 0===n?null:(0,t.jsxs)("p",{className:i.default.cmpFailureDetails,"data-testid":"workspace-trust-failure-details",children:[(0,t.jsx)("span",{children:r("workspaceTrust.errorCode",{code:n.code})}),void 0===n.correlationId?null:(0,t.jsx)("span",{children:r("workspaceTrust.supportId",{correlationId:n.correlationId})})]});}function m(e,t){return"load"===t?"unavailable":(null==e?void 0:e.trust)==="trusted"?"trusted":"restricted";}e.s(["WorkspaceTrustBadge",0,function(e){let{status:n,issue:r}=e,s=(0,a.useTranslate)(),l=m(n,r),o=function(e,t){switch(e){case"unavailable":return t("workspaceTrust.unavailable");case"trusted":return t("workspaceTrust.trustedMode");case"restricted":return t("workspaceTrust.restrictedMode");}}(l,s);return(0,t.jsx)("span",{className:i.default.cmpBadge,"data-trust":l,"aria-label":o,children:o});},"WorkspaceTrustBanner",0,function(e){var n;let{status:r,issue:s,failure:l,surface:o,onManage:p,editor:f=!1}=e,g=(0,a.useTranslate)(),v=m(r,s),h="trusted"===v;if(h&&void 0===s)return null;let k="unavailable"===v,w=g((n={unavailable:k,trusted:h}).unavailable?"workspaceTrust.unavailable":n.trusted?"workspaceTrust.trustedMode":"workspaceTrust.restrictedMode"),b=g(void 0===r?"workspaceTrust.reason.stateUnavailable":c(r.reason));return(0,t.jsxs)("div",{role:"note",className:`${i.default.cmpBanner} ${f?i.default.cmpEditorBanner:""}`,"aria-label":w,"data-trust":v,"data-testid":`workspace-trust-banner-${o}`,children:[(0,t.jsxs)("div",{className:i.default.cmpBannerCopy,children:[(0,t.jsx)("div",{className:i.default.cmpBannerTitle,children:w}),k?(0,t.jsx)("p",{className:i.default.cmpBannerReason,children:g("workspaceTrust.loadFailed")}):(0,t.jsx)("p",{className:i.default.cmpBannerReason,children:b}),(0,t.jsx)("p",{className:i.default.cmpBannerReason,children:g(u[o])}),"update"===s?(0,t.jsx)("p",{className:i.default.cmpBannerReason,role:"alert",children:g(h?"workspaceTrust.updateFailedTrusted":"workspaceTrust.updateFailed")}):null,(0,t.jsx)(d,{failure:l})]}),void 0===p?null:(0,t.jsx)("button",{type:"button",className:i.default.cmpButton,onClick:p,children:g("workspaceTrust.manage")})]});},"WorkspaceTrustDecisionDialog",0,function(e){let{action:o,initialPrompt:u,mutating:c,onCancel:d,onConfirm:m}=e,p=(0,a.useTranslate)(),f=(0,n.useRef)(null),g=(0,n.useRef)(null);(0,s.useDialogTabTrap)(f),(0,l.useModalInteractionLock)({initialFocusRef:g}),(0,n.useEffect)(()=>{let e=e=>{"Escape"!==e.key||c||d();};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e);},[c,d]);let v=p("grant"===o?"workspaceTrust.dialog.grantTitle":"workspaceTrust.dialog.revokeTitle"),h=p("grant"===o?"workspaceTrust.dialog.grantBody":"workspaceTrust.dialog.revokeBody"),k=(0,t.jsx)("div",{className:i.default.cmpDialogBackdrop,children:(0,t.jsxs)("div",{className:i.default.cmpDialog,ref:f,role:"alertdialog","aria-modal":"true","aria-labelledby":"workspace-trust-dialog-title","aria-describedby":"workspace-trust-dialog-description",tabIndex:-1,children:[(0,t.jsx)("h2",{className:i.default.cmpDialogTitle,id:"workspace-trust-dialog-title",children:v}),(0,t.jsx)("p",{className:i.default.cmpIntro,id:"workspace-trust-dialog-description",children:h}),(0,t.jsx)("p",{className:i.default.cmpHelp,children:p("workspaceTrust.dialog.serverConfirmed")}),(0,t.jsxs)("div",{className:i.default.cmpDialogActions,children:[(0,t.jsx)("button",{ref:g,type:"button",className:i.default.cmpButton,disabled:c,onClick:d,children:p(u?"workspaceTrust.dialog.stayRestricted":"workspaceTrust.dialog.cancel")}),(0,t.jsx)("button",{type:"button",className:`${i.default.cmpButton} ${"grant"===o?i.default.cmpPrimary:i.default.cmpDanger}`,disabled:c,onClick:()=>{m();},children:p(c?"workspaceTrust.dialog.waiting":"grant"===o?"workspaceTrust.dialog.trust":"workspaceTrust.dialog.revoke")})]})]})});return"u"<typeof document?k:(0,r.createPortal)(k,document.body);},"WorkspaceTrustFailureDetails",0,d,"workspaceTrustReasonKey",0,c]);},42050,e=>{"use strict";var t=e.i(87032),n=e.i(95492),r=e.i(97316);e.s(["useWorkspaceTrust",0,function(e){let[a,s]=(0,t.useState)(),[l,i]=(0,t.useState)(void 0!==e),[o,u]=(0,t.useState)(!1),[c,d]=(0,t.useState)(),[m,p]=(0,t.useState)(),f=(0,t.useRef)(0),g=(0,t.useCallback)(async()=>{f.current+=1;let t=f.current;if(void 0===e||0===e.length){s(void 0),i(!1),d(void 0),p(void 0);return;}i(!0),d(void 0),p(void 0);try{let r=await(0,n.fetchWorkspaceTrustStatus)(e);t===f.current&&(s(r),d(void 0),p(void 0));}catch(e){t===f.current&&(s(void 0),d("load"),p((0,n.workspaceTrustFailure)(e)));}finally{t===f.current&&i(!1);}},[e]);(0,t.useEffect)(()=>{g();let t=t=>{(0,n.workspaceTrustEventProjectId)(t)===e&&g();},a=t=>{let n=(0,r.workspaceManifestEventValue)(t);null!==n&&void 0!==e&&0!==e.length&&n.roots.some(t=>t.canonicalRoot===e)&&g();};return window.addEventListener(n.WORKSPACE_TRUST_CHANGED_EVENT,t),window.addEventListener(r.WORKSPACE_MANIFEST_CHANGED_EVENT,a),()=>{f.current+=1,window.removeEventListener(n.WORKSPACE_TRUST_CHANGED_EVENT,t),window.removeEventListener(r.WORKSPACE_MANIFEST_CHANGED_EVENT,a);};},[e,g]);let v=(0,t.useCallback)(async t=>{if(void 0===e||0===e.length||o)return!1;u(!0),d(void 0),p(void 0);try{let r=await(0,n.mutateWorkspaceTrust)(e,t);return s(r),p(void 0),!0;}catch(e){return d("update"),p((0,n.workspaceTrustFailure)(e)),!1;}finally{u(!1);}},[o,e]);return{status:a,loading:l,mutating:o,issue:c,failure:m,refresh:g,grant:()=>v("grant"),revoke:()=>v("revoke")};}]);},51997,e=>{"use strict";var t=e.i(70045);async function n(e,n){return(0,t.bffFetchJson)(e,n);}async function r(e){let t=new URLSearchParams();return t.set("projectId",e),n(`/api/commands/catalog?${t.toString()}`);}async function a(e){return n("/api/commands/runs",{method:"POST",body:JSON.stringify(e)});}async function s(e){await n(`/api/commands/runs/${encodeURIComponent(e)}`,{method:"DELETE"});}e.s(["cancelCommandRun",0,s,"commandEventsUrl",0,function(){return"/api/commands/events";},"createCommandRun",0,a,"fetchCommandCatalog",0,r]);},23551,e=>{"use strict";var t=e.i(10582),n=e.i(87032),r=e.i(76055),a=e.i(85912),s=e.i(51997),l=e.i(75297),i=e.i(67914),o=e.i(60865),u=e.i(72859),c=e.i(42293),d=e.i(42050),m=e.i(24096);let p=["command:run-started","command:run-completed","command:run-failed","command:run-cancelled"];function f(e,t){return e instanceof r.ApiError?{code:e.code,message:e.message}:e instanceof Error?{code:"INTERNAL",message:e.message}:{code:"INTERNAL",message:t("commandsWidget.error.unexpected")};}function g(e,t){return null!==t&&"string"==typeof e.payload.requestId&&e.payload.requestId===t;}function v(e){let n,{result:r,t:a}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"sr-only",role:"status","aria-live":"polite",children:null!==r?(n=[a("commandsWidget.result.exit",{code:String(r.exitCode)}),a("commandsWidget.result.duration",{duration:r.durationMs})],r.truncated&&n.push(a("commandsWidget.result.outputTruncated")),r.timedOut&&n.push(a("commandsWidget.result.timedOut")),n.push(r.failureReason,a("commandsWidget.result.run",{id:r.runId}),a("commandsWidget.result.task",{id:r.taskId})),a("commandsWidget.result.finished",{details:n.join(", ")})):""}),null!==r?(0,t.jsxs)("div",{className:"tm-result",children:[(0,t.jsxs)("div",{className:"tm-badges",children:[(0,t.jsx)("span",{className:0===r.exitCode?"tm-badge tm-badge-ok":"tm-badge tm-badge-fail",children:a("commandsWidget.result.exit",{code:String(r.exitCode)})}),(0,t.jsxs)("span",{className:"tm-badge",children:[r.durationMs," ms"]}),(0,t.jsx)("span",{className:"tm-badge",children:r.failureReason}),(0,t.jsx)("span",{className:"tm-badge",children:a("commandsWidget.result.run",{id:r.runId})}),(0,t.jsx)("span",{className:"tm-badge",children:a("commandsWidget.result.task",{id:r.taskId})}),r.truncated?(0,t.jsx)("span",{className:"tm-badge tm-badge-warn",children:a("commandsWidget.result.truncated")}):null,r.timedOut?(0,t.jsx)("span",{className:"tm-badge tm-badge-warn",children:a("commandsWidget.result.timedOut")}):null]}),r.stdout.length>0?(0,t.jsx)("section",{className:"tm-stdout","aria-label":a("commandsWidget.result.stdoutAriaLabel"),tabIndex:0,children:(0,t.jsx)("pre",{className:"tm-output-content",children:r.stdout})}):null,r.stderr.length>0?(0,t.jsx)("section",{className:"tm-stderr","aria-label":a("commandsWidget.result.stderrAriaLabel"),tabIndex:0,children:(0,t.jsx)("pre",{className:"tm-output-content",children:r.stderr})}):null]}):null]});}e.s(["CommandsWidget",0,function(e){var r,h,k;let w=(0,a.useOptionalWidgetTranslate)(),[b,T]=(0,n.useState)(null!=(r=e.projectPath)?r:"");(0,n.useEffect)(()=>{var t;T(null!=(t=e.projectPath)?t:"");},[e.projectPath]);let[_,y]=(0,n.useState)([]),[E,x]=(0,n.useState)(""),[C,S]=(0,n.useState)(!1),[j,N]=(0,n.useState)(null),[W,I]=(0,n.useState)(null),[R,M]=(0,n.useState)(null),[B,L]=(0,n.useState)([]),A=(0,d.useWorkspaceTrust)(b.length>0?b:void 0),D=(0,n.useRef)(!1),P=(0,n.useRef)(null),$=(0,n.useRef)(null),G=(0,n.useRef)(!1),O=_.find(e=>e.id===E),F=(null==O?void 0:O.trustState)==="trusted",H=(null==O?void 0:O.trustState)==="approval-required",K=C||!F;(0,n.useEffect)(()=>{if(0===b.length)return void y([]);let e=!1;return(0,s.fetchCommandCatalog)(b).then(t=>{e||(y(t.tasks),x(e=>{var n,r;return e.length>0?e:null!=(n=null==(r=t.tasks[0])?void 0:r.id)?n:"";}));}).catch(t=>{e||(y([]),M(f(t,w)));}),()=>{e=!0;};},[b,w,null==(h=A.status)?void 0:h.revision,null==(k=A.status)?void 0:k.trust]),(0,n.useEffect)(()=>{if(C)return(0,u.subscribeSharedEventSource)((0,s.commandEventsUrl)(),p,e=>{let t;try{t=JSON.parse(e.data);}catch{return;}"run-started"===t.kind&&D.current&&g(t,P.current)&&N(e=>null!=e?e:t.runId),"run-started"!==t.kind&&g(t,P.current)&&N(e=>e===t.runId?null:e),g(t,P.current)&&L(e=>[t,...e].slice(0,30));});},[C]),(0,n.useEffect)(()=>{if(G.current&&!C&&document.activeElement===document.body){var e;null==(e=$.current)||e.focus();}G.current=C;},[C]);let U=(0,n.useCallback)(async e=>{if(e.preventDefault(),C||D.current||!F)return;M(null),I(null),N(null);let t=(0,l.secureRandomId)("command");P.current=t,D.current=!0,S(!0);try{let e=await(0,s.createCommandRun)({projectId:b,taskId:E,requestId:t});I(e);}catch(e){M(f(e,w));}finally{D.current=!1,S(!1),P.current=null,N(null);}},[b,F,C,E,w]),V=(0,n.useCallback)(async()=>{if(null!==j)try{await(0,s.cancelCommandRun)(j);}catch(e){M(f(e,w));}},[j,w]);return(0,t.jsxs)("div",{className:`terminal commands ${c.default.lazyWidgetScope}`,children:[b.length>0?(0,t.jsx)(m.WorkspaceTrustBanner,{status:A.status,issue:A.issue,failure:A.failure,surface:"commands",onManage:e.onOpenWorkspaceTrust}):null,(0,t.jsxs)("form",{className:"tm-form",onSubmit:e=>void U(e),children:[(0,t.jsxs)("label",{className:"tm-field",children:[(0,t.jsx)("span",{children:w("commandsWidget.field.projectPath")}),(0,t.jsx)("input",{type:"text",value:b,onChange:e=>T(e.target.value),placeholder:w("commandsWidget.field.projectPathPlaceholder"),required:!0})]}),(0,t.jsxs)("div",{className:"tm-field",children:[(0,t.jsx)("span",{children:w("commandsWidget.field.task")}),(0,t.jsx)(i.default,{value:E,ariaLabel:w("commandsWidget.field.task"),disabled:0===_.length,menuTitle:w("commandsWidget.field.discoveredTasks"),mono:!0,sections:[{options:_.map(e=>{let t;return{value:e.id,label:(t="trusted"===e.trustState?"":w("commandsWidget.task.approvalRequiredSuffix"),`${e.kind} \xb7 ${e.label}${t}`)};})}],onValueChange:x})]}),(0,t.jsxs)("div",{className:"tm-actions",children:[(0,t.jsx)("button",{type:"submit",className:"tm-action","data-primary":"true",ref:$,disabled:!F,"aria-disabled":K,children:C?w("commandsWidget.action.running"):w("commandsWidget.action.run")}),C?(0,t.jsx)("button",{type:"button",className:"tm-action",disabled:null===j,"aria-disabled":null===j,onClick:()=>void V(),children:w("commandsWidget.action.cancel")}):null]}),0===_.length&&b.length>0&&null===R?(0,t.jsx)("output",{className:"tm-limits",style:o.NATIVE_BLOCK_STYLE,children:w("commandsWidget.empty.noRunnableTasks")}):null,H?(0,t.jsx)("output",{className:"tm-limits",style:o.NATIVE_BLOCK_STYLE,children:w("commandsWidget.trust.required")}):null]}),null!==R?(0,t.jsxs)("div",{className:"tm-error",role:"alert",children:[(0,t.jsxs)("span",{className:"tm-error-text",children:[R.message," ",(0,t.jsxs)("span",{className:"err-code mono",children:["(",R.code,")"]})]}),(0,t.jsx)("button",{type:"button",className:"tm-error-dismiss","aria-label":w("commandsWidget.error.dismiss"),onClick:()=>M(null),children:"✕"})]}):null,(0,t.jsx)(v,{result:W,t:w}),(0,t.jsx)("div",{role:"log","aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false","aria-label":w("commandsWidget.log.ariaLabel"),children:(0,t.jsx)("ul",{className:"tm-events",children:B.map((e,n)=>{var r;let a;return(0,t.jsxs)("li",{className:"tm-event",children:[(0,t.jsx)("span",{className:"tm-event-kind",children:function(e,t){switch(e){case"run-started":return t("commandsWidget.event.started");case"run-completed":return t("commandsWidget.event.completed");case"run-failed":return t("commandsWidget.event.failed");case"run-cancelled":return t("commandsWidget.event.cancelled");}}(e.kind,w)}),(0,t.jsx)("span",{className:"tm-event-detail",children:(a=(r=e).payload,"run-completed"===r.kind||"run-failed"===r.kind?["string"==typeof a.failureReason?a.failureReason:"","number"==typeof a.durationMs?`${String(a.durationMs)}ms`:""].filter(Boolean).join(" · "):"")})]},`${e.runId}-${String(n)}-${e.kind}`);})})})]});}]);},34484,e=>{e.n(e.i(23551));}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69870,e=>{e.v({button:"ManagedTaskWorkspaceUnavailable-module__a7uVmW__button",copy:"ManagedTaskWorkspaceUnavailable-module__a7uVmW__copy",icon:"ManagedTaskWorkspaceUnavailable-module__a7uVmW__icon",root:"ManagedTaskWorkspaceUnavailable-module__a7uVmW__root"});},46652,e=>{e.v({cmpAction:"MultiRootFilesWidget-module__kKCgjq__cmpAction",cmpCaret:"MultiRootFilesWidget-module__kKCgjq__cmpCaret",cmpIssue:"MultiRootFilesWidget-module__kKCgjq__cmpIssue",cmpRootExplorer:"MultiRootFilesWidget-module__kKCgjq__cmpRootExplorer",cmpRootGroup:"MultiRootFilesWidget-module__kKCgjq__cmpRootGroup",cmpRootHeader:"MultiRootFilesWidget-module__kKCgjq__cmpRootHeader",cmpRootList:"MultiRootFilesWidget-module__kKCgjq__cmpRootList",cmpRootName:"MultiRootFilesWidget-module__kKCgjq__cmpRootName",cmpRootPath:"MultiRootFilesWidget-module__kKCgjq__cmpRootPath",cmpRootToggle:"MultiRootFilesWidget-module__kKCgjq__cmpRootToggle",cmpRootTree:"MultiRootFilesWidget-module__kKCgjq__cmpRootTree",cmpSelect:"MultiRootFilesWidget-module__kKCgjq__cmpSelect",cmpToolbar:"MultiRootFilesWidget-module__kKCgjq__cmpToolbar"});},36369,e=>{e.v({cmpHost:"MultiRootEditorHost-module__-j7N3a__cmpHost",cmpIssue:"MultiRootEditorHost-module__-j7N3a__cmpIssue",cmpRootTab:"MultiRootEditorHost-module__-j7N3a__cmpRootTab",cmpRootTabs:"MultiRootEditorHost-module__-j7N3a__cmpRootTabs",cmpSession:"MultiRootEditorHost-module__-j7N3a__cmpSession"});},84825,e=>{"use strict";var t=e.i(17754),o=e.i(10582),i=e.i(59625),n=e.i(87032),r=e.i(40232),a=e.i(76055),l=e.i(70045),d=e.i(50850),s=e.i(24541),c=e.i(80144),u=e.i(73526),f=e.i(87552),p=e.i(4911),v=e.i(48143),m=e.i(17161),h=e.i(69870);let g=m.Icons.branch;function R(e){let t=(0,d.useTranslate)(),i="checking"===e.access;return(0,o.jsxs)("div",{className:h.default.root,role:"note","aria-label":t("editor.taskWorkspaceAccess.title"),children:[(0,o.jsx)("span",{className:h.default.icon,"aria-hidden":"true",children:(0,o.jsx)(g,{size:20})}),(0,o.jsxs)("span",{className:h.default.copy,children:[(0,o.jsx)("strong",{children:t(i?"editor.taskWorkspaceAccess.checking":"editor.taskWorkspaceAccess.title")}),(0,o.jsx)("span",{children:t(i?"editor.taskWorkspaceAccess.checkingDescription":"editor.taskWorkspaceAccess.description")})]}),i?null:(0,o.jsx)("button",{type:"button",className:h.default.button,onClick:e.onRetry,children:t("editor.taskWorkspaceAccess.retry")})]});}var k=e.i(24096),j=e.i(42050),y=e.i(19425),w=e.i(46652);let C=m.Icons.chevronR,I=m.Icons.close,b=new Set(["ArrowDown","ArrowUp","Home","End"]);function _(e){let{root:t,index:i,manifest:r,workspace:a,onActiveFileChange:l,onOpenFile:s,onOpenGitDelivery:c,rovingTabIndex:u,onRovingFocus:f}=e,p=(0,d.useTranslate)(),v=(0,j.useWorkspaceTrust)(t.canonicalRoot),[m,h]=(0,n.useState)(!0),g=r.focusedRootRef===t.rootRef,R=(0,n.useRef)({path:null,fileRoot:t.canonicalRoot,activeDirectoryPath:void 0}),_=(0,n.useCallback)((e,t,o)=>{R.current={path:e,fileRoot:t,activeDirectoryPath:o},g&&l(e,t,o);},[g,l]);(0,n.useEffect)(()=>{if(!g)return;let{path:e,fileRoot:o,activeDirectoryPath:i}=R.current;l(e,null!=o?o:t.canonicalRoot,i);},[g,l,t.canonicalRoot]);let x=e=>{a.reorderRoots(t.rootRef,function(e,t,o){let i=e.map(e=>e.rootRef),n=t+o;if(n<0||n>=i.length)return i;let[r]=i.splice(t,1);return void 0!==r&&i.splice(n,0,r),i;}(r.roots,i,e));},P=e=>{if("ArrowLeft"===e.key&&m){e.preventDefault(),h(!1);return;}if("ArrowRight"===e.key&&!m){e.preventDefault(),h(!0);return;}!function(e){var t,o;if(!b.has(e.key))return;let i=e.currentTarget.closest("[data-root-group]");if(null===i)return;let n=i.closest("[data-multi-root-explorer]"),r=Array.from(null!=(t=null==n?void 0:n.querySelectorAll("[data-root-group]"))?t:[]),a=r.indexOf(i);if(a<0||0===r.length)return;e.preventDefault();let l=Math.max(0,Math.min(r.length-1,a+("ArrowDown"===e.key?1:-1)));"Home"===e.key?l=0:"End"===e.key&&(l=r.length-1),null==(o=r[l])||o.focus();}(e);};return(0,o.jsxs)("div",{className:w.default.cmpRootGroup,role:"treeitem","aria-expanded":m,"aria-selected":g,"aria-label":t.displayName,"data-root-group":!0,tabIndex:u,onFocus:()=>f(t.rootRef),onKeyDown:e=>{e.target===e.currentTarget&&P(e);},children:[(0,o.jsxs)("div",{className:w.default.cmpRootHeader,"data-focused":g,children:[(0,o.jsxs)("button",{type:"button",className:w.default.cmpRootToggle,"data-root-group-header":!0,"aria-expanded":m,onKeyDown:P,onClick:()=>h(e=>!e),children:[(0,o.jsx)("span",{className:w.default.cmpCaret,"data-expanded":m,"aria-hidden":"true",children:(0,o.jsx)(C,{size:12})}),(0,o.jsxs)("span",{className:w.default.cmpRootName,children:[t.displayName,(0,o.jsx)("span",{className:w.default.cmpRootPath,children:t.canonicalRoot})]})]}),(0,o.jsx)(k.WorkspaceTrustBadge,{status:v.status,issue:v.issue}),(0,o.jsx)("button",{type:"button",className:w.default.cmpAction,disabled:g||a.mutating,"aria-label":p("filesWidget.multiRoot.focus",{name:t.displayName}),onClick:()=>void a.focusRoot(t.rootRef),children:p(g?"filesWidget.multiRoot.focused":"filesWidget.multiRoot.focusAction")}),(0,o.jsx)("button",{type:"button",className:w.default.cmpAction,disabled:0===i||a.mutating,"aria-label":p("filesWidget.multiRoot.moveUp",{name:t.displayName}),onClick:()=>x(-1),children:"↑"}),(0,o.jsx)("button",{type:"button",className:w.default.cmpAction,disabled:i===r.roots.length-1||a.mutating,"aria-label":p("filesWidget.multiRoot.moveDown",{name:t.displayName}),onClick:()=>x(1),children:"↓"}),(0,o.jsx)("button",{type:"button",className:w.default.cmpAction,disabled:1===r.roots.length||a.mutating,"aria-label":p("filesWidget.multiRoot.remove",{name:t.displayName}),onClick:()=>void a.removeRoot(t.rootRef,t.rootRef),children:(0,o.jsx)(I,{size:12})})]}),m?(0,o.jsx)("div",{className:w.default.cmpRootTree,role:"group",children:(0,o.jsx)(y.FilesWidget,{root:t.canonicalRoot,watchActive:g,onActiveFileChange:_,onOpenFile:(e,o)=>{a.focusRoot(t.rootRef),s(e,o);},onOpenGitDelivery:c})}):null]});}function x(e){let{manifest:t,workspace:i}=e,r=(0,d.useTranslate)(),[l,s]=(0,n.useState)([]),[c,u]=(0,n.useState)("");(0,n.useEffect)(()=>{let e=!1;return(0,a.fetchProjects)().then(o=>{if(e)return;let i=new Set(t.roots.map(e=>e.canonicalRoot));s(o.projects.filter(e=>e.available&&!i.has(e.path)).map(e=>({name:e.name,path:e.path})));}).catch(()=>{e||s([]);}),()=>{e=!0;};},[t.roots]);let f=(0,n.useMemo)(()=>l,[l]),p=t.roots.find(e=>e.rootRef===t.focusedRootRef);return(0,o.jsxs)("fieldset",{className:w.default.cmpToolbar,"aria-label":r("filesWidget.multiRoot.manage"),children:[(0,o.jsxs)("select",{className:w.default.cmpSelect,"aria-label":r("filesWidget.multiRoot.project"),value:c,disabled:i.mutating||0===f.length,onChange:e=>u(e.target.value),children:[(0,o.jsx)("option",{value:"",children:r("filesWidget.multiRoot.chooseProject")}),f.map(e=>(0,o.jsx)("option",{value:e.path,children:e.name},e.path))]}),(0,o.jsx)("button",{type:"button",className:w.default.cmpAction,disabled:i.mutating||0===c.length||void 0===p,onClick:()=>{void 0!==p&&i.addRoot(p.rootRef,c);},children:r("filesWidget.multiRoot.add")})]});}function P(e){var t,i,r;let a=(0,d.useTranslate)(),l=null!=(t=null!=(i=e.manifest.focusedRootRef)?i:null==(r=e.manifest.roots[0])?void 0:r.rootRef)?t:null,[s,c]=(0,n.useState)(l),[u,f]=(0,n.useState)(l);u!==l&&(f(l),c(l));let p=e.manifest.roots.some(e=>e.rootRef===s)?s:l;return(0,o.jsxs)("section",{className:w.default.cmpRootExplorer,"data-multi-root-explorer":!0,"aria-label":a("filesWidget.multiRoot.label"),children:[(0,o.jsx)(x,{manifest:e.manifest,workspace:e.workspace}),null===e.workspace.issue?null:(0,o.jsx)("p",{className:w.default.cmpIssue,role:"alert",children:a("filesWidget.multiRoot.error")}),(0,o.jsx)("div",{className:w.default.cmpRootList,role:"tree","aria-label":a("filesWidget.multiRoot.label"),children:e.manifest.roots.map((t,o)=>(0,n.createElement)(_,{...e,root:t,index:o,key:t.rootRef,rovingTabIndex:t.rootRef===p?0:-1,onRovingFocus:c}))})]});}var E=e.i(3402),S=e.i(92488),F=e.i(46666),T=e.i(36369);let W=(0,i.default)(()=>e.A(55249).then(e=>e.EditorWidget),{loadableGenerated:{modules:[26019]},ssr:!1});function A(e,t){let o=e[t];return"string"==typeof o?o:void 0;}function M(e,t){return`${e}-tab-${t}`;}function N(e,t){return`${e}-panel-${t}`;}function q(e){let{root:t,selected:i,focused:n,idPrefix:r,workspaceTrustUiAvailable:a,onSelect:l,onKeyDown:d}=e,s=(0,j.useWorkspaceTrust)(t.canonicalRoot);return(0,o.jsxs)("button",{type:"button",role:"tab",id:M(r,t.rootRef),className:T.default.cmpRootTab,"aria-selected":i,"aria-controls":N(r,t.rootRef),tabIndex:n?0:-1,onClick:l,onKeyDown:d,children:[(0,o.jsx)("span",{children:t.displayName}),a?(0,o.jsx)(k.WorkspaceTrustBadge,{status:s.status,issue:s.issue}):null]});}function K(e){var t,i;let{manifest:r,workspace:a,configuredRoot:l,cfg:s,buildBaseProps:c,updateCfg:u}=e,f=(0,d.useTranslate)(),p=A(s,"rootSessionsJson"),v=A(s,"layoutJson"),m=(0,n.useMemo)(()=>{let e,t;return e=(0,S.parseEditorRootSessions)(p,r),void 0===(t=r.roots.find(e=>e.canonicalRoot===l))||void 0===v||e.has(t.rootRef)?e:(0,S.parseEditorRootSessions)(JSON.stringify({schemaVersion:S.EDITOR_ROOT_SESSIONS_SCHEMA_VERSION,sessions:[...e.values(),{rootRef:t.rootRef,root:t.canonicalRoot,layoutJson:v}]}),r);},[l,v,r,p]),[h,g]=(0,n.useState)(m),R=(0,n.useRef)(h);R.current=h;let k=null!=(t=null!=(i=r.roots.find(e=>e.canonicalRoot===l))?i:r.roots.find(e=>e.rootRef===r.focusedRootRef))?t:r.roots[0],j=(0,n.useId)(),[y,w]=(0,n.useState)(k.rootRef),[C,I]=(0,n.useState)(k.rootRef);C!==k.rootRef&&(I(k.rootRef),w(k.rootRef));let b=(0,n.useRef)(k.rootRef),_=(0,n.useRef)(r),x=(0,n.useRef)(u);b.current=k.rootRef,_.current=r,x.current=u,(0,n.useEffect)(()=>g(m),[m]);let P=A(s,"file"),E=A(s,"root");(0,n.useEffect)(()=>{if(void 0===P||void 0===E)return;let e=_.current.roots.find(e=>e.canonicalRoot===E);if(void 0===e)return;let t=R.current.get(e.rootRef);if(void 0===t||void 0===v||t.layoutJson===v)return;let o=new Map(R.current);o.set(e.rootRef,{rootRef:e.rootRef,root:e.canonicalRoot,layoutJson:v}),R.current=o,g(o),x.current({rootSessionsJson:(0,S.serializeEditorRootSessions)(o,_.current,e.rootRef),file:void 0,openFiles:void 0,layoutJson:void 0});},[v,P,E]),(0,n.useEffect)(()=>{void 0===p&&0!==m.size&&x.current({rootSessionsJson:(0,S.serializeEditorRootSessions)(m,_.current,b.current)});},[m,p]);let K=(0,n.useCallback)((e,t)=>{if(void 0===t.layoutJson)return;let o=new Map(R.current);o.set(e.rootRef,{rootRef:e.rootRef,root:e.canonicalRoot,layoutJson:t.layoutJson}),R.current=o,g(o);let i=_.current;x.current({rootSessionsJson:(0,S.serializeEditorRootSessions)(o,i,e.rootRef),...(b.current===e.rootRef?{root:e.canonicalRoot,...t}:{})});},[]),H=(0,n.useMemo)(()=>new Map(r.roots.map(e=>[e.rootRef,t=>K(e,t)])),[r.roots,K]);return(0,o.jsxs)("section",{className:T.default.cmpHost,"aria-label":f("editor.multiRoot.label"),children:[(0,o.jsx)("div",{className:T.default.cmpRootTabs,role:"tablist","aria-label":f("editor.multiRoot.switcher"),children:r.roots.map(e=>(0,o.jsx)(q,{root:e,selected:e.rootRef===k.rootRef,focused:e.rootRef===(r.roots.some(e=>e.rootRef===y)?y:k.rootRef),idPrefix:j,workspaceTrustUiAvailable:!1!==c(e.canonicalRoot).workspaceTrustUiAvailable,onSelect:()=>{let t;return w(e.rootRef),t=R.current.get(e.rootRef),void(u({root:e.canonicalRoot,file:void 0,openFiles:void 0,layoutJson:null==t?void 0:t.layoutJson,rootSessionsJson:(0,S.serializeEditorRootSessions)(R.current,r,e.rootRef),revealLineStart:void 0,revealLineEnd:void 0,revealRequestId:void 0}),a.focusRoot(e.rootRef));},onKeyDown:t=>{var o,i;let n;return o=e.rootRef,void(void 0!==(n=function(e,t,o){if("ArrowLeft"!==o&&"ArrowRight"!==o&&"Home"!==o&&"End"!==o)return;let i=(0,F.rovingTabTargetFile)(e,t,o);return void 0===i?void 0:i;}(r.roots.map(e=>e.rootRef),o,t.key))&&(t.preventDefault(),w(n),null==(i=document.getElementById(M(j,n)))||i.focus()));}},e.rootRef))}),null===a.issue?null:(0,o.jsx)("p",{className:T.default.cmpIssue,role:"alert",children:f("editor.multiRoot.error")}),r.roots.map(e=>{var t;let i=e.rootRef===k.rootRef,a=c(e.canonicalRoot);return(0,o.jsx)("div",{className:T.default.cmpSession,role:"tabpanel",id:N(j,e.rootRef),"aria-labelledby":M(j,e.rootRef),hidden:!i,children:(0,o.jsx)(n.Activity,{mode:i?"visible":"hidden",children:(0,o.jsx)(W,{...a,...function(e,t,o){let i,n=t.get(e.rootRef);if(void 0!==n)return{layoutJson:n.layoutJson};if(A(o,"root")!==e.canonicalRoot)return{};let r=A(o,"file"),a=Array.isArray(i=o.openFiles)&&i.every(e=>"string"==typeof e)?i:void 0,l=A(o,"layoutJson");return{...(void 0===r?{}:{file:r}),...(void 0===a?{}:{openFiles:a}),...(void 0===l?{}:{layoutJson:l})};}(e,h,s),root:e.canonicalRoot,agentRootBinding:function(e,t){if(1!==e.roots.length)return{workspaceId:e.workspaceId,manifestRef:e.manifestRef,manifestRevision:e.revision,manifestDigest:e.manifestDigest,rootRef:t.rootRef,rootIdentityDigest:t.identityDigest};}(r,e),sessionActive:i,windowId:`${null!=(t=a.windowId)?t:"editor"}-${e.rootRef}`,onWorkspaceChange:H.get(e.rootRef)})})},e.rootRef);})]});}var H=e.i(81984),D=e.i(47708);let L=function(){let e=(0,d.useTranslate)();return(0,o.jsx)("div",{className:"lk-loading",children:e("common.loading")});},O=(0,i.default)(()=>e.A(33333).then(e=>e.ChatWindow),{loadableGenerated:{modules:[72117]},ssr:!1,loading:L}),J=(0,i.default)(()=>e.A(55249).then(e=>e.EditorWidget),{loadableGenerated:{modules:[26019]},ssr:!1,loading:L}),G=(0,i.default)(()=>e.A(34479).then(e=>e.FilesWidget),{loadableGenerated:{modules:[31798]},ssr:!1,loading:L});function U(e,t){let o=e[t];return"string"==typeof o?o:void 0;}function $(e,t,o){return null!==e.activeBinding&&t===e.activeBinding.activeRoot&&"available"!==o.pathReadAuthority?o.pathReadAuthority:null;}function B(e,t){let o=e[t];return"number"==typeof o&&Number.isFinite(o)?o:void 0;}function z(e){return`${e.kind}\u0000${e.id}`;}let V="Chat creation request failed.";class Y extends Error{constructor(e){super(V),(0,t._)(this,"correlationId",void 0),this.correlationId=e;}}function Q(e,t){return Error(`${e} Correlation ID: ${t}`);}function X(e){let t=null==e?void 0:e.trim();return void 0===t||0===t.length?void 0:t;}async function Z(e,t,o,i){let n=e.titleRevision,r=e.desiredTitle;if(void 0===r||t.title===r)return{kind:"settled",result:{chat:t,titleSaveFailed:!1}};try{let l=await(0,a.updateChat)(t.id,{title:r});if(!i())return{kind:"settled",result:{chat:void 0,titleSaveFailed:!1}};if(n!==e.titleRevision)return{kind:"retry",chat:l.chat};return o(l.chat),{kind:"settled",result:{chat:l.chat,titleSaveFailed:!1}};}catch{if(window.reportError(Q("Chat title update failed.",e.correlationId)),n!==e.titleRevision)return{kind:"retry",chat:t};return{kind:"settled",result:i()?{chat:t,titleSaveFailed:!0}:{chat:void 0,titleSaveFailed:!1}};}}async function ee(e,t,o){let i;try{i=await e.promise;}catch{throw new Y(e.correlationId);}if(void 0===i||!o())return{chat:void 0,titleSaveFailed:!1};for(;o();){let n=await Z(e,i,t,o);if("settled"===n.kind)return n.result;i=n.chat;}return{chat:void 0,titleSaveFailed:!1};}let et=new Map();function eo(e){let t=et.get(e);void 0!==t&&(window.clearTimeout(t),et.delete(e));}function ei(e){var t;e.sequence+=1,e.latestAttempt=e.sequence,e.attemptedRequestKey=void 0,null==(t=e.active)||t.coordinator.release(e.active.owner),e.active=null;}async function en(e,t){let o=await Promise.all(t.map(async e=>{try{return(await(0,f.sharedFetchChats)(e.path)).chats;}catch{window.reportError(Q("Chat project lookup failed.",(0,l.newClientCorrelationId)()));return;}})),i=o.flatMap(e=>null!=e?e:[]).find(t=>t.id===e&&"closed"!==t.status);return void 0!==i?{kind:"found",path:i.projectPath}:o.includes(void 0)?{kind:"failed"}:{kind:"missing"};}function er(e,t){return{chatId:e,configured:t,value:t};}function ea(){let e=(0,H.useEditorAgentTranslate)();return(0,o.jsxs)("div",{className:"lk-empty",children:[(0,o.jsx)("p",{className:"lk-empty-title",children:e("chat.restoration.notFoundTitle")}),(0,o.jsx)("p",{className:"lk-empty-body",children:e("chat.restoration.notFoundBody")})]});}function el(e){var t;let{activeProjectPath:i,ctx:r,targetLookupFailed:a,targetMissing:l,waiting:d}=e,s=(0,H.useEditorAgentTranslate)(),c=(0,n.useCallback)(e=>{var t,o;if(void 0===e.runId)return;let n={runId:e.runId},a=null!=(t=e.workflowId)?t:e.taskType;void 0!==a&&(n.workflow=a);let l=null!=(o=r.activeRoot)?o:i;void 0!==l&&(n.workspaceRoot=l),r.openWindow("agents",n);},[i,r]);return a?null:l?(0,o.jsx)(ea,{}):d?(0,o.jsx)("div",{className:"lk-loading",children:s("chat.restoration.opening")}):(0,o.jsx)(O,{windowId:r.windowId,suspended:!0===r.suspended,mini:!0===r.mini,minimalChat:!0===r.minimalChat,compact:!0===r.compact,controlsNarrow:!0===r.controlsNarrow,barCompact:!0===r.barCompact,workflowCompact:!0===r.workflowCompact,linkedRoot:null!=(t=r.activeRoot)?t:r.linkedRoot,linkedRoots:r.linkedRoots,openEditorFile:r.openEditorFile,previewWindows:{add:r.openWindow,focus:r.focusWindow,update:r.updateWindow},onOpenRunResult:c});}function ed(e){let{messageKey:t}=e,i=(0,H.useEditorAgentTranslate)();return null===t?null:(0,o.jsx)("p",{className:"lk-alert",role:"alert",children:i(t)});}function es(e){let{controls:t,lookupFailed:i}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ed,{messageKey:t.handoff.noticeKey}),(0,o.jsx)(ed,{messageKey:t.creating.errorKey}),(0,o.jsx)(ed,{messageKey:i?"chat.creation.openFailed":null})]});}function ec(e){var t,i,r,a,d,s,f;let p,m,h,g,R,k,j,y,w,C,{cfg:I,ctx:b,session:_}=e,x=(m="omit"===(f=I).projectPathPrivacy?"omit":void 0,{chatId:U(f,"chatId"),memoryEnabled:"boolean"==typeof(p=f.memoryEnabled)?p:void 0,newChatRequestId:U(f,"newChatRequestId"),projectPath:U(f,"projectPath"),projectPathPrivacy:m,selectionHandoffId:U(f,"selectionHandoffId"),title:U(f,"title")}),P=function(e){var t,o;let{chatId:i,selectionHandoffId:r,session:a}=e,l=(null==(t=a.activeChat)?void 0:t.status)==="closed"?void 0:a.activeChat,d=function(e){var t;let{chatId:o,chats:i,configuredProjectPath:r,loading:a,persistProjectPath:l,projects:d,updateCfg:s}=e,[c,u]=(0,n.useState)(()=>new Map()),f=i.find(e=>e.id===o&&"closed"!==e.status),p=void 0===o?void 0:c.get(o),v=(0,n.useCallback)((e,t)=>{u(o=>new Map(o).set(e,t));},[]);(0,n.useEffect)(()=>function(e){if(void 0!==e.chatId&&void 0===e.configuredProjectPath&&!e.loading&&!(void 0!==e.local&&void 0!==e.chatId&&((null==(t=e.lookup)?void 0:t.kind)==="found"&&e.lookup.path===e.local.projectPath||(e.setLookup(e.chatId,{kind:"found",path:e.local.projectPath}),e.persistProjectPath&&e.updateCfg({projectPath:e.local.projectPath}),1)))){var t,o={...e,chatId:e.chatId};if(void 0!==o.lookup)return;if(0===o.projects.length)return void o.setLookup(o.chatId,void 0===o.error?{kind:"missing"}:{kind:"failed"});let i=!0;return en(o.chatId,o.projects).then(e=>{i&&(o.setLookup(o.chatId,e),"found"===e.kind&&o.persistProjectPath&&o.updateCfg({projectPath:e.path}));}),()=>{i=!1;};}}({chatId:o,configuredProjectPath:r,error:e.error,loading:a,local:f,lookup:p,persistProjectPath:l,projects:d,setLookup:v,updateCfg:s}),[o,r,e.error,a,f,p,l,d,v,s]);let m=null!=(t=null!=r?r:null==f?void 0:f.projectPath)?t:(null==p?void 0:p.kind)==="found"?p.path:void 0;return{failed:(null==p?void 0:p.kind)==="failed",path:m,pending:void 0!==o&&void 0===m&&void 0===p};}({chatId:i,chats:a.chats,configuredProjectPath:e.configuredProjectPath,error:a.error,loading:a.loading,persistProjectPath:"omit"!==e.projectPathPrivacy,projects:a.projects,updateCfg:e.updateCfg}),s=function(e,t,o){let i=(0,n.useRef)(void 0),r=(0,n.useRef)(0),[a,l]=(0,n.useState)();return(0,n.useEffect)(()=>()=>{r.current+=1;},[]),(0,n.useEffect)(()=>{if(o.loading||void 0!==o.error||void 0!==t||void 0===e||i.current===e.path)return;i.current=e.path;let n=++r.current;l(e.path);let a=()=>{r.current===n&&l(void 0);};o.openProject(e).then(a,a);},[t,o,e]),(0,n.useEffect)(()=>{void 0===a&&(void 0===e||void 0!==o.error)&&(i.current=void 0);},[a,o.error,e]),void 0!==e&&void 0===o.error||void 0!==a;}(function(e,t){var o;if(void 0!==e&&(null==(o=t.activeProject)?void 0:o.path)!==e)return t.projects.find(t=>t.path===e);}(d.path,a),r,a),c=a.chats.some(e=>e.id===i&&"closed"!==e.status),u=d.failed||!s&&void 0!==a.error&&!c,{chats:f,loading:p,openChat:v}=a;(0,n.useEffect)(()=>{if(p||void 0!==r||void 0===i||(null==l?void 0:l.id)===i)return;let e=f.find(e=>e.id===i&&"closed"!==e.status);void 0!==e&&v(e);},[null==l?void 0:l.id,i,f,p,v,r]);let m=void 0===(o={activeTargetId:null==l?void 0:l.id,chatId:i,legacyProjectPending:d.pending,lookupFailed:u,liveTargetPresent:c,loading:a.loading,selectionHandoffId:r,switchingProject:s}).selectionHandoffId&&void 0!==o.chatId&&!o.loading&&!o.legacyProjectPending&&!o.lookupFailed&&o.activeTargetId!==o.chatId&&!o.switchingProject&&!o.liveTargetPresent;return{activeTarget:l,lookupFailed:u,resolvingLegacyProject:d.pending,switchingProject:s,targetMissing:m};}({chatId:x.chatId,configuredProjectPath:x.projectPath,projectPathPrivacy:x.projectPathPrivacy,selectionHandoffId:x.selectionHandoffId,session:_,updateCfg:b.updateCfg});!function(e,t,o,i){let{focusWindow:r,restoreWindow:a,updateCfg:l,windowId:d}=t,{chatId:s,newChatRequestId:c,projectPath:f,selectionHandoffId:p}=e;(0,u.usePublishChatWindowActivity)(d,i.sending,i.latestGrounded);let v=(0,n.useMemo)(()=>{if(void 0!==c||o.lookupFailed||o.targetMissing)return;let e=o.activeTarget;return void 0!==e&&e.id===s?{conversationId:e.id,projectPath:e.projectPath}:void 0===s||void 0===f?void 0:{conversationId:s,projectPath:f};},[s,c,f,o.activeTarget,o.lookupFailed,o.targetMissing]),m=(0,n.useCallback)(e=>{l({selectionHandoffId:e,newChatRequestId:void 0}),null==a||a(d),r(d);},[r,a,l,d]);(0,u.usePublishChatWindowRuntime)(d,v,m,void 0===p);}(x,b,P,_);let E=function(e){let{activeTarget:t,chatId:o,configuredMemoryEnabled:i,session:r,updateCfg:a}=e,l=(0,n.useRef)(er(o,i));(l.current.chatId!==o||l.current.configured!==i)&&(l.current=er(o,i));let d=(0,n.useCallback)(e=>{l.current={chatId:o,configured:l.current.configured,value:e},r.setMemoryEnabled(e),a({memoryEnabled:e});},[o,r,a]),s=(0,n.useMemo)(()=>({...r,setMemoryEnabled:d}),[r,d]),c=l.current.value,u=void 0!==o&&(null==t?void 0:t.id)===o&&void 0!==c&&r.memoryEnabled!==c;return(0,n.useEffect)(()=>{u&&void 0!==c&&r.setMemoryEnabled(c);},[u,c,r]),{hydrating:u,session:s};}({activeTarget:P.activeTarget,chatId:x.chatId,configuredMemoryEnabled:x.memoryEnabled,session:_,updateCfg:b.updateCfg}),S=(i=_.openNewChat,r=_.replaceChat,h=(0,n.useRef)(new Map()),g=(0,n.useCallback)(function(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>!0,a=null!=(c=null==t?void 0:t.path)?c:null,d=z(e),s=h.current.get(d);if(void 0===s){let r=i(t,o),c={correlationId:(0,l.newClientCorrelationId)(),desiredTitle:X(o),isOwnerCurrent:n,owner:e,projectPath:a,promise:r,reconciliation:null,titleRevision:0};s=c,h.current.set(d,c);}else s.isOwnerCurrent=n,s.owner=e,("window"===e.kind||void 0!==o)&&(s.desiredTitle=X(o),s.titleRevision+=1);var c,u=s;if(null!==u.reconciliation)return u.reconciliation;let f=ee(u,r,()=>u.isOwnerCurrent()).finally(()=>{u.reconciliation===f&&(u.reconciliation=null);});return u.reconciliation=f,f;},[i,r]),R=(0,n.useCallback)(e=>{var t;let o=z(e),i=h.current.get(o);void 0!==i&&(t=i.owner,t.kind===e.kind&&t.id===e.id)&&h.current.delete(o);},[]),k=(0,n.useMemo)(()=>({release:R,request:g}),[R,g]),j=function(e){let[t,o]=(0,n.useState)(null),[i,r]=(0,n.useState)(0),[a,l]=(0,n.useState)(null),d=(0,n.useRef)({attemptedAction:null,id:null,inFlight:!1}),{id:s,session:c}=e;return(0,n.useEffect)(()=>{if(void 0!==s)return eo(s),()=>{let e;eo(s),e=window.setTimeout(()=>{et.get(s)===e&&(et.delete(s),(0,D.discardEditorSelectionHandoff)(s));},0),et.set(s,e);};},[s]),(0,n.useEffect)(()=>{if(void 0===s||a===s)return;let e=(0,D.inspectEditorSelectionHandoff)(s);if(null===e)return;let t=Math.max(1,e.expiresAt-Date.now()+1),o=window.setTimeout(()=>r(e=>e+1),t);return()=>window.clearTimeout(o);},[s,a]),(0,n.useEffect)(()=>{var t;if(void 0===s||a===s)return;let i=(d.current.id!==s&&(d.current={attemptedAction:null,id:s,inFlight:!1}),d.current),n=function(e){var t,o,i,n,r,a;let l,{metadata:d,session:s}=e;if(null===d)return{kind:"fail",noticeKey:"editor.askSelection.openFailed"};if(s.loading||s.sending||e.routing)return{kind:"wait"};let c=d.workspaceRoot,u=s.projects.find(e=>e.path===c);if((null==u?void 0:u.available)!==!0||s.noEligibleModels)return{kind:"fail",noticeKey:"editor.askSelection.chatUnavailable"};let f=(null==(t=s.activeChat)?void 0:t.status)==="closed"?void 0:s.activeChat;if((null==(o=s.activeProject)?void 0:o.path)===c&&(null==f?void 0:f.projectPath)===c)return void 0===s.selectedModel?{kind:"fail",noticeKey:"editor.askSelection.chatUnavailable"}:{kind:"consume",chat:f,workspaceRoot:c};if((null==(i=s.activeProject)?void 0:i.path)!==c)return null===e.attemptedAction?{kind:"open-project",project:u}:{kind:"fail",noticeKey:"editor.askSelection.openFailed"};if(null!==e.attemptedAction&&"open-project"!==e.attemptedAction)return{kind:"fail",noticeKey:"editor.askSelection.openFailed"};let p=(n=s.chats,r=e.chatId,null!=(a=(l=n.filter(e=>e.projectPath===c&&"closed"!==e.status)).find(e=>e.id===r))?a:l[0]);return void 0===p?{kind:"create-chat",project:u}:{kind:"open-chat",chat:p};}({attemptedAction:i.attemptedAction,chatId:e.chatId,metadata:(0,D.inspectEditorSelectionHandoff)(s),routing:i.inFlight,session:c});if("wait"===n.kind)return;if("fail"===n.kind){(0,D.discardEditorSelectionHandoff)(s),e.ctx.updateCfg({selectionHandoffId:void 0}),e.coordinator.release({kind:"selection",id:s}),o(n.noticeKey),l(s);return;}if("consume"===n.kind){let t=(0,D.consumeEditorSelectionHandoff)(s,n.workspaceRoot);return null===t?void r(e=>e+1):(e.ctx.updateCfg({chatId:n.chat.id,title:n.chat.title,selectionHandoffId:void 0,newChatRequestId:void 0}),e.coordinator.release({kind:"selection",id:s}),e.ctx.focusWindow(e.ctx.windowId),o(null),l(s),void c.sendMessage({text:(0,D.composeEditorSelectionPrompt)(t)}).then(void 0,()=>o("editor.askSelection.openFailed")));}Object.assign(i,{attemptedAction:n.kind,inFlight:!0});let u=()=>{d.current.id===s&&(d.current.inFlight=!1),r(e=>e+1);};(t=t=>e.coordinator.request({kind:"selection",id:s},t),"open-project"===n.kind?c.openProject(n.project):"open-chat"===n.kind?c.openChat(n.chat):t(n.project)).then(u,u);},[e.chatId,e.coordinator,e.ctx,s,i,c,a]),{noticeKey:t,pending:void 0!==s&&a!==s};}({chatId:x.chatId,coordinator:k,ctx:b,id:x.selectionHandoffId,session:_}),y=void 0===x.projectPath?_.activeProject:_.projects.find(e=>e.path===x.projectPath),w=!_.loading&&void 0!==x.projectPath&&void 0===y,C=function(e){var t;let o,i,r,{activeProject:a,chatId:d,coordinator:s,loading:c,newChatRequestId:u,selectionHandoffId:f,title:p,updateCfg:v}=e,[m,h]=(0,n.useState)(null),g=void 0===d&&void 0===f,R=((o=(0,n.useRef)({identity:s,revision:0})).current.identity!==s&&(o.current={identity:s,revision:o.current.revision+1}),o.current.revision),k=g?null!=u?u:`initial-unbound-chat-${String(R)}`:void 0,j=null!=(t=null==a?void 0:a.path)?t:null,y=void 0===k?void 0:`${k}\u0000${null!=j?j:""}`,w=(0,n.useRef)({active:null,attemptedRequestKey:void 0,latestAttempt:0,sequence:0}),C=(0,n.useRef)(y);C.current=y;let I=(i=(0,n.useRef)(!0),r=(0,n.useRef)(null),(0,n.useEffect)(()=>{let e=w.current;return i.current=!0,null!==r.current&&window.clearTimeout(r.current),r.current=null,()=>{i.current=!1,r.current=window.setTimeout(()=>{ei(e),r.current=null;},0);};},[w]),i);return(0,n.useEffect)(()=>{var e;if(void 0===y)return void ei(w.current);if(c||w.current.attemptedRequestKey===y)return;let t=w.current.sequence+1,o={kind:"window",id:y};w.current.sequence=t,w.current.latestAttempt=t,w.current.attemptedRequestKey=y,w.current.active={coordinator:s,owner:o},h(null),(e={activeProject:a,coordinator:s,isCurrent:()=>I.current&&C.current===y&&w.current.latestAttempt===t,owner:o,requestKey:y,setError:h,title:p,updateCfg:v}).coordinator.request(e.owner,e.activeProject,e.title,e.isCurrent).then(t=>{e.isCurrent()&&(void 0===t.chat?e.setError({chatId:void 0,messageKey:"chat.creation.openFailed",requestId:e.requestKey}):(t.titleSaveFailed&&e.setError({chatId:t.chat.id,messageKey:"chat.creation.titleSaveFailed",requestId:e.requestKey}),e.updateCfg({chatId:t.chat.id,projectPath:t.chat.projectPath,title:t.chat.title,newChatRequestId:void 0})));},t=>{let o=t instanceof Y?t.correlationId:(0,l.newClientCorrelationId)();window.reportError(Q(V,o)),e.isCurrent()&&e.setError({chatId:void 0,messageKey:"chat.creation.openFailed",requestId:e.requestKey});}).finally(()=>{e.coordinator.release(e.owner);});},[a,s,c,I,y,p,v]),{errorKey:null===m||m.chatId!==d||void 0===d&&m.requestId!==y?null:m.messageKey,pending:g};}({activeProject:y,chatId:x.chatId,coordinator:k,loading:_.loading||w,newChatRequestId:x.newChatRequestId,selectionHandoffId:x.selectionHandoffId,title:x.title,updateCfg:b.updateCfg}),{configuredProjectMissing:w,creating:C,handoff:j}),F=P.lookupFailed||S.configuredProjectMissing;a={activeTarget:P.activeTarget,chatId:x.chatId,loading:_.loading,title:x.title,updateCfg:b.updateCfg},(0,n.useEffect)(()=>{let{activeTarget:e,chatId:t,loading:o,title:i,updateCfg:n}=a;o||void 0===t||(null==e?void 0:e.id)!==t||e.title===i||n(void 0===X(i)?{title:e.title}:{title:e.title,[v.CHAT_TITLE_IS_DEFAULT_CFG_KEY]:!1});},[a]);let T=(d={chatId:x.chatId,controls:S,memoryHydrating:E.hydrating,routing:P,sessionLoading:_.loading}).sessionLoading||d.controls.handoff.pending||!d.controls.configuredProjectMissing&&d.controls.creating.pending||d.routing.switchingProject||d.routing.resolvingLegacyProject||d.memoryHydrating||void 0!==d.chatId&&(null==(s=d.routing.activeTarget)?void 0:s.id)!==d.chatId;return(0,o.jsxs)(c.ChatSessionProvider,{value:E.session,children:[(0,o.jsx)(es,{controls:S,lookupFailed:F}),(0,o.jsx)(el,{activeProjectPath:null==(t=_.activeProject)?void 0:t.path,ctx:b,targetLookupFailed:F,targetMissing:P.targetMissing,waiting:T})]});}function eu(e,t){var o;return U(e,"root")===t?{...(void 0===B(o=e,"revealLineStart")?{}:{revealLineStart:B(o,"revealLineStart")}),...(void 0===B(o,"revealLineEnd")?{}:{revealLineEnd:B(o,"revealLineEnd")}),...(void 0===U(o,"revealRequestId")?{}:{revealRequestId:U(o,"revealRequestId")})}:{};}function ef(e,t,o){let i=U(t,"file");return{linkedRoot:o.linkedRoot,linkedFilePath:o.linkedFilePath,linkedCapsuleIds:o.linkedCapsuleIds,linkedCapsuleSetIds:o.linkedCapsuleSetIds,workspaceTrustUiAvailable:null===o.activeBinding||e!==o.activeBinding.activeRoot,windowId:o.windowId,openEditorFile:o.openEditorFile,onOpenGitCommit:(e,t)=>{let i=(0,E.gitObjectId)(t);void 0!==i&&o.openWindow("governedGit",{projectPath:e,commit:i});},onOpenGitDiff:(e,t)=>{o.openWindow("governedGit",{projectPath:e,path:t});},onOpenProblems:e=>{o.openWindow("problems",{projectPath:e});},onOpenWorkspaceTrust:()=>{o.openWindow("workspaceTrust");},onOpenDebugPanel:()=>{void 0!==e&&o.openWindow("debug",{projectPath:e,...(void 0===i?{}:{activeFile:i})});},onAskSelection:t=>function(e,t,o){var i,n;if(void 0===e)return!1;let r=(0,D.registerEditorSelectionHandoff)(e,t);if(null===r)return!1;let a=()=>o.openWindow("chat",{projectPathPrivacy:"omit",selectionHandoffId:r}),l=()=>{(0,D.discardEditorSelectionHandoff)(r),(0,s.reportClientDiagnostic)("[keiko] queued editor selection handoff could not be restored after chat closure");};return null!==(0,u.routeSelectionHandoffToOpenChat)(e,r,null!=(i=null==(n=o.currentWindowStack)?void 0:n.call(o))?i:[],a,l)||null!==a()||(l(),!1);}(e,t,o)};}e.s(["ChatWindowSessionHost",0,function(e){let{cfg:t,ctx:i}=e,n=(0,f.useChatSession)({autoCreate:!1});return(0,o.jsx)(ec,{cfg:t,ctx:i,session:n});},"EditorWindowSessionHost",0,function(e){var t;let i,{cfg:a,ctx:l,root:d}=e,s=U(a,"root"),c=(0,p.useWorkspaceManifest)(null!=d?d:s),u=U(a,"file"),f=function(e,t){let o=e[t];if(!Array.isArray(o))return;let i=o.filter(e=>"string"==typeof e&&e.trim().length>0).map(e=>e.trim());return i.length>0?i:void 0;}(a,"openFiles"),v=U(a,"layoutJson");t=c.manifest,i=(0,n.useRef)(t),(0,n.useEffect)(()=>{if(null===t)return;let e=i.current;if(i.current=t,(null==e?void 0:e.workspaceId)!==t.workspaceId)return;let o=new Set(t.roots.map(e=>e.rootRef));for(let t of e.roots)o.has(t.rootRef)||(0,r.disposeEditorModelRegistryRoot)(t.canonicalRoot,"root-disposed",!0);},[t]),function(e){let{configuredRoot:t,effectiveRoot:o,manifest:i}=e,r=(0,n.useRef)(e.updateCfg);r.current=e.updateCfg,(0,n.useEffect)(()=>{var e;if(null===i||void 0===t||o!==t||i.roots.some(e=>e.canonicalRoot===t))return;let n=null!=(e=i.roots.find(e=>e.rootRef===i.focusedRootRef))?e:i.roots[0];void 0!==n&&r.current({root:n.canonicalRoot,file:void 0,openFiles:void 0,layoutJson:void 0,revealLineStart:void 0,revealLineEnd:void 0,revealRequestId:void 0});},[t,o,i]);}({configuredRoot:s,effectiveRoot:d,manifest:c.manifest,updateCfg:l.updateCfg});let m=$(l,null!=d?d:s,c),h=(0,n.useCallback)(e=>({...ef(e,a,l),...eu(a,e)}),[a,l]);if(null!==m)return(0,o.jsx)(R,{access:m,onRetry:()=>void c.refresh()});if(null!==c.manifest&&c.manifest.roots.length>1)return(0,o.jsx)(K,{manifest:c.manifest,workspace:c,configuredRoot:s,cfg:a,buildBaseProps:h,updateCfg:l.updateCfg});let g={...ef(d,a,l),...eu(a,d),...(void 0===d?{}:{root:d}),...(void 0===u?{}:{file:u}),...(void 0===f?{}:{openFiles:f}),...(void 0===v?{}:{layoutJson:v}),onWorkspaceChange:e=>{var t,o,i;let n;return t=l,o=s,n=void 0!==(i=e).root&&i.root!==o,void t.updateCfg({root:i.root,file:i.file,openFiles:i.openFiles,layoutJson:i.layoutJson,...(n?{revealLineStart:void 0,revealLineEnd:void 0,revealRequestId:void 0}:{})});}};return(0,o.jsx)(J,{...g},null!=d?d:"unbound");},"FilesWindowSessionHost",0,function(e){let{cfg:t,ctx:i,root:n}=e,r=(0,d.useTranslate)(),a=(0,p.useWorkspaceManifest)(n),l=$(i,n,a);if(null!==l)return(0,o.jsx)(R,{access:l,onRetry:()=>void a.refresh()});let s=(e,t,o)=>{i.updateCfg({activeFilePath:null!=e?e:void 0,resolvedRoot:null!=t?t:void 0,...(void 0===o?{}:{activeDirectoryPath:null!=o?o:void 0})});},c=e=>{i.openWindow("governedGit",{projectPath:e});};return null!==a.manifest&&a.manifest.roots.length>1?(0,o.jsx)(P,{manifest:a.manifest,workspace:a,onActiveFileChange:s,onOpenFile:(e,t)=>{i.openEditorFile({root:e,path:t});},onOpenGitDelivery:c}):(0,o.jsxs)(o.Fragment,{children:["mutation"===a.issue?(0,o.jsx)("p",{className:"files-error",role:"alert",children:r("filesWidget.multiRoot.error")}):null,(0,o.jsx)(G,{...(void 0===n?{}:{root:n}),onActiveFileChange:s,...(void 0===n?{onRootChange:e=>{i.updateCfg({root:e,activeFilePath:void 0,activeDirectoryPath:void 0,resolvedRoot:void 0});}}:{}),onOpenFile:(e,t)=>i.openWindow("editor",{root:e,file:t,openFiles:[t]}),onOpenGitDelivery:c})]});},"normalizedChatTitle",0,X],84825);},60174,e=>{e.n(e.i(84825));}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17754,e=>{"use strict";e.s(["_",0,function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;}]);},57269,e=>{"use strict";e.s(["deepFreeze",0,function(e){return!function e(t,r){if("object"==typeof t&&null!==t&&!r.has(t))for(let n of(r.add(t),Object.freeze(t),Reflect.ownKeys(t))){let o=Object.getOwnPropertyDescriptor(t,n);void 0!==o&&"value"in o&&e(o.value,r);}}(e,new WeakSet()),e;}]);},75297,e=>{"use strict";function t(){let e=globalThis.crypto;if(void 0===e)throw TypeError("secure browser randomness is unavailable");return e;}e.s(["secureRandomId",0,function(e){let r=t();return"function"==typeof r.randomUUID?r.randomUUID():`${e}-${function(e){if("function"!=typeof e.getRandomValues)throw TypeError("secure browser randomness is unavailable");let t=new Uint8Array(16);return e.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join("");}(r)}`;},"secureRandomInt",0,function(e){let r;if(!Number.isSafeInteger(e)||e<=0||e>0x100000000)throw RangeError("maxExclusive must be an integer between 1 and 2^32");let n=t();if("function"!=typeof n.getRandomValues)throw TypeError("secure browser randomness is unavailable");let o=Math.floor(0x100000000/e)*e,i=new Uint32Array(1);do{var a;n.getRandomValues(i),r=null!=(a=i[0])?a:0;}while(r>=o);return r%e;}]);},70045,e=>{"use strict";var t=e.i(76055),r=e.i(75297);let n="X-Keiko-Correlation-Id";function o(){return(0,r.secureRandomId)("ui");}async function i(e,r,i){var a,u,s,l,c;let d,f,m,p=o(),g=await fetch(e,{...r,headers:(f="GET"!==(d=(null!=(c=null==r?void 0:r.method)?c:"GET").toUpperCase())&&"HEAD"!==d,m=(null==r?void 0:r.body)!==void 0&&null!==r.body,{Accept:"application/json",[n]:p,...(f||m?{"Content-Type":"application/json"}:{}),...(f?{"X-Keiko-CSRF":"1"}:{}),...(null==r?void 0:r.headers)})});if(!g.ok){let e,r="INTERNAL",o=(null!=(a=null==i?void 0:i.parseFailureMessage)?a:function(e){return`HTTP ${e.toString()}`;})(g.status);try{let t=await g.json();e=t,r=t.error.code,o=t.error.message;}catch{}let l=new t.ApiError(r,o,g.status),c=null==e?void 0:e.error.correlationId;throw l.correlationId=null!=(u=g.headers.get(n))?u:"string"==typeof c?c:p,null==i||null==(s=i.enrichError)||s.call(i,l,e),l;}if(204===g.status)return;let h=await g.json();if((null==i?void 0:i.validator)===void 0)return h;try{return i.validator(e,h);}catch(e){throw e instanceof t.ApiError&&void 0===e.correlationId&&(e.correlationId=null!=(l=g.headers.get(n))?l:p),e;}}e.s(["CORRELATION_HEADER",0,n,"bffFetchJson",0,i,"newClientCorrelationId",0,o]);},83449,e=>{"use strict";function t(e,t){return void 0===t?e.toFixed(1):new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e);}e.s(["costClassLabel",0,function(e){switch(e){case"low":return"Low cost";case"medium":return"Medium cost";case"high":return"High cost";case"unknown":return"Unknown cost";}},"formatBytes",0,function(e,r){return!Number.isFinite(e)||e<=0?"0 B":e<1024?`${e.toString()} B`:e<1048576?`${t(e/1024,r)} KB`:e<0x40000000?`${t(e/1048576,r)} MB`:`${t(e/0x40000000,r)} GB`;},"formatBytesPrecise",0,function(e){var t;if(!Number.isFinite(e)||e<=0)return"0 B";let r=["B","KB","MB","GB"],n=e,o=0;for(;n>=1024&&o<r.length-1;)n/=1024,o+=1;let i=(t=n,0===o?t.toFixed(0):t>=10?t.toFixed(1):t.toFixed(2));return`${i} ${r[o]}`;},"formatDate",0,function(e){try{return new Date(e).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});}catch{return"string"==typeof e?e:e.toString();}},"formatDurationCompact",0,function(e){if(!Number.isFinite(e)||e<=0)return"0s";let t=Math.round(e/1e3),r=Math.floor(t/60),n=t%60;return 0===r?`${n.toString()}s`:`${r.toString()}m ${n.toString().padStart(2,"0")}s`;},"formatMs",0,function(e){if(e<1e3)return`${e.toString()} ms`;if(e<6e4)return`${(e/1e3).toFixed(1)} s`;let t=Math.floor(e/6e4),r=Math.floor(e%6e4/1e3);return`${t.toString()}m ${r.toString()}s`;},"formatTokens",0,function(e){return e<1e3?e.toString():`${(e/1e3).toFixed(1)}k`;},"outcomeLabel",0,function(e){switch(e){case"fix-applied":return"Fix applied";case"fix-proposed":return"Fix proposed (dry-run)";case"investigation-only":return"Investigation only";case"limit-exceeded":return"Limit exceeded";case"dry-run":return"Dry-run";default:return e.charAt(0).toUpperCase()+e.slice(1);}},"runStatusLabel",0,function(e){var t;return null!=(t={running:"Running",completed:"Completed","dry-run":"Dry run",rejected:"Rejected",cancelled:"Cancelled",failed:"Failed","fix-applied":"Fix applied","fix-proposed":"Fix proposed","investigation-only":"Investigation only"}[e])?t:e;},"toSafeIsoString",0,function(e){let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t.toISOString();}]);},41077,e=>{e.v(t=>Promise.all(["static/chunks/1xfdw53h1onrd.js"].map(t=>e.l(t))).then(()=>t(2325)));},14579,e=>{e.v(t=>Promise.all(["static/chunks/095_1x06nz6zj.js"].map(t=>e.l(t))).then(()=>t(97633)));},67349,e=>{e.v(t=>Promise.all(["static/chunks/3k1qups9-2-7-.js"].map(t=>e.l(t))).then(()=>t(97756)));}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17754,e=>{"use strict";e.s(["_",0,function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;}]);},57269,e=>{"use strict";e.s(["deepFreeze",0,function(e){return!function e(t,r){if("object"==typeof t&&null!==t&&!r.has(t))for(let n of(r.add(t),Object.freeze(t),Reflect.ownKeys(t))){let o=Object.getOwnPropertyDescriptor(t,n);void 0!==o&&"value"in o&&e(o.value,r);}}(e,new WeakSet()),e;}]);},75297,e=>{"use strict";function t(){let e=globalThis.crypto;if(void 0===e)throw TypeError("secure browser randomness is unavailable");return e;}e.s(["secureRandomId",0,function(e){let r=t();return"function"==typeof r.randomUUID?r.randomUUID():`${e}-${function(e){if("function"!=typeof e.getRandomValues)throw TypeError("secure browser randomness is unavailable");let t=new Uint8Array(16);return e.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join("");}(r)}`;},"secureRandomInt",0,function(e){let r;if(!Number.isSafeInteger(e)||e<=0||e>0x100000000)throw RangeError("maxExclusive must be an integer between 1 and 2^32");let n=t();if("function"!=typeof n.getRandomValues)throw TypeError("secure browser randomness is unavailable");let o=Math.floor(0x100000000/e)*e,i=new Uint32Array(1);do{var a;n.getRandomValues(i),r=null!=(a=i[0])?a:0;}while(r>=o);return r%e;}]);},70045,e=>{"use strict";var t=e.i(76055),r=e.i(75297);let n="X-Keiko-Correlation-Id";function o(){return(0,r.secureRandomId)("ui");}async function i(e,r,i){var a,u,s,l,c;let d,f,m,p=o(),g=await fetch(e,{...r,headers:(f="GET"!==(d=(null!=(c=null==r?void 0:r.method)?c:"GET").toUpperCase())&&"HEAD"!==d,m=(null==r?void 0:r.body)!==void 0&&null!==r.body,{Accept:"application/json",[n]:p,...(f||m?{"Content-Type":"application/json"}:{}),...(f?{"X-Keiko-CSRF":"1"}:{}),...(null==r?void 0:r.headers)})});if(!g.ok){let e,r="INTERNAL",o=(null!=(a=null==i?void 0:i.parseFailureMessage)?a:function(e){return`HTTP ${e.toString()}`;})(g.status);try{let t=await g.json();e=t,r=t.error.code,o=t.error.message;}catch{}let l=new t.ApiError(r,o,g.status),c=null==e?void 0:e.error.correlationId;throw l.correlationId=null!=(u=g.headers.get(n))?u:"string"==typeof c?c:p,null==i||null==(s=i.enrichError)||s.call(i,l,e),l;}if(204===g.status)return;let h=await g.json();if((null==i?void 0:i.validator)===void 0)return h;try{return i.validator(e,h);}catch(e){throw e instanceof t.ApiError&&void 0===e.correlationId&&(e.correlationId=null!=(l=g.headers.get(n))?l:p),e;}}e.s(["CORRELATION_HEADER",0,n,"bffFetchJson",0,i,"newClientCorrelationId",0,o]);},83449,e=>{"use strict";function t(e,t){return void 0===t?e.toFixed(1):new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e);}e.s(["costClassLabel",0,function(e){switch(e){case"low":return"Low cost";case"medium":return"Medium cost";case"high":return"High cost";case"unknown":return"Unknown cost";}},"formatBytes",0,function(e,r){return!Number.isFinite(e)||e<=0?"0 B":e<1024?`${e.toString()} B`:e<1048576?`${t(e/1024,r)} KB`:e<0x40000000?`${t(e/1048576,r)} MB`:`${t(e/0x40000000,r)} GB`;},"formatBytesPrecise",0,function(e){var t;if(!Number.isFinite(e)||e<=0)return"0 B";let r=["B","KB","MB","GB"],n=e,o=0;for(;n>=1024&&o<r.length-1;)n/=1024,o+=1;let i=(t=n,0===o?t.toFixed(0):t>=10?t.toFixed(1):t.toFixed(2));return`${i} ${r[o]}`;},"formatDate",0,function(e){try{return new Date(e).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});}catch{return"string"==typeof e?e:e.toString();}},"formatDurationCompact",0,function(e){if(!Number.isFinite(e)||e<=0)return"0s";let t=Math.round(e/1e3),r=Math.floor(t/60),n=t%60;return 0===r?`${n.toString()}s`:`${r.toString()}m ${n.toString().padStart(2,"0")}s`;},"formatMs",0,function(e){if(e<1e3)return`${e.toString()} ms`;if(e<6e4)return`${(e/1e3).toFixed(1)} s`;let t=Math.floor(e/6e4),r=Math.floor(e%6e4/1e3);return`${t.toString()}m ${r.toString()}s`;},"formatTokens",0,function(e){return e<1e3?e.toString():`${(e/1e3).toFixed(1)}k`;},"outcomeLabel",0,function(e){switch(e){case"fix-applied":return"Fix applied";case"fix-proposed":return"Fix proposed (dry-run)";case"investigation-only":return"Investigation only";case"limit-exceeded":return"Limit exceeded";case"dry-run":return"Dry-run";default:return e.charAt(0).toUpperCase()+e.slice(1);}},"runStatusLabel",0,function(e){var t;return null!=(t={running:"Running",completed:"Completed","dry-run":"Dry run",rejected:"Rejected",cancelled:"Cancelled",failed:"Failed","fix-applied":"Fix applied","fix-proposed":"Fix proposed","investigation-only":"Investigation only"}[e])?t:e;},"toSafeIsoString",0,function(e){let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t.toISOString();}]);},41077,e=>{e.v(t=>Promise.all(["static/chunks/2sji-23jqwpol.js"].map(t=>e.l(t))).then(()=>t(2325)));},14579,e=>{e.v(t=>Promise.all(["static/chunks/095_1x06nz6zj.js"].map(t=>e.l(t))).then(()=>t(97633)));},67349,e=>{e.v(t=>Promise.all(["static/chunks/3k1qups9-2-7-.js"].map(t=>e.l(t))).then(()=>t(97756)));}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,60865,e=>{"use strict";e.s(["NATIVE_BLOCK_STYLE",0,{display:"block"},"NATIVE_FIELDSET_RESET_STYLE",0,{margin:0,minWidth:0,padding:0,border:0},"NATIVE_FIELDSET_STYLE",0,{margin:0,minWidth:0},"NATIVE_HEADING_STYLE",0,{margin:0,fontWeight:"inherit"},"NATIVE_LIST_KEEP_PADDING_STYLE",0,{listStyle:"none",margin:0},"NATIVE_LIST_STYLE",0,{listStyle:"none",margin:0,padding:0}]);},83449,e=>{"use strict";function n(e,n){return void 0===n?e.toFixed(1):new Intl.NumberFormat(n,{maximumFractionDigits:1}).format(e);}e.s(["costClassLabel",0,function(e){switch(e){case"low":return"Low cost";case"medium":return"Medium cost";case"high":return"High cost";case"unknown":return"Unknown cost";}},"formatBytes",0,function(e,t){return!Number.isFinite(e)||e<=0?"0 B":e<1024?`${e.toString()} B`:e<1048576?`${n(e/1024,t)} KB`:e<0x40000000?`${n(e/1048576,t)} MB`:`${n(e/0x40000000,t)} GB`;},"formatBytesPrecise",0,function(e){var n;if(!Number.isFinite(e)||e<=0)return"0 B";let t=["B","KB","MB","GB"],r=e,a=0;for(;r>=1024&&a<t.length-1;)r/=1024,a+=1;let i=(n=r,0===a?n.toFixed(0):n>=10?n.toFixed(1):n.toFixed(2));return`${i} ${t[a]}`;},"formatDate",0,function(e){try{return new Date(e).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});}catch{return"string"==typeof e?e:e.toString();}},"formatDurationCompact",0,function(e){if(!Number.isFinite(e)||e<=0)return"0s";let n=Math.round(e/1e3),t=Math.floor(n/60),r=n%60;return 0===t?`${r.toString()}s`:`${t.toString()}m ${r.toString().padStart(2,"0")}s`;},"formatMs",0,function(e){if(e<1e3)return`${e.toString()} ms`;if(e<6e4)return`${(e/1e3).toFixed(1)} s`;let n=Math.floor(e/6e4),t=Math.floor(e%6e4/1e3);return`${n.toString()}m ${t.toString()}s`;},"formatTokens",0,function(e){return e<1e3?e.toString():`${(e/1e3).toFixed(1)}k`;},"outcomeLabel",0,function(e){switch(e){case"fix-applied":return"Fix applied";case"fix-proposed":return"Fix proposed (dry-run)";case"investigation-only":return"Investigation only";case"limit-exceeded":return"Limit exceeded";case"dry-run":return"Dry-run";default:return e.charAt(0).toUpperCase()+e.slice(1);}},"runStatusLabel",0,function(e){var n;return null!=(n={running:"Running",completed:"Completed","dry-run":"Dry run",rejected:"Rejected",cancelled:"Cancelled",failed:"Failed","fix-applied":"Fix applied","fix-proposed":"Fix proposed","investigation-only":"Investigation only"}[e])?n:e;},"toSafeIsoString",0,function(e){let n=new Date(e);return Number.isNaN(n.getTime())?void 0:n.toISOString();}]);},67914,e=>{"use strict";var n=e.i(10582),t=e.i(87032),r=e.i(5353),a=e.i(50850);function i(e){return e.findIndex(e=>!0!==e.disabled);}function s(e,n,t){if(0===e.length)return-1;for(let a of e.keys()){var r;let i=(n+(a+1)*t+e.length)%e.length;if((null==(r=e[i])?void 0:r.disabled)!==!0)return i;}return-1;}function l(e){let{active:a,index:i,onCommit:s,onOptionKeyDown:l,option:o,selected:c,setOptionRef:d}=e,u=(0,t.useRef)(null),p=(0,t.useRef)(null),h=(0,t.useRef)(null),[m,f]=(0,t.useState)(null),g=()=>{null!==h.current&&(clearTimeout(h.current),h.current=null),f(null);},x=()=>{null!==h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{let e=p.current,n=u.current;if(null===e||null===n||e.scrollWidth<=e.clientWidth)return;let t=n.getBoundingClientRect(),r=Math.min(520,window.innerWidth-32),a=t.right+8+r<=window.innerWidth-16?"top-left":"top-right";f({left:"top-left"===a?t.right+8:t.left-8,placement:a,top:t.top-6});},1500);};return(0,t.useEffect)(()=>g,[]),(0,n.jsxs)("button",{ref:e=>{u.current=e,d(i,e);},"aria-selected":c,className:`ksel-option${a?" ksel-option-active":""}`,"data-disabled":!0===o.disabled?"true":void 0,disabled:o.disabled,onBlur:g,onClick:()=>s(o),onFocus:x,onKeyDown:e=>l(e,i),onPointerEnter:x,onPointerLeave:g,role:"option",type:"button",children:[(0,n.jsxs)("span",{className:"ksel-option-copy",children:[(0,n.jsx)("span",{className:"ksel-option-label",ref:p,children:o.label}),void 0!==o.description?(0,n.jsx)("span",{className:"ksel-option-desc",children:o.description}):null]}),void 0!==o.badge?(0,n.jsx)("span",{className:"ksel-option-badge",children:o.badge}):null,null!==m?(0,r.createPortal)((0,n.jsx)("div",{className:"ksel-overflow-tooltip","data-placement":m.placement,role:"tooltip",style:{left:`${m.left.toString()}px`,top:`${m.top.toString()}px`},children:o.label}),document.body):null]});}function o(e){let{activeIndex:t,flatOptions:r,menuId:a,onCommit:i,onOptionKeyDown:s,section:o,sectionIndex:c,selectedIndex:d,setOptionRef:u}=e,p=void 0!==o.label?`${a}-section-${c.toString()}`:void 0;return(0,n.jsxs)("div",{className:"ksel-section",role:void 0!==o.label?"group":"presentation","aria-labelledby":p,children:[void 0!==o.label?(0,n.jsx)("div",{className:"ksel-section-label",id:p,children:o.label}):null,o.options.map(e=>{var a;let c=r.findIndex(n=>n.value===e.value&&n.sectionLabel===o.label),p=r[c];return void 0===p?null:(0,n.jsx)(l,{active:c===t,index:c,onCommit:i,onOptionKeyDown:s,option:p,selected:c===d,setOptionRef:u},`${null!=(a=o.label)?a:"section"}-${e.value}`);})]});}function c(e){var t;let{activeIndex:a,ariaLabel:i,flatOptions:s,menuClassName:l,menuCountLabel:c,menuId:d,menuLabel:u,menuRef:p,menuTitle:h,onCommit:m,onOptionKeyDown:f,placeholder:g,position:x,selectedIndex:j,sections:y,setOptionRef:v,showMenuHeader:b}=e;return(0,r.createPortal)((0,n.jsxs)("div",{ref:p,className:["ksel-menu",x.attached?"ksel-menu-attached":"",x.openUp?"ksel-menu-open-up":"ksel-menu-open-down",null!=l?l:""].filter(e=>e.length>0).join(" "),style:{left:`${x.left.toString()}px`,top:`${x.top.toString()}px`,width:`${x.width.toString()}px`,"--ksel-option-height":`${x.optionHeight.toString()}px`,fontFamily:x.fontFamily,fontSize:x.fontSize,fontWeight:x.fontWeight,letterSpacing:x.letterSpacing,lineHeight:x.lineHeight},children:[b?(0,n.jsxs)("div",{className:"ksel-menu-head",children:[(0,n.jsx)("div",{className:"ksel-menu-title",children:null!=(t=null!=h?h:i)?t:g}),(0,n.jsx)("div",{className:"ksel-menu-note",children:null!=c?c:`${s.length.toString()} options`})]}):null,(0,n.jsx)("div",{className:"ksel-menu-scroll",role:"listbox",id:d,"aria-label":u,style:{maxHeight:`${x.maxHeight.toString()}px`},children:y.map((e,t)=>{var r;return(0,n.jsx)(o,{activeIndex:a,flatOptions:s,menuId:d,onCommit:m,onOptionKeyDown:f,section:e,sectionIndex:t,selectedIndex:j,setOptionRef:v},`${null!=(r=e.label)?r:"section"}-${t.toString()}`);})})]}),document.body);}e.s(["default",0,function(e){var r,l,o,d,u,p;let{value:h,sections:m,onValueChange:f,onOpen:g,disabled:x=!1,placeholder:j,ariaLabel:y,ariaDescribedBy:v,ariaLabelledBy:b,triggerClassName:E,menuClassName:N,menuTitle:k,menuCountLabel:w,showMenuHeader:S=!0,leadingVisual:C,mono:I=!1,showChevron:T=!0,menuMinWidth:L,attached:$=!0,triggerStyle:W,autoFocus:F=!1}=e,R=(0,a.useTranslate)(),M=(0,t.useRef)(null),D=(0,t.useRef)(null),P=(0,t.useRef)([]),z=(0,t.useId)(),[A,B]=(0,t.useState)(!1),[_,H]=(0,t.useState)(-1),[q,O]=(0,t.useState)(null),[K,U]=(0,t.useState)(!1),V=(0,t.useMemo)(()=>m.flatMap((e,n)=>e.options.map((t,r)=>{var a;return{...t,key:`${null!=(a=e.label)?a:"section"}-${n.toString()}-${t.value}-${r.toString()}`,sectionLabel:e.label};})),[m]),Y=V.findIndex(e=>e.value===h),G=-1===Y?null:V[Y],J=null!=j?j:R("select.placeholder"),Q=null!=(r=null==G?void 0:G.label)?r:J,X=null!=(l=null==G?void 0:G.description)?l:null,Z=null!=(o=null!=k?k:y)?o:J,ee=()=>{B(!1),H(-1);},en=e=>{var n,t;if(x||0===V.length)return;let r=void 0!==e&&(null==(n=V[e])?void 0:n.disabled)!==!0?e:Y>=0&&(null==(t=V[Y])?void 0:t.disabled)!==!0?Y:i(V);B(!0),H(r),null==g||g();};function et(e){var n;e.disabled||(f(e.value),ee(),null==(n=M.current)||n.focus());}(0,t.useEffect)(()=>{if(!A)return;let e=e=>{let n=e.target;null!==M.current&&n instanceof Node&&M.current.contains(n)||null!==D.current&&n instanceof Node&&D.current.contains(n)||ee();},n=()=>ee();return window.addEventListener("pointerdown",e,!0),window.addEventListener("blur",n),()=>{window.removeEventListener("pointerdown",e,!0),window.removeEventListener("blur",n);};},[A]),(0,t.useLayoutEffect)(()=>{if(!A||null===M.current)return;let e=()=>{var e;let n=null==(e=M.current)?void 0:e.getBoundingClientRect();if(void 0===n)return;let t=Math.min(void 0!==L&&n.width<Math.min(L,96)?L:n.width,window.innerWidth-32),r=$&&1>Math.abs(t-n.width),a=r?-1:6,i=window.innerHeight-n.bottom-16,s=n.top-16,l=i<Math.max(96,2*n.height)&&s>i;U(l);let o=l?s:i,c=50*!!S+2,d=Math.max(n.height,Math.min(Math.max(n.height,o-c),380)),u=d+c,p=window.getComputedStyle(M.current);O({left:Math.min(Math.max(16,n.left),window.innerWidth-t-16),width:t,top:l?Math.max(16,n.top-u-a):Math.min(n.bottom+a,window.innerHeight-16-u),optionHeight:Math.max(28,Math.min(n.height,30)),maxHeight:d,openUp:l,attached:r,fontFamily:p.fontFamily,fontSize:p.fontSize,fontWeight:p.fontWeight,letterSpacing:p.letterSpacing,lineHeight:p.lineHeight});};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0);};},[A,$,L,S]),(0,t.useLayoutEffect)(()=>{if(!A||null===q||!q.openUp||null===M.current||null===D.current)return;let e=M.current.getBoundingClientRect(),n=D.current.getBoundingClientRect();if(n.height<=0)return;let t=q.attached?-1:6,r=Math.max(16,e.top-n.height-t);.5>Math.abs(r-q.top)||O(e=>null===e?e:{...e,top:r});},[A,q]),(0,t.useEffect)(()=>{var e,n;A&&!(_<0)&&(null==(e=P.current[_])||e.focus(),null==(n=P.current[_])||n.scrollIntoView({block:"nearest"}));},[A,_]),(0,t.useEffect)(()=>{if(!A)return;let e=e=>{var n,t;if("Escape"===e.key){ee(),null==(n=M.current)||n.focus();return;}if(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if((t=e.target)instanceof HTMLElement&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable))return;let n=function(e,n,t){for(let r=1;r<=e.length;r+=1){let a=(n+r)%e.length,i=e[a];if(void 0!==i&&!0!==i.disabled&&i.label.toLowerCase().startsWith(t))return a;}return-1;}(V,_>=0?_:Math.max(Y,0),e.key.toLowerCase());-1!==n&&H(n);}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e);},[A,_,V,Y]);let er=["ksel-trigger",(d={disabled:x,mono:I,open:A,openUp:K,position:q,triggerClassName:E}).mono?"mono":"",null!=(u=d.triggerClassName)?u:"",d.open?"ksel-trigger-open":"",d.open&&(null==(p=d.position)?void 0:p.attached)===!0?d.openUp?"ksel-trigger-open-up":"ksel-trigger-open-down":"",d.disabled?"ksel-trigger-disabled":""].filter(e=>e.length>0).join(" "),ea=A&&null!==q?(0,n.jsx)(c,{activeIndex:_,ariaLabel:y,flatOptions:V,menuClassName:N,menuCountLabel:w,menuId:z,menuLabel:Z,menuRef:D,menuTitle:k,onCommit:et,onOptionKeyDown:function(e,n){var t,r;if("Escape"===e.key){e.preventDefault(),ee(),null==(t=M.current)||t.focus();return;}if("Tab"===e.key){e.preventDefault(),ee(),null==(r=M.current)||r.focus();return;}if("ArrowDown"===e.key){e.preventDefault(),H(s(V,n,1));return;}if("ArrowUp"===e.key){e.preventDefault(),H(s(V,n,-1));return;}if("Home"===e.key){e.preventDefault(),H(i(V));return;}if("End"===e.key){e.preventDefault(),H(s(V,0,-1));return;}if("Enter"===e.key||" "===e.key){e.preventDefault();let t=V[n];void 0!==t&&et(t);}},placeholder:j,position:q,selectedIndex:Y,sections:m,setOptionRef:(e,n)=>{P.current[e]=n;},showMenuHeader:S}):null;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{ref:M,"aria-controls":z,"aria-describedby":v,"aria-expanded":A,"aria-haspopup":"listbox","aria-label":y,"aria-labelledby":b,autoFocus:F,className:er,disabled:x,onClick:()=>{A?ee():en();},onKeyDown:function(e){if(!x){if("ArrowDown"===e.key||"ArrowUp"===e.key){e.preventDefault(),en(Y>=0?Y:i(V));return;}("Enter"===e.key||" "===e.key)&&(e.preventDefault(),A?ee():en());}},role:"combobox",style:W,type:"button",children:[void 0!==C?(0,n.jsx)("span",{className:"ksel-trigger-leading",children:C}):null,(0,n.jsxs)("span",{className:"ksel-trigger-copy",children:[(0,n.jsx)("span",{className:"ksel-trigger-label",children:Q}),null!==X?(0,n.jsx)("span",{className:"ksel-trigger-desc",children:X}):null]}),T?(0,n.jsx)("span",{"aria-hidden":"true",className:`ksel-trigger-caret${A?" ksel-trigger-caret-open":""}`,children:(0,n.jsx)("svg",{fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",children:(0,n.jsx)("path",{d:"M2.25 4.5 6 8.25 9.75 4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}):null]}),ea]});}]);},98729,e=>{"use strict";var n=e.i(10582);let t=e.i(17161).Icons.file,r=[{test:e=>"dockerfile"===e||e.includes("docker-compose")||e.endsWith(".dockerignore"),key:"docker"},{test:e=>e.endsWith(".json"),key:"json"},{test:e=>e.endsWith(".yml")||e.endsWith(".yaml"),key:"yaml"},{test:e=>e.endsWith(".md"),key:"markdown"},{test:e=>e.endsWith(".properties")||e.endsWith(".env")||e.startsWith(".env."),key:"properties"},{test:e=>e.endsWith(".java"),key:"java"},{test:e=>e.endsWith(".tsx"),key:"react"},{test:e=>e.endsWith(".ts"),key:"typescript"},{test:e=>e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs"),key:"javascript"},{test:e=>e.endsWith(".py"),key:"python"},{test:e=>e.endsWith(".go"),key:"go"},{test:e=>e.endsWith(".rs"),key:"rust"},{test:e=>e.endsWith(".gradle"),key:"gradle"},{test:e=>e.endsWith(".sql"),key:"postgresql"},{test:e=>e.endsWith(".html"),key:"html5"},{test:e=>e.endsWith(".css"),key:"css3"},{test:e=>e.endsWith(".graphql")||e.endsWith(".gql"),key:"graphql"},{test:e=>e.endsWith(".png")||e.endsWith(".jpg")||e.endsWith(".jpeg")||e.endsWith(".gif")||e.endsWith(".webp")||e.endsWith(".svg"),key:"image"}];e.s(["FileIcon",0,function(e){let a,i,{name:s,icon:l}=e,o=null!=l?l:(a=s.toLowerCase(),(i=r.find(e=>{let{test:n}=e;return n(a);}))?i.key:null);return null!==o?(0,n.jsx)("img",{className:"fi-img",src:`/assets/icons/${o}.svg`,width:"15",height:"15",alt:""}):(0,n.jsx)("span",{className:"fi-fallback",children:(0,n.jsx)(t,{size:14})});}]);},56049,e=>{"use strict";async function n(e,n,t){let r=n&&document.activeElement instanceof HTMLElement?document.activeElement:null,a=document.createElement("textarea");a.value=e,a.setAttribute("readonly","true"),a.style.position="fixed",a.style.inset="0 auto auto -9999px",a.style.width="1px",a.style.height="1px",a.style.opacity="0",a.style.pointerEvents="none",document.body.appendChild(a);try{if(a.focus(),a.select(),!("function"==typeof document.execCommand&&document.execCommand("copy")))throw Error("clipboard-fallback-failed",{cause:t});}finally{a.remove(),n&&(null==r||r.focus());}}async function t(e,t){var r,a;let i,s=null==(r=null==t?void 0:t.restoreFocus)||r,l="u"<typeof navigator||null==(a=navigator.clipboard)?void 0:a.writeText;if(void 0!==l&&void 0!==navigator.clipboard)try{await l.call(navigator.clipboard,e);return;}catch(e){i=e;}if("u"<typeof document||null===document.body)throw Error("clipboard-unavailable",{cause:i});await n(e,s,i);}e.s(["copyTextToClipboard",0,t]);},7568,e=>{"use strict";var n=e.i(10582),t=e.i(87032),r=e.i(76055),a=e.i(56049),i=e.i(85912),s=e.i(17161),l=e.i(67914),o=e.i(60865),c=e.i(54523),d=e.i(56782);let u=s.Icons.check,p=s.Icons.info,h=s.Icons.spark,m=s.Icons.layers,f=s.Icons.reset,g=s.Icons.file,x=["auto","fast","precise","research","creative","technical","safety-critical","agentic"],j=["clarify","assume"],y="__none__";function v(e){let{items:t,empty:r}=e;return 0===t.length?void 0===r?null:(0,n.jsx)("p",{className:"pe-empty",children:r}):(0,n.jsx)("ul",{className:"pe-list",children:t.map((e,t)=>(0,n.jsx)("li",{children:e},`${String(t)}:${e.slice(0,24)}`))});}function b(e){let{title:t,children:r}=e;return(0,n.jsxs)("section",{className:"pe-section","aria-label":t,children:[(0,n.jsx)("h4",{className:"pe-section-title",children:t}),r]});}function E(e){var t;let{result:r,t:a}=e,i=null==(t=r.candidates.scorecards.find(e=>e.candidateId===r.candidates.winnerCandidateId))?void 0:t.profile,s=r.renderedPromptEstimatedTokens,l=[[a("promptEnhancer.analysis.task"),(0,c.humanizeToken)(r.analysis.taskClass)],[a("promptEnhancer.analysis.domain"),(0,c.humanizeToken)(r.analysis.domain)],[a("promptEnhancer.analysis.criticality"),(0,c.humanizeToken)(r.analysis.criticality)],[a("promptEnhancer.analysis.profile"),void 0===i?"-":(0,c.humanizeToken)(i)],[a("promptEnhancer.analysis.input"),a("promptEnhancer.analysis.chars",{count:r.analysis.normalizedInputLength})],...(Number.isFinite(s)?[[a("promptEnhancer.analysis.promptTokens"),a("promptEnhancer.analysis.tokenEstimate",{count:s})]]:[])];return(0,n.jsx)("dl",{className:"pe-analysis","aria-label":a("promptEnhancer.analysis.ariaLabel"),children:l.map(e=>{let[t,r]=e;return(0,n.jsxs)("div",{className:"pe-analysis-item",children:[(0,n.jsx)("dt",{children:t}),(0,n.jsx)("dd",{children:r})]},t);})});}function N(e){var t,r,a;let{routing:i,t:s}=e,l="model-applied"===i.executionStatus?"ok":"unavailable"===i.availability||"model-fallback"===i.executionStatus?"warn":"muted",o=s("promptEnhancer.routing.deterministic");return"model-applied"===i.executionStatus?o=s("promptEnhancer.routing.modelEnhanced",{model:null!=(t=null!=(r=i.resolvedModelId)?r:i.requestedModelId)?t:""}):"model-fallback"===i.executionStatus?o=s("promptEnhancer.routing.modelFallback",{reason:null!=(a=i.fallbackReason)?a:i.reason}):"unavailable"===i.availability&&(o=s("promptEnhancer.routing.modelUnavailable")),(0,n.jsxs)("div",{className:`pe-routing pe-routing-${l}`,"data-testid":"pe-model-routing",role:"status","aria-live":"polite",children:[(0,n.jsx)("span",{className:"pe-routing-icon","aria-hidden":"true",children:"ok"===l?(0,n.jsx)(u,{size:14}):(0,n.jsx)(p,{size:14})}),(0,n.jsx)("span",{children:o})]});}function k(e){let{safety:t,t:r}=e,a=t.requiresHumanReview,i="rejected"===t.decision;return(0,n.jsxs)(b,{title:r("promptEnhancer.safety.title"),children:[(0,n.jsxs)("dl",{className:"pe-safety-summary","data-testid":"pe-safety-decision",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:r("promptEnhancer.safety.decision")}),(0,n.jsx)("dd",{children:(0,c.humanizeToken)(t.decision)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:r("promptEnhancer.safety.verification")}),(0,n.jsx)("dd",{children:(0,c.humanizeToken)(t.verificationStatus)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:r("promptEnhancer.safety.humanReview")}),(0,n.jsx)("dd",{children:r(a?"promptEnhancer.common.required":"promptEnhancer.common.notRequired")})]})]}),i?(0,n.jsx)("p",{className:"pe-safety-warning pe-safety-rejected",role:"alert",children:r("promptEnhancer.safety.rejectedWarning")}):null,a?(0,n.jsx)("p",{className:"pe-safety-warning",role:"alert",children:r("promptEnhancer.safety.reviewWarning")}):null,t.findings.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h5",{className:"pe-subhead",children:r("promptEnhancer.safety.findings")}),(0,n.jsx)("ul",{className:"pe-list","data-testid":"pe-safety-findings",children:t.findings.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("span",{className:`pe-sev pe-sev-${e.severity}`,children:e.severity})," ",e.detail]},`${e.ruleId}:${e.code}`))})]}):null,t.leastPrivilege.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h5",{className:"pe-subhead",children:r("promptEnhancer.safety.leastPrivilege")}),(0,n.jsx)(v,{items:[...t.leastPrivilege]})]}):null]});}function w(e){let t,{plan:r,readiness:a,t:i}=e;return t="ready"===a.status?i("promptEnhancer.grounding.ready"):"unavailable"===a.status?i("promptEnhancer.grounding.unavailable"):i("promptEnhancer.grounding.notRequired"),(0,n.jsxs)(b,{title:i("promptEnhancer.grounding.title"),children:[(0,n.jsxs)("div",{className:`pe-grounding-readiness pe-grounding-readiness-${a.status}`,"data-testid":"pe-grounding-readiness",role:"status","aria-live":"polite",children:[(0,n.jsx)("span",{className:"pe-routing-icon","aria-hidden":"true",children:(0,n.jsx)(p,{size:14})}),(0,n.jsx)("span",{children:t})]}),(0,n.jsx)("p",{className:"pe-grounding-meta",children:i("promptEnhancer.grounding.meta",{strategy:(0,c.humanizeToken)(r.strategy),requirement:r.required?i("promptEnhancer.common.required"):i("promptEnhancer.common.optional"),discipline:(0,c.humanizeToken)(r.citation.discipline),granularity:(0,c.humanizeToken)(r.citation.granularity)})}),r.sourcePriority.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h5",{className:"pe-subhead",children:i("promptEnhancer.grounding.sourcePriority")}),(0,n.jsx)("ol",{className:"pe-list",children:r.sourcePriority.map(e=>(0,n.jsxs)("li",{children:[e.source,e.required?i("promptEnhancer.grounding.requiredSuffix"):""]},e.source))})]}):null,(0,n.jsx)(v,{items:[...r.directives]})]});}function S(e){var t;let{evidence:r,fingerprint:a,t:i}=e;return(0,n.jsxs)("p",{className:"pe-evidence","data-testid":"pe-evidence",children:[i("promptEnhancer.evidence.fingerprint")," ",a.slice(0,16),"...","recorded"===r.status&&void 0!==r.runId?(0,n.jsxs)(n.Fragment,{children:[" ",i("promptEnhancer.evidence.manifest")," ",(0,n.jsx)("a",{href:null!=(t=r.manifestUrl)?t:"#",target:"_blank",rel:"noreferrer","aria-label":i("promptEnhancer.evidence.manifestAriaLabel",{id:r.runId}),children:r.runId})]}):i("promptEnhancer.evidence.notRecorded")]});}function C(e){let{candidates:t,t:r}=e;return(0,n.jsx)(b,{title:r("promptEnhancer.scorecards.title"),children:(0,n.jsx)("div",{className:"c-tablewrap",children:(0,n.jsx)("div",{className:"c-tablescroll",children:(0,n.jsxs)("table",{className:"c-table responsive pe-scorecards","data-testid":"pe-scorecards",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"col",children:r("promptEnhancer.analysis.profile")}),(0,n.jsx)("th",{scope:"col",className:"num",children:r("promptEnhancer.scorecards.score")}),(0,n.jsx)("th",{scope:"col",className:"num",children:r("promptEnhancer.scorecards.tokens")}),(0,n.jsx)("th",{scope:"col",children:r("promptEnhancer.scorecards.winner")})]})}),(0,n.jsx)("tbody",{children:t.scorecards.map(e=>{let a=e.candidateId===t.winnerCandidateId;return(0,n.jsxs)("tr",{className:a?"pe-winner":void 0,"aria-selected":a?"true":void 0,children:[(0,n.jsx)("th",{scope:"row",children:e.profile}),(0,n.jsx)("td",{className:"num","data-label":r("promptEnhancer.scorecards.score"),children:e.aggregateScore.toFixed(3)}),(0,n.jsx)("td",{className:"num","data-label":r("promptEnhancer.scorecards.tokens"),children:e.estimatedTokens.toLocaleString("en-US")}),(0,n.jsx)("td",{"data-label":r("promptEnhancer.scorecards.winner"),children:a?(0,n.jsx)("span",{className:"pe-winner-mark","aria-label":r("promptEnhancer.scorecards.winner"),children:"★"}):(0,n.jsx)("span",{"aria-hidden":"true",children:"-"})})]},e.candidateId);})})]})})})});}function I(e){let{rejected:t,t:r}=e;return 0===t.length?null:(0,n.jsx)(b,{title:r("promptEnhancer.rejections.title"),children:(0,n.jsx)("div",{className:"c-tablewrap",children:(0,n.jsx)("div",{className:"c-tablescroll",children:(0,n.jsxs)("table",{className:"c-table responsive","data-testid":"pe-rejections",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"col",children:r("promptEnhancer.rejections.candidate")}),(0,n.jsx)("th",{scope:"col",children:r("promptEnhancer.analysis.profile")}),(0,n.jsx)("th",{scope:"col",className:"num",children:r("promptEnhancer.scorecards.score")}),(0,n.jsx)("th",{scope:"col",children:r("promptEnhancer.rejections.reason")})]})}),(0,n.jsx)("tbody",{children:t.map(e=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:(0,n.jsx)("code",{children:e.candidateId})}),(0,n.jsx)("td",{children:e.profile}),(0,n.jsx)("td",{className:"num","data-label":r("promptEnhancer.scorecards.score"),children:null===e.aggregateScore?r("promptEnhancer.rejections.notScored"):e.aggregateScore.toFixed(3)}),(0,n.jsx)("td",{"data-label":r("promptEnhancer.rejections.reason"),children:function(e,n){switch(e){case"lower-aggregate-score":return n("promptEnhancer.rejections.reason.lowerAggregateScore");case"lower-tie-break-rank":return n("promptEnhancer.rejections.reason.lowerTieBreakRank");case"exceeded-token-budget":return n("promptEnhancer.rejections.reason.exceededTokenBudget");case"duplicate-candidate":return n("promptEnhancer.rejections.reason.duplicateCandidate");case"safety-floor-not-preserved":return n("promptEnhancer.rejections.reason.safetyFloorNotPreserved");case"safety-validation-failed":return n("promptEnhancer.rejections.reason.safetyValidationFailed");case"profile-preference-not-matched":return n("promptEnhancer.rejections.reason.profilePreferenceNotMatched");}}(e.reason,r)})]},e.candidateId))})]})})})});}function T(e){let{routing:t,t:r}=e;return"model-applied"!==t.executionStatus?null:(0,n.jsx)("p",{className:"pe-evidence","data-testid":"pe-baseline-note",children:r("promptEnhancer.result.baselineNote")});}function L(e){let{result:t,t:r}=e,a=t.enhancedPrompt,i=t.analysis.missingContext.map(e=>"assumption"===e.kind?e.statement:e.question);return(0,n.jsxs)("div",{className:"pe-section-grid",children:[(0,n.jsx)(b,{title:r("promptEnhancer.section.role"),children:(0,n.jsx)("p",{children:a.role})}),(0,n.jsx)(b,{title:r("promptEnhancer.section.objective"),children:(0,n.jsx)("p",{children:a.goal})}),(0,n.jsx)(b,{title:r("promptEnhancer.section.context"),children:(0,n.jsx)(v,{items:[...a.context],empty:r("promptEnhancer.section.noAdditionalContext")})}),(0,n.jsx)(b,{title:r(t.analysis.missingContext.some(e=>"assumption"===e.kind)?"promptEnhancer.section.assumptions":"promptEnhancer.section.clarificationQuestions"),children:(0,n.jsx)(v,{items:i,empty:r("promptEnhancer.section.noClarifications")})}),(0,n.jsx)(b,{title:r("promptEnhancer.section.steps"),children:(0,n.jsx)(v,{items:[...a.taskDecomposition]})}),(0,n.jsx)(b,{title:r("promptEnhancer.section.constraints"),children:(0,n.jsx)(v,{items:[...a.constraints]})}),(0,n.jsxs)(b,{title:r("promptEnhancer.section.outputSchema"),children:[(0,n.jsxs)("p",{children:[r("promptEnhancer.section.format")," ",(0,n.jsx)("strong",{children:a.outputSchema.format}),a.outputSchema.structured?r("promptEnhancer.section.structuredSuffix"):""]}),(0,n.jsx)(v,{items:[...a.outputSchema.hints]})]}),(0,n.jsx)(b,{title:r("promptEnhancer.section.qualityCriteria"),children:(0,n.jsx)(v,{items:[...a.qualityCriteria]})}),(0,n.jsx)(b,{title:r("promptEnhancer.section.uncertaintyHandling"),children:(0,n.jsx)(v,{items:[...a.uncertaintyHandling]})}),(0,n.jsx)(b,{title:r("promptEnhancer.section.safetyRules"),children:(0,n.jsx)(v,{items:[...a.safetyRules]})})]});}e.s(["PromptEnhancerPanel",0,function(){let{connectedRoot:e=null,connectedFilePath:s=null,connectedRoots:c,enhanceImpl:u=r.enhancePrompt,fetchModelsImpl:p=r.fetchModels}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},v=(0,i.useOptionalWidgetTranslate)(),[$,W]=(0,t.useState)(""),[F,R]=(0,t.useState)("auto"),[M,D]=(0,t.useState)("clarify"),[P,z]=(0,t.useState)(y),[A,B]=(0,t.useState)([]),[_,H]=(0,t.useState)(null),[q,O]=(0,t.useState)(null),[K,U]=(0,t.useState)(!1),[V,Y]=(0,t.useState)(null),[G,J]=(0,t.useState)("idle"),[Q,X]=(0,t.useState)(null),Z=(0,t.useRef)(null),ee=(0,t.useRef)(null),en=(0,t.useRef)(null),et=(0,t.useId)(),er=(0,t.useId)(),ea=(0,t.useId)();(0,t.useEffect)(()=>{let e=!1;return p().then(n=>{e||B(n.models.filter(e=>"chat"===e.kind));}).catch(()=>{}),()=>{e=!0;};},[p]),(0,t.useEffect)(()=>()=>{var e;null==(e=en.current)||e.abort();},[]);let ei=(0,t.useMemo)(()=>function(e,n){var t;let{connectedRoot:r,connectedFilePath:a,connectedRoots:i}=e,s=(0,d.buildConnectedRunSources)({connectedRoot:null!=r?r:null,connectedFilePath:null!=a?a:null,connectedRoots:i});if(0===s.length)return{hasConnectedContext:!1,attachmentCount:0,label:n("promptEnhancer.context.noFilesSource"),signature:"none"};let l=s.map(e=>e.label),o=1===l.length?null!=(t=l[0])?t:n("promptEnhancer.context.connectedSource"):n("promptEnhancer.context.connectedSources",{count:l.length});return{hasConnectedContext:!0,attachmentCount:s.length,label:o,signature:JSON.stringify(s)};}({connectedRoot:e,connectedFilePath:s,connectedRoots:c},v),[e,s,c,v]);(0,t.useEffect)(()=>{if("copied"!==G)return;let e=window.setTimeout(()=>{J("idle"),X(null);},3e3);return()=>{window.clearTimeout(e);};},[G]),(0,t.useEffect)(()=>{var e;null!==_&&(null==(e=ee.current)||e.focus());},[_]);let es=(0,t.useCallback)(async()=>{var e;let n=$.trim();if(0===n.length)return void Y(v("promptEnhancer.error.enterDraft"));null==(e=en.current)||e.abort();let t=new AbortController();en.current=t,U(!0),Y(null),J("idle"),X(null);let a={text:n,missingInformationStrategy:"assume"===M?"assume":"clarify",...(ei.hasConnectedContext?{hasConnectedContext:!0,attachmentCount:ei.attachmentCount}:{}),...("auto"===F?{}:{profilePreference:F}),...(P===y?{}:{modelId:P})};try{let e=await u(a,t.signal);t.signal.aborted||(H(e),O(ei.signature));}catch(e){t.signal.aborted||Y(e instanceof r.ApiError?`${e.message} (${e.code})`:e instanceof Error&&"AbortError"===e.name?v("promptEnhancer.error.cancelled"):v("promptEnhancer.error.failed"));}finally{t.signal.aborted||U(!1);}},[$,M,ei,F,P,u,v]),el=(0,t.useCallback)(async()=>{if(null!==_){Y(null),J("copying"),X(v("promptEnhancer.copy.copyingStatus"));try{await(0,a.copyTextToClipboard)(_.renderedPrompt),J("copied"),X(v("promptEnhancer.copy.copied"));}catch{J("failed"),X(v("promptEnhancer.copy.failed"));}}},[_,v]),eo=(0,t.useCallback)(()=>{var e,n;null==(e=en.current)||e.abort(),en.current=null,W(""),H(null),O(null),U(!1),Y(null),J("idle"),X(null),null==(n=Z.current)||n.focus();},[]),ec=[{options:[{value:y,label:v("promptEnhancer.model.deterministicOnly")},...A.map(e=>({value:e.id,label:e.id}))]}],ed=$.trim().length,eu=v(K?"promptEnhancer.status.enhancing":0===ed?"promptEnhancer.status.waitingForDraft":"promptEnhancer.status.ready"),ep=ed>0||null!==_||K||null!==V||"idle"!==G||null!==Q,eh=null!==_&&null!==q&&q!==ei.signature;return(0,n.jsxs)("div",{className:"pe-panel","data-testid":"prompt-enhancer-panel",children:[(0,n.jsxs)("div",{className:"pe-header","data-testid":"pe-header",children:[(0,n.jsx)("span",{className:"pe-header-icon","aria-hidden":"true",children:(0,n.jsx)(h,{size:18})}),(0,n.jsxs)("div",{className:"pe-header-copy",children:[(0,n.jsx)("p",{className:"pe-eyebrow",children:v("promptEnhancer.header.eyebrow")}),(0,n.jsx)("h3",{className:"pe-title",children:v("promptEnhancer.header.title")})]}),(0,n.jsx)("span",{className:"pe-header-chip",children:v("promptEnhancer.header.reviewBeforeUse")})]}),(0,n.jsxs)("form",{className:"pe-form",onSubmit:e=>{e.preventDefault(),es();},children:[(0,n.jsxs)("div",{className:"pe-draft-card",children:[(0,n.jsxs)("div",{className:"pe-field-head",children:[(0,n.jsx)("label",{className:"pe-label",htmlFor:et,children:v("promptEnhancer.field.rawPrompt")}),(0,n.jsx)("span",{className:"pe-counter",id:er,children:v("promptEnhancer.analysis.chars",{count:ed})})]}),(0,n.jsx)("textarea",{ref:Z,id:et,className:"pe-draft",value:$,onChange:e=>{W(e.target.value);},rows:8,placeholder:v("promptEnhancer.field.draftPlaceholder"),"aria-describedby":null===V?er:`${er} ${ea}`})]}),(0,n.jsxs)("aside",{className:"pe-controls-card","aria-label":v("promptEnhancer.controls.ariaLabel"),children:[(0,n.jsxs)("div",{className:"pe-controls",children:[(0,n.jsxs)("div",{className:"pe-control",children:[(0,n.jsx)("span",{className:"pe-label","aria-hidden":"true",children:v("promptEnhancer.analysis.profile")}),(0,n.jsx)(l.default,{value:F,ariaLabel:v("promptEnhancer.analysis.profile"),onValueChange:R,sections:[{options:x.map(e=>({value:e,label:v(`promptEnhancer.profile.${e}`)}))}],triggerClassName:"pe-select",menuClassName:"pe-select-menu"})]}),(0,n.jsxs)("div",{className:"pe-control",children:[(0,n.jsx)("span",{className:"pe-label","aria-hidden":"true",children:v("promptEnhancer.controls.missingInformation")}),(0,n.jsx)(l.default,{value:M,ariaLabel:v("promptEnhancer.controls.missingInformation"),onValueChange:D,sections:[{options:j.map(e=>({value:e,label:v(`promptEnhancer.strategy.${e}`)}))}],triggerClassName:"pe-select",menuClassName:"pe-select-menu"})]}),(0,n.jsxs)("div",{className:"pe-control",children:[(0,n.jsx)("span",{className:"pe-label","aria-hidden":"true",children:v("promptEnhancer.controls.model")}),(0,n.jsx)(l.default,{value:P,ariaLabel:v("promptEnhancer.controls.model"),onValueChange:z,sections:ec,triggerClassName:"pe-select",menuClassName:"pe-select-menu"})]})]}),(0,n.jsxs)("div",{className:"pe-grounding-context","data-connected":ei.hasConnectedContext?"true":"false","data-testid":"pe-grounding-context",children:[(0,n.jsx)("span",{className:"pe-routing-icon","aria-hidden":"true",children:(0,n.jsx)(m,{size:14})}),(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:"pe-context-label",children:v("promptEnhancer.context.title")}),(0,n.jsx)("strong",{children:ei.label})]})]}),eh?(0,n.jsx)("p",{className:"pe-context-stale",role:"status","aria-live":"polite",children:v("promptEnhancer.context.changed")}):null,(0,n.jsxs)("div",{className:"pe-command-row",children:[(0,n.jsxs)("button",{type:"submit",className:"pe-button pe-button-primary pe-enhance",disabled:K||0===ed,children:[(0,n.jsx)(h,{size:15}),(0,n.jsx)("span",{children:K?v("promptEnhancer.action.enhancing"):v("promptEnhancer.action.enhance")})]}),(0,n.jsxs)("button",{type:"button",className:"pe-button pe-button-secondary pe-clear",onClick:eo,disabled:!ep,"aria-label":v("promptEnhancer.action.clearAriaLabel"),children:[(0,n.jsx)(f,{size:15}),(0,n.jsx)("span",{children:v("promptEnhancer.action.clear")})]})]}),(0,n.jsx)("p",{className:"pe-status",role:"status","aria-live":"polite",children:eu})]})]}),null!==V?(0,n.jsx)("p",{className:"pe-error",role:"alert",id:ea,children:V}):null,null!==_?(0,n.jsxs)("div",{className:"pe-result","data-testid":"pe-result",children:[(0,n.jsxs)("div",{className:"pe-result-head",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"pe-eyebrow",children:v("promptEnhancer.result.eyebrow")}),(0,n.jsx)("h4",{className:"pe-result-title",ref:ee,tabIndex:-1,children:v("promptEnhancer.result.title")})]}),(0,n.jsx)(N,{routing:_.modelRouting,t:v})]}),(0,n.jsx)(E,{result:_,t:v}),(0,n.jsxs)(b,{title:v("promptEnhancer.rendered.title"),children:[(0,n.jsx)("pre",{className:"pe-rendered","aria-label":v("promptEnhancer.rendered.ariaLabel"),"data-text-selectable":"true",children:_.renderedPrompt}),(0,n.jsxs)("div",{className:"pe-actions",children:[null!==Q?(0,n.jsx)("output",{className:`pe-copy-status pe-copy-status-${G}`,style:o.NATIVE_BLOCK_STYLE,role:"failed"===G?"alert":void 0,"aria-live":"polite",children:Q}):null,(0,n.jsxs)("button",{type:"button",className:"pe-button pe-button-secondary pe-copy",disabled:"copying"===G,onClick:()=>{el();},children:[(0,n.jsx)(g,{size:15}),(0,n.jsx)("span",{children:"copying"===G?v("promptEnhancer.action.copying"):v("promptEnhancer.action.copy")})]})]})]}),(0,n.jsxs)("div",{className:"pe-review-grid",children:[(0,n.jsx)(k,{safety:_.safety,t:v}),(0,n.jsx)(w,{plan:_.enhancedPrompt.groundingPlan,readiness:_.groundingReadiness,t:v})]}),(0,n.jsx)(T,{routing:_.modelRouting,t:v}),(0,n.jsx)(L,{result:_,t:v}),(0,n.jsx)(C,{candidates:_.candidates,t:v}),(0,n.jsx)(I,{rejected:_.candidates.rejected,t:v}),(0,n.jsx)(S,{evidence:_.evidence,fingerprint:_.inputFingerprintSha256,t:v})]}):(0,n.jsxs)("div",{className:"pe-empty-state","aria-label":v("promptEnhancer.empty.ariaLabel"),children:[(0,n.jsx)(m,{size:18}),(0,n.jsx)("span",{children:v("promptEnhancer.empty.message")})]})]});}]);},38661,e=>{e.n(e.i(7568));}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,60865,e=>{"use strict";e.s(["NATIVE_BLOCK_STYLE",0,{display:"block"},"NATIVE_FIELDSET_RESET_STYLE",0,{margin:0,minWidth:0,padding:0,border:0},"NATIVE_FIELDSET_STYLE",0,{margin:0,minWidth:0},"NATIVE_HEADING_STYLE",0,{margin:0,fontWeight:"inherit"},"NATIVE_LIST_KEEP_PADDING_STYLE",0,{listStyle:"none",margin:0},"NATIVE_LIST_STYLE",0,{listStyle:"none",margin:0,padding:0}]);},67914,e=>{"use strict";var t=e.i(10582),r=e.i(87032),n=e.i(5353),l=e.i(50850);function a(e){return e.findIndex(e=>!0!==e.disabled);}function i(e,t,r){if(0===e.length)return-1;for(let l of e.keys()){var n;let a=(t+(l+1)*r+e.length)%e.length;if((null==(n=e[a])?void 0:n.disabled)!==!0)return a;}return-1;}function s(e){let{active:l,index:a,onCommit:i,onOptionKeyDown:s,option:o,selected:d,setOptionRef:u}=e,c=(0,r.useRef)(null),p=(0,r.useRef)(null),h=(0,r.useRef)(null),[f,v]=(0,r.useState)(null),g=()=>{null!==h.current&&(clearTimeout(h.current),h.current=null),v(null);},m=()=>{null!==h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{let e=p.current,t=c.current;if(null===e||null===t||e.scrollWidth<=e.clientWidth)return;let r=t.getBoundingClientRect(),n=Math.min(520,window.innerWidth-32),l=r.right+8+n<=window.innerWidth-16?"top-left":"top-right";v({left:"top-left"===l?r.right+8:r.left-8,placement:l,top:r.top-6});},1500);};return(0,r.useEffect)(()=>g,[]),(0,t.jsxs)("button",{ref:e=>{c.current=e,u(a,e);},"aria-selected":d,className:`ksel-option${l?" ksel-option-active":""}`,"data-disabled":!0===o.disabled?"true":void 0,disabled:o.disabled,onBlur:g,onClick:()=>i(o),onFocus:m,onKeyDown:e=>s(e,a),onPointerEnter:m,onPointerLeave:g,role:"option",type:"button",children:[(0,t.jsxs)("span",{className:"ksel-option-copy",children:[(0,t.jsx)("span",{className:"ksel-option-label",ref:p,children:o.label}),void 0!==o.description?(0,t.jsx)("span",{className:"ksel-option-desc",children:o.description}):null]}),void 0!==o.badge?(0,t.jsx)("span",{className:"ksel-option-badge",children:o.badge}):null,null!==f?(0,n.createPortal)((0,t.jsx)("div",{className:"ksel-overflow-tooltip","data-placement":f.placement,role:"tooltip",style:{left:`${f.left.toString()}px`,top:`${f.top.toString()}px`},children:o.label}),document.body):null]});}function o(e){let{activeIndex:r,flatOptions:n,menuId:l,onCommit:a,onOptionKeyDown:i,section:o,sectionIndex:d,selectedIndex:u,setOptionRef:c}=e,p=void 0!==o.label?`${l}-section-${d.toString()}`:void 0;return(0,t.jsxs)("div",{className:"ksel-section",role:void 0!==o.label?"group":"presentation","aria-labelledby":p,children:[void 0!==o.label?(0,t.jsx)("div",{className:"ksel-section-label",id:p,children:o.label}):null,o.options.map(e=>{var l;let d=n.findIndex(t=>t.value===e.value&&t.sectionLabel===o.label),p=n[d];return void 0===p?null:(0,t.jsx)(s,{active:d===r,index:d,onCommit:a,onOptionKeyDown:i,option:p,selected:d===u,setOptionRef:c},`${null!=(l=o.label)?l:"section"}-${e.value}`);})]});}function d(e){var r;let{activeIndex:l,ariaLabel:a,flatOptions:i,menuClassName:s,menuCountLabel:d,menuId:u,menuLabel:c,menuRef:p,menuTitle:h,onCommit:f,onOptionKeyDown:v,placeholder:g,position:m,selectedIndex:b,sections:y,setOptionRef:x,showMenuHeader:k}=e;return(0,n.createPortal)((0,t.jsxs)("div",{ref:p,className:["ksel-menu",m.attached?"ksel-menu-attached":"",m.openUp?"ksel-menu-open-up":"ksel-menu-open-down",null!=s?s:""].filter(e=>e.length>0).join(" "),style:{left:`${m.left.toString()}px`,top:`${m.top.toString()}px`,width:`${m.width.toString()}px`,"--ksel-option-height":`${m.optionHeight.toString()}px`,fontFamily:m.fontFamily,fontSize:m.fontSize,fontWeight:m.fontWeight,letterSpacing:m.letterSpacing,lineHeight:m.lineHeight},children:[k?(0,t.jsxs)("div",{className:"ksel-menu-head",children:[(0,t.jsx)("div",{className:"ksel-menu-title",children:null!=(r=null!=h?h:a)?r:g}),(0,t.jsx)("div",{className:"ksel-menu-note",children:null!=d?d:`${i.length.toString()} options`})]}):null,(0,t.jsx)("div",{className:"ksel-menu-scroll",role:"listbox",id:u,"aria-label":c,style:{maxHeight:`${m.maxHeight.toString()}px`},children:y.map((e,r)=>{var n;return(0,t.jsx)(o,{activeIndex:l,flatOptions:i,menuId:u,onCommit:f,onOptionKeyDown:v,section:e,sectionIndex:r,selectedIndex:b,setOptionRef:x},`${null!=(n=e.label)?n:"section"}-${r.toString()}`);})})]}),document.body);}e.s(["default",0,function(e){var n,s,o,u,c,p;let{value:h,sections:f,onValueChange:v,onOpen:g,disabled:m=!1,placeholder:b,ariaLabel:y,ariaDescribedBy:x,ariaLabelledBy:k,triggerClassName:j,menuClassName:w,menuTitle:E,menuCountLabel:R,showMenuHeader:N=!0,leadingVisual:C,mono:I=!1,showChevron:S=!0,menuMinWidth:D,attached:$=!0,triggerStyle:A,autoFocus:T=!1}=e,B=(0,l.useTranslate)(),L=(0,r.useRef)(null),P=(0,r.useRef)(null),M=(0,r.useRef)([]),q=(0,r.useId)(),[H,O]=(0,r.useState)(!1),[_,W]=(0,r.useState)(-1),[F,z]=(0,r.useState)(null),[K,V]=(0,r.useState)(!1),U=(0,r.useMemo)(()=>f.flatMap((e,t)=>e.options.map((r,n)=>{var l;return{...r,key:`${null!=(l=e.label)?l:"section"}-${t.toString()}-${r.value}-${n.toString()}`,sectionLabel:e.label};})),[f]),G=U.findIndex(e=>e.value===h),Y=-1===G?null:U[G],X=null!=b?b:B("select.placeholder"),Z=null!=(n=null==Y?void 0:Y.label)?n:X,Q=null!=(s=null==Y?void 0:Y.description)?s:null,J=null!=(o=null!=E?E:y)?o:X,ee=()=>{O(!1),W(-1);},et=e=>{var t,r;if(m||0===U.length)return;let n=void 0!==e&&(null==(t=U[e])?void 0:t.disabled)!==!0?e:G>=0&&(null==(r=U[G])?void 0:r.disabled)!==!0?G:a(U);O(!0),W(n),null==g||g();};function er(e){var t;e.disabled||(v(e.value),ee(),null==(t=L.current)||t.focus());}(0,r.useEffect)(()=>{if(!H)return;let e=e=>{let t=e.target;null!==L.current&&t instanceof Node&&L.current.contains(t)||null!==P.current&&t instanceof Node&&P.current.contains(t)||ee();},t=()=>ee();return window.addEventListener("pointerdown",e,!0),window.addEventListener("blur",t),()=>{window.removeEventListener("pointerdown",e,!0),window.removeEventListener("blur",t);};},[H]),(0,r.useLayoutEffect)(()=>{if(!H||null===L.current)return;let e=()=>{var e;let t=null==(e=L.current)?void 0:e.getBoundingClientRect();if(void 0===t)return;let r=Math.min(void 0!==D&&t.width<Math.min(D,96)?D:t.width,window.innerWidth-32),n=$&&1>Math.abs(r-t.width),l=n?-1:6,a=window.innerHeight-t.bottom-16,i=t.top-16,s=a<Math.max(96,2*t.height)&&i>a;V(s);let o=s?i:a,d=50*!!N+2,u=Math.max(t.height,Math.min(Math.max(t.height,o-d),380)),c=u+d,p=window.getComputedStyle(L.current);z({left:Math.min(Math.max(16,t.left),window.innerWidth-r-16),width:r,top:s?Math.max(16,t.top-c-l):Math.min(t.bottom+l,window.innerHeight-16-c),optionHeight:Math.max(28,Math.min(t.height,30)),maxHeight:u,openUp:s,attached:n,fontFamily:p.fontFamily,fontSize:p.fontSize,fontWeight:p.fontWeight,letterSpacing:p.letterSpacing,lineHeight:p.lineHeight});};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0);};},[H,$,D,N]),(0,r.useLayoutEffect)(()=>{if(!H||null===F||!F.openUp||null===L.current||null===P.current)return;let e=L.current.getBoundingClientRect(),t=P.current.getBoundingClientRect();if(t.height<=0)return;let r=F.attached?-1:6,n=Math.max(16,e.top-t.height-r);.5>Math.abs(n-F.top)||z(e=>null===e?e:{...e,top:n});},[H,F]),(0,r.useEffect)(()=>{var e,t;H&&!(_<0)&&(null==(e=M.current[_])||e.focus(),null==(t=M.current[_])||t.scrollIntoView({block:"nearest"}));},[H,_]),(0,r.useEffect)(()=>{if(!H)return;let e=e=>{var t,r;if("Escape"===e.key){ee(),null==(t=L.current)||t.focus();return;}if(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if((r=e.target)instanceof HTMLElement&&("INPUT"===r.tagName||"TEXTAREA"===r.tagName||"SELECT"===r.tagName||r.isContentEditable))return;let t=function(e,t,r){for(let n=1;n<=e.length;n+=1){let l=(t+n)%e.length,a=e[l];if(void 0!==a&&!0!==a.disabled&&a.label.toLowerCase().startsWith(r))return l;}return-1;}(U,_>=0?_:Math.max(G,0),e.key.toLowerCase());-1!==t&&W(t);}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e);},[H,_,U,G]);let en=["ksel-trigger",(u={disabled:m,mono:I,open:H,openUp:K,position:F,triggerClassName:j}).mono?"mono":"",null!=(c=u.triggerClassName)?c:"",u.open?"ksel-trigger-open":"",u.open&&(null==(p=u.position)?void 0:p.attached)===!0?u.openUp?"ksel-trigger-open-up":"ksel-trigger-open-down":"",u.disabled?"ksel-trigger-disabled":""].filter(e=>e.length>0).join(" "),el=H&&null!==F?(0,t.jsx)(d,{activeIndex:_,ariaLabel:y,flatOptions:U,menuClassName:w,menuCountLabel:R,menuId:q,menuLabel:J,menuRef:P,menuTitle:E,onCommit:er,onOptionKeyDown:function(e,t){var r,n;if("Escape"===e.key){e.preventDefault(),ee(),null==(r=L.current)||r.focus();return;}if("Tab"===e.key){e.preventDefault(),ee(),null==(n=L.current)||n.focus();return;}if("ArrowDown"===e.key){e.preventDefault(),W(i(U,t,1));return;}if("ArrowUp"===e.key){e.preventDefault(),W(i(U,t,-1));return;}if("Home"===e.key){e.preventDefault(),W(a(U));return;}if("End"===e.key){e.preventDefault(),W(i(U,0,-1));return;}if("Enter"===e.key||" "===e.key){e.preventDefault();let r=U[t];void 0!==r&&er(r);}},placeholder:b,position:F,selectedIndex:G,sections:f,setOptionRef:(e,t)=>{M.current[e]=t;},showMenuHeader:N}):null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{ref:L,"aria-controls":q,"aria-describedby":x,"aria-expanded":H,"aria-haspopup":"listbox","aria-label":y,"aria-labelledby":k,autoFocus:T,className:en,disabled:m,onClick:()=>{H?ee():et();},onKeyDown:function(e){if(!m){if("ArrowDown"===e.key||"ArrowUp"===e.key){e.preventDefault(),et(G>=0?G:a(U));return;}("Enter"===e.key||" "===e.key)&&(e.preventDefault(),H?ee():et());}},role:"combobox",style:A,type:"button",children:[void 0!==C?(0,t.jsx)("span",{className:"ksel-trigger-leading",children:C}):null,(0,t.jsxs)("span",{className:"ksel-trigger-copy",children:[(0,t.jsx)("span",{className:"ksel-trigger-label",children:Z}),null!==Q?(0,t.jsx)("span",{className:"ksel-trigger-desc",children:Q}):null]}),S?(0,t.jsx)("span",{"aria-hidden":"true",className:`ksel-trigger-caret${H?" ksel-trigger-caret-open":""}`,children:(0,t.jsx)("svg",{fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",children:(0,t.jsx)("path",{d:"M2.25 4.5 6 8.25 9.75 4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}):null]}),el]});}]);},28804,e=>{"use strict";var t=e.i(87032);function r(e){if(e.hidden)return!1;let t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&"collapse"!==t.visibility;}e.s(["useDialogTabTrap",0,function(e){(0,t.useEffect)(()=>{let t=t=>{if("Tab"!==t.key)return;let n=e.current;if(null===n)return;let l=Array.from(n.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(r),a=document.activeElement;if(0===l.length||!n.contains(a)){var i;t.preventDefault(),(null!=(i=t.shiftKey?l.at(-1):l[0])?i:n).focus();return;}let s=l[0],o=l.at(-1);if(void 0===s||void 0===o)return;let d=a===n;t.shiftKey&&(a===s||d)?(t.preventDefault(),o.focus()):t.shiftKey||a!==o||(t.preventDefault(),s.focus());};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t);};},[e]);}]);},26222,e=>{"use strict";let t={jsx:"js",js:"js",mjs:"js",ts:"ts",tsx:"ts",java:"java",kt:"kotlin",kts:"kotlin",py:"py",rb:"py",go:"go",rs:"rust",json:"json",yml:"yaml",yaml:"yaml",md:"md",markdown:"md",html:"html",xml:"html",css:"css",sql:"sql",sh:"sh",bash:"sh",cob:"cobol",cbl:"cobol",gradle:"js",graphql:"graphql",gql:"graphql",properties:"props",toml:"props",env:"props",dockerfile:"docker"},r=new Set("const let var function return if else for while do switch case break continue import from export default class extends implements interface enum new async await yield of in typeof instanceof this super public private protected static final readonly void int long double float boolean char byte short val fun object data override companion package def pass lambda try catch except finally throw throws raise with as not and or is null nil None True False true false undefined struct impl trait pub use mod match where select insert update delete create table from join on group by order limit FROM RUN CMD ENV COPY WORKDIR EXPOSE ENTRYPOINT AS".split(" "));function n(e){let t=[];return e.split(/(`[^`]+`|\*\*[^*]+\*\*)/).forEach(e=>{""!==e&&(e.startsWith("`")?t.push(["str",e]):e.startsWith("**")?t.push(["type",e]):t.push(["id",e]));}),t.length>0?t:[["id",e]];}let l=[function(e){return null!==e.cs.line&&e.rest.startsWith(e.cs.line)?{token:["com",e.rest],length:e.rest.length,stop:!0}:null;},function(e){let{cs:t,rest:r,line:n,i:l,state:a}=e;if(null===t.block||!r.startsWith(t.block[0]))return null;let i=n.indexOf(t.block[1],l+t.block[0].length);if(-1===i)return a.inBlock=!0,{token:["com",r],length:r.length,stop:!0};let s=i+t.block[1].length;return{token:["com",n.slice(l,s)],length:s-l,stop:!1};},function(e){let t=/^(?:"(?:[^"\\]|\\.)*"?|'(?:[^'\\]|\\.)*'?)/.exec(e.rest);return null===t||t[0].length<=1?null:{token:["str",t[0]],length:t[0].length,stop:!1};},function(e){var t;if(!/^\d/.test(e.rest))return null;let r=/^\d[\w.]*/.exec(e.rest),n=null!=(t=null==r?void 0:r[0])?t:e.rest.charAt(0);return{token:["num",n],length:n.length,stop:!1};},function(e){var t,n;let l=/^[@A-Za-z_$][\w$]*/.exec(e.rest);if(null===l)return null;let a=l[0];return{token:[(t=e.line,n=e.i,r.has(a)||r.has(a.toLowerCase())?"key":a.startsWith("@")||/^[A-Z]/.test(a)?"type":"("===t.charAt(n+a.length)?"fn":"id"),a],length:a.length,stop:!1};},function(e){let t=/^\s+/.exec(e.rest);return null===t?null:{token:["ws",t[0]],length:t[0].length,stop:!1};},function(e){let t=/^[^\w\s$@"']+/.exec(e.rest);return null===t?null:{token:["punct",t[0]],length:t[0].length,stop:!1};}];e.s(["highlightLines",0,function(e,t){if("md"===t)return e.split("\n").map(e=>{if(/^#{1,6}\s/.test(e))return[["head",e]];if(/^\s*```/.test(e))return[["com",e]];let t=/^(\s*)([-*+]|\d+\.)(\s)/.exec(e);if(null!==t){var r,l,a;return[["ws",null!=(r=t[1])?r:""],["key",null!=(l=t[2])?l:""],["ws",null!=(a=t[3])?a:""],...n(e.slice(t[0].length))];}return n(e);});if("json"===t)return e.split("\n").map(e=>{let t=[],r=0;for(;r<e.length;){let n=e.slice(r),l=/^"(?:[^"\\]|\\.)*"/.exec(n);if(null!==l){let n=e.slice(r+l[0].length),a=/^\s*:/.test(n);t.push([a?"key2":"str",l[0]]),r+=l[0].length;continue;}let a=/^-?\d[\d.eE+-]*/.exec(n);if(null!==a){t.push(["num",a[0]]),r+=a[0].length;continue;}let i=/^(true|false|null)\b/.exec(n);if(null!==i){t.push(["lit",i[0]]),r+=i[0].length;continue;}let s=/^\s+/.exec(n);if(null!==s){t.push(["ws",s[0]]),r+=s[0].length;continue;}t.push(["punct",n.charAt(0)]),r+=1;}return t;});let r="py"===t||"sh"===t||"yaml"===t||"props"===t||"docker"===t?{line:"#",block:null}:"sql"===t?{line:"--",block:["/*","*/"]}:"cobol"===t?{line:"*>",block:null}:"html"===t?{line:null,block:["<!--","-->"]}:{line:"//",block:["/*","*/"]},a={inBlock:!1},i=[];for(let t of e.split("\n"))i.push(function(e,t,r){let n=[],a=0,i=function(e,t,r){if(!t.inBlock||null===r.block)return null;let n=e.indexOf(r.block[1]);if(-1===n)return{token:["com",e],length:e.length};let l=n+r.block[1].length;return t.inBlock=!1,{token:["com",e.slice(0,l)],length:l};}(e,t,r);for(null!==i&&(n.push(i.token),a=i.length);a<e.length;){let i=function(e){for(let t of l){let r=t(e);if(null!==r)return r;}return{token:["id",e.rest.charAt(0)],length:1,stop:!1};}({line:e,i:a,rest:e.slice(a),cs:r,state:t});if(n.push(i.token),a+=i.length,i.stop)break;}return n;}(t,a,r));return i;},"langOf",0,function(e){var r;let n=e.toLowerCase();if(".env"===n||n.startsWith(".env."))return"props";if("dockerfile"===n||n.startsWith("dockerfile"))return"docker";if(n.includes("docker-compose"))return"yaml";let l=n.split("."),a=l.length>1?l.at(-1):void 0;return void 0===a?"code":null!=(r=t[a])?r:"code";}]);},13464,41093,e=>{"use strict";let t="keiko:git-repository-state-invalidated";e.s(["GIT_REPOSITORY_STATE_INVALIDATED_EVENT",0,t,"gitRepositoryStateInvalidationRoots",0,function(e){let t=function(e){if(!(e instanceof CustomEvent)||"object"!=typeof e.detail||null===e.detail)return null;let t=e.detail.root;return"string"==typeof t&&t.length>0?t:null;}(e);if(null===t)return[];let r=e.detail.repositoryRoot;return"string"!=typeof r||0===r.length||r===t?[t]:[t,r];},"notifyGitRepositoryStateInvalidated",0,function(e,r){0!==e.length&&window.dispatchEvent(new CustomEvent(t,{detail:{root:e,...(void 0!==r&&r.length>0&&r!==e?{repositoryRoot:r}:{})}}));}],13464);let r="keiko:workspace-file-mutated";function n(e){if(!(e instanceof CustomEvent)||"object"!=typeof e.detail||null===e.detail)return null;let t=e.detail,r=t.root;return"string"!=typeof r||0===r.length?null:{root:r,...("string"==typeof t.repositoryRoot&&t.repositoryRoot.length>0?{repositoryRoot:t.repositoryRoot}:{}),...("string"==typeof t.relativePath?{relativePath:t.relativePath}:{}),...("string"==typeof t.kind?{kind:t.kind}:{}),...("number"==typeof t.sequence&&Number.isSafeInteger(t.sequence)?{sequence:t.sequence}:{}),...("local"===t.provenance||"watch"===t.provenance||"agent"===t.provenance?{provenance:t.provenance}:{})};}e.s(["WORKSPACE_FILE_MUTATED_EVENT",0,r,"notifyWorkspaceFileMutated",0,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.dispatchEvent(new CustomEvent(r,{detail:{root:e,...t}}));},"workspaceFileMutationDetail",0,n,"workspaceFileMutationRoots",0,function(e){let t=n(e);if(null===t)return[];let r=t.repositoryRoot;return void 0===r||r===t.root?[t.root]:[t.root,r];}],41093);},11257,e=>{"use strict";var t=e.i(10582),r=e.i(60865),n=e.i(26222);function l(e){let{tokens:r}=e;return(0,t.jsx)(t.Fragment,{children:r.map((e,r)=>(0,t.jsx)("span",{className:`hl-${e[0]}`,children:e[1]},r))});}function a(e){var r,a,i,s,o,d,u,c,p;let h,{line:f,lang:v,kindLabel:g,labels:m}=e,b="add"===(s=f.kind)?"+":"del"===s?"−":"ctx"===s?"·":"",y="ctx"===f.kind?"":` rv-${f.kind}`;if("meta"!==f.kind&&"code"!==v){let e=null!=(i=(0,n.highlightLines)(f.text,(0,n.langOf)(v))[0])?i:[];h=(0,t.jsx)(l,{tokens:e});}else h=f.text;return(0,t.jsxs)("div",{className:`rv-line${y}`,children:[(0,t.jsx)("span",{className:"rv-sr-only",children:null!=g?g:(o=f.kind,"add"===o?null!=(d=null==m?void 0:m.addedLine)?d:"Added line":"del"===o?null!=(u=null==m?void 0:m.deletedLine)?u:"Deleted line":"ctx"===o?null!=(c=null==m?void 0:m.contextLine)?c:"Context line":null!=(p=null==m?void 0:m.metadataLine)?p:"Diff metadata")}),(0,t.jsx)("span",{className:"rv-num-old rv-num",children:null!=(r=f.oldLine)?r:""}),(0,t.jsx)("span",{className:"rv-num-new rv-num",children:null!=(a=f.newLine)?a:""}),(0,t.jsx)("span",{className:"rv-gutter","aria-hidden":"true",children:b}),(0,t.jsx)("code",{className:"rv-src",children:h})]});}function i(e){var n,l,i,s;let{hunk:o,lang:d,labels:u,viewLabels:c}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"rv-hunk mono","aria-label":`${null!=(n=null==c?void 0:c.hunkHeader)?n:"Hunk header"} ${o.header}`,children:[(0,t.jsx)("span",{className:"rv-sr-only",children:null!=(l=null!=(i=null==u?void 0:u.header)?i:null==c?void 0:c.hunkHeader)?l:"Hunk header"}),o.header]}),o.lines.map((e,r)=>{var n,l;return(0,t.jsx)(a,{line:e,lang:d,kindLabel:null==u?void 0:u[e.kind],labels:c},`${String(null!=(n=e.oldLine)?n:"-")}:${String(null!=(l=e.newLine)?l:"-")}:${e.kind}:${String(r)}`);}),o.truncated?(0,t.jsx)("output",{className:"rv-truncated",style:r.NATIVE_BLOCK_STYLE,children:null!=(s=null==c?void 0:c.hunkTruncated)?s:"This hunk is incomplete because the bounded diff was truncated."}):null]});}e.s(["DiffFileSection",0,function(e){var n,l,a,s,o,d;let{file:u,index:c,changedFiles:p=[],sectionRef:h,translate:f,labels:v,idPrefix:g="rv-file"}=e,m=null!=(d=null==f?void 0:f("chat.repository.role.file"))?d:"file",b=p.find(e=>e.path===u.path),y=u.path.includes(".")&&null!=(n=u.path.split(".").pop())?n:"code";return(0,t.jsxs)("section",{id:`${g}-${c}`,"aria-labelledby":`${g}-${c}-h`,ref:h,children:[(0,t.jsxs)("h3",{id:`${g}-${c}-h`,className:"rv-file mono",children:[(0,t.jsx)("span",{className:"rv-path",children:u.path}),void 0!==u.oldPath&&(0,t.jsx)("span",{className:"rv-oldpath",children:null!=(l=null==v?void 0:v.previousPath(u.oldPath))?l:` (was ${u.oldPath})`}),(0,t.jsxs)("span",{className:"rv-sr-only",children:[u.status," ",m]}),(0,t.jsx)("span",{className:"spacer"}),(0,t.jsxs)("span",{className:"rv-stat add",children:["+",u.addedLines]}),(0,t.jsxs)("span",{className:"rv-stat del",children:["−",u.removedLines]}),(null==b?void 0:b.elevatedReview)===!0&&(0,t.jsx)("span",{className:"rv-elevated","aria-label":null!=(a=null==v?void 0:v.elevatedReview)?a:"Elevated review",children:"!"})]}),(0,t.jsxs)("div",{className:"rv-code mono",children:[u.binary?(0,t.jsx)("p",{className:"rv-empty-p",children:null!=(s=null==v?void 0:v.binaryFile)?s:"Binary file — no text diff to display."}):u.hunks.map(e=>(0,t.jsx)(i,{hunk:e,lang:y,viewLabels:v},e.header)),u.truncated&&!u.hunks.some(e=>e.truncated)?(0,t.jsx)("output",{className:"rv-truncated",style:r.NATIVE_BLOCK_STYLE,children:null!=(o=null==v?void 0:v.fileTruncated)?o:"This file diff is incomplete because the bounded diff was truncated."}):null]})]});},"DiffHunkView",0,i]);},3415,e=>{"use strict";let t="keiko:editor-buffer-reconciliation-request";async function r(e){let r=[];window.dispatchEvent(new CustomEvent(t,{detail:{root:e,register:e=>{r.push(e);}}})),await Promise.all(r);}e.s(["EDITOR_BUFFER_RECONCILIATION_REQUEST_EVENT",0,t,"editorBufferReconciliationRequestDetail",0,function(e){if(!(e instanceof CustomEvent)||"object"!=typeof e.detail||null===e.detail)return null;let t=e.detail;return"string"==typeof t.root&&t.root.length>0&&"function"==typeof t.register?{root:t.root,register:t.register}:null;},"requestEditorBufferReconciliation",0,r]);},6295,e=>{"use strict";var t=e.i(10582),r=e.i(87032),n=e.i(76055),l=e.i(17161);let a=l.Icons.git,i=l.Icons.info,s=l.Icons.check,o={prPreview:n.fetchGitDeliveryPrPreview,prExecute:n.fetchGitDeliveryPrExecute},d={display:"flex",flexDirection:"column",gap:"var(--space-2)",padding:"var(--space-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-surface)",background:"var(--card)"},u={margin:0,font:"var(--text-label)",color:"var(--text-heading)"},c={width:"100%",padding:"var(--space-2)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-control)",background:"var(--background-secondary)",color:"var(--text-body)",font:"var(--text-body-sm)"},p={display:"flex",gap:"var(--space-2)",flexWrap:"wrap"},h={padding:"var(--space-2) var(--space-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-control)",background:"var(--button-primary-surface)",color:"var(--button-primary-text)",cursor:"pointer"},f={padding:"var(--space-2) var(--space-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-control)",background:"var(--button-secondary-surface)",color:"var(--button-secondary-text)",cursor:"pointer"},v={font:"var(--text-caption)",color:"var(--fg-muted)",display:"flex",flexDirection:"column",gap:"var(--space-1)"},g={font:"var(--text-caption)",color:"var(--fg-muted)",margin:0};function m(e,t){let r={projectId:t,ownerAndRepo:e.ownerAndRepo,headBranchName:e.headBranchName,baseBranchName:e.baseBranchName,title:e.title,body:e.body};return"pr-create"===e.kind?{...r,kind:"pr-create",isDraft:e.isDraft}:{...r,kind:"pr-update",prExternalId:e.prExternalId,convertToDraft:"to-draft"===e.draftTransition,convertFromDraft:"to-ready"===e.draftTransition};}function b(e){return[e.kind,e.ownerAndRepo,e.headBranchName,e.baseBranchName,"pr-update"===e.kind?e.prExternalId:""].join(" ");}function y(e){return /^\d+$/u.test(e);}function x(e){let{form:r,busy:n,onChange:l}=e;return(0,t.jsxs)("div",{style:p,children:[(0,t.jsxs)("label",{style:{...v,flex:1},children:["Repository (owner/repo)"," ",(0,t.jsx)("input",{style:c,value:r.ownerAndRepo,disabled:n,onChange:e=>l("ownerAndRepo",e.target.value)})]}),(0,t.jsxs)("label",{style:{...v,flex:1},children:["Base branch"," ",(0,t.jsx)("input",{style:c,value:r.baseBranchName,disabled:n,onChange:e=>l("baseBranchName",e.target.value),"aria-label":"Base branch"})]})]});}function k(e){let{form:n,busy:l,onChange:i}=e,s=(0,r.useId)(),o="pr-update"===n.kind&&""!==n.prExternalId&&!y(n.prExternalId);return(0,t.jsxs)("section",{style:d,"aria-label":"Pull Request metadata",children:[(0,t.jsxs)("h3",{style:u,children:[(0,t.jsx)(a,{size:12})," Metadata"]}),(0,t.jsxs)("fieldset",{style:{border:"1px solid var(--border-default)",borderRadius:"var(--radius-control)",padding:"var(--space-2)"},children:[(0,t.jsx)("legend",{style:g,children:"Action"}),(0,t.jsxs)("div",{style:p,children:[(0,t.jsxs)("label",{style:{...v,flexDirection:"row",alignItems:"center"},children:[(0,t.jsx)("input",{type:"radio",name:"pull-request-action",checked:"pr-create"===n.kind,disabled:l,onChange:()=>i("kind","pr-create")})," ","Create"]}),(0,t.jsxs)("label",{style:{...v,flexDirection:"row",alignItems:"center"},children:[(0,t.jsx)("input",{type:"radio",name:"pull-request-action",checked:"pr-update"===n.kind,disabled:l,onChange:()=>i("kind","pr-update")})," ","Update"]})]})]}),"pr-update"===n.kind?(0,t.jsxs)("div",{style:p,children:[(0,t.jsxs)("label",{style:{...v,flex:1},children:["Pull Request number"," ",(0,t.jsx)("input",{style:c,inputMode:"numeric",value:n.prExternalId,disabled:l,onChange:e=>i("prExternalId",e.target.value),"aria-label":"Pull Request number","aria-invalid":o,"aria-describedby":o?s:void 0}),o?(0,t.jsx)("p",{id:s,"data-testid":"gpr-pr-number-hint",style:{font:"var(--text-caption)",color:"var(--feedback-danger)",margin:0},children:"Enter the numeric Pull Request number, for example 1499."}):null]}),(0,t.jsxs)("label",{style:{...v,flex:1},children:["Draft state"," ",(0,t.jsxs)("select",{style:c,value:n.draftTransition,disabled:l,onChange:e=>i("draftTransition",e.target.value),"aria-label":"Draft state",children:[(0,t.jsx)("option",{value:"none",children:"No change"}),(0,t.jsx)("option",{value:"to-ready",children:"Mark ready"}),(0,t.jsx)("option",{value:"to-draft",children:"Convert to draft"})]})]})]}):null,(0,t.jsxs)("label",{style:v,children:["Head branch"," ",(0,t.jsx)("input",{style:c,value:n.headBranchName,disabled:l,onChange:e=>i("headBranchName",e.target.value),"aria-label":"Head branch"})]}),(0,t.jsx)(x,{form:n,busy:l,onChange:i}),(0,t.jsxs)("label",{style:v,children:["Title"," ",(0,t.jsx)("input",{style:c,value:n.title,disabled:l,onChange:e=>i("title",e.target.value),"aria-label":"Pull Request title"})]}),(0,t.jsxs)("label",{style:v,children:["Body"," ",(0,t.jsx)("textarea",{style:{...c,minHeight:100,resize:"vertical"},value:n.body,disabled:l,onChange:e=>i("body",e.target.value),"aria-label":"Pull Request body"})]}),(0,t.jsxs)("label",{style:{...v,flexDirection:"row",alignItems:"center"},children:[(0,t.jsx)("input",{type:"checkbox",checked:"pr-create"===n.kind&&n.isDraft,disabled:l||"pr-create"!==n.kind,onChange:e=>i("isDraft",e.target.checked),"aria-label":"Open as draft"})," ","Open as draft"]})]});}function j(e){let{preview:r}=e;return(0,t.jsxs)("section",{style:d,"aria-label":"Readiness","data-testid":"gpr-readiness",children:[(0,t.jsxs)("h3",{style:u,children:[(0,t.jsx)(i,{size:12})," Readiness"]}),(0,t.jsxs)("p",{style:g,"data-field":"objectExists",children:["Remote PR object: ",r.readiness.objectExists?"exists":"not created yet"]}),(0,t.jsxs)("p",{style:g,"data-field":"reviewReady",children:["Ready for review: ",r.readiness.reviewReady?"yes":"no"]}),(0,t.jsxs)("p",{style:g,"data-field":"recommendation",children:["Recommendation: ",r.recommendation]}),(0,t.jsxs)("p",{style:g,"data-field":"policy",children:["Policy: ",r.policyOutcome,void 0!==r.policyBlockReason?` (${r.policyBlockReason})`:""]}),(0,t.jsxs)("p",{style:g,"data-field":"risk",children:["Risk: ",r.riskClass," — ",r.riskNarrative]}),r.readiness.blockerCodes.length>0?(0,t.jsx)("ul",{style:{margin:0,paddingLeft:"var(--space-4)",font:"var(--text-caption)"},children:r.readiness.blockerCodes.map(e=>(0,t.jsxs)("li",{style:{color:"var(--fg-muted)"},"data-blocker":e,children:["blocker: ",e]},e))}):null,r.suggestedLabels.length>0?(0,t.jsxs)("p",{style:g,"data-field":"labels",children:["Suggested labels: ",r.suggestedLabels.join(", ")]}):null,r.suggestedIssueRefs.length>0?(0,t.jsxs)("p",{style:g,"data-field":"linkage",children:["Linked issues: ",r.suggestedIssueRefs.join(", ")]}):null]});}function w(e){var r,n;let{outcome:l,error:a}=e;if(null!==a)return(0,t.jsxs)("p",{role:"alert",style:{font:"var(--text-body-sm)",color:"var(--feedback-danger)"},children:[(0,t.jsx)(i,{size:12})," ",a]});if(null===l)return null;let o=[...(void 0!==l.createdPrExternalId?[`pr: #${l.createdPrExternalId}`]:[]),...(void 0!==l.blockReason?[`reason: ${l.blockReason}`]:[]),...(null!=(r=l.preflightFindingCodes)?r:[]).map(e=>`preflight: ${e}`),...(null!=(n=l.requiredApprovers)?n:[]).map(e=>`approver: ${e}`),...(void 0!==l.prRejectionReason?[`rejected: ${l.prRejectionReason}`]:[]),...(void 0!==l.recoveryDisposition?[`recover: ${l.recoveryDisposition}`]:[]),...(void 0!==l.recoveryActionHint?[`hint: ${l.recoveryActionHint}`]:[]),...(void 0!==l.executionErrorCode?[`error: ${l.executionErrorCode}`]:[])];return(0,t.jsxs)("div",{"data-testid":"gpr-outcome",style:{display:"flex",flexDirection:"column",gap:"var(--space-1)"},children:[(0,t.jsxs)("p",{style:{font:"var(--text-body-sm)",color:"var(--text-body)",margin:0},children:[(0,t.jsx)(s,{size:12})," ",l.actionKind,": ",l.status]}),o.length>0?(0,t.jsx)("ul",{style:{margin:0,paddingLeft:"var(--space-4)",font:"var(--text-caption)"},children:o.map(e=>(0,t.jsx)("li",{style:{color:"var(--fg-muted)"},children:e},e))}):null]});}function E(e){var l;let{client:i,projectId:s,headBranchName:o,ownerAndRepo:d,baseBranchName:c,titleId:v,liveId:g}=e,[x,E]=(0,r.useState)(()=>function(e){let{headBranchName:t,ownerAndRepo:r,baseBranchName:n}=e;return{kind:"pr-create",ownerAndRepo:null!=r?r:"",headBranchName:null!=t?t:"",baseBranchName:null!=n?n:"",title:"",body:"",isDraft:!1,prExternalId:"",draftTransition:"none"};}({headBranchName:o,ownerAndRepo:d,baseBranchName:c})),[R,N]=(0,r.useState)(""),[C,I]=(0,r.useState)(""),S=function(e){let[t,l]=(0,r.useState)({preview:null,outcome:null,error:null,busy:!1}),a=(0,r.useRef)(0),i=(0,r.useCallback)((e,t)=>{t===a.current&&l(t=>({...t,busy:!1,error:e instanceof n.ApiError?`${e.message} (${e.code})`:e instanceof Error?e.message:"An unexpected error occurred."}));},[]),s=(0,r.useCallback)(async t=>{let r=a.current+=1;l(e=>({...e,busy:!0,error:null}));try{let n=await e.prPreview(t);if(r!==a.current)return null;return l(e=>({...e,busy:!1,preview:n})),n;}catch(e){return i(e,r),null;}},[e,i]),o=(0,r.useCallback)(t=>{let r=a.current+=1;l(e=>({...e,busy:!0,error:null,outcome:null})),e.prExecute(t).then(e=>{r===a.current&&l(t=>({...t,busy:!1,outcome:e}));}).catch(e=>{i(e,r);});},[e,i]);return{...t,runPreview:s,runExecute:o};}(i),D=(0,r.useCallback)((e,t)=>{E(r=>({...r,[e]:t}));},[]),$=(0,r.useCallback)(()=>{let e=b(x);I(e),S.runPreview(m(x,s)).then(t=>{null!==t&&(N(e),E(e=>({...e,title:""===e.title?t.composedTitle:e.title,body:""===e.body?t.composedBody:e.body})));});},[S,x,s]),A=(0,r.useCallback)(()=>{I(b(x)),S.runExecute(m(x,s));},[S,x,s]),T=""!==x.ownerAndRepo&&""!==x.headBranchName&&""!==x.baseBranchName&&("pr-create"===x.kind||y(x.prExternalId)),B=T&&""!==x.title,L=b(x),P=R===L?S.preview:null,M=C===L?S.outcome:null,q=C===L?S.error:null;return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-3)",padding:"var(--space-3)",overflow:"auto",height:"100%"},"aria-labelledby":v,children:[(0,t.jsxs)("h2",{id:v,style:{...u,font:"var(--text-title)"},children:[(0,t.jsx)(a,{size:14})," Pull Request"]}),(0,t.jsx)("p",{id:g,"data-testid":"gpr-live",role:"status","aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:(l={busy:S.busy,error:q,outcome:M,preview:P}).busy?"Pull request action running.":null!==l.error?`Pull request action failed: ${l.error}`:null!==l.outcome?`Pull request ${l.outcome.status}.`:null!==l.preview?`Preview ready. Recommendation: ${l.preview.recommendation}.`:""}),(0,t.jsx)(k,{form:x,busy:S.busy,onChange:D}),null!==P?(0,t.jsx)(j,{preview:P}):null,(0,t.jsxs)("div",{style:p,children:[(0,t.jsx)("button",{type:"button",style:f,disabled:S.busy||!T,onClick:$,children:"Preview"}),(0,t.jsx)("button",{type:"button",style:h,disabled:S.busy||!B,onClick:A,"data-testid":"gpr-submit",children:"pr-create"===x.kind?"Create Pull Request":"Update Pull Request"})]}),(0,t.jsx)(w,{outcome:M,error:q})]});}e.s(["GovernedPullRequestCard",0,function(e){let{projectId:n,headBranchName:l,ownerAndRepo:i,baseBranchName:s,client:d=o}=e,u=(0,r.useId)(),c=(0,r.useId)();return void 0===n||""===n?(0,t.jsx)("div",{"data-testid":"gpr-empty",style:{padding:"var(--space-4)",color:"var(--fg-muted)",font:"var(--text-body-sm)"},children:(0,t.jsxs)("p",{children:[(0,t.jsx)(a,{size:13})," Select a project to open a pull request."]})}):(0,t.jsx)(E,{client:d,projectId:n,headBranchName:l,ownerAndRepo:i,baseBranchName:s,titleId:u,liveId:c});}]);},88528,e=>{"use strict";var t=e.i(10582),r=e.i(87032),n=e.i(76055),l=e.i(17161);let a=l.Icons.git,i=l.Icons.info,s=l.Icons.check,o={mergePreview:n.fetchGitDeliveryMergePreview,mergeApprove:n.fetchGitDeliveryMergeApprove,mergeExecute:n.fetchGitDeliveryMergeExecute},d={squash:"Squash and merge",rebase:"Rebase and merge","merge-commit":"Create a merge commit","provider-default":"Provider default"};function u(e){var t;return null!=(t=d[e])?t:e;}let c={display:"flex",flexDirection:"column",gap:"var(--space-2)",padding:"var(--space-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-surface)",background:"var(--card)"},p={margin:0,font:"var(--text-label)",color:"var(--text-heading)"},h={width:"100%",padding:"var(--space-2)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-control)",background:"var(--background-secondary)",color:"var(--text-body)",font:"var(--text-body-sm)"},f={display:"flex",gap:"var(--space-2)",flexWrap:"wrap"},v={padding:"var(--space-2) var(--space-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-control)",background:"var(--button-primary-surface)",color:"var(--button-primary-text)",cursor:"pointer"},g={padding:"var(--space-2) var(--space-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-control)",background:"var(--button-secondary-surface)",color:"var(--button-secondary-text)",cursor:"pointer"},m={font:"var(--text-caption)",color:"var(--fg-muted)",display:"flex",flexDirection:"column",gap:"var(--space-1)"},b={font:"var(--text-caption)",color:"var(--fg-muted)",margin:0};function y(e){return[e.ownerAndRepo,e.prExternalId,e.baseBranchName,e.headBranchName].join(" ");}function x(e){return /^\d+$/u.test(e);}function k(e,t){return{projectId:t,ownerAndRepo:e.ownerAndRepo,prExternalId:e.prExternalId,baseBranchName:e.baseBranchName,headBranchName:e.headBranchName,mergeStrategy:e.mergeStrategy||"provider-default",deleteBranchAfterMerge:e.deleteBranchAfterMerge,...(""===e.expectedHeadRefHash?{}:{expectedHeadRefHash:e.expectedHeadRefHash})};}function j(e){let{form:n,busy:l,onChange:i}=e,s=(0,r.useId)(),o=""!==n.prExternalId&&!x(n.prExternalId);return(0,t.jsxs)("section",{style:c,"aria-label":"Merge target",children:[(0,t.jsxs)("h3",{style:p,children:[(0,t.jsx)(a,{size:12})," Merge target"]}),(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("label",{style:{...m,flex:1},children:["Repository (owner/repo)"," ",(0,t.jsx)("input",{style:h,value:n.ownerAndRepo,disabled:l,onChange:e=>i("ownerAndRepo",e.target.value)})]}),(0,t.jsxs)("label",{style:{...m,flex:1},children:["Pull Request number"," ",(0,t.jsx)("input",{style:h,value:n.prExternalId,disabled:l,onChange:e=>i("prExternalId",e.target.value),"aria-label":"Pull Request number",inputMode:"numeric","aria-invalid":o,"aria-describedby":o?s:void 0}),o?(0,t.jsx)("p",{id:s,"data-testid":"gm-pr-number-hint",style:{font:"var(--text-caption)",color:"var(--feedback-danger)",margin:0},children:"Enter the numeric Pull Request number, for example 1499."}):null]})]}),(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("label",{style:{...m,flex:1},children:["Base branch"," ",(0,t.jsx)("input",{style:h,value:n.baseBranchName,disabled:l,onChange:e=>i("baseBranchName",e.target.value),"aria-label":"Base branch"})]}),(0,t.jsxs)("label",{style:{...m,flex:1},children:["Head branch"," ",(0,t.jsx)("input",{style:h,value:n.headBranchName,disabled:l,onChange:e=>i("headBranchName",e.target.value),"aria-label":"Head branch"})]})]})]});}function w(e){var r;let{form:n,preview:l,busy:i,onChange:s}=e,o=null!=(r=null==l?void 0:l.eligibleStrategies)?r:[],d=null!==l&&!l.requestedStrategyEligible;return(0,t.jsxs)("section",{style:c,"aria-label":"Merge strategy",children:[(0,t.jsxs)("h3",{style:p,children:[(0,t.jsx)(a,{size:12})," Strategy"]}),(0,t.jsxs)("label",{style:m,children:["Merge strategy"," ",(0,t.jsx)("select",{style:h,value:n.mergeStrategy,disabled:i||0===o.length,onChange:e=>s("mergeStrategy",e.target.value),"aria-label":"Merge strategy","data-testid":"gm-strategy",children:0===o.length?(0,t.jsx)("option",{value:"",children:"Run preview to load eligible strategies"}):o.map(e=>(0,t.jsx)("option",{value:e,children:u(e)},e))})]}),d?(0,t.jsxs)("p",{style:b,role:"note","data-field":"strategy-ineligible",children:["The requested strategy “",u(l.requestedStrategy),"” is not eligible.",void 0!==l.selectedDefaultStrategy?` Defaulting to “${u(l.selectedDefaultStrategy)}”.`:""]}):null,(0,t.jsxs)("label",{style:{...m,flexDirection:"row",alignItems:"center"},children:[(0,t.jsx)("input",{type:"checkbox",checked:n.deleteBranchAfterMerge,disabled:i,onChange:e=>s("deleteBranchAfterMerge",e.target.checked),"aria-label":"Delete head branch after merge"})," ","Delete head branch after merge"]})]});}function E(e){let{preview:r}=e;return(0,t.jsxs)("section",{style:c,"aria-label":"Readiness","aria-live":"polite","data-testid":"gm-readiness",children:[(0,t.jsxs)("h3",{style:p,children:[(0,t.jsx)(i,{size:12})," Readiness"]}),(0,t.jsxs)("p",{style:b,"data-field":"mergeable",children:["Mergeable: ",r.readiness.mergeable?"yes":"no"]}),(0,t.jsxs)("p",{style:b,"data-field":"recommendation",children:["Recommendation: ",r.recommendation]}),(0,t.jsxs)("p",{style:b,"data-field":"policy",children:["Policy: ",r.policyOutcome,void 0!==r.policyBlockReason?` (${r.policyBlockReason})`:""]}),(0,t.jsxs)("p",{style:b,"data-field":"risk",children:["Risk: ",r.riskClass," (severity ",r.riskSeverity,")"]}),(0,t.jsxs)("p",{style:b,"data-field":"approval",children:["Final approval required: ",r.requiresApproval?"yes":"no"]}),r.readiness.blockers.length>0?(0,t.jsx)("ul",{style:{margin:0,paddingLeft:"var(--space-4)",font:"var(--text-caption)"},children:r.readiness.blockers.map(e=>(0,t.jsxs)("li",{style:{color:"var(--fg-muted)"},"data-blocker":e.code,children:["blocker: ",e.code," (",e.remediation,")",void 0!==e.actionHint?` → ${e.actionHint}`:""]},e.code))}):null]});}function R(e){let{confirmed:r,busy:n,onChange:l}=e;return(0,t.jsxs)("section",{style:c,"aria-label":"High-risk merge confirmation","data-testid":"gm-approval",children:[(0,t.jsxs)("h3",{style:p,children:[(0,t.jsx)(i,{size:12})," High-risk confirmation"]}),(0,t.jsx)("p",{style:b,children:"This merge is policy-gated as high risk. Confirm explicitly before merging; the server still enforces the approval token."}),(0,t.jsxs)("label",{style:{...m,flexDirection:"row",alignItems:"center"},children:[(0,t.jsx)("input",{type:"checkbox",checked:r,disabled:n,onChange:e=>l(e.target.checked),"aria-label":"I confirm this high-risk merge"})," ","I confirm this high-risk merge"]})]});}function N(e){var r,n,l;let{outcome:a,error:o}=e;if(null!==o)return(0,t.jsxs)("p",{role:"alert",style:{font:"var(--text-body-sm)",color:"var(--feedback-danger)"},children:[(0,t.jsx)(i,{size:12})," ",o]});if(null===a)return null;let d=[...(void 0!==a.merged?[`merged: ${a.merged?"yes":"no"}`]:[]),...(void 0!==a.branchDeleted?[`branch deleted: ${a.branchDeleted?"yes":"no"}`]:[]),...(void 0!==a.blockReason?[`reason: ${a.blockReason}`]:[]),...(void 0!==a.mergeable?[`mergeable: ${a.mergeable?"yes":"no"}`]:[]),...(null!=(r=a.readinessBlockers)?r:[]).map(e=>{let t=void 0!==e.actionHint?` → ${e.actionHint}`:"";return`blocker: ${e.code}${t}`;}),...(null!=(n=a.preflightFindingCodes)?n:[]).map(e=>`preflight: ${e}`),...(null!=(l=a.requiredApprovers)?l:[]).map(e=>`approver: ${e}`),...(void 0!==a.mergeRejectionReason?[`rejected: ${a.mergeRejectionReason}`]:[]),...(void 0!==a.recoveryDisposition?[`recover: ${a.recoveryDisposition}`]:[]),...(void 0!==a.recoveryActionHint?[`hint: ${a.recoveryActionHint}`]:[]),...(void 0!==a.executionErrorCode?[`error: ${a.executionErrorCode}`]:[])];return(0,t.jsxs)("div",{"data-testid":"gm-outcome",style:{display:"flex",flexDirection:"column",gap:"var(--space-1)"},children:[(0,t.jsxs)("p",{style:{font:"var(--text-body-sm)",color:"var(--text-body)",margin:0},children:[(0,t.jsx)(s,{size:12})," ",a.actionKind,": ",a.status]}),d.length>0?(0,t.jsx)("ul",{style:{margin:0,paddingLeft:"var(--space-4)",font:"var(--text-caption)"},children:d.map(e=>(0,t.jsx)("li",{style:{color:"var(--fg-muted)"},children:e},e))}):null]});}function C(e){var l,i,s;let{client:o,projectId:d,headBranchName:u,ownerAndRepo:c,baseBranchName:h,prExternalId:m,titleId:b,liveId:C}=e,[I,S]=(0,r.useState)(()=>function(e){let{headBranchName:t,ownerAndRepo:r,baseBranchName:n,prExternalId:l}=e;return{ownerAndRepo:null!=r?r:"",prExternalId:null!=l?l:"",baseBranchName:null!=n?n:"",headBranchName:null!=t?t:"",mergeStrategy:"",deleteBranchAfterMerge:!1,expectedHeadRefHash:""};}({headBranchName:u,ownerAndRepo:c,baseBranchName:h,prExternalId:m})),[D,$]=(0,r.useState)(!1),[A,T]=(0,r.useState)(""),[B,L]=(0,r.useState)(""),P=function(e){let[t,l]=(0,r.useState)({preview:null,outcome:null,error:null,busy:!1}),a=(0,r.useRef)(0),i=(0,r.useCallback)((e,t)=>{t===a.current&&l(t=>({...t,busy:!1,error:e instanceof n.ApiError?`${e.message} (${e.code})`:e instanceof Error?e.message:"An unexpected error occurred."}));},[]),s=(0,r.useCallback)(async t=>{let r=a.current+=1;l(e=>({...e,busy:!0,error:null}));try{let n=await e.mergePreview(t);if(r!==a.current)return null;return l(e=>({...e,busy:!1,preview:n})),n;}catch(e){return i(e,r),null;}},[e,i]),o=(0,r.useCallback)((t,r)=>{let n=a.current+=1;l(e=>({...e,busy:!0,error:null,outcome:null})),(r?e.mergeApprove(t).then(e=>({...t,approval:e.approval})):Promise.resolve(t)).then(t=>e.mergeExecute(t)).then(e=>{n===a.current&&l(t=>({...t,busy:!1,outcome:e}));}).catch(e=>{i(e,n);});},[e,i]);return{...t,runPreview:s,runExecute:o};}(o),M=(0,r.useCallback)((e,t)=>{S(r=>({...r,[e]:t}));},[]),q=(0,r.useCallback)(()=>{let e=y(I);L(e),P.runPreview(k(I,d)).then(t=>{var r,n;if(null===t)return;let l=null!=(r=null!=(n=t.selectedDefaultStrategy)?n:t.eligibleStrategies[0])?r:"";S(e=>{var r;return{...e,mergeStrategy:l,expectedHeadRefHash:null!=(r=t.headRefHash)?r:""};}),T(e),$(!1);});},[P,I,d]),H=y(I),O=A===H?P.preview:null,_=null!=(l=null==O?void 0:O.requiresApproval)&&l,W=(0,r.useCallback)(()=>{L(y(I)),P.runExecute(k(I,d),_);},[P,I,d,_]),F=""!==I.ownerAndRepo&&x(I.prExternalId)&&""!==I.baseBranchName&&""!==I.headBranchName,z=null!=(i=null==O?void 0:O.readiness.mergeable)&&i,K=null!==O,V=B===H?P.outcome:null,U=B===H?P.error:null,G=F&&K&&""!==I.mergeStrategy&&z&&(!_||D);return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-3)",padding:"var(--space-3)",overflow:"auto",height:"100%"},"aria-labelledby":b,children:[(0,t.jsxs)("h2",{id:b,style:{...p,font:"var(--text-title)"},children:[(0,t.jsx)(a,{size:14})," Merge"]}),(0,t.jsx)("p",{id:C,"data-testid":"gm-live",role:"status","aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:(s={busy:P.busy,error:U,outcome:V,preview:O}).busy?"Merge action running.":null!==s.error?`Merge action failed: ${s.error}`:null!==s.outcome?`Merge ${s.outcome.status}.`:null!==s.preview?`Preview ready. Recommendation: ${s.preview.recommendation}.`:""}),(0,t.jsx)(j,{form:I,busy:P.busy,onChange:M}),(0,t.jsx)(w,{form:I,preview:O,busy:P.busy,onChange:M}),null!==O?(0,t.jsx)(E,{preview:O}):null,_?(0,t.jsx)(R,{confirmed:D,busy:P.busy,onChange:$}):null,(0,t.jsxs)("div",{style:f,children:[(0,t.jsx)("button",{type:"button",style:g,disabled:P.busy||!F,onClick:q,children:"Preview"}),(0,t.jsx)("button",{type:"button",style:v,disabled:P.busy||!G,onClick:W,"data-testid":"gm-submit",children:"Merge Pull Request"})]}),(0,t.jsx)(N,{outcome:V,error:U})]});}e.s(["GovernedMergeCard",0,function(e){let{projectId:n,headBranchName:l,ownerAndRepo:i,baseBranchName:s,prExternalId:d,client:u=o}=e,c=(0,r.useId)(),p=(0,r.useId)();return void 0===n||""===n?(0,t.jsx)("div",{"data-testid":"gm-empty",style:{padding:"var(--space-4)",color:"var(--fg-muted)",font:"var(--text-body-sm)"},children:(0,t.jsxs)("p",{children:[(0,t.jsx)(a,{size:13})," Select a project to open a merge."]})}):(0,t.jsx)(C,{client:u,projectId:n,headBranchName:l,ownerAndRepo:i,baseBranchName:s,prExternalId:d,titleId:c,liveId:p});}]);}]);