tower-studio 0.2.22 → 0.2.24

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 (197) 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 +29 -29
  13. package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/api/browse-fs/route.js +1 -1
  17. package/.next/standalone/.next/server/app/api/browse-fs/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/assistant/chat/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +1 -1
  21. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +1 -1
  23. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  25. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +67 -67
  26. package/.next/standalone/.next/server/app/missions/page.js +1 -1
  27. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
  30. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +29 -29
  31. package/.next/standalone/.next/server/app/onboarding/page.js +1 -1
  32. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -1
  35. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +29 -29
  36. package/.next/standalone/.next/server/app/page.js +1 -1
  37. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
  40. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +47 -47
  41. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  42. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
  45. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +82 -82
  46. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +1 -1
  47. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
  50. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +80 -80
  51. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +1 -1
  52. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
  55. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +55 -55
  56. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +1 -1
  57. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
  60. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +63 -63
  61. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +1 -1
  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 +29 -29
  66. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +1 -1
  67. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +1 -1
  70. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +68 -68
  71. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +1 -1
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +2 -2
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +80 -80
  76. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +1 -1
  77. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
  80. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +45 -45
  81. package/.next/standalone/.next/server/app/workspaces/page.js +1 -1
  82. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
  85. package/.next/standalone/.next/server/chunks/[externals]__12mj_bs._.js +3 -0
  86. package/.next/standalone/.next/server/chunks/[root-of-the-server]__03j20vp._.js +1 -1
  87. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05se6yk._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06m1r8x._.js +1 -1
  89. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_6swdz._.js → [root-of-the-server]__0g788b3._.js} +3 -3
  90. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0-0gs-6._.js → [root-of-the-server]__0j-4yc7._.js} +2 -2
  91. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o3iihg._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0v5.ht~._.js +3 -0
  93. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wuzc5o._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  96. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0l1.bgv._.js → [root-of-the-server]__0.m3hdp._.js} +2 -2
  97. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02-6df-._.js +3 -3
  98. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03e009u._.js +3 -3
  99. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0i~v.f0._.js → [root-of-the-server]__09zg1z2._.js} +2 -2
  100. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e_-mj-._.js +3 -3
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fzkdjl._.js +3 -3
  102. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ty1ao1._.js → [root-of-the-server]__0f~m-8x._.js} +2 -2
  103. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vrp4wc._.js → [root-of-the-server]__0nkk5tw._.js} +1 -1
  105. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pu-v0l._.js +3 -3
  106. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0x2jop0._.js → [root-of-the-server]__0s5c_.m._.js} +2 -2
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0um1ugs._.js +3 -3
  108. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  109. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__134_xv.._.js +1 -1
  110. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13vgkq5._.js +3 -3
  111. package/.next/standalone/.next/server/chunks/ssr/{_0qq3k6g._.js → _02yw.tu._.js} +3 -3
  112. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  113. package/.next/standalone/.next/server/chunks/ssr/{_0z58pqh._.js → _08gfd3m._.js} +3 -3
  114. package/.next/standalone/.next/server/chunks/ssr/_08z-g~5._.js +3 -3
  115. package/.next/standalone/.next/server/chunks/ssr/{_13dksil._.js → _0913rlo._.js} +2 -2
  116. package/.next/standalone/.next/server/chunks/ssr/_0_87rda._.js +3 -0
  117. package/.next/standalone/.next/server/chunks/ssr/_0_vjay8._.js +3 -3
  118. package/.next/standalone/.next/server/chunks/ssr/{_075_.cb._.js → _0bpuw.g._.js} +2 -2
  119. package/.next/standalone/.next/server/chunks/ssr/{_02o-w3k._.js → _0bxl8ws._.js} +2 -2
  120. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/{_0zbuayb._.js → _0fptgd5._.js} +2 -2
  122. package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
  123. package/.next/standalone/.next/server/chunks/ssr/_0r6gweb._.js +3 -3
  124. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  125. package/.next/standalone/.next/server/chunks/ssr/_0rt8jf_._.js +3 -3
  126. package/.next/standalone/.next/server/chunks/ssr/_0ueyys5._.js +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/_0uuzh5m._.js +3 -3
  128. package/.next/standalone/.next/server/chunks/ssr/{_0ncltnn._.js → _0v7fx~g._.js} +2 -2
  129. package/.next/standalone/.next/server/chunks/ssr/{_07ca~8h._.js → _0wism~u._.js} +2 -2
  130. package/.next/standalone/.next/server/chunks/ssr/_0~aon4t._.js +3 -3
  131. package/.next/standalone/.next/server/chunks/ssr/{_01xe7~b._.js → _0~eek5n._.js} +2 -2
  132. package/.next/standalone/.next/server/chunks/ssr/{_060_9cj._.js → _10h3uho._.js} +2 -2
  133. package/.next/standalone/.next/server/chunks/ssr/_10xi4vt._.js +4 -0
  134. package/.next/standalone/.next/server/chunks/ssr/{_084ifnn._.js → _12w8uug._.js} +3 -3
  135. package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  137. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  139. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  146. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  147. package/.next/standalone/.next/server/pages/500.html +1 -1
  148. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  149. package/.next/standalone/.next/server/server-reference-manifest.json +247 -247
  150. package/.next/standalone/.next/static/chunks/0.-zxtsxco8bd.js +1 -0
  151. package/.next/standalone/.next/static/chunks/{0_t-j983f5f0p.js → 00si9pyuu.huw.js} +1 -1
  152. package/.next/standalone/.next/static/chunks/04pw2khof~cip.js +1 -0
  153. package/.next/standalone/.next/static/chunks/05p8qmf14~0_n.js +1 -0
  154. package/.next/standalone/.next/static/chunks/07qaxp_r1s5c6.js +1 -0
  155. package/.next/standalone/.next/static/chunks/{15.pdp8xgoni1.js → 0_8kuv8c83uzb.js} +1 -1
  156. package/.next/standalone/.next/static/chunks/{0.onfoo7t4w-m.js → 0cek-x7mfk~on.js} +1 -1
  157. package/.next/standalone/.next/static/chunks/0cw.x2y2d~tq9.js +1 -0
  158. package/.next/standalone/.next/static/chunks/0d0m_9h0x6v-d.js +1 -0
  159. package/.next/standalone/.next/static/chunks/{01fk6.8bw14.7.js → 0dahitam46wjs.js} +1 -1
  160. package/.next/standalone/.next/static/chunks/0dn2uby3.r~i8.js +2 -0
  161. package/.next/standalone/.next/static/chunks/{0w1jry5z5w5~5.js → 0fbzsla5wwy9i.js} +1 -1
  162. package/.next/standalone/.next/static/chunks/0hfbmmcd4fqty.js +1 -0
  163. package/.next/standalone/.next/static/chunks/{0hf2igz3z1v.5.js → 0j5-kx25u4y7o.js} +1 -1
  164. package/.next/standalone/.next/static/chunks/{0t92fwd6kv5j_.js → 0m8.bvy~pci0u.js} +2 -2
  165. package/.next/standalone/.next/static/chunks/{11yv2zlsl_i7z.js → 0q.oq9hy_v7uw.js} +1 -1
  166. package/.next/standalone/.next/static/chunks/0t0dn.254zxs-.js +1 -0
  167. package/.next/standalone/.next/static/chunks/0t9~b7j139x~h.js +1 -0
  168. package/.next/standalone/.next/static/chunks/0utxs7_p1_s1k.js +1 -0
  169. package/.next/standalone/.next/static/chunks/{11x05y67gti4v.js → 0vj_1kxy3oc3z.js} +1 -1
  170. package/.next/standalone/.next/static/chunks/{0htnxzje.8d3f.js → 0ynv~nu57u5.n.js} +2 -2
  171. package/.next/standalone/.next/static/chunks/{015m584n.xxu~.js → 0zg1u7zkfyika.js} +1 -1
  172. package/.next/standalone/.next/static/chunks/{01vvdks5yzk7x.js → 0~ld2l-heikt8.js} +1 -1
  173. package/.next/standalone/.next/static/chunks/0~r18o267lsua.js +1 -0
  174. package/.next/standalone/.next/static/chunks/{0tfc~d_oxesgk.js → 13aiv_bq~wolv.js} +2 -2
  175. package/.next/standalone/.next/static/chunks/14hyegs.jm13b.js +1 -0
  176. package/.next/standalone/package.json +1 -1
  177. package/package.json +1 -1
  178. package/.next/standalone/.next/server/chunks/[externals]__0m5smhl._.js +0 -3
  179. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0sy6lau._.js +0 -3
  180. package/.next/standalone/.next/server/chunks/ssr/_00xgezz._.js +0 -3
  181. package/.next/standalone/.next/server/chunks/ssr/_0564air._.js +0 -4
  182. package/.next/standalone/.next/static/chunks/0132~w09sg8ej.js +0 -1
  183. package/.next/standalone/.next/static/chunks/030g1-s.qdj2n.js +0 -1
  184. package/.next/standalone/.next/static/chunks/07ucj-4sybtq9.js +0 -1
  185. package/.next/standalone/.next/static/chunks/08vuh22p.47~b.js +0 -2
  186. package/.next/standalone/.next/static/chunks/0cn44krrztr-n.js +0 -1
  187. package/.next/standalone/.next/static/chunks/0feyhaj64gfd~.js +0 -1
  188. package/.next/standalone/.next/static/chunks/0lq9lfznfhl-6.js +0 -1
  189. package/.next/standalone/.next/static/chunks/0plqjpgas0ygu.js +0 -1
  190. package/.next/standalone/.next/static/chunks/0x3tiuoe.l18z.js +0 -1
  191. package/.next/standalone/.next/static/chunks/0y8ywrftfsnux.js +0 -1
  192. package/.next/standalone/.next/static/chunks/11jg-t_iw_8i6.js +0 -1
  193. package/.next/standalone/.next/static/chunks/13z_8s26xa~p1.js +0 -1
  194. package/.next/standalone/.next/static/chunks/15vogvewouq8e.js +0 -1
  195. /package/.next/standalone/.next/static/{hA1HHDvQi_vSYi568JXho → NM0zzDCa9moGRI5bLTuel}/_buildManifest.js +0 -0
  196. /package/.next/standalone/.next/static/{hA1HHDvQi_vSYi568JXho → NM0zzDCa9moGRI5bLTuel}/_clientMiddlewareManifest.js +0 -0
  197. /package/.next/standalone/.next/static/{hA1HHDvQi_vSYi568JXho → NM0zzDCa9moGRI5bLTuel}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487486,e=>{"use strict";var t=e.i(565455),n=e.i(581263),o=e.i(294237),r=e.i(975157);let i=(0,o.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:o="default",render:s,...a}){var l;return l={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(i({variant:o}),e)},a),render:s,state:{slot:"badge",variant:o}},(0,n.useRenderElement)(l.defaultTagName??"div",l,l)}],487486)},37774,e=>{"use strict";var t=e.i(514798);let n=(0,t.createServerReference)("405c1285c94aa91e82909b249d6254ac70517340e9",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,n])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},110204,337822,e=>{"use strict";var t,n=e.i(289721),o=e.i(975157);e.s(["Label",0,function({className:e,...t}){return(0,n.jsx)("label",{"data-slot":"label",className:(0,o.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}],110204),e.s([],707132),e.i(707132);var r=e.i(965652),i=e.i(620163),s=e.i(528796),a=e.i(594640),l=e.i(306296),u=e.i(344478),d=e.i(205995),p=e.i(611008);e.i(708878);var c=e.i(462902);let g=r.createContext(void 0);function f(e){let t=r.useContext(g);if(void 0===t&&!e)throw Error((0,c.default)(47));return t}var v=e.i(585012),m=e.i(370161),S=e.i(596290),h=e.i(161476),b=e.i(903224),R=e.i(774641),E=e.i(586622),x=e.i(771326),C=e.i(87396),O=e.i(693354);let y={...x.popupStoreSelectors,disabled:(0,S.createSelector)(e=>e.disabled),instantType:(0,S.createSelector)(e=>e.instantType),openMethod:(0,S.createSelector)(e=>e.openMethod),openChangeReason:(0,S.createSelector)(e=>e.openChangeReason),modal:(0,S.createSelector)(e=>e.modal),stickIfOpen:(0,S.createSelector)(e=>e.stickIfOpen),titleElementId:(0,S.createSelector)(e=>e.titleElementId),descriptionElementId:(0,S.createSelector)(e=>e.descriptionElementId),openOnHover:(0,S.createSelector)(e=>e.openOnHover),closeDelay:(0,S.createSelector)(e=>e.closeDelay),hasViewport:(0,S.createSelector)(e=>e.hasViewport)};class T extends m.ReactStore{constructor(e){const t={...(0,x.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new h.Timeout,triggerElements:new C.PopupTriggerMap},y)}setOpen=(e,t)=>{let n=t.reason===E.REASONS.triggerHover,o=t.reason===E.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===E.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},s=this.state.floatingRootContext.context.events;s?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(O.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),v.flushSync(a)):a(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===E.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,b.useRefWithInit)(()=>new T(t)).current,o=e??n;return(0,R.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var I=e.i(67077),P=e.i(894621),k=e.i(892069);function w({props:e}){let{children:t,open:o,defaultOpen:c=!1,onOpenChange:f,onOpenChangeComplete:v,modal:m=!1,handle:S,triggerId:h,defaultTriggerId:b=null}=e,R=T.useStore(S?.store,{modal:m,open:c,openProp:o,activeTriggerId:b,triggerIdProp:h});(0,s.useOnFirstRender)(()=>{void 0===o&&!1===R.state.open&&!0===c&&R.update({open:!0,activeTriggerId:b})}),R.useControlledProp("openProp",o),R.useControlledProp("triggerIdProp",h);let x=R.useState("open"),C=R.useState("positionerElement"),O=R.useState("payload"),y=R.useState("openChangeReason");R.useContextCallback("onOpenChange",f),R.useContextCallback("onOpenChangeComplete",v);let{openMethod:A,triggerProps:M}=(0,k.useOpenInteractionType)(x);(0,P.useImplicitActiveTrigger)(R);let{forceUnmount:F}=(0,P.useOpenStateTransitions)(x,R,()=>{R.update({stickIfOpen:!0,openChangeReason:null})});(0,i.useScrollLock)(x&&!0===m&&y!==E.REASONS.triggerHover&&"touch"!==A,C),r.useEffect(()=>{x||R.context.stickIfOpenTimeout.clear()},[R,x]);let N=r.useCallback(e=>{let t=(0,I.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{R.set("preventUnmountingOnClose",!0)},t},[R]),j=r.useCallback(()=>{R.setOpen(!1,N(E.REASONS.imperativeAction))},[R,N]);r.useImperativeHandle(e.actionsRef,()=>({unmount:F,close:j}),[F,j]);let D=(0,p.useSyncedFloatingRootContext)({popupStore:R,onOpenChange:R.setOpen}),H=(0,a.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===m?"sloppy":"intentional",touch:"sloppy"}}),B=(0,u.useRole)(D),{getReferenceProps:V,getFloatingProps:L,getTriggerProps:U}=(0,l.useInteractions)([H,B]),G=r.useMemo(()=>V(M),[V,M]),K=r.useMemo(()=>U(M),[U,M]),_=r.useMemo(()=>L(),[L]);R.useSyncedValues({modal:m,openMethod:A,activeTriggerProps:G,inactiveTriggerProps:K,popupProps:_,floatingRootContext:D,nested:null!=(0,d.useFloatingParentNodeId)()});let z=r.useMemo(()=>({store:R}),[R]);return(0,n.jsx)(g.Provider,{value:z,children:"function"==typeof t?t({payload:O}):t})}var A=e.i(887642),M=e.i(282109),F=e.i(845756),N=e.i(581263),j=e.i(660272),D=e.i(430557),H=e.i(411657),B=e.i(207516),V=e.i(221732),L=e.i(682354),U=e.i(870541);let G=r.forwardRef(function(e,t){let{render:o,className:i,disabled:s=!1,nativeButton:a=!0,handle:u,payload:d,openOnHover:p=!1,delay:g=300,closeDelay:m=0,id:S,...h}=e,b=f(!0),R=u?.store??b?.store;if(!R)throw Error((0,c.default)(74));let x=(0,B.useBaseUiId)(S),C=R.useState("isTriggerActive",x),y=R.useState("floatingRootContext"),T=R.useState("isOpenedByTrigger",x),k=r.useRef(null),{registerTrigger:w,isMountedByThisTrigger:G}=(0,P.useTriggerDataForwarding)(x,k,R,{payload:d,disabled:s,openOnHover:p,closeDelay:m}),K=R.useState("openChangeReason"),_=R.useState("stickIfOpen"),z=R.useState("openMethod"),W=(0,H.useHoverReferenceInteraction)(y,{enabled:null!=y&&p&&("touch"!==z||K!==E.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,j.safePolygon)(),restMs:g,delay:{close:m},triggerElementRef:k,isActiveTrigger:C}),Y=(0,D.useClick)(y,{enabled:null!=y,stickIfOpen:_}),q=(0,l.useInteractions)([Y]),J=R.useState("triggerProps",G),{getButtonProps:Q,buttonRef:X}=(0,M.useButton)({disabled:s,native:a}),Z=r.useMemo(()=>({open:e=>e&&K===E.REASONS.triggerPress?F.pressableTriggerOpenStateMapping.open(e):F.triggerOpenStateMapping.open(e)}),[K]),$=(0,N.useRenderElement)("button",e,{state:{disabled:s,open:T},ref:[X,t,w,k],props:[q.getReferenceProps(),W,J,{[O.CLICK_TRIGGER_IDENTIFIER]:"",id:x},h,Q],stateAttributesMapping:Z}),ee=r.useRef(null),et=(0,A.useStableCallback)(e=>{v.flushSync(()=>{R.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,U.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,A.useStableCallback)(e=>{let t=R.select("positionerElement");if(t&&(0,U.isOutsideEvent)(e,t))R.context.beforeContentFocusGuardRef.current?.focus();else{v.flushSync(()=>{R.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,U.getTabbableAfterElement)(R.context.triggerFocusTargetRef.current||k.current);for(;null!==n&&(0,L.contains)(t,n);){let e=n;if((n=(0,U.getNextTabbable)(n))===e)break}n?.focus()}});return C?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(V.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(r.Fragment,{children:$},x),(0,n.jsx)(V.FocusGuard,{ref:R.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(r.Fragment,{children:$},x)});var K=e.i(888393);let _=r.createContext(void 0),z=r.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=f();return i.useState("mounted")||o?(0,n.jsx)(_.Provider,{value:o,children:(0,n.jsx)(K.FloatingPortal,{ref:t,...r})}):null});var W=e.i(831766),Y=e.i(804849);let q=r.createContext(void 0);function J(){let e=r.useContext(q);if(!e)throw Error((0,c.default)(46));return e}var Q=e.i(887943),X=e.i(72287),Z=e.i(412522),$=e.i(431362),ee=e.i(808754);let et=r.forwardRef(function(e,t){let{render:o,className:i,anchor:s,positionMethod:a="absolute",side:l="bottom",align:u="center",sideOffset:p=0,alignOffset:g=0,collisionBoundary:v="clipping-ancestors",collisionPadding:m=5,arrowPadding:S=5,sticky:h=!1,disableAnchorTracking:b=!1,collisionAvoidance:R=O.POPUP_COLLISION_AVOIDANCE,...x}=e,{store:C}=f(),y=function(){let e=r.useContext(_);if(void 0===e)throw Error((0,c.default)(45));return e}(),T=(0,d.useFloatingNodeId)(),I=C.useState("floatingRootContext"),P=C.useState("mounted"),k=C.useState("open"),w=C.useState("openChangeReason"),A=C.useState("activeTriggerElement"),M=C.useState("modal"),j=C.useState("positionerElement"),D=C.useState("instantType"),H=C.useState("transitionStatus"),B=C.useState("hasViewport"),V=r.useRef(null),L=(0,Z.useAnimationsFinished)(j,!1,!1),U=(0,Q.useAnchorPositioning)({anchor:s,floatingRootContext:I,positionMethod:a,mounted:P,side:l,sideOffset:p,align:u,alignOffset:g,arrowPadding:S,collisionBoundary:v,collisionPadding:m,sticky:h,disableAnchorTracking:b,keepMounted:y,nodeId:T,collisionAvoidance:R,adaptiveOrigin:B?$.adaptiveOrigin:void 0}),G=r.useMemo(()=>{let e={};return k||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...U.positionerStyles,...e}}},[k,P,U.positionerStyles]),K=r.useMemo(()=>({props:G,...U}),[G,U]),z=I.useState("domReferenceElement");(0,Y.useIsoLayoutEffect)(()=>{let e=V.current;if(z&&(V.current=z),e&&z&&z!==e){C.set("instantType",void 0);let e=new AbortController;return L(()=>{C.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[z,L,C]);let J={open:k,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:D},et=r.useCallback(e=>{C.set("positionerElement",e)},[C]),en=(0,N.useRenderElement)("div",e,{state:J,props:[K.props,(0,ee.getDisabledMountTransitionStyles)(H),x],ref:[t,et],stateAttributesMapping:F.popupStateMapping});return(0,n.jsxs)(q.Provider,{value:K,children:[P&&!0===M&&w!==E.REASONS.triggerHover&&(0,n.jsx)(X.InternalBackdrop,{ref:C.context.internalBackdropRef,inert:(0,W.inertValue)(!k),cutout:A}),(0,n.jsx)(d.FloatingNode,{id:T,children:en})]})});var en=e.i(92615),eo=e.i(11931),er=e.i(511980),ei=e.i(809058),es=e.i(504068),ea=e.i(197920),el=e.i(196368);let eu=r.createContext(void 0);function ed(e){let{value:t,children:o}=e;return(0,n.jsx)(eu.Provider,{value:t,children:o})}let ep={...F.popupStateMapping,...ei.transitionStatusMapping},ec=r.forwardRef(function(e,t){let{className:o,render:i,initialFocus:s,finalFocus:a,...l}=e,{store:u}=f(),d=J(),p=null!=(0,el.useToolbarRootContext)(!0),{context:c,hasClosePart:g}=function(){let[e,t]=r.useState(0),n=(0,A.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),v=u.useState("open"),m=u.useState("openMethod"),S=u.useState("instantType"),h=u.useState("transitionStatus"),b=u.useState("popupProps"),R=u.useState("titleElementId"),x=u.useState("descriptionElementId"),C=u.useState("modal"),O=u.useState("mounted"),y=u.useState("openChangeReason"),T=u.useState("activeTriggerElement"),I=u.useState("floatingRootContext");(0,es.useOpenChangeComplete)({open:v,ref:u.context.popupRef,onComplete(){v&&u.context.onOpenChangeComplete?.(!0)}});let P=u.useState("disabled"),k=u.useState("openOnHover"),w=u.useState("closeDelay");(0,er.useHoverFloatingInteraction)(I,{enabled:k&&!P,closeDelay:w});let M=void 0===s?function(e){return"touch"!==e||u.context.popupRef.current}:s,F={open:v,side:d.side,align:d.align,instant:S,transitionStatus:h},j=r.useCallback(e=>{u.set("popupElement",e)},[u]),D=(0,N.useRenderElement)("div",e,{state:F,ref:[t,u.context.popupRef,j],props:[b,{"aria-labelledby":R,"aria-describedby":x,onKeyDown(e){p&&ea.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ee.getDisabledMountTransitionStyles)(h),l],stateAttributesMapping:ep});return(0,n.jsx)(eo.FloatingFocusManager,{context:I,openInteractionType:m,modal:!1!==C&&g,disabled:!O||y===E.REASONS.triggerHover,initialFocus:M,returnFocus:a,restoreFocus:"popup",previousFocusableElement:(0,en.isHTMLElement)(T)?T:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(ed,{value:c,children:D})})}),eg=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:d,arrowStyles:p}=J();return(0,N.useRenderElement)("div",e,{state:{open:s,side:l,align:u,uncentered:d},ref:[t,a],props:[{style:p,"aria-hidden":!0},r],stateAttributesMapping:F.popupStateMapping})}),ef={...F.popupStateMapping,...ei.transitionStatusMapping},ev=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,N.useRenderElement)("div",e,{state:{open:s,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===E.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},r],stateAttributesMapping:ef})}),em=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("titleElementId",s),()=>{i.set("titleElementId",void 0)}),[i,s]),(0,N.useRenderElement)("h2",e,{ref:t,props:[{id:s},r]})}),eS=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",s),()=>{i.set("descriptionElementId",void 0)}),[i,s]),(0,N.useRenderElement)("p",e,{ref:t,props:[{id:s},r]})}),eh=r.forwardRef(function(e,t){let n,{render:o,className:i,disabled:s=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:d}=(0,M.useButton)({disabled:s,focusableWhenDisabled:!1,native:a}),{store:p}=f();return n=r.useContext(eu),(0,Y.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,N.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){p.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,d]})}),eb=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eR=e.i(203667);let eE={activationDirection:e=>e?{"data-activation-direction":e}:null},ex=r.forwardRef(function(e,t){let{render:n,className:o,children:r,...i}=e,{store:s}=f(),{side:a}=J(),l=s.useState("instantType"),{children:u,state:d}=(0,eR.usePopupViewport)({store:s,side:a,cssVars:eb,children:r}),p={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l};return(0,N.useRenderElement)("div",e,{state:p,ref:t,props:[i,{children:u}],stateAttributesMapping:eE})});class eC{constructor(){this.store=new T}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,c.default)(80,e));this.store.setOpen(!0,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eg,"Backdrop",0,ev,"Close",0,eh,"Description",0,eS,"Handle",0,eC,"Popup",0,ec,"Portal",0,z,"Positioner",0,et,"Root",0,function(e){return f(!0)?(0,n.jsx)(w,{props:e}):(0,n.jsx)(d.FloatingTree,{children:(0,n.jsx)(w,{props:e})})},"Title",0,em,"Trigger",0,G,"Viewport",0,ex,"createHandle",0,function(){return new eC}],107641);var eO=e.i(107641),eO=eO;e.s(["Popover",0,function({...e}){return(0,n.jsx)(eO.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...a}){return(0,n.jsx)(eO.Portal,{children:(0,n.jsx)(eO.Positioner,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:(0,n.jsx)(eO.Popup,{"data-slot":"popover-content",className:(0,o.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(eO.Trigger,{"data-slot":"popover-trigger",...e})}],337822)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,565893,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return o},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return l}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function s(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,i(e));else t.set(r,i(a));return t}function o(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},204575,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return p},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return i},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return d},isAbsoluteUrl:function(){return o},isResSent:function(){return f},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return S}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function d(){let{href:e}=window.location,t=c();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&f(r))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let p="u">typeof performance,g=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},619172,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},123960,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("403b715483ec5281a1b64c7bfc0d57b635266f9ce5",t.callServer,void 0,t.findSourceMapURL,"getLabelsForWorkspace");e.s(["getLabelsForWorkspace",0,r])},464249,e=>{"use strict";let t=(0,e.i(572989).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],464249)},821957,e=>{"use strict";var t=e.i(965652),r=(e,t,r,a,n,s,i,l)=>{let o=document.documentElement,c=["light","dark"];function d(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,a=r&&s?n.map(e=>s[e]||e):n;r?(o.classList.remove(...a),o.classList.add(s&&s[t]?s[t]:t)):o.setAttribute(e,t)}),r=t,l&&c.includes(r)&&(o.style.colorScheme=r)}if(a)d(a);else try{let e=localStorage.getItem(t)||r,a=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(a)}catch(e){}},a=["light","dark"],n="(prefers-color-scheme: dark)",s="u"<typeof window,i=t.createContext(void 0),l={setTheme:e=>{},themes:[]},o=["light","dark"],c=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:l=!0,storageKey:c="theme",themes:m=o,defaultTheme:p=s?"system":"light",attribute:g="data-theme",value:v,children:y,nonce:b,scriptProps:x})=>{let[k,S]=t.useState(()=>u(c,p)),[w,C]=t.useState(()=>"system"===k?h():k),j=v?Object.values(v):m,E=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&s&&(t=h());let n=v?v[t]:t,i=r?f(b):null,o=document.documentElement,c=e=>{"class"===e?(o.classList.remove(...j),n&&o.classList.add(n)):e.startsWith("data-")&&(n?o.setAttribute(e,n):o.removeAttribute(e))};if(Array.isArray(g)?g.forEach(c):c(g),l){let e=a.includes(p)?p:null,r=a.includes(t)?t:e;o.style.colorScheme=r}null==i||i()},[b]),N=t.useCallback(e=>{let t="function"==typeof e?e(k):e;S(t);try{localStorage.setItem(c,t)}catch(e){}},[k]),M=t.useCallback(t=>{C(h(t)),"system"===k&&s&&!e&&E("system")},[k,e]);t.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(M),M(e),()=>e.removeListener(M)},[M]),t.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?S(e.newValue):N(p))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[N]),t.useEffect(()=>{E(null!=e?e:k)},[e,k]);let P=t.useMemo(()=>({theme:k,setTheme:N,forcedTheme:e,resolvedTheme:"system"===k?w:k,themes:s?[...m,"system"]:m,systemTheme:s?w:void 0}),[k,N,e,w,s,m]);return t.createElement(i.Provider,{value:P},t.createElement(d,{forcedTheme:e,storageKey:c,attribute:g,enableSystem:s,enableColorScheme:l,defaultTheme:p,value:v,themes:m,nonce:b,scriptProps:x}),y)},d=t.memo(({forcedTheme:e,storageKey:a,attribute:n,enableSystem:s,enableColorScheme:i,defaultTheme:l,value:o,themes:c,nonce:d,scriptProps:u})=>{let f=JSON.stringify([n,a,l,e,c,o,s,i]).slice(1,-1);return t.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"u"<typeof window?d:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${f})`}})}),u=(e,t)=>{let r;if(!s){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},f=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},h=e=>(e||(e=window.matchMedia(n)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(i)?t.createElement(t.Fragment,null,e.children):t.createElement(c,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(i))?e:l}])},946515,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("00785eea567d5ce6eaa3cb6fddc5345423fe2bbe25",t.callServer,void 0,t.findSourceMapURL,"getActualWsPort");e.s(["getActualWsPort",0,r])},966001,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(938499),n=e.i(194358),s=e.i(519455);class i extends r.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 p-8 text-center",children:[(0,t.jsx)(a.AlertCircle,{className:"h-8 w-8 text-destructive"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:this.state.error?.message??"An unexpected error occurred"})]}),(0,t.jsxs)(s.Button,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:[(0,t.jsx)(n.RefreshCw,{className:"mr-2 h-3.5 w-3.5"}),"Retry"]})]}):this.props.children}}e.s(["ErrorBoundary",0,i])},307136,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("407e396bed3447b8c5e62c4025e271623c45fcf3a5",t.callServer,void 0,t.findSourceMapURL,"installExtension");e.s(["installExtension",0,r])},812983,e=>{"use strict";let t=(0,e.i(572989).default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);e.s(["FileCode",0,t],812983)},887911,e=>{"use strict";var t=e.i(738690),r=e.i(812983);let a={rg:{id:"rg",name:"代码搜索 (ripgrep)",description:"基于 rg 的全文代码搜索",icon:t.Search,sizeMB:5,homepageUrl:"https://github.com/BurntSushi/ripgrep#installation",manualInstall:!0},monaco:{id:"monaco",name:"代码编辑器 (Monaco)",description:"VS Code 同款 Web 编辑器",icon:r.FileCode,sizeMB:15,homepageUrl:"https://microsoft.github.io/monaco-editor/"}},n=[a.rg,a.monaco];e.s(["listExtensionMetadata",0,function(){return n}])},657056,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("609b91d89fc7a446819f187dd59248d15954611078",t.callServer,void 0,t.findSourceMapURL,"setConfigValue");e.s(["setConfigValue",0,r])},387091,15299,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,r],387091);let a=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,a],15299)},699375,e=>{"use strict";var t,r=e.i(289721);e.s([],159880),e.i(159880),e.i(708878);var a=e.i(965652),n=e.i(314757),s=e.i(887642),i=e.i(362891),l=e.i(804849),o=e.i(416369),c=e.i(954588),d=e.i(581263),u=e.i(565455),f=e.i(207516),h=e.i(282109),m=e.i(462902);let p=a.createContext(void 0);var g=e.i(551974);let v=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),y={...g.fieldValidityMapping,checked:e=>e?{[v.checked]:""}:{[v.unchecked]:""}};var b=e.i(421689),x=e.i(890514),k=e.i(571870),S=e.i(179279),w=e.i(103353),C=e.i(67077),j=e.i(586622),E=e.i(353052);let N=a.forwardRef(function(e,t){let{checked:m,className:g,defaultChecked:v,"aria-labelledby":N,id:M,inputRef:P,name:T,nativeButton:O=!1,onCheckedChange:I,readOnly:R=!1,required:L=!1,disabled:F=!1,render:A,uncheckedValue:z,value:D,...V}=e,{clearErrors:B}=(0,k.useFormContext)(),{state:U,setTouched:_,setDirty:H,validityData:$,setFilled:K,setFocused:J,shouldValidateOnChange:q,validationMode:W,disabled:G,name:Y,validation:Z}=(0,x.useFieldRootContext)(),{labelId:Q}=(0,S.useLabelableContext)(),X=G||F,ee=Y??T,et=(0,s.useStableCallback)(I),er=a.useRef(null),ea=(0,i.useMergedRefs)(er,P,Z.inputRef),en=a.useRef(null),es=(0,f.useBaseUiId)(),ei=(0,w.useLabelableId)({id:M,implicit:!1,controlRef:en}),el=O?void 0:ei,[eo,ec]=(0,n.useControlled)({controlled:m,default:!!v,name:"Switch",state:"checked"});(0,b.useField)({id:es,commit:Z.commit,value:eo,controlRef:en,name:ee,getValue:()=>eo}),(0,l.useIsoLayoutEffect)(()=>{er.current&&K(er.current.checked)},[er,K]),(0,E.useValueChanged)(eo,()=>{B(ee),H(eo!==$.initialValue),K(eo),q()?Z.commit(eo):Z.commit(eo,!0)});let{getButtonProps:ed,buttonRef:eu}=(0,h.useButton)({disabled:X,native:O}),ef=function(e,t,r,n=!0,s){let[i,o]=a.useState(),c=(0,f.useBaseUiId)(s?`${s}-label`:void 0),d=e??t??i;return(0,l.useIsoLayoutEffect)(()=>{let a=e||t||!n?void 0:function(e,t){let r=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let r=e.id;if(r){let t=e.nextElementSibling;if(t&&t.htmlFor===r)return t}let a=e.labels;return a&&a[0]}(e);if(r)return!r.id&&t&&(r.id=t),r.id||void 0}(r.current,c);i!==a&&o(a)}),d}(N,Q,er,!O,el),eh=a.useMemo(()=>(0,u.mergeProps)({checked:eo,disabled:X,id:el,name:ee,required:L,style:ee?o.visuallyHiddenInput:o.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ea,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,r=(0,C.createChangeEventDetails)(j.REASONS.none,e.nativeEvent);et?.(t,r),r.isCanceled||ec(t)},onFocus(){en.current?.focus()}},Z.getInputValidationProps,void 0!==D?{value:D}:c.EMPTY_OBJECT),[eo,X,ea,el,ee,et,L,ec,Z,D]),em=a.useMemo(()=>({...U,checked:eo,disabled:X,readOnly:R,required:L}),[U,eo,X,R,L]),ep=(0,d.useRenderElement)("span",e,{state:em,ref:[t,en,eu],props:[{id:O?ei:es,role:"switch","aria-checked":eo,"aria-readonly":R||void 0,"aria-required":L||void 0,"aria-labelledby":ef,onFocus(){X||J(!0)},onBlur(){let e=er.current;e&&!X&&(_(!0),J(!1),"onBlur"===W&&Z.commit(e.checked))},onClick(e){R||X||(e.preventDefault(),er.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},Z.getValidationProps,V,ed],stateAttributesMapping:y});return(0,r.jsxs)(p.Provider,{value:em,children:[ep,!eo&&ee&&void 0!==z&&(0,r.jsx)("input",{type:"hidden",name:ee,value:z}),(0,r.jsx)("input",{...eh})]})}),M=a.forwardRef(function(e,t){let{render:r,className:n,...s}=e,{state:i}=(0,x.useFieldRootContext)(),l=function(){let e=a.useContext(p);if(void 0===e)throw Error((0,m.default)(63));return e}(),o={...i,...l};return(0,d.useRenderElement)("span",e,{state:o,ref:t,stateAttributesMapping:y,props:s})});e.s(["Root",0,N,"Thumb",0,M],803205);var P=e.i(803205),P=P,T=e.i(975157);e.s(["Switch",0,function({className:e,size:t="default",...a}){return(0,r.jsx)(P.Root,{"data-slot":"switch","data-size":t,className:(0,T.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...a,children:(0,r.jsx)(P.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}],699375)},263938,e=>{"use strict";let t=(0,e.i(572989).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",0,t],263938)},989548,338187,e=>{"use strict";let t=(0,e.i(572989).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],989548);var r=e.i(289721),a=e.i(965652),n=e.i(48783);let s="tower-assistant-sessions",i="tower-assistant-active-session";function l(){try{let e=localStorage.getItem(s);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t}catch{return[]}}function o(){return localStorage.getItem(i)}function c(e){null===e?localStorage.removeItem(i):localStorage.setItem(i,e)}let d=(0,a.createContext)(null);function u(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}let f="assistant-attachment-cache";function h(e,t,r){try{let a=sessionStorage.getItem(f),n=a?JSON.parse(a):{};n[e]||(n[e]={}),n[e][t]=r,sessionStorage.setItem(f,JSON.stringify(n))}catch{}}e.s(["AssistantProvider",0,function({children:e}){let[t,i]=(0,a.useState)(!1),[m,p]=(0,a.useState)(!1),[g,v]=(0,a.useState)("sidebar"),[y,b]=(0,a.useState)(null),[x,k]=(0,a.useState)([]),[S,w]=(0,a.useState)("idle"),[C,j]=(0,a.useState)(!1),E=(0,a.useRef)([]),N=(0,a.useRef)(null),M=(0,a.useRef)(null),[P,T]=(0,a.useState)([]),[O,I]=(0,a.useState)(null),R=(0,a.useRef)(!1),L=(0,a.useCallback)(()=>{k([...E.current])},[]),F=(0,a.useCallback)(async()=>{v("dialog"===await (0,n.getConfigValue)("assistant.displayMode","sidebar")?"dialog":"sidebar")},[]);(0,a.useEffect)(()=>{F()},[F]);let A=(0,a.useCallback)(async()=>{T(l())},[]),z=(0,a.useCallback)(async e=>{j(!0);try{let t=await fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(e)}`);if(!t.ok)return;let r=await t.json();if(Array.isArray(r.messages)){E.current=r.messages;let t=function(e){try{let t=sessionStorage.getItem(f);if(!t)return{};return JSON.parse(t)[e]??{}}catch{return{}}}(e);if(Object.keys(t).length>0){let e=0;E.current=E.current.map(r=>{if("user"===r.role){let a=t[e];if(e++,a?.length)return{...r,attachmentFilenames:a}}return r})}k([...E.current])}}catch{}finally{j(!1)}},[]);(0,a.useEffect)(()=>{A();let e=o();e&&(I(e),N.current=e,z(e))},[A,z]);let D=(0,a.useCallback)(()=>{M.current?.abort(),N.current=null,R.current=!1,I(null),c(null),E.current=[],k([]),w("idle")},[]),V=(0,a.useCallback)(e=>{M.current?.abort(),N.current=e,R.current=!0,I(e),c(e),E.current=[],k([]),w("idle"),z(e)},[z]),B=(0,a.useCallback)(e=>{let t;t=l().filter(t=>t.id!==e),localStorage.setItem(s,JSON.stringify(t)),o()===e&&c(null),T(l()),O===e&&D()},[O,D]),U=(0,a.useCallback)(async()=>{p(!0);try{await F(),i(!0)}finally{p(!1)}},[F]),_=(0,a.useCallback)(()=>{i(!1),M.current?.abort()},[]),H=(0,a.useCallback)(()=>{t||m?_():U()},[t,m,_,U]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"l"===e.key&&(e.preventDefault(),H())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[H]);let $=(0,a.useCallback)(async(e,t)=>{if(!e.trim()&&!t?.attachmentFilenames?.length)return;M.current?.abort();let r=new AbortController;M.current=r;let a=0!==E.current.length||R.current?null:e,n=u();if(E.current=[...E.current,{id:u(),role:"user",content:e,attachmentFilenames:t?.attachmentFilenames?.length?t.attachmentFilenames:void 0},{id:n,role:"thinking",content:"",isStreaming:!0}],L(),t?.attachmentFilenames?.length&&N.current){let e=E.current.filter(e=>"user"===e.role).length-1;h(N.current,e,t.attachmentFilenames)}w("connecting");let i=null;try{let o=await fetch("/api/internal/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e,sessionId:N.current,attachmentFilenames:t?.attachmentFilenames??[]}),signal:r.signal});if(!o.ok||!o.body)throw Error(`HTTP ${o.status}`);w("streaming");let d=o.body.getReader(),f=new TextDecoder,m="";for(;;){let{done:e,value:r}=await d.read();if(e)break;let o=(m+=f.decode(r,{stream:!0})).split("\n");for(let e of(m=o.pop()??"",o)){let r;if(e.startsWith("data: ")){try{r=JSON.parse(e.slice(6).trim())}catch{continue}if(r.sessionId){let e=N.current;if(N.current=r.sessionId,a&&!R.current&&r.sessionId!==e){R.current=!0;let e=new Date().toISOString(),n={id:r.sessionId,title:function(e){let t=e.trim();return t?t.length>30?t.slice(0,30):t:"New Session"}(a),createdAt:e,updatedAt:e};!function(e){let t=[e,...l().filter(t=>t.id!==e.id)].slice(0,10);localStorage.setItem(s,JSON.stringify(t))}(n),T(l()),I(r.sessionId),c(r.sessionId),t?.attachmentFilenames?.length&&h(r.sessionId,0,t.attachmentFilenames)}}switch(r.type){case"text_delta":{let e=E.current.filter(e=>e.id!==n);i?E.current=e.map(e=>e.id===i?{...e,content:e.content+(r.content??""),isStreaming:!0}:e):(i=u(),E.current=[...e,{id:i,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"text":{let e=E.current.filter(e=>e.id!==n);i?E.current=e.map(e=>e.id===i?{...e,content:r.content??e.content,isStreaming:!0}:e):(i=u(),E.current=[...e,{id:i,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"tool_start":{let e=E.current.filter(e=>e.id!==n);i?(E.current=e.map(e=>e.id===i?{...e,isStreaming:!1}:e),i=null):E.current=e,E.current=[...E.current,{id:u(),role:"tool",content:`Calling ${r.content??"tool"}...`,toolName:r.content,isStreaming:!0}],L();break}case"tool_use":{let e=E.current.filter(e=>e.id!==n),t=i?e.map(e=>e.id===i?{...e,isStreaming:!1}:e):e;i=null,E.current=[...t,{id:u(),role:"tool",content:JSON.stringify(r.toolInput??{},null,2),toolName:r.content}],L();break}case"tool_result":E.current=[...E.current,{id:u(),role:"tool",content:String(r.toolOutput??""),toolName:`${r.content??"tool"} (result)`}],L();break;case"error":E.current=[...E.current.filter(e=>e.id!==n),{id:u(),role:"assistant",content:`Error: ${r.content??"Unknown error"}`}],L(),w("error");break;case"done":i&&(E.current=E.current.map(e=>e.id===i?{...e,isStreaming:!1}:e)),E.current=E.current.filter(e=>e.id!==n),L(),w("idle")}}}}E.current=E.current.filter(e=>e.id!==n),L(),w(e=>"streaming"===e?"idle":e),A()}catch(e){if("AbortError"===e.name)return;E.current=[...E.current.filter(e=>e.id!==n),{id:u(),role:"assistant",content:`Connection error: ${e.message??"Unknown error"}`}],L(),w("error")}},[L,A]),K=(0,a.useCallback)(()=>{M.current?.abort(),M.current=null;let e=[...E.current].reverse().find(e=>"user"===e.role),t=e?.content??null;if(e){let t=E.current.lastIndexOf(e);E.current=E.current.slice(0,t),k([...E.current])}return w("idle"),t},[]),J=x[x.length-1],q="connecting"===S||"streaming"===S||J?.role==="thinking"&&!0===J.isStreaming;return(0,r.jsx)(d.Provider,{value:{isOpen:t,isStarting:m,displayMode:g,worktreePath:y,toggleAssistant:H,closeAssistant:_,chatMessages:x,chatStatus:S,isChatThinking:q,isLoadingHistory:C,sendChatMessage:$,cancelChat:K,sessions:P,activeSessionId:O,createNewSession:D,switchSession:V,removeSession:B,refreshSessions:A},children:e})},"useAssistant",0,function(){let e=(0,a.useContext)(d);if(!e)throw Error("useAssistant must be used within an AssistantProvider");return e}],338187)},275360,e=>{"use strict";let t=(0,e.i(572989).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]]);e.s(["FolderPlus",0,t],275360)},431828,763131,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 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 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",0,r],431828);let a=(0,t.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["Home",0,a],763131)},256753,e=>{"use strict";let t=(0,e.i(572989).default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);e.s(["HardDrive",0,t],256753)},224277,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(977982),n=e.i(431828),s=e.i(763131),i=e.i(472074),l=e.i(738690),o=e.i(256753),c=e.i(275360),d=e.i(597746),u=e.i(657153),f=e.i(776639),h=e.i(519455),m=e.i(793479),p=e.i(746798),g=e.i(533499),v=e.i(759684);e.s(["FolderBrowserDialog",0,function({open:e,onOpenChange:y,onSelect:b,gitOnly:x=!1}){let{t:k}=(0,g.useI18n)(),[S,w]=(0,r.useState)(null),[C,j]=(0,r.useState)(!1),[E,N]=(0,r.useState)(null),[M,P]=(0,r.useState)(""),[T,O]=(0,r.useState)(""),[I,R]=(0,r.useState)(!1),L=(0,r.useRef)(null),[F,A]=(0,r.useState)(!1),[z,D]=(0,r.useState)(""),V=(0,r.useRef)(null),B=(0,r.useCallback)(async e=>{j(!0),N(null),O(""),R(!1);try{let t=e?`/api/browse-fs?path=${encodeURIComponent(e)}`:"/api/browse-fs",r=await fetch(t);if(!r.ok){let e=await r.json();N(e.error||"Failed");return}let a=await r.json();w(a),P(a.currentPath)}catch{N("Failed to browse filesystem")}finally{j(!1)}},[]);(0,r.useEffect)(()=>{e&&(B(),setTimeout(()=>L.current?.focus(),200))},[e,B]);let U=()=>{M.trim()&&B(M.trim())},_=async()=>{let e=z.trim();if(e&&S?.currentPath)try{let t=await fetch("/api/browse-fs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:S.currentPath,name:e})});if(!t.ok){let e=await t.json();N(e.error||k("folder.newFolderError"));return}A(!1),D(""),B(S.currentPath)}catch{N(k("folder.newFolderError"))}},H=()=>{A(!1),D("")},$=S?.folders.filter(e=>e.name.toLowerCase().includes(T.toLowerCase()))??[];return(0,t.jsx)(f.Dialog,{open:e,onOpenChange:y,children:(0,t.jsx)(f.DialogContent,{className:"p-0 gap-0",style:{maxWidth:"36rem",overflow:"hidden"},children:(0,t.jsxs)("div",{className:"flex flex-col max-h-[60vh] overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-5 pt-5 pb-3 shrink-0",children:[(0,t.jsx)(f.DialogTitle,{children:x?k("folder.selectGitRepo"):k("folder.selectFolder")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:k("folder.hint")})]}),(0,t.jsxs)("div",{className:"border-t border-border px-4 pt-3 pb-2 shrink-0",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("folder.manualInput")}),(0,t.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,t.jsx)(m.Input,{ref:L,value:M,onChange:e=>P(e.target.value),onKeyDown:e=>"Enter"===e.key&&U(),placeholder:"/path/to/your/project",title:M,className:"flex-1 min-w-0"}),(0,t.jsx)(h.Button,{variant:"outline",onClick:U,className:"h-8 px-3 shrink-0",children:k("folder.goTo")})]})]}),(0,t.jsxs)("div",{className:"px-4 py-2 shrink-0",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("folder.searchDir")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsx)(l.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("input",{value:T,onChange:e=>O(e.target.value),placeholder:"Filter folders and files...",className:"h-8 w-full rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 border-y border-border px-4 py-2 shrink-0 min-w-0",children:[(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>S?.homePath&&B(S.homePath),className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(s.Home,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Home"})]}),(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{S&&("__DRIVES__"===S.parentPath?R(!0):(R(!1),B(S.parentPath)))},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(i.ChevronUp,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Parent"})]}),S?.isWindows&&(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:I?"default":"outline",size:"icon-sm",onClick:()=>R(e=>!e),className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(o.HardDrive,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Drives"})]}),(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{A(!0),D(""),setTimeout(()=>V.current?.focus(),50)},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(c.FolderPlus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:k("folder.newFolder")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground font-mono",title:S?.currentPath??"",children:S?.currentPath??"..."})]}),(0,t.jsxs)(v.ScrollArea,{className:"min-h-0 flex-1",children:[F&&(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-border/30 px-4 py-2",children:[(0,t.jsx)(a.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,t.jsx)("input",{ref:V,value:z,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&_(),"Escape"===e.key&&H()},placeholder:k("folder.newFolderPlaceholder"),className:"h-7 flex-1 rounded-md border border-border bg-background px-2 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:_,disabled:!z.trim(),className:"text-emerald-400 hover:text-emerald-300",children:(0,t.jsx)(d.Check,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:H,className:"text-muted-foreground",children:(0,t.jsx)(u.X,{className:"h-3.5 w-3.5"})})]}),C&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Loading..."}),E&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-rose-400",children:E}),I&&(!S?.drives||0===S.drives.length)&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:k("folder.noDrives")}),I&&S?.drives&&S.drives.map(e=>(0,t.jsxs)("button",{onClick:()=>{var t;return t=e.path,void(R(!1),B(t))},className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[(0,t.jsx)(o.HardDrive,{className:"h-4 w-4 text-blue-400 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.path})]},e.path)),!I&&!C&&!E&&0===$.length&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:k("folder.empty")}),!I&&!C&&!E&&$.map(e=>(0,t.jsxs)("button",{onClick:()=>{e.isGit||x?(b(e.path),y(!1)):B(e.path)},onDoubleClick:()=>B(e.path),className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[e.isGit?(0,t.jsx)(n.FolderGit2,{className:"h-4 w-4 text-emerald-400 shrink-0"}):(0,t.jsx)(a.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),e.isGit&&(0,t.jsx)("span",{className:"shrink-0 rounded-md bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-400 ring-1 ring-emerald-500/20",children:"git"})]},e.path))]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 px-5 py-3 shrink-0 border-t border-border",children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>y(!1),children:k("common.cancel")}),(0,t.jsx)(h.Button,{onClick:()=>{S?.currentPath&&(b(S.currentPath),y(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:k("folder.selectPath")})]})]})})})}])},905455,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["SegmentedControl",0,function({options:e,value:a,onChange:n,className:s}){return(0,t.jsx)("div",{className:(0,r.cn)("inline-flex rounded-md border border-border bg-muted p-1 gap-1",s),children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>n(e.value),className:(0,r.cn)("rounded px-3 py-1 text-sm transition-colors",a===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}])},902539,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);e.s(["ChevronsLeft",0,t],902539)},233274,e=>{"use strict";let t=(0,e.i(572989).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],233274)},271712,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6071370c2d76b879b52db7cd1a204026c225a4055c",t.callServer,void 0,t.findSourceMapURL,"analyzeProjectDirectory");e.s(["analyzeProjectDirectory",0,r])},842174,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("406e49dd8b4dfb470a4ebd4e6f4b46e0e4f0e8193d",t.callServer,void 0,t.findSourceMapURL,"createProject");e.s(["createProject",0,r])},232545,e=>{"use strict";let t=(0,e.i(572989).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],232545)},538059,(e,t,r)=>{t.exports=e.r(322195)},314757,e=>{"use strict";var t=e.i(965652);e.s(["useControlled",0,function({controlled:e,default:r,name:a,state:n="value"}){let{current:s}=t.useRef(void 0!==e),[i,l]=t.useState(r),o=t.useCallback(e=>{s||l(e)},[]);return[s?e:i,o]}])},890514,551974,e=>{"use strict";e.i(708878);var t,r=e.i(462902),a=e.i(965652),n=e.i(954588);let s=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),i={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},l={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},o={disabled:!1,...l};e.s(["DEFAULT_FIELD_ROOT_STATE",0,o,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,l,"DEFAULT_VALIDITY_STATE",0,i,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[s.valid]:""}:{[s.invalid]:""}}],551974);let c=a.createContext({invalid:void 0,name:void 0,validityData:{state:i,errors:[],error:"",value:"",initialValue:null},setValidityData:n.NOOP,disabled:void 0,touched:l.touched,setTouched:n.NOOP,dirty:l.dirty,setDirty:n.NOOP,filled:l.filled,setFilled:n.NOOP,focused:l.focused,setFocused:n.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:o,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=n.EMPTY_OBJECT)=>e,getInputValidationProps:(e=n.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});e.s(["FieldRootContext",0,c,"useFieldRootContext",0,function(e=!0){let t=a.useContext(c);if(t.setValidityData===n.NOOP&&!e)throw Error((0,r.default)(28));return t}],890514)},571870,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let a=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:r.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(a)}])},179279,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let a=t.createContext({controlId:void 0,registerControlId:r.NOOP,labelId:void 0,setLabelId:r.NOOP,messageIds:[],setMessageIds:r.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,a,"useLabelableContext",0,function(){return t.useContext(a)}])},956181,e=>{"use strict";e.s(["getCombinedFieldValidityData",0,function(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}])},397791,e=>{"use strict";var t=e.i(92615),r=e.i(102094),a=e.i(887642),n=e.i(682354),s=e.i(804849),i=e.i(207516),l=e.i(179279);e.s(["useLabel",0,function(e={}){let o,{id:c,fallbackControlId:d,native:u=!1,setLabelId:f,focusControl:h}=e,{controlId:m,setLabelId:p}=(0,l.useLabelableContext)(),g=(0,a.useStableCallback)(e=>{p(e),f?.(e)}),v=(o=(0,i.useBaseUiId)(c),(0,s.useIsoLayoutEffect)(()=>(g(o),()=>{g(void 0)}),[o,g]),o),y=m??d;function b(e){let a=(0,n.getTarget)(e.nativeEvent);a?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),u||function(e){if(h)return h(e,y);if(!y)return;let a=(0,r.ownerDocument)(e.currentTarget).getElementById(y);(0,t.isHTMLElement)(a)&&a.focus({focusVisible:!0})}(e))}return u?{id:v,htmlFor:y??void 0,onMouseDown:b}:{id:v,onClick:b,onPointerDown(e){e.preventDefault()}}}],397791)},103353,e=>{"use strict";var t=e.i(965652),r=e.i(804849),a=e.i(887642),n=e.i(903224),s=e.i(92615),i=e.i(954588),l=e.i(207516),o=e.i(179279);e.s(["useLabelableId",0,function(e={}){let{id:c,implicit:d=!1,controlRef:u}=e,{controlId:f,registerControlId:h}=(0,o.useLabelableContext)(),m=(0,l.useBaseUiId)(c),p=d?f:void 0,g=(0,n.useRefWithInit)(()=>Symbol("labelable-control")),v=t.useRef(!1),y=t.useRef(null!=c),b=(0,a.useStableCallback)(()=>{v.current&&h!==i.NOOP&&(v.current=!1,h(g.current,void 0))});return(0,r.useIsoLayoutEffect)(()=>{let e;if(h!==i.NOOP){if(d){let t=u?.current;e=(0,s.isElement)(t)&&null!=t.closest("label")?c??null:p??m}else if(null!=c)y.current=!0,e=c;else{if(!y.current)return void b();e=m}if(void 0===e)return void b();v.current=!0,h(g.current,e)}},[c,u,p,h,d,m,g,b]),t.useEffect(()=>b,[b]),f??m}])},421689,e=>{"use strict";var t=e.i(585012),r=e.i(804849),a=e.i(887642),n=e.i(956181),s=e.i(571870),i=e.i(890514);e.s(["useField",0,function(e){let{enabled:l=!0,value:o,id:c,name:d,controlRef:u,commit:f}=e,{formRef:h}=(0,s.useFormContext)(),{invalid:m,markedDirtyRef:p,validityData:g,setValidityData:v}=(0,i.useFieldRootContext)(),y=(0,a.useStableCallback)(e.getValue);(0,r.useIsoLayoutEffect)(()=>{if(!l)return;let e=o;void 0===e&&(e=y()),null===g.initialValue&&null!==e&&v(t=>({...t,initialValue:e}))},[l,v,o,g.initialValue,y]),(0,r.useIsoLayoutEffect)(()=>{l&&c&&h.current.fields.set(c,{getValue:y,name:d,controlRef:u,validityData:(0,n.getCombinedFieldValidityData)(g,m),validate(e=!0){let r=o;void 0===r&&(r=y()),p.current=!0,e?t.flushSync(()=>f(r)):f(r)}})},[f,u,l,h,y,c,m,p,d,g,o]),(0,r.useIsoLayoutEffect)(()=>{let e=h.current.fields;return()=>{c&&e.delete(c)}},[h,c])}])},792566,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},453889,e=>{"use strict";let t=(0,e.i(572989).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],453889)},998626,e=>{"use strict";let t=(0,e.i(572989).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],998626)},59737,e=>{"use strict";let t=(0,e.i(572989).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},977982,472074,e=>{"use strict";let t=(0,e.i(572989).default)("folder",[["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"}]]);e.s(["Folder",0,t],977982);var r=e.i(792566);e.s(["ChevronUp",()=>r.default],472074)},194358,e=>{"use strict";let t=(0,e.i(572989).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],194358)},567098,e=>{"use strict";let t=(0,e.i(572989).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},770303,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(514798);let n=(0,a.createServerReference)("403449f7d8cde806e35ffce797eaa4e9d23b6f72d9",a.callServer,void 0,a.findSourceMapURL,"checkExtension");var s=e.i(307136);let i=(0,a.createServerReference)("404d70e7bbf2b44629f27c5b2a792144a5ca886bfc",a.callServer,void 0,a.findSourceMapURL,"uninstallExtension");var l=e.i(887911);let o={installed:!1},c=(0,r.createContext)(null);e.s(["ExtensionContext",0,c,"ExtensionProvider",0,function({children:e,initialStatus:a}){let[d,u]=(0,r.useState)(()=>a??Object.fromEntries((0,l.listExtensionMetadata)().map(e=>[e.id,o]))),[f,h]=(0,r.useState)(new Set),m=(0,r.useRef)(new Set),p=(0,r.useCallback)(async e=>{let t=await n(e);u(r=>({...r,[e]:t}))},[]),g=(0,r.useCallback)(async e=>{if(m.current.has(e))return{success:!1,error:"install already in progress"};m.current.add(e),h(t=>{let r=new Set(t);return r.add(e),r});try{let t=await (0,s.installExtension)(e);return t.success&&await p(e),t}finally{m.current.delete(e),h(t=>{let r=new Set(t);return r.delete(e),r})}},[p]),v=(0,r.useCallback)(async e=>{if(m.current.has(e))return{success:!1,error:"operation already in progress"};m.current.add(e),h(t=>{let r=new Set(t);return r.add(e),r});try{let t=await i(e);return t.success&&await p(e),t}finally{m.current.delete(e),h(t=>{let r=new Set(t);return r.delete(e),r})}},[p]),y=(0,r.useMemo)(()=>({statusMap:d,loading:!1,installing:f,refresh:p,install:g,uninstall:v}),[d,f,p,g,v]);return(0,t.jsx)(c.Provider,{value:y,children:e})}],770303)},48783,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("604c8086f2d3ec82e3264434b754316cca8c8c67b6",t.callServer,void 0,t.findSourceMapURL,"getConfigValue");e.s(["getConfigValue",0,r])},386343,125177,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,r],386343);let a=(0,t.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["Bell",0,a],125177)},243288,e=>{e.v(t=>Promise.all(["static/chunks/0~ld2l-heikt8.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(346069)))},427768,e=>{e.v(t=>Promise.all(["static/chunks/05lky664ou92k.js","static/chunks/0o6zqtzz_7ysr.js"].map(t=>e.l(t))).then(()=>t(103363)))}]);
