tower-studio 0.2.38 → 0.2.40

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 (342) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +2 -2
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +48 -36
  13. package/.next/standalone/.next/server/app/_not-found/page.js +3 -3
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/api/adapters/test/route.js +1 -1
  17. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js +1 -1
  20. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js +1 -1
  23. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
  26. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +2 -2
  28. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/assistant/route.js +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
  32. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
  34. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js +1 -1
  36. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +2 -2
  40. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +1 -1
  42. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +1 -1
  45. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +1 -1
  47. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +3 -3
  49. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  53. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +83 -71
  54. package/.next/standalone/.next/server/app/missions/page.js +6 -6
  55. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +2 -2
  58. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +48 -36
  59. package/.next/standalone/.next/server/app/onboarding/page.js +3 -3
  60. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +2 -2
  63. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +48 -36
  64. package/.next/standalone/.next/server/app/page.js +3 -3
  65. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +2 -2
  68. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +65 -53
  69. package/.next/standalone/.next/server/app/settings/page.js +5 -5
  70. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +2 -2
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +121 -109
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +5 -5
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +2 -2
  78. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +106 -94
  79. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +3 -3
  80. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  81. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +2 -2
  83. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +93 -81
  84. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +3 -3
  85. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +2 -2
  88. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +96 -84
  89. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +3 -3
  90. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +2 -2
  93. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +48 -36
  94. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +4 -4
  95. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +2 -2
  98. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +88 -76
  99. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +5 -5
  100. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +3 -3
  103. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +95 -83
  104. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -6
  105. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +2 -2
  108. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +68 -56
  109. package/.next/standalone/.next/server/app/workspaces/page.js +3 -3
  110. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  111. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
  113. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +2 -2
  114. package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_assets_[projectId]_[filename]_route_actions_08y.jen.js +1 -1
  115. package/.next/standalone/.next/server/chunks/[externals]__0izylsq._.js +3 -0
  116. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0lioghc._.js → [root-of-the-server]__0-~q463._.js} +2 -2
  117. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0d2japj._.js → [root-of-the-server]__0.wld9h._.js} +2 -2
  118. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.z8.oi._.js +4 -0
  119. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02jy80j._.js +4 -0
  120. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0dy~osn._.js → [root-of-the-server]__032d9pl._.js} +2 -2
  121. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__08u6wg.._.js → [root-of-the-server]__037x-0a._.js} +2 -2
  122. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__08xus7y._.js → [root-of-the-server]__04jduyo._.js} +2 -2
  123. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04u7b2g._.js +3 -0
  124. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05nz.tg._.js +1 -1
  125. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ai09na._.js +3 -0
  126. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__00mjz~7._.js → [root-of-the-server]__0az764e._.js} +2 -2
  127. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__12ohpl.._.js → [root-of-the-server]__0b3m.jm._.js} +2 -2
  128. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_3ce_3._.js → [root-of-the-server]__0c7z.~a._.js} +2 -2
  129. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__00~-bvt._.js → [root-of-the-server]__0d1bhsb._.js} +2 -2
  130. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j05vlm._.js +3 -0
  131. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__01n7exm._.js → [root-of-the-server]__0kexk71._.js} +3 -3
  132. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0qif839._.js → [root-of-the-server]__0kuo6q5._.js} +3 -3
  133. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +1 -1
  134. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~foo~5._.js → [root-of-the-server]__0np.553._.js} +3 -3
  135. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0q8.khe._.js → [root-of-the-server]__0r-6wmj._.js} +2 -2
  136. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_yyy8._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0omyrab._.js → [root-of-the-server]__0u_-4~7._.js} +2 -2
  138. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xswbi9._.js +3 -0
  139. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0tys9pv._.js → [root-of-the-server]__0z20rmt._.js} +2 -2
  140. package/.next/standalone/.next/server/chunks/[root-of-the-server]__11l3gud._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/{_0lb0q5p._.js → _06.mxka._.js} +1 -1
  142. package/.next/standalone/.next/server/chunks/{src_0bkvm8c._.js → src_02ruq-1._.js} +2 -2
  143. package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/src_lib_02llcit._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/src_lib_0i2.v2d._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/src_lib_12xey8u._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  149. package/.next/standalone/.next/server/chunks/ssr/{0ws9_lucide-react_dist_esm_icons_0odx0ph._.js → 0ws9_lucide-react_dist_esm_icons_10_90yo._.js} +2 -2
  150. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +3 -0
  151. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0f88ua~._.js → [root-of-the-server]__0.2h0ux._.js} +1 -1
  152. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07_o.al._.js → [root-of-the-server]__0.infp2._.js} +2 -2
  153. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__04rp1ck._.js → [root-of-the-server]__0.u-t.1._.js} +1 -1
  154. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01kyzx1._.js +3 -0
  155. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0k-mx8r._.js → [root-of-the-server]__02j1enz._.js} +1 -1
  156. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02mo_kb._.js +3 -0
  157. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02~6htc._.js +4 -0
  158. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0guqcva._.js → [root-of-the-server]__038u_kv._.js} +4 -4
  159. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09s~cme._.js → [root-of-the-server]__0391jsv._.js} +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02ur64h._.js → [root-of-the-server]__03fujv7._.js} +1 -1
  161. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +3 -0
  162. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-tolks._.js → [root-of-the-server]__058rbx5._.js} +4 -4
  163. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__077c1-u._.js +3 -0
  165. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lozqxc._.js → [root-of-the-server]__094t44p._.js} +1 -1
  166. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_i7zpd._.js → [root-of-the-server]__09t~p.u._.js} +1 -1
  167. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m7ydqb._.js → [root-of-the-server]__09z_ddd._.js} +1 -1
  168. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0p0te97._.js → [root-of-the-server]__0ce3fpq._.js} +4 -4
  169. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__062b.yt._.js → [root-of-the-server]__0da~mv~._.js} +4 -4
  170. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0qqbb31._.js → [root-of-the-server]__0dux7x.._.js} +1 -1
  171. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ea-1l0._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0th-t1a._.js → [root-of-the-server]__0h589~0._.js} +4 -4
  173. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  174. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00~jawi._.js → [root-of-the-server]__0l6bt9t._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m80~su._.js → [root-of-the-server]__0mmypbn._.js} +1 -1
  176. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mpjat-._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_1zewr._.js → [root-of-the-server]__0mq0f94._.js} +1 -1
  178. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-_7_._.js +30 -0
  179. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0scj6ed._.js → [root-of-the-server]__0odeai5._.js} +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0siyg1p._.js → [root-of-the-server]__0oq-j16._.js} +4 -4
  181. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0na8eiv._.js → [root-of-the-server]__0pmjob9._.js} +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lz4wdp._.js → [root-of-the-server]__0pvaj~l._.js} +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0wofia_._.js → [root-of-the-server]__0rckee~._.js} +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y~ooou._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0t6f4lq._.js → [root-of-the-server]__10s67lq._.js} +4 -4
  187. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__04p5fnx._.js → [root-of-the-server]__10~3-.h._.js} +2 -2
  188. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__093tt4a._.js → [root-of-the-server]__12w35bx._.js} +4 -4
  189. package/.next/standalone/.next/server/chunks/ssr/{_0e-zyn2._.js → _0-_yznx._.js} +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{_00t6138._.js → _03lt1_x._.js} +4 -4
  192. package/.next/standalone/.next/server/chunks/ssr/{_0l3l_d6._.js → _04bt0.3._.js} +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/{_0ght75u._.js → _04jcctt._.js} +2 -2
  194. package/.next/standalone/.next/server/chunks/ssr/{_0cxhub8._.js → _04~zqvy._.js} +4 -4
  195. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  196. package/.next/standalone/.next/server/chunks/ssr/{_13glpna._.js → _07_8m~l._.js} +2 -2
  197. package/.next/standalone/.next/server/chunks/ssr/_0_z-t6g._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/_0a-.s7z._.js +3 -0
  199. package/.next/standalone/.next/server/chunks/ssr/_0aqfqr5._.js +3 -0
  200. package/.next/standalone/.next/server/chunks/ssr/{_0qkt.3y._.js → _0be3783._.js} +2 -2
  201. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +2 -2
  202. package/.next/standalone/.next/server/chunks/ssr/_0g8mw1b._.js +3 -0
  203. package/.next/standalone/.next/server/chunks/ssr/_0hh17jg._.js +1 -1
  204. package/.next/standalone/.next/server/chunks/ssr/{_02encue._.js → _0mm~wxj._.js} +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/{_0_hnt09._.js → _0n4bq0m._.js} +1 -1
  206. package/.next/standalone/.next/server/chunks/ssr/{_0n54odq._.js → _0n5do.z._.js} +1 -1
  207. package/.next/standalone/.next/server/chunks/ssr/{_0j84cn0._.js → _0o3rthp._.js} +2 -2
  208. package/.next/standalone/.next/server/chunks/ssr/{_0n1l7yo._.js → _0p6p_68._.js} +4 -4
  209. package/.next/standalone/.next/server/chunks/ssr/{_0clhm~f._.js → _0py1s-f._.js} +1 -1
  210. package/.next/standalone/.next/server/chunks/ssr/_0qrc1eu._.js +3 -0
  211. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  212. package/.next/standalone/.next/server/chunks/ssr/{_0mzwe90._.js → _0rrzd20._.js} +1 -1
  213. package/.next/standalone/.next/server/chunks/ssr/{_0k9b94s._.js → _0t863nl._.js} +1 -1
  214. package/.next/standalone/.next/server/chunks/ssr/{_07fnvnm._.js → _0tvm5af._.js} +1 -1
  215. package/.next/standalone/.next/server/chunks/ssr/{_0mpce0d._.js → _0u7c6bz._.js} +4 -4
  216. package/.next/standalone/.next/server/chunks/ssr/{_0hu0tyg._.js → _0u_uywm._.js} +1 -1
  217. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  218. package/.next/standalone/.next/server/chunks/ssr/{_0t53a7_._.js → _0zqwuq~._.js} +3 -3
  219. package/.next/standalone/.next/server/chunks/ssr/_0~cy-h1._.js +3 -0
  220. package/.next/standalone/.next/server/chunks/ssr/_11rjd4d._.js +3 -0
  221. package/.next/standalone/.next/server/chunks/ssr/{_0muaopo._.js → _12ca88g._.js} +4 -4
  222. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hhlpw6._.js → node_modules__pnpm_06f0dao._.js} +2 -2
  223. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  224. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  225. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  226. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  227. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  228. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  229. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  230. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  231. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  232. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  233. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  234. package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
  235. package/.next/standalone/.next/server/chunks/ssr/{src_lib_06nbc41._.js → src_lib_02~3_5t._.js} +2 -2
  236. package/.next/standalone/.next/server/chunks/ssr/{src_lib_01xtio2._.js → src_lib_04d~c.c._.js} +2 -2
  237. package/.next/standalone/.next/server/chunks/ssr/{src_lib_03p6skw._.js → src_lib_08wv1le._.js} +2 -2
  238. package/.next/standalone/.next/server/chunks/ssr/{src_lib_05mu4f0._.js → src_lib_0_9avpk._.js} +2 -2
  239. package/.next/standalone/.next/server/chunks/ssr/src_lib_0a60u40._.js +3 -0
  240. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fu5szn._.js +3 -0
  241. package/.next/standalone/.next/server/chunks/ssr/src_lib_0gve57o._.js +3 -0
  242. package/.next/standalone/.next/server/chunks/ssr/src_lib_0koe0p0._.js +3 -0
  243. package/.next/standalone/.next/server/chunks/ssr/src_lib_0qdh-v4._.js +3 -0
  244. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ramp4w._.js +3 -0
  245. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sms4xl._.js +2 -2
  246. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sn1z-s._.js +3 -0
  247. package/.next/standalone/.next/server/chunks/ssr/src_lib_110am8v._.js +3 -0
  248. package/.next/standalone/.next/server/chunks/ssr/src_lib_11w~.ge._.js +3 -0
  249. package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
  250. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  251. package/.next/standalone/.next/server/pages/500.html +1 -1
  252. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  253. package/.next/standalone/.next/server/server-reference-manifest.json +417 -333
  254. package/.next/standalone/.next/static/chunks/0.lqb7y9kz5z6.js +1 -0
  255. package/.next/standalone/.next/static/chunks/02zqmiej0opg7.js +1 -0
  256. package/.next/standalone/.next/static/chunks/{0a234qgxmvbfu.js → 03jo4masky_ji.js} +1 -1
  257. package/.next/standalone/.next/static/chunks/{0wbzgoyu4~g4x.js → 03rl6s3rpptas.js} +1 -1
  258. package/.next/standalone/.next/static/chunks/{097rglx2_e2oo.js → 05n5tgexx2_92.js} +1 -1
  259. package/.next/standalone/.next/static/chunks/0651zmy-w~saj.js +1 -0
  260. package/.next/standalone/.next/static/chunks/{04t77qlr4-sw7.js → 09ossbd-6zx4g.js} +1 -1
  261. package/.next/standalone/.next/static/chunks/0_d-xz2x5qb_c.js +1 -0
  262. package/.next/standalone/.next/static/chunks/0bq80txkiwk0q.js +1 -0
  263. package/.next/standalone/.next/static/chunks/0bx6xpa7fgedh.js +1 -0
  264. package/.next/standalone/.next/static/chunks/{14man4i21otxe.js → 0dp-d685xgb68.js} +1 -1
  265. package/.next/standalone/.next/static/chunks/0kf6kwtt_mouu.js +1 -0
  266. package/.next/standalone/.next/static/chunks/0l2-qbv0tx44i.js +1 -0
  267. package/.next/standalone/.next/static/chunks/0l3n_2z5xfhor.js +1 -0
  268. package/.next/standalone/.next/static/chunks/0mu2posb9cg4b.js +1 -0
  269. package/.next/standalone/.next/static/chunks/0nc-n~ecfjozt.js +1 -0
  270. package/.next/standalone/.next/static/chunks/{0c0u4it7gyb1..js → 0roncmx7dp-47.js} +1 -1
  271. package/.next/standalone/.next/static/chunks/{0jlzko424.5et.js → 0s6gcjv24hfkq.js} +1 -1
  272. package/.next/standalone/.next/static/chunks/{0rbykdrqih-0t.js → 0t1nk8jlwgyb-.js} +1 -1
  273. package/.next/standalone/.next/static/chunks/{10q75vl~mg7vy.js → 0tb.0x~6y.21w.js} +1 -1
  274. package/.next/standalone/.next/static/chunks/{10mwqzqdpi9d5.js → 0v.l5.sqos562.js} +1 -1
  275. package/.next/standalone/.next/static/chunks/{151eqj4g7bidp.js → 0vm6adb7s2i4g.js} +1 -1
  276. package/.next/standalone/.next/static/chunks/{0bsigqvr2-qcp.js → 0xxn47mtozln~.js} +1 -1
  277. package/.next/standalone/.next/static/chunks/{0khxfvo-tgpbc.js → 0~33w7-91bik-.js} +1 -1
  278. package/.next/standalone/.next/static/chunks/0~qrkswofk7zn.css +1 -0
  279. package/.next/standalone/.next/static/chunks/{17ldo-bezxis..js → 11brr5_f60yx-.js} +1 -1
  280. package/.next/standalone/.next/static/chunks/120u45g91sx4q.js +5 -0
  281. package/.next/standalone/.next/static/chunks/13rq33eiffqaz.js +1 -0
  282. package/.next/standalone/.next/static/chunks/{13qts-1uv7-ee.js → 16e-u8e~pzz_-.js} +1 -1
  283. package/.next/standalone/.next/static/chunks/1821tyytk30ed.js +2 -0
  284. package/.next/standalone/.next/static/chunks/{0.nk_89kz3j6c.js → 183m8iouij_n8.js} +1 -1
  285. package/.next/standalone/package.json +3 -2
  286. package/bin/tower.mjs +10 -1
  287. package/dist/mcp-server.cjs +270 -146
  288. package/package.json +3 -2
  289. package/scripts/migrations/0003-backfill-systemconfig-from-legacy-db.ts +113 -0
  290. package/scripts/migrations/0004-relocate-misplaced-assets.ts +172 -0
  291. package/scripts/run-migrations.ts +12 -0
  292. package/.next/standalone/.next/server/chunks/[externals]__0k7u3dx._.js +0 -3
  293. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.a1443._.js +0 -3
  294. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00llstz._.js +0 -4
  295. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01yu.gw._.js +0 -4
  296. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0965p6t._.js +0 -3
  297. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c513um._.js +0 -3
  298. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qijr4h._.js +0 -3
  299. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rc0ntp._.js +0 -3
  300. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__046-2.-._.js +0 -3
  301. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05sv58d._.js +0 -3
  302. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dixwk_._.js +0 -4
  303. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzafdq._.js +0 -3
  304. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0i97rbw._.js +0 -3
  305. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mbvmq1._.js +0 -3
  306. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qnzkj3._.js +0 -30
  307. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qp5cw1._.js +0 -3
  308. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rlar2j._.js +0 -3
  309. package/.next/standalone/.next/server/chunks/ssr/_00vn2qb._.js +0 -3
  310. package/.next/standalone/.next/server/chunks/ssr/_07_.oek._.js +0 -3
  311. package/.next/standalone/.next/server/chunks/ssr/_09ri_be._.js +0 -3
  312. package/.next/standalone/.next/server/chunks/ssr/_0_q.4.i._.js +0 -3
  313. package/.next/standalone/.next/server/chunks/ssr/_0nk7qd4._.js +0 -3
  314. package/.next/standalone/.next/server/chunks/ssr/_0no6nrx._.js +0 -3
  315. package/.next/standalone/.next/server/chunks/ssr/_0vqyl_~._.js +0 -3
  316. package/.next/standalone/.next/server/chunks/ssr/src_lib_06okbb2._.js +0 -3
  317. package/.next/standalone/.next/server/chunks/ssr/src_lib_0741dos._.js +0 -3
  318. package/.next/standalone/.next/server/chunks/ssr/src_lib_0cbuy0_._.js +0 -3
  319. package/.next/standalone/.next/server/chunks/ssr/src_lib_0e27xy7._.js +0 -3
  320. package/.next/standalone/.next/server/chunks/ssr/src_lib_0n5-vk5._.js +0 -3
  321. package/.next/standalone/.next/server/chunks/ssr/src_lib_0rk2hla._.js +0 -3
  322. package/.next/standalone/.next/server/chunks/ssr/src_lib_0t5xz2y._.js +0 -3
  323. package/.next/standalone/.next/server/chunks/ssr/src_lib_0u5_gf2._.js +0 -3
  324. package/.next/standalone/.next/server/chunks/ssr/src_lib_0v6s6se._.js +0 -3
  325. package/.next/standalone/.next/static/chunks/01.g0gvh6h11a.js +0 -2
  326. package/.next/standalone/.next/static/chunks/03zzmb3y7kpxl.js +0 -1
  327. package/.next/standalone/.next/static/chunks/0dt3ljzz2pz0r.css +0 -1
  328. package/.next/standalone/.next/static/chunks/0nfwp8f87wok1.js +0 -1
  329. package/.next/standalone/.next/static/chunks/0qonpqhvpg-tt.js +0 -1
  330. package/.next/standalone/.next/static/chunks/0qu5zm6k.e_de.js +0 -5
  331. package/.next/standalone/.next/static/chunks/0w7_~s93hxxkk.js +0 -1
  332. package/.next/standalone/.next/static/chunks/0yl2smjfz2bzk.js +0 -1
  333. package/.next/standalone/.next/static/chunks/0~uo_7-sxehxf.js +0 -1
  334. package/.next/standalone/.next/static/chunks/11pivwhywsmj9.js +0 -1
  335. package/.next/standalone/.next/static/chunks/13ipvyn1q8z4y.js +0 -1
  336. package/.next/standalone/.next/static/chunks/14bii1nj2yewi.js +0 -1
  337. package/.next/standalone/.next/static/chunks/15_ulpp1r-6ra.js +0 -1
  338. package/.next/standalone/.next/static/chunks/15~2jg4z8h54~.js +0 -1
  339. package/.next/standalone/.next/static/chunks/183k6undfylp5.js +0 -1
  340. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → wtOlqKEl8oeuEeWLbCnuv}/_buildManifest.js +0 -0
  341. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → wtOlqKEl8oeuEeWLbCnuv}/_clientMiddlewareManifest.js +0 -0
  342. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → wtOlqKEl8oeuEeWLbCnuv}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,783426,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),r=e.i(210702),n=e.i(232545),l=e.i(738690),i=e.i(226145),o=e.i(486077),c=e.i(519455),d=e.i(793479),m=e.i(280027),x=e.i(746798),u=e.i(533499);function h({searchQuery:e,onSearchChange:s,versions:a=[],versionFilter:p="all",onVersionFilterChange:g,versionsHref:f,onCreateTask:j}){let b,{t:N}=(0,u.useI18n)(),v="all"===p?N("board.allVersions"):"backlog"===p?N("board.backlogFilter"):(b=a.find(e=>e.id===p))?`${b.number} ${b.name}`:N("board.allVersions");return(0,t.jsxs)("div",{className:"flex items-center gap-2 px-6 py-2",children:[g&&(0,t.jsxs)(m.Select,{value:p,onValueChange:e=>g(e||"all"),children:[(0,t.jsxs)(m.SelectTrigger,{className:"h-8 w-44 shrink-0 gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:v})]}),(0,t.jsxs)(m.SelectContent,{children:[(0,t.jsx)(m.SelectItem,{value:"all",children:N("board.allVersions")}),(0,t.jsx)(m.SelectItem,{value:"backlog",children:N("board.backlogFilter")}),a.map(e=>(0,t.jsxs)(m.SelectItem,{value:e.id,children:[(0,t.jsx)("span",{className:"font-mono",children:e.number})," ",e.name]},e.id))]})]}),(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(l.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(d.Input,{type:"text",value:e,onChange:e=>s(e.target.value),placeholder:N("board.searchPlaceholder"),className:"pl-8 pr-3 text-xs"})]}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",children:(0,t.jsx)(o.Lightbulb,{className:"h-4 w-4"})})}),(0,t.jsx)(x.TooltipContent,{side:"bottom",className:"max-w-xs",children:N("board.tipText")})]}),f&&(0,t.jsx)(r.default,{href:f,children:(0,t.jsxs)(c.Button,{variant:"outline",className:"h-8 gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(i.GitBranch,{className:"h-3.5 w-3.5"}),N("version.timeline")]})}),(0,t.jsxs)(c.Button,{"data-tour":"create-task",variant:"outline",className:"gap-1.5 border-border text-xs text-muted-foreground hover:border-primary/30 hover:text-primary",onClick:j,children:[(0,t.jsx)(n.Plus,{className:"h-3.5 w-3.5"}),N("board.newTask")]})]})]})}var p=e.i(585012),g=e.i(597746),f=e.i(685149);function j({x:e,y:r,taskId:n,currentStatus:l,hasExecutions:i,workspaceId:o,onClose:c,onStatusChange:d,onLaunch:m}){let{t:x}=(0,u.useI18n)(),h=(0,a.useRouter)(),b=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=e=>{b.current&&!b.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[c]);let N="flex items-center px-3 py-1.5 text-xs cursor-pointer hover:bg-accent rounded-sm w-full text-left",v=(0,t.jsxs)("div",{ref:b,style:{position:"fixed",top:r,left:e,zIndex:9999},className:"bg-popover border border-border rounded-md shadow-md py-1 min-w-[180px]",children:[(0,t.jsx)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground uppercase tracking-wider",children:x("board.contextMenu.changeStatus")}),f.BOARD_COLUMNS.map(e=>(0,t.jsxs)("button",{type:"button",className:N,onClick:()=>{d(n,e.id),c()},children:[l===e.id?(0,t.jsx)(g.Check,{className:"h-3 w-3 mr-2 flex-shrink-0"}):(0,t.jsx)("span",{className:"w-5 flex-shrink-0"}),e.label]},e.id)),(0,t.jsx)("hr",{className:"my-1 border-border"}),(0,t.jsx)("button",{type:"button",className:`${N} ${i?"opacity-50 cursor-not-allowed":""}`,disabled:i,onClick:()=>{i||(m(n),c())},children:x("board.contextMenu.launch")}),"DONE"!==l&&"CANCELLED"!==l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"my-1 border-border"}),(0,t.jsx)("button",{type:"button",className:N,onClick:()=>{h.push(`/workspaces/${o}/tasks/${n}`),c()},children:x("board.contextMenu.goToDetail")})]})]});return"u"<typeof document?null:(0,p.createPortal)(v,document.body)}var b=e.i(720247),N=e.i(775712),v=e.i(469051),k=e.i(67013),w=e.i(49007),y=e.i(464249),C=e.i(998626),T=e.i(572989);let S=(0,T.default)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);var P=e.i(487486),E=e.i(755146),I=e.i(35967);function D({task:e,onClick:s,onEdit:a,onDelete:r,onTogglePin:n,onContextMenu:l}){let{t:o}=(0,u.useI18n)(),{attributes:d,listeners:m,setNodeRef:h,transform:p,transition:g,isDragging:j}=(0,N.useSortable)({id:e.id,data:{type:"task",task:e}}),b={transform:k.CSS.Transform.toString(p),transition:g,opacity:j?.4:1},v=f.PRIORITY_CONFIG[e.priority],T=!!e.baseBranch;return(0,t.jsxs)("div",{ref:h,style:b,...d,...m,className:"group cursor-grab rounded-lg border border-border bg-card p-3 transition-all hover:border-primary/20 hover:bg-accent/50 active:cursor-grabbing",onClick:s,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),l?.(e,t.clientX,t.clientY)},"data-testid":"task-card",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground",children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",className:`transition-all ${e.pinned?"text-primary opacity-100":"text-muted-foreground opacity-0 group-hover:opacity-100"}`,onClick:t=>{t.stopPropagation(),n?.(e.id)},"aria-label":o(e.pinned?"board.unpin":"board.pin"),children:(0,t.jsx)(S,{className:`h-3.5 w-3.5 ${e.pinned?"-rotate-45":""}`})}),(0,t.jsxs)(E.DropdownMenu,{children:[(0,t.jsx)(E.DropdownMenuTrigger,{render:(0,t.jsx)("button",{className:"rounded-md p-0.5 text-muted-foreground opacity-0 transition-all hover:bg-background hover:text-foreground group-hover:opacity-100",onClick:e=>e.stopPropagation()}),children:(0,t.jsx)(w.MoreHorizontal,{className:"h-4 w-4"})}),(0,t.jsxs)(E.DropdownMenuContent,{align:"end",children:[(0,t.jsxs)(E.DropdownMenuItem,{onClick:t=>{t.stopPropagation(),a?.(e)},children:[(0,t.jsx)(y.Pencil,{className:"mr-2 h-3.5 w-3.5"}),o("common.edit")]}),(0,t.jsxs)(E.DropdownMenuItem,{className:"text-rose-400",onClick:t=>{t.stopPropagation(),r?.(e.id)},children:[(0,t.jsx)(C.Trash2,{className:"mr-2 h-3.5 w-3.5"}),o("common.delete")]})]})]})]})]}),e.description&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-3 text-xs leading-relaxed text-muted-foreground",children:e.description}),(0,t.jsxs)("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(P.Badge,{variant:"secondary",className:`text-[10px] font-semibold ${v.color}`,children:v.label}),e.labels?.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:e.label.color+"20",color:e.label.color},children:e.label.name},e.label.id)),(T||e.version)&&(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[T&&(0,t.jsxs)(x.Tooltip,{disableHoverablePopup:!0,children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)("span",{className:"inline-flex cursor-default items-center rounded-md border border-border bg-muted px-1 py-0.5 text-muted-foreground",onPointerDown:e=>e.stopPropagation(),children:(0,t.jsx)(i.GitBranch,{className:"h-2.5 w-2.5 shrink-0"})})}),(0,t.jsx)(x.TooltipContent,{side:"top",children:o("board.card.worktree",{branch:e.baseBranch??""})})]}),e.version&&(0,t.jsxs)(x.Tooltip,{disableHoverablePopup:!0,children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)("span",{className:"cursor-default",onPointerDown:e=>e.stopPropagation(),children:(0,t.jsx)(I.TaskVersionTag,{number:e.version.number,title:""})})}),(0,t.jsx)(x.TooltipContent,{side:"top",children:o("board.card.version",{number:e.version.number,name:e.version.name})})]})]})]})]})}var L=e.i(776639),B=e.i(759684);function F({open:e,onOpenChange:s,columnLabel:a,columnColor:r,tasks:n,onTaskClick:l}){let{t:i}=(0,u.useI18n)();return(0,t.jsx)(L.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(L.DialogContent,{className:"sm:max-w-6xl max-h-[80vh]",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsxs)(L.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`h-2.5 w-2.5 rounded-full ${r}`}),(0,t.jsx)("span",{children:a}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-xs font-mono font-medium text-muted-foreground",children:n.length})]})}),(0,t.jsx)(B.ScrollArea,{className:"max-h-[680px]",children:(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-3 pr-3",children:[n.map(e=>{let a=f.PRIORITY_CONFIG[e.priority];return(0,t.jsxs)("div",{className:"cursor-pointer rounded-lg border border-border bg-card p-3 transition-all hover:border-primary/20 hover:bg-accent/50",onClick:()=>{l?.(e),s(!1)},children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground line-clamp-2",children:e.title}),e.description&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 flex-wrap",children:[(0,t.jsx)(P.Badge,{variant:"secondary",className:`text-[10px] font-semibold ${a.color}`,children:a.label}),e.labels?.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:e.label.color+"20",color:e.label.color},children:e.label.name},e.label.id))]})]},e.id)}),0===n.length&&(0,t.jsx)("div",{className:"col-span-4 py-8 text-center text-sm text-muted-foreground",children:i("board.noTasks")})]})})]})})}function A({id:e,label:a,color:r,tasks:l,onTaskClick:i,onEditTask:o,onAddTask:d,onDeleteTask:m,onTogglePin:x,onContextMenu:h}){let{setNodeRef:p,isOver:g}=(0,b.useDroppable)({id:e}),[f,j]=(0,s.useState)(!1),{t:k}=(0,u.useI18n)();return(0,t.jsxs)("div",{className:`flex w-0 min-w-[220px] flex-1 flex-col min-h-0 border-r border-border/50 last:border-r-0 transition-colors ${g?"bg-primary/[0.06]":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5 border-b border-border/30",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`h-2 w-2 rounded-full ${r}`}),(0,t.jsx)("span",{className:"text-xs font-semibold tracking-wide text-secondary-foreground",children:a}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-mono font-medium text-muted-foreground",children:l.length})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>j(!0),className:"text-muted-foreground","aria-label":k("board.viewAll"),children:(0,t.jsx)(v.LayoutGrid,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:d,className:"text-muted-foreground","aria-label":"add",children:(0,t.jsx)(n.Plus,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsx)(F,{open:f,onOpenChange:j,columnLabel:a,columnColor:r,tasks:l,onTaskClick:i}),(0,t.jsx)(B.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)("div",{ref:p,className:"flex flex-col gap-2 p-2",children:(0,t.jsx)(N.SortableContext,{items:l.map(e=>e.id),strategy:N.verticalListSortingStrategy,children:l.map(e=>(0,t.jsx)(D,{task:e,onClick:()=>i?.(e),onEdit:o,onDelete:m,onTogglePin:x,onContextMenu:h},e.id))})})})]})}function R({initialTasks:e,onTaskMove:a,onTaskClick:r,onEditTask:n,onAddTask:l,onDeleteTask:i,onTogglePin:o,onContextMenuStatusChange:c,onContextMenuLaunch:d,workspaceId:m}){let[x,u]=(0,s.useState)(e),[h,p]=(0,s.useState)(null),[g,N]=(0,s.useState)(null);(0,s.useEffect)(()=>{u(e)},[e]);let v=(0,b.useSensors)((0,b.useSensor)(b.PointerSensor,{activationConstraint:{distance:8}})),k=(0,s.useCallback)((e,t,s)=>{N({task:e,x:t,y:s})},[]),w=(0,s.useCallback)(e=>{let t=x.find(t=>t.id===e.active.id);t&&p(t)},[x]),y=(0,s.useCallback)(e=>{let t,{active:s,over:r}=e;if(p(null),!r)return;let n=s.id,l=r.id;if(f.BOARD_COLUMNS.some(e=>e.id===l))t=l;else{let e=x.find(e=>e.id===l);t=e?.status}t&&(u(e=>e.map(e=>e.id===n?{...e,status:t}:e)),a?.(n,t))},[x,a]);return(0,t.jsxs)(b.DndContext,{id:"kanban-board",sensors:v,collisionDetection:b.closestCorners,onDragStart:w,onDragEnd:y,children:[(0,t.jsx)("div",{className:"mx-2 flex h-full overflow-x-auto rounded-xl border border-border bg-card/50",children:f.BOARD_COLUMNS.map(e=>(0,t.jsx)(A,{id:e.id,label:e.label,color:e.color,tasks:x.filter(t=>t.status===e.id),onTaskClick:r,onEditTask:n,onAddTask:()=>l?.(e.id),onDeleteTask:i,onTogglePin:o,onContextMenu:k},e.id))}),(0,t.jsx)(b.DragOverlay,{children:h?(0,t.jsx)("div",{className:"rotate-3 scale-105",children:(0,t.jsx)(D,{task:h})}):null}),g&&(0,t.jsx)(j,{x:g.x,y:g.y,taskId:g.task.id,currentStatus:g.task.status,hasExecutions:(g.task._count?.executions??0)>0,workspaceId:m??"",onClose:()=>N(null),onStatusChange:(e,t)=>{c?.(e,t),N(null)},onLaunch:e=>{d?.(e),N(null)}})]})}var O=e.i(744798);function $(e,t,s){return Math.min(Math.max(e,t),s)}var M=e.i(232280),z=e.i(368490),U=e.i(645378),W=e.i(453889);let G=(0,T.default)("git-commit-vertical",[["path",{d:"M12 3v6",key:"1holv5"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 15v6",key:"a9ows0"}]]);var H=e.i(938499),V=e.i(400355),_=e.i(233274),K=e.i(736061),X=e.i(460707),Y=e.i(567860),J=e.i(875840),q=e.i(624687),Q=e.i(514798);let Z=(0,Q.createServerReference)("60d71d3fa805fa2e9c75423c15e1c97fab192e0bbb",Q.callServer,void 0,Q.findSourceMapURL,"updateProject");var ee=e.i(611385);let et=(0,Q.createServerReference)("40dbb1eb469e90f3055f19af1546fa852e53b8460d",Q.callServer,void 0,Q.findSourceMapURL,"deleteProject"),es=(0,Q.createServerReference)("4090685fce0a0471d05e033e1bcbffcfbe830ff4de",Q.callServer,void 0,Q.findSourceMapURL,"getRecentLocalProjects"),ea=(0,Q.createServerReference)("40ecd40642698958b84412a7dd960a70f41dfd5a26",Q.callServer,void 0,Q.findSourceMapURL,"getOrCreateTowerTaskId");var er=e.i(962848),en=e.i(469098),el=e.i(519517),ei=e.i(121836),eo=e.i(360112),ec=e.i(224277),ed=e.i(905455);function em({commits:e}){let{t:a}=(0,u.useI18n)(),[r,n]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("button",{onClick:()=>n(!r),className:"flex w-full items-center gap-1 px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[r?(0,t.jsx)(M.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:[a("git.commitLog")," (",e.length,")"]})]}),r&&(0,t.jsx)("div",{className:"mt-0.5 mb-1.5 space-y-0.5 max-h-64 overflow-y-auto",children:e.map(e=>(0,t.jsxs)("div",{className:"group flex items-start gap-2 rounded-md px-2 py-1.5 hover:bg-accent transition-colors",children:[(0,t.jsx)(G,{className:"h-3 w-3 shrink-0 text-muted-foreground mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-xs text-foreground line-clamp-1",children:e.message}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(e.shortHash),eo.toast.success(`Copied ${e.shortHash}`)},className:"flex items-center gap-0.5 font-mono text-[10px] text-primary/70 hover:text-primary transition-colors",children:[e.shortHash,(0,t.jsx)(J.Copy,{className:"h-2.5 w-2.5 opacity-0 group-hover:opacity-100 transition-opacity"})]}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.author}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m`;let s=Math.floor(t/60);if(s<24)return`${s}h`;let a=Math.floor(s/24);return a<30?`${a}d`:`${Math.floor(a/30)}mo`}(e.date)})]})]})]},e.hash))})]})}var ex=e.i(487278),eu=e.i(375306),eh=e.i(244354);function ep({localPath:e,stashes:a,hasChanges:r,onRefresh:n}){let{t:l}=(0,u.useI18n)(),[i,o]=(0,s.useState)(!1),[m,x]=(0,s.useState)(!1),[h,p]=(0,s.useState)(""),[g,f]=(0,s.useState)(null),j=async()=>{x(!0);try{await (0,eh.gitAction)(e,"stash-save",{message:h}),p(""),eo.toast.success(l("git.stashSaved")),await n()}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}finally{x(!1)}},b=async t=>{f(t);try{await (0,eh.gitAction)(e,"stash-pop",{index:t}),eo.toast.success(l("git.stashApplied")),await n()}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}finally{f(null)}},N=async t=>{f(t);try{await (0,eh.gitAction)(e,"stash-drop",{index:t}),eo.toast.success(l("git.stashDropped")),await n()}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}finally{f(null)}};return r||0!==a.length?(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("button",{onClick:()=>o(!i),className:"flex w-full items-center gap-1 px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[i?(0,t.jsx)(M.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:[l("git.stash")," ",a.length>0&&`(${a.length})`]})]}),i&&(0,t.jsxs)("div",{className:"mt-0.5 mb-1.5 space-y-2",children:[r&&(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)(d.Input,{value:h,onChange:e=>p(e.target.value),placeholder:l("git.stashMsgPlaceholder"),className:"h-7 text-xs flex-1",onKeyDown:e=>"Enter"===e.key&&j()}),(0,t.jsx)(c.Button,{variant:"outline",size:"icon-sm",onClick:j,disabled:m,className:"shrink-0",children:m?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(ex.Archive,{className:"h-3 w-3"})})]}),a.length>0&&(0,t.jsx)("div",{className:"space-y-0.5",children:a.map(e=>(0,t.jsxs)("div",{className:"group flex items-center gap-2 rounded-md px-2 py-1.5 hover:bg-accent transition-colors",children:[(0,t.jsx)(ex.Archive,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 min-w-0 truncate text-xs text-foreground",children:e.message||`stash@{${e.index}}`}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>b(e.index),disabled:g===e.index,className:"text-muted-foreground","aria-label":l("git.stashApply"),children:g===e.index?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(eu.ArrowUpFromLine,{className:"h-3 w-3"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>N(e.index),disabled:g===e.index,className:"text-rose-400","aria-label":l("git.stashDrop"),children:(0,t.jsx)(C.Trash2,{className:"h-3 w-3"})})]})]},e.index))})]})]}):null}var eg=e.i(515135);function ef({value:e,ariaLabel:a}){let{t:r}=(0,u.useI18n)(),[n,l]=(0,s.useState)(!1),i=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}l(!0),eo.toast.success(r("common.copied")),setTimeout(()=>l(!1),1500)}catch{eo.toast.error(r("common.copyFailed"))}};return(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-border bg-muted/50 pl-3 pr-1 py-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",title:e,children:e}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":a,onClick:i,children:n?(0,t.jsx)(g.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(J.Copy,{className:"h-3 w-3"})})}),(0,t.jsx)(x.TooltipContent,{children:n?r("common.copied"):r("common.copy")})]})]})}function ej({project:e,workspaceId:r}){let{t:n,locale:l}=(0,u.useI18n)(),o=(0,a.useRouter)(),{width:m,isDragging:h,startResize:p}=function(e){let{storageKey:t,defaultWidth:a,minWidth:r,maxWidth:n,edge:l="left"}=e,[i,o]=(0,s.useState)(a),[c,d]=(0,s.useState)(!1),m=(0,s.useRef)(null);(0,s.useEffect)(()=>{try{let e=window.localStorage.getItem(t),s=null==e?NaN:Number(e);Number.isFinite(s)&&o($(s,r,n))}catch{}},[t,r,n]);let x=(0,s.useCallback)(e=>{let t=m.current;t&&o(function(e,t,s,a,r,n="left"){return $(e+("left"===n?t-s:s-t),a,r)}(t.width,t.x,e.clientX,r,n,l))},[r,n,l]),u=(0,s.useCallback)(()=>{m.current&&(m.current=null,d(!1),window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",u),o(e=>{try{window.localStorage.setItem(t,String(e))}catch{}return e}))},[x,t]),h=(0,s.useCallback)(e=>{e.preventDefault(),m.current={x:e.clientX,width:i},d(!0),window.addEventListener("pointermove",x),window.addEventListener("pointerup",u)},[i,x,u]);return(0,s.useEffect)(()=>()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",u)},[x,u]),{width:i,isDragging:c,startResize:h}}({storageKey:"tower:repo-sidebar-width",defaultWidth:288,minWidth:240,maxWidth:560,edge:"left"}),[g,f]=(0,s.useState)(!0),[j,b]=(0,s.useState)(!0),[N,v]=(0,s.useState)(!1),[k,w]=(0,s.useState)(!1),[T,S]=(0,s.useState)(""),[P,E]=(0,s.useState)(!1),[I,D]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),[A,R]=(0,s.useState)(e.name),[O,J]=(0,s.useState)(e.alias??""),[Q,ex]=(0,s.useState)(e.description??""),[eu,eh]=(0,s.useState)(e.localPath??""),[eb,eN]=(0,s.useState)(e.projectType??"FRONTEND"),[ev,ek]=(0,s.useState)([]);(0,s.useEffect)(()=>{es(100).then(ek)},[]);let[ew,ey]=(0,s.useState)(!1),[eC,eT]=(0,s.useState)(""),[eS,eP]=(0,s.useState)(""),[eE,eI]=(0,s.useState)(""),[eD,eL]=(0,s.useState)(""),[eB,eF]=(0,s.useState)("FRONTEND"),[eA,eR]=(0,s.useState)(!1),[eO,e$]=(0,s.useState)(!1),[eM,ez]=(0,s.useState)(null),[eU,eW]=(0,s.useState)(!1),[eG,eH]=(0,s.useState)(!1),eV=e=>{eo.toast.info(e)},e_=(0,s.useCallback)(async()=>{if(e.localPath){eW(!0);try{let t=await fetch(`/api/git?path=${encodeURIComponent(e.localPath)}`);t.ok&&ez(await t.json())}catch{}finally{eW(!1)}}},[e.localPath]);(0,s.useEffect)(()=>{e_()},[e_]);let eK=async()=>{if(e.localPath){eH(!0);try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"init",path:e.localPath})})).ok?(eV(n("git.initSuccess")),await e_()):eV(n("git.initFailed"))}catch{eV(n("git.initFailed"))}finally{eH(!1)}}},eX=(e,t)=>{o.push(`/workspaces/${e}?projectId=${t}`,{scroll:!1}),o.refresh()},eY=async()=>{if(eS.trim()){eR(!0);try{let e=await (0,ee.createProject)({name:eS.trim(),alias:eE.trim()||void 0,description:eD.trim()||void 0,localPath:eC,projectType:eB,workspaceId:r});ey(!1),eX(r,e.id)}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}finally{eR(!1)}}},eJ=async()=>{if(eu&&!eO){e$(!0);try{let e=await (0,ei.analyzeProjectDirectory)(eu.trim(),l);ex(e)}catch{eo.toast.error(n("project.analyzeError"))}finally{e$(!1)}}},eq=async()=>{try{await Z(e.id,{name:A.trim(),alias:O.trim()||void 0,description:Q.trim()||void 0,localPath:eu.trim()||void 0,projectType:eb}),o.refresh(),v(!1)}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}};return(0,t.jsxs)("aside",{className:"relative flex-shrink-0 border-l border-border bg-sidebar",style:{width:m},children:[(0,t.jsx)("div",{onPointerDown:p,className:`absolute left-0 top-0 z-20 h-full w-1 -translate-x-1/2 cursor-col-resize transition-colors hover:bg-primary/20 ${h?"bg-primary/40":"bg-transparent"}`,role:"separator","aria-orientation":"vertical","aria-label":n("sidebar.right.resize")}),(0,t.jsxs)("div",{className:"h-full overflow-y-auto",children:[(0,t.jsxs)("div",{className:"border-b border-border p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-semibold text-foreground",children:e.name}),e.alias&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.alias})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{R(e.name),J(e.alias??""),ex(e.description??""),eh(e.localPath??""),v(!0)},className:"text-muted-foreground",children:(0,t.jsx)(y.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{S(""),w(!0)},className:"text-muted-foreground hover:text-rose-400",children:(0,t.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})})]})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-sm text-secondary-foreground leading-relaxed line-clamp-4",children:e.description}),(0,t.jsx)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:(0,t.jsx)("span",{className:`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-medium ${"GIT"===e.type?"bg-sky-500/15 text-sky-300 ring-1 ring-sky-500/20":"bg-muted text-muted-foreground ring-1 ring-border"}`,children:"GIT"===e.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.GitBranch,{className:"h-3 w-3"}),n("sidebar.right.gitType")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.FileText,{className:"h-3 w-3"}),n("sidebar.right.normalType")]})})}),e.gitUrl&&(0,t.jsx)("div",{className:"mt-3 space-y-1.5",children:(0,t.jsx)(ef,{value:e.gitUrl,ariaLabel:n("project.gitUrl")})}),e.localPath&&(0,t.jsxs)("div",{className:"mt-3 space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,er.openInFileManager)(e.localPath)}catch(e){console.error("openInFileManager failed:",e),eo.toast.error(n("git.openInFileManagerFailed"))}},children:(0,t.jsx)(K.FolderSearch,{className:"h-4 w-4"})})}),(0,t.jsx)(x.TooltipContent,{children:n("git.openInFileManager")})]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,en.openInEditor)(e.localPath)}catch(e){console.error("openInEditor failed:",e),eo.toast.error(n("git.openInEditorFailed"))}},children:(0,t.jsx)(X.Code,{className:"h-4 w-4"})})}),(0,t.jsx)(x.TooltipContent,{children:n("git.openInEditor")})]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,el.openInTerminal)(e.localPath)}catch(e){console.error("openInTerminal failed:",e),eo.toast.error(n("git.openInTerminalFailed"))}},children:(0,t.jsx)(Y.Terminal,{className:"h-4 w-4"})})}),(0,t.jsx)(x.TooltipContent,{children:n("git.openInTerminal")})]})]}),(0,t.jsxs)(c.Button,{variant:"outline",className:"w-full h-9 gap-1.5 text-xs",disabled:I,onClick:async()=>{D(!0);try{let t=await ea(e.id);o.push(`/workspaces/${r}/tasks/${t}`)}catch{eo.toast.error(n("git.openStudioFailed"))}finally{D(!1)}},children:[I?(0,t.jsx)(V.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(W.FolderOpen,{className:"h-3.5 w-3.5"}),n("git.openStudio")]})]})]}),(0,t.jsxs)("div",{className:"border-b border-border p-4",children:[(0,t.jsxs)(c.Button,{variant:"ghost",onClick:()=>f(!g),className:"flex w-full cursor-pointer justify-between px-2 py-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:n("git.section")}),g?(0,t.jsx)(M.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),g&&(0,t.jsx)("div",{className:"mt-3",children:e.localPath?eU?(0,t.jsxs)("div",{className:"flex items-center justify-center py-4 text-muted-foreground",children:[(0,t.jsx)(V.Loader2,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{className:"ml-2 text-xs",children:n("git.loading")})]}):eM&&!eM.isGit?(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/50 p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(H.AlertCircle,{className:"h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"text-xs",children:n("git.notInitialized")})]}),(0,t.jsxs)(c.Button,{className:"mt-3 h-7 w-full gap-1.5 bg-primary/10 text-xs text-primary ring-1 ring-primary/20 hover:bg-primary/15",onClick:eK,disabled:eG,children:[eG?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(G,{className:"h-3 w-3"}),n("git.initRepo")]})]}):eM?.isGit?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex flex-col",children:(0,t.jsx)(eg.EditorGitPanel,{localPath:e.localPath,mode:"project"})}),(0,t.jsx)(em,{commits:eM.commits??[]}),(0,t.jsx)(ep,{localPath:e.localPath,stashes:eM.stashes??[],hasChanges:(eM.changedFiles??[]).length>0,onRefresh:e_})]}):null:(0,t.jsx)("div",{className:"rounded-lg border border-border bg-muted/50 p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(H.AlertCircle,{className:"h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"text-xs",children:n("git.noLocalPath")})]})})})]}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)(c.Button,{variant:"ghost",onClick:()=>b(!j),className:"flex w-full cursor-pointer justify-between px-2 py-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:n("sidebar.right.browseRepo")}),j?(0,t.jsx)(M.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),j&&(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,t.jsxs)(c.Button,{variant:"outline",className:"w-full h-8 gap-1.5 text-xs",onClick:()=>F(!0),children:[(0,t.jsx)(W.FolderOpen,{className:"h-3.5 w-3.5"}),n("sidebar.right.browseRepo")]}),ev.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5 px-1",children:n("sidebar.right.recent")}),(0,t.jsx)("div",{className:"space-y-0.5",children:ev.map(s=>(0,t.jsxs)("button",{onClick:()=>{s.id!==e.id&&eX(s.workspaceId,s.id)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors ${s.id===e.id?"bg-primary/10 text-primary cursor-default":"hover:bg-accent cursor-pointer"}`,children:["GIT"===s.type?(0,t.jsx)(i.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}):(0,t.jsx)(W.FolderOpen,{className:"h-3 w-3 shrink-0 text-primary/70"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-xs font-medium text-foreground",children:s.name}),s.localPath&&(0,t.jsx)("p",{className:"truncate text-[10px] font-mono text-muted-foreground",children:s.localPath})]})]},s.id))})]})]})]})]}),(0,t.jsx)(L.Dialog,{open:N,onOpenChange:v,children:(0,t.jsxs)(L.DialogContent,{style:{maxWidth:"32rem"},children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{children:n("project.edit")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.name")}),(0,t.jsx)(d.Input,{value:A,onChange:e=>R(e.target.value),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.type.label")}),(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(ed.SegmentedControl,{options:[{value:"FRONTEND",label:n("project.type.frontend")},{value:"BACKEND",label:n("project.type.backend")}],value:eb,onChange:eN})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.alias")}),(0,t.jsx)(d.Input,{value:O,onChange:e=>J(e.target.value),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.description")}),(0,t.jsxs)(c.Button,{type:"button",variant:"ghost",onClick:eJ,className:`h-6 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground ${!eu||eO?"opacity-50":""}`,children:[eO?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(_.Sparkles,{className:"h-3 w-3"}),eO?n("project.analyzing"):n("project.genDesc")]})]}),(0,t.jsx)(q.Textarea,{value:Q,onChange:e=>ex(e.target.value),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.localPath")}),(0,t.jsx)("div",{className:"mt-1.5 break-all rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-xs text-muted-foreground",children:eu||"—"})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>v(!1),children:n("common.cancel")}),(0,t.jsx)(c.Button,{onClick:eq,disabled:!A.trim()||eO,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:n("common.save")})]})]})}),(0,t.jsx)(ec.FolderBrowserDialog,{open:B,onOpenChange:F,onSelect:e=>{N?eh(e):(e=>{let t=ev.find(t=>t.localPath===e);if(t)return eX(t.workspaceId,t.id);let s=e.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean).pop()??"";eT(e),eP(s),eI(""),eL(""),ey(!0)})(e)}}),(0,t.jsx)(L.Dialog,{open:ew,onOpenChange:ey,children:(0,t.jsxs)(L.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{children:n("topbar.newProject")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.localPath")}),(0,t.jsx)("div",{className:"mt-1.5 rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-xs text-muted-foreground",children:eC})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.name")}),(0,t.jsx)(d.Input,{value:eS,onChange:e=>eP(e.target.value),placeholder:n("project.namePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.type.label")}),(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(ed.SegmentedControl,{options:[{value:"FRONTEND",label:n("project.type.frontend")},{value:"BACKEND",label:n("project.type.backend")}],value:eB,onChange:eF})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.alias")}),(0,t.jsx)(d.Input,{value:eE,onChange:e=>eI(e.target.value),placeholder:n("project.aliasPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.description")}),(0,t.jsx)(q.Textarea,{value:eD,onChange:e=>eL(e.target.value),placeholder:n("project.descPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>ey(!1),children:n("common.cancel")}),(0,t.jsxs)(c.Button,{onClick:eY,disabled:!eS.trim()||eA,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[eA?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,n("common.create")]})]})]})}),(0,t.jsx)(L.Dialog,{open:k,onOpenChange:e=>{w(e),e||S("")},children:(0,t.jsxs)(L.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{className:"text-rose-400",children:n("project.deleteTitle")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("project.deleteWarning",{name:e.name})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("project.deleteIrreversible")}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.deleteConfirmLabel")}),(0,t.jsx)(d.Input,{value:T,onChange:e=>S(e.target.value),placeholder:n("project.deleteConfirmPlaceholder"),className:"mt-1.5",autoFocus:!0})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>w(!1),children:n("common.cancel")}),(0,t.jsxs)(c.Button,{variant:"destructive",disabled:T!==n("project.deleteConfirmText")||P,onClick:async()=>{E(!0);try{await et(e.id),eo.toast.success(n("project.deleteSuccess")),o.push(`/workspaces/${r}`)}catch{eo.toast.error(n("project.deleteFailed"))}finally{E(!1),w(!1)}},children:[P&&(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin mr-1"}),n("project.deleteButton")]})]})]})})]})}var eb=e.i(475958),eN=e.i(313029),ev=e.i(882651),ek=e.i(259846),ew=e.i(975157);function ey({title:e,description:s,branch:a,baseBranch:r,version:n,hasConversation:l,updatedAt:o,openDir:d,onBack:m}){let{t:h}=(0,u.useI18n)();return(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Sparkles,{className:"h-3.5 w-3.5 text-primary"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-primary",children:h("taskDetail.title")})]}),(0,t.jsxs)(c.Button,{variant:"ghost",onClick:m,className:"flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground h-auto px-2 py-1",children:[(0,t.jsx)(ek.ArrowLeft,{className:"h-3.5 w-3.5"}),h("taskDetail.back")]})]}),(0,t.jsx)("h2",{className:"mt-2.5 text-lg font-bold tracking-tight text-foreground",children:e}),s&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-2",children:s}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[r?(0,t.jsxs)(P.Badge,{variant:"secondary",className:"bg-muted text-muted-foreground text-[10px] font-mono border border-border",children:[(0,t.jsx)(i.GitBranch,{className:"mr-1 h-3 w-3"}),r," · worktree"]}):a?(0,t.jsx)(P.Badge,{variant:"secondary",className:"bg-muted text-muted-foreground text-[10px] font-mono border border-border",children:h("taskDetail.directMode")}):null,n&&(0,t.jsx)(I.TaskVersionTag,{number:n.number,name:n.name,showName:!0}),l&&(0,t.jsx)(P.Badge,{variant:"secondary",className:"bg-emerald-500/10 text-emerald-400 text-[10px] border border-emerald-500/20",children:h("taskDetail.hasConversation")}),(0,t.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[h("taskDetail.updatedAt")," ",(0,ew.formatRelativeTime)(o)]}),d&&(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-0.5",children:[(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,er.openInFileManager)(d)}catch(e){console.error("openInFileManager failed:",e),eo.toast.error(h("git.openInFileManagerFailed"))}},children:(0,t.jsx)(K.FolderSearch,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(x.TooltipContent,{side:"bottom",children:h("git.openInFileManager")})]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,en.openInEditor)(d)}catch(e){console.error("openInEditor failed:",e),eo.toast.error(h("git.openInEditorFailed"))}},children:(0,t.jsx)(X.Code,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(x.TooltipContent,{side:"bottom",children:h("git.openInEditor")})]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,el.openInTerminal)(d)}catch(e){console.error("openInTerminal failed:",e),eo.toast.error(h("git.openInTerminalFailed"))}},children:(0,t.jsx)(Y.Terminal,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(x.TooltipContent,{side:"bottom",children:h("git.openInTerminal")})]})]})]})]})}var eC=e.i(14842),eT=e.i(865514),eS=e.i(83434),eP=e.i(457952),eE=e.i(760264),eI=e.i(393552),eD=e.i(336543),eL=e.i(267639),eB=e.i(332739),eF=e.i(265289),eA=e.i(908006),eR=e.i(732700),eO=e.i(326883),e$=e.i(631675),eM=e.i(297338),ez=e.i(657153),eU=e.i(867533),eW=e.i(927781),eG=e.i(491578),eH=e.i(9187),eV=e.i(648426),e_=e.i(804946),eK=e.i(840086),eX=e.i(235357),eY=e.i(144640),eJ=e.i(997025),eq=e.i(937304);let eQ=/\.(txt|md|json)$/i;function eZ({taskId:e,projectId:a}){let{t:r}=(0,u.useI18n)(),l=(0,s.useRef)(null),[i,o]=(0,s.useState)([]),[d,m]=(0,s.useState)([]),[x,h]=(0,s.useState)(!1),[p,g]=(0,s.useState)(""),[f,j]=(0,s.useState)(""),[b,N]=(0,s.useState)(!1),[v,k]=(0,s.useState)(null),[w,y]=(0,s.useState)(null);async function T(){p.trim()&&(await (0,eW.createNote)({title:p.trim(),content:f.trim(),projectId:a,taskId:e,category:"task"}),g(""),j(""),h(!1),(0,eG.getTaskNotes)(e).then(o))}async function S(e){await (0,eH.deleteNote)(e),o(t=>t.filter(t=>t.id!==e))}async function P(t){let s=t.target.files?.[0];if(s){N(!0);try{let t=new FormData;t.set("file",s),t.set("projectId",a),t.set("taskId",e),await (0,e_.uploadAsset)(t),(0,eV.getTaskAssets)(e).then(m)}finally{N(!1),l.current&&(l.current.value="")}}}async function E(e){await (0,eK.deleteAsset)(e),m(t=>t.filter(t=>t.id!==e))}function I(e){return(0,eq.isImageAsset)(e.filename,e.mimeType)||eQ.test(e.filename)}function D(e){I(e)?k(e):eo.toast.info(r("assets.previewNotSupported"))}async function L(e){try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));eo.toast.error(e.error||"Failed to reveal file")}}catch{eo.toast.error("Failed to reveal file")}}(0,s.useEffect)(()=>{(0,eG.getTaskNotes)(e).then(o),(0,eV.getTaskAssets)(e).then(m)},[e]);let F=v?(0,eq.isImageAsset)(v.filename,v.mimeType)?"image":eQ.test(v.filename)?"text":null:null,A=d.filter(e=>(0,eq.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,eq.localPathToApiUrl)(e.path),filename:e.filename})),R=v?A.findIndex(e=>e.id===v.id):-1;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.ScrollArea,{className:"h-full",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(U.FileText,{className:"h-3.5 w-3.5"}),r("taskPage.notes")]}),(0,t.jsxs)(c.Button,{variant:"ghost",className:"h-6 gap-1 px-2 text-xs",onClick:()=>h(!x),children:[x?(0,t.jsx)(ez.X,{className:"h-3 w-3"}):(0,t.jsx)(n.Plus,{className:"h-3 w-3"}),x?"":r("taskPage.addNote")]})]}),x&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:r("taskPage.noteTitle"),className:"h-8 w-full rounded-md border border-border bg-background px-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary",autoFocus:!0}),(0,t.jsx)("textarea",{value:f,onChange:e=>j(e.target.value),placeholder:r("taskPage.noteContent"),rows:3,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary resize-none"}),(0,t.jsx)(c.Button,{className:"text-xs",onClick:T,disabled:!p.trim(),children:r("taskPage.addNote")})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[0===i.length&&!x&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground py-2",children:r("taskPage.noNotes")}),i.map(e=>(0,t.jsx)("div",{className:"group rounded-md border border-border bg-card p-3",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>y(e),className:"min-w-0 flex-1 cursor-pointer text-left",title:r("taskPage.previewNote"),children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate hover:underline",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-3 whitespace-pre-wrap",children:e.content}),(0,t.jsx)("p",{className:"mt-1 text-[10px] text-muted-foreground",children:new Date(e.createdAt).toLocaleString()})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>y(e),className:"text-muted-foreground hover:bg-accent",title:r("taskPage.previewNote"),children:(0,t.jsx)(eU.Eye,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>S(e.id),className:"text-muted-foreground hover:bg-destructive/10 hover:text-destructive",title:r("taskPage.deleteNote"),children:(0,t.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})})]})]})},e.id))]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(eM.Paperclip,{className:"h-3.5 w-3.5"}),r("taskPage.attachments")]}),(0,t.jsxs)(c.Button,{variant:"ghost",className:"h-6 gap-1 px-2 text-xs",onClick:()=>l.current?.click(),disabled:b,children:[(0,t.jsx)(e$.Upload,{className:"h-3 w-3"}),r("taskPage.uploadFile")]}),(0,t.jsx)("input",{ref:l,type:"file",className:"hidden",onChange:P})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-1.5",children:[0===d.length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground py-2",children:r("taskPage.noAttachments")}),d.map(e=>{var s;let a=I(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-card px-3 py-2",children:[(0,t.jsx)(eM.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>D(e),disabled:!a,className:`min-w-0 flex-1 truncate text-left text-sm ${a?"cursor-pointer hover:underline":"cursor-default"}`,title:a?r("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(s=e.size)?s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[a&&(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>D(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:r("assets.preview"),children:(0,t.jsx)(eU.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>L(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:r("assets.revealInFinder"),children:(0,t.jsx)(W.FolderOpen,{className:"h-3 w-3"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>E(e.id),className:"shrink-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",title:r("taskPage.deleteAttachment"),children:(0,t.jsx)(C.Trash2,{className:"h-3 w-3"})})]})]},e.id)})]})]})]})}),(0,t.jsx)(eX.ImageLightbox,{imageUrl:"image"===F&&R>=0?A[R].url:null,filename:"image"===F&&R>=0?A[R].filename:"",open:"image"===F,onOpenChange:e=>{e||k(null)},assets:A.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:R>=0?R:void 0,onIndexChange:e=>{let t=A[e];if(!t)return;let s=d.find(e=>e.id===t.id);s&&k(s)}}),(0,t.jsx)(eY.TextPreviewDialog,{url:"text"===F&&v?(0,eq.localPathToApiUrl)(v.path):null,filename:v?.filename??"",open:"text"===F,onOpenChange:e=>{e||k(null)}}),(0,t.jsx)(eJ.NotePreviewDialog,{note:w,open:null!==w,onOpenChange:e=>{e||y(null)}})]})}function e0({task:e,workspaceId:r,projectLocalPath:n,onClose:l}){let{t:i}=(0,u.useI18n)(),o=(0,a.useRouter)(),{removePortal:d}=(0,eS.useTerminalPortal)(),[h,p]=(0,s.useState)("terminal"),[g,f]=(0,s.useState)(null),[j,b]=(0,s.useState)(!1),[N,v]=(0,s.useState)(e.status);(0,s.useEffect)(()=>{v(e.status)},[e.status]);let[k,w]=(0,s.useState)(null),[y,C]=(0,s.useState)(!1),[T,S]=(0,s.useState)(!1),[P,E]=(0,s.useState)([]);(0,s.useEffect)(()=>{w(null),C(!1),S(!1),E([]),f(null),p("terminal")},[e.id]);let[I,D]=(0,s.useState)([]),[L,F]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(0,eR.getPrompts)().then(t=>{if(e)return;D(t.map(e=>({id:e.id,name:e.name,isDefault:e.isDefault})));let s=t.find(e=>e.isDefault);s&&F(s.id)}),()=>{e=!0}},[]),(0,s.useEffect)(()=>{w(null),S(!1);let t=!1;return(0,eP.getTaskExecutions)(e.id).then(e=>{if(t)return;let s=e[0];if(s?.status==="RUNNING"){let e=s.worktreePath||n||null;e&&w(e)}E(e.filter(e=>"RUNNING"!==e.status)),S(!0)}),()=>{t=!0}},[e.id]),(0,s.useEffect)(()=>{if("changes"!==h||"TODO"===N||"CANCELLED"===N)return;let t=!1;return b(!0),fetch(`/api/tasks/${e.id}/diff`).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{t||f(e?.files||e?.branchDeleted?e:null)}).catch(()=>{t||f(null)}).finally(()=>{t||b(!1)}),()=>{t=!0}},[h,N,e.id]);let A=(0,s.useCallback)(async()=>{if(!y){C(!0),d(e.id);try{let t=await (0,eE.startPtyExecutionSafe)(e.id,"",L);if(!t.ok){C(!1),eo.toast.error(t.error||i("terminal.startFailed"));return}w(t.worktreePath??null),v("IN_PROGRESS")}catch(e){C(!1),eo.toast.error(e instanceof Error&&e.message?e.message:i("terminal.startFailed"))}}},[e.id,y,L,i]),R=(0,s.useCallback)(t=>{C(!1),w(null),d(e.id),0===t&&v("IN_REVIEW"),(0,eP.getTaskExecutions)(e.id).then(e=>{E(e.filter(e=>"RUNNING"!==e.status))}),o.refresh()},[o,e.id]),O=(0,s.useCallback)(async()=>{await (0,eI.stopPtyExecution)(e.id),C(!1),d(e.id),w(null),v("IN_REVIEW"),(0,eP.getTaskExecutions)(e.id).then(e=>{E(e.filter(e=>"RUNNING"!==e.status))}),o.refresh()},[e.id,o]),$=(0,s.useCallback)(async t=>{C(!0),d(e.id),w(null);try{let{worktreePath:s}=await (0,eD.resumePtyExecution)(e.id,t);w(s),v("IN_PROGRESS")}catch{C(!1)}},[e.id,d]),M=(0,s.useCallback)(async()=>{C(!0),d(e.id),w(null);try{let{worktreePath:t}=await (0,eL.continueLatestPtyExecution)(e.id);w(t),v("IN_PROGRESS")}catch(e){C(!1),eo.toast.error(e instanceof Error?e.message:String(e))}},[e.id,d]),[z,W]=(0,s.useState)(!1),[G,H]=(0,s.useState)([]),_=(0,s.useCallback)(async()=>{try{let t=await (0,eF.checkWorktreeClean)(e.id);if(t.hasWorktree&&!t.clean)return void eo.toast.error(i("taskPage.uncommittedChanges",{count:String(t.files.length)}));if(t.hasWorktree&&t.clean&&!t.hasCommits)return void eo.toast.error(i("taskPage.noChangesToComplete"),{action:{label:i("taskPage.markAsCancelled"),onClick:()=>{(0,eB.updateTaskStatus)(e.id,"CANCELLED").then(()=>{v("CANCELLED"),eo.toast.success(i("taskPage.taskCancelled")),o.refresh()}).catch(()=>eo.toast.error("Failed to cancel task"))}}});if(t.hasWorktree&&t.hasCommits){H(t.commitLog),W(!0);return}await (0,eB.updateTaskStatus)(e.id,"DONE"),v("DONE"),eo.toast.success(i("taskPage.taskCompleted")),o.refresh()}catch{eo.toast.error("Failed to complete task")}},[e.id,o,i]),K=(0,s.useCallback)(()=>{v("DONE"),W(!1),eo.toast.success(i("taskPage.taskCompleted")),o.refresh()},[o,i]),X=(0,s.useCallback)(async t=>{try{let{hash:s}=await (0,eA.commitWorktreeChanges)(e.id,t);eo.toast.success(i("diff.commitSuccess",{hash:s})),o.refresh();let a=await fetch(`/api/tasks/${e.id}/diff`);if(a.ok){let e=await a.json();f(e?.files?e:null)}}catch(e){eo.toast.error(e instanceof Error?e.message:"Commit failed")}},[e.id,o,i]);return(0,t.jsxs)("div",{className:"flex h-full w-[600px] flex-shrink-0 flex-col border-l border-border bg-sidebar","data-testid":"task-detail-panel",children:[(0,t.jsx)(ey,{title:e.title,description:i("taskDetail.panelDescription"),branch:`task/${e.id}`,baseBranch:e.baseBranch,version:e.version??null,hasConversation:!1,updatedAt:e.updatedAt,openDir:k??(n?e.subPath?`${n}/${e.subPath}`:n:null),onBack:l}),(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-2",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)("button",{onClick:()=>p("terminal"),className:`flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded-md ${"terminal"===h?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(Y.Terminal,{className:"h-3 w-3"}),i("terminal.execute")]}),(0,t.jsx)("button",{onClick:()=>p("changes"),className:`px-3 py-1 text-xs font-medium rounded-md ${"changes"===h?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:i("taskPage.changes")}),(0,t.jsxs)("button",{onClick:()=>p("notes"),className:`flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded-md ${"notes"===h?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(U.FileText,{className:"h-3 w-3"}),i("taskPage.notes")]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["IN_REVIEW"===N&&(0,t.jsxs)(c.Button,{size:"sm",onClick:_,className:"bg-emerald-500/15 text-emerald-400 ring-1 ring-emerald-500/20 hover:bg-emerald-500/25",children:[(0,t.jsx)(ev.CheckCircle2,{className:"h-3 w-3"}),i("taskPage.completeTask")]}),"DONE"!==N&&"CANCELLED"!==N&&(0,t.jsxs)(c.Button,{variant:"ghost",size:"sm",onClick:()=>o.push(`/workspaces/${r}/tasks/${e.id}`),className:"text-muted-foreground",children:[(0,t.jsx)(eb.ExternalLink,{className:"h-3 w-3"}),i("taskPage.viewDetails")]})]})]}),"terminal"===h?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:T?k?(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"shrink-0 flex items-center justify-between border-b border-neutral-800 px-3 py-2 bg-[#0f1419]",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-emerald-400",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"}),i("execution.running")]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsxs)(x.TooltipTrigger,{onClick:O,className:"flex items-center gap-1.5 rounded-md bg-red-500/15 px-3 py-1 text-xs font-medium text-red-400 hover:bg-red-500/25 transition-colors",children:[(0,t.jsx)(eN.Square,{className:"h-3 w-3"}),i("terminal.stopExecution")]}),(0,t.jsx)(x.TooltipContent,{side:"bottom",children:i("terminal.stopHint")})]})]}),(0,t.jsx)("div",{className:"flex-1 min-h-0",children:(0,t.jsx)(eS.TerminalOutlet,{taskId:e.id,worktreePath:k,onSessionEnd:R})})]}):"DONE"===N||"CANCELLED"===N?(0,t.jsx)("div",{className:"flex h-full flex-col overflow-hidden",children:(0,t.jsx)(B.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)(eO.ExecutionTimeline,{executions:P})})}):(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"shrink-0 flex items-center gap-2 border-b border-border px-4 py-3",children:[I.length>0&&(0,t.jsxs)(m.Select,{defaultValue:L??"none",onValueChange:e=>F("none"===e?null:e),children:[(0,t.jsx)(m.SelectTrigger,{size:"sm",className:"min-w-[120px]",children:(0,t.jsx)("span",{className:"text-left truncate",children:L?I.find(e=>e.id===L)?.name??i("terminal.noPrompt"):i("terminal.noPrompt")})}),(0,t.jsxs)(m.SelectContent,{className:"min-w-[200px]",children:[(0,t.jsx)(m.SelectItem,{value:"none",children:i("terminal.noPrompt")}),I.map(e=>(0,t.jsxs)(m.SelectItem,{value:e.id,children:[e.name,e.isDefault?" ★":""]},e.id))]})]},`prompt-${I.length}`),(0,t.jsxs)(c.Button,{onClick:A,disabled:y,size:"sm",className:"gap-2 px-4",children:[y?(0,t.jsx)(V.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(Y.Terminal,{className:"h-3.5 w-3.5"}),y?i("terminal.executing"):i("terminal.launch")]})]}),(0,t.jsx)(B.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)(eO.ExecutionTimeline,{executions:P,onResume:$,onContinueLatest:M})})]}):(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 bg-[#0f1419]",children:[(0,t.jsx)(V.Loader2,{className:"size-5 animate-spin text-neutral-500"}),(0,t.jsx)("span",{className:"text-xs text-neutral-500",children:i("execution.loading")})]})}):"changes"===h?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:j?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.loadingDiff")})}):g?.branchDeleted?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.branchDeleted")})}):g?(0,t.jsx)(eC.TaskDiffView,{taskId:e.id,files:g.files,totalAdded:g.totalAdded,totalRemoved:g.totalRemoved,hasConflicts:g.hasConflicts,conflictFiles:g.conflictFiles,onCommit:X,hasUncommitted:g.hasUncommitted}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noChanges")})})}):"notes"===h?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,t.jsx)(eZ,{taskId:e.id,projectId:e.projectId})}):null,(0,t.jsx)(eT.TaskMergeConfirmDialog,{open:z,onOpenChange:W,taskId:e.id,taskTitle:e.title,baseBranch:e.baseBranch??"main",fileCount:g?.files?.length??0,commitCount:g?.commitCount??0,commitLog:G,onMergeComplete:K})]})}var e1=e.i(812494),e5=e.i(557082);let e3=(0,Q.createServerReference)("40396fea8de05006bf9af23d47754c92e20099807a",Q.callServer,void 0,Q.findSourceMapURL,"deleteTask"),e2=(0,Q.createServerReference)("403b928263920b2aa0280c225175ff9d208fda0109",Q.callServer,void 0,Q.findSourceMapURL,"toggleTaskPinned");var e4=e.i(871254);let e8=(0,Q.createServerReference)("4032ae7d74eb777aa91dcbffe35d7f9f37e86aebdb",Q.callServer,void 0,Q.findSourceMapURL,"getVersionsForPicker");var e7=e.i(889620),e6=e.i(19671);function e9({project:e,isActive:s,onSelect:a}){let{t:r}=(0,u.useI18n)(),n=e.totalTasks,l=e.runningTasks,i=n>0?Math.round(l/n*100):0,o=(0,t.jsxs)("button",{onClick:()=>{s||a(e.id)},className:`group flex w-[212px] shrink-0 items-center gap-2 rounded-lg border-b-2 px-3 py-1.5 text-left transition-colors ${s?"border-primary bg-primary/10 ring-1 ring-primary/20 cursor-default":"border-transparent hover:bg-accent cursor-pointer"}`,children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:`w-full truncate text-sm font-medium leading-tight ${s?"text-primary":"text-muted-foreground group-hover:text-foreground"}`,children:e.name}),e.alias&&(0,t.jsx)("span",{className:"w-full truncate text-[11px] font-normal leading-tight text-muted-foreground/70",children:e.alias})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-baseline rounded-md border border-border bg-card px-1.5 py-0.5 font-mono text-[11px] font-semibold leading-none",children:[(0,t.jsx)("span",{className:"text-amber-500 dark:text-amber-400",children:l}),(0,t.jsx)("span",{className:"mx-px text-muted-foreground/50",children:"/"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:n})]})]});return(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:o}),(0,t.jsxs)(x.TooltipContent,{side:"bottom",hideArrow:!0,className:"flex w-[268px] max-w-none flex-col items-stretch gap-0 rounded-xl border border-border bg-card p-3.5 text-foreground shadow-lg",children:[(0,t.jsx)("div",{className:"text-[13px] font-bold leading-snug break-words",children:e.name}),e.alias&&(0,t.jsx)("div",{className:"mt-0.5 text-[11.5px] leading-relaxed text-muted-foreground break-words",children:e.alias}),(0,t.jsx)("div",{className:"my-2.5 h-px bg-border"}),(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-amber-500 dark:bg-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold",children:r("board.running")}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:r("board.runningDesc")}),(0,t.jsx)("span",{className:"ml-auto font-mono text-[15px] font-bold text-amber-500 dark:text-amber-400",children:l})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-sky-500 dark:bg-sky-400"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold",children:r("board.overview")}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:r("board.totalDesc")}),(0,t.jsx)("span",{className:"ml-auto font-mono text-[15px] font-bold",children:n})]}),(0,t.jsx)("div",{className:"mt-2.5 h-[5px] overflow-hidden rounded-full bg-sky-500/15 dark:bg-sky-400/15",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-amber-500 dark:bg-amber-400",style:{width:`${i}%`}})}),(0,t.jsx)("div",{className:"mt-2.5 text-[10px] text-muted-foreground",children:r("board.badgeFormatHint")})]})]})}function te({projects:e,activeProjectId:a,onSelect:r}){let n=(0,s.useRef)(null),[l,i]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),d=()=>{let e=n.current;e&&(i(e.scrollLeft>0),c(e.scrollLeft<e.scrollWidth-e.clientWidth-1))};(0,s.useEffect)(()=>{d();let e=n.current;if(e){e.addEventListener("scroll",d);let t=new ResizeObserver(d);return t.observe(e),()=>{e.removeEventListener("scroll",d),t.disconnect()}}},[e]);let m=e=>{let t=n.current;t&&t.scrollBy({left:"left"===e?-150:150,behavior:"smooth"})};return(0,t.jsxs)("div",{className:"relative flex items-center",children:[l&&(0,t.jsx)("button",{onClick:()=>m("left"),className:"absolute left-0 z-10 flex h-8 w-8 items-center justify-center rounded-md bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border backdrop-blur-sm transition-colors hover:text-foreground",children:(0,t.jsx)(e6.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{ref:n,className:"flex items-center gap-1.5 overflow-x-auto scrollbar-none px-1 py-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map(e=>(0,t.jsx)(e9,{project:e,isActive:a===e.id,onSelect:r},e.id))}),o&&(0,t.jsx)("button",{onClick:()=>m("right"),className:"absolute right-0 z-10 flex h-8 w-8 items-center justify-center rounded-md bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border backdrop-blur-sm transition-colors hover:text-foreground",children:(0,t.jsx)(z.ChevronRight,{className:"h-4 w-4"})})]})}var tt=e.i(759686);function ts({open:e,onOpenChange:s,taskTitle:a,uncommittedFiles:r,commitLog:n,onConfirm:l}){let{t:i}=(0,u.useI18n)(),o=r.length,d=n.length,m=0===o&&0===d;return(0,t.jsx)(L.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(L.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsxs)(L.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(tt.AlertTriangle,{className:"h-4 w-4 text-amber-400"}),i("taskCancel.title")]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-amber-500/20 bg-amber-500/10 p-3 space-y-1.5",children:[(0,t.jsx)("p",{className:"text-xs text-foreground",children:i("taskCancel.intro",{title:a})}),(0,t.jsx)("p",{className:"text-xs text-amber-300",children:i("taskCancel.irreversible")})]}),m?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("taskCancel.cleanNotice")}):(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:i("taskCancel.uncommittedFiles")}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:o})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:i("taskCancel.unmergedCommits")}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]})]}),o>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:i("taskCancel.filesList")}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:r.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),d>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:i("taskCancel.commitsList")}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:n.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1.5",children:i("taskCancel.reflogHint")})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>s(!1),children:i("taskCancel.keep")}),(0,t.jsxs)(c.Button,{variant:"destructive",onClick:l,className:"gap-2",children:[(0,t.jsx)(tt.AlertTriangle,{className:"h-4 w-4"}),i("taskCancel.confirm")]})]})]})})}e.s(["BoardPageClient",0,function({workspaceId:e,projectId:r,project:n,projects:l,initialTasks:i,labels:o,openTaskId:c}){let d=(0,a.useRouter)(),{t:m}=(0,u.useI18n)(),[,x]=(0,s.useTransition)(),[p,g]=(0,s.useState)(""),[j,b]=(0,s.useState)("all"),[N,v]=(0,s.useState)(!1),[k,w]=(0,s.useState)("TODO"),[y,C]=(0,s.useState)(c??null),[T,S]=(0,s.useState)([]),P=y?i.find(e=>e.id===y)??null:null,[E,I]=(0,s.useState)(null),[D,L]=(0,s.useState)(null),[B,F]=(0,s.useState)(null);(0,s.useEffect)(()=>{e8(r).then(S).catch(()=>S([]))},[r]),(0,s.useEffect)(()=>{(0,e7.setLastProjectId)(e,r)},[e,r]);let A=T.find(e=>e.isCurrent)?.id??null,$=(0,s.useCallback)(()=>{x(()=>{d.refresh()})},[d]);(0,s.useEffect)(()=>{if(N)return;let e=setInterval(()=>{x(()=>{d.refresh()})},5e3);return()=>clearInterval(e)},[d,N]);let M=(0,s.useCallback)(e=>{g(e)},[]),z=(0,s.useCallback)(async e=>{let t=i.find(t=>t.id===e);if(t)try{let s=await (0,eF.checkWorktreeClean)(e);if(s.hasWorktree&&!s.clean){eo.toast.error(m("taskPage.uncommittedChanges",{count:String(s.files.length)})),$();return}if(s.hasWorktree&&s.clean&&!s.hasCommits){eo.toast.error(m("taskPage.noChangesToComplete"),{action:{label:m("taskPage.markAsCancelled"),onClick:()=>{(0,eB.updateTaskStatus)(e,"CANCELLED").then(()=>{eo.toast.success(m("taskPage.taskCancelled")),$()}).catch(()=>eo.toast.error("Failed to cancel task"))}}}),$();return}if(s.hasWorktree&&s.hasCommits){L({task:t,commitLog:s.commitLog,commitCount:s.commitLog.length}),$();return}await (0,eB.updateTaskStatus)(e,"DONE"),eo.toast.success(m("taskPage.taskCompleted")),$()}catch{eo.toast.error("Failed to complete task"),$()}},[i,$,m]),U=(0,s.useCallback)(async e=>{let t=i.find(t=>t.id===e);if(t)try{let s=await (0,eF.checkWorktreeClean)(e);if(!s.hasWorktree){await (0,eB.updateTaskStatus)(e,"CANCELLED"),eo.toast.success(m("taskPage.taskCancelled")),$();return}F({task:t,files:s.files,commitLog:s.commitLog}),$()}catch{eo.toast.error("Failed to cancel task"),$()}},[i,$,m]),W=(0,s.useCallback)(async(e,t)=>{"DONE"===t?await z(e):"CANCELLED"===t?await U(e):(await (0,eB.updateTaskStatus)(e,t),$())},[$,z,U]),G=(0,s.useCallback)(async e=>{let t=await (0,e1.createTask)({title:e.title,description:e.description,projectId:r,priority:e.priority,status:e.status,labelIds:e.labelIds,baseBranch:e.baseBranch,subPath:e.subPath,versionId:e.versionId??void 0});if(e.autoStart&&t?.id)try{await (0,e4.startPtyExecution)(t.id,""),C(t.id)}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}$()},[r,$]),H=(0,s.useCallback)(async(e,t)=>{await (0,e5.updateTask)(e,{...t,labelIds:t.labelIds}),I(null),$()},[$]),V=(0,s.useCallback)(async e=>{await e3(e),y===e&&C(null),$()},[$,y]),_=(0,s.useCallback)(async e=>{await e2(e),$()},[$]),K=(0,s.useCallback)(async t=>{try{await (0,e4.startPtyExecution)(t,"")}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}d.push(`/workspaces/${e}/tasks/${t}`)},[d,e]),X=(0,s.useCallback)(async(e,t)=>{"DONE"===t?await z(e):"CANCELLED"===t?await U(e):(await (0,eB.updateTaskStatus)(e,t),$())},[$,z,U]),Y=(0,s.useCallback)(e=>{w(e),I(null),v(!0)},[]),J=(0,s.useCallback)(e=>{I(e),v(!0)},[]),q=i.filter(e=>!e.labels?.some(e=>e.label.name===f.TOWER_LABEL_NAME&&e.label.isBuiltin)).filter(e=>{if("backlog"===j){if(e.versionId)return!1}else if("all"!==j&&e.versionId!==j)return!1;if(p.trim()){let t=p.toLowerCase();if(!e.title.toLowerCase().includes(t)&&!e.description?.toLowerCase().includes(t))return!1}return!0});return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,t.jsx)("div",{className:"px-6 pt-3 pb-1",children:(0,t.jsx)(te,{projects:l,activeProjectId:r,onSelect:t=>d.push(`/workspaces/${e}?projectId=${t}`,{scroll:!1})})}),(0,t.jsx)(h,{searchQuery:p,onSearchChange:M,versions:T,versionFilter:j,onVersionFilterChange:b,versionsHref:`/workspaces/${e}/projects/${r}/versions`,onCreateTask:()=>{I(null),v(!0)}}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden p-4",children:(0,t.jsx)(R,{initialTasks:q,onTaskMove:W,onTaskClick:e=>{C(e.id)},onEditTask:J,onAddTask:Y,onDeleteTask:V,onTogglePin:_,workspaceId:e,onContextMenuStatusChange:X,onContextMenuLaunch:K})}),(0,t.jsx)(O.CreateTaskDialog,{open:N,onOpenChange:e=>{v(e),e||I(null)},onSubmit:G,onUpdate:H,defaultStatus:k,editTask:E,editTaskLabelIds:E?.labels?E.labels.map(e=>e.labelId):[],labels:o.filter(e=>!(e.name===f.TOWER_LABEL_NAME&&e.isBuiltin)),projectType:n.type,projectLocalPath:n.localPath,versions:T,defaultVersionId:A})]}),P?(0,t.jsx)(e0,{task:P,workspaceId:e,projectLocalPath:n.localPath,onClose:()=>C(null)}):(0,t.jsx)(ej,{project:n,workspaceId:e}),D&&(0,t.jsx)(eT.TaskMergeConfirmDialog,{open:!0,onOpenChange:e=>{e||L(null)},taskId:D.task.id,taskTitle:D.task.title,baseBranch:D.task.baseBranch??"main",fileCount:0,commitCount:D.commitCount,commitLog:D.commitLog,onMergeComplete:()=>{L(null),eo.toast.success(m("taskPage.taskCompleted")),$()}}),B&&(0,t.jsx)(ts,{open:!0,onOpenChange:e=>{e||F(null)},taskTitle:B.task.title,uncommittedFiles:B.files,commitLog:B.commitLog,onConfirm:()=>{let e=B.task.id;F(null),(0,eB.updateTaskStatus)(e,"CANCELLED").then(()=>{eo.toast.success(m("taskPage.taskCancelled")),$()}).catch(()=>eo.toast.error("Failed to cancel task"))}})]})}],783426)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,288649,48226,959152,331373,949962,680523,e=>{"use strict";e.s([],288649),e.i(708878);var t=e.i(965652),i=e.i(154660),n=e.i(528796),r=e.i(804849),a=e.i(462902);let o=t.createContext(void 0);e.s(["TooltipRootContext",0,o,"useTooltipRootContext",0,function(e){let i=t.useContext(o);if(void 0===i&&!e)throw Error((0,a.default)(72));return i}],48226);var l=e.i(92615),s=e.i(887642),u=e.i(682354),d=e.i(447594);function c(e){return null!=e&&null!=e.clientX}var p=e.i(594640),f=e.i(306296),v=e.i(67077),g=e.i(894621),m=e.i(585012),b=e.i(596290),C=e.i(370161),h=e.i(903224),y=e.i(611008),S=e.i(586622),x=e.i(771326),E=e.i(87396);let R={...x.popupStoreSelectors,disabled:(0,b.createSelector)(e=>e.disabled),instantType:(0,b.createSelector)(e=>e.instantType),isInstantPhase:(0,b.createSelector)(e=>e.isInstantPhase),trackCursorAxis:(0,b.createSelector)(e=>e.trackCursorAxis),disableHoverablePopup:(0,b.createSelector)(e=>e.disableHoverablePopup),lastOpenChangeReason:(0,b.createSelector)(e=>e.openChangeReason),closeOnClick:(0,b.createSelector)(e=>e.closeOnClick),closeDelay:(0,b.createSelector)(e=>e.closeDelay),hasViewport:(0,b.createSelector)(e=>e.hasViewport)};class T extends C.ReactStore{constructor(e){super({...(0,x.createInitialPopupStoreState)(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:t.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new E.PopupTriggerMap},R)}setOpen=(e,t)=>{let i=t.reason,n=i===S.REASONS.triggerHover,r=e&&i===S.REASONS.triggerFocus,a=!e&&(i===S.REASONS.triggerPress||i===S.REASONS.escapeKey);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let o=()=>{let n={open:e,openChangeReason:i};r?n.instantType="focus":a?n.instantType="dismiss":i===S.REASONS.triggerHover&&(n.instantType=void 0);let o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?m.flushSync(o):o()};static useStore(e,t){let i=(0,h.useRefWithInit)(()=>new T(t)).current,n=e??i,r=(0,y.useSyncedFloatingRootContext)({popupStore:n,onOpenChange:n.setOpen});return n.state.floatingRootContext=r,n}}e.s(["TooltipStore",0,T],959152);var O=e.i(289721);let I=(0,i.fastComponent)(function(e){let{disabled:i=!1,defaultOpen:a=!1,open:m,disableHoverablePopup:b=!1,trackCursorAxis:C="none",actionsRef:h,onOpenChange:y,onOpenChangeComplete:x,handle:E,triggerId:R,defaultTriggerId:I=null,children:P}=e,M=T.useStore(E?.store,{open:a,openProp:m,activeTriggerId:I,triggerIdProp:R});(0,n.useOnFirstRender)(()=>{void 0===m&&!1===M.state.open&&!0===a&&M.update({open:!0,activeTriggerId:I})}),M.useControlledProp("openProp",m),M.useControlledProp("triggerIdProp",R),M.useContextCallback("onOpenChange",y),M.useContextCallback("onOpenChangeComplete",x);let w=M.useState("open"),A=!i&&w,D=M.useState("activeTriggerId"),L=M.useState("payload");M.useSyncedValues({trackCursorAxis:C,disableHoverablePopup:b}),(0,r.useIsoLayoutEffect)(()=>{w&&i&&M.setOpen(!1,(0,v.createChangeEventDetails)(S.REASONS.disabled))},[w,i,M]),M.useSyncedValue("disabled",i),(0,g.useImplicitActiveTrigger)(M);let{forceUnmount:F,transitionStatus:k}=(0,g.useOpenStateTransitions)(A,M),V=M.useState("isInstantPhase"),N=M.useState("instantType"),j=M.useState("lastOpenChangeReason"),U=t.useRef(null);(0,r.useIsoLayoutEffect)(()=>{"ending"===k&&j===S.REASONS.none||"ending"!==k&&V?("delay"!==N&&(U.current=N),M.set("instantType","delay")):null!==U.current&&(M.set("instantType",U.current),U.current=null)},[k,V,j,N,M]),(0,r.useIsoLayoutEffect)(()=>{A&&null==D&&M.set("payload",void 0)},[M,D,A]);let H=t.useCallback(()=>{var e,t;let i;M.setOpen(!1,(e=M,t=S.REASONS.imperativeAction,(i=(0,v.createChangeEventDetails)(t)).preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},i))},[M]);t.useImperativeHandle(h,()=>({unmount:F,close:H}),[F,H]);let B=M.useState("floatingRootContext"),_=(0,p.useDismiss)(B,{enabled:!i,referencePress:()=>M.select("closeOnClick")}),z=function(e,i={}){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),a=n.useState("floatingElement"),o=n.useState("domReferenceElement"),p=n.context.dataRef,{enabled:f=!0,axis:v="both"}=i,g=t.useRef(!1),m=t.useRef(null),[b,C]=t.useState(),[h,y]=t.useState([]),S=(0,s.useStableCallback)((e,t,i)=>{if(!g.current&&(!p.current.openEvent||c(p.current.openEvent))){var r,a;let l,s,u;n.set("positionReference",(r=i??o,a={x:e,y:t,axis:v,dataRef:p,pointerType:b},l=null,s=null,u=!1,{contextElement:r||void 0,getBoundingClientRect(){let e=r?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===a.axis||"both"===a.axis,i="y"===a.axis||"both"===a.axis,n=["mouseenter","mousemove"].includes(a.dataRef.current.openEvent?.type||"")&&"touch"!==a.pointerType,o=e.width,d=e.height,c=e.x,p=e.y;return null==l&&a.x&&t&&(l=e.x-a.x),null==s&&a.y&&i&&(s=e.y-a.y),c-=l||0,p-=s||0,o=0,d=0,!u||n?(o="y"===a.axis?e.width:0,d="x"===a.axis?e.height:0,c=t&&null!=a.x?a.x:c,p=i&&null!=a.y?a.y:p):u&&!n&&(d="x"===a.axis?e.height:d,o="y"===a.axis?e.width:o),u=!0,{width:o,height:d,x:c,y:p,top:p,right:c+o,bottom:p+d,left:c}}}))}}),x=(0,s.useStableCallback)(e=>{r?m.current||y([]):S(e.clientX,e.clientY,e.currentTarget)}),E=(0,d.isMouseLikePointerType)(b)?a:r,R=t.useCallback(()=>{if(!E||!f)return;let e=(0,l.getWindow)(a);function t(i){let n=(0,u.getTarget)(i);(0,u.contains)(a,n)?(e.removeEventListener("mousemove",t),m.current=null):S(i.clientX,i.clientY)}if(!p.current.openEvent||c(p.current.openEvent)){e.addEventListener("mousemove",t);let i=()=>{e.removeEventListener("mousemove",t),m.current=null};return m.current=i,i}n.set("positionReference",o)},[E,f,a,p,o,n,S]);t.useEffect(()=>R(),[R,h]),t.useEffect(()=>{f&&!a&&(g.current=!1)},[f,a]),t.useEffect(()=>{!f&&r&&(g.current=!0)},[f,r]);let T=t.useMemo(()=>{function e(e){C(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:x,onMouseEnter:x}},[x]);return t.useMemo(()=>f?{reference:T,trigger:T}:{},[f,T])}(B,{enabled:!i&&"none"!==C,axis:"none"===C?void 0:C}),{getReferenceProps:Y,getFloatingProps:W,getTriggerProps:J}=(0,f.useInteractions)([_,z]),K=t.useMemo(()=>Y(),[Y]),G=t.useMemo(()=>J(),[J]),X=t.useMemo(()=>W(),[W]);return M.useSyncedValues({activeTriggerProps:K,inactiveTriggerProps:G,popupProps:X}),(0,O.jsx)(o.Provider,{value:M,children:"function"==typeof P?P({payload:L}):P})});e.s(["TooltipRoot",0,I],331373);let P=t.createContext(void 0);e.s(["TooltipProviderContext",0,P,"useTooltipProviderContext",0,function(){return t.useContext(P)}],949962);var M=e.i(161476),w=e.i(689680);let A=t.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new M.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});e.s(["FloatingDelayGroup",0,function(e){let{children:i,delay:n,timeoutMs:r=0}=e,a=t.useRef(n),o=t.useRef(n),l=t.useRef(null),s=t.useRef(null),u=(0,M.useTimeout)();return(0,O.jsx)(A.Provider,{value:t.useMemo(()=>({hasProvider:!0,delayRef:a,initialDelayRef:o,currentIdRef:l,timeoutMs:r,currentContextRef:s,timeout:u}),[r,u]),children:i})},"useDelayGroup",0,function(e,i={open:!1}){let n="rootStore"in e?e.rootStore:e,a=n.useState("floatingId"),{open:o}=i,{currentIdRef:l,delayRef:s,timeoutMs:u,initialDelayRef:d,currentContextRef:c,hasProvider:p,timeout:f}=t.useContext(A),[g,m]=t.useState(!1);return(0,r.useIsoLayoutEffect)(()=>{function e(){m(!1),c.current?.setIsInstantPhase(!1),l.current=null,c.current=null,s.current=d.current}if(l.current&&!o&&l.current===a){if(m(!1),u)return f.start(u,()=>{n.select("open")||l.current&&l.current!==a||e()}),()=>{f.clear()};e()}},[o,a,l,s,u,d,c,f,n]),(0,r.useIsoLayoutEffect)(()=>{if(!o)return;let e=c.current,t=l.current;f.clear(),c.current={onOpenChange:n.setOpen,setIsInstantPhase:m},l.current=a,s.current={open:0,close:(0,w.getDelay)(d.current,"close")},null!==t&&t!==a?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,v.createChangeEventDetails)(S.REASONS.none))):(m(!1),e?.setIsInstantPhase(!1))},[o,a,n,l,s,u,d,c,f]),(0,r.useIsoLayoutEffect)(()=>()=>{c.current=null},[c]),t.useMemo(()=>({hasProvider:p,delayRef:s,isInstantPhase:g}),[p,s,g])}],680523)},422499,e=>{"use strict";var t=e.i(965652),i=e.i(92615),n=e.i(442383),r=e.i(161476),a=e.i(102094),o=e.i(682354),l=e.i(67077),s=e.i(586622),u=e.i(990134);let d=n.isMac&&n.isSafari;e.s(["useFocus",0,function(e,n={}){let c="rootStore"in e?e.rootStore:e,{events:p,dataRef:f}=c.context,{enabled:v=!0,delay:g}=n,m=t.useRef(!1),b=t.useRef(null),C=(0,r.useTimeout)(),h=t.useRef(!0);t.useEffect(()=>{let e=c.select("domReferenceElement");if(!v)return;let t=(0,i.getWindow)(e);function n(){let e=c.select("domReferenceElement");!c.select("open")&&(0,i.isHTMLElement)(e)&&e===(0,o.activeElement)((0,a.ownerDocument)(e))&&(m.current=!0)}function r(){h.current=!0}function l(){h.current=!1}return t.addEventListener("blur",n),d&&(t.addEventListener("keydown",r,!0),t.addEventListener("pointerdown",l,!0)),()=>{t.removeEventListener("blur",n),d&&(t.removeEventListener("keydown",r,!0),t.removeEventListener("pointerdown",l,!0))}},[c,v]),t.useEffect(()=>{if(v)return p.on("openchange",e),()=>{p.off("openchange",e)};function e(e){if(e.reason===s.REASONS.triggerPress||e.reason===s.REASONS.escapeKey){let e=c.select("domReferenceElement");(0,i.isElement)(e)&&(b.current=e,m.current=!0)}}},[p,v,c]);let y=t.useMemo(()=>({onMouseLeave(){m.current=!1,b.current=null},onFocus(e){let t=e.currentTarget;if(m.current){if(b.current===t)return;m.current=!1,b.current=null}let n=(0,o.getTarget)(e.nativeEvent);if((0,i.isElement)(n)){if(d&&!e.relatedTarget){if(!h.current&&!(0,o.isTypeableElement)(n))return}else if(!(0,o.matchesFocusVisible)(n))return}let r=(0,o.isTargetInsideEnabledTrigger)(e.relatedTarget,c.context.triggerElements),{nativeEvent:a,currentTarget:u}=e,p="function"==typeof g?g():g;c.select("open")&&r||0===p||void 0===p?c.setOpen(!0,(0,l.createChangeEventDetails)(s.REASONS.triggerFocus,a,u)):C.start(p,()=>{m.current||c.setOpen(!0,(0,l.createChangeEventDetails)(s.REASONS.triggerFocus,a,u))})},onBlur(e){m.current=!1,b.current=null;let t=e.relatedTarget,n=e.nativeEvent,r=(0,i.isElement)(t)&&t.hasAttribute((0,u.createAttribute)("focus-guard"))&&"outside"===t.getAttribute("data-type");C.start(0,()=>{let e=c.select("domReferenceElement"),i=(0,o.activeElement)(e?e.ownerDocument:document);if(!t&&i===e||(0,o.contains)(f.current.floatingContext?.refs.floating.current,i)||(0,o.contains)(e,i)||r)return;let a=t??i;(0,o.isTargetInsideEnabledTrigger)(a,c.context.triggerElements)||c.setOpen(!1,(0,l.createChangeEventDetails)(s.REASONS.triggerFocus,n))})}}),[f,c,C,g]);return t.useMemo(()=>v?{reference:y,trigger:y}:{},[v,y])}])},746798,e=>{"use strict";var t,i,n=e.i(289721);e.i(288649);var r=e.i(331373);e.i(708878);var a=e.i(462902),o=e.i(965652),l=e.i(154660),s=e.i(48226),u=e.i(845756),d=e.i(581263),c=e.i(894621),p=e.i(207516),f=e.i(949962),v=e.i(660272),g=e.i(680523),m=e.i(422499),b=e.i(411657);let C=((t={})[t.popupOpen=u.CommonTriggerDataAttributes.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t),h=(0,l.fastComponentRef)(function(e,t){let{className:i,render:n,handle:r,payload:l,disabled:h,delay:y,closeOnClick:S=!0,closeDelay:x,id:E,...R}=e,T=(0,s.useTooltipRootContext)(!0),O=r?.store??T;if(!O)throw Error((0,a.default)(82));let I=(0,p.useBaseUiId)(E),P=O.useState("isTriggerActive",I),M=O.useState("isOpenedByTrigger",I),w=O.useState("floatingRootContext"),A=o.useRef(null),D=y??600,L=x??0,{registerTrigger:F,isMountedByThisTrigger:k}=(0,c.useTriggerDataForwarding)(I,A,O,{payload:l,closeOnClick:S,closeDelay:L}),V=(0,f.useTooltipProviderContext)(),{delayRef:N,isInstantPhase:j,hasProvider:U}=(0,g.useDelayGroup)(w,{open:M});O.useSyncedValue("isInstantPhase",j);let H=O.useState("disabled"),B=h??H,_=O.useState("trackCursorAxis"),z=O.useState("disableHoverablePopup"),Y=(0,b.useHoverReferenceInteraction)(w,{enabled:!B,mouseOnly:!0,move:!1,handleClose:z||"both"===_?null:(0,v.safePolygon)(),restMs(){let e=V?.delay,t="object"==typeof N.current?N.current.open:void 0,i=D;return U&&(i=0!==t?y??e??D:0),i},delay(){let e="object"==typeof N.current?N.current.close:void 0,t=L;return null==x&&U&&(t=e),{close:t}},triggerElementRef:A,isActiveTrigger:P}),W=(0,m.useFocus)(w,{enabled:!B}).reference,J=O.useState("triggerProps",k);return(0,d.useRenderElement)("button",e,{state:{open:M},ref:[t,F,A],props:[Y,W,J,{onPointerDown(){O.set("closeOnClick",S)},id:I,[C.triggerDisabled]:B?"":void 0},R],stateAttributesMapping:u.triggerOpenStateMapping})}),y=o.createContext(void 0);var S=e.i(585012),x=e.i(888393);let E=o.forwardRef(function(e,t){let{children:i,container:r,className:a,render:l,...s}=e,{portalNode:u,portalSubtree:d}=(0,x.useFloatingPortalNode)({container:r,ref:t,componentProps:e,elementProps:s});return d||u?(0,n.jsxs)(o.Fragment,{children:[d,u&&S.createPortal(i,u)]}):null}),R=o.forwardRef(function(e,t){let{keepMounted:i=!1,...r}=e;return(0,s.useTooltipRootContext)().useState("mounted")||i?(0,n.jsx)(y.Provider,{value:i,children:(0,n.jsx)(E,{ref:t,...r})}):null}),T=o.createContext(void 0);function O(){let e=o.useContext(T);if(void 0===e)throw Error((0,a.default)(71));return e}var I=e.i(887943),P=e.i(693354),M=e.i(431362),w=e.i(808754);let A=o.forwardRef(function(e,t){let{render:i,className:r,anchor:l,positionMethod:c="absolute",side:p="top",align:f="center",sideOffset:v=0,alignOffset:g=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:C=5,sticky:h=!1,disableAnchorTracking:S=!1,collisionAvoidance:x=P.POPUP_COLLISION_AVOIDANCE,...E}=e,R=(0,s.useTooltipRootContext)(),O=function(){let e=o.useContext(y);if(void 0===e)throw Error((0,a.default)(70));return e}(),A=R.useState("open"),D=R.useState("mounted"),L=R.useState("trackCursorAxis"),F=R.useState("disableHoverablePopup"),k=R.useState("floatingRootContext"),V=R.useState("instantType"),N=R.useState("transitionStatus"),j=R.useState("hasViewport"),U=(0,I.useAnchorPositioning)({anchor:l,positionMethod:c,floatingRootContext:k,mounted:D,side:p,sideOffset:v,align:f,alignOffset:g,collisionBoundary:m,collisionPadding:b,sticky:h,arrowPadding:C,disableAnchorTracking:S,keepMounted:O,collisionAvoidance:x,adaptiveOrigin:j?M.adaptiveOrigin:void 0}),H=o.useMemo(()=>{let e={};return(!A||"both"===L||F)&&(e.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...U.positionerStyles,...e}}},[A,L,F,D,U.positionerStyles]),B=o.useMemo(()=>({open:A,side:U.side,align:U.align,anchorHidden:U.anchorHidden,instant:"none"!==L?"tracking-cursor":V}),[A,U.side,U.align,U.anchorHidden,L,V]),_=o.useMemo(()=>({...B,arrowRef:U.arrowRef,arrowStyles:U.arrowStyles,arrowUncentered:U.arrowUncentered}),[B,U.arrowRef,U.arrowStyles,U.arrowUncentered]),z=(0,d.useRenderElement)("div",e,{state:B,props:[H,(0,w.getDisabledMountTransitionStyles)(N),E],ref:[t,R.useStateSetter("positionerElement")],stateAttributesMapping:u.popupStateMapping});return(0,n.jsx)(T.Provider,{value:_,children:z})});var D=e.i(809058),L=e.i(504068),F=e.i(511980);let k={...u.popupStateMapping,...D.transitionStatusMapping},V=o.forwardRef(function(e,t){let{className:i,render:n,...r}=e,a=(0,s.useTooltipRootContext)(),{side:o,align:l}=O(),u=a.useState("open"),c=a.useState("instantType"),p=a.useState("transitionStatus"),f=a.useState("popupProps"),v=a.useState("floatingRootContext");(0,L.useOpenChangeComplete)({open:u,ref:a.context.popupRef,onComplete(){u&&a.context.onOpenChangeComplete?.(!0)}});let g=a.useState("disabled"),m=a.useState("closeDelay");return(0,F.useHoverFloatingInteraction)(v,{enabled:!g,closeDelay:m}),(0,d.useRenderElement)("div",e,{state:{open:u,side:o,align:l,instant:c,transitionStatus:p},ref:[t,a.context.popupRef,a.useStateSetter("popupElement")],props:[f,(0,w.getDisabledMountTransitionStyles)(p),r],stateAttributesMapping:k})}),N=o.forwardRef(function(e,t){let{className:i,render:n,...r}=e,a=(0,s.useTooltipRootContext)().useState("instantType"),{open:o,arrowRef:l,side:c,align:p,arrowUncentered:f,arrowStyles:v}=O();return(0,d.useRenderElement)("div",e,{state:{open:o,side:c,align:p,uncentered:f,instant:a},ref:[t,l],props:[{style:v,"aria-hidden":!0},r],stateAttributesMapping:u.popupStateMapping})}),j=((i={}).popupWidth="--popup-width",i.popupHeight="--popup-height",i);var U=e.i(203667);let H={activationDirection:e=>e?{"data-activation-direction":e}:null},B=o.forwardRef(function(e,t){let{render:i,className:n,children:r,...a}=e,o=(0,s.useTooltipRootContext)(),l=O(),u=o.useState("instantType"),{children:c,state:p}=(0,U.usePopupViewport)({store:o,side:l.side,cssVars:j,children:r}),f={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:u};return(0,d.useRenderElement)("div",e,{state:f,ref:t,props:[a,{children:c}],stateAttributesMapping:H})});var _=e.i(959152),z=e.i(67077),Y=e.i(586622);class W{constructor(){this.store=new _.TooltipStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,a.default)(81,e));this.store.setOpen(!0,(0,z.createChangeEventDetails)(Y.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,z.createChangeEventDetails)(Y.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,N,"Handle",0,W,"Popup",0,V,"Portal",0,R,"Positioner",0,A,"Provider",0,function(e){let{delay:t,closeDelay:i,timeout:r=400}=e,a=o.useMemo(()=>({delay:t,closeDelay:i}),[t,i]),l=o.useMemo(()=>({open:t,close:i}),[t,i]);return(0,n.jsx)(f.TooltipProviderContext.Provider,{value:a,children:(0,n.jsx)(g.FloatingDelayGroup,{delay:l,timeoutMs:r,children:e.children})})},"Root",()=>r.TooltipRoot,"Trigger",0,h,"Viewport",0,B,"createHandle",0,function(){return new W}],823764);var J=e.i(823764),J=J,K=e.i(975157);e.s(["Tooltip",0,function({...e}){return(0,n.jsx)(J.Root,{"data-slot":"tooltip",...e})},"TooltipContent",0,function({className:e,side:t="top",sideOffset:i=4,align:r="center",alignOffset:a=0,hideArrow:o=!1,children:l,...s}){return(0,n.jsx)(J.Portal,{children:(0,n.jsx)(J.Positioner,{align:r,alignOffset:a,side:t,sideOffset:i,className:"isolate z-50",children:(0,n.jsxs)(J.Popup,{"data-slot":"tooltip-content",className:(0,K.cn)("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...s,children:[l,!o&&(0,n.jsx)(J.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})},"TooltipProvider",0,function({delay:e=0,...t}){return(0,n.jsx)(J.Provider,{"data-slot":"tooltip-provider",delay:e,...t})},"TooltipTrigger",0,function({...e}){return(0,n.jsx)(J.Trigger,{"data-slot":"tooltip-trigger",...e})}],746798)},232545,e=>{"use strict";let t=(0,e.i(572989).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],232545)},538059,(e,t,i)=>{t.exports=e.r(322195)},314757,e=>{"use strict";var t=e.i(965652);e.s(["useControlled",0,function({controlled:e,default:i,name:n,state:r="value"}){let{current:a}=t.useRef(void 0!==e),[o,l]=t.useState(i),s=t.useCallback(e=>{a||l(e)},[]);return[a?e:o,s]}])},584191,e=>{"use strict";e.s([])},890514,551974,e=>{"use strict";e.i(708878);var t,i=e.i(462902),n=e.i(965652),r=e.i(954588);let a=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),o={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},l={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},s={disabled:!1,...l};e.s(["DEFAULT_FIELD_ROOT_STATE",0,s,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,l,"DEFAULT_VALIDITY_STATE",0,o,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[a.valid]:""}:{[a.invalid]:""}}],551974);let u=n.createContext({invalid:void 0,name:void 0,validityData:{state:o,errors:[],error:"",value:"",initialValue:null},setValidityData:r.NOOP,disabled:void 0,touched:l.touched,setTouched:r.NOOP,dirty:l.dirty,setDirty:r.NOOP,filled:l.filled,setFilled:r.NOOP,focused:l.focused,setFocused:r.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:s,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=r.EMPTY_OBJECT)=>e,getInputValidationProps:(e=r.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});e.s(["FieldRootContext",0,u,"useFieldRootContext",0,function(e=!0){let t=n.useContext(u);if(t.setValidityData===r.NOOP&&!e)throw Error((0,i.default)(28));return t}],890514)},350105,e=>{"use strict";var t=e.i(462902),i=e.i(965652);let n=i.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});e.s(["useFieldsetRootContext",0,function(e=!1){let r=i.useContext(n);if(!r&&!e)throw Error((0,t.default)(86));return r}])},571870,e=>{"use strict";var t=e.i(965652),i=e.i(954588);let n=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:i.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(n)}])},179279,e=>{"use strict";var t=e.i(965652),i=e.i(954588);let n=t.createContext({controlId:void 0,registerControlId:i.NOOP,labelId:void 0,setLabelId:i.NOOP,messageIds:[],setMessageIds:i.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,n,"useLabelableContext",0,function(){return t.useContext(n)}])},137122,e=>{"use strict";var t=e.i(965652),i=e.i(887642),n=e.i(903224),r=e.i(565455),a=e.i(207516),o=e.i(179279),l=e.i(289721);e.s(["LabelableProvider",0,function(e){let s=(0,a.useBaseUiId)(),u=void 0===e.controlId?s:e.controlId,[d,c]=t.useState(u),[p,f]=t.useState(e.labelId),[v,g]=t.useState([]),m=(0,n.useRefWithInit)(()=>new Map),{messageIds:b}=(0,o.useLabelableContext)(),C=(0,i.useStableCallback)((e,t)=>{let i=m.current;void 0===t?i.delete(e):(i.set(e,t),c(e=>{let t;if(0!==i.size){for(let n of i.values()){if(void 0!==e&&n===e)return e;void 0===t&&(t=n)}return t}}))}),h=t.useCallback(e=>(0,r.mergeProps)({"aria-describedby":b.concat(v).join(" ")||void 0},e),[b,v]),y=t.useMemo(()=>({controlId:d,registerControlId:C,labelId:p,setLabelId:f,messageIds:v,setMessageIds:g,getDescriptionProps:h}),[d,C,p,f,v,g,h]);return(0,l.jsx)(o.LabelableContext.Provider,{value:y,children:e.children})}])},956181,e=>{"use strict";e.s(["getCombinedFieldValidityData",0,function(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}])},770652,e=>{"use strict";e.i(708878);var t=e.i(965652),i=e.i(887642),n=e.i(890514),r=e.i(551974),a=e.i(350105),o=e.i(571870),l=e.i(137122),s=e.i(581263),u=e.i(954588),d=e.i(161476),c=e.i(179279),p=e.i(565455),f=e.i(956181);let v=Object.keys(r.DEFAULT_VALIDITY_STATE);var g=e.i(289721);let m=t.forwardRef(function(e,l){let{errors:m,validationMode:b,submitAttemptedRef:C}=(0,o.useFormContext)(),{render:h,className:y,validate:S,validationDebounceTime:x=0,validationMode:E=b,name:R,disabled:T=!1,invalid:O,dirty:I,touched:P,actionsRef:M,...w}=e,{disabled:A}=(0,a.useFieldsetRootContext)(),D=(0,i.useStableCallback)(S||(()=>null)),L=A||T,[F,k]=t.useState(!1),[V,N]=t.useState(!1),[j,U]=t.useState(!1),[H,B]=t.useState(!1),_=I??V,z=P??F,Y=t.useRef(!1),W=(0,i.useStableCallback)(e=>{void 0===I&&(e&&(Y.current=!0),N(e))}),J=(0,i.useStableCallback)(e=>{void 0===P&&k(e)}),K=(0,i.useStableCallback)(()=>"onChange"===E||"onSubmit"===E&&C.current),G=!!R&&Object.hasOwn(m,R)&&void 0!==m[R],X=!0===O||G,[q,Q]=t.useState({state:r.DEFAULT_VALIDITY_STATE,error:"",errors:[],value:null,initialValue:null}),Z=!X&&q.state.valid,$=t.useMemo(()=>({disabled:L,touched:z,dirty:_,valid:Z,filled:j,focused:H}),[L,z,_,Z,j,H]),ee=function(e){let{formRef:n,clearErrors:a}=(0,o.useFormContext)(),{setValidityData:l,validate:s,validityData:g,validationDebounceTime:m,invalid:b,markedDirtyRef:C,state:h,name:y,shouldValidateOnChange:S}=e,{controlId:x,getDescriptionProps:E}=(0,c.useLabelableContext)(),R=(0,d.useTimeout)(),T=t.useRef(null),O=(0,i.useStableCallback)(async(e,t=!1)=>{let i,a=T.current;if(!a)return;if(t){if(!1!==h.valid)return;let t=a.validity;if(!t.valueMissing){let t={value:e,state:{...r.DEFAULT_VALIDITY_STATE,valid:!0},error:"",errors:[],initialValue:g.initialValue};if(a.setCustomValidity(""),x){let e=n.current.fields.get(x);e&&n.current.fields.set(x,{...e,...(0,f.getCombinedFieldValidityData)(t,!1)})}l(t);return}let i=v.reduce((e,i)=>(e[i]=t[i],e),{});if(!i.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let i of v)"valid"!==i&&("valueMissing"===i&&(t=e[i]),e[i]&&(t=!1));return t}(i))return}R.clear();let o=null,u=[],d=function(e){let t=v.reduce((t,i)=>(t[i]=e.validity[i],t),{}),i=!1;for(let e of v)if("valid"!==e){if("valueMissing"===e&&t[e])i=!0;else if(t[e])return t}return i&&!C.current&&(t.valid=!0,t.valueMissing=!1),t}(a),c=S();if(a.validationMessage&&!c)i=a.validationMessage,u=[a.validationMessage];else{let t=s(e,Array.from(n.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));null!==(o="object"==typeof t&&null!==t&&"then"in t?await t:t)?(d.valid=!1,d.customError=!0,Array.isArray(o)?(u=o,a.setCustomValidity(o.join("\n"))):o&&(u=[o],a.setCustomValidity(o))):c&&(a.setCustomValidity(""),d.customError=!1,a.validationMessage?(i=a.validationMessage,u=[a.validationMessage]):a.validity.valid&&!d.valid&&(d.valid=!0))}let p={value:e,state:d,error:i??(Array.isArray(o)?o[0]:o??""),errors:u,initialValue:g.initialValue};if(x){let e=n.current.fields.get(x);e&&n.current.fields.set(x,{...e,...(0,f.getCombinedFieldValidityData)(p,b)})}l(p)}),I=t.useCallback((e={})=>(0,p.mergeProps)(E,!1===h.valid?{"aria-invalid":!0}:u.EMPTY_OBJECT,e),[E,h.valid]),P=t.useCallback((e={})=>(0,p.mergeProps)({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(a(y),!S())return void O(e.currentTarget.value,!0);let t=e.currentTarget;""===t.value?O(t.value):(R.clear(),m?R.start(m,()=>{O(t.value)}):O(t.value))}},I(e)),[I,a,y,R,O,m,S]);return t.useMemo(()=>({getValidationProps:I,getInputValidationProps:P,inputRef:T,commit:O}),[I,P,O])}({setValidityData:Q,validate:D,validityData:q,validationDebounceTime:x,invalid:X,markedDirtyRef:Y,state:$,name:R,shouldValidateOnChange:K}),et=t.useCallback(()=>{Y.current=!0,ee.commit(q.value)},[ee,q]);t.useImperativeHandle(M,()=>({validate:et}),[et]);let ei=t.useMemo(()=>({invalid:X,name:R,validityData:q,setValidityData:Q,disabled:L,touched:z,setTouched:J,dirty:_,setDirty:W,filled:j,setFilled:U,focused:H,setFocused:B,validate:D,validationMode:E,validationDebounceTime:x,shouldValidateOnChange:K,state:$,markedDirtyRef:Y,validation:ee}),[X,R,q,L,z,J,_,W,j,U,H,B,D,E,x,K,$,ee]),en=(0,s.useRenderElement)("div",e,{ref:l,state:$,props:w,stateAttributesMapping:r.fieldValidityMapping});return(0,g.jsx)(n.FieldRootContext.Provider,{value:ei,children:en})}),b=t.forwardRef(function(e,t){return(0,g.jsx)(l.LabelableProvider,{children:(0,g.jsx)(m,{...e,ref:t})})});e.s(["FieldRoot",0,b],770652)},397791,e=>{"use strict";var t=e.i(92615),i=e.i(102094),n=e.i(887642),r=e.i(682354),a=e.i(804849),o=e.i(207516),l=e.i(179279);e.s(["useLabel",0,function(e={}){let s,{id:u,fallbackControlId:d,native:c=!1,setLabelId:p,focusControl:f}=e,{controlId:v,setLabelId:g}=(0,l.useLabelableContext)(),m=(0,n.useStableCallback)(e=>{g(e),p?.(e)}),b=(s=(0,o.useBaseUiId)(u),(0,a.useIsoLayoutEffect)(()=>(m(s),()=>{m(void 0)}),[s,m]),s),C=v??d;function h(e){let n=(0,r.getTarget)(e.nativeEvent);n?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),c||function(e){if(f)return f(e,C);if(!C)return;let n=(0,i.ownerDocument)(e.currentTarget).getElementById(C);(0,t.isHTMLElement)(n)&&n.focus({focusVisible:!0})}(e))}return c?{id:b,htmlFor:C??void 0,onMouseDown:h}:{id:b,onClick:h,onPointerDown(e){e.preventDefault()}}}],397791)},219040,935219,731836,e=>{"use strict";e.i(708878);var t=e.i(965652),i=e.i(890514),n=e.i(551974),r=e.i(581263),a=e.i(179279),o=e.i(397791);let l=t.forwardRef(function(e,l){let{render:s,className:u,id:d,nativeLabel:c=!0,...p}=e,f=(0,i.useFieldRootContext)(!1),{labelId:v}=(0,a.useLabelableContext)(),g=t.useRef(null),m=(0,o.useLabel)({id:v??d,native:c});return(0,r.useRenderElement)("label",e,{ref:[l,g],state:f.state,props:[m,p],stateAttributesMapping:n.fieldValidityMapping})});e.s(["FieldLabel",0,l],219040);var s=e.i(804849),u=e.i(571870),d=e.i(207516),c=e.i(504068),p=e.i(809058),f=e.i(193214),v=e.i(289721);let g={...n.fieldValidityMapping,...p.transitionStatusMapping},m=t.forwardRef(function(e,n){let{render:o,id:l,className:p,match:m,...b}=e,C=(0,d.useBaseUiId)(l),{validityData:h,state:y,name:S}=(0,i.useFieldRootContext)(!1),{setMessageIds:x}=(0,a.useLabelableContext)(),{errors:E}=(0,u.useFormContext)(),R=S?E[S]:null,T=!1;T=!!R||!0===m||(m?!!h.state[m]:!1===h.state.valid);let{mounted:O,transitionStatus:I,setMounted:P}=(0,f.useTransitionStatus)(T);(0,s.useIsoLayoutEffect)(()=>{if(T&&C)return x(e=>e.concat(C)),()=>{x(e=>e.filter(e=>e!==C))}},[T,C,x]);let M=t.useRef(null),[w,A]=t.useState(null),[D,L]=t.useState(null),F=R||(h.errors.length>1?(0,v.jsx)("ul",{children:h.errors.map(e=>(0,v.jsx)("li",{children:e},e))}):h.error),k=h.error;null!=R?k=Array.isArray(R)?JSON.stringify(R):R:h.errors.length>1&&(k=JSON.stringify(h.errors)),T&&k!==D&&(L(k),A(F)),(0,c.useOpenChangeComplete)({open:T,ref:M,onComplete(){T||P(!1)}});let V={...y,transitionStatus:I},N=(0,r.useRenderElement)("div",e,{ref:[n,M],state:V,props:[{id:C,children:T?F:w},b],stateAttributesMapping:g,enabled:O});return O?N:null});e.s(["FieldError",0,m],935219);let b=t.forwardRef(function(e,t){let{render:o,id:l,className:u,...c}=e,p=(0,d.useBaseUiId)(l),f=(0,i.useFieldRootContext)(!1),{setMessageIds:v}=(0,a.useLabelableContext)();return(0,s.useIsoLayoutEffect)(()=>{if(p)return v(e=>e.concat(p)),()=>{v(e=>e.filter(e=>e!==p))}},[p,v]),(0,r.useRenderElement)("p",e,{ref:t,state:f.state,props:[{id:p},c],stateAttributesMapping:n.fieldValidityMapping})});e.s(["FieldDescription",0,b],731836)},103353,e=>{"use strict";var t=e.i(965652),i=e.i(804849),n=e.i(887642),r=e.i(903224),a=e.i(92615),o=e.i(954588),l=e.i(207516),s=e.i(179279);e.s(["useLabelableId",0,function(e={}){let{id:u,implicit:d=!1,controlRef:c}=e,{controlId:p,registerControlId:f}=(0,s.useLabelableContext)(),v=(0,l.useBaseUiId)(u),g=d?p:void 0,m=(0,r.useRefWithInit)(()=>Symbol("labelable-control")),b=t.useRef(!1),C=t.useRef(null!=u),h=(0,n.useStableCallback)(()=>{b.current&&f!==o.NOOP&&(b.current=!1,f(m.current,void 0))});return(0,i.useIsoLayoutEffect)(()=>{let e;if(f!==o.NOOP){if(d){let t=c?.current;e=(0,a.isElement)(t)&&null!=t.closest("label")?u??null:g??v}else if(null!=u)C.current=!0,e=u;else{if(!C.current)return void h();e=v}if(void 0===e)return void h();b.current=!0,f(m.current,e)}},[u,c,g,f,d,v,m,h]),t.useEffect(()=>h,[h]),p??v}])},421689,e=>{"use strict";var t=e.i(585012),i=e.i(804849),n=e.i(887642),r=e.i(956181),a=e.i(571870),o=e.i(890514);e.s(["useField",0,function(e){let{enabled:l=!0,value:s,id:u,name:d,controlRef:c,commit:p}=e,{formRef:f}=(0,a.useFormContext)(),{invalid:v,markedDirtyRef:g,validityData:m,setValidityData:b}=(0,o.useFieldRootContext)(),C=(0,n.useStableCallback)(e.getValue);(0,i.useIsoLayoutEffect)(()=>{if(!l)return;let e=s;void 0===e&&(e=C()),null===m.initialValue&&null!==e&&b(t=>({...t,initialValue:e}))},[l,b,s,m.initialValue,C]),(0,i.useIsoLayoutEffect)(()=>{l&&u&&f.current.fields.set(u,{getValue:C,name:d,controlRef:c,validityData:(0,r.getCombinedFieldValidityData)(m,v),validate(e=!0){let i=s;void 0===i&&(i=C()),g.current=!0,e?t.flushSync(()=>p(i)):p(i)}})},[p,c,l,f,C,u,v,g,d,m,s]),(0,i.useIsoLayoutEffect)(()=>{let e=f.current.fields;return()=>{u&&e.delete(u)}},[f,u])}])},793479,e=>{"use strict";var t=e.i(289721);e.i(708878);var i=e.i(965652);e.i(584191);var n=e.i(770652),r=e.i(219040),a=e.i(935219),o=e.i(731836),l=e.i(314757),s=e.i(804849),u=e.i(102094),d=e.i(890514),c=e.i(179279),p=e.i(103353),f=e.i(551974),v=e.i(581263),g=e.i(421689),m=e.i(67077),b=e.i(586622),C=e.i(682354);let h=i.forwardRef(function(e,t){let{render:n,className:r,id:a,name:o,value:h,disabled:y=!1,onValueChange:S,defaultValue:x,autoFocus:E=!1,...R}=e,{state:T,name:O,disabled:I,setTouched:P,setDirty:M,validityData:w,setFocused:A,setFilled:D,validationMode:L,validation:F}=(0,d.useFieldRootContext)(),k=I||y,V=O??o,N={...T,disabled:k},{labelId:j}=(0,c.useLabelableContext)(),U=(0,p.useLabelableId)({id:a});(0,s.useIsoLayoutEffect)(()=>{let e=null!=h;F.inputRef.current?.value||e&&""!==h?D(!0):e&&""===h&&D(!1)},[F.inputRef,D,h]);let H=i.useRef(null);(0,s.useIsoLayoutEffect)(()=>{E&&H.current===(0,C.activeElement)((0,u.ownerDocument)(H.current))&&A(!0)},[E,A]);let[B]=(0,l.useControlled)({controlled:h,default:x,name:"FieldControl",state:"value"}),_=void 0!==h,z=_?B:void 0;return(0,g.useField)({id:U,name:V,commit:F.commit,value:z,getValue:()=>F.inputRef.current?.value,controlRef:F.inputRef}),(0,v.useRenderElement)("input",e,{ref:[t,H],state:N,props:[{id:U,disabled:k,name:V,ref:F.inputRef,"aria-labelledby":j,autoFocus:E,..._?{value:z}:{defaultValue:x},onChange(e){let t=e.currentTarget.value;S?.(t,(0,m.createChangeEventDetails)(b.REASONS.none,e.nativeEvent)),M(t!==w.initialValue),D(""!==t)},onFocus(){A(!0)},onBlur(e){P(!0),A(!1),"onBlur"===L&&F.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(P(!0),F.commit(e.currentTarget.value))}},F.getInputValidationProps(),R],stateAttributesMapping:f.fieldValidityMapping})});var y=e.i(956181),S=e.i(193214);let x=i.createContext({disabled:!1});var E=e.i(137122),R=e.i(462902);let T=i.createContext(void 0),O=i.forwardRef(function(e,n){let{render:r,className:a,disabled:o=!1,...l}=e,{state:s,disabled:u}=(0,d.useFieldRootContext)(!1),c=u||o,p=function(e=!0){let t=i.useContext(T);if(void 0===t&&!e)throw Error((0,R.default)(3));return t}(),g=p?.parent.id,m=p?.allValues!==void 0,b=i.useMemo(()=>({disabled:c}),[c]),C=(0,v.useRenderElement)("div",e,{ref:n,state:s,props:l,stateAttributesMapping:f.fieldValidityMapping});return(0,t.jsx)(E.LabelableProvider,{controlId:m?g:void 0,children:(0,t.jsx)(x.Provider,{value:b,children:C})})});e.s(["Control",0,h,"Description",()=>o.FieldDescription,"Error",()=>a.FieldError,"Item",0,O,"Label",()=>r.FieldLabel,"Root",()=>n.FieldRoot,"Validity",0,function(e){let{children:n}=e,{validityData:r,invalid:a}=(0,d.useFieldRootContext)(!1),o=i.useMemo(()=>(0,y.getCombinedFieldValidityData)(r,a),[r,a]),l=!1===o.state.valid,{transitionStatus:s}=(0,S.useTransitionStatus)(l),u=i.useMemo(()=>({...o,validity:o.state,transitionStatus:s}),[o,s]);return(0,t.jsx)(i.Fragment,{children:n(u)})}],52388);var I=e.i(52388),I=I;let P=i.forwardRef(function(e,i){return(0,t.jsx)(I.Control,{ref:i,...e})});var M=e.i(975157);e.s(["Input",0,function({className:e,type:i,...n}){return(0,t.jsx)(P,{type:i,"data-slot":"input",className:(0,M.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}],793479)},792566,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},519587,e=>{"use strict";let t=(0,e.i(572989).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},400355,e=>{"use strict";var t=e.i(519587);e.s(["Loader2",()=>t.default])},597746,e=>{"use strict";var t=e.i(152279);e.s(["Check",()=>t.default])},453889,e=>{"use strict";let t=(0,e.i(572989).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],453889)},998626,e=>{"use strict";let t=(0,e.i(572989).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],998626)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,340760,e=>{"use strict";var a=e.i(514798);let c=(0,a.createServerReference)("400e2fda1bae5acb01074e51d080a2be2a77bc34cd",a.callServer,void 0,a.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,c])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),s=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:r,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},236967,e=>{"use strict";var t=e.i(289721),s=e.i(210702),a=e.i(538059),r=e.i(259846),l=e.i(645378),n=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),n=(0,a.usePathname)(),i=o.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(s.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let r=a.icon,n=i===a.key;return(0,t.jsxs)(s.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},631675,e=>{"use strict";let t=(0,e.i(572989).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],631675)},840086,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40c0e84099b888ee15c70367c45cfde562ecbaf67f",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,s])},804946,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40f1890174662fd3e05a8ab2f28cc37679e3f35653",t.callServer,void 0,t.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,s])},734525,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(400355),r=e.i(738690),l=e.i(236967),n=e.i(533499),i=e.i(840086),c=e.i(514798);let o=(0,c.createServerReference)("405bfb0d8c83e6fd1f6fab5f7c1702ad27bee95412",c.callServer,void 0,c.findSourceMapURL,"getProjectAssets");var d=e.i(453889),m=e.i(912505),x=e.i(645378),u=e.i(867533),h=e.i(998626),p=e.i(519455),f=e.i(937304);function g({asset:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:l}){var i;let{t:c}=(0,n.useI18n)(),o=(0,f.localPathToApiUrl)(e.path),m=(0,f.isImageAsset)(e.filename,e.mimeType);return(0,t.jsxs)("div",{className:"flex items-center gap-4 rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:bg-accent/20",children:[(0,t.jsx)(p.Button,{variant:"ghost",onClick:()=>s(e),className:"flex-shrink-0 cursor-pointer p-0 h-auto",children:m?(0,t.jsx)("img",{src:o,alt:e.filename,className:"h-12 w-12 rounded object-cover border border-border"}):(0,t.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded border border-border bg-muted",children:(0,t.jsx)(x.FileText,{className:"h-6 w-6 text-muted-foreground"})})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium text-foreground",children:e.filename}),e.taskTitle&&e.taskId&&(0,t.jsx)(p.Button,{variant:"ghost",onClick:t=>{t.stopPropagation(),l?.(e.taskId)},className:"flex-shrink-0 bg-blue-500/10 text-blue-600 dark:text-blue-400 text-xs px-1.5 py-0.5 rounded cursor-pointer hover:bg-blue-500/20 transition-colors h-auto",children:e.taskTitle.length>20?`[任务: ${e.taskTitle.slice(0,20)}...]`:`[任务: ${e.taskTitle}]`})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description}),(0,t.jsxs)("div",{className:"mt-0.5 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:null===(i=e.size)?"-":i<1024?`${i} B`:i<1048576?`${(i/1024).toFixed(1)} KB`:i<0x40000000?`${(i/1048576).toFixed(1)} MB`:`${(i/0x40000000).toFixed(1)} GB`}),(0,t.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,t.jsx)(p.Button,{variant:"ghost",size:"icon",onClick:()=>s(e),className:"text-muted-foreground","aria-label":c("assets.preview"),children:(0,t.jsx)(u.Eye,{className:"h-4 w-4"})}),(0,t.jsx)(p.Button,{variant:"ghost",size:"icon",onClick:()=>a(e),className:"text-muted-foreground","aria-label":c("assets.revealInFinder"),children:(0,t.jsx)(d.FolderOpen,{className:"h-4 w-4"})}),(0,t.jsx)(p.Button,{variant:"ghost",size:"icon",onClick:()=>r(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":c("assets.delete"),children:(0,t.jsx)(h.Trash2,{className:"h-4 w-4"})})]})]})}function j({assets:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:l}){let{t:i}=(0,n.useI18n)();return 0===e.length?(0,t.jsx)(m.EmptyState,{icon:d.FolderOpen,title:i("assets.empty"),description:i("assets.emptyHint")}):(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>(0,t.jsx)(g,{asset:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:l},e.id))})}var v=e.i(631675),b=e.i(657153),N=e.i(804946),k=e.i(624687),y=e.i(280027);function w({allWorkspaces:e,initialWsId:a,initialProjectId:r,onUploaded:l}){let i,{t:c}=(0,n.useI18n)(),o=(0,s.useRef)(null),[d,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(!1),[h,f]=(0,s.useState)(null),[g,j]=(0,s.useState)(a),[S,C]=(0,s.useState)(r),[T,I]=(0,s.useState)(""),P=e.find(e=>e.id===g),$=P?.projects??[],A=()=>{m(!1),f(null),o.current&&(o.current.value="")},B=async()=>{if(h&&S){u(!0);try{let e=new FormData;e.append("file",h),e.append("projectId",S),e.append("description",T.trim()),await (0,N.uploadAsset)(e),l(S),A()}finally{u(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Button,{onClick:()=>{j(a),C(r),f(null),I(""),m(!0)},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(v.Upload,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:c("assets.upload")})]}),d&&(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:A}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-lg border border-border bg-card p-6 shadow-lg",children:[(0,t.jsx)(p.Button,{variant:"ghost",size:"icon-xs",onClick:A,className:"absolute right-3 top-3 text-muted-foreground",children:(0,t.jsx)(b.X,{className:"h-4 w-4"})}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-4",children:c("assets.uploadTitle")}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:c("assets.workspace")}),(0,t.jsxs)(y.Select,{value:g,onValueChange:t=>{var s;let a;return j(s=t??""),a=e.find(e=>e.id===s),void C(a?.projects[0]?.id??null)},children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:P?.name??g})}),(0,t.jsx)(y.SelectContent,{children:e.map(e=>(0,t.jsx)(y.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:c("assets.project")}),$.length>0?(0,t.jsxs)(y.Select,{value:S??"",onValueChange:e=>C(e??""),children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(i=$.find(e=>e.id===S))?i.alias?`${i.name} (${i.alias})`:i.name:S})}),(0,t.jsx)(y.SelectContent,{children:$.map(e=>{let s=e.alias?`${e.name} (${e.alias})`:e.name;return(0,t.jsx)(y.SelectItem,{value:e.id,children:s},e.id)})})]}):(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:c("assets.noProject")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:c("assets.file")}),(0,t.jsx)("input",{type:"file",ref:o,onChange:e=>{f(e.target.files?.[0]??null)},className:"hidden"}),(0,t.jsx)(p.Button,{variant:"outline",onClick:()=>{o.current?.click()},className:"flex-1 border-dashed bg-background px-3 py-2 text-xs text-muted-foreground hover:border-primary/50 hover:text-foreground transition-colors text-left justify-start",children:h?h.name:c("assets.selectFile")})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0 pt-1.5",children:c("assets.description")}),(0,t.jsx)(k.Textarea,{value:T,onChange:e=>I(e.target.value),placeholder:c("assets.descriptionPlaceholder"),className:"flex-1 rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring resize-none h-20"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end mt-6",children:[(0,t.jsx)(p.Button,{variant:"outline",onClick:A,children:c("notes.cancel")}),(0,t.jsx)(p.Button,{onClick:B,disabled:!h||!S||!T.trim()||x,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:c(x?"assets.uploading":"assets.upload")})]})]})]})]})}var S=e.i(235357),C=e.i(144640),T=e.i(605005),I=e.i(360112);e.s(["AssetsPageClient",0,function({allWorkspaces:e,initialWorkspaceId:c,initialProjectId:d,initialAssets:m}){let x,{t:u}=(0,n.useI18n)(),[h,p]=(0,s.useTransition)(),[g,v]=(0,s.useState)(c),[b,N]=(0,s.useState)(d),[k,P]=(0,s.useState)(m),[$,A]=(0,s.useState)(""),[B,F]=(0,s.useState)(null),U=e.find(e=>e.id===g),z=U?.projects??[],O=(0,s.useCallback)(e=>{e?p(async()=>{P(await o(e))}):P([])},[p]),[R,L]=(0,s.useState)(null),D=R?(0,f.isImageAsset)(R.filename,R.mimeType)?"image":/\.(txt|md|json)$/i.test(R.filename)?"text":null:null,M=$.trim().toLowerCase(),V=M?k.filter(e=>e.filename.toLowerCase().includes(M)):k,E=V.filter(e=>(0,f.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,f.localPathToApiUrl)(e.path),filename:e.filename})),H=R?E.findIndex(e=>e.id===R.id):-1,K=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));I.toast.error(e.error||"Failed to reveal file")}}catch{I.toast.error("Failed to reveal file")}},W=async e=>{let t=k.find(t=>t.id===e);confirm(u("assets.deleteConfirm",{filename:t?.filename??e}))&&(await (0,i.deleteAsset)(e),O(b))};return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.SubPageNav,{workspaceId:g}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(y.Select,{value:g,onValueChange:t=>t&&(t=>{if(t===g)return;v(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;N(a?.id??null),O(a?.id??null)})(t),children:[(0,t.jsx)(y.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===g)?.name??g})}),(0,t.jsx)(y.SelectContent,{children:e.map(e=>(0,t.jsx)(y.SelectItem,{value:e.id,children:e.name},e.id))})]}),z.length>0&&(0,t.jsxs)(y.Select,{value:b??"",onValueChange:e=>e&&void(e!==b&&(N(e),O(e))),children:[(0,t.jsx)(y.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(x=z.find(e=>e.id===b))?x.alias?`${x.name} (${x.alias})`:x.name:""})}),(0,t.jsx)(y.SelectContent,{children:z.map(e=>(0,t.jsxs)(y.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,t.jsxs)("div",{className:"relative ml-auto",children:[(0,t.jsx)(r.Search,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:$,onChange:e=>A(e.target.value),placeholder:u("assets.searchPlaceholder"),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),(0,t.jsx)(w,{allWorkspaces:e,initialWsId:g,initialProjectId:b,onUploaded:e=>{e===b&&O(b)}})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,t.jsxs)("div",{className:`relative ${h?"opacity-40 pointer-events-none":""} transition-opacity`,children:[h&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===z.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:u("assets.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:u("assets.noProjectHint")})]}):(0,t.jsx)(j,{assets:V.map(e=>({...e,taskId:e.task?.id??null,taskTitle:e.task?.title??null})),onPreview:e=>{let t=(0,f.isImageAsset)(e.filename,e.mimeType),s=/\.(txt|md|json)$/i.test(e.filename);(t||s)&&L(e)},onReveal:K,onDelete:W,onTaskClick:F})]})}),(0,t.jsx)(S.ImageLightbox,{imageUrl:"image"===D&&H>=0?E[H].url:null,filename:"image"===D&&H>=0?E[H].filename:"",open:"image"===D,onOpenChange:e=>{e||L(null)},assets:E.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:H>=0?H:void 0,onIndexChange:e=>{let t=E[e];if(!t)return;let s=k.find(e=>e.id===t.id);s&&L({...s,taskId:s.task?.id??null,taskTitle:s.task?.title??null})}}),(0,t.jsx)(C.TextPreviewDialog,{url:"text"===D&&R?(0,f.localPathToApiUrl)(R.path):null,filename:R?.filename??"",open:"text"===D,onOpenChange:e=>{e||L(null)}}),(0,t.jsx)(T.TaskOverviewDrawer,{open:!!B,onOpenChange:e=>{e||F(null)},taskId:B})]})}],734525)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),s=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:r,action:n,className:l}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",l),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r}),n&&(0,t.jsx)("div",{className:"mt-2",children:n})]})}])},236967,e=>{"use strict";var t=e.i(289721),s=e.i(210702),a=e.i(538059),r=e.i(259846),n=e.i(645378),l=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:n.FileText},{key:"assets",icon:l.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,c.useI18n)(),l=(0,a.usePathname)(),i=o.find(e=>l.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(s.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let r=a.icon,l=i===a.key;return(0,t.jsxs)(s.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${l?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n(`sidebar.${a.key}`)})]},a.key)})]})}])},927781,9187,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40359404df2000745963c2ef56b3ebd5920dd11881",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,s],927781);let a=(0,t.createServerReference)("402d235d3cadb13ac7f299a35a91a721ee40b76d4d",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],9187)},497732,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(232545),r=e.i(400355),n=e.i(738690),l=e.i(236967),i=e.i(533499),c=e.i(685149),o=e.i(927781),d=e.i(514798);let x=(0,d.createServerReference)("60bc7620818cdef3c2044437e2a288b05c2cf29c96",d.callServer,void 0,d.findSourceMapURL,"updateNote");var u=e.i(9187);let m=(0,d.createServerReference)("60470084914533a1b0571ecba35d1ed99b679b18e8",d.callServer,void 0,d.findSourceMapURL,"getProjectNotes");var h=e.i(975157);function p({active:e,onSelect:s}){let{t:a}=(0,i.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("button",{onClick:()=>s("all"),className:(0,h.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors","all"===e?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a("notes.allCategories")}),c.NOTE_CATEGORIES_PRESET.map(a=>(0,t.jsx)("button",{onClick:()=>s(a),className:(0,h.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors",e===a?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a},a))]})}var g=e.i(519455),f=e.i(280027),j=e.i(645378),v=e.i(912505),N=e.i(464249),b=e.i(998626);let y=(0,e.i(572989).default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);e.i(254826);var S=e.i(309735);function w({note:e,onEdit:s,onDelete:a,onPreview:r,onTaskClick:n}){let{t:l}=(0,i.useI18n)(),c=e.content.slice(0,300);return(0,t.jsxs)("div",{className:"group relative rounded-lg border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20",children:[(0,t.jsxs)("div",{className:"absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>s(e),className:"text-muted-foreground","aria-label":l("notes.edit"),children:(0,t.jsx)(N.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":l("notes.delete"),children:(0,t.jsx)(b.Trash2,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"mb-2 pr-16",children:(0,t.jsx)("h3",{className:"truncate text-sm font-semibold text-foreground",children:e.title})}),(0,t.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("span",{className:"inline-block rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:e.category}),e.taskId&&e.taskTitle&&(0,t.jsxs)("button",{type:"button",onClick:()=>e.taskId&&n?.(e.taskId),disabled:!n,className:`inline-flex max-w-[160px] items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary ${n?"cursor-pointer hover:bg-primary/15":"cursor-default"}`,title:e.taskTitle,children:[(0,t.jsx)(y,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.taskTitle})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>r?.(e),disabled:!r,className:`block w-full text-left ${r?"cursor-pointer":"cursor-default"}`,title:r?l("notes.previewNote"):void 0,children:(0,t.jsx)("div",{className:"max-h-24 overflow-hidden text-sm leading-relaxed text-muted-foreground",children:(0,t.jsx)(S.Streamdown,{children:c})})})]})}function k({notes:e,onEdit:s,onDelete:a,onPreview:r,onTaskClick:n}){let{t:l}=(0,i.useI18n)();return 0===e.length?(0,t.jsx)(v.EmptyState,{icon:j.FileText,title:l("notes.empty"),description:l("notes.emptyHint")}):(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,t.jsx)(w,{note:e,onEdit:s,onDelete:a,onPreview:r,onTaskClick:n},e.id))})}var C=e.i(624687);function T({value:e,onChange:s}){return(0,t.jsxs)("div",{className:"relative grid grid-cols-2 gap-4 flex-1 min-h-64",children:[(0,t.jsx)(C.Textarea,{value:e,onChange:e=>s(e.target.value),className:"absolute inset-0 w-1/2 pr-2 resize-none font-mono text-sm border rounded-md p-3 bg-background text-foreground border-border focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Write Markdown here..."}),(0,t.jsx)("div",{className:"absolute inset-0 left-1/2 pl-2",children:(0,t.jsx)("div",{className:"h-full overflow-y-auto border rounded-md p-3 border-border text-sm leading-relaxed",children:(0,t.jsx)(S.Streamdown,{children:e})})})]})}var E=e.i(997025),I=e.i(759684),P=e.i(605005);e.s(["NotesPageClient",0,function({allWorkspaces:e,initialWorkspaceId:d,initialProjectId:h,initialNotes:j}){let v,N,{t:b}=(0,i.useI18n)(),[y,S]=(0,s.useTransition)(),[w,C]=(0,s.useState)(d),[R,$]=(0,s.useState)(h),[O,A]=(0,s.useState)(j),[_,L]=(0,s.useState)("all"),[B,z]=(0,s.useState)(""),[M,U]=(0,s.useState)(null),[D,V]=(0,s.useState)(null),[F,G]=(0,s.useState)(null),[H,K]=(0,s.useState)(!1),[q,W]=(0,s.useState)(""),[J,Q]=(0,s.useState)(""),[X,Y]=(0,s.useState)(c.NOTE_CATEGORIES_PRESET[3]),[Z,ee]=(0,s.useState)(d),[et,es]=(0,s.useState)(h),ea=e.find(e=>e.id===w),er=ea?.projects??[],en=e.find(e=>e.id===Z),el=en?.projects??[],ei=(0,s.useCallback)(e=>{e?S(async()=>{A(await m(e))}):A([])},[S]),ec=async()=>{et&&q.trim()&&(await (0,o.createNote)({title:q.trim(),content:J,category:X,projectId:et}),K(!1),et===R&&ei(R))},eo=async()=>{F&&q.trim()&&(await x(F.id,{title:q.trim(),content:J,category:X}),G(null),ei(R))},ed=async e=>{let t=O.find(t=>t.id===e);!t||confirm(b("notes.deleteConfirm",{title:t.title}))&&(await (0,u.deleteNote)(e),ei(R))},ex=B.trim().toLowerCase(),eu=O.filter(e=>"all"===_||e.category===_).filter(e=>!ex||e.title.toLowerCase().includes(ex)).map(e=>({id:e.id,title:e.title,content:e.content,category:e.category,updatedAt:new Date(e.updatedAt),taskId:e.taskId,taskTitle:e.task?.title??null})),em=H||null!==F;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.SubPageNav,{workspaceId:w}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(f.Select,{value:w,onValueChange:t=>t&&(t=>{if(t===w)return;C(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;$(a?.id??null),L("all"),ei(a?.id??null)})(t),children:[(0,t.jsx)(f.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===w)?.name??w})}),(0,t.jsx)(f.SelectContent,{children:e.map(e=>(0,t.jsx)(f.SelectItem,{value:e.id,children:e.name},e.id))})]}),er.length>0&&(0,t.jsxs)(f.Select,{value:R??"",onValueChange:e=>e&&void(e!==R&&($(e),L("all"),ei(e))),children:[(0,t.jsx)(f.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(v=er.find(e=>e.id===R))?v.alias?`${v.name} (${v.alias})`:v.name:""})}),(0,t.jsx)(f.SelectContent,{children:er.map(e=>(0,t.jsxs)(f.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),!em&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative ml-auto",children:[(0,t.jsx)(n.Search,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:B,onChange:e=>z(e.target.value),placeholder:b("notes.searchPlaceholder"),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),(0,t.jsxs)(g.Button,{onClick:()=>{W(""),Q(""),Y(c.NOTE_CATEGORIES_PRESET[3]),ee(w),es(R),G(null),K(!0)},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:b("notes.newNote")})]})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden px-6 py-4 flex flex-col",children:em?(0,t.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[!F&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.workspace")}),(0,t.jsxs)(f.Select,{value:Z,onValueChange:t=>t&&(t=>{if(t===Z)return;ee(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;es(a?.id??null)})(t),children:[(0,t.jsx)(f.SelectTrigger,{className:"min-w-[140px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===Z)?.name??Z})}),(0,t.jsx)(f.SelectContent,{children:e.map(e=>(0,t.jsx)(f.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),!F&&el.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.project")}),(0,t.jsxs)(f.Select,{value:et??"",onValueChange:e=>e&&es(e),children:[(0,t.jsx)(f.SelectTrigger,{className:"min-w-[160px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(N=el.find(e=>e.id===et))?N.alias?`${N.name} (${N.alias})`:N.name:""})}),(0,t.jsx)(f.SelectContent,{children:el.map(e=>(0,t.jsxs)(f.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.categoryLabel")}),(0,t.jsxs)(f.Select,{value:X,onValueChange:e=>e&&Y(e),children:[(0,t.jsx)(f.SelectTrigger,{className:"min-w-[120px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:X})}),(0,t.jsx)(f.SelectContent,{children:c.NOTE_CATEGORIES_PRESET.map(e=>(0,t.jsx)(f.SelectItem,{value:e,children:e},e))})]})]})]}),(0,t.jsx)("input",{type:"text",value:q,onChange:e=>W(e.target.value),placeholder:b("notes.titlePlaceholder"),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),(0,t.jsx)(T,{value:J,onChange:Q}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,t.jsx)(g.Button,{variant:"outline",onClick:()=>{K(!1),G(null)},children:b("notes.cancel")}),(0,t.jsx)(g.Button,{onClick:F?eo:ec,disabled:!q.trim()||!F&&!et,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:b("notes.save")})]})]}):(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 gap-4",children:[(0,t.jsx)(p,{active:_,onSelect:L}),(0,t.jsx)(I.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsxs)("div",{className:`relative ${y?"opacity-40 pointer-events-none":""} transition-opacity`,children:[y&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(r.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===er.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:b("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:b("notes.noProjectHint")})]}):(0,t.jsx)(k,{notes:eu,onEdit:e=>{W(e.title),Q(e.content),Y(e.category),G(e),K(!1)},onDelete:ed,onPreview:U,onTaskClick:V})]})})]})}),(0,t.jsx)(E.NotePreviewDialog,{note:M,open:null!==M,onOpenChange:e=>{e||U(null)}}),(0,t.jsx)(P.TaskOverviewDrawer,{open:null!==D,onOpenChange:e=>{e||V(null)},taskId:D})]})}],497732)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69466,e=>{"use strict";e.s([],386333),e.i(386333),e.i(666227),e.i(61180),e.i(665372),e.i(927246),e.i(374568),e.i(413389),e.i(555362),e.i(209485),e.i(561504),e.i(79870);var i=e.i(514798);let r=(0,i.createServerReference)("6017e1f25adc5592e1726580ccd83f6cd8d398fb21",i.callServer,void 0,i.findSourceMapURL,"revealInFinder");e.s(["revealInFinder",0,r],69466)}]);