@chorus-aidlc/chorus 0.13.1 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +321 -320
  3. package/.next/standalone/.next/app-path-routes-manifest.json +37 -37
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +27 -27
  6. package/.next/standalone/.next/react-loadable-manifest.json +2 -2
  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 +1 -1
  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 +2 -2
  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 +1 -1
  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.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  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 +1 -1
  41. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  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 +1 -1
  45. package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
  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 +1 -1
  48. package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
  49. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/admin.html +1 -1
  51. package/.next/standalone/.next/server/app/admin.rsc +2 -2
  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.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  60. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  74. package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
  82. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
  85. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
  89. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  92. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
  98. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
  101. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
  102. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
  104. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
  105. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
  107. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
  108. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
  111. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/events/notifications/route.js +1 -1
  114. package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
  115. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/events/route.js +1 -1
  117. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  118. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  121. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  122. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  124. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  125. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  126. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  127. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  128. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  130. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
  131. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  132. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  133. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  134. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  136. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  137. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -1
  139. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js.nft.json +1 -1
  140. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/mcp/route.js +2 -2
  142. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  143. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  145. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  148. package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
  149. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  151. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
  152. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  154. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
  155. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  156. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  157. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
  158. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  159. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  160. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
  161. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  162. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  163. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  164. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  165. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  166. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
  167. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  168. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  169. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  171. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  172. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  173. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  174. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  175. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  176. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  177. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  178. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  179. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  180. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  181. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  182. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  183. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  184. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  185. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  186. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -1
  187. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -1
  188. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  189. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  190. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  191. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  192. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
  193. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  194. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  195. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  198. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  199. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  200. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  201. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  202. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  203. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  204. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  205. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  206. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  208. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  209. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
  210. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  211. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  212. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
  213. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  214. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  215. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
  216. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  217. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  218. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
  219. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  220. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  221. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
  222. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  223. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  224. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
  225. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  226. package/.next/standalone/.next/server/app/index.html +1 -1
  227. package/.next/standalone/.next/server/app/index.rsc +2 -2
  228. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  229. package/.next/standalone/.next/server/app/login/admin.html +1 -1
  230. package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
  231. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  232. package/.next/standalone/.next/server/app/login/callback.html +1 -1
  233. package/.next/standalone/.next/server/app/login/callback.rsc +2 -2
  234. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  235. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  236. package/.next/standalone/.next/server/app/login/pick-workspace.html +1 -1
  237. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
  238. package/.next/standalone/.next/server/app/login.html +1 -1
  239. package/.next/standalone/.next/server/app/login.rsc +2 -2
  240. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  241. package/.next/standalone/.next/server/app/onboarding.html +1 -1
  242. package/.next/standalone/.next/server/app/onboarding.rsc +2 -2
  243. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  244. package/.next/standalone/.next/server/app/projects.html +1 -1
  245. package/.next/standalone/.next/server/app/projects.rsc +2 -2
  246. package/.next/standalone/.next/server/app/settings.html +1 -1
  247. package/.next/standalone/.next/server/app/settings.rsc +2 -2
  248. package/.next/standalone/.next/server/app-paths-manifest.json +37 -37
  249. package/.next/standalone/.next/server/chunks/1463.js +1 -0
  250. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  251. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  252. package/.next/standalone/.next/server/chunks/3219.js +1 -1
  253. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  254. package/.next/standalone/.next/server/chunks/5011.js +1 -0
  255. package/.next/standalone/.next/server/chunks/5631.js +1 -0
  256. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  257. package/.next/standalone/.next/server/chunks/6817.js +1 -1
  258. package/.next/standalone/.next/server/chunks/7160.js +1 -1
  259. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  260. package/.next/standalone/.next/server/chunks/7578.js +1 -1
  261. package/.next/standalone/.next/server/chunks/8448.js +1 -1
  262. package/.next/standalone/.next/server/chunks/8577.js +1 -1
  263. package/.next/standalone/.next/server/chunks/920.js +1 -1
  264. package/.next/standalone/.next/server/chunks/{5095.js → 9855.js} +2 -2
  265. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  266. package/.next/standalone/.next/server/middleware-manifest.json +1 -1
  267. package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  268. package/.next/standalone/.next/server/pages/404.html +1 -1
  269. package/.next/standalone/.next/server/pages/500.html +1 -1
  270. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  271. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  272. package/.next/standalone/.next/static/chunks/225-7b0507c29df705f1.js +1 -0
  273. package/.next/standalone/.next/static/chunks/38366.62260b57e5f4b09d.js +1 -0
  274. package/.next/standalone/.next/static/chunks/{4860.7844c573cb3914f3.js → 4860.18e9c1a01636e309.js} +1 -1
  275. package/.next/standalone/.next/static/chunks/63820-551bca4e19d0119c.js +1 -0
  276. package/.next/standalone/.next/static/chunks/{80350-8ac8d602965bb4df.js → 80350-20c953d484f262ff.js} +1 -1
  277. package/.next/standalone/.next/static/chunks/96752-ad15cc38599f12e2.js +1 -0
  278. package/.next/standalone/.next/static/chunks/{99373.6f0ec031fb759d88.js → 99373.c4a36dcd46ec841e.js} +1 -1
  279. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-b2db3da2d7945904.js +1 -0
  280. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-b3b2b2ba3d60893e.js +1 -0
  281. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/{page-9f0ebba7e855b2f9.js → page-0aff1fa7a814188c.js} +1 -1
  282. package/.next/standalone/.next/static/chunks/{webpack-fe12dfe2e0d0e4f3.js → webpack-3551a4c7f9bfe638.js} +1 -1
  283. package/.next/standalone/.next/static/css/a80bf83b9122bfc5.css +1 -0
  284. package/.next/standalone/package.json +1 -1
  285. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  286. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  287. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +1 -1
  288. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +1 -1
  289. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +9 -1
  290. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
  291. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +3 -1
  292. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  293. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  294. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +1 -1
  295. package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +1 -1
  296. package/.next/standalone/public/skill/chorus/SKILL.md +1 -1
  297. package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -1
  298. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  299. package/.next/standalone/public/skill/idea-chorus/SKILL.md +9 -1
  300. package/.next/standalone/public/skill/proposal-chorus/SKILL.md +3 -1
  301. package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +1 -1
  302. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  303. package/.next/standalone/public/skill/review-chorus/SKILL.md +1 -1
  304. package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +1 -1
  305. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +1 -1
  306. package/package.json +1 -1
  307. package/prisma/migrations/20260707104706_add_idea_is_container/migration.sql +2 -0
  308. package/prisma/schema.prisma +1 -0
  309. package/.next/standalone/.next/server/chunks/1114.js +0 -1
  310. package/.next/standalone/.next/server/chunks/8497.js +0 -1
  311. package/.next/standalone/.next/server/chunks/8895.js +0 -1
  312. package/.next/standalone/.next/static/chunks/225-8a41a800021f3d11.js +0 -1
  313. package/.next/standalone/.next/static/chunks/58262-395c00e04f610a32.js +0 -1
  314. package/.next/standalone/.next/static/chunks/78966.075119c3a72135ed.js +0 -1
  315. package/.next/standalone/.next/static/chunks/94528-ed3f03485480f5e5.js +0 -1
  316. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-f72f17eb58614d2b.js +0 -1
  317. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-3238e0b5474c60f6.js +0 -1
  318. package/.next/standalone/.next/static/css/3f3ae2bdc9e55259.css +0 -1
  319. /package/.next/standalone/.next/static/{eORNzMShbzkJbNfQT8MbW → CIg9Mtv4fKIeKqPY5Rczv}/_buildManifest.js +0 -0
  320. /package/.next/standalone/.next/static/{eORNzMShbzkJbNfQT8MbW → CIg9Mtv4fKIeKqPY5Rczv}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=6817,exports.ids=[6817],exports.modules={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(75785),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-[#D9D9D9]"}),(0,d.jsx)("p",{className:"text-sm text-[#9A9A9A]",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] px-3 py-2",children:[(0,d.jsx)("span",{className:"text-[12px] text-[#6B6B6B]",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-[#D9D9D9]",children:"\xb7"}),(0,d.jsx)("span",{className:"text-[12px] text-[#6B6B6B]",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-[#C67A52] 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-[#9A9A9A]"}):(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 text-[#9A9A9A]"}),(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-[#2C2C2C]",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-[#9A9A9A] 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-[#F5F2EC] transition-colors group cursor-pointer",children:[(0,d.jsx)(j.A,{className:"h-3.5 w-3.5 text-[#D9D9D9] shrink-0 group-hover:text-[#C67A52]"}),(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-[#2C2C2C] truncate group-hover:text-[#C67A52]",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] px-1.5 py-0.5 text-[10px] text-[#6B6B6B]",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-[#9A9A9A] 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] text-[#2E7D32] 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-[#F5F2EC] 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-white text-[#2C2C2C] shadow-sm":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,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-[#F5F2EC] text-[#6B6B6B] 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-white text-[#2C2C2C] shadow-sm":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,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)}})},18604:(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)("60946d7963b917a5c70ca1925c0ea530fe03822d36",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-[#C67A52]"})}):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-[#9A9A9A]",children:p("reportsList")}),(0,d.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",children:r.length}),(0,d.jsxs)("span",{className:"text-[11px] text-[#B4B2A9]",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-[#FAF8F4] 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-[#B4B2A9]"}),(0,d.jsx)(i.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-[#E5E0D8] text-[#6B6B6B] bg-[#F5F2EC] 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-[#2C2C2A] truncate",children:a.title})]},a.uuid))})]})}},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"}]])},22730:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{"00c772b5aff2cf3f90a5f083965e9d6df07f80e8e1":()=>q.UD,"00f7c7be986f02df52fc7f298a5d11487996f96bd9":()=>g.s$,"00fba500eed02e44121df95d876c8b3bdb8ea4f5a2":()=>k.vq,"400210e680c0385808d5385787cc3ac10feeed09b5":()=>o.xo,"402c1162f2756b401c752e800868f5009dca55e118":()=>e.Dv,"402e59d794de5f3573bef27df72147db717532e95e":()=>h.h,"40362b84dfc5edec2c6fa45a8eaf2295fb171f478c":()=>m.f,"403c187156b935707126942a1f5a3dd7dc7f60349d":()=>h.J,"403d93e05fa422707289c693cf88aaff9cd4991606":()=>k.p2,"4040f002467cca317c082889a14041485f531d95ef":()=>g.cq,"4047a90ef603a47130bdb4ef5104e862199b20d3eb":()=>g.zS,"404a967ebaaf755d7f837a5e0d7e1e6da7c0a2855c":()=>q.qN,"40597e0cfc3490e798417315b55984bd3e79d7f4e3":()=>p.zK,"405a9219aa7f1c0d6ca0604f203815504f183ace7a":()=>i.x,"4072f6cf798707938be0c83205c596e0cdf0872a3d":()=>o.kq,"4074ff7c5e2c73a30a96027da366014a65054249da":()=>k.A0,"408faa5a18709abba6da9d06edf47191aaa0d8c35e":()=>k.G3,"4093e77ed8fd3fcd2a8201ab872a3e9e0b9b22f5b3":()=>q.G3,"409497599266cc70b8b9249fe47a4e75bffc2d39c3":()=>r.g,"409988e8157685bc7c494414b0472344a25164d0f2":()=>k.iY,"40a0761569176dd76901d7911d41b4696e54c30bbb":()=>n.F,"40a762e8050c2f89bbe72ab597cd3abc85cf8d3382":()=>f.e1,"40ad9bf6d6d2ae15b3672975c6a815846634ecf091":()=>r.E,"40b41b5973ff2a1749f90958ecab90d5f5c39ccf9a":()=>k.hR,"40b5d7e5035fbc37f475a6562d91f608fba2b0b3bf":()=>e.v5,"40bf94f62ce0ce8184a8c8659a8cf5c81cb64708e8":()=>g.Qd,"40cf506cf01fef64f43274bc5ec5a325dc7b79444c":()=>k.Yw,"40d7f1b96f25caeeac639a97997e23358aaba9bcce":()=>p.w$,"40dea3a5d82afa8a50d325d86aeffd2c101d45343f":()=>g.d1,"40e0356507f636560a182a0005ea4bf41f9f1e6f3a":()=>f.zS,"40ef8af3880fdaea6bec6a0c76ae6efec18fb3ab38":()=>q.ZL,"40f79d0065c816837e1a02cfef1e5727ee949e4aa4":()=>p.JQ,"60307e36e126c6350305fb06e590dec1e76d7a5187":()=>o.TK,"60325e231a9b937eafba7179189e176caf898f76b0":()=>l.IY,"603a62c3cf062be8b65f238555959aed28e43a3d03":()=>p.Z$,"603b115990769f6137fa59f6afbd0b45fee72e0759":()=>l.hD,"604dbb7d927c4a1ab6a0ba92db17015c4e692e0181":()=>k.y9,"6052d9883918dd9baa074736be4368f6d77908c2a6":()=>g.UN,"606347076f72433d83088fa304ea5b8936197847dc":()=>g.WD,"606b1f0d986a6521b23803750b8f87b23ca5026e65":()=>o.wG,"60784bcfab5cd3c38288518ffa62fdf7fb46447bae":()=>l.Nq,"607cb28777a50e3330c87fd4dea612ea333c237e29":()=>k.bd,"6089586267d4b35b237850f70cde838b5ea3271fa5":()=>k.TV,"60946d7963b917a5c70ca1925c0ea530fe03822d36":()=>g.U$,"60abec303b08acb427946055f356bc1caa0bb39623":()=>g.co,"60b6cc9baa0c55a4f28544dd1ee3ad0097d7d67a6a":()=>q.M$,"60cae37f9e08398933bd8b397bc5f8219b1e9d37f5":()=>g.nR,"60d4bd3862ef552da3de66c9983d52afb9d67450e6":()=>e.Tg,"60de55b3ebd55d12db6a501490cfc2ad1748618995":()=>g.wm,"60e751d24b0d64a89c0040779bed094e66b1b377e5":()=>f.yu,"7065db1a3d9ab461e098d54c1d955f64ef4a8976ff":()=>k.qb,"708bff042cdb93ab9aaa60f3c9c2a61f5a167b0f15":()=>q.Ax,"70d59c3a50f38dff0368815ae7719a2db6f6dd8c24":()=>j.s,"70e12e3baa87d7b6ed51ea8e0112f20c9229f18209":()=>f.em,"70f79630de8f0585d1649d0c0b1e05094ccfa65d38":()=>j.d});var e=c(22299),f=c(22110),g=c(57644),h=c(81751),i=c(80041),j=c(98581),k=c(73393),l=c(71353),m=c(64029),n=c(72189),o=c(22293),p=c(31138),q=c(23157),r=c(91117),s=a([e,f,g,h,i,j,k,l,m,n,o,p,q,r]);[e,f,g,h,i,j,k,l,m,n,o,p,q,r]=s.then?(await s)():s,d()}catch(a){d(a)}})},32382:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>ab});var e=c(10837),f=c(21968),g=c(9222),h=c(1007),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(97443),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(6019),A=c(99127),B=c(76172),C=c(84722),D=c(64370),E=c(77523),F=c(18604),G=c(9190),H=c(17068),I=c(86104),J=c(98310),K=c(49262),L=c(41926),M=c(44963),N=c(82552),O=c(63231),P=c(34246),Q=c(3461),R=c(42708),S=c(73797),T=c(42479),U=c(43307),V=c(57535),W=c(26402),X=c(5527),Y=c(37004),Z=c(54722),$=c(76664),_=c(77521),aa=a([C,D,H,I,J,M]);function ab({ideaUuid:a,projectUuid:b,currentUserUuid:c,onClose:d,onNavigate:aa}){let ab=(0,g.c)(),ac=(0,g.c)("ideaTracker"),ad=(0,g.c)("status"),ae=(0,g.c)("ideaTracker.lineage"),af=(0,h.useRouter)(),[ag,ah]=(0,f.useState)(null),[ai,aj]=(0,f.useState)(!0),[ak,al]=(0,f.useState)(null),[am,an]=(0,f.useState)([]),[ao,ap]=(0,f.useState)([]),[aq,ar]=(0,f.useState)("overview"),[as,at]=(0,f.useState)(new Set(["overview"])),[au,av]=(0,f.useState)(!1),[aw,ax]=(0,f.useState)(0),[ay,az]=(0,f.useState)(!1),[aA,aB]=(0,f.useState)(!1),[aC,aD]=(0,f.useState)(null),[aE,aF]=(0,f.useState)(!0),[aG,aH]=(0,f.useState)(!1),[aI,aJ]=(0,f.useState)(null),[aK,aL]=(0,f.useState)(!1),[aM,aN]=(0,f.useState)(!1),[aO,aP]=(0,f.useState)(""),[aQ,aR]=(0,f.useState)(""),[aS,aT]=(0,f.useState)(!1),[aU,aV]=(0,f.useState)(null),[aW,aX]=(0,f.useState)(!1),[aY,aZ]=(0,f.useState)(!1),[a$,a_]=(0,f.useState)(!1),[a0,a1]=(0,f.useState)(null),[a2,a3]=(0,f.useState)(null),[a4,a5]=(0,f.useState)(null),a6=(0,f.useCallback)(a=>{a5(null),a1(a)},[]),a7=(0,f.useCallback)(a=>{a1(null),a3(null),a5(a)},[]),[a8,a9]=(0,f.useState)(!1),[ba,bb]=(0,f.useState)(!1),bc=(0,f.useCallback)(a=>{let b=new URLSearchParams(window.location.search);b.set("tab",a),window.history.replaceState(null,"",`${window.location.pathname}?${b.toString()}`)},[]),bd=(0,f.useCallback)(async()=>{try{let b=await (0,P.c)(a);b.success?(ah(b.data),al(null)):al(ac("Not found"===b.error?"panel.notFound":"panel.loadFailed"))}catch{al(ac("panel.loadFailed"))}finally{aj(!1)}},[a,ac]);(0,B.eV)("idea",bd),(0,B.eV)("proposal",bd),(0,B.eV)("task",bd);let be=ag?.uuid,bf=ag?.status,bg=(0,f.useCallback)(async()=>{if(!be||"open"===bf)return void an([]);try{let a=await (0,Q.U)(b,be);a.success&&an(a.data)}catch(a){Z.q.error("Failed to fetch proposals:",a)}},[b,be,bf]);(0,B.eV)("proposal",bg);let bh=(0,f.useCallback)(async()=>{let a=am.filter(a=>"approved"===a.status);if(0===a.length)return void ap([]);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})):[]);ap(c)}catch(a){Z.q.error("Failed to fetch tasks:",a)}},[b,am]);(0,B.eV)("task",bh);let bi=(0,f.useCallback)(async()=>{if(!be)return;let a=await (0,T.z)(be);a.success&&a.data&&aD(a.data),aF(!1)},[be]);(0,B.eV)("idea",bi);let bj=(0,f.useMemo)(()=>ag?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,am,ao):["overview","activity"],[ag,am,ao]);(0,f.useRef)(null),ag&&ag.badgeHint;let bk=(0,f.useMemo)(()=>ao.filter(a=>"in_progress"===a.status||"assigned"===a.status||"to_verify"===a.status).length,[ao]),bl=(0,f.useCallback)(()=>{if(!a0)return void a3(null);(0,S.Q)(a0).then(a=>{a.success&&a3(a.data)}).catch(a=>Z.q.error("Failed to load task details:",a))},[a0]);(0,B.eV)("task",bl);let bm=()=>{aN(!1),aP(ag?.title||""),aR(ag?.content||""),aV(null)},bn=async()=>{if(!ag||!aO.trim())return void aV(ab("ideas.titleRequired"));aT(!0),aV(null);let a=await (0,N.J)({ideaUuid:ag.uuid,projectUuid:b,title:aO.trim(),content:aQ.trim()||null});aT(!1),a.success?(aN(!1),await bd(),af.refresh()):aV(a.error||ab("ideas.updateFailed"))},bo=async()=>{if(!ag)return;aB(!0);let a=await (0,O.Z)(ag.uuid,b);aB(!1),a.success&&(d(),af.refresh())},bp=async()=>{if(!ag)return;aH(!0),aJ(null);let a=await (0,U.e)(ag.uuid);aH(!1),a.success?(aL(!0),await bd(),af.refresh()):aJ(a.error||ab("elaboration.verifyFailed"))},bq=ag?.derivedStatus||"todo",br=!!ag&&"elaborated"!==ag.status,bs=(0,W.o)({ideaStatus:ag?.status,elaborationStatus:ag?.elaborationStatus,elaboration:aC});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 bg-white shadow-xl border-l border-[#E5E0D8] ${ba?"":"animate-in slide-in-from-right duration-300"}`,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-[#F5F2EC] px-6 py-5",children:[(0,e.jsx)("div",{className:"flex-1 min-w-0",children:ai?(0,e.jsx)("div",{className:"h-5 w-40 animate-pulse rounded bg-[#F5F2EC]"}):ag?aM?(0,e.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C]",children:ab("ideas.editIdea")}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C] truncate",children:ag.title}),(0,e.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,e.jsx)(v.E,{className:_._5[bq]||_._5.todo,children:ag.badgeHint?ac(`badge.${_.Wl[ag.badgeHint]||"open"}`):ad(_.Bj[bq]||"todo")}),(0,e.jsx)("span",{className:"text-xs text-[#9A9A9A]",children:(0,$.r)(ag.createdAt)})]})]}):(0,e.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C]",children:ac("panel.notFound")})}),(0,e.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[ag&&!aM&&(0,e.jsxs)(t.$,{variant:"outline",size:"sm",className:"h-8 gap-1.5 border-[#E5E0D8] px-2.5",onClick:()=>a_(!0),title:ae("deriveIdea"),"aria-label":ae("deriveIdea"),children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-[#C67A52]"}),(0,e.jsx)("span",{className:"text-[12px] font-medium text-[#C67A52]",children:ae("derive")})]}),ag&&!aM&&(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-[#E5E0D8]",onClick:()=>aX(!0),title:ab("ideas.actions.move"),"aria-label":ab("ideas.actions.move"),children:(0,e.jsx)(k.A,{className:"h-4 w-4 text-[#6B6B6B]"})}),ag&&"elaborated"!==ag.status&&!aM&&(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-[#E5E0D8]",onClick:()=>{ag&&(aP(ag.title),aR(ag.content||""),aV(null),aN(!0))},title:ab("ideas.editIdea"),children:(0,e.jsx)(l.A,{className:"h-4 w-4 text-[#6B6B6B]"})}),(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-[#E5E0D8]",onClick:aM?bm:d,children:(0,e.jsx)(m.A,{className:"h-4 w-4 text-[#6B6B6B]"})})]})]}),ag&&!ai&&!aM&&(0,e.jsx)("div",{className:"border-b border-[#F5F2EC] px-6",children:(0,e.jsx)("div",{className:"flex gap-0 -mb-px",children:bj.map(a=>(0,e.jsxs)("button",{onClick:()=>{ar(a),av(!0),at(b=>new Set([...b,a])),bc(a)},className:`relative flex items-center gap-1.5 px-3 py-2.5 text-[13px] font-medium transition-colors cursor-pointer ${aq===a?"text-[#C67A52] border-b-2 border-[#C67A52]":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,children:[ac(`panel.tabs.${a}`),"tasks"===a&&bk>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-[#E3F2FD] text-[#1976D2] text-[10px] font-semibold leading-none",children:bk}),"activity"===a&&aw>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-[#F5F2EC] text-[#6B6B6B] text-[10px] font-semibold leading-none",children:aw})]},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:ai?(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-[#C67A52]"}),(0,e.jsx)("span",{className:"ml-2 text-sm text-[#9A9A9A]",children:ac("loading")})]}):ak?(0,e.jsx)("div",{className:"flex flex-1 items-center justify-center py-12",children:(0,e.jsx)("p",{className:"text-sm text-[#9A9A9A]",children:ak})}):ag?aM?(0,e.jsxs)("div",{className:"space-y-5",children:[aU&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:aU}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(y.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-[#2C2C2C]",children:ab("ideas.titleLabel")}),(0,e.jsx)(w.p,{id:"edit-title",value:aO,onChange:a=>aP(a.target.value),className:"border-[#E5E0D8] text-sm focus-visible:ring-[#C67A52]",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-[#2C2C2C]",children:ab("common.content")}),(0,e.jsx)(x.T,{id:"edit-content",value:aQ,onChange:a=>aR(a.target.value),rows:8,className:"border-[#E5E0D8] text-sm resize-none focus-visible:ring-[#C67A52]"})]})]}):(0,e.jsxs)(e.Fragment,{children:[as.has("overview")&&(0,e.jsxs)("div",{style:{display:"overview"===aq?"block":"none"},children:[(0,e.jsx)(E.p,{idea:ag,proposals:am,tasks:ao,onSelectTask:a6}),(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-[#C67A52]"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-[#5F5E5A]",children:ae("title")})]}),(0,e.jsxs)(t.$,{variant:"outline",size:"sm",className:"h-7 gap-1 border-[#E5E0D8] px-2 text-[11px] text-[#6B6B6B]",onClick:()=>aZ(!0),children:[(0,e.jsx)(l.A,{className:"h-3 w-3"}),ag.parentUuid?ae("changeParent"):ae("setParent")]})]}),ag.parent?(0,e.jsxs)("button",{type:"button",onClick:()=>aa?.(ag.parent.uuid),className:"flex w-full items-center gap-2 rounded-lg bg-[#FAF8F4] px-3 py-2.5 text-left transition-colors hover:bg-[#F5F2EC]",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 shrink-0 text-[#888780]"}),(0,e.jsx)("span",{className:"shrink-0 text-[12px] text-[#888780]",children:ae("derivedFrom")}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium text-[#5F5E5A]",children:ag.parent.title})]}):(0,e.jsx)("p",{className:"px-1 text-[12px] text-[#A8A498]",children:ae("noParent")}),ag.children&&ag.children.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5 px-1 pt-1",children:[(0,e.jsx)("span",{className:"text-[12px] font-medium text-[#5F5E5A]",children:ae("derivedIdeas")}),(0,e.jsx)("span",{className:"text-[11px] text-[#888780]",children:ag.children.length})]}),(0,e.jsx)("div",{className:"overflow-hidden rounded-lg border border-[#EFEBE3]",children:ag.children.map((a,b)=>(0,e.jsxs)("div",{children:[b>0&&(0,e.jsx)("div",{className:"h-px bg-[#F0EEEA]"}),(0,e.jsxs)("button",{type:"button",onClick:()=>aa?.(a.uuid),className:"flex w-full items-center justify-between gap-2 px-3 py-2.5 text-left transition-colors hover:bg-[#FAF8F4]",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-[#C2BDB2]"}),(0,e.jsx)("span",{className:"truncate text-[12px] text-[#2C2C2A]",children:a.title})]}),(0,e.jsx)(v.E,{className:`shrink-0 border-0 text-[10px] ${_._5[a.derivedStatus]||_._5.todo}`,children:ad(_.Bj[a.derivedStatus]||"todo")})]})]},a.uuid))})]})]}),(0,e.jsx)(F.U,{projectUuid:b,ideaUuid:ag.uuid,proposals:am,onDocClick:a7})]}),bj.includes("elaboration")&&as.has("elaboration")&&(0,e.jsx)("div",{style:{display:"elaboration"===aq?"block":"none"},children:(0,e.jsx)(C.G,{idea:ag,elaboration:aC,isLoading:aE,onRefresh:async()=>{await bi(),await bd()}})}),bj.includes("proposal")&&as.has("proposal")&&(0,e.jsx)("div",{style:{display:"proposal"===aq?"block":"none"},children:(0,e.jsx)(D.k,{idea:ag,projectUuid:b,onTaskClick:a6,onDocClick:a7,initialProposals:am})}),bj.includes("tasks")&&as.has("tasks")&&(0,e.jsx)("div",{style:{display:"tasks"===aq?"block":"none"},children:(0,e.jsx)(G.n,{tasks:ao,projectUuid:b,proposalUuids:am.filter(a=>"approved"===a.status).map(a=>a.uuid),onSelectTask:a6})}),as.has("activity")&&(0,e.jsx)("div",{style:{display:"activity"===aq?"block":"none"},children:(0,e.jsx)(H.x,{ideaUuid:ag.uuid,currentUserUuid:c,commentCount:aw,onCommentCountChange:ax})})]}):null})}),ag&&!ai&&(0,e.jsx)("div",{className:"border-t border-[#F5F2EC] px-6 py-4",children:aM?(0,e.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[(0,e.jsx)(t.$,{variant:"outline",className:"border-[#E5E0D8]",onClick:bm,disabled:aS,children:ab("common.cancel")}),(0,e.jsx)(t.$,{className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",onClick:bn,disabled:aS||!aO.trim(),children:aS?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ab("common.save")]}):ab("common.save")})]}):(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[br&&(0,e.jsx)(A.Bc,{delayDuration:300,children:(0,e.jsxs)(A.m_,{children:[(0,e.jsx)(A.k$,{asChild:!0,children:(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"shrink-0 h-8 w-8 border-[#E5E0D8]",onClick:()=>az(!0),"aria-label":ag.assignee?ab("common.reassign"):ab("common.assign"),children:(0,e.jsx)(q.A,{className:"h-4 w-4"})})}),(0,e.jsx)(A.ZI,{children:ag.assignee?ab("common.reassign"):ab("common.assign")})]})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0 flex flex-wrap items-center gap-2",children:[bs&&!aK&&(0,e.jsx)(t.$,{className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",onClick:bp,disabled:aG,children:aG?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ab("elaboration.verifying")]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(r.A,{className:"mr-2 h-4 w-4"}),ab("elaboration.verifyButton")]})}),aK&&(0,e.jsx)("span",{className:"text-[11px] text-[#00796B]",children:ab("elaboration.verifiedQueuedHint")}),aI&&(0,e.jsx)("span",{className:"text-[11px] text-destructive",children:aI}),(0,e.jsx)(X.w,{ideaUuid:ag.uuid,assignee:ag.assignee,proposals:am,tasks:ao,onStarted:()=>{bd()}}),(0,e.jsx)(Y.s,{ideaUuid:ag.uuid,assignee:ag.assignee,proposals:am,tasks:ao,onStarted:()=>{bd()}})]}),(0,e.jsxs)(z.Lt,{children:[(0,e.jsx)(z.tv,{asChild:!0,children:(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"shrink-0 h-8 w-8 border-[#E5E0D8] text-[#EF4444] hover:bg-[#FFEBEE] hover:text-[#EF4444] hover:border-[#EF4444]",children:(0,e.jsx)(s.A,{className:"h-4 w-4"})})}),(0,e.jsxs)(z.EO,{children:[(0,e.jsxs)(z.wd,{children:[(0,e.jsx)(z.r7,{children:ab("ideas.deleteIdea")}),(0,e.jsx)(z.$v,{children:ab("ideas.deleteIdeaConfirm",{title:ag.title})})]}),(0,e.jsxs)(z.ck,{children:[(0,e.jsx)(z.Zr,{children:ab("common.cancel")}),(0,e.jsx)(z.Rx,{variant:"destructive",onClick:bo,disabled:aA,children:aA?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ab("common.delete")]}):ab("common.delete")})]})]})]})]})})]}),(0,e.jsx)(K.h,{open:aW,onOpenChange:aX,ideaUuid:a,projectUuid:b,onMoved:()=>d()}),ag&&(0,e.jsx)(L.d,{open:aY,onOpenChange:aZ,ideaUuid:ag.uuid,ideaTitle:ag.title,projectUuid:b,currentParentUuid:ag.parentUuid??null,descendantUuids:ag.descendantUuids??[],onChanged:bd}),ag&&(0,e.jsx)(M.i,{open:a$,onOpenChange:a_,projectUuid:b,parentUuid:ag.uuid,parentTitle:ag.title,onCreated:a=>{i.oR.success(ae("deriveIdea")),af.refresh(),aa?.(a)}}),ay&&ag&&(0,e.jsx)(V.i,{idea:{uuid:ag.uuid,title:ag.title,content:ag.content,status:ag.status,assignee:ag.assignee?{type:ag.assignee.type,uuid:ag.assignee.uuid,name:ag.assignee.name}:null},projectUuid:b,currentUserUuid:c,onClose:()=>{az(!1),bd()}}),a0&&a2&&(0,e.jsx)(I.v,{task:a2,projectUuid:b,currentUserUuid:c,mode:a8?"sidebyside":"overlay",onClose:()=>{a1(null),a3(null)},onBack:()=>{a1(null),a3(null)}}),a4&&(0,e.jsx)(J.K,{title:a4.title,type:a4.type,content:a4.content,mode:a8?"sidebyside":"overlay",onClose:()=>a5(null),onBack:()=>a5(null)})]})}[C,D,H,I,J,M]=aa.then?(await aa)():aa,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"}]])},34246:(a,b,c)=>{c.d(b,{c:()=>e});var d=c(42377);let e=(0,d.createServerReference)("4040f002467cca317c082889a14041485f531d95ef",d.callServer,void 0,d.findSourceMapURL,"getIdeaAction")},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(80717),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-[#9A9A9A]",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-[#9A9A9A]"})}):0===c.length?(0,d.jsx)("p",{className:"text-sm text-[#9A9A9A] 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] bg-white"}),e<c.length-1&&(0,d.jsx)("div",{className:"flex-1 w-px bg-[#E5E0D8] mt-1"})]}),(0,d.jsxs)("div",{className:"flex-1 pb-3",children:[(0,d.jsx)("p",{className:"text-[13px] text-[#2C2C2C]",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-[#9A9A9A]",children:(0,j.fw)(a.createdAt,b)})]})]},a.uuid))})]})}},41926:(a,b,c)=>{c.d(b,{d:()=>t});var d=c(10837),e=c(21968),f=c(9222),g=c(1007),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)("40dea3a5d82afa8a50d325d86aeffd2c101d45343f",p.callServer,void 0,p.findSourceMapURL,"getProjectIdeasForPickerAction"),r=(0,p.createServerReference)("606347076f72433d83088fa304ea5b8936197847dc",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.useRouter)(),[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-[#9A9A9A]"})}):(0,d.jsx)("div",{className:"rounded-md border border-[#E5E0D8]",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-[#C67A52]/10"),children:[(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-[#2C2C2A]",children:a.title}),b&&(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-[11px] font-medium text-[#B0654A]",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] 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]"}),(0,d.jsx)("p",{className:"text-[12px] leading-relaxed text-[#9A5238]",children:x("cycleWarning")})]}),C&&(0,d.jsx)("p",{className:"px-1 text-[12px] text-[#A8A498]",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-[#E5E0D8]",onClick:()=>L(null),disabled:G,children:x("detach")}):(0,d.jsx)("span",{}),(0,d.jsx)(l.$,{variant:"outline",className:"border-[#E5E0D8]",onClick:()=>b(!1),disabled:G,children:y("cancel")})]})]})})}},44963:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{i:()=>t});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(94372),o=c(42087),p=c(93524),q=c(70028),r=c(68797),s=a([r]);function t({open:a,onOpenChange:b,projectUuid:c,onCreated:d,parentUuid:s,parentTitle:t}){let u=(0,g.c)("ideaTracker"),v=(0,g.c)("ideaTracker.lineage"),w=!!s,x=(0,g.c)("common"),[y,z]=(0,f.useState)(""),[A,B]=(0,f.useState)(""),[C,D]=(0,f.useState)(!1),[E,F]=(0,f.useState)(null),G=(0,q.kz)(),H=(G?.connections??[]).some(a=>"online"===a.effectiveStatus),[I,J]=(0,f.useState)("form"),K=w?"form":I,L=async()=>{let a=y.trim();if(a){D(!0),F(null);try{let e=await fetch(`/api/projects/${c}/ideas`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a,content:A.trim()||void 0,...s?{parentUuid:s}:{}})}),f=await e.json();f.success&&f.data?.uuid?(z(""),B(""),b(!1),d?.(f.data.uuid)):F(f.error||u("error.createFailed"))}catch{F(u("error.createFailed"))}finally{D(!1)}}},M=(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:u("newIdea.ideaTitle")}),(0,e.jsx)(k.p,{id:"idea-title",value:y,onChange:a=>z(a.target.value),placeholder:u("newIdea.titlePlaceholder"),autoFocus:!0,onKeyDown:a=>{!(0,o.P)(a)&&"Enter"===a.key&&!a.shiftKey&&y.trim()&&(a.preventDefault(),L())}})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)(m.J,{htmlFor:"idea-content",children:[u("newIdea.description"),(0,e.jsxs)("span",{className:"ml-1 text-xs font-normal text-[#9A9A9A]",children:["(",x("optional"),")"]})]}),(0,e.jsx)(l.T,{id:"idea-content",value:A,onChange:a=>B(a.target.value),placeholder:u("newIdea.descriptionPlaceholder"),rows:4,className:"resize-none"})]}),E&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-[12px] text-destructive",children:E})]}),(0,e.jsxs)(j.Es,{children:[(0,e.jsx)(i.$,{variant:"outline",onClick:()=>b(!1),disabled:C,children:x("cancel")}),(0,e.jsxs)(i.$,{onClick:L,disabled:C||!y.trim(),className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",children:[C?(0,e.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}):null,x("create")]})]})]}),N=async a=>{let b=await (0,p.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})});if(!b.ok){let a=null;try{let c=await b.json();"string"==typeof c?.error&&c.error&&(a=c.error)}catch{}throw new r.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 r.fF(b.status,null);return d},O=(0,e.jsx)("div",{className:"py-2",children:(0,e.jsx)(r.jH,{dispatch:N,onStarted:a=>{b(!1),G?.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:w?v("deriveIdea"):u("newIdea.title")}),w&&t&&(0,e.jsxs)("p",{className:"text-[13px] text-[#6B6B6B]",children:[v("derivedFrom")," \xb7 ",t]})]}),!w&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.tU,{value:K,onValueChange:a=>J(a),children:(0,e.jsxs)(n.j7,{className:"grid w-full grid-cols-2",children:[(0,e.jsx)(n.Xi,{value:"form",children:u("newIdea.modeForm")}),(0,e.jsx)(n.Xi,{value:"conversation",disabled:!H,children:u("newIdea.modeConversation")})]})}),!H&&(0,e.jsxs)("div",{className:"rounded-xl border border-[#EFEBE4] bg-[#FCFBF8] px-3 py-2",children:[(0,e.jsx)("p",{className:"px-1 pt-1 text-[12px] font-medium text-[#6B6B6B]",children:u("newIdea.modeConversationOfflineHint")}),(0,e.jsx)(r.Bs,{variant:"compact"})]})]}),"form"===K?M:O]})})}r=(s.then?(await s)():s)[0],d()}catch(a){d(a)}})},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(3461);c(42708);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-[#C67A52]"})}):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]",children:(0,e.jsx)(k.A,{className:"h-5 w-5 text-[#7B1FA2]"})}),(0,e.jsx)("p",{className:"text-sm text-[#9A9A9A]",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] text-[#6B6B6B]",pending:"bg-[#FFF3E0] text-[#E65100]",approved:"bg-[#E8F5E9] text-[#5A9E6F]",rejected:"bg-[#FFEBEE] text-[#C4574C]",revised:"bg-[#E3F2FD] text-[#1976D2]",closed:"bg-[#F5F5F5] text-[#9A9A9A]"};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-[#2C2C2C] 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-[#4A4A4A] prose prose-sm max-w-none [&_h1]:text-sm [&_h2]:text-[13px] [&_h3]:text-xs [&_p]:text-[13px] [&_p]:text-[#4A4A4A] [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-[#4A4A4A] [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-[#2C2C2C]",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-[#C67A52] 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-[#9A9A9A]",children:k(F?"documents":"documentDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",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-[#FAF8F4] 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-[#B4B2A9]"}),(0,e.jsx)(p.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-[#E5E0D8] text-[#6B6B6B] bg-[#F5F2EC] 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-[#2C2C2A] 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-[#9A9A9A]",children:k(F?"tasks":"taskDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",children:F&&B.length>0?B.length:t.length})]}),(0,e.jsxs)("span",{className:"text-[12px] text-[#9A9A9A]",children:[K,"/",F&&B.length>0?B.length:t.length]})]}),(0,e.jsx)("div",{className:"-mx-6 border-t border-[#E5E0D8]"}),I.length>0&&(0,e.jsxs)("div",{className:"flex gap-0.5 rounded-lg border border-[#E5E0D8] bg-[#F7F6F3] 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-white text-[#2C2C2C] shadow-sm":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,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-white text-[#2C2C2C] shadow-sm":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,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-[#9A9A9A] italic",children:k("emptyContainer")})]})}let E={open:"border-[#D9D9D9] bg-white",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]"},F={open:null,assigned:null,in_progress:{className:"bg-[#E8F5E9] text-[#5A9E6F]",key:"inProgress"},to_verify:{className:"bg-[#F3E5F5] text-[#7B1FA2]",key:"toVerify"},done:{className:"bg-[#E0F2F1] text-[#00796B]",key:"done"},closed:{className:"bg-[#F5F5F5] text-[#9A9A9A]",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] bg-white",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-[#6B6B6B]",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-[#FAF8F4] -mx-1 px-1 rounded-lg transition-colors",children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-[#B4B2A9]"}),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-[#FAF8F4] -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-[#B4B2A9]"}):(0,e.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0 text-[#B4B2A9]"}),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-[#6B6B6B]",children:a.description}),k.length>0&&(0,e.jsxs)("div",{className:"rounded-lg bg-[#FAF8F4] 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-[#888780]"}),(0,e.jsx)("span",{className:"text-[11px] font-semibold text-[#2C2C2C]",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-[#4A4A4A] flex-1",children:a.description}),!1!==a.required&&(0,e.jsx)("span",{className:"shrink-0 text-[10px] font-medium text-[#E65100]",children:i("required")})]},b))})]})]})]})}d()}catch(a){d(a)}})},69815:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{p:()=>m});var e=c(10837),f=c(9222),g=c(16235),h=c(80251),i=c(2852),j=c(68797),k=c(7086),l=a([j]);function m({assignee:a}){let b=(0,f.c)("common");return(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:b("assignee")}),(0,e.jsx)("div",{className:"mt-2 flex items-center gap-2.5 rounded-lg bg-[#FAF8F4] p-3",children: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,k.bB)(a)?"bg-[#C67A52] text-white":"bg-[#E5E0D8] text-[#6B6B6B]",children:(0,k.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-[#2C2C2C]",children:a.name}),(0,e.jsx)("div",{className:"text-xs text-[#6B6B6B]",children:b((0,k.bB)(a)?"agent":"user")}),"agent_instance"===a.type&&a.instance&&(0,e.jsx)("div",{className:"mt-1",children:(0,e.jsx)(j.jQ,{cwd:a.instance.cwd,host:a.instance.host})})]})]}):(0,e.jsx)("span",{className:"text-sm text-[#9A9A9A]",children:b("unassigned")})})]})}j=(l.then?(await l)():l)[0],d()}catch(a){d(a)}})},73797:(a,b,c)=>{c.d(b,{Q:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40bf94f62ce0ce8184a8c8659a8cf5c81cb64708e8",d.callServer,void 0,d.findSourceMapURL,"getTaskAction")},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"}]])},77523:(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] flex items-center justify-center",children:(0,d.jsx)(m.A,{className:"h-3 w-3 text-[#00796B]"})}):"active"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-[#C67A52] 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] flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 text-[#D9D9D9]"})})}),!h&&(0,d.jsx)("div",{className:"flex-1 w-px bg-[#E5E0D8] 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-[#9A9A9A] shrink-0"}):(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] shrink-0"}),(0,d.jsx)("span",{className:`text-[13px] font-medium ${"active"===e.status?"text-[#C67A52]":"completed"===e.status?"text-[#2C2C2C]":"text-[#9A9A9A]"}`,children:s(e.labelKey)}),!g&&(0,d.jsx)("span",{className:"text-[11px] text-[#9A9A9A] 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-[#6B6B6B]",children:s("panel.timeline.createdBy",{name:a.createdBy.name})}),(0,d.jsx)("p",{className:"text-[12px] text-[#9A9A9A]",children:(0,r.fw)(a.createdAt,t)}),a.content&&(0,d.jsxs)("p",{className:"text-[12px] text-[#6B6B6B] 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-[#6B6B6B]",children:B}),u&&u.rounds.length>0&&(0,d.jsx)("p",{className:"text-[12px] text-[#9A9A9A]",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-[#6B6B6B]",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-[#9A9A9A]",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-[#9A9A9A]",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-[#9A9A9A]",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] 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-[#9A9A9A] 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-[#F5F2EC] transition-colors group cursor-pointer",children:[(0,d.jsx)(l.A,{className:"h-3 w-3 text-[#D9D9D9] shrink-0 group-hover:text-[#C67A52]"}),(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-[#2C2C2C] truncate group-hover:text-[#C67A52]",children:a.title})]},a.uuid)),c.length>5&&(0,d.jsx)("p",{className:"text-[11px] text-[#9A9A9A] px-2",children:s("panel.timeline.moreItems",{count:c.length-5})})]})]})}):null;default:return null}})(e)]})]},e.id)})})}},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(34324),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}){let p=(0,f.c)("ideaTracker"),q=(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-[#C67A52]"})}):(0,e.jsxs)(m.P.div,{variants:n.qG,initial:"initial",animate:"animate",children:[(0,e.jsx)(o.p,{assignee:a.assignee}),(0,e.jsx)(j.Separator,{className:"my-5 bg-[#F5F2EC]"}),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]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#E65100]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-[#2C2C2C]",children:p("panel.elaborationNotStarted")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-[#9A9A9A]",children:p("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]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#1976D2]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-[#2C2C2C]",children:p("panel.elaborationWaiting")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-[#9A9A9A]",children:p("panel.elaborationWaitingDesc")})]})]}),a.content&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(j.Separator,{className:"my-5 bg-[#F5F2EC]"}),(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:q("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-[#2C2C2C]",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-white shadow-xl border-l border-[#E5E0D8] ${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-[#F5F2EC] 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-[#6B6B6B]"})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C] 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-[#E5E0D8] text-[#6B6B6B] bg-[#F5F2EC] 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-[#E5E0D8]",onClick:p,children:(0,e.jsx)(i.A,{className:"h-4 w-4 text-[#6B6B6B]"})})]}),(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-[#2C2C2A] 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-[#4A4A4A] [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-[#4A4A4A] [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-[#2C2C2C] [&_code]:text-[12px] [&_code]:bg-[#F5F2EC] [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_pre]:bg-[#FAF8F4] [&_pre]:p-3 [&_pre]:rounded-lg [&_pre]:my-2",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=6817,exports.ids=[6817],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(75785),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-[#D9D9D9]"}),(0,d.jsx)("p",{className:"text-sm text-[#9A9A9A]",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] px-3 py-2",children:[(0,d.jsx)("span",{className:"text-[12px] text-[#6B6B6B]",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-[#D9D9D9]",children:"\xb7"}),(0,d.jsx)("span",{className:"text-[12px] text-[#6B6B6B]",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-[#C67A52] 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-[#9A9A9A]"}):(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 text-[#9A9A9A]"}),(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-[#2C2C2C]",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-[#9A9A9A] 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-[#F5F2EC] transition-colors group cursor-pointer",children:[(0,d.jsx)(j.A,{className:"h-3.5 w-3.5 text-[#D9D9D9] shrink-0 group-hover:text-[#C67A52]"}),(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-[#2C2C2C] truncate group-hover:text-[#C67A52]",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] px-1.5 py-0.5 text-[10px] text-[#6B6B6B]",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-[#9A9A9A] 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] text-[#2E7D32] 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-[#F5F2EC] 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-white text-[#2C2C2C] shadow-sm":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,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-[#F5F2EC] text-[#6B6B6B] 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-white text-[#2C2C2C] shadow-sm":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,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)}})},18604:(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)("60946d7963b917a5c70ca1925c0ea530fe03822d36",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-[#C67A52]"})}):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-[#9A9A9A]",children:p("reportsList")}),(0,d.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",children:r.length}),(0,d.jsxs)("span",{className:"text-[11px] text-[#B4B2A9]",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-[#FAF8F4] 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-[#B4B2A9]"}),(0,d.jsx)(i.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-[#E5E0D8] text-[#6B6B6B] bg-[#F5F2EC] 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-[#2C2C2A] truncate",children:a.title})]},a.uuid))})]})}},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"}]])},22730:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{"00c772b5aff2cf3f90a5f083965e9d6df07f80e8e1":()=>q.UD,"00f7c7be986f02df52fc7f298a5d11487996f96bd9":()=>g.s$,"00fba500eed02e44121df95d876c8b3bdb8ea4f5a2":()=>k.vq,"400210e680c0385808d5385787cc3ac10feeed09b5":()=>o.xo,"402c1162f2756b401c752e800868f5009dca55e118":()=>e.Dv,"402e59d794de5f3573bef27df72147db717532e95e":()=>h.h,"40362b84dfc5edec2c6fa45a8eaf2295fb171f478c":()=>m.f,"403c187156b935707126942a1f5a3dd7dc7f60349d":()=>h.J,"403d93e05fa422707289c693cf88aaff9cd4991606":()=>k.p2,"4040f002467cca317c082889a14041485f531d95ef":()=>g.cq,"4047a90ef603a47130bdb4ef5104e862199b20d3eb":()=>g.zS,"404a967ebaaf755d7f837a5e0d7e1e6da7c0a2855c":()=>q.qN,"40597e0cfc3490e798417315b55984bd3e79d7f4e3":()=>p.zK,"405a9219aa7f1c0d6ca0604f203815504f183ace7a":()=>i.x,"4072f6cf798707938be0c83205c596e0cdf0872a3d":()=>o.kq,"4074ff7c5e2c73a30a96027da366014a65054249da":()=>k.A0,"408faa5a18709abba6da9d06edf47191aaa0d8c35e":()=>k.G3,"4093e77ed8fd3fcd2a8201ab872a3e9e0b9b22f5b3":()=>q.G3,"409497599266cc70b8b9249fe47a4e75bffc2d39c3":()=>r.g,"409988e8157685bc7c494414b0472344a25164d0f2":()=>k.iY,"40a0761569176dd76901d7911d41b4696e54c30bbb":()=>n.F,"40a762e8050c2f89bbe72ab597cd3abc85cf8d3382":()=>f.e1,"40ad9bf6d6d2ae15b3672975c6a815846634ecf091":()=>r.E,"40b41b5973ff2a1749f90958ecab90d5f5c39ccf9a":()=>k.hR,"40b5d7e5035fbc37f475a6562d91f608fba2b0b3bf":()=>e.v5,"40bf94f62ce0ce8184a8c8659a8cf5c81cb64708e8":()=>g.Qd,"40cf506cf01fef64f43274bc5ec5a325dc7b79444c":()=>k.Yw,"40d7f1b96f25caeeac639a97997e23358aaba9bcce":()=>p.w$,"40dea3a5d82afa8a50d325d86aeffd2c101d45343f":()=>g.d1,"40e0356507f636560a182a0005ea4bf41f9f1e6f3a":()=>f.zS,"40ef8af3880fdaea6bec6a0c76ae6efec18fb3ab38":()=>q.ZL,"40f79d0065c816837e1a02cfef1e5727ee949e4aa4":()=>p.JQ,"60307e36e126c6350305fb06e590dec1e76d7a5187":()=>o.TK,"60325e231a9b937eafba7179189e176caf898f76b0":()=>l.IY,"603a62c3cf062be8b65f238555959aed28e43a3d03":()=>p.Z$,"603b115990769f6137fa59f6afbd0b45fee72e0759":()=>l.hD,"604dbb7d927c4a1ab6a0ba92db17015c4e692e0181":()=>k.y9,"6052d9883918dd9baa074736be4368f6d77908c2a6":()=>g.UN,"606347076f72433d83088fa304ea5b8936197847dc":()=>g.WD,"606b1f0d986a6521b23803750b8f87b23ca5026e65":()=>o.wG,"60784bcfab5cd3c38288518ffa62fdf7fb46447bae":()=>l.Nq,"607cb28777a50e3330c87fd4dea612ea333c237e29":()=>k.bd,"6089586267d4b35b237850f70cde838b5ea3271fa5":()=>k.TV,"60946d7963b917a5c70ca1925c0ea530fe03822d36":()=>g.U$,"60abec303b08acb427946055f356bc1caa0bb39623":()=>g.co,"60b6cc9baa0c55a4f28544dd1ee3ad0097d7d67a6a":()=>q.M$,"60cae37f9e08398933bd8b397bc5f8219b1e9d37f5":()=>g.nR,"60d4bd3862ef552da3de66c9983d52afb9d67450e6":()=>e.Tg,"60de55b3ebd55d12db6a501490cfc2ad1748618995":()=>g.wm,"60e751d24b0d64a89c0040779bed094e66b1b377e5":()=>f.yu,"7065db1a3d9ab461e098d54c1d955f64ef4a8976ff":()=>k.qb,"708bff042cdb93ab9aaa60f3c9c2a61f5a167b0f15":()=>q.Ax,"70d59c3a50f38dff0368815ae7719a2db6f6dd8c24":()=>j.s,"70e12e3baa87d7b6ed51ea8e0112f20c9229f18209":()=>f.em,"70f79630de8f0585d1649d0c0b1e05094ccfa65d38":()=>j.d});var e=c(22299),f=c(22110),g=c(57644),h=c(81751),i=c(80041),j=c(98581),k=c(73393),l=c(71353),m=c(64029),n=c(72189),o=c(22293),p=c(31138),q=c(23157),r=c(91117),s=a([e,f,g,h,i,j,k,l,m,n,o,p,q,r]);[e,f,g,h,i,j,k,l,m,n,o,p,q,r]=s.then?(await s)():s,d()}catch(a){d(a)}})},32382:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>ab});var e=c(10837),f=c(21968),g=c(9222),h=c(1007),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(98893),r=c(79543),s=c(42424),t=c(74645),u=c(49599),v=c(9994),w=c(20170),x=c(2852),y=c(88536),z=c(6019),A=c(76172),B=c(84722),C=c(64370),D=c(77523),E=c(18604),F=c(9190),G=c(17068),H=c(86104),I=c(98310),J=c(49262),K=c(41926),L=c(44963),M=c(82552),N=c(63231),O=c(34246),P=c(3461),Q=c(42708),R=c(73797),S=c(42479),T=c(43307),U=c(57535),V=c(26402),W=c(5527),X=c(37004),Y=c(54722),Z=c(76664),$=c(77521),_=c(79030),aa=a([B,C,G,H,I,L]);function ab({ideaUuid:a,projectUuid:b,currentUserUuid:c,onClose:d,onNavigate:aa}){let ab=(0,g.c)(),ac=(0,g.c)("ideaTracker"),ad=(0,g.c)("status"),ae=(0,g.c)("ideaTracker.lineage"),af=(0,h.useRouter)(),[ag,ah]=(0,f.useState)(null),[ai,aj]=(0,f.useState)(!0),[ak,al]=(0,f.useState)(null),[am,an]=(0,f.useState)([]),[ao,ap]=(0,f.useState)([]),[aq,ar]=(0,f.useState)("overview"),[as,at]=(0,f.useState)(new Set(["overview"])),[au,av]=(0,f.useState)(!1),[aw,ax]=(0,f.useState)(0),[ay,az]=(0,f.useState)(!1),[aA,aB]=(0,f.useState)(!1),[aC,aD]=(0,f.useState)(null),[aE,aF]=(0,f.useState)(!0),[aG,aH]=(0,f.useState)(!1),[aI,aJ]=(0,f.useState)(null),[aK,aL]=(0,f.useState)(!1),[aM,aN]=(0,f.useState)(!1),[aO,aP]=(0,f.useState)(""),[aQ,aR]=(0,f.useState)(""),[aS,aT]=(0,f.useState)(!1),[aU,aV]=(0,f.useState)(null),[aW,aX]=(0,f.useState)(!1),[aY,aZ]=(0,f.useState)(!1),[a$,a_]=(0,f.useState)(!1),[a0,a1]=(0,f.useState)(!1),[a2,a3]=(0,f.useState)(null),[a4,a5]=(0,f.useState)(null),[a6,a7]=(0,f.useState)(null),a8=(0,f.useCallback)(a=>{a7(null),a3(a)},[]),a9=(0,f.useCallback)(a=>{a3(null),a5(null),a7(a)},[]),[ba,bb]=(0,f.useState)(!1),[bc,bd]=(0,f.useState)(!1),be=(0,f.useCallback)(a=>{let b=new URLSearchParams(window.location.search);b.set("tab",a),window.history.replaceState(null,"",`${window.location.pathname}?${b.toString()}`)},[]),bf=(0,f.useCallback)(async()=>{try{let b=await (0,O.c)(a);b.success?(ah(b.data),al(null)):al(ac("Not found"===b.error?"panel.notFound":"panel.loadFailed"))}catch{al(ac("panel.loadFailed"))}finally{aj(!1)}},[a,ac]);(0,A.eV)("idea",bf),(0,A.eV)("proposal",bf),(0,A.eV)("task",bf);let bg=ag?.uuid,bh=ag?.status,bi=(0,f.useCallback)(async()=>{if(!bg||"open"===bh)return void an([]);try{let a=await (0,P.U)(b,bg);a.success&&an(a.data)}catch(a){Y.q.error("Failed to fetch proposals:",a)}},[b,bg,bh]);(0,A.eV)("proposal",bi);let bj=(0,f.useCallback)(async()=>{let a=am.filter(a=>"approved"===a.status);if(0===a.length)return void ap([]);try{let c=(await Promise.all(a.map(a=>(0,Q.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})):[]);ap(c)}catch(a){Y.q.error("Failed to fetch tasks:",a)}},[b,am]);(0,A.eV)("task",bj);let bk=(0,f.useCallback)(async()=>{if(!bg)return;let a=await (0,S.z)(bg);a.success&&a.data&&aD(a.data),aF(!1)},[bg]);(0,A.eV)("idea",bk);let bl=(0,f.useMemo)(()=>ag?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,am,ao):["overview","activity"],[ag,am,ao]);(0,f.useRef)(null),ag&&ag.badgeHint;let bm=(0,f.useMemo)(()=>ao.filter(a=>"in_progress"===a.status||"assigned"===a.status||"to_verify"===a.status).length,[ao]),bn=(0,f.useCallback)(()=>{if(!a2)return void a5(null);(0,R.Q)(a2).then(a=>{a.success&&a5(a.data)}).catch(a=>Y.q.error("Failed to load task details:",a))},[a2]);(0,A.eV)("task",bn);let bo=()=>{aN(!1),aP(ag?.title||""),aR(ag?.content||""),aV(null)},bp=async()=>{if(!ag||!aO.trim())return void aV(ab("ideas.titleRequired"));aT(!0),aV(null);let a=await (0,M.J)({ideaUuid:ag.uuid,projectUuid:b,title:aO.trim(),content:aQ.trim()||null});aT(!1),a.success?(aN(!1),await bf(),af.refresh()):aV(a.error||ab("ideas.updateFailed"))},bq=async()=>{if(!ag)return;aB(!0);let a=await (0,N.Z)(ag.uuid,b);aB(!1),a.success&&(d(),af.refresh())},br=async()=>{if(!ag)return;aH(!0),aJ(null);let a=await (0,T.e)(ag.uuid);aH(!1),a.success?(aL(!0),await bf(),af.refresh()):aJ(a.error||ab("elaboration.verifyFailed"))},bs=async a=>{if(!ag)return;aX(!0),ah({...ag,isContainer:a});let c=await (0,M.J)({ideaUuid:ag.uuid,projectUuid:b,title:ag.title,content:ag.content??null,isContainer:a});aX(!1),c.success?(await bf(),af.refresh()):(ah({...ag,isContainer:!a}),i.oR.error(c.error||ab("ideas.updateFailed")))},bt=ag?.derivedStatus||"todo",bu=ag?.isContainer===!0,bv=!!ag&&"elaborated"!==ag.status,bw=(0,V.o)({ideaStatus:ag?.status,elaborationStatus:ag?.elaborationStatus,elaboration:aC});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-[#E5E0D8] bg-white shadow-xl ${bc?"":"animate-in slide-in-from-right duration-300"}`,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-[#F5F2EC] px-6 py-5",children:[(0,e.jsx)("div",{className:"flex-1 min-w-0",children:ai?(0,e.jsx)("div",{className:"h-5 w-40 animate-pulse rounded bg-[#F5F2EC]"}):ag?aM?(0,e.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C]",children:ab("ideas.editIdea")}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:`text-[11px] font-semibold uppercase tracking-wider ${bu?"text-[#B26B3D]":"text-[#B4B2A9]"}`,children:bu?ae("typeTheme"):ae("typeIdea")}),(0,e.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C] truncate",children:ag.title}),(0,e.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,e.jsx)(u.E,{className:$._5[bt]||$._5.todo,children:ag.badgeHint?ac(`badge.${$.Wl[ag.badgeHint]||"open"}`):ad($.Bj[bt]||"todo")}),bu&&ag.childProgress&&ag.childProgress.total>0&&(0,e.jsxs)("span",{className:"flex items-center gap-1 text-xs font-medium text-[#B26B3D]",title:ae("childrenDone",{done:ag.childProgress.done,total:ag.childProgress.total}),children:[(0,e.jsx)(_.C,{done:ag.childProgress.done,total:ag.childProgress.total,size:13,stroke:2}),ag.childProgress.done,"/",ag.childProgress.total]}),(0,e.jsx)("span",{className:"text-xs text-[#9A9A9A]",children:(0,Z.r)(ag.createdAt)})]})]}):(0,e.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C]",children:ac("panel.notFound")})}),(0,e.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[ag&&!aM&&(0,e.jsxs)(s.$,{variant:"outline",size:"sm",className:"h-8 gap-1.5 border-[#E5E0D8] px-2.5",onClick:()=>a1(!0),title:ae("deriveIdea"),"aria-label":ae("deriveIdea"),children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-[#C67A52]"}),(0,e.jsx)("span",{className:"text-[12px] font-medium text-[#C67A52]",children:ae("derive")})]}),ag&&!aM&&(0,e.jsx)(s.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-[#E5E0D8]",onClick:()=>aZ(!0),title:ab("ideas.actions.move"),"aria-label":ab("ideas.actions.move"),children:(0,e.jsx)(k.A,{className:"h-4 w-4 text-[#6B6B6B]"})}),ag&&"elaborated"!==ag.status&&!aM&&(0,e.jsx)(s.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-[#E5E0D8]",onClick:()=>{ag&&(aP(ag.title),aR(ag.content||""),aV(null),aN(!0))},title:ab("ideas.editIdea"),children:(0,e.jsx)(l.A,{className:"h-4 w-4 text-[#6B6B6B]"})}),(0,e.jsx)(s.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-[#E5E0D8]",onClick:aM?bo:d,children:(0,e.jsx)(m.A,{className:"h-4 w-4 text-[#6B6B6B]"})})]})]}),ag&&!ai&&!aM&&(0,e.jsx)("div",{className:"border-b border-[#F5F2EC] px-6",children:(0,e.jsx)("div",{className:"flex gap-0 -mb-px",children:bl.map(a=>(0,e.jsxs)("button",{onClick:()=>{ar(a),av(!0),at(b=>new Set([...b,a])),be(a)},className:`relative flex items-center gap-1.5 px-3 py-2.5 text-[13px] font-medium transition-colors cursor-pointer ${aq===a?"text-[#C67A52] border-b-2 border-[#C67A52]":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,children:[ac(`panel.tabs.${a}`),"tasks"===a&&bm>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-[#E3F2FD] text-[#1976D2] text-[10px] font-semibold leading-none",children:bm}),"activity"===a&&aw>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-[#F5F2EC] text-[#6B6B6B] text-[10px] font-semibold leading-none",children:aw})]},a))})}),(0,e.jsx)(t.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:ai?(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-[#C67A52]"}),(0,e.jsx)("span",{className:"ml-2 text-sm text-[#9A9A9A]",children:ac("loading")})]}):ak?(0,e.jsx)("div",{className:"flex flex-1 items-center justify-center py-12",children:(0,e.jsx)("p",{className:"text-sm text-[#9A9A9A]",children:ak})}):ag?aM?(0,e.jsxs)("div",{className:"space-y-5",children:[aU&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:aU}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(x.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-[#2C2C2C]",children:ab("ideas.titleLabel")}),(0,e.jsx)(v.p,{id:"edit-title",value:aO,onChange:a=>aP(a.target.value),className:"border-[#E5E0D8] text-sm focus-visible:ring-[#C67A52]",autoFocus:!0})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(x.J,{htmlFor:"edit-content",className:"text-[13px] font-medium text-[#2C2C2C]",children:ab("common.content")}),(0,e.jsx)(w.T,{id:"edit-content",value:aQ,onChange:a=>aR(a.target.value),rows:8,className:"border-[#E5E0D8] text-sm resize-none focus-visible:ring-[#C67A52]"})]})]}):(0,e.jsxs)(e.Fragment,{children:[as.has("overview")&&(0,e.jsxs)("div",{style:{display:"overview"===aq?"block":"none"},children:[(0,e.jsxs)("div",{className:"mb-5 flex items-start justify-between gap-3 rounded-lg border border-[#EFEBE3] bg-[#FAF8F4] px-3.5 py-3",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,e.jsxs)(x.J,{htmlFor:"container-toggle",className:"flex items-center gap-1.5 text-[13px] font-medium text-[#2C2C2C]",children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-[#C67A52]","aria-hidden":!0}),ae("container")]}),(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-[#888780]",children:ae("containerDescription")})]}),(0,e.jsx)(y.d,{id:"container-toggle",checked:bu,disabled:aW,onCheckedChange:bs,"aria-label":ae("makeContainer")})]}),(0,e.jsx)(D.p,{idea:ag,proposals:am,tasks:ao,onSelectTask:a8}),(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-[#C67A52]"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-[#5F5E5A]",children:ae("title")})]}),(0,e.jsxs)(s.$,{variant:"outline",size:"sm",className:"h-7 gap-1 border-[#E5E0D8] px-2 text-[11px] text-[#6B6B6B]",onClick:()=>a_(!0),children:[(0,e.jsx)(l.A,{className:"h-3 w-3"}),ag.parentUuid?ae("changeParent"):ae("setParent")]})]}),ag.parent?(0,e.jsxs)("button",{type:"button",onClick:()=>aa?.(ag.parent.uuid),className:"flex w-full items-center gap-2 rounded-lg bg-[#FAF8F4] px-3 py-2.5 text-left transition-colors hover:bg-[#F5F2EC]",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 shrink-0 text-[#888780]"}),(0,e.jsx)("span",{className:"shrink-0 text-[12px] text-[#888780]",children:ae("derivedFrom")}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium text-[#5F5E5A]",children:ag.parent.title})]}):(0,e.jsx)("p",{className:"px-1 text-[12px] text-[#A8A498]",children:ae("noParent")}),ag.children&&ag.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-[#5F5E5A]",children:ae("derivedIdeas")}),(0,e.jsx)("span",{className:"text-[11px] text-[#888780]",children:ag.children.length})]}),(()=>{let a=ag.children.filter(a=>"done"===a.derivedStatus).length,b=ag.children.length;return(0,e.jsxs)("span",{className:"flex items-center gap-1.5 text-[12px] text-[#7A7A75]",title:ae("childrenDone",{done:a,total:b}),children:[(0,e.jsx)(_.C,{done:a,total:b,size:14,stroke:2}),a,"/",b]})})()]}),(0,e.jsx)("div",{className:"overflow-hidden rounded-lg border border-[#EFEBE3]",children:ag.children.map((a,b)=>(0,e.jsxs)("div",{children:[b>0&&(0,e.jsx)("div",{className:"h-px bg-[#F0EEEA]"}),(0,e.jsxs)("button",{type:"button",onClick:()=>aa?.(a.uuid),className:"flex w-full items-center justify-between gap-2 px-3 py-2.5 text-left transition-colors hover:bg-[#FAF8F4]",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-[#C2BDB2]"}),(0,e.jsx)("span",{className:"truncate text-[12px] text-[#2C2C2A]",children:a.title})]}),(0,e.jsx)(u.E,{className:`shrink-0 border-0 text-[10px] ${$._5[a.derivedStatus]||$._5.todo}`,children:ad($.Bj[a.derivedStatus]||"todo")})]})]},a.uuid))})]})]}),(0,e.jsx)(E.U,{projectUuid:b,ideaUuid:ag.uuid,proposals:am,onDocClick:a9})]}),bl.includes("elaboration")&&as.has("elaboration")&&(0,e.jsx)("div",{style:{display:"elaboration"===aq?"block":"none"},children:(0,e.jsx)(B.G,{idea:ag,elaboration:aC,isLoading:aE,onRefresh:async()=>{await bk(),await bf()},onReassign:()=>az(!0),canReassign:bv})}),bl.includes("proposal")&&as.has("proposal")&&(0,e.jsx)("div",{style:{display:"proposal"===aq?"block":"none"},children:(0,e.jsx)(C.k,{idea:ag,projectUuid:b,onTaskClick:a8,onDocClick:a9,initialProposals:am})}),bl.includes("tasks")&&as.has("tasks")&&(0,e.jsx)("div",{style:{display:"tasks"===aq?"block":"none"},children:(0,e.jsx)(F.n,{tasks:ao,projectUuid:b,proposalUuids:am.filter(a=>"approved"===a.status).map(a=>a.uuid),onSelectTask:a8})}),as.has("activity")&&(0,e.jsx)("div",{style:{display:"activity"===aq?"block":"none"},children:(0,e.jsx)(G.x,{ideaUuid:ag.uuid,currentUserUuid:c,commentCount:aw,onCommentCountChange:ax})})]}):null})}),ag&&!ai&&(0,e.jsx)("div",{className:"border-t border-[#F5F2EC] px-6 py-4",children:aM?(0,e.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[(0,e.jsx)(s.$,{variant:"outline",className:"border-[#E5E0D8]",onClick:bo,disabled:aS,children:ab("common.cancel")}),(0,e.jsx)(s.$,{className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",onClick:bp,disabled:aS||!aO.trim(),children:aS?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ab("common.save")]}):ab("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:[!bu&&(0,e.jsxs)(e.Fragment,{children:[bw&&!aK&&(0,e.jsx)(s.$,{className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",onClick:br,disabled:aG,children:aG?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ab("elaboration.verifying")]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(q.A,{className:"mr-2 h-4 w-4"}),ab("elaboration.verifyButton")]})}),aK&&(0,e.jsx)("span",{className:"text-[11px] text-[#00796B]",children:ab("elaboration.verifiedQueuedHint")}),aI&&(0,e.jsx)("span",{className:"text-[11px] text-destructive",children:aI}),(0,e.jsx)(W.w,{ideaUuid:ag.uuid,assignee:ag.assignee,proposals:am,tasks:ao,onStarted:()=>{bf()}}),(0,e.jsx)(X.s,{ideaUuid:ag.uuid,assignee:ag.assignee,proposals:am,tasks:ao,onStarted:()=>{bf()}})]}),bu&&(0,e.jsx)("span",{className:"text-[11px] text-[#888780]",children:ae("containerHint")})]}),(0,e.jsxs)(z.Lt,{children:[(0,e.jsx)(z.tv,{asChild:!0,children:(0,e.jsx)(s.$,{variant:"outline",size:"icon",className:"shrink-0 h-8 w-8 border-[#E5E0D8] text-[#EF4444] hover:bg-[#FFEBEE] hover:text-[#EF4444] hover:border-[#EF4444]",children:(0,e.jsx)(r.A,{className:"h-4 w-4"})})}),(0,e.jsxs)(z.EO,{children:[(0,e.jsxs)(z.wd,{children:[(0,e.jsx)(z.r7,{children:ab("ideas.deleteIdea")}),(0,e.jsx)(z.$v,{children:ab("ideas.deleteIdeaConfirm",{title:ag.title})})]}),(0,e.jsxs)(z.ck,{children:[(0,e.jsx)(z.Zr,{children:ab("common.cancel")}),(0,e.jsx)(z.Rx,{variant:"destructive",onClick:bq,disabled:aA,children:aA?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ab("common.delete")]}):ab("common.delete")})]})]})]})]})})]}),(0,e.jsx)(J.h,{open:aY,onOpenChange:aZ,ideaUuid:a,projectUuid:b,onMoved:()=>d()}),ag&&(0,e.jsx)(K.d,{open:a$,onOpenChange:a_,ideaUuid:ag.uuid,ideaTitle:ag.title,projectUuid:b,currentParentUuid:ag.parentUuid??null,descendantUuids:ag.descendantUuids??[],onChanged:bf}),ag&&(0,e.jsx)(L.i,{open:a0,onOpenChange:a1,projectUuid:b,parentUuid:ag.uuid,parentTitle:ag.title,onCreated:a=>{i.oR.success(ae("deriveIdea")),af.refresh(),aa?.(a)}}),ay&&ag&&(0,e.jsx)(U.i,{idea:{uuid:ag.uuid,title:ag.title,content:ag.content,status:ag.status,assignee:ag.assignee?{type:ag.assignee.type,uuid:ag.assignee.uuid,name:ag.assignee.name}:null},projectUuid:b,currentUserUuid:c,onClose:()=>{az(!1),bf()}}),a2&&a4&&(0,e.jsx)(H.v,{task:a4,projectUuid:b,currentUserUuid:c,mode:ba?"sidebyside":"overlay",onClose:()=>{a3(null),a5(null)},onBack:()=>{a3(null),a5(null)}}),a6&&(0,e.jsx)(I.K,{title:a6.title,type:a6.type,content:a6.content,mode:ba?"sidebyside":"overlay",onClose:()=>a7(null),onBack:()=>a7(null)})]})}[B,C,G,H,I,L]=aa.then?(await aa)():aa,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"}]])},34246:(a,b,c)=>{c.d(b,{c:()=>e});var d=c(42377);let e=(0,d.createServerReference)("4040f002467cca317c082889a14041485f531d95ef",d.callServer,void 0,d.findSourceMapURL,"getIdeaAction")},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(80717),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-[#9A9A9A]",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-[#9A9A9A]"})}):0===c.length?(0,d.jsx)("p",{className:"text-sm text-[#9A9A9A] 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] bg-white"}),e<c.length-1&&(0,d.jsx)("div",{className:"flex-1 w-px bg-[#E5E0D8] mt-1"})]}),(0,d.jsxs)("div",{className:"flex-1 pb-3",children:[(0,d.jsx)("p",{className:"text-[13px] text-[#2C2C2C]",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-[#9A9A9A]",children:(0,j.fw)(a.createdAt,b)})]})]},a.uuid))})]})}},41926:(a,b,c)=>{c.d(b,{d:()=>t});var d=c(10837),e=c(21968),f=c(9222),g=c(1007),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)("40dea3a5d82afa8a50d325d86aeffd2c101d45343f",p.callServer,void 0,p.findSourceMapURL,"getProjectIdeasForPickerAction"),r=(0,p.createServerReference)("606347076f72433d83088fa304ea5b8936197847dc",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.useRouter)(),[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-[#9A9A9A]"})}):(0,d.jsx)("div",{className:"rounded-md border border-[#E5E0D8]",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-[#C67A52]/10"),children:[(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-[#2C2C2A]",children:a.title}),b&&(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-[11px] font-medium text-[#B0654A]",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] 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]"}),(0,d.jsx)("p",{className:"text-[12px] leading-relaxed text-[#9A5238]",children:x("cycleWarning")})]}),C&&(0,d.jsx)("p",{className:"px-1 text-[12px] text-[#A8A498]",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-[#E5E0D8]",onClick:()=>L(null),disabled:G,children:x("detach")}):(0,d.jsx)("span",{}),(0,d.jsx)(l.$,{variant:"outline",className:"border-[#E5E0D8]",onClick:()=>b(!1),disabled:G,children:y("cancel")})]})]})})}},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-[#9A9A9A]",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-[#9A9A9A]",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-[#C67A52] 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-[#9A9A9A]",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-[#6B6B6B]",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] bg-[#FCFBF8] px-3 py-2",children:[(0,e.jsx)("p",{className:"px-1 pt-1 text-[12px] font-medium text-[#6B6B6B]",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)}})},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(3461);c(42708);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-[#C67A52]"})}):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]",children:(0,e.jsx)(k.A,{className:"h-5 w-5 text-[#7B1FA2]"})}),(0,e.jsx)("p",{className:"text-sm text-[#9A9A9A]",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] text-[#6B6B6B]",pending:"bg-[#FFF3E0] text-[#E65100]",approved:"bg-[#E8F5E9] text-[#5A9E6F]",rejected:"bg-[#FFEBEE] text-[#C4574C]",revised:"bg-[#E3F2FD] text-[#1976D2]",closed:"bg-[#F5F5F5] text-[#9A9A9A]"};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-[#2C2C2C] 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-[#4A4A4A] prose prose-sm max-w-none [&_h1]:text-sm [&_h2]:text-[13px] [&_h3]:text-xs [&_p]:text-[13px] [&_p]:text-[#4A4A4A] [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-[#4A4A4A] [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-[#2C2C2C]",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-[#C67A52] 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-[#9A9A9A]",children:k(F?"documents":"documentDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",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-[#FAF8F4] 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-[#B4B2A9]"}),(0,e.jsx)(p.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-[#E5E0D8] text-[#6B6B6B] bg-[#F5F2EC] 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-[#2C2C2A] 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-[#9A9A9A]",children:k(F?"tasks":"taskDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",children:F&&B.length>0?B.length:t.length})]}),(0,e.jsxs)("span",{className:"text-[12px] text-[#9A9A9A]",children:[K,"/",F&&B.length>0?B.length:t.length]})]}),(0,e.jsx)("div",{className:"-mx-6 border-t border-[#E5E0D8]"}),I.length>0&&(0,e.jsxs)("div",{className:"flex gap-0.5 rounded-lg border border-[#E5E0D8] bg-[#F7F6F3] 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-white text-[#2C2C2C] shadow-sm":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,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-white text-[#2C2C2C] shadow-sm":"text-[#9A9A9A] hover:text-[#6B6B6B]"}`,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-[#9A9A9A] italic",children:k("emptyContainer")})]})}let E={open:"border-[#D9D9D9] bg-white",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]"},F={open:null,assigned:null,in_progress:{className:"bg-[#E8F5E9] text-[#5A9E6F]",key:"inProgress"},to_verify:{className:"bg-[#F3E5F5] text-[#7B1FA2]",key:"toVerify"},done:{className:"bg-[#E0F2F1] text-[#00796B]",key:"done"},closed:{className:"bg-[#F5F5F5] text-[#9A9A9A]",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] bg-white",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-[#6B6B6B]",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-[#FAF8F4] -mx-1 px-1 rounded-lg transition-colors",children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-[#B4B2A9]"}),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-[#FAF8F4] -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-[#B4B2A9]"}):(0,e.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0 text-[#B4B2A9]"}),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-[#6B6B6B]",children:a.description}),k.length>0&&(0,e.jsxs)("div",{className:"rounded-lg bg-[#FAF8F4] 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-[#888780]"}),(0,e.jsx)("span",{className:"text-[11px] font-semibold text-[#2C2C2C]",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-[#4A4A4A] flex-1",children:a.description}),!1!==a.required&&(0,e.jsx)("span",{className:"shrink-0 text-[10px] font-medium text-[#E65100]",children:i("required")})]},b))})]})]})]})}d()}catch(a){d(a)}})},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-[#C67A52] text-white":"bg-[#E5E0D8] text-[#6B6B6B]",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-[#2C2C2C]",children:a.name}),(0,e.jsx)("div",{className:"text-xs text-[#6B6B6B]",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-[#9A9A9A]",children:d("unassigned")}),p="mt-2 flex items-center gap-2.5 rounded-lg bg-[#FAF8F4] p-3";return(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",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)}})},73797:(a,b,c)=>{c.d(b,{Q:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40bf94f62ce0ce8184a8c8659a8cf5c81cb64708e8",d.callServer,void 0,d.findSourceMapURL,"getTaskAction")},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"}]])},77523:(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] flex items-center justify-center",children:(0,d.jsx)(m.A,{className:"h-3 w-3 text-[#00796B]"})}):"active"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-[#C67A52] 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] flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 text-[#D9D9D9]"})})}),!h&&(0,d.jsx)("div",{className:"flex-1 w-px bg-[#E5E0D8] 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-[#9A9A9A] shrink-0"}):(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] shrink-0"}),(0,d.jsx)("span",{className:`text-[13px] font-medium ${"active"===e.status?"text-[#C67A52]":"completed"===e.status?"text-[#2C2C2C]":"text-[#9A9A9A]"}`,children:s(e.labelKey)}),!g&&(0,d.jsx)("span",{className:"text-[11px] text-[#9A9A9A] 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-[#6B6B6B]",children:s("panel.timeline.createdBy",{name:a.createdBy.name})}),(0,d.jsx)("p",{className:"text-[12px] text-[#9A9A9A]",children:(0,r.fw)(a.createdAt,t)}),a.content&&(0,d.jsxs)("p",{className:"text-[12px] text-[#6B6B6B] 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-[#6B6B6B]",children:B}),u&&u.rounds.length>0&&(0,d.jsx)("p",{className:"text-[12px] text-[#9A9A9A]",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-[#6B6B6B]",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-[#9A9A9A]",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-[#9A9A9A]",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-[#9A9A9A]",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] 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-[#9A9A9A] 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-[#F5F2EC] transition-colors group cursor-pointer",children:[(0,d.jsx)(l.A,{className:"h-3 w-3 text-[#D9D9D9] shrink-0 group-hover:text-[#C67A52]"}),(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-[#2C2C2C] truncate group-hover:text-[#C67A52]",children:a.title})]},a.uuid)),c.length>5&&(0,d.jsx)("p",{className:"text-[11px] text-[#9A9A9A] 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(34324),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-[#C67A52]"})}):(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-[#F5F2EC]"}),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]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#E65100]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-[#2C2C2C]",children:r("panel.elaborationNotStarted")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-[#9A9A9A]",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]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#1976D2]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-[#2C2C2C]",children:r("panel.elaborationWaiting")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-[#9A9A9A]",children:r("panel.elaborationWaitingDesc")})]})]}),a.content&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(j.Separator,{className:"my-5 bg-[#F5F2EC]"}),(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",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-[#2C2C2C]",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-white shadow-xl border-l border-[#E5E0D8] ${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-[#F5F2EC] 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-[#6B6B6B]"})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C] 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-[#E5E0D8] text-[#6B6B6B] bg-[#F5F2EC] 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-[#E5E0D8]",onClick:p,children:(0,e.jsx)(i.A,{className:"h-4 w-4 text-[#6B6B6B]"})})]}),(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-[#2C2C2A] 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-[#4A4A4A] [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-[#4A4A4A] [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-[#2C2C2C] [&_code]:text-[12px] [&_code]:bg-[#F5F2EC] [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_pre]:bg-[#FAF8F4] [&_pre]:p-3 [&_pre]:rounded-lg [&_pre]:my-2",children:(0,e.jsx)(m.MarkdownContent,{children:(0,n.j)(c)})})})]})]})}m=(p.then?(await p)():p)[0],d()}catch(a){d(a)}})}};