tower-studio 0.2.21 → 0.2.23

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 (212) 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 +1 -1
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +25 -25
  13. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +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/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  32. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +55 -55
  33. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
  36. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +25 -25
  37. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -1
  40. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +25 -25
  41. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
  44. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +106 -82
  45. package/.next/standalone/.next/server/app/settings/page.js +2 -2
  46. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
  49. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +86 -86
  50. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
  53. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +80 -80
  54. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
  57. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +63 -63
  58. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
  61. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +59 -59
  62. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
  65. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +25 -25
  66. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +1 -1
  69. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +62 -62
  70. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +2 -2
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +68 -68
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
  77. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +45 -45
  78. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
  81. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +2 -2
  82. package/.next/standalone/.next/server/chunks/[root-of-the-server]__03j20vp._.js +2 -2
  83. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05se6yk._.js +2 -2
  84. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05~g1fm._.js +1 -1
  85. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06m1r8x._.js +2 -2
  86. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_6swdz._.js +1 -1
  87. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hc9vir._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o3iihg._.js +1 -1
  89. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0otyifi._.js +1 -1
  90. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q.piu~._.js +2 -2
  91. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qdvear._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0sy6lau._.js +1 -1
  93. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0umocfj._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wuzc5o._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xot7fu._.js +1 -1
  96. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z-k6vg._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
  98. package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  100. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0hy3~f.._.js → [root-of-the-server]__0-o.l41._.js} +2 -2
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02-6df-._.js +3 -3
  102. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0th0_fo._.js → [root-of-the-server]__03e009u._.js} +4 -4
  103. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e_-mj-._.js +3 -3
  104. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fzkdjl._.js +3 -3
  105. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jti4~k._.js +3 -0
  106. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pu-v0l._.js +3 -3
  108. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0q-abig._.js → [root-of-the-server]__0s-a4ku._.js} +2 -2
  109. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ty1ao1._.js +1 -1
  110. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0um1ugs._.js +3 -3
  111. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10ol5vl._.js → [root-of-the-server]__12p2zz2._.js} +1 -1
  113. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__134_xv.._.js +1 -1
  114. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13vgkq5._.js +3 -3
  115. package/.next/standalone/.next/server/chunks/ssr/_0-9.ea2._.js +3 -0
  116. package/.next/standalone/.next/server/chunks/ssr/_012.igw._.js +3 -0
  117. package/.next/standalone/.next/server/chunks/ssr/_0385-.g._.js +4 -0
  118. package/.next/standalone/.next/server/chunks/ssr/_04y89b3._.js +3 -0
  119. package/.next/standalone/.next/server/chunks/ssr/_04yogxq._.js +7 -0
  120. package/.next/standalone/.next/server/chunks/ssr/{_0rqf5w7._.js → _05xdaz3._.js} +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/{_0unw1fq._.js → _070t_mh._.js} +3 -3
  122. package/.next/standalone/.next/server/chunks/ssr/_08z-g~5._.js +3 -3
  123. package/.next/standalone/.next/server/chunks/ssr/_0_vjay8._.js +3 -3
  124. package/.next/standalone/.next/server/chunks/ssr/_0bk06da._.js +3 -0
  125. package/.next/standalone/.next/server/chunks/ssr/_0cc0gt8._.js +7 -0
  126. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/{_0aw2qq6._.js → _0hzckhd._.js} +2 -2
  128. package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
  129. package/.next/standalone/.next/server/chunks/ssr/_0m.4akk._.js +3 -0
  130. package/.next/standalone/.next/server/chunks/ssr/_0oq26rv._.js +3 -0
  131. package/.next/standalone/.next/server/chunks/ssr/_0r6gweb._.js +3 -3
  132. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  133. package/.next/standalone/.next/server/chunks/ssr/_0rt8jf_._.js +3 -3
  134. package/.next/standalone/.next/server/chunks/ssr/_0ueyys5._.js +1 -1
  135. package/.next/standalone/.next/server/chunks/ssr/_0uuzh5m._.js +3 -3
  136. package/.next/standalone/.next/server/chunks/ssr/_0z-b00b._.js +7 -0
  137. package/.next/standalone/.next/server/chunks/ssr/_0~aon4t._.js +3 -3
  138. package/.next/standalone/.next/server/chunks/ssr/{_09j4imi._.js → _0~v4z8z._.js} +2 -2
  139. package/.next/standalone/.next/server/chunks/ssr/_10-.n35._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  149. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  150. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  151. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0153vha._.js → src_lib_0.aklj3._.js} +1 -1
  152. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  153. package/.next/standalone/.next/server/pages/500.html +1 -1
  154. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  155. package/.next/standalone/.next/server/server-reference-manifest.json +269 -245
  156. package/.next/standalone/.next/static/chunks/{0ol16355~utic.js → 0-.9k92iyul5o.js} +2 -2
  157. package/.next/standalone/.next/static/chunks/0.qj9vorfgtnt.js +1 -0
  158. package/.next/standalone/.next/static/chunks/00-6_m40h14vl.js +1 -0
  159. package/.next/standalone/.next/static/chunks/02.ihz-~spbi-.js +1 -0
  160. package/.next/standalone/.next/static/chunks/{0f1gk0.5slqqh.js → 04axhlp_leiii.js} +1 -1
  161. package/.next/standalone/.next/static/chunks/{0o8jf4a30e_ri.js → 05a6uzgclxdsk.js} +2 -2
  162. package/.next/standalone/.next/static/chunks/{01tnwkggn5.s-.js → 099eecj285cbx.js} +1 -1
  163. package/.next/standalone/.next/static/chunks/0c~0amyhws3l0.js +1 -0
  164. package/.next/standalone/.next/static/chunks/{05.wfh773dxo9.js → 0e8r37m0q.z0p.js} +1 -1
  165. package/.next/standalone/.next/static/chunks/0ik7-_3wrtspq.js +1 -0
  166. package/.next/standalone/.next/static/chunks/0ima0i0p489ty.js +1 -0
  167. package/.next/standalone/.next/static/chunks/{0rwca.wrfl3b9.js → 0p9zhbwmnn0j4.js} +1 -1
  168. package/.next/standalone/.next/static/chunks/{0pg_rf2cch5pv.js → 0rec91xfsdv8r.js} +1 -1
  169. package/.next/standalone/.next/static/chunks/0so-w5.m3jaxi.js +1 -0
  170. package/.next/standalone/.next/static/chunks/0x3tiuoe.l18z.js +1 -0
  171. package/.next/standalone/.next/static/chunks/{0j16~sj50uq_m.js → 0zfszxiw4cx9b.js} +1 -1
  172. package/.next/standalone/.next/static/chunks/0ztty8z0obk5f.js +1 -0
  173. package/.next/standalone/.next/static/chunks/1007_ur3fj.~m.js +1 -0
  174. package/.next/standalone/.next/static/chunks/{0aq7ksckxr-8-.js → 10r4y1zzk24jy.js} +2 -2
  175. package/.next/standalone/.next/static/chunks/10vl5vq1_rh1..js +1 -0
  176. package/.next/standalone/.next/static/chunks/120x-nmim1wfz.js +1 -0
  177. package/.next/standalone/.next/static/chunks/{0ip_37zz4f080.js → 12iivlft6u_tt.js} +1 -1
  178. package/.next/standalone/.next/static/chunks/134onqxk2foh5.js +5 -0
  179. package/.next/standalone/.next/static/chunks/{00p3.tda-56.l.js → 16r-tz37aqyoa.js} +1 -1
  180. package/.next/standalone/.next/static/chunks/{0srx~7bncp64q.js → 16ukg_cswejw4.js} +1 -1
  181. package/.next/standalone/.next/static/chunks/{0vyvdsh1mkl5d.js → 17n~0msyl8bur.js} +1 -1
  182. package/.next/standalone/package.json +1 -1
  183. package/dist/mcp-server.cjs +19 -5
  184. package/package.json +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0q~lxnz._.js +0 -3
  186. package/.next/standalone/.next/server/chunks/ssr/_00jadm8._.js +0 -3
  187. package/.next/standalone/.next/server/chunks/ssr/_03.a~r1._.js +0 -3
  188. package/.next/standalone/.next/server/chunks/ssr/_053zyvm._.js +0 -3
  189. package/.next/standalone/.next/server/chunks/ssr/_08x3jaa._.js +0 -3
  190. package/.next/standalone/.next/server/chunks/ssr/_09r0_z9._.js +0 -3
  191. package/.next/standalone/.next/server/chunks/ssr/_0a554d8._.js +0 -3
  192. package/.next/standalone/.next/server/chunks/ssr/_0bmywa6._.js +0 -3
  193. package/.next/standalone/.next/server/chunks/ssr/_0ghovf3._.js +0 -4
  194. package/.next/standalone/.next/server/chunks/ssr/_0jyj~t3._.js +0 -7
  195. package/.next/standalone/.next/server/chunks/ssr/_0yakvlq._.js +0 -7
  196. package/.next/standalone/.next/server/chunks/ssr/_13r9dxk._.js +0 -7
  197. package/.next/standalone/.next/static/chunks/00fv~h4rni5hv.js +0 -1
  198. package/.next/standalone/.next/static/chunks/02bobmiee9ss8.js +0 -1
  199. package/.next/standalone/.next/static/chunks/039ntokp82-em.js +0 -1
  200. package/.next/standalone/.next/static/chunks/04yrp-8ps3q_-.js +0 -1
  201. package/.next/standalone/.next/static/chunks/06~1n6of8ll__.js +0 -5
  202. package/.next/standalone/.next/static/chunks/08rokhw7bg_zn.js +0 -1
  203. package/.next/standalone/.next/static/chunks/0_n2l3jehwcsq.js +0 -1
  204. package/.next/standalone/.next/static/chunks/0d4~4k4hv01ah.js +0 -1
  205. package/.next/standalone/.next/static/chunks/0pwe0m3i1rro1.js +0 -1
  206. package/.next/standalone/.next/static/chunks/10h~50kdsu5fx.js +0 -1
  207. package/.next/standalone/.next/static/chunks/15esfko8asvh7.js +0 -1
  208. package/.next/standalone/.next/static/chunks/16sn2ij01qrfz.js +0 -1
  209. package/.next/standalone/.next/static/chunks/17oxpxjm7_smn.js +0 -1
  210. /package/.next/standalone/.next/static/{zosKR5i2aA392qu0Ka1j9 → l8InE32VLIGdUBVP3BJKt}/_buildManifest.js +0 -0
  211. /package/.next/standalone/.next/static/{zosKR5i2aA392qu0Ka1j9 → l8InE32VLIGdUBVP3BJKt}/_clientMiddlewareManifest.js +0 -0
  212. /package/.next/standalone/.next/static/{zosKR5i2aA392qu0Ka1j9 → l8InE32VLIGdUBVP3BJKt}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,113399,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),n=e.i(821957),i=e.i(533499),r=e.i(519455),l=e.i(793479),o=e.i(624687),c=e.i(110204),d=e.i(487486),m=e.i(699375),u=e.i(776639),x=e.i(975157),g=e.i(386343),h=e.i(572989);let p=(0,h.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var f=e.i(645378);let b=(0,h.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var j=e.i(125177),v=e.i(256753),N=e.i(245697),y=e.i(657153),k=e.i(232545);let w=(0,h.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var C=e.i(998626);let S=(0,h.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),T=(0,h.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var M=e.i(400355),D=e.i(301348),B=e.i(181209),R=e.i(453889),P=e.i(237179),L=e.i(490019),U=e.i(993830),I=e.i(514798);let F=(0,I.createServerReference)("000b67a7a3b07cf1050d165779ca9f2cee289a0277",I.callServer,void 0,I.findSourceMapURL,"getAvailableTerminalApps"),E=(0,I.createServerReference)("0013bc07f622606e6f0e24fde2450b484050aba2ef",I.callServer,void 0,I.findSourceMapURL,"getAvailableEditors");var H=e.i(610328);let V=(0,I.createServerReference)("409b3ffe750152a76a67ada9291a03ba4a69c9d1d3",I.callServer,void 0,I.findSourceMapURL,"createPrompt"),z=(0,I.createServerReference)("6060a95370405c2d3433a75d5fbd42035d76e6e277",I.callServer,void 0,I.findSourceMapURL,"updatePrompt"),$=(0,I.createServerReference)("4023fdffccdaae05333a85f7e8e439cead864b1b96",I.callServer,void 0,I.findSourceMapURL,"deletePrompt"),A=(0,I.createServerReference)("60e4d6d82ba2ccd6c54f5ac357adfb3429f8c57d5b",I.callServer,void 0,I.findSourceMapURL,"setDefaultPrompt"),K=(0,I.createServerReference)("0055f366f2ffde2e773de0795592e6fb29f657e2d2",I.callServer,void 0,I.findSourceMapURL,"getAvailableProviders");var O=e.i(746798),W=e.i(224277);let q=(0,h.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);var G=e.i(631675);let X=(0,h.default)("folder-up",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);var Y=e.i(922541),Z=e.i(759686),_=e.i(487278),J=e.i(360112);let Q=(0,I.createServerReference)("40c1ffdcb31a2c92f604b028a1002c5224a6fddfbe",I.callServer,void 0,I.findSourceMapURL,"createBackup"),ee=(0,I.createServerReference)("00af1f5607f165b2b15077d86e061044261548c543",I.callServer,void 0,I.findSourceMapURL,"listBackupFiles"),et=(0,I.createServerReference)("40b44a2bf3945360520314be9a704f8768e73ccf8f",I.callServer,void 0,I.findSourceMapURL,"deleteBackupFile"),es=(0,I.createServerReference)("40b39d1c96702527cbaa7760fda2e0cb8a68b1df8d",I.callServer,void 0,I.findSourceMapURL,"restoreBackup"),ea=(0,I.createServerReference)("40f7d741d5c2ad156599d57b832d1a115423e39b14",I.callServer,void 0,I.findSourceMapURL,"resetSystem"),en=(0,I.createServerReference)("00b1aae97c2a9cc116992e48ef2c84f768f5712e06",I.callServer,void 0,I.findSourceMapURL,"getBackupDir"),ei=(0,I.createServerReference)("40e73b24f62c7383da5660a0091ac63a05069d3c2d",I.callServer,void 0,I.findSourceMapURL,"setBackupDir"),er=(0,I.createServerReference)("003ad9f7639d67568152191e2df3ea1d10fde04a06",I.callServer,void 0,I.findSourceMapURL,"getStorageLocation"),el=(0,I.createServerReference)("40aff0e9123e1f05681f1eb41aa1c0744c3da02a95",I.callServer,void 0,I.findSourceMapURL,"setStorageLocation");function eo(){let{t:e,locale:n}=(0,i.useI18n)(),o=(0,a.useRouter)(),[c,d]=(0,s.useState)([]),[m,x]=(0,s.useState)(""),[g,h]=(0,s.useState)(!1),[p,f]=(0,s.useState)(null),[b,j]=(0,s.useState)(!1),[v,N]=(0,s.useState)(!0),[y,k]=(0,s.useState)(null),[w,S]=(0,s.useState)(!1),[T,D]=(0,s.useState)(""),B=(0,s.useRef)(null),[R,P]=(0,s.useState)(!1),[L,U]=(0,s.useState)(""),I=(0,s.useCallback)(async()=>{N(!0);try{let[e,t,s]=await Promise.all([ee(),en(),er()]);d(e),x(t),f(s)}finally{N(!1)}},[]);(0,s.useEffect)(()=>{I()},[I]);let F=async()=>{let t=T.trim()||void 0;S(!1),D(""),k("create");try{await Q(t),J.toast.success(e("settings.backup.createSuccess")),await I()}catch{J.toast.error(e("settings.backup.createError"))}finally{k(null)}},E=async t=>{if(confirm(e("settings.backup.restoreConfirm"))){k("restore");try{await es(t),J.toast.success(e("settings.backup.restoreSuccess"),{action:{label:e("settings.backup.reload"),onClick:()=>window.location.reload()},duration:15e3}),await I()}catch{J.toast.error(e("settings.backup.restoreError"))}finally{k(null)}}},H=async t=>{if(confirm(e("settings.backup.deleteConfirm")))try{await et(t),J.toast.success(e("settings.backup.deleteSuccess")),d(e=>e.filter(e=>e.filename!==t))}catch{J.toast.error(e("settings.backup.deleteError"))}},V=async t=>{h(!1);try{await ei(t),x(t),J.toast.success(e("settings.backup.dirSaved")),await I()}catch{J.toast.error(e("settings.backup.dirError"))}},z=async t=>{k("storage");try{let s=await el({newPath:t});if(!s.ok)return void J.toast.error(s.error||e("settings.storage.moveError"));J.toast.success(e("settings.storage.moveSuccess",{count:String(s.moved??0)})),await I()}catch(t){J.toast.error(t instanceof Error?t.message:e("settings.storage.moveError"))}finally{k(null)}},$=async t=>{j(!1),confirm(e("settings.storage.moveConfirm"))&&await z(t)},A=async()=>{!p||p.isDefault||confirm(e("settings.storage.resetConfirm"))&&await z(p.default)},K=async t=>{let s=t.target.files?.[0];if(s){t.target.value="",k("import");try{let t=new FormData;t.append("file",s);let a=await fetch("/api/internal/backup/import",{method:"POST",body:t});if(!a.ok){let t=await a.json();J.toast.error("Invalid backup archive"===t.error?e("settings.backup.importInvalid"):(t.error,e("settings.backup.importError")));return}J.toast.success(e("settings.backup.importSuccess")),await I()}catch{J.toast.error(e("settings.backup.importError"))}finally{k(null)}}},eo=async()=>{if("RESET"===L){P(!1),U(""),k("reset");try{await ea("RESET"),J.toast.success(e("settings.backup.resetSuccess")),o.push("/")}catch{J.toast.error(e("settings.backup.resetError"))}finally{k(null)}}},ec=null!==y;return(0,t.jsxs)("div",{className:"space-y-6",children:[("restore"===y||"reset"===y)&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,t.jsx)(M.Loader2,{className:"h-8 w-8 animate-spin text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"restore"===y?e("settings.backup.restoring"):e("settings.backup.resetting")})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:e("settings.storage.sectionTitle")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e("settings.storage.hint")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{children:[e("settings.storage.current"),":"]}),(0,t.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:p?.current??"…"}),p?.isDefault&&(0,t.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:e("settings.storage.defaultBadge")}),(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>j(!0),disabled:"storage"===y,className:"text-xs text-muted-foreground",children:"storage"===y?(0,t.jsx)(M.Loader2,{className:"h-3 w-3 animate-spin"}):e("settings.storage.change")}),p&&!p.isDefault&&(0,t.jsx)(r.Button,{variant:"ghost",onClick:A,disabled:"storage"===y,className:"text-xs text-muted-foreground",children:e("settings.storage.reset")})]}),(0,t.jsx)(W.FolderBrowserDialog,{open:b,onOpenChange:j,onSelect:$})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:e("settings.backup.sectionTitle")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{children:[e("settings.backup.dir"),":"]}),(0,t.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:m}),(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>h(!0),className:"text-xs text-muted-foreground",children:e("settings.backup.dirChange")})]}),(0,t.jsx)(W.FolderBrowserDialog,{open:g,onOpenChange:h,onSelect:V})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.Button,{onClick:()=>{D(""),S(!0)},disabled:ec,className:"gap-2",children:"create"===y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-4 w-4 animate-spin"})," ",e("settings.backup.creating")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{className:"h-4 w-4"})," ",e("settings.backup.create")]})}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsxs)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",disabled:ec,onClick:()=>B.current?.click(),className:"gap-2"}),children:[(0,t.jsx)(X,{className:"h-4 w-4"}),e("settings.backup.import")]}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.importHint")})]}),(0,t.jsx)("input",{ref:B,type:"file",accept:".tar.gz,.gz",className:"hidden",onChange:K})]}),(0,t.jsx)(u.Dialog,{open:w,onOpenChange:S,children:(0,t.jsxs)(u.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(u.DialogHeader,{children:(0,t.jsx)(u.DialogTitle,{children:e("settings.backup.create")})}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.createLabel")}),(0,t.jsx)(l.Input,{value:T,onChange:e=>D(e.target.value),onKeyDown:e=>"Enter"===e.key&&F(),placeholder:e("settings.backup.createLabelPlaceholder"),className:"mt-1.5",autoFocus:!0})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>S(!1),children:e("common.cancel")}),(0,t.jsx)(r.Button,{onClick:F,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:e("settings.backup.create")})]})]})}),v?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(M.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):0===c.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[(0,t.jsx)(_.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("settings.backup.empty")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e("settings.backup.emptyDesc")})]}):(0,t.jsx)("div",{className:"space-y-3",children:c.map(s=>{var a,i;return(0,t.jsx)("div",{className:"group rounded-lg border border-border bg-card p-4 transition-colors hover:bg-accent/30",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s.label?(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:s.label}):(0,t.jsx)("span",{className:"truncate text-sm font-medium font-mono text-foreground",children:s.filename}),s.autoBackup&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-500 ring-1 ring-amber-500/20",children:e("settings.backup.autoLabel")})]}),s.label&&(0,t.jsx)("div",{className:"mt-0.5 text-[11px] font-mono text-muted-foreground/60",children:s.filename}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[(a=s.size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`," · ",(i=s.createdAt,new Date(i).toLocaleString("zh"===n?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}))]}),s.preview.length>0&&(0,t.jsxs)("div",{className:"mt-1.5 text-xs text-muted-foreground",children:[s.preview.map((e,s)=>(0,t.jsxs)("span",{children:[s>0&&" ",e.workspace,"(",e.projects.join(", "),")"]},s)),s.stats.workspaces>s.preview.length&&(0,t.jsxs)("span",{children:[" ",e("settings.backup.workspaces",{count:String(s.stats.workspaces)})]})]}),(0,t.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:[e("settings.backup.projects",{count:String(s.stats.projects)})," · ",e("settings.backup.tasks",{count:String(s.stats.tasks)})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",onClick:()=>E(s.filename),disabled:ec,className:"text-muted-foreground hover:text-foreground"}),children:(0,t.jsx)(G.Upload,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.restore")})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",onClick:()=>H(s.filename),disabled:ec,className:"text-muted-foreground hover:text-rose-400"}),children:(0,t.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.delete")})]})]})]})},s.filename)})}),(0,t.jsxs)("div",{className:"border-t border-border pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-rose-400",children:[(0,t.jsx)(Z.AlertTriangle,{className:"h-4 w-4"}),e("settings.backup.dangerZone")]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground leading-relaxed",children:e("settings.backup.resetDesc")}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>{U(""),P(!0)},disabled:ec,className:"mt-3 border-rose-500/30 text-rose-400 hover:bg-rose-500/10 hover:text-rose-400",children:[(0,t.jsx)(Y.RotateCcw,{className:"mr-2 h-3.5 w-3.5"}),e("settings.backup.reset")]})]}),(0,t.jsx)(u.Dialog,{open:R,onOpenChange:P,children:(0,t.jsxs)(u.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:e("settings.backup.resetConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:e("settings.backup.resetConfirmDesc")})]}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.resetConfirmInput")}),(0,t.jsx)(l.Input,{value:L,onChange:e=>U(e.target.value),placeholder:"RESET",className:"mt-1.5 font-mono"})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>P(!1),children:e("common.cancel")}),(0,t.jsx)(r.Button,{disabled:"RESET"!==L,onClick:eo,className:"border-rose-500/30 bg-rose-500/10 text-rose-400 hover:bg-rose-500/20",children:e("settings.backup.reset")})]})]})})]})}var ec=e.i(887911),ed=e.i(597746);let em=(0,h.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var eu=e.i(875840),ex=e.i(475958),eg=e.i(194358),eh=e.i(337822),ep=e.i(991838);let ef=[{os:"macOS",cmd:"brew install ripgrep"},{os:"Windows",cmd:"winget install BurntSushi.ripgrep"},{os:"Linux",cmd:"sudo apt install ripgrep"}];function eb({cmd:e}){let{t:a}=(0,i.useI18n)(),[n,l]=(0,s.useState)(!1),o=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}l(!0),J.toast.success(a("common.copied")),setTimeout(()=>l(!1),1500)}catch{J.toast.error(a("common.copyFailed"))}};return(0,t.jsxs)("div",{className:"flex items-start gap-1 rounded-md bg-background/60 pl-2 pr-1 py-1 ring-1 ring-border/60",children:[(0,t.jsx)("code",{className:"min-w-0 flex-1 break-all font-mono text-[11px] leading-relaxed",children:e}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":a("common.copy"),onClick:o,children:n?(0,t.jsx)(ed.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(eu.Copy,{className:"h-3 w-3"})})]})}function ej({extension:e}){let{t:a}=(0,i.useI18n)(),{status:n,loading:l,isInstalling:o,install:c,uninstall:d,refresh:m}=(0,ep.useExtension)(e.id),[u,x]=(0,s.useState)(!1),g=e.icon,h=n.installed,p=async()=>{let t=await c();t.success?J.toast.success(a("settings.extensions.installSuccess").replace("{name}",e.name)):J.toast.error(a("settings.extensions.installFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},f=async()=>{let t=await d();t.success?J.toast.success(a("settings.extensions.uninstallSuccess").replace("{name}",e.name)):J.toast.error(a("settings.extensions.uninstallFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},b=async()=>{x(!0);try{await m()}finally{x(!1)}},j=()=>{window.open(e.homepageUrl,"_blank","noopener,noreferrer")};return(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-background ring-1 ring-border",children:(0,t.jsx)(g,{className:"h-5 w-5 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description})]})]}),(0,t.jsxs)("span",{className:"shrink-0 rounded-md bg-background px-2 py-0.5 text-xs text-muted-foreground ring-1 ring-border",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("div",{className:"mt-4 flex items-center gap-2 text-xs",children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("common.loading")})]}):h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CheckCircle2,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,t.jsxs)("span",{className:"text-foreground",children:[a("settings.extensions.installed"),n.version?` v${n.version}`:""]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(em,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("settings.extensions.notInstalledShort")})]})}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"default",onClick:p,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.reinstalling")]}):a("settings.extensions.reinstall")}),(0,t.jsx)(r.Button,{variant:"outline",onClick:f,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.uninstalling")]}):a("settings.extensions.uninstall")})]}):e.manualInstall?(0,t.jsxs)(eh.Popover,{children:[(0,t.jsx)(eh.PopoverTrigger,{render:e=>(0,t.jsxs)(r.Button,{variant:"default",...e,children:[(0,t.jsx)(q,{className:"h-3.5 w-3.5"}),a("settings.extensions.installViaHomepage")]})}),(0,t.jsxs)(eh.PopoverContent,{align:"start",className:"w-80 max-w-[90vw] gap-2 text-xs leading-relaxed",children:[(0,t.jsx)("p",{children:a("settings.extensions.manualInstallHintIntro")}),(0,t.jsx)("div",{className:"space-y-2",children:ef.map(({os:e,cmd:s})=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] font-medium text-muted-foreground",children:e}),(0,t.jsx)(eb,{cmd:s})]},e))}),(0,t.jsx)("p",{className:"text-muted-foreground",children:a("settings.extensions.manualInstallHintAfter")}),(0,t.jsxs)("button",{type:"button",onClick:j,className:"flex items-center gap-1 self-start text-[11px] text-primary underline-offset-2 hover:underline",children:[(0,t.jsx)(ex.ExternalLink,{className:"h-3 w-3"}),a("settings.extensions.visitHomepage")]})]})]}):(0,t.jsx)(r.Button,{variant:"default",onClick:p,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.installing")]}):a("settings.extensions.install")}),(0,t.jsxs)(r.Button,{variant:"ghost",onClick:b,disabled:u,children:[(0,t.jsx)(eg.RefreshCw,{className:`h-3.5 w-3.5 ${u?"animate-spin":""}`}),a("settings.extensions.recheck")]}),(0,t.jsxs)(r.Button,{variant:"ghost",onClick:j,children:[(0,t.jsx)(ex.ExternalLink,{className:"h-3.5 w-3.5"}),a("settings.extensions.visitHomepage")]})]})]})}function ev(){let{t:e}=(0,i.useI18n)(),s=(0,ec.listExtensionMetadata)();return(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("header",{children:[(0,t.jsx)("h2",{className:"text-base font-semibold",children:e("settings.extensions.title")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e("settings.extensions.desc")})]}),(0,t.jsx)("div",{className:"space-y-3",children:s.map(e=>(0,t.jsx)(ej,{extension:e},e.id))})]})}function eN({options:e,value:s,onChange:a}){return(0,t.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a(e.value),className:(0,x.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",s===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}function ey({label:e,description:s,children:a,className:n}){return(0,t.jsxs)("div",{className:(0,x.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",n),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:e}),s&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:s})]}),(0,t.jsx)("div",{className:"shrink-0",children:a})]})}let ek=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:g.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:p,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:f.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:b,accent:"amber"},{id:"extensions",labelKey:"settings.extensions.title",descKey:"settings.extensions.navDesc",icon:N.Package,accent:"indigo"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:j.Bell,accent:"rose"},{id:"backup",labelKey:"settings.backup.title",descKey:"settings.backup.navDesc",icon:v.HardDrive,accent:"cyan"}],ew={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},indigo:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},eC="ai-manager:default-cli-adapter",eS={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function eT(){let e=(0,a.useRouter)(),{t:g}=(0,i.useI18n)(),{theme:h,setTheme:p}=(0,n.useTheme)(),{locale:f,setLocale:b}=(0,i.useI18n)(),[j,v]=(0,s.useState)("general"),N=(0,s.useRef)(null),[I,q]=(0,s.useState)({left:0,width:0}),[G,X]=(0,s.useState)(!1),[Y,Z]=(0,s.useState)("Terminal"),[_,J]=(0,s.useState)([]),[Q,ee]=(0,s.useState)(""),[et,es]=(0,s.useState)([]),[ea,en]=(0,s.useState)([]),[ei,er]=(0,s.useState)("claude"),[el,ec]=(0,s.useState)(null),[ed,em]=(0,s.useState)({}),[eu,ex]=(0,s.useState)([]),[eg,eh]=(0,s.useState)(!1),[ep,ef]=(0,s.useState)(null),[eb,ej]=(0,s.useState)(null),[eT,eM]=(0,s.useState)(""),[eD,eB]=(0,s.useState)(""),[eR,eP]=(0,s.useState)(""),[eL,eU]=(0,s.useState)([]),[eI,eF]=(0,s.useState)(null),[eE,eH]=(0,s.useState)({...eS}),[eV,ez]=(0,s.useState)(!1),[e$,eA]=(0,s.useState)({...eS}),[eK,eO]=(0,s.useState)(!1),[eW,eq]=(0,s.useState)(!1),[eG,eX]=(0,s.useState)(0),[eY,eZ]=(0,s.useState)(null),[e_,eJ]=(0,s.useState)(null),[eQ,e0]=(0,s.useState)({maxUploadMb:50,maxConcurrent:3,maxReadableMb:5,taskDefaultUseWorktree:!0,taskDefaultAutoStart:!1}),[e1,e2]=(0,s.useState)({timeoutSec:30}),[e5,e3]=(0,s.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80,codeTimeoutSec:30}),[e4,e7]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[e6,e8]=(0,s.useState)(null),[e9,te]=(0,s.useState)(!1),[tt,ts]=(0,s.useState)(""),[ta,tn]=(0,s.useState)(!0);(0,s.useEffect)(()=>X(!0),[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("terminal.app","Terminal").then(Z),F().then(J),(0,P.getConfigValue)("editor.command","").then(ee),E().then(es)},[]),(0,s.useEffect)(()=>{if(0===_.length||!Y||_.some(e=>e.value===Y))return;let e=_.find(e=>e.name===Y);e&&(Z(e.value),(0,L.setConfigValue)("terminal.app",e.value))},[_,Y]),(0,s.useEffect)(()=>{if(0===et.length||!Q||et.some(e=>e.command===Q))return;let e=et.find(e=>e.name===Q);e&&(ee(e.command),(0,L.setConfigValue)("editor.command",e.command))},[et,Q]),(0,s.useEffect)(()=>{K().then(en);let e=localStorage.getItem(eC);e&&er(e)},[]),(0,s.useEffect)(()=>{(0,H.getPrompts)().then(ex)},[]);let ti=async()=>{try{let e=await fetch("/api/internal/hooks/install");if(e.ok){let t=await e.json();e8(t)}}catch{}};async function tr(e){if(!el){ec(e),em(t=>{let s={...t};return delete s[e],s});try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})}),s=await t.json();em(t=>({...t,[e]:s}))}catch{em(t=>({...t,[e]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{ec(null)}}}(0,s.useEffect)(()=>{(0,P.getConfigValue)("git.pathMappingRules",[]).then(e=>{let t=new Set,s=!1,a=e.map(e=>{if(!e.id||t.has(e.id)){s=!0;let a={...e,id:crypto.randomUUID()};return t.add(a.id),a}return t.add(e.id),e});eU(a),s&&(0,L.setConfigValue)("git.pathMappingRules",a)}),(0,P.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(e=>{ts(e.join(", "))}),ti(),(0,U.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","system.maxReadableFileBytes","task.defaultUseWorktree","task.defaultAutoStart","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","search.codeTimeoutSec","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(e=>{let t=e["system.maxUploadBytes"]??0x3200000,s=e["system.maxReadableFileBytes"]??5242880;e0({maxUploadMb:Math.round(t/1024/1024),maxConcurrent:e["system.maxConcurrentExecutions"]??3,maxReadableMb:Math.round(s/1024/1024),taskDefaultUseWorktree:"boolean"!=typeof e["task.defaultUseWorktree"]||e["task.defaultUseWorktree"],taskDefaultAutoStart:"boolean"==typeof e["task.defaultAutoStart"]&&e["task.defaultAutoStart"]}),e2({timeoutSec:e["git.timeoutSec"]??30}),e3({resultLimit:e["search.resultLimit"]??20,allModeCap:e["search.allModeCap"]??5,debounceMs:e["search.debounceMs"]??250,snippetLength:e["search.snippetLength"]??80,codeTimeoutSec:e["search.codeTimeoutSec"]??30}),e7({minCols:e["missions.grid.minCols"]??1,maxCols:e["missions.grid.maxCols"]??5,minRows:e["missions.grid.minRows"]??1,maxRows:e["missions.grid.maxRows"]??5})})},[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("notification.enabled",!0).then(tn)},[]);let tl=(0,s.useCallback)(()=>{ef(null),eM(""),eB(""),eP(""),eh(!0)},[]),to=(0,s.useCallback)(e=>{ef(e),eM(e.name),eB(e.description??""),eP(e.content),eh(!0)},[]),tc=(0,s.useCallback)(async()=>{eT.trim()&&eR.trim()&&(ep?await z(ep.id,{name:eT.trim(),description:eD.trim()||void 0,content:eR.trim()}):await V({name:eT.trim(),description:eD.trim()||void 0,content:eR.trim()}),eh(!1),ex(await (0,H.getPrompts)()),e.refresh())},[eT,eD,eR,ep,e]),td=(0,s.useCallback)(async()=>{eb&&(await $(eb),ej(null),ex(await (0,H.getPrompts)()),e.refresh())},[eb,e]),tm=(0,s.useCallback)(async t=>{await A(t),ex(await (0,H.getPrompts)()),e.refresh()},[e]),tu=async()=>{await (0,L.setConfigValue)("system.maxUploadBytes",1024*eQ.maxUploadMb*1024),await (0,L.setConfigValue)("system.maxConcurrentExecutions",eQ.maxConcurrent),await (0,L.setConfigValue)("system.maxReadableFileBytes",1024*eQ.maxReadableMb*1024)},tx=async()=>{await (0,L.setConfigValue)("task.defaultUseWorktree",eQ.taskDefaultUseWorktree),await (0,L.setConfigValue)("task.defaultAutoStart",eQ.taskDefaultAutoStart),await (0,L.setConfigValue)("task.mcpDefaultsConfigured",!0)},tg=async()=>{await (0,L.setConfigValue)("git.timeoutSec",e1.timeoutSec)},th=async()=>{await (0,L.setConfigValue)("search.resultLimit",e5.resultLimit),await (0,L.setConfigValue)("search.allModeCap",e5.allModeCap),await (0,L.setConfigValue)("search.debounceMs",e5.debounceMs),await (0,L.setConfigValue)("search.snippetLength",e5.snippetLength),await (0,L.setConfigValue)("search.codeTimeoutSec",e5.codeTimeoutSec)},tp=async()=>{let e=Math.min(e4.minCols,e4.maxCols),t=Math.max(e4.minCols,e4.maxCols),s=Math.min(e4.minRows,e4.maxRows),a=Math.max(e4.minRows,e4.maxRows);e7({minCols:e,maxCols:t,minRows:s,maxRows:a}),await (0,L.setConfigValue)("missions.grid.minCols",e),await (0,L.setConfigValue)("missions.grid.maxCols",t),await (0,L.setConfigValue)("missions.grid.minRows",s),await (0,L.setConfigValue)("missions.grid.maxRows",a)},tf=async()=>{let e=tt.split(",").map(e=>e.trim()).filter(Boolean);await (0,L.setConfigValue)("hooks.autoUploadTypes",e)},tb=async()=>{if(e6){te(!0);try{let e=e6.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:e}),await ti()}finally{te(!1)}}},tj=async()=>{if(!e$.host.trim()||!e$.localPathTemplate.trim())return;let e=e$.localPathTemplate.trim().replace(/\/+$/,""),t=eK?`${e}/{path}`:e,s=[...eL,{id:crypto.randomUUID(),host:e$.host.trim(),ownerMatch:e$.ownerMatch.trim()||"*",localPathTemplate:t,priority:e$.priority}];await (0,L.setConfigValue)("git.pathMappingRules",s),eU(s),eA({...eS}),eO(!1),ez(!1)},tv=async e=>{if(!eE.host.trim()||!eE.localPathTemplate.trim())return;let t=eE.localPathTemplate.trim().replace(/\/+$/,""),s=eW?`${t}/{path}`:t,a=eL.map(t=>t.id===e?{...t,host:eE.host.trim(),ownerMatch:eE.ownerMatch.trim()||"*",localPathTemplate:s,priority:eE.priority}:t);await (0,L.setConfigValue)("git.pathMappingRules",a),eU(a),eF(null),eq(!1)},tN=async e=>{let t=eL.filter(t=>t.id!==e);await (0,L.setConfigValue)("git.pathMappingRules",t),eU(t),eZ(null)};async function ty(){let e=!ta;tn(e),await (0,L.setConfigValue)("notification.enabled",e)}let tk=(0,s.useCallback)(()=>{e.back()},[e]);(0,s.useEffect)(()=>{let e=N.current;if(!e)return;let t=e.querySelector(`[data-section="${j}"]`);if(!t)return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();q({left:a.left-s.left,width:a.width})},[j]);let tw=ek.find(e=>e.id===j),tC=tw?ew[tw.accent]:ew.blue;return(0,t.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,t.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:g("settings.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:g("settings.configDesc")})]}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:tk,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,t.jsx)(y.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,t.jsxs)("div",{ref:N,className:"relative flex gap-1 overflow-x-auto",children:[ek.map(e=>{let s=e.icon,a=j===e.id,n=ew[e.accent];return(0,t.jsxs)("button",{"data-section":e.id,onClick:()=>v(e.id),className:(0,x.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a?`${n.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:(0,x.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",a?n.bg:"bg-transparent"),children:(0,t.jsx)(s,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("span",{children:g(e.labelKey)})]},e.id)}),(0,t.jsx)("div",{className:(0,x.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",tC.indicator),style:{left:I.left,width:I.width}})]})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[tw&&(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,t.jsx)("div",{className:(0,x.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",tC.bg,tC.text,tC.ring),children:(0,t.jsx)(tw.icon,{className:"h-5 w-5"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:g(tw.labelKey)}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:g(tw.descKey)})]})]}),(0,t.jsx)("div",{className:"mb-6 border-t"}),function(){switch(j){case"general":let e;return e=[{value:"light",label:g("settings.themeLight")},{value:"dark",label:g("settings.themeDark")},{value:"system",label:g("settings.themeSystem")}],(0,t.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,t.jsx)(ey,{label:g("settings.theme"),description:g("settings.themeDesc"),children:G?(0,t.jsx)(eN,{options:e,value:h??"system",onChange:e=>p(e)}):(0,t.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,t.jsx)(ey,{label:g("settings.language"),description:g("settings.languageDesc"),children:(0,t.jsx)(eN,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:f,onChange:e=>b(e)})}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.terminal.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.terminal.desc")})]}),_.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:_.map(e=>{let s=Y===e.value,a=(0,x.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",e.installed?s?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),n=()=>{e.installed&&(Z(e.value),(0,L.setConfigValue)("terminal.app",e.value))};return e.installed?(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name},e.value):(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name})}),(0,t.jsx)(O.TooltipContent,{side:"top",children:g("settings.app.notInstalled")})]},e.value)})})]}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.editor.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.editor.desc")})]}),et.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:et.map(e=>{let s=Q===e.command,a=(0,x.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",e.installed?s?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),n=()=>{e.installed&&(ee(e.command),(0,L.setConfigValue)("editor.command",e.command))};return e.installed?(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name},e.command):(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name})}),(0,t.jsx)(O.TooltipContent,{side:"top",children:g("settings.app.notInstalled")})]},e.command)})})]})]});case"ai-tools":return(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ea.map(e=>{let s=ei===e.name,a=el===e.name,n=ed[e.name];return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"px-5 py-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:e.displayName}),(0,t.jsx)(d.Badge,{variant:"outline",children:g("label.builtin")}),s&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0",children:[(0,t.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),g("settings.prompts.default")]}),n&&(0,t.jsx)(d.Badge,{variant:n.ok?"secondary":"destructive",className:(0,x.cn)("shrink-0",n.ok&&"bg-green-600 text-white hover:bg-green-700"),children:n.ok?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CheckCircle2,{className:"h-3 w-3 mr-1"}),g("settings.aiTools.testPassed")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.XCircle,{className:"h-3 w-3 mr-1"}),g("settings.aiTools.testFailed")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.cli.available&&e.cli.version?`${e.name} \xb7 ${e.cli.version}`:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!s&&(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>{var t;er(t=e.name),localStorage.setItem(eC,t)},children:[(0,t.jsx)(w,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),g("settings.prompts.setDefault")]}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>tr(e.name),disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),g("settings.aiTools.testing")]}):g("settings.aiTools.testConnection")})]})]}),n&&(0,t.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,t.jsx)("div",{className:"space-y-1.5",children:n.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:(0,x.cn)("w-1.5 h-1.5 rounded-full shrink-0",s.passed?"bg-green-500":"bg-red-500")}),(0,t.jsx)("span",{className:(0,x.cn)(s.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:s.message})]},`${e.name}-${s.name}`))})})]})},e.name)})});case"prompts":return G?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(r.Button,{onClick:tl,variant:"default",children:[(0,t.jsx)(k.Plus,{className:"h-4 w-4 mr-2"}),g("settings.prompts.newPrompt")]})}),0===eu.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:g("settings.prompts.empty")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:g("settings.prompts.emptyHint")})]}):(0,t.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:eu.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.name}),e.isDefault&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,t.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),g("settings.prompts.default")]})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tm(e.id),title:g("settings.prompts.setDefault"),children:(0,t.jsx)(w,{className:(0,x.cn)("h-4 w-4",e.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>to(e),title:g("settings.prompts.editPrompt"),children:(0,t.jsx)(S,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>ej(e.id),className:"text-destructive",title:g("settings.prompts.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},e.id))}),(0,t.jsx)(u.Dialog,{open:eg,onOpenChange:eh,children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:ep?g("settings.prompts.editPrompt"):g("settings.prompts.newPrompt")}),(0,t.jsx)(u.DialogDescription,{children:ep?g("settings.prompts.editPrompt"):g("settings.prompts.newPrompt")})]}),(0,t.jsxs)("div",{className:"space-y-4 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-name",children:g("settings.prompts.promptName")}),(0,t.jsx)(l.Input,{id:"prompt-name",value:eT,onChange:e=>eM(e.target.value),placeholder:g("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-description",children:g("settings.prompts.promptDescription")}),(0,t.jsx)(l.Input,{id:"prompt-description",value:eD,onChange:e=>eB(e.target.value),placeholder:g("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-content",children:g("settings.prompts.promptContent")}),(0,t.jsx)(o.Textarea,{id:"prompt-content",value:eR,onChange:e=>eP(e.target.value),placeholder:g("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>eh(!1),children:g("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{onClick:tc,disabled:!eT.trim()||!eR.trim(),children:g("settings.prompts.save")})]})]})}),(0,t.jsx)(u.Dialog,{open:!!eb,onOpenChange:e=>!e&&ej(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:g("settings.prompts.deleteConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:g("settings.prompts.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>ej(null),children:g("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:td,children:g("settings.prompts.delete")})]})]})})]}):(0,t.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let s,a,n;return(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.git.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.git.desc")})]}),(0,t.jsxs)(r.Button,{onClick:()=>{eA({...eS}),ez(!0)},children:[(0,t.jsx)(k.Plus,{className:"mr-2 h-4 w-4"}),g("settings.config.git.addRule")]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[0!==eL.length||eV?(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:eL.map(e=>eI===e.id?(0,t.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:eE.host,onChange:e=>eH(t=>({...t,host:e.target.value})),placeholder:g("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:eE.ownerMatch,onChange:e=>eH(t=>({...t,ownerMatch:e.target.value})),placeholder:g("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5 col-span-2",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:eE.localPathTemplate,onChange:e=>eH(t=>({...t,localPathTemplate:e.target.value})),placeholder:g("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:eW?"default":"outline",size:"sm",type:"button",onClick:()=>eq(e=>!e),className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(O.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:g("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:g("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>eJ("edit"),children:(0,t.jsx)(R.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(O.TooltipContent,{children:g("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eW?g("onboarding.step3.pathHintFull"):g("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:eE.priority,onChange:e=>eH(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>{eF(null),eq(!1)},children:g("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{size:"sm",onClick:()=>tv(e.id),children:g("settings.config.git.save")})]})]},e.id):(0,t.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.host}),"*"!==e.ownerMatch&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",e.ownerMatch]}),(0,t.jsxs)(d.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[g("settings.config.git.priority")," ",e.priority]})]}),(0,t.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:e.localPathTemplate})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{let t,s,a;return t=e.localPathTemplate,a=(s=/\/\{path\}\/?$/.test(t))?t.replace(/\/?\{path\}\/?$/,"").replace(/\/+$/,""):t,void(eF(e.id),eH({host:e.host,ownerMatch:e.ownerMatch,localPathTemplate:a,priority:e.priority}),eq(s))},title:g("settings.config.git.edit"),children:(0,t.jsx)(S,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>eZ(e.id),className:"text-destructive",title:g("settings.config.git.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]})},e.id))}):(0,t.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:g("settings.config.git.noRules")})}),eV&&(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:g("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:e$.host,onChange:e=>eA(t=>({...t,host:e.target.value})),placeholder:g("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:g("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:e$.ownerMatch,onChange:e=>eA(t=>({...t,ownerMatch:e.target.value})),placeholder:g("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:g("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:e$.localPathTemplate,onChange:e=>eA(t=>({...t,localPathTemplate:e.target.value})),placeholder:g("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:eK?"default":"outline",size:"sm",type:"button",onClick:()=>eO(e=>!e),className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(O.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:g("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:g("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>eJ("add"),children:(0,t.jsx)(R.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(O.TooltipContent,{children:g("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eK?g("onboarding.step3.pathHintFull"):g("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:g("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:e$.priority,onChange:e=>eA(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]}),e$.localPathTemplate&&(s=e$.localPathTemplate.trim().replace(/\/+$/,""),a=eK?`${s}/{path}`:s,n=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:g("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:n.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>eX(s),className:(0,x.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",eG===s?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:e.label},s))})]}),(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:n[eG].url}),(0,t.jsxs)("p",{className:"font-mono text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-foreground font-medium",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],n=s.match(/^git@[^:]+:(.+)$/);if(n)a=n[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let i=a[0],r=a[a.length-1],l=a.join("/");if(e.includes("{path}"))return e.replace("{path}",l).replace("{owner}",i).replace("{repo}",r).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${r}`}(a,n[eG].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>ez(!1),children:g("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{size:"sm",onClick:tj,disabled:!e$.host.trim()||!e$.localPathTemplate.trim(),children:[(0,t.jsx)(T,{className:"h-3.5 w-3.5 mr-1.5"}),g("settings.config.git.save")]})]})]})]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.system.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.system.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxUpload")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxUploadHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:500,value:eQ.maxUploadMb,onChange:e=>e0(t=>({...t,maxUploadMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxConcurrent")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxConcurrentHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eQ.maxConcurrent,onChange:e=>e0(t=>({...t,maxConcurrent:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxReadable")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxReadableHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:50,value:eQ.maxReadableMb,onChange:e=>e0(t=>({...t,maxReadableMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]})]}),(0,t.jsx)(r.Button,{onClick:tu,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.task.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.task.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.taskDefaultWorktree")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.taskDefaultWorktreeHint")})]}),(0,t.jsx)("button",{type:"button",onClick:()=>e0(e=>({...e,taskDefaultUseWorktree:!e.taskDefaultUseWorktree})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${eQ.taskDefaultUseWorktree?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:eQ.taskDefaultUseWorktree?g("task.worktreeYes"):g("task.worktreeNo")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.taskDefaultAutoStart")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.taskDefaultAutoStartHint")})]}),(0,t.jsx)("button",{type:"button",onClick:()=>e0(e=>({...e,taskDefaultAutoStart:!e.taskDefaultAutoStart})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${eQ.taskDefaultAutoStart?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:eQ.taskDefaultAutoStart?g("task.autoStartYes"):g("task.autoStartNo")})]})]}),(0,t.jsx)(r.Button,{onClick:tx,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.gitParams.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.gitParams.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.gitParams.timeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.gitParams.timeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,value:e1.timeoutSec,onChange:e=>e2(t=>({...t,timeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,t.jsx)(r.Button,{onClick:tg,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.search.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.search.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.resultLimit")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.resultLimitHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:5,max:100,value:e5.resultLimit,onChange:e=>e3(t=>({...t,resultLimit:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.allModeCap")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.allModeCapHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:20,value:e5.allModeCap,onChange:e=>e3(t=>({...t,allModeCap:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.debounceMs")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.debounceMsHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:50,max:1e3,value:e5.debounceMs,onChange:e=>e3(t=>({...t,debounceMs:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.snippetLength")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.snippetLengthHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:20,max:500,value:e5.snippetLength,onChange:e=>e3(t=>({...t,snippetLength:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.codeTimeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.codeTimeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,step:5,value:e5.codeTimeoutSec,onChange:e=>e3(t=>({...t,codeTimeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]})]}),(0,t.jsx)(r.Button,{onClick:th,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.missions.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.missions.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.minCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.minCols,onChange:e=>e7(t=>({...t,minCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.maxCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.maxCols,onChange:e=>e7(t=>({...t,maxCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.minRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.minRows,onChange:e=>e7(t=>({...t,minRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.maxRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.maxRows,onChange:e=>e7(t=>({...t,maxRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,t.jsx)(r.Button,{onClick:tp,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.hooks.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.hooks.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.hooks.autoUploadTypes")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.hooks.autoUploadTypesHint")})]}),(0,t.jsx)(l.Input,{value:tt,onChange:e=>ts(e.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsx)(r.Button,{onClick:tf,className:"rounded-lg",children:g("common.save")}),(0,t.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:e6?.installed?g("settings.config.hooks.installed"):g("settings.config.hooks.notInstalled")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.hooks.installHint")})]}),(0,t.jsx)(r.Button,{variant:e6?.installed?"destructive":"default",onClick:tb,disabled:e9||!e6,className:"rounded-lg",children:e6?.installed?g("settings.config.hooks.uninstall"):g("settings.config.hooks.install")})]})]}),(0,t.jsx)(u.Dialog,{open:!!eY,onOpenChange:e=>!e&&eZ(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:g("settings.config.git.deleteConfirm")}),(0,t.jsx)(u.DialogDescription,{children:g("settings.config.git.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>eZ(null),children:g("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:()=>eY&&tN(eY),children:g("settings.config.git.delete")})]})]})})]});case"notifications":return(0,t.jsx)("div",{className:"divide-y divide-border/50",children:(0,t.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.notifications.enable")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.notifications.enableDesc")})]}),(0,t.jsx)(m.Switch,{checked:ta,onCheckedChange:ty})]})});case"backup":return(0,t.jsx)(eo,{});case"extensions":return(0,t.jsx)(ev,{})}}()]})}),(0,t.jsx)(W.FolderBrowserDialog,{open:null!==e_,onOpenChange:e=>{e||eJ(null)},onSelect:e=>{"add"===e_?eA(t=>({...t,localPathTemplate:e})):"edit"===e_&&eH(t=>({...t,localPathTemplate:e})),eJ(null)}})]})}e.s(["default",0,function(){return(0,t.jsx)(eT,{})}],113399)}]);
@@ -1,2 +1,2 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},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)},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:u}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",u),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})]})}])},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)},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 u(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 o(e){return({}).toString.call(e).includes("Object")}function c(e){return"function"==typeof e}var a,l,d=u(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 o(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)||o(e)||d("handlerType"),o(e)&&Object.values(e).some(function(e){return!c(e)})&&d("handlersType")},p=function(e){e||d("initialIsRequired"),o(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)}},E={type:"cancelation",msg:"operation is manually canceled"};function C(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(E):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var S=["monaco"],w=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=u(v)(r,t),i=u(y)(r),s=u(h)(e),o=u(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,o)(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,u=[],o=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(u.push(r.value),2!==u.length);o=!0);}catch(e){c=!0,n=e}finally{try{if(!o&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw n}}return u}}(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.")}(),k=w[0],D=w[1];function F(e){return document.body.appendChild(e)}function _(e){var t,r,n=k(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 j(){var e=k(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){k().monaco||D({monaco:e})}var R=new Promise(function(e,t){return D({resolve:e,reject:t})}),I={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,S);D(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=k(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(D({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),C(R);if(window.monaco&&window.monaco.editor)return B(window.monaco),e.resolve(window.monaco),C(R);M(F,_)(j)}return C(R)},__getMonacoInstance:function(){return k(function(e){return e.monaco})}};e.s(["default",0,I],485599);var O=e.i(965652),L={display:"flex",position:"relative",textAlign:"initial"},$={width:"100%"},P={display:"none"},z={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},N=function({children:e}){return O.default.createElement("div",{style:z},e)},T=(0,O.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:i,className:s,wrapperProps:u}){return O.default.createElement("section",{style:{...L,width:e,height:t},...u},!r&&O.default.createElement(N,null,n),O.default.createElement("div",{ref:i,style:{...$,...!r&&P},className:s}))}),U=function(e){(0,O.useEffect)(e,[])},V=function(e,t,r=!0){let n=(0,O.useRef)(!0);(0,O.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function q(){}function W(e,t,r,n){var i,s,u,o,c,a;return i=e,s=n,i.editor.getModel(K(i,s))||(u=e,o=t,c=r,a=n,u.editor.createModel(o,c,a?K(u,a):void 0))}function K(e,t){return e.Uri.parse(t)}var H=(0,O.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:i,originalModelPath:s,modifiedModelPath:u,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:c=!1,theme:a="light",loading:l="Loading...",options:d={},height:h="100%",width:f="100%",className:g,wrapperProps:p={},beforeMount:m=q,onMount:y=q}){let[v,b]=(0,O.useState)(!1),[x,A]=(0,O.useState)(!0),M=(0,O.useRef)(null),E=(0,O.useRef)(null),C=(0,O.useRef)(null),S=(0,O.useRef)(y),w=(0,O.useRef)(m),k=(0,O.useRef)(!1);U(()=>{let e=I.init();return e.then(e=>(E.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(o||t?.original?.dispose(),c||t?.modified?.dispose(),M.current?.dispose())):e.cancel()}}),V(()=>{if(M.current&&E.current){let t=M.current.getOriginalEditor(),i=W(E.current,e||"",n||r||"text",s||"");i!==t.getModel()&&t.setModel(i)}},[s],v),V(()=>{if(M.current&&E.current){let e=M.current.getModifiedEditor(),n=W(E.current,t||"",i||r||"text",u||"");n!==e.getModel()&&e.setModel(n)}},[u],v),V(()=>{let e=M.current.getModifiedEditor();e.getOption(E.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();E.current.editor.setModelLanguage(e,n||r||"text"),E.current.editor.setModelLanguage(t,i||r||"text")},[r,n,i],v),V(()=>{E.current?.editor.setTheme(a)},[a],v),V(()=>{M.current?.updateOptions(d)},[d],v);let D=(0,O.useCallback)(()=>{if(!E.current)return;w.current(E.current);let o=W(E.current,e||"",n||r||"text",s||""),c=W(E.current,t||"",i||r||"text",u||"");M.current?.setModel({original:o,modified:c})},[r,t,i,e,n,s,u]),F=(0,O.useCallback)(()=>{!k.current&&C.current&&(M.current=E.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...d}),D(),E.current?.editor.setTheme(a),b(!0),k.current=!0)},[d,a,D]);return(0,O.useEffect)(()=>{v&&S.current(M.current,E.current)},[v]),(0,O.useEffect)(()=>{x||v||F()},[x,v,F]),O.default.createElement(T,{width:f,height:h,isEditorReady:v,loading:l,_ref:C,className:g,wrapperProps:p})}),G=function(e){let t=(0,O.useRef)();return(0,O.useEffect)(()=>{t.current=e},[e]),t.current},Q=new Map,J=(0,O.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:i,path:s,theme:u="light",line:o,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=q,onMount:v=q,onChange:b,onValidate:x=q}){let[A,M]=(0,O.useState)(!1),[E,C]=(0,O.useState)(!0),S=(0,O.useRef)(null),w=(0,O.useRef)(null),k=(0,O.useRef)(null),D=(0,O.useRef)(v),F=(0,O.useRef)(y),_=(0,O.useRef)(void 0),j=(0,O.useRef)(n),B=G(s),R=(0,O.useRef)(!1),L=(0,O.useRef)(!1);U(()=>{let e=I.init();return e.then(e=>(S.current=e)&&C(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>w.current?void(_.current?.dispose(),h?d&&Q.set(s,w.current.saveViewState()):w.current.getModel()?.dispose(),w.current.dispose(),w.current=null,R.current=!1,M(!1)):e.cancel()}),V(()=>{let u=W(S.current,e||n||"",t||i||"",s||r||"");u!==w.current?.getModel()&&(d&&Q.set(B,w.current?.saveViewState()),w.current?.setModel(u),d&&w.current?.restoreViewState(Q.get(s)))},[s],A),V(()=>{w.current?.updateOptions(a)},[a],A),V(()=>{w.current&&void 0!==n&&(w.current.getOption(S.current.editor.EditorOption.readOnly)?w.current.setValue(n):n!==w.current.getValue()&&(L.current=!0,w.current.executeEdits("",[{range:w.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),w.current.pushUndoStop(),L.current=!1))},[n],A),V(()=>{let e=w.current?.getModel();A&&e&&i&&S.current?.editor.setModelLanguage(e,i)},[i,A],A),V(()=>{void 0!==o&&w.current?.revealLine(o)},[o],A),V(()=>{S.current?.editor.setTheme(u)},[u],A);let $=(0,O.useCallback)(()=>{if(!(!k.current||!S.current)&&!R.current){F.current(S.current);let c=s||r,h=W(S.current,n||e||"",t||i||"",c||"");w.current=S.current?.editor.create(k.current,{model:h,automaticLayout:!0,...a},l),d&&w.current.restoreViewState(Q.get(c)),S.current.editor.setTheme(u),void 0!==o&&w.current.revealLine(o),M(!0),R.current=!0}},[e,t,r,n,i,s,a,l,d,u,o]);return(0,O.useEffect)(()=>{A&&D.current(w.current,S.current)},[A]),(0,O.useEffect)(()=>{E||A||$()},[E,A,$]),j.current=n,(0,O.useEffect)(()=>{A&&b&&(_.current?.dispose(),_.current=w.current?.onDidChangeModelContent(e=>{L.current||b(w.current.getValue(),e)}))},[A,b]),(0,O.useEffect)(()=>{if(A){let e=S.current.editor.onDidChangeMarkers(e=>{let t=w.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=S.current.editor.getModelMarkers({resource:t});x?.(e)}});return()=>{e?.dispose()}}return()=>{}},[A,x]),O.default.createElement(T,{width:f,height:g,isEditorReady:A,loading:c,_ref:k,className:p,wrapperProps:m})});e.s(["DiffEditor",0,H,"Editor",0,J,"default",0,J,"useMonaco",0,function(){let[e,t]=(0,O.useState)(I.__getMonacoInstance());return U(()=>{let r;return e||(r=I.init()).then(e=>{t(e)}),()=>r?.cancel()}),e}],77597)},461526,e=>{"use strict";e.s(["PREVIEW_TASK_ID",0,"__preview__"])},301348,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],301348);let r=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,r],181209)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},436325,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("406e2e4cc47185291de78e1588274f4b8e46cedb04",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)}}])},425946,490708,995683,298937,529398,500262,228590,96502,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60c6ccc9e3b6ba6f4235c468140e790f5540d44e82",t.callServer,void 0,t.findSourceMapURL,"listDirectory");e.s(["listDirectory",0,r],425946);let n=(0,t.createServerReference)("70f389bd1f9fe1c5304eff80e83f9f31e8b0213bc6",t.callServer,void 0,t.findSourceMapURL,"getGitStatus");e.s(["getGitStatus",0,n],490708);let i=(0,t.createServerReference)("601ca70af2c53e4e4ed87c93a2cdbde7effea65db7",t.callServer,void 0,t.findSourceMapURL,"createFile");e.s(["createFile",0,i],995683);let s=(0,t.createServerReference)("60cb8f4fdb92d96b156cf21fd243551c773bd6f50f",t.callServer,void 0,t.findSourceMapURL,"createDirectory");e.s(["createDirectory",0,s],298937);let u=(0,t.createServerReference)("7026e19ff168fb8d1a79f151174bb5103a01954c6d",t.callServer,void 0,t.findSourceMapURL,"renameEntry");e.s(["renameEntry",0,u],529398);let o=(0,t.createServerReference)("601e4367daa6e20135e673ca722682f7936a4f6db4",t.callServer,void 0,t.findSourceMapURL,"deleteEntry");e.s(["deleteEntry",0,o],500262);let c=(0,t.createServerReference)("40923b3607fd6ba438c23aed282b68c9c32a795d7e",t.callServer,void 0,t.findSourceMapURL,"listAllFiles");e.s(["listAllFiles",0,c],228590);let a=(0,t.createServerReference)("60937d6f5d4c03ee0d7f261812fd9383b75809afed",t.callServer,void 0,t.findSourceMapURL,"readFileContent");e.s(["readFileContent",0,a],96502)},104492,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("70c98b2e1e4e9ceb074f6aa96c1bbb42e91103460d",t.callServer,void 0,t.findSourceMapURL,"writeFileContent");e.s(["writeFileContent",0,r])},365232,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60fd035fb9c430683906363a4dfba79e1d95c7504d",t.callServer,void 0,t.findSourceMapURL,"readFileContentForce");e.s(["readFileContentForce",0,r])},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:u,...o}){var c;return c={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,i.cn)(s({variant:n}),e)},o),render:u,state:{slot:"badge",variant:n}},(0,r.useRenderElement)(c.defaultTagName??"div",c,c)}],487486)},583329,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40761db40351e40c001ff439284f4ab6a350d93b1b",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,r])},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)},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)},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 u={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:u}){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:u??(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 ${u[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)},197550,852494,12659,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4072804d823a8f55231ec0829fb98a68bc38646216",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],197550);let n=(0,t.createServerReference)("40a7283207727ed21a6ecaca85b390988b3687e1dd",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,n],852494);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)},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,u=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=o(e)}],[/^\+\+\+\s/,e=>{d(),n.to=o(e)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(e,t)=>{n||l(e);let[r,s,o,d]=t.slice(1);u=+r,c=+o,i={content:e,changes:[],oldStart:+r,oldLines:+(s||1),newStart:+o,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:u++,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:u++,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(/("|')$/,"")),u=/^\\?['"]|\\?['"]$/g,o=e=>{let t=c(e,"-+").trim();return(t=l(t)).replace(u,"").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))}])},429210,473221,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40bdcb74096059f4c6d1bf545d5c112909b8e31288",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],429210);let n=(0,t.createServerReference)("60a23bafb2c8929e089c752c7bd461cd011370b31b",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,n],473221)},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 u(e){return null!=e}function o(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,u=1,o=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")&&(u=e.weight)<=0)throw Error(`Property 'weight' in key '${t}' must be a positive integer`);r=h(t),i=f(t),o=e.getFn}return{path:r,id:i,weight:u,src:s,getFn:o}}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,o){let a=[],l=!1,d=(e,o,h,f)=>{if(u(e))if(o[h]){var g,p;let m=e[o[h]];if(!u(m))return;if(h===o.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],o,h+1,e)}else o.length&&d(m,o,h+1,f)}else a.push(void 0!==f?{v:e,i:f}:e)};return d(e,n(o)?o.split("."):o,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(!u(e)||o(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(u(a)){if(t(a)){let e=[];for(let t=0,i=a.length;t<i;t+=1){let i=a[t];if(u(i)){if(n(i)){if(!o(i)){let r={v:i,i:t,n:this.norm.get(i)};e.push(r)}}else if(u(i.v)){let t=n(i.v)?i.v:r(i.v);if(!o(t)){let r={v:t,i:i.i,n:this.norm.get(t)};e.push(r)}}}}s.$[c]=e}else if(n(a)&&!o(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:u=g.minMatchCharLength,isCaseSensitive:o=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:a=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:u,isCaseSensitive:o,ignoreDiacritics:c,ignoreLocation:a},e=o?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:u,findAllMatches:o,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:u=g.findAllMatches,minMatchCharLength:o=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=o>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,E=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),o=u?h:Math.min(f+i,h)+d,c=Array(o+2);c[o+1]=(1<<t)-1;for(let n=o;n>=s;n-=1){let i=n-1,u=r[e[i]];if(v&&(b[i]=+!!u),c[n]=(c[n+1]<<1|1)&u,t&&(c[n]|=(x[n+1]|x[n])<<1|1|x[n+1]),c[n]&E&&(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 C={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 u=e.length;s<u;s+=1){let u=e[s];u&&-1===n?n=s:u||-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,o);e.length?c&&(C.indices=e):C.isMatch=!1}return C}(e,t,r,{location:i+f,distance:s,threshold:u,findAllMatches:o,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 E{constructor(e){this.pattern=e}static isMultiMatch(e){return C(e,this.multiRegex)}static isSingleMatch(e){return C(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function C(e,t){let r=e.match(t);return r?r[1]:null}class S extends E{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:i=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:o=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:u,isCaseSensitive:o,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 w extends E{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 k=[class extends E{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]}}},w,class extends E{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 E{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 E{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 E{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 E{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]}}},S],D=k.length,F=new Set([S.type,w.type]),_=[];function j(...e){_.push(...e)}function B(e,t){for(let r=0,n=_.length;r<n;r+=1){let n=_[r];if(n.condition(e,t))return new n(e,t)}return new M(e,t)}let R="$and",I="$path",O=e=>!!(e[R]||e.$or),L=e=>({[R]:Object.keys(e).map(t=>({[t]:e[t]}))});function $(e,r,{auto:i=!0}={}){let u=e=>{if(n(e)){let t={keyId:null,pattern:e};return i&&(t.searcher=B(e,r)),t}let o=Object.keys(e),c=!!e[I];if(!c&&o.length>1&&!O(e))return u(L(e));if(!t(e)&&s(e)&&!O(e)){let t=c?e[I]:o[0],s=c?e.$val:e[t];if(!n(s))throw Error(`Invalid value for key ${t}`);let u={keyId:f(t),pattern:s};return i&&(u.searcher=B(s,r)),u}let a={children:[],operator:o[0]};return o.forEach(r=>{let n=e[r];t(n)&&n.forEach(e=>{a.children.push(u(e))})}),a};return O(e)||(e=L(e)),u(e)}function P(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 z{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 N(e,t){let r=e.matches;t.matches=[],u(r)&&r.forEach(e=>{if(!u(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 q(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 W{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 u(e,t,u,o){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:u,subIdx:o,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){u(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)u(n.v,e,r,n.i??-1);else u(t.v,e,r,-1)}}return{terms:n,fieldCount:s,df:i}}(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(u(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,$:u}=t;function o(t,r,s){let u=n.tokenize(t);if(!u.length)return;e.fieldCount++;let o=new Map;for(let e of u)o.set(e,(o.get(e)||0)+1);for(let[t,n]of o){let u={docIdx:i,keyIdx:r,subIdx:s,tf:n},o=e.terms.get(t);o||(o=[],e.terms.set(t,o)),o.push(u),e.df.set(t,(e.df.get(t)||0)+1)}}if(void 0!==s)return o(s,-1,-1);if(u)for(let e=0;e<r;e++){let t=u[e];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,r.i??-1);else o(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)q(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&&q(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:u,includeScore:o,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 z(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=P(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(N),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:u,includeScore:o})}_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:o})=>{if(!u(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:o,indices:l}]};t?(n.score=P(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):s.push(n)}}),s}_searchLogical(e){let t=$(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,u=[];for(let e=0,o=i.length;e<o;e+=1){let o=r(i[e],t,n);if(o.length)u.push(...o);else if(s===R)return[]}return u},n=this._myIndex.records,i=new Map,s=[];return n.forEach(({$:e,i:n})=>{if(u(e)){let u=r(t,e,n);u.length&&(i.has(n)||(i.set(n,{idx:n,item:e,matches:[]}),s.push(i.get(n))),u.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,o=t?null:[];return s.forEach(({$:e,i:s})=>{if(!u(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=P(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):o.push(n)}}),o}_findMatches({key:e,value:r,searcher:n}){if(!u(r))return[];let i=[];if(t(r))r.forEach(({v:t,i:r,n:s})=>{if(!u(t))return;let{isMatch:o,score:c,indices:a,hasInverse:l}=n.searchIn(t);o&&i.push({score:c,key:e,value:t,idx:r,norm:s,indices:a,hasInverse:l})});else{let{v:t,n:s}=r,{isMatch:u,score:o,indices:c,hasInverse:a}=n.searchIn(t);u&&i.push({score:o,key:e,value:t,norm:s,indices:c,hasInverse:a})}return i}}W.version="7.3.0",W.createIndex=y,W.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},W.config=g,W.match=function(e,t,r){return B(e,{...g,...r}).searchIn(t)},W.parseQuery=$,j(class{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:n=g.includeMatches,minMatchCharLength:i=g.minMatchCharLength,ignoreLocation:s=g.ignoreLocation,findAllMatches:u=g.findAllMatches,location:o=g.location,threshold:c=g.threshold,distance:a=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:i,findAllMatches:u,ignoreLocation:s,location:o,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,u=-1;for(;!s&&++u<D;){let e=k[u],r=e.isMultiMatch(i);r&&(n.push(new e(r,t)),s=!0)}if(!s)for(u=-1;++u<D;){let e=k[u],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,u=[],o=0,c=!1;for(let n=0,i=t.length;n<i;n+=1){let i=t[n];u.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,o+=d;let e=n.constructor.type;e.startsWith("inverse")&&(c=!0),r&&(F.has(e)?u.push(...l):u.push(l))}else{o=0,s=0,u.length=0,c=!1;break}}if(s){let e={isMatch:!0,score:o/s};return c&&(e.hasInverse=!0),r&&(e.indices=v(u)),e}}return{isMatch:!1,score:1}}}),j(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 u=this.termSearchers[s].searchIn(e),o=this.idfWeights[s];n+=o,u.isMatch&&(i++,r+=o*(1-u.score),u.indices&&t.push(...u.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}}),W.use=function(...e){e.forEach(e=>j(e))},e.s(["default",0,W])},922088,e=>{e.v(t=>Promise.all(["static/chunks/0_n2l3jehwcsq.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/0f1gk0.5slqqh.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(461834)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},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)},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:u}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",u),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})]})}])},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)},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 u(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 o(e){return({}).toString.call(e).includes("Object")}function c(e){return"function"==typeof e}var a,l,d=u(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 o(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)||o(e)||d("handlerType"),o(e)&&Object.values(e).some(function(e){return!c(e)})&&d("handlersType")},p=function(e){e||d("initialIsRequired"),o(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)}},E={type:"cancelation",msg:"operation is manually canceled"};function C(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(E):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var S=["monaco"],w=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=u(v)(r,t),i=u(y)(r),s=u(h)(e),o=u(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,o)(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,u=[],o=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(u.push(r.value),2!==u.length);o=!0);}catch(e){c=!0,n=e}finally{try{if(!o&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw n}}return u}}(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.")}(),k=w[0],D=w[1];function F(e){return document.body.appendChild(e)}function _(e){var t,r,n=k(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 j(){var e=k(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){k().monaco||D({monaco:e})}var R=new Promise(function(e,t){return D({resolve:e,reject:t})}),I={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,S);D(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=k(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(D({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),C(R);if(window.monaco&&window.monaco.editor)return B(window.monaco),e.resolve(window.monaco),C(R);M(F,_)(j)}return C(R)},__getMonacoInstance:function(){return k(function(e){return e.monaco})}};e.s(["default",0,I],485599);var O=e.i(965652),L={display:"flex",position:"relative",textAlign:"initial"},$={width:"100%"},P={display:"none"},z={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},N=function({children:e}){return O.default.createElement("div",{style:z},e)},T=(0,O.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:i,className:s,wrapperProps:u}){return O.default.createElement("section",{style:{...L,width:e,height:t},...u},!r&&O.default.createElement(N,null,n),O.default.createElement("div",{ref:i,style:{...$,...!r&&P},className:s}))}),U=function(e){(0,O.useEffect)(e,[])},V=function(e,t,r=!0){let n=(0,O.useRef)(!0);(0,O.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function q(){}function W(e,t,r,n){var i,s,u,o,c,a;return i=e,s=n,i.editor.getModel(K(i,s))||(u=e,o=t,c=r,a=n,u.editor.createModel(o,c,a?K(u,a):void 0))}function K(e,t){return e.Uri.parse(t)}var H=(0,O.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:i,originalModelPath:s,modifiedModelPath:u,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:c=!1,theme:a="light",loading:l="Loading...",options:d={},height:h="100%",width:f="100%",className:g,wrapperProps:p={},beforeMount:m=q,onMount:y=q}){let[v,b]=(0,O.useState)(!1),[x,A]=(0,O.useState)(!0),M=(0,O.useRef)(null),E=(0,O.useRef)(null),C=(0,O.useRef)(null),S=(0,O.useRef)(y),w=(0,O.useRef)(m),k=(0,O.useRef)(!1);U(()=>{let e=I.init();return e.then(e=>(E.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(o||t?.original?.dispose(),c||t?.modified?.dispose(),M.current?.dispose())):e.cancel()}}),V(()=>{if(M.current&&E.current){let t=M.current.getOriginalEditor(),i=W(E.current,e||"",n||r||"text",s||"");i!==t.getModel()&&t.setModel(i)}},[s],v),V(()=>{if(M.current&&E.current){let e=M.current.getModifiedEditor(),n=W(E.current,t||"",i||r||"text",u||"");n!==e.getModel()&&e.setModel(n)}},[u],v),V(()=>{let e=M.current.getModifiedEditor();e.getOption(E.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();E.current.editor.setModelLanguage(e,n||r||"text"),E.current.editor.setModelLanguage(t,i||r||"text")},[r,n,i],v),V(()=>{E.current?.editor.setTheme(a)},[a],v),V(()=>{M.current?.updateOptions(d)},[d],v);let D=(0,O.useCallback)(()=>{if(!E.current)return;w.current(E.current);let o=W(E.current,e||"",n||r||"text",s||""),c=W(E.current,t||"",i||r||"text",u||"");M.current?.setModel({original:o,modified:c})},[r,t,i,e,n,s,u]),F=(0,O.useCallback)(()=>{!k.current&&C.current&&(M.current=E.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...d}),D(),E.current?.editor.setTheme(a),b(!0),k.current=!0)},[d,a,D]);return(0,O.useEffect)(()=>{v&&S.current(M.current,E.current)},[v]),(0,O.useEffect)(()=>{x||v||F()},[x,v,F]),O.default.createElement(T,{width:f,height:h,isEditorReady:v,loading:l,_ref:C,className:g,wrapperProps:p})}),G=function(e){let t=(0,O.useRef)();return(0,O.useEffect)(()=>{t.current=e},[e]),t.current},Q=new Map,J=(0,O.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:i,path:s,theme:u="light",line:o,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=q,onMount:v=q,onChange:b,onValidate:x=q}){let[A,M]=(0,O.useState)(!1),[E,C]=(0,O.useState)(!0),S=(0,O.useRef)(null),w=(0,O.useRef)(null),k=(0,O.useRef)(null),D=(0,O.useRef)(v),F=(0,O.useRef)(y),_=(0,O.useRef)(void 0),j=(0,O.useRef)(n),B=G(s),R=(0,O.useRef)(!1),L=(0,O.useRef)(!1);U(()=>{let e=I.init();return e.then(e=>(S.current=e)&&C(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>w.current?void(_.current?.dispose(),h?d&&Q.set(s,w.current.saveViewState()):w.current.getModel()?.dispose(),w.current.dispose(),w.current=null,R.current=!1,M(!1)):e.cancel()}),V(()=>{let u=W(S.current,e||n||"",t||i||"",s||r||"");u!==w.current?.getModel()&&(d&&Q.set(B,w.current?.saveViewState()),w.current?.setModel(u),d&&w.current?.restoreViewState(Q.get(s)))},[s],A),V(()=>{w.current?.updateOptions(a)},[a],A),V(()=>{w.current&&void 0!==n&&(w.current.getOption(S.current.editor.EditorOption.readOnly)?w.current.setValue(n):n!==w.current.getValue()&&(L.current=!0,w.current.executeEdits("",[{range:w.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),w.current.pushUndoStop(),L.current=!1))},[n],A),V(()=>{let e=w.current?.getModel();A&&e&&i&&S.current?.editor.setModelLanguage(e,i)},[i,A],A),V(()=>{void 0!==o&&w.current?.revealLine(o)},[o],A),V(()=>{S.current?.editor.setTheme(u)},[u],A);let $=(0,O.useCallback)(()=>{if(!(!k.current||!S.current)&&!R.current){F.current(S.current);let c=s||r,h=W(S.current,n||e||"",t||i||"",c||"");w.current=S.current?.editor.create(k.current,{model:h,automaticLayout:!0,...a},l),d&&w.current.restoreViewState(Q.get(c)),S.current.editor.setTheme(u),void 0!==o&&w.current.revealLine(o),M(!0),R.current=!0}},[e,t,r,n,i,s,a,l,d,u,o]);return(0,O.useEffect)(()=>{A&&D.current(w.current,S.current)},[A]),(0,O.useEffect)(()=>{E||A||$()},[E,A,$]),j.current=n,(0,O.useEffect)(()=>{A&&b&&(_.current?.dispose(),_.current=w.current?.onDidChangeModelContent(e=>{L.current||b(w.current.getValue(),e)}))},[A,b]),(0,O.useEffect)(()=>{if(A){let e=S.current.editor.onDidChangeMarkers(e=>{let t=w.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=S.current.editor.getModelMarkers({resource:t});x?.(e)}});return()=>{e?.dispose()}}return()=>{}},[A,x]),O.default.createElement(T,{width:f,height:g,isEditorReady:A,loading:c,_ref:k,className:p,wrapperProps:m})});e.s(["DiffEditor",0,H,"Editor",0,J,"default",0,J,"useMonaco",0,function(){let[e,t]=(0,O.useState)(I.__getMonacoInstance());return U(()=>{let r;return e||(r=I.init()).then(e=>{t(e)}),()=>r?.cancel()}),e}],77597)},461526,e=>{"use strict";e.s(["PREVIEW_TASK_ID",0,"__preview__"])},301348,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],301348);let r=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,r],181209)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},610328,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40b7501e08e21609968acead49b3d4b4c1b9bd1b09",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)}}])},499768,188152,280884,874350,765146,425081,968987,719557,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6025714cad09c708e61a2c6ce66667bd4739cebda0",t.callServer,void 0,t.findSourceMapURL,"listDirectory");e.s(["listDirectory",0,r],499768);let n=(0,t.createServerReference)("70eaa67c10eb74f15a3baadab8c6669835a6b6ffa0",t.callServer,void 0,t.findSourceMapURL,"getGitStatus");e.s(["getGitStatus",0,n],188152);let i=(0,t.createServerReference)("60293330504a327967a781939727899ba56ce6e3b7",t.callServer,void 0,t.findSourceMapURL,"createFile");e.s(["createFile",0,i],280884);let s=(0,t.createServerReference)("603624b9c267c6d22ecd1ac22e88631ae7a202ec62",t.callServer,void 0,t.findSourceMapURL,"createDirectory");e.s(["createDirectory",0,s],874350);let u=(0,t.createServerReference)("7052f73f2975b9558cca799495f4696c540f7a7b71",t.callServer,void 0,t.findSourceMapURL,"renameEntry");e.s(["renameEntry",0,u],765146);let o=(0,t.createServerReference)("602c3178fab152ba0e3ac536fab0ca3eb2db1115cb",t.callServer,void 0,t.findSourceMapURL,"deleteEntry");e.s(["deleteEntry",0,o],425081);let c=(0,t.createServerReference)("40adaf5350818fdc5944103f715c4a2a64c09ed953",t.callServer,void 0,t.findSourceMapURL,"listAllFiles");e.s(["listAllFiles",0,c],968987);let a=(0,t.createServerReference)("60ca16240529541c775345e0c9d703e5ce56179b4c",t.callServer,void 0,t.findSourceMapURL,"readFileContent");e.s(["readFileContent",0,a],719557)},296726,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("70ec69ed0b90d943751d36f5e4fbcb1a2e6f079b5d",t.callServer,void 0,t.findSourceMapURL,"writeFileContent");e.s(["writeFileContent",0,r])},70109,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("605cada4e8b682719dc07cac143628810fde9eafc6",t.callServer,void 0,t.findSourceMapURL,"readFileContentForce");e.s(["readFileContentForce",0,r])},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:u,...o}){var c;return c={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,i.cn)(s({variant:n}),e)},o),render:u,state:{slot:"badge",variant:n}},(0,r.useRenderElement)(c.defaultTagName??"div",c,c)}],487486)},141625,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40124fd369430ba78afb522a65947fbf399987a187",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,r])},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)},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)},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 u={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:u}){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:u??(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 ${u[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)},102292,830716,12659,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40b5c009cb993c580d8b9f006f6e08f0f9cab036e5",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],102292);let n=(0,t.createServerReference)("4076df959ec66a71d59f36063d120f1014f472b192",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,n],830716);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)},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,u=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=o(e)}],[/^\+\+\+\s/,e=>{d(),n.to=o(e)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(e,t)=>{n||l(e);let[r,s,o,d]=t.slice(1);u=+r,c=+o,i={content:e,changes:[],oldStart:+r,oldLines:+(s||1),newStart:+o,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:u++,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:u++,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(/("|')$/,"")),u=/^\\?['"]|\\?['"]$/g,o=e=>{let t=c(e,"-+").trim();return(t=l(t)).replace(u,"").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))}])},120969,523736,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("403959cc58bc62dfaee7df0ba2f549fb24773266ef",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],120969);let n=(0,t.createServerReference)("6059e11f9667a95e57c5fd53a5393e75aa67fefe22",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,n],523736)},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 u(e){return null!=e}function o(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,u=1,o=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")&&(u=e.weight)<=0)throw Error(`Property 'weight' in key '${t}' must be a positive integer`);r=h(t),i=f(t),o=e.getFn}return{path:r,id:i,weight:u,src:s,getFn:o}}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,o){let a=[],l=!1,d=(e,o,h,f)=>{if(u(e))if(o[h]){var g,p;let m=e[o[h]];if(!u(m))return;if(h===o.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],o,h+1,e)}else o.length&&d(m,o,h+1,f)}else a.push(void 0!==f?{v:e,i:f}:e)};return d(e,n(o)?o.split("."):o,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(!u(e)||o(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(u(a)){if(t(a)){let e=[];for(let t=0,i=a.length;t<i;t+=1){let i=a[t];if(u(i)){if(n(i)){if(!o(i)){let r={v:i,i:t,n:this.norm.get(i)};e.push(r)}}else if(u(i.v)){let t=n(i.v)?i.v:r(i.v);if(!o(t)){let r={v:t,i:i.i,n:this.norm.get(t)};e.push(r)}}}}s.$[c]=e}else if(n(a)&&!o(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:u=g.minMatchCharLength,isCaseSensitive:o=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:a=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:u,isCaseSensitive:o,ignoreDiacritics:c,ignoreLocation:a},e=o?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:u,findAllMatches:o,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:u=g.findAllMatches,minMatchCharLength:o=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=o>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,E=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),o=u?h:Math.min(f+i,h)+d,c=Array(o+2);c[o+1]=(1<<t)-1;for(let n=o;n>=s;n-=1){let i=n-1,u=r[e[i]];if(v&&(b[i]=+!!u),c[n]=(c[n+1]<<1|1)&u,t&&(c[n]|=(x[n+1]|x[n])<<1|1|x[n+1]),c[n]&E&&(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 C={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 u=e.length;s<u;s+=1){let u=e[s];u&&-1===n?n=s:u||-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,o);e.length?c&&(C.indices=e):C.isMatch=!1}return C}(e,t,r,{location:i+f,distance:s,threshold:u,findAllMatches:o,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 E{constructor(e){this.pattern=e}static isMultiMatch(e){return C(e,this.multiRegex)}static isSingleMatch(e){return C(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function C(e,t){let r=e.match(t);return r?r[1]:null}class S extends E{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:i=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:o=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:u,isCaseSensitive:o,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 w extends E{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 k=[class extends E{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]}}},w,class extends E{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 E{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 E{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 E{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 E{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]}}},S],D=k.length,F=new Set([S.type,w.type]),_=[];function j(...e){_.push(...e)}function B(e,t){for(let r=0,n=_.length;r<n;r+=1){let n=_[r];if(n.condition(e,t))return new n(e,t)}return new M(e,t)}let R="$and",I="$path",O=e=>!!(e[R]||e.$or),L=e=>({[R]:Object.keys(e).map(t=>({[t]:e[t]}))});function $(e,r,{auto:i=!0}={}){let u=e=>{if(n(e)){let t={keyId:null,pattern:e};return i&&(t.searcher=B(e,r)),t}let o=Object.keys(e),c=!!e[I];if(!c&&o.length>1&&!O(e))return u(L(e));if(!t(e)&&s(e)&&!O(e)){let t=c?e[I]:o[0],s=c?e.$val:e[t];if(!n(s))throw Error(`Invalid value for key ${t}`);let u={keyId:f(t),pattern:s};return i&&(u.searcher=B(s,r)),u}let a={children:[],operator:o[0]};return o.forEach(r=>{let n=e[r];t(n)&&n.forEach(e=>{a.children.push(u(e))})}),a};return O(e)||(e=L(e)),u(e)}function P(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 z{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 N(e,t){let r=e.matches;t.matches=[],u(r)&&r.forEach(e=>{if(!u(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 q(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 W{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 u(e,t,u,o){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:u,subIdx:o,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){u(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)u(n.v,e,r,n.i??-1);else u(t.v,e,r,-1)}}return{terms:n,fieldCount:s,df:i}}(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(u(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,$:u}=t;function o(t,r,s){let u=n.tokenize(t);if(!u.length)return;e.fieldCount++;let o=new Map;for(let e of u)o.set(e,(o.get(e)||0)+1);for(let[t,n]of o){let u={docIdx:i,keyIdx:r,subIdx:s,tf:n},o=e.terms.get(t);o||(o=[],e.terms.set(t,o)),o.push(u),e.df.set(t,(e.df.get(t)||0)+1)}}if(void 0!==s)return o(s,-1,-1);if(u)for(let e=0;e<r;e++){let t=u[e];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,r.i??-1);else o(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)q(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&&q(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:u,includeScore:o,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 z(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=P(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(N),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:u,includeScore:o})}_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:o})=>{if(!u(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:o,indices:l}]};t?(n.score=P(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):s.push(n)}}),s}_searchLogical(e){let t=$(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,u=[];for(let e=0,o=i.length;e<o;e+=1){let o=r(i[e],t,n);if(o.length)u.push(...o);else if(s===R)return[]}return u},n=this._myIndex.records,i=new Map,s=[];return n.forEach(({$:e,i:n})=>{if(u(e)){let u=r(t,e,n);u.length&&(i.has(n)||(i.set(n,{idx:n,item:e,matches:[]}),s.push(i.get(n))),u.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,o=t?null:[];return s.forEach(({$:e,i:s})=>{if(!u(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=P(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):o.push(n)}}),o}_findMatches({key:e,value:r,searcher:n}){if(!u(r))return[];let i=[];if(t(r))r.forEach(({v:t,i:r,n:s})=>{if(!u(t))return;let{isMatch:o,score:c,indices:a,hasInverse:l}=n.searchIn(t);o&&i.push({score:c,key:e,value:t,idx:r,norm:s,indices:a,hasInverse:l})});else{let{v:t,n:s}=r,{isMatch:u,score:o,indices:c,hasInverse:a}=n.searchIn(t);u&&i.push({score:o,key:e,value:t,norm:s,indices:c,hasInverse:a})}return i}}W.version="7.3.0",W.createIndex=y,W.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},W.config=g,W.match=function(e,t,r){return B(e,{...g,...r}).searchIn(t)},W.parseQuery=$,j(class{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:n=g.includeMatches,minMatchCharLength:i=g.minMatchCharLength,ignoreLocation:s=g.ignoreLocation,findAllMatches:u=g.findAllMatches,location:o=g.location,threshold:c=g.threshold,distance:a=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:i,findAllMatches:u,ignoreLocation:s,location:o,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,u=-1;for(;!s&&++u<D;){let e=k[u],r=e.isMultiMatch(i);r&&(n.push(new e(r,t)),s=!0)}if(!s)for(u=-1;++u<D;){let e=k[u],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,u=[],o=0,c=!1;for(let n=0,i=t.length;n<i;n+=1){let i=t[n];u.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,o+=d;let e=n.constructor.type;e.startsWith("inverse")&&(c=!0),r&&(F.has(e)?u.push(...l):u.push(l))}else{o=0,s=0,u.length=0,c=!1;break}}if(s){let e={isMatch:!0,score:o/s};return c&&(e.hasInverse=!0),r&&(e.indices=v(u)),e}}return{isMatch:!1,score:1}}}),j(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 u=this.termSearchers[s].searchIn(e),o=this.idfWeights[s];n+=o,u.isMatch&&(i++,r+=o*(1-u.score),u.indices&&t.push(...u.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}}),W.use=function(...e){e.forEach(e=>j(e))},e.s(["default",0,W])},922088,e=>{e.v(t=>Promise.all(["static/chunks/0ima0i0p489ty.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/04axhlp_leiii.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(461834)))}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:s,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},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)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},236967,e=>{"use strict";var t=e.i(289721),r=e.i(210702),a=e.i(538059),s=e.i(259846),l=e.i(645378),n=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),n=(0,a.usePathname)(),i=o.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(r.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(s.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let s=a.icon,n=i===a.key;return(0,t.jsxs)(r.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},149729,14044,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40616596fa4f2dfc94d91eca51a36d057b47216eb3",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],149729);let a=(0,t.createServerReference)("4068cccd8956a230bd6ff1e574451adfa98168dfe5",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],14044)},497732,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(232545),s=e.i(400355),l=e.i(236967),n=e.i(533499),i=e.i(685149),c=e.i(149729),o=e.i(514798);let d=(0,o.createServerReference)("60a19391fdd2ed4984125e6d29590c4fa741dd84d6",o.callServer,void 0,o.findSourceMapURL,"updateNote");var m=e.i(14044);let x=(0,o.createServerReference)("60d3b3d4dc689caca4392adfe1014e45cc6cd65d97",o.callServer,void 0,o.findSourceMapURL,"getProjectNotes");var u=e.i(975157);function h({active:e,onSelect:r}){let{t:a}=(0,n.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("button",{onClick:()=>r("all"),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors","all"===e?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a("notes.allCategories")}),i.NOTE_CATEGORIES_PRESET.map(a=>(0,t.jsx)("button",{onClick:()=>r(a),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors",e===a?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a},a))]})}var g=e.i(519455),p=e.i(280027),f=e.i(645378),j=e.i(912505),v=e.i(464249),b=e.i(998626);e.i(254826);var N=e.i(309735);function S({note:e,onEdit:r,onDelete:a}){let{t:s}=(0,n.useI18n)(),l=e.content.slice(0,300);return(0,t.jsxs)("div",{className:"group relative rounded-lg border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20",children:[(0,t.jsxs)("div",{className:"absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>r(e),className:"text-muted-foreground","aria-label":s("notes.edit"),children:(0,t.jsx)(v.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":s("notes.delete"),children:(0,t.jsx)(b.Trash2,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"mb-2 pr-16",children:(0,t.jsx)("h3",{className:"truncate text-sm font-semibold text-foreground",children:e.title})}),(0,t.jsx)("span",{className:"mb-3 inline-block rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:e.category}),(0,t.jsx)("div",{className:"max-h-24 overflow-hidden text-sm leading-relaxed text-muted-foreground",children:(0,t.jsx)(N.Streamdown,{children:l})})]})}function y({notes:e,onEdit:r,onDelete:a}){let{t:s}=(0,n.useI18n)();return 0===e.length?(0,t.jsx)(j.EmptyState,{icon:f.FileText,title:s("notes.empty"),description:s("notes.emptyHint")}):(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,t.jsx)(S,{note:e,onEdit:r,onDelete:a},e.id))})}var w=e.i(624687);function C({value:e,onChange:r}){return(0,t.jsxs)("div",{className:"relative grid grid-cols-2 gap-4 flex-1 min-h-64",children:[(0,t.jsx)(w.Textarea,{value:e,onChange:e=>r(e.target.value),className:"absolute inset-0 w-1/2 pr-2 resize-none font-mono text-sm border rounded-md p-3 bg-background text-foreground border-border focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Write Markdown here..."}),(0,t.jsx)("div",{className:"absolute inset-0 left-1/2 pl-2",children:(0,t.jsx)("div",{className:"h-full overflow-y-auto border rounded-md p-3 border-border text-sm leading-relaxed",children:(0,t.jsx)(N.Streamdown,{children:e})})})]})}e.s(["NotesPageClient",0,function({allWorkspaces:e,initialWorkspaceId:o,initialProjectId:u,initialNotes:f}){let j,v,{t:b}=(0,n.useI18n)(),[N,S]=(0,r.useTransition)(),[w,E]=(0,r.useState)(o),[T,k]=(0,r.useState)(u),[I,R]=(0,r.useState)(f),[O,P]=(0,r.useState)("all"),[A,_]=(0,r.useState)(null),[L,$]=(0,r.useState)(!1),[D,B]=(0,r.useState)(""),[M,z]=(0,r.useState)(""),[G,U]=(0,r.useState)(i.NOTE_CATEGORIES_PRESET[3]),[V,H]=(0,r.useState)(o),[F,W]=(0,r.useState)(u),K=e.find(e=>e.id===w),Y=K?.projects??[],q=e.find(e=>e.id===V),J=q?.projects??[],Q=(0,r.useCallback)(e=>{e?S(async()=>{R(await x(e))}):R([])},[S]),X=async()=>{F&&D.trim()&&(await (0,c.createNote)({title:D.trim(),content:M,category:G,projectId:F}),$(!1),F===T&&Q(T))},Z=async()=>{A&&D.trim()&&(await d(A.id,{title:D.trim(),content:M,category:G}),_(null),Q(T))},ee=async e=>{let t=I.find(t=>t.id===e);!t||confirm(b("notes.deleteConfirm",{title:t.title}))&&(await (0,m.deleteNote)(e),Q(T))},et="all"===O?I.map(e=>({...e,updatedAt:new Date(e.updatedAt)})):I.filter(e=>e.category===O).map(e=>({...e,updatedAt:new Date(e.updatedAt)})),er=L||null!==A;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.SubPageNav,{workspaceId:w}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(p.Select,{value:w,onValueChange:t=>t&&(t=>{if(t===w)return;E(t);let r=e.find(e=>e.id===t),a=r?.projects[0]??null;k(a?.id??null),P("all"),Q(a?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===w)?.name??w})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]}),Y.length>0&&(0,t.jsxs)(p.Select,{value:T??"",onValueChange:e=>e&&void(e!==T&&(k(e),P("all"),Q(e))),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(j=Y.find(e=>e.id===T))?j.alias?`${j.name} (${j.alias})`:j.name:""})}),(0,t.jsx)(p.SelectContent,{children:Y.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),!er&&(0,t.jsxs)(g.Button,{onClick:()=>{B(""),z(""),U(i.NOTE_CATEGORIES_PRESET[3]),H(w),W(T),_(null),$(!0)},className:"ml-auto bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:b("notes.newNote")})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden px-6 py-4 flex flex-col",children:er?(0,t.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[!A&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.workspace")}),(0,t.jsxs)(p.Select,{value:V,onValueChange:t=>t&&(t=>{if(t===V)return;H(t);let r=e.find(e=>e.id===t),a=r?.projects[0]??null;W(a?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[140px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===V)?.name??V})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),!A&&J.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.project")}),(0,t.jsxs)(p.Select,{value:F??"",onValueChange:e=>e&&W(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[160px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(v=J.find(e=>e.id===F))?v.alias?`${v.name} (${v.alias})`:v.name:""})}),(0,t.jsx)(p.SelectContent,{children:J.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.categoryLabel")}),(0,t.jsxs)(p.Select,{value:G,onValueChange:e=>e&&U(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[120px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:G})}),(0,t.jsx)(p.SelectContent,{children:i.NOTE_CATEGORIES_PRESET.map(e=>(0,t.jsx)(p.SelectItem,{value:e,children:e},e))})]})]})]}),(0,t.jsx)("input",{type:"text",value:D,onChange:e=>B(e.target.value),placeholder:b("notes.titlePlaceholder"),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),(0,t.jsx)(C,{value:M,onChange:z}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,t.jsx)(g.Button,{variant:"outline",onClick:()=>{$(!1),_(null)},children:b("notes.cancel")}),(0,t.jsx)(g.Button,{onClick:A?Z:X,disabled:!D.trim()||!A&&!F,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:b("notes.save")})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(h,{active:O,onSelect:P}),(0,t.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(s.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===Y.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:b("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:b("notes.noProjectHint")})]}):(0,t.jsx)(y,{notes:et,onEdit:e=>{B(e.title),z(e.content),U(e.category),_(e),$(!1)},onDelete:ee})]})]})})]})}],497732)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);