prism0x2a 0.7.1 → 0.7.2

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 (300) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +24 -0
  5. package/.next/standalone/.next/required-server-files.json +1 -1
  6. package/.next/standalone/.next/routes-manifest.json +6 -0
  7. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  17. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  20. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next/standalone/.next/server/app/amber/capabilities/[id]/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/amber/capabilities/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/amber/capabilities.html +1 -1
  26. package/.next/standalone/.next/server/app/amber/capabilities.rsc +3 -3
  27. package/.next/standalone/.next/server/app/amber/capabilities.segments/_full.segment.rsc +3 -3
  28. package/.next/standalone/.next/server/app/amber/capabilities.segments/_head.segment.rsc +1 -1
  29. package/.next/standalone/.next/server/app/amber/capabilities.segments/_index.segment.rsc +2 -2
  30. package/.next/standalone/.next/server/app/amber/capabilities.segments/_tree.segment.rsc +2 -2
  31. package/.next/standalone/.next/server/app/amber/capabilities.segments/amber/capabilities/__PAGE__.segment.rsc +2 -2
  32. package/.next/standalone/.next/server/app/amber/capabilities.segments/amber/capabilities.segment.rsc +1 -1
  33. package/.next/standalone/.next/server/app/amber/capabilities.segments/amber.segment.rsc +1 -1
  34. package/.next/standalone/.next/server/app/amber/coverage/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/amber/coverage.html +1 -1
  36. package/.next/standalone/.next/server/app/amber/coverage.rsc +3 -3
  37. package/.next/standalone/.next/server/app/amber/coverage.segments/_full.segment.rsc +3 -3
  38. package/.next/standalone/.next/server/app/amber/coverage.segments/_head.segment.rsc +1 -1
  39. package/.next/standalone/.next/server/app/amber/coverage.segments/_index.segment.rsc +2 -2
  40. package/.next/standalone/.next/server/app/amber/coverage.segments/_tree.segment.rsc +2 -2
  41. package/.next/standalone/.next/server/app/amber/coverage.segments/amber/coverage/__PAGE__.segment.rsc +2 -2
  42. package/.next/standalone/.next/server/app/amber/coverage.segments/amber/coverage.segment.rsc +1 -1
  43. package/.next/standalone/.next/server/app/amber/coverage.segments/amber.segment.rsc +1 -1
  44. package/.next/standalone/.next/server/app/amber/files/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/amber/files.html +1 -1
  46. package/.next/standalone/.next/server/app/amber/files.rsc +3 -3
  47. package/.next/standalone/.next/server/app/amber/files.segments/_full.segment.rsc +3 -3
  48. package/.next/standalone/.next/server/app/amber/files.segments/_head.segment.rsc +1 -1
  49. package/.next/standalone/.next/server/app/amber/files.segments/_index.segment.rsc +2 -2
  50. package/.next/standalone/.next/server/app/amber/files.segments/_tree.segment.rsc +2 -2
  51. package/.next/standalone/.next/server/app/amber/files.segments/amber/files/__PAGE__.segment.rsc +2 -2
  52. package/.next/standalone/.next/server/app/amber/files.segments/amber/files.segment.rsc +1 -1
  53. package/.next/standalone/.next/server/app/amber/files.segments/amber.segment.rsc +1 -1
  54. package/.next/standalone/.next/server/app/amber/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/amber.html +1 -1
  56. package/.next/standalone/.next/server/app/amber.rsc +3 -3
  57. package/.next/standalone/.next/server/app/amber.segments/_full.segment.rsc +3 -3
  58. package/.next/standalone/.next/server/app/amber.segments/_head.segment.rsc +1 -1
  59. package/.next/standalone/.next/server/app/amber.segments/_index.segment.rsc +2 -2
  60. package/.next/standalone/.next/server/app/amber.segments/_tree.segment.rsc +2 -2
  61. package/.next/standalone/.next/server/app/amber.segments/amber/__PAGE__.segment.rsc +2 -2
  62. package/.next/standalone/.next/server/app/amber.segments/amber.segment.rsc +1 -1
  63. package/.next/standalone/.next/server/app/api/amber/scan/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/blue/scan/route.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/api/green/cross-layer/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/green/queries/[id]/run/route.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/api/monorepo/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/blue/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/blue/recommendations/[id]/page_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/blue/recommendations/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/blue/recommendations.html +1 -1
  72. package/.next/standalone/.next/server/app/blue/recommendations.rsc +3 -3
  73. package/.next/standalone/.next/server/app/blue/recommendations.segments/_full.segment.rsc +3 -3
  74. package/.next/standalone/.next/server/app/blue/recommendations.segments/_head.segment.rsc +1 -1
  75. package/.next/standalone/.next/server/app/blue/recommendations.segments/_index.segment.rsc +2 -2
  76. package/.next/standalone/.next/server/app/blue/recommendations.segments/_tree.segment.rsc +2 -2
  77. package/.next/standalone/.next/server/app/blue/recommendations.segments/blue/recommendations/__PAGE__.segment.rsc +2 -2
  78. package/.next/standalone/.next/server/app/blue/recommendations.segments/blue/recommendations.segment.rsc +1 -1
  79. package/.next/standalone/.next/server/app/blue/recommendations.segments/blue.segment.rsc +1 -1
  80. package/.next/standalone/.next/server/app/blue/sessions/[id]/page_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/blue/sessions/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/blue/sessions.html +1 -1
  83. package/.next/standalone/.next/server/app/blue/sessions.rsc +3 -3
  84. package/.next/standalone/.next/server/app/blue/sessions.segments/_full.segment.rsc +3 -3
  85. package/.next/standalone/.next/server/app/blue/sessions.segments/_head.segment.rsc +1 -1
  86. package/.next/standalone/.next/server/app/blue/sessions.segments/_index.segment.rsc +2 -2
  87. package/.next/standalone/.next/server/app/blue/sessions.segments/_tree.segment.rsc +2 -2
  88. package/.next/standalone/.next/server/app/blue/sessions.segments/blue/sessions/__PAGE__.segment.rsc +2 -2
  89. package/.next/standalone/.next/server/app/blue/sessions.segments/blue/sessions.segment.rsc +1 -1
  90. package/.next/standalone/.next/server/app/blue/sessions.segments/blue.segment.rsc +1 -1
  91. package/.next/standalone/.next/server/app/blue.html +1 -1
  92. package/.next/standalone/.next/server/app/blue.rsc +3 -3
  93. package/.next/standalone/.next/server/app/blue.segments/_full.segment.rsc +3 -3
  94. package/.next/standalone/.next/server/app/blue.segments/_head.segment.rsc +1 -1
  95. package/.next/standalone/.next/server/app/blue.segments/_index.segment.rsc +2 -2
  96. package/.next/standalone/.next/server/app/blue.segments/_tree.segment.rsc +2 -2
  97. package/.next/standalone/.next/server/app/blue.segments/blue/__PAGE__.segment.rsc +2 -2
  98. package/.next/standalone/.next/server/app/blue.segments/blue.segment.rsc +1 -1
  99. package/.next/standalone/.next/server/app/green/cross-layer/page_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/green/cross-layer.html +1 -1
  101. package/.next/standalone/.next/server/app/green/cross-layer.rsc +3 -3
  102. package/.next/standalone/.next/server/app/green/cross-layer.segments/_full.segment.rsc +3 -3
  103. package/.next/standalone/.next/server/app/green/cross-layer.segments/_head.segment.rsc +1 -1
  104. package/.next/standalone/.next/server/app/green/cross-layer.segments/_index.segment.rsc +2 -2
  105. package/.next/standalone/.next/server/app/green/cross-layer.segments/_tree.segment.rsc +2 -2
  106. package/.next/standalone/.next/server/app/green/cross-layer.segments/green/cross-layer/__PAGE__.segment.rsc +2 -2
  107. package/.next/standalone/.next/server/app/green/cross-layer.segments/green/cross-layer.segment.rsc +1 -1
  108. package/.next/standalone/.next/server/app/green/cross-layer.segments/green.segment.rsc +1 -1
  109. package/.next/standalone/.next/server/app/green/insights/[id]/page_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/green/insights/page_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/green/insights.html +1 -1
  112. package/.next/standalone/.next/server/app/green/insights.rsc +3 -3
  113. package/.next/standalone/.next/server/app/green/insights.segments/_full.segment.rsc +3 -3
  114. package/.next/standalone/.next/server/app/green/insights.segments/_head.segment.rsc +1 -1
  115. package/.next/standalone/.next/server/app/green/insights.segments/_index.segment.rsc +2 -2
  116. package/.next/standalone/.next/server/app/green/insights.segments/_tree.segment.rsc +2 -2
  117. package/.next/standalone/.next/server/app/green/insights.segments/green/insights/__PAGE__.segment.rsc +2 -2
  118. package/.next/standalone/.next/server/app/green/insights.segments/green/insights.segment.rsc +1 -1
  119. package/.next/standalone/.next/server/app/green/insights.segments/green.segment.rsc +1 -1
  120. package/.next/standalone/.next/server/app/green/page_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/green/queries/[id]/page_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/green/queries/page_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/green/queries.html +1 -1
  124. package/.next/standalone/.next/server/app/green/queries.rsc +3 -3
  125. package/.next/standalone/.next/server/app/green/queries.segments/_full.segment.rsc +3 -3
  126. package/.next/standalone/.next/server/app/green/queries.segments/_head.segment.rsc +1 -1
  127. package/.next/standalone/.next/server/app/green/queries.segments/_index.segment.rsc +2 -2
  128. package/.next/standalone/.next/server/app/green/queries.segments/_tree.segment.rsc +2 -2
  129. package/.next/standalone/.next/server/app/green/queries.segments/green/queries/__PAGE__.segment.rsc +2 -2
  130. package/.next/standalone/.next/server/app/green/queries.segments/green/queries.segment.rsc +1 -1
  131. package/.next/standalone/.next/server/app/green/queries.segments/green.segment.rsc +1 -1
  132. package/.next/standalone/.next/server/app/green.html +1 -1
  133. package/.next/standalone/.next/server/app/green.rsc +3 -3
  134. package/.next/standalone/.next/server/app/green.segments/_full.segment.rsc +3 -3
  135. package/.next/standalone/.next/server/app/green.segments/_head.segment.rsc +1 -1
  136. package/.next/standalone/.next/server/app/green.segments/_index.segment.rsc +2 -2
  137. package/.next/standalone/.next/server/app/green.segments/_tree.segment.rsc +2 -2
  138. package/.next/standalone/.next/server/app/green.segments/green/__PAGE__.segment.rsc +2 -2
  139. package/.next/standalone/.next/server/app/green.segments/green.segment.rsc +1 -1
  140. package/.next/standalone/.next/server/app/index.html +1 -1
  141. package/.next/standalone/.next/server/app/index.rsc +3 -3
  142. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  143. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  144. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  145. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
  146. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  147. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/pricing/page/app-paths-manifest.json +3 -0
  149. package/.next/standalone/.next/server/app/pricing/page/build-manifest.json +16 -0
  150. package/.next/standalone/.next/server/app/pricing/page/next-font-manifest.json +10 -0
  151. package/.next/standalone/.next/server/app/pricing/page/react-loadable-manifest.json +1 -0
  152. package/.next/standalone/.next/server/app/pricing/page/server-reference-manifest.json +4 -0
  153. package/.next/standalone/.next/server/app/pricing/page.js +14 -0
  154. package/.next/standalone/.next/server/app/pricing/page.js.map +5 -0
  155. package/.next/standalone/.next/server/app/pricing/page.js.nft.json +1 -0
  156. package/.next/standalone/.next/server/app/pricing/page_client-reference-manifest.js +3 -0
  157. package/.next/standalone/.next/server/app/pricing.html +1 -0
  158. package/.next/standalone/.next/server/app/pricing.meta +15 -0
  159. package/.next/standalone/.next/server/app/pricing.rsc +21 -0
  160. package/.next/standalone/.next/server/app/pricing.segments/_full.segment.rsc +21 -0
  161. package/.next/standalone/.next/server/app/pricing.segments/_head.segment.rsc +6 -0
  162. package/.next/standalone/.next/server/app/pricing.segments/_index.segment.rsc +5 -0
  163. package/.next/standalone/.next/server/app/pricing.segments/_tree.segment.rsc +3 -0
  164. package/.next/standalone/.next/server/app/pricing.segments/pricing/__PAGE__.segment.rsc +9 -0
  165. package/.next/standalone/.next/server/app/pricing.segments/pricing.segment.rsc +5 -0
  166. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  167. package/.next/standalone/.next/server/app/settings.html +2 -2
  168. package/.next/standalone/.next/server/app/settings.rsc +3 -3
  169. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +3 -3
  170. package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  171. package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  172. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  173. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  174. package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  175. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  176. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08rxe0c._.js +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0es1n-0._.js +3 -0
  178. package/.next/standalone/.next/server/chunks/ssr/_0a2egyj._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_pricing_page_actions_0gvv0qw.js +3 -0
  180. package/.next/standalone/.next/server/chunks/ssr/app_amber_capabilities_[id]_page_tsx_12~.miw._.js +1 -1
  181. package/.next/standalone/.next/server/chunks/ssr/app_amber_capabilities_page_tsx_0.t9mpr._.js +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/app_amber_coverage_page_tsx_01yia_n._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/app_amber_files_page_tsx_00pdkc~._.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/app_amber_page_tsx_0ihx6zl._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/app_blue_page_tsx_0zg5eg-._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/app_blue_recommendations_[id]_page_tsx_10zzlnx._.js +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/app_blue_recommendations_page_tsx_08w-50l._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/app_blue_sessions_[id]_page_tsx_0_~w1xj._.js +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/app_blue_sessions_page_tsx_0kbuf.c._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/app_green_cross-layer_page_tsx_0a80o-~._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/app_green_insights_[id]_page_tsx_0se6uk1._.js +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/app_green_insights_page_tsx_04g8_lf._.js +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/app_green_page_tsx_10g2g6w._.js +1 -1
  194. package/.next/standalone/.next/server/chunks/ssr/app_green_queries_[id]_page_tsx_0hg.qma._.js +1 -1
  195. package/.next/standalone/.next/server/chunks/ssr/app_green_queries_page_tsx_0.p0r7z._.js +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js +1 -1
  197. package/.next/standalone/.next/server/chunks/ssr/app_pricing_page_tsx_0uxncj9._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_tsx_0~q~t-v._.js +1 -1
  199. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_09d0h78.js +4 -0
  200. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  201. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  202. package/.next/standalone/.next/server/next-font-manifest.json +3 -0
  203. package/.next/standalone/.next/server/pages/404.html +1 -1
  204. package/.next/standalone/.next/server/pages/500.html +1 -1
  205. package/.next/standalone/.next/static/chunks/{084jj1qvspd5q.js → 0-nogwaahf00r.js} +1 -1
  206. package/.next/standalone/.next/static/chunks/{060eaovbkat-h.js → 0-ozct-0~_~y0.js} +1 -1
  207. package/.next/{static/chunks/0z5b7hbocrn0k.js → standalone/.next/static/chunks/0043va.q9c120.js} +1 -1
  208. package/.next/standalone/.next/static/{static/chunks/13gu~y8285gmc.js → chunks/0062k_6y6ie8k.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/{0~fd5.2v15..-.js → 01x6uo5zvt23j.js} +1 -1
  210. package/.next/standalone/.next/static/chunks/03f4g06bhu.q-.js +1 -0
  211. package/.next/standalone/.next/static/chunks/06ciexs8mfsoh.js +1 -0
  212. package/.next/standalone/.next/static/{static/chunks/0bn7nidxp0z1s.js → chunks/06lbhw~p794rn.js} +1 -1
  213. package/.next/standalone/.next/static/{static/chunks/0pzddagh.5c96.js → chunks/0921_~z_rxr9h.js} +1 -1
  214. package/.next/standalone/.next/static/chunks/{025srq69s.4vw.js → 0_uy4bqezjrpu.js} +1 -1
  215. package/.next/standalone/.next/static/chunks/0aqr1e8db8tr2.js +1 -0
  216. package/.next/{static/chunks/0r_f617o--_ew.js → standalone/.next/static/chunks/0gtjarbzj_b0s.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/0i826dpus7xfj.js +1 -0
  218. package/.next/standalone/.next/static/chunks/0l.f7bl92nc~2.css +2 -0
  219. package/.next/{static/chunks/040ishla0m-l2.js → standalone/.next/static/chunks/0mtsra7dpsxy_.js} +1 -1
  220. package/.next/{static/chunks/03pm.ery8hgop.js → standalone/.next/static/chunks/0nc15zt~yfrj3.js} +1 -1
  221. package/.next/{static/chunks/154-kyu.ej3ea.js → standalone/.next/static/chunks/0ptkiyk6p_hgq.js} +1 -1
  222. package/.next/standalone/.next/static/{static/chunks/05dd-x8ti6pfs.js → chunks/0vsoyv8nkj.rx.js} +1 -1
  223. package/.next/{static/chunks/0xyj3.tdpvqe4.js → standalone/.next/static/chunks/0zpu7b02c6huw.js} +1 -1
  224. package/.next/standalone/.next/static/chunks/{0vuk.7e07_u10.js → 10ibvf69namr1.js} +1 -1
  225. package/.next/standalone/.next/static/{static/chunks/0ck1t6t3dy~gs.js → chunks/1655x4_8fq5li.js} +1 -1
  226. package/.next/standalone/.next/static/static/chunks/{084jj1qvspd5q.js → 0-nogwaahf00r.js} +1 -1
  227. package/.next/{static/chunks/060eaovbkat-h.js → standalone/.next/static/static/chunks/0-ozct-0~_~y0.js} +1 -1
  228. package/.next/standalone/.next/static/static/chunks/{0z5b7hbocrn0k.js → 0043va.q9c120.js} +1 -1
  229. package/.next/{static/chunks/13gu~y8285gmc.js → standalone/.next/static/static/chunks/0062k_6y6ie8k.js} +1 -1
  230. package/.next/{static/chunks/0~fd5.2v15..-.js → standalone/.next/static/static/chunks/01x6uo5zvt23j.js} +1 -1
  231. package/.next/standalone/.next/static/static/chunks/03f4g06bhu.q-.js +1 -0
  232. package/.next/standalone/.next/static/static/chunks/06ciexs8mfsoh.js +1 -0
  233. package/.next/{static/chunks/0bn7nidxp0z1s.js → standalone/.next/static/static/chunks/06lbhw~p794rn.js} +1 -1
  234. package/.next/standalone/.next/static/{chunks/0pzddagh.5c96.js → static/chunks/0921_~z_rxr9h.js} +1 -1
  235. package/.next/{static/chunks/025srq69s.4vw.js → standalone/.next/static/static/chunks/0_uy4bqezjrpu.js} +1 -1
  236. package/.next/standalone/.next/static/static/chunks/0aqr1e8db8tr2.js +1 -0
  237. package/.next/standalone/.next/static/static/chunks/{0r_f617o--_ew.js → 0gtjarbzj_b0s.js} +1 -1
  238. package/.next/standalone/.next/static/static/chunks/0i826dpus7xfj.js +1 -0
  239. package/.next/standalone/.next/static/static/chunks/0l.f7bl92nc~2.css +2 -0
  240. package/.next/standalone/.next/static/static/chunks/{040ishla0m-l2.js → 0mtsra7dpsxy_.js} +1 -1
  241. package/.next/standalone/.next/static/{chunks/03pm.ery8hgop.js → static/chunks/0nc15zt~yfrj3.js} +1 -1
  242. package/.next/standalone/.next/static/static/chunks/{154-kyu.ej3ea.js → 0ptkiyk6p_hgq.js} +1 -1
  243. package/.next/{static/chunks/05dd-x8ti6pfs.js → standalone/.next/static/static/chunks/0vsoyv8nkj.rx.js} +1 -1
  244. package/.next/standalone/.next/static/{chunks/0xyj3.tdpvqe4.js → static/chunks/0zpu7b02c6huw.js} +1 -1
  245. package/.next/standalone/.next/static/static/chunks/{0vuk.7e07_u10.js → 10ibvf69namr1.js} +1 -1
  246. package/.next/{static/chunks/0ck1t6t3dy~gs.js → standalone/.next/static/static/chunks/1655x4_8fq5li.js} +1 -1
  247. package/.next/standalone/CHANGELOG.md +12 -0
  248. package/.next/standalone/app/pricing/page.tsx +289 -0
  249. package/.next/standalone/app/settings/page.tsx +8 -4
  250. package/.next/standalone/components/PrismDock.tsx +1 -0
  251. package/.next/standalone/components/pricing/BillingToggle.tsx +53 -0
  252. package/.next/standalone/components/pricing/FeatureList.tsx +19 -0
  253. package/.next/standalone/components/pricing/PricingCard.tsx +120 -0
  254. package/.next/standalone/package.json +1 -1
  255. package/.next/standalone/server.js +1 -1
  256. package/.next/standalone/tsconfig.tsbuildinfo +1 -1
  257. package/.next/static/chunks/{084jj1qvspd5q.js → 0-nogwaahf00r.js} +1 -1
  258. package/.next/{standalone/.next/static/static/chunks/060eaovbkat-h.js → static/chunks/0-ozct-0~_~y0.js} +1 -1
  259. package/.next/{standalone/.next/static/chunks/0z5b7hbocrn0k.js → static/chunks/0043va.q9c120.js} +1 -1
  260. package/.next/{standalone/.next/static/chunks/13gu~y8285gmc.js → static/chunks/0062k_6y6ie8k.js} +1 -1
  261. package/.next/{standalone/.next/static/static/chunks/0~fd5.2v15..-.js → static/chunks/01x6uo5zvt23j.js} +1 -1
  262. package/.next/static/chunks/03f4g06bhu.q-.js +1 -0
  263. package/.next/static/chunks/06ciexs8mfsoh.js +1 -0
  264. package/.next/{standalone/.next/static/chunks/0bn7nidxp0z1s.js → static/chunks/06lbhw~p794rn.js} +1 -1
  265. package/.next/static/chunks/{0pzddagh.5c96.js → 0921_~z_rxr9h.js} +1 -1
  266. package/.next/{standalone/.next/static/static/chunks/025srq69s.4vw.js → static/chunks/0_uy4bqezjrpu.js} +1 -1
  267. package/.next/static/chunks/0aqr1e8db8tr2.js +1 -0
  268. package/.next/{standalone/.next/static/chunks/0r_f617o--_ew.js → static/chunks/0gtjarbzj_b0s.js} +1 -1
  269. package/.next/static/chunks/0i826dpus7xfj.js +1 -0
  270. package/.next/static/chunks/0l.f7bl92nc~2.css +2 -0
  271. package/.next/{standalone/.next/static/chunks/040ishla0m-l2.js → static/chunks/0mtsra7dpsxy_.js} +1 -1
  272. package/.next/{standalone/.next/static/static/chunks/03pm.ery8hgop.js → static/chunks/0nc15zt~yfrj3.js} +1 -1
  273. package/.next/{standalone/.next/static/chunks/154-kyu.ej3ea.js → static/chunks/0ptkiyk6p_hgq.js} +1 -1
  274. package/.next/{standalone/.next/static/chunks/05dd-x8ti6pfs.js → static/chunks/0vsoyv8nkj.rx.js} +1 -1
  275. package/.next/{standalone/.next/static/static/chunks/0xyj3.tdpvqe4.js → static/chunks/0zpu7b02c6huw.js} +1 -1
  276. package/.next/static/chunks/{0vuk.7e07_u10.js → 10ibvf69namr1.js} +1 -1
  277. package/.next/{standalone/.next/static/chunks/0ck1t6t3dy~gs.js → static/chunks/1655x4_8fq5li.js} +1 -1
  278. package/CHANGELOG.md +12 -0
  279. package/package.json +1 -1
  280. package/.next/standalone/.next/static/chunks/0-u-st8-.soco.js +0 -1
  281. package/.next/standalone/.next/static/chunks/07bef4gh~ubvq.js +0 -1
  282. package/.next/standalone/.next/static/chunks/07~.mame73grt.js +0 -1
  283. package/.next/standalone/.next/static/chunks/0ddo77uynla4l.css +0 -2
  284. package/.next/standalone/.next/static/static/chunks/0-u-st8-.soco.js +0 -1
  285. package/.next/standalone/.next/static/static/chunks/07bef4gh~ubvq.js +0 -1
  286. package/.next/standalone/.next/static/static/chunks/07~.mame73grt.js +0 -1
  287. package/.next/standalone/.next/static/static/chunks/0ddo77uynla4l.css +0 -2
  288. package/.next/static/chunks/0-u-st8-.soco.js +0 -1
  289. package/.next/static/chunks/07bef4gh~ubvq.js +0 -1
  290. package/.next/static/chunks/07~.mame73grt.js +0 -1
  291. package/.next/static/chunks/0ddo77uynla4l.css +0 -2
  292. /package/.next/standalone/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_buildManifest.js +0 -0
  293. /package/.next/standalone/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_clientMiddlewareManifest.js +0 -0
  294. /package/.next/standalone/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_ssgManifest.js +0 -0
  295. /package/.next/standalone/.next/static/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_buildManifest.js +0 -0
  296. /package/.next/standalone/.next/static/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_clientMiddlewareManifest.js +0 -0
  297. /package/.next/standalone/.next/static/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_ssgManifest.js +0 -0
  298. /package/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_buildManifest.js +0 -0
  299. /package/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_clientMiddlewareManifest.js +0 -0
  300. /package/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let s=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",l=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(s.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${l}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t){let r=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=s(e,n)),t&&(l.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(18967),l=e.r(52817);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return y}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let s=e.r(90809),a=e.r(43476),o=s._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),g=e.r(9396);function m(t){var r,n;let l,s,m,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:k,children:_,prefetch:w=null,passHref:C,replace:S,shallow:P,scroll:E,onClick:R,onMouseEnter:T,onTouchStart:O,legacyBehavior:I=!1,onNavigate:L,transitionTypes:A,ref:U,unstable_dynamicOnHover:M,...$}=t;l=_,I&&("string"==typeof l||"number"==typeof l)&&(l=(0,a.jsx)("a",{children:l}));let B=o.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(n=w)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,K="string"==typeof(r=k||N)?r:(0,i.formatUrl)(r);if(I){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=o.default.Children.only(l)}let W=I?s&&"object"==typeof s&&s.ref:U,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),G={ref:(0,u.useMergedRef)(z,W),onClick(t){I||"function"!=typeof R||R(t),I&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!B||t.defaultPrevented||function(t,r,n,l,s,a,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,l?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,i)})}}(t,K,v,S,E,L,A)},onMouseEnter(e){I||"function"!=typeof T||T(e),I&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){I||"function"!=typeof O||O(e),I&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,d.isAbsoluteUrl)(K)?G.href=K:I&&!C&&("a"!==s.type||"href"in s.props)||(G.href=(0,p.addBasePath)(K)),m=I?o.default.cloneElement(s,G):(0,a.jsx)("a",{...$,...G,children:l}),(0,a.jsx)(b.Provider,{value:y,children:m})}e.r(84508);let b=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(18566),l=e.i(71645);let s={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function a(e){return"free"!==s[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,a],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:n,isPro:s=!1}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=a("monorepo")&&!s;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{n(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{n(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,n]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>n(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[n,s]=(0,l.useState)(null),[a,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),s(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,l.useCallback)(async t=>{s(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=n?`&workspace=${encodeURIComponent(n)}`:"";return{monorepo:t,activeWorkspace:n,setActiveWorkspace:i,ready:a,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,l.useState)(null),[n,s]=(0,l.useState)(!1),[a,o]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>s(!0))},[e,a]);let i=(0,l.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:n,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,n.usePathname)(),{tq:l}=c(),{monorepo:s,activeWorkspace:a,setActiveWorkspace:o}=u(l),{isPro:d}=p(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:n,label:l,color:s})=>{let a=e.startsWith(n);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:n,className:"text-sm font-medium transition-colors px-1",style:{color:a?s??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},n)}),s&&"single"!==s.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:s,activeWorkspace:a,onSelect:o,isPro:d})]})]})}],50667)},83329,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(22016),l=e.i(50667);let s="rgb(52,211,153)",a={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},o={pending:"rgb(148,163,184)",accepted:s,rejected:"rgb(248,113,113)"};function i({label:e,children:r}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-widest",children:e}),(0,t.jsx)("div",{className:"text-sm text-slate-300 leading-relaxed",children:r})]})}e.s(["default",0,function({params:e}){let{id:c}=(0,r.use)(e),u=decodeURIComponent(c),[d,p]=(0,r.useState)(null),[f,x]=(0,r.useState)(!0),[h,g]=(0,r.useState)(!1),[m,b]=(0,r.useState)(!1);async function y(e){if(d){b(!0);try{(await fetch(`/api/green/insights/${encodeURIComponent(u)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e})})).ok&&p(t=>t?{...t,status:e}:t)}finally{b(!1)}}}if((0,r.useEffect)(()=>{fetch(`/api/green/insights/${encodeURIComponent(u)}`).then(async e=>{404===e.status?g(!0):p((await e.json()).insight)}).catch(()=>g(!0)).finally(()=>x(!1))},[u]),f)return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-slate-500 text-sm",children:"Loading…"})})]});if(h||!d)return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[(0,t.jsx)("p",{className:"text-slate-400",children:"Insight not found."}),(0,t.jsx)(n.default,{href:"/green/insights",className:"text-sm hover:underline",style:{color:s},children:"← Insights"})]})]});let j=d.status??("auto"===d.kind?"pending":void 0);return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center gap-2 text-sm",children:[(0,t.jsx)(n.default,{href:"/green",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"GREEN"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)(n.default,{href:"/green/insights",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"Insights"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("span",{className:"text-slate-400 truncate max-w-xs",children:d.title})]}),(0,t.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold text-slate-100 flex-1",children:d.title}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full",style:{background:"rgba(52,211,153,0.1)",color:s,border:"1px solid rgba(52,211,153,0.25)"},children:d.kind}),j&&(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full",style:{background:(o[j]??"rgb(148,163,184)")+"15",color:o[j]??"rgb(148,163,184)",border:`1px solid ${o[j]??"rgb(148,163,184)"}28`},children:j})]})]}),d.generated_at&&(0,t.jsxs)("p",{className:"text-xs text-slate-600 font-mono",children:["Generated ",new Date(d.generated_at).toLocaleString()]})]}),(0,t.jsxs)("div",{className:"w-full rounded-xl p-6 flex flex-col gap-5",style:a,children:[(0,t.jsx)(i,{label:"Description",children:d.description}),(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),(0,t.jsx)(i,{label:"Prompt Template",children:(0,t.jsx)("pre",{className:"text-xs font-mono text-slate-400 bg-slate-900/60 rounded-lg p-3 overflow-auto leading-relaxed whitespace-pre-wrap",children:d.prompt_template})}),d.supporting_evidence&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),d.supporting_evidence.capability_ids?.length?(0,t.jsx)(i,{label:"Supporting Capabilities",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-0.5",children:d.supporting_evidence.capability_ids.map(e=>(0,t.jsx)(n.default,{href:`/amber/capabilities/${encodeURIComponent(e)}`,className:"text-xs font-mono px-2 py-0.5 rounded hover:brightness-110 transition-all",style:{background:"rgba(52,211,153,0.08)",color:s,border:"1px solid rgba(52,211,153,0.2)"},children:e},e))})}):null,d.supporting_evidence.metric_pattern&&(0,t.jsx)(i,{label:"Metric Pattern",children:(0,t.jsx)("span",{className:"font-mono text-xs text-slate-400",children:d.supporting_evidence.metric_pattern})})]})]}),"auto"===d.kind&&(0,t.jsxs)("div",{className:"w-full flex flex-wrap gap-3",children:["accepted"!==j&&(0,t.jsx)("button",{onClick:()=>y("accepted"),disabled:m,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40",style:{background:"rgba(52,211,153,0.12)",color:s,border:"1px solid rgba(52,211,153,0.3)"},children:"Accept"}),"rejected"!==j&&(0,t.jsx)("button",{onClick:()=>y("rejected"),disabled:m,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40",style:{background:"rgba(248,113,113,0.1)",color:"rgb(248,113,113)",border:"1px solid rgba(248,113,113,0.25)"},children:"Reject"}),"pending"!==j&&(0,t.jsx)("button",{onClick:()=>y("pending"),disabled:m,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40",style:{background:"rgba(148,163,184,0.08)",color:"rgb(148,163,184)",border:"1px solid rgba(148,163,184,0.2)"},children:"Reset"})]})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.1"," · GREEN / Insights"]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let s=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",l=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(s.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${l}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t){let r=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=s(e,n)),t&&(l.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(18967),l=e.r(52817);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return y}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let s=e.r(90809),a=e.r(43476),o=s._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),g=e.r(9396);function m(t){var r,n;let l,s,m,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:k,children:_,prefetch:w=null,passHref:C,replace:S,shallow:P,scroll:E,onClick:R,onMouseEnter:T,onTouchStart:O,legacyBehavior:I=!1,onNavigate:L,transitionTypes:A,ref:U,unstable_dynamicOnHover:M,...$}=t;l=_,I&&("string"==typeof l||"number"==typeof l)&&(l=(0,a.jsx)("a",{children:l}));let B=o.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(n=w)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,K="string"==typeof(r=k||N)?r:(0,i.formatUrl)(r);if(I){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=o.default.Children.only(l)}let W=I?s&&"object"==typeof s&&s.ref:U,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),G={ref:(0,u.useMergedRef)(z,W),onClick(t){I||"function"!=typeof R||R(t),I&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!B||t.defaultPrevented||function(t,r,n,l,s,a,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,l?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,i)})}}(t,K,v,S,E,L,A)},onMouseEnter(e){I||"function"!=typeof T||T(e),I&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){I||"function"!=typeof O||O(e),I&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,d.isAbsoluteUrl)(K)?G.href=K:I&&!C&&("a"!==s.type||"href"in s.props)||(G.href=(0,p.addBasePath)(K)),m=I?o.default.cloneElement(s,G):(0,a.jsx)("a",{...$,...G,children:l}),(0,a.jsx)(b.Provider,{value:y,children:m})}e.r(84508);let b=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(18566),l=e.i(71645);let s={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function a(e){return"free"!==s[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,a],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:n,isPro:s=!1}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=a("monorepo")&&!s;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{n(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{n(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,n]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>n(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[n,s]=(0,l.useState)(null),[a,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),s(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,l.useCallback)(async t=>{s(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=n?`&workspace=${encodeURIComponent(n)}`:"";return{monorepo:t,activeWorkspace:n,setActiveWorkspace:i,ready:a,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,l.useState)(null),[n,s]=(0,l.useState)(!1),[a,o]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>s(!0))},[e,a]);let i=(0,l.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:n,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/pricing",label:"Plans",color:"rgb(167,139,250)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,n.usePathname)(),{tq:l}=c(),{monorepo:s,activeWorkspace:a,setActiveWorkspace:o}=u(l),{isPro:d}=p(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:n,label:l,color:s})=>{let a=e.startsWith(n);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:n,className:"text-sm font-medium transition-colors px-1",style:{color:a?s??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},n)}),s&&"single"!==s.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:s,activeWorkspace:a,onSelect:o,isPro:d})]})]})}],50667)},83329,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(22016),l=e.i(50667);let s="rgb(52,211,153)",a={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},o={pending:"rgb(148,163,184)",accepted:s,rejected:"rgb(248,113,113)"};function i({label:e,children:r}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-widest",children:e}),(0,t.jsx)("div",{className:"text-sm text-slate-300 leading-relaxed",children:r})]})}e.s(["default",0,function({params:e}){let{id:c}=(0,r.use)(e),u=decodeURIComponent(c),[d,p]=(0,r.useState)(null),[f,x]=(0,r.useState)(!0),[h,g]=(0,r.useState)(!1),[m,b]=(0,r.useState)(!1);async function y(e){if(d){b(!0);try{(await fetch(`/api/green/insights/${encodeURIComponent(u)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e})})).ok&&p(t=>t?{...t,status:e}:t)}finally{b(!1)}}}if((0,r.useEffect)(()=>{fetch(`/api/green/insights/${encodeURIComponent(u)}`).then(async e=>{404===e.status?g(!0):p((await e.json()).insight)}).catch(()=>g(!0)).finally(()=>x(!1))},[u]),f)return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-slate-500 text-sm",children:"Loading…"})})]});if(h||!d)return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[(0,t.jsx)("p",{className:"text-slate-400",children:"Insight not found."}),(0,t.jsx)(n.default,{href:"/green/insights",className:"text-sm hover:underline",style:{color:s},children:"← Insights"})]})]});let j=d.status??("auto"===d.kind?"pending":void 0);return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center gap-2 text-sm",children:[(0,t.jsx)(n.default,{href:"/green",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"GREEN"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)(n.default,{href:"/green/insights",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"Insights"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("span",{className:"text-slate-400 truncate max-w-xs",children:d.title})]}),(0,t.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold text-slate-100 flex-1",children:d.title}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full",style:{background:"rgba(52,211,153,0.1)",color:s,border:"1px solid rgba(52,211,153,0.25)"},children:d.kind}),j&&(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full",style:{background:(o[j]??"rgb(148,163,184)")+"15",color:o[j]??"rgb(148,163,184)",border:`1px solid ${o[j]??"rgb(148,163,184)"}28`},children:j})]})]}),d.generated_at&&(0,t.jsxs)("p",{className:"text-xs text-slate-600 font-mono",children:["Generated ",new Date(d.generated_at).toLocaleString()]})]}),(0,t.jsxs)("div",{className:"w-full rounded-xl p-6 flex flex-col gap-5",style:a,children:[(0,t.jsx)(i,{label:"Description",children:d.description}),(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),(0,t.jsx)(i,{label:"Prompt Template",children:(0,t.jsx)("pre",{className:"text-xs font-mono text-slate-400 bg-slate-900/60 rounded-lg p-3 overflow-auto leading-relaxed whitespace-pre-wrap",children:d.prompt_template})}),d.supporting_evidence&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),d.supporting_evidence.capability_ids?.length?(0,t.jsx)(i,{label:"Supporting Capabilities",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-0.5",children:d.supporting_evidence.capability_ids.map(e=>(0,t.jsx)(n.default,{href:`/amber/capabilities/${encodeURIComponent(e)}`,className:"text-xs font-mono px-2 py-0.5 rounded hover:brightness-110 transition-all",style:{background:"rgba(52,211,153,0.08)",color:s,border:"1px solid rgba(52,211,153,0.2)"},children:e},e))})}):null,d.supporting_evidence.metric_pattern&&(0,t.jsx)(i,{label:"Metric Pattern",children:(0,t.jsx)("span",{className:"font-mono text-xs text-slate-400",children:d.supporting_evidence.metric_pattern})})]})]}),"auto"===d.kind&&(0,t.jsxs)("div",{className:"w-full flex flex-wrap gap-3",children:["accepted"!==j&&(0,t.jsx)("button",{onClick:()=>y("accepted"),disabled:m,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40",style:{background:"rgba(52,211,153,0.12)",color:s,border:"1px solid rgba(52,211,153,0.3)"},children:"Accept"}),"rejected"!==j&&(0,t.jsx)("button",{onClick:()=>y("rejected"),disabled:m,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40",style:{background:"rgba(248,113,113,0.1)",color:"rgb(248,113,113)",border:"1px solid rgba(248,113,113,0.25)"},children:"Reject"}),"pending"!==j&&(0,t.jsx)("button",{onClick:()=>y("pending"),disabled:m,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40",style:{background:"rgba(148,163,184,0.08)",color:"rgb(148,163,184)",border:"1px solid rgba(148,163,184,0.2)"},children:"Reset"})]})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.2"," · GREEN / Insights"]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let l=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(l.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||s.test(a))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let a=e.r(71645);function n(e,t){let r=(0,a.useRef)(null),n=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=l(e,a)),t&&(n.current=l(t,a))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return l}});let a=e.r(18967),n=e.r(52817);function l(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return b},useLinkStatus:function(){return y}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let l=e.r(90809),s=e.r(43476),o=l._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function b(t){var r,a;let n,l,b,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:_,children:k,prefetch:w=null,passHref:S,replace:C,shallow:R,scroll:E,onClick:P,onMouseEnter:O,onTouchStart:T,legacyBehavior:A=!1,onNavigate:$,transitionTypes:L,ref:M,unstable_dynamicOnHover:I,...U}=t;n=k,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,s.jsx)("a",{children:n}));let B=o.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(a=w)||"auto"===a?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=_||N)?r:(0,i.formatUrl)(r);if(A){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=o.default.Children.only(n)}let W=A?l&&"object"==typeof l&&l.ref:M,q=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),z={ref:(0,u.useMergedRef)(q,W),onClick(t){A||"function"!=typeof P||P(t),A&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!B||t.defaultPrevented||function(t,r,a,n,l,s,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,n?"replace":"push",!1===l?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,a.current,i)})}}(t,K,v,C,E,$,L)},onMouseEnter(e){A||"function"!=typeof O||O(e),A&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){A||"function"!=typeof T||T(e),A&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?z.href=K:A&&!S&&("a"!==l.type||"href"in l.props)||(z.href=(0,p.addBasePath)(K)),b=A?o.default.cloneElement(l,z):(0,s.jsx)("a",{...U,...z,children:n}),(0,s.jsx)(g.Provider,{value:y,children:b})}e.r(84508);let g=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),a=e.i(18566),n=e.i(71645);let l={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function s(e){return"free"!==l[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,s],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:a,isPro:l=!1}){let[c,u]=(0,n.useState)(!1),d=(0,n.useRef)(null);if((0,n.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=s("monorepo")&&!l;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{a(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{a(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,n.useState)(""),[r,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>a(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,n.useState)(null),[a,l]=(0,n.useState)(null),[s,o]=(0,n.useState)(!1);(0,n.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),l(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,n.useCallback)(async t=>{l(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=a?`&workspace=${encodeURIComponent(a)}`:"";return{monorepo:t,activeWorkspace:a,setActiveWorkspace:i,ready:s,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,n.useState)(null),[a,l]=(0,n.useState)(!1),[s,o]=(0,n.useState)(0);(0,n.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>l(!0))},[e,s]);let i=(0,n.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:a,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,a.usePathname)(),{tq:n}=c(),{monorepo:l,activeWorkspace:s,setActiveWorkspace:o}=u(n),{isPro:d}=p(n);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:a,label:n,color:l})=>{let s=e.startsWith(a);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:a,className:"text-sm font-medium transition-colors px-1",style:{color:s?l??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:n})]},a)}),l&&"single"!==l.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:l,activeWorkspace:s,onSelect:o,isPro:d})]})]})}],50667)},41147,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(22016),n=e.i(50667),l=e.i(25010),s=e.i(60888);let o="rgb(251,191,36)",i={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},c={background:"rgba(15,23,42,0.5)",border:"1px solid rgba(51,65,85,0.4)"};function u({label:e,value:r,accent:a}){return(0,t.jsxs)("div",{className:"rounded-lg px-4 py-3 flex flex-col gap-0.5",style:c,children:[(0,t.jsx)("span",{className:"text-xs text-slate-500 uppercase tracking-widest",children:e}),(0,t.jsx)("span",{className:"text-xl font-semibold font-mono",style:{color:a??"rgb(226,232,240)"},children:r})]})}e.s(["default",0,function(){let{tq:e,ready:c}=(0,l.useTargetPath)(),{wq:d}=(0,s.useActiveWorkspace)(e),[p,f]=(0,r.useState)(null),[x,h]=(0,r.useState)(null),[m,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(null);async function j(){b(!0),y(null);try{let t=await fetch(`/api/amber/scan${e}${d}`,{method:"POST"}),r=await t.json();if(!t.ok)throw Error(r.error??"Scan failed");f(r.scan)}catch(e){y(e instanceof Error?e.message:String(e))}finally{b(!1)}}(0,r.useEffect)(()=>{c&&(fetch(`/api/amber/scan${e}${d}`).then(e=>e.json()).then(({scan:e})=>f(e??null)).catch(()=>{}),fetch(`/api/amber/registry${e}${d}`).then(e=>e.json()).then(({capabilities:e})=>h(Array.isArray(e)?e.length:0)).catch(()=>{}))},[c,d]);let v=[{href:"/amber/capabilities",label:"Capabilities",icon:"🧩",desc:`${x??"—"} registered`},{href:"/amber/files",label:"Files",icon:"📁",desc:p?`${p.file_count} scanned`:"No scan yet"},{href:"/amber/coverage",label:"Coverage",icon:"📊",desc:p?`${p.drift_count} drift entries`:"No scan yet"}];return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(n.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-xl font-semibold text-slate-100 tracking-tight",children:[(0,t.jsx)("span",{className:"font-mono",style:{color:o},children:"AMBER"}),(0,t.jsx)("span",{className:"text-slate-400 text-sm font-normal ml-2",children:"Capability Registry + Coverage"})]}),p&&(0,t.jsxs)("p",{className:"text-xs text-slate-500 mt-0.5 font-mono",children:["Last scan: ",new Date(p.created_at).toLocaleString()," · ",p.target]})]}),(0,t.jsx)("button",{onClick:j,disabled:m,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:o,color:"#020617"},children:m?"Scanning…":p?"Re-scan":"Run scan"})]}),g&&(0,t.jsx)("div",{className:"w-full rounded-lg px-4 py-3 text-sm text-red-400 font-mono",style:{background:"rgba(239,68,68,0.08)",border:"1px solid rgba(239,68,68,0.2)"},children:g}),!p&&!m&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-3",style:i,children:[(0,t.jsx)("span",{className:"text-4xl",children:"🟡"}),(0,t.jsx)("p",{className:"text-slate-300 font-medium",children:"No AMBER scan yet"}),(0,t.jsxs)("p",{className:"text-slate-500 text-sm max-w-sm",children:["Run a scan to analyse your capability registry, file coverage, and documentation drift. Requires a ",(0,t.jsx)("span",{className:"font-mono text-amber-400",children:".amber/capabilities.md"})," in the target project."]})]}),p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"w-full grid grid-cols-4 gap-3",children:[(0,t.jsx)(u,{label:"Files",value:p.file_count}),(0,t.jsx)(u,{label:"Capabilities",value:x??p.capability_count,accent:o}),(0,t.jsx)(u,{label:"Drift",value:p.drift_count,accent:p.drift_count>0?"rgb(248,113,113)":"rgb(52,211,153)"}),(0,t.jsx)(u,{label:"Orphans",value:p.orphan_capability_count,accent:p.orphan_capability_count>0?"rgb(251,191,36)":"rgb(52,211,153)"})]}),p.drift_count>0&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-5 flex flex-col gap-3",style:i,children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:["Recent Drift (",p.drift_count,")"]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[p.drift.slice(0,5).map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center justify-between py-1 border-b",style:{borderColor:"rgba(51,65,85,0.3)"},children:[(0,t.jsx)("span",{className:"text-xs font-mono text-slate-400 truncate flex-1",children:e.file}),(0,t.jsx)("span",{className:"text-xs font-mono text-amber-400 ml-3 flex-shrink-0",children:e.kind.replace(/_/g," ")})]},r)),p.drift_count>5&&(0,t.jsxs)(a.default,{href:"/amber/coverage",className:"text-xs text-amber-400 hover:underline mt-1",children:["+",p.drift_count-5," more → Coverage"]})]})]}),p.orphan_capability_count>0&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-5 flex flex-col gap-3",style:i,children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-amber-400 uppercase tracking-widest",children:["Orphan Capabilities (",p.orphan_capability_count,")"]}),(0,t.jsx)("p",{className:"text-xs text-slate-500",children:"Registered in capabilities.md but matched no scanned files."}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.orphan_capability_ids.map(e=>(0,t.jsx)(a.default,{href:`/amber/capabilities/${encodeURIComponent(e)}`,className:"text-xs font-mono px-2 py-1 rounded hover:brightness-110 transition-all",style:{background:"rgba(251,191,36,0.1)",color:o,border:"1px solid rgba(251,191,36,0.25)"},children:e},e))})]}),p.unknown_ref_count>0&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-5 flex flex-col gap-3",style:i,children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-red-400 uppercase tracking-widest",children:["Unknown Capability Refs (",p.unknown_ref_count,")"]}),(0,t.jsx)("p",{className:"text-xs text-slate-500",children:"Files reference capability IDs not in the registry."}),(0,t.jsx)("div",{className:"flex flex-col gap-1",children:p.unknown_capability_refs.slice(0,5).map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-3 py-1 border-b",style:{borderColor:"rgba(51,65,85,0.3)"},children:[(0,t.jsx)("span",{className:"text-xs font-mono text-slate-400 truncate flex-1",children:e.file}),(0,t.jsx)("span",{className:"text-xs font-mono text-red-400",children:e.id})]},r))})]})]}),(0,t.jsx)("div",{className:"w-full grid grid-cols-3 gap-3",children:v.map(({href:e,label:r,icon:n,desc:l})=>(0,t.jsxs)(a.default,{href:e,className:"rounded-xl p-5 flex flex-col gap-2 transition-all hover:brightness-110",style:{...i,borderColor:o+"30"},children:[(0,t.jsx)("span",{className:"text-2xl",children:n}),(0,t.jsx)("span",{className:"text-sm font-semibold",style:{color:o},children:r}),(0,t.jsx)("span",{className:"text-xs text-slate-500",children:l})]},e))})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.1"," · AMBER"]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let l=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(l.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||s.test(a))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let a=e.r(71645);function n(e,t){let r=(0,a.useRef)(null),n=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=l(e,a)),t&&(n.current=l(t,a))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return l}});let a=e.r(18967),n=e.r(52817);function l(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return b},useLinkStatus:function(){return y}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let l=e.r(90809),s=e.r(43476),o=l._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function b(t){var r,a;let n,l,b,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:_,children:k,prefetch:w=null,passHref:S,replace:C,shallow:R,scroll:E,onClick:P,onMouseEnter:O,onTouchStart:T,legacyBehavior:A=!1,onNavigate:$,transitionTypes:L,ref:M,unstable_dynamicOnHover:I,...U}=t;n=k,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,s.jsx)("a",{children:n}));let B=o.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(a=w)||"auto"===a?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=_||N)?r:(0,i.formatUrl)(r);if(A){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=o.default.Children.only(n)}let W=A?l&&"object"==typeof l&&l.ref:M,q=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),z={ref:(0,u.useMergedRef)(q,W),onClick(t){A||"function"!=typeof P||P(t),A&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!B||t.defaultPrevented||function(t,r,a,n,l,s,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,n?"replace":"push",!1===l?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,a.current,i)})}}(t,K,v,C,E,$,L)},onMouseEnter(e){A||"function"!=typeof O||O(e),A&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){A||"function"!=typeof T||T(e),A&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?z.href=K:A&&!S&&("a"!==l.type||"href"in l.props)||(z.href=(0,p.addBasePath)(K)),b=A?o.default.cloneElement(l,z):(0,s.jsx)("a",{...U,...z,children:n}),(0,s.jsx)(g.Provider,{value:y,children:b})}e.r(84508);let g=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),a=e.i(18566),n=e.i(71645);let l={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function s(e){return"free"!==l[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,s],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:a,isPro:l=!1}){let[c,u]=(0,n.useState)(!1),d=(0,n.useRef)(null);if((0,n.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=s("monorepo")&&!l;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{a(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{a(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,n.useState)(""),[r,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>a(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,n.useState)(null),[a,l]=(0,n.useState)(null),[s,o]=(0,n.useState)(!1);(0,n.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),l(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,n.useCallback)(async t=>{l(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=a?`&workspace=${encodeURIComponent(a)}`:"";return{monorepo:t,activeWorkspace:a,setActiveWorkspace:i,ready:s,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,n.useState)(null),[a,l]=(0,n.useState)(!1),[s,o]=(0,n.useState)(0);(0,n.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>l(!0))},[e,s]);let i=(0,n.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:a,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/pricing",label:"Plans",color:"rgb(167,139,250)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,a.usePathname)(),{tq:n}=c(),{monorepo:l,activeWorkspace:s,setActiveWorkspace:o}=u(n),{isPro:d}=p(n);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:a,label:n,color:l})=>{let s=e.startsWith(a);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:a,className:"text-sm font-medium transition-colors px-1",style:{color:s?l??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:n})]},a)}),l&&"single"!==l.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:l,activeWorkspace:s,onSelect:o,isPro:d})]})]})}],50667)},41147,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(22016),n=e.i(50667),l=e.i(25010),s=e.i(60888);let o="rgb(251,191,36)",i={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},c={background:"rgba(15,23,42,0.5)",border:"1px solid rgba(51,65,85,0.4)"};function u({label:e,value:r,accent:a}){return(0,t.jsxs)("div",{className:"rounded-lg px-4 py-3 flex flex-col gap-0.5",style:c,children:[(0,t.jsx)("span",{className:"text-xs text-slate-500 uppercase tracking-widest",children:e}),(0,t.jsx)("span",{className:"text-xl font-semibold font-mono",style:{color:a??"rgb(226,232,240)"},children:r})]})}e.s(["default",0,function(){let{tq:e,ready:c}=(0,l.useTargetPath)(),{wq:d}=(0,s.useActiveWorkspace)(e),[p,f]=(0,r.useState)(null),[x,h]=(0,r.useState)(null),[m,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(null);async function j(){b(!0),y(null);try{let t=await fetch(`/api/amber/scan${e}${d}`,{method:"POST"}),r=await t.json();if(!t.ok)throw Error(r.error??"Scan failed");f(r.scan)}catch(e){y(e instanceof Error?e.message:String(e))}finally{b(!1)}}(0,r.useEffect)(()=>{c&&(fetch(`/api/amber/scan${e}${d}`).then(e=>e.json()).then(({scan:e})=>f(e??null)).catch(()=>{}),fetch(`/api/amber/registry${e}${d}`).then(e=>e.json()).then(({capabilities:e})=>h(Array.isArray(e)?e.length:0)).catch(()=>{}))},[c,d]);let v=[{href:"/amber/capabilities",label:"Capabilities",icon:"🧩",desc:`${x??"—"} registered`},{href:"/amber/files",label:"Files",icon:"📁",desc:p?`${p.file_count} scanned`:"No scan yet"},{href:"/amber/coverage",label:"Coverage",icon:"📊",desc:p?`${p.drift_count} drift entries`:"No scan yet"}];return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(n.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-xl font-semibold text-slate-100 tracking-tight",children:[(0,t.jsx)("span",{className:"font-mono",style:{color:o},children:"AMBER"}),(0,t.jsx)("span",{className:"text-slate-400 text-sm font-normal ml-2",children:"Capability Registry + Coverage"})]}),p&&(0,t.jsxs)("p",{className:"text-xs text-slate-500 mt-0.5 font-mono",children:["Last scan: ",new Date(p.created_at).toLocaleString()," · ",p.target]})]}),(0,t.jsx)("button",{onClick:j,disabled:m,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:o,color:"#020617"},children:m?"Scanning…":p?"Re-scan":"Run scan"})]}),g&&(0,t.jsx)("div",{className:"w-full rounded-lg px-4 py-3 text-sm text-red-400 font-mono",style:{background:"rgba(239,68,68,0.08)",border:"1px solid rgba(239,68,68,0.2)"},children:g}),!p&&!m&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-3",style:i,children:[(0,t.jsx)("span",{className:"text-4xl",children:"🟡"}),(0,t.jsx)("p",{className:"text-slate-300 font-medium",children:"No AMBER scan yet"}),(0,t.jsxs)("p",{className:"text-slate-500 text-sm max-w-sm",children:["Run a scan to analyse your capability registry, file coverage, and documentation drift. Requires a ",(0,t.jsx)("span",{className:"font-mono text-amber-400",children:".amber/capabilities.md"})," in the target project."]})]}),p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"w-full grid grid-cols-4 gap-3",children:[(0,t.jsx)(u,{label:"Files",value:p.file_count}),(0,t.jsx)(u,{label:"Capabilities",value:x??p.capability_count,accent:o}),(0,t.jsx)(u,{label:"Drift",value:p.drift_count,accent:p.drift_count>0?"rgb(248,113,113)":"rgb(52,211,153)"}),(0,t.jsx)(u,{label:"Orphans",value:p.orphan_capability_count,accent:p.orphan_capability_count>0?"rgb(251,191,36)":"rgb(52,211,153)"})]}),p.drift_count>0&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-5 flex flex-col gap-3",style:i,children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:["Recent Drift (",p.drift_count,")"]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[p.drift.slice(0,5).map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center justify-between py-1 border-b",style:{borderColor:"rgba(51,65,85,0.3)"},children:[(0,t.jsx)("span",{className:"text-xs font-mono text-slate-400 truncate flex-1",children:e.file}),(0,t.jsx)("span",{className:"text-xs font-mono text-amber-400 ml-3 flex-shrink-0",children:e.kind.replace(/_/g," ")})]},r)),p.drift_count>5&&(0,t.jsxs)(a.default,{href:"/amber/coverage",className:"text-xs text-amber-400 hover:underline mt-1",children:["+",p.drift_count-5," more → Coverage"]})]})]}),p.orphan_capability_count>0&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-5 flex flex-col gap-3",style:i,children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-amber-400 uppercase tracking-widest",children:["Orphan Capabilities (",p.orphan_capability_count,")"]}),(0,t.jsx)("p",{className:"text-xs text-slate-500",children:"Registered in capabilities.md but matched no scanned files."}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.orphan_capability_ids.map(e=>(0,t.jsx)(a.default,{href:`/amber/capabilities/${encodeURIComponent(e)}`,className:"text-xs font-mono px-2 py-1 rounded hover:brightness-110 transition-all",style:{background:"rgba(251,191,36,0.1)",color:o,border:"1px solid rgba(251,191,36,0.25)"},children:e},e))})]}),p.unknown_ref_count>0&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-5 flex flex-col gap-3",style:i,children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-red-400 uppercase tracking-widest",children:["Unknown Capability Refs (",p.unknown_ref_count,")"]}),(0,t.jsx)("p",{className:"text-xs text-slate-500",children:"Files reference capability IDs not in the registry."}),(0,t.jsx)("div",{className:"flex flex-col gap-1",children:p.unknown_capability_refs.slice(0,5).map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-3 py-1 border-b",style:{borderColor:"rgba(51,65,85,0.3)"},children:[(0,t.jsx)("span",{className:"text-xs font-mono text-slate-400 truncate flex-1",children:e.file}),(0,t.jsx)("span",{className:"text-xs font-mono text-red-400",children:e.id})]},r))})]})]}),(0,t.jsx)("div",{className:"w-full grid grid-cols-3 gap-3",children:v.map(({href:e,label:r,icon:n,desc:l})=>(0,t.jsxs)(a.default,{href:e,className:"rounded-xl p-5 flex flex-col gap-2 transition-all hover:brightness-110",style:{...i,borderColor:o+"30"},children:[(0,t.jsx)("span",{className:"text-2xl",children:n}),(0,t.jsx)("span",{className:"text-sm font-semibold",style:{color:o},children:r}),(0,t.jsx)("span",{className:"text-xs text-slate-500",children:l})]},e))})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.2"," · AMBER"]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let l=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(l.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||a.test(s))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let s=e.r(71645);function n(e,t){let r=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=l(e,s)),t&&(n.current=l(t,s))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return l}});let s=e.r(18967),n=e.r(52817);function l(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return b},useLinkStatus:function(){return y}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let l=e.r(90809),a=e.r(43476),o=l._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),m=e.r(73668),h=e.r(9396);function b(t){var r,s;let n,l,b,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:k,children:w,prefetch:S=null,passHref:_,replace:C,shallow:E,scroll:P,onClick:O,onMouseEnter:T,onTouchStart:R,legacyBehavior:L=!1,onNavigate:A,transitionTypes:I,ref:M,unstable_dynamicOnHover:U,...$}=t;n=w,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let B=o.default.useContext(c.AppRouterContext),D=!1!==S,K=!1!==S?null===(s=S)||"auto"===s?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,F="string"==typeof(r=k||N)?r:(0,i.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=o.default.Children.only(n)}let W=L?l&&"object"==typeof l&&l.ref:M,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,F,B,K,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,F,B,K,j]),q={ref:(0,u.useMergedRef)(z,W),onClick(t){L||"function"!=typeof O||O(t),L&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!B||t.defaultPrevented||function(t,r,s,n,l,a,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,n?"replace":"push",!1===l?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,s.current,i)})}}(t,F,v,C,P,A,I)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===U)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===U)}};return(0,d.isAbsoluteUrl)(F)?q.href=F:L&&!_&&("a"!==l.type||"href"in l.props)||(q.href=(0,p.addBasePath)(F)),b=L?o.default.cloneElement(l,q):(0,a.jsx)("a",{...$,...q,children:n}),(0,a.jsx)(g.Provider,{value:y,children:b})}e.r(84508);let g=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),n=e.i(71645);let l={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function a(e){return"free"!==l[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,a],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:s,isPro:l=!1}){let[c,u]=(0,n.useState)(!1),d=(0,n.useRef)(null);if((0,n.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=a("monorepo")&&!l;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,n.useState)(""),[r,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>s(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,n.useState)(null),[s,l]=(0,n.useState)(null),[a,o]=(0,n.useState)(!1);(0,n.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),l(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,n.useCallback)(async t=>{l(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=s?`&workspace=${encodeURIComponent(s)}`:"";return{monorepo:t,activeWorkspace:s,setActiveWorkspace:i,ready:a,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,n.useState)(null),[s,l]=(0,n.useState)(!1),[a,o]=(0,n.useState)(0);(0,n.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>l(!0))},[e,a]);let i=(0,n.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:s,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,s.usePathname)(),{tq:n}=c(),{monorepo:l,activeWorkspace:a,setActiveWorkspace:o}=u(n),{isPro:d}=p(n);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:s,label:n,color:l})=>{let a=e.startsWith(s);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:s,className:"text-sm font-medium transition-colors px-1",style:{color:a?l??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:n})]},s)}),l&&"single"!==l.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:l,activeWorkspace:a,onSelect:o,isPro:d})]})]})}],50667)},7307,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),n=e.i(50667);let l={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"};function a({turn:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("div",{className:"max-w-lg rounded-2xl rounded-tr-sm px-4 py-3 text-sm text-slate-200 leading-relaxed",style:{background:"rgba(59,130,246,0.15)",border:"1px solid rgba(59,130,246,0.25)"},children:e.prompt})}),e.response?(0,t.jsx)("div",{className:"flex justify-start",children:(0,t.jsxs)("div",{className:"max-w-lg rounded-2xl rounded-tl-sm px-4 py-3 text-sm text-slate-300 leading-relaxed",style:{background:"rgba(15,23,42,0.6)",border:"1px solid rgba(51,65,85,0.4)"},children:[(0,t.jsx)("span",{className:"text-blue-400 text-xs font-mono mr-2",children:"✦"}),(0,t.jsx)("span",{style:{whiteSpace:"pre-wrap"},children:e.response})]})}):(0,t.jsx)("div",{className:"flex justify-start",children:(0,t.jsxs)("div",{className:"rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-2",style:{background:"rgba(15,23,42,0.6)",border:"1px solid rgba(51,65,85,0.4)"},children:[(0,t.jsx)("span",{className:"animate-spin inline-block w-3 h-3 border border-blue-400 border-t-transparent rounded-full"}),(0,t.jsx)("span",{className:"text-xs text-slate-500",children:"Thinking…"})]})})]})}e.s(["default",0,function({params:e}){let{id:o}=(0,r.use)(e),[i,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(!0),[p,f]=(0,r.useState)(!1),[x,m]=(0,r.useState)(""),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),j=(0,r.useRef)(null);async function v(){try{let e=await fetch(`/api/blue/sessions/${o}`);if(404===e.status)return void f(!0);let t=await e.json();c(t.session)}catch{f(!0)}finally{d(!1)}}async function N(){if(!x.trim()||h||!i)return;let e=x.trim();m(""),b(!0),c(t=>t?{...t,turns:[...t.turns,{turn:t.turns.length+1,prompt:e,created_at:new Date().toISOString()}]}:t);try{let t=await fetch(`/api/blue/sessions/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})}),r=await t.json();c(r.session)}catch{await v()}finally{b(!1)}}async function k(e){if(i){y(!0);try{let t=await fetch(`/api/blue/sessions/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e})}),r=await t.json();c(r.session)}finally{y(!1)}}}if((0,r.useEffect)(()=>{v()},[o]),(0,r.useEffect)(()=>{j.current?.scrollIntoView({behavior:"smooth"})},[i?.turns.length]),u)return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(n.PrismDock,{}),(0,t.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-slate-500 text-sm",children:"Loading…"})})]});if(p||!i)return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(n.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[(0,t.jsx)("p",{className:"text-slate-400",children:"Session not found."}),(0,t.jsx)(s.default,{href:"/blue/sessions",className:"text-indigo-400 text-sm hover:underline",children:"← Back to Sessions"})]})]});let w="active"===i.status;return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(n.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-28 pb-4",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(s.default,{href:"/blue",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"BLUE"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)(s.default,{href:"/blue/sessions",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"Sessions"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("span",{className:"text-slate-300 font-medium truncate max-w-xs",children:i.title})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[w&&(0,t.jsx)("button",{onClick:()=>k("completed"),disabled:g,className:"text-xs px-3 py-1 rounded-lg font-medium transition-all disabled:opacity-40",style:{background:"rgba(52,211,153,0.1)",color:"rgb(52,211,153)",border:"1px solid rgba(52,211,153,0.25)"},children:"Mark complete"}),w&&(0,t.jsx)("button",{onClick:()=>k("abandoned"),disabled:g,className:"text-xs px-3 py-1 rounded-lg font-medium transition-all disabled:opacity-40",style:{background:"rgba(148,163,184,0.08)",color:"rgba(148,163,184,0.6)",border:"1px solid rgba(148,163,184,0.15)"},children:"Abandon"}),!w&&(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-1 rounded-lg",style:{background:"rgba(148,163,184,0.08)",color:"rgba(148,163,184,0.6)",border:"1px solid rgba(148,163,184,0.15)"},children:i.status})]})]}),i.rec_id&&(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(s.default,{href:`/blue/recommendations/${i.rec_id}`,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors font-mono",children:"↗ linked recommendation"})}),(0,t.jsxs)("div",{className:"w-full flex flex-col gap-5 flex-1 overflow-y-auto pb-4",children:[0===i.turns.length&&(0,t.jsx)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-2",style:l,children:(0,t.jsx)("p",{className:"text-slate-400 text-sm",children:"No messages yet. Ask your first question below."})}),i.turns.map(e=>(0,t.jsx)(a,{turn:e},e.turn)),(0,t.jsx)("div",{ref:j})]}),w&&(0,t.jsx)("div",{className:"w-full mt-4 sticky bottom-4",children:(0,t.jsxs)("div",{className:"w-full rounded-xl p-3 flex items-end gap-3",style:{background:"rgba(2,6,23,0.85)",backdropFilter:"blur(16px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsx)("textarea",{rows:3,value:x,onChange:e=>m(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),N())},placeholder:"Ask about your codebase… (Enter to send, Shift+Enter for newline)",disabled:h,className:"flex-1 bg-transparent text-sm font-mono text-slate-200 outline-none resize-none placeholder:text-slate-600 disabled:opacity-50"}),(0,t.jsx)("button",{onClick:N,disabled:!x.trim()||h,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40 flex-shrink-0 self-end",style:{background:"rgb(59,130,246)",color:"#fff"},children:h?(0,t.jsx)("span",{className:"animate-spin inline-block w-4 h-4 border-2 border-white border-t-transparent rounded-full"}):"Send"})]})})]}),(0,t.jsxs)("footer",{className:"text-center py-3 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.1"," · BLUE / Sessions"]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let l=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(l.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||a.test(s))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let s=e.r(71645);function n(e,t){let r=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=l(e,s)),t&&(n.current=l(t,s))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return l}});let s=e.r(18967),n=e.r(52817);function l(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return b},useLinkStatus:function(){return y}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let l=e.r(90809),a=e.r(43476),o=l._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),m=e.r(73668),h=e.r(9396);function b(t){var r,s;let n,l,b,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:k,children:w,prefetch:S=null,passHref:_,replace:C,shallow:P,scroll:E,onClick:O,onMouseEnter:T,onTouchStart:R,legacyBehavior:L=!1,onNavigate:A,transitionTypes:I,ref:M,unstable_dynamicOnHover:U,...$}=t;n=w,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let B=o.default.useContext(c.AppRouterContext),D=!1!==S,K=!1!==S?null===(s=S)||"auto"===s?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,F="string"==typeof(r=k||N)?r:(0,i.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=o.default.Children.only(n)}let W=L?l&&"object"==typeof l&&l.ref:M,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,F,B,K,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,F,B,K,j]),q={ref:(0,u.useMergedRef)(z,W),onClick(t){L||"function"!=typeof O||O(t),L&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!B||t.defaultPrevented||function(t,r,s,n,l,a,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,n?"replace":"push",!1===l?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,s.current,i)})}}(t,F,v,C,E,A,I)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===U)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===U)}};return(0,d.isAbsoluteUrl)(F)?q.href=F:L&&!_&&("a"!==l.type||"href"in l.props)||(q.href=(0,p.addBasePath)(F)),b=L?o.default.cloneElement(l,q):(0,a.jsx)("a",{...$,...q,children:n}),(0,a.jsx)(g.Provider,{value:y,children:b})}e.r(84508);let g=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),n=e.i(71645);let l={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function a(e){return"free"!==l[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,a],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:s,isPro:l=!1}){let[c,u]=(0,n.useState)(!1),d=(0,n.useRef)(null);if((0,n.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=a("monorepo")&&!l;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,n.useState)(""),[r,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>s(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,n.useState)(null),[s,l]=(0,n.useState)(null),[a,o]=(0,n.useState)(!1);(0,n.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),l(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,n.useCallback)(async t=>{l(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=s?`&workspace=${encodeURIComponent(s)}`:"";return{monorepo:t,activeWorkspace:s,setActiveWorkspace:i,ready:a,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,n.useState)(null),[s,l]=(0,n.useState)(!1),[a,o]=(0,n.useState)(0);(0,n.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>l(!0))},[e,a]);let i=(0,n.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:s,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/pricing",label:"Plans",color:"rgb(167,139,250)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,s.usePathname)(),{tq:n}=c(),{monorepo:l,activeWorkspace:a,setActiveWorkspace:o}=u(n),{isPro:d}=p(n);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:s,label:n,color:l})=>{let a=e.startsWith(s);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:s,className:"text-sm font-medium transition-colors px-1",style:{color:a?l??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:n})]},s)}),l&&"single"!==l.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:l,activeWorkspace:a,onSelect:o,isPro:d})]})]})}],50667)},7307,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),n=e.i(50667);let l={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"};function a({turn:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("div",{className:"max-w-lg rounded-2xl rounded-tr-sm px-4 py-3 text-sm text-slate-200 leading-relaxed",style:{background:"rgba(59,130,246,0.15)",border:"1px solid rgba(59,130,246,0.25)"},children:e.prompt})}),e.response?(0,t.jsx)("div",{className:"flex justify-start",children:(0,t.jsxs)("div",{className:"max-w-lg rounded-2xl rounded-tl-sm px-4 py-3 text-sm text-slate-300 leading-relaxed",style:{background:"rgba(15,23,42,0.6)",border:"1px solid rgba(51,65,85,0.4)"},children:[(0,t.jsx)("span",{className:"text-blue-400 text-xs font-mono mr-2",children:"✦"}),(0,t.jsx)("span",{style:{whiteSpace:"pre-wrap"},children:e.response})]})}):(0,t.jsx)("div",{className:"flex justify-start",children:(0,t.jsxs)("div",{className:"rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-2",style:{background:"rgba(15,23,42,0.6)",border:"1px solid rgba(51,65,85,0.4)"},children:[(0,t.jsx)("span",{className:"animate-spin inline-block w-3 h-3 border border-blue-400 border-t-transparent rounded-full"}),(0,t.jsx)("span",{className:"text-xs text-slate-500",children:"Thinking…"})]})})]})}e.s(["default",0,function({params:e}){let{id:o}=(0,r.use)(e),[i,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(!0),[p,f]=(0,r.useState)(!1),[x,m]=(0,r.useState)(""),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),j=(0,r.useRef)(null);async function v(){try{let e=await fetch(`/api/blue/sessions/${o}`);if(404===e.status)return void f(!0);let t=await e.json();c(t.session)}catch{f(!0)}finally{d(!1)}}async function N(){if(!x.trim()||h||!i)return;let e=x.trim();m(""),b(!0),c(t=>t?{...t,turns:[...t.turns,{turn:t.turns.length+1,prompt:e,created_at:new Date().toISOString()}]}:t);try{let t=await fetch(`/api/blue/sessions/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})}),r=await t.json();c(r.session)}catch{await v()}finally{b(!1)}}async function k(e){if(i){y(!0);try{let t=await fetch(`/api/blue/sessions/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e})}),r=await t.json();c(r.session)}finally{y(!1)}}}if((0,r.useEffect)(()=>{v()},[o]),(0,r.useEffect)(()=>{j.current?.scrollIntoView({behavior:"smooth"})},[i?.turns.length]),u)return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(n.PrismDock,{}),(0,t.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-slate-500 text-sm",children:"Loading…"})})]});if(p||!i)return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(n.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[(0,t.jsx)("p",{className:"text-slate-400",children:"Session not found."}),(0,t.jsx)(s.default,{href:"/blue/sessions",className:"text-indigo-400 text-sm hover:underline",children:"← Back to Sessions"})]})]});let w="active"===i.status;return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(n.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-28 pb-4",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(s.default,{href:"/blue",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"BLUE"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)(s.default,{href:"/blue/sessions",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"Sessions"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("span",{className:"text-slate-300 font-medium truncate max-w-xs",children:i.title})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[w&&(0,t.jsx)("button",{onClick:()=>k("completed"),disabled:g,className:"text-xs px-3 py-1 rounded-lg font-medium transition-all disabled:opacity-40",style:{background:"rgba(52,211,153,0.1)",color:"rgb(52,211,153)",border:"1px solid rgba(52,211,153,0.25)"},children:"Mark complete"}),w&&(0,t.jsx)("button",{onClick:()=>k("abandoned"),disabled:g,className:"text-xs px-3 py-1 rounded-lg font-medium transition-all disabled:opacity-40",style:{background:"rgba(148,163,184,0.08)",color:"rgba(148,163,184,0.6)",border:"1px solid rgba(148,163,184,0.15)"},children:"Abandon"}),!w&&(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-1 rounded-lg",style:{background:"rgba(148,163,184,0.08)",color:"rgba(148,163,184,0.6)",border:"1px solid rgba(148,163,184,0.15)"},children:i.status})]})]}),i.rec_id&&(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(s.default,{href:`/blue/recommendations/${i.rec_id}`,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors font-mono",children:"↗ linked recommendation"})}),(0,t.jsxs)("div",{className:"w-full flex flex-col gap-5 flex-1 overflow-y-auto pb-4",children:[0===i.turns.length&&(0,t.jsx)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-2",style:l,children:(0,t.jsx)("p",{className:"text-slate-400 text-sm",children:"No messages yet. Ask your first question below."})}),i.turns.map(e=>(0,t.jsx)(a,{turn:e},e.turn)),(0,t.jsx)("div",{ref:j})]}),w&&(0,t.jsx)("div",{className:"w-full mt-4 sticky bottom-4",children:(0,t.jsxs)("div",{className:"w-full rounded-xl p-3 flex items-end gap-3",style:{background:"rgba(2,6,23,0.85)",backdropFilter:"blur(16px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsx)("textarea",{rows:3,value:x,onChange:e=>m(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),N())},placeholder:"Ask about your codebase… (Enter to send, Shift+Enter for newline)",disabled:h,className:"flex-1 bg-transparent text-sm font-mono text-slate-200 outline-none resize-none placeholder:text-slate-600 disabled:opacity-50"}),(0,t.jsx)("button",{onClick:N,disabled:!x.trim()||h,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40 flex-shrink-0 self-end",style:{background:"rgb(59,130,246)",color:"#fff"},children:h?(0,t.jsx)("span",{className:"animate-spin inline-block w-4 h-4 border-2 border-white border-t-transparent rounded-full"}):"Send"})]})})]}),(0,t.jsxs)("footer",{className:"text-center py-3 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.2"," · BLUE / Sessions"]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in a)Object.defineProperty(r,l,{enumerable:!0,get:a[l]});let n=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,a=e.protocol||"",l=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(n.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||s.test(a))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${c}${l}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let a=e.r(71645);function l(e,t){let r=(0,a.useRef)(null),l=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=n(e,a)),t&&(l.current=n(t,a))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return n}});let a=e.r(18967),l=e.r(52817);function n(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return g},useLinkStatus:function(){return y}};for(var l in a)Object.defineProperty(r,l,{enumerable:!0,get:a[l]});let n=e.r(90809),s=e.r(43476),o=n._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function g(t){var r,a;let l,n,g,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:_,children:k,prefetch:w=null,passHref:S,replace:C,shallow:E,scroll:P,onClick:R,onMouseEnter:O,onTouchStart:T,legacyBehavior:L=!1,onNavigate:A,transitionTypes:M,ref:U,unstable_dynamicOnHover:I,...$}=t;l=k,L&&("string"==typeof l||"number"==typeof l)&&(l=(0,s.jsx)("a",{children:l}));let B=o.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(a=w)||"auto"===a?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=_||N)?r:(0,i.formatUrl)(r);if(L){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=o.default.Children.only(l)}let W=L?n&&"object"==typeof n&&n.ref:U,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),q={ref:(0,u.useMergedRef)(z,W),onClick(t){L||"function"!=typeof R||R(t),L&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!B||t.defaultPrevented||function(t,r,a,l,n,s,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,l?"replace":"push",!1===n?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,a.current,i)})}}(t,K,v,C,P,A,M)},onMouseEnter(e){L||"function"!=typeof O||O(e),L&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){L||"function"!=typeof T||T(e),L&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?q.href=K:L&&!S&&("a"!==n.type||"href"in n.props)||(q.href=(0,p.addBasePath)(K)),g=L?o.default.cloneElement(n,q):(0,s.jsx)("a",{...$,...q,children:l}),(0,s.jsx)(b.Provider,{value:y,children:g})}e.r(84508);let b=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),a=e.i(18566),l=e.i(71645);let n={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function s(e){return"free"!==n[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,s],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:a,isPro:n=!1}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=s("monorepo")&&!n;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{a(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{a(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,a]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>a(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[a,n]=(0,l.useState)(null),[s,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),n(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,l.useCallback)(async t=>{n(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=a?`&workspace=${encodeURIComponent(a)}`:"";return{monorepo:t,activeWorkspace:a,setActiveWorkspace:i,ready:s,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,l.useState)(null),[a,n]=(0,l.useState)(!1),[s,o]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>n(!0))},[e,s]);let i=(0,l.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:a,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,a.usePathname)(),{tq:l}=c(),{monorepo:n,activeWorkspace:s,setActiveWorkspace:o}=u(l),{isPro:d}=p(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:a,label:l,color:n})=>{let s=e.startsWith(a);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:a,className:"text-sm font-medium transition-colors px-1",style:{color:s?n??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},a)}),n&&"single"!==n.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:n,activeWorkspace:s,onSelect:o,isPro:d})]})]})}],50667)},84835,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(22016),l=e.i(50667);let n="rgb(251,191,36)",s={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},o={content_changed_no_doc_update:"Content changed, doc stale",header_added:"Header added",header_removed:"Header removed",capabilities_changed:"Capabilities changed"};e.s(["default",0,function(){let[e,i]=(0,r.useState)([]),[c,u]=(0,r.useState)(null),[d,p]=(0,r.useState)(null),[f,x]=(0,r.useState)(!0),[h,m]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/amber/coverage").then(e=>e.json()).then(({scans:e})=>{i(e??[]),e&&e.length>0&&u(e[0].id)}).catch(()=>{}).finally(()=>x(!1))},[]),(0,r.useEffect)(()=>{c&&(m(!0),fetch(`/api/amber/coverage/${encodeURIComponent(c)}`).then(e=>e.json()).then(({scan:e})=>p(e)).catch(()=>{}).finally(()=>m(!1)))},[c]);let g=e.find(e=>e.id===c),b=d?.drift??[];return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.default,{href:"/amber",className:"text-slate-500 hover:text-slate-300 text-sm transition-colors",children:"← AMBER"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("h1",{className:"text-xl font-semibold tracking-tight",style:{color:n},children:"Coverage"})]}),(0,t.jsxs)("p",{className:"text-xs text-slate-500 mt-0.5",children:[e.length," scan snapshots"]})]}),f&&(0,t.jsx)("div",{className:"w-full text-center py-16 text-slate-500 text-sm",children:"Loading…"}),!f&&0===e.length&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-3",style:s,children:[(0,t.jsx)("span",{className:"text-4xl",children:"📊"}),(0,t.jsx)("p",{className:"text-slate-300 font-medium",children:"No coverage history yet"}),(0,t.jsxs)("p",{className:"text-slate-500 text-sm",children:["Run an AMBER scan from the"," ",(0,t.jsx)(a.default,{href:"/amber",className:"hover:underline",style:{color:n},children:"AMBER landing page"}),"."]})]}),!f&&e.length>0&&(0,t.jsxs)("div",{className:"w-full flex gap-4",children:[(0,t.jsx)("div",{className:"w-48 flex-shrink-0 flex flex-col gap-2",children:e.map(e=>(0,t.jsxs)("button",{onClick:()=>u(e.id),className:"w-full text-left rounded-lg px-3 py-2.5 transition-all",style:{background:c===e.id?"rgba(251,191,36,0.1)":"rgba(15,23,42,0.4)",border:`1px solid ${c===e.id?"rgba(251,191,36,0.35)":"rgba(51,65,85,0.3)"}`},children:[(0,t.jsx)("p",{className:"text-xs font-mono text-slate-300",children:new Date(e.created_at).toLocaleDateString()}),(0,t.jsx)("p",{className:"text-xs text-slate-500",children:new Date(e.created_at).toLocaleTimeString()}),(0,t.jsxs)("div",{className:"flex gap-2 mt-1",children:[(0,t.jsxs)("span",{className:"text-xs font-mono",style:{color:e.drift_count>0?"rgb(248,113,113)":"rgb(52,211,153)"},children:[e.drift_count,"d"]}),(0,t.jsxs)("span",{className:"text-xs font-mono",style:{color:e.orphan_capability_count>0?n:"rgb(52,211,153)"},children:[e.orphan_capability_count,"o"]})]})]},e.id))}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col gap-4",children:[h&&(0,t.jsx)("div",{className:"text-slate-500 text-sm py-8 text-center",children:"Loading scan…"}),!h&&g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"rounded-xl p-5 flex flex-col gap-3",style:s,children:[(0,t.jsx)("h2",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:new Date(g.created_at).toLocaleString()}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-3",children:[{label:"Files",value:g.file_count},{label:"Capabilities",value:g.capability_count,color:n},{label:"Drift",value:g.drift_count,color:g.drift_count>0?"rgb(248,113,113)":"rgb(52,211,153)"},{label:"Orphans",value:g.orphan_capability_count,color:g.orphan_capability_count>0?n:"rgb(52,211,153)"},{label:"Unknown Refs",value:g.unknown_ref_count,color:g.unknown_ref_count>0?"rgb(248,113,113)":"rgb(52,211,153)"}].map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs text-slate-600 uppercase tracking-widest",children:e.label}),(0,t.jsx)("span",{className:"text-lg font-mono font-semibold",style:{color:e.color??"rgb(226,232,240)"},children:e.value})]},e.label))})]}),b.length>0&&(0,t.jsxs)("div",{className:"rounded-xl p-5 flex flex-col gap-3",style:s,children:[(0,t.jsx)("h2",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:"Drift Entries"}),(0,t.jsx)("div",{className:"flex flex-col gap-1",children:b.map((e,r)=>(0,t.jsxs)("div",{className:"py-1.5 border-b flex items-center justify-between gap-2",style:{borderColor:"rgba(51,65,85,0.3)"},children:[(0,t.jsx)("span",{className:"text-xs font-mono text-slate-400 truncate flex-1",children:e.file}),(0,t.jsx)("span",{className:"text-xs text-amber-400 flex-shrink-0",children:o[e.kind]??e.kind})]},r))})]}),g.orphan_capability_ids.length>0&&(0,t.jsxs)("div",{className:"rounded-xl p-5 flex flex-col gap-3",style:s,children:[(0,t.jsx)("h2",{className:"text-xs font-semibold text-amber-400 uppercase tracking-widest",children:"Orphan Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:g.orphan_capability_ids.map(e=>(0,t.jsx)(a.default,{href:`/amber/capabilities/${encodeURIComponent(e)}`,className:"text-xs font-mono px-2 py-0.5 rounded hover:brightness-110 transition-all",style:{background:"rgba(251,191,36,0.1)",color:n,border:"1px solid rgba(251,191,36,0.25)"},children:e},e))})]}),0===g.drift_count&&0===g.orphan_capability_count&&(0,t.jsx)("div",{className:"rounded-xl p-5 text-center",style:s,children:(0,t.jsx)("p",{className:"text-emerald-400 text-sm font-medium",children:"✓ Clean scan — no drift, no orphans"})})]})]})]})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.1"," · AMBER / Coverage"]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in a)Object.defineProperty(r,l,{enumerable:!0,get:a[l]});let n=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,a=e.protocol||"",l=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(n.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||s.test(a))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${c}${l}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let a=e.r(71645);function l(e,t){let r=(0,a.useRef)(null),l=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=n(e,a)),t&&(l.current=n(t,a))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return n}});let a=e.r(18967),l=e.r(52817);function n(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return g},useLinkStatus:function(){return y}};for(var l in a)Object.defineProperty(r,l,{enumerable:!0,get:a[l]});let n=e.r(90809),s=e.r(43476),o=n._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function g(t){var r,a;let l,n,g,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:_,children:k,prefetch:w=null,passHref:S,replace:C,shallow:E,scroll:P,onClick:R,onMouseEnter:O,onTouchStart:T,legacyBehavior:L=!1,onNavigate:A,transitionTypes:M,ref:U,unstable_dynamicOnHover:I,...$}=t;l=k,L&&("string"==typeof l||"number"==typeof l)&&(l=(0,s.jsx)("a",{children:l}));let B=o.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(a=w)||"auto"===a?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=_||N)?r:(0,i.formatUrl)(r);if(L){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=o.default.Children.only(l)}let W=L?n&&"object"==typeof n&&n.ref:U,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),q={ref:(0,u.useMergedRef)(z,W),onClick(t){L||"function"!=typeof R||R(t),L&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!B||t.defaultPrevented||function(t,r,a,l,n,s,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,l?"replace":"push",!1===n?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,a.current,i)})}}(t,K,v,C,P,A,M)},onMouseEnter(e){L||"function"!=typeof O||O(e),L&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){L||"function"!=typeof T||T(e),L&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?q.href=K:L&&!S&&("a"!==n.type||"href"in n.props)||(q.href=(0,p.addBasePath)(K)),g=L?o.default.cloneElement(n,q):(0,s.jsx)("a",{...$,...q,children:l}),(0,s.jsx)(b.Provider,{value:y,children:g})}e.r(84508);let b=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),a=e.i(18566),l=e.i(71645);let n={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function s(e){return"free"!==n[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,s],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:a,isPro:n=!1}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=s("monorepo")&&!n;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{a(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{a(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,a]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>a(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[a,n]=(0,l.useState)(null),[s,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),n(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,l.useCallback)(async t=>{n(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=a?`&workspace=${encodeURIComponent(a)}`:"";return{monorepo:t,activeWorkspace:a,setActiveWorkspace:i,ready:s,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,l.useState)(null),[a,n]=(0,l.useState)(!1),[s,o]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>n(!0))},[e,s]);let i=(0,l.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:a,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/pricing",label:"Plans",color:"rgb(167,139,250)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,a.usePathname)(),{tq:l}=c(),{monorepo:n,activeWorkspace:s,setActiveWorkspace:o}=u(l),{isPro:d}=p(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:a,label:l,color:n})=>{let s=e.startsWith(a);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:a,className:"text-sm font-medium transition-colors px-1",style:{color:s?n??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},a)}),n&&"single"!==n.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:n,activeWorkspace:s,onSelect:o,isPro:d})]})]})}],50667)},84835,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(22016),l=e.i(50667);let n="rgb(251,191,36)",s={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},o={content_changed_no_doc_update:"Content changed, doc stale",header_added:"Header added",header_removed:"Header removed",capabilities_changed:"Capabilities changed"};e.s(["default",0,function(){let[e,i]=(0,r.useState)([]),[c,u]=(0,r.useState)(null),[d,p]=(0,r.useState)(null),[f,x]=(0,r.useState)(!0),[h,m]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/amber/coverage").then(e=>e.json()).then(({scans:e})=>{i(e??[]),e&&e.length>0&&u(e[0].id)}).catch(()=>{}).finally(()=>x(!1))},[]),(0,r.useEffect)(()=>{c&&(m(!0),fetch(`/api/amber/coverage/${encodeURIComponent(c)}`).then(e=>e.json()).then(({scan:e})=>p(e)).catch(()=>{}).finally(()=>m(!1)))},[c]);let g=e.find(e=>e.id===c),b=d?.drift??[];return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.default,{href:"/amber",className:"text-slate-500 hover:text-slate-300 text-sm transition-colors",children:"← AMBER"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("h1",{className:"text-xl font-semibold tracking-tight",style:{color:n},children:"Coverage"})]}),(0,t.jsxs)("p",{className:"text-xs text-slate-500 mt-0.5",children:[e.length," scan snapshots"]})]}),f&&(0,t.jsx)("div",{className:"w-full text-center py-16 text-slate-500 text-sm",children:"Loading…"}),!f&&0===e.length&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-3",style:s,children:[(0,t.jsx)("span",{className:"text-4xl",children:"📊"}),(0,t.jsx)("p",{className:"text-slate-300 font-medium",children:"No coverage history yet"}),(0,t.jsxs)("p",{className:"text-slate-500 text-sm",children:["Run an AMBER scan from the"," ",(0,t.jsx)(a.default,{href:"/amber",className:"hover:underline",style:{color:n},children:"AMBER landing page"}),"."]})]}),!f&&e.length>0&&(0,t.jsxs)("div",{className:"w-full flex gap-4",children:[(0,t.jsx)("div",{className:"w-48 flex-shrink-0 flex flex-col gap-2",children:e.map(e=>(0,t.jsxs)("button",{onClick:()=>u(e.id),className:"w-full text-left rounded-lg px-3 py-2.5 transition-all",style:{background:c===e.id?"rgba(251,191,36,0.1)":"rgba(15,23,42,0.4)",border:`1px solid ${c===e.id?"rgba(251,191,36,0.35)":"rgba(51,65,85,0.3)"}`},children:[(0,t.jsx)("p",{className:"text-xs font-mono text-slate-300",children:new Date(e.created_at).toLocaleDateString()}),(0,t.jsx)("p",{className:"text-xs text-slate-500",children:new Date(e.created_at).toLocaleTimeString()}),(0,t.jsxs)("div",{className:"flex gap-2 mt-1",children:[(0,t.jsxs)("span",{className:"text-xs font-mono",style:{color:e.drift_count>0?"rgb(248,113,113)":"rgb(52,211,153)"},children:[e.drift_count,"d"]}),(0,t.jsxs)("span",{className:"text-xs font-mono",style:{color:e.orphan_capability_count>0?n:"rgb(52,211,153)"},children:[e.orphan_capability_count,"o"]})]})]},e.id))}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col gap-4",children:[h&&(0,t.jsx)("div",{className:"text-slate-500 text-sm py-8 text-center",children:"Loading scan…"}),!h&&g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"rounded-xl p-5 flex flex-col gap-3",style:s,children:[(0,t.jsx)("h2",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:new Date(g.created_at).toLocaleString()}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-3",children:[{label:"Files",value:g.file_count},{label:"Capabilities",value:g.capability_count,color:n},{label:"Drift",value:g.drift_count,color:g.drift_count>0?"rgb(248,113,113)":"rgb(52,211,153)"},{label:"Orphans",value:g.orphan_capability_count,color:g.orphan_capability_count>0?n:"rgb(52,211,153)"},{label:"Unknown Refs",value:g.unknown_ref_count,color:g.unknown_ref_count>0?"rgb(248,113,113)":"rgb(52,211,153)"}].map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs text-slate-600 uppercase tracking-widest",children:e.label}),(0,t.jsx)("span",{className:"text-lg font-mono font-semibold",style:{color:e.color??"rgb(226,232,240)"},children:e.value})]},e.label))})]}),b.length>0&&(0,t.jsxs)("div",{className:"rounded-xl p-5 flex flex-col gap-3",style:s,children:[(0,t.jsx)("h2",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:"Drift Entries"}),(0,t.jsx)("div",{className:"flex flex-col gap-1",children:b.map((e,r)=>(0,t.jsxs)("div",{className:"py-1.5 border-b flex items-center justify-between gap-2",style:{borderColor:"rgba(51,65,85,0.3)"},children:[(0,t.jsx)("span",{className:"text-xs font-mono text-slate-400 truncate flex-1",children:e.file}),(0,t.jsx)("span",{className:"text-xs text-amber-400 flex-shrink-0",children:o[e.kind]??e.kind})]},r))})]}),g.orphan_capability_ids.length>0&&(0,t.jsxs)("div",{className:"rounded-xl p-5 flex flex-col gap-3",style:s,children:[(0,t.jsx)("h2",{className:"text-xs font-semibold text-amber-400 uppercase tracking-widest",children:"Orphan Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:g.orphan_capability_ids.map(e=>(0,t.jsx)(a.default,{href:`/amber/capabilities/${encodeURIComponent(e)}`,className:"text-xs font-mono px-2 py-0.5 rounded hover:brightness-110 transition-all",style:{background:"rgba(251,191,36,0.1)",color:n,border:"1px solid rgba(251,191,36,0.25)"},children:e},e))})]}),0===g.drift_count&&0===g.orphan_capability_count&&(0,t.jsx)("div",{className:"rounded-xl p-5 text-center",style:s,children:(0,t.jsx)("p",{className:"text-emerald-400 text-sm font-medium",children:"✓ Clean scan — no drift, no orphans"})})]})]})]})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.2"," · AMBER / Coverage"]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in r)Object.defineProperty(s,n,{enumerable:!0,get:r[n]});let l=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:s}=e,r=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:s&&(c=t+(~s.indexOf(":")?`[${s}]`:s),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(l.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||a.test(r))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${r}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(71645);function n(e,t){let s=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=s.current;e&&(s.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(s.current=l(e,r)),t&&(n.current=l(t,r))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let s=e(t);return"function"==typeof s?s:()=>e(null)}}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},73668,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"isLocalURL",{enumerable:!0,get:function(){return l}});let r=e.r(18967),n=e.r(52817);function l(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),s=new URL(e,t);return s.origin===t&&(0,n.hasBasePath)(s.pathname)}catch(e){return!1}}},84508,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},22016,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return g},useLinkStatus:function(){return y}};for(var n in r)Object.defineProperty(s,n,{enumerable:!0,get:r[n]});let l=e.r(90809),a=e.r(43476),o=l._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function g(t){var s,r;let n,l,g,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:w,children:k,prefetch:S=null,passHref:_,replace:C,shallow:P,scroll:E,onClick:O,onMouseEnter:T,onTouchStart:R,legacyBehavior:L=!1,onNavigate:A,transitionTypes:U,ref:I,unstable_dynamicOnHover:M,...$}=t;n=k,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let B=o.default.useContext(c.AppRouterContext),D=!1!==S,F=!1!==S?null===(r=S)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(s=w||N)?s:(0,i.formatUrl)(s);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=o.default.Children.only(n)}let W=L?l&&"object"==typeof l&&l.ref:I,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),q={ref:(0,u.useMergedRef)(z,W),onClick(t){L||"function"!=typeof O||O(t),L&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!B||t.defaultPrevented||function(t,s,r,n,l,a,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(s)){n&&(t.preventDefault(),location.replace(s));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(s,n?"replace":"push",!1===l?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,r.current,i)})}}(t,K,v,C,E,A,U)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,d.isAbsoluteUrl)(K)?q.href=K:L&&!_&&("a"!==l.type||"href"in l.props)||(q.href=(0,p.addBasePath)(K)),g=L?o.default.cloneElement(l,q):(0,a.jsx)("a",{...$,...q,children:n}),(0,a.jsx)(b.Provider,{value:y,children:g})}e.r(84508);let b=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},18566,(e,t,s)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),s=e.i(22016),r=e.i(18566),n=e.i(71645);let l={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function a(e){return"free"!==l[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,a],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:s,onSelect:r,isPro:l=!1}){let[c,u]=(0,n.useState)(!1),d=(0,n.useRef)(null);if((0,n.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=a("monorepo")&&!l;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:s??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===s?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{r(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===s&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:s===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{r(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),s===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,n.useState)(""),[s,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let s=e.targetPath??"";t(s?`?target=${encodeURIComponent(s)}`:"")}).catch(()=>{}).finally(()=>r(!0))},[]),{tq:e,ready:s}}function u(e){let[t,s]=(0,n.useState)(null),[r,l]=(0,n.useState)(null),[a,o]=(0,n.useState)(!1);(0,n.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{s(e.monorepo??null),l(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,n.useCallback)(async t=>{l(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=r?`&workspace=${encodeURIComponent(r)}`:"";return{monorepo:t,activeWorkspace:r,setActiveWorkspace:i,ready:a,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,s]=(0,n.useState)(null),[r,l]=(0,n.useState)(!1),[a,o]=(0,n.useState)(0);(0,n.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>s(e)).catch(()=>s(d)).finally(()=>l(!0))},[e,a]);let i=(0,n.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:r,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,r.usePathname)(),{tq:n}=c(),{monorepo:l,activeWorkspace:a,setActiveWorkspace:o}=u(n),{isPro:d}=p(n);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(s.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:r,label:n,color:l})=>{let a=e.startsWith(r);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(s.default,{href:r,className:"text-sm font-medium transition-colors px-1",style:{color:a?l??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:n})]},r)}),l&&"single"!==l.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:l,activeWorkspace:a,onSelect:o,isPro:d})]})]})}],50667)},57648,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(22016),n=e.i(18566),l=e.i(50667);let a={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},o={active:"rgb(59,130,246)",completed:"rgb(52,211,153)",abandoned:"rgba(148,163,184,0.5)"};function i({session:e}){let s=e.turns[e.turns.length-1];return(0,t.jsxs)(r.default,{href:`/blue/sessions/${e.id}`,className:"w-full rounded-xl p-5 flex flex-col gap-2 transition-all hover:brightness-110 cursor-pointer",style:a,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-slate-200 leading-snug flex-1",children:e.title}),(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full flex-shrink-0",style:{background:o[e.status]+"18",color:o[e.status],border:`1px solid ${o[e.status]}35`},children:e.status})]}),s&&(0,t.jsx)("p",{className:"text-xs text-slate-500 leading-relaxed line-clamp-2",children:s.response??s.prompt}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-600",children:[e.turns.length," turn",1!==e.turns.length?"s":""]}),(0,t.jsx)("span",{className:"text-xs text-slate-700",children:"·"}),(0,t.jsx)("span",{className:"text-xs text-slate-600",children:new Date(e.updated_at).toLocaleDateString()}),e.rec_id&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs text-slate-700",children:"·"}),(0,t.jsx)("span",{className:"text-xs text-indigo-400 font-mono",children:"linked rec"})]})]})]})}e.s(["default",0,function(){let e=(0,n.useRouter)(),[o,c]=(0,s.useState)([]),[u,d]=(0,s.useState)(!0),[p,f]=(0,s.useState)(!1);async function x(){try{let e=await fetch("/api/blue/sessions"),t=await e.json();c(t.sessions??[])}catch{}finally{d(!1)}}async function h(){f(!0);try{let t=await fetch("/api/blue/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"New session"})}),s=await t.json();e.push(`/blue/sessions/${s.session.id}`)}catch{f(!1)}}(0,s.useEffect)(()=>{x()},[]);let m=o.filter(e=>"active"===e.status),g=o.filter(e=>"completed"===e.status),b=o.filter(e=>"abandoned"===e.status);return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.default,{href:"/blue",className:"text-slate-500 hover:text-slate-300 text-sm transition-colors",children:"← BLUE"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-slate-100 tracking-tight",children:(0,t.jsx)("span",{className:"font-mono text-indigo-400",children:"Sessions"})})]}),(0,t.jsxs)("p",{className:"text-xs text-slate-500 mt-0.5",children:[o.length," total"]})]}),(0,t.jsx)("button",{onClick:h,disabled:p,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:"rgb(99,102,241)",color:"#fff"},children:p?"Creating…":"+ New session"})]}),u&&(0,t.jsx)("div",{className:"w-full text-center py-16 text-slate-500 text-sm",children:"Loading…"}),!u&&0===o.length&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-3",style:a,children:[(0,t.jsx)("span",{className:"text-4xl",children:"💬"}),(0,t.jsx)("p",{className:"text-slate-300 font-medium",children:"No sessions yet"}),(0,t.jsx)("p",{className:"text-slate-500 text-sm",children:"Start a new session to discuss your codebase with the AI."})]}),!u&&o.length>0&&(0,t.jsxs)(t.Fragment,{children:[m.length>0&&(0,t.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-blue-400 uppercase tracking-widest",children:["Active (",m.length,")"]}),m.map(e=>(0,t.jsx)(i,{session:e},e.id))]}),g.length>0&&(0,t.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-emerald-400 uppercase tracking-widest",children:["Completed (",g.length,")"]}),g.map(e=>(0,t.jsx)(i,{session:e},e.id))]}),b.length>0&&(0,t.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-slate-600 uppercase tracking-widest",children:["Abandoned (",b.length,")"]}),b.map(e=>(0,t.jsx)(i,{session:e},e.id))]})]})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.1"," · BLUE / Sessions"]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in r)Object.defineProperty(s,n,{enumerable:!0,get:r[n]});let l=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:s}=e,r=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:s&&(c=t+(~s.indexOf(":")?`[${s}]`:s),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(l.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||a.test(r))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${r}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(71645);function n(e,t){let s=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=s.current;e&&(s.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(s.current=l(e,r)),t&&(n.current=l(t,r))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let s=e(t);return"function"==typeof s?s:()=>e(null)}}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},73668,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"isLocalURL",{enumerable:!0,get:function(){return l}});let r=e.r(18967),n=e.r(52817);function l(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),s=new URL(e,t);return s.origin===t&&(0,n.hasBasePath)(s.pathname)}catch(e){return!1}}},84508,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},22016,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return g},useLinkStatus:function(){return y}};for(var n in r)Object.defineProperty(s,n,{enumerable:!0,get:r[n]});let l=e.r(90809),a=e.r(43476),o=l._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function g(t){var s,r;let n,l,g,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:w,children:k,prefetch:S=null,passHref:_,replace:C,shallow:P,scroll:E,onClick:O,onMouseEnter:T,onTouchStart:R,legacyBehavior:L=!1,onNavigate:A,transitionTypes:U,ref:I,unstable_dynamicOnHover:M,...$}=t;n=k,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let B=o.default.useContext(c.AppRouterContext),D=!1!==S,F=!1!==S?null===(r=S)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(s=w||N)?s:(0,i.formatUrl)(s);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=o.default.Children.only(n)}let W=L?l&&"object"==typeof l&&l.ref:I,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),q={ref:(0,u.useMergedRef)(z,W),onClick(t){L||"function"!=typeof O||O(t),L&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!B||t.defaultPrevented||function(t,s,r,n,l,a,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(s)){n&&(t.preventDefault(),location.replace(s));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(s,n?"replace":"push",!1===l?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,r.current,i)})}}(t,K,v,C,E,A,U)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,d.isAbsoluteUrl)(K)?q.href=K:L&&!_&&("a"!==l.type||"href"in l.props)||(q.href=(0,p.addBasePath)(K)),g=L?o.default.cloneElement(l,q):(0,a.jsx)("a",{...$,...q,children:n}),(0,a.jsx)(b.Provider,{value:y,children:g})}e.r(84508);let b=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},18566,(e,t,s)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),s=e.i(22016),r=e.i(18566),n=e.i(71645);let l={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function a(e){return"free"!==l[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,a],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:s,onSelect:r,isPro:l=!1}){let[c,u]=(0,n.useState)(!1),d=(0,n.useRef)(null);if((0,n.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=a("monorepo")&&!l;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:s??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===s?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{r(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===s&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:s===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{r(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),s===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,n.useState)(""),[s,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let s=e.targetPath??"";t(s?`?target=${encodeURIComponent(s)}`:"")}).catch(()=>{}).finally(()=>r(!0))},[]),{tq:e,ready:s}}function u(e){let[t,s]=(0,n.useState)(null),[r,l]=(0,n.useState)(null),[a,o]=(0,n.useState)(!1);(0,n.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{s(e.monorepo??null),l(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,n.useCallback)(async t=>{l(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=r?`&workspace=${encodeURIComponent(r)}`:"";return{monorepo:t,activeWorkspace:r,setActiveWorkspace:i,ready:a,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,s]=(0,n.useState)(null),[r,l]=(0,n.useState)(!1),[a,o]=(0,n.useState)(0);(0,n.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>s(e)).catch(()=>s(d)).finally(()=>l(!0))},[e,a]);let i=(0,n.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:r,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/pricing",label:"Plans",color:"rgb(167,139,250)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,r.usePathname)(),{tq:n}=c(),{monorepo:l,activeWorkspace:a,setActiveWorkspace:o}=u(n),{isPro:d}=p(n);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(s.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:r,label:n,color:l})=>{let a=e.startsWith(r);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(s.default,{href:r,className:"text-sm font-medium transition-colors px-1",style:{color:a?l??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:n})]},r)}),l&&"single"!==l.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:l,activeWorkspace:a,onSelect:o,isPro:d})]})]})}],50667)},57648,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(22016),n=e.i(18566),l=e.i(50667);let a={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},o={active:"rgb(59,130,246)",completed:"rgb(52,211,153)",abandoned:"rgba(148,163,184,0.5)"};function i({session:e}){let s=e.turns[e.turns.length-1];return(0,t.jsxs)(r.default,{href:`/blue/sessions/${e.id}`,className:"w-full rounded-xl p-5 flex flex-col gap-2 transition-all hover:brightness-110 cursor-pointer",style:a,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-slate-200 leading-snug flex-1",children:e.title}),(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full flex-shrink-0",style:{background:o[e.status]+"18",color:o[e.status],border:`1px solid ${o[e.status]}35`},children:e.status})]}),s&&(0,t.jsx)("p",{className:"text-xs text-slate-500 leading-relaxed line-clamp-2",children:s.response??s.prompt}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-600",children:[e.turns.length," turn",1!==e.turns.length?"s":""]}),(0,t.jsx)("span",{className:"text-xs text-slate-700",children:"·"}),(0,t.jsx)("span",{className:"text-xs text-slate-600",children:new Date(e.updated_at).toLocaleDateString()}),e.rec_id&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs text-slate-700",children:"·"}),(0,t.jsx)("span",{className:"text-xs text-indigo-400 font-mono",children:"linked rec"})]})]})]})}e.s(["default",0,function(){let e=(0,n.useRouter)(),[o,c]=(0,s.useState)([]),[u,d]=(0,s.useState)(!0),[p,f]=(0,s.useState)(!1);async function x(){try{let e=await fetch("/api/blue/sessions"),t=await e.json();c(t.sessions??[])}catch{}finally{d(!1)}}async function h(){f(!0);try{let t=await fetch("/api/blue/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"New session"})}),s=await t.json();e.push(`/blue/sessions/${s.session.id}`)}catch{f(!1)}}(0,s.useEffect)(()=>{x()},[]);let m=o.filter(e=>"active"===e.status),g=o.filter(e=>"completed"===e.status),b=o.filter(e=>"abandoned"===e.status);return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.default,{href:"/blue",className:"text-slate-500 hover:text-slate-300 text-sm transition-colors",children:"← BLUE"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-slate-100 tracking-tight",children:(0,t.jsx)("span",{className:"font-mono text-indigo-400",children:"Sessions"})})]}),(0,t.jsxs)("p",{className:"text-xs text-slate-500 mt-0.5",children:[o.length," total"]})]}),(0,t.jsx)("button",{onClick:h,disabled:p,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:"rgb(99,102,241)",color:"#fff"},children:p?"Creating…":"+ New session"})]}),u&&(0,t.jsx)("div",{className:"w-full text-center py-16 text-slate-500 text-sm",children:"Loading…"}),!u&&0===o.length&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-3",style:a,children:[(0,t.jsx)("span",{className:"text-4xl",children:"💬"}),(0,t.jsx)("p",{className:"text-slate-300 font-medium",children:"No sessions yet"}),(0,t.jsx)("p",{className:"text-slate-500 text-sm",children:"Start a new session to discuss your codebase with the AI."})]}),!u&&o.length>0&&(0,t.jsxs)(t.Fragment,{children:[m.length>0&&(0,t.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-blue-400 uppercase tracking-widest",children:["Active (",m.length,")"]}),m.map(e=>(0,t.jsx)(i,{session:e},e.id))]}),g.length>0&&(0,t.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-emerald-400 uppercase tracking-widest",children:["Completed (",g.length,")"]}),g.map(e=>(0,t.jsx)(i,{session:e},e.id))]}),b.length>0&&(0,t.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,t.jsxs)("h2",{className:"text-xs font-semibold text-slate-600 uppercase tracking-widest",children:["Abandoned (",b.length,")"]}),b.map(e=>(0,t.jsx)(i,{session:e},e.id))]})]})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.2"," · BLUE / Sessions"]})]})}])}]);