@chorus-aidlc/chorus 0.14.0 → 0.14.1

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 (544) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +425 -412
  3. package/.next/standalone/.next/app-path-routes-manifest.json +43 -42
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +39 -39
  6. package/.next/standalone/.next/routes-manifest.json +8 -0
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +1 -1
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +1 -1
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +2 -2
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  41. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  42. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/admin/companies/new.html +2 -2
  45. package/.next/standalone/.next/server/app/admin/companies/new.rsc +1 -1
  46. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/admin/companies.html +2 -2
  48. package/.next/standalone/.next/server/app/admin/companies.rsc +1 -1
  49. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/admin.html +2 -2
  51. package/.next/standalone/.next/server/app/admin.rsc +1 -1
  52. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  59. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  72. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js +1 -1
  75. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/daemon/executions/route.js +1 -1
  77. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
  79. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js +1 -1
  81. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -1
  83. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
  85. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  87. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
  89. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
  91. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
  93. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
  97. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
  100. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/api/events/notifications/route.js +1 -1
  102. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/events/route.js +1 -1
  104. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  107. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  109. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  111. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  113. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  114. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  115. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  117. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js +1 -0
  119. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js.nft.json +1 -0
  120. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -0
  121. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -1
  122. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/api/mcp/route.js +4 -4
  124. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  126. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  128. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  130. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  132. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  134. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  136. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  138. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  140. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  146. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  149. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  150. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  152. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  154. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  155. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  156. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -1
  157. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  158. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  159. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  160. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  161. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  162. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  163. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  164. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  165. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  166. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  167. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  168. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  169. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
  171. package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
  172. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  173. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  174. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  175. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  176. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  177. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  178. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  179. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  180. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  181. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  182. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  183. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  184. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  185. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  186. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  187. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  188. package/.next/standalone/.next/server/app/index.html +2 -2
  189. package/.next/standalone/.next/server/app/index.rsc +1 -1
  190. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  191. package/.next/standalone/.next/server/app/login/admin.html +2 -2
  192. package/.next/standalone/.next/server/app/login/admin.rsc +1 -1
  193. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  194. package/.next/standalone/.next/server/app/login/callback.html +2 -2
  195. package/.next/standalone/.next/server/app/login/callback.rsc +1 -1
  196. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  198. package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
  199. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +1 -1
  200. package/.next/standalone/.next/server/app/login.html +2 -2
  201. package/.next/standalone/.next/server/app/login.rsc +1 -1
  202. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  203. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  204. package/.next/standalone/.next/server/app/onboarding.rsc +2 -2
  205. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  206. package/.next/standalone/.next/server/app/projects.html +2 -2
  207. package/.next/standalone/.next/server/app/projects.rsc +3 -3
  208. package/.next/standalone/.next/server/app/settings.html +2 -2
  209. package/.next/standalone/.next/server/app/settings.rsc +3 -3
  210. package/.next/standalone/.next/server/app-paths-manifest.json +43 -42
  211. package/.next/standalone/.next/server/chunks/1114.js +1 -1
  212. package/.next/standalone/.next/server/chunks/1173.js +1 -1
  213. package/.next/standalone/.next/server/chunks/1286.js +3 -2
  214. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  215. package/.next/standalone/.next/server/chunks/2382.js +1 -1
  216. package/.next/standalone/.next/server/chunks/2463.js +1 -0
  217. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  218. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  219. package/.next/standalone/.next/server/chunks/3219.js +1 -1
  220. package/.next/standalone/.next/server/chunks/3419.js +1 -1
  221. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  222. package/.next/standalone/.next/server/chunks/{1343.js → 5201.js} +2 -2
  223. package/.next/standalone/.next/server/chunks/5245.js +1 -1
  224. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  225. package/.next/standalone/.next/server/chunks/{8577.js → 6506.js} +3 -3
  226. package/.next/standalone/.next/server/chunks/{7131.js → 6515.js} +2 -2
  227. package/.next/standalone/.next/server/chunks/7364.js +1 -1
  228. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  229. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  230. package/.next/standalone/.next/server/chunks/7762.js +1 -1
  231. package/.next/standalone/.next/server/chunks/8062.js +1 -0
  232. package/.next/standalone/.next/server/chunks/8204.js +1 -0
  233. package/.next/standalone/.next/server/chunks/920.js +1 -1
  234. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  235. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  236. package/.next/standalone/.next/server/chunks/951.js +1 -0
  237. package/.next/standalone/.next/server/chunks/9979.js +1 -0
  238. package/.next/standalone/.next/server/instrumentation.js +1 -1
  239. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  240. package/.next/standalone/.next/server/middleware-manifest.json +1 -1
  241. package/.next/standalone/.next/server/pages/404.html +2 -2
  242. package/.next/standalone/.next/server/pages/500.html +1 -1
  243. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  244. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  245. package/.next/standalone/.next/static/chunks/11595.7784dfe509c100a4.js +1 -0
  246. package/.next/standalone/.next/static/chunks/21188-43211c9e40bf0d63.js +10 -0
  247. package/.next/standalone/.next/static/chunks/24537-ef5b301140cf3a58.js +1 -0
  248. package/.next/standalone/.next/static/chunks/27030-3ae1d0e29245b23e.js +1 -0
  249. package/.next/standalone/.next/static/chunks/28680-dff79c4467712199.js +1 -0
  250. package/.next/standalone/.next/static/chunks/32331-87ae9bc7517c7947.js +1 -0
  251. package/.next/standalone/.next/static/chunks/33456.3bd7ba05bd39259b.js +1 -0
  252. package/.next/standalone/.next/static/chunks/38526-7ffc4b7351c15bc4.js +1 -0
  253. package/.next/standalone/.next/static/chunks/4860.4803e40814d50dd0.js +1 -0
  254. package/.next/standalone/.next/static/chunks/51603-7fa00971493ae223.js +1 -0
  255. package/.next/standalone/.next/static/chunks/78917-c0a9a11fe437a752.js +1 -0
  256. package/.next/standalone/.next/static/chunks/84169-5beb288902aea242.js +1 -0
  257. package/.next/standalone/.next/static/chunks/84219-09970ab1b85c61f0.js +1 -0
  258. package/.next/standalone/.next/static/chunks/86155-c9b7c2c08d3fa80e.js +1 -0
  259. package/.next/standalone/.next/static/chunks/99373.0457580c532530bc.js +1 -0
  260. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-55ce87d16bc689f3.js +1 -0
  261. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-e5202e9b7669576c.js +1 -0
  262. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-d9323dc8b6c974f7.js +1 -0
  263. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-c231207c3674aa54.js +1 -0
  264. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-2b13a2224c3b6d6d.js → page-20054b1cec8ed1d2.js} +1 -1
  265. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-c83c5d1b4599e737.js +1 -0
  266. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-7948aa8db4813091.js +1 -0
  267. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-d37d5adabc60a16c.js → page-278d30ee1dd7e315.js} +1 -1
  268. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-8212e69e806cab35.js → page-5a22db5f8504e61d.js} +1 -1
  269. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-47a17dbadfbc75ad.js +1 -0
  270. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-7fbf5bc58d3dd5b0.js +1 -0
  271. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-55ce87d16bc689f3.js +1 -0
  272. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-55ce87d16bc689f3.js +1 -0
  273. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-55ce87d16bc689f3.js +1 -0
  274. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-55ce87d16bc689f3.js +1 -0
  275. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-55ce87d16bc689f3.js +1 -0
  276. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-55ce87d16bc689f3.js +1 -0
  277. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-55ce87d16bc689f3.js +1 -0
  278. package/.next/standalone/.next/static/chunks/app/api/agents/route-55ce87d16bc689f3.js +1 -0
  279. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-55ce87d16bc689f3.js +1 -0
  280. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-55ce87d16bc689f3.js +1 -0
  281. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-55ce87d16bc689f3.js +1 -0
  282. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-55ce87d16bc689f3.js +1 -0
  283. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-55ce87d16bc689f3.js +1 -0
  284. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-55ce87d16bc689f3.js +1 -0
  285. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-55ce87d16bc689f3.js +1 -0
  286. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-55ce87d16bc689f3.js +1 -0
  287. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-55ce87d16bc689f3.js +1 -0
  288. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-55ce87d16bc689f3.js +1 -0
  289. package/.next/standalone/.next/static/chunks/app/api/comments/route-55ce87d16bc689f3.js +1 -0
  290. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-55ce87d16bc689f3.js +1 -0
  291. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-55ce87d16bc689f3.js +1 -0
  292. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-55ce87d16bc689f3.js +1 -0
  293. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-55ce87d16bc689f3.js +1 -0
  294. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-55ce87d16bc689f3.js +1 -0
  295. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-55ce87d16bc689f3.js +1 -0
  296. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-55ce87d16bc689f3.js +1 -0
  297. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-55ce87d16bc689f3.js +1 -0
  298. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-55ce87d16bc689f3.js +1 -0
  299. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-55ce87d16bc689f3.js +1 -0
  300. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-55ce87d16bc689f3.js +1 -0
  301. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-55ce87d16bc689f3.js +1 -0
  302. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-55ce87d16bc689f3.js +1 -0
  303. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-55ce87d16bc689f3.js +1 -0
  304. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-55ce87d16bc689f3.js +1 -0
  305. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-55ce87d16bc689f3.js +1 -0
  306. package/.next/standalone/.next/static/chunks/app/api/events/route-55ce87d16bc689f3.js +1 -0
  307. package/.next/standalone/.next/static/chunks/app/api/health/route-55ce87d16bc689f3.js +1 -0
  308. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-55ce87d16bc689f3.js +1 -0
  309. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-55ce87d16bc689f3.js +1 -0
  310. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-55ce87d16bc689f3.js +1 -0
  311. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-55ce87d16bc689f3.js +1 -0
  312. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-55ce87d16bc689f3.js +1 -0
  313. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-55ce87d16bc689f3.js +1 -0
  314. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/wake-preview/route-55ce87d16bc689f3.js +1 -0
  315. package/.next/standalone/.next/static/chunks/app/api/ideas/conversational/route-55ce87d16bc689f3.js +1 -0
  316. package/.next/standalone/.next/static/chunks/app/api/mcp/route-55ce87d16bc689f3.js +1 -0
  317. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-55ce87d16bc689f3.js +1 -0
  318. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-55ce87d16bc689f3.js +1 -0
  319. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-55ce87d16bc689f3.js +1 -0
  320. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-55ce87d16bc689f3.js +1 -0
  321. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-55ce87d16bc689f3.js +1 -0
  322. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-55ce87d16bc689f3.js +1 -0
  323. package/.next/standalone/.next/static/chunks/app/api/notifications/route-55ce87d16bc689f3.js +1 -0
  324. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-55ce87d16bc689f3.js +1 -0
  325. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-55ce87d16bc689f3.js +1 -0
  326. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-55ce87d16bc689f3.js +1 -0
  327. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-55ce87d16bc689f3.js +1 -0
  328. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-55ce87d16bc689f3.js +1 -0
  329. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-55ce87d16bc689f3.js +1 -0
  330. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-55ce87d16bc689f3.js +1 -0
  331. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-55ce87d16bc689f3.js +1 -0
  332. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-55ce87d16bc689f3.js +1 -0
  333. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-55ce87d16bc689f3.js +1 -0
  334. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-55ce87d16bc689f3.js +1 -0
  335. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-55ce87d16bc689f3.js +1 -0
  336. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-55ce87d16bc689f3.js +1 -0
  337. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/resource-graph/route-55ce87d16bc689f3.js +1 -0
  338. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-55ce87d16bc689f3.js +1 -0
  339. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-55ce87d16bc689f3.js +1 -0
  340. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-55ce87d16bc689f3.js +1 -0
  341. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-55ce87d16bc689f3.js +1 -0
  342. package/.next/standalone/.next/static/chunks/app/api/projects/route-55ce87d16bc689f3.js +1 -0
  343. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-55ce87d16bc689f3.js +1 -0
  344. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-55ce87d16bc689f3.js +1 -0
  345. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-55ce87d16bc689f3.js +1 -0
  346. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-55ce87d16bc689f3.js +1 -0
  347. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-55ce87d16bc689f3.js +1 -0
  348. package/.next/standalone/.next/static/chunks/app/api/references/[uuid]/route-55ce87d16bc689f3.js +1 -0
  349. package/.next/standalone/.next/static/chunks/app/api/references/route-55ce87d16bc689f3.js +1 -0
  350. package/.next/standalone/.next/static/chunks/app/api/search/route-55ce87d16bc689f3.js +1 -0
  351. package/.next/standalone/.next/static/chunks/app/api/session/route-55ce87d16bc689f3.js +1 -0
  352. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-55ce87d16bc689f3.js +1 -0
  353. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-55ce87d16bc689f3.js +1 -0
  354. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-55ce87d16bc689f3.js +1 -0
  355. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-55ce87d16bc689f3.js +1 -0
  356. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-55ce87d16bc689f3.js +1 -0
  357. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-55ce87d16bc689f3.js +1 -0
  358. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-55ce87d16bc689f3.js +1 -0
  359. package/.next/standalone/.next/static/chunks/app/onboarding/page-ece3f647133d446e.js +1 -0
  360. package/.next/standalone/.next/static/chunks/{webpack-9dda6192665a5c8d.js → webpack-96be8d6bd0d3d25f.js} +1 -1
  361. package/.next/standalone/package.json +1 -1
  362. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  363. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  364. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +7 -1
  365. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +1 -1
  366. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +32 -1
  367. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
  368. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
  369. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  370. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  371. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +1 -1
  372. package/.next/standalone/public/install-kiro.sh +350 -0
  373. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-code-reviewer.json +10 -0
  374. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-proposal-reviewer.json +10 -0
  375. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-task-reviewer.json +10 -0
  376. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus.json +50 -0
  377. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus.md +62 -0
  378. package/.next/standalone/public/kiro-plugin/.kiro/settings/mcp.json +12 -0
  379. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +158 -0
  380. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +421 -0
  381. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +332 -0
  382. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +434 -0
  383. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +386 -0
  384. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +193 -0
  385. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +360 -0
  386. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +547 -0
  387. package/.next/standalone/public/kiro-plugin/.kiro/steering/chorus.md +391 -0
  388. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +392 -0
  389. package/.next/standalone/public/kiro-plugin/bin/on-agent-spawn.sh +81 -0
  390. package/.next/standalone/public/kiro-plugin/bin/on-post-submit-for-verify.sh +68 -0
  391. package/.next/standalone/public/kiro-plugin/bin/on-post-submit-proposal.sh +76 -0
  392. package/.next/standalone/public/kiro-plugin/bin/on-post-verify-task.sh +119 -0
  393. package/.next/standalone/public/kiro-plugin/bin/on-stop.sh +45 -0
  394. package/.next/standalone/public/kiro-plugin/bin/test-syntax.sh +108 -0
  395. package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +1 -1
  396. package/.next/standalone/public/skill/chorus/SKILL.md +7 -1
  397. package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -1
  398. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  399. package/.next/standalone/public/skill/idea-chorus/SKILL.md +32 -1
  400. package/.next/standalone/public/skill/package.json +1 -1
  401. package/.next/standalone/public/skill/proposal-chorus/SKILL.md +1 -1
  402. package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +1 -1
  403. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  404. package/.next/standalone/public/skill/review-chorus/SKILL.md +1 -1
  405. package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +1 -1
  406. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +1 -1
  407. package/README.ja.md +4 -1
  408. package/README.ko.md +4 -1
  409. package/README.md +4 -1
  410. package/README.zh.md +4 -1
  411. package/chorus.mjs +4 -0
  412. package/cli/client-args.mjs +19 -8
  413. package/cli/codex-session-map.mjs +9 -79
  414. package/cli/daemon-agent.mjs +12 -7
  415. package/cli/daemon-config.mjs +2 -2
  416. package/cli/daemon-install-config.mjs +213 -0
  417. package/cli/daemon-service.mjs +12 -7
  418. package/cli/daemon.mjs +68 -9
  419. package/cli/kiro-session-map.mjs +49 -0
  420. package/cli/kiro-spawner.mjs +409 -0
  421. package/cli/kiro-transcript.mjs +262 -0
  422. package/cli/prompts.mjs +19 -2
  423. package/cli/session-map.mjs +126 -0
  424. package/cli/spawner-select.mjs +7 -1
  425. package/cli/waker.mjs +18 -3
  426. package/package.json +1 -1
  427. package/prisma/migrations/20260714091007_add_daemon_execution_direct_idea/migration.sql +2 -0
  428. package/prisma/schema.prisma +8 -0
  429. package/.next/standalone/.next/server/chunks/1388.js +0 -1
  430. package/.next/standalone/.next/server/chunks/3373.js +0 -1
  431. package/.next/standalone/.next/server/chunks/5011.js +0 -1
  432. package/.next/standalone/.next/server/chunks/5891.js +0 -1
  433. package/.next/standalone/.next/static/chunks/11595.c932231a36943893.js +0 -1
  434. package/.next/standalone/.next/static/chunks/20081-a2bf5c9f24d5d589.js +0 -1
  435. package/.next/standalone/.next/static/chunks/24537-7988a894f20f8dae.js +0 -1
  436. package/.next/standalone/.next/static/chunks/2709-8f25369aeb5701a4.js +0 -1
  437. package/.next/standalone/.next/static/chunks/33456.f1c7b6bd0a6a65e4.js +0 -1
  438. package/.next/standalone/.next/static/chunks/4860.9313590c6c8c8f56.js +0 -1
  439. package/.next/standalone/.next/static/chunks/55963-b2804d30cfbbe669.js +0 -1
  440. package/.next/standalone/.next/static/chunks/56608-92ab6704b364eb17.js +0 -1
  441. package/.next/standalone/.next/static/chunks/75252-29e0e25cb5a94f7f.js +0 -10
  442. package/.next/standalone/.next/static/chunks/80350-0d34e756f4aebdfc.js +0 -1
  443. package/.next/standalone/.next/static/chunks/84169-affac07755ace386.js +0 -1
  444. package/.next/standalone/.next/static/chunks/9178-182934f9127eed4e.js +0 -1
  445. package/.next/standalone/.next/static/chunks/96752-ad15cc38599f12e2.js +0 -1
  446. package/.next/standalone/.next/static/chunks/99373.9756d8f45fee79a7.js +0 -1
  447. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-9cc7c62013897acb.js +0 -1
  448. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-21571e747883b956.js +0 -1
  449. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-f763dec99ba41f1c.js +0 -1
  450. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-f13281a5806b6b4b.js +0 -1
  451. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-6c577e521c61f718.js +0 -1
  452. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-078f21255acdf752.js +0 -1
  453. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-85665683f67eebc7.js +0 -1
  454. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-2ab18a236a0c7f7b.js +0 -1
  455. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-9cc7c62013897acb.js +0 -1
  456. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-9cc7c62013897acb.js +0 -1
  457. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-9cc7c62013897acb.js +0 -1
  458. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-9cc7c62013897acb.js +0 -1
  459. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-9cc7c62013897acb.js +0 -1
  460. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-9cc7c62013897acb.js +0 -1
  461. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-9cc7c62013897acb.js +0 -1
  462. package/.next/standalone/.next/static/chunks/app/api/agents/route-9cc7c62013897acb.js +0 -1
  463. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-9cc7c62013897acb.js +0 -1
  464. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-9cc7c62013897acb.js +0 -1
  465. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-9cc7c62013897acb.js +0 -1
  466. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-9cc7c62013897acb.js +0 -1
  467. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-9cc7c62013897acb.js +0 -1
  468. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-9cc7c62013897acb.js +0 -1
  469. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-9cc7c62013897acb.js +0 -1
  470. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-9cc7c62013897acb.js +0 -1
  471. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-9cc7c62013897acb.js +0 -1
  472. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-9cc7c62013897acb.js +0 -1
  473. package/.next/standalone/.next/static/chunks/app/api/comments/route-9cc7c62013897acb.js +0 -1
  474. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-9cc7c62013897acb.js +0 -1
  475. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-9cc7c62013897acb.js +0 -1
  476. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-9cc7c62013897acb.js +0 -1
  477. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-9cc7c62013897acb.js +0 -1
  478. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-9cc7c62013897acb.js +0 -1
  479. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-9cc7c62013897acb.js +0 -1
  480. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-9cc7c62013897acb.js +0 -1
  481. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-9cc7c62013897acb.js +0 -1
  482. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-9cc7c62013897acb.js +0 -1
  483. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-9cc7c62013897acb.js +0 -1
  484. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-9cc7c62013897acb.js +0 -1
  485. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-9cc7c62013897acb.js +0 -1
  486. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-9cc7c62013897acb.js +0 -1
  487. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-9cc7c62013897acb.js +0 -1
  488. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-9cc7c62013897acb.js +0 -1
  489. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-9cc7c62013897acb.js +0 -1
  490. package/.next/standalone/.next/static/chunks/app/api/events/route-9cc7c62013897acb.js +0 -1
  491. package/.next/standalone/.next/static/chunks/app/api/health/route-9cc7c62013897acb.js +0 -1
  492. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-9cc7c62013897acb.js +0 -1
  493. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-9cc7c62013897acb.js +0 -1
  494. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-9cc7c62013897acb.js +0 -1
  495. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-9cc7c62013897acb.js +0 -1
  496. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-9cc7c62013897acb.js +0 -1
  497. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-9cc7c62013897acb.js +0 -1
  498. package/.next/standalone/.next/static/chunks/app/api/ideas/conversational/route-9cc7c62013897acb.js +0 -1
  499. package/.next/standalone/.next/static/chunks/app/api/mcp/route-9cc7c62013897acb.js +0 -1
  500. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-9cc7c62013897acb.js +0 -1
  501. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-9cc7c62013897acb.js +0 -1
  502. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-9cc7c62013897acb.js +0 -1
  503. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-9cc7c62013897acb.js +0 -1
  504. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-9cc7c62013897acb.js +0 -1
  505. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-9cc7c62013897acb.js +0 -1
  506. package/.next/standalone/.next/static/chunks/app/api/notifications/route-9cc7c62013897acb.js +0 -1
  507. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-9cc7c62013897acb.js +0 -1
  508. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-9cc7c62013897acb.js +0 -1
  509. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-9cc7c62013897acb.js +0 -1
  510. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-9cc7c62013897acb.js +0 -1
  511. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-9cc7c62013897acb.js +0 -1
  512. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-9cc7c62013897acb.js +0 -1
  513. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-9cc7c62013897acb.js +0 -1
  514. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-9cc7c62013897acb.js +0 -1
  515. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-9cc7c62013897acb.js +0 -1
  516. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-9cc7c62013897acb.js +0 -1
  517. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-9cc7c62013897acb.js +0 -1
  518. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-9cc7c62013897acb.js +0 -1
  519. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-9cc7c62013897acb.js +0 -1
  520. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/resource-graph/route-9cc7c62013897acb.js +0 -1
  521. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-9cc7c62013897acb.js +0 -1
  522. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-9cc7c62013897acb.js +0 -1
  523. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-9cc7c62013897acb.js +0 -1
  524. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-9cc7c62013897acb.js +0 -1
  525. package/.next/standalone/.next/static/chunks/app/api/projects/route-9cc7c62013897acb.js +0 -1
  526. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-9cc7c62013897acb.js +0 -1
  527. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-9cc7c62013897acb.js +0 -1
  528. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-9cc7c62013897acb.js +0 -1
  529. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-9cc7c62013897acb.js +0 -1
  530. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-9cc7c62013897acb.js +0 -1
  531. package/.next/standalone/.next/static/chunks/app/api/references/[uuid]/route-9cc7c62013897acb.js +0 -1
  532. package/.next/standalone/.next/static/chunks/app/api/references/route-9cc7c62013897acb.js +0 -1
  533. package/.next/standalone/.next/static/chunks/app/api/search/route-9cc7c62013897acb.js +0 -1
  534. package/.next/standalone/.next/static/chunks/app/api/session/route-9cc7c62013897acb.js +0 -1
  535. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-9cc7c62013897acb.js +0 -1
  536. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-9cc7c62013897acb.js +0 -1
  537. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-9cc7c62013897acb.js +0 -1
  538. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-9cc7c62013897acb.js +0 -1
  539. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-9cc7c62013897acb.js +0 -1
  540. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-9cc7c62013897acb.js +0 -1
  541. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-9cc7c62013897acb.js +0 -1
  542. package/.next/standalone/.next/static/chunks/app/onboarding/page-455d693daccb65df.js +0 -1
  543. /package/.next/standalone/.next/static/{sOwBl2wYTfQ3B0DrB18aB → C9o43aSSZ0ebgki6mQ0-b}/_buildManifest.js +0 -0
  544. /package/.next/standalone/.next/static/{sOwBl2wYTfQ3B0DrB18aB → C9o43aSSZ0ebgki6mQ0-b}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=2382,exports.ids=[2382],exports.modules={8495:(a,b,c)=>{c.d(b,{S:()=>h});var d=c(10837);c(21968);var e=c(9810),f=c(25711),g=c(96307);function h({className:a,...b}){return(0,d.jsx)(f.Root,{"data-slot":"checkbox",className:(0,g.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",a),...b,children:(0,d.jsx)(f.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,d.jsx)(e.A,{className:"size-3.5"})})})}},9190:(a,b,c)=>{c.d(b,{n:()=>t});var d=c(10837),e=c(21968),f=c(9222),g=c(51592),h=c(49102),i=c(21790),j=c(20447),k=c(9810),l=c(97443),m=c(81512),n=c.n(m),o=c(76172),p=c(25493),q=c(22727),r=c(77521);let s=["in_progress","to_verify","open","assigned","done","closed"];function t({tasks:a,projectUuid:b,proposalUuids:c,onSelectTask:m}){let t=(0,f.c)("ideaTracker"),[u,v]=(0,e.useState)({}),w=(0,e.useMemo)(()=>a.map(a=>a.uuid),[a]),x=(0,e.useCallback)(async()=>{if(0===w.length)return;let a=await (0,p.h)(w);a.success&&a.data&&v(a.data)},[w]);(0,o.eV)("task",x);let y=(0,e.useMemo)(()=>{let b=[];for(let c of s){let d=a.filter(a=>a.status===c);d.length>0&&b.push({status:c,tasks:d})}let c=new Set(s),d=a.filter(a=>!c.has(a.status));return d.length>0&&b.push({status:"other",tasks:d}),b},[a]),[z,A]=(0,e.useState)(new Set),B=(0,e.useMemo)(()=>{let b=a.length,c=a.filter(a=>"done"===a.status||"closed"===a.status).length,d=0,e=0,f=0,g=0;for(let b of a)b.acceptanceSummary&&(d+=b.acceptanceSummary.total,e+=b.acceptanceSummary.passed,f+=b.acceptanceSummary.required,g+=b.acceptanceSummary.requiredPassed);return{total:b,done:c,acTotal:d,acPassed:e,acRequired:f,acRequiredPassed:g}},[a]);return 0===a.length?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[(0,d.jsx)(g.A,{className:"h-8 w-8 text-muted-foreground"}),(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:t("panel.taskList.noTasks")})]}):(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg bg-[#FAFAF7] dark:bg-[#1e1e1c] px-3 py-2",children:[(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:t("panel.taskList.summary",{done:B.done,total:B.total})}),B.acTotal>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:"\xb7"}),(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:t("panel.taskList.acSummary",{passed:B.acRequiredPassed,total:B.acRequired})})]}),c.length>0&&(0,d.jsxs)(n(),{href:`/projects/${b}/tasks?proposalUuids=${c.join(",")}`,className:"ml-auto flex items-center gap-1 text-[13px] font-medium text-primary shrink-0",children:[t("panel.taskList.viewKanban"),(0,d.jsx)(h.A,{className:"h-3.5 w-3.5"})]})]}),y.map(a=>{let b=z.has(a.status);return(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{onClick:()=>{var b;return b=a.status,void A(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"flex items-center gap-2 w-full text-left py-1.5 group cursor-pointer",children:[b?(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,d.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${(0,r.eT)(a.status)}`}),(0,d.jsx)("span",{className:"text-[13px] font-medium text-foreground",children:function(a,b){switch(a){case"in_progress":return b("panel.taskList.inProgress");case"to_verify":return b("panel.taskList.toVerify");case"open":return b("panel.taskList.open");case"assigned":return b("panel.taskList.assigned");case"done":return b("panel.taskList.done");case"closed":return b("panel.taskList.closed");default:return a}}(a.status,t)}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground ml-auto",children:a.tasks.length})]}),!b&&(0,d.jsx)("div",{className:"ml-3 space-y-0.5",children:a.tasks.map(a=>{let b=u[a.uuid]||0,c=a.acceptanceSummary;return(0,d.jsx)(q.D,{entityType:"task",entityUuid:a.uuid,badgeInside:!0,children:(0,d.jsxs)("button",{onClick:()=>m(a.uuid),className:"flex items-center gap-2 w-full text-left rounded-md px-2.5 py-2 hover:bg-secondary transition-colors group cursor-pointer",children:[(0,d.jsx)(j.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0 group-hover:text-primary"}),(0,d.jsx)("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${(0,r.eT)(a.status)}`}),(0,d.jsx)("span",{className:"flex-1 text-[13px] text-foreground truncate group-hover:text-primary",children:a.title}),c&&c.total>0&&(0,d.jsxs)("span",{className:"inline-flex items-center gap-0.5 shrink-0 rounded-full bg-[#F0EDE8] dark:bg-[#1f1e1c] px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[(0,d.jsx)(k.A,{className:"h-2.5 w-2.5"}),c.requiredPassed,"/",c.required]}),a.assignee&&(0,d.jsxs)("span",{className:"shrink-0 inline-flex items-center gap-1 text-[10px] text-muted-foreground max-w-[72px] truncate",title:a.assignee.name,children:[(0,d.jsx)(l.A,{className:"h-2.5 w-2.5 shrink-0"}),a.assignee.name.split(/[@\s]/)[0]]}),b>0&&(0,d.jsx)("span",{className:"inline-flex items-center justify-center h-4 min-w-[16px] rounded-full bg-[#E8F5E9] dark:bg-[#14281a] text-[#2E7D32] dark:text-[#5FD07E] text-[9px] font-semibold shrink-0",title:t("panel.taskList.workersActive",{count:b}),children:b})]})},a.uuid)})})]},a.status)})]})}},17068:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{x:()=>k});var e=c(10837),f=c(21968),g=c(9222),h=c(40467),i=c(56828),j=a([i]);function k({ideaUuid:a,currentUserUuid:b,commentCount:c,onCommentCountChange:d}){let j=(0,g.c)("ideaTracker"),[k,l]=(0,f.useState)("comments");return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex gap-1 rounded-lg bg-secondary p-0.5",children:[(0,e.jsxs)("button",{onClick:()=>l("comments"),className:`flex-1 rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors flex items-center justify-center gap-1.5 cursor-pointer ${"comments"===k?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:[j("panel.activityTab.comments"),c>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-secondary text-muted-foreground text-[10px] font-semibold leading-none",children:c})]}),(0,e.jsx)("button",{onClick:()=>l("activity"),className:`flex-1 rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors cursor-pointer ${"activity"===k?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:j("panel.activityTab.activity")})]}),(0,e.jsx)("div",{children:"activity"===k?(0,e.jsx)(h.v,{ideaUuid:a}):(0,e.jsx)(i.$m,{targetType:"idea",targetUuid:a,currentUserUuid:b,onCountChange:d,compact:!0})})]})}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},21289:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},32382:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>ad});var e=c(10837),f=c(21968),g=c(9222),h=c(68884),i=c(76549),j=c(33291),k=c(24364),l=c(87461),m=c(10694),n=c(86460),o=c(53109),p=c(74733),q=c(59876),r=c(98893),s=c(79543),t=c(42424),u=c(74645),v=c(49599),w=c(9994),x=c(20170),y=c(2852),z=c(88536),A=c(6019),B=c(76172),C=c(84722),D=c(64370),E=c(95807),F=c(66253),G=c(9190),H=c(17068),I=c(86104),J=c(98310),K=c(79269),L=c(96120),M=c(44963),N=c(29982),O=c(71370),P=c(42484),Q=c(79110),R=c(39242),S=c(51244),T=c(47058),U=c(48122),V=c(5181),W=c(26402),X=c(16554),Y=c(8828),Z=c(41055),$=c(54722),_=c(76664),aa=c(77521),ab=c(79030),ac=a([C,D,H,I,J,M]);function ad({ideaUuid:a,projectUuid:b,currentUserUuid:c,onClose:d,onNavigate:ac}){let ad=(0,g.c)(),ae=(0,g.c)("ideaTracker"),af=(0,g.c)("status"),ag=(0,g.c)("ideaTracker.lineage"),ah=(0,h.r)(),[ai,aj]=(0,f.useState)(null),[ak,al]=(0,f.useState)(!0),[am,an]=(0,f.useState)(null),[ao,ap]=(0,f.useState)([]),[aq,ar]=(0,f.useState)([]),[as,at]=(0,f.useState)("overview"),[au,av]=(0,f.useState)(new Set(["overview"])),[aw,ax]=(0,f.useState)(!1),[ay,az]=(0,f.useState)(0),[aA,aB]=(0,f.useState)(!1),[aC,aD]=(0,f.useState)(!1),[aE,aF]=(0,f.useState)(null),[aG,aH]=(0,f.useState)(!0),[aI,aJ]=(0,f.useState)(!1),[aK,aL]=(0,f.useState)(null),[aM,aN]=(0,f.useState)(!1),[aO,aP]=(0,f.useState)(!1),[aQ,aR]=(0,f.useState)(""),[aS,aT]=(0,f.useState)(""),[aU,aV]=(0,f.useState)(!1),[aW,aX]=(0,f.useState)(null),[aY,aZ]=(0,f.useState)(!1),[a$,a_]=(0,f.useState)(!1),[a0,a1]=(0,f.useState)(!1),[a2,a3]=(0,f.useState)(!1),[a4,a5]=(0,f.useState)(null),[a6,a7]=(0,f.useState)(null),[a8,a9]=(0,f.useState)(null),ba=(0,f.useCallback)(a=>{a9(null),a5(a)},[]),bb=(0,f.useCallback)(a=>{a5(null),a7(null),a9(a)},[]),[bc,bd]=(0,f.useState)(!1),[be,bf]=(0,f.useState)(!1),bg=(0,f.useCallback)(a=>{let b=new URLSearchParams(window.location.search);b.set("tab",a),window.history.replaceState(null,"",`${window.location.pathname}?${b.toString()}`)},[]),bh=(0,f.useCallback)(async()=>{try{let b=await (0,P.c)(a);b.success?(aj(b.data),an(null)):an(ae("Not found"===b.error?"panel.notFound":"panel.loadFailed"))}catch{an(ae("panel.loadFailed"))}finally{al(!1)}},[a,ae]);(0,B.eV)("idea",bh),(0,B.eV)("proposal",bh),(0,B.eV)("task",bh);let bi=ai?.uuid,bj=ai?.status,bk=(0,f.useCallback)(async()=>{if(!bi||"open"===bj)return void ap([]);try{let a=await (0,Q.U)(b,bi);a.success&&ap(a.data)}catch(a){$.q.error("Failed to fetch proposals:",a)}},[b,bi,bj]);(0,B.eV)("proposal",bk);let bl=(0,f.useCallback)(async()=>{let a=ao.filter(a=>"approved"===a.status);if(0===a.length)return void ar([]);try{let c=(await Promise.all(a.map(a=>(0,R.c)(b,a.uuid)))).flatMap(a=>a.success&&a.data?a.data.map(a=>({uuid:a.uuid,title:a.title,status:a.status,commentCount:a.commentCount??0,assignee:a.assignee??null,acceptanceSummary:a.acceptanceSummary??null})):[]);ar(c)}catch(a){$.q.error("Failed to fetch tasks:",a)}},[b,ao]);(0,B.eV)("task",bl);let bm=(0,f.useCallback)(async()=>{if(!bi)return;let a=await (0,T.z)(bi);a.success&&a.data&&aF(a.data),aH(!1)},[bi]);(0,B.eV)("idea",bm);let bn=(0,f.useMemo)(()=>ai?function(a,b,c){let d=["overview"];return d.push("elaboration"),b.length>0&&d.push("proposal"),c.length>0&&d.push("tasks"),d.push("activity"),d}(0,ao,aq):["overview","activity"],[ai,ao,aq]);(0,f.useRef)(null),ai&&ai.badgeHint;let bo=(0,f.useMemo)(()=>aq.filter(a=>"in_progress"===a.status||"assigned"===a.status||"to_verify"===a.status).length,[aq]),bp=(0,f.useCallback)(()=>{if(!a4)return void a7(null);(0,S.Q)(a4).then(a=>{a.success&&a7(a.data)}).catch(a=>$.q.error("Failed to load task details:",a))},[a4]);(0,B.eV)("task",bp);let bq=()=>{aP(!1),aR(ai?.title||""),aT(ai?.content||""),aX(null)},br=async()=>{if(!ai||!aQ.trim())return void aX(ad("ideas.titleRequired"));aV(!0),aX(null);let a=await (0,N.J)({ideaUuid:ai.uuid,projectUuid:b,title:aQ.trim(),content:aS.trim()||null});aV(!1),a.success?(aP(!1),await bh(),ah.refresh()):aX(a.error||ad("ideas.updateFailed"))},bs=async()=>{if(!ai)return;aD(!0);let a=await (0,O.Z)(ai.uuid,b);aD(!1),a.success&&(d(),ah.refresh())},bt=async()=>{if(!ai)return;aJ(!0),aL(null);let a=await (0,U.e)(ai.uuid);aJ(!1),a.success?(aN(!0),await bh(),ah.refresh()):aL(a.error||ad("elaboration.verifyFailed"))},bu=async a=>{if(!ai)return;aZ(!0),aj({...ai,isContainer:a});let c=await (0,N.J)({ideaUuid:ai.uuid,projectUuid:b,title:ai.title,content:ai.content??null,isContainer:a});aZ(!1),c.success?(await bh(),ah.refresh()):(aj({...ai,isContainer:!a}),i.oR.error(c.error||ad("ideas.updateFailed")))},bv=ai?.derivedStatus||"todo",bw=ai?.isContainer===!0,bx=!!ai&&"elaborated"!==ai.status,by=(0,W.o)({ideaStatus:ai?.status,elaborationStatus:ai?.elaborationStatus,elaboration:aE});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:d}),(0,e.jsxs)("div",{className:`fixed right-0 top-14 md:top-0 z-50 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col border-l border-border bg-card shadow-xl ${be?"":"animate-in slide-in-from-right duration-300"}`,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[(0,e.jsx)("div",{className:"flex-1 min-w-0",children:ak?(0,e.jsx)("div",{className:"h-5 w-40 animate-pulse rounded bg-secondary"}):ai?aO?(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:ad("ideas.editIdea")}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:`text-[11px] font-semibold uppercase tracking-wider ${bw?"text-primary":"text-muted-foreground"}`,children:bw?ag("typeTheme"):ag("typeIdea")}),(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:ai.title}),(0,e.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,e.jsx)(v.E,{className:aa._5[bv]||aa._5.todo,children:ai.badgeHint?ae(`badge.${aa.Wl[ai.badgeHint]||"open"}`):af(aa.Bj[bv]||"todo")}),bw&&ai.childProgress&&ai.childProgress.total>0&&(0,e.jsxs)("span",{className:"flex items-center gap-1 text-xs font-medium text-primary",title:ag("childrenDone",{done:ai.childProgress.done,total:ai.childProgress.total}),children:[(0,e.jsx)(ab.C,{done:ai.childProgress.done,total:ai.childProgress.total,size:13,stroke:2}),ai.childProgress.done,"/",ai.childProgress.total]}),(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,_.r)(ai.createdAt)})]})]}):(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:ae("panel.notFound")})}),(0,e.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[ai&&!aO&&(0,e.jsxs)(t.$,{variant:"outline",size:"sm",className:"h-8 gap-1.5 border-border px-2.5",onClick:()=>a3(!0),title:ag("deriveIdea"),"aria-label":ag("deriveIdea"),children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-medium text-primary",children:ag("derive")})]}),ai&&!aO&&(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:()=>a_(!0),title:ad("ideas.actions.move"),"aria-label":ad("ideas.actions.move"),children:(0,e.jsx)(k.A,{className:"h-4 w-4 text-muted-foreground"})}),ai&&"elaborated"!==ai.status&&!aO&&(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:()=>{ai&&(aR(ai.title),aT(ai.content||""),aX(null),aP(!0))},title:ad("ideas.editIdea"),children:(0,e.jsx)(l.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:aO?bq:d,children:(0,e.jsx)(m.A,{className:"h-4 w-4 text-muted-foreground"})})]})]}),ai&&!ak&&!aO&&(0,e.jsx)("div",{className:"border-b border-secondary px-6",children:(0,e.jsx)("div",{className:"flex gap-0 -mb-px",children:bn.map(a=>(0,e.jsxs)("button",{onClick:()=>{at(a),ax(!0),av(b=>new Set([...b,a])),bg(a)},className:`relative flex items-center gap-1.5 px-3 py-2.5 text-[13px] font-medium transition-colors cursor-pointer ${as===a?"text-primary border-b-2 border-primary":"text-muted-foreground hover:text-muted-foreground"}`,children:[ae(`panel.tabs.${a}`),"tasks"===a&&bo>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0] text-[10px] font-semibold leading-none",children:bo}),"activity"===a&&ay>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-secondary text-muted-foreground text-[10px] font-semibold leading-none",children:ay})]},a))})}),(0,e.jsx)(u.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"flex min-h-full flex-col px-6 py-5",children:ak?(0,e.jsxs)("div",{className:"flex flex-1 items-center justify-center py-12",children:[(0,e.jsx)(n.A,{className:"h-6 w-6 animate-spin text-primary"}),(0,e.jsx)("span",{className:"ml-2 text-sm text-muted-foreground",children:ae("loading")})]}):am?(0,e.jsx)("div",{className:"flex flex-1 items-center justify-center py-12",children:(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:am})}):ai?aO?(0,e.jsxs)("div",{className:"space-y-5",children:[aW&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:aW}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(y.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-foreground",children:ad("ideas.titleLabel")}),(0,e.jsx)(w.p,{id:"edit-title",value:aQ,onChange:a=>aR(a.target.value),className:"border-border text-sm focus-visible:ring-primary",autoFocus:!0})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(y.J,{htmlFor:"edit-content",className:"text-[13px] font-medium text-foreground",children:ad("common.content")}),(0,e.jsx)(x.T,{id:"edit-content",value:aS,onChange:a=>aT(a.target.value),rows:8,className:"border-border text-sm resize-none focus-visible:ring-primary"})]})]}):(0,e.jsxs)(e.Fragment,{children:[au.has("overview")&&(0,e.jsxs)("div",{style:{display:"overview"===as?"block":"none"},children:[(0,e.jsxs)("div",{className:"mb-5 flex items-start justify-between gap-3 rounded-lg border border-[#EFEBE3] dark:border-[#2a2a2e] bg-background px-3.5 py-3",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,e.jsxs)(y.J,{htmlFor:"container-toggle",className:"flex items-center gap-1.5 text-[13px] font-medium text-foreground",children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary","aria-hidden":!0}),ag("container")]}),(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:ag("containerDescription")})]}),(0,e.jsx)(z.d,{id:"container-toggle",checked:bw,disabled:aY,onCheckedChange:bu,"aria-label":ag("makeContainer")})]}),(0,e.jsx)(E.p,{idea:ai,proposals:ao,tasks:aq,onSelectTask:ba}),(0,e.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-foreground/80",children:ag("title")})]}),(0,e.jsxs)(t.$,{variant:"outline",size:"sm",className:"h-7 gap-1 border-border px-2 text-[11px] text-muted-foreground",onClick:()=>a1(!0),children:[(0,e.jsx)(l.A,{className:"h-3 w-3"}),ai.parentUuid?ag("changeParent"):ag("setParent")]})]}),ai.parent?(0,e.jsxs)("button",{type:"button",onClick:()=>ac?.(ai.parent.uuid),className:"flex w-full items-center gap-2 rounded-lg bg-background px-3 py-2.5 text-left transition-colors hover:bg-secondary",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"shrink-0 text-[12px] text-muted-foreground",children:ag("derivedFrom")}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium text-foreground/80",children:ai.parent.title})]}):(0,e.jsx)("p",{className:"px-1 text-[12px] text-muted-foreground",children:ag("noParent")}),ai.children&&ai.children.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between px-1 pt-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)("span",{className:"text-[12px] font-medium text-foreground/80",children:ag("derivedIdeas")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:ai.children.length})]}),(()=>{let a=ai.children.filter(a=>"done"===a.derivedStatus).length,b=ai.children.length;return(0,e.jsxs)("span",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",title:ag("childrenDone",{done:a,total:b}),children:[(0,e.jsx)(ab.C,{done:a,total:b,size:14,stroke:2}),a,"/",b]})})()]}),(0,e.jsx)("div",{className:"overflow-hidden rounded-lg border border-[#EFEBE3] dark:border-[#2a2a2e]",children:ai.children.map((a,b)=>(0,e.jsxs)("div",{children:[b>0&&(0,e.jsx)("div",{className:"h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"}),(0,e.jsxs)("button",{type:"button",onClick:()=>ac?.(a.uuid),className:"flex w-full items-center justify-between gap-2 px-3 py-2.5 text-left transition-colors hover:bg-background",children:[(0,e.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,e.jsx)(p.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"truncate text-[12px] text-foreground",children:a.title})]}),(0,e.jsx)(v.E,{className:`shrink-0 border-0 text-[10px] ${aa._5[a.derivedStatus]||aa._5.todo}`,children:af(aa.Bj[a.derivedStatus]||"todo")})]})]},a.uuid))})]})]}),(0,e.jsx)(F.U,{projectUuid:b,ideaUuid:ai.uuid,proposals:ao,onDocClick:bb}),(0,e.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(q.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-foreground/80",children:ad("references.title")})]}),(0,e.jsx)(Z.ReferencesSection,{targetType:"idea",targetUuid:ai.uuid,canWrite:!0,compact:!0})]})]}),bn.includes("elaboration")&&au.has("elaboration")&&(0,e.jsx)("div",{style:{display:"elaboration"===as?"block":"none"},children:(0,e.jsx)(C.G,{idea:ai,elaboration:aE,isLoading:aG,onRefresh:async()=>{await bm(),await bh()},onReassign:()=>aB(!0),canReassign:bx})}),bn.includes("proposal")&&au.has("proposal")&&(0,e.jsx)("div",{style:{display:"proposal"===as?"block":"none"},children:(0,e.jsx)(D.k,{idea:ai,projectUuid:b,onTaskClick:ba,onDocClick:bb,initialProposals:ao})}),bn.includes("tasks")&&au.has("tasks")&&(0,e.jsx)("div",{style:{display:"tasks"===as?"block":"none"},children:(0,e.jsx)(G.n,{tasks:aq,projectUuid:b,proposalUuids:ao.filter(a=>"approved"===a.status).map(a=>a.uuid),onSelectTask:ba})}),au.has("activity")&&(0,e.jsx)("div",{style:{display:"activity"===as?"block":"none"},children:(0,e.jsx)(H.x,{ideaUuid:ai.uuid,currentUserUuid:c,commentCount:ay,onCommentCountChange:az})})]}):null})}),ai&&!ak&&(0,e.jsx)("div",{className:"border-t border-secondary px-6 py-4",children:aO?(0,e.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[(0,e.jsx)(t.$,{variant:"outline",className:"border-border",onClick:bq,disabled:aU,children:ad("common.cancel")}),(0,e.jsx)(t.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:br,disabled:aU||!aQ.trim(),children:aU?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ad("common.save")]}):ad("common.save")})]}):(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"flex-1 min-w-0 flex flex-wrap items-center gap-2",children:[!bw&&(0,e.jsxs)(e.Fragment,{children:[by&&!aM&&(0,e.jsx)(t.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:bt,disabled:aI,children:aI?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ad("elaboration.verifying")]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(r.A,{className:"mr-2 h-4 w-4"}),ad("elaboration.verifyButton")]})}),aM&&(0,e.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:ad("elaboration.verifiedQueuedHint")}),aK&&(0,e.jsx)("span",{className:"text-[11px] text-destructive",children:aK}),(0,e.jsx)(X.w,{ideaUuid:ai.uuid,assignee:ai.assignee,proposals:ao,tasks:aq,onStarted:()=>{bh()}}),(0,e.jsx)(Y.s,{ideaUuid:ai.uuid,assignee:ai.assignee,proposals:ao,tasks:aq,onStarted:()=>{bh()}})]}),bw&&(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:ag("containerHint")})]}),(0,e.jsxs)(A.Lt,{children:[(0,e.jsx)(A.tv,{asChild:!0,children:(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"shrink-0 h-8 w-8 border-border text-[#EF4444] dark:text-[#F0897E] hover:bg-[#FFEBEE] dark:hover:bg-[#331619] hover:text-[#EF4444] hover:border-[#EF4444]",children:(0,e.jsx)(s.A,{className:"h-4 w-4"})})}),(0,e.jsxs)(A.EO,{children:[(0,e.jsxs)(A.wd,{children:[(0,e.jsx)(A.r7,{children:ad("ideas.deleteIdea")}),(0,e.jsx)(A.$v,{children:ad("ideas.deleteIdeaConfirm",{title:ai.title})})]}),(0,e.jsxs)(A.ck,{children:[(0,e.jsx)(A.Zr,{children:ad("common.cancel")}),(0,e.jsx)(A.Rx,{variant:"destructive",onClick:bs,disabled:aC,children:aC?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ad("common.delete")]}):ad("common.delete")})]})]})]})]})})]}),(0,e.jsx)(K.h,{open:a$,onOpenChange:a_,ideaUuid:a,projectUuid:b,onMoved:()=>d()}),ai&&(0,e.jsx)(L.d,{open:a0,onOpenChange:a1,ideaUuid:ai.uuid,ideaTitle:ai.title,projectUuid:b,currentParentUuid:ai.parentUuid??null,descendantUuids:ai.descendantUuids??[],onChanged:bh}),ai&&(0,e.jsx)(M.i,{open:a2,onOpenChange:a3,projectUuid:b,parentUuid:ai.uuid,parentTitle:ai.title,onCreated:a=>{i.oR.success(ag("deriveIdea")),ah.refresh(),ac?.(a)}}),aA&&ai&&(0,e.jsx)(V.i,{idea:{uuid:ai.uuid,title:ai.title,content:ai.content,status:ai.status,assignee:ai.assignee?{type:ai.assignee.type,uuid:ai.assignee.uuid,name:ai.assignee.name}:null},projectUuid:b,currentUserUuid:c,onClose:()=>{aB(!1),bh()}}),a4&&a6&&(0,e.jsx)(I.v,{task:a6,projectUuid:b,currentUserUuid:c,mode:bc?"sidebyside":"overlay",onClose:()=>{a5(null),a7(null)},onBack:()=>{a5(null),a7(null)}}),a8&&(0,e.jsx)(J.K,{title:a8.title,type:a8.type,content:a8.content,mode:bc?"sidebyside":"overlay",onClose:()=>a9(null),onBack:()=>a9(null)})]})}[C,D,H,I,J,M]=ac.then?(await ac)():ac,d()}catch(a){d(a)}})},33291:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]])},40467:(a,b,c)=>{c.d(b,{v:()=>k});var d=c(10837),e=c(21968),f=c(9222),g=c(86460),h=c(2852),i=c(80195),j=c(77521);function k({ideaUuid:a}){let b=(0,f.c)(),[c,k]=(0,e.useState)([]),[l,m]=(0,e.useState)(!0);return(0,e.useCallback)(async()=>{m(!0),k((await (0,i.x)(a)).activities),m(!1)},[a]),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)(h.J,{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:b("common.activity")}),(0,d.jsx)("div",{className:"mt-2",children:l?(0,d.jsx)("div",{className:"flex items-center justify-center py-4",children:(0,d.jsx)(g.A,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):0===c.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground italic",children:b("common.noActivity")}):c.map((a,e)=>(0,d.jsxs)("div",{className:"flex items-stretch gap-2.5",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center w-2 shrink-0",children:[(0,d.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full border-[1.5px] border-[#D9D9D9] dark:border-[#3a3a40] bg-card"}),e<c.length-1&&(0,d.jsx)("div",{className:"flex-1 w-px bg-border mt-1"})]}),(0,d.jsxs)("div",{className:"flex-1 pb-3",children:[(0,d.jsx)("p",{className:"text-[13px] text-foreground",children:function(a,b){let{action:c,actorName:d}=a;switch(c){case"created":case"idea_created":return b("activity.ideaCreated",{actor:d});case"assigned":case"idea_assigned":return b("activity.ideaAssigned",{actor:d});case"claimed":case"idea_claimed":return b("activity.ideaClaimed",{actor:d});case"released":case"idea_released":return b("activity.ideaReleased",{actor:d});case"status_changed":case"idea_status_changed":return b("activity.ideaStatusChanged",{actor:d});case"edited":case"idea_edited":return b("activity.ideaEdited",{actor:d});case"reparented":case"idea_reparented":return b("activity.ideaReparented",{actor:d});case"elaboration_started":return b("activity.elaborationStarted",{actor:d});case"elaboration_answered":return b("activity.elaborationAnswered",{actor:d});case"elaboration_skipped":return b("activity.elaborationSkipped",{actor:d});case"elaboration_resolved":return b("activity.elaborationResolved",{actor:d});case"elaboration_followup":return b("activity.elaborationFollowup",{actor:d});default:return b("activity.genericAction",{actor:d,action:c})}}(a,b)}),(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground",children:(0,j.fw)(a.createdAt,b)})]})]},a.uuid))})]})}},42484:(a,b,c)=>{c.d(b,{c:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40e3fbb2adca7f316ec1c1d663ebe641789fac6d9a",d.callServer,void 0,d.findSourceMapURL,"getIdeaAction")},44963:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{i:()=>u});var e=c(10837),f=c(21968),g=c(9222),h=c(86460),i=c(42424),j=c(11568),k=c(9994),l=c(20170),m=c(2852),n=c(8495),o=c(94372),p=c(42087),q=c(93524),r=c(70028),s=c(68797),t=a([s]);function u({open:a,onOpenChange:b,projectUuid:c,onCreated:d,parentUuid:t,parentTitle:u}){let v=(0,g.c)("ideaTracker"),w=(0,g.c)("ideaTracker.lineage"),x=!!t,y=(0,g.c)("common"),[z,A]=(0,f.useState)(""),[B,C]=(0,f.useState)(""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(!1),[H,I]=(0,f.useState)(null),[J,K]=(0,f.useState)(!1),L=(0,r.kz)(),M=(L?.connections??[]).some(a=>"online"===a.effectiveStatus),[N,O]=(0,f.useState)("form"),P=x?"form":N,Q=async()=>{let a=z.trim();if(a){G(!0),I(null);try{let e=await fetch(`/api/projects/${c}/ideas`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a,content:B.trim()||void 0,...t?{parentUuid:t}:{},...D?{isContainer:!0}:{}})}),f=await e.json();f.success&&f.data?.uuid?(A(""),C(""),E(!1),b(!1),d?.(f.data.uuid)):I(f.error||v("error.createFailed"))}catch{I(v("error.createFailed"))}finally{G(!1)}}},R=(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4 py-2",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(m.J,{htmlFor:"idea-title",children:v("newIdea.ideaTitle")}),(0,e.jsx)(k.p,{id:"idea-title",value:z,onChange:a=>A(a.target.value),placeholder:v("newIdea.titlePlaceholder"),autoFocus:!0,onKeyDown:a=>{!(0,p.P)(a)&&"Enter"===a.key&&!a.shiftKey&&z.trim()&&(a.preventDefault(),Q())}})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)(m.J,{htmlFor:"idea-content",children:[v("newIdea.description"),(0,e.jsxs)("span",{className:"ml-1 text-xs font-normal text-muted-foreground",children:["(",y("optional"),")"]})]}),(0,e.jsx)(l.T,{id:"idea-content",value:B,onChange:a=>C(a.target.value),placeholder:v("newIdea.descriptionPlaceholder"),rows:4,className:"resize-none"})]}),(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(n.S,{id:"idea-is-container",checked:D,onCheckedChange:a=>E(!0===a),className:"mt-0.5"}),(0,e.jsxs)("div",{className:"grid gap-1 leading-none",children:[(0,e.jsx)(m.J,{htmlFor:"idea-is-container",className:"cursor-pointer",children:w("makeContainer")}),(0,e.jsx)("p",{className:"text-xs font-normal text-muted-foreground",children:w("containerHint")})]})]}),H&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-[12px] text-destructive",children:H})]}),(0,e.jsxs)(j.Es,{children:[(0,e.jsx)(i.$,{variant:"outline",onClick:()=>b(!1),disabled:F,children:y("cancel")}),(0,e.jsxs)(i.$,{onClick:Q,disabled:F||!z.trim(),className:"bg-primary hover:bg-[#B56A42] text-white",children:[F?(0,e.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}):null,y("create")]})]})]}),S=async a=>{let b=await (0,q.tm)("/api/ideas/conversational",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectUuid:c,agentUuid:a.agentUuid,connectionUuid:a.connectionUuid,descriptionText:a.userText,...J?{decompose:!0}:{}})});if(!b.ok){let a=null;try{let c=await b.json();"string"==typeof c?.error&&c.error&&(a=c.error)}catch{}throw new s.fF(b.status,a)}let d=null;try{let a=await b.json();a?.success&&a.data?.session&&(d=a.data.session)}catch{}if(!d)throw new s.fF(b.status,null);return d},T=(0,e.jsxs)("div",{className:"space-y-3 py-2",children:[(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(n.S,{id:"idea-decompose",checked:J,onCheckedChange:a=>K(!0===a),className:"mt-0.5"}),(0,e.jsxs)("div",{className:"grid gap-1 leading-none",children:[(0,e.jsx)(m.J,{htmlFor:"idea-decompose",className:"cursor-pointer",children:v("newIdea.decompose")}),(0,e.jsx)("p",{className:"text-xs font-normal text-muted-foreground",children:v("newIdea.decomposeHint")})]})]}),(0,e.jsx)(s.jH,{dispatch:S,onStarted:a=>{b(!1),L?.openChatForSession(a)}})]});return(0,e.jsx)(j.lG,{open:a,onOpenChange:b,children:(0,e.jsxs)(j.Cf,{className:"sm:max-w-[480px]",children:[(0,e.jsxs)(j.c7,{children:[(0,e.jsx)(j.L3,{children:x?w("deriveIdea"):v("newIdea.title")}),x&&u&&(0,e.jsxs)("p",{className:"text-[13px] text-muted-foreground",children:[w("derivedFrom")," \xb7 ",u]})]}),!x&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.tU,{value:P,onValueChange:a=>O(a),children:(0,e.jsxs)(o.j7,{className:"grid w-full grid-cols-2",children:[(0,e.jsx)(o.Xi,{value:"form",children:v("newIdea.modeForm")}),(0,e.jsx)(o.Xi,{value:"conversation",disabled:!M,children:v("newIdea.modeConversation")})]})}),!M&&(0,e.jsxs)("div",{className:"rounded-xl border border-[#EFEBE4] dark:border-[#2a2a2e] bg-[#FCFBF8] dark:bg-[#1e1d1b] px-3 py-2",children:[(0,e.jsx)("p",{className:"px-1 pt-1 text-[12px] font-medium text-muted-foreground",children:v("newIdea.modeConversationOfflineHint")}),(0,e.jsx)(s.Bs,{variant:"compact"})]})]}),"form"===P?R:T]})})}s=(t.then?(await t)():t)[0],d()}catch(a){d(a)}})},51244:(a,b,c)=>{c.d(b,{Q:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40e0dae9a992b753e3b9cce67b8a33c2a1a54a16f4",d.callServer,void 0,d.findSourceMapURL,"getTaskAction")},53109:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("corner-left-up",[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]])},55183:(a,b,c)=>{function d(a){return a.replace(/\\n/g,"\n")}c.d(b,{j:()=>d,y:()=>e});let e={prd:"typePrd",tech_design:"typeTechDesign",adr:"typeAdr",spec:"typeSpec",guide:"typeGuide",design:"typeDesign",note:"typeNote",report:"typeReport",other:"typeOther"}},64370:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{k:()=>A});var e=c(10837),f=c(21968),g=c(9222),h=c(81512),i=c.n(h),j=c(86460),k=c(21289),l=c(49102),m=c(20447),n=c(21790),o=c(51592),p=c(49599),q=c(42424),r=c(22727),s=c(90061),t=c(76172),u=c(97450),v=c(60265),w=c(55183),x=c(79110);c(39242);var y=c(54722),z=a([u]);function A({idea:a,projectUuid:b,onTaskClick:c,onDocClick:d,initialProposals:h}){let i=(0,g.c)("ideaTracker"),[l,m]=(0,f.useState)(h??[]),[n,o]=(0,f.useState)(!h),p=(0,f.useCallback)(async()=>{try{let c=await (0,x.U)(b,a.uuid);if(c.success)return m(c.data),c.data}catch(a){y.q.error("Failed to fetch proposals:",a)}finally{o(!1)}return[]},[b,a.uuid]),q=(0,f.useRef)(l);q.current=l;let{getPresence:r}=(0,s.xQ)();return((0,t.eV)("proposal",async()=>{let a=q.current;for(let b of(await p())){let c=a.find(a=>a.uuid===b.uuid);if(!c)continue;let d=new Set((c.documentDrafts??[]).map(a=>a.uuid)),e=new Set((c.taskDrafts??[]).map(a=>a.uuid)),f=(b.documentDrafts??[]).filter(a=>a.uuid&&!d.has(a.uuid)),g=(b.taskDrafts??[]).filter(a=>a.uuid&&!e.has(a.uuid)),h=[...f.map(a=>a.uuid),...g.map(a=>a.uuid)];if(h.length>0){let a=r("proposal",b.uuid)[0];if(a)for(let c of h)(0,s.fv)({entityType:"proposal",entityUuid:b.uuid,subEntityType:"draft",subEntityUuid:c,agentUuid:a.agentUuid,agentName:a.agentName,action:"mutate"})}}}),n)?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsx)(j.A,{className:"h-5 w-5 animate-spin text-primary"})}):0===l.length?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#F3E5F5] dark:bg-[#281630]",children:(0,e.jsx)(k.A,{className:"h-5 w-5 text-[#7B1FA2] dark:text-[#C98FE0]"})}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:i("panel.noProposals")})]}):(0,e.jsx)("div",{className:"space-y-5",children:l.map(a=>(0,e.jsx)(B,{proposal:a,projectUuid:b,onTaskClick:c,onDocClick:d},a.uuid))})}u=(z.then?(await z)():z)[0];let D={draft:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",pending:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",approved:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",rejected:"bg-[#FFEBEE] dark:bg-[#331619] text-[#C4574C] dark:text-[#F0897E]",revised:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground"};function B({proposal:a,projectUuid:b,onTaskClick:c,onDocClick:d}){let h=(0,g.c)("ideaTracker"),j=(0,g.c)(),k=(0,g.c)("proposals"),n=(0,g.c)("tasks"),o=(0,g.c)("documents"),s=a.documentDrafts||[],t=a.taskDrafts||[],[x,y]=(0,f.useState)(new Set),[z,A]=(0,f.useState)("cards"),[B,E]=(0,f.useState)([]),F="approved"===a.status,G=(0,f.useMemo)(()=>{let a=new Map;for(let b of B)a.set(b.title,b);return a},[B]),{dagTasks:H,dagEdges:I,dagHeight:J}=(0,f.useMemo)(()=>{let a=t.map(a=>{let b=G.get(a.title);return{uuid:b?.uuid||a.uuid,title:a.title,status:b?.status||"open",priority:a.priority||"medium"}}),b=[],c=new Map(t.map(a=>[a.uuid,a]));for(let a of t)if(a.dependsOnDraftUuids)for(let d of a.dependsOnDraftUuids){let e=G.get(a.title),f=c.get(d),g=f?G.get(f.title):void 0;b.push({from:e?.uuid||a.uuid,to:g?.uuid||d})}return{dagTasks:a,dagEdges:b,dagHeight:Math.max(350,90*a.length)}},[t,G]),K=F?B.filter(a=>"done"===a.status||"closed"===a.status).length:0;return(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("h3",{className:"text-[14px] font-semibold text-foreground truncate flex-1",children:a.title}),(0,e.jsx)(p.E,{className:`text-[11px] font-semibold border-0 shrink-0 ${D[a.status]||""}`,children:j(`status.${a.status}`)})]}),a.description&&(0,e.jsx)("div",{className:"max-h-[120px] overflow-y-auto text-[13px] leading-relaxed text-foreground/80 prose prose-sm max-w-none [&_h1]:text-sm [&_h2]:text-[13px] [&_h3]:text-xs [&_p]:text-[13px] [&_p]:text-foreground/80 [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-foreground/80 [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-foreground [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_a]:text-primary",children:(0,e.jsx)(u.MarkdownContent,{children:(0,w.j)(a.description)})}),(0,e.jsxs)(i(),{href:`/projects/${b}/proposals/${a.uuid}`,className:"flex items-center gap-1 text-[13px] font-medium text-primary hover:underline",children:[h("panel.viewProposal"),(0,e.jsx)(l.A,{className:"h-3.5 w-3.5"})]}),s.length>0&&(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:k(F?"documents":"documentDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:s.length})]}),(0,e.jsx)("div",{className:"space-y-0",children:s.map((b,c)=>(0,e.jsx)(r.D,{entityType:"proposal",entityUuid:a.uuid,subEntityType:"draft",subEntityUuid:b.uuid||`draft-${c}`,badgeInside:!0,children:(0,e.jsxs)(q.$,{variant:"ghost",className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-3.5 hover:bg-background transition-colors cursor-pointer -mx-1 px-1 rounded-lg",onClick:()=>b.content&&d?.({title:b.title,type:b.type,content:b.content}),children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)(p.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:o(w.y[b.type]||"typeOther")}),(0,e.jsx)("span",{className:"flex-1 min-w-0 text-left text-[13px] text-foreground truncate",children:b.title})]})},b.uuid||c))})]}),(t.length>0||B.length>0)&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between pb-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:k(F?"tasks":"taskDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:F&&B.length>0?B.length:t.length})]}),(0,e.jsxs)("span",{className:"text-[12px] text-muted-foreground",children:[K,"/",F&&B.length>0?B.length:t.length]})]}),(0,e.jsx)("div",{className:"-mx-6 border-t border-border"}),I.length>0&&(0,e.jsxs)("div",{className:"flex gap-0.5 rounded-lg border border-border bg-[#F7F6F3] dark:bg-[#1e1d1b] p-0.5 mt-3 w-fit",children:[(0,e.jsx)(q.$,{variant:"ghost",size:"sm",onClick:()=>A("cards"),className:`rounded-md px-2.5 py-1 h-auto text-[11px] font-medium transition-colors ${"cards"===z?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:k("cardsView")}),(0,e.jsx)(q.$,{variant:"ghost",size:"sm",onClick:()=>A("dag"),className:`rounded-md px-2.5 py-1 h-auto text-[11px] font-medium transition-colors ${"dag"===z?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:n("dagView")})]}),"cards"===z&&(0,e.jsx)("div",{className:"space-y-0",children:F&&B.length>0?B.map(a=>(0,e.jsx)(r.D,{entityType:"task",entityUuid:a.uuid,badgeInside:!0,children:(0,e.jsx)(C,{task:{uuid:a.uuid,title:a.title},expanded:!1,onToggle:()=>{},onNavigate:c?()=>c(a.uuid):void 0,taskStatus:a.status})},a.uuid)):t.map((b,c)=>(0,e.jsx)(r.D,{entityType:"proposal",entityUuid:a.uuid,subEntityType:"draft",subEntityUuid:b.uuid,badgeInside:!0,children:(0,e.jsx)(C,{task:b,expanded:x.has(c),onToggle:()=>{y(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})}})},b.uuid))}),"dag"===z&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(v._u,{tasks:H,edges:I,readonly:!0,height:J,onNodeClick:c})})]}),0===s.length&&0===t.length&&0===B.length&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground italic",children:k("emptyContainer")})]})}let E={open:"border-[#D9D9D9] dark:border-[#3a3a40] bg-card",assigned:"border-[#1976D2] bg-[#1976D2]",in_progress:"border-[#5A9E6F] bg-[#5A9E6F]",to_verify:"border-[#7B1FA2] bg-[#7B1FA2]",done:"border-[#00796B] bg-[#00796B]",closed:"border-[#9A9A9A] bg-[#9A9A9A] dark:border-[#6b6862] dark:bg-[#6b6862]"},F={open:null,assigned:null,in_progress:{className:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",key:"inProgress"},to_verify:{className:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",key:"toVerify"},done:{className:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",key:"done"},closed:{className:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",key:"done"}};function C({task:a,expanded:b,onToggle:c,onNavigate:d,taskStatus:f}){let h=(0,g.c)("proposals"),i=(0,g.c)("acceptanceCriteria"),j=(0,g.c)("status"),k=a.acceptanceCriteriaItems||[],p=!!(a.description||k.length>0),r=f?E[f]||E.open:"border-[#D9D9D9] dark:border-[#3a3a40] bg-card",s=f?F[f]:null,t=(0,e.jsx)("span",{className:`shrink-0 h-2 w-2 rounded-full border-[1.5px] ${r} transition-colors`}),u=(0,e.jsx)("span",{className:"flex-1 min-w-0 text-[13px] leading-snug truncate text-muted-foreground",children:a.title}),v=s?(0,e.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium ${s.className}`,children:j(s.key)}):null;return d?(0,e.jsxs)(q.$,{variant:"ghost",onClick:d,className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-4 cursor-pointer hover:bg-background -mx-1 px-1 rounded-lg transition-colors",children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),t,u,v]}):(0,e.jsxs)("div",{children:[(0,e.jsxs)(q.$,{variant:"ghost",onClick:p?c:void 0,className:`w-full justify-start h-auto text-left flex items-center gap-2.5 py-4 ${p?"cursor-pointer hover:bg-background -mx-1 px-1 rounded-lg":""} transition-colors`,children:[b?(0,e.jsx)(n.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):(0,e.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),t,u,v]}),b&&p&&(0,e.jsxs)("div",{className:"pb-3 pl-5 space-y-3",children:[a.description&&(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:a.description}),k.length>0&&(0,e.jsxs)("div",{className:"rounded-lg bg-background p-3 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,e.jsx)("span",{className:"text-[11px] font-semibold text-foreground",children:h("taskAcceptanceCriteria")})]}),(0,e.jsx)("div",{className:"space-y-1.5",children:k.map((a,b)=>(0,e.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,e.jsx)("p",{className:"text-[11px] leading-snug text-foreground/80 flex-1",children:a.description}),!1!==a.required&&(0,e.jsx)("span",{className:"shrink-0 text-[10px] font-medium text-[#E65100] dark:text-[#F0A050]",children:i("required")})]},b))})]})]})]})}d()}catch(a){d(a)}})},66253:(a,b,c)=>{c.d(b,{U:()=>p});var d=c(10837),e=c(21968),f=c(9222),g=c(86460),h=c(20447),i=c(49599),j=c(42424),k=c(76172),l=c(54722),m=c(55183),n=c(42377);let o=(0,n.createServerReference)("6007132ae83664e415f6d20e4ba7c2ea15d80c63f7",n.callServer,void 0,n.findSourceMapURL,"getReportsForIdeaAction");function p({projectUuid:a,ideaUuid:b,proposals:c,onDocClick:n}){let p=(0,f.c)("idea"),q=(0,f.c)("documents"),[r,s]=(0,e.useState)([]),[t,u]=(0,e.useState)(!0),v=c.some(a=>"approved"===a.status),w=(0,e.useCallback)(async()=>{if(!v){s([]),u(!1);return}try{let c=await o(a,b);if(c.success){let a=[...c.data].sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime());s(a.map(a=>({uuid:a.uuid,title:a.title,type:a.type,content:a.content??null,createdAt:a.createdAt})))}}catch(a){l.q.error("Failed to fetch reports for idea:",a)}finally{u(!1)}},[a,b,v]);return((0,k.eV)("document",w),t)?v?(0,d.jsx)("div",{className:"flex items-center justify-center py-3",children:(0,d.jsx)(g.A,{className:"h-4 w-4 animate-spin text-primary"})}):null:0===r.length?null:(0,d.jsxs)("div",{className:"mt-6 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,d.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:p("reportsList")}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground",children:r.length}),(0,d.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["\xb7 ",p("reportsAcrossProposals")]})]}),(0,d.jsx)("div",{className:"space-y-0",children:r.map(a=>(0,d.jsxs)(j.$,{variant:"ghost",className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-3.5 hover:bg-background transition-colors cursor-pointer -mx-1 px-1 rounded-lg",onClick:()=>n({title:a.title,type:"report",content:a.content??""}),children:[(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)(i.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:q(m.y[a.type]||"typeOther")}),(0,d.jsx)("span",{className:"flex-1 min-w-0 text-left text-[13px] text-foreground truncate",children:a.title})]},a.uuid))})]})}},69815:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{p:()=>n});var e=c(10837),f=c(9222),g=c(16235),h=c(80251),i=c(2852),j=c(99127),k=c(68797),l=c(7086),m=a([k]);function n({assignee:a,onReassign:b,editable:c}){let d=(0,f.c)("common"),m=!0===c&&"function"==typeof b,n=d(a?"reassign":"assign"),o=a?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(h.eu,{className:"h-7 w-7",children:(0,e.jsx)(h.q5,{className:(0,l.bB)(a)?"bg-primary text-white":"bg-border text-muted-foreground",children:(0,l.bB)(a)?(0,e.jsx)(g.A,{className:"h-3.5 w-3.5"}):a.name.charAt(0).toUpperCase()})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-foreground",children:a.name}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:d((0,l.bB)(a)?"agent":"user")}),"agent_instance"===a.type&&a.instance&&(0,e.jsx)("div",{className:"mt-1",children:(0,e.jsx)(k.jQ,{cwd:a.instance.cwd,host:a.instance.host})})]})]}):(0,e.jsx)("span",{className:"text-sm text-muted-foreground",children:d("unassigned")}),p="mt-2 flex items-center gap-2.5 rounded-lg bg-background p-3";return(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:d("assignee")}),m?(0,e.jsx)(j.Bc,{delayDuration:300,children:(0,e.jsxs)(j.m_,{children:[(0,e.jsx)(j.k$,{asChild:!0,children:(0,e.jsx)("button",{type:"button",onClick:b,"aria-label":n,className:`${p} w-full cursor-pointer text-left`,children:o})}),(0,e.jsx)(j.ZI,{children:n})]})}):(0,e.jsx)("div",{className:p,children:o})]})}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},74733:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("corner-down-right",[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]])},79030:(a,b,c)=>{c.d(b,{C:()=>f});var d=c(10837),e=c(96307);function f({done:a,total:b,size:c=14,stroke:f=2,className:g,color:h="#B26B3D",trackColor:i="#EAD9C8"}){let j=(c-f)/2,k=2*Math.PI*j,l=b>0?Math.min(1,Math.max(0,a/b)):0;return(0,d.jsxs)("svg",{width:c,height:c,viewBox:`0 0 ${c} ${c}`,className:(0,e.cn)("shrink-0",g),role:"img","aria-label":`${a}/${b}`,children:[(0,d.jsx)("circle",{cx:c/2,cy:c/2,r:j,fill:"none",stroke:i,strokeWidth:f}),l>0&&(0,d.jsx)("circle",{cx:c/2,cy:c/2,r:j,fill:"none",stroke:b>0&&a>=b?"#1D9E75":h,strokeWidth:f,strokeDasharray:k,strokeDashoffset:k*(1-l),strokeLinecap:"round",transform:`rotate(-90 ${c/2} ${c/2})`})]})}},84722:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{G:()=>q});var e=c(10837),f=c(9222),g=c(86460),h=c(16235),i=c(2852),j=c(84819),k=c(4432),l=c(97450),m=c(31009),n=c(45148),o=c(69815),p=a([l,o]);function q({idea:a,elaboration:b,isLoading:c,onRefresh:d,onReassign:p,canReassign:q}){let r=(0,f.c)("ideaTracker"),s=(0,f.c)("common");return c?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsx)(g.A,{className:"h-5 w-5 animate-spin text-primary"})}):(0,e.jsxs)(m.P.div,{variants:n.qG,initial:"initial",animate:"animate",children:[(0,e.jsx)(o.p,{assignee:a.assignee,onReassign:p,editable:q}),(0,e.jsx)(j.Separator,{className:"my-5 bg-secondary"}),b&&b.rounds.length>0?(0,e.jsx)("div",{children:(0,e.jsx)(k.R,{ideaUuid:a.uuid,elaboration:b,onRefresh:d})}):"open"===a.status?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF3E0] dark:bg-[#3a2a12]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#E65100] dark:text-[#F0A050]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("panel.elaborationNotStarted")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r("panel.elaborationNotStartedDesc")})]})]}):(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#E3F2FD] dark:bg-[#13253a]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#1976D2] dark:text-[#5AA9F0]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("panel.elaborationWaiting")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r("panel.elaborationWaitingDesc")})]})]}),a.content&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(j.Separator,{className:"my-5 bg-secondary"}),(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:s("content")}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-foreground",children:(0,e.jsx)(l.MarkdownContent,{children:a.content})})})]})]})]})}[l,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},95807:(a,b,c)=>{c.d(b,{p:()=>s});var d=c(10837),e=c(21968),f=c(9222),g=c(5797);let h=(0,c(56556).A)("message-square-text",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]);var i=c(21289),j=c(51592),k=c(65956),l=c(20447),m=c(9810),n=c(90856),o=c(21790),p=c(49102),q=c(42377);q.callServer,q.findSourceMapURL;var r=c(77521);function s({idea:a,proposals:b,tasks:c,onSelectTask:q}){let s=(0,f.c)("ideaTracker"),t=(0,f.c)(),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(new Set),y=(0,e.useMemo)(()=>"open"===a.status?"idea_created":"elaborating"===a.status||0===b.length?"elaboration":b.some(a=>"approved"===a.status)&&c.length>0?"tasks":"proposal",[a.status,b,c]),z=(0,e.useMemo)(()=>{let a=["idea_created","elaboration","proposal","tasks"],b=a.indexOf(y);return a.map((a,c)=>({id:a,labelKey:({idea_created:"panel.timeline.ideaCreated",elaboration:"panel.timeline.elaboration",proposal:"panel.timeline.proposal",tasks:"panel.timeline.tasksProgress"})[a],status:c<b?"completed":c===b?"active":"upcoming",icon:({idea_created:(0,d.jsx)(g.A,{className:"h-3.5 w-3.5"}),elaboration:(0,d.jsx)(h,{className:"h-3.5 w-3.5"}),proposal:(0,d.jsx)(i.A,{className:"h-3.5 w-3.5"}),tasks:(0,d.jsx)(j.A,{className:"h-3.5 w-3.5"})})[a]}))},[y]),A=(0,e.useCallback)(a=>{x(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),B=(0,e.useMemo)(()=>"open"===a.status?s("panel.timeline.noElaboration"):"skipped"===a.elaborationStatus?s("panel.timeline.elaborationSkipped"):"resolved"===a.elaborationStatus&&u?s("panel.timeline.elaborationComplete",{count:u.summary.totalQuestions}):"elaborating"===a.status?s("panel.timeline.elaborationInProgress"):u&&u.summary.totalQuestions>0?s("panel.timeline.elaborationComplete",{count:u.summary.totalQuestions}):s("panel.timeline.noElaboration"),[a.status,a.elaborationStatus,u,s]),C=(0,e.useMemo)(()=>{if(0===b.length)return s("panel.timeline.noProposal");let a=b.filter(a=>"approved"===a.status).length,c=b.filter(a=>"pending"===a.status).length;if(a>0&&1===b.length)return s("panel.timeline.proposalApproved");if(a>0)return s("panel.timeline.proposalsApproved",{count:a,total:b.length});if(c>0)return s("panel.timeline.proposalPending");switch(b[0].status){case"draft":default:return s("panel.timeline.proposalDraft");case"rejected":return s("panel.timeline.proposalRejected")}},[b,s]),D=(0,e.useMemo)(()=>{let a=0,c=0;for(let d of b)a+=d.documentDrafts?.length??0,c+=d.taskDrafts?.length??0;return{docCount:a,taskDraftCount:c}},[b]),E=(0,e.useMemo)(()=>{let a=c.filter(a=>"done"===a.status||"closed"===a.status).length,b=c.filter(a=>"in_progress"===a.status).length;return{done:a,inProgress:b,toVerify:c.filter(a=>"to_verify"===a.status).length,open:c.filter(a=>"open"===a.status||"assigned"===a.status).length,total:c.length}},[c]);return(0,d.jsx)("div",{className:"space-y-0",children:z.map((e,f)=>{let g=w.has(e.id),h=f===z.length-1;return(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center w-5 shrink-0",children:[(0,d.jsx)("div",{className:"mt-1",children:"completed"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-[#E0F2F1] dark:bg-[#12292a] flex items-center justify-center",children:(0,d.jsx)(m.A,{className:"h-3 w-3 text-[#00796B] dark:text-[#4FD1C0]"})}):"active"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-primary flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 fill-white text-white"})}):(0,d.jsx)("div",{className:"h-5 w-5 rounded-full border-2 border-dashed border-[#D9D9D9] dark:border-[#3a3a40] flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 text-muted-foreground"})})}),!h&&(0,d.jsx)("div",{className:"flex-1 w-px bg-border mt-1 min-h-[8px]"})]}),(0,d.jsxs)("div",{className:`flex-1 min-w-0 ${h?"pb-0":"pb-4"}`,children:[(0,d.jsxs)("button",{onClick:()=>A(e.id),className:"flex items-center gap-1.5 w-full text-left group cursor-pointer",children:[g?(0,d.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}):(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,d.jsx)("span",{className:`text-[13px] font-medium ${"active"===e.status?"text-primary":"completed"===e.status?"text-foreground":"text-muted-foreground"}`,children:s(e.labelKey)}),!g&&(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground truncate ml-1",children:(b=>{switch(b.id){case"idea_created":return a.createdBy?a.createdBy.name:"";case"elaboration":return B;case"proposal":return C;case"tasks":return c.length>0?s("panel.timeline.tasksComplete",{done:E.done,total:E.total}):s("panel.timeline.noTasks");default:return""}})(e)})]}),(e=>{let f=w.has(e.id);switch(e.id){case"idea_created":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[a.createdBy&&(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.createdBy",{name:a.createdBy.name})}),(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:(0,r.fw)(a.createdAt,t)}),a.content&&(0,d.jsxs)("p",{className:"text-[12px] text-muted-foreground line-clamp-2",children:[a.content.slice(0,120),a.content.length>120?"...":""]})]}):null;case"elaboration":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:B}),u&&u.rounds.length>0&&(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.rounds",{count:u.rounds.length})})]}):null;case"proposal":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:C}),b.length>0&&(0,d.jsxs)("div",{className:"space-y-1",children:[D.docCount>0&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",children:[(0,d.jsx)(k.A,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:s("panel.timeline.documents",{count:D.docCount})})]}),D.taskDraftCount>0&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",children:[(0,d.jsx)(j.A,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:s("panel.timeline.tasks",{count:D.taskDraftCount})})]})]})]}):null;case"tasks":return f?(0,d.jsx)("div",{className:"mt-2 space-y-2",children:0===c.length?(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.noTasks")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"flex-1 h-1.5 rounded-full bg-[#F0EDE8] dark:bg-[#1f1e1c] overflow-hidden flex",children:[E.done>0&&(0,d.jsx)("div",{className:"h-full bg-[#00796B]",style:{width:`${E.done/E.total*100}%`}}),E.inProgress>0&&(0,d.jsx)("div",{className:"h-full bg-[#1976D2]",style:{width:`${E.inProgress/E.total*100}%`}}),E.toVerify>0&&(0,d.jsx)("div",{className:"h-full bg-[#7B1FA2]",style:{width:`${E.toVerify/E.total*100}%`}})]}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0",children:s("panel.timeline.tasksComplete",{done:E.done,total:E.total})})]}),(0,d.jsxs)("div",{className:"space-y-1",children:[c.slice(0,5).map(a=>(0,d.jsxs)("button",{onClick:()=>q(a.uuid),className:"flex items-center gap-2 w-full text-left rounded-md px-2 py-1.5 hover:bg-secondary transition-colors group cursor-pointer",children:[(0,d.jsx)(l.A,{className:"h-3 w-3 text-muted-foreground shrink-0 group-hover:text-primary"}),(0,d.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${(0,r.eT)(a.status)}`}),(0,d.jsx)("span",{className:"flex-1 text-[12px] text-foreground truncate group-hover:text-primary",children:a.title})]},a.uuid)),c.length>5&&(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground px-2",children:s("panel.timeline.moreItems",{count:c.length-5})})]})]})}):null;default:return null}})(e)]})]},e.id)})})}},96120:(a,b,c)=>{c.d(b,{d:()=>t});var d=c(10837),e=c(21968),f=c(9222),g=c(68884),h=c(76549),i=c(86460);let j=(0,c(56556).A)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var k=c(21692),l=c(42424),m=c(11568),n=c(10297),o=c(96307),p=c(42377);let q=(0,p.createServerReference)("4034eb6716e1a527e45f11d979b7cb63140fa90d45",p.callServer,void 0,p.findSourceMapURL,"getProjectIdeasForPickerAction"),r=(0,p.createServerReference)("60fe7052237a6c074e555d10dd727ea9bde9cdada7",p.callServer,void 0,p.findSourceMapURL,"setIdeaParentAction");var s=c(54722);function t({open:a,onOpenChange:b,ideaUuid:c,ideaTitle:p,projectUuid:t,currentParentUuid:u,descendantUuids:v,onChanged:w}){let x=(0,f.c)("ideaTracker.lineage"),y=(0,f.c)("common"),z=(0,g.r)(),[A,B]=(0,e.useState)([]),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(null),K=new Set([c,...v]);(0,e.useCallback)(async()=>{F(!0),J(null);try{let a=await q(t);a.success?(B(a.data),D(a.hasMore)):J(a.error)}catch(a){s.q.error("Failed to load parent candidates:",a),J(x("saveFailed"))}F(!1)},[t,x]);let L=async a=>{if(!G){H(!0),J(null);try{let d=await r(c,a);d.success?(h.oR.success(a?x("save"):x("detach")),b(!1),z.refresh(),w()):J(d.error||x("saveFailed"))}catch(a){J(a instanceof Error?a.message:x("saveFailed"))}H(!1)}};return(0,d.jsx)(m.lG,{open:a,onOpenChange:b,children:(0,d.jsxs)(m.Cf,{children:[(0,d.jsxs)(m.c7,{children:[(0,d.jsx)(m.L3,{children:x("setParentTitle")}),(0,d.jsx)(m.rr,{children:x("setParentDescription",{title:p})})]}),(0,d.jsxs)("div",{className:"min-w-0 space-y-3 pt-1",children:[E?(0,d.jsx)("div",{className:"flex h-40 items-center justify-center",children:(0,d.jsx)(i.A,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):(0,d.jsx)("div",{className:"rounded-md border border-border",children:(0,d.jsxs)(n.uB,{children:[(0,d.jsx)(n.G7,{placeholder:x("searchPlaceholder")}),(0,d.jsxs)(n.oI,{children:[(0,d.jsx)(n.xL,{children:x("noCandidates")}),(0,d.jsx)(n.L$,{children:A.map(a=>{let b=K.has(a.uuid),c=a.uuid===u;return(0,d.jsxs)(n.h_,{value:a.title,disabled:b,onSelect:()=>{b||L(a.uuid)},className:(0,o.cn)("flex min-w-0 items-center justify-between gap-2",b&&"opacity-55",c&&"bg-primary/10"),children:[(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",children:a.title}),b&&(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-[11px] font-medium text-[#B0654A] dark:text-[#EBA890]",children:[(0,d.jsx)(j,{className:"h-3 w-3"}),x("cycleBlocked")]})]},a.uuid)})})]})]})}),(0,d.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-[#FBF0EB] dark:bg-[#221e1b] px-3 py-2.5",children:[(0,d.jsx)(k.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[#B0654A] dark:text-[#EBA890]"}),(0,d.jsx)("p",{className:"text-[12px] leading-relaxed text-[#9A5238] dark:text-[#E9A088]",children:x("cycleWarning")})]}),C&&(0,d.jsx)("p",{className:"px-1 text-[12px] text-muted-foreground",role:"status",children:x("pickerTruncated")}),I&&(0,d.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:I})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[u?(0,d.jsx)(l.$,{variant:"outline",className:"border-border",onClick:()=>L(null),disabled:G,children:x("detach")}):(0,d.jsx)("span",{}),(0,d.jsx)(l.$,{variant:"outline",className:"border-border",onClick:()=>b(!1),disabled:G,children:y("cancel")})]})]})})}},98310:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{K:()=>q});var e=c(10837),f=c(21968),g=c(9222),h=c(35209),i=c(10694),j=c(42424),k=c(49599),l=c(74645),m=c(97450),n=c(55183),o=c(77521),p=a([m]);function q({title:a,type:b,content:c,mode:d="overlay",onClose:p,onBack:q}){let r=(0,g.c)("documents"),[s,t]=(0,f.useState)(!1),u="sidebyside"===d;return(0,e.jsxs)(e.Fragment,{children:[!u&&(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:p}),(0,e.jsxs)("div",{className:`fixed top-14 md:top-0 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col bg-card shadow-xl border-l border-border ${u?`z-40 ${s?"":"animate-in slide-in-from-right duration-300"}`:`z-50 right-0 ${s?"":"animate-in slide-in-from-right duration-300"}`}`,style:u?{right:`${o.L8}px`}:void 0,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[q&&(0,e.jsx)(j.$,{variant:"ghost",size:"icon",className:"mr-2 h-8 w-8 shrink-0",onClick:q,children:(0,e.jsx)(h.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:a}),(0,e.jsx)("div",{className:"mt-1.5",children:(0,e.jsx)(k.E,{variant:"outline",className:"text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:r(n.y[b]||"typeOther")})})]}),(0,e.jsx)(j.$,{variant:"outline",size:"icon",className:"ml-4 h-8 w-8 shrink-0 border-border",onClick:p,children:(0,e.jsx)(i.A,{className:"h-4 w-4 text-muted-foreground"})})]}),(0,e.jsx)(l.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"px-6 py-5 text-[13px] leading-relaxed text-foreground prose prose-sm max-w-none [&_h1]:text-lg [&_h1]:font-semibold [&_h1]:mt-4 [&_h1]:mb-2 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mb-1.5 [&_h3]:text-sm [&_h3]:font-medium [&_h3]:mt-2 [&_h3]:mb-1 [&_p]:text-[13px] [&_p]:text-foreground/80 [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-foreground/80 [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-foreground [&_code]:text-[12px] [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_pre]:bg-secondary [&_pre]:text-foreground [&_pre]:p-3 [&_pre]:rounded-lg [&_pre]:my-2 [&_a]:text-primary",children:(0,e.jsx)(m.MarkdownContent,{children:(0,n.j)(c)})})})]})]})}m=(p.then?(await p)():p)[0],d()}catch(a){d(a)}})}};
1
+ "use strict";exports.id=2382,exports.ids=[2382],exports.modules={8495:(a,b,c)=>{c.d(b,{S:()=>h});var d=c(10837);c(21968);var e=c(9810),f=c(25711),g=c(96307);function h({className:a,...b}){return(0,d.jsx)(f.Root,{"data-slot":"checkbox",className:(0,g.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",a),...b,children:(0,d.jsx)(f.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,d.jsx)(e.A,{className:"size-3.5"})})})}},9190:(a,b,c)=>{c.d(b,{n:()=>t});var d=c(10837),e=c(21968),f=c(9222),g=c(51592),h=c(49102),i=c(21790),j=c(20447),k=c(9810),l=c(97443),m=c(81512),n=c.n(m),o=c(76172),p=c(25493),q=c(22727),r=c(77521);let s=["in_progress","to_verify","open","assigned","done","closed"];function t({tasks:a,projectUuid:b,proposalUuids:c,onSelectTask:m}){let t=(0,f.c)("ideaTracker"),[u,v]=(0,e.useState)({}),w=(0,e.useMemo)(()=>a.map(a=>a.uuid),[a]),x=(0,e.useCallback)(async()=>{if(0===w.length)return;let a=await (0,p.h)(w);a.success&&a.data&&v(a.data)},[w]);(0,o.eV)("task",x);let y=(0,e.useMemo)(()=>{let b=[];for(let c of s){let d=a.filter(a=>a.status===c);d.length>0&&b.push({status:c,tasks:d})}let c=new Set(s),d=a.filter(a=>!c.has(a.status));return d.length>0&&b.push({status:"other",tasks:d}),b},[a]),[z,A]=(0,e.useState)(new Set),B=(0,e.useMemo)(()=>{let b=a.length,c=a.filter(a=>"done"===a.status||"closed"===a.status).length,d=0,e=0,f=0,g=0;for(let b of a)b.acceptanceSummary&&(d+=b.acceptanceSummary.total,e+=b.acceptanceSummary.passed,f+=b.acceptanceSummary.required,g+=b.acceptanceSummary.requiredPassed);return{total:b,done:c,acTotal:d,acPassed:e,acRequired:f,acRequiredPassed:g}},[a]);return 0===a.length?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[(0,d.jsx)(g.A,{className:"h-8 w-8 text-muted-foreground"}),(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:t("panel.taskList.noTasks")})]}):(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg bg-[#FAFAF7] dark:bg-[#1e1e1c] px-3 py-2",children:[(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:t("panel.taskList.summary",{done:B.done,total:B.total})}),B.acTotal>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:"\xb7"}),(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:t("panel.taskList.acSummary",{passed:B.acRequiredPassed,total:B.acRequired})})]}),c.length>0&&(0,d.jsxs)(n(),{href:`/projects/${b}/tasks?proposalUuids=${c.join(",")}`,className:"ml-auto flex items-center gap-1 text-[13px] font-medium text-primary shrink-0",children:[t("panel.taskList.viewKanban"),(0,d.jsx)(h.A,{className:"h-3.5 w-3.5"})]})]}),y.map(a=>{let b=z.has(a.status);return(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{onClick:()=>{var b;return b=a.status,void A(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"flex items-center gap-2 w-full text-left py-1.5 group cursor-pointer",children:[b?(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,d.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${(0,r.eT)(a.status)}`}),(0,d.jsx)("span",{className:"text-[13px] font-medium text-foreground",children:function(a,b){switch(a){case"in_progress":return b("panel.taskList.inProgress");case"to_verify":return b("panel.taskList.toVerify");case"open":return b("panel.taskList.open");case"assigned":return b("panel.taskList.assigned");case"done":return b("panel.taskList.done");case"closed":return b("panel.taskList.closed");default:return a}}(a.status,t)}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground ml-auto",children:a.tasks.length})]}),!b&&(0,d.jsx)("div",{className:"ml-3 space-y-0.5",children:a.tasks.map(a=>{let b=u[a.uuid]||0,c=a.acceptanceSummary;return(0,d.jsx)(q.D,{entityType:"task",entityUuid:a.uuid,badgeInside:!0,children:(0,d.jsxs)("button",{onClick:()=>m(a.uuid),className:"flex items-center gap-2 w-full text-left rounded-md px-2.5 py-2 hover:bg-secondary transition-colors group cursor-pointer",children:[(0,d.jsx)(j.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0 group-hover:text-primary"}),(0,d.jsx)("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${(0,r.eT)(a.status)}`}),(0,d.jsx)("span",{className:"flex-1 text-[13px] text-foreground truncate group-hover:text-primary",children:a.title}),c&&c.total>0&&(0,d.jsxs)("span",{className:"inline-flex items-center gap-0.5 shrink-0 rounded-full bg-[#F0EDE8] dark:bg-[#1f1e1c] px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[(0,d.jsx)(k.A,{className:"h-2.5 w-2.5"}),c.requiredPassed,"/",c.required]}),a.assignee&&(0,d.jsxs)("span",{className:"shrink-0 inline-flex items-center gap-1 text-[10px] text-muted-foreground max-w-[72px] truncate",title:a.assignee.name,children:[(0,d.jsx)(l.A,{className:"h-2.5 w-2.5 shrink-0"}),a.assignee.name.split(/[@\s]/)[0]]}),b>0&&(0,d.jsx)("span",{className:"inline-flex items-center justify-center h-4 min-w-[16px] rounded-full bg-[#E8F5E9] dark:bg-[#14281a] text-[#2E7D32] dark:text-[#5FD07E] text-[9px] font-semibold shrink-0",title:t("panel.taskList.workersActive",{count:b}),children:b})]})},a.uuid)})})]},a.status)})]})}},17068:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{x:()=>k});var e=c(10837),f=c(21968),g=c(9222),h=c(40467),i=c(56828),j=a([i]);function k({ideaUuid:a,currentUserUuid:b,commentCount:c,onCommentCountChange:d}){let j=(0,g.c)("ideaTracker"),[k,l]=(0,f.useState)("comments");return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex gap-1 rounded-lg bg-secondary p-0.5",children:[(0,e.jsxs)("button",{onClick:()=>l("comments"),className:`flex-1 rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors flex items-center justify-center gap-1.5 cursor-pointer ${"comments"===k?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:[j("panel.activityTab.comments"),c>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-secondary text-muted-foreground text-[10px] font-semibold leading-none",children:c})]}),(0,e.jsx)("button",{onClick:()=>l("activity"),className:`flex-1 rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors cursor-pointer ${"activity"===k?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:j("panel.activityTab.activity")})]}),(0,e.jsx)("div",{children:"activity"===k?(0,e.jsx)(h.v,{ideaUuid:a}):(0,e.jsx)(i.$m,{targetType:"idea",targetUuid:a,currentUserUuid:b,onCountChange:d,compact:!0})})]})}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},32382:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>ag});var e=c(10837),f=c(21968),g=c(9222),h=c(68884),i=c(76549),j=c(33291),k=c(24364),l=c(87461),m=c(10694),n=c(86460),o=c(53109),p=c(74733),q=c(59876),r=c(98893),s=c(79543),t=c(42424),u=c(74645),v=c(49599),w=c(9994),x=c(20170),y=c(2852),z=c(88536),A=c(6019),B=c(76172),C=c(84722),D=c(64370),E=c(75574),F=c(66253),G=c(9190),H=c(17068),I=c(86104),J=c(98310),K=c(79269),L=c(66372),M=c(44963),N=c(29982),O=c(71370),P=c(42484),Q=c(79110),R=c(39242),S=c(51244),T=c(47058),U=c(48122),V=c(5181),W=c(26402),X=c(16554),Y=c(8828),Z=c(41055),$=c(76799),_=c(77078),aa=c(38618),ab=c(54722),ac=c(76664),ad=c(77521),ae=c(79030),af=a([C,D,H,I,J,M]);function ag({ideaUuid:a,projectUuid:b,currentUserUuid:c,onClose:d,onNavigate:af}){let ag=(0,g.c)(),ah=(0,g.c)("ideaTracker"),ai=(0,g.c)("status"),aj=(0,g.c)("ideaTracker.lineage"),ak=(0,h.r)(),[al,am]=(0,f.useState)(null),[an,ao]=(0,f.useState)(!0),[ap,aq]=(0,f.useState)(null),[ar,as]=(0,f.useState)([]),[at,au]=(0,f.useState)([]),[av,aw]=(0,f.useState)("overview"),[ax,ay]=(0,f.useState)(new Set(["overview"])),[az,aA]=(0,f.useState)(!1),[aB,aC]=(0,f.useState)(0),[aD,aE]=(0,f.useState)(!1),[aF,aG]=(0,f.useState)(!1),[aH,aI]=(0,f.useState)(null),[aJ,aK]=(0,f.useState)(!0),[aL,aM]=(0,f.useState)(!1),[aN,aO]=(0,f.useState)(null),[aP,aQ]=(0,f.useState)(!1),{start:aR,pickerState:aS,confirmPick:aT,cancelPick:aU,isResolving:aV}=(0,$.E)({reassignNoWake:aa.U}),[aW,aX]=(0,f.useState)(!1),[aY,aZ]=(0,f.useState)(""),[a$,a_]=(0,f.useState)(""),[a0,a1]=(0,f.useState)(!1),[a2,a3]=(0,f.useState)(null),[a4,a5]=(0,f.useState)(!1),[a6,a7]=(0,f.useState)(!1),[a8,a9]=(0,f.useState)(!1),[ba,bb]=(0,f.useState)(!1),[bc,bd]=(0,f.useState)(null),[be,bf]=(0,f.useState)(null),[bg,bh]=(0,f.useState)(null),bi=(0,f.useCallback)(a=>{bh(null),bd(a)},[]),bj=(0,f.useCallback)(a=>{bd(null),bf(null),bh(a)},[]),[bk,bl]=(0,f.useState)(!1),[bm,bn]=(0,f.useState)(!1),bo=(0,f.useCallback)(a=>{let b=new URLSearchParams(window.location.search);b.set("tab",a),window.history.replaceState(null,"",`${window.location.pathname}?${b.toString()}`)},[]),bp=(0,f.useCallback)(async()=>{try{let b=await (0,P.c)(a);b.success?(am(b.data),aq(null)):aq(ah("Not found"===b.error?"panel.notFound":"panel.loadFailed"))}catch{aq(ah("panel.loadFailed"))}finally{ao(!1)}},[a,ah]);(0,B.eV)("idea",bp),(0,B.eV)("proposal",bp),(0,B.eV)("task",bp);let bq=al?.uuid,br=al?.status,bs=(0,f.useCallback)(async()=>{if(!bq||"open"===br)return void as([]);try{let a=await (0,Q.U)(b,bq);a.success&&as(a.data)}catch(a){ab.q.error("Failed to fetch proposals:",a)}},[b,bq,br]);(0,B.eV)("proposal",bs);let bt=(0,f.useCallback)(async()=>{let a=ar.filter(a=>"approved"===a.status);if(0===a.length)return void au([]);try{let c=(await Promise.all(a.map(a=>(0,R.c)(b,a.uuid)))).flatMap(a=>a.success&&a.data?a.data.map(a=>({uuid:a.uuid,title:a.title,status:a.status,commentCount:a.commentCount??0,assignee:a.assignee??null,acceptanceSummary:a.acceptanceSummary??null})):[]);au(c)}catch(a){ab.q.error("Failed to fetch tasks:",a)}},[b,ar]);(0,B.eV)("task",bt);let bu=(0,f.useCallback)(async()=>{if(!bq)return;let a=await (0,T.z)(bq);a.success&&a.data&&aI(a.data),aK(!1)},[bq]);(0,B.eV)("idea",bu);let bv=(0,f.useMemo)(()=>al?function(a,b,c){let d=["overview"];return d.push("elaboration"),b.length>0&&d.push("proposal"),c.length>0&&d.push("tasks"),d.push("activity"),d}(0,ar,at):["overview","activity"],[al,ar,at]);(0,f.useRef)(null),al&&al.badgeHint;let bw=(0,f.useMemo)(()=>at.filter(a=>"in_progress"===a.status||"assigned"===a.status||"to_verify"===a.status).length,[at]),bx=(0,f.useCallback)(()=>{if(!bc)return void bf(null);(0,S.Q)(bc).then(a=>{a.success&&bf(a.data)}).catch(a=>ab.q.error("Failed to load task details:",a))},[bc]);(0,B.eV)("task",bx);let by=()=>{aX(!1),aZ(al?.title||""),a_(al?.content||""),a3(null)},bz=async()=>{if(!al||!aY.trim())return void a3(ag("ideas.titleRequired"));a1(!0),a3(null);let a=await (0,N.J)({ideaUuid:al.uuid,projectUuid:b,title:aY.trim(),content:a$.trim()||null});a1(!1),a.success?(aX(!1),await bp(),ak.refresh()):a3(a.error||ag("ideas.updateFailed"))},bA=async()=>{if(!al)return;aG(!0);let a=await (0,O.Z)(al.uuid,b);aG(!1),a.success&&(d(),ak.refresh())},bB=async()=>{if(!al)return;aM(!0),aO(null);let a=await (0,U.e)(al.uuid);aM(!1),a.success?(aQ(!0),await bp(),ak.refresh()):aO(a.error||ag("elaboration.verifyFailed"))},bC=async a=>{if(!al)return;a5(!0),am({...al,isContainer:a});let c=await (0,N.J)({ideaUuid:al.uuid,projectUuid:b,title:al.title,content:al.content??null,isContainer:a});a5(!1),c.success?(await bp(),ak.refresh()):(am({...al,isContainer:!a}),i.oR.error(c.error||ag("ideas.updateFailed")))},bD=al?.derivedStatus||"todo",bE=al?.isContainer===!0,bF=!!al&&"elaborated"!==al.status,bG=(0,W.o)({ideaStatus:al?.status,elaborationStatus:al?.elaborationStatus,elaboration:aH});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:d}),(0,e.jsxs)("div",{className:`fixed right-0 top-14 md:top-0 z-50 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col border-l border-border bg-card shadow-xl ${bm?"":"animate-in slide-in-from-right duration-300"}`,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[(0,e.jsx)("div",{className:"flex-1 min-w-0",children:an?(0,e.jsx)("div",{className:"h-5 w-40 animate-pulse rounded bg-secondary"}):al?aW?(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:ag("ideas.editIdea")}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:`text-[11px] font-semibold uppercase tracking-wider ${bE?"text-primary":"text-muted-foreground"}`,children:bE?aj("typeTheme"):aj("typeIdea")}),(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:al.title}),(0,e.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,e.jsx)(v.E,{className:ad._5[bD]||ad._5.todo,children:al.badgeHint?ah(`badge.${ad.Wl[al.badgeHint]||"open"}`):ai(ad.Bj[bD]||"todo")}),bE&&al.childProgress&&al.childProgress.total>0&&(0,e.jsxs)("span",{className:"flex items-center gap-1 text-xs font-medium text-primary",title:aj("childrenDone",{done:al.childProgress.done,total:al.childProgress.total}),children:[(0,e.jsx)(ae.C,{done:al.childProgress.done,total:al.childProgress.total,size:13,stroke:2}),al.childProgress.done,"/",al.childProgress.total]}),(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,ac.r)(al.createdAt)})]})]}):(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:ah("panel.notFound")})}),(0,e.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[al&&!aW&&(0,e.jsxs)(t.$,{variant:"outline",size:"sm",className:"h-8 gap-1.5 border-border px-2.5",onClick:()=>bb(!0),title:aj("deriveIdea"),"aria-label":aj("deriveIdea"),children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-medium text-primary",children:aj("derive")})]}),al&&!aW&&(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:()=>a7(!0),title:ag("ideas.actions.move"),"aria-label":ag("ideas.actions.move"),children:(0,e.jsx)(k.A,{className:"h-4 w-4 text-muted-foreground"})}),al&&"elaborated"!==al.status&&!aW&&(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:()=>{al&&(aZ(al.title),a_(al.content||""),a3(null),aX(!0))},title:ag("ideas.editIdea"),children:(0,e.jsx)(l.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:aW?by:d,children:(0,e.jsx)(m.A,{className:"h-4 w-4 text-muted-foreground"})})]})]}),al&&!an&&!aW&&(0,e.jsx)("div",{className:"border-b border-secondary px-6",children:(0,e.jsx)("div",{className:"flex gap-0 -mb-px",children:bv.map(a=>(0,e.jsxs)("button",{onClick:()=>{aw(a),aA(!0),ay(b=>new Set([...b,a])),bo(a)},className:`relative flex items-center gap-1.5 px-3 py-2.5 text-[13px] font-medium transition-colors cursor-pointer ${av===a?"text-primary border-b-2 border-primary":"text-muted-foreground hover:text-muted-foreground"}`,children:[ah(`panel.tabs.${a}`),"tasks"===a&&bw>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0] text-[10px] font-semibold leading-none",children:bw}),"activity"===a&&aB>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-secondary text-muted-foreground text-[10px] font-semibold leading-none",children:aB})]},a))})}),(0,e.jsx)(u.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"flex min-h-full flex-col px-6 py-5",children:an?(0,e.jsxs)("div",{className:"flex flex-1 items-center justify-center py-12",children:[(0,e.jsx)(n.A,{className:"h-6 w-6 animate-spin text-primary"}),(0,e.jsx)("span",{className:"ml-2 text-sm text-muted-foreground",children:ah("loading")})]}):ap?(0,e.jsx)("div",{className:"flex flex-1 items-center justify-center py-12",children:(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:ap})}):al?aW?(0,e.jsxs)("div",{className:"space-y-5",children:[a2&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:a2}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(y.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-foreground",children:ag("ideas.titleLabel")}),(0,e.jsx)(w.p,{id:"edit-title",value:aY,onChange:a=>aZ(a.target.value),className:"border-border text-sm focus-visible:ring-primary",autoFocus:!0})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(y.J,{htmlFor:"edit-content",className:"text-[13px] font-medium text-foreground",children:ag("common.content")}),(0,e.jsx)(x.T,{id:"edit-content",value:a$,onChange:a=>a_(a.target.value),rows:8,className:"border-border text-sm resize-none focus-visible:ring-primary"})]})]}):(0,e.jsxs)(e.Fragment,{children:[ax.has("overview")&&(0,e.jsxs)("div",{style:{display:"overview"===av?"block":"none"},children:[(0,e.jsxs)("div",{className:"mb-5 flex items-start justify-between gap-3 rounded-lg border border-[#EFEBE3] dark:border-[#2a2a2e] bg-background px-3.5 py-3",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,e.jsxs)(y.J,{htmlFor:"container-toggle",className:"flex items-center gap-1.5 text-[13px] font-medium text-foreground",children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary","aria-hidden":!0}),aj("container")]}),(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:aj("containerDescription")})]}),(0,e.jsx)(z.d,{id:"container-toggle",checked:bE,disabled:a4,onCheckedChange:bC,"aria-label":aj("makeContainer")})]}),(0,e.jsx)(E.p,{idea:al,proposals:ar,tasks:at,onSelectTask:bi}),(0,e.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-foreground/80",children:aj("title")})]}),(0,e.jsxs)(t.$,{variant:"outline",size:"sm",className:"h-7 gap-1 border-border px-2 text-[11px] text-muted-foreground",onClick:()=>a9(!0),children:[(0,e.jsx)(l.A,{className:"h-3 w-3"}),al.parentUuid?aj("changeParent"):aj("setParent")]})]}),al.parent?(0,e.jsxs)("button",{type:"button",onClick:()=>af?.(al.parent.uuid),className:"flex w-full items-center gap-2 rounded-lg bg-background px-3 py-2.5 text-left transition-colors hover:bg-secondary",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"shrink-0 text-[12px] text-muted-foreground",children:aj("derivedFrom")}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium text-foreground/80",children:al.parent.title})]}):(0,e.jsx)("p",{className:"px-1 text-[12px] text-muted-foreground",children:aj("noParent")}),al.children&&al.children.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between px-1 pt-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)("span",{className:"text-[12px] font-medium text-foreground/80",children:aj("derivedIdeas")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:al.children.length})]}),(()=>{let a=al.children.filter(a=>"done"===a.derivedStatus).length,b=al.children.length;return(0,e.jsxs)("span",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",title:aj("childrenDone",{done:a,total:b}),children:[(0,e.jsx)(ae.C,{done:a,total:b,size:14,stroke:2}),a,"/",b]})})()]}),(0,e.jsx)("div",{className:"overflow-hidden rounded-lg border border-[#EFEBE3] dark:border-[#2a2a2e]",children:al.children.map((a,b)=>(0,e.jsxs)("div",{children:[b>0&&(0,e.jsx)("div",{className:"h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"}),(0,e.jsxs)("button",{type:"button",onClick:()=>af?.(a.uuid),className:"flex w-full items-center justify-between gap-2 px-3 py-2.5 text-left transition-colors hover:bg-background",children:[(0,e.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,e.jsx)(p.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"truncate text-[12px] text-foreground",children:a.title})]}),(0,e.jsx)(v.E,{className:`shrink-0 border-0 text-[10px] ${ad._5[a.derivedStatus]||ad._5.todo}`,children:ai(ad.Bj[a.derivedStatus]||"todo")})]})]},a.uuid))})]})]}),(0,e.jsx)(F.U,{projectUuid:b,ideaUuid:al.uuid,proposals:ar,onDocClick:bj}),(0,e.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(q.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-foreground/80",children:ag("references.title")})]}),(0,e.jsx)(Z.ReferencesSection,{targetType:"idea",targetUuid:al.uuid,canWrite:!0,compact:!0})]})]}),bv.includes("elaboration")&&ax.has("elaboration")&&(0,e.jsx)("div",{style:{display:"elaboration"===av?"block":"none"},children:(0,e.jsx)(C.G,{idea:al,elaboration:aH,isLoading:aJ,onRefresh:async()=>{await bu(),await bp()},onReassign:()=>aE(!0),canReassign:bF})}),bv.includes("proposal")&&ax.has("proposal")&&(0,e.jsx)("div",{style:{display:"proposal"===av?"block":"none"},children:(0,e.jsx)(D.k,{idea:al,projectUuid:b,onTaskClick:bi,onDocClick:bj,initialProposals:ar})}),bv.includes("tasks")&&ax.has("tasks")&&(0,e.jsx)("div",{style:{display:"tasks"===av?"block":"none"},children:(0,e.jsx)(G.n,{tasks:at,projectUuid:b,proposalUuids:ar.filter(a=>"approved"===a.status).map(a=>a.uuid),onSelectTask:bi})}),ax.has("activity")&&(0,e.jsx)("div",{style:{display:"activity"===av?"block":"none"},children:(0,e.jsx)(H.x,{ideaUuid:al.uuid,currentUserUuid:c,commentCount:aB,onCommentCountChange:aC})})]}):null})}),al&&!an&&(0,e.jsx)("div",{className:"border-t border-secondary px-6 py-4",children:aW?(0,e.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[(0,e.jsx)(t.$,{variant:"outline",className:"border-border",onClick:by,disabled:a0,children:ag("common.cancel")}),(0,e.jsx)(t.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:bz,disabled:a0||!aY.trim(),children:a0?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ag("common.save")]}):ag("common.save")})]}):(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"flex-1 min-w-0 flex flex-wrap items-center gap-2",children:[!bE&&(0,e.jsxs)(e.Fragment,{children:[bG&&!aP&&(0,e.jsx)(t.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:()=>{al&&aR({ideaUuid:al.uuid,wake:bB})},disabled:aL||aV,children:aL?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ag("elaboration.verifying")]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(r.A,{className:"mr-2 h-4 w-4"}),ag("elaboration.verifyButton")]})}),aP&&(0,e.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:ag("elaboration.verifiedQueuedHint")}),aN&&(0,e.jsx)("span",{className:"text-[11px] text-destructive",children:aN}),(0,e.jsx)(X.w,{ideaUuid:al.uuid,assignee:al.assignee,assigneeName:al.assignee?.name,proposals:ar,tasks:at,onStarted:()=>{bp()}}),(0,e.jsx)(Y.s,{ideaUuid:al.uuid,assignee:al.assignee,assigneeName:al.assignee?.name,proposals:ar,tasks:at,onStarted:()=>{bp()}})]}),bE&&(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:aj("containerHint")})]}),(0,e.jsxs)(A.Lt,{children:[(0,e.jsx)(A.tv,{asChild:!0,children:(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"shrink-0 h-8 w-8 border-border text-[#EF4444] dark:text-[#F0897E] hover:bg-[#FFEBEE] dark:hover:bg-[#331619] hover:text-[#EF4444] hover:border-[#EF4444]",children:(0,e.jsx)(s.A,{className:"h-4 w-4"})})}),(0,e.jsxs)(A.EO,{children:[(0,e.jsxs)(A.wd,{children:[(0,e.jsx)(A.r7,{children:ag("ideas.deleteIdea")}),(0,e.jsx)(A.$v,{children:ag("ideas.deleteIdeaConfirm",{title:al.title})})]}),(0,e.jsxs)(A.ck,{children:[(0,e.jsx)(A.Zr,{children:ag("common.cancel")}),(0,e.jsx)(A.Rx,{variant:"destructive",onClick:bA,disabled:aF,children:aF?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ag("common.delete")]}):ag("common.delete")})]})]})]})]})})]}),(0,e.jsx)(K.h,{open:a6,onOpenChange:a7,ideaUuid:a,projectUuid:b,onMoved:()=>d()}),al&&(0,e.jsx)(L.d,{open:a8,onOpenChange:a9,ideaUuid:al.uuid,ideaTitle:al.title,projectUuid:b,currentParentUuid:al.parentUuid??null,descendantUuids:al.descendantUuids??[],onChanged:bp}),al&&(0,e.jsx)(M.i,{open:ba,onOpenChange:bb,projectUuid:b,parentUuid:al.uuid,parentTitle:al.title,onCreated:a=>{i.oR.success(aj("deriveIdea")),ak.refresh(),af?.(a)}}),aD&&al&&(0,e.jsx)(V.i,{idea:{uuid:al.uuid,title:al.title,content:al.content,status:al.status,assignee:al.assignee?{type:al.assignee.type,uuid:al.assignee.uuid,name:al.assignee.name}:null},projectUuid:b,currentUserUuid:c,onClose:()=>{aE(!1),bp()}}),(0,e.jsx)(_.V,{open:null!==aS,agentName:al?.assignee?.name??"",instances:aS?.instances??[],onConfirm:aT,onCancel:aU}),bc&&be&&(0,e.jsx)(I.v,{task:be,projectUuid:b,currentUserUuid:c,mode:bk?"sidebyside":"overlay",onClose:()=>{bd(null),bf(null)},onBack:()=>{bd(null),bf(null)}}),bg&&(0,e.jsx)(J.K,{title:bg.title,type:bg.type,content:bg.content,mode:bk?"sidebyside":"overlay",onClose:()=>bh(null),onBack:()=>bh(null)})]})}[C,D,H,I,J,M]=af.then?(await af)():af,d()}catch(a){d(a)}})},40467:(a,b,c)=>{c.d(b,{v:()=>k});var d=c(10837),e=c(21968),f=c(9222),g=c(86460),h=c(2852),i=c(80195),j=c(77521);function k({ideaUuid:a}){let b=(0,f.c)(),[c,k]=(0,e.useState)([]),[l,m]=(0,e.useState)(!0);return(0,e.useCallback)(async()=>{m(!0),k((await (0,i.x)(a)).activities),m(!1)},[a]),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)(h.J,{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:b("common.activity")}),(0,d.jsx)("div",{className:"mt-2",children:l?(0,d.jsx)("div",{className:"flex items-center justify-center py-4",children:(0,d.jsx)(g.A,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):0===c.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground italic",children:b("common.noActivity")}):c.map((a,e)=>(0,d.jsxs)("div",{className:"flex items-stretch gap-2.5",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center w-2 shrink-0",children:[(0,d.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full border-[1.5px] border-[#D9D9D9] dark:border-[#3a3a40] bg-card"}),e<c.length-1&&(0,d.jsx)("div",{className:"flex-1 w-px bg-border mt-1"})]}),(0,d.jsxs)("div",{className:"flex-1 pb-3",children:[(0,d.jsx)("p",{className:"text-[13px] text-foreground",children:function(a,b){let{action:c,actorName:d}=a;switch(c){case"created":case"idea_created":return b("activity.ideaCreated",{actor:d});case"assigned":case"idea_assigned":return b("activity.ideaAssigned",{actor:d});case"claimed":case"idea_claimed":return b("activity.ideaClaimed",{actor:d});case"released":case"idea_released":return b("activity.ideaReleased",{actor:d});case"status_changed":case"idea_status_changed":return b("activity.ideaStatusChanged",{actor:d});case"edited":case"idea_edited":return b("activity.ideaEdited",{actor:d});case"reparented":case"idea_reparented":return b("activity.ideaReparented",{actor:d});case"elaboration_started":return b("activity.elaborationStarted",{actor:d});case"elaboration_answered":return b("activity.elaborationAnswered",{actor:d});case"elaboration_skipped":return b("activity.elaborationSkipped",{actor:d});case"elaboration_resolved":return b("activity.elaborationResolved",{actor:d});case"elaboration_followup":return b("activity.elaborationFollowup",{actor:d});default:return b("activity.genericAction",{actor:d,action:c})}}(a,b)}),(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground",children:(0,j.fw)(a.createdAt,b)})]})]},a.uuid))})]})}},42484:(a,b,c)=>{c.d(b,{c:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40e3fbb2adca7f316ec1c1d663ebe641789fac6d9a",d.callServer,void 0,d.findSourceMapURL,"getIdeaAction")},44963:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{i:()=>u});var e=c(10837),f=c(21968),g=c(9222),h=c(86460),i=c(42424),j=c(11568),k=c(9994),l=c(20170),m=c(2852),n=c(8495),o=c(94372),p=c(42087),q=c(93524),r=c(70028),s=c(68797),t=a([s]);function u({open:a,onOpenChange:b,projectUuid:c,onCreated:d,parentUuid:t,parentTitle:u}){let v=(0,g.c)("ideaTracker"),w=(0,g.c)("ideaTracker.lineage"),x=!!t,y=(0,g.c)("common"),[z,A]=(0,f.useState)(""),[B,C]=(0,f.useState)(""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(!1),[H,I]=(0,f.useState)(null),[J,K]=(0,f.useState)(!1),L=(0,r.kz)(),M=(L?.connections??[]).some(a=>"online"===a.effectiveStatus),[N,O]=(0,f.useState)("form"),P=x?"form":N,Q=async()=>{let a=z.trim();if(a){G(!0),I(null);try{let e=await fetch(`/api/projects/${c}/ideas`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a,content:B.trim()||void 0,...t?{parentUuid:t}:{},...D?{isContainer:!0}:{}})}),f=await e.json();f.success&&f.data?.uuid?(A(""),C(""),E(!1),b(!1),d?.(f.data.uuid)):I(f.error||v("error.createFailed"))}catch{I(v("error.createFailed"))}finally{G(!1)}}},R=(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4 py-2",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(m.J,{htmlFor:"idea-title",children:v("newIdea.ideaTitle")}),(0,e.jsx)(k.p,{id:"idea-title",value:z,onChange:a=>A(a.target.value),placeholder:v("newIdea.titlePlaceholder"),autoFocus:!0,onKeyDown:a=>{!(0,p.P)(a)&&"Enter"===a.key&&!a.shiftKey&&z.trim()&&(a.preventDefault(),Q())}})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)(m.J,{htmlFor:"idea-content",children:[v("newIdea.description"),(0,e.jsxs)("span",{className:"ml-1 text-xs font-normal text-muted-foreground",children:["(",y("optional"),")"]})]}),(0,e.jsx)(l.T,{id:"idea-content",value:B,onChange:a=>C(a.target.value),placeholder:v("newIdea.descriptionPlaceholder"),rows:4,className:"resize-none"})]}),(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(n.S,{id:"idea-is-container",checked:D,onCheckedChange:a=>E(!0===a),className:"mt-0.5"}),(0,e.jsxs)("div",{className:"grid gap-1 leading-none",children:[(0,e.jsx)(m.J,{htmlFor:"idea-is-container",className:"cursor-pointer",children:w("makeContainer")}),(0,e.jsx)("p",{className:"text-xs font-normal text-muted-foreground",children:w("containerHint")})]})]}),H&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-[12px] text-destructive",children:H})]}),(0,e.jsxs)(j.Es,{children:[(0,e.jsx)(i.$,{variant:"outline",onClick:()=>b(!1),disabled:F,children:y("cancel")}),(0,e.jsxs)(i.$,{onClick:Q,disabled:F||!z.trim(),className:"bg-primary hover:bg-[#B56A42] text-white",children:[F?(0,e.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}):null,y("create")]})]})]}),S=async a=>{let b=await (0,q.tm)("/api/ideas/conversational",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectUuid:c,agentUuid:a.agentUuid,connectionUuid:a.connectionUuid,descriptionText:a.userText,...J?{decompose:!0}:{}})});if(!b.ok){let a=null;try{let c=await b.json();"string"==typeof c?.error&&c.error&&(a=c.error)}catch{}throw new s.fF(b.status,a)}let d=null;try{let a=await b.json();a?.success&&a.data?.session&&(d=a.data.session)}catch{}if(!d)throw new s.fF(b.status,null);return d},T=(0,e.jsxs)("div",{className:"space-y-3 py-2",children:[(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(n.S,{id:"idea-decompose",checked:J,onCheckedChange:a=>K(!0===a),className:"mt-0.5"}),(0,e.jsxs)("div",{className:"grid gap-1 leading-none",children:[(0,e.jsx)(m.J,{htmlFor:"idea-decompose",className:"cursor-pointer",children:v("newIdea.decompose")}),(0,e.jsx)("p",{className:"text-xs font-normal text-muted-foreground",children:v("newIdea.decomposeHint")})]})]}),(0,e.jsx)(s.jH,{dispatch:S,onStarted:a=>{b(!1),L?.openChatForSession(a)}})]});return(0,e.jsx)(j.lG,{open:a,onOpenChange:b,children:(0,e.jsxs)(j.Cf,{className:"sm:max-w-[480px]",children:[(0,e.jsxs)(j.c7,{children:[(0,e.jsx)(j.L3,{children:x?w("deriveIdea"):v("newIdea.title")}),x&&u&&(0,e.jsxs)("p",{className:"text-[13px] text-muted-foreground",children:[w("derivedFrom")," \xb7 ",u]})]}),!x&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.tU,{value:P,onValueChange:a=>O(a),children:(0,e.jsxs)(o.j7,{className:"grid w-full grid-cols-2",children:[(0,e.jsx)(o.Xi,{value:"form",children:v("newIdea.modeForm")}),(0,e.jsx)(o.Xi,{value:"conversation",disabled:!M,children:v("newIdea.modeConversation")})]})}),!M&&(0,e.jsxs)("div",{className:"rounded-xl border border-[#EFEBE4] dark:border-[#2a2a2e] bg-[#FCFBF8] dark:bg-[#1e1d1b] px-3 py-2",children:[(0,e.jsx)("p",{className:"px-1 pt-1 text-[12px] font-medium text-muted-foreground",children:v("newIdea.modeConversationOfflineHint")}),(0,e.jsx)(s.Bs,{variant:"compact"})]})]}),"form"===P?R:T]})})}s=(t.then?(await t)():t)[0],d()}catch(a){d(a)}})},51244:(a,b,c)=>{c.d(b,{Q:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40e0dae9a992b753e3b9cce67b8a33c2a1a54a16f4",d.callServer,void 0,d.findSourceMapURL,"getTaskAction")},55183:(a,b,c)=>{function d(a){return a.replace(/\\n/g,"\n")}c.d(b,{j:()=>d,y:()=>e});let e={prd:"typePrd",tech_design:"typeTechDesign",adr:"typeAdr",spec:"typeSpec",guide:"typeGuide",design:"typeDesign",note:"typeNote",report:"typeReport",other:"typeOther"}},64370:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{k:()=>A});var e=c(10837),f=c(21968),g=c(9222),h=c(81512),i=c.n(h),j=c(86460),k=c(21289),l=c(49102),m=c(20447),n=c(21790),o=c(51592),p=c(49599),q=c(42424),r=c(22727),s=c(90061),t=c(76172),u=c(97450),v=c(60265),w=c(55183),x=c(79110);c(39242);var y=c(54722),z=a([u]);function A({idea:a,projectUuid:b,onTaskClick:c,onDocClick:d,initialProposals:h}){let i=(0,g.c)("ideaTracker"),[l,m]=(0,f.useState)(h??[]),[n,o]=(0,f.useState)(!h),p=(0,f.useCallback)(async()=>{try{let c=await (0,x.U)(b,a.uuid);if(c.success)return m(c.data),c.data}catch(a){y.q.error("Failed to fetch proposals:",a)}finally{o(!1)}return[]},[b,a.uuid]),q=(0,f.useRef)(l);q.current=l;let{getPresence:r}=(0,s.xQ)();return((0,t.eV)("proposal",async()=>{let a=q.current;for(let b of(await p())){let c=a.find(a=>a.uuid===b.uuid);if(!c)continue;let d=new Set((c.documentDrafts??[]).map(a=>a.uuid)),e=new Set((c.taskDrafts??[]).map(a=>a.uuid)),f=(b.documentDrafts??[]).filter(a=>a.uuid&&!d.has(a.uuid)),g=(b.taskDrafts??[]).filter(a=>a.uuid&&!e.has(a.uuid)),h=[...f.map(a=>a.uuid),...g.map(a=>a.uuid)];if(h.length>0){let a=r("proposal",b.uuid)[0];if(a)for(let c of h)(0,s.fv)({entityType:"proposal",entityUuid:b.uuid,subEntityType:"draft",subEntityUuid:c,agentUuid:a.agentUuid,agentName:a.agentName,action:"mutate"})}}}),n)?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsx)(j.A,{className:"h-5 w-5 animate-spin text-primary"})}):0===l.length?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#F3E5F5] dark:bg-[#281630]",children:(0,e.jsx)(k.A,{className:"h-5 w-5 text-[#7B1FA2] dark:text-[#C98FE0]"})}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:i("panel.noProposals")})]}):(0,e.jsx)("div",{className:"space-y-5",children:l.map(a=>(0,e.jsx)(B,{proposal:a,projectUuid:b,onTaskClick:c,onDocClick:d},a.uuid))})}u=(z.then?(await z)():z)[0];let D={draft:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",pending:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",approved:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",rejected:"bg-[#FFEBEE] dark:bg-[#331619] text-[#C4574C] dark:text-[#F0897E]",revised:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground"};function B({proposal:a,projectUuid:b,onTaskClick:c,onDocClick:d}){let h=(0,g.c)("ideaTracker"),j=(0,g.c)(),k=(0,g.c)("proposals"),n=(0,g.c)("tasks"),o=(0,g.c)("documents"),s=a.documentDrafts||[],t=a.taskDrafts||[],[x,y]=(0,f.useState)(new Set),[z,A]=(0,f.useState)("cards"),[B,E]=(0,f.useState)([]),F="approved"===a.status,G=(0,f.useMemo)(()=>{let a=new Map;for(let b of B)a.set(b.title,b);return a},[B]),{dagTasks:H,dagEdges:I,dagHeight:J}=(0,f.useMemo)(()=>{let a=t.map(a=>{let b=G.get(a.title);return{uuid:b?.uuid||a.uuid,title:a.title,status:b?.status||"open",priority:a.priority||"medium"}}),b=[],c=new Map(t.map(a=>[a.uuid,a]));for(let a of t)if(a.dependsOnDraftUuids)for(let d of a.dependsOnDraftUuids){let e=G.get(a.title),f=c.get(d),g=f?G.get(f.title):void 0;b.push({from:e?.uuid||a.uuid,to:g?.uuid||d})}return{dagTasks:a,dagEdges:b,dagHeight:Math.max(350,90*a.length)}},[t,G]),K=F?B.filter(a=>"done"===a.status||"closed"===a.status).length:0;return(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("h3",{className:"text-[14px] font-semibold text-foreground truncate flex-1",children:a.title}),(0,e.jsx)(p.E,{className:`text-[11px] font-semibold border-0 shrink-0 ${D[a.status]||""}`,children:j(`status.${a.status}`)})]}),a.description&&(0,e.jsx)("div",{className:"max-h-[120px] overflow-y-auto text-[13px] leading-relaxed text-foreground/80 prose prose-sm max-w-none [&_h1]:text-sm [&_h2]:text-[13px] [&_h3]:text-xs [&_p]:text-[13px] [&_p]:text-foreground/80 [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-foreground/80 [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-foreground [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_a]:text-primary",children:(0,e.jsx)(u.MarkdownContent,{children:(0,w.j)(a.description)})}),(0,e.jsxs)(i(),{href:`/projects/${b}/proposals/${a.uuid}`,className:"flex items-center gap-1 text-[13px] font-medium text-primary hover:underline",children:[h("panel.viewProposal"),(0,e.jsx)(l.A,{className:"h-3.5 w-3.5"})]}),s.length>0&&(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:k(F?"documents":"documentDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:s.length})]}),(0,e.jsx)("div",{className:"space-y-0",children:s.map((b,c)=>(0,e.jsx)(r.D,{entityType:"proposal",entityUuid:a.uuid,subEntityType:"draft",subEntityUuid:b.uuid||`draft-${c}`,badgeInside:!0,children:(0,e.jsxs)(q.$,{variant:"ghost",className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-3.5 hover:bg-background transition-colors cursor-pointer -mx-1 px-1 rounded-lg",onClick:()=>b.content&&d?.({title:b.title,type:b.type,content:b.content}),children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)(p.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:o(w.y[b.type]||"typeOther")}),(0,e.jsx)("span",{className:"flex-1 min-w-0 text-left text-[13px] text-foreground truncate",children:b.title})]})},b.uuid||c))})]}),(t.length>0||B.length>0)&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between pb-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:k(F?"tasks":"taskDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:F&&B.length>0?B.length:t.length})]}),(0,e.jsxs)("span",{className:"text-[12px] text-muted-foreground",children:[K,"/",F&&B.length>0?B.length:t.length]})]}),(0,e.jsx)("div",{className:"-mx-6 border-t border-border"}),I.length>0&&(0,e.jsxs)("div",{className:"flex gap-0.5 rounded-lg border border-border bg-[#F7F6F3] dark:bg-[#1e1d1b] p-0.5 mt-3 w-fit",children:[(0,e.jsx)(q.$,{variant:"ghost",size:"sm",onClick:()=>A("cards"),className:`rounded-md px-2.5 py-1 h-auto text-[11px] font-medium transition-colors ${"cards"===z?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:k("cardsView")}),(0,e.jsx)(q.$,{variant:"ghost",size:"sm",onClick:()=>A("dag"),className:`rounded-md px-2.5 py-1 h-auto text-[11px] font-medium transition-colors ${"dag"===z?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:n("dagView")})]}),"cards"===z&&(0,e.jsx)("div",{className:"space-y-0",children:F&&B.length>0?B.map(a=>(0,e.jsx)(r.D,{entityType:"task",entityUuid:a.uuid,badgeInside:!0,children:(0,e.jsx)(C,{task:{uuid:a.uuid,title:a.title},expanded:!1,onToggle:()=>{},onNavigate:c?()=>c(a.uuid):void 0,taskStatus:a.status})},a.uuid)):t.map((b,c)=>(0,e.jsx)(r.D,{entityType:"proposal",entityUuid:a.uuid,subEntityType:"draft",subEntityUuid:b.uuid,badgeInside:!0,children:(0,e.jsx)(C,{task:b,expanded:x.has(c),onToggle:()=>{y(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})}})},b.uuid))}),"dag"===z&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(v._u,{tasks:H,edges:I,readonly:!0,height:J,onNodeClick:c})})]}),0===s.length&&0===t.length&&0===B.length&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground italic",children:k("emptyContainer")})]})}let E={open:"border-[#D9D9D9] dark:border-[#3a3a40] bg-card",assigned:"border-[#1976D2] bg-[#1976D2]",in_progress:"border-[#5A9E6F] bg-[#5A9E6F]",to_verify:"border-[#7B1FA2] bg-[#7B1FA2]",done:"border-[#00796B] bg-[#00796B]",closed:"border-[#9A9A9A] bg-[#9A9A9A] dark:border-[#6b6862] dark:bg-[#6b6862]"},F={open:null,assigned:null,in_progress:{className:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",key:"inProgress"},to_verify:{className:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",key:"toVerify"},done:{className:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",key:"done"},closed:{className:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",key:"done"}};function C({task:a,expanded:b,onToggle:c,onNavigate:d,taskStatus:f}){let h=(0,g.c)("proposals"),i=(0,g.c)("acceptanceCriteria"),j=(0,g.c)("status"),k=a.acceptanceCriteriaItems||[],p=!!(a.description||k.length>0),r=f?E[f]||E.open:"border-[#D9D9D9] dark:border-[#3a3a40] bg-card",s=f?F[f]:null,t=(0,e.jsx)("span",{className:`shrink-0 h-2 w-2 rounded-full border-[1.5px] ${r} transition-colors`}),u=(0,e.jsx)("span",{className:"flex-1 min-w-0 text-[13px] leading-snug truncate text-muted-foreground",children:a.title}),v=s?(0,e.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium ${s.className}`,children:j(s.key)}):null;return d?(0,e.jsxs)(q.$,{variant:"ghost",onClick:d,className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-4 cursor-pointer hover:bg-background -mx-1 px-1 rounded-lg transition-colors",children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),t,u,v]}):(0,e.jsxs)("div",{children:[(0,e.jsxs)(q.$,{variant:"ghost",onClick:p?c:void 0,className:`w-full justify-start h-auto text-left flex items-center gap-2.5 py-4 ${p?"cursor-pointer hover:bg-background -mx-1 px-1 rounded-lg":""} transition-colors`,children:[b?(0,e.jsx)(n.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):(0,e.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),t,u,v]}),b&&p&&(0,e.jsxs)("div",{className:"pb-3 pl-5 space-y-3",children:[a.description&&(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:a.description}),k.length>0&&(0,e.jsxs)("div",{className:"rounded-lg bg-background p-3 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,e.jsx)("span",{className:"text-[11px] font-semibold text-foreground",children:h("taskAcceptanceCriteria")})]}),(0,e.jsx)("div",{className:"space-y-1.5",children:k.map((a,b)=>(0,e.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,e.jsx)("p",{className:"text-[11px] leading-snug text-foreground/80 flex-1",children:a.description}),!1!==a.required&&(0,e.jsx)("span",{className:"shrink-0 text-[10px] font-medium text-[#E65100] dark:text-[#F0A050]",children:i("required")})]},b))})]})]})]})}d()}catch(a){d(a)}})},66253:(a,b,c)=>{c.d(b,{U:()=>p});var d=c(10837),e=c(21968),f=c(9222),g=c(86460),h=c(20447),i=c(49599),j=c(42424),k=c(76172),l=c(54722),m=c(55183),n=c(42377);let o=(0,n.createServerReference)("6007132ae83664e415f6d20e4ba7c2ea15d80c63f7",n.callServer,void 0,n.findSourceMapURL,"getReportsForIdeaAction");function p({projectUuid:a,ideaUuid:b,proposals:c,onDocClick:n}){let p=(0,f.c)("idea"),q=(0,f.c)("documents"),[r,s]=(0,e.useState)([]),[t,u]=(0,e.useState)(!0),v=c.some(a=>"approved"===a.status),w=(0,e.useCallback)(async()=>{if(!v){s([]),u(!1);return}try{let c=await o(a,b);if(c.success){let a=[...c.data].sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime());s(a.map(a=>({uuid:a.uuid,title:a.title,type:a.type,content:a.content??null,createdAt:a.createdAt})))}}catch(a){l.q.error("Failed to fetch reports for idea:",a)}finally{u(!1)}},[a,b,v]);return((0,k.eV)("document",w),t)?v?(0,d.jsx)("div",{className:"flex items-center justify-center py-3",children:(0,d.jsx)(g.A,{className:"h-4 w-4 animate-spin text-primary"})}):null:0===r.length?null:(0,d.jsxs)("div",{className:"mt-6 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,d.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:p("reportsList")}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground",children:r.length}),(0,d.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["\xb7 ",p("reportsAcrossProposals")]})]}),(0,d.jsx)("div",{className:"space-y-0",children:r.map(a=>(0,d.jsxs)(j.$,{variant:"ghost",className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-3.5 hover:bg-background transition-colors cursor-pointer -mx-1 px-1 rounded-lg",onClick:()=>n({title:a.title,type:"report",content:a.content??""}),children:[(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)(i.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:q(m.y[a.type]||"typeOther")}),(0,d.jsx)("span",{className:"flex-1 min-w-0 text-left text-[13px] text-foreground truncate",children:a.title})]},a.uuid))})]})}},66372:(a,b,c)=>{c.d(b,{d:()=>t});var d=c(10837),e=c(21968),f=c(9222),g=c(68884),h=c(76549),i=c(86460),j=c(72475),k=c(21692),l=c(42424),m=c(11568),n=c(10297),o=c(96307),p=c(42377);let q=(0,p.createServerReference)("4034eb6716e1a527e45f11d979b7cb63140fa90d45",p.callServer,void 0,p.findSourceMapURL,"getProjectIdeasForPickerAction"),r=(0,p.createServerReference)("60fe7052237a6c074e555d10dd727ea9bde9cdada7",p.callServer,void 0,p.findSourceMapURL,"setIdeaParentAction");var s=c(54722);function t({open:a,onOpenChange:b,ideaUuid:c,ideaTitle:p,projectUuid:t,currentParentUuid:u,descendantUuids:v,onChanged:w}){let x=(0,f.c)("ideaTracker.lineage"),y=(0,f.c)("common"),z=(0,g.r)(),[A,B]=(0,e.useState)([]),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(null),K=new Set([c,...v]);(0,e.useCallback)(async()=>{F(!0),J(null);try{let a=await q(t);a.success?(B(a.data),D(a.hasMore)):J(a.error)}catch(a){s.q.error("Failed to load parent candidates:",a),J(x("saveFailed"))}F(!1)},[t,x]);let L=async a=>{if(!G){H(!0),J(null);try{let d=await r(c,a);d.success?(h.oR.success(a?x("save"):x("detach")),b(!1),z.refresh(),w()):J(d.error||x("saveFailed"))}catch(a){J(a instanceof Error?a.message:x("saveFailed"))}H(!1)}};return(0,d.jsx)(m.lG,{open:a,onOpenChange:b,children:(0,d.jsxs)(m.Cf,{children:[(0,d.jsxs)(m.c7,{children:[(0,d.jsx)(m.L3,{children:x("setParentTitle")}),(0,d.jsx)(m.rr,{children:x("setParentDescription",{title:p})})]}),(0,d.jsxs)("div",{className:"min-w-0 space-y-3 pt-1",children:[E?(0,d.jsx)("div",{className:"flex h-40 items-center justify-center",children:(0,d.jsx)(i.A,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):(0,d.jsx)("div",{className:"rounded-md border border-border",children:(0,d.jsxs)(n.uB,{children:[(0,d.jsx)(n.G7,{placeholder:x("searchPlaceholder")}),(0,d.jsxs)(n.oI,{children:[(0,d.jsx)(n.xL,{children:x("noCandidates")}),(0,d.jsx)(n.L$,{children:A.map(a=>{let b=K.has(a.uuid),c=a.uuid===u;return(0,d.jsxs)(n.h_,{value:a.title,disabled:b,onSelect:()=>{b||L(a.uuid)},className:(0,o.cn)("flex min-w-0 items-center justify-between gap-2",b&&"opacity-55",c&&"bg-primary/10"),children:[(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",children:a.title}),b&&(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-[11px] font-medium text-[#B0654A] dark:text-[#EBA890]",children:[(0,d.jsx)(j.A,{className:"h-3 w-3"}),x("cycleBlocked")]})]},a.uuid)})})]})]})}),(0,d.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-[#FBF0EB] dark:bg-[#221e1b] px-3 py-2.5",children:[(0,d.jsx)(k.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[#B0654A] dark:text-[#EBA890]"}),(0,d.jsx)("p",{className:"text-[12px] leading-relaxed text-[#9A5238] dark:text-[#E9A088]",children:x("cycleWarning")})]}),C&&(0,d.jsx)("p",{className:"px-1 text-[12px] text-muted-foreground",role:"status",children:x("pickerTruncated")}),I&&(0,d.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:I})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[u?(0,d.jsx)(l.$,{variant:"outline",className:"border-border",onClick:()=>L(null),disabled:G,children:x("detach")}):(0,d.jsx)("span",{}),(0,d.jsx)(l.$,{variant:"outline",className:"border-border",onClick:()=>b(!1),disabled:G,children:y("cancel")})]})]})})}},69815:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{p:()=>n});var e=c(10837),f=c(9222),g=c(16235),h=c(80251),i=c(2852),j=c(99127),k=c(68797),l=c(7086),m=a([k]);function n({assignee:a,onReassign:b,editable:c}){let d=(0,f.c)("common"),m=!0===c&&"function"==typeof b,n=d(a?"reassign":"assign"),o=a?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(h.eu,{className:"h-7 w-7",children:(0,e.jsx)(h.q5,{className:(0,l.bB)(a)?"bg-primary text-white":"bg-border text-muted-foreground",children:(0,l.bB)(a)?(0,e.jsx)(g.A,{className:"h-3.5 w-3.5"}):a.name.charAt(0).toUpperCase()})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-foreground",children:a.name}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:d((0,l.bB)(a)?"agent":"user")}),"agent_instance"===a.type&&a.instance&&(0,e.jsx)("div",{className:"mt-1",children:(0,e.jsx)(k.jQ,{cwd:a.instance.cwd,host:a.instance.host})})]})]}):(0,e.jsx)("span",{className:"text-sm text-muted-foreground",children:d("unassigned")}),p="mt-2 flex items-center gap-2.5 rounded-lg bg-background p-3";return(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:d("assignee")}),m?(0,e.jsx)(j.Bc,{delayDuration:300,children:(0,e.jsxs)(j.m_,{children:[(0,e.jsx)(j.k$,{asChild:!0,children:(0,e.jsx)("button",{type:"button",onClick:b,"aria-label":n,className:`${p} w-full cursor-pointer text-left`,children:o})}),(0,e.jsx)(j.ZI,{children:n})]})}):(0,e.jsx)("div",{className:p,children:o})]})}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},75574:(a,b,c)=>{c.d(b,{p:()=>s});var d=c(10837),e=c(21968),f=c(9222),g=c(5797),h=c(91981),i=c(21289),j=c(51592),k=c(65956),l=c(20447),m=c(9810),n=c(90856),o=c(21790),p=c(49102),q=c(42377);q.callServer,q.findSourceMapURL;var r=c(77521);function s({idea:a,proposals:b,tasks:c,onSelectTask:q}){let s=(0,f.c)("ideaTracker"),t=(0,f.c)(),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(new Set),y=(0,e.useMemo)(()=>"open"===a.status?"idea_created":"elaborating"===a.status||0===b.length?"elaboration":b.some(a=>"approved"===a.status)&&c.length>0?"tasks":"proposal",[a.status,b,c]),z=(0,e.useMemo)(()=>{let a=["idea_created","elaboration","proposal","tasks"],b=a.indexOf(y);return a.map((a,c)=>({id:a,labelKey:({idea_created:"panel.timeline.ideaCreated",elaboration:"panel.timeline.elaboration",proposal:"panel.timeline.proposal",tasks:"panel.timeline.tasksProgress"})[a],status:c<b?"completed":c===b?"active":"upcoming",icon:({idea_created:(0,d.jsx)(g.A,{className:"h-3.5 w-3.5"}),elaboration:(0,d.jsx)(h.A,{className:"h-3.5 w-3.5"}),proposal:(0,d.jsx)(i.A,{className:"h-3.5 w-3.5"}),tasks:(0,d.jsx)(j.A,{className:"h-3.5 w-3.5"})})[a]}))},[y]),A=(0,e.useCallback)(a=>{x(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),B=(0,e.useMemo)(()=>"open"===a.status?s("panel.timeline.noElaboration"):"skipped"===a.elaborationStatus?s("panel.timeline.elaborationSkipped"):"resolved"===a.elaborationStatus&&u?s("panel.timeline.elaborationComplete",{count:u.summary.totalQuestions}):"elaborating"===a.status?s("panel.timeline.elaborationInProgress"):u&&u.summary.totalQuestions>0?s("panel.timeline.elaborationComplete",{count:u.summary.totalQuestions}):s("panel.timeline.noElaboration"),[a.status,a.elaborationStatus,u,s]),C=(0,e.useMemo)(()=>{if(0===b.length)return s("panel.timeline.noProposal");let a=b.filter(a=>"approved"===a.status).length,c=b.filter(a=>"pending"===a.status).length;if(a>0&&1===b.length)return s("panel.timeline.proposalApproved");if(a>0)return s("panel.timeline.proposalsApproved",{count:a,total:b.length});if(c>0)return s("panel.timeline.proposalPending");switch(b[0].status){case"draft":default:return s("panel.timeline.proposalDraft");case"rejected":return s("panel.timeline.proposalRejected")}},[b,s]),D=(0,e.useMemo)(()=>{let a=0,c=0;for(let d of b)a+=d.documentDrafts?.length??0,c+=d.taskDrafts?.length??0;return{docCount:a,taskDraftCount:c}},[b]),E=(0,e.useMemo)(()=>{let a=c.filter(a=>"done"===a.status||"closed"===a.status).length,b=c.filter(a=>"in_progress"===a.status).length;return{done:a,inProgress:b,toVerify:c.filter(a=>"to_verify"===a.status).length,open:c.filter(a=>"open"===a.status||"assigned"===a.status).length,total:c.length}},[c]);return(0,d.jsx)("div",{className:"space-y-0",children:z.map((e,f)=>{let g=w.has(e.id),h=f===z.length-1;return(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center w-5 shrink-0",children:[(0,d.jsx)("div",{className:"mt-1",children:"completed"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-[#E0F2F1] dark:bg-[#12292a] flex items-center justify-center",children:(0,d.jsx)(m.A,{className:"h-3 w-3 text-[#00796B] dark:text-[#4FD1C0]"})}):"active"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-primary flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 fill-white text-white"})}):(0,d.jsx)("div",{className:"h-5 w-5 rounded-full border-2 border-dashed border-[#D9D9D9] dark:border-[#3a3a40] flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 text-muted-foreground"})})}),!h&&(0,d.jsx)("div",{className:"flex-1 w-px bg-border mt-1 min-h-[8px]"})]}),(0,d.jsxs)("div",{className:`flex-1 min-w-0 ${h?"pb-0":"pb-4"}`,children:[(0,d.jsxs)("button",{onClick:()=>A(e.id),className:"flex items-center gap-1.5 w-full text-left group cursor-pointer",children:[g?(0,d.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}):(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,d.jsx)("span",{className:`text-[13px] font-medium ${"active"===e.status?"text-primary":"completed"===e.status?"text-foreground":"text-muted-foreground"}`,children:s(e.labelKey)}),!g&&(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground truncate ml-1",children:(b=>{switch(b.id){case"idea_created":return a.createdBy?a.createdBy.name:"";case"elaboration":return B;case"proposal":return C;case"tasks":return c.length>0?s("panel.timeline.tasksComplete",{done:E.done,total:E.total}):s("panel.timeline.noTasks");default:return""}})(e)})]}),(e=>{let f=w.has(e.id);switch(e.id){case"idea_created":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[a.createdBy&&(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.createdBy",{name:a.createdBy.name})}),(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:(0,r.fw)(a.createdAt,t)}),a.content&&(0,d.jsxs)("p",{className:"text-[12px] text-muted-foreground line-clamp-2",children:[a.content.slice(0,120),a.content.length>120?"...":""]})]}):null;case"elaboration":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:B}),u&&u.rounds.length>0&&(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.rounds",{count:u.rounds.length})})]}):null;case"proposal":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:C}),b.length>0&&(0,d.jsxs)("div",{className:"space-y-1",children:[D.docCount>0&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",children:[(0,d.jsx)(k.A,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:s("panel.timeline.documents",{count:D.docCount})})]}),D.taskDraftCount>0&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",children:[(0,d.jsx)(j.A,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:s("panel.timeline.tasks",{count:D.taskDraftCount})})]})]})]}):null;case"tasks":return f?(0,d.jsx)("div",{className:"mt-2 space-y-2",children:0===c.length?(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.noTasks")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"flex-1 h-1.5 rounded-full bg-[#F0EDE8] dark:bg-[#1f1e1c] overflow-hidden flex",children:[E.done>0&&(0,d.jsx)("div",{className:"h-full bg-[#00796B]",style:{width:`${E.done/E.total*100}%`}}),E.inProgress>0&&(0,d.jsx)("div",{className:"h-full bg-[#1976D2]",style:{width:`${E.inProgress/E.total*100}%`}}),E.toVerify>0&&(0,d.jsx)("div",{className:"h-full bg-[#7B1FA2]",style:{width:`${E.toVerify/E.total*100}%`}})]}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0",children:s("panel.timeline.tasksComplete",{done:E.done,total:E.total})})]}),(0,d.jsxs)("div",{className:"space-y-1",children:[c.slice(0,5).map(a=>(0,d.jsxs)("button",{onClick:()=>q(a.uuid),className:"flex items-center gap-2 w-full text-left rounded-md px-2 py-1.5 hover:bg-secondary transition-colors group cursor-pointer",children:[(0,d.jsx)(l.A,{className:"h-3 w-3 text-muted-foreground shrink-0 group-hover:text-primary"}),(0,d.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${(0,r.eT)(a.status)}`}),(0,d.jsx)("span",{className:"flex-1 text-[12px] text-foreground truncate group-hover:text-primary",children:a.title})]},a.uuid)),c.length>5&&(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground px-2",children:s("panel.timeline.moreItems",{count:c.length-5})})]})]})}):null;default:return null}})(e)]})]},e.id)})})}},79030:(a,b,c)=>{c.d(b,{C:()=>f});var d=c(10837),e=c(96307);function f({done:a,total:b,size:c=14,stroke:f=2,className:g,color:h="#B26B3D",trackColor:i="#EAD9C8"}){let j=(c-f)/2,k=2*Math.PI*j,l=b>0?Math.min(1,Math.max(0,a/b)):0;return(0,d.jsxs)("svg",{width:c,height:c,viewBox:`0 0 ${c} ${c}`,className:(0,e.cn)("shrink-0",g),role:"img","aria-label":`${a}/${b}`,children:[(0,d.jsx)("circle",{cx:c/2,cy:c/2,r:j,fill:"none",stroke:i,strokeWidth:f}),l>0&&(0,d.jsx)("circle",{cx:c/2,cy:c/2,r:j,fill:"none",stroke:b>0&&a>=b?"#1D9E75":h,strokeWidth:f,strokeDasharray:k,strokeDashoffset:k*(1-l),strokeLinecap:"round",transform:`rotate(-90 ${c/2} ${c/2})`})]})}},84722:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{G:()=>q});var e=c(10837),f=c(9222),g=c(86460),h=c(16235),i=c(2852),j=c(84819),k=c(4432),l=c(97450),m=c(31009),n=c(45148),o=c(69815),p=a([l,o]);function q({idea:a,elaboration:b,isLoading:c,onRefresh:d,onReassign:p,canReassign:q}){let r=(0,f.c)("ideaTracker"),s=(0,f.c)("common");return c?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsx)(g.A,{className:"h-5 w-5 animate-spin text-primary"})}):(0,e.jsxs)(m.P.div,{variants:n.qG,initial:"initial",animate:"animate",children:[(0,e.jsx)(o.p,{assignee:a.assignee,onReassign:p,editable:q}),(0,e.jsx)(j.Separator,{className:"my-5 bg-secondary"}),b&&b.rounds.length>0?(0,e.jsx)("div",{children:(0,e.jsx)(k.R,{ideaUuid:a.uuid,elaboration:b,onRefresh:d})}):"open"===a.status?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF3E0] dark:bg-[#3a2a12]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#E65100] dark:text-[#F0A050]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("panel.elaborationNotStarted")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r("panel.elaborationNotStartedDesc")})]})]}):(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#E3F2FD] dark:bg-[#13253a]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#1976D2] dark:text-[#5AA9F0]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("panel.elaborationWaiting")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r("panel.elaborationWaitingDesc")})]})]}),a.content&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(j.Separator,{className:"my-5 bg-secondary"}),(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:s("content")}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-foreground",children:(0,e.jsx)(l.MarkdownContent,{children:a.content})})})]})]})]})}[l,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},98310:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{K:()=>q});var e=c(10837),f=c(21968),g=c(9222),h=c(35209),i=c(10694),j=c(42424),k=c(49599),l=c(74645),m=c(97450),n=c(55183),o=c(77521),p=a([m]);function q({title:a,type:b,content:c,mode:d="overlay",onClose:p,onBack:q}){let r=(0,g.c)("documents"),[s,t]=(0,f.useState)(!1),u="sidebyside"===d;return(0,e.jsxs)(e.Fragment,{children:[!u&&(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:p}),(0,e.jsxs)("div",{className:`fixed top-14 md:top-0 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col bg-card shadow-xl border-l border-border ${u?`z-40 ${s?"":"animate-in slide-in-from-right duration-300"}`:`z-50 right-0 ${s?"":"animate-in slide-in-from-right duration-300"}`}`,style:u?{right:`${o.L8}px`}:void 0,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[q&&(0,e.jsx)(j.$,{variant:"ghost",size:"icon",className:"mr-2 h-8 w-8 shrink-0",onClick:q,children:(0,e.jsx)(h.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:a}),(0,e.jsx)("div",{className:"mt-1.5",children:(0,e.jsx)(k.E,{variant:"outline",className:"text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:r(n.y[b]||"typeOther")})})]}),(0,e.jsx)(j.$,{variant:"outline",size:"icon",className:"ml-4 h-8 w-8 shrink-0 border-border",onClick:p,children:(0,e.jsx)(i.A,{className:"h-4 w-4 text-muted-foreground"})})]}),(0,e.jsx)(l.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"px-6 py-5 text-[13px] leading-relaxed text-foreground prose prose-sm max-w-none [&_h1]:text-lg [&_h1]:font-semibold [&_h1]:mt-4 [&_h1]:mb-2 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mb-1.5 [&_h3]:text-sm [&_h3]:font-medium [&_h3]:mt-2 [&_h3]:mb-1 [&_p]:text-[13px] [&_p]:text-foreground/80 [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-foreground/80 [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-foreground [&_code]:text-[12px] [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_pre]:bg-secondary [&_pre]:text-foreground [&_pre]:p-3 [&_pre]:rounded-lg [&_pre]:my-2 [&_a]:text-primary",children:(0,e.jsx)(m.MarkdownContent,{children:(0,n.j)(c)})})})]})]})}m=(p.then?(await p)():p)[0],d()}catch(a){d(a)}})}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=2463,exports.ids=[2463],exports.modules={13277:(a,b,c)=>{c.r(b),c.d(b,{Label:()=>g,Root:()=>h});var d=c(21968),e=c(16551),f=c(10837),g=d.forwardRef((a,b)=>(0,f.jsx)(e.sG.label,{...a,ref:b,onMouseDown:b=>{b.target.closest("button, input, select, textarea")||(a.onMouseDown?.(b),!b.defaultPrevented&&b.detail>1&&b.preventDefault())}}));g.displayName="Label";var h=g},14672:(a,b,c)=>{c.r(b),c.d(b,{Avatar:()=>p,AvatarFallback:()=>t,AvatarImage:()=>r,Fallback:()=>x,Image:()=>w,Root:()=>v,createAvatarScope:()=>m});var d=c(21968),e=c(42990),f=c(87979),g=c(35439),h=c(16551),i=c(23771),j=c(10837),k="Avatar",[l,m]=(0,e.A)(k),[n,o]=l(k),p=d.forwardRef((a,b)=>{let{__scopeAvatar:c,...e}=a,[f,g]=d.useState("idle");return(0,j.jsx)(n,{scope:c,imageLoadingStatus:f,onImageLoadingStatusChange:g,children:(0,j.jsx)(h.sG.span,{...e,ref:b})})});p.displayName=k;var q="AvatarImage",r=d.forwardRef((a,b)=>{let{__scopeAvatar:c,src:e,onLoadingStatusChange:k=()=>{},...l}=a,m=o(q,c),n=function(a,{referrerPolicy:b,crossOrigin:c}){let e=(0,i.z)(),f=d.useRef(null),h=e?(f.current||(f.current=new window.Image),f.current):null,[j,k]=d.useState(()=>u(h,a));return(0,g.N)(()=>{k(u(h,a))},[h,a]),(0,g.N)(()=>{let a=a=>()=>{k(a)};if(!h)return;let d=a("loaded"),e=a("error");return h.addEventListener("load",d),h.addEventListener("error",e),b&&(h.referrerPolicy=b),"string"==typeof c&&(h.crossOrigin=c),()=>{h.removeEventListener("load",d),h.removeEventListener("error",e)}},[h,c,b]),j}(e,l),p=(0,f.c)(a=>{k(a),m.onImageLoadingStatusChange(a)});return(0,g.N)(()=>{"idle"!==n&&p(n)},[n,p]),"loaded"===n?(0,j.jsx)(h.sG.img,{...l,ref:b,src:e}):null});r.displayName=q;var s="AvatarFallback",t=d.forwardRef((a,b)=>{let{__scopeAvatar:c,delayMs:e,...f}=a,g=o(s,c),[i,k]=d.useState(void 0===e);return d.useEffect(()=>{if(void 0!==e){let a=window.setTimeout(()=>k(!0),e);return()=>window.clearTimeout(a)}},[e]),i&&"loaded"!==g.imageLoadingStatus?(0,j.jsx)(h.sG.span,{...f,ref:b}):null});function u(a,b){return a?b?(a.src!==b&&(a.src=b),a.complete&&a.naturalWidth>0?"loaded":"loading"):"error":"idle"}t.displayName=s;var v=p,w=r,x=t},15644:(a,b,c)=>{c.r(b),c.d(b,{Root:()=>w,Switch:()=>r,SwitchThumb:()=>t,Thumb:()=>x,createSwitchScope:()=>o});var d=c(21968),e=c(22546),f=c(96090),g=c(42990),h=c(15035),i=c(29851),j=c(7579),k=c(16551),l=c(10837),m="Switch",[n,o]=(0,g.A)(m),[p,q]=n(m),r=d.forwardRef((a,b)=>{let{__scopeSwitch:c,name:g,checked:i,defaultChecked:j,required:n,disabled:o,value:q="on",onCheckedChange:r,form:s,...t}=a,[w,x]=d.useState(null),y=(0,f.s)(b,a=>x(a)),z=d.useRef(!1),A=!w||s||!!w.closest("form"),[B,C]=(0,h.i)({prop:i,defaultProp:j??!1,onChange:r,caller:m});return(0,l.jsxs)(p,{scope:c,checked:B,disabled:o,children:[(0,l.jsx)(k.sG.button,{type:"button",role:"switch","aria-checked":B,"aria-required":n,"data-state":v(B),"data-disabled":o?"":void 0,disabled:o,value:q,...t,ref:y,onClick:(0,e.mK)(a.onClick,a=>{C(a=>!a),A&&(z.current=a.isPropagationStopped(),z.current||a.stopPropagation())})}),A&&(0,l.jsx)(u,{control:w,bubbles:!z.current,name:g,value:q,checked:B,required:n,disabled:o,form:s,style:{transform:"translateX(-100%)"}})]})});r.displayName=m;var s="SwitchThumb",t=d.forwardRef((a,b)=>{let{__scopeSwitch:c,...d}=a,e=q(s,c);return(0,l.jsx)(k.sG.span,{"data-state":v(e.checked),"data-disabled":e.disabled?"":void 0,...d,ref:b})});t.displayName=s;var u=d.forwardRef(({__scopeSwitch:a,control:b,checked:c,bubbles:e=!0,...g},h)=>{let k=d.useRef(null),m=(0,f.s)(k,h),n=(0,i.Z)(c),o=(0,j.X)(b);return d.useEffect(()=>{let a=k.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(n!==c&&b){let d=new Event("click",{bubbles:e});b.call(a,c),a.dispatchEvent(d)}},[n,c,e]),(0,l.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:c,...g,tabIndex:-1,ref:m,style:{...g.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function v(a){return a?"checked":"unchecked"}u.displayName="SwitchBubbleInput";var w=r,x=t},15703:(a,b,c)=>{a.exports=c(51928)},23771:(a,b,c)=>{c.d(b,{z:()=>e});var d=c(15703);function e(){return(0,d.useSyncExternalStore)(f,()=>!0,()=>!1)}function f(){return()=>{}}},51928:(a,b,c)=>{var d=c(21968),e="function"==typeof Object.is?Object.is:function(a,b){return a===b&&(0!==a||1/a==1/b)||a!=a&&b!=b},f=d.useState,g=d.useEffect,h=d.useLayoutEffect,i=d.useDebugValue;function j(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!e(a,c)}catch(a){return!0}}var k="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(a,b){return b()}:function(a,b){var c=b(),d=f({inst:{value:c,getSnapshot:b}}),e=d[0].inst,k=d[1];return h(function(){e.value=c,e.getSnapshot=b,j(e)&&k({inst:e})},[a,c,b]),g(function(){return j(e)&&k({inst:e}),a(function(){j(e)&&k({inst:e})})},[a]),i(c),c};b.useSyncExternalStore=void 0!==d.useSyncExternalStore?d.useSyncExternalStore:k},80501:(a,b,c)=>{c.r(b),c.d(b,{Arrow:()=>X,Content:()=>W,Portal:()=>V,Provider:()=>S,Root:()=>T,Tooltip:()=>C,TooltipArrow:()=>R,TooltipContent:()=>K,TooltipPortal:()=>I,TooltipProvider:()=>y,TooltipTrigger:()=>E,Trigger:()=>U,createTooltipScope:()=>s});var d=c(21968),e=c(22546),f=c(96090),g=c(42990),h=c(44768),i=c(22243),j=c(47536),k=c(66619),l=c(5030),m=c(16551),n=c(11156),o=c(15035),p=c(35014),q=c(10837),[r,s]=(0,g.A)("Tooltip",[j.Bk]),t=(0,j.Bk)(),u="TooltipProvider",v="tooltip.open",[w,x]=r(u),y=a=>{let{__scopeTooltip:b,delayDuration:c=700,skipDelayDuration:e=300,disableHoverableContent:f=!1,children:g}=a,h=d.useRef(!0),i=d.useRef(!1),j=d.useRef(0);return d.useEffect(()=>{let a=j.current;return()=>window.clearTimeout(a)},[]),(0,q.jsx)(w,{scope:b,isOpenDelayedRef:h,delayDuration:c,onOpen:d.useCallback(()=>{window.clearTimeout(j.current),h.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(j.current),j.current=window.setTimeout(()=>h.current=!0,e)},[e]),isPointerInTransitRef:i,onPointerInTransitChange:d.useCallback(a=>{i.current=a},[]),disableHoverableContent:f,children:g})};y.displayName=u;var z="Tooltip",[A,B]=r(z),C=a=>{let{__scopeTooltip:b,children:c,open:e,defaultOpen:f,onOpenChange:g,disableHoverableContent:h,delayDuration:k}=a,l=x(z,a.__scopeTooltip),m=t(b),[n,p]=d.useState(null),r=(0,i.B)(),s=d.useRef(0),u=h??l.disableHoverableContent,w=k??l.delayDuration,y=d.useRef(!1),[B,C]=(0,o.i)({prop:e,defaultProp:f??!1,onChange:a=>{a?(l.onOpen(),document.dispatchEvent(new CustomEvent(v))):l.onClose(),g?.(a)},caller:z}),D=d.useMemo(()=>B?y.current?"delayed-open":"instant-open":"closed",[B]),E=d.useCallback(()=>{window.clearTimeout(s.current),s.current=0,y.current=!1,C(!0)},[C]),F=d.useCallback(()=>{window.clearTimeout(s.current),s.current=0,C(!1)},[C]),G=d.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(()=>{y.current=!0,C(!0),s.current=0},w)},[w,C]);return d.useEffect(()=>()=>{s.current&&(window.clearTimeout(s.current),s.current=0)},[]),(0,q.jsx)(j.bL,{...m,children:(0,q.jsx)(A,{scope:b,contentId:r,open:B,stateAttribute:D,trigger:n,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayedRef.current?G():E()},[l.isOpenDelayedRef,G,E]),onTriggerLeave:d.useCallback(()=>{u?F():(window.clearTimeout(s.current),s.current=0)},[F,u]),onOpen:E,onClose:F,disableHoverableContent:u,children:c})})};C.displayName=z;var D="TooltipTrigger",E=d.forwardRef((a,b)=>{let{__scopeTooltip:c,...g}=a,h=B(D,c),i=x(D,c),k=t(c),l=d.useRef(null),n=(0,f.s)(b,l,h.onTriggerChange),o=d.useRef(!1),p=d.useRef(!1),r=d.useCallback(()=>o.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",r),[r]),(0,q.jsx)(j.Mz,{asChild:!0,...k,children:(0,q.jsx)(m.sG.button,{"aria-describedby":h.open?h.contentId:void 0,"data-state":h.stateAttribute,...g,ref:n,onPointerMove:(0,e.mK)(a.onPointerMove,a=>{"touch"!==a.pointerType&&(p.current||i.isPointerInTransitRef.current||(h.onTriggerEnter(),p.current=!0))}),onPointerLeave:(0,e.mK)(a.onPointerLeave,()=>{h.onTriggerLeave(),p.current=!1}),onPointerDown:(0,e.mK)(a.onPointerDown,()=>{h.open&&h.onClose(),o.current=!0,document.addEventListener("pointerup",r,{once:!0})}),onFocus:(0,e.mK)(a.onFocus,()=>{o.current||h.onOpen()}),onBlur:(0,e.mK)(a.onBlur,h.onClose),onClick:(0,e.mK)(a.onClick,h.onClose)})})});E.displayName=D;var F="TooltipPortal",[G,H]=r(F,{forceMount:void 0}),I=a=>{let{__scopeTooltip:b,forceMount:c,children:d,container:e}=a,f=B(F,b);return(0,q.jsx)(G,{scope:b,forceMount:c,children:(0,q.jsx)(l.C,{present:c||f.open,children:(0,q.jsx)(k.Portal,{asChild:!0,container:e,children:d})})})};I.displayName=F;var J="TooltipContent",K=d.forwardRef((a,b)=>{let c=H(J,a.__scopeTooltip),{forceMount:d=c.forceMount,side:e="top",...f}=a,g=B(J,a.__scopeTooltip);return(0,q.jsx)(l.C,{present:d||g.open,children:g.disableHoverableContent?(0,q.jsx)(P,{side:e,...f,ref:b}):(0,q.jsx)(L,{side:e,...f,ref:b})})}),L=d.forwardRef((a,b)=>{let c=B(J,a.__scopeTooltip),e=x(J,a.__scopeTooltip),g=d.useRef(null),h=(0,f.s)(b,g),[i,j]=d.useState(null),{trigger:k,onClose:l}=c,m=g.current,{onPointerInTransitChange:n}=e,o=d.useCallback(()=>{j(null),n(!1)},[n]),p=d.useCallback((a,b)=>{let c=a.currentTarget,d={x:a.clientX,y:a.clientY},e=function(a,b){let c=Math.abs(b.top-a.y),d=Math.abs(b.bottom-a.y),e=Math.abs(b.right-a.x),f=Math.abs(b.left-a.x);switch(Math.min(c,d,e,f)){case f:return"left";case e:return"right";case c:return"top";case d:return"bottom";default:throw Error("unreachable")}}(d,c.getBoundingClientRect());j(function(a){let b=a.slice();return b.sort((a,b)=>a.x<b.x?-1:a.x>b.x?1:a.y<b.y?-1:1*!!(a.y>b.y)),function(a){if(a.length<=1)return a.slice();let b=[];for(let c=0;c<a.length;c++){let d=a[c];for(;b.length>=2;){let a=b[b.length-1],c=b[b.length-2];if((a.x-c.x)*(d.y-c.y)>=(a.y-c.y)*(d.x-c.x))b.pop();else break}b.push(d)}b.pop();let c=[];for(let b=a.length-1;b>=0;b--){let d=a[b];for(;c.length>=2;){let a=c[c.length-1],b=c[c.length-2];if((a.x-b.x)*(d.y-b.y)>=(a.y-b.y)*(d.x-b.x))c.pop();else break}c.push(d)}return(c.pop(),1===b.length&&1===c.length&&b[0].x===c[0].x&&b[0].y===c[0].y)?b:b.concat(c)}(b)}([...function(a,b,c=5){let d=[];switch(b){case"top":d.push({x:a.x-c,y:a.y+c},{x:a.x+c,y:a.y+c});break;case"bottom":d.push({x:a.x-c,y:a.y-c},{x:a.x+c,y:a.y-c});break;case"left":d.push({x:a.x+c,y:a.y-c},{x:a.x+c,y:a.y+c});break;case"right":d.push({x:a.x-c,y:a.y-c},{x:a.x-c,y:a.y+c})}return d}(d,e),...function(a){let{top:b,right:c,bottom:d,left:e}=a;return[{x:e,y:b},{x:c,y:b},{x:c,y:d},{x:e,y:d}]}(b.getBoundingClientRect())])),n(!0)},[n]);return d.useEffect(()=>()=>o(),[o]),d.useEffect(()=>{if(k&&m){let a=a=>p(a,m),b=a=>p(a,k);return k.addEventListener("pointerleave",a),m.addEventListener("pointerleave",b),()=>{k.removeEventListener("pointerleave",a),m.removeEventListener("pointerleave",b)}}},[k,m,p,o]),d.useEffect(()=>{if(i){let a=a=>{let b=a.target,c={x:a.clientX,y:a.clientY},d=k?.contains(b)||m?.contains(b),e=!function(a,b){let{x:c,y:d}=a,e=!1;for(let a=0,f=b.length-1;a<b.length;f=a++){let g=b[a],h=b[f],i=g.x,j=g.y,k=h.x,l=h.y;j>d!=l>d&&c<(k-i)*(d-j)/(l-j)+i&&(e=!e)}return e}(c,i);d?o():e&&(o(),l())};return document.addEventListener("pointermove",a),()=>document.removeEventListener("pointermove",a)}},[k,m,i,l,o]),(0,q.jsx)(P,{...a,ref:h})}),[M,N]=r(z,{isInside:!1}),O=(0,n.Dc)("TooltipContent"),P=d.forwardRef((a,b)=>{let{__scopeTooltip:c,children:e,"aria-label":f,onEscapeKeyDown:g,onPointerDownOutside:i,...k}=a,l=B(J,c),m=t(c),{onClose:n}=l;return d.useEffect(()=>(document.addEventListener(v,n),()=>document.removeEventListener(v,n)),[n]),d.useEffect(()=>{if(l.trigger){let a=a=>{let b=a.target;b?.contains(l.trigger)&&n()};return window.addEventListener("scroll",a,{capture:!0}),()=>window.removeEventListener("scroll",a,{capture:!0})}},[l.trigger,n]),(0,q.jsx)(h.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:g,onPointerDownOutside:i,onFocusOutside:a=>a.preventDefault(),onDismiss:n,children:(0,q.jsxs)(j.UC,{"data-state":l.stateAttribute,...m,...k,ref:b,style:{...k.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,q.jsx)(O,{children:e}),(0,q.jsx)(M,{scope:c,isInside:!0,children:(0,q.jsx)(p.bL,{id:l.contentId,role:"tooltip",children:f||e})})]})})});K.displayName=J;var Q="TooltipArrow",R=d.forwardRef((a,b)=>{let{__scopeTooltip:c,...d}=a,e=t(c);return N(Q,c).isInside?null:(0,q.jsx)(j.i3,{...e,...d,ref:b})});R.displayName=Q;var S=y,T=C,U=E,V=I,W=K,X=R}};