tower-studio 0.2.46 → 0.2.47

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 (290) 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 +82 -70
  13. package/.next/standalone/.next/server/app/_not-found/page.js +2 -1
  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/browse-fs/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/harness/page/react-loadable-manifest.json +3 -3
  20. package/.next/standalone/.next/server/app/harness/page/server-reference-manifest.json +92 -80
  21. package/.next/standalone/.next/server/app/harness/page.js +2 -1
  22. package/.next/standalone/.next/server/app/harness/page.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/harness/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +3 -3
  25. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +150 -138
  26. package/.next/standalone/.next/server/app/missions/page.js +5 -4
  27. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
  30. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +82 -70
  31. package/.next/standalone/.next/server/app/onboarding/page.js +2 -1
  32. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
  35. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +82 -70
  36. package/.next/standalone/.next/server/app/page.js +2 -1
  37. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
  40. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +128 -116
  41. package/.next/standalone/.next/server/app/settings/page.js +4 -3
  42. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
  45. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +190 -178
  46. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +3 -2
  47. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
  50. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +166 -154
  51. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +3 -2
  52. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/react-loadable-manifest.json +3 -3
  55. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/server-reference-manifest.json +86 -74
  56. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js +2 -1
  57. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
  60. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +150 -138
  61. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +3 -2
  62. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
  65. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +162 -162
  66. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +4 -3
  67. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
  70. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +82 -70
  71. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +3 -2
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +140 -140
  76. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +3 -2
  77. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
  80. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +182 -170
  81. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -5
  82. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
  85. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +108 -96
  86. package/.next/standalone/.next/server/app/workspaces/page.js +2 -1
  87. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  88. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +7 -7
  90. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0gr2wxq.js +1 -1
  91. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0esywxf._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kkrbn-._.js +1 -1
  93. package/.next/standalone/.next/server/chunks/_0_w835g._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/src_05balzk._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/src_0gif-f5._.js +1 -1
  96. package/.next/standalone/.next/server/chunks/src_0pg9w-x._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/src_0vp6.co._.js +1 -1
  98. package/.next/standalone/.next/server/chunks/src_11k6i~l._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +3 -3
  100. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00qdvw7._.js +3 -0
  102. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07rk6ic._.js → [root-of-the-server]__0282989._.js} +1 -1
  103. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0hzwoy5._.js → [root-of-the-server]__03jikql._.js} +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0trmndk._.js → [root-of-the-server]__04dod9d._.js} +1 -1
  105. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05tx27l._.js +3 -0
  106. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m8m7vc._.js → [root-of-the-server]__07ha-7q._.js} +1 -1
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07~giyb._.js +3 -0
  108. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0bx_h2u._.js → [root-of-the-server]__0872sqe._.js} +2 -2
  109. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__090y_.y._.js +1 -1
  110. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b6hugs._.js → [root-of-the-server]__09qoc8v._.js} +1 -1
  111. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.0m12b._.js → [root-of-the-server]__0bl842b._.js} +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0br5e7w._.js → [root-of-the-server]__0c81jqz._.js} +1 -1
  113. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dh0alq._.js +3 -0
  114. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0u3~-.g._.js → [root-of-the-server]__0fy8mj6._.js} +1 -1
  115. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0kqp70x._.js → [root-of-the-server]__0gsk~9d._.js} +1 -1
  116. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h4ltpn._.js +5 -0
  117. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hx2p17._.js +3 -0
  118. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ie8~g5._.js +3 -0
  119. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n02kfa._.js → [root-of-the-server]__0j1w7ro._.js} +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0esg88l._.js → [root-of-the-server]__0jxfeb6._.js} +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  122. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00qzvly._.js → [root-of-the-server]__0mi.v4q._.js} +1 -1
  123. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__06sew6r._.js → [root-of-the-server]__0nell0t._.js} +1 -1
  124. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0odoa97._.js +30 -0
  125. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12viys4._.js → [root-of-the-server]__0q8o5us._.js} +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b6fbjv._.js → [root-of-the-server]__0qjjy1r._.js} +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rg73f.._.js +3 -0
  128. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t3q30a._.js +3 -0
  129. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tpho3f._.js +3 -0
  130. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dhq_gl._.js → [root-of-the-server]__0tusyj0._.js} +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0~edc3d._.js → [root-of-the-server]__0x6eyvj._.js} +1 -1
  132. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n3uc.v._.js → [root-of-the-server]__0xftcya._.js} +2 -2
  133. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xiiocg._.js +30 -0
  134. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0x7br99._.js → [root-of-the-server]__0znl9us._.js} +2 -2
  135. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zsnp~d._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~fdua7._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11fp64w._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vyl8to._.js → [root-of-the-server]__1290yo~._.js} +2 -2
  139. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12s3kky._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0s_q09t._.js → [root-of-the-server]__136sh9u._.js} +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/_0.-.0zk._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/ssr/_0..h3hk._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/{_0b660g4._.js → _0111pr2._.js} +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/{_0czsddm._.js → _029yl-g._.js} +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/{_0q2pep_._.js → _02mcoex._.js} +2 -2
  147. package/.next/standalone/.next/server/chunks/ssr/_02t7f2_._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/ssr/{_0gomvsp._.js → _04brhyt._.js} +2 -2
  149. package/.next/standalone/.next/server/chunks/ssr/{_1118hto._.js → _08b3kyv._.js} +1 -1
  150. package/.next/standalone/.next/server/chunks/ssr/{_0-5.hgb._.js → _0a___34._.js} +2 -2
  151. package/.next/standalone/.next/server/chunks/ssr/{_0ami9yt._.js → _0b4v~ls._.js} +2 -2
  152. package/.next/standalone/.next/server/chunks/ssr/_0bdyusg._.js +6 -0
  153. package/.next/standalone/.next/server/chunks/ssr/{_0hsuip_._.js → _0c8-9m9._.js} +2 -2
  154. package/.next/standalone/.next/server/chunks/ssr/{_0j7m~u6._.js → _0gcox_6._.js} +1 -1
  155. package/.next/standalone/.next/server/chunks/ssr/{_0snv7nt._.js → _0gte_c4._.js} +1 -1
  156. package/.next/standalone/.next/server/chunks/ssr/{_0g~p9_x._.js → _0hyn4md._.js} +2 -2
  157. package/.next/standalone/.next/server/chunks/ssr/{_0l6byg1._.js → _0lqjtwo._.js} +1 -1
  158. package/.next/standalone/.next/server/chunks/ssr/_0noar.v._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/ssr/_0os43sb._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/{_0o_c3b2._.js → _0rilhs1._.js} +2 -2
  161. package/.next/standalone/.next/server/chunks/ssr/{_0ak77.u._.js → _0sbkase._.js} +1 -1
  162. package/.next/standalone/.next/server/chunks/ssr/{_00_h2nx._.js → _0t-0.1o._.js} +2 -2
  163. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/{_0mmy~98._.js → _0w~~xn0._.js} +2 -2
  165. package/.next/standalone/.next/server/chunks/ssr/{_0awn2mm._.js → _0xexuoi._.js} +2 -2
  166. package/.next/standalone/.next/server/chunks/ssr/_0xu906p._.js +4 -0
  167. package/.next/standalone/.next/server/chunks/ssr/_0z-z415._.js +3 -0
  168. package/.next/standalone/.next/server/chunks/ssr/_0zx1ubq._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/ssr/{_0ty4xe6._.js → _0~2k74h._.js} +1 -1
  170. package/.next/standalone/.next/server/chunks/ssr/{_0hx2o_8._.js → _0~rpgs_._.js} +2 -2
  171. package/.next/standalone/.next/server/chunks/ssr/_10a_vqn._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/{_0p5ft59._.js → _10or.ne._.js} +1 -1
  173. package/.next/standalone/.next/server/chunks/ssr/_11.knhq._.js +1 -1
  174. package/.next/standalone/.next/server/chunks/ssr/{_12s8n8g._.js → _124j7aj._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/_13yv8at._.js +3 -0
  176. package/.next/standalone/.next/server/chunks/ssr/src_11j0qlp._.js +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/src_actions_07_wts6._.js +47 -0
  178. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  181. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/src_components_0rowjw~._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0cld9rt._.js → src_lib_0-3zx.v._.js} +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0_px2pz._.js → src_lib_00ial55._.js} +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0a.zy31._.js → src_lib_01-0ix1._.js} +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0b73q0a._.js → src_lib_01d~ml9._.js} +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/{src_lib_04nzvfd._.js → src_lib_0278czx._.js} +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/src_lib_07o.0r6._.js +3 -0
  194. package/.next/standalone/.next/server/chunks/ssr/src_lib_09jpiip._.js +3 -0
  195. package/.next/standalone/.next/server/chunks/ssr/src_lib_0bmg7ix._.js +3 -0
  196. package/.next/standalone/.next/server/chunks/ssr/src_lib_0cb~2g1._.js +3 -0
  197. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fdsvpu._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fyrfen._.js +3 -0
  199. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0dbf2qa._.js → src_lib_0gqe-g3._.js} +1 -1
  200. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ixnmd0._.js +3 -0
  201. package/.next/standalone/.next/server/chunks/ssr/src_lib_0lpxsj~._.js +1 -1
  202. package/.next/standalone/.next/server/chunks/ssr/src_lib_0pgz5n6._.js +3 -0
  203. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h2u7a0._.js → src_lib_0tq69ek._.js} +1 -1
  204. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  205. package/.next/standalone/.next/server/pages/500.html +1 -1
  206. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  207. package/.next/standalone/.next/server/server-reference-manifest.json +1146 -1068
  208. package/.next/standalone/.next/static/chunks/{0oyskd~8~j.j7.js → 00agq5_c-.llc.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/015i97g3voot2.js +2 -0
  210. package/.next/standalone/.next/static/chunks/{02v-9v~885t9c.js → 01wvj~s3skc-5.js} +1 -1
  211. package/.next/standalone/.next/static/chunks/{0.gedys.tq.~k.js → 031br6.h-zycv.js} +1 -1
  212. package/.next/standalone/.next/static/chunks/{07qijq9o5jccu.js → 054ztat09k8d8.js} +1 -1
  213. package/.next/standalone/.next/static/chunks/07f592yv~pptf.js +1 -0
  214. package/.next/standalone/.next/static/chunks/{06x7oq8_iu~9d.js → 08j4ettv1zbmn.js} +1 -1
  215. package/.next/standalone/.next/static/chunks/{03uix~1ru.ovv.js → 08kc0~d-bpqxd.js} +1 -1
  216. package/.next/standalone/.next/static/chunks/{0j5olwb~d3~3j.js → 08s_oyki61yjf.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/09bc_~h466~tj.js +1 -0
  218. package/.next/standalone/.next/static/chunks/{0q1872yhybt55.js → 0_hj_1l73v-on.js} +1 -1
  219. package/.next/standalone/.next/static/chunks/{00o_eiv12t~.1.js → 0a54zbhpg7-ql.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/0c2po53wqe-op.js +1 -0
  221. package/.next/standalone/.next/static/chunks/0clhvl~13pwv2.js +1 -0
  222. package/.next/standalone/.next/static/chunks/0fi1kdxrc9m~d.js +1 -0
  223. package/.next/standalone/.next/static/chunks/0j56_.0_wup.m.js +1 -0
  224. package/.next/standalone/.next/static/chunks/{17z9uivez~kp3.js → 0lokkque~1fox.js} +1 -1
  225. package/.next/standalone/.next/static/chunks/0m5k~sgt78d8a.js +1 -0
  226. package/.next/standalone/.next/static/chunks/{0d9u2xspag~4h.js → 0mzzaly9-cwhd.js} +1 -1
  227. package/.next/standalone/.next/static/chunks/0pg~fc3o64-u0.js +1 -0
  228. package/.next/standalone/.next/static/chunks/{0-kkc.ibted8y.js → 0pvc93qomwhkq.js} +1 -1
  229. package/.next/standalone/.next/static/chunks/0smoiulyzysrc.js +2 -0
  230. package/.next/standalone/.next/static/chunks/0ufatfbq87c84.js +1 -0
  231. package/.next/standalone/.next/static/chunks/{09om2gfwimh7k.js → 0ujznvfinjpzn.js} +1 -1
  232. package/.next/standalone/.next/static/chunks/{0cf7e1scao3zk.js → 0ux~8zee88x-j.js} +1 -1
  233. package/.next/standalone/.next/static/chunks/0vy01_a6xhhrr.js +1 -0
  234. package/.next/standalone/.next/static/chunks/0xd_tk4asn0qj.js +1 -0
  235. package/.next/standalone/.next/static/chunks/{12-mlz2vukuga.js → 0~l470bpaoz9f.js} +1 -1
  236. package/.next/standalone/.next/static/chunks/118j.0w2pbdea.js +1 -0
  237. package/.next/standalone/.next/static/chunks/13yfli6~6o4z~.js +1 -0
  238. package/.next/standalone/.next/static/chunks/{0t1awv68pnn-e.js → 15rlbf5rw1dd..js} +1 -1
  239. package/.next/standalone/package.json +1 -1
  240. package/dist/mcp-server.cjs +6 -0
  241. package/package.json +1 -1
  242. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-geq20._.js +0 -3
  243. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02~hdzx._.js +0 -3
  244. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h_pt4a._.js +0 -3
  245. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0idkp76._.js +0 -3
  246. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j4m.1s._.js +0 -3
  247. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kmonje._.js +0 -3
  248. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lh3mlq._.js +0 -3
  249. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0muf4wq._.js +0 -49
  250. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0o5ohqy._.js +0 -47
  251. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ta_mpj._.js +0 -30
  252. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ws0_c1._.js +0 -3
  253. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~mhv4m._.js +0 -3
  254. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1013v_g._.js +0 -47
  255. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__123rmn-._.js +0 -30
  256. package/.next/standalone/.next/server/chunks/ssr/_05~lqg-._.js +0 -4
  257. package/.next/standalone/.next/server/chunks/ssr/_0771b4a._.js +0 -47
  258. package/.next/standalone/.next/server/chunks/ssr/_0fmko25._.js +0 -3
  259. package/.next/standalone/.next/server/chunks/ssr/_0hg~.4w._.js +0 -6
  260. package/.next/standalone/.next/server/chunks/ssr/_0nrxhfb._.js +0 -47
  261. package/.next/standalone/.next/server/chunks/ssr/_0vkl7.h._.js +0 -47
  262. package/.next/standalone/.next/server/chunks/ssr/_0x09t_o._.js +0 -47
  263. package/.next/standalone/.next/server/chunks/ssr/_0zn.4bi._.js +0 -47
  264. package/.next/standalone/.next/server/chunks/ssr/_1086w4p._.js +0 -47
  265. package/.next/standalone/.next/server/chunks/ssr/src_lib_0er7rzd._.js +0 -3
  266. package/.next/standalone/.next/server/chunks/ssr/src_lib_0f0v8_~._.js +0 -3
  267. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fr6fzy._.js +0 -3
  268. package/.next/standalone/.next/server/chunks/ssr/src_lib_0k04rl3._.js +0 -3
  269. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sq6aqm._.js +0 -3
  270. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ui-~7g._.js +0 -3
  271. package/.next/standalone/.next/server/chunks/ssr/src_lib_0z-gn78._.js +0 -3
  272. package/.next/standalone/.next/server/chunks/ssr/src_lib_13c4a4g._.js +0 -3
  273. package/.next/standalone/.next/static/chunks/00g58.es_hxli.js +0 -1
  274. package/.next/standalone/.next/static/chunks/01qtgj0xv1fsm.js +0 -2
  275. package/.next/standalone/.next/static/chunks/024euw7po0d0w.js +0 -1
  276. package/.next/standalone/.next/static/chunks/03ct4d8znb7tp.js +0 -1
  277. package/.next/standalone/.next/static/chunks/0alhq.h4~iogi.js +0 -1
  278. package/.next/standalone/.next/static/chunks/0ck~sr0nkabl~.js +0 -1
  279. package/.next/standalone/.next/static/chunks/0d1ok-v-u-xe~.js +0 -1
  280. package/.next/standalone/.next/static/chunks/0ftptcpntzaux.js +0 -1
  281. package/.next/standalone/.next/static/chunks/0gk~m5bwgoafi.js +0 -1
  282. package/.next/standalone/.next/static/chunks/0in_7s8n4lmfr.js +0 -1
  283. package/.next/standalone/.next/static/chunks/0mtrtl-jl46in.js +0 -2
  284. package/.next/standalone/.next/static/chunks/0~2l3wz-gxs2j.js +0 -1
  285. package/.next/standalone/.next/static/chunks/0~7h_a_dofg-4.js +0 -1
  286. package/.next/standalone/.next/static/chunks/15gztq9f12uhe.js +0 -1
  287. package/.next/standalone/.next/static/chunks/15ue90qe1sh-9.js +0 -1
  288. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_buildManifest.js +0 -0
  289. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_clientMiddlewareManifest.js +0 -0
  290. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},244354,e=>{"use strict";async function t(e,s,r={}){let n=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!n.ok)throw Error((await n.json()).error||`${s} failed`);return n.json()}e.s(["gitAction",0,t])},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let n=(0,t.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,n],755696);let a=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,a],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let o=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,o],719493);let l=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,l],436539)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),n=e.i(48019),a=e.i(782516),i=e.i(755696),o=e.i(886156),l=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),u=e.i(232280),x=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),D=e.i(755146),M=e.i(759684),A=e.i(337822),L=e.i(746798),B=e.i(776639),F=e.i(793479),T=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:n,currentBranch:a,localPath:i,onCreated:o,onError:c}){let{t:d}=(0,I.useI18n)(),[m,x]=(0,s.useState)(""),[f,p]=(0,s.useState)(a),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(x(""),p(a),j(""),k(""))},[e,a]);let M=[...new Set(n)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),A=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),o();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(B.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(B.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(B.DialogHeader,{children:(0,t.jsx)(B.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(F.Input,{value:m,onChange:e=>x(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&A()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>D(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(u.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:M.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),D(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(T.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(B.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:A,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(l.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let z={modified:o.FileEdit,added:n.FilePlus,deleted:a.FileMinus,untracked:i.FileQuestion,renamed:o.FileEdit},R={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let n=e[t],a=t===e.length-1,i=e.slice(0,t+1).join("/");if(a)r.children.push({name:n,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===n);e||(e={name:n,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(M.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:n,tree:a,batchAction:i,batchLabel:o,batchIcon:l,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:x,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(u.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${n}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o,children:l})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:a.map(e=>(0,t.jsx)(V,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:x,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function V({node:e,depth:n,onFileClick:a,onFileAction:i,fileActionIcon:o,fileActionLabel:l,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${n} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(u.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(x.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(V,{node:e,depth:n+1,onFileClick:a,onFileAction:i,fileActionIcon:o,fileActionLabel:l,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=z[j.status]||r.File,w=R[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>a(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(L.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":l??"",children:o}),l&&(0,t.jsx)(L.TooltipContent,{side:"bottom",children:l})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:n="project"}){let a="task"===n,{t:i}=(0,I.useI18n)(),[o,m]=(0,s.useState)(null),[x,M]=(0,s.useState)(!0),[B,F]=(0,s.useState)(""),[T,z]=(0,s.useState)(!1),[R,U]=(0,s.useState)(!1),[V,K]=(0,s.useState)(!1),[W,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{M(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(B.trim()){z(!0);try{await (0,P.gitAction)(e,"commit",{message:B}),F(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{z(!1)}}},en=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},ea=async t=>{K(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{K(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},eo=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},el=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:B||void 0}),F(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=o?.topLevel??e;try{let n=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,n.content??"",s)}catch{r?.(t.file,"",s)}},eu=o?.changedFiles.filter(e=>e.staged)??[],ex=o?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(eu),[eu]),ep=(0,s.useMemo)(()=>G(ex),[ex]);if(x)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(l.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!o)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...o?.branches??[],...(o?.remoteBranches??[]).filter(e=>!o?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:a?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[a?(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:o?.currentBranch||"—"})]})}),(0,t.jsx)(L.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:o?.currentBranch||"—"})]}):(0,t.jsxs)(A.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(A.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:o?.currentBranch||void 0,children:o?.currentBranch||"—"})]}),(0,t.jsx)(u.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(A.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(o?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(o?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===o?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):eo(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(o?.remoteBranches??[]).filter(e=>!o?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(o?.remoteBranches??[]).filter(e=>!o?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>eo(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{onClick:ei,disabled:W,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${W?"animate-spin":""}`})}),(0,t.jsx)(L.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(L.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:B,onChange:e=>F(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:T||!B.trim()||0===eu.length,children:[T?(0,t.jsx)(l.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(D.DropdownMenu,{children:[(0,t.jsx)(D.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(D.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(D.DropdownMenuGroup,{children:[(0,t.jsx)(D.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:er,disabled:!B.trim()||0===eu.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(D.DropdownMenuSeparator,{}),(0,t.jsxs)(D.DropdownMenuGroup,{children:[(0,t.jsx)(D.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===ex.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===eu.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:eh,disabled:0===ex.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.DropdownMenuSeparator,{}),(0,t.jsxs)(D.DropdownMenuGroup,{children:[(0,t.jsx)(D.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>en(),disabled:R,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>ea(),disabled:V,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(D.DropdownMenuSub,{children:[(0,t.jsxs)(D.DropdownMenuSubTrigger,{disabled:R,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(D.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),o.currentBranch,o.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",o.behind]})]}),o.remoteBranches.filter(e=>e!==o.currentBranch).map(e=>(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(D.DropdownMenuSub,{children:[(0,t.jsxs)(D.DropdownMenuSubTrigger,{disabled:V,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(D.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),o.currentBranch,o.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",o.ahead]})]}),o.remoteBranches.filter(e=>e!==o.currentBranch).map(e=>(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:ei,disabled:W,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${W?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(D.DropdownMenuSeparator,{}),(0,t.jsxs)(D.DropdownMenuGroup,{children:[(0,t.jsx)(D.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:el,disabled:0===o.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(D.DropdownMenuSeparator,{}),(0,t.jsxs)(D.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),o.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:a,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:eu.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:ex.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===o.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...o?.branches??[],...o?.remoteBranches??[]],currentBranch:o?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},14842,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),n=e.i(232280),a=e.i(759686),i=e.i(960518),o=e.i(340873),l=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),u=e.i(624687),x=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:n}=(0,x.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:n("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:n("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:n("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:n("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:n("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:n("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(l.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,x.useI18n)(),r=e.split("\n"),n=r.length>500,a=n?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:a.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),n&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:l,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,x.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[D,M]=(0,s.useState)(!1),[A,L]=(0,s.useState)(""),[B,F]=(0,s.useState)(!1),T=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[l.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>M(!0),className:"gap-2",children:[(0,t.jsx)(o.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(a.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===l.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:l.map(e=>{let s=v.has(e.filename),a=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&T(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(n.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:a,isLargeFold:!a&&i>200,onLoad:()=>T(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:D,onOpenChange:M,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(u.Textarea,{value:A,onChange:e=>L(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>M(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(A.trim()&&w){F(!0);try{await w(A.trim()),L(""),M(!1)}finally{F(!1)}}},disabled:!A.trim()||B,children:B?"...":y("diff.commit")})]})]})})]})}])},412745,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("403c35c2389d293cdefc8a0b3788a1215ad7f93c68",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},571703,666301,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c636a9922893aeb4dcf2cea81b0a4c429bef4146e",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],571703);let r=(0,t.createServerReference)("4044d6c5c594edca1f2190b98b13690c7930ebe6fb",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],666301)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),n=e.i(472074),a=e.i(882651),i=e.i(181209),o=e.i(400355),l=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),u=e.i(519455),x=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(a.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(o.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(l.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:a,onContinueLatest:i}){let{t:o,locale:l}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(x.EmptyState,{icon:m.History,title:o("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),x=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let n=Math.floor(r/60);if(n<60)return`${n}m ${r%60}s`;let a=Math.floor(n/60);return`${a}h ${n%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,o)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),n="zh"===t?"zh-CN":"en-US",a=s.toLocaleTimeString(n,{hour:"2-digit",minute:"2-digit"});return 0===r?a:1===r?"zh"===t?`昨天 ${a}`:`Yesterday ${a}`:r<7?"zh"===t?`${r}天前 ${a}`:`${r}d ago ${a}`:s.toLocaleDateString(n,{month:"2-digit",day:"2-digit"})+" "+a}(s.startedAt??null,l)}),x&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",x,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||o("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",o("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",o("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[o("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(n.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&a?(0,t.jsxs)(u.Button,{size:"sm",onClick:()=>a(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),o("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(u.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),o("execution.tryRecover")]}):null,(0,t.jsxs)(u.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(n.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?o("execution.collapse"):o("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:o("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:o("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])},272132,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("6076bcc79f9958bb057ccdd60911f9d7b735d7a931",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},244354,e=>{"use strict";async function t(e,s,r={}){let n=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!n.ok)throw Error((await n.json()).error||`${s} failed`);return n.json()}e.s(["gitAction",0,t])},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let n=(0,t.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,n],755696);let a=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,a],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let o=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,o],719493);let l=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,l],436539)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),n=e.i(48019),a=e.i(782516),i=e.i(755696),o=e.i(886156),l=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),u=e.i(232280),x=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),D=e.i(755146),M=e.i(759684),A=e.i(337822),L=e.i(746798),B=e.i(776639),F=e.i(793479),T=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:n,currentBranch:a,localPath:i,onCreated:o,onError:c}){let{t:d}=(0,I.useI18n)(),[m,x]=(0,s.useState)(""),[f,p]=(0,s.useState)(a),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(x(""),p(a),j(""),k(""))},[e,a]);let M=[...new Set(n)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),A=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),o();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(B.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(B.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(B.DialogHeader,{children:(0,t.jsx)(B.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(F.Input,{value:m,onChange:e=>x(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&A()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>D(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(u.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:M.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),D(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(T.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(B.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:A,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(l.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let z={modified:o.FileEdit,added:n.FilePlus,deleted:a.FileMinus,untracked:i.FileQuestion,renamed:o.FileEdit},R={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let n=e[t],a=t===e.length-1,i=e.slice(0,t+1).join("/");if(a)r.children.push({name:n,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===n);e||(e={name:n,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(M.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:n,tree:a,batchAction:i,batchLabel:o,batchIcon:l,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:x,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(u.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${n}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o,children:l})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:a.map(e=>(0,t.jsx)(V,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:x,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function V({node:e,depth:n,onFileClick:a,onFileAction:i,fileActionIcon:o,fileActionLabel:l,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${n} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(u.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(x.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(V,{node:e,depth:n+1,onFileClick:a,onFileAction:i,fileActionIcon:o,fileActionLabel:l,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=z[j.status]||r.File,w=R[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>a(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(L.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":l??"",children:o}),l&&(0,t.jsx)(L.TooltipContent,{side:"bottom",children:l})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:n="project"}){let a="task"===n,{t:i}=(0,I.useI18n)(),[o,m]=(0,s.useState)(null),[x,M]=(0,s.useState)(!0),[B,F]=(0,s.useState)(""),[T,z]=(0,s.useState)(!1),[R,U]=(0,s.useState)(!1),[V,K]=(0,s.useState)(!1),[W,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{M(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(B.trim()){z(!0);try{await (0,P.gitAction)(e,"commit",{message:B}),F(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{z(!1)}}},en=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},ea=async t=>{K(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{K(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},eo=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},el=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:B||void 0}),F(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=o?.topLevel??e;try{let n=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,n.content??"",s)}catch{r?.(t.file,"",s)}},eu=o?.changedFiles.filter(e=>e.staged)??[],ex=o?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(eu),[eu]),ep=(0,s.useMemo)(()=>G(ex),[ex]);if(x)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(l.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!o)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...o?.branches??[],...(o?.remoteBranches??[]).filter(e=>!o?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:a?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[a?(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:o?.currentBranch||"—"})]})}),(0,t.jsx)(L.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:o?.currentBranch||"—"})]}):(0,t.jsxs)(A.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(A.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:o?.currentBranch||void 0,children:o?.currentBranch||"—"})]}),(0,t.jsx)(u.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(A.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(o?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(o?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===o?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):eo(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(o?.remoteBranches??[]).filter(e=>!o?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(o?.remoteBranches??[]).filter(e=>!o?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>eo(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{onClick:ei,disabled:W,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${W?"animate-spin":""}`})}),(0,t.jsx)(L.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(L.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:B,onChange:e=>F(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:T||!B.trim()||0===eu.length,children:[T?(0,t.jsx)(l.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(D.DropdownMenu,{children:[(0,t.jsx)(D.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(D.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(D.DropdownMenuGroup,{children:[(0,t.jsx)(D.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:er,disabled:!B.trim()||0===eu.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(D.DropdownMenuSeparator,{}),(0,t.jsxs)(D.DropdownMenuGroup,{children:[(0,t.jsx)(D.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===ex.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===eu.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:eh,disabled:0===ex.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.DropdownMenuSeparator,{}),(0,t.jsxs)(D.DropdownMenuGroup,{children:[(0,t.jsx)(D.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>en(),disabled:R,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>ea(),disabled:V,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(D.DropdownMenuSub,{children:[(0,t.jsxs)(D.DropdownMenuSubTrigger,{disabled:R,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(D.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),o.currentBranch,o.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",o.behind]})]}),o.remoteBranches.filter(e=>e!==o.currentBranch).map(e=>(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(D.DropdownMenuSub,{children:[(0,t.jsxs)(D.DropdownMenuSubTrigger,{disabled:V,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(D.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),o.currentBranch,o.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",o.ahead]})]}),o.remoteBranches.filter(e=>e!==o.currentBranch).map(e=>(0,t.jsxs)(D.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:ei,disabled:W,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${W?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(D.DropdownMenuSeparator,{}),(0,t.jsxs)(D.DropdownMenuGroup,{children:[(0,t.jsx)(D.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:el,disabled:0===o.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(D.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(D.DropdownMenuSeparator,{}),(0,t.jsxs)(D.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),o.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:a,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:eu.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:ex.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===o.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...o?.branches??[],...o?.remoteBranches??[]],currentBranch:o?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},14842,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),n=e.i(232280),a=e.i(759686),i=e.i(960518),o=e.i(340873),l=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),u=e.i(624687),x=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:n}=(0,x.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:n("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:n("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:n("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:n("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:n("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:n("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(l.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,x.useI18n)(),r=e.split("\n"),n=r.length>500,a=n?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:a.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),n&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:l,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,x.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[D,M]=(0,s.useState)(!1),[A,L]=(0,s.useState)(""),[B,F]=(0,s.useState)(!1),T=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[l.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>M(!0),className:"gap-2",children:[(0,t.jsx)(o.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(a.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===l.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:l.map(e=>{let s=v.has(e.filename),a=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&T(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(n.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:a,isLargeFold:!a&&i>200,onLoad:()=>T(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:D,onOpenChange:M,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(u.Textarea,{value:A,onChange:e=>L(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>M(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(A.trim()&&w){F(!0);try{await w(A.trim()),L(""),M(!1)}finally{F(!1)}}},disabled:!A.trim()||B,children:B?"...":y("diff.commit")})]})]})})]})}])},810258,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40fcbdd25f7ffbf65ef1e764bec9f7555bc5224ee8",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},666752,889541,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c561eb8a34485679a353d7aa9c6c93b55caf3c279",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],666752);let r=(0,t.createServerReference)("40ebcb2acc9d7ae9814881df6334f2e4042bd07ff1",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],889541)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),n=e.i(472074),a=e.i(882651),i=e.i(181209),o=e.i(400355),l=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),u=e.i(519455),x=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(a.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(o.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(l.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:a,onContinueLatest:i}){let{t:o,locale:l}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(x.EmptyState,{icon:m.History,title:o("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),x=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let n=Math.floor(r/60);if(n<60)return`${n}m ${r%60}s`;let a=Math.floor(n/60);return`${a}h ${n%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,o)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),n="zh"===t?"zh-CN":"en-US",a=s.toLocaleTimeString(n,{hour:"2-digit",minute:"2-digit"});return 0===r?a:1===r?"zh"===t?`昨天 ${a}`:`Yesterday ${a}`:r<7?"zh"===t?`${r}天前 ${a}`:`${r}d ago ${a}`:s.toLocaleDateString(n,{month:"2-digit",day:"2-digit"})+" "+a}(s.startedAt??null,l)}),x&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",x,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||o("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",o("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",o("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[o("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(n.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&a?(0,t.jsxs)(u.Button,{size:"sm",onClick:()=>a(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),o("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(u.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),o("execution.tryRecover")]}):null,(0,t.jsxs)(u.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(n.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?o("execution.collapse"):o("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:o("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:o("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])},769620,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("6071378a52322d69d1d855a654f44350019f55ad75",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])}]);
@@ -0,0 +1,2 @@
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])},922541,e=>{"use strict";let t=(0,e.i(572989).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],922541)},487486,e=>{"use strict";var t=e.i(565455),r=e.i(581263),n=e.i(294237),i=e.i(975157);let s=(0,n.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:n="default",render:o,...u}){var c;return c={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,i.cn)(s({variant:n}),e)},u),render:o,state:{slot:"badge",variant:n}},(0,r.useRenderElement)(c.defaultTagName??"div",c,c)}],487486)},405367,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4041c848fb76545498a6d488a044d4a61b6162b075",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,r])},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)},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)},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)},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 n=(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,n],460707)},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 n=e.i(533499);let i=["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 s(e){return i[function(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;return t}(e)%i.length]}let o={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:n,showName:i=!1,className:s="",title:o}){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 ${s}`,title:o??(n?`${e} \xb7 ${n}`:e),children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),i&&n?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:n}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:r}=(0,n.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${o[e]}`,children:r(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:r}=(0,n.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${s(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,s],35967)},690027,415601,12659,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4045511df3fbf7d93a8261440c0f5932dfe9b7cf36",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],690027);let n=(0,t.createServerReference)("40604f1fd2330680e7508320ff200aab89f7250cf2",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,n],415601);let i=(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,i],12659)},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:n,description:i,action:s,className:o}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",o),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:n}),i&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:i}),s&&(0,t.jsx)("div",{className:"mt-2",children:s})]})}])},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)},486077,e=>{"use strict";let t=(0,e.i(572989).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],486077)},77597,485599,e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var r,i;r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e){return function t(){for(var r=this,n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.apply(r,[].concat(i,n))}}}function u(e){return({}).toString.call(e).includes("Object")}function c(e){return"function"==typeof e}var a,l,d=o(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),h=function(e,t){return u(t)||d("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&d("changeField"),t},f=function(e){c(e)||d("selectorType")},g=function(e){c(e)||u(e)||d("handlerType"),u(e)&&Object.values(e).some(function(e){return!c(e)})&&d("handlersType")},p=function(e){e||d("initialIsRequired"),u(e)||d("initialType"),Object.keys(e).length||d("initialContent")};function m(e,t){return c(t)?t(e.current):t}function y(e,t){return e.current=s(s({},e.current),t),t}function v(e,t,r){return c(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null==(n=t[r])?void 0:n.call(t,e.current[r])}),r}var b={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},x=(a=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return n.length>=a.length?a.apply(this,n):function(){for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return e.apply(t,[].concat(n,i))}})(b),A=function(e){return(e||x("configIsRequired"),({}).toString.call(e).includes("Object")||x("configType"),e.urls)?(console.warn(b.deprecation),{paths:{vs:e.urls.monacoBase}}):e},M=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},C={type:"cancelation",msg:"operation is manually canceled"};function k(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(C):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var w=["monaco"],E=function(e){if(Array.isArray(e))return e}(l=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(e),g(t);var r={current:e},n=o(v)(r,t),i=o(y)(r),s=o(h)(e),u=o(m)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return f(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,i,s,u)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,s,o=[],u=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(u=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);u=!0);}catch(e){c=!0,n=e}finally{try{if(!u&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw n}}return o}}(l)||function(e){if(e){if("string"==typeof e)return t(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,2):void 0}}(l)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=E[0],j=E[1];function D(e){return document.body.appendChild(e)}function F(e){var t,r,n=S(function(e){return{config:e.config,reject:e.reject}}),i=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return i.onload=function(){return e()},i.onerror=n.reject,i}function _(){var e=S(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var r=t.m||t;B(r),e.resolve(r)},function(t){e.reject(t)})}function B(e){S().monaco||j({monaco:e})}var R=new Promise(function(e,t){return j({resolve:e,reject:t})}),O={config:function(e){var t=A(e),r=t.monaco,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,w);j(function(e){return{config:function e(t,r){return Object.keys(r).forEach(function(n){r[n]instanceof Object&&t[n]&&Object.assign(r[n],e(t[n],r[n]))}),n(n({},t),r)}(e.config,i),monaco:r}})},init:function(){var e=S(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(j({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),k(R);if(window.monaco&&window.monaco.editor)return B(window.monaco),e.resolve(window.monaco),k(R);M(D,F)(_)}return k(R)},__getMonacoInstance:function(){return S(function(e){return e.monaco})}};e.s(["default",0,O],485599);var I=e.i(965652),L={display:"flex",position:"relative",textAlign:"initial"},N={width:"100%"},$={display:"none"},P={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},z=function({children:e}){return I.default.createElement("div",{style:P},e)},T=(0,I.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:i,className:s,wrapperProps:o}){return I.default.createElement("section",{style:{...L,width:e,height:t},...o},!r&&I.default.createElement(z,null,n),I.default.createElement("div",{ref:i,style:{...N,...!r&&$},className:s}))}),U=function(e){(0,I.useEffect)(e,[])},V=function(e,t,r=!0){let n=(0,I.useRef)(!0);(0,I.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function W(){}function q(e,t,r,n){var i,s,o,u,c,a;return i=e,s=n,i.editor.getModel(H(i,s))||(o=e,u=t,c=r,a=n,o.editor.createModel(u,c,a?H(o,a):void 0))}function H(e,t){return e.Uri.parse(t)}var K=(0,I.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:i,originalModelPath:s,modifiedModelPath:o,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:c=!1,theme:a="light",loading:l="Loading...",options:d={},height:h="100%",width:f="100%",className:g,wrapperProps:p={},beforeMount:m=W,onMount:y=W}){let[v,b]=(0,I.useState)(!1),[x,A]=(0,I.useState)(!0),M=(0,I.useRef)(null),C=(0,I.useRef)(null),k=(0,I.useRef)(null),w=(0,I.useRef)(y),E=(0,I.useRef)(m),S=(0,I.useRef)(!1);U(()=>{let e=O.init();return e.then(e=>(C.current=e)&&A(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return M.current?(t=M.current?.getModel(),void(u||t?.original?.dispose(),c||t?.modified?.dispose(),M.current?.dispose())):e.cancel()}}),V(()=>{if(M.current&&C.current){let t=M.current.getOriginalEditor(),i=q(C.current,e||"",n||r||"text",s||"");i!==t.getModel()&&t.setModel(i)}},[s],v),V(()=>{if(M.current&&C.current){let e=M.current.getModifiedEditor(),n=q(C.current,t||"",i||r||"text",o||"");n!==e.getModel()&&e.setModel(n)}},[o],v),V(()=>{let e=M.current.getModifiedEditor();e.getOption(C.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],v),V(()=>{M.current?.getModel()?.original.setValue(e||"")},[e],v),V(()=>{let{original:e,modified:t}=M.current.getModel();C.current.editor.setModelLanguage(e,n||r||"text"),C.current.editor.setModelLanguage(t,i||r||"text")},[r,n,i],v),V(()=>{C.current?.editor.setTheme(a)},[a],v),V(()=>{M.current?.updateOptions(d)},[d],v);let j=(0,I.useCallback)(()=>{if(!C.current)return;E.current(C.current);let u=q(C.current,e||"",n||r||"text",s||""),c=q(C.current,t||"",i||r||"text",o||"");M.current?.setModel({original:u,modified:c})},[r,t,i,e,n,s,o]),D=(0,I.useCallback)(()=>{!S.current&&k.current&&(M.current=C.current.editor.createDiffEditor(k.current,{automaticLayout:!0,...d}),j(),C.current?.editor.setTheme(a),b(!0),S.current=!0)},[d,a,j]);return(0,I.useEffect)(()=>{v&&w.current(M.current,C.current)},[v]),(0,I.useEffect)(()=>{x||v||D()},[x,v,D]),I.default.createElement(T,{width:f,height:h,isEditorReady:v,loading:l,_ref:k,className:g,wrapperProps:p})}),G=function(e){let t=(0,I.useRef)();return(0,I.useEffect)(()=>{t.current=e},[e]),t.current},J=new Map,Q=(0,I.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:i,path:s,theme:o="light",line:u,loading:c="Loading...",options:a={},overrideServices:l={},saveViewState:d=!0,keepCurrentModel:h=!1,width:f="100%",height:g="100%",className:p,wrapperProps:m={},beforeMount:y=W,onMount:v=W,onChange:b,onValidate:x=W}){let[A,M]=(0,I.useState)(!1),[C,k]=(0,I.useState)(!0),w=(0,I.useRef)(null),E=(0,I.useRef)(null),S=(0,I.useRef)(null),j=(0,I.useRef)(v),D=(0,I.useRef)(y),F=(0,I.useRef)(void 0),_=(0,I.useRef)(n),B=G(s),R=(0,I.useRef)(!1),L=(0,I.useRef)(!1);U(()=>{let e=O.init();return e.then(e=>(w.current=e)&&k(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>E.current?void(F.current?.dispose(),h?d&&J.set(s,E.current.saveViewState()):E.current.getModel()?.dispose(),E.current.dispose(),E.current=null,R.current=!1,M(!1)):e.cancel()}),V(()=>{let o=q(w.current,e||n||"",t||i||"",s||r||"");o!==E.current?.getModel()&&(d&&J.set(B,E.current?.saveViewState()),E.current?.setModel(o),d&&E.current?.restoreViewState(J.get(s)))},[s],A),V(()=>{E.current?.updateOptions(a)},[a],A),V(()=>{E.current&&void 0!==n&&(E.current.getOption(w.current.editor.EditorOption.readOnly)?E.current.setValue(n):n!==E.current.getValue()&&(L.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),E.current.pushUndoStop(),L.current=!1))},[n],A),V(()=>{let e=E.current?.getModel();A&&e&&i&&w.current?.editor.setModelLanguage(e,i)},[i,A],A),V(()=>{void 0!==u&&E.current?.revealLine(u)},[u],A),V(()=>{w.current?.editor.setTheme(o)},[o],A);let N=(0,I.useCallback)(()=>{if(!(!S.current||!w.current)&&!R.current){D.current(w.current);let c=s||r,h=q(w.current,n||e||"",t||i||"",c||"");E.current=w.current?.editor.create(S.current,{model:h,automaticLayout:!0,...a},l),d&&E.current.restoreViewState(J.get(c)),w.current.editor.setTheme(o),void 0!==u&&E.current.revealLine(u),M(!0),R.current=!0}},[e,t,r,n,i,s,a,l,d,o,u]);return(0,I.useEffect)(()=>{A&&j.current(E.current,w.current)},[A]),(0,I.useEffect)(()=>{C||A||N()},[C,A,N]),_.current=n,(0,I.useEffect)(()=>{A&&b&&(F.current?.dispose(),F.current=E.current?.onDidChangeModelContent(e=>{L.current||b(E.current.getValue(),e)}))},[A,b]),(0,I.useEffect)(()=>{if(A){let e=w.current.editor.onDidChangeMarkers(e=>{let t=E.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=w.current.editor.getModelMarkers({resource:t});x?.(e)}});return()=>{e?.dispose()}}return()=>{}},[A,x]),I.default.createElement(T,{width:f,height:g,isEditorReady:A,loading:c,_ref:S,className:p,wrapperProps:m})});e.s(["DiffEditor",0,K,"Editor",0,Q,"default",0,Q,"useMonaco",0,function(){let[e,t]=(0,I.useState)(O.__getMonacoInstance());return U(()=>{let r;return e||(r=O.init()).then(e=>{t(e)}),()=>r?.cancel()}),e}],77597)},461526,e=>{"use strict";e.s(["PREVIEW_TASK_ID",0,"__preview__"])},882651,960995,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(["default",0,r],960995),e.s(["XCircle",0,r],181209)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},574378,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("409ca1c6b55313919ac08fa17a459e37f90236f264",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},991838,e=>{"use strict";var t=e.i(965652),r=e.i(770303);e.s(["useExtension",0,function(e){let n=(0,t.useContext)(r.ExtensionContext);if(!n)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:n.statusMap[e],loading:n.loading,isInstalling:n.installing.has(e),install:()=>n.install(e),uninstall:()=>n.uninstall(e),refresh:()=>n.refresh(e)}}])},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)},707631,(e,t,r)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
2
+ `);if(0===t.length)return[];let r=[],n=null,i=null,o=0,c=0,a=null,l=e=>{let[t,i]=s(e)??[];n={chunks:[],deletions:0,additions:0,from:t,to:i},r.push(n)},d=()=>{(!n||n.chunks.length)&&l()},h=e=>{if(!i)return;let[t]=i.changes.slice(-1);i.changes.push({type:t.type,[t.type]:!0,ln1:t.ln1,ln2:t.ln2,ln:t.ln,content:e})},f=[[/^diff\s/,l],[/^new file mode (\d+)$/,(e,t)=>{d(),n.new=!0,n.newMode=t[1],n.from="/dev/null"}],[/^deleted file mode (\d+)$/,(e,t)=>{d(),n.deleted=!0,n.oldMode=t[1],n.to="/dev/null"}],[/^old mode (\d+)$/,(e,t)=>{d(),n.oldMode=t[1]}],[/^new mode (\d+)$/,(e,t)=>{d(),n.newMode=t[1]}],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,(e,t)=>{d(),n.index=e.split(" ").slice(1),t[1]&&(n.oldMode=n.newMode=t[1].trim())}],[/^---\s/,e=>{d(),n.from=u(e)}],[/^\+\+\+\s/,e=>{d(),n.to=u(e)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(e,t)=>{n||l(e);let[r,s,u,d]=t.slice(1);o=+r,c=+u,i={content:e,changes:[],oldStart:+r,oldLines:+(s||1),newStart:+u,newLines:+(d||1)},a={oldLines:+(s||1),newLines:+(d||1)},n.chunks.push(i)}],[/^\$/,h]],g=[[/^\$/,h],[/^-/,e=>{i&&(i.changes.push({type:"del",del:!0,ln:o++,content:e}),n.deletions++,a.oldLines--)}],[/^\+/,e=>{i&&(i.changes.push({type:"add",add:!0,ln:c++,content:e}),n.additions++,a.newLines--)}],[/^\s*/,e=>{i?.changes.push({type:"normal",normal:!0,ln1:o++,ln2:c++,content:e}),a.oldLines--,a.newLines--}]],p=e=>{a?(e=>{for(let[t,r]of g){let n=e.match(t);if(n){r(e,n);break}}0===a.oldLines&&0===a.newLines&&(a=null)})(e):(e=>{for(let[t,r]of f){let n=e.match(t);if(n){r(e,n);break}}})(e)};for(let e of t)p(e);return r};let n=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,i=/^(a|b|i|w|c|o|1|2)\//,s=e=>e?.match(n)?.map(e=>e.replace(i,"").replace(/("|')$/,"")),o=/^\\?['"]|\\?['"]$/g,u=e=>{let t=c(e,"-+").trim();return(t=l(t)).replace(o,"").replace(i,"")},c=(e,t)=>{if(e=h(e),!t&&String.prototype.trimLeft)return e.trimLeft();let r=d(t);return e.replace(RegExp(`^${r}+`),"")},a=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,l=e=>{let t=a.exec(e);return t&&(e=e.substring(0,t.index).trim()),e},d=e=>null==e?"\\s":e instanceof RegExp?e.source:`[${h(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,h=e=>`${e??""}`},196199,e=>{"use strict";var t=e.i(707631);function r(e){return e.replace(/\r\n/g,"\n")}e.s(["normalizeLF",0,r,"parseUnifiedDiff",0,function(e){return(0,t.default)(r(e))}])},594227,449197,195016,61937,791325,717380,306179,105706,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("604844147e2c91132d34cf6f2e46fd1d218194c46e",t.callServer,void 0,t.findSourceMapURL,"listDirectory");e.s(["listDirectory",0,r],594227);let n=(0,t.createServerReference)("70fc7e655c5e226ef4bef4098dc7e0d18a09d95ea9",t.callServer,void 0,t.findSourceMapURL,"getGitStatus");e.s(["getGitStatus",0,n],449197);let i=(0,t.createServerReference)("6059bb2f1ef765942b7ed5dc46fc7eb164372ecbcd",t.callServer,void 0,t.findSourceMapURL,"createFile");e.s(["createFile",0,i],195016);let s=(0,t.createServerReference)("60655c280938703c75f015fde5e4380a507021c8b7",t.callServer,void 0,t.findSourceMapURL,"createDirectory");e.s(["createDirectory",0,s],61937);let o=(0,t.createServerReference)("707cd4994abcd48022af3fd0a5765b6c81cf5bd219",t.callServer,void 0,t.findSourceMapURL,"renameEntry");e.s(["renameEntry",0,o],791325);let u=(0,t.createServerReference)("60fbc9a30c32f8f66ac1179573781c75d0504d4be5",t.callServer,void 0,t.findSourceMapURL,"deleteEntry");e.s(["deleteEntry",0,u],717380);let c=(0,t.createServerReference)("40ae0fdb28f97abf83e14f9f6bf04c1baaea16579b",t.callServer,void 0,t.findSourceMapURL,"listAllFiles");e.s(["listAllFiles",0,c],306179);let a=(0,t.createServerReference)("60190b37684cc97db280beecee21e2b9d83a782b75",t.callServer,void 0,t.findSourceMapURL,"readFileContent");e.s(["readFileContent",0,a],105706)},663822,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("70bf2b912647451f2af133b076df60f5fb3175bb88",t.callServer,void 0,t.findSourceMapURL,"writeFileContent");e.s(["writeFileContent",0,r])},303180,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6019dd90da74fe5ca29479d40166394f1775dafa22",t.callServer,void 0,t.findSourceMapURL,"readFileContentForce");e.s(["readFileContentForce",0,r])},865514,e=>{"use strict";var t=e.i(289721),r=e.i(965652),n=e.i(538059),i=e.i(776639),s=e.i(519455);let o=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var u=e.i(400355);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:c,taskId:a,taskTitle:l,baseBranch:d,fileCount:h,commitCount:f,commitLog:g=[],onMergeComplete:p}){let m=(0,n.useRouter)(),[y,v]=(0,r.useState)(!1),[b,x]=(0,r.useState)(null),A=async()=>{v(!0),x(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){c(!1),p(),m.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?x(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):x(t.error??"Merge failed")}catch{x("Network error — merge failed")}finally{v(!1)}};return(0,t.jsx)(i.Dialog,{open:e,onOpenChange:c,children:(0,t.jsxs)(i.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(i.DialogHeader,{children:(0,t.jsxs)(i.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:d})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:f})]})]}),g.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:g.map((e,r)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},r))})]}),b&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:b})})]}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>c(!1),disabled:y,children:"Cancel"}),(0,t.jsx)(s.Button,{onClick:A,disabled:y,className:"gap-2",children:y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},743067,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40cc116fdbafda50a73d43dc99883a0b2575d177c1",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r])},335578,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("602c786af9fab79fbafd04b467da0b832dc9e41d15",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,r])},82192,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6042ec18c48616a634f1ac5f6735201d6b1328062a",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,r])},907059,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40e995770f40d331eb50e4f3328bc90825b88448f0",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r])},208228,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60e3b1cc6c297b47e9f430860e96636110f7d5415e",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,r])},169751,e=>{"use strict";function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===c(e)}function r(e){return null==e?"":function(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function n(e){return"string"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e}function o(e){return null!=e}function u(e){return!e.trim().length}function c(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let a=Object.prototype.hasOwnProperty;class l{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=d(e);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function d(e){let r=null,i=null,s=null,o=1,u=null;if(n(e)||t(e))s=e,r=h(e),i=f(e);else{if(!a.call(e,"name"))throw Error("Missing name property in key");let t=e.name;if(s=t,a.call(e,"weight")&&(o=e.weight)<=0)throw Error(`Property 'weight' in key '${t}' must be a positive integer`);r=h(t),i=f(t),u=e.getFn}return{path:r,id:i,weight:o,src:s,getFn:u}}function h(e){return t(e)?e:e.split(".")}function f(e){return t(e)?e.join("."):e}let g=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,getFn:function(e,u){let a=[],l=!1,d=(e,u,h,f)=>{if(o(e))if(u[h]){var g,p;let m=e[u[h]];if(!o(m))return;if(h===u.length-1&&(n(m)||i(m)||!0===(g=m)||!1===g||s(p=g)&&null!==p&&"[object Boolean]"==c(g)||"bigint"==typeof m))a.push(void 0!==f?{v:r(m),i:f}:r(m));else if(t(m)){l=!0;for(let e=0,t=m.length;e<t;e+=1)d(m[e],u,h+1,e)}else u.length&&d(m,u,h+1,f)}else a.push(void 0!==f?{v:e,i:f}:e)};return d(e,n(u)?u.split("."):u,0),l?a:a[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}),p=/[^ ]+/g;class m{constructor({getFn:e=g.getFn,fieldNormWeight:t=g.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,n=Math.pow(10,t);return{get(t){let i=t.match(p).length;if(r.has(i))return r.get(i);let s=parseFloat(Math.round(1/Math.pow(i,.5*e)*n)/n);return r.set(i,s),s},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,n(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();n(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}removeAll(e){for(let t=e.length-1;t>=0;t-=1)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!o(e)||u(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,i){let s={i:i,$:{}};this.keys.forEach((i,c)=>{let a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(o(a)){if(t(a)){let e=[];for(let t=0,i=a.length;t<i;t+=1){let i=a[t];if(o(i)){if(n(i)){if(!u(i)){let r={v:i,i:t,n:this.norm.get(i)};e.push(r)}}else if(o(i.v)){let t=n(i.v)?i.v:r(i.v);if(!u(t)){let r={v:t,i:i.i,n:this.norm.get(t)};e.push(r)}}}}s.$[c]=e}else if(n(a)&&!u(a)){let e={v:a,n:this.norm.get(a)};s.$[c]=e}}}),this.records.push(s)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}}function y(e,t,{getFn:r=g.getFn,fieldNormWeight:n=g.fieldNormWeight}={}){let i=new m({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(d)),i.setSources(t),i.create(),i}function v(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let r=1,n=e.length;r<n;r+=1){let n=t[t.length-1],i=e[r];i[0]<=n[1]+1?n[1]=Math.max(n[1],i[1]):t.push(i)}return t}let b={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},x=RegExp("["+Object.keys(b).join("")+"]","g"),A=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(x,e=>b[e]):e=>e;class M{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:i=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:o=g.minMatchCharLength,isCaseSensitive:u=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:a=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:u,ignoreDiacritics:c,ignoreLocation:a},e=u?e:e.toLowerCase(),e=c?A(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const l=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,n=e.length;r<n;r+=1){let i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0;const t=d%32,r=d-t;for(;e<r;)l(this.pattern.substr(e,32),e),e+=32;if(t){const e=d-32;l(this.pattern.substr(e),e)}}else l(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=r?A(e):e,this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:s,threshold:o,findAllMatches:u,minMatchCharLength:c,ignoreLocation:a}=this.options,l=[],d=0,h=!1;this.chunks.forEach(({pattern:t,alphabet:r,startIndex:f})=>{let{isMatch:p,score:m,indices:y}=function(e,t,r,{location:n=g.location,distance:i=g.distance,threshold:s=g.threshold,findAllMatches:o=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,includeMatches:c=g.includeMatches,ignoreLocation:a=g.ignoreLocation}={}){let l;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let d=t.length,h=e.length,f=Math.max(0,Math.min(n,h)),p=s,m=f,y=(e,t)=>{let r=e/d;if(a)return r;let n=Math.abs(f-t);return i?r+n/i:n?1:r},v=u>1||c,b=v?Array(h):[];for(;(l=e.indexOf(t,m))>-1;)if(p=Math.min(y(0,l),p),m=l+d,v){let e=0;for(;e<d;)b[l+e]=1,e+=1}m=-1;let x=[],A=1,M=d+h,C=1<<d-1;for(let t=0;t<d;t+=1){let n=0,i=M;for(;n<i;)y(t,f+i)<=p?n=i:M=i,i=Math.floor((M-n)/2+n);M=i;let s=Math.max(1,f-i+1),u=o?h:Math.min(f+i,h)+d,c=Array(u+2);c[u+1]=(1<<t)-1;for(let n=u;n>=s;n-=1){let i=n-1,o=r[e[i]];if(v&&(b[i]=+!!o),c[n]=(c[n+1]<<1|1)&o,t&&(c[n]|=(x[n+1]|x[n])<<1|1|x[n+1]),c[n]&C&&(A=y(t,i))<=p){if(p=A,(m=i)<=f)break;s=Math.max(1,2*f-m)}}if(y(t+1,f)>p)break;x=c}let k={isMatch:m>=0,score:Math.max(.001,A)};if(v){let e=function(e=[],t=g.minMatchCharLength){let r=[],n=-1,i=-1,s=0;for(let o=e.length;s<o;s+=1){let o=e[s];o&&-1===n?n=s:o||-1===n||((i=s-1)-n+1>=t&&r.push([n,i]),n=-1)}return e[s-1]&&s-n>=t&&r.push([n,s-1]),r}(b,u);e.length?c&&(k.indices=e):k.isMatch=!1}return k}(e,t,r,{location:i+f,distance:s,threshold:o,findAllMatches:u,minMatchCharLength:c,includeMatches:n,ignoreLocation:a});p&&(h=!0),d+=m,p&&y&&l.push(...y)});let f={isMatch:h,score:h?d/this.chunks.length:1};return h&&n&&(f.indices=v(l)),f}}class C{constructor(e){this.pattern=e}static isMultiMatch(e){return k(e,this.multiRegex)}static isSingleMatch(e){return k(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function k(e,t){let r=e.match(t);return r?r[1]:null}class w extends C{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:i=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:o=g.minMatchCharLength,isCaseSensitive:u=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:a=g.ignoreLocation}={}){super(e),this._bitapSearch=new M(e,{location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:u,ignoreDiacritics:c,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class E extends C{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,n=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+i,n.push([t,r-1]);let s=!!n.length;return{isMatch:s,score:+!s,indices:n}}}let S=[class extends C{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},E,class extends C{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=-1===e.indexOf(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},w],j=S.length,D=new Set([w.type,E.type]),F=[];function _(...e){F.push(...e)}function B(e,t){for(let r=0,n=F.length;r<n;r+=1){let n=F[r];if(n.condition(e,t))return new n(e,t)}return new M(e,t)}let R="$and",O="$path",I=e=>!!(e[R]||e.$or),L=e=>({[R]:Object.keys(e).map(t=>({[t]:e[t]}))});function N(e,r,{auto:i=!0}={}){let o=e=>{if(n(e)){let t={keyId:null,pattern:e};return i&&(t.searcher=B(e,r)),t}let u=Object.keys(e),c=!!e[O];if(!c&&u.length>1&&!I(e))return o(L(e));if(!t(e)&&s(e)&&!I(e)){let t=c?e[O]:u[0],s=c?e.$val:e[t];if(!n(s))throw Error(`Invalid value for key ${t}`);let o={keyId:f(t),pattern:s};return i&&(o.searcher=B(s,r)),o}let a={children:[],operator:u[0]};return u.forEach(r=>{let n=e[r];t(n)&&n.forEach(e=>{a.children.push(o(e))})}),a};return I(e)||(e=L(e)),o(e)}function $(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){let r=1;return e.forEach(({key:e,norm:n,score:i})=>{let s=e?e.weight:null;r*=Math.pow(0===i&&s?Number.EPSILON:i,(s||1)*(t?1:n))}),r}class P{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let r=e-1>>1;if(t[e].score<=t[r].score)break;let n=t[e];t[e]=t[r],t[r]=n,e=r}}_sinkDown(e){let t=this.heap,r=t.length,n=e;do{let i=2*(e=n)+1,s=2*e+2;if(i<r&&t[i].score>t[n].score&&(n=i),s<r&&t[s].score>t[n].score&&(n=s),n!==e){let r=t[e];t[e]=t[n],t[n]=r}}while(n!==e)}}function z(e,t){let r=e.matches;t.matches=[],o(r)&&r.forEach(e=>{if(!o(e.indices)||!e.indices.length)return;let{indices:r,value:n}=e,i={indices:r,value:n};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function T(e,t){t.score=e.score}let U=/\b\w+\b/g;function V({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize:r=>(e||(r=r.toLowerCase()),t&&(r=A(r)),r.match(U)||[])}}function W(e,t){for(let[r,n]of e.terms){let i=n.filter(e=>e.docIdx!==t),s=n.length-i.length;s>0&&(e.fieldCount-=s,e.df.set(r,(e.df.get(r)||0)-s),0===i.length?(e.terms.delete(r),e.df.delete(r)):e.terms.set(r,i))}}class q{constructor(e,t,r){this.options={...g,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new l(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,r),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=B(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof m))throw Error("Incorrect 'index' type");if(this._myIndex=t||y(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=V({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=function(e,t,r){let n=new Map,i=new Map,s=0;function o(e,t,o,u){let c=r.tokenize(e);if(!c.length)return;s++;let a=new Map;for(let e of c)a.set(e,(a.get(e)||0)+1);for(let[e,r]of a){let s={docIdx:t,keyIdx:o,subIdx:u,tf:r},c=n.get(e);c||(c=[],n.set(e,c)),c.push(s),i.set(e,(i.get(e)||0)+1)}}for(let r of e){let{i:e,v:n,$:i}=r;if(void 0!==n){o(n,e,-1,-1);continue}if(i)for(let r=0;r<t;r++){let t=i[r];if(t)if(Array.isArray(t))for(let n of t)o(n.v,e,r,n.i??-1);else o(t.v,e,r,-1)}}return{terms:n,fieldCount:s,df:i}}(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(o(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=V({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});!function(e,t,r,n){let{i:i,v:s,$:o}=t;function u(t,r,s){let o=n.tokenize(t);if(!o.length)return;e.fieldCount++;let u=new Map;for(let e of o)u.set(e,(u.get(e)||0)+1);for(let[t,n]of u){let o={docIdx:i,keyIdx:r,subIdx:s,tf:n},u=e.terms.get(t);u||(u=[],e.terms.set(t,u)),u.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(void 0!==s)return u(s,-1,-1);if(o)for(let e=0;e<r;e++){let t=o[e];if(t)if(Array.isArray(t))for(let r of t)u(r.v,e,r.i??-1);else u(t.v,e,-1)}}(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],r=[];for(let n=0,i=this._docs.length;n<i;n+=1)e(this._docs[n],n)&&(t.push(this._docs[n]),r.push(n));if(r.length){if(this._invertedIndex)for(let e of r)W(this._invertedIndex,e);for(let e=r.length-1;e>=0;e-=1)this._docs.splice(r[e],1);this._myIndex.removeAll(r)}return t}removeAt(e){this._invertedIndex&&W(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let r,{limit:s=-1}=t||{},{includeMatches:o,includeScore:u,shouldSort:c,sortFn:a,ignoreFieldNorm:l}=this.options;if(n(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return i(s)&&s>-1&&(e=e.slice(0,s)),e}if(i(s)&&s>0&&n(e)){let t=new P(s);n(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:l}),r=t.extractSorted(a)}else!function(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){e.forEach(e=>{e.score=$(e.matches,{ignoreFieldNorm:t})})}(r=n(e)?n(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),{ignoreFieldNorm:l}),c&&r.sort(a),i(s)&&s>-1&&(r=r.slice(0,s));return function(e,t,{includeMatches:r=g.includeMatches,includeScore:n=g.includeScore}={}){let i=[];return r&&i.push(z),n&&i.push(T),e.map(e=>{let{idx:r}=e,n={item:t[r],refIndex:r};return i.length&&i.forEach(t=>{t(e,n)}),n})}(r,this._docs,{includeMatches:o,includeScore:u})}_searchStringList(e,{heap:t,ignoreFieldNorm:r}={}){let n=this._getSearcher(e),{records:i}=this._myIndex,s=t?null:[];return i.forEach(({v:e,i:i,n:u})=>{if(!o(e))return;let{isMatch:c,score:a,indices:l}=n.searchIn(e);if(c){let n={item:e,idx:i,matches:[{score:a,value:e,norm:u,indices:l}]};t?(n.score=$(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):s.push(n)}}),s}_searchLogical(e){let t=N(e,this.options),r=(e,t,n)=>{if(!("children"in e)){let r,{keyId:i,searcher:s}=e;return(null===i?(r=[],this._myIndex.keys.forEach((e,n)=>{r.push(...this._findMatches({key:e,value:t[n],searcher:s}))})):r=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(t,i),searcher:s}),r&&r.length)?[{idx:n,item:t,matches:r}]:[]}let{children:i,operator:s}=e,o=[];for(let e=0,u=i.length;e<u;e+=1){let u=r(i[e],t,n);if(u.length)o.push(...u);else if(s===R)return[]}return o},n=this._myIndex.records,i=new Map,s=[];return n.forEach(({$:e,i:n})=>{if(o(e)){let o=r(t,e,n);o.length&&(i.has(n)||(i.set(n,{idx:n,item:e,matches:[]}),s.push(i.get(n))),o.forEach(({matches:e})=>{i.get(n).matches.push(...e)}))}}),s}_searchObjectList(e,{heap:t,ignoreFieldNorm:r}={}){let n=this._getSearcher(e),{keys:i,records:s}=this._myIndex,u=t?null:[];return s.forEach(({$:e,i:s})=>{if(!o(e))return;let c=[],a=!1,l=!1;if(i.forEach((t,r)=>{let i=this._findMatches({key:t,value:e[r],searcher:n});i.length?(c.push(...i),i[0].hasInverse&&(l=!0)):a=!0}),(!l||!a)&&c.length){let n={idx:s,item:e,matches:c};t?(n.score=$(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):u.push(n)}}),u}_findMatches({key:e,value:r,searcher:n}){if(!o(r))return[];let i=[];if(t(r))r.forEach(({v:t,i:r,n:s})=>{if(!o(t))return;let{isMatch:u,score:c,indices:a,hasInverse:l}=n.searchIn(t);u&&i.push({score:c,key:e,value:t,idx:r,norm:s,indices:a,hasInverse:l})});else{let{v:t,n:s}=r,{isMatch:o,score:u,indices:c,hasInverse:a}=n.searchIn(t);o&&i.push({score:u,key:e,value:t,norm:s,indices:c,hasInverse:a})}return i}}q.version="7.3.0",q.createIndex=y,q.parseIndex=function(e,{getFn:t=g.getFn,fieldNormWeight:r=g.fieldNormWeight}={}){let{keys:n,records:i}=e,s=new m({getFn:t,fieldNormWeight:r});return s.setKeys(n),s.setIndexRecords(i),s},q.config=g,q.match=function(e,t,r){return B(e,{...g,...r}).searchIn(t)},q.parseQuery=N,_(class{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:n=g.includeMatches,minMatchCharLength:i=g.minMatchCharLength,ignoreLocation:s=g.ignoreLocation,findAllMatches:o=g.findAllMatches,location:u=g.location,threshold:c=g.threshold,distance:a=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:i,findAllMatches:o,ignoreLocation:s,location:u,threshold:c,distance:a},e=t?e:e.toLowerCase(),e=r?A(e):e,this.pattern=e,this.query=function(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(e=>{let r=(function(e){let t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&" "===e[n];)n++;if(n>=r)break;let i=n;for(;i<r&&" "!==e[i]&&'"'!==e[i];)i++;if(i<r&&'"'===e[i]){for(i++;i<r;){if('"'===e[i]){let t=i+1;if(t>=r||" "===e[t]){i++;break}if("$"===e[t]&&(t+1>=r||" "===e[t+1])){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<r&&" "!==e[i];)i++;t.push(e.substring(n,i)),n=i}}return t})(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),n=[];for(let e=0,i=r.length;e<i;e+=1){let i=r[e],s=!1,o=-1;for(;!s&&++o<j;){let e=S[o],r=e.isMultiMatch(i);r&&(n.push(new e(r,t)),s=!0)}if(!s)for(o=-1;++o<j;){let e=S[o],r=e.isSingleMatch(i);if(r){n.push(new e(r,t));break}}}return n})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?A(e):e;let s=0,o=[],u=0,c=!1;for(let n=0,i=t.length;n<i;n+=1){let i=t[n];o.length=0,s=0,c=!1;for(let t=0,n=i.length;t<n;t+=1){let n=i[t],{isMatch:a,indices:l,score:d}=n.search(e);if(a){s+=1,u+=d;let e=n.constructor.type;e.startsWith("inverse")&&(c=!0),r&&(D.has(e)?o.push(...l):o.push(l))}else{u=0,s=0,o.length=0,c=!1;break}}if(s){let e={isMatch:!0,score:u/s};return c&&(e.hasInverse=!0),r&&(e.indices=v(o)),e}}return{isMatch:!1,score:1}}}),_(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=V({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});const r=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;for(const e of(this.termSearchers=[],this.idfWeights=[],r)){this.termSearchers.push(new M(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=n.get(e)||0,s=Math.log(1+(i-r+.5)/(r+.5));this.idfWeights.push(s)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],r=0,n=0,i=0;for(let s=0;s<this.termSearchers.length;s++){let o=this.termSearchers[s].searchIn(e),u=this.idfWeights[s];n+=u,o.isMatch&&(i++,r+=u*(1-o.score),o.indices&&t.push(...o.indices))}if(0===i)return{isMatch:!1,score:1};let s={isMatch:!0,score:Math.max(.001,n>0?1-r/n:0)};return this.options.includeMatches&&t.length&&(s.indices=v(t)),s}}),q.use=function(...e){e.forEach(e=>_(e))},e.s(["default",0,q])},922088,e=>{e.v(t=>Promise.all(["static/chunks/07f592yv~pptf.js"].map(t=>e.l(t))).then(()=>t(69466)))},84973,e=>{e.v(t=>Promise.all(["static/chunks/06.0rr3vc.77j.js"].map(t=>e.l(t))).then(()=>t(609403)))},574372,e=>{e.v(t=>Promise.all(["static/chunks/167~e_c5qi8o2.js"].map(t=>e.l(t))).then(()=>t(318135)))},732137,e=>{e.v(t=>Promise.all(["static/chunks/031br6.h-zycv.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(461834)))}]);