tower-studio 0.2.39 → 0.2.41

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 (330) 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 +3 -3
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +31 -31
  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 +2 -2
  53. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +70 -70
  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 +3 -3
  58. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +31 -31
  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 +3 -3
  63. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +31 -31
  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 +3 -3
  68. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +48 -48
  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 +3 -3
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +106 -106
  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 +3 -3
  78. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +87 -87
  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 +3 -3
  83. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +74 -74
  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 +3 -3
  88. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +79 -79
  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 +3 -3
  93. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +31 -31
  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 +3 -3
  98. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +71 -71
  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 +4 -4
  103. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +82 -82
  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 +3 -3
  108. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +49 -49
  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/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0.721uk._.js +16 -9
  113. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
  114. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +2 -2
  115. package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_assets_[projectId]_[filename]_route_actions_08y.jen.js +1 -1
  116. package/.next/standalone/.next/server/chunks/[externals]__0izylsq._.js +3 -0
  117. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0lioghc._.js → [root-of-the-server]__0-~q463._.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]__00llstz._.js → [root-of-the-server]__02jy80j._.js} +3 -3
  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]__0fp8qv9._.js +28 -0
  130. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0d2japj._.js → [root-of-the-server]__0giry~0._.js} +2 -2
  131. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j05vlm._.js +3 -0
  132. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__01n7exm._.js → [root-of-the-server]__0kexk71._.js} +3 -3
  133. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0qif839._.js → [root-of-the-server]__0kuo6q5._.js} +3 -3
  134. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +1 -1
  135. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~foo~5._.js → [root-of-the-server]__0np.553._.js} +3 -3
  136. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0q8.khe._.js → [root-of-the-server]__0r-6wmj._.js} +2 -2
  137. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_yyy8._.js +3 -0
  138. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0omyrab._.js → [root-of-the-server]__0u_-4~7._.js} +2 -2
  139. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xswbi9._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0tys9pv._.js → [root-of-the-server]__0z20rmt._.js} +2 -2
  141. package/.next/standalone/.next/server/chunks/[root-of-the-server]__11l3gud._.js +3 -0
  142. package/.next/standalone/.next/server/chunks/{_0lb0q5p._.js → _06.mxka._.js} +1 -1
  143. package/.next/standalone/.next/server/chunks/{src_0bkvm8c._.js → src_02ruq-1._.js} +2 -2
  144. package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/src_lib_02llcit._.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/[root-of-the-server]__0.-z9ts._.js +3 -0
  150. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0f88ua~._.js → [root-of-the-server]__0.2h0ux._.js} +1 -1
  151. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07_o.al._.js → [root-of-the-server]__0.infp2._.js} +2 -2
  152. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__04rp1ck._.js → [root-of-the-server]__0.u-t.1._.js} +1 -1
  153. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0k-mx8r._.js → [root-of-the-server]__02j1enz._.js} +1 -1
  154. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0guqcva._.js → [root-of-the-server]__038u_kv._.js} +4 -4
  155. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_1zewr._.js → [root-of-the-server]__0391jsv._.js} +1 -1
  156. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_i7zpd._.js → [root-of-the-server]__03fujv7._.js} +1 -1
  157. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +3 -0
  158. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-tolks._.js → [root-of-the-server]__058rbx5._.js} +4 -4
  159. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08w4.zf._.js +3 -0
  161. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lozqxc._.js → [root-of-the-server]__094t44p._.js} +1 -1
  162. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02ur64h._.js → [root-of-the-server]__09t~p.u._.js} +1 -1
  163. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m7ydqb._.js → [root-of-the-server]__09z_ddd._.js} +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0p0te97._.js → [root-of-the-server]__0ce3fpq._.js} +4 -4
  165. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__062b.yt._.js → [root-of-the-server]__0da~mv~._.js} +4 -4
  166. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dn90me._.js +3 -0
  167. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0qqbb31._.js → [root-of-the-server]__0dux7x.._.js} +1 -1
  168. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gtqd5o._.js +4 -0
  169. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0th-t1a._.js → [root-of-the-server]__0h589~0._.js} +4 -4
  170. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  171. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00~jawi._.js → [root-of-the-server]__0l6bt9t._.js} +1 -1
  172. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m80~su._.js → [root-of-the-server]__0mmypbn._.js} +1 -1
  173. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mpjat-._.js +3 -0
  174. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09s~cme._.js → [root-of-the-server]__0mq0f94._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-_7_._.js +30 -0
  176. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nwisa8._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0scj6ed._.js → [root-of-the-server]__0odeai5._.js} +1 -1
  178. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0siyg1p._.js → [root-of-the-server]__0oq-j16._.js} +4 -4
  179. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0na8eiv._.js → [root-of-the-server]__0pmjob9._.js} +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lz4wdp._.js → [root-of-the-server]__0pvaj~l._.js} +1 -1
  181. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0wofia_._.js → [root-of-the-server]__0rckee~._.js} +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0e-k-gl._.js → [root-of-the-server]__0w--i~y._.js} +2 -2
  183. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y~ooou._.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0k1ivnj._.js → [root-of-the-server]__0zkpwjj._.js} +2 -2
  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]__093tt4a._.js → [root-of-the-server]__12w35bx._.js} +4 -4
  188. package/.next/standalone/.next/server/chunks/ssr/{_0e-zyn2._.js → _0-_yznx._.js} +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/{_00t6138._.js → _03lt1_x._.js} +4 -4
  191. package/.next/standalone/.next/server/chunks/ssr/_03v~rg0._.js +3 -0
  192. package/.next/standalone/.next/server/chunks/ssr/{_0l3l_d6._.js → _04bt0.3._.js} +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/{_06nlsbw._.js → _04mn9go._.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/{_0gb8a9_._.js → _0_6ss3p._.js} +2 -2
  197. package/.next/standalone/.next/server/chunks/ssr/_0_9i_x2._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/_0_z-t6g._.js +1 -1
  199. package/.next/standalone/.next/server/chunks/ssr/_0b.qjaj._.js +3 -0
  200. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  201. package/.next/standalone/.next/server/chunks/ssr/{_0t0oltj._.js → _0dzx554._.js} +3 -3
  202. package/.next/standalone/.next/server/chunks/ssr/_0mdqhxi._.js +3 -0
  203. package/.next/standalone/.next/server/chunks/ssr/{_02encue._.js → _0mm~wxj._.js} +1 -1
  204. package/.next/standalone/.next/server/chunks/ssr/{_07fnvnm._.js → _0n4bq0m._.js} +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/{_0n54odq._.js → _0n5do.z._.js} +1 -1
  206. package/.next/standalone/.next/server/chunks/ssr/_0ng0eku._.js +1 -1
  207. package/.next/standalone/.next/server/chunks/ssr/{_0n1l7yo._.js → _0p6p_68._.js} +4 -4
  208. package/.next/standalone/.next/server/chunks/ssr/{_0clhm~f._.js → _0py1s-f._.js} +1 -1
  209. package/.next/standalone/.next/server/chunks/ssr/_0r-flc_._.js +3 -0
  210. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  211. package/.next/standalone/.next/server/chunks/ssr/_0rkdyad._.js +3 -0
  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/{_00kwrmr._.js → _0tsu0gq._.js} +2 -2
  215. package/.next/standalone/.next/server/chunks/ssr/{_0_hnt09._.js → _0tvm5af._.js} +1 -1
  216. package/.next/standalone/.next/server/chunks/ssr/{_0mpce0d._.js → _0u7c6bz._.js} +4 -4
  217. package/.next/standalone/.next/server/chunks/ssr/{_0hu0tyg._.js → _0u_uywm._.js} +1 -1
  218. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  219. package/.next/standalone/.next/server/chunks/ssr/{_0v66l8c._.js → _0z6ji0d._.js} +2 -2
  220. package/.next/standalone/.next/server/chunks/ssr/{_0muaopo._.js → _12ca88g._.js} +4 -4
  221. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  222. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  223. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  224. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  225. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  226. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  227. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  228. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  229. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  230. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  231. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  232. package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
  233. package/.next/standalone/.next/server/chunks/ssr/{src_lib_01xtio2._.js → src_lib_02~3_5t._.js} +2 -2
  234. package/.next/standalone/.next/server/chunks/ssr/{src_lib_03p6skw._.js → src_lib_04d~c.c._.js} +2 -2
  235. package/.next/standalone/.next/server/chunks/ssr/{src_lib_05mu4f0._.js → src_lib_08wv1le._.js} +2 -2
  236. package/.next/standalone/.next/server/chunks/ssr/{src_lib_06nbc41._.js → src_lib_0_9avpk._.js} +2 -2
  237. package/.next/standalone/.next/server/chunks/ssr/src_lib_0a60u40._.js +3 -0
  238. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fu5szn._.js +3 -0
  239. package/.next/standalone/.next/server/chunks/ssr/src_lib_0gve57o._.js +3 -0
  240. package/.next/standalone/.next/server/chunks/ssr/src_lib_0koe0p0._.js +3 -0
  241. package/.next/standalone/.next/server/chunks/ssr/src_lib_0qdh-v4._.js +3 -0
  242. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ramp4w._.js +3 -0
  243. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sms4xl._.js +2 -2
  244. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sn1z-s._.js +3 -0
  245. package/.next/standalone/.next/server/chunks/ssr/src_lib_110am8v._.js +3 -0
  246. package/.next/standalone/.next/server/chunks/ssr/src_lib_11w~.ge._.js +3 -0
  247. package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
  248. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  249. package/.next/standalone/.next/server/pages/500.html +1 -1
  250. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  251. package/.next/standalone/.next/server/server-reference-manifest.json +301 -301
  252. package/.next/standalone/.next/static/chunks/0-x5eie9u3i_2.js +1 -0
  253. package/.next/standalone/.next/static/chunks/00w9dd4fooyic.js +1 -0
  254. package/.next/standalone/.next/static/chunks/{112wpv9rqw4dp.js → 02o~o8tgt860j.js} +1 -1
  255. package/.next/standalone/.next/static/chunks/{0h73q-9fyea0t.js → 03sdutmq6~3v-.js} +1 -1
  256. package/.next/standalone/.next/static/chunks/{0e9ykduz3_0e1.js → 04zy.uc7eru64.js} +1 -1
  257. package/.next/standalone/.next/static/chunks/{01ijm9dpmm34q.js → 05zm_-7x0fubq.js} +1 -1
  258. package/.next/standalone/.next/static/chunks/{0t_3wwd~mmc.1.js → 05~2gwcex7hv0.js} +1 -1
  259. package/.next/standalone/.next/static/chunks/062.w.nsp3886.js +1 -0
  260. package/.next/standalone/.next/static/chunks/06lla3jtd~xb4.js +1 -0
  261. package/.next/standalone/.next/static/chunks/{0dha37i1oc6z~.js → 06s-d8my6b9t7.js} +1 -1
  262. package/.next/standalone/.next/static/chunks/{0u.3xek3m2ud..js → 0ad0ou7l2.r6e.js} +1 -1
  263. package/.next/standalone/.next/static/chunks/{11.r6a56ss7qu.js → 0babmd83h6ejs.js} +1 -1
  264. package/.next/standalone/.next/static/chunks/0c8c6pcmlzgmi.js +1 -0
  265. package/.next/standalone/.next/static/chunks/0c~~56wny5m2u.js +1 -0
  266. package/.next/standalone/.next/static/chunks/{0h4k3cicu7g-w.js → 0ev98toavtr6..js} +1 -1
  267. package/.next/standalone/.next/static/chunks/{0u.b0t7fueh-x.js → 0fz47g1x5o2xj.js} +1 -1
  268. package/.next/standalone/.next/static/chunks/0i2soupf1735z.js +1 -0
  269. package/.next/standalone/.next/static/chunks/{050agjgyp545k.js → 0l25d0nc5ygyd.js} +1 -1
  270. package/.next/standalone/.next/static/chunks/{0_-2es-r~03mg.js → 0lnsj7fwkprxe.js} +1 -1
  271. package/.next/standalone/.next/static/chunks/{0a._hcvzq4ko7.js → 0oz8sw6j078vm.js} +2 -2
  272. package/.next/standalone/.next/static/chunks/0tfmi08mzcieh.js +1 -0
  273. package/.next/standalone/.next/static/chunks/{023v9juzhzc~d.js → 0umi7ddtiv8sw.js} +1 -1
  274. package/.next/standalone/.next/static/chunks/0w33dj~dfamnr.css +1 -0
  275. package/.next/standalone/.next/static/chunks/0y3a2-c-i9t~t.js +1 -0
  276. package/.next/standalone/.next/static/chunks/10qltt-r5q91p.js +1 -0
  277. package/.next/standalone/.next/static/chunks/{0p5rare_o5zb1.js → 1195ux3t_r-rb.js} +2 -2
  278. package/.next/standalone/.next/static/chunks/{0w14di5d0vw6-.js → 11sqt~58g35be.js} +1 -1
  279. package/.next/standalone/.next/static/chunks/12rj7-g8lxjew.js +1 -0
  280. package/.next/standalone/package.json +1 -1
  281. package/bin/tower.mjs +10 -1
  282. package/dist/mcp-server.cjs +266 -145
  283. package/package.json +1 -1
  284. package/scripts/migrations/0004-relocate-misplaced-assets.ts +172 -0
  285. package/.next/standalone/.next/server/chunks/[externals]__0k7u3dx._.js +0 -3
  286. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.a1443._.js +0 -3
  287. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00~-bvt._.js +0 -28
  288. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01yu.gw._.js +0 -4
  289. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0965p6t._.js +0 -3
  290. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c513um._.js +0 -3
  291. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qijr4h._.js +0 -3
  292. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rc0ntp._.js +0 -3
  293. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.~z1-.._.js +0 -3
  294. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05sv58d._.js +0 -3
  295. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzafdq._.js +0 -3
  296. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0i0o7w5._.js +0 -3
  297. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kgd-1s._.js +0 -4
  298. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qnzkj3._.js +0 -30
  299. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qp5cw1._.js +0 -3
  300. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xte.35._.js +0 -3
  301. package/.next/standalone/.next/server/chunks/ssr/_0-qd2ss._.js +0 -3
  302. package/.next/standalone/.next/server/chunks/ssr/_05jv_cy._.js +0 -3
  303. package/.next/standalone/.next/server/chunks/ssr/_07c-9da._.js +0 -3
  304. package/.next/standalone/.next/server/chunks/ssr/_0gxccup._.js +0 -3
  305. package/.next/standalone/.next/server/chunks/ssr/_0m.34j8._.js +0 -3
  306. package/.next/standalone/.next/server/chunks/ssr/_0w9~m7o._.js +0 -3
  307. package/.next/standalone/.next/server/chunks/ssr/src_lib_06okbb2._.js +0 -3
  308. package/.next/standalone/.next/server/chunks/ssr/src_lib_0741dos._.js +0 -3
  309. package/.next/standalone/.next/server/chunks/ssr/src_lib_0cbuy0_._.js +0 -3
  310. package/.next/standalone/.next/server/chunks/ssr/src_lib_0e27xy7._.js +0 -3
  311. package/.next/standalone/.next/server/chunks/ssr/src_lib_0n5-vk5._.js +0 -3
  312. package/.next/standalone/.next/server/chunks/ssr/src_lib_0rk2hla._.js +0 -3
  313. package/.next/standalone/.next/server/chunks/ssr/src_lib_0t5xz2y._.js +0 -3
  314. package/.next/standalone/.next/server/chunks/ssr/src_lib_0u5_gf2._.js +0 -3
  315. package/.next/standalone/.next/server/chunks/ssr/src_lib_0v6s6se._.js +0 -3
  316. package/.next/standalone/.next/static/chunks/0.euy5rie4v3d.js +0 -1
  317. package/.next/standalone/.next/static/chunks/01.nidb8sf6bh.js +0 -1
  318. package/.next/standalone/.next/static/chunks/02jsekc779t5~.js +0 -1
  319. package/.next/standalone/.next/static/chunks/0fy6w5d_zyro0.js +0 -1
  320. package/.next/standalone/.next/static/chunks/0g-gbdkcssn.g.js +0 -1
  321. package/.next/standalone/.next/static/chunks/0h7~fn.p-fxz_.js +0 -1
  322. package/.next/standalone/.next/static/chunks/0j2n.h0~von8h.js +0 -1
  323. package/.next/standalone/.next/static/chunks/0k.hp06ufx4yp.js +0 -1
  324. package/.next/standalone/.next/static/chunks/0lk-i0jm2ubea.css +0 -1
  325. package/.next/standalone/.next/static/chunks/0q~4dhw.phxg3.js +0 -1
  326. package/.next/standalone/.next/static/chunks/0z2blg_osfipv.js +0 -1
  327. package/.next/standalone/.next/static/chunks/134c60acdsr_g.js +0 -1
  328. /package/.next/standalone/.next/static/{JutVIyokVf-YrN6j2WEwG → zSKVtiYaR_yWxx7AopTMR}/_buildManifest.js +0 -0
  329. /package/.next/standalone/.next/static/{JutVIyokVf-YrN6j2WEwG → zSKVtiYaR_yWxx7AopTMR}/_clientMiddlewareManifest.js +0 -0
  330. /package/.next/standalone/.next/static/{JutVIyokVf-YrN6j2WEwG → zSKVtiYaR_yWxx7AopTMR}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,645119,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(538059),n=e.i(210702),a=e.i(232545),i=e.i(487278),l=e.i(368490),o=e.i(259846),d=e.i(572989);let c=(0,d.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var x=e.i(519455),m=e.i(759684),u=e.i(606393),p=e.i(226145),h=e.i(340873),f=e.i(263938),g=e.i(960518),v=e.i(453889),j=e.i(645378);let b=(0,d.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var N=e.i(464249);let y=(0,d.default)("package-check",[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16 17 2 2 4-4",key:"uh5qu3"}],["path",{d:"M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753",key:"kpkbpo"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]),w=(0,d.default)("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);var C=e.i(746798),S=e.i(685149),k=e.i(35967),D=e.i(533499);function T(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let s=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${s}-${r}`}let B=Object.fromEntries(S.BOARD_COLUMNS.map(e=>[e.id,e.color]));function E({children:e,className:s}){return(0,t.jsx)("span",{className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-0.5 text-xs text-muted-foreground ${s??""}`,children:e})}function I({task:e,onOpenDetail:r}){let{t:n}=(0,D.useI18n)(),[a,i]=(0,s.useState)(!1),o="CANCELLED"===e.status?"text-muted-foreground line-through decoration-muted-foreground/40":"DONE"===e.status?"text-muted-foreground":"text-foreground";return(0,t.jsxs)("div",{className:"rounded-[10px]",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex w-full items-center gap-2.5 rounded-[10px] px-2.5 py-2.5 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${a?"rotate-90":""}`}),(0,t.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${B[e.status]??"bg-slate-400"}`}),(0,t.jsx)("span",{className:`text-[13.5px] font-medium ${o}`,children:e.title}),e.labels.map(({label:e})=>(0,t.jsx)("span",{className:"rounded-full border border-border px-1.5 py-px text-[10.5px] text-muted-foreground",style:e.color?{borderColor:e.color+"55",color:e.color}:void 0,children:e.name},e.id)),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"flex w-16 flex-none justify-center",children:(0,t.jsx)("span",{className:`rounded-[5px] px-1.5 py-px text-[10.5px] font-bold ${S.PRIORITY_CONFIG[e.priority]?.color??S.PRIORITY_CONFIG.LOW.color}`,children:e.priority})}),(0,t.jsx)("span",{className:"h-3 w-px bg-border flex-none"}),(0,t.jsxs)("span",{className:"flex w-[72px] flex-none items-center gap-1.5",children:[(0,t.jsx)("span",{className:`h-1.5 w-1.5 flex-none rounded-full ${B[e.status]??"bg-slate-400"}`}),(0,t.jsx)("span",{className:"truncate text-[10.5px] text-muted-foreground",children:n(`version.taskStatus.${e.status}`)})]}),(0,t.jsx)("span",{className:"h-3 w-px bg-border flex-none"}),(0,t.jsx)("span",{className:"flex w-6 flex-none justify-center",children:r&&(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{render:(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground",onClick:t=>{t.stopPropagation(),r(e.id)}}),children:(0,t.jsx)(w,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.TooltipContent,{children:n("version.detail")})]})})]}),a&&(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 pb-3 pl-[30px] pr-3 pt-1",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(v.FolderOpen,{className:"h-3 w-3 text-muted-foreground/60"}),(0,t.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground/60",children:n("version.resources")})]}),0===e.assets.length?(0,t.jsx)("p",{className:"text-[12px] italic text-muted-foreground/60",children:n("version.empty.resources")}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.assets.map(e=>{var s;let r=e.mimeType?.startsWith("image/");return(0,t.jsxs)("span",{className:"inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-[12px] text-foreground shadow-sm transition-colors hover:border-primary/50",children:[r?(0,t.jsx)(b,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(j.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{children:e.filename}),null!=e.size&&(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground/60",children:(s=e.size)<1024?`${s} B`:s<1048576?`${Math.round(s/1024)} KB`:`${(s/1048576).toFixed(1)} MB`})]},e.id)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(j.FileText,{className:"h-3 w-3 text-muted-foreground/60"}),(0,t.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground/60",children:n("version.notes")})]}),0===e.notes.length?(0,t.jsx)("p",{className:"text-[12px] italic text-muted-foreground/60",children:n("version.empty.notes")}):(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:e.notes.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-border border-l-violet-500/50 bg-background px-2.5 py-2 shadow-sm [border-left-width:3px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[12.5px] font-semibold text-foreground",children:e.title}),e.category&&(0,t.jsx)("span",{className:"rounded-[5px] border border-violet-500/30 bg-violet-500/15 px-1.5 py-px text-[10px] font-bold text-violet-300",children:e.category})]})},e.id))})]})]})]})}function L({version:e,diffStat:r,onEdit:n,onRelease:a,onViewDiff:i,onOpenTaskDetail:o}){var d;let c,{t:m}=(0,D.useI18n)(),[v,j]=(0,s.useState)(e.isCurrent),b="RELEASED"===e.status,w="ACTIVE"===e.status,S=e.tasks.length,B=e.tasks.filter(e=>"DONE"===e.status).length,R=!!(e.releaseCommit||r),$=(c=`${S} ${m("version.tasksCount")}`,B>0&&B<S?`${c} \xb7 ${B} ${m("version.doneCount")}`:B>0&&B===S?`${c} \xb7 ${m("version.allDone")}`:c);return(0,t.jsxs)("div",{className:["overflow-hidden rounded-[14px] border bg-card shadow-sm transition-shadow duration-150 hover:shadow-md",e.isCurrent?"border-border border-l-2 border-l-primary ring-1 ring-primary/20":"border-border",b?"opacity-[.96]":""].filter(Boolean).join(" "),children:[(0,t.jsx)("button",{type:"button",onClick:()=>j(e=>!e),className:"w-full text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsxs)("div",{className:"px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(l.ChevronRight,{className:`h-4 w-4 flex-none text-muted-foreground/60 transition-transform duration-150 ${v?"rotate-90":""}`}),(0,t.jsx)("span",{className:"font-mono text-[14.5px] font-bold text-foreground",children:e.number}),(0,t.jsx)("span",{className:"text-[14.5px] font-semibold text-foreground",children:e.name}),(0,t.jsx)(k.VersionTypeBadge,{name:e.type?.name??null}),(0,t.jsx)(k.VersionStatusBadge,{status:e.status}),e.isCurrent&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/15 px-2.5 py-0.5 text-[11px] font-bold text-primary shadow-sm",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-primary opacity-90"}),m("version.current")]}),(0,t.jsx)("span",{className:"flex-1"}),S>0&&(0,t.jsx)("span",{className:"text-[11.5px] text-muted-foreground",children:$}),(0,t.jsxs)("span",{className:"flex items-center gap-1",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[n&&(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{render:(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>n(e.id)}),children:(0,t.jsx)(N.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.TooltipContent,{children:m("version.edit")})]}),w&&a&&(0,t.jsxs)(x.Button,{variant:"outline",className:"h-7 px-2 text-xs font-semibold",onClick:()=>a(e.id),children:[(0,t.jsx)(y,{className:"h-3.5 w-3.5"}),m("version.release")]})]})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex flex-wrap items-center gap-2",children:[b&&e.releasedAt?(0,t.jsxs)(E,{children:[(0,t.jsx)(u.Calendar,{className:"h-3 w-3"}),m("version.releasedAt"),(0,t.jsx)("strong",{className:"text-foreground",children:T(e.releasedAt)})]}):e.startDate||e.targetDate?(0,t.jsxs)(E,{children:[(0,t.jsx)(u.Calendar,{className:"h-3 w-3"}),e.startDate?T(e.startDate):"—"," → ",e.targetDate?(0,t.jsx)("strong",{className:"text-foreground",children:T(e.targetDate)}):"—"]}):null,e.baseBranch&&(0,t.jsxs)(E,{children:[(0,t.jsx)(p.GitBranch,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:e.baseBranch})]}),e.baseCommit&&(0,t.jsxs)(E,{children:[(0,t.jsx)(h.GitCommitHorizontal,{className:"h-3 w-3"}),m("version.field.baseCommit"),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:(d=e.baseCommit)?d.slice(0,7):""})]}),b&&(0,t.jsxs)(E,{children:[(0,t.jsx)(f.Tag,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:e.number})]}),r&&(0,t.jsxs)(E,{children:[(0,t.jsx)(g.GitCompare,{className:"h-3 w-3"}),!b&&(0,t.jsx)("span",{className:"text-muted-foreground",children:m("version.diff.live")}),(0,t.jsxs)("span",{className:"font-bold text-emerald-400",children:["+",r.additions.toLocaleString()]}),(0,t.jsxs)("span",{className:"font-bold text-rose-400",children:["−",r.deletions.toLocaleString()]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["· ",r.files," ",m("version.diff.files")]})]}),R&&i&&(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-xs text-muted-foreground",onClick:t=>{t.stopPropagation(),i(e.id)},children:[(0,t.jsx)(g.GitCompare,{className:"h-3 w-3"}),m("version.diff.view")," →"]})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:e.description})]})}),v&&S>0&&(0,t.jsx)("div",{className:"border-t border-dashed border-border bg-muted/40 px-2 pb-2 pt-1.5",children:e.tasks.map(e=>(0,t.jsx)(I,{task:e,onOpenDetail:o},e.id))})]})}var R=e.i(360112),$=e.i(597746),_=e.i(456346),O=e.i(776639),A=e.i(793479),V=e.i(110204),P=e.i(280027),M=e.i(337822),F=e.i(317056),z=e.i(699375),U=e.i(624687),H=e.i(514798);let G=(0,H.createServerReference)("40da7c092783ebcf1dd22aa3a280e641b2c4427ace",H.callServer,void 0,H.findSourceMapURL,"createVersion"),K=(0,H.createServerReference)("6039b9115f67f2fe4322dfec62fc70c468476ef9da",H.callServer,void 0,H.findSourceMapURL,"updateVersion"),W=(0,H.createServerReference)("40c48208829302674f2f477c34c108d3fd8e37baed",H.callServer,void 0,H.findSourceMapURL,"getVersionTypes");var Y=e.i(965322),q=e.i(726027),J=e.i(998626);let Q=(0,H.createServerReference)("4006b9cad3a29c690d7c9b0002f7ba9b7499ba4e41",H.callServer,void 0,H.findSourceMapURL,"createVersionType"),X=(0,H.createServerReference)("6019c73705f305ba7f164c1d3ee3a1bfcfc7a0236f",H.callServer,void 0,H.findSourceMapURL,"updateVersionType"),Z=(0,H.createServerReference)("40597dc88c65807f2f5beaf9c32db41ece5fa27d5a",H.callServer,void 0,H.findSourceMapURL,"deleteVersionType");function ee({open:e,onOpenChange:r,workspaceId:n,onChanged:a}){let{t:i}=(0,D.useI18n)(),[l,o]=(0,s.useState)([]),[d,c]=(0,s.useState)(""),[m,u]=(0,s.useState)({}),[p,h]=(0,s.useTransition)(),f=async()=>{let e=await W(n);o(e),u(t=>{let s={};return e.forEach(e=>{s[e.id]=e.id in t?t[e.id]:e.name}),s})};(0,s.useEffect)(()=>{e&&(f(),c(""))},[e,n]);let g=()=>{let e=d.trim();e&&h(async()=>{try{await Q({workspaceId:n,name:e}),c(""),await f(),a?.(),R.toast.success(i("version.type.add"))}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})};return(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:i("version.manageTypes")})}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(A.Input,{value:d,onChange:e=>c(e.target.value),placeholder:i("version.type.namePlaceholder"),disabled:p,onKeyDown:e=>{"Enter"===e.key&&g()},className:"flex-1"}),(0,t.jsx)(x.Button,{onClick:g,disabled:p||!d.trim(),children:i("version.type.add")})]}),0===l.length?(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground py-4",children:i("version.type.empty")}):(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:l.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsx)("span",{className:`inline-flex h-2.5 w-2.5 flex-none rounded-full ${(0,k.typeBadgeColor)(m[e.id]??e.name).split(" ").filter(e=>e.startsWith("bg-"))[0]??"bg-muted"}`}),(0,t.jsx)(A.Input,{value:m[e.id]??e.name,onChange:t=>u(s=>({...s,[e.id]:t.target.value})),onBlur:()=>(e=>{let t=(m[e]??"").trim();if(!t)return;let s=l.find(t=>t.id===e);s?.name!==t&&h(async()=>{try{await X(e,{name:t}),await f(),a?.()}catch(t){R.toast.error(t instanceof Error?t.message:String(t)),u(t=>({...t,[e]:s?.name??""}))}})})(e.id),onKeyDown:e=>{"Enter"===e.key&&e.target.blur()},disabled:p,className:"h-7 flex-1 border-transparent bg-transparent shadow-none focus-visible:border-input focus-visible:bg-background focus-visible:shadow-sm"}),(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-none text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void(window.confirm(i("version.type.deleteConfirm"))&&h(async()=>{try{await Z(t),await f(),a?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}}))},disabled:p,children:(0,t.jsx)(J.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))})]})]})})}function et(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let s=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${s}-${r}-${n}`}function es(e){if(!e)return;let t=new Date(e);return isNaN(t.getTime())?void 0:t}function er({open:e,onOpenChange:r,projectId:n,workspaceId:a,editVersion:i,defaultBaseBranch:l,projectLocalPath:o,onSuccess:d}){let{t:c}=(0,D.useI18n)(),m=!!i,[u,h]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[v,j]=(0,s.useState)(""),[b,N]=(0,s.useState)([]),[y,w]=(0,s.useState)(!1),[C,S]=(0,s.useState)(""),[k,T]=(0,s.useState)(""),[B,E]=(0,s.useState)(""),[I,L]=(0,s.useState)(""),[H,J]=(0,s.useState)(!1),[Q,X]=(0,s.useState)([]),[Z,en]=(0,s.useState)(!1),[ea,ei]=(0,s.useState)(!1),el=!!o,[eo,ed]=(0,s.useTransition)();return(0,s.useEffect)(()=>{e&&(i?(h(i.number),g(i.name),j(i.typeId??""),S(i.baseBranch??""),T(et(i.startDate)),E(et(i.targetDate)),L(i.description??"")):(h(""),g(""),j(""),S(l??""),T(""),E(""),L("")),J(!1))},[e,i,l]),(0,s.useEffect)(()=>{e&&W(a).then(N).catch(()=>N([]))},[e,a]),(0,s.useEffect)(()=>{e&&el?(en(!0),(0,Y.getProjectBranches)(o).then(X).catch(()=>X([])).finally(()=>en(!1)),(0,q.fetchRemoteBranches)(o).then(()=>(0,Y.getProjectBranches)(o).then(X)).catch(()=>{})):X([])},[e,el,o]),(0,t.jsxs)(O.Dialog,{open:e,onOpenChange:r,children:[(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:m?c("version.edit"):c("version.new")})}),(0,t.jsxs)("div",{className:"grid gap-4 py-2",children:[(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsxs)(V.Label,{htmlFor:"version-number",children:[c("version.field.number"),(0,t.jsx)("span",{className:"text-destructive ml-0.5",children:"*"})]}),(0,t.jsx)(A.Input,{id:"version-number",value:u,onChange:e=>h(e.target.value),placeholder:c("version.placeholder.number"),disabled:eo})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsxs)(V.Label,{htmlFor:"version-name",children:[c("version.field.name"),(0,t.jsx)("span",{className:"text-destructive ml-0.5",children:"*"})]}),(0,t.jsx)(A.Input,{id:"version-name",value:f,onChange:e=>g(e.target.value),placeholder:c("version.placeholder.name"),disabled:eo})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{children:c("version.field.type")}),(0,t.jsxs)(P.Select,{value:v||"__none__",onValueChange:e=>{j(e&&"__none__"!==e?e:"")},children:[(0,t.jsx)(P.SelectTrigger,{className:"w-full",disabled:eo,children:(0,t.jsx)("span",{className:"truncate",children:v?b.find(e=>e.id===v)?.name??c("version.type.uncategorized"):c("version.type.uncategorized")})}),(0,t.jsxs)(P.SelectContent,{children:[(0,t.jsx)(P.SelectItem,{value:"__none__",children:c("version.type.uncategorized")}),b.map(e=>(0,t.jsx)(P.SelectItem,{value:e.id,children:e.name},e.id))]})]}),(0,t.jsxs)(x.Button,{type:"button",variant:"ghost",size:"sm",className:"h-auto justify-start px-0 py-0.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>w(!0),disabled:eo,children:["+ ",c("version.manageTypes")]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{children:c("version.field.baseBranch")}),Z?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:c("task.branchLoading")}):el&&Q.length>0?(0,t.jsxs)(M.Popover,{open:ea,onOpenChange:ei,children:[(0,t.jsxs)(M.PopoverTrigger,{className:"flex h-8 w-full items-center gap-2 rounded-lg border border-input bg-transparent px-3 text-sm transition-colors hover:bg-accent focus:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",disabled:eo,"data-testid":"version-branch-selector",children:[(0,t.jsx)(p.GitBranch,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:`flex-1 truncate text-left text-xs ${C?"font-mono":"text-muted-foreground"}`,title:C||void 0,children:C||c("version.field.noBranch")}),(0,t.jsx)(_.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(M.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(F.Command,{children:[(0,t.jsx)(F.CommandInput,{placeholder:c("task.branchSearch")}),(0,t.jsxs)(F.CommandList,{children:[(0,t.jsx)(F.CommandEmpty,{children:c("task.branchNone")}),(0,t.jsxs)(F.CommandGroup,{children:[(0,t.jsxs)(F.CommandItem,{value:"__none__",onSelect:()=>{S(""),ei(!1)},children:[(0,t.jsx)("span",{className:"flex-1 truncate text-muted-foreground",children:c("version.field.noBranch")}),!C&&(0,t.jsx)($.Check,{className:"ml-auto h-3 w-3 shrink-0 text-primary"})]}),Q.map(e=>(0,t.jsxs)(F.CommandItem,{value:e,onSelect:()=>{S(e),ei(!1)},children:[(0,t.jsx)(p.GitBranch,{className:"mr-2 h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===C&&(0,t.jsx)($.Check,{className:"ml-auto h-3 w-3 shrink-0 text-primary"})]},e))]})]})]})})]}):(0,t.jsx)(A.Input,{id:"version-base-branch",value:C,onChange:e=>S(e.target.value),placeholder:"main",disabled:eo})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-start-date",children:c("version.field.startDate")}),(0,t.jsx)("input",{id:"version-start-date",type:"date",value:k,onChange:e=>T(e.target.value),disabled:eo,className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-target-date",children:c("version.field.targetDate")}),(0,t.jsx)("input",{id:"version-target-date",type:"date",value:B,onChange:e=>E(e.target.value),disabled:eo,className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-description",children:c("version.field.description")}),(0,t.jsx)(U.Textarea,{id:"version-description",value:I,onChange:e=>L(e.target.value),rows:3,disabled:eo})]}),!m&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(z.Switch,{id:"version-set-current",checked:H,onCheckedChange:J,disabled:eo}),(0,t.jsx)(V.Label,{htmlFor:"version-set-current",className:"cursor-pointer",children:c("version.field.setCurrent")})]})]}),(0,t.jsxs)(O.DialogFooter,{children:[(0,t.jsx)(x.Button,{variant:"outline",onClick:()=>r(!1),disabled:eo,children:c("common.cancel")}),(0,t.jsx)(x.Button,{onClick:()=>{u.trim()&&f.trim()&&ed(async()=>{try{m&&i?await K(i.id,{number:u.trim(),name:f.trim(),typeId:v||null,baseBranch:C.trim()||null,startDate:es(k)??null,targetDate:es(B)??null,description:I.trim()||null}):await G({projectId:n,number:u.trim(),name:f.trim(),typeId:v||void 0,baseBranch:C.trim()||void 0,startDate:es(k),targetDate:es(B),description:I.trim()||void 0,setCurrent:H}),R.toast.success(m?c("version.edit"):c("version.new")),r(!1),d?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})},disabled:eo||!u.trim()||!f.trim(),children:m?c("common.save"):c("common.create")})]})]}),(0,t.jsx)(ee,{open:y,onOpenChange:w,workspaceId:a,onChanged:()=>W(a).then(N)})]})}let en=(0,H.createServerReference)("6038a614e3502a569a24b658c514ef727f87f7e097",H.callServer,void 0,H.findSourceMapURL,"releaseVersion");function ea({open:e,onOpenChange:r,version:n,candidates:a,onSuccess:i}){let{t:l}=(0,D.useI18n)(),[o,d]=(0,s.useState)(""),[c,m]=(0,s.useTransition)();(0,s.useEffect)(()=>{e&&d("")},[e,n]);let u=a.find(e=>e.id===o),p=a.length>0,h=p&&!!o&&!c;return(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:l("version.releaseAction")})}),(0,t.jsxs)("div",{className:"grid gap-4 py-2",children:[n&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[n.number," · ",n.name]}),(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{children:l("version.release.rolloverHint")}),n?.unfinishedCount!==void 0&&n.unfinishedCount>0&&(0,t.jsxs)("span",{className:"ml-1 font-medium text-foreground",children:["(",n.unfinishedCount,")"]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:l("version.release.nextVersion")}),p?(0,t.jsxs)(P.Select,{value:o,onValueChange:e=>{e&&d(e)},disabled:c,children:[(0,t.jsx)(P.SelectTrigger,{className:"w-full",children:(0,t.jsx)("span",{className:"truncate",children:u?`${u.number} \xb7 ${u.name}`:""})}),(0,t.jsx)(P.SelectContent,{children:a.map(e=>(0,t.jsxs)(P.SelectItem,{value:e.id,children:[e.number," · ",e.name]},e.id))})]}):(0,t.jsx)("p",{className:"text-xs text-destructive",children:l("version.release.noCandidates")})]})]}),(0,t.jsxs)(O.DialogFooter,{children:[(0,t.jsx)(x.Button,{variant:"outline",onClick:()=>r(!1),disabled:c,children:l("common.cancel")}),(0,t.jsx)(x.Button,{onClick:()=>{n&&o&&m(async()=>{try{await en(n.id,o),R.toast.success(l("version.release")),r(!1),i?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})},disabled:!h,children:l("version.release")})]})]})})}var ei=e.i(400355);let el=(0,H.createServerReference)("40e165d3fde6173d1edb56e3a9bee20141fc08b736",H.callServer,void 0,H.findSourceMapURL,"getVersionDiff");var eo=e.i(196199);function ed({file:e}){let{t:r}=(0,D.useI18n)(),[n,a]=(0,s.useState)(!0),i=e.to&&"/dev/null"!==e.to?e.to:e.from??"",o=e.additions??0,d=e.deletions??0,c=[];for(let t of e.chunks)for(let e of(c.push({type:"normal",content:t.content,chunkHeader:t.content}),t.changes))c.push({type:e.type,content:e.content});let x=c.length>500,m=x?c.slice(0,500):c;return(0,t.jsxs)("div",{className:"overflow-hidden rounded-[10px] border border-border",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>a(e=>!e),className:"flex w-full items-center gap-2 bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${n?"rotate-90":""}`}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono text-[12px] font-medium text-foreground",children:i}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] font-bold text-emerald-400",children:["+",o]}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] font-bold text-rose-400",children:["−",d]})]}),n&&(0,t.jsxs)("div",{className:"overflow-x-auto",children:[(0,t.jsx)("pre",{className:"m-0 p-0",children:m.map((e,s)=>void 0!==e.chunkHeader?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-muted-foreground bg-muted/40",children:e.content},s):"add"===e.type?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-emerald-300 bg-emerald-500/10",children:e.content},s):"del"===e.type?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-rose-300 bg-rose-500/10",children:e.content},s):(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-muted-foreground",children:e.content},s))}),x&&(0,t.jsx)("p",{className:"border-t border-border px-3 py-2 text-[11px] text-muted-foreground/70 italic",children:r("version.diff.truncated")})]})]})}function ec({open:e,onOpenChange:r,versionId:n,versionLabel:a}){let{t:i}=(0,D.useI18n)(),[l,o]=(0,s.useTransition)(),[d,c]=(0,s.useState)(null),[x,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{e&&n&&(c(null),m(!1),o(async()=>{let e=await el(n);if(!e)return void m(!0);let t=(0,eo.parseUnifiedDiff)(e.patch);0===t.length||""===e.patch?m(!0):c(t)}))},[e,n]),(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-3xl max-h-[80vh] overflow-auto",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsxs)(O.DialogTitle,{children:[i("version.diff.title"),a?` — ${a}`:""]})}),l&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-muted-foreground",children:[(0,t.jsx)(ei.Loader2,{className:"h-5 w-5 animate-spin"}),(0,t.jsx)("span",{className:"text-sm",children:i("version.diff.loading")})]}),!l&&x&&(0,t.jsx)("p",{className:"py-10 text-center text-sm text-muted-foreground",children:i("version.diff.empty")}),!l&&d&&d.length>0&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:d.map((e,s)=>(0,t.jsx)(ed,{file:e},s))})]})})}var ex=e.i(605005),em=e.i(889620);function eu({version:e,isFirst:s,isLast:r,dashed:n=!1,diffStat:a,onEdit:i,onRelease:l,onViewDiff:o,onOpenTaskDetail:d}){return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative flex w-5 flex-none flex-col items-center",children:[(0,t.jsx)("div",{className:["w-px flex-none",s?"h-0":"h-6",n?"bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]":"bg-border"].filter(Boolean).join(" ")}),(0,t.jsx)("div",{className:["z-10 h-3.5 w-3.5 flex-none rounded-full border-2",e.isCurrent?"border-primary bg-primary ring-2 ring-primary/30":"ACTIVE"===e.status?"border-emerald-400 bg-emerald-400":"RELEASED"===e.status?"border-zinc-500 bg-zinc-500":"border-muted-foreground/40 bg-transparent border-dashed"].join(" ")}),!r&&(0,t.jsx)("div",{className:["w-px flex-1",n?"bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]":"bg-border"].join(" ")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 pb-5",children:(0,t.jsx)(L,{version:e,diffStat:a??null,onEdit:i,onRelease:l,onViewDiff:o,onOpenTaskDetail:d})})]})}e.s(["VersionTimelineClient",0,function({project:e,workspaceId:d,versions:u,diffStats:p,backlog:h}){let f,{t:g}=(0,D.useI18n)(),v=(0,r.useRouter)();(0,s.useEffect)(()=>{(0,em.setLastProjectId)(d,e.id)},[d,e.id]);let[j,b]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),[w,C]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),[T,B]=(0,s.useState)(null),[E,L]=(0,s.useState)(null),[R,$]=(0,s.useState)(null),[_,O]=(0,s.useState)(!1),A=[...[...u.filter(e=>"RELEASED"!==e.status)].sort((e,t)=>{if(!e.targetDate&&!t.targetDate)return 0;if(!e.targetDate)return 1;if(!t.targetDate)return -1;let s=new Date(t.targetDate).getTime()-new Date(e.targetDate).getTime();return 0!==s?s:new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}),...[...u.filter(e=>"RELEASED"===e.status)].sort((e,t)=>e.releasedAt||t.releasedAt?e.releasedAt?t.releasedAt?new Date(t.releasedAt).getTime()-new Date(e.releasedAt).getTime():-1:1:0)],V=e=>{let t=u.find(t=>t.id===e);t&&(y({id:t.id,number:t.number,name:t.name,typeId:t.typeId??null,baseBranch:t.baseBranch,startDate:t.startDate,targetDate:t.targetDate,description:t.description}),b(!0))},P=e=>{let t=u.find(t=>t.id===e);t&&(B(t),k(!0))},M=e=>{L(e)},F=()=>{y(null),b(!0)},z=()=>{v.refresh()},U=T?u.filter(e=>e.id!==T.id&&("PLANNED"===e.status||"ACTIVE"===e.status)).map(e=>({id:e.id,number:e.number,name:e.name})):[],H=T?T.tasks.filter(e=>"DONE"!==e.status&&"CANCELLED"!==e.status).length:void 0;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"header-xl flex shrink-0 items-center gap-4 border-b px-6",children:[(0,t.jsxs)(n.default,{href:`/workspaces/${d}?projectId=${e.id}`,className:"flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)(o.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:g("archive.backToBoard")})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"truncate font-medium",children:e.name}),(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("span",{children:g("version.timeline")})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground/70",children:g("version.historyHint")})]}),(0,t.jsxs)(x.Button,{variant:"outline",onClick:()=>C(!0),children:[(0,t.jsx)(c,{className:"h-4 w-4"}),g("version.manageTypes")]}),(0,t.jsxs)(x.Button,{onClick:F,children:[(0,t.jsx)(a.Plus,{className:"h-4 w-4"}),g("version.new")]})]}),(0,t.jsx)(m.ScrollArea,{className:"min-h-0 flex-1",children:(0,t.jsx)("div",{className:"px-6 py-6",children:(0,t.jsxs)("div",{className:"mx-auto max-w-3xl",children:[0===u.length&&0===h.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 py-20 text-center text-muted-foreground",children:[(0,t.jsx)("p",{className:"text-sm",children:g("version.empty.list")}),(0,t.jsxs)(x.Button,{variant:"outline",onClick:F,children:[(0,t.jsx)(a.Plus,{className:"h-4 w-4"}),g("version.new")]})]}),A.length>0&&(0,t.jsx)("div",{className:"relative",children:A.map((e,s)=>(0,t.jsx)(eu,{version:e,isFirst:0===s,isLast:s===A.length-1&&0===h.length,diffStat:p[e.id],onEdit:V,onRelease:P,onViewDiff:M,onOpenTaskDetail:$},e.id))}),h.length>0&&(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative flex w-5 flex-none flex-col items-center",children:[(0,t.jsx)("div",{className:"h-6 w-px bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]"}),(0,t.jsx)("div",{className:"z-10 h-3.5 w-3.5 flex-none rounded-full border-2 border-dashed border-muted-foreground/40 bg-transparent"})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 pb-5",children:(0,t.jsxs)("div",{className:"overflow-hidden rounded-[14px] border border-dashed bg-muted/40 shadow-sm",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>O(e=>!e),className:"w-full px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${_?"rotate-90":""}`}),(0,t.jsx)(i.Archive,{className:"h-4 w-4 flex-none text-muted-foreground/70"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-foreground",children:g("version.history")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:g("version.historySub")}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsxs)("span",{className:"text-[11.5px] text-muted-foreground",children:[h.length," ",g("version.tasksCount")]})]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground/70",children:g("version.historyHint")})]}),_&&(0,t.jsx)("div",{className:"border-t border-dashed border-border px-2 pb-2 pt-1.5",children:h.map(e=>(0,t.jsx)(I,{task:e,onOpenDetail:$},e.id))})]})})]})]})})}),(0,t.jsx)(er,{open:j,onOpenChange:e=>{b(e),e||y(null)},projectId:e.id,workspaceId:d,editVersion:N,defaultBaseBranch:null,projectLocalPath:e.localPath,onSuccess:z}),(0,t.jsx)(ee,{open:w,onOpenChange:C,workspaceId:d,onChanged:()=>v.refresh()}),(0,t.jsx)(ea,{open:S,onOpenChange:e=>{k(e),e||B(null)},version:T?{id:T.id,number:T.number,name:T.name,unfinishedCount:H}:null,candidates:U,onSuccess:z}),(0,t.jsx)(ec,{open:!!E,onOpenChange:e=>{e||L(null)},versionId:E,versionLabel:E&&(f=u.find(e=>e.id===E))?`${f.number} ${f.name}`:void 0}),(0,t.jsx)(ex.TaskOverviewDrawer,{open:!!R,onOpenChange:e=>{e||$(null)},taskId:R})]})}],645119)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,645119,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(538059),n=e.i(210702),a=e.i(232545),i=e.i(487278),l=e.i(368490),o=e.i(259846),d=e.i(572989);let c=(0,d.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var x=e.i(519455),m=e.i(759684),u=e.i(606393),p=e.i(226145),h=e.i(340873),f=e.i(263938),g=e.i(960518),v=e.i(453889),j=e.i(645378);let b=(0,d.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var N=e.i(464249);let y=(0,d.default)("package-check",[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16 17 2 2 4-4",key:"uh5qu3"}],["path",{d:"M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753",key:"kpkbpo"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]),w=(0,d.default)("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);var C=e.i(746798),S=e.i(685149),k=e.i(35967),D=e.i(533499);function T(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let s=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${s}-${r}`}let B=Object.fromEntries(S.BOARD_COLUMNS.map(e=>[e.id,e.color]));function E({children:e,className:s}){return(0,t.jsx)("span",{className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-0.5 text-xs text-muted-foreground ${s??""}`,children:e})}function I({task:e,onOpenDetail:r}){let{t:n}=(0,D.useI18n)(),[a,i]=(0,s.useState)(!1),o="CANCELLED"===e.status?"text-muted-foreground line-through decoration-muted-foreground/40":"DONE"===e.status?"text-muted-foreground":"text-foreground";return(0,t.jsxs)("div",{className:"rounded-[10px]",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex w-full items-center gap-2.5 rounded-[10px] px-2.5 py-2.5 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${a?"rotate-90":""}`}),(0,t.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${B[e.status]??"bg-slate-400"}`}),(0,t.jsx)("span",{className:`text-[13.5px] font-medium ${o}`,children:e.title}),e.labels.map(({label:e})=>(0,t.jsx)("span",{className:"rounded-full border border-border px-1.5 py-px text-[10.5px] text-muted-foreground",style:e.color?{borderColor:e.color+"55",color:e.color}:void 0,children:e.name},e.id)),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"flex w-16 flex-none justify-center",children:(0,t.jsx)("span",{className:`rounded-[5px] px-1.5 py-px text-[10.5px] font-bold ${S.PRIORITY_CONFIG[e.priority]?.color??S.PRIORITY_CONFIG.LOW.color}`,children:e.priority})}),(0,t.jsx)("span",{className:"h-3 w-px bg-border flex-none"}),(0,t.jsxs)("span",{className:"flex w-[72px] flex-none items-center gap-1.5",children:[(0,t.jsx)("span",{className:`h-1.5 w-1.5 flex-none rounded-full ${B[e.status]??"bg-slate-400"}`}),(0,t.jsx)("span",{className:"truncate text-[10.5px] text-muted-foreground",children:n(`version.taskStatus.${e.status}`)})]}),(0,t.jsx)("span",{className:"h-3 w-px bg-border flex-none"}),(0,t.jsx)("span",{className:"flex w-6 flex-none justify-center",children:r&&(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{render:(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground",onClick:t=>{t.stopPropagation(),r(e.id)}}),children:(0,t.jsx)(w,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.TooltipContent,{children:n("version.detail")})]})})]}),a&&(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 pb-3 pl-[30px] pr-3 pt-1",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(v.FolderOpen,{className:"h-3 w-3 text-muted-foreground/60"}),(0,t.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground/60",children:n("version.resources")})]}),0===e.assets.length?(0,t.jsx)("p",{className:"text-[12px] italic text-muted-foreground/60",children:n("version.empty.resources")}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.assets.map(e=>{var s;let r=e.mimeType?.startsWith("image/");return(0,t.jsxs)("span",{className:"inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-[12px] text-foreground shadow-sm transition-colors hover:border-primary/50",children:[r?(0,t.jsx)(b,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(j.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{children:e.filename}),null!=e.size&&(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground/60",children:(s=e.size)<1024?`${s} B`:s<1048576?`${Math.round(s/1024)} KB`:`${(s/1048576).toFixed(1)} MB`})]},e.id)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(j.FileText,{className:"h-3 w-3 text-muted-foreground/60"}),(0,t.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground/60",children:n("version.notes")})]}),0===e.notes.length?(0,t.jsx)("p",{className:"text-[12px] italic text-muted-foreground/60",children:n("version.empty.notes")}):(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:e.notes.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-border border-l-violet-500/50 bg-background px-2.5 py-2 shadow-sm [border-left-width:3px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[12.5px] font-semibold text-foreground",children:e.title}),e.category&&(0,t.jsx)("span",{className:"rounded-[5px] border border-violet-500/30 bg-violet-500/15 px-1.5 py-px text-[10px] font-bold text-violet-300",children:e.category})]})},e.id))})]})]})]})}function L({version:e,diffStat:r,onEdit:n,onRelease:a,onViewDiff:i,onOpenTaskDetail:o}){var d;let c,{t:m}=(0,D.useI18n)(),[v,j]=(0,s.useState)(e.isCurrent),b="RELEASED"===e.status,w="ACTIVE"===e.status,S=e.tasks.length,B=e.tasks.filter(e=>"DONE"===e.status).length,R=!!(e.releaseCommit||r),$=(c=`${S} ${m("version.tasksCount")}`,B>0&&B<S?`${c} \xb7 ${B} ${m("version.doneCount")}`:B>0&&B===S?`${c} \xb7 ${m("version.allDone")}`:c);return(0,t.jsxs)("div",{className:["overflow-hidden rounded-[14px] border bg-card shadow-sm transition-shadow duration-150 hover:shadow-md",e.isCurrent?"border-border border-l-2 border-l-primary ring-1 ring-primary/20":"border-border",b?"opacity-[.96]":""].filter(Boolean).join(" "),children:[(0,t.jsx)("button",{type:"button",onClick:()=>j(e=>!e),className:"w-full text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsxs)("div",{className:"px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(l.ChevronRight,{className:`h-4 w-4 flex-none text-muted-foreground/60 transition-transform duration-150 ${v?"rotate-90":""}`}),(0,t.jsx)("span",{className:"font-mono text-[14.5px] font-bold text-foreground",children:e.number}),(0,t.jsx)("span",{className:"text-[14.5px] font-semibold text-foreground",children:e.name}),(0,t.jsx)(k.VersionTypeBadge,{name:e.type?.name??null}),(0,t.jsx)(k.VersionStatusBadge,{status:e.status}),e.isCurrent&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/15 px-2.5 py-0.5 text-[11px] font-bold text-primary shadow-sm",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-primary opacity-90"}),m("version.current")]}),(0,t.jsx)("span",{className:"flex-1"}),S>0&&(0,t.jsx)("span",{className:"text-[11.5px] text-muted-foreground",children:$}),(0,t.jsxs)("span",{className:"flex items-center gap-1",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[n&&(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{render:(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>n(e.id)}),children:(0,t.jsx)(N.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.TooltipContent,{children:m("version.edit")})]}),w&&a&&(0,t.jsxs)(x.Button,{variant:"outline",className:"h-7 px-2 text-xs font-semibold",onClick:()=>a(e.id),children:[(0,t.jsx)(y,{className:"h-3.5 w-3.5"}),m("version.release")]})]})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex flex-wrap items-center gap-2",children:[b&&e.releasedAt?(0,t.jsxs)(E,{children:[(0,t.jsx)(u.Calendar,{className:"h-3 w-3"}),m("version.releasedAt"),(0,t.jsx)("strong",{className:"text-foreground",children:T(e.releasedAt)})]}):e.startDate||e.targetDate?(0,t.jsxs)(E,{children:[(0,t.jsx)(u.Calendar,{className:"h-3 w-3"}),e.startDate?T(e.startDate):"—"," → ",e.targetDate?(0,t.jsx)("strong",{className:"text-foreground",children:T(e.targetDate)}):"—"]}):null,e.baseBranch&&(0,t.jsxs)(E,{children:[(0,t.jsx)(p.GitBranch,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:e.baseBranch})]}),e.baseCommit&&(0,t.jsxs)(E,{children:[(0,t.jsx)(h.GitCommitHorizontal,{className:"h-3 w-3"}),m("version.field.baseCommit"),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:(d=e.baseCommit)?d.slice(0,7):""})]}),b&&(0,t.jsxs)(E,{children:[(0,t.jsx)(f.Tag,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:e.number})]}),r&&(0,t.jsxs)(E,{children:[(0,t.jsx)(g.GitCompare,{className:"h-3 w-3"}),!b&&(0,t.jsx)("span",{className:"text-muted-foreground",children:m("version.diff.live")}),(0,t.jsxs)("span",{className:"font-bold text-emerald-400",children:["+",r.additions.toLocaleString()]}),(0,t.jsxs)("span",{className:"font-bold text-rose-400",children:["−",r.deletions.toLocaleString()]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["· ",r.files," ",m("version.diff.files")]})]}),R&&i&&(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-xs text-muted-foreground",onClick:t=>{t.stopPropagation(),i(e.id)},children:[(0,t.jsx)(g.GitCompare,{className:"h-3 w-3"}),m("version.diff.view")," →"]})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:e.description})]})}),v&&S>0&&(0,t.jsx)("div",{className:"border-t border-dashed border-border bg-muted/40 px-2 pb-2 pt-1.5",children:e.tasks.map(e=>(0,t.jsx)(I,{task:e,onOpenDetail:o},e.id))})]})}var R=e.i(360112),$=e.i(597746),_=e.i(456346),O=e.i(776639),A=e.i(793479),V=e.i(110204),P=e.i(967489),M=e.i(337822),F=e.i(317056),z=e.i(699375),U=e.i(624687),H=e.i(514798);let G=(0,H.createServerReference)("40808ee63032f41699cfea656d2e679022754e681a",H.callServer,void 0,H.findSourceMapURL,"createVersion"),K=(0,H.createServerReference)("6065ce921e6df11e983d16a6ab6351ce529f2f69ab",H.callServer,void 0,H.findSourceMapURL,"updateVersion"),W=(0,H.createServerReference)("40352b2ee3760683a35241716ae4b02f66faf7bd67",H.callServer,void 0,H.findSourceMapURL,"getVersionTypes");var Y=e.i(241623),q=e.i(310987),J=e.i(998626);let Q=(0,H.createServerReference)("40105c13ff70c3e3cc6a71b4ac9d74f99e7c1137e3",H.callServer,void 0,H.findSourceMapURL,"createVersionType"),X=(0,H.createServerReference)("60a5e0cee4e354460326245dd677ef4dc4d65eecca",H.callServer,void 0,H.findSourceMapURL,"updateVersionType"),Z=(0,H.createServerReference)("4056f8f0255c7b2e746e80dbd27289e6f6df5af185",H.callServer,void 0,H.findSourceMapURL,"deleteVersionType");function ee({open:e,onOpenChange:r,workspaceId:n,onChanged:a}){let{t:i}=(0,D.useI18n)(),[l,o]=(0,s.useState)([]),[d,c]=(0,s.useState)(""),[m,u]=(0,s.useState)({}),[p,h]=(0,s.useTransition)(),f=async()=>{let e=await W(n);o(e),u(t=>{let s={};return e.forEach(e=>{s[e.id]=e.id in t?t[e.id]:e.name}),s})};(0,s.useEffect)(()=>{e&&(f(),c(""))},[e,n]);let g=()=>{let e=d.trim();e&&h(async()=>{try{await Q({workspaceId:n,name:e}),c(""),await f(),a?.(),R.toast.success(i("version.type.add"))}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})};return(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:i("version.manageTypes")})}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(A.Input,{value:d,onChange:e=>c(e.target.value),placeholder:i("version.type.namePlaceholder"),disabled:p,onKeyDown:e=>{"Enter"===e.key&&g()},className:"flex-1"}),(0,t.jsx)(x.Button,{onClick:g,disabled:p||!d.trim(),children:i("version.type.add")})]}),0===l.length?(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground py-4",children:i("version.type.empty")}):(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:l.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsx)("span",{className:`inline-flex h-2.5 w-2.5 flex-none rounded-full ${(0,k.typeBadgeColor)(m[e.id]??e.name).split(" ").filter(e=>e.startsWith("bg-"))[0]??"bg-muted"}`}),(0,t.jsx)(A.Input,{value:m[e.id]??e.name,onChange:t=>u(s=>({...s,[e.id]:t.target.value})),onBlur:()=>(e=>{let t=(m[e]??"").trim();if(!t)return;let s=l.find(t=>t.id===e);s?.name!==t&&h(async()=>{try{await X(e,{name:t}),await f(),a?.()}catch(t){R.toast.error(t instanceof Error?t.message:String(t)),u(t=>({...t,[e]:s?.name??""}))}})})(e.id),onKeyDown:e=>{"Enter"===e.key&&e.target.blur()},disabled:p,className:"h-7 flex-1 border-transparent bg-transparent shadow-none focus-visible:border-input focus-visible:bg-background focus-visible:shadow-sm"}),(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-none text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void(window.confirm(i("version.type.deleteConfirm"))&&h(async()=>{try{await Z(t),await f(),a?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}}))},disabled:p,children:(0,t.jsx)(J.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))})]})]})})}function et(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let s=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${s}-${r}-${n}`}function es(e){if(!e)return;let t=new Date(e);return isNaN(t.getTime())?void 0:t}function er({open:e,onOpenChange:r,projectId:n,workspaceId:a,editVersion:i,defaultBaseBranch:l,projectLocalPath:o,onSuccess:d}){let{t:c}=(0,D.useI18n)(),m=!!i,[u,h]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[v,j]=(0,s.useState)(""),[b,N]=(0,s.useState)([]),[y,w]=(0,s.useState)(!1),[C,S]=(0,s.useState)(""),[k,T]=(0,s.useState)(""),[B,E]=(0,s.useState)(""),[I,L]=(0,s.useState)(""),[H,J]=(0,s.useState)(!1),[Q,X]=(0,s.useState)([]),[Z,en]=(0,s.useState)(!1),[ea,ei]=(0,s.useState)(!1),el=!!o,[eo,ed]=(0,s.useTransition)();return(0,s.useEffect)(()=>{e&&(i?(h(i.number),g(i.name),j(i.typeId??""),S(i.baseBranch??""),T(et(i.startDate)),E(et(i.targetDate)),L(i.description??"")):(h(""),g(""),j(""),S(l??""),T(""),E(""),L("")),J(!1))},[e,i,l]),(0,s.useEffect)(()=>{e&&W(a).then(N).catch(()=>N([]))},[e,a]),(0,s.useEffect)(()=>{e&&el?(en(!0),(0,Y.getProjectBranches)(o).then(X).catch(()=>X([])).finally(()=>en(!1)),(0,q.fetchRemoteBranches)(o).then(()=>(0,Y.getProjectBranches)(o).then(X)).catch(()=>{})):X([])},[e,el,o]),(0,t.jsxs)(O.Dialog,{open:e,onOpenChange:r,children:[(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:m?c("version.edit"):c("version.new")})}),(0,t.jsxs)("div",{className:"grid gap-4 py-2",children:[(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsxs)(V.Label,{htmlFor:"version-number",children:[c("version.field.number"),(0,t.jsx)("span",{className:"text-destructive ml-0.5",children:"*"})]}),(0,t.jsx)(A.Input,{id:"version-number",value:u,onChange:e=>h(e.target.value),placeholder:c("version.placeholder.number"),disabled:eo})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsxs)(V.Label,{htmlFor:"version-name",children:[c("version.field.name"),(0,t.jsx)("span",{className:"text-destructive ml-0.5",children:"*"})]}),(0,t.jsx)(A.Input,{id:"version-name",value:f,onChange:e=>g(e.target.value),placeholder:c("version.placeholder.name"),disabled:eo})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{children:c("version.field.type")}),(0,t.jsxs)(P.Select,{value:v||"__none__",onValueChange:e=>{j(e&&"__none__"!==e?e:"")},children:[(0,t.jsx)(P.SelectTrigger,{className:"w-full",disabled:eo,children:(0,t.jsx)("span",{className:"truncate",children:v?b.find(e=>e.id===v)?.name??c("version.type.uncategorized"):c("version.type.uncategorized")})}),(0,t.jsxs)(P.SelectContent,{children:[(0,t.jsx)(P.SelectItem,{value:"__none__",children:c("version.type.uncategorized")}),b.map(e=>(0,t.jsx)(P.SelectItem,{value:e.id,children:e.name},e.id))]})]}),(0,t.jsxs)(x.Button,{type:"button",variant:"ghost",size:"sm",className:"h-auto justify-start px-0 py-0.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>w(!0),disabled:eo,children:["+ ",c("version.manageTypes")]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{children:c("version.field.baseBranch")}),Z?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:c("task.branchLoading")}):el&&Q.length>0?(0,t.jsxs)(M.Popover,{open:ea,onOpenChange:ei,children:[(0,t.jsxs)(M.PopoverTrigger,{className:"flex h-8 w-full items-center gap-2 rounded-lg border border-input bg-transparent px-3 text-sm transition-colors hover:bg-accent focus:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",disabled:eo,"data-testid":"version-branch-selector",children:[(0,t.jsx)(p.GitBranch,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:`flex-1 truncate text-left text-xs ${C?"font-mono":"text-muted-foreground"}`,title:C||void 0,children:C||c("version.field.noBranch")}),(0,t.jsx)(_.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(M.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(F.Command,{children:[(0,t.jsx)(F.CommandInput,{placeholder:c("task.branchSearch")}),(0,t.jsxs)(F.CommandList,{children:[(0,t.jsx)(F.CommandEmpty,{children:c("task.branchNone")}),(0,t.jsxs)(F.CommandGroup,{children:[(0,t.jsxs)(F.CommandItem,{value:"__none__",onSelect:()=>{S(""),ei(!1)},children:[(0,t.jsx)("span",{className:"flex-1 truncate text-muted-foreground",children:c("version.field.noBranch")}),!C&&(0,t.jsx)($.Check,{className:"ml-auto h-3 w-3 shrink-0 text-primary"})]}),Q.map(e=>(0,t.jsxs)(F.CommandItem,{value:e,onSelect:()=>{S(e),ei(!1)},children:[(0,t.jsx)(p.GitBranch,{className:"mr-2 h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===C&&(0,t.jsx)($.Check,{className:"ml-auto h-3 w-3 shrink-0 text-primary"})]},e))]})]})]})})]}):(0,t.jsx)(A.Input,{id:"version-base-branch",value:C,onChange:e=>S(e.target.value),placeholder:"main",disabled:eo})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-start-date",children:c("version.field.startDate")}),(0,t.jsx)("input",{id:"version-start-date",type:"date",value:k,onChange:e=>T(e.target.value),disabled:eo,className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-target-date",children:c("version.field.targetDate")}),(0,t.jsx)("input",{id:"version-target-date",type:"date",value:B,onChange:e=>E(e.target.value),disabled:eo,className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-description",children:c("version.field.description")}),(0,t.jsx)(U.Textarea,{id:"version-description",value:I,onChange:e=>L(e.target.value),rows:3,disabled:eo})]}),!m&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(z.Switch,{id:"version-set-current",checked:H,onCheckedChange:J,disabled:eo}),(0,t.jsx)(V.Label,{htmlFor:"version-set-current",className:"cursor-pointer",children:c("version.field.setCurrent")})]})]}),(0,t.jsxs)(O.DialogFooter,{children:[(0,t.jsx)(x.Button,{variant:"outline",onClick:()=>r(!1),disabled:eo,children:c("common.cancel")}),(0,t.jsx)(x.Button,{onClick:()=>{u.trim()&&f.trim()&&ed(async()=>{try{m&&i?await K(i.id,{number:u.trim(),name:f.trim(),typeId:v||null,baseBranch:C.trim()||null,startDate:es(k)??null,targetDate:es(B)??null,description:I.trim()||null}):await G({projectId:n,number:u.trim(),name:f.trim(),typeId:v||void 0,baseBranch:C.trim()||void 0,startDate:es(k),targetDate:es(B),description:I.trim()||void 0,setCurrent:H}),R.toast.success(m?c("version.edit"):c("version.new")),r(!1),d?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})},disabled:eo||!u.trim()||!f.trim(),children:m?c("common.save"):c("common.create")})]})]}),(0,t.jsx)(ee,{open:y,onOpenChange:w,workspaceId:a,onChanged:()=>W(a).then(N)})]})}let en=(0,H.createServerReference)("60e9823a1247e7c64e8e0284246b90fa0574bb3976",H.callServer,void 0,H.findSourceMapURL,"releaseVersion");function ea({open:e,onOpenChange:r,version:n,candidates:a,onSuccess:i}){let{t:l}=(0,D.useI18n)(),[o,d]=(0,s.useState)(""),[c,m]=(0,s.useTransition)();(0,s.useEffect)(()=>{e&&d("")},[e,n]);let u=a.find(e=>e.id===o),p=a.length>0,h=p&&!!o&&!c;return(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:l("version.releaseAction")})}),(0,t.jsxs)("div",{className:"grid gap-4 py-2",children:[n&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[n.number," · ",n.name]}),(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{children:l("version.release.rolloverHint")}),n?.unfinishedCount!==void 0&&n.unfinishedCount>0&&(0,t.jsxs)("span",{className:"ml-1 font-medium text-foreground",children:["(",n.unfinishedCount,")"]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:l("version.release.nextVersion")}),p?(0,t.jsxs)(P.Select,{value:o,onValueChange:e=>{e&&d(e)},disabled:c,children:[(0,t.jsx)(P.SelectTrigger,{className:"w-full",children:(0,t.jsx)("span",{className:"truncate",children:u?`${u.number} \xb7 ${u.name}`:""})}),(0,t.jsx)(P.SelectContent,{children:a.map(e=>(0,t.jsxs)(P.SelectItem,{value:e.id,children:[e.number," · ",e.name]},e.id))})]}):(0,t.jsx)("p",{className:"text-xs text-destructive",children:l("version.release.noCandidates")})]})]}),(0,t.jsxs)(O.DialogFooter,{children:[(0,t.jsx)(x.Button,{variant:"outline",onClick:()=>r(!1),disabled:c,children:l("common.cancel")}),(0,t.jsx)(x.Button,{onClick:()=>{n&&o&&m(async()=>{try{await en(n.id,o),R.toast.success(l("version.release")),r(!1),i?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})},disabled:!h,children:l("version.release")})]})]})})}var ei=e.i(400355);let el=(0,H.createServerReference)("40257b7b77416f13d0dfcc6bfff8e2acfd12723ec6",H.callServer,void 0,H.findSourceMapURL,"getVersionDiff");var eo=e.i(196199);function ed({file:e}){let{t:r}=(0,D.useI18n)(),[n,a]=(0,s.useState)(!0),i=e.to&&"/dev/null"!==e.to?e.to:e.from??"",o=e.additions??0,d=e.deletions??0,c=[];for(let t of e.chunks)for(let e of(c.push({type:"normal",content:t.content,chunkHeader:t.content}),t.changes))c.push({type:e.type,content:e.content});let x=c.length>500,m=x?c.slice(0,500):c;return(0,t.jsxs)("div",{className:"overflow-hidden rounded-[10px] border border-border",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>a(e=>!e),className:"flex w-full items-center gap-2 bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${n?"rotate-90":""}`}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono text-[12px] font-medium text-foreground",children:i}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] font-bold text-emerald-400",children:["+",o]}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] font-bold text-rose-400",children:["−",d]})]}),n&&(0,t.jsxs)("div",{className:"overflow-x-auto",children:[(0,t.jsx)("pre",{className:"m-0 p-0",children:m.map((e,s)=>void 0!==e.chunkHeader?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-muted-foreground bg-muted/40",children:e.content},s):"add"===e.type?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-emerald-300 bg-emerald-500/10",children:e.content},s):"del"===e.type?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-rose-300 bg-rose-500/10",children:e.content},s):(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-muted-foreground",children:e.content},s))}),x&&(0,t.jsx)("p",{className:"border-t border-border px-3 py-2 text-[11px] text-muted-foreground/70 italic",children:r("version.diff.truncated")})]})]})}function ec({open:e,onOpenChange:r,versionId:n,versionLabel:a}){let{t:i}=(0,D.useI18n)(),[l,o]=(0,s.useTransition)(),[d,c]=(0,s.useState)(null),[x,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{e&&n&&(c(null),m(!1),o(async()=>{let e=await el(n);if(!e)return void m(!0);let t=(0,eo.parseUnifiedDiff)(e.patch);0===t.length||""===e.patch?m(!0):c(t)}))},[e,n]),(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-3xl max-h-[80vh] overflow-auto",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsxs)(O.DialogTitle,{children:[i("version.diff.title"),a?` — ${a}`:""]})}),l&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-muted-foreground",children:[(0,t.jsx)(ei.Loader2,{className:"h-5 w-5 animate-spin"}),(0,t.jsx)("span",{className:"text-sm",children:i("version.diff.loading")})]}),!l&&x&&(0,t.jsx)("p",{className:"py-10 text-center text-sm text-muted-foreground",children:i("version.diff.empty")}),!l&&d&&d.length>0&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:d.map((e,s)=>(0,t.jsx)(ed,{file:e},s))})]})})}var ex=e.i(605005),em=e.i(889620);function eu({version:e,isFirst:s,isLast:r,dashed:n=!1,diffStat:a,onEdit:i,onRelease:l,onViewDiff:o,onOpenTaskDetail:d}){return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative flex w-5 flex-none flex-col items-center",children:[(0,t.jsx)("div",{className:["w-px flex-none",s?"h-0":"h-6",n?"bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]":"bg-border"].filter(Boolean).join(" ")}),(0,t.jsx)("div",{className:["z-10 h-3.5 w-3.5 flex-none rounded-full border-2",e.isCurrent?"border-primary bg-primary ring-2 ring-primary/30":"ACTIVE"===e.status?"border-emerald-400 bg-emerald-400":"RELEASED"===e.status?"border-zinc-500 bg-zinc-500":"border-muted-foreground/40 bg-transparent border-dashed"].join(" ")}),!r&&(0,t.jsx)("div",{className:["w-px flex-1",n?"bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]":"bg-border"].join(" ")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 pb-5",children:(0,t.jsx)(L,{version:e,diffStat:a??null,onEdit:i,onRelease:l,onViewDiff:o,onOpenTaskDetail:d})})]})}e.s(["VersionTimelineClient",0,function({project:e,workspaceId:d,versions:u,diffStats:p,backlog:h}){let f,{t:g}=(0,D.useI18n)(),v=(0,r.useRouter)();(0,s.useEffect)(()=>{(0,em.setLastProjectId)(d,e.id)},[d,e.id]);let[j,b]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),[w,C]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),[T,B]=(0,s.useState)(null),[E,L]=(0,s.useState)(null),[R,$]=(0,s.useState)(null),[_,O]=(0,s.useState)(!1),A=[...[...u.filter(e=>"RELEASED"!==e.status)].sort((e,t)=>{if(!e.targetDate&&!t.targetDate)return 0;if(!e.targetDate)return 1;if(!t.targetDate)return -1;let s=new Date(t.targetDate).getTime()-new Date(e.targetDate).getTime();return 0!==s?s:new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}),...[...u.filter(e=>"RELEASED"===e.status)].sort((e,t)=>e.releasedAt||t.releasedAt?e.releasedAt?t.releasedAt?new Date(t.releasedAt).getTime()-new Date(e.releasedAt).getTime():-1:1:0)],V=e=>{let t=u.find(t=>t.id===e);t&&(y({id:t.id,number:t.number,name:t.name,typeId:t.typeId??null,baseBranch:t.baseBranch,startDate:t.startDate,targetDate:t.targetDate,description:t.description}),b(!0))},P=e=>{let t=u.find(t=>t.id===e);t&&(B(t),k(!0))},M=e=>{L(e)},F=()=>{y(null),b(!0)},z=()=>{v.refresh()},U=T?u.filter(e=>e.id!==T.id&&("PLANNED"===e.status||"ACTIVE"===e.status)).map(e=>({id:e.id,number:e.number,name:e.name})):[],H=T?T.tasks.filter(e=>"DONE"!==e.status&&"CANCELLED"!==e.status).length:void 0;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"header-xl flex shrink-0 items-center gap-4 border-b px-6",children:[(0,t.jsxs)(n.default,{href:`/workspaces/${d}?projectId=${e.id}`,className:"flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)(o.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:g("archive.backToBoard")})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"truncate font-medium",children:e.name}),(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("span",{children:g("version.timeline")})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground/70",children:g("version.historyHint")})]}),(0,t.jsxs)(x.Button,{variant:"outline",onClick:()=>C(!0),children:[(0,t.jsx)(c,{className:"h-4 w-4"}),g("version.manageTypes")]}),(0,t.jsxs)(x.Button,{onClick:F,children:[(0,t.jsx)(a.Plus,{className:"h-4 w-4"}),g("version.new")]})]}),(0,t.jsx)(m.ScrollArea,{className:"min-h-0 flex-1",children:(0,t.jsx)("div",{className:"px-6 py-6",children:(0,t.jsxs)("div",{className:"mx-auto max-w-3xl",children:[0===u.length&&0===h.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 py-20 text-center text-muted-foreground",children:[(0,t.jsx)("p",{className:"text-sm",children:g("version.empty.list")}),(0,t.jsxs)(x.Button,{variant:"outline",onClick:F,children:[(0,t.jsx)(a.Plus,{className:"h-4 w-4"}),g("version.new")]})]}),A.length>0&&(0,t.jsx)("div",{className:"relative",children:A.map((e,s)=>(0,t.jsx)(eu,{version:e,isFirst:0===s,isLast:s===A.length-1&&0===h.length,diffStat:p[e.id],onEdit:V,onRelease:P,onViewDiff:M,onOpenTaskDetail:$},e.id))}),h.length>0&&(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative flex w-5 flex-none flex-col items-center",children:[(0,t.jsx)("div",{className:"h-6 w-px bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]"}),(0,t.jsx)("div",{className:"z-10 h-3.5 w-3.5 flex-none rounded-full border-2 border-dashed border-muted-foreground/40 bg-transparent"})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 pb-5",children:(0,t.jsxs)("div",{className:"overflow-hidden rounded-[14px] border border-dashed bg-muted/40 shadow-sm",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>O(e=>!e),className:"w-full px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${_?"rotate-90":""}`}),(0,t.jsx)(i.Archive,{className:"h-4 w-4 flex-none text-muted-foreground/70"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-foreground",children:g("version.history")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:g("version.historySub")}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsxs)("span",{className:"text-[11.5px] text-muted-foreground",children:[h.length," ",g("version.tasksCount")]})]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground/70",children:g("version.historyHint")})]}),_&&(0,t.jsx)("div",{className:"border-t border-dashed border-border px-2 pb-2 pt-1.5",children:h.map(e=>(0,t.jsx)(I,{task:e,onOpenDetail:$},e.id))})]})})]})]})})}),(0,t.jsx)(er,{open:j,onOpenChange:e=>{b(e),e||y(null)},projectId:e.id,workspaceId:d,editVersion:N,defaultBaseBranch:null,projectLocalPath:e.localPath,onSuccess:z}),(0,t.jsx)(ee,{open:w,onOpenChange:C,workspaceId:d,onChanged:()=>v.refresh()}),(0,t.jsx)(ea,{open:S,onOpenChange:e=>{k(e),e||B(null)},version:T?{id:T.id,number:T.number,name:T.name,unfinishedCount:H}:null,candidates:U,onSuccess:z}),(0,t.jsx)(ec,{open:!!E,onOpenChange:e=>{e||L(null)},versionId:E,versionLabel:E&&(f=u.find(e=>e.id===E))?`${f.number} ${f.name}`:void 0}),(0,t.jsx)(ex.TaskOverviewDrawer,{open:!!R,onOpenChange:e=>{e||$(null)},taskId:R})]})}],645119)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},961404,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40bd6bd14273f742080b119c49ce1ae4226a0ea9ae",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}])},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)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let a=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,a],181209)},59959,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4024bacffbca9b35b0d1ef4babaae0b94556e89f0b",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,a])},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},991838,e=>{"use strict";var t=e.i(965652),a=e.i(770303);e.s(["useExtension",0,function(e){let s=(0,t.useContext)(a.ExtensionContext);if(!s)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:s.statusMap[e],loading:s.loading,isInstalling:s.installing.has(e),install:()=>s.install(e),uninstall:()=>s.uninstall(e),refresh:()=>s.refresh(e)}}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},841244,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("405070d20bbba4cf230d1ab3d73588b341855454fe",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}])},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)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let a=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,a],181209)},443344,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("402609e2dc24f57538b1ed025fb7ec6c6d9822f2ba",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,a])},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},991838,e=>{"use strict";var t=e.i(965652),a=e.i(770303);e.s(["useExtension",0,function(e){let s=(0,t.useContext)(a.ExtensionContext);if(!s)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:s.statusMap[e],loading:s.loading,isInstalling:s.installing.has(e),install:()=>s.install(e),uninstall:()=>s.uninstall(e),refresh:()=>s.refresh(e)}}])}]);