@@ -1 +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)})]})}])},616612,777718,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40c7a6a13b8f9d924a2dc5b366eb3d4605adae951c",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],616612);let a=(0,t.createServerReference)("406275cdab102cf21e547f107d65eaf6b991813025",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],777718)},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(616612),o=e.i(514798);let d=(0,o.createServerReference)("60ee709ca9e7a310872a27eb861f15bc424538e354",o.callServer,void 0,o.findSourceMapURL,"updateNote");var m=e.i(777718);let x=(0,o.createServerReference)("60eda1eb2a37aa88de835f375e3db244aed4a1850b",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),b=e.i(464249),v=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)(b.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)(v.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,b,{t:v}=(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(v("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:v("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:v("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:v("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:(b=J.find(e=>e.id===F))?b.alias?`${b.name} (${b.alias})`:b.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:v("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:v("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:v("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:v("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:v("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:v("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)))}]);
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)})]})}])},532123,310787,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40cac23fd57aba89c3c048f7b55a3aa268a188dba9",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],532123);let a=(0,t.createServerReference)("4000a8878947bafe6067a0b86db6fb1025a86a6fac",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],310787)},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(532123),o=e.i(514798);let d=(0,o.createServerReference)("60f0843cb00a8ea57f4c28054390a84c5d48139cc6",o.callServer,void 0,o.findSourceMapURL,"updateNote");var m=e.i(310787);let x=(0,o.createServerReference)("608c42fb5613d7ea38d16a6a953f70fd56db7f7244",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),b=e.i(464249),v=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)(b.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)(v.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,b,{t:v}=(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(v("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:v("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:v("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:v("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:(b=J.find(e=>e.id===F))?b.alias?`${b.name} (${b.alias})`:b.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:v("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:v("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:v("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:v("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:v("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:v("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)))}]);
@@ -0,0 +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"],k=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.")}(),w=k[0],D=k[1];function F(e){return document.body.appendChild(e)}function _(e){var t,r,n=w(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=w(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){w().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=w(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 w(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),k=(0,O.useRef)(m),w=(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;k.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)(()=>{!w.current&&C.current&&(M.current=E.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...d}),D(),E.current?.editor.setTheme(a),b(!0),w.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),k=(0,O.useRef)(null),w=(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)),()=>k.current?void(_.current?.dispose(),h?d&&Q.set(s,k.current.saveViewState()):k.current.getModel()?.dispose(),k.current.dispose(),k.current=null,R.current=!1,M(!1)):e.cancel()}),V(()=>{let u=W(S.current,e||n||"",t||i||"",s||r||"");u!==k.current?.getModel()&&(d&&Q.set(B,k.current?.saveViewState()),k.current?.setModel(u),d&&k.current?.restoreViewState(Q.get(s)))},[s],A),V(()=>{k.current?.updateOptions(a)},[a],A),V(()=>{k.current&&void 0!==n&&(k.current.getOption(S.current.editor.EditorOption.readOnly)?k.current.setValue(n):n!==k.current.getValue()&&(L.current=!0,k.current.executeEdits("",[{range:k.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),k.current.pushUndoStop(),L.current=!1))},[n],A),V(()=>{let e=k.current?.getModel();A&&e&&i&&S.current?.editor.setModelLanguage(e,i)},[i,A],A),V(()=>{void 0!==o&&k.current?.revealLine(o)},[o],A),V(()=>{S.current?.editor.setTheme(u)},[u],A);let $=(0,O.useCallback)(()=>{if(!(!w.current||!S.current)&&!R.current){F.current(S.current);let c=s||r,h=W(S.current,n||e||"",t||i||"",c||"");k.current=S.current?.editor.create(w.current,{model:h,automaticLayout:!0,...a},l),d&&k.current.restoreViewState(Q.get(c)),S.current.editor.setTheme(u),void 0!==o&&k.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(k.current,S.current)},[A]),(0,O.useEffect)(()=>{E||A||$()},[E,A,$]),j.current=n,(0,O.useEffect)(()=>{A&&b&&(_.current?.dispose(),_.current=k.current?.onDidChangeModelContent(e=>{L.current||b(k.current.getValue(),e)}))},[A,b]),(0,O.useEffect)(()=>{if(A){let e=S.current.editor.onDidChangeMarkers(e=>{let t=k.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:w,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])},985788,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4098467bcf8a1fe674e07be745ca8d806644a8f9d1",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)}}])},43938,477158,135939,255898,845602,969297,773980,555560,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("608c78b1e07926a54c8056b0514eb0b4a244f4fb61",t.callServer,void 0,t.findSourceMapURL,"listDirectory");e.s(["listDirectory",0,r],43938);let n=(0,t.createServerReference)("70d67d1265d2cd39513e7a8e425e655b4bda56502a",t.callServer,void 0,t.findSourceMapURL,"getGitStatus");e.s(["getGitStatus",0,n],477158);let i=(0,t.createServerReference)("606153e4797840188082c447696363be719061c057",t.callServer,void 0,t.findSourceMapURL,"createFile");e.s(["createFile",0,i],135939);let s=(0,t.createServerReference)("60969f5d25222e77657c3315357297cd41d06ecf7e",t.callServer,void 0,t.findSourceMapURL,"createDirectory");e.s(["createDirectory",0,s],255898);let u=(0,t.createServerReference)("7038fc8ec0ac151044164d22ba5addfdb618b5f14d",t.callServer,void 0,t.findSourceMapURL,"renameEntry");e.s(["renameEntry",0,u],845602);let o=(0,t.createServerReference)("60e4cf38e502793bf548967a8bd167d00e15ca4333",t.callServer,void 0,t.findSourceMapURL,"deleteEntry");e.s(["deleteEntry",0,o],969297);let c=(0,t.createServerReference)("4076d08f895b87666253ed0c4cf885d5d41cb273a3",t.callServer,void 0,t.findSourceMapURL,"listAllFiles");e.s(["listAllFiles",0,c],773980);let a=(0,t.createServerReference)("600bc65f68862940db78c1f32d20b2a9a7e0a6f65e",t.callServer,void 0,t.findSourceMapURL,"readFileContent");e.s(["readFileContent",0,a],555560)},878068,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("70dac8b4960550b453599d23dbe22e4067a8380b53",t.callServer,void 0,t.findSourceMapURL,"writeFileContent");e.s(["writeFileContent",0,r])},889749,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60de60014efb7e9e711cb9a312c3c3f594b699cd4a",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)},846449,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40ff8c1440f3a9a4116841a811476dd49a07a3bcf5",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)},637418,874337,12659,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4009e425af1f977da423cd26cbbb52e5c4aa53756a",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],637418);let n=(0,t.createServerReference)("40e94679d1c9d740506f1360ed586f7e8be0860739",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,n],874337);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))}])},714647,6302,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40a5ac216f95efe5bd996ea879d2b5984d2fe23894",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],714647);let n=(0,t.createServerReference)("60aa2e9ae518eac08aa4cea3a82300fc9de5a78e6e",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,n],6302)},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 k 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 w=[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]}}},k,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=w.length,F=new Set([S.type,k.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=w[u],r=e.isMultiMatch(i);r&&(n.push(new e(r,t)),s=!0)}if(!s)for(u=-1;++u<D;){let e=w[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/04pw2khof~cip.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/0cek-x7mfk~on.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(461834)))}]);
@@ -1,2 +1,2 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},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"])},237901,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4020ababc64e3e20322cc4d4ce3b9df48673dd84b8",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,a])},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)},35967,e=>{"use strict";var t=e.i(289721);let a=(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 r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function l(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let n={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:l="",title:n}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${l}`,title:n??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,l],35967)},752631,438199,12659,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4030dd133cb98fa4b7caefd8a1dde6142fda3f0c0f",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],752631);let r=(0,t.createServerReference)("4088280847d384971b8146a405a4b8b423a0137c21",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],438199);let s=(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,s],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(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,a],736061);let r=(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,r],460707)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},980376,230200,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),l=e.i(670123);function n({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:d="right",showCloseButton:c=!0,...u}){return(0,t.jsxs)(n,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":d,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,c&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(l.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let d=(0,o.createServerReference)("40e67a1efce5df4810568fbfa10e6c5d914bea56ea",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,d],230200)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),l=e.i(487486),n=e.i(519455),i=e.i(533499),o=e.i(110996),d=e.i(230200),c=e.i(85596),u=e.i(752631),m=e.i(438199),x=e.i(237901),p=e.i(744798),h=e.i(685149),g=e.i(606393),f=e.i(875840),b=e.i(245697),y=e.i(12659),j=e.i(736061),k=e.i(460707),w=e.i(567860);function v({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var N=e.i(35967),S=e.i(360112);e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:I,taskId:C}){let{t:T}=(0,i.useI18n)(),[D,M]=(0,a.useState)(null),[E,L]=(0,a.useTransition)(),[R,$]=(0,a.useState)(!1),[O,P]=(0,a.useState)([]);(0,a.useEffect)(()=>{C&&e?L(async()=>{let e=await (0,d.getTaskOverview)(C);e&&(M(e),e.project?.workspaceId&&(0,c.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{P(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>P([])))}):M(null)},[C,e]);let A=D?h.BOARD_COLUMNS.find(e=>e.id===D.status):null,B=D?h.PRIORITY_CONFIG[D.priority]:null,z=D?.executions?.[0]??null,F=(()=>{if(z?.worktreePath)return z.worktreePath;let e=D?.project?.localPath;return e?D?.subPath?`${e}/${D.subPath}`:e:null})(),V=(()=>{let e=z?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),_=async e=>{if(D?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:D.project.id}),S.toast.success(T("taskDrawer.duplicateSuccess")),$(!1),I(!1)}catch{S.toast.error(T("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:I,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:D?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:T("taskDrawer.title")}),D&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[A&&(0,t.jsxs)(l.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${A.color}`}),A.label]}),B&&(0,t.jsx)(l.Badge,{variant:"secondary",className:`text-xs ${B.color}`,children:B.label}),D.version&&(0,t.jsx)(N.TaskVersionTag,{number:D.version.number,name:D.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:E&&!D?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:T("assets.loading")}):D?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:T("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:D.description||T("taskDrawer.noDescription")})]}),D.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:D.labels.map(e=>(0,t.jsx)(l.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(g.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(D.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Package,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:D._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.fileChanges")}),V?(0,t.jsx)(v,{added:V.added,removed:V.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(y.PlayCircle,{className:"h-3.5 w-3.5"}),T("taskDrawer.lastExecution")]}),z?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(l.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:z.status}),z.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:z.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noExecution")})]}),F&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,u.openInFileManager)(F)}catch(e){console.error("openInFileManager failed:",e),S.toast.error(T("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(j.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInFileManager")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInEditor)(F)}catch(e){console.error("openInEditor failed:",e),S.toast.error(T("git.openInEditorFailed"))}},children:[(0,t.jsx)(k.Code,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInEditor")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,x.openInTerminal)(F)}catch(e){console.error("openInTerminal failed:",e),S.toast.error(T("git.openInTerminalFailed"))}},children:[(0,t.jsx)(w.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(n.Button,{variant:"default",className:"w-full",onClick:()=>{D&&$(!0)},disabled:!D,children:[(0,t.jsx)(f.Copy,{className:"h-4 w-4"}),T("taskDrawer.duplicate")]})})]}):null})]}),D?.project&&(0,t.jsx)(p.CreateTaskDialog,{open:R,onOpenChange:$,onSubmit:_,labels:O,projectType:D.project.type,projectLocalPath:D.project.localPath,prefillFromTask:{title:D.title,description:D.description,priority:D.priority,subPath:D.subPath,labelIds:D.labels.map(e=>e.label.id),baseBranch:D.baseBranch}})]})}],605005)},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)},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)},707631,(e,t,a)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},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"])},846449,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40ff8c1440f3a9a4116841a811476dd49a07a3bcf5",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,a])},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)},35967,e=>{"use strict";var t=e.i(289721);let a=(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 r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function l(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let n={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:l="",title:n}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${l}`,title:n??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,l],35967)},637418,874337,12659,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4009e425af1f977da423cd26cbbb52e5c4aa53756a",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],637418);let r=(0,t.createServerReference)("40e94679d1c9d740506f1360ed586f7e8be0860739",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],874337);let s=(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,s],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(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,a],736061);let r=(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,r],460707)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},980376,577231,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),l=e.i(670123);function n({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:d="right",showCloseButton:c=!0,...u}){return(0,t.jsxs)(n,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":d,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,c&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(l.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let d=(0,o.createServerReference)("40c880ca058620d9336ba74c17b606b9cd609ce72f",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,d],577231)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),l=e.i(487486),n=e.i(519455),i=e.i(533499),o=e.i(803476),d=e.i(577231),c=e.i(123960),u=e.i(637418),m=e.i(874337),x=e.i(846449),p=e.i(744798),h=e.i(685149),g=e.i(606393),f=e.i(875840),b=e.i(245697),y=e.i(12659),j=e.i(736061),k=e.i(460707),w=e.i(567860);function v({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var N=e.i(35967),S=e.i(360112);e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:I,taskId:C}){let{t:T}=(0,i.useI18n)(),[D,M]=(0,a.useState)(null),[E,L]=(0,a.useTransition)(),[R,$]=(0,a.useState)(!1),[O,P]=(0,a.useState)([]);(0,a.useEffect)(()=>{C&&e?L(async()=>{let e=await (0,d.getTaskOverview)(C);e&&(M(e),e.project?.workspaceId&&(0,c.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{P(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>P([])))}):M(null)},[C,e]);let A=D?h.BOARD_COLUMNS.find(e=>e.id===D.status):null,B=D?h.PRIORITY_CONFIG[D.priority]:null,z=D?.executions?.[0]??null,F=(()=>{if(z?.worktreePath)return z.worktreePath;let e=D?.project?.localPath;return e?D?.subPath?`${e}/${D.subPath}`:e:null})(),V=(()=>{let e=z?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),_=async e=>{if(D?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:D.project.id}),S.toast.success(T("taskDrawer.duplicateSuccess")),$(!1),I(!1)}catch{S.toast.error(T("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:I,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:D?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:T("taskDrawer.title")}),D&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[A&&(0,t.jsxs)(l.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${A.color}`}),A.label]}),B&&(0,t.jsx)(l.Badge,{variant:"secondary",className:`text-xs ${B.color}`,children:B.label}),D.version&&(0,t.jsx)(N.TaskVersionTag,{number:D.version.number,name:D.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:E&&!D?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:T("assets.loading")}):D?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:T("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:D.description||T("taskDrawer.noDescription")})]}),D.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:D.labels.map(e=>(0,t.jsx)(l.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(g.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(D.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Package,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:D._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.fileChanges")}),V?(0,t.jsx)(v,{added:V.added,removed:V.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(y.PlayCircle,{className:"h-3.5 w-3.5"}),T("taskDrawer.lastExecution")]}),z?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(l.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:z.status}),z.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:z.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noExecution")})]}),F&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,u.openInFileManager)(F)}catch(e){console.error("openInFileManager failed:",e),S.toast.error(T("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(j.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInFileManager")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInEditor)(F)}catch(e){console.error("openInEditor failed:",e),S.toast.error(T("git.openInEditorFailed"))}},children:[(0,t.jsx)(k.Code,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInEditor")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,x.openInTerminal)(F)}catch(e){console.error("openInTerminal failed:",e),S.toast.error(T("git.openInTerminalFailed"))}},children:[(0,t.jsx)(w.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(n.Button,{variant:"default",className:"w-full",onClick:()=>{D&&$(!0)},disabled:!D,children:[(0,t.jsx)(f.Copy,{className:"h-4 w-4"}),T("taskDrawer.duplicate")]})})]}):null})]}),D?.project&&(0,t.jsx)(p.CreateTaskDialog,{open:R,onOpenChange:$,onSubmit:_,labels:O,projectType:D.project.type,projectLocalPath:D.project.localPath,prefillFromTask:{title:D.title,description:D.description,priority:D.priority,subPath:D.subPath,labelIds:D.labels.map(e=>e.label.id),baseBranch:D.baseBranch}})]})}],605005)},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)},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)},707631,(e,t,a)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
2
2
  `);if(0===t.length)return[];let a=[],r=null,s=null,n=0,o=0,d=null,c=e=>{let[t,s]=l(e)??[];r={chunks:[],deletions:0,additions:0,from:t,to:s},a.push(r)},u=()=>{(!r||r.chunks.length)&&c()},m=e=>{if(!s)return;let[t]=s.changes.slice(-1);s.changes.push({type:t.type,[t.type]:!0,ln1:t.ln1,ln2:t.ln2,ln:t.ln,content:e})},x=[[/^diff\s/,c],[/^new file mode (\d+)$/,(e,t)=>{u(),r.new=!0,r.newMode=t[1],r.from="/dev/null"}],[/^deleted file mode (\d+)$/,(e,t)=>{u(),r.deleted=!0,r.oldMode=t[1],r.to="/dev/null"}],[/^old mode (\d+)$/,(e,t)=>{u(),r.oldMode=t[1]}],[/^new mode (\d+)$/,(e,t)=>{u(),r.newMode=t[1]}],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,(e,t)=>{u(),r.index=e.split(" ").slice(1),t[1]&&(r.oldMode=r.newMode=t[1].trim())}],[/^---\s/,e=>{u(),r.from=i(e)}],[/^\+\+\+\s/,e=>{u(),r.to=i(e)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(e,t)=>{r||c(e);let[a,l,i,u]=t.slice(1);n=+a,o=+i,s={content:e,changes:[],oldStart:+a,oldLines:+(l||1),newStart:+i,newLines:+(u||1)},d={oldLines:+(l||1),newLines:+(u||1)},r.chunks.push(s)}],[/^\$/,m]],p=[[/^\$/,m],[/^-/,e=>{s&&(s.changes.push({type:"del",del:!0,ln:n++,content:e}),r.deletions++,d.oldLines--)}],[/^\+/,e=>{s&&(s.changes.push({type:"add",add:!0,ln:o++,content:e}),r.additions++,d.newLines--)}],[/^\s*/,e=>{s?.changes.push({type:"normal",normal:!0,ln1:n++,ln2:o++,content:e}),d.oldLines--,d.newLines--}]],h=e=>{d?(e=>{for(let[t,a]of p){let r=e.match(t);if(r){a(e,r);break}}0===d.oldLines&&0===d.newLines&&(d=null)})(e):(e=>{for(let[t,a]of x){let r=e.match(t);if(r){a(e,r);break}}})(e)};for(let e of t)h(e);return a};let r=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,s=/^(a|b|i|w|c|o|1|2)\//,l=e=>e?.match(r)?.map(e=>e.replace(s,"").replace(/("|')$/,"")),n=/^\\?['"]|\\?['"]$/g,i=e=>{let t=o(e,"-+").trim();return(t=c(t)).replace(n,"").replace(s,"")},o=(e,t)=>{if(e=m(e),!t&&String.prototype.trimLeft)return e.trimLeft();let a=u(t);return e.replace(RegExp(`^${a}+`),"")},d=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,c=e=>{let t=d.exec(e);return t&&(e=e.substring(0,t.index).trim()),e},u=e=>null==e?"\\s":e instanceof RegExp?e.source:`[${m(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,m=e=>`${e??""}`},196199,e=>{"use strict";var t=e.i(707631);function a(e){return e.replace(/\r\n/g,"\n")}e.s(["normalizeLF",0,a,"parseUnifiedDiff",0,function(e){return(0,t.default)(a(e))}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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"])},846449,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40ff8c1440f3a9a4116841a811476dd49a07a3bcf5",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,r])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},35967,e=>{"use strict";var t=e.i(289721);let r=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var a=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function l(e){return s[function(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;return t}(e)%s.length]}let n={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:a,showName:s=!1,className:l="",title:n}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${l}`,title:n??(a?`${e} \xb7 ${a}`:e),children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&a?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:a}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:r}=(0,a.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n[e]}`,children:r(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:r}=(0,a.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r("version.type.uncategorized")})},"typeBadgeColor",0,l],35967)},736061,460707,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,r],736061);let a=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,a],460707)},637418,874337,12659,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4009e425af1f977da423cd26cbbb52e5c4aa53756a",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],637418);let a=(0,t.createServerReference)("40e94679d1c9d740506f1360ed586f7e8be0860739",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,a],874337);let s=(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,s],12659)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},985788,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4098467bcf8a1fe674e07be745ca8d806644a8f9d1",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},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)},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)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},532123,310787,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40cac23fd57aba89c3c048f7b55a3aa268a188dba9",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],532123);let a=(0,t.createServerReference)("4000a8878947bafe6067a0b86db6fb1025a86a6fac",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],310787)},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)},340966,e=>{"use strict";let t=(0,e.i(572989).default)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);e.s(["ClipboardList",0,t],340966)},714647,6302,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40a5ac216f95efe5bd996ea879d2b5984d2fe23894",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],714647);let a=(0,t.createServerReference)("60aa2e9ae518eac08aa4cea3a82300fc9de5a78e6e",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,a],6302)},617678,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("7c22030814ba2af2d0ed441b5e8bee966a81182f46",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,r])},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: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})]})}])},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)},631675,e=>{"use strict";let t=(0,e.i(572989).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],631675)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},637212,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("406cb5328286f600e93b8cb4a3df79c971cac344c1",t.callServer,void 0,t.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,r])},38733,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40abcf853c3f7733df65eb8d36f21af608aed32cde",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,r])},235357,144640,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(585012),s=e.i(657153),l=e.i(19671),n=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:r,title:a,disabled:s,...l}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||r()},title:a,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...l,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:h,onOpenChange:b,assets:f,currentIndex:p,onIndexChange:m}){let{t:g}=(0,d.useI18n)(),[v,y]=(0,r.useState)(1),[k,w]=(0,r.useState)({x:0,y:0}),[j,N]=(0,r.useState)(!1),S=(0,r.useRef)(null),[C,M]=(0,r.useState)(!1),E=!!f&&f.length>1&&"number"==typeof p&&!!m,R=E&&p>0,L=E&&p<f.length-1,P=E?f.length:0,I=P>0?Math.ceil(P/10):0,T=E?Math.floor(p/10):0,A=10*T,O=Math.min(A+10,P),z=I>1,D=E&&T>0,$=E&&T<I-1;(0,r.useEffect)(()=>{M(!0)},[]),(0,r.useEffect)(()=>{y(1),w({x:0,y:0})},[e]),(0,r.useEffect)(()=>{if(!h)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[h]);let U=(0,r.useCallback)(()=>b(!1),[b]),_=(0,r.useCallback)(()=>{E&&R&&m(p-1)},[E,R,m,p]),H=(0,r.useCallback)(()=>{E&&L&&m(p+1)},[E,L,m,p]),q=(0,r.useCallback)(()=>{E&&D&&m((T-1)*10)},[E,D,m,T]),V=(0,r.useCallback)(()=>{E&&$&&m(Math.min((T+1)*10,P-1))},[E,$,m,T,P]),G=(0,r.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),F=(0,r.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&w({x:0,y:0}),t})},[]),B=(0,r.useCallback)(()=>{y(1),w({x:0,y:0})},[]);(0,r.useEffect)(()=>{if(!h)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),U();break;case"ArrowLeft":E&&(e.preventDefault(),_());break;case"ArrowRight":E&&(e.preventDefault(),H());break;case"+":case"=":e.preventDefault(),G();break;case"-":case"_":e.preventDefault(),F();break;case"0":e.preventDefault(),B()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[h,E,U,_,H,G,F,B]);let X=(0,r.useRef)(!1),Y=()=>{j&&N(!1),S.current=null},W=j?"cursor-grabbing":"cursor-grab";if(!h||!C)return null;let J=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":g("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,E?` \xb7 ${p+1} / ${f.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${W}`,onClick:e=>{e.target===e.currentTarget&&U()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let r=Math.min(8,Math.max(.1,e*t));return r<=1&&w({x:0,y:0}),r})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),X.current&&(X.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),X.current=!1,e.target.setPointerCapture?.(e.pointerId),S.current={x:e.clientX,y:e.clientY,panX:k.x,panY:k.y},N(!0))},onPointerMove:e=>{if(!S.current)return;let t=e.clientX-S.current.x,r=e.clientY-S.current.y;Math.abs(t)+Math.abs(r)>5&&(X.current=!0),j&&w({x:S.current.panX+t,y:S.current.panY+r})},onPointerUp:Y,onPointerLeave:Y,onPointerCancel:Y,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${k.x}px, ${k.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:j?"none":"transform 120ms ease-out",willChange:j?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[E&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[z&&(0,t.jsx)(u,{onClick:q,title:`${g("assets.lightbox.prev")} (-10)`,"aria-label":`${g("assets.lightbox.prev")} (-10)`,disabled:!D,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:_,title:g("assets.lightbox.prev"),"aria-label":g("assets.lightbox.prev"),disabled:!R,children:(0,t.jsx)(l.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:f.slice(A,O).map((e,r)=>{let a=A+r,s=a===p;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||m(a)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+a)})}),(0,t.jsx)(u,{onClick:H,title:g("assets.lightbox.next"),"aria-label":g("assets.lightbox.next"),disabled:!L,children:(0,t.jsx)(n.ChevronRight,{className:"h-4 w-4"})}),z&&(0,t.jsx)(u,{onClick:V,title:`${g("assets.lightbox.next")} (+10)`,"aria-label":`${g("assets.lightbox.next")} (+10)`,disabled:!$,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:B,title:g("assets.lightbox.reset"),"aria-label":g("assets.lightbox.reset"),disabled:1===v&&0===k.x&&0===k.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:U,title:g("assets.lightbox.close"),"aria-label":g("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,a.createPortal)(J,document.body)}],235357);var x=e.i(400355);e.i(254826);var h=e.i(309735),b=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:a,open:s,onOpenChange:l}){let{t:n}=(0,d.useI18n)(),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[f,p]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!s||!e){o(null),p(null);return}let t=!1;return u(!0),p(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?p(n("assets.fileTooLarge")):p(n("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,n]);let m=a.split(".").pop()?.toLowerCase();return(0,t.jsx)(b.Dialog,{open:s,onOpenChange:l,children:(0,t.jsxs)(b.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:n("assets.loadingPreview")})]});if(f)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:f});if(null===i)return null;if("md"===m)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(h.Streamdown,{children:i})});if("json"===m){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,r){if(r?.startsWith("image/"))return!0;let a=e.split(".").pop()?.toLowerCase();return!!a&&t.has(a)},"localPathToApiUrl",0,function(e){let t=e.match(/(?:^|\/)(?:storage|data)\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},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)))}]);