@@ -0,0 +1 @@
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:l,action:n,className:r}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",r),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}),l&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:l}),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),l=e.i(259846),n=e.i(645378),r=e.i(453889),i=e.i(487278),c=e.i(533499);let d=[{key:"notes",icon:n.FileText},{key:"assets",icon:r.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,c.useI18n)(),r=(0,a.usePathname)(),i=d.find(e=>r.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)(l.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"}),d.map(a=>{let l=a.icon,r=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 ${r?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(l,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n(`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)},308588,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("404dd48feaafb3f792425f10be7a057de485a3c4cb",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,s])},416427,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("401c3af67aaedff4d933f8f4befb93b2f603293620",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),l=e.i(738690),n=e.i(236967),r=e.i(533499),i=e.i(308588),c=e.i(514798);let d=(0,c.createServerReference)("4093bd48f7873d08d0ace0ad35c284d26ce036ab08",c.callServer,void 0,c.findSourceMapURL,"getProjectAssets");var o=e.i(453889),m=e.i(912505),x=e.i(645378),u=e.i(867533),h=e.i(998626),f=e.i(519455),p=e.i(937304);function g({asset:e,onPreview:s,onReveal:a,onDelete:l,onTaskClick:n}){var i;let{t:c}=(0,r.useI18n)(),d=(0,p.localPathToApiUrl)(e.path),m=(0,p.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)(f.Button,{variant:"ghost",onClick:()=>s(e),className:"flex-shrink-0 cursor-pointer p-0 h-auto",children:m?(0,t.jsx)("img",{src:d,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)(f.Button,{variant:"ghost",onClick:t=>{t.stopPropagation(),n?.(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)(f.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)(f.Button,{variant:"ghost",size:"icon",onClick:()=>a(e),className:"text-muted-foreground","aria-label":c("assets.revealInFinder"),children:(0,t.jsx)(o.FolderOpen,{className:"h-4 w-4"})}),(0,t.jsx)(f.Button,{variant:"ghost",size:"icon",onClick:()=>l(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:l,onTaskClick:n}){let{t:i}=(0,r.useI18n)();return 0===e.length?(0,t.jsx)(m.EmptyState,{icon:o.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:l,onTaskClick:n},e.id))})}var v=e.i(631675),b=e.i(657153),N=e.i(416427),k=e.i(624687),y=e.i(967489);function w({allWorkspaces:e,initialWsId:a,initialProjectId:l,onUploaded:n}){let{t:i}=(0,r.useI18n)(),c=(0,s.useRef)(null),[d,o]=(0,s.useState)(!1),[m,x]=(0,s.useState)(!1),[u,h]=(0,s.useState)(null),[p,g]=(0,s.useState)(a),[j,S]=(0,s.useState)(l),[C,T]=(0,s.useState)(""),I=e.find(e=>e.id===p),P=I?.projects??[],$=P.find(e=>e.id===j),A=$?$.alias?`${$.name} (${$.alias})`:$.name:j??"",B=()=>{o(!1),h(null),c.current&&(c.current.value="")},F=async()=>{if(u&&j){x(!0);try{let e=new FormData;e.append("file",u),e.append("projectId",j),e.append("description",C.trim()),await (0,N.uploadAsset)(e),n(j),B()}finally{x(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(f.Button,{onClick:()=>{g(a),S(l),h(null),T(""),o(!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:i("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:B}),(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)(f.Button,{variant:"ghost",size:"icon-xs",onClick:B,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:i("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:i("assets.workspace")}),(0,t.jsxs)(y.Select,{value:p,onValueChange:t=>{var s;let a;return g(s=t??""),a=e.find(e=>e.id===s),void S(a?.projects[0]?.id??null)},children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 min-w-0 text-xs",children:(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-left",title:I?.name??p,children:I?.name??p})}),(0,t.jsx)(y.SelectContent,{className:"max-w-[var(--anchor-width)]",children:e.map(e=>(0,t.jsx)(y.SelectItem,{value:e.id,title:e.name,children:(0,t.jsx)("span",{className:"block truncate",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:i("assets.project")}),P.length>0?(0,t.jsxs)(y.Select,{value:j??"",onValueChange:e=>S(e??""),children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 min-w-0 text-xs",children:(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-left",title:A,children:A})}),(0,t.jsx)(y.SelectContent,{className:"max-w-[var(--anchor-width)]",children:P.map(e=>{let s=e.alias?`${e.name} (${e.alias})`:e.name;return(0,t.jsx)(y.SelectItem,{value:e.id,title:s,children:(0,t.jsx)("span",{className:"block truncate",children:s})},e.id)})})]}):(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:i("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:i("assets.file")}),(0,t.jsx)("input",{type:"file",ref:c,onChange:e=>{h(e.target.files?.[0]??null)},className:"hidden"}),(0,t.jsx)(f.Button,{variant:"outline",onClick:()=>{c.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:u?u.name:i("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:i("assets.description")}),(0,t.jsx)(k.Textarea,{value:C,onChange:e=>T(e.target.value),placeholder:i("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)(f.Button,{variant:"outline",onClick:B,children:i("notes.cancel")}),(0,t.jsx)(f.Button,{onClick:F,disabled:!u||!j||!C.trim()||m,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:i(m?"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:o,initialAssets:m}){let x,{t:u}=(0,r.useI18n)(),[h,f]=(0,s.useTransition)(),[g,v]=(0,s.useState)(c),[b,N]=(0,s.useState)(o),[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?f(async()=>{P(await d(e))}):P([])},[f]),[R,L]=(0,s.useState)(null),D=R?(0,p.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,p.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,p.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)(n.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)(l.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,p.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,p.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 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},313029,e=>{"use strict";let t=(0,e.i(572989).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],313029)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},113627,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(989548),r=e.i(572989);let n=(0,r.default)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);var i=e.i(275360),l=e.i(400355),o=e.i(232545),c=e.i(738690);let d=(0,r.default)("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);var u=e.i(313029);let m=(0,r.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);var x=e.i(759684),p=e.i(624687),h=e.i(519455),f=e.i(746798),g=e.i(533499),b=e.i(338187),v=e.i(597746),j=e.i(368490),y=e.i(875840),w=e.i(645378);let N=(0,r.default)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);var k=e.i(673984);let C=["jpg","jpeg","png","gif","webp"],z=["md","txt","json","csv"],R=[...C,...z].join("|"),T=RegExp(`^\\d{4}-\\d{2}/(images|files)/[^/]+\\.(${R})$`,"i");function U(e){let t=e.replace(/^\./,"").toLowerCase();return C.includes(t)?"image":z.includes(t)?"text":null}let A=[...C.map(e=>`.${e}`),...z.map(e=>`.${e}`),"image/*"].join(",");e.i(254826);var S=e.i(309735);function I({content:e,isStreaming:s}){return(0,t.jsx)(S.Streamdown,{className:"text-sm leading-relaxed [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_td]:whitespace-nowrap",mode:s?"streaming":"static",animated:!0,isAnimating:s,caret:s?"block":void 0,children:e})}function P({text:e,className:a}){let[r,n]=(0,s.useState)(!1),{t:i}=(0,g.useI18n)(),l=async t=>{t.stopPropagation();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)}n(!0),setTimeout(()=>n(!1),1500)}catch{}};return(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:l,className:`text-muted-foreground ${a??""}`,"aria-label":i("assistant.copy"),children:r?(0,t.jsx)(v.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(y.Copy,{className:"h-3 w-3"})})}function M({filename:e,onPreview:a}){let{t:r}=(0,g.useI18n)(),[n,i]=(0,s.useState)(!1),l=`/api/internal/cache/${e}`;return n?(0,t.jsx)("div",{className:"size-16 rounded-md bg-muted flex items-center justify-center",title:r("assistant.brokenImage"),children:(0,t.jsx)(N,{className:"size-4 text-muted-foreground"})}):(0,t.jsx)("button",{type:"button",className:"relative size-16 rounded-md overflow-hidden bg-muted shrink-0",onClick:()=>a?.(l),children:(0,t.jsx)("img",{src:l,alt:"",loading:"lazy",className:"size-16 rounded-md object-cover cursor-pointer hover:opacity-80 transition-opacity",onError:()=>i(!0)})})}function D({filename:e}){let s=`/api/internal/cache/${e}`,a=e.split("/").pop()??e;return(0,t.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md bg-primary-foreground/10 text-primary-foreground hover:bg-primary-foreground/20 transition-colors max-w-[180px]",title:a,children:[(0,t.jsx)(w.FileText,{className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"text-xs truncate",children:a})]})}function L({content:e,attachmentFilenames:s,onImagePreview:a}){let r=[],n=[];if(s)for(let e of s){let t=function(e){if(!T.test(e))return null;let t=e.lastIndexOf(".");return t<0?null:U(e.slice(t+1))}(e);"image"===t?r.push(e):"text"===t&&n.push(e)}return(0,t.jsxs)("div",{className:"flex justify-end gap-2 animate-in fade-in slide-in-from-bottom-2 duration-200","aria-label":"You",children:[(0,t.jsxs)("div",{className:"bg-primary text-primary-foreground max-w-[80%] rounded-2xl rounded-br-sm px-3 py-2 text-sm whitespace-pre-wrap break-words",children:[r.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2",style:{maxWidth:"calc(4 * 64px + 3 * 6px)"},children:r.map(e=>(0,t.jsx)(M,{filename:e,onPreview:a},e))}),n.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2",children:n.map(e=>(0,t.jsx)(D,{filename:e},e))}),e]}),(0,t.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-muted mt-1",children:(0,t.jsx)(k.User,{className:"size-3.5 text-muted-foreground"})})]})}function E({content:e,isStreaming:s}){return(0,t.jsxs)("div",{className:"group/bubble flex justify-start gap-2 animate-in fade-in slide-in-from-bottom-2 duration-200","aria-label":"Assistant",children:[(0,t.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 mt-1",children:(0,t.jsx)(a.Bot,{className:"size-3.5 text-primary"})}),(0,t.jsxs)("div",{className:"max-w-[85%] min-w-0",children:[(0,t.jsx)("div",{className:"bg-muted text-foreground rounded-2xl rounded-bl-sm px-3 py-2",children:(0,t.jsx)(I,{content:e,isStreaming:s})}),(0,t.jsx)("div",{className:"flex items-center gap-0.5 mt-0.5 opacity-0 group-hover/bubble:opacity-100 transition-opacity",children:(0,t.jsx)(P,{text:e})})]})]})}function O(){let{t:e}=(0,g.useI18n)();return(0,t.jsxs)("div",{className:"flex justify-start gap-2 animate-in fade-in slide-in-from-bottom-2 duration-200",role:"status","aria-live":"polite","aria-label":e("assistant.thinking"),children:[(0,t.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 mt-1",children:(0,t.jsx)(a.Bot,{className:"size-3.5 text-primary"})}),(0,t.jsx)("div",{className:"bg-muted/50 text-muted-foreground max-w-[200px] rounded-2xl rounded-bl-sm px-3 py-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-primary/60 animate-pulse",style:{animationDelay:"0ms"}}),(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-primary/60 animate-pulse",style:{animationDelay:"150ms"}}),(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-primary/60 animate-pulse",style:{animationDelay:"300ms"}})]})})]})}function $({content:e,toolName:a}){let[r,n]=(0,s.useState)(!1),{t:i}=(0,g.useI18n)(),l=a??i("assistant.toolLabel");return(0,t.jsxs)("div",{className:"group/tool flex justify-start gap-2 animate-in fade-in slide-in-from-bottom-2 duration-200",children:[(0,t.jsx)("div",{className:"size-7 shrink-0"}),(0,t.jsxs)("div",{className:"bg-muted/60 border border-border max-w-[90%] rounded-lg px-3 py-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 w-full text-left py-0.5 cursor-pointer",onClick:()=>n(e=>!e),role:"button","aria-expanded":r,"aria-label":i("assistant.expandTool"),children:[(0,t.jsx)(j.ChevronRight,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0 transition-transform duration-150 ${r?"rotate-90":""}`}),(0,t.jsx)("span",{className:"text-xs font-semibold text-foreground truncate",children:l}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)(P,{text:e,className:"opacity-0 group-hover/tool:opacity-100"}),(0,t.jsx)("span",{className:"bg-muted text-muted-foreground text-[10px] px-1.5 rounded shrink-0",children:i("assistant.toolLabel")})]}),r&&(0,t.jsx)("div",{className:"mt-1 mb-1 rounded-md bg-background/60 border border-border/60 px-2.5 py-1.5",children:(0,t.jsx)("pre",{className:"font-mono text-[12px] leading-relaxed max-h-[240px] overflow-auto whitespace-pre-wrap break-all text-muted-foreground",children:e})})]})]})}function F({message:e,onImagePreview:s}){switch(e.role){case"user":return(0,t.jsx)(L,{content:e.content,attachmentFilenames:e.attachmentFilenames,onImagePreview:s});case"assistant":return(0,t.jsx)(E,{content:e.content,isStreaming:e.isStreaming});case"thinking":return(0,t.jsx)(O,{});case"tool":return(0,t.jsx)($,{content:e.content,toolName:e.toolName});default:return null}}var B=e.i(938499),q=e.i(657153);function H(e){let t=0;for(let s of e){let e=s.codePointAt(0)??0;e>=12288&&e<=40959||e>=44032&&e<=55215||e>=65280&&e<=65519||e>=131072?t+=2:t+=1}return t}function K(e,t){let s=0,a="";for(let r of e){let e=H(r);if(s+e>t)break;a+=r,s+=e}return a}function V({pendingAttachments:e,onRemove:s,onPreview:a}){let{t:r}=(0,g.useI18n)(),n=e.filter(e=>"image"===e.kind);return 0===n.length?null:(0,t.jsx)("div",{className:"flex flex-row flex-wrap items-center gap-2 px-3 py-2 border-b border-border/60",children:n.map(e=>(0,t.jsx)(_,{item:e,onRemove:s,onPreview:a,t:r},e.id))})}function X({pendingAttachments:e,onRemove:s}){let{t:a}=(0,g.useI18n)(),r=e.filter(e=>"text"===e.kind);return 0===r.length?null:(0,t.jsx)("div",{className:"flex flex-row flex-wrap items-center gap-2 px-3 py-2 border-b border-border/60",children:r.map(e=>(0,t.jsx)(W,{item:e,onRemove:s,t:a},e.id))})}function _({item:e,onRemove:s,onPreview:a,t:r}){return(0,t.jsxs)("div",{className:"group relative h-9 w-9 shrink-0",children:[(0,t.jsxs)("div",{className:`relative h-full w-full overflow-hidden rounded-md border ${"error"===e.status?"border-destructive":"border-border"} bg-muted`,children:[(0,t.jsx)("button",{type:"button",className:`h-full w-full p-0 border-0 bg-transparent ${"uploading"===e.status?"cursor-wait":"cursor-pointer"}`,disabled:"uploading"===e.status,"aria-label":r("assistant.previewImage"),onClick:()=>a(e),children:e.blobUrl&&(0,t.jsx)("img",{src:e.blobUrl,className:"h-full w-full object-cover",alt:""})}),"uploading"===e.status&&(0,t.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-0.5 bg-primary/20",children:(0,t.jsx)("div",{role:"progressbar","aria-valuenow":e.progress,"aria-valuemin":0,"aria-valuemax":100,className:"h-full bg-primary transition-all duration-150",style:{width:`${e.progress}%`}})}),"error"===e.status&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:(0,t.jsx)(B.AlertCircle,{className:"h-3.5 w-3.5 text-white"})})]}),(0,t.jsx)(J,{item:e,onRemove:s,t:r})]})}function W({item:e,onRemove:s,t:a}){let r=function(e,t=22){if(H(e)<=t)return e;let s=e.lastIndexOf("."),a=s>0&&e.length-s<=8,r=a?e.slice(s):"",n=a?e.slice(0,s):e,i=t-H(r)-1;if(i<4)return K(e,t-1)+"…";let l=Math.ceil(i/2);return K(n,l)+"…"+function(e,t){let s=Array.from(e),a=0,r="";for(let e=s.length-1;e>=0;e--){let n=H(s[e]);if(a+n>t)break;r=s[e]+r,a+=n}return r}(n,i-l)+r}(e.file.name,22);return(0,t.jsxs)("div",{className:`group relative flex items-center h-7 w-[200px] shrink-0 rounded-md border bg-background overflow-hidden transition-colors ${"error"===e.status?"border-destructive":"border-border hover:bg-accent/40"}`,title:e.file.name,children:[(0,t.jsx)("button",{type:"button",className:"flex h-full w-7 shrink-0 items-center justify-center text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors","aria-label":a("assistant.removeAttachment"),onClick:t=>{t.stopPropagation(),s(e.id)},children:(0,t.jsx)(q.X,{className:"h-3 w-3"})}),(0,t.jsx)("div",{className:"h-4 w-px bg-border shrink-0"}),(0,t.jsx)("span",{className:"px-2 text-xs text-foreground tabular-nums whitespace-nowrap",children:r}),"uploading"===e.status&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-0.5 overflow-hidden",children:(0,t.jsx)("div",{role:"progressbar","aria-valuenow":e.progress,"aria-valuemin":0,"aria-valuemax":100,className:"h-full bg-primary transition-all duration-150",style:{width:`${e.progress}%`}})}),"error"===e.status&&(0,t.jsx)(B.AlertCircle,{className:"ml-auto mr-2 h-3 w-3 shrink-0 text-destructive"})]})}function J({item:e,onRemove:s,t:a}){return(0,t.jsx)("button",{type:"button",className:"absolute -top-1.5 -right-1.5 h-4 w-4 rounded-full bg-foreground text-background shadow-sm opacity-0 group-hover:opacity-90 hover:!opacity-100 transition-opacity flex items-center justify-center","aria-label":a("assistant.removeAttachment"),title:"error"===e.status?a("assistant.uploadFailedRemoveHint"):void 0,onClick:t=>{t.stopPropagation(),s(e.id)},children:(0,t.jsx)(q.X,{className:"h-2.5 w-2.5",strokeWidth:3})})}var Y=e.i(776639);function G({imageUrl:e,open:a,onOpenChange:r}){let{t:n}=(0,g.useI18n)(),[i,l]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{l(!1)},[a]),(0,t.jsx)(Y.Dialog,{open:a,onOpenChange:r,children:(0,t.jsxs)(Y.DialogContent,{showCloseButton:!1,className:"max-w-[90vw] max-h-[90vh] p-0 overflow-hidden bg-black/90 ring-0",children:[(0,t.jsx)(Y.DialogClose,{render:(0,t.jsx)(h.Button,{variant:"ghost",className:"absolute top-2 right-2 z-10 h-8 w-8 p-0 text-white hover:bg-white/20 hover:text-white"}),"aria-label":n("assistant.closePreview"),children:(0,t.jsx)(q.X,{className:"h-4 w-4"})}),e&&(0,t.jsx)("img",{src:e,alt:"",onClick:()=>l(e=>!e),className:i?"w-auto h-auto max-w-none cursor-zoom-out":"max-w-full max-h-[85vh] object-contain cursor-zoom-in mx-auto"})]})})}e.s(["AssistantChat",0,function(){let[e,r]=(0,s.useState)(""),v=(0,s.useRef)(null),j=(0,s.useRef)(null),y=(0,s.useRef)(null),{t:w}=(0,g.useI18n)(),{chatMessages:N,isChatThinking:k,isLoadingHistory:R,sendChatMessage:T,cancelChat:S}=(0,b.useAssistant)(),{pendingAttachments:I,addAttachments:P,removeAttachment:M,clearAll:D,hasUploading:L}=function(){let[e,t]=(0,s.useState)([]),a=(0,s.useRef)(new Map),r=(0,s.useRef)([]);(0,s.useEffect)(()=>{r.current=e},[e]),(0,s.useEffect)(()=>()=>{r.current.forEach(e=>{e.blobUrl&&URL.revokeObjectURL(e.blobUrl)}),a.current.forEach(e=>e.abort()),a.current.clear()},[]);let n=(0,s.useCallback)(e=>{let s=[];for(let t of e){let e=U(function(e){let t=e.name.lastIndexOf(".");return t>=0?e.name.slice(t):""}(t));e&&s.push({id:crypto.randomUUID(),file:t,kind:e,blobUrl:"image"===e?URL.createObjectURL(t):null,status:"uploading",progress:0})}if(0!==s.length)for(let e of(r.current=[...r.current,...s],t(e=>[...e,...s]),s)){let s=new XMLHttpRequest;a.current.set(e.id,s),s.upload.onprogress=s=>{if(s.lengthComputable){let a=Math.round(s.loaded/s.total*100);t(t=>t.map(t=>t.id===e.id?{...t,progress:a}:t))}},s.onload=()=>{if(a.current.delete(e.id),200===s.status)try{let a=JSON.parse(s.responseText),r="string"==typeof a.filename&&a.filename?a.filename:null;if(!r)throw Error("Invalid upload response");t(t=>t.map(t=>t.id===e.id?{...t,status:"done",progress:100,filename:r}:t))}catch{t(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))}else t(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))},s.onerror=()=>{a.current.delete(e.id),t(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))};let r=new FormData;r.append("file",e.file),s.open("POST","/api/internal/assistant/attachments"),s.send(r)}},[]),i=(0,s.useCallback)(e=>{let s=a.current.get(e);s&&(s.abort(),a.current.delete(e)),t(t=>{let s=t.find(t=>t.id===e);return s?.blobUrl&&URL.revokeObjectURL(s.blobUrl),t.filter(t=>t.id!==e)})},[]),l=(0,s.useCallback)(()=>{t(e=>(e.forEach(e=>{let t=a.current.get(e.id);t&&(t.abort(),a.current.delete(e.id)),e.blobUrl&&URL.revokeObjectURL(e.blobUrl)}),a.current.clear(),[]))},[]),o=e.some(e=>"uploading"===e.status);return{pendingAttachments:e,addAttachments:n,removeAttachment:i,clearAll:l,hasUploading:o}}(),[E,O]=(0,s.useState)(null),[$,B]=(0,s.useState)(null);(0,s.useEffect)(()=>{v.current?.focus()},[]);let q=(0,s.useRef)(!1),H=N[N.length-1]?.content.length??0;(0,s.useEffect)(()=>{let e=q.current?"smooth":"instant";y.current?.scrollIntoView({behavior:e}),q.current=!0},[N.length,H]);let K=10-I.length,[_,W]=(0,s.useState)(!1),J=(0,s.useCallback)(e=>{let t=e.lastIndexOf(".");return null!==U(t>=0?e.slice(t):"")},[]),Y=(0,s.useCallback)(e=>{if(0===e.length||K<=0)return;let t=e.filter(e=>{let t=e.name.lastIndexOf(".");return null!==U(t>=0?e.name.slice(t):"")}).slice(0,K);t.length>0&&P(t)},[P,K]),Q=(0,s.useCallback)(e=>{let t=Array.from(e.clipboardData.items),s=[];for(let e of t){if("file"!==e.kind)continue;let t=e.getAsFile();t&&(e.type.startsWith("image/")||J(t.name))&&s.push(t)}s.length>0&&Y(s)},[Y,J]),Z=(0,s.useCallback)(e=>{let t=e.target.files?Array.from(e.target.files):[];t.length>0&&Y(t),j.current&&(j.current.value="")},[Y]),ee=(0,s.useRef)(0),et=(0,s.useCallback)(e=>{Array.from(e.dataTransfer.types).includes("Files")&&(e.preventDefault(),ee.current+=1,W(!0))},[]),es=(0,s.useCallback)(e=>{Array.from(e.dataTransfer.types).includes("Files")&&(e.preventDefault(),e.dataTransfer.dropEffect="copy")},[]),ea=(0,s.useCallback)(e=>{Array.from(e.dataTransfer.types).includes("Files")&&(ee.current=Math.max(0,ee.current-1),0===ee.current&&W(!1))},[]),er=(0,s.useCallback)(e=>{if(!Array.from(e.dataTransfer.types).includes("Files"))return;e.preventDefault(),ee.current=0,W(!1);let t=Array.from(e.dataTransfer.files).filter(e=>J(e.name));t.length>0&&Y(t)},[J,Y]),en=()=>{let t=e.trim(),s=I.filter(e=>"done"===e.status).map(e=>e.filename);!t&&0===s.length||k||L||(T(t,{attachmentFilenames:s}),r(""),D(),v.current?.focus())},ei=()=>{let e=S();e&&r(e),v.current?.focus()},el=I.some(e=>"done"===e.status),eo=!e.trim()&&!el||k||L;return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsx)(x.ScrollArea,{className:"flex-1 overflow-hidden",children:(0,t.jsxs)("div",{className:`flex flex-col gap-3 p-4 min-h-full ${R||0===N.length?"justify-center":""}`,role:"log","aria-live":"polite",children:[R?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2",children:[(0,t.jsx)(l.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:w("assistant.loading")})]}):0===N.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 px-6",children:[(0,t.jsx)(a.Bot,{className:"size-8 text-muted-foreground/40"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:w("assistant.emptyTitle")}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2 w-full max-w-[280px]",children:[{icon:i.FolderPlus,label:w("assistant.suggestion.createProject")},{icon:n,label:w("assistant.suggestion.createTask")},{icon:c.Search,label:w("assistant.suggestion.checkProgress")},{icon:m,label:w("assistant.suggestion.dailySummary")}].map(({icon:e,label:s})=>(0,t.jsxs)(h.Button,{variant:"outline",className:"flex items-center gap-2 rounded-lg px-3 py-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground text-left justify-start h-auto",onClick:()=>{r(s),v.current?.focus()},children:[(0,t.jsx)(e,{className:"size-3.5 shrink-0"}),s]},s))})]}):N.map(e=>(0,t.jsx)(F,{message:e,onImagePreview:e=>B(e)},e.id)),(0,t.jsx)("div",{ref:y})]})}),(0,t.jsx)("div",{className:"border-t border-border bg-sidebar p-4",onDragEnter:et,onDragOver:es,onDragLeave:ea,onDrop:er,children:(0,t.jsxs)("div",{className:`relative rounded-lg border bg-background transition-colors ${_?"border-primary ring-3 ring-primary/40":"border-border focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50"}`,children:[_&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg bg-primary/10 text-xs font-medium text-primary",children:w("assistant.dropToUpload")}),(0,t.jsx)(V,{pendingAttachments:I,onRemove:M,onPreview:e=>O(e)}),(0,t.jsx)(X,{pendingAttachments:I,onRemove:M}),(0,t.jsx)(p.Textarea,{ref:v,value:e,onChange:e=>r(e.target.value),onKeyDown:e=>{!e.nativeEvent.isComposing&&("Enter"!==e.key||e.shiftKey||(e.preventDefault(),en()),"Escape"===e.key&&k&&(e.preventDefault(),ei()))},onPaste:Q,placeholder:w("assistant.inputPlaceholder"),className:"min-h-[72px] max-h-[120px] resize-none rounded-none border-0 focus-visible:ring-0 focus-visible:border-0 bg-transparent dark:bg-transparent text-sm",rows:3}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-2 pb-2 border-t border-border/60 pt-2",children:[(0,t.jsx)("input",{ref:j,type:"file",accept:A,multiple:!0,hidden:!0,onChange:Z}),(0,t.jsxs)(f.Tooltip,{children:[(0,t.jsx)(f.TooltipTrigger,{onClick:()=>j.current?.click(),disabled:K<=0,"aria-label":w("assistant.addAttachment"),className:"inline-flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-40 disabled:pointer-events-none transition-colors",children:(0,t.jsx)(o.Plus,{className:"h-4 w-4"})}),(0,t.jsx)(f.TooltipContent,{side:"top",align:"start",className:"max-w-xs",children:K<=0?(0,t.jsx)("span",{className:"text-xs",children:w("assistant.attachmentLimitReached")}):(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:w("assistant.addAttachment")}),(0,t.jsxs)("div",{className:"opacity-80",children:[(0,t.jsxs)("span",{children:[w("assistant.attachmentTypeImages"),": "]}),(0,t.jsx)("span",{className:"font-mono",children:C.map(e=>`.${e}`).join(" ")})]}),(0,t.jsxs)("div",{className:"opacity-80",children:[(0,t.jsxs)("span",{children:[w("assistant.attachmentTypeText"),": "]}),(0,t.jsx)("span",{className:"font-mono",children:z.map(e=>`.${e}`).join(" ")})]})]})})]}),k?(0,t.jsx)(h.Button,{variant:"outline",size:"icon",className:"h-7 w-7 border-destructive/50 text-destructive transition-colors hover:bg-destructive/20 hover:text-destructive hover:border-destructive",onClick:ei,"aria-label":w("assistant.cancelLabel"),children:(0,t.jsx)(u.Square,{className:"h-3 w-3 fill-current"})}):(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground transition-colors hover:bg-primary/10 hover:text-primary",onClick:en,disabled:eo,"aria-label":w("assistant.sendLabel"),children:(0,t.jsx)(d,{className:"h-4 w-4"})})]})]})}),(0,t.jsx)(G,{imageUrl:E?.blobUrl??null,open:null!==E&&"image"===E.kind,onOpenChange:e=>{e||O(null)}}),(0,t.jsx)(G,{imageUrl:$,open:null!==$,onOpenChange:e=>{e||B(null)}})]})}],113627)},103363,e=>{e.n(e.i(113627))},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
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},313029,e=>{"use strict";let t=(0,e.i(572989).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],313029)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},113627,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(989548),r=e.i(572989);let n=(0,r.default)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);var i=e.i(275360),l=e.i(400355),o=e.i(232545),c=e.i(738690);let d=(0,r.default)("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);var u=e.i(313029);let m=(0,r.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);var x=e.i(759684),p=e.i(624687),h=e.i(519455),f=e.i(746798),g=e.i(533499),b=e.i(338187),v=e.i(597746),j=e.i(368490),y=e.i(875840),w=e.i(645378);let N=(0,r.default)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);var k=e.i(673984);let C=["jpg","jpeg","png","gif","webp"],z=["md","txt","json","csv"],R=[...C,...z].join("|"),T=RegExp(`^\\d{4}-\\d{2}/(images|files)/[^/]+\\.(${R})$`,"i");function U(e){let t=e.replace(/^\./,"").toLowerCase();return C.includes(t)?"image":z.includes(t)?"text":null}let A=[...C.map(e=>`.${e}`),...z.map(e=>`.${e}`),"image/*"].join(",");e.i(254826);var S=e.i(309735);function I({content:e,isStreaming:s}){return(0,t.jsx)(S.Streamdown,{className:"text-sm leading-relaxed [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_td]:whitespace-nowrap",mode:s?"streaming":"static",animated:!0,isAnimating:s,caret:s?"block":void 0,children:e})}function P({text:e,className:a}){let[r,n]=(0,s.useState)(!1),{t:i}=(0,g.useI18n)(),l=async t=>{t.stopPropagation();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)}n(!0),setTimeout(()=>n(!1),1500)}catch{}};return(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:l,className:`text-muted-foreground ${a??""}`,"aria-label":i("assistant.copy"),children:r?(0,t.jsx)(v.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(y.Copy,{className:"h-3 w-3"})})}function M({filename:e,onPreview:a}){let{t:r}=(0,g.useI18n)(),[n,i]=(0,s.useState)(!1),l=`/api/internal/cache/${e}`;return n?(0,t.jsx)("div",{className:"size-16 rounded-md bg-muted flex items-center justify-center",title:r("assistant.brokenImage"),children:(0,t.jsx)(N,{className:"size-4 text-muted-foreground"})}):(0,t.jsx)("button",{type:"button",className:"relative size-16 rounded-md overflow-hidden bg-muted shrink-0",onClick:()=>a?.(l),children:(0,t.jsx)("img",{src:l,alt:"",loading:"lazy",className:"size-16 rounded-md object-cover cursor-pointer hover:opacity-80 transition-opacity",onError:()=>i(!0)})})}function D({filename:e}){let s=`/api/internal/cache/${e}`,a=e.split("/").pop()??e;return(0,t.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md bg-primary-foreground/10 text-primary-foreground hover:bg-primary-foreground/20 transition-colors max-w-[180px]",title:a,children:[(0,t.jsx)(w.FileText,{className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"text-xs truncate",children:a})]})}function E({content:e,attachmentFilenames:s,onImagePreview:a}){let r=[],n=[];if(s)for(let e of s){let t=function(e){if(!T.test(e))return null;let t=e.lastIndexOf(".");return t<0?null:U(e.slice(t+1))}(e);"image"===t?r.push(e):"text"===t&&n.push(e)}return(0,t.jsxs)("div",{className:"flex justify-end gap-2 animate-in fade-in slide-in-from-bottom-2 duration-200","aria-label":"You",children:[(0,t.jsxs)("div",{className:"bg-primary text-primary-foreground max-w-[80%] rounded-2xl rounded-br-sm px-3 py-2 text-sm whitespace-pre-wrap break-words",children:[r.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2",style:{maxWidth:"calc(4 * 64px + 3 * 6px)"},children:r.map(e=>(0,t.jsx)(M,{filename:e,onPreview:a},e))}),n.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2",children:n.map(e=>(0,t.jsx)(D,{filename:e},e))}),e]}),(0,t.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-muted mt-1",children:(0,t.jsx)(k.User,{className:"size-3.5 text-muted-foreground"})})]})}function L({content:e,isStreaming:s}){return(0,t.jsxs)("div",{className:"group/bubble flex justify-start gap-2 animate-in fade-in slide-in-from-bottom-2 duration-200","aria-label":"Assistant",children:[(0,t.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 mt-1",children:(0,t.jsx)(a.Bot,{className:"size-3.5 text-primary"})}),(0,t.jsxs)("div",{className:"max-w-[85%] min-w-0",children:[(0,t.jsx)("div",{className:"bg-muted text-foreground rounded-2xl rounded-bl-sm px-3 py-2",children:(0,t.jsx)(I,{content:e,isStreaming:s})}),(0,t.jsx)("div",{className:"flex items-center gap-0.5 mt-0.5 opacity-0 group-hover/bubble:opacity-100 transition-opacity",children:(0,t.jsx)(P,{text:e})})]})]})}function O(){let{t:e}=(0,g.useI18n)();return(0,t.jsxs)("div",{className:"flex justify-start gap-2 animate-in fade-in slide-in-from-bottom-2 duration-200",role:"status","aria-live":"polite","aria-label":e("assistant.thinking"),children:[(0,t.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 mt-1",children:(0,t.jsx)(a.Bot,{className:"size-3.5 text-primary"})}),(0,t.jsx)("div",{className:"bg-muted/50 text-muted-foreground max-w-[200px] rounded-2xl rounded-bl-sm px-3 py-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-primary/60 animate-pulse",style:{animationDelay:"0ms"}}),(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-primary/60 animate-pulse",style:{animationDelay:"150ms"}}),(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-primary/60 animate-pulse",style:{animationDelay:"300ms"}})]})})]})}function $({content:e,toolName:a}){let[r,n]=(0,s.useState)(!1),{t:i}=(0,g.useI18n)(),l=a??i("assistant.toolLabel");return(0,t.jsxs)("div",{className:"group/tool flex justify-start gap-2 animate-in fade-in slide-in-from-bottom-2 duration-200",children:[(0,t.jsx)("div",{className:"size-7 shrink-0"}),(0,t.jsxs)("div",{className:"bg-muted/60 border border-border max-w-[90%] rounded-lg px-3 py-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 w-full text-left py-0.5 cursor-pointer",onClick:()=>n(e=>!e),role:"button","aria-expanded":r,"aria-label":i("assistant.expandTool"),children:[(0,t.jsx)(j.ChevronRight,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0 transition-transform duration-150 ${r?"rotate-90":""}`}),(0,t.jsx)("span",{className:"text-xs font-semibold text-foreground truncate",children:l}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)(P,{text:e,className:"opacity-0 group-hover/tool:opacity-100"}),(0,t.jsx)("span",{className:"bg-muted text-muted-foreground text-[10px] px-1.5 rounded shrink-0",children:i("assistant.toolLabel")})]}),r&&(0,t.jsx)("div",{className:"mt-1 mb-1 rounded-md bg-background/60 border border-border/60 px-2.5 py-1.5",children:(0,t.jsx)("pre",{className:"font-mono text-[12px] leading-relaxed max-h-[240px] overflow-auto whitespace-pre-wrap break-all text-muted-foreground",children:e})})]})]})}function F({message:e,onImagePreview:s}){switch(e.role){case"user":return(0,t.jsx)(E,{content:e.content,attachmentFilenames:e.attachmentFilenames,onImagePreview:s});case"assistant":return(0,t.jsx)(L,{content:e.content,isStreaming:e.isStreaming});case"thinking":return(0,t.jsx)(O,{});case"tool":return(0,t.jsx)($,{content:e.content,toolName:e.toolName});default:return null}}var B=e.i(938499),q=e.i(657153);function H(e){let t=0;for(let s of e){let e=s.codePointAt(0)??0;e>=12288&&e<=40959||e>=44032&&e<=55215||e>=65280&&e<=65519||e>=131072?t+=2:t+=1}return t}function K(e,t){let s=0,a="";for(let r of e){let e=H(r);if(s+e>t)break;a+=r,s+=e}return a}function V({pendingAttachments:e,onRemove:s,onPreview:a}){let{t:r}=(0,g.useI18n)(),n=e.filter(e=>"image"===e.kind);return 0===n.length?null:(0,t.jsx)("div",{className:"flex flex-row flex-wrap items-center gap-2 px-3 py-2 border-b border-border/60",children:n.map(e=>(0,t.jsx)(_,{item:e,onRemove:s,onPreview:a,t:r},e.id))})}function X({pendingAttachments:e,onRemove:s}){let{t:a}=(0,g.useI18n)(),r=e.filter(e=>"text"===e.kind);return 0===r.length?null:(0,t.jsx)("div",{className:"flex flex-row flex-wrap items-center gap-2 px-3 py-2 border-b border-border/60",children:r.map(e=>(0,t.jsx)(W,{item:e,onRemove:s,t:a},e.id))})}function _({item:e,onRemove:s,onPreview:a,t:r}){return(0,t.jsxs)("div",{className:"group relative h-9 w-9 shrink-0",children:[(0,t.jsxs)("div",{className:`relative h-full w-full overflow-hidden rounded-md border ${"error"===e.status?"border-destructive":"border-border"} bg-muted`,children:[(0,t.jsx)("button",{type:"button",className:`h-full w-full p-0 border-0 bg-transparent ${"uploading"===e.status?"cursor-wait":"cursor-pointer"}`,disabled:"uploading"===e.status,"aria-label":r("assistant.previewImage"),onClick:()=>a(e),children:e.blobUrl&&(0,t.jsx)("img",{src:e.blobUrl,className:"h-full w-full object-cover",alt:""})}),"uploading"===e.status&&(0,t.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-0.5 bg-primary/20",children:(0,t.jsx)("div",{role:"progressbar","aria-valuenow":e.progress,"aria-valuemin":0,"aria-valuemax":100,className:"h-full bg-primary transition-all duration-150",style:{width:`${e.progress}%`}})}),"error"===e.status&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:(0,t.jsx)(B.AlertCircle,{className:"h-3.5 w-3.5 text-white"})})]}),(0,t.jsx)(J,{item:e,onRemove:s,t:r})]})}function W({item:e,onRemove:s,t:a}){let r=function(e,t=22){if(H(e)<=t)return e;let s=e.lastIndexOf("."),a=s>0&&e.length-s<=8,r=a?e.slice(s):"",n=a?e.slice(0,s):e,i=t-H(r)-1;if(i<4)return K(e,t-1)+"…";let l=Math.ceil(i/2);return K(n,l)+"…"+function(e,t){let s=Array.from(e),a=0,r="";for(let e=s.length-1;e>=0;e--){let n=H(s[e]);if(a+n>t)break;r=s[e]+r,a+=n}return r}(n,i-l)+r}(e.file.name,22);return(0,t.jsxs)("div",{className:`group relative flex items-center h-7 w-[200px] shrink-0 rounded-md border bg-background overflow-hidden transition-colors ${"error"===e.status?"border-destructive":"border-border hover:bg-accent/40"}`,title:e.file.name,children:[(0,t.jsx)("button",{type:"button",className:"flex h-full w-7 shrink-0 items-center justify-center text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors","aria-label":a("assistant.removeAttachment"),onClick:t=>{t.stopPropagation(),s(e.id)},children:(0,t.jsx)(q.X,{className:"h-3 w-3"})}),(0,t.jsx)("div",{className:"h-4 w-px bg-border shrink-0"}),(0,t.jsx)("span",{className:"px-2 text-xs text-foreground tabular-nums whitespace-nowrap",children:r}),"uploading"===e.status&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-0.5 overflow-hidden",children:(0,t.jsx)("div",{role:"progressbar","aria-valuenow":e.progress,"aria-valuemin":0,"aria-valuemax":100,className:"h-full bg-primary transition-all duration-150",style:{width:`${e.progress}%`}})}),"error"===e.status&&(0,t.jsx)(B.AlertCircle,{className:"ml-auto mr-2 h-3 w-3 shrink-0 text-destructive"})]})}function J({item:e,onRemove:s,t:a}){return(0,t.jsx)("button",{type:"button",className:"absolute -top-1.5 -right-1.5 h-4 w-4 rounded-full bg-foreground text-background shadow-sm opacity-0 group-hover:opacity-90 hover:!opacity-100 transition-opacity flex items-center justify-center","aria-label":a("assistant.removeAttachment"),title:"error"===e.status?a("assistant.uploadFailedRemoveHint"):void 0,onClick:t=>{t.stopPropagation(),s(e.id)},children:(0,t.jsx)(q.X,{className:"h-2.5 w-2.5",strokeWidth:3})})}var Y=e.i(776639);function G({imageUrl:e,open:a,onOpenChange:r}){let{t:n}=(0,g.useI18n)(),[i,l]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{l(!1)},[a]),(0,t.jsx)(Y.Dialog,{open:a,onOpenChange:r,children:(0,t.jsxs)(Y.DialogContent,{showCloseButton:!1,className:"max-w-[90vw] max-h-[90vh] p-0 overflow-hidden bg-black/90 ring-0",children:[(0,t.jsx)(Y.DialogClose,{render:(0,t.jsx)(h.Button,{variant:"ghost",className:"absolute top-2 right-2 z-10 h-8 w-8 p-0 text-white hover:bg-white/20 hover:text-white"}),"aria-label":n("assistant.closePreview"),children:(0,t.jsx)(q.X,{className:"h-4 w-4"})}),e&&(0,t.jsx)("img",{src:e,alt:"",onClick:()=>l(e=>!e),className:i?"w-auto h-auto max-w-none cursor-zoom-out":"max-w-full max-h-[85vh] object-contain cursor-zoom-in mx-auto"})]})})}e.s(["AssistantChat",0,function(){let[e,r]=(0,s.useState)(""),v=(0,s.useRef)(null),j=(0,s.useRef)(null),y=(0,s.useRef)(null),{t:w}=(0,g.useI18n)(),{chatMessages:N,isChatThinking:k,isLoadingHistory:R,sendChatMessage:T,cancelChat:S,inputFocusSignal:I}=(0,b.useAssistant)(),{pendingAttachments:P,addAttachments:M,removeAttachment:D,clearAll:E,hasUploading:L}=function(){let[e,t]=(0,s.useState)([]),a=(0,s.useRef)(new Map),r=(0,s.useRef)([]);(0,s.useEffect)(()=>{r.current=e},[e]),(0,s.useEffect)(()=>()=>{r.current.forEach(e=>{e.blobUrl&&URL.revokeObjectURL(e.blobUrl)}),a.current.forEach(e=>e.abort()),a.current.clear()},[]);let n=(0,s.useCallback)(e=>{let s=[];for(let t of e){let e=U(function(e){let t=e.name.lastIndexOf(".");return t>=0?e.name.slice(t):""}(t));e&&s.push({id:crypto.randomUUID(),file:t,kind:e,blobUrl:"image"===e?URL.createObjectURL(t):null,status:"uploading",progress:0})}if(0!==s.length)for(let e of(r.current=[...r.current,...s],t(e=>[...e,...s]),s)){let s=new XMLHttpRequest;a.current.set(e.id,s),s.upload.onprogress=s=>{if(s.lengthComputable){let a=Math.round(s.loaded/s.total*100);t(t=>t.map(t=>t.id===e.id?{...t,progress:a}:t))}},s.onload=()=>{if(a.current.delete(e.id),200===s.status)try{let a=JSON.parse(s.responseText),r="string"==typeof a.filename&&a.filename?a.filename:null;if(!r)throw Error("Invalid upload response");t(t=>t.map(t=>t.id===e.id?{...t,status:"done",progress:100,filename:r}:t))}catch{t(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))}else t(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))},s.onerror=()=>{a.current.delete(e.id),t(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))};let r=new FormData;r.append("file",e.file),s.open("POST","/api/internal/assistant/attachments"),s.send(r)}},[]),i=(0,s.useCallback)(e=>{let s=a.current.get(e);s&&(s.abort(),a.current.delete(e)),t(t=>{let s=t.find(t=>t.id===e);return s?.blobUrl&&URL.revokeObjectURL(s.blobUrl),t.filter(t=>t.id!==e)})},[]),l=(0,s.useCallback)(()=>{t(e=>(e.forEach(e=>{let t=a.current.get(e.id);t&&(t.abort(),a.current.delete(e.id)),e.blobUrl&&URL.revokeObjectURL(e.blobUrl)}),a.current.clear(),[]))},[]),o=e.some(e=>"uploading"===e.status);return{pendingAttachments:e,addAttachments:n,removeAttachment:i,clearAll:l,hasUploading:o}}(),[O,$]=(0,s.useState)(null),[B,q]=(0,s.useState)(null);(0,s.useEffect)(()=>{v.current?.focus()},[]),(0,s.useEffect)(()=>{I>0&&v.current?.focus()},[I]);let H=(0,s.useRef)(!1),K=N[N.length-1]?.content.length??0;(0,s.useEffect)(()=>{let e=H.current?"smooth":"instant";y.current?.scrollIntoView({behavior:e}),H.current=!0},[N.length,K]);let _=10-P.length,[W,J]=(0,s.useState)(!1),Y=(0,s.useCallback)(e=>{let t=e.lastIndexOf(".");return null!==U(t>=0?e.slice(t):"")},[]),Q=(0,s.useCallback)(e=>{if(0===e.length||_<=0)return;let t=e.filter(e=>{let t=e.name.lastIndexOf(".");return null!==U(t>=0?e.name.slice(t):"")}).slice(0,_);t.length>0&&M(t)},[M,_]),Z=(0,s.useCallback)(e=>{let t=Array.from(e.clipboardData.items),s=[];for(let e of t){if("file"!==e.kind)continue;let t=e.getAsFile();t&&(e.type.startsWith("image/")||Y(t.name))&&s.push(t)}s.length>0&&Q(s)},[Q,Y]),ee=(0,s.useCallback)(e=>{let t=e.target.files?Array.from(e.target.files):[];t.length>0&&Q(t),j.current&&(j.current.value="")},[Q]),et=(0,s.useRef)(0),es=(0,s.useCallback)(e=>{Array.from(e.dataTransfer.types).includes("Files")&&(e.preventDefault(),et.current+=1,J(!0))},[]),ea=(0,s.useCallback)(e=>{Array.from(e.dataTransfer.types).includes("Files")&&(e.preventDefault(),e.dataTransfer.dropEffect="copy")},[]),er=(0,s.useCallback)(e=>{Array.from(e.dataTransfer.types).includes("Files")&&(et.current=Math.max(0,et.current-1),0===et.current&&J(!1))},[]),en=(0,s.useCallback)(e=>{if(!Array.from(e.dataTransfer.types).includes("Files"))return;e.preventDefault(),et.current=0,J(!1);let t=Array.from(e.dataTransfer.files).filter(e=>Y(e.name));t.length>0&&Q(t)},[Y,Q]),ei=()=>{let t=e.trim(),s=P.filter(e=>"done"===e.status).map(e=>e.filename);!t&&0===s.length||k||L||(T(t,{attachmentFilenames:s}),r(""),E(),v.current?.focus())},el=()=>{let e=S();e&&r(e),v.current?.focus()},eo=P.some(e=>"done"===e.status),ec=!e.trim()&&!eo||k||L;return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsx)(x.ScrollArea,{className:"flex-1 overflow-hidden",children:(0,t.jsxs)("div",{className:`flex flex-col gap-3 p-4 min-h-full ${R||0===N.length?"justify-center":""}`,role:"log","aria-live":"polite",children:[R?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2",children:[(0,t.jsx)(l.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:w("assistant.loading")})]}):0===N.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 px-6",children:[(0,t.jsx)(a.Bot,{className:"size-8 text-muted-foreground/40"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:w("assistant.emptyTitle")}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2 w-full max-w-[280px]",children:[{icon:i.FolderPlus,label:w("assistant.suggestion.createProject")},{icon:n,label:w("assistant.suggestion.createTask")},{icon:c.Search,label:w("assistant.suggestion.checkProgress")},{icon:m,label:w("assistant.suggestion.dailySummary")}].map(({icon:e,label:s})=>(0,t.jsxs)(h.Button,{variant:"outline",className:"flex items-center gap-2 rounded-lg px-3 py-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground text-left justify-start h-auto",onClick:()=>{r(s),v.current?.focus()},children:[(0,t.jsx)(e,{className:"size-3.5 shrink-0"}),s]},s))})]}):N.map(e=>(0,t.jsx)(F,{message:e,onImagePreview:e=>q(e)},e.id)),(0,t.jsx)("div",{ref:y})]})}),(0,t.jsx)("div",{className:"border-t border-border bg-sidebar p-4",onDragEnter:es,onDragOver:ea,onDragLeave:er,onDrop:en,children:(0,t.jsxs)("div",{className:`relative rounded-lg border bg-background transition-colors ${W?"border-primary ring-3 ring-primary/40":"border-border focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50"}`,children:[W&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg bg-primary/10 text-xs font-medium text-primary",children:w("assistant.dropToUpload")}),(0,t.jsx)(V,{pendingAttachments:P,onRemove:D,onPreview:e=>$(e)}),(0,t.jsx)(X,{pendingAttachments:P,onRemove:D}),(0,t.jsx)(p.Textarea,{ref:v,"data-assistant-input":!0,value:e,onChange:e=>r(e.target.value),onKeyDown:e=>{!e.nativeEvent.isComposing&&("Enter"!==e.key||e.shiftKey||(e.preventDefault(),ei()),"Escape"===e.key&&k&&(e.preventDefault(),el()))},onPaste:Z,placeholder:w("assistant.inputPlaceholder"),className:"min-h-[72px] max-h-[120px] resize-none rounded-none border-0 focus-visible:ring-0 focus-visible:border-0 bg-transparent dark:bg-transparent text-sm",rows:3}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-2 pb-2 border-t border-border/60 pt-2",children:[(0,t.jsx)("input",{ref:j,type:"file",accept:A,multiple:!0,hidden:!0,onChange:ee}),(0,t.jsxs)(f.Tooltip,{children:[(0,t.jsx)(f.TooltipTrigger,{onClick:()=>j.current?.click(),disabled:_<=0,"aria-label":w("assistant.addAttachment"),className:"inline-flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-40 disabled:pointer-events-none transition-colors",children:(0,t.jsx)(o.Plus,{className:"h-4 w-4"})}),(0,t.jsx)(f.TooltipContent,{side:"top",align:"start",className:"max-w-xs",children:_<=0?(0,t.jsx)("span",{className:"text-xs",children:w("assistant.attachmentLimitReached")}):(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:w("assistant.addAttachment")}),(0,t.jsxs)("div",{className:"opacity-80",children:[(0,t.jsxs)("span",{children:[w("assistant.attachmentTypeImages"),": "]}),(0,t.jsx)("span",{className:"font-mono",children:C.map(e=>`.${e}`).join(" ")})]}),(0,t.jsxs)("div",{className:"opacity-80",children:[(0,t.jsxs)("span",{children:[w("assistant.attachmentTypeText"),": "]}),(0,t.jsx)("span",{className:"font-mono",children:z.map(e=>`.${e}`).join(" ")})]})]})})]}),k?(0,t.jsx)(h.Button,{variant:"outline",size:"icon",className:"h-7 w-7 border-destructive/50 text-destructive transition-colors hover:bg-destructive/20 hover:text-destructive hover:border-destructive",onClick:el,"aria-label":w("assistant.cancelLabel"),children:(0,t.jsx)(u.Square,{className:"h-3 w-3 fill-current"})}):(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground transition-colors hover:bg-primary/10 hover:text-primary",onClick:ei,disabled:ec,"aria-label":w("assistant.sendLabel"),children:(0,t.jsx)(d,{className:"h-4 w-4"})})]})]})}),(0,t.jsx)(G,{imageUrl:O?.blobUrl??null,open:null!==O&&"image"===O.kind,onOpenChange:e=>{e||$(null)}}),(0,t.jsx)(G,{imageUrl:B,open:null!==B,onOpenChange:e=>{e||q(null)}})]})}],113627)},103363,e=>{e.n(e.i(113627))},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 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35967,e=>{"use strict";var t=e.i(289721);let r=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var a=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function l(e){return s[function(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;return t}(e)%s.length]}let n={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:a,showName:s=!1,className:l="",title:n}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${l}`,title:n??(a?`${e} \xb7 ${a}`:e),children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&a?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:a}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:r}=(0,a.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n[e]}`,children:r(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:r}=(0,a.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r("version.type.uncategorized")})},"typeBadgeColor",0,l],35967)},736061,460707,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 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.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,r],736061);let a=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,a],460707)},922210,121320,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("402267c2c38e93dab04259f43e1a7495e1628abd45",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],922210);let a=(0,t.createServerReference)("40efafaef4f35ec883fb17805980ce195985954dd2",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,a],121320)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},961404,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40bd6bd14273f742080b119c49ce1ae4226a0ea9ae",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,r])},110204,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["Label",0,function({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}])},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},456346,965322,726027,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var r=e.i(514798);let a=(0,r.createServerReference)("40dffcd1988fd8b1ac7b1da9ef721a2c75041021d0",r.callServer,void 0,r.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,a],965322);let s=(0,r.createServerReference)("400b4e64d53a79ea69cb891f33bf0b5825053f5a2f",r.callServer,void 0,r.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],726027)},744798,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(776639),s=e.i(519455),l=e.i(793479),n=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(280027),x=e.i(337822),m=e.i(317056),h=e.i(533499),p=e.i(965322),b=e.i(726027),f=e.i(514798);let g=(0,f.createServerReference)("406e86c83e91c1186830344ed891d8a1ce2757f822",f.callServer,void 0,f.findSourceMapURL,"getCurrentBranch");var v=e.i(961404);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:f,onSubmit:y,onUpdate:k,defaultStatus:j="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:S,labels:C,projectType:M,projectLocalPath:L,versions:E,defaultVersionId:R}){let P,[I,D]=(0,r.useState)(""),[T,U]=(0,r.useState)(""),[$,A]=(0,r.useState)("MEDIUM"),[O,_]=(0,r.useState)(""),[z,B]=(0,r.useState)([]),[H,G]=(0,r.useState)([]),[V,F]=(0,r.useState)(!1),[W,q]=(0,r.useState)(""),[Y,X]=(0,r.useState)(!1),[K,J]=(0,r.useState)(!0),[Q,Z]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(null),{t:er}=(0,h.useI18n)();(0,r.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let r=e["task.defaultUseWorktree"],a=e["task.defaultAutoStart"];"boolean"==typeof r&&J(r),"boolean"==typeof a&&Z(a)}).catch(()=>{}),()=>{t=!0}},[e,w]);let ea=!!w,es=!!L;return(0,r.useEffect)(()=>{w?(D(w.title),U(w.description??""),A(w.priority),_(w.subPath??""),B(N??[]),et(w.versionId??null)):(S?(D(S.title??""),U(S.description??""),A(S.priority??"MEDIUM"),_(S.subPath??""),B(S.labelIds??[])):(D(""),U(""),A("MEDIUM"),_(""),B([])),et(R??null))},[w,N,S,R]),(0,r.useEffect)(()=>{e||w||(D(""),U(""),A("MEDIUM"),_(""),B([]),G([]),q(""),X(!1),et(R??null))},[e,w,R]),(0,r.useEffect)(()=>{e&&es&&!w&&(F(!0),Promise.all([(0,p.getProjectBranches)(L),g(L)]).then(([e,t])=>{G(e);let r=S?.baseBranch??null;r&&e.includes(r)?q(r):q(t&&e.includes(t)?t:e[0]??""),F(!1),(0,b.fetchRemoteBranches)(L).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(L).then(e=>{G(e),q(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{G([]),q(""),F(!1)}))},[e,es,L,w,S]),(0,t.jsx)(a.Dialog,{open:e,onOpenChange:f,disablePointerDismissal:!0,children:(0,t.jsxs)(a.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(a.DialogHeader,{children:(0,t.jsx)(a.DialogTitle,{children:ea?er("task.edit"):er("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:er("task.title")}),(0,t.jsx)(l.Input,{id:"title","data-testid":"task-title",placeholder:er("task.titlePlaceholder"),value:I,onChange:e=>D(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:er("task.description")}),(0,t.jsx)(n.Textarea,{id:"description",placeholder:er("task.descPlaceholder"),rows:4,value:T,onChange:e=>U(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:er("task.subPath")}),(0,t.jsx)(l.Input,{id:"subPath",placeholder:er("task.subPathPlaceholder"),value:O,onChange:e=>_(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:er("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let r={LOW:{label:er("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:er("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:er("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:er("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>A(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${$===e?`${r.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:r.label},e)})})]}),es&&!ea&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.baseBranch")}),V?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchLoading")}):H.length>0?(0,t.jsxs)(x.Popover,{open:Y,onOpenChange:X,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||er("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:er("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:er("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:H.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{q(e),X(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:er("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>J(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.worktreeYes"):er("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:er("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.autoStartYes"):er("task.autoStartNo")},String(e)))})]})]}),C.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:C.map(e=>{let r=z.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{B(t=>r?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${r?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:r?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!ea||E&&E.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("version.picker.label")}),E&&E.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(P=E.find(e=>e.id===ee))?P.isCurrent?`${P.number} \xb7 ${P.name} \xb7 ${er("version.currentShort")}`:`${P.number} \xb7 ${P.name}`:er("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:er("version.picker.none")}),E.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${er("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:er("version.picker.empty")})]})]}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>f(!1),children:er("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{I.trim()&&(ea&&k?k(w.id,{title:I,description:T,priority:$,labelIds:z,subPath:O.trim()||"",versionId:ee}):y({title:I,description:T,priority:$,status:j,labelIds:z,...es&&K&&W?{baseBranch:W}:{},...O.trim()?{subPath:O.trim()}:{},versionId:ee,autoStart:Q}),D(""),U(""),A("MEDIUM"),_(""),B([]),G([]),q(""),J(!0),et(null),f(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ea?er("common.save"):er("common.create")})]})]})})}],744798)},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)},372237,578770,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40dadcf5731aaed6d0df7327cccb194d62be9eca76",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,r],372237);let a=(0,t.createServerReference)("40845f88c397d5023344b95513dff908b52205464f",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,a],578770)},235357,144640,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(585012),s=e.i(657153),l=e.i(19671),n=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:r,title:a,disabled:s,...l}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||r()},title:a,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...l,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:p,currentIndex:b,onIndexChange:f}){let{t:g}=(0,d.useI18n)(),[v,y]=(0,r.useState)(1),[k,j]=(0,r.useState)({x:0,y:0}),[w,N]=(0,r.useState)(!1),S=(0,r.useRef)(null),[C,M]=(0,r.useState)(!1),L=!!p&&p.length>1&&"number"==typeof b&&!!f,E=L&&b>0,R=L&&b<p.length-1,P=L?p.length:0,I=P>0?Math.ceil(P/10):0,D=L?Math.floor(b/10):0,T=10*D,U=Math.min(T+10,P),$=I>1,A=L&&D>0,O=L&&D<I-1;(0,r.useEffect)(()=>{M(!0)},[]),(0,r.useEffect)(()=>{y(1),j({x:0,y:0})},[e]),(0,r.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let _=(0,r.useCallback)(()=>h(!1),[h]),z=(0,r.useCallback)(()=>{L&&E&&f(b-1)},[L,E,f,b]),B=(0,r.useCallback)(()=>{L&&R&&f(b+1)},[L,R,f,b]),H=(0,r.useCallback)(()=>{L&&A&&f((D-1)*10)},[L,A,f,D]),G=(0,r.useCallback)(()=>{L&&O&&f(Math.min((D+1)*10,P-1))},[L,O,f,D,P]),V=(0,r.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),F=(0,r.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&j({x:0,y:0}),t})},[]),W=(0,r.useCallback)(()=>{y(1),j({x:0,y:0})},[]);(0,r.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),_();break;case"ArrowLeft":L&&(e.preventDefault(),z());break;case"ArrowRight":L&&(e.preventDefault(),B());break;case"+":case"=":e.preventDefault(),V();break;case"-":case"_":e.preventDefault(),F();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,L,_,z,B,V,F,W]);let q=(0,r.useRef)(!1),Y=()=>{w&&N(!1),S.current=null},X=w?"cursor-grabbing":"cursor-grab";if(!m||!C)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":g("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,L?` \xb7 ${b+1} / ${p.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:e=>{e.target===e.currentTarget&&_()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let r=Math.min(8,Math.max(.1,e*t));return r<=1&&j({x:0,y:0}),r})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),q.current&&(q.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),q.current=!1,e.target.setPointerCapture?.(e.pointerId),S.current={x:e.clientX,y:e.clientY,panX:k.x,panY:k.y},N(!0))},onPointerMove:e=>{if(!S.current)return;let t=e.clientX-S.current.x,r=e.clientY-S.current.y;Math.abs(t)+Math.abs(r)>5&&(q.current=!0),w&&j({x:S.current.panX+t,y:S.current.panY+r})},onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${k.x}px, ${k.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[L&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[$&&(0,t.jsx)(u,{onClick:H,title:`${g("assets.lightbox.prev")} (-10)`,"aria-label":`${g("assets.lightbox.prev")} (-10)`,disabled:!A,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:z,title:g("assets.lightbox.prev"),"aria-label":g("assets.lightbox.prev"),disabled:!E,children:(0,t.jsx)(l.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(T,U).map((e,r)=>{let a=T+r,s=a===b;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||f(a)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+a)})}),(0,t.jsx)(u,{onClick:B,title:g("assets.lightbox.next"),"aria-label":g("assets.lightbox.next"),disabled:!R,children:(0,t.jsx)(n.ChevronRight,{className:"h-4 w-4"})}),$&&(0,t.jsx)(u,{onClick:G,title:`${g("assets.lightbox.next")} (+10)`,"aria-label":`${g("assets.lightbox.next")} (+10)`,disabled:!O,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:g("assets.lightbox.reset"),"aria-label":g("assets.lightbox.reset"),disabled:1===v&&0===k.x&&0===k.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:_,title:g("assets.lightbox.close"),"aria-label":g("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,a.createPortal)(K,document.body)}],235357);var x=e.i(400355);e.i(254826);var m=e.i(309735),h=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:a,open:s,onOpenChange:l}){let{t:n}=(0,d.useI18n)(),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[p,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!s||!e){o(null),b(null);return}let t=!1;return u(!0),b(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?b(n("assets.fileTooLarge")):b(n("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,n]);let f=a.split(".").pop()?.toLowerCase();return(0,t.jsx)(h.Dialog,{open:s,onOpenChange:l,children:(0,t.jsxs)(h.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:n("assets.loadingPreview")})]});if(p)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===i)return null;if("md"===f)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(m.Streamdown,{children:i})});if("json"===f){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var r=e.i(309735),a=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:l,onOpenChange:n}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(a.Dialog,{open:l,onOpenChange:n,children:(0,t.jsxs)(a.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(r.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,r){if(r?.startsWith("image/"))return!0;let a=e.split(".").pop()?.toLowerCase();return!!a&&t.has(a)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},23404,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40c3605bec65c1496fa0fd5123f1e94bdfde2a828e",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,r])},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},313029,e=>{"use strict";let t=(0,e.i(572989).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],313029)},960518,e=>{"use strict";let t=(0,e.i(572989).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],960518)},340873,e=>{"use strict";let t=(0,e.i(572989).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",0,t],340873)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let r=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,r],181209)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},59959,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4024bacffbca9b35b0d1ef4babaae0b94556e89f0b",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},2174,6432,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40f0ceafc174448bcc919ee0be24df983e9792a9b9",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],2174);let a=(0,t.createServerReference)("40c8c62b9f15f9b676b6771bfc2ebf92772a8912c3",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],6432)},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)},210381,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("403aef25069f4957dd5bd16a162617f05e9de9b04c",t.callServer,void 0,t.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,r])},92575,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40210797f0040786db86f0d815003f858cbb40f2c4",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,r])},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:s,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,r.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}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},166155,105808,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("401e30bc402a675fb82986e90ca385e44a94be9e63",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],166155);let a=(0,t.createServerReference)("60e35407677ba51c6aa1ee8c2a4625c9ec602b3748",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,a],105808)},657367,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("7c6d144b031773a1935aff7cb31975f95f676d8731",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,r])},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
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35967,e=>{"use strict";var t=e.i(289721);let r=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var a=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function l(e){return s[function(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;return t}(e)%s.length]}let n={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:a,showName:s=!1,className:l="",title:n}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${l}`,title:n??(a?`${e} \xb7 ${a}`:e),children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&a?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:a}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:r}=(0,a.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n[e]}`,children:r(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:r}=(0,a.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r("version.type.uncategorized")})},"typeBadgeColor",0,l],35967)},736061,460707,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 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.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,r],736061);let a=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,a],460707)},512169,850057,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("409c1c009d8aeec053e4e321882172018668422c1e",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],512169);let a=(0,t.createServerReference)("40fd5c40a4b3f121642b17888c343c114894b1770b",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,a],850057)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},841244,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("405070d20bbba4cf230d1ab3d73588b341855454fe",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,r])},110204,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["Label",0,function({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}])},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},456346,241623,310987,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var r=e.i(514798);let a=(0,r.createServerReference)("406cac08b8f7574c2e90946d4badd82085f6afec70",r.callServer,void 0,r.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,a],241623);let s=(0,r.createServerReference)("405f6da2b95ba88bc79bb6ab942e0549a5d29b7f28",r.callServer,void 0,r.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],310987)},744798,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(776639),s=e.i(519455),l=e.i(793479),n=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(967489),x=e.i(337822),m=e.i(317056),h=e.i(533499),b=e.i(241623),p=e.i(310987),f=e.i(514798);let g=(0,f.createServerReference)("4073dabbd454c2449d967f5f8b4fe214c769bd14e6",f.callServer,void 0,f.findSourceMapURL,"getCurrentBranch");var v=e.i(841244);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:f,onSubmit:y,onUpdate:k,defaultStatus:j="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:S,labels:C,projectType:M,projectLocalPath:L,versions:E,defaultVersionId:R}){let P,[I,D]=(0,r.useState)(""),[T,U]=(0,r.useState)(""),[$,A]=(0,r.useState)("MEDIUM"),[O,_]=(0,r.useState)(""),[z,B]=(0,r.useState)([]),[H,G]=(0,r.useState)([]),[V,F]=(0,r.useState)(!1),[W,q]=(0,r.useState)(""),[Y,X]=(0,r.useState)(!1),[K,J]=(0,r.useState)(!0),[Q,Z]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(null),{t:er}=(0,h.useI18n)();(0,r.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let r=e["task.defaultUseWorktree"],a=e["task.defaultAutoStart"];"boolean"==typeof r&&J(r),"boolean"==typeof a&&Z(a)}).catch(()=>{}),()=>{t=!0}},[e,w]);let ea=!!w,es=!!L;return(0,r.useEffect)(()=>{w?(D(w.title),U(w.description??""),A(w.priority),_(w.subPath??""),B(N??[]),et(w.versionId??null)):(S?(D(S.title??""),U(S.description??""),A(S.priority??"MEDIUM"),_(S.subPath??""),B(S.labelIds??[])):(D(""),U(""),A("MEDIUM"),_(""),B([])),et(R??null))},[w,N,S,R]),(0,r.useEffect)(()=>{e||w||(D(""),U(""),A("MEDIUM"),_(""),B([]),G([]),q(""),X(!1),et(R??null))},[e,w,R]),(0,r.useEffect)(()=>{e&&es&&!w&&(F(!0),Promise.all([(0,b.getProjectBranches)(L),g(L)]).then(([e,t])=>{G(e);let r=S?.baseBranch??null;r&&e.includes(r)?q(r):q(t&&e.includes(t)?t:e[0]??""),F(!1),(0,p.fetchRemoteBranches)(L).then(()=>{setTimeout(()=>{(0,b.getProjectBranches)(L).then(e=>{G(e),q(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{G([]),q(""),F(!1)}))},[e,es,L,w,S]),(0,t.jsx)(a.Dialog,{open:e,onOpenChange:f,disablePointerDismissal:!0,children:(0,t.jsxs)(a.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(a.DialogHeader,{children:(0,t.jsx)(a.DialogTitle,{children:ea?er("task.edit"):er("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:er("task.title")}),(0,t.jsx)(l.Input,{id:"title","data-testid":"task-title",placeholder:er("task.titlePlaceholder"),value:I,onChange:e=>D(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:er("task.description")}),(0,t.jsx)(n.Textarea,{id:"description",placeholder:er("task.descPlaceholder"),rows:4,value:T,onChange:e=>U(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:er("task.subPath")}),(0,t.jsx)(l.Input,{id:"subPath",placeholder:er("task.subPathPlaceholder"),value:O,onChange:e=>_(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:er("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let r={LOW:{label:er("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:er("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:er("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:er("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>A(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${$===e?`${r.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:r.label},e)})})]}),es&&!ea&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.baseBranch")}),V?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchLoading")}):H.length>0?(0,t.jsxs)(x.Popover,{open:Y,onOpenChange:X,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||er("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:er("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:er("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:H.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{q(e),X(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:er("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>J(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.worktreeYes"):er("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:er("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.autoStartYes"):er("task.autoStartNo")},String(e)))})]})]}),C.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:C.map(e=>{let r=z.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{B(t=>r?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${r?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:r?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!ea||E&&E.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("version.picker.label")}),E&&E.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(P=E.find(e=>e.id===ee))?P.isCurrent?`${P.number} \xb7 ${P.name} \xb7 ${er("version.currentShort")}`:`${P.number} \xb7 ${P.name}`:er("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:er("version.picker.none")}),E.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${er("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:er("version.picker.empty")})]})]}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>f(!1),children:er("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{I.trim()&&(ea&&k?k(w.id,{title:I,description:T,priority:$,labelIds:z,subPath:O.trim()||"",versionId:ee}):y({title:I,description:T,priority:$,status:j,labelIds:z,...es&&K&&W?{baseBranch:W}:{},...O.trim()?{subPath:O.trim()}:{},versionId:ee,autoStart:Q}),D(""),U(""),A("MEDIUM"),_(""),B([]),G([]),q(""),J(!0),et(null),f(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ea?er("common.save"):er("common.create")})]})]})})}],744798)},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)},801957,767838,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4078a68bce1825c6bfdc7a489f96bd4bfd1ede8d57",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,r],801957);let a=(0,t.createServerReference)("4002a62a3d1bd8911c25a119d422dbf24e7992fa0c",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,a],767838)},235357,144640,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(585012),s=e.i(657153),l=e.i(19671),n=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:r,title:a,disabled:s,...l}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||r()},title:a,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...l,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:b,currentIndex:p,onIndexChange:f}){let{t:g}=(0,d.useI18n)(),[v,y]=(0,r.useState)(1),[k,j]=(0,r.useState)({x:0,y:0}),[w,N]=(0,r.useState)(!1),S=(0,r.useRef)(null),[C,M]=(0,r.useState)(!1),L=!!b&&b.length>1&&"number"==typeof p&&!!f,E=L&&p>0,R=L&&p<b.length-1,P=L?b.length:0,I=P>0?Math.ceil(P/10):0,D=L?Math.floor(p/10):0,T=10*D,U=Math.min(T+10,P),$=I>1,A=L&&D>0,O=L&&D<I-1;(0,r.useEffect)(()=>{M(!0)},[]),(0,r.useEffect)(()=>{y(1),j({x:0,y:0})},[e]),(0,r.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let _=(0,r.useCallback)(()=>h(!1),[h]),z=(0,r.useCallback)(()=>{L&&E&&f(p-1)},[L,E,f,p]),B=(0,r.useCallback)(()=>{L&&R&&f(p+1)},[L,R,f,p]),H=(0,r.useCallback)(()=>{L&&A&&f((D-1)*10)},[L,A,f,D]),G=(0,r.useCallback)(()=>{L&&O&&f(Math.min((D+1)*10,P-1))},[L,O,f,D,P]),V=(0,r.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),F=(0,r.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&j({x:0,y:0}),t})},[]),W=(0,r.useCallback)(()=>{y(1),j({x:0,y:0})},[]);(0,r.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),_();break;case"ArrowLeft":L&&(e.preventDefault(),z());break;case"ArrowRight":L&&(e.preventDefault(),B());break;case"+":case"=":e.preventDefault(),V();break;case"-":case"_":e.preventDefault(),F();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,L,_,z,B,V,F,W]);let q=(0,r.useRef)(!1),Y=()=>{w&&N(!1),S.current=null},X=w?"cursor-grabbing":"cursor-grab";if(!m||!C)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":g("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,L?` \xb7 ${p+1} / ${b.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:e=>{e.target===e.currentTarget&&_()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let r=Math.min(8,Math.max(.1,e*t));return r<=1&&j({x:0,y:0}),r})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),q.current&&(q.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),q.current=!1,e.target.setPointerCapture?.(e.pointerId),S.current={x:e.clientX,y:e.clientY,panX:k.x,panY:k.y},N(!0))},onPointerMove:e=>{if(!S.current)return;let t=e.clientX-S.current.x,r=e.clientY-S.current.y;Math.abs(t)+Math.abs(r)>5&&(q.current=!0),w&&j({x:S.current.panX+t,y:S.current.panY+r})},onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${k.x}px, ${k.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[L&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[$&&(0,t.jsx)(u,{onClick:H,title:`${g("assets.lightbox.prev")} (-10)`,"aria-label":`${g("assets.lightbox.prev")} (-10)`,disabled:!A,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:z,title:g("assets.lightbox.prev"),"aria-label":g("assets.lightbox.prev"),disabled:!E,children:(0,t.jsx)(l.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:b.slice(T,U).map((e,r)=>{let a=T+r,s=a===p;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||f(a)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+a)})}),(0,t.jsx)(u,{onClick:B,title:g("assets.lightbox.next"),"aria-label":g("assets.lightbox.next"),disabled:!R,children:(0,t.jsx)(n.ChevronRight,{className:"h-4 w-4"})}),$&&(0,t.jsx)(u,{onClick:G,title:`${g("assets.lightbox.next")} (+10)`,"aria-label":`${g("assets.lightbox.next")} (+10)`,disabled:!O,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:g("assets.lightbox.reset"),"aria-label":g("assets.lightbox.reset"),disabled:1===v&&0===k.x&&0===k.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:_,title:g("assets.lightbox.close"),"aria-label":g("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,a.createPortal)(K,document.body)}],235357);var x=e.i(400355);e.i(254826);var m=e.i(309735),h=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:a,open:s,onOpenChange:l}){let{t:n}=(0,d.useI18n)(),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[b,p]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!s||!e){o(null),p(null);return}let t=!1;return u(!0),p(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?p(n("assets.fileTooLarge")):p(n("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,n]);let f=a.split(".").pop()?.toLowerCase();return(0,t.jsx)(h.Dialog,{open:s,onOpenChange:l,children:(0,t.jsxs)(h.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:n("assets.loadingPreview")})]});if(b)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:b});if(null===i)return null;if("md"===f)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(m.Streamdown,{children:i})});if("json"===f){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var r=e.i(309735),a=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:l,onOpenChange:n}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(a.Dialog,{open:l,onOpenChange:n,children:(0,t.jsxs)(a.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(r.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,r){if(r?.startsWith("image/"))return!0;let a=e.split(".").pop()?.toLowerCase();return!!a&&t.has(a)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},175391,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40a284d9c6e2f44b212be27d8918d2bae507fc32d9",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,r])},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},313029,e=>{"use strict";let t=(0,e.i(572989).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],313029)},960518,e=>{"use strict";let t=(0,e.i(572989).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],960518)},340873,e=>{"use strict";let t=(0,e.i(572989).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",0,t],340873)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let r=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,r],181209)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},443344,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("402609e2dc24f57538b1ed025fb7ec6c6d9822f2ba",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},508879,216169,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4052197932d3dac67eb911c66ab41b8c00226c3a2e",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],508879);let a=(0,t.createServerReference)("408048b95af9327b6f4be5ff902cf0d7ec9e044a81",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],216169)},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)},416427,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("401c3af67aaedff4d933f8f4befb93b2f603293620",t.callServer,void 0,t.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,r])},308588,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("404dd48feaafb3f792425f10be7a057de485a3c4cb",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,r])},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:s,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,r.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}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},236887,308655,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40ba7fdbbdf095f05c58b4b528d07a00823668d5ae",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],236887);let a=(0,t.createServerReference)("60fe38299bdfdfe5f57d0e2ab367e451df5cc5f57e",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,a],308655)},248688,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("7c67921bdf8792c7ae27f2ed537af6ed5e617d5a8b",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,r])},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)))}]);