tower-studio 0.1.20 → 0.1.21

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 (191) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/cache/.previewinfo +1 -1
  4. package/.next/cache/.rscinfo +1 -1
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/diagnostics/route-bundle-stats.json +46 -46
  7. package/.next/fallback-build-manifest.json +3 -3
  8. package/.next/prerender-manifest.json +3 -3
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
  17. package/.next/server/app/_not-found/page/server-reference-manifest.json +23 -23
  18. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/_not-found.html +1 -1
  21. package/.next/server/app/_not-found.rsc +13 -13
  22. package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  23. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  24. package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
  25. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  26. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  27. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  28. package/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  29. package/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  30. package/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  31. package/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  32. package/.next/server/app/api/internal/assistant/images/route.js +2 -2
  33. package/.next/server/app/api/internal/assistant/images/route.js.nft.json +1 -1
  34. package/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  35. package/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  36. package/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  37. package/.next/server/app/api/internal/terminal/[taskId]/start/route.js +2 -2
  38. package/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  39. package/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  40. package/.next/server/app/index.html +1 -1
  41. package/.next/server/app/index.rsc +13 -13
  42. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  43. package/.next/server/app/index.segments/_full.segment.rsc +13 -13
  44. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  45. package/.next/server/app/index.segments/_index.segment.rsc +8 -8
  46. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  47. package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  48. package/.next/server/app/missions/page/server-reference-manifest.json +53 -53
  49. package/.next/server/app/missions/page.js.nft.json +1 -1
  50. package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  51. package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
  52. package/.next/server/app/onboarding/page/server-reference-manifest.json +23 -23
  53. package/.next/server/app/onboarding/page.js.nft.json +1 -1
  54. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/onboarding.html +1 -1
  56. package/.next/server/app/onboarding.rsc +15 -15
  57. package/.next/server/app/onboarding.segments/_full.segment.rsc +15 -15
  58. package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
  59. package/.next/server/app/onboarding.segments/_index.segment.rsc +8 -8
  60. package/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
  61. package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  62. package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
  63. package/.next/server/app/page/react-loadable-manifest.json +1 -1
  64. package/.next/server/app/page/server-reference-manifest.json +23 -23
  65. package/.next/server/app/page.js.nft.json +1 -1
  66. package/.next/server/app/page_client-reference-manifest.js +1 -1
  67. package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
  68. package/.next/server/app/settings/page/server-reference-manifest.json +30 -30
  69. package/.next/server/app/settings/page.js.nft.json +1 -1
  70. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  71. package/.next/server/app/settings.html +1 -1
  72. package/.next/server/app/settings.rsc +15 -15
  73. package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
  74. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  75. package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
  76. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  77. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  78. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  79. package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
  80. package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +69 -69
  81. package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  82. package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  83. package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
  84. package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +66 -66
  85. package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  86. package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  87. package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
  88. package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +55 -55
  89. package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  90. package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  91. package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
  92. package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +51 -51
  93. package/.next/server/app/workspaces/[workspaceId]/page.js +1 -1
  94. package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  95. package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  96. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
  97. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +23 -23
  98. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  99. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  100. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
  101. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +56 -56
  102. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +2 -2
  103. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  104. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  105. package/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
  106. package/.next/server/app/workspaces/page/server-reference-manifest.json +41 -41
  107. package/.next/server/app/workspaces/page.js.nft.json +1 -1
  108. package/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  109. package/.next/server/chunks/0uz~_next_dist_esm_build_templates_app-route_05yec2y.js +1 -1
  110. package/.next/server/chunks/[root-of-the-server]__00~8_qz._.js +1 -1
  111. package/.next/server/chunks/[root-of-the-server]__05mc_xk._.js +1 -1
  112. package/.next/server/chunks/[root-of-the-server]__0bvqbq0._.js +1 -1
  113. package/.next/server/chunks/[root-of-the-server]__0p5iuez._.js +3 -3
  114. package/.next/server/chunks/[root-of-the-server]__0rb-ear._.js +2 -2
  115. package/.next/server/chunks/[root-of-the-server]__0u4~z7h._.js +1 -1
  116. package/.next/server/chunks/[root-of-the-server]__0ze75mm._.js +1 -1
  117. package/.next/server/chunks/project_f_tower_0n1s3ym._.js +1 -1
  118. package/.next/server/chunks/project_f_tower_src_11e.cv5._.js +1 -1
  119. package/.next/server/chunks/project_f_tower_src_lib_0p_b~77._.js +1 -1
  120. package/.next/server/chunks/project_f_tower_src_lib_10p8sue._.js +1 -1
  121. package/.next/server/chunks/ssr/04uy_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_01.s1p0._.js +1 -1
  122. package/.next/server/chunks/ssr/0y0r_f_tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0n4g3bn._.js +1 -1
  123. package/.next/server/chunks/ssr/{[root-of-the-server]__0aidehy._.js → [root-of-the-server]__03tt3-b._.js} +2 -2
  124. package/.next/server/chunks/ssr/[root-of-the-server]__06qzctf._.js +1 -1
  125. package/.next/server/chunks/ssr/[root-of-the-server]__0_47k-j._.js +1 -1
  126. package/.next/server/chunks/ssr/{[root-of-the-server]__0e6iflg._.js → [root-of-the-server]__0f8gizo._.js} +2 -2
  127. package/.next/server/chunks/ssr/[root-of-the-server]__0ffdrwp._.js +1 -1
  128. package/.next/server/chunks/ssr/[root-of-the-server]__0hiekzn._.js +1 -1
  129. package/.next/server/chunks/ssr/[root-of-the-server]__0i4rk9v._.js +3 -3
  130. package/.next/server/chunks/ssr/[root-of-the-server]__0w7gbe7._.js +1 -1
  131. package/.next/server/chunks/ssr/{[root-of-the-server]__0uu_6~5._.js → [root-of-the-server]__0x94y2u._.js} +2 -2
  132. package/.next/server/chunks/ssr/[root-of-the-server]__0zaw-fl._.js +1 -1
  133. package/.next/server/chunks/ssr/{[root-of-the-server]__0o7o7z_._.js → [root-of-the-server]__0~ejyjq._.js} +2 -2
  134. package/.next/server/chunks/ssr/[root-of-the-server]__13eo85g._.js +1 -1
  135. package/.next/server/chunks/ssr/project_f_tower_0.txwd8._.js +1 -1
  136. package/.next/server/chunks/ssr/{project_f_tower_0~41x_-._.js → project_f_tower_07t18w4._.js} +2 -2
  137. package/.next/server/chunks/ssr/{project_f_tower_0ad9933._.js → project_f_tower_0ace8h~._.js} +2 -2
  138. package/.next/server/chunks/ssr/{project_f_tower_0866f0-._.js → project_f_tower_0elx6sk._.js} +2 -2
  139. package/.next/server/chunks/ssr/project_f_tower_0f0-wva._.js +1 -1
  140. package/.next/server/chunks/ssr/project_f_tower_0hgtev9._.js +1 -1
  141. package/.next/server/chunks/ssr/project_f_tower_0ivvjwd._.js +1 -1
  142. package/.next/server/chunks/ssr/project_f_tower_0jy~1uf._.js +1 -1
  143. package/.next/server/chunks/ssr/project_f_tower_0l6ssf8._.js +1 -1
  144. package/.next/server/chunks/ssr/project_f_tower_0nxm3eb._.js +3 -0
  145. package/.next/server/chunks/ssr/project_f_tower_0o5.y1e._.js +1 -1
  146. package/.next/server/chunks/ssr/{project_f_tower_0bd-exe._.js → project_f_tower_0vgg-bq._.js} +2 -2
  147. package/.next/server/chunks/ssr/project_f_tower_0w01kgd._.js +1 -1
  148. package/.next/server/chunks/ssr/project_f_tower_0ym-aea._.js +1 -1
  149. package/.next/server/chunks/ssr/{project_f_tower_07-hbsx._.js → project_f_tower_0ysif1r._.js} +2 -2
  150. package/.next/server/chunks/ssr/{project_f_tower_src_0p8gi_2._.js → project_f_tower_src_09hh2zl._.js} +2 -2
  151. package/.next/server/chunks/ssr/project_f_tower_src_actions_agent-actions_ts_0.s4~m-._.js +1 -1
  152. package/.next/server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js +1 -1
  153. package/.next/server/chunks/ssr/project_f_tower_src_app_missions_missions-client_tsx_0ums4qx._.js +1 -1
  154. package/.next/server/chunks/ssr/project_f_tower_src_app_onboarding_page_tsx_0_9_yoq._.js +1 -1
  155. package/.next/server/chunks/ssr/project_f_tower_src_app_settings_page_tsx_0oo06~d._.js +1 -1
  156. package/.next/server/chunks/ssr/project_f_tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0jmj1xz._.js +1 -1
  157. package/.next/server/instrumentation.js.nft.json +1 -1
  158. package/.next/server/middleware-build-manifest.js +3 -3
  159. package/.next/server/pages/404.html +1 -1
  160. package/.next/server/pages/500.html +1 -1
  161. package/.next/server/server-reference-manifest.js +1 -1
  162. package/.next/server/server-reference-manifest.json +206 -206
  163. package/.next/static/chunks/00j9ode~v55w1.js +1 -0
  164. package/.next/static/chunks/{09hk_t9sy5wux.js → 011l2dme7zm1y.js} +1 -1
  165. package/.next/static/chunks/03cxvx_ytlfwj.js +1 -0
  166. package/.next/static/chunks/04do7shpo0xf4.js +1 -0
  167. package/.next/static/chunks/{12rg2xcias_84.js → 06ty.u_4gqbjp.js} +1 -1
  168. package/.next/static/chunks/0_fdrn~ij8~4x.js +1 -0
  169. package/.next/static/chunks/{0llbf__idgh~l.js → 0huh48g0vwc3w.js} +1 -1
  170. package/.next/static/chunks/{0ci9m8jp27a9c.js → 0lmz~e26t6y84.js} +1 -1
  171. package/.next/static/chunks/0piw-n4oi7u3t.js +1 -0
  172. package/.next/static/chunks/{0f1jt_izz4dt-.js → 0s6tt5..s~z3j.js} +1 -1
  173. package/.next/static/chunks/{0l.3myaonfg1h.js → 0xszvfadyn~._.js} +1 -1
  174. package/.next/static/chunks/{0o0a2vel7_xs4.js → 11g71a5j36125.js} +1 -1
  175. package/.next/static/chunks/{0b-_zu1k~lyul.js → 12-oyio~-rn_6.js} +2 -2
  176. package/.next/static/chunks/{0dspkfgz.dhn1.js → 12hczap1wvd9x.js} +1 -1
  177. package/.next/static/chunks/13c..v64rkjx4.js +1 -0
  178. package/.next/trace +2 -2
  179. package/.next/trace-build +1 -1
  180. package/bin/tower.mjs +6 -0
  181. package/package.json +1 -1
  182. package/.next/server/chunks/ssr/project_f_tower_0cxt-u.._.js +0 -3
  183. package/.next/static/chunks/06kg_505w0jw1.js +0 -1
  184. package/.next/static/chunks/09byywt6bkrfa.js +0 -1
  185. package/.next/static/chunks/0i-71pxd663r9.js +0 -1
  186. package/.next/static/chunks/0r2hhrhsollsz.js +0 -1
  187. package/.next/static/chunks/0s6xs0.kd4j1c.js +0 -1
  188. package/.next/static/chunks/105b3mtl5gt1l.js +0 -1
  189. /package/.next/static/{uPbfev-r-deeE_PmqOX1E → 8KHD6s8uah3cz21-l-Ort}/_buildManifest.js +0 -0
  190. /package/.next/static/{uPbfev-r-deeE_PmqOX1E → 8KHD6s8uah3cz21-l-Ort}/_clientMiddlewareManifest.js +0 -0
  191. /package/.next/static/{uPbfev-r-deeE_PmqOX1E → 8KHD6s8uah3cz21-l-Ort}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- module.exports=[690834,a=>{"use strict";let b=(0,a.i(302856).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);a.s(["default",0,b])},582043,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(448287),e=a.i(759985),f=a.i(14180),g=a.i(263973),h=a.i(94202),i=a.i(569210),j=a.i(317076),k=a.i(302856);let l=(0,k.default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),m=(0,k.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"}]]);var n=a.i(161604),o=a.i(986379);let p=(0,k.default)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);var q=a.i(445705),r=a.i(358440),s=a.i(857122),t=a.i(95446),u=a.i(410756),v=a.i(620235),w=a.i(879876);let x=(0,w.createServerReference)("40e8fed6ad958d2c3a38820b1025a1fc4098689fa3",w.callServer,void 0,w.findSourceMapURL,"createWorkspace"),y=(0,w.createServerReference)("60875b160a0df1863b61aca756a5d59fc667390189",w.callServer,void 0,w.findSourceMapURL,"updateWorkspace"),z=(0,w.createServerReference)("403c63e717ef620fe45e8e020075ffd93967718ebd",w.callServer,void 0,w.findSourceMapURL,"deleteWorkspace"),A=(0,w.createServerReference)("40b15102de1db2bc4e8a6645b5c185c83f50624da1",w.callServer,void 0,w.findSourceMapURL,"getLabelsForWorkspace"),B=(0,w.createServerReference)("403d4c6d2ec152f1ac6b886660d9a1f76afc455c95",w.callServer,void 0,w.findSourceMapURL,"createLabel"),C=(0,w.createServerReference)("40175af511da3f485551beb23f683777478a4f455c",w.callServer,void 0,w.findSourceMapURL,"deleteLabel");var D=a.i(584335),E=a.i(942308);let F=["📋","🚀","🎯","💡","🔧","📦","🎨","📊","🔬","🌟","📝","🏗️"];function G({workspaces:a}){let k,s=(0,d.useRouter)(),v=(0,d.usePathname)(),{t:w}=(0,D.useI18n)(),[A,B]=(0,c.useState)(!1);(0,c.useEffect)(()=>{"true"===localStorage.getItem("sidebar-collapsed")&&B(!0)},[]);let[C,I]=(0,c.useState)(!1),[K,L]=(0,c.useState)(!1),[M,N]=(0,c.useState)(!1),[O,P]=(0,c.useState)(null),[Q,R]=(0,c.useState)(""),[S,T]=(0,c.useState)(F[0]),[U,V]=(0,c.useState)(null),W=v.split("/workspaces/")[1]?.split("/")[0],X=(0,c.useCallback)(()=>{B(a=>{let b=!a;return localStorage.setItem("sidebar-collapsed",String(b)),b})},[]),Y=(0,c.useCallback)(async()=>{if(!Q.trim())return;let a=await x({name:Q.trim(),description:S});R(""),T(F[0]),I(!1),s.refresh(),s.push(`/workspaces/${a.id}`)},[Q,S,s]),Z=(0,c.useCallback)(async()=>{Q.trim()&&U&&(await y(U,{name:Q.trim(),description:S}),R(""),L(!1),V(null),s.refresh())},[Q,S,U,s]),$=(0,c.useCallback)(a=>{V(a.id),R(a.name),T(a.description&&F.includes(a.description)?a.description:F[0]),L(!0)},[]),_=(0,c.useCallback)(async(b,c)=>{if(a.length<=1)return void E.toast.error(w("sidebar.lastWorkspaceError"));if(confirm(w("sidebar.deleteConfirm",{name:c})))try{await z(b),s.refresh(),W===b&&s.push("/workspaces")}catch{E.toast.error(w("sidebar.lastWorkspaceError"))}},[W,s,w,a.length]),aa=(0,c.useCallback)(a=>{P(a),N(!0)},[]),ab=a=>a.description&&F.includes(a.description)?a.description:a.name.charAt(0).toUpperCase();if(A){let c;return(0,b.jsxs)("aside",{className:"flex h-screen w-14 flex-col items-center border-r border-border bg-sidebar py-3",children:[(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:X,className:"mb-4 flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 ring-1 ring-primary/20 transition-transform hover:scale-105"}),children:(0,b.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-6 w-6 rounded"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.expand")})]}),(0,b.jsx)(r.ScrollArea,{className:"flex-1 min-h-0",children:(0,b.jsxs)("div",{className:"flex flex-col items-center gap-1 px-0.5 pt-1",children:[a.map(a=>{let c=W===a.id,d=ab(a);return(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>{c||s.push(`/workspaces/${a.id}`)},className:`flex h-9 w-9 items-center justify-center rounded-lg transition-all ${c?"ring-1 ring-primary/20 text-foreground cursor-default":"text-muted-foreground hover:text-foreground cursor-pointer"}`}),children:(0,b.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-muted text-sm",children:F.includes(d)?d:(0,b.jsx)("span",{className:"text-xs font-semibold",children:d})})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:a.name})]},a.id)}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{"data-tour":"create-workspace",onClick:()=>I(!0),className:"flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"}),children:(0,b.jsx)(g.Plus,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.newWorkspace")})]})]})}),(0,b.jsxs)("div",{className:"mt-2 flex flex-col items-center gap-1",children:[(c=W||a[0]?.id)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>s.push(`/workspaces/${c}/notes`),className:`rounded-lg p-2 transition-colors ${v.includes("/notes")?"text-foreground bg-accent":"text-muted-foreground hover:bg-accent hover:text-foreground"}`}),children:(0,b.jsx)(n.FileText,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.notes")})]}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>s.push(`/workspaces/${c}/assets`),className:`rounded-lg p-2 transition-colors ${v.includes("/assets")?"text-foreground bg-accent":"text-muted-foreground hover:bg-accent hover:text-foreground"}`}),children:(0,b.jsx)(o.FolderOpen,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.assets")})]}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>s.push(`/workspaces/${c}/archive`),className:`rounded-lg p-2 transition-colors ${v.includes("/archive")?"text-foreground bg-accent":"text-muted-foreground hover:bg-accent hover:text-foreground"}`}),children:(0,b.jsx)(f.Archive,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.archive")})]})]}):null,(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>s.push("/missions"),className:`rounded-lg p-2 transition-colors ${"/missions"===v?"text-foreground bg-accent":"text-muted-foreground hover:bg-accent hover:text-foreground"}`}),children:(0,b.jsx)(p,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("missions.navLabel")})]})]}),(0,b.jsx)(H,{open:C,onOpenChange:I,title:w("workspace.create"),name:Q,onNameChange:R,icon:S,onIconChange:T,onSubmit:Y,submitLabel:w("common.create"),nameLabel:w("workspace.name"),iconLabel:w("workspace.icon"),namePlaceholder:w("workspace.namePlaceholder"),cancelLabel:w("common.cancel")})]})}return(0,b.jsxs)("aside",{className:"noise relative flex h-screen w-56 flex-col border-r border-border bg-sidebar",children:[(0,b.jsxs)("div",{className:"relative z-10 flex items-center gap-3 px-4 py-4",children:[(0,b.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-9 w-9 rounded-lg"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("div",{className:"text-sm font-semibold tracking-tight text-foreground",children:"Tower"}),(0,b.jsx)("div",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground",children:"Studio"})]}),(0,b.jsx)(u.Button,{variant:"ghost",size:"icon-xs",onClick:X,className:"text-muted-foreground",title:w("sidebar.collapse"),children:(0,b.jsx)(l,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"relative z-10 flex items-center justify-between px-4 py-2",children:[(0,b.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:w("sidebar.workspace")}),(0,b.jsx)(u.Button,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","data-tour":"create-workspace",onClick:()=>{R(""),T(F[0]),I(!0)},title:w("sidebar.newWorkspace"),children:(0,b.jsx)(g.Plus,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)(r.ScrollArea,{className:"relative z-10 mt-2 flex-1 min-h-0",children:(0,b.jsx)("div",{className:"px-2 py-1",children:a.map(c=>{var d;let e,f,g,k=W===c.id,l=ab(c);return(0,b.jsxs)("div",{className:`group relative flex items-center rounded-lg transition-all ${k?"bg-accent ring-1 ring-primary/15":"hover:bg-accent/60"}`,children:[(0,b.jsxs)("button",{onClick:()=>{k||s.push(`/workspaces/${c.id}`)},className:`flex flex-1 items-center gap-2.5 px-3 py-2.5 text-left ${k?"cursor-default":"cursor-pointer"}`,children:[(0,b.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-muted text-sm",children:F.includes(l)?l:(0,b.jsx)("span",{className:"text-xs font-semibold text-muted-foreground",children:l})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:`truncate text-sm font-medium ${k?"text-foreground":"text-secondary-foreground"}`,children:c.name}),(0,b.jsx)("div",{className:"text-[11px] text-muted-foreground",children:(d=c.updatedAt,f=Math.floor((e=Date.now()-new Date(d).getTime())/6e4),g=Math.floor(e/36e5),f<60?`${f}m ago`:g<24?`${g}h ago`:`${Math.floor(g/24)}d ago`)})]})]}),(0,b.jsxs)(q.DropdownMenu,{children:[(0,b.jsx)(q.DropdownMenuTrigger,{render:(0,b.jsx)("button",{className:"mr-2 rounded-md p-1 text-muted-foreground opacity-0 transition-all hover:bg-background hover:text-foreground group-hover:opacity-100",onClick:a=>a.stopPropagation()}),children:(0,b.jsx)(j.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)(q.DropdownMenuContent,{align:"start",side:"right",children:[(0,b.jsxs)(q.DropdownMenuItem,{onClick:()=>$(c),children:[(0,b.jsx)(h.Pencil,{className:"mr-2 h-3.5 w-3.5"}),w("sidebar.rename")]}),(0,b.jsxs)(q.DropdownMenuItem,{onClick:()=>aa(c.id),children:[(0,b.jsx)(m,{className:"mr-2 h-3.5 w-3.5"}),w("sidebar.manageLabels")]}),(0,b.jsxs)(q.DropdownMenuItem,{className:a.length<=1?"text-muted-foreground opacity-50":"text-rose-400",disabled:a.length<=1,onClick:()=>_(c.id,c.name),children:[(0,b.jsx)(i.Trash2,{className:"mr-2 h-3.5 w-3.5"}),w("sidebar.delete")]})]})]})]},c.id)})})}),(0,b.jsxs)(e.default,{href:"/missions",className:`relative z-10 flex items-center gap-2 border-t border-border px-4 py-3 text-[11px] cursor-pointer transition-colors ${"/missions"===v?"text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,b.jsx)(p,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:w("missions.navLabel")})]}),(k=W||a[0]?.id)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(e.default,{href:`/workspaces/${k}/notes`,className:"relative z-10 flex items-center gap-2 border-t border-border px-4 py-3 text-[11px] text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:[(0,b.jsx)(n.FileText,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:w("sidebar.notes")})]}),(0,b.jsxs)(e.default,{href:`/workspaces/${k}/assets`,className:"relative z-10 flex items-center gap-2 px-4 py-3 text-[11px] text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:[(0,b.jsx)(o.FolderOpen,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:w("sidebar.assets")})]}),(0,b.jsxs)(e.default,{href:`/workspaces/${k}/archive`,className:"relative z-10 flex items-center gap-2 px-4 py-3 text-[11px] text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:[(0,b.jsx)(f.Archive,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:w("sidebar.archive")})]})]}):null,(0,b.jsx)(H,{open:C,onOpenChange:I,title:w("workspace.create"),name:Q,onNameChange:R,icon:S,onIconChange:T,onSubmit:Y,submitLabel:w("common.create"),nameLabel:w("workspace.name"),iconLabel:w("workspace.icon"),namePlaceholder:w("workspace.namePlaceholder"),cancelLabel:w("common.cancel")}),(0,b.jsx)(H,{open:K,onOpenChange:a=>{L(a),a||V(null)},title:w("workspace.edit"),name:Q,onNameChange:R,icon:S,onIconChange:T,onSubmit:Z,submitLabel:w("common.save"),nameLabel:w("workspace.name"),iconLabel:w("workspace.icon"),namePlaceholder:w("workspace.namePlaceholder"),cancelLabel:w("common.cancel")}),O&&(0,b.jsx)(J,{open:M,onOpenChange:a=>{N(a),a||P(null)},workspaceId:O})]})}function H({open:a,onOpenChange:c,title:d,name:e,onNameChange:f,icon:g,onIconChange:h,onSubmit:i,submitLabel:j,nameLabel:k,iconLabel:l,namePlaceholder:m,cancelLabel:n}){return(0,b.jsx)(s.Dialog,{open:a,onOpenChange:c,disablePointerDismissal:!0,children:(0,b.jsxs)(s.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(s.DialogHeader,{children:(0,b.jsx)(s.DialogTitle,{children:d})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k}),(0,b.jsx)(v.Input,{placeholder:m,value:e,onChange:a=>f(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault(),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l}),(0,b.jsx)("div",{className:"mt-1.5 grid grid-cols-6 gap-1.5",children:F.map(a=>(0,b.jsx)("button",{onClick:()=>h(a),className:`flex h-10 w-10 items-center justify-center rounded-lg text-lg transition-all ${g===a?"bg-primary/15 ring-2 ring-primary/30 scale-110":"bg-muted hover:bg-accent"}`,children:a},a))})]})]}),(0,b.jsxs)(s.DialogFooter,{children:[(0,b.jsx)(u.Button,{variant:"outline",onClick:()=>c(!1),children:n}),(0,b.jsx)(u.Button,{onClick:i,disabled:!e.trim(),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:j})]})]})})}let I=["#3b82f6","#ef4444","#f59e0b","#10b981","#8b5cf6","#ec4899","#06b6d4","#f97316"];function J({open:a,onOpenChange:d,workspaceId:e}){let{t:f}=(0,D.useI18n)(),[g,h]=(0,c.useState)([]),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(I[0]);(0,c.useEffect)(()=>{a&&A(e).then(h)},[a,e]);let m=async()=>{i.trim()&&(await B({name:i.trim(),color:k,workspaceId:e}),h(await A(e)),j(""))},n=async a=>{await C(a),h(b=>b.filter(b=>b.id!==a))};return(0,b.jsx)(s.Dialog,{open:a,onOpenChange:d,disablePointerDismissal:!0,children:(0,b.jsxs)(s.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(s.DialogHeader,{children:(0,b.jsx)(s.DialogTitle,{children:f("label.manage")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[g.map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"h-3 w-3 rounded-full",style:{backgroundColor:a.color}}),(0,b.jsx)("span",{className:"flex-1 text-sm text-foreground",children:a.name}),a.isBuiltin?(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground",children:f("label.builtin")}):(0,b.jsx)("button",{onClick:()=>n(a.id),className:"text-xs text-rose-400 hover:text-rose-300",children:f("common.delete")})]},a.id)),(0,b.jsxs)("div",{className:"border-t border-border pt-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(v.Input,{placeholder:f("label.name"),value:i,onChange:a=>j(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault(),className:"flex-1 h-8"}),(0,b.jsx)(u.Button,{size:"sm",onClick:m,disabled:!i.trim(),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:f("label.add")})]}),(0,b.jsx)("div",{className:"mt-2 flex gap-1.5",children:I.map(a=>(0,b.jsx)("button",{onClick:()=>l(a),className:`h-5 w-5 rounded-full transition-all ${k===a?"ring-2 ring-offset-2 ring-offset-background ring-foreground/30 scale-110":""}`,style:{backgroundColor:a}},a))})]})]})]})})}var K=a.i(432120),L=a.i(410215),M=a.i(666775);let N=(0,k.default)("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);var O=a.i(212765);let P=(0,k.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"}]]);var Q=a.i(248763),R=a.i(470612);a.s([],243701),a.i(243701);var S=a.i(256116),T=a.i(545264);let U=c.createContext(void 0);function V(){let a=c.useContext(U);if(void 0===a)throw Error((0,T.default)(13));return a}let W={imageLoadingStatus:()=>null},X=c.forwardRef(function(a,d){let{className:e,render:f,...g}=a,[h,i]=c.useState("idle"),j=c.useMemo(()=>({imageLoadingStatus:h,setImageLoadingStatus:i}),[h,i]),k=(0,S.useRenderElement)("span",a,{state:{imageLoadingStatus:h},ref:d,props:g,stateAttributesMapping:W});return(0,b.jsx)(U.Provider,{value:j,children:k})});var Y=a.i(825863),Z=a.i(527993),$=a.i(759002),_=a.i(163323),aa=a.i(6644),ab=a.i(302398);let ac={...W,..._.transitionStatusMapping},ad=c.forwardRef(function(a,b){let{className:d,render:e,onLoadingStatusChange:f,referrerPolicy:g,crossOrigin:h,...i}=a,j=V(),k=function(a,{referrerPolicy:b,crossOrigin:d}){let[e,f]=c.useState("idle");return(0,Z.useIsoLayoutEffect)(()=>{if(!a)return f("error"),ab.NOOP;let c=!0,e=new window.Image,g=a=>()=>{c&&f(a)};return f("loading"),e.onload=g("loaded"),e.onerror=g("error"),b&&(e.referrerPolicy=b),e.crossOrigin=d??null,e.src=a,()=>{c=!1}},[a,d,b]),e}(a.src,{referrerPolicy:g,crossOrigin:h}),l="loaded"===k,{mounted:m,transitionStatus:n,setMounted:o}=(0,aa.useTransitionStatus)(l),p=c.useRef(null),q=(0,Y.useStableCallback)(a=>{f?.(a),j.setImageLoadingStatus(a)});(0,Z.useIsoLayoutEffect)(()=>{"idle"!==k&&q(k)},[k,q]),(0,$.useOpenChangeComplete)({open:l,ref:p,onComplete(){l||o(!1)}});let r=(0,S.useRenderElement)("img",a,{state:{imageLoadingStatus:k,transitionStatus:n},ref:[b,p],props:i,stateAttributesMapping:ac,enabled:m});return m?r:null});var ae=a.i(313668);let af=c.forwardRef(function(a,b){let{className:d,render:e,delay:f,...g}=a,{imageLoadingStatus:h}=V(),[i,j]=c.useState(void 0===f),k=(0,ae.useTimeout)();return c.useEffect(()=>(void 0!==f&&k.start(f,()=>j(!0)),k.clear),[k,f]),(0,S.useRenderElement)("span",a,{state:{imageLoadingStatus:h},ref:b,props:g,stateAttributesMapping:W,enabled:"loaded"!==h&&i})});a.s(["Fallback",0,af,"Image",0,ad,"Root",0,X],60418);var ag=a.i(60418),ag=ag,ah=a.i(44585);function ai({className:a,size:c="default",...d}){return(0,b.jsx)(ag.Root,{"data-slot":"avatar","data-size":c,className:(0,ah.cn)("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",a),...d})}function aj({className:a,...c}){return(0,b.jsx)(ag.Fallback,{"data-slot":"avatar-fallback",className:(0,ah.cn)("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",a),...c})}let ak=(0,k.default)("folder-kanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);var al=a.i(61966);let am=(0,k.default)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]]),an=(0,k.default)("package-2",[["path",{d:"M12 3v6",key:"1holv5"}],["path",{d:"M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z",key:"187q7i"}],["path",{d:"M3.054 9.013h17.893",key:"grwhos"}]]);var ao=a.i(54709);let ap=(0,w.createServerReference)("6001179c55b9e8fbaacafb8a92d90bded2fb982406",w.callServer,void 0,w.findSourceMapURL,"globalSearch");var aq=a.i(566811);let ar=[{id:"all",key:"search.all",icon:L.Search},{id:"task",key:"search.task",icon:n.FileText},{id:"project",key:"search.project",icon:ak},{id:"repository",key:"search.repository",icon:al.GitBranch},{id:"note",key:"search.note",icon:am},{id:"asset",key:"search.asset",icon:an}],as=["task","project","repository","note","asset"],at={task:"search.task",project:"search.project",repository:"search.repository",note:"search.note",asset:"search.asset"};function au({result:a,onSelect:c}){let d=ar.find(b=>b.id===a.type)?.icon??n.FileText;return(0,b.jsxs)("button",{onClick:()=>c(a),className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-3 text-left transition-colors hover:bg-accent last:border-b-0",children:[(0,b.jsx)("div",{className:"rounded-md bg-muted p-1.5",children:(0,b.jsx)(d,{className:"h-3.5 w-3.5 text-muted-foreground"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-sm font-medium text-foreground truncate",children:a.title}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:a.subtitle}),a.snippet&&(0,b.jsx)("div",{className:"text-xs text-muted-foreground/70 truncate mt-0.5",children:a.snippet})]})]})}function av({open:a,onOpenChange:e}){let f,{t:g}=(0,D.useI18n)(),h=(0,d.useRouter)(),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)("all"),[m,n]=(0,c.useState)([]),[o,p]=(0,c.useState)(!1),[q,t]=(0,c.useState)(250),v=(0,c.useRef)(null),w=(0,c.useRef)(null);(0,c.useEffect)(()=>{a&&((0,aq.getConfigValue)("search.debounceMs",250).then(t),setTimeout(()=>v.current?.focus(),100),j(""),n([]))},[a]),(0,c.useEffect)(()=>{if(w.current&&clearTimeout(w.current),!i.trim()){n([]),p(!1);return}p(!0);let a=!1;return w.current=setTimeout(async()=>{let b=await ap(i,k);a||(n(b),p(!1))},q),()=>{w.current&&clearTimeout(w.current),a=!0}},[i,k,q]);let x=(0,c.useCallback)(a=>{h.push(a.navigateTo),e(!1)},[h,e]);return(0,b.jsx)(s.Dialog,{open:a,onOpenChange:e,children:(0,b.jsxs)(s.DialogContent,{className:"sm:max-w-lg p-0 gap-0 overflow-hidden !top-[10vh] !-translate-y-0",showCloseButton:!1,children:[(0,b.jsxs)("div",{className:"flex items-center border-b border-border px-4",children:[(0,b.jsx)(L.Search,{className:"h-4 w-4 text-muted-foreground"}),(0,b.jsx)("input",{ref:v,value:i,onChange:a=>j(a.target.value),placeholder:g("search.placeholder"),className:"flex-1 bg-transparent px-3 py-3.5 text-sm text-foreground placeholder-muted-foreground outline-none"}),i&&(0,b.jsx)(u.Button,{variant:"ghost",size:"icon",onClick:()=>{j(""),n([])},className:"text-muted-foreground",children:(0,b.jsx)(ao.X,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)("div",{className:"flex items-center gap-1 border-b border-border px-4 py-2",children:ar.map(a=>{let c=a.icon;return(0,b.jsxs)("button",{onClick:()=>l(a.id),className:`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-all ${k===a.id?"bg-primary/10 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent hover:text-foreground"}`,children:[(0,b.jsx)(c,{className:"h-3 w-3"}),g(a.key)]},a.id)})}),(0,b.jsxs)(r.ScrollArea,{className:"max-h-80",children:[!i.trim()&&(0,b.jsx)("div",{className:"flex items-center justify-center py-12 text-sm text-muted-foreground",children:g("search.typeToSearch")}),i.trim()&&0===m.length&&!o&&(0,b.jsx)("div",{className:"flex items-center justify-center py-12 text-sm text-muted-foreground",children:g("search.noResults")}),"all"===k&&m.length>0&&(f=m.reduce((a,b)=>((a[b.type]??=[]).push(b),a),{}),as.filter(a=>f[a]?.length).map(a=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:g(at[a])}),f[a].map(a=>(0,b.jsx)(au,{result:a,onSelect:x},`${a.type}-${a.id}`))]},a))),"all"!==k&&m.map(a=>(0,b.jsx)(au,{result:a,onSelect:x},`${a.type}-${a.id}`))]})]})})}function aw(a){}let ax=(0,c.createContext)(null);function ay(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}let az="assistant-image-cache";function aA(a,b,c){try{let d=sessionStorage.getItem(az),e=d?JSON.parse(d):{};e[a]||(e[a]={}),e[a][b]=c,sessionStorage.setItem(az,JSON.stringify(e))}catch{}}function aB({children:a}){let[d,e]=(0,c.useState)(!1),[f,g]=(0,c.useState)(!1),[h,i]=(0,c.useState)("sidebar"),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)([]),[n,o]=(0,c.useState)("idle"),[p,q]=(0,c.useState)(!1),r=(0,c.useRef)([]),s=(0,c.useRef)(null),t=(0,c.useRef)(null),[u,v]=(0,c.useState)([]),[w,x]=(0,c.useState)(null),y=(0,c.useRef)(!1),z=(0,c.useCallback)(()=>{m([...r.current])},[]),A=(0,c.useCallback)(async()=>{i("dialog"===await (0,aq.getConfigValue)("assistant.displayMode","sidebar")?"dialog":"sidebar")},[]);(0,c.useEffect)(()=>{A()},[A]);let B=(0,c.useCallback)(async()=>{v([])},[]),C=(0,c.useCallback)(async a=>{q(!0);try{let b=await fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(a)}`);if(!b.ok)return;let c=await b.json();if(Array.isArray(c.messages)){r.current=c.messages;let b=function(a){try{let b=sessionStorage.getItem(az);if(!b)return{};return JSON.parse(b)[a]??{}}catch{return{}}}(a);if(Object.keys(b).length>0){let a=0;r.current=r.current.map(c=>{if("user"===c.role){let d=b[a];if(a++,d?.length)return{...c,imageFilenames:d}}return c})}m([...r.current])}}catch{}finally{q(!1)}},[]);(0,c.useEffect)(()=>{B()},[B,C]);let D=(0,c.useCallback)(()=>{t.current?.abort(),s.current=null,y.current=!1,x(null),aw(null),r.current=[],m([]),o("idle")},[]),E=(0,c.useCallback)(a=>{t.current?.abort(),s.current=a,y.current=!0,x(a),aw(a),r.current=[],m([]),o("idle"),C(a)},[C]),F=(0,c.useCallback)(a=>{v([]),w===a&&D()},[w,D]),G=(0,c.useCallback)(async()=>{g(!0);try{await A(),e(!0)}finally{g(!1)}},[A]),H=(0,c.useCallback)(()=>{e(!1),t.current?.abort()},[]),I=(0,c.useCallback)(()=>{d||f?H():G()},[d,f,H,G]);(0,c.useEffect)(()=>{let a=a=>{(a.metaKey||a.ctrlKey)&&"l"===a.key&&(a.preventDefault(),I())};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[I]);let J=(0,c.useCallback)(async(a,b)=>{if(!a.trim()&&!b?.imageFilenames?.length)return;t.current?.abort();let c=new AbortController;t.current=c;let d=0!==r.current.length||y.current?null:a,e=ay();if(r.current=[...r.current,{id:ay(),role:"user",content:a,imageFilenames:b?.imageFilenames?.length?b.imageFilenames:void 0},{id:e,role:"thinking",content:"",isStreaming:!0}],z(),b?.imageFilenames?.length&&s.current){let a=r.current.filter(a=>"user"===a.role).length-1;aA(s.current,a,b.imageFilenames)}o("connecting");let f=null;try{let g=await fetch("/api/internal/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:a,sessionId:s.current,imageFilenames:b?.imageFilenames??[]}),signal:c.signal});if(!g.ok||!g.body)throw Error(`HTTP ${g.status}`);o("streaming");let h=g.body.getReader(),i=new TextDecoder,j="";for(;;){let{done:a,value:c}=await h.read();if(a)break;let g=(j+=i.decode(c,{stream:!0})).split("\n");for(let a of(j=g.pop()??"",g)){let c;if(a.startsWith("data: ")){try{c=JSON.parse(a.slice(6).trim())}catch{continue}if(c.sessionId){let a=s.current;if(s.current=c.sessionId,d&&!y.current&&c.sessionId!==a){y.current=!0;new Date().toISOString();c.sessionId,function(a){let b=a.trim();b&&b.length>30&&b.slice(0,30)}(d),v([]),x(c.sessionId),aw(c.sessionId),b?.imageFilenames?.length&&aA(c.sessionId,0,b.imageFilenames)}}switch(c.type){case"text_delta":{let a=r.current.filter(a=>a.id!==e);f?r.current=a.map(a=>a.id===f?{...a,content:a.content+(c.content??""),isStreaming:!0}:a):(f=ay(),r.current=[...a,{id:f,role:"assistant",content:c.content??"",isStreaming:!0}]),z();break}case"text":{let a=r.current.filter(a=>a.id!==e);f?r.current=a.map(a=>a.id===f?{...a,content:c.content??a.content,isStreaming:!0}:a):(f=ay(),r.current=[...a,{id:f,role:"assistant",content:c.content??"",isStreaming:!0}]),z();break}case"tool_start":{let a=r.current.filter(a=>a.id!==e);f?(r.current=a.map(a=>a.id===f?{...a,isStreaming:!1}:a),f=null):r.current=a,r.current=[...r.current,{id:ay(),role:"tool",content:`Calling ${c.content??"tool"}...`,toolName:c.content,isStreaming:!0}],z();break}case"tool_use":{let a=r.current.filter(a=>a.id!==e),b=f?a.map(a=>a.id===f?{...a,isStreaming:!1}:a):a;f=null,r.current=[...b,{id:ay(),role:"tool",content:JSON.stringify(c.toolInput??{},null,2),toolName:c.content}],z();break}case"tool_result":r.current=[...r.current,{id:ay(),role:"tool",content:String(c.toolOutput??""),toolName:`${c.content??"tool"} (result)`}],z();break;case"error":r.current=[...r.current.filter(a=>a.id!==e),{id:ay(),role:"assistant",content:`Error: ${c.content??"Unknown error"}`}],z(),o("error");break;case"done":f&&(r.current=r.current.map(a=>a.id===f?{...a,isStreaming:!1}:a)),r.current=r.current.filter(a=>a.id!==e),z(),o("idle")}}}}r.current=r.current.filter(a=>a.id!==e),z(),o(a=>"streaming"===a?"idle":a),B()}catch(a){if("AbortError"===a.name)return;r.current=[...r.current.filter(a=>a.id!==e),{id:ay(),role:"assistant",content:`Connection error: ${a.message??"Unknown error"}`}],z(),o("error")}},[z,B]),K=(0,c.useCallback)(()=>{t.current?.abort(),t.current=null;let a=[...r.current].reverse().find(a=>"user"===a.role),b=a?.content??null;if(a){let b=r.current.lastIndexOf(a);r.current=r.current.slice(0,b),m([...r.current])}return o("idle"),b},[]),L=l[l.length-1],M="connecting"===n||"streaming"===n||L?.role==="thinking"&&!0===L.isStreaming;return(0,b.jsx)(ax.Provider,{value:{isOpen:d,isStarting:f,displayMode:h,worktreePath:j,toggleAssistant:I,closeAssistant:H,chatMessages:l,chatStatus:n,isChatThinking:M,isLoadingHistory:p,sendChatMessage:J,cancelChat:K,sessions:u,activeSessionId:w,createNewSession:D,switchSession:E,removeSession:F,refreshSessions:B},children:a})}function aC(){let a=(0,c.useContext)(ax);if(!a)throw Error("useAssistant must be used within an AssistantProvider");return a}var aD=a.i(109434),aE=a.i(858967),aF=a.i(467034),aG=a.i(938899),aH=a.i(845924),aI=a.i(246962);function aJ(a){return a.replace(/\.git\/?$/,"")}a.i(446786),a.i(814747);let aK=(0,w.createServerReference)("4014d65a7cb4e44cef69364d4265db25536ad2b51b",w.callServer,void 0,w.findSourceMapURL,"resolveGitLocalPath");var aL=a.i(472600);function aM({open:a,onOpenChange:d,onCreateProject:e}){let{t:f,locale:g}=(0,D.useI18n)(),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(""),[n,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(""),[r,w]=(0,c.useState)(!1),[x,y]=(0,c.useState)("FRONTEND"),[z,A]=(0,c.useState)("idle"),[B,C]=(0,c.useState)(""),[F,G]=(0,c.useState)(!1),H=()=>{i(""),k(""),m(""),o(""),q(""),w(!1),y("FRONTEND"),A("idle"),C(""),G(!1)},I=async()=>{if(p.trim()&&!F&&"success"===z){G(!0);try{let a=await (0,aL.analyzeProjectDirectory)(p.trim(),g);m(a)}catch{E.toast.error(f("project.analyzeError"))}finally{G(!1)}}},J=async a=>{o(a),A("idle"),C("");let b=function(a){let b,c=a.match(/^git@([^:]+):(.+)$/);if(c)return{host:c[1],pathSegments:aJ(c[2]).split("/").filter(Boolean)};try{b=new URL(a)}catch{return null}return{host:b.hostname,pathSegments:aJ(decodeURIComponent(b.pathname)).split("/").filter(Boolean)}}(a);b&&b.pathSegments.length>0&&i(b.pathSegments[b.pathSegments.length-1]),r||q(await aK(a))},K=async()=>{if(n.trim()&&p.trim()){A("cloning"),C("");try{let a=function(a){let b=a.trim();if(!b)return"";if(b.startsWith("git@")||b.startsWith("ssh://")||b.endsWith(".git"))return b;try{let a=new URL(b),c=a.hostname,d=decodeURIComponent(a.pathname).split("/").filter(Boolean);if("code.iflytek.com"===c){let a=[...d];"osc"===a[0]&&"_source"===a[1]&&(a=a.slice(2));let e=a.indexOf("-");if(e>0&&(a=a.slice(0,e)),0===a.length)return b;return`https://${c}/${a.join("/")}.git`}return`${a.origin}${a.pathname.replace(/\/$/,"")}.git`}catch{return b}}(n.trim()),b=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clone",url:a,path:p.trim()})}),c=await b.json();if(!b.ok){A("error"),C(c.error||"Clone failed");return}A("success")}catch{A("error"),C("Network error")}}},L=async()=>{h.trim()&&(await e?.({name:h.trim(),alias:j.trim()||void 0,description:l.trim()||void 0,gitUrl:n.trim()||void 0,localPath:p.trim()||void 0,projectType:x}),H(),d(!1))};return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(s.Dialog,{open:a,onOpenChange:a=>{d(a),a||H()},disablePointerDismissal:!0,children:(0,b.jsxs)(s.DialogContent,{style:{maxWidth:"32rem"},children:[(0,b.jsx)(s.DialogHeader,{children:(0,b.jsx)(s.DialogTitle,{children:f("topbar.newProject")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.gitUrl")}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:f("project.gitUrlHint")}),(0,b.jsx)(v.Input,{placeholder:f("project.gitPlaceholder"),value:n,onChange:a=>J(a.target.value),className:"mt-1.5 font-mono text-xs"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.localPath")}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:f("project.localPathHint")}),(0,b.jsx)(v.Input,{placeholder:f("project.localPathPlaceholder"),value:p,onChange:a=>{q(a.target.value),w(!0)},className:"mt-1.5 font-mono text-xs w-full"}),p.trim().startsWith("~")&&(0,b.jsxs)("p",{className:"mt-1 flex items-center gap-1 text-[11px] text-amber-400",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-3 w-3"}),f("project.tildeWarning")]}),n.trim()&&p.trim()&&(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsxs)(u.Button,{type:"button",disabled:"cloning"===z||"success"===z,onClick:K,className:"gap-1.5 text-xs bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/25 hover:bg-emerald-500/25 disabled:opacity-50",children:["cloning"===z?(0,b.jsx)(aD.Loader2,{className:"h-3 w-3 animate-spin"}):"success"===z?(0,b.jsx)(aE.Check,{className:"h-3 w-3"}):(0,b.jsx)(al.GitBranch,{className:"h-3 w-3"}),"cloning"===z?f("git.cloning"):"success"===z?f("git.cloned"):f("git.clone")]}),"error"===z&&(0,b.jsxs)("span",{className:"flex items-center gap-1 text-[11px] text-rose-400",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-3 w-3"}),B]}),"success"===z&&(0,b.jsx)("span",{className:"text-[11px] text-emerald-400",children:f("git.cloneSuccess")})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.name")}),(0,b.jsx)(v.Input,{placeholder:f("project.namePlaceholder"),value:h,onChange:a=>i(a.target.value),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.type.label")}),(0,b.jsx)("div",{className:"mt-1.5",children:(0,b.jsx)(aH.SegmentedControl,{options:[{value:"FRONTEND",label:f("project.type.frontend")},{value:"BACKEND",label:f("project.type.backend")}],value:x,onChange:y})})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.alias")}),(0,b.jsx)(v.Input,{placeholder:f("project.aliasPlaceholder"),value:j,onChange:a=>k(a.target.value),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mt-0.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.description")}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsxs)(t.TooltipTrigger,{render:(0,b.jsx)(u.Button,{type:"button",variant:"ghost",onClick:I,className:`h-6 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground ${!p.trim()||F?"opacity-50":""}`}),children:[F?(0,b.jsx)(aD.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(aG.Sparkles,{className:"h-3 w-3"}),F?f("project.analyzing"):f("project.genDesc")]}),(0,b.jsx)(t.TooltipContent,{children:p.trim()?"success"!==z?f("project.genDescNotCloned"):f("project.genDescReady"):f("project.genDescNoPath")})]})]}),(0,b.jsx)(aI.Textarea,{placeholder:f("project.descPlaceholder"),value:l,onChange:a=>m(a.target.value),rows:3,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none max-h-[200px] overflow-y-auto"})]})]}),(0,b.jsxs)(s.DialogFooter,{children:[(0,b.jsx)(u.Button,{variant:"outline",onClick:()=>{d(!1),H()},children:f("common.cancel")}),(0,b.jsx)(u.Button,{onClick:L,disabled:!h.trim()||F,className:"bg-primary/10 text-primary ring-1 ring-primary/25 hover:bg-primary/20",children:f("common.create")})]})]})})})}var aN=a.i(690834),aN=aN,aO=a.i(563504),aP=a.i(775788);let aQ=(0,w.createServerReference)("60fabeca5f7653ab2766cf231a2885d26de4adb15e",w.callServer,void 0,w.findSourceMapURL,"migrateProjectPath"),aR=(0,w.createServerReference)("40257959581af70539abce0d52368f1b4e64d3b895",w.callServer,void 0,w.findSourceMapURL,"checkMigrationSafety");function aS({open:a,onOpenChange:d,onCreateProject:e}){let{t:f,locale:g}=(0,D.useI18n)(),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(""),[n,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(""),[w,x]=(0,c.useState)(!1),[y,z]=(0,c.useState)("FRONTEND"),[A,B]=(0,c.useState)(!1),[C,F]=(0,c.useState)(!1),[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(""),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)(!1),[Q,R]=(0,c.useState)(!1),S=()=>{i(""),k(""),m(""),p(""),r(""),z("FRONTEND"),B(!1),F(!1),H(""),J(!1),L(""),N(""),P(!1),R(!1)},T=async a=>{r(a),B(!1),F(!1),H(""),L(""),N(""),P(!1),i(a.split("/").filter(Boolean).pop()??"");try{let b=await fetch(`/api/git?path=${encodeURIComponent(a)}`);if(b.ok){let a=await b.json();if(a.isGit&&a.remoteUrl){p(a.remoteUrl),B(!0);let b=a.remoteUrl.match(/\/([^/]+?)(?:\.git)?$/);b&&i(b[1])}}}catch{}},U=(0,c.useCallback)(async a=>{if(F(a),L(""),N(""),P(!1),!a)return void H("");if(n)try{let a=await aK(n);a&&(H(a),a===q&&P(!0))}catch{}if(q)try{let a=await fetch(`/api/git?path=${encodeURIComponent(q)}&checkWorktrees=true`);a.ok&&(await a.json()).hasWorktrees&&N(f("project.worktreeWarning"))}catch{}},[n,q]),V=async()=>{if(q&&!Q){R(!0);try{let a=await (0,aL.analyzeProjectDirectory)(q.trim(),g);m(a)}catch{E.toast.error(f("project.analyzeError"))}finally{R(!1)}}},W=async()=>{if(!h.trim())return;let a={name:h.trim(),alias:j.trim()||void 0,description:l.trim()||void 0,gitUrl:n.trim()||void 0,localPath:q.trim()||void 0,projectType:y},b=await e?.(a);if(C&&G&&G!==q&&b&&"id"in b){J(!0),L("");let a=await aR(b.id);if(!a.safe){L(a.reason),J(!1);return}let c=await aQ(b.id,G);if(J(!1),!c.success)return void L(c.error??f("project.migrateError"));E.toast.success(f("project.migrateSuccess"))}S(),d(!1)},X=!h.trim()||!q.trim()||I||Q||C&&!!M;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s.Dialog,{open:a,onOpenChange:a=>{d(a),a||S()},disablePointerDismissal:!0,children:(0,b.jsxs)(s.DialogContent,{style:{maxWidth:"32rem"},children:[(0,b.jsx)(s.DialogHeader,{children:(0,b.jsx)(s.DialogTitle,{children:f("topbar.importProject")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.localPath")}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:f("project.importHint")}),(0,b.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,b.jsx)(v.Input,{value:q,readOnly:!0,placeholder:f("project.localPathPlaceholder"),className:"flex-1 font-mono text-xs bg-muted/30"}),(0,b.jsxs)(u.Button,{type:"button",variant:"outline",onClick:()=>x(!0),className:"shrink-0 gap-1.5",children:[(0,b.jsx)(o.FolderOpen,{className:"h-3.5 w-3.5"}),f("folder.browse")]})]}),A&&(0,b.jsx)("p",{className:"mt-1.5 text-[11px] text-emerald-400",children:f("project.autoDetected")})]}),n&&(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.gitUrl")}),(0,b.jsx)(v.Input,{value:n,onChange:a=>p(a.target.value),className:"mt-1.5 font-mono text-xs"})]}),A&&q&&(0,b.jsxs)("div",{className:"rounded-md border border-border p-3 space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:f("project.migrate")}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:f("project.migrateHint")})]}),(0,b.jsx)(aP.Switch,{checked:C,onCheckedChange:a=>U(a)})]}),C&&(0,b.jsxs)("div",{className:"space-y-2 pt-1",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-[10px] font-medium text-muted-foreground",children:f("project.targetPath")}),(0,b.jsx)(v.Input,{value:G,onChange:a=>{H(a.target.value),P(a.target.value===q)},placeholder:"/path/to/canonical/location",className:"mt-1 font-mono text-xs"})]}),O&&(0,b.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-sky-400",children:[(0,b.jsx)(aN.default,{className:"h-3 w-3"}),f("project.samePathInfo")]}),M&&(0,b.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-amber-400",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-3 w-3"}),M]}),K&&(0,b.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-rose-400",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-3 w-3"}),K]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.name")}),(0,b.jsx)(v.Input,{placeholder:f("project.namePlaceholder"),value:h,onChange:a=>i(a.target.value),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.type.label")}),(0,b.jsx)("div",{className:"mt-1.5",children:(0,b.jsx)(aH.SegmentedControl,{options:[{value:"FRONTEND",label:f("project.type.frontend")},{value:"BACKEND",label:f("project.type.backend")}],value:y,onChange:z})})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.alias")}),(0,b.jsx)(v.Input,{placeholder:f("project.aliasPlaceholder"),value:j,onChange:a=>k(a.target.value),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mt-0.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.description")}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsxs)(t.TooltipTrigger,{render:(0,b.jsx)(u.Button,{type:"button",variant:"ghost",onClick:V,className:`h-6 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground ${!q||Q?"opacity-50":""}`}),children:[Q?(0,b.jsx)(aD.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(aG.Sparkles,{className:"h-3 w-3"}),Q?f("project.analyzing"):f("project.genDesc")]}),(0,b.jsx)(t.TooltipContent,{children:q?f("project.genDescReady"):f("project.genDescNoPath")})]})]}),(0,b.jsx)(aI.Textarea,{placeholder:f("project.descPlaceholder"),value:l,onChange:a=>m(a.target.value),rows:3,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none max-h-[200px] overflow-y-auto"})]})]}),(0,b.jsxs)(s.DialogFooter,{children:[(0,b.jsx)(u.Button,{variant:"outline",onClick:()=>{d(!1),S()},children:f("common.cancel")}),(0,b.jsx)(u.Button,{onClick:W,disabled:X,className:"bg-primary/10 text-primary ring-1 ring-primary/25 hover:bg-primary/20",children:I?f("project.migrating"):f("common.create")})]})]})}),(0,b.jsx)(aO.FolderBrowserDialog,{open:w,onOpenChange:x,onSelect:a=>T(a)})]})}function aT({onCreateProject:a,username:e}){let{t:f,locale:h,setLocale:i}=(0,D.useI18n)(),{isOpen:j,toggleAssistant:k}=aC(),{resolvedTheme:l,toggleTheme:m,triggerRef:n}=function(){let{resolvedTheme:a,setTheme:b}=(0,K.useTheme)(),d=(0,c.useRef)(null),e=(0,c.useCallback)(c=>{let d="dark"===a?"light":"dark";if("u">typeof document&&"startViewTransition"in document&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches){let a=c?.clientX??window.innerWidth/2,e=c?.clientY??0,f=Math.hypot(Math.max(a,window.innerWidth-a),Math.max(e,window.innerHeight-e));document.startViewTransition(()=>{b(d)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${a}px ${e}px)`,`circle(${f}px at ${a}px ${e}px)`]},{duration:400,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})}else b(d)},[a,b]);return{resolvedTheme:a,toggleTheme:e,triggerRef:d}}(),p=(0,d.useRouter)(),[r,s]=(0,c.useState)(!1),[v,w]=(0,c.useState)(!1),[x,y]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=a=>{(a.metaKey||a.ctrlKey)&&"k"===a.key&&(a.preventDefault(),s(!0))};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("header",{className:"flex h-12 items-center justify-between border-b border-border bg-background/80 px-5 backdrop-blur-sm",children:[(0,b.jsx)("div",{className:"w-40"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)(u.Button,{variant:"outline",onClick:()=>s(!0),className:"h-8 w-[400px] justify-start gap-2 bg-muted/50 text-muted-foreground hover:bg-muted",children:[(0,b.jsx)(L.Search,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"flex-1 text-left",suppressHydrationWarning:!0,children:f("topbar.searchPlaceholder")}),(0,b.jsxs)("kbd",{className:"mr-1 flex items-center gap-0.5 rounded border border-border bg-background px-1.5 py-0.5 text-[10px] font-mono",children:[(0,b.jsx)(N,{className:"h-2.5 w-2.5"}),"K"]})]}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{delay:500,render:(0,b.jsx)("button",{"data-tour":"open-assistant",onClick:k,"aria-label":f("assistant.iconLabel"),className:["cursor-pointer rounded-lg p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",j?"bg-accent text-foreground":""].join(" ")}),children:(0,b.jsx)(P,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{children:f("assistant.iconLabel")})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsxs)(t.TooltipTrigger,{render:(0,b.jsx)(u.Button,{variant:"ghost",onClick:()=>i("zh"===h?"en":"zh"),className:"text-muted-foreground"}),children:[(0,b.jsx)(O.Globe,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"text-[11px] font-semibold",children:"zh"===h?"EN":"中"})]}),(0,b.jsx)(t.TooltipContent,{children:f("settings.language")})]}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)(u.Button,{ref:n,variant:"ghost",size:"icon",onClick:m,className:"text-muted-foreground"}),children:"dark"===l?(0,b.jsx)(Q.Sun,{className:"h-4 w-4"}):(0,b.jsx)(R.Moon,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{children:f("settings.theme")})]}),(0,b.jsx)("div",{className:"h-4 w-px bg-border"}),(0,b.jsxs)(u.Button,{variant:"outline",className:"gap-1.5 ring-1 ring-border hover:bg-accent",onClick:()=>y(!0),children:[(0,b.jsx)(o.FolderOpen,{className:"h-3.5 w-3.5"}),f("topbar.importProject")]}),(0,b.jsxs)(u.Button,{"data-tour":"create-project",className:"gap-1.5 bg-primary/10 text-primary ring-1 ring-primary/25 hover:bg-primary/20",onClick:()=>w(!0),children:[(0,b.jsx)(g.Plus,{className:"h-3.5 w-3.5"}),f("topbar.newProject")]}),(0,b.jsxs)(q.DropdownMenu,{children:[(0,b.jsx)(q.DropdownMenuTrigger,{render:(0,b.jsxs)("button",{className:"ml-0.5 flex cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1 transition-colors hover:bg-accent",children:[e&&(0,b.jsx)("span",{className:"max-w-[80px] truncate text-xs text-muted-foreground",children:e}),(0,b.jsx)(ai,{className:"h-7 w-7 ring-1 ring-border",children:(0,b.jsx)(aj,{className:"bg-emerald-500/20 text-emerald-400 text-[10px] font-semibold",children:e?e.trim().split(/\s+/).filter(a=>a.length>0).slice(0,2).map(a=>a[0].toUpperCase()).join(""):"U"})})]})}),(0,b.jsx)(q.DropdownMenuContent,{align:"end",sideOffset:8,className:"w-40",children:(0,b.jsxs)(q.DropdownMenuItem,{onClick:()=>p.push("/settings"),children:[(0,b.jsx)(M.Settings,{className:"mr-2 h-3.5 w-3.5"}),f("settings.title")]})})]})]})]}),(0,b.jsx)(av,{open:r,onOpenChange:s}),(0,b.jsx)(aM,{open:v,onOpenChange:w,onCreateProject:a}),(0,b.jsx)(aS,{open:x,onOpenChange:y,onCreateProject:a})]})}var aU=a.i(184083),aV=c,aW=a.i(145685);class aX extends aV.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,b){console.error("[ErrorBoundary]",a,b)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 p-8 text-center",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-8 w-8 text-destructive"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:this.state.error?.message??"An unexpected error occurred"})]}),(0,b.jsxs)(u.Button,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:[(0,b.jsx)(aW.RefreshCw,{className:"mr-2 h-3.5 w-3.5"}),"Retry"]})]}):this.props.children}}var aY=a.i(408072),aZ=a.i(357089),a$=a.i(354994);let a_=(0,aZ.default)(async()=>{},{loadableGenerated:{modules:[834880]},ssr:!1});function a0({mode:a}){let{isOpen:c,closeAssistant:d,sessions:e,activeSessionId:f,createNewSession:h,switchSession:j,removeSession:k}=aC(),{t:l}=(0,D.useI18n)(),m=e.find(a=>a.id===f),n=m?.title??l("assistant.newSession");return(0,b.jsxs)("div",{className:"sidebar"===a?"min-w-[320px] max-w-[480px] w-[30vw] shrink-0 border-r border-border flex flex-col bg-sidebar overflow-hidden":"flex flex-col h-full overflow-hidden",children:[(0,b.jsxs)("div",{className:"header-sm flex items-center px-4 gap-2 bg-sidebar",children:[(0,b.jsx)(P,{className:"h-4 w-4 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-sm font-semibold text-foreground shrink-0",children:l("assistant.title")}),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsxs)(q.DropdownMenu,{children:[(0,b.jsxs)(q.DropdownMenuTrigger,{className:"flex items-center gap-1 h-8 px-2 rounded-md text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground max-w-[120px] truncate","aria-label":l("assistant.sessionList"),children:[(0,b.jsx)("span",{className:"truncate",children:n}),(0,b.jsx)(a$.ChevronDown,{className:"h-3 w-3 shrink-0"})]}),(0,b.jsxs)(q.DropdownMenuContent,{side:"bottom",align:"end",sideOffset:4,children:[0===e.length?(0,b.jsx)("div",{className:"px-2 py-4 text-xs text-muted-foreground text-center",children:l("assistant.noSessions")}):e.map(a=>(0,b.jsxs)(q.DropdownMenuItem,{className:"flex items-center justify-between gap-2 pr-1",onClick:()=>j(a.id),children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5 min-w-0",children:[(0,b.jsx)("span",{className:"text-xs truncate max-w-[140px]",children:a.title}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground",children:function(a){let b=Math.floor((Date.now()-new Date(a).getTime())/1e3);if(b<60)return`${b}s ago`;let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);return`${e}d ago`}(a.updatedAt)})]}),(0,b.jsx)(u.Button,{variant:"ghost",className:"h-6 w-6 p-0 shrink-0 opacity-50 hover:opacity-100 hover:text-destructive",onClick:b=>{b.stopPropagation(),k(a.id)},"aria-label":l("assistant.deleteSession"),children:(0,b.jsx)(i.Trash2,{className:"h-3 w-3"})})]},a.id)),e.length>0&&(0,b.jsx)(q.DropdownMenuSeparator,{}),(0,b.jsxs)(q.DropdownMenuItem,{onClick:h,children:[(0,b.jsx)(g.Plus,{className:"h-3 w-3 mr-1"}),(0,b.jsx)("span",{className:"text-xs",children:l("assistant.newSession")})]})]})]}),(0,b.jsx)(u.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:h,"aria-label":l("assistant.newSession"),children:(0,b.jsx)(g.Plus,{className:"h-4 w-4"})})]}),(0,b.jsx)(u.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:d,"aria-label":l("assistant.closeLabel"),children:(0,b.jsx)(ao.X,{className:"h-4 w-4"})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-hidden",children:c?(0,b.jsx)(a_,{}):null})]})}var a1=a.i(684262);function a2({onDismiss:a}){let{t:d}=(0,D.useI18n)(),[e,f]=(0,c.useState)(!1);(0,c.useEffect)(()=>{},[]);let g=async()=>{"default"!==await window.Notification.requestPermission()&&(f(!1),a?.())};return e?(0,b.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-[9999] w-auto max-w-lg bg-card border rounded-lg shadow-lg px-4 py-2.5 flex items-center gap-3 animate-in fade-in slide-in-from-top-4 duration-500",children:[(0,b.jsx)(a1.Bell,{className:"h-4 w-4 shrink-0 text-primary"}),(0,b.jsx)("span",{className:"flex-1 text-sm",children:d("notification.permissionPrompt")}),(0,b.jsx)(u.Button,{size:"default",onClick:g,children:d("notification.allow")}),(0,b.jsx)(u.Button,{variant:"ghost",size:"default",onClick:()=>{f(!1),a?.()},children:d("notification.dismiss")})]}):null}w.callServer,w.findSourceMapURL;var a3=a.i(626371);let a4=[{target:"create-workspace",titleKey:"tour.step1.title",descKey:"tour.step1.desc",placement:"right"},{target:"create-project",titleKey:"tour.step2.title",descKey:"tour.step2.desc",placement:"bottom",waitForTarget:!0},{target:"open-assistant",titleKey:"tour.step3.title",descKey:"tour.step3.desc",placement:"bottom"}];function a5({onComplete:a}){let{t:d}=(0,D.useI18n)(),[e,f]=(0,c.useState)(0),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(!1),k=(0,c.useRef)(null),l=a4[e],m=(0,c.useCallback)(async()=>{await (0,a3.setConfigValue)("onboarding.tourCompleted",!0),a()},[a]),n=(0,c.useCallback)(()=>l?document.querySelector(`[data-tour="${l.target}"]`):null,[l]),o=(0,c.useCallback)(()=>{let a=n();a?(h(a.getBoundingClientRect()),j(!0)):j(!1)},[n]);(0,c.useEffect)(()=>{o();let a=null;!i&&l?.waitForTarget&&(k.current=new MutationObserver(()=>{let b=n();b&&(h(b.getBoundingClientRect()),j(!0),k.current?.disconnect(),a&&clearTimeout(a))}),k.current.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{!n()&&(f(a=>{let b=a+1;return b<a4.length?b:a}),e>=a4.length-1&&m())},5e3));let b=()=>o();return window.addEventListener("resize",b),window.addEventListener("scroll",b,!0),()=>{k.current?.disconnect(),a&&clearTimeout(a),window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0)}},[e,l,n,o,i,m]),(0,c.useEffect)(()=>{let a=setInterval(o,1e3);return()=>clearInterval(a)},[o]);let p=(0,c.useCallback)(()=>{e<a4.length-1?(f(a=>a+1),j(!1)):m()},[e]);return l?(0,b.jsx)(b.Fragment,{children:i&&g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-[10000]",style:{background:`radial-gradient(
1
+ module.exports=[690834,a=>{"use strict";let b=(0,a.i(302856).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);a.s(["default",0,b])},582043,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(448287),e=a.i(759985),f=a.i(14180),g=a.i(263973),h=a.i(94202),i=a.i(569210),j=a.i(317076),k=a.i(302856);let l=(0,k.default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),m=(0,k.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"}]]);var n=a.i(161604),o=a.i(986379);let p=(0,k.default)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);var q=a.i(445705),r=a.i(358440),s=a.i(857122),t=a.i(95446),u=a.i(410756),v=a.i(620235),w=a.i(879876);let x=(0,w.createServerReference)("40939248ba94f467ae6c0ca056c20cdf8fd7643275",w.callServer,void 0,w.findSourceMapURL,"createWorkspace"),y=(0,w.createServerReference)("605468dac93122485441f09a81ca4245c334976303",w.callServer,void 0,w.findSourceMapURL,"updateWorkspace"),z=(0,w.createServerReference)("40c2a7b826bd84837cc38f35577365d57e5aa9b43e",w.callServer,void 0,w.findSourceMapURL,"deleteWorkspace"),A=(0,w.createServerReference)("4044694abea180e8be554d786bde1232322fb14aad",w.callServer,void 0,w.findSourceMapURL,"getLabelsForWorkspace"),B=(0,w.createServerReference)("4014bdcb9765396efe414741835e6be0a7882be8f5",w.callServer,void 0,w.findSourceMapURL,"createLabel"),C=(0,w.createServerReference)("409ee98a06d63b435af3b096d320d081be06600e52",w.callServer,void 0,w.findSourceMapURL,"deleteLabel");var D=a.i(584335),E=a.i(942308);let F=["📋","🚀","🎯","💡","🔧","📦","🎨","📊","🔬","🌟","📝","🏗️"];function G({workspaces:a}){let k,s=(0,d.useRouter)(),v=(0,d.usePathname)(),{t:w}=(0,D.useI18n)(),[A,B]=(0,c.useState)(!1);(0,c.useEffect)(()=>{"true"===localStorage.getItem("sidebar-collapsed")&&B(!0)},[]);let[C,I]=(0,c.useState)(!1),[K,L]=(0,c.useState)(!1),[M,N]=(0,c.useState)(!1),[O,P]=(0,c.useState)(null),[Q,R]=(0,c.useState)(""),[S,T]=(0,c.useState)(F[0]),[U,V]=(0,c.useState)(null),W=v.split("/workspaces/")[1]?.split("/")[0],X=(0,c.useCallback)(()=>{B(a=>{let b=!a;return localStorage.setItem("sidebar-collapsed",String(b)),b})},[]),Y=(0,c.useCallback)(async()=>{if(!Q.trim())return;let a=await x({name:Q.trim(),description:S});R(""),T(F[0]),I(!1),s.refresh(),s.push(`/workspaces/${a.id}`)},[Q,S,s]),Z=(0,c.useCallback)(async()=>{Q.trim()&&U&&(await y(U,{name:Q.trim(),description:S}),R(""),L(!1),V(null),s.refresh())},[Q,S,U,s]),$=(0,c.useCallback)(a=>{V(a.id),R(a.name),T(a.description&&F.includes(a.description)?a.description:F[0]),L(!0)},[]),_=(0,c.useCallback)(async(b,c)=>{if(a.length<=1)return void E.toast.error(w("sidebar.lastWorkspaceError"));if(confirm(w("sidebar.deleteConfirm",{name:c})))try{await z(b),s.refresh(),W===b&&s.push("/workspaces")}catch{E.toast.error(w("sidebar.lastWorkspaceError"))}},[W,s,w,a.length]),aa=(0,c.useCallback)(a=>{P(a),N(!0)},[]),ab=a=>a.description&&F.includes(a.description)?a.description:a.name.charAt(0).toUpperCase();if(A){let c;return(0,b.jsxs)("aside",{className:"flex h-screen w-14 flex-col items-center border-r border-border bg-sidebar py-3",children:[(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:X,className:"mb-4 flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 ring-1 ring-primary/20 transition-transform hover:scale-105"}),children:(0,b.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-6 w-6 rounded"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.expand")})]}),(0,b.jsx)(r.ScrollArea,{className:"flex-1 min-h-0",children:(0,b.jsxs)("div",{className:"flex flex-col items-center gap-1 px-0.5 pt-1",children:[a.map(a=>{let c=W===a.id,d=ab(a);return(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>{c||s.push(`/workspaces/${a.id}`)},className:`flex h-9 w-9 items-center justify-center rounded-lg transition-all ${c?"ring-1 ring-primary/20 text-foreground cursor-default":"text-muted-foreground hover:text-foreground cursor-pointer"}`}),children:(0,b.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-muted text-sm",children:F.includes(d)?d:(0,b.jsx)("span",{className:"text-xs font-semibold",children:d})})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:a.name})]},a.id)}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{"data-tour":"create-workspace",onClick:()=>I(!0),className:"flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"}),children:(0,b.jsx)(g.Plus,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.newWorkspace")})]})]})}),(0,b.jsxs)("div",{className:"mt-2 flex flex-col items-center gap-1",children:[(c=W||a[0]?.id)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>s.push(`/workspaces/${c}/notes`),className:`rounded-lg p-2 transition-colors ${v.includes("/notes")?"text-foreground bg-accent":"text-muted-foreground hover:bg-accent hover:text-foreground"}`}),children:(0,b.jsx)(n.FileText,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.notes")})]}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>s.push(`/workspaces/${c}/assets`),className:`rounded-lg p-2 transition-colors ${v.includes("/assets")?"text-foreground bg-accent":"text-muted-foreground hover:bg-accent hover:text-foreground"}`}),children:(0,b.jsx)(o.FolderOpen,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.assets")})]}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>s.push(`/workspaces/${c}/archive`),className:`rounded-lg p-2 transition-colors ${v.includes("/archive")?"text-foreground bg-accent":"text-muted-foreground hover:bg-accent hover:text-foreground"}`}),children:(0,b.jsx)(f.Archive,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("sidebar.archive")})]})]}):null,(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)("button",{onClick:()=>s.push("/missions"),className:`rounded-lg p-2 transition-colors ${"/missions"===v?"text-foreground bg-accent":"text-muted-foreground hover:bg-accent hover:text-foreground"}`}),children:(0,b.jsx)(p,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{side:"right",sideOffset:8,children:w("missions.navLabel")})]})]}),(0,b.jsx)(H,{open:C,onOpenChange:I,title:w("workspace.create"),name:Q,onNameChange:R,icon:S,onIconChange:T,onSubmit:Y,submitLabel:w("common.create"),nameLabel:w("workspace.name"),iconLabel:w("workspace.icon"),namePlaceholder:w("workspace.namePlaceholder"),cancelLabel:w("common.cancel")})]})}return(0,b.jsxs)("aside",{className:"noise relative flex h-screen w-56 flex-col border-r border-border bg-sidebar",children:[(0,b.jsxs)("div",{className:"relative z-10 flex items-center gap-3 px-4 py-4",children:[(0,b.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-9 w-9 rounded-lg"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("div",{className:"text-sm font-semibold tracking-tight text-foreground",children:"Tower"}),(0,b.jsx)("div",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground",children:"Studio"})]}),(0,b.jsx)(u.Button,{variant:"ghost",size:"icon-xs",onClick:X,className:"text-muted-foreground",title:w("sidebar.collapse"),children:(0,b.jsx)(l,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"relative z-10 flex items-center justify-between px-4 py-2",children:[(0,b.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:w("sidebar.workspace")}),(0,b.jsx)(u.Button,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","data-tour":"create-workspace",onClick:()=>{R(""),T(F[0]),I(!0)},title:w("sidebar.newWorkspace"),children:(0,b.jsx)(g.Plus,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)(r.ScrollArea,{className:"relative z-10 mt-2 flex-1 min-h-0",children:(0,b.jsx)("div",{className:"px-2 py-1",children:a.map(c=>{var d;let e,f,g,k=W===c.id,l=ab(c);return(0,b.jsxs)("div",{className:`group relative flex items-center rounded-lg transition-all ${k?"bg-accent ring-1 ring-primary/15":"hover:bg-accent/60"}`,children:[(0,b.jsxs)("button",{onClick:()=>{k||s.push(`/workspaces/${c.id}`)},className:`flex flex-1 items-center gap-2.5 px-3 py-2.5 text-left ${k?"cursor-default":"cursor-pointer"}`,children:[(0,b.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-muted text-sm",children:F.includes(l)?l:(0,b.jsx)("span",{className:"text-xs font-semibold text-muted-foreground",children:l})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:`truncate text-sm font-medium ${k?"text-foreground":"text-secondary-foreground"}`,children:c.name}),(0,b.jsx)("div",{className:"text-[11px] text-muted-foreground",children:(d=c.updatedAt,f=Math.floor((e=Date.now()-new Date(d).getTime())/6e4),g=Math.floor(e/36e5),f<60?`${f}m ago`:g<24?`${g}h ago`:`${Math.floor(g/24)}d ago`)})]})]}),(0,b.jsxs)(q.DropdownMenu,{children:[(0,b.jsx)(q.DropdownMenuTrigger,{render:(0,b.jsx)("button",{className:"mr-2 rounded-md p-1 text-muted-foreground opacity-0 transition-all hover:bg-background hover:text-foreground group-hover:opacity-100",onClick:a=>a.stopPropagation()}),children:(0,b.jsx)(j.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)(q.DropdownMenuContent,{align:"start",side:"right",children:[(0,b.jsxs)(q.DropdownMenuItem,{onClick:()=>$(c),children:[(0,b.jsx)(h.Pencil,{className:"mr-2 h-3.5 w-3.5"}),w("sidebar.rename")]}),(0,b.jsxs)(q.DropdownMenuItem,{onClick:()=>aa(c.id),children:[(0,b.jsx)(m,{className:"mr-2 h-3.5 w-3.5"}),w("sidebar.manageLabels")]}),(0,b.jsxs)(q.DropdownMenuItem,{className:a.length<=1?"text-muted-foreground opacity-50":"text-rose-400",disabled:a.length<=1,onClick:()=>_(c.id,c.name),children:[(0,b.jsx)(i.Trash2,{className:"mr-2 h-3.5 w-3.5"}),w("sidebar.delete")]})]})]})]},c.id)})})}),(0,b.jsxs)(e.default,{href:"/missions",className:`relative z-10 flex items-center gap-2 border-t border-border px-4 py-3 text-[11px] cursor-pointer transition-colors ${"/missions"===v?"text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,b.jsx)(p,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:w("missions.navLabel")})]}),(k=W||a[0]?.id)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(e.default,{href:`/workspaces/${k}/notes`,className:"relative z-10 flex items-center gap-2 border-t border-border px-4 py-3 text-[11px] text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:[(0,b.jsx)(n.FileText,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:w("sidebar.notes")})]}),(0,b.jsxs)(e.default,{href:`/workspaces/${k}/assets`,className:"relative z-10 flex items-center gap-2 px-4 py-3 text-[11px] text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:[(0,b.jsx)(o.FolderOpen,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:w("sidebar.assets")})]}),(0,b.jsxs)(e.default,{href:`/workspaces/${k}/archive`,className:"relative z-10 flex items-center gap-2 px-4 py-3 text-[11px] text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:[(0,b.jsx)(f.Archive,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:w("sidebar.archive")})]})]}):null,(0,b.jsx)(H,{open:C,onOpenChange:I,title:w("workspace.create"),name:Q,onNameChange:R,icon:S,onIconChange:T,onSubmit:Y,submitLabel:w("common.create"),nameLabel:w("workspace.name"),iconLabel:w("workspace.icon"),namePlaceholder:w("workspace.namePlaceholder"),cancelLabel:w("common.cancel")}),(0,b.jsx)(H,{open:K,onOpenChange:a=>{L(a),a||V(null)},title:w("workspace.edit"),name:Q,onNameChange:R,icon:S,onIconChange:T,onSubmit:Z,submitLabel:w("common.save"),nameLabel:w("workspace.name"),iconLabel:w("workspace.icon"),namePlaceholder:w("workspace.namePlaceholder"),cancelLabel:w("common.cancel")}),O&&(0,b.jsx)(J,{open:M,onOpenChange:a=>{N(a),a||P(null)},workspaceId:O})]})}function H({open:a,onOpenChange:c,title:d,name:e,onNameChange:f,icon:g,onIconChange:h,onSubmit:i,submitLabel:j,nameLabel:k,iconLabel:l,namePlaceholder:m,cancelLabel:n}){return(0,b.jsx)(s.Dialog,{open:a,onOpenChange:c,disablePointerDismissal:!0,children:(0,b.jsxs)(s.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(s.DialogHeader,{children:(0,b.jsx)(s.DialogTitle,{children:d})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k}),(0,b.jsx)(v.Input,{placeholder:m,value:e,onChange:a=>f(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault(),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l}),(0,b.jsx)("div",{className:"mt-1.5 grid grid-cols-6 gap-1.5",children:F.map(a=>(0,b.jsx)("button",{onClick:()=>h(a),className:`flex h-10 w-10 items-center justify-center rounded-lg text-lg transition-all ${g===a?"bg-primary/15 ring-2 ring-primary/30 scale-110":"bg-muted hover:bg-accent"}`,children:a},a))})]})]}),(0,b.jsxs)(s.DialogFooter,{children:[(0,b.jsx)(u.Button,{variant:"outline",onClick:()=>c(!1),children:n}),(0,b.jsx)(u.Button,{onClick:i,disabled:!e.trim(),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:j})]})]})})}let I=["#3b82f6","#ef4444","#f59e0b","#10b981","#8b5cf6","#ec4899","#06b6d4","#f97316"];function J({open:a,onOpenChange:d,workspaceId:e}){let{t:f}=(0,D.useI18n)(),[g,h]=(0,c.useState)([]),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(I[0]);(0,c.useEffect)(()=>{a&&A(e).then(h)},[a,e]);let m=async()=>{i.trim()&&(await B({name:i.trim(),color:k,workspaceId:e}),h(await A(e)),j(""))},n=async a=>{await C(a),h(b=>b.filter(b=>b.id!==a))};return(0,b.jsx)(s.Dialog,{open:a,onOpenChange:d,disablePointerDismissal:!0,children:(0,b.jsxs)(s.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(s.DialogHeader,{children:(0,b.jsx)(s.DialogTitle,{children:f("label.manage")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[g.map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"h-3 w-3 rounded-full",style:{backgroundColor:a.color}}),(0,b.jsx)("span",{className:"flex-1 text-sm text-foreground",children:a.name}),a.isBuiltin?(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground",children:f("label.builtin")}):(0,b.jsx)("button",{onClick:()=>n(a.id),className:"text-xs text-rose-400 hover:text-rose-300",children:f("common.delete")})]},a.id)),(0,b.jsxs)("div",{className:"border-t border-border pt-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(v.Input,{placeholder:f("label.name"),value:i,onChange:a=>j(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault(),className:"flex-1 h-8"}),(0,b.jsx)(u.Button,{size:"sm",onClick:m,disabled:!i.trim(),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:f("label.add")})]}),(0,b.jsx)("div",{className:"mt-2 flex gap-1.5",children:I.map(a=>(0,b.jsx)("button",{onClick:()=>l(a),className:`h-5 w-5 rounded-full transition-all ${k===a?"ring-2 ring-offset-2 ring-offset-background ring-foreground/30 scale-110":""}`,style:{backgroundColor:a}},a))})]})]})]})})}var K=a.i(432120),L=a.i(410215),M=a.i(666775);let N=(0,k.default)("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);var O=a.i(212765);let P=(0,k.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"}]]);var Q=a.i(248763),R=a.i(470612);a.s([],243701),a.i(243701);var S=a.i(256116),T=a.i(545264);let U=c.createContext(void 0);function V(){let a=c.useContext(U);if(void 0===a)throw Error((0,T.default)(13));return a}let W={imageLoadingStatus:()=>null},X=c.forwardRef(function(a,d){let{className:e,render:f,...g}=a,[h,i]=c.useState("idle"),j=c.useMemo(()=>({imageLoadingStatus:h,setImageLoadingStatus:i}),[h,i]),k=(0,S.useRenderElement)("span",a,{state:{imageLoadingStatus:h},ref:d,props:g,stateAttributesMapping:W});return(0,b.jsx)(U.Provider,{value:j,children:k})});var Y=a.i(825863),Z=a.i(527993),$=a.i(759002),_=a.i(163323),aa=a.i(6644),ab=a.i(302398);let ac={...W,..._.transitionStatusMapping},ad=c.forwardRef(function(a,b){let{className:d,render:e,onLoadingStatusChange:f,referrerPolicy:g,crossOrigin:h,...i}=a,j=V(),k=function(a,{referrerPolicy:b,crossOrigin:d}){let[e,f]=c.useState("idle");return(0,Z.useIsoLayoutEffect)(()=>{if(!a)return f("error"),ab.NOOP;let c=!0,e=new window.Image,g=a=>()=>{c&&f(a)};return f("loading"),e.onload=g("loaded"),e.onerror=g("error"),b&&(e.referrerPolicy=b),e.crossOrigin=d??null,e.src=a,()=>{c=!1}},[a,d,b]),e}(a.src,{referrerPolicy:g,crossOrigin:h}),l="loaded"===k,{mounted:m,transitionStatus:n,setMounted:o}=(0,aa.useTransitionStatus)(l),p=c.useRef(null),q=(0,Y.useStableCallback)(a=>{f?.(a),j.setImageLoadingStatus(a)});(0,Z.useIsoLayoutEffect)(()=>{"idle"!==k&&q(k)},[k,q]),(0,$.useOpenChangeComplete)({open:l,ref:p,onComplete(){l||o(!1)}});let r=(0,S.useRenderElement)("img",a,{state:{imageLoadingStatus:k,transitionStatus:n},ref:[b,p],props:i,stateAttributesMapping:ac,enabled:m});return m?r:null});var ae=a.i(313668);let af=c.forwardRef(function(a,b){let{className:d,render:e,delay:f,...g}=a,{imageLoadingStatus:h}=V(),[i,j]=c.useState(void 0===f),k=(0,ae.useTimeout)();return c.useEffect(()=>(void 0!==f&&k.start(f,()=>j(!0)),k.clear),[k,f]),(0,S.useRenderElement)("span",a,{state:{imageLoadingStatus:h},ref:b,props:g,stateAttributesMapping:W,enabled:"loaded"!==h&&i})});a.s(["Fallback",0,af,"Image",0,ad,"Root",0,X],60418);var ag=a.i(60418),ag=ag,ah=a.i(44585);function ai({className:a,size:c="default",...d}){return(0,b.jsx)(ag.Root,{"data-slot":"avatar","data-size":c,className:(0,ah.cn)("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",a),...d})}function aj({className:a,...c}){return(0,b.jsx)(ag.Fallback,{"data-slot":"avatar-fallback",className:(0,ah.cn)("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",a),...c})}let ak=(0,k.default)("folder-kanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);var al=a.i(61966);let am=(0,k.default)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]]),an=(0,k.default)("package-2",[["path",{d:"M12 3v6",key:"1holv5"}],["path",{d:"M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z",key:"187q7i"}],["path",{d:"M3.054 9.013h17.893",key:"grwhos"}]]);var ao=a.i(54709);let ap=(0,w.createServerReference)("60519939be78ced789932933058ac226b0b3ed474c",w.callServer,void 0,w.findSourceMapURL,"globalSearch");var aq=a.i(793335);let ar=[{id:"all",key:"search.all",icon:L.Search},{id:"task",key:"search.task",icon:n.FileText},{id:"project",key:"search.project",icon:ak},{id:"repository",key:"search.repository",icon:al.GitBranch},{id:"note",key:"search.note",icon:am},{id:"asset",key:"search.asset",icon:an}],as=["task","project","repository","note","asset"],at={task:"search.task",project:"search.project",repository:"search.repository",note:"search.note",asset:"search.asset"};function au({result:a,onSelect:c}){let d=ar.find(b=>b.id===a.type)?.icon??n.FileText;return(0,b.jsxs)("button",{onClick:()=>c(a),className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-3 text-left transition-colors hover:bg-accent last:border-b-0",children:[(0,b.jsx)("div",{className:"rounded-md bg-muted p-1.5",children:(0,b.jsx)(d,{className:"h-3.5 w-3.5 text-muted-foreground"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-sm font-medium text-foreground truncate",children:a.title}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:a.subtitle}),a.snippet&&(0,b.jsx)("div",{className:"text-xs text-muted-foreground/70 truncate mt-0.5",children:a.snippet})]})]})}function av({open:a,onOpenChange:e}){let f,{t:g}=(0,D.useI18n)(),h=(0,d.useRouter)(),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)("all"),[m,n]=(0,c.useState)([]),[o,p]=(0,c.useState)(!1),[q,t]=(0,c.useState)(250),v=(0,c.useRef)(null),w=(0,c.useRef)(null);(0,c.useEffect)(()=>{a&&((0,aq.getConfigValue)("search.debounceMs",250).then(t),setTimeout(()=>v.current?.focus(),100),j(""),n([]))},[a]),(0,c.useEffect)(()=>{if(w.current&&clearTimeout(w.current),!i.trim()){n([]),p(!1);return}p(!0);let a=!1;return w.current=setTimeout(async()=>{let b=await ap(i,k);a||(n(b),p(!1))},q),()=>{w.current&&clearTimeout(w.current),a=!0}},[i,k,q]);let x=(0,c.useCallback)(a=>{h.push(a.navigateTo),e(!1)},[h,e]);return(0,b.jsx)(s.Dialog,{open:a,onOpenChange:e,children:(0,b.jsxs)(s.DialogContent,{className:"sm:max-w-lg p-0 gap-0 overflow-hidden !top-[10vh] !-translate-y-0",showCloseButton:!1,children:[(0,b.jsxs)("div",{className:"flex items-center border-b border-border px-4",children:[(0,b.jsx)(L.Search,{className:"h-4 w-4 text-muted-foreground"}),(0,b.jsx)("input",{ref:v,value:i,onChange:a=>j(a.target.value),placeholder:g("search.placeholder"),className:"flex-1 bg-transparent px-3 py-3.5 text-sm text-foreground placeholder-muted-foreground outline-none"}),i&&(0,b.jsx)(u.Button,{variant:"ghost",size:"icon",onClick:()=>{j(""),n([])},className:"text-muted-foreground",children:(0,b.jsx)(ao.X,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)("div",{className:"flex items-center gap-1 border-b border-border px-4 py-2",children:ar.map(a=>{let c=a.icon;return(0,b.jsxs)("button",{onClick:()=>l(a.id),className:`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-all ${k===a.id?"bg-primary/10 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent hover:text-foreground"}`,children:[(0,b.jsx)(c,{className:"h-3 w-3"}),g(a.key)]},a.id)})}),(0,b.jsxs)(r.ScrollArea,{className:"max-h-80",children:[!i.trim()&&(0,b.jsx)("div",{className:"flex items-center justify-center py-12 text-sm text-muted-foreground",children:g("search.typeToSearch")}),i.trim()&&0===m.length&&!o&&(0,b.jsx)("div",{className:"flex items-center justify-center py-12 text-sm text-muted-foreground",children:g("search.noResults")}),"all"===k&&m.length>0&&(f=m.reduce((a,b)=>((a[b.type]??=[]).push(b),a),{}),as.filter(a=>f[a]?.length).map(a=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:g(at[a])}),f[a].map(a=>(0,b.jsx)(au,{result:a,onSelect:x},`${a.type}-${a.id}`))]},a))),"all"!==k&&m.map(a=>(0,b.jsx)(au,{result:a,onSelect:x},`${a.type}-${a.id}`))]})]})})}function aw(a){}let ax=(0,c.createContext)(null);function ay(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}let az="assistant-image-cache";function aA(a,b,c){try{let d=sessionStorage.getItem(az),e=d?JSON.parse(d):{};e[a]||(e[a]={}),e[a][b]=c,sessionStorage.setItem(az,JSON.stringify(e))}catch{}}function aB({children:a}){let[d,e]=(0,c.useState)(!1),[f,g]=(0,c.useState)(!1),[h,i]=(0,c.useState)("sidebar"),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)([]),[n,o]=(0,c.useState)("idle"),[p,q]=(0,c.useState)(!1),r=(0,c.useRef)([]),s=(0,c.useRef)(null),t=(0,c.useRef)(null),[u,v]=(0,c.useState)([]),[w,x]=(0,c.useState)(null),y=(0,c.useRef)(!1),z=(0,c.useCallback)(()=>{m([...r.current])},[]),A=(0,c.useCallback)(async()=>{i("dialog"===await (0,aq.getConfigValue)("assistant.displayMode","sidebar")?"dialog":"sidebar")},[]);(0,c.useEffect)(()=>{A()},[A]);let B=(0,c.useCallback)(async()=>{v([])},[]),C=(0,c.useCallback)(async a=>{q(!0);try{let b=await fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(a)}`);if(!b.ok)return;let c=await b.json();if(Array.isArray(c.messages)){r.current=c.messages;let b=function(a){try{let b=sessionStorage.getItem(az);if(!b)return{};return JSON.parse(b)[a]??{}}catch{return{}}}(a);if(Object.keys(b).length>0){let a=0;r.current=r.current.map(c=>{if("user"===c.role){let d=b[a];if(a++,d?.length)return{...c,imageFilenames:d}}return c})}m([...r.current])}}catch{}finally{q(!1)}},[]);(0,c.useEffect)(()=>{B()},[B,C]);let D=(0,c.useCallback)(()=>{t.current?.abort(),s.current=null,y.current=!1,x(null),aw(null),r.current=[],m([]),o("idle")},[]),E=(0,c.useCallback)(a=>{t.current?.abort(),s.current=a,y.current=!0,x(a),aw(a),r.current=[],m([]),o("idle"),C(a)},[C]),F=(0,c.useCallback)(a=>{v([]),w===a&&D()},[w,D]),G=(0,c.useCallback)(async()=>{g(!0);try{await A(),e(!0)}finally{g(!1)}},[A]),H=(0,c.useCallback)(()=>{e(!1),t.current?.abort()},[]),I=(0,c.useCallback)(()=>{d||f?H():G()},[d,f,H,G]);(0,c.useEffect)(()=>{let a=a=>{(a.metaKey||a.ctrlKey)&&"l"===a.key&&(a.preventDefault(),I())};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[I]);let J=(0,c.useCallback)(async(a,b)=>{if(!a.trim()&&!b?.imageFilenames?.length)return;t.current?.abort();let c=new AbortController;t.current=c;let d=0!==r.current.length||y.current?null:a,e=ay();if(r.current=[...r.current,{id:ay(),role:"user",content:a,imageFilenames:b?.imageFilenames?.length?b.imageFilenames:void 0},{id:e,role:"thinking",content:"",isStreaming:!0}],z(),b?.imageFilenames?.length&&s.current){let a=r.current.filter(a=>"user"===a.role).length-1;aA(s.current,a,b.imageFilenames)}o("connecting");let f=null;try{let g=await fetch("/api/internal/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:a,sessionId:s.current,imageFilenames:b?.imageFilenames??[]}),signal:c.signal});if(!g.ok||!g.body)throw Error(`HTTP ${g.status}`);o("streaming");let h=g.body.getReader(),i=new TextDecoder,j="";for(;;){let{done:a,value:c}=await h.read();if(a)break;let g=(j+=i.decode(c,{stream:!0})).split("\n");for(let a of(j=g.pop()??"",g)){let c;if(a.startsWith("data: ")){try{c=JSON.parse(a.slice(6).trim())}catch{continue}if(c.sessionId){let a=s.current;if(s.current=c.sessionId,d&&!y.current&&c.sessionId!==a){y.current=!0;new Date().toISOString();c.sessionId,function(a){let b=a.trim();b&&b.length>30&&b.slice(0,30)}(d),v([]),x(c.sessionId),aw(c.sessionId),b?.imageFilenames?.length&&aA(c.sessionId,0,b.imageFilenames)}}switch(c.type){case"text_delta":{let a=r.current.filter(a=>a.id!==e);f?r.current=a.map(a=>a.id===f?{...a,content:a.content+(c.content??""),isStreaming:!0}:a):(f=ay(),r.current=[...a,{id:f,role:"assistant",content:c.content??"",isStreaming:!0}]),z();break}case"text":{let a=r.current.filter(a=>a.id!==e);f?r.current=a.map(a=>a.id===f?{...a,content:c.content??a.content,isStreaming:!0}:a):(f=ay(),r.current=[...a,{id:f,role:"assistant",content:c.content??"",isStreaming:!0}]),z();break}case"tool_start":{let a=r.current.filter(a=>a.id!==e);f?(r.current=a.map(a=>a.id===f?{...a,isStreaming:!1}:a),f=null):r.current=a,r.current=[...r.current,{id:ay(),role:"tool",content:`Calling ${c.content??"tool"}...`,toolName:c.content,isStreaming:!0}],z();break}case"tool_use":{let a=r.current.filter(a=>a.id!==e),b=f?a.map(a=>a.id===f?{...a,isStreaming:!1}:a):a;f=null,r.current=[...b,{id:ay(),role:"tool",content:JSON.stringify(c.toolInput??{},null,2),toolName:c.content}],z();break}case"tool_result":r.current=[...r.current,{id:ay(),role:"tool",content:String(c.toolOutput??""),toolName:`${c.content??"tool"} (result)`}],z();break;case"error":r.current=[...r.current.filter(a=>a.id!==e),{id:ay(),role:"assistant",content:`Error: ${c.content??"Unknown error"}`}],z(),o("error");break;case"done":f&&(r.current=r.current.map(a=>a.id===f?{...a,isStreaming:!1}:a)),r.current=r.current.filter(a=>a.id!==e),z(),o("idle")}}}}r.current=r.current.filter(a=>a.id!==e),z(),o(a=>"streaming"===a?"idle":a),B()}catch(a){if("AbortError"===a.name)return;r.current=[...r.current.filter(a=>a.id!==e),{id:ay(),role:"assistant",content:`Connection error: ${a.message??"Unknown error"}`}],z(),o("error")}},[z,B]),K=(0,c.useCallback)(()=>{t.current?.abort(),t.current=null;let a=[...r.current].reverse().find(a=>"user"===a.role),b=a?.content??null;if(a){let b=r.current.lastIndexOf(a);r.current=r.current.slice(0,b),m([...r.current])}return o("idle"),b},[]),L=l[l.length-1],M="connecting"===n||"streaming"===n||L?.role==="thinking"&&!0===L.isStreaming;return(0,b.jsx)(ax.Provider,{value:{isOpen:d,isStarting:f,displayMode:h,worktreePath:j,toggleAssistant:I,closeAssistant:H,chatMessages:l,chatStatus:n,isChatThinking:M,isLoadingHistory:p,sendChatMessage:J,cancelChat:K,sessions:u,activeSessionId:w,createNewSession:D,switchSession:E,removeSession:F,refreshSessions:B},children:a})}function aC(){let a=(0,c.useContext)(ax);if(!a)throw Error("useAssistant must be used within an AssistantProvider");return a}var aD=a.i(109434),aE=a.i(858967),aF=a.i(467034),aG=a.i(938899),aH=a.i(845924),aI=a.i(246962);function aJ(a){return a.replace(/\.git\/?$/,"")}a.i(446786),a.i(814747);let aK=(0,w.createServerReference)("40beeb40d479aad1cef07db2e424e66a8f1f87114e",w.callServer,void 0,w.findSourceMapURL,"resolveGitLocalPath");var aL=a.i(20377);function aM({open:a,onOpenChange:d,onCreateProject:e}){let{t:f,locale:g}=(0,D.useI18n)(),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(""),[n,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(""),[r,w]=(0,c.useState)(!1),[x,y]=(0,c.useState)("FRONTEND"),[z,A]=(0,c.useState)("idle"),[B,C]=(0,c.useState)(""),[F,G]=(0,c.useState)(!1),H=()=>{i(""),k(""),m(""),o(""),q(""),w(!1),y("FRONTEND"),A("idle"),C(""),G(!1)},I=async()=>{if(p.trim()&&!F&&"success"===z){G(!0);try{let a=await (0,aL.analyzeProjectDirectory)(p.trim(),g);m(a)}catch{E.toast.error(f("project.analyzeError"))}finally{G(!1)}}},J=async a=>{o(a),A("idle"),C("");let b=function(a){let b,c=a.match(/^git@([^:]+):(.+)$/);if(c)return{host:c[1],pathSegments:aJ(c[2]).split("/").filter(Boolean)};try{b=new URL(a)}catch{return null}return{host:b.hostname,pathSegments:aJ(decodeURIComponent(b.pathname)).split("/").filter(Boolean)}}(a);b&&b.pathSegments.length>0&&i(b.pathSegments[b.pathSegments.length-1]),r||q(await aK(a))},K=async()=>{if(n.trim()&&p.trim()){A("cloning"),C("");try{let a=function(a){let b=a.trim();if(!b)return"";if(b.startsWith("git@")||b.startsWith("ssh://")||b.endsWith(".git"))return b;try{let a=new URL(b),c=a.hostname,d=decodeURIComponent(a.pathname).split("/").filter(Boolean);if("code.iflytek.com"===c){let a=[...d];"osc"===a[0]&&"_source"===a[1]&&(a=a.slice(2));let e=a.indexOf("-");if(e>0&&(a=a.slice(0,e)),0===a.length)return b;return`https://${c}/${a.join("/")}.git`}return`${a.origin}${a.pathname.replace(/\/$/,"")}.git`}catch{return b}}(n.trim()),b=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clone",url:a,path:p.trim()})}),c=await b.json();if(!b.ok){A("error"),C(c.error||"Clone failed");return}A("success")}catch{A("error"),C("Network error")}}},L=async()=>{h.trim()&&(await e?.({name:h.trim(),alias:j.trim()||void 0,description:l.trim()||void 0,gitUrl:n.trim()||void 0,localPath:p.trim()||void 0,projectType:x}),H(),d(!1))};return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(s.Dialog,{open:a,onOpenChange:a=>{d(a),a||H()},disablePointerDismissal:!0,children:(0,b.jsxs)(s.DialogContent,{style:{maxWidth:"32rem"},children:[(0,b.jsx)(s.DialogHeader,{children:(0,b.jsx)(s.DialogTitle,{children:f("topbar.newProject")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.gitUrl")}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:f("project.gitUrlHint")}),(0,b.jsx)(v.Input,{placeholder:f("project.gitPlaceholder"),value:n,onChange:a=>J(a.target.value),className:"mt-1.5 font-mono text-xs"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.localPath")}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:f("project.localPathHint")}),(0,b.jsx)(v.Input,{placeholder:f("project.localPathPlaceholder"),value:p,onChange:a=>{q(a.target.value),w(!0)},className:"mt-1.5 font-mono text-xs w-full"}),p.trim().startsWith("~")&&(0,b.jsxs)("p",{className:"mt-1 flex items-center gap-1 text-[11px] text-amber-400",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-3 w-3"}),f("project.tildeWarning")]}),n.trim()&&p.trim()&&(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsxs)(u.Button,{type:"button",disabled:"cloning"===z||"success"===z,onClick:K,className:"gap-1.5 text-xs bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/25 hover:bg-emerald-500/25 disabled:opacity-50",children:["cloning"===z?(0,b.jsx)(aD.Loader2,{className:"h-3 w-3 animate-spin"}):"success"===z?(0,b.jsx)(aE.Check,{className:"h-3 w-3"}):(0,b.jsx)(al.GitBranch,{className:"h-3 w-3"}),"cloning"===z?f("git.cloning"):"success"===z?f("git.cloned"):f("git.clone")]}),"error"===z&&(0,b.jsxs)("span",{className:"flex items-center gap-1 text-[11px] text-rose-400",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-3 w-3"}),B]}),"success"===z&&(0,b.jsx)("span",{className:"text-[11px] text-emerald-400",children:f("git.cloneSuccess")})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.name")}),(0,b.jsx)(v.Input,{placeholder:f("project.namePlaceholder"),value:h,onChange:a=>i(a.target.value),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.type.label")}),(0,b.jsx)("div",{className:"mt-1.5",children:(0,b.jsx)(aH.SegmentedControl,{options:[{value:"FRONTEND",label:f("project.type.frontend")},{value:"BACKEND",label:f("project.type.backend")}],value:x,onChange:y})})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.alias")}),(0,b.jsx)(v.Input,{placeholder:f("project.aliasPlaceholder"),value:j,onChange:a=>k(a.target.value),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mt-0.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.description")}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsxs)(t.TooltipTrigger,{render:(0,b.jsx)(u.Button,{type:"button",variant:"ghost",onClick:I,className:`h-6 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground ${!p.trim()||F?"opacity-50":""}`}),children:[F?(0,b.jsx)(aD.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(aG.Sparkles,{className:"h-3 w-3"}),F?f("project.analyzing"):f("project.genDesc")]}),(0,b.jsx)(t.TooltipContent,{children:p.trim()?"success"!==z?f("project.genDescNotCloned"):f("project.genDescReady"):f("project.genDescNoPath")})]})]}),(0,b.jsx)(aI.Textarea,{placeholder:f("project.descPlaceholder"),value:l,onChange:a=>m(a.target.value),rows:3,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none max-h-[200px] overflow-y-auto"})]})]}),(0,b.jsxs)(s.DialogFooter,{children:[(0,b.jsx)(u.Button,{variant:"outline",onClick:()=>{d(!1),H()},children:f("common.cancel")}),(0,b.jsx)(u.Button,{onClick:L,disabled:!h.trim()||F,className:"bg-primary/10 text-primary ring-1 ring-primary/25 hover:bg-primary/20",children:f("common.create")})]})]})})})}var aN=a.i(690834),aN=aN,aO=a.i(563504),aP=a.i(775788);let aQ=(0,w.createServerReference)("609e5df0c937f1b7e7296c30cf7bf17810cc0cea74",w.callServer,void 0,w.findSourceMapURL,"migrateProjectPath"),aR=(0,w.createServerReference)("40b3c89b263d0da110d22604a11e3722b207f41a74",w.callServer,void 0,w.findSourceMapURL,"checkMigrationSafety");function aS({open:a,onOpenChange:d,onCreateProject:e}){let{t:f,locale:g}=(0,D.useI18n)(),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(""),[n,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(""),[w,x]=(0,c.useState)(!1),[y,z]=(0,c.useState)("FRONTEND"),[A,B]=(0,c.useState)(!1),[C,F]=(0,c.useState)(!1),[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(!1),[K,L]=(0,c.useState)(""),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)(!1),[Q,R]=(0,c.useState)(!1),S=()=>{i(""),k(""),m(""),p(""),r(""),z("FRONTEND"),B(!1),F(!1),H(""),J(!1),L(""),N(""),P(!1),R(!1)},T=async a=>{r(a),B(!1),F(!1),H(""),L(""),N(""),P(!1),i(a.split("/").filter(Boolean).pop()??"");try{let b=await fetch(`/api/git?path=${encodeURIComponent(a)}`);if(b.ok){let a=await b.json();if(a.isGit&&a.remoteUrl){p(a.remoteUrl),B(!0);let b=a.remoteUrl.match(/\/([^/]+?)(?:\.git)?$/);b&&i(b[1])}}}catch{}},U=(0,c.useCallback)(async a=>{if(F(a),L(""),N(""),P(!1),!a)return void H("");if(n)try{let a=await aK(n);a&&(H(a),a===q&&P(!0))}catch{}if(q)try{let a=await fetch(`/api/git?path=${encodeURIComponent(q)}&checkWorktrees=true`);a.ok&&(await a.json()).hasWorktrees&&N(f("project.worktreeWarning"))}catch{}},[n,q]),V=async()=>{if(q&&!Q){R(!0);try{let a=await (0,aL.analyzeProjectDirectory)(q.trim(),g);m(a)}catch{E.toast.error(f("project.analyzeError"))}finally{R(!1)}}},W=async()=>{if(!h.trim())return;let a={name:h.trim(),alias:j.trim()||void 0,description:l.trim()||void 0,gitUrl:n.trim()||void 0,localPath:q.trim()||void 0,projectType:y},b=await e?.(a);if(C&&G&&G!==q&&b&&"id"in b){J(!0),L("");let a=await aR(b.id);if(!a.safe){L(a.reason),J(!1);return}let c=await aQ(b.id,G);if(J(!1),!c.success)return void L(c.error??f("project.migrateError"));E.toast.success(f("project.migrateSuccess"))}S(),d(!1)},X=!h.trim()||!q.trim()||I||Q||C&&!!M;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s.Dialog,{open:a,onOpenChange:a=>{d(a),a||S()},disablePointerDismissal:!0,children:(0,b.jsxs)(s.DialogContent,{style:{maxWidth:"32rem"},children:[(0,b.jsx)(s.DialogHeader,{children:(0,b.jsx)(s.DialogTitle,{children:f("topbar.importProject")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.localPath")}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:f("project.importHint")}),(0,b.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,b.jsx)(v.Input,{value:q,readOnly:!0,placeholder:f("project.localPathPlaceholder"),className:"flex-1 font-mono text-xs bg-muted/30"}),(0,b.jsxs)(u.Button,{type:"button",variant:"outline",onClick:()=>x(!0),className:"shrink-0 gap-1.5",children:[(0,b.jsx)(o.FolderOpen,{className:"h-3.5 w-3.5"}),f("folder.browse")]})]}),A&&(0,b.jsx)("p",{className:"mt-1.5 text-[11px] text-emerald-400",children:f("project.autoDetected")})]}),n&&(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.gitUrl")}),(0,b.jsx)(v.Input,{value:n,onChange:a=>p(a.target.value),className:"mt-1.5 font-mono text-xs"})]}),A&&q&&(0,b.jsxs)("div",{className:"rounded-md border border-border p-3 space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:f("project.migrate")}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:f("project.migrateHint")})]}),(0,b.jsx)(aP.Switch,{checked:C,onCheckedChange:a=>U(a)})]}),C&&(0,b.jsxs)("div",{className:"space-y-2 pt-1",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-[10px] font-medium text-muted-foreground",children:f("project.targetPath")}),(0,b.jsx)(v.Input,{value:G,onChange:a=>{H(a.target.value),P(a.target.value===q)},placeholder:"/path/to/canonical/location",className:"mt-1 font-mono text-xs"})]}),O&&(0,b.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-sky-400",children:[(0,b.jsx)(aN.default,{className:"h-3 w-3"}),f("project.samePathInfo")]}),M&&(0,b.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-amber-400",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-3 w-3"}),M]}),K&&(0,b.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-rose-400",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-3 w-3"}),K]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.name")}),(0,b.jsx)(v.Input,{placeholder:f("project.namePlaceholder"),value:h,onChange:a=>i(a.target.value),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.type.label")}),(0,b.jsx)("div",{className:"mt-1.5",children:(0,b.jsx)(aH.SegmentedControl,{options:[{value:"FRONTEND",label:f("project.type.frontend")},{value:"BACKEND",label:f("project.type.backend")}],value:y,onChange:z})})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.alias")}),(0,b.jsx)(v.Input,{placeholder:f("project.aliasPlaceholder"),value:j,onChange:a=>k(a.target.value),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mt-0.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:f("project.description")}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsxs)(t.TooltipTrigger,{render:(0,b.jsx)(u.Button,{type:"button",variant:"ghost",onClick:V,className:`h-6 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground ${!q||Q?"opacity-50":""}`}),children:[Q?(0,b.jsx)(aD.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(aG.Sparkles,{className:"h-3 w-3"}),Q?f("project.analyzing"):f("project.genDesc")]}),(0,b.jsx)(t.TooltipContent,{children:q?f("project.genDescReady"):f("project.genDescNoPath")})]})]}),(0,b.jsx)(aI.Textarea,{placeholder:f("project.descPlaceholder"),value:l,onChange:a=>m(a.target.value),rows:3,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none max-h-[200px] overflow-y-auto"})]})]}),(0,b.jsxs)(s.DialogFooter,{children:[(0,b.jsx)(u.Button,{variant:"outline",onClick:()=>{d(!1),S()},children:f("common.cancel")}),(0,b.jsx)(u.Button,{onClick:W,disabled:X,className:"bg-primary/10 text-primary ring-1 ring-primary/25 hover:bg-primary/20",children:I?f("project.migrating"):f("common.create")})]})]})}),(0,b.jsx)(aO.FolderBrowserDialog,{open:w,onOpenChange:x,onSelect:a=>T(a)})]})}function aT({onCreateProject:a,username:e}){let{t:f,locale:h,setLocale:i}=(0,D.useI18n)(),{isOpen:j,toggleAssistant:k}=aC(),{resolvedTheme:l,toggleTheme:m,triggerRef:n}=function(){let{resolvedTheme:a,setTheme:b}=(0,K.useTheme)(),d=(0,c.useRef)(null),e=(0,c.useCallback)(c=>{let d="dark"===a?"light":"dark";if("u">typeof document&&"startViewTransition"in document&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches){let a=c?.clientX??window.innerWidth/2,e=c?.clientY??0,f=Math.hypot(Math.max(a,window.innerWidth-a),Math.max(e,window.innerHeight-e));document.startViewTransition(()=>{b(d)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${a}px ${e}px)`,`circle(${f}px at ${a}px ${e}px)`]},{duration:400,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})}else b(d)},[a,b]);return{resolvedTheme:a,toggleTheme:e,triggerRef:d}}(),p=(0,d.useRouter)(),[r,s]=(0,c.useState)(!1),[v,w]=(0,c.useState)(!1),[x,y]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=a=>{(a.metaKey||a.ctrlKey)&&"k"===a.key&&(a.preventDefault(),s(!0))};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("header",{className:"flex h-12 items-center justify-between border-b border-border bg-background/80 px-5 backdrop-blur-sm",children:[(0,b.jsx)("div",{className:"w-40"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)(u.Button,{variant:"outline",onClick:()=>s(!0),className:"h-8 w-[400px] justify-start gap-2 bg-muted/50 text-muted-foreground hover:bg-muted",children:[(0,b.jsx)(L.Search,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"flex-1 text-left",suppressHydrationWarning:!0,children:f("topbar.searchPlaceholder")}),(0,b.jsxs)("kbd",{className:"mr-1 flex items-center gap-0.5 rounded border border-border bg-background px-1.5 py-0.5 text-[10px] font-mono",children:[(0,b.jsx)(N,{className:"h-2.5 w-2.5"}),"K"]})]}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{delay:500,render:(0,b.jsx)("button",{"data-tour":"open-assistant",onClick:k,"aria-label":f("assistant.iconLabel"),className:["cursor-pointer rounded-lg p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",j?"bg-accent text-foreground":""].join(" ")}),children:(0,b.jsx)(P,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{children:f("assistant.iconLabel")})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsxs)(t.TooltipTrigger,{render:(0,b.jsx)(u.Button,{variant:"ghost",onClick:()=>i("zh"===h?"en":"zh"),className:"text-muted-foreground"}),children:[(0,b.jsx)(O.Globe,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"text-[11px] font-semibold",children:"zh"===h?"EN":"中"})]}),(0,b.jsx)(t.TooltipContent,{children:f("settings.language")})]}),(0,b.jsxs)(t.Tooltip,{children:[(0,b.jsx)(t.TooltipTrigger,{render:(0,b.jsx)(u.Button,{ref:n,variant:"ghost",size:"icon",onClick:m,className:"text-muted-foreground"}),children:"dark"===l?(0,b.jsx)(Q.Sun,{className:"h-4 w-4"}):(0,b.jsx)(R.Moon,{className:"h-4 w-4"})}),(0,b.jsx)(t.TooltipContent,{children:f("settings.theme")})]}),(0,b.jsx)("div",{className:"h-4 w-px bg-border"}),(0,b.jsxs)(u.Button,{variant:"outline",className:"gap-1.5 ring-1 ring-border hover:bg-accent",onClick:()=>y(!0),children:[(0,b.jsx)(o.FolderOpen,{className:"h-3.5 w-3.5"}),f("topbar.importProject")]}),(0,b.jsxs)(u.Button,{"data-tour":"create-project",className:"gap-1.5 bg-primary/10 text-primary ring-1 ring-primary/25 hover:bg-primary/20",onClick:()=>w(!0),children:[(0,b.jsx)(g.Plus,{className:"h-3.5 w-3.5"}),f("topbar.newProject")]}),(0,b.jsxs)(q.DropdownMenu,{children:[(0,b.jsx)(q.DropdownMenuTrigger,{render:(0,b.jsxs)("button",{className:"ml-0.5 flex cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1 transition-colors hover:bg-accent",children:[e&&(0,b.jsx)("span",{className:"max-w-[80px] truncate text-xs text-muted-foreground",children:e}),(0,b.jsx)(ai,{className:"h-7 w-7 ring-1 ring-border",children:(0,b.jsx)(aj,{className:"bg-emerald-500/20 text-emerald-400 text-[10px] font-semibold",children:e?e.trim().split(/\s+/).filter(a=>a.length>0).slice(0,2).map(a=>a[0].toUpperCase()).join(""):"U"})})]})}),(0,b.jsx)(q.DropdownMenuContent,{align:"end",sideOffset:8,className:"w-40",children:(0,b.jsxs)(q.DropdownMenuItem,{onClick:()=>p.push("/settings"),children:[(0,b.jsx)(M.Settings,{className:"mr-2 h-3.5 w-3.5"}),f("settings.title")]})})]})]})]}),(0,b.jsx)(av,{open:r,onOpenChange:s}),(0,b.jsx)(aM,{open:v,onOpenChange:w,onCreateProject:a}),(0,b.jsx)(aS,{open:x,onOpenChange:y,onCreateProject:a})]})}var aU=a.i(184083),aV=c,aW=a.i(145685);class aX extends aV.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,b){console.error("[ErrorBoundary]",a,b)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 p-8 text-center",children:[(0,b.jsx)(aF.AlertCircle,{className:"h-8 w-8 text-destructive"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:this.state.error?.message??"An unexpected error occurred"})]}),(0,b.jsxs)(u.Button,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:[(0,b.jsx)(aW.RefreshCw,{className:"mr-2 h-3.5 w-3.5"}),"Retry"]})]}):this.props.children}}var aY=a.i(416124),aZ=a.i(357089),a$=a.i(354994);let a_=(0,aZ.default)(async()=>{},{loadableGenerated:{modules:[834880]},ssr:!1});function a0({mode:a}){let{isOpen:c,closeAssistant:d,sessions:e,activeSessionId:f,createNewSession:h,switchSession:j,removeSession:k}=aC(),{t:l}=(0,D.useI18n)(),m=e.find(a=>a.id===f),n=m?.title??l("assistant.newSession");return(0,b.jsxs)("div",{className:"sidebar"===a?"min-w-[320px] max-w-[480px] w-[30vw] shrink-0 border-r border-border flex flex-col bg-sidebar overflow-hidden":"flex flex-col h-full overflow-hidden",children:[(0,b.jsxs)("div",{className:"header-sm flex items-center px-4 gap-2 bg-sidebar",children:[(0,b.jsx)(P,{className:"h-4 w-4 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-sm font-semibold text-foreground shrink-0",children:l("assistant.title")}),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsxs)(q.DropdownMenu,{children:[(0,b.jsxs)(q.DropdownMenuTrigger,{className:"flex items-center gap-1 h-8 px-2 rounded-md text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground max-w-[120px] truncate","aria-label":l("assistant.sessionList"),children:[(0,b.jsx)("span",{className:"truncate",children:n}),(0,b.jsx)(a$.ChevronDown,{className:"h-3 w-3 shrink-0"})]}),(0,b.jsxs)(q.DropdownMenuContent,{side:"bottom",align:"end",sideOffset:4,children:[0===e.length?(0,b.jsx)("div",{className:"px-2 py-4 text-xs text-muted-foreground text-center",children:l("assistant.noSessions")}):e.map(a=>(0,b.jsxs)(q.DropdownMenuItem,{className:"flex items-center justify-between gap-2 pr-1",onClick:()=>j(a.id),children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5 min-w-0",children:[(0,b.jsx)("span",{className:"text-xs truncate max-w-[140px]",children:a.title}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground",children:function(a){let b=Math.floor((Date.now()-new Date(a).getTime())/1e3);if(b<60)return`${b}s ago`;let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);return`${e}d ago`}(a.updatedAt)})]}),(0,b.jsx)(u.Button,{variant:"ghost",className:"h-6 w-6 p-0 shrink-0 opacity-50 hover:opacity-100 hover:text-destructive",onClick:b=>{b.stopPropagation(),k(a.id)},"aria-label":l("assistant.deleteSession"),children:(0,b.jsx)(i.Trash2,{className:"h-3 w-3"})})]},a.id)),e.length>0&&(0,b.jsx)(q.DropdownMenuSeparator,{}),(0,b.jsxs)(q.DropdownMenuItem,{onClick:h,children:[(0,b.jsx)(g.Plus,{className:"h-3 w-3 mr-1"}),(0,b.jsx)("span",{className:"text-xs",children:l("assistant.newSession")})]})]})]}),(0,b.jsx)(u.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:h,"aria-label":l("assistant.newSession"),children:(0,b.jsx)(g.Plus,{className:"h-4 w-4"})})]}),(0,b.jsx)(u.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:d,"aria-label":l("assistant.closeLabel"),children:(0,b.jsx)(ao.X,{className:"h-4 w-4"})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-hidden",children:c?(0,b.jsx)(a_,{}):null})]})}var a1=a.i(684262);function a2({onDismiss:a}){let{t:d}=(0,D.useI18n)(),[e,f]=(0,c.useState)(!1);(0,c.useEffect)(()=>{},[]);let g=async()=>{"default"!==await window.Notification.requestPermission()&&(f(!1),a?.())};return e?(0,b.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-[9999] w-auto max-w-lg bg-card border rounded-lg shadow-lg px-4 py-2.5 flex items-center gap-3 animate-in fade-in slide-in-from-top-4 duration-500",children:[(0,b.jsx)(a1.Bell,{className:"h-4 w-4 shrink-0 text-primary"}),(0,b.jsx)("span",{className:"flex-1 text-sm",children:d("notification.permissionPrompt")}),(0,b.jsx)(u.Button,{size:"default",onClick:g,children:d("notification.allow")}),(0,b.jsx)(u.Button,{variant:"ghost",size:"default",onClick:()=>{f(!1),a?.()},children:d("notification.dismiss")})]}):null}w.callServer,w.findSourceMapURL;var a3=a.i(849137);let a4=[{target:"create-workspace",titleKey:"tour.step1.title",descKey:"tour.step1.desc",placement:"right"},{target:"create-project",titleKey:"tour.step2.title",descKey:"tour.step2.desc",placement:"bottom",waitForTarget:!0},{target:"open-assistant",titleKey:"tour.step3.title",descKey:"tour.step3.desc",placement:"bottom"}];function a5({onComplete:a}){let{t:d}=(0,D.useI18n)(),[e,f]=(0,c.useState)(0),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(!1),k=(0,c.useRef)(null),l=a4[e],m=(0,c.useCallback)(async()=>{await (0,a3.setConfigValue)("onboarding.tourCompleted",!0),a()},[a]),n=(0,c.useCallback)(()=>l?document.querySelector(`[data-tour="${l.target}"]`):null,[l]),o=(0,c.useCallback)(()=>{let a=n();a?(h(a.getBoundingClientRect()),j(!0)):j(!1)},[n]);(0,c.useEffect)(()=>{o();let a=null;!i&&l?.waitForTarget&&(k.current=new MutationObserver(()=>{let b=n();b&&(h(b.getBoundingClientRect()),j(!0),k.current?.disconnect(),a&&clearTimeout(a))}),k.current.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{!n()&&(f(a=>{let b=a+1;return b<a4.length?b:a}),e>=a4.length-1&&m())},5e3));let b=()=>o();return window.addEventListener("resize",b),window.addEventListener("scroll",b,!0),()=>{k.current?.disconnect(),a&&clearTimeout(a),window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0)}},[e,l,n,o,i,m]),(0,c.useEffect)(()=>{let a=setInterval(o,1e3);return()=>clearInterval(a)},[o]);let p=(0,c.useCallback)(()=>{e<a4.length-1?(f(a=>a+1),j(!1)):m()},[e]);return l?(0,b.jsx)(b.Fragment,{children:i&&g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-[10000]",style:{background:`radial-gradient(
2
2
  ellipse at ${g.left+g.width/2}px ${g.top+g.height/2}px,
3
3
  transparent ${Math.max(g.width,g.height)}px,
4
4
  rgba(0,0,0,0.6) ${Math.max(g.width,g.height)+30}px
@@ -1,3 +1,3 @@
1
- module.exports=[57726,891903,a=>{"use strict";var b=a.i(65735);a.s(["CheckCircle2",()=>b.default],57726);let c=(0,a.i(302856).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"}]]);a.s(["XCircle",0,c],891903)},59711,a=>{"use strict";let b=(0,a.i(302856).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],59711)},515205,a=>{"use strict";var b=a.i(858360),c=a.i(759985),d=a.i(448287),e=a.i(59711),f=a.i(161604),g=a.i(986379),h=a.i(14180),i=a.i(584335);let j=[{key:"notes",icon:f.FileText},{key:"assets",icon:g.FolderOpen},{key:"archive",icon:h.Archive}];a.s(["SubPageNav",0,function({workspaceId:a}){let{t:f}=(0,i.useI18n)(),g=(0,d.usePathname)(),h=j.find(a=>g.includes(`/${a.key}`))?.key;return(0,b.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4 py-2",children:[(0,b.jsxs)(c.default,{href:`/workspaces/${a}`,className:"mr-2 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f("archive.backToBoard")})]}),(0,b.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),j.map(d=>{let e=d.icon,g=h===d.key;return(0,b.jsxs)(c.default,{href:`/workspaces/${a}/${d.key}`,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${g?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,b.jsx)(e,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f(`sidebar.${d.key}`)})]},d.key)})]})}])},573219,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(14180),e=a.i(57726),f=a.i(891903),g=a.i(109434),h=a.i(224372),i=a.i(584335),j=a.i(515205),k=a.i(879876);let l=(0,k.createServerReference)("404da910ae75dbc569190dde759755d7710418cb90",k.callServer,void 0,k.findSourceMapURL,"getArchivedTasks");function m(a){return new Date(a).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function n({priority:a}){return(0,b.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[a]??"bg-slate-400"}`})}a.s(["ArchivePageClient",0,function({allWorkspaces:a,initialWorkspaceId:k,initialProjectId:o,initialTasks:p}){let q,{t:r}=(0,i.useI18n)(),[s,t]=(0,c.useTransition)(),[u,v]=(0,c.useState)(k),[w,x]=(0,c.useState)(o),[y,z]=(0,c.useState)(p),A=a.find(a=>a.id===u),B=A?.projects??[],C=(0,c.useCallback)(a=>{a?t(async()=>{z(await l(a))}):z([])},[t]);return(0,b.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,b.jsx)(j.SubPageNav,{workspaceId:u}),(0,b.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,b.jsxs)(h.Select,{value:u,onValueChange:b=>b&&(b=>{if(b===u)return;v(b);let c=a.find(a=>a.id===b),d=c?.projects[0]??null;x(d?.id??null),C(d?.id??null)})(b),children:[(0,b.jsx)(h.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,b.jsx)("span",{className:"truncate",children:A?.name??u})}),(0,b.jsx)(h.SelectContent,{children:a.map(a=>(0,b.jsx)(h.SelectItem,{value:a.id,children:a.name},a.id))})]}),B.length>0&&(0,b.jsxs)(h.Select,{value:w??"",onValueChange:a=>a&&void(a!==w&&(x(a),C(a))),children:[(0,b.jsx)(h.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,b.jsx)("span",{className:"truncate",children:(q=B.find(a=>a.id===w))?q.alias?`${q.name} (${q.alias})`:q.name:""})}),(0,b.jsx)(h.SelectContent,{children:B.map(a=>(0,b.jsxs)(h.SelectItem,{value:a.id,children:[a.name,a.alias?` (${a.alias})`:""]},a.id))})]}),(0,b.jsxs)("span",{className:"ml-auto rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[y.length," ",r("archive.tasksCount")]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,b.jsxs)("div",{className:`relative ${s?"opacity-40 pointer-events-none":""} transition-opacity`,children:[s&&(0,b.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,b.jsx)(g.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===y.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,b.jsx)(d.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:r("archive.noTasks")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r("archive.noTasksDesc")})]}):(0,b.jsx)("div",{className:"space-y-2",children:y.map(a=>{let c="DONE"===a.status,d=a.executions[0];return(0,b.jsx)("div",{className:"group rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30",children:(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:c?(0,b.jsx)(e.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,b.jsx)(f.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(n,{priority:a.priority}),(0,b.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:a.title}),(0,b.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${c?"bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/20":"bg-rose-500/10 text-rose-400 ring-1 ring-rose-500/20"}`,children:c?r("archive.status.done"):r("archive.status.cancelled")})]}),a.labels.length>0&&(0,b.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:a.labels.map(a=>(0,b.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${a.label.color}20`,color:a.label.color,outline:`1px solid ${a.label.color}40`},children:a.label.name},a.label.id))}),(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,b.jsxs)("span",{children:[r("archive.createdAt"),": ",m(a.createdAt)]}),(0,b.jsxs)("span",{children:[c?r("archive.completedAt"):r("archive.cancelledAt"),": ",m(a.updatedAt)]}),d&&(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[r("archive.lastExecution"),":"," ",(0,b.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===d.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===d.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:d.status})]})]})]})]})},a.id)})})]})})]})}],573219)}];
1
+ module.exports=[57726,891903,a=>{"use strict";var b=a.i(65735);a.s(["CheckCircle2",()=>b.default],57726);let c=(0,a.i(302856).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"}]]);a.s(["XCircle",0,c],891903)},59711,a=>{"use strict";let b=(0,a.i(302856).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],59711)},515205,a=>{"use strict";var b=a.i(858360),c=a.i(759985),d=a.i(448287),e=a.i(59711),f=a.i(161604),g=a.i(986379),h=a.i(14180),i=a.i(584335);let j=[{key:"notes",icon:f.FileText},{key:"assets",icon:g.FolderOpen},{key:"archive",icon:h.Archive}];a.s(["SubPageNav",0,function({workspaceId:a}){let{t:f}=(0,i.useI18n)(),g=(0,d.usePathname)(),h=j.find(a=>g.includes(`/${a.key}`))?.key;return(0,b.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4 py-2",children:[(0,b.jsxs)(c.default,{href:`/workspaces/${a}`,className:"mr-2 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f("archive.backToBoard")})]}),(0,b.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),j.map(d=>{let e=d.icon,g=h===d.key;return(0,b.jsxs)(c.default,{href:`/workspaces/${a}/${d.key}`,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${g?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,b.jsx)(e,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f(`sidebar.${d.key}`)})]},d.key)})]})}])},573219,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(14180),e=a.i(57726),f=a.i(891903),g=a.i(109434),h=a.i(224372),i=a.i(584335),j=a.i(515205),k=a.i(879876);let l=(0,k.createServerReference)("4087d8bdfdf14b31fce57b2f660388d321eb813e8a",k.callServer,void 0,k.findSourceMapURL,"getArchivedTasks");function m(a){return new Date(a).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function n({priority:a}){return(0,b.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[a]??"bg-slate-400"}`})}a.s(["ArchivePageClient",0,function({allWorkspaces:a,initialWorkspaceId:k,initialProjectId:o,initialTasks:p}){let q,{t:r}=(0,i.useI18n)(),[s,t]=(0,c.useTransition)(),[u,v]=(0,c.useState)(k),[w,x]=(0,c.useState)(o),[y,z]=(0,c.useState)(p),A=a.find(a=>a.id===u),B=A?.projects??[],C=(0,c.useCallback)(a=>{a?t(async()=>{z(await l(a))}):z([])},[t]);return(0,b.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,b.jsx)(j.SubPageNav,{workspaceId:u}),(0,b.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,b.jsxs)(h.Select,{value:u,onValueChange:b=>b&&(b=>{if(b===u)return;v(b);let c=a.find(a=>a.id===b),d=c?.projects[0]??null;x(d?.id??null),C(d?.id??null)})(b),children:[(0,b.jsx)(h.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,b.jsx)("span",{className:"truncate",children:A?.name??u})}),(0,b.jsx)(h.SelectContent,{children:a.map(a=>(0,b.jsx)(h.SelectItem,{value:a.id,children:a.name},a.id))})]}),B.length>0&&(0,b.jsxs)(h.Select,{value:w??"",onValueChange:a=>a&&void(a!==w&&(x(a),C(a))),children:[(0,b.jsx)(h.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,b.jsx)("span",{className:"truncate",children:(q=B.find(a=>a.id===w))?q.alias?`${q.name} (${q.alias})`:q.name:""})}),(0,b.jsx)(h.SelectContent,{children:B.map(a=>(0,b.jsxs)(h.SelectItem,{value:a.id,children:[a.name,a.alias?` (${a.alias})`:""]},a.id))})]}),(0,b.jsxs)("span",{className:"ml-auto rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[y.length," ",r("archive.tasksCount")]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,b.jsxs)("div",{className:`relative ${s?"opacity-40 pointer-events-none":""} transition-opacity`,children:[s&&(0,b.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,b.jsx)(g.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===y.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,b.jsx)(d.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:r("archive.noTasks")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r("archive.noTasksDesc")})]}):(0,b.jsx)("div",{className:"space-y-2",children:y.map(a=>{let c="DONE"===a.status,d=a.executions[0];return(0,b.jsx)("div",{className:"group rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30",children:(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:c?(0,b.jsx)(e.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,b.jsx)(f.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(n,{priority:a.priority}),(0,b.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:a.title}),(0,b.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${c?"bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/20":"bg-rose-500/10 text-rose-400 ring-1 ring-rose-500/20"}`,children:c?r("archive.status.done"):r("archive.status.cancelled")})]}),a.labels.length>0&&(0,b.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:a.labels.map(a=>(0,b.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${a.label.color}20`,color:a.label.color,outline:`1px solid ${a.label.color}40`},children:a.label.name},a.label.id))}),(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,b.jsxs)("span",{children:[r("archive.createdAt"),": ",m(a.createdAt)]}),(0,b.jsxs)("span",{children:[c?r("archive.completedAt"):r("archive.cancelledAt"),": ",m(a.updatedAt)]}),d&&(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[r("archive.lastExecution"),":"," ",(0,b.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===d.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===d.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:d.status})]})]})]})]})},a.id)})})]})})]})}],573219)}];
2
2
 
3
3
  //# sourceMappingURL=project_f_tower_0ivvjwd._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[334427,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),697892,a=>a.a(async(b,c)=>{try{var d=a.i(334427),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["007847fad96a3f9221506aa739c0454f481fb832eb",()=>h.getActualWsPort,"00980232976ff4e5d8239c03513711c533f22de33a",()=>j.getOnboardingStatus,"400f16ec4822157312241e4120389fe67f2b6d214d",()=>j.completeOnboarding,"4014d65a7cb4e44cef69364d4265db25536ad2b51b",()=>h.resolveGitLocalPath,"40174680574299f60aefb39ccf266a3ae8f1cd8eb6",()=>e.createProject,"40175af511da3f485551beb23f683777478a4f455c",()=>f.deleteLabel,"40257959581af70539abce0d52368f1b4e64d3b895",()=>i.checkMigrationSafety,"403c63e717ef620fe45e8e020075ffd93967718ebd",()=>e.deleteWorkspace,"403d4c6d2ec152f1ac6b886660d9a1f76afc455c95",()=>f.createLabel,"407216a6ad8b83764409f4170b0f67fedd774572d0",()=>j.setOnboardingProgress,"4083c2e344b79f5f91f776ebe891065f634fd9ebc3",()=>j.dispatchTaskCompletionEvent,"40b15102de1db2bc4e8a6645b5c185c83f50624da1",()=>f.getLabelsForWorkspace,"40e8fed6ad958d2c3a38820b1025a1fc4098689fa3",()=>e.createWorkspace,"6001179c55b9e8fbaacafb8a92d90bded2fb982406",()=>g.globalSearch,"60875b160a0df1863b61aca756a5d59fc667390189",()=>e.updateWorkspace,"60876e2a334c30c5ba151f09d3308e73e858536678",()=>h.getConfigValue,"60c717998ae4577d9acbe23ed6297693b47434d782",()=>h.setConfigValue,"60f4d0bc02bf4546f15e2988ea35e628c63de7fc47",()=>i.analyzeProjectDirectory,"60fabeca5f7653ab2766cf231a2885d26de4adb15e",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__105vrk3._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__007tg36._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
1
+ module.exports=[334427,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),697892,a=>a.a(async(b,c)=>{try{var d=a.i(334427),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["00203bbda3efaa5dded8cbbefd27f746bb53266f21",()=>j.getOnboardingStatus,"007833899f8c9d9e8e952b61ff176230758229de16",()=>h.getActualWsPort,"4014bdcb9765396efe414741835e6be0a7882be8f5",()=>f.createLabel,"404439a9790385718762b275fc0500acae5c3357d2",()=>j.dispatchTaskCompletionEvent,"4044694abea180e8be554d786bde1232322fb14aad",()=>f.getLabelsForWorkspace,"405689f53c34ab4be133884427289de76ae868650b",()=>j.setOnboardingProgress,"408b936d2350527048973473055399e594517834d4",()=>e.createProject,"40939248ba94f467ae6c0ca056c20cdf8fd7643275",()=>e.createWorkspace,"409ee98a06d63b435af3b096d320d081be06600e52",()=>f.deleteLabel,"40b3c89b263d0da110d22604a11e3722b207f41a74",()=>i.checkMigrationSafety,"40beeb40d479aad1cef07db2e424e66a8f1f87114e",()=>h.resolveGitLocalPath,"40c2a7b826bd84837cc38f35577365d57e5aa9b43e",()=>e.deleteWorkspace,"40d029ca2de5de8c2bb0e80a100f164424c7078da9",()=>j.completeOnboarding,"6011594266e5349ec44fa3e334ae1732756fba101a",()=>h.setConfigValue,"6029753cde1a0af141c2d96cd5a3b0324314e6cc63",()=>i.analyzeProjectDirectory,"604fcba71b9c0a5bff531fa1534ae98f9e665b0f82",()=>h.getConfigValue,"60519939be78ced789932933058ac226b0b3ed474c",()=>g.globalSearch,"605468dac93122485441f09a81ca4245c334976303",()=>e.updateWorkspace,"609e5df0c937f1b7e7296c30cf7bf17810cc0cea74",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__105vrk3._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__007tg36._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
2
2
 
3
3
  //# sourceMappingURL=project_f_tower_0jy~1uf._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[772462,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),301225,a=>a.a(async(b,c)=>{try{var d=a.i(772462),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["007847fad96a3f9221506aa739c0454f481fb832eb",()=>h.getActualWsPort,"00980232976ff4e5d8239c03513711c533f22de33a",()=>j.getOnboardingStatus,"400f16ec4822157312241e4120389fe67f2b6d214d",()=>j.completeOnboarding,"4014d65a7cb4e44cef69364d4265db25536ad2b51b",()=>h.resolveGitLocalPath,"40174680574299f60aefb39ccf266a3ae8f1cd8eb6",()=>e.createProject,"40175af511da3f485551beb23f683777478a4f455c",()=>f.deleteLabel,"40257959581af70539abce0d52368f1b4e64d3b895",()=>i.checkMigrationSafety,"403c63e717ef620fe45e8e020075ffd93967718ebd",()=>e.deleteWorkspace,"403d4c6d2ec152f1ac6b886660d9a1f76afc455c95",()=>f.createLabel,"407216a6ad8b83764409f4170b0f67fedd774572d0",()=>j.setOnboardingProgress,"4083c2e344b79f5f91f776ebe891065f634fd9ebc3",()=>j.dispatchTaskCompletionEvent,"40b15102de1db2bc4e8a6645b5c185c83f50624da1",()=>f.getLabelsForWorkspace,"40e8fed6ad958d2c3a38820b1025a1fc4098689fa3",()=>e.createWorkspace,"6001179c55b9e8fbaacafb8a92d90bded2fb982406",()=>g.globalSearch,"60875b160a0df1863b61aca756a5d59fc667390189",()=>e.updateWorkspace,"60876e2a334c30c5ba151f09d3308e73e858536678",()=>h.getConfigValue,"60c717998ae4577d9acbe23ed6297693b47434d782",()=>h.setConfigValue,"60f4d0bc02bf4546f15e2988ea35e628c63de7fc47",()=>i.analyzeProjectDirectory,"60fabeca5f7653ab2766cf231a2885d26de4adb15e",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__012ko5_._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__025.0xa._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
1
+ module.exports=[772462,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),301225,a=>a.a(async(b,c)=>{try{var d=a.i(772462),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["00203bbda3efaa5dded8cbbefd27f746bb53266f21",()=>j.getOnboardingStatus,"007833899f8c9d9e8e952b61ff176230758229de16",()=>h.getActualWsPort,"4014bdcb9765396efe414741835e6be0a7882be8f5",()=>f.createLabel,"404439a9790385718762b275fc0500acae5c3357d2",()=>j.dispatchTaskCompletionEvent,"4044694abea180e8be554d786bde1232322fb14aad",()=>f.getLabelsForWorkspace,"405689f53c34ab4be133884427289de76ae868650b",()=>j.setOnboardingProgress,"408b936d2350527048973473055399e594517834d4",()=>e.createProject,"40939248ba94f467ae6c0ca056c20cdf8fd7643275",()=>e.createWorkspace,"409ee98a06d63b435af3b096d320d081be06600e52",()=>f.deleteLabel,"40b3c89b263d0da110d22604a11e3722b207f41a74",()=>i.checkMigrationSafety,"40beeb40d479aad1cef07db2e424e66a8f1f87114e",()=>h.resolveGitLocalPath,"40c2a7b826bd84837cc38f35577365d57e5aa9b43e",()=>e.deleteWorkspace,"40d029ca2de5de8c2bb0e80a100f164424c7078da9",()=>j.completeOnboarding,"6011594266e5349ec44fa3e334ae1732756fba101a",()=>h.setConfigValue,"6029753cde1a0af141c2d96cd5a3b0324314e6cc63",()=>i.analyzeProjectDirectory,"604fcba71b9c0a5bff531fa1534ae98f9e665b0f82",()=>h.getConfigValue,"60519939be78ced789932933058ac226b0b3ed474c",()=>g.globalSearch,"605468dac93122485441f09a81ca4245c334976303",()=>e.updateWorkspace,"609e5df0c937f1b7e7296c30cf7bf17810cc0cea74",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__012ko5_._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__025.0xa._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
2
2
 
3
3
  //# sourceMappingURL=project_f_tower_0l6ssf8._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[721460,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("78374c7bf0e2dfb01b8d6f89b9b4896a3e4c372f10",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},688221,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4011817d088a72a161c109394105b2d10de7c02e85",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},63057,595313,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("60398ad1521d8adea6d4c35543f4f49825deedf810",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],63057);let d=(0,a.i(302856).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"}]]);a.s(["RotateCcw",0,d],595313)},506008,a=>{"use strict";var b=a.i(360295);a.s(["ChevronRight",()=>b.default])},236413,a=>{"use strict";let b=(0,a.i(302856).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],236413)},769726,a=>{"use strict";let b=(0,a.i(302856).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",0,b],769726)},113620,a=>{"use strict";a.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"])},868048,279090,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40afb2f2c9dc80b8a21dcf999791330645623986fa",b.callServer,void 0,b.findSourceMapURL,"createNote");a.s(["createNote",0,c],868048);let d=(0,b.createServerReference)("400fa8405408df01a67780480e726ea10ee343ed90",b.callServer,void 0,b.findSourceMapURL,"deleteNote");a.s(["deleteNote",0,d],279090)},59711,a=>{"use strict";let b=(0,a.i(302856).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],59711)},468518,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},236345,a=>{"use strict";let b=(0,a.i(302856).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"}]]);a.s(["PlayCircle",0,b],236345)},208168,707111,a=>{"use strict";let b=(0,a.i(302856).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"}]]);a.s(["Upload",0,b],208168);var c=a.i(879876);let d=(0,c.createServerReference)("4062d607355e5f5b1c54e5be8833dbf4cc45af2c97",c.callServer,void 0,c.findSourceMapURL,"uploadAsset");a.s(["uploadAsset",0,d],707111)},808620,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4067adaf2e2ba1cf52ddb983c2629403a194210424",b.callServer,void 0,b.findSourceMapURL,"deleteAsset");a.s(["deleteAsset",0,c])},48300,a=>{"use strict";var b=a.i(293785),c=a.i(256116),d=a.i(488137),e=a.i(44585);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],48300)},57726,891903,a=>{"use strict";var b=a.i(65735);a.s(["CheckCircle2",()=>b.default],57726);let c=(0,a.i(302856).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"}]]);a.s(["XCircle",0,c],891903)},774085,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40ab37dc43dd234ce970d976d7ac08236e3631147f",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},889822,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.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",a),...d})}])}];
2
+
3
+ //# sourceMappingURL=project_f_tower_0nxm3eb._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[638e3,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),444574,a=>a.a(async(b,c)=>{try{var d=a.i(638e3),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["007847fad96a3f9221506aa739c0454f481fb832eb",()=>h.getActualWsPort,"00980232976ff4e5d8239c03513711c533f22de33a",()=>j.getOnboardingStatus,"400f16ec4822157312241e4120389fe67f2b6d214d",()=>j.completeOnboarding,"4014d65a7cb4e44cef69364d4265db25536ad2b51b",()=>h.resolveGitLocalPath,"40174680574299f60aefb39ccf266a3ae8f1cd8eb6",()=>e.createProject,"40175af511da3f485551beb23f683777478a4f455c",()=>f.deleteLabel,"40257959581af70539abce0d52368f1b4e64d3b895",()=>i.checkMigrationSafety,"403c63e717ef620fe45e8e020075ffd93967718ebd",()=>e.deleteWorkspace,"403d4c6d2ec152f1ac6b886660d9a1f76afc455c95",()=>f.createLabel,"407216a6ad8b83764409f4170b0f67fedd774572d0",()=>j.setOnboardingProgress,"4083c2e344b79f5f91f776ebe891065f634fd9ebc3",()=>j.dispatchTaskCompletionEvent,"40b15102de1db2bc4e8a6645b5c185c83f50624da1",()=>f.getLabelsForWorkspace,"40e8fed6ad958d2c3a38820b1025a1fc4098689fa3",()=>e.createWorkspace,"6001179c55b9e8fbaacafb8a92d90bded2fb982406",()=>g.globalSearch,"60875b160a0df1863b61aca756a5d59fc667390189",()=>e.updateWorkspace,"60876e2a334c30c5ba151f09d3308e73e858536678",()=>h.getConfigValue,"60c717998ae4577d9acbe23ed6297693b47434d782",()=>h.setConfigValue,"60f4d0bc02bf4546f15e2988ea35e628c63de7fc47",()=>i.analyzeProjectDirectory,"60fabeca5f7653ab2766cf231a2885d26de4adb15e",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__09mr4e7._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe-o3g._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
1
+ module.exports=[638e3,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),444574,a=>a.a(async(b,c)=>{try{var d=a.i(638e3),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["00203bbda3efaa5dded8cbbefd27f746bb53266f21",()=>j.getOnboardingStatus,"007833899f8c9d9e8e952b61ff176230758229de16",()=>h.getActualWsPort,"4014bdcb9765396efe414741835e6be0a7882be8f5",()=>f.createLabel,"404439a9790385718762b275fc0500acae5c3357d2",()=>j.dispatchTaskCompletionEvent,"4044694abea180e8be554d786bde1232322fb14aad",()=>f.getLabelsForWorkspace,"405689f53c34ab4be133884427289de76ae868650b",()=>j.setOnboardingProgress,"408b936d2350527048973473055399e594517834d4",()=>e.createProject,"40939248ba94f467ae6c0ca056c20cdf8fd7643275",()=>e.createWorkspace,"409ee98a06d63b435af3b096d320d081be06600e52",()=>f.deleteLabel,"40b3c89b263d0da110d22604a11e3722b207f41a74",()=>i.checkMigrationSafety,"40beeb40d479aad1cef07db2e424e66a8f1f87114e",()=>h.resolveGitLocalPath,"40c2a7b826bd84837cc38f35577365d57e5aa9b43e",()=>e.deleteWorkspace,"40d029ca2de5de8c2bb0e80a100f164424c7078da9",()=>j.completeOnboarding,"6011594266e5349ec44fa3e334ae1732756fba101a",()=>h.setConfigValue,"6029753cde1a0af141c2d96cd5a3b0324314e6cc63",()=>i.analyzeProjectDirectory,"604fcba71b9c0a5bff531fa1534ae98f9e665b0f82",()=>h.getConfigValue,"60519939be78ced789932933058ac226b0b3ed474c",()=>g.globalSearch,"605468dac93122485441f09a81ca4245c334976303",()=>e.updateWorkspace,"609e5df0c937f1b7e7296c30cf7bf17810cc0cea74",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__09mr4e7._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe-o3g._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
2
2
 
3
3
  //# sourceMappingURL=project_f_tower_0o5.y1e._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[236413,a=>{"use strict";let b=(0,a.i(302856).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],236413)},506008,a=>{"use strict";var b=a.i(360295);a.s(["ChevronRight",()=>b.default])},48300,a=>{"use strict";var b=a.i(293785),c=a.i(256116),d=a.i(488137),e=a.i(44585);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],48300)},57726,891903,a=>{"use strict";var b=a.i(65735);a.s(["CheckCircle2",()=>b.default],57726);let c=(0,a.i(302856).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"}]]);a.s(["XCircle",0,c],891903)},404681,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40d84bfbd886a64cf28e6c1083a292b748ae2a60d8",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},59711,a=>{"use strict";let b=(0,a.i(302856).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],59711)},468518,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},236345,a=>{"use strict";let b=(0,a.i(302856).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"}]]);a.s(["PlayCircle",0,b],236345)},797896,a=>{"use strict";let b=(0,a.i(302856).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"}]]);a.s(["Eye",0,b],797896)},515539,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("78656b1089a99ee62580868de2813dc6bff192cf60",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},828591,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4069295d124f7a467ec7579037d131a5c9b67802a8",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},211971,595313,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("60bcfa88f82618a21319ddbb3d09fd2de03cdec86a",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],211971);let d=(0,a.i(302856).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"}]]);a.s(["RotateCcw",0,d],595313)},887491,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4095a3e15e499ebd7df25e69c8482c95ef7b6ff14c",b.callServer,void 0,b.findSourceMapURL,"openInTerminal");a.s(["openInTerminal",0,c])},768183,968612,516819,348682,178922,355749,982891,457941,885519,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("60d67a411bf96c4a6744c97823e2bb8e5542fc3598",b.callServer,void 0,b.findSourceMapURL,"listDirectory");a.s(["listDirectory",0,c],768183);let d=(0,b.createServerReference)("700eceb9a3241c2e752e0eda7d930fd2d478e7cd8e",b.callServer,void 0,b.findSourceMapURL,"getGitStatus");a.s(["getGitStatus",0,d],968612);let e=(0,b.createServerReference)("60771d08887b07871eb320edabb12e16665bddfaa6",b.callServer,void 0,b.findSourceMapURL,"createFile");a.s(["createFile",0,e],516819);let f=(0,b.createServerReference)("603ecc440ac149b28113b22c7fa7501083d696d560",b.callServer,void 0,b.findSourceMapURL,"createDirectory");a.s(["createDirectory",0,f],348682);let g=(0,b.createServerReference)("70e66eb79e234697c073fc33eb35e78a64be5ebbd8",b.callServer,void 0,b.findSourceMapURL,"renameEntry");a.s(["renameEntry",0,g],178922);let h=(0,b.createServerReference)("60b6184baafc986aafc1cba10bd4671bac59452059",b.callServer,void 0,b.findSourceMapURL,"deleteEntry");a.s(["deleteEntry",0,h],355749);let i=(0,b.createServerReference)("4082532df7c972878c953e5b85c7a629a494f7ed3b",b.callServer,void 0,b.findSourceMapURL,"listAllFiles");a.s(["listAllFiles",0,i],982891);let j=(0,b.createServerReference)("606263995e20c208f91daf66a79f24a264a78e6a0e",b.callServer,void 0,b.findSourceMapURL,"readFileContent");a.s(["readFileContent",0,j],457941);let k=(0,b.createServerReference)("707efb92e8fb906d201dbf0df6d0ea61a8e5151563",b.callServer,void 0,b.findSourceMapURL,"writeFileContent");a.s(["writeFileContent",0,k],885519)},523151,a=>{a.v(b=>Promise.all(["server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js"].map(b=>a.l(b))).then(()=>b(5533)))},785402,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0j~t_@monaco-editor_react_dist_index_mjs_0m1qx-m._.js"].map(b=>a.l(b))).then(()=>b(963908)))}];
1
+ module.exports=[236413,a=>{"use strict";let b=(0,a.i(302856).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],236413)},506008,a=>{"use strict";var b=a.i(360295);a.s(["ChevronRight",()=>b.default])},48300,a=>{"use strict";var b=a.i(293785),c=a.i(256116),d=a.i(488137),e=a.i(44585);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],48300)},57726,891903,a=>{"use strict";var b=a.i(65735);a.s(["CheckCircle2",()=>b.default],57726);let c=(0,a.i(302856).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"}]]);a.s(["XCircle",0,c],891903)},774085,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40ab37dc43dd234ce970d976d7ac08236e3631147f",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},59711,a=>{"use strict";let b=(0,a.i(302856).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],59711)},468518,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},236345,a=>{"use strict";let b=(0,a.i(302856).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"}]]);a.s(["PlayCircle",0,b],236345)},797896,a=>{"use strict";let b=(0,a.i(302856).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"}]]);a.s(["Eye",0,b],797896)},721460,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("78374c7bf0e2dfb01b8d6f89b9b4896a3e4c372f10",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},688221,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4011817d088a72a161c109394105b2d10de7c02e85",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},63057,595313,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("60398ad1521d8adea6d4c35543f4f49825deedf810",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],63057);let d=(0,a.i(302856).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"}]]);a.s(["RotateCcw",0,d],595313)},663324,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40462b467e45a8e9ee563893f89c7f6fdb27bfde04",b.callServer,void 0,b.findSourceMapURL,"openInTerminal");a.s(["openInTerminal",0,c])},889605,40548,517234,815677,173525,965815,552871,687058,422122,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("60d26d515adfb195368ec84a27eb8f8de4fe85db07",b.callServer,void 0,b.findSourceMapURL,"listDirectory");a.s(["listDirectory",0,c],889605);let d=(0,b.createServerReference)("70dba6512529ed4c70542bfdf2aa1acef0825c1f21",b.callServer,void 0,b.findSourceMapURL,"getGitStatus");a.s(["getGitStatus",0,d],40548);let e=(0,b.createServerReference)("604d930b43acfedf48ec49f5f01b8963aadd873d86",b.callServer,void 0,b.findSourceMapURL,"createFile");a.s(["createFile",0,e],517234);let f=(0,b.createServerReference)("60febc05dd805b2e1375108c8cd6f2b83e469c08d2",b.callServer,void 0,b.findSourceMapURL,"createDirectory");a.s(["createDirectory",0,f],815677);let g=(0,b.createServerReference)("7008fd2e480927add6f4bc6fb727f55e6ab463a97d",b.callServer,void 0,b.findSourceMapURL,"renameEntry");a.s(["renameEntry",0,g],173525);let h=(0,b.createServerReference)("60ef32da26a48317004300dbd9a5d5b8c831b5ff32",b.callServer,void 0,b.findSourceMapURL,"deleteEntry");a.s(["deleteEntry",0,h],965815);let i=(0,b.createServerReference)("4058d5555e44147ffafdafaf4d9b6a8396c977f2dd",b.callServer,void 0,b.findSourceMapURL,"listAllFiles");a.s(["listAllFiles",0,i],552871);let j=(0,b.createServerReference)("606a67236fb084218d05933a369a975f8f34153619",b.callServer,void 0,b.findSourceMapURL,"readFileContent");a.s(["readFileContent",0,j],687058);let k=(0,b.createServerReference)("70c6433134f02b5537642fc98cb20a7ffe654f6f2f",b.callServer,void 0,b.findSourceMapURL,"writeFileContent");a.s(["writeFileContent",0,k],422122)},523151,a=>{a.v(b=>Promise.all(["server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js"].map(b=>a.l(b))).then(()=>b(5533)))},785402,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0j~t_@monaco-editor_react_dist_index_mjs_0m1qx-m._.js"].map(b=>a.l(b))).then(()=>b(963908)))}];
2
2
 
3
- //# sourceMappingURL=project_f_tower_0bd-exe._.js.map
3
+ //# sourceMappingURL=project_f_tower_0vgg-bq._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[796544,a=>{"use strict";var b=a.i(680889),c=a.i(832116),d=a.i(972795);async function e(a){return c.db.agentPrompt.findMany({where:a?{OR:[{workspaceId:a},{workspaceId:null}]}:{},orderBy:[{isDefault:"desc"},{name:"asc"}]})}async function f(a){return c.db.agentPrompt.findUnique({where:{id:a}})}async function g(a){if(a.content.length>1e5)throw Error("Prompt content exceeds maximum length of 100000 characters");let b=await c.db.agentPrompt.create({data:a});return(0,d.revalidatePath)("/workspaces"),(0,d.revalidatePath)("/settings"),b}async function h(a,b){if(void 0!==b.content&&b.content.length>1e5)throw Error("Prompt content exceeds maximum length of 100000 characters");let e=await c.db.agentPrompt.update({where:{id:a},data:b});return(0,d.revalidatePath)("/workspaces"),(0,d.revalidatePath)("/settings"),e}async function i(a){await c.db.agentPrompt.delete({where:{id:a}}),(0,d.revalidatePath)("/workspaces"),(0,d.revalidatePath)("/settings")}async function j(a,b){let e=await c.db.$transaction(async c=>(await c.agentPrompt.updateMany({where:b?{workspaceId:b,isDefault:!0}:{isDefault:!0},data:{isDefault:!1}}),c.agentPrompt.update({where:{id:a},data:{isDefault:!0}})));return(0,d.revalidatePath)("/workspaces"),(0,d.revalidatePath)("/settings"),e}(0,a.i(632919).ensureServerEntryExports)([e,f,g,h,i,j]),(0,b.registerServerReference)(e,"40d84bfbd886a64cf28e6c1083a292b748ae2a60d8",null),(0,b.registerServerReference)(f,"40d1d1811c2c237216b39298f52d84a604839edb0f",null),(0,b.registerServerReference)(g,"405b97e0c368e83d708d193cd7c08d345d16c53379",null),(0,b.registerServerReference)(h,"60c4f6293ed8680b936e6712d7ecf7f2ef5f2a85e7",null),(0,b.registerServerReference)(i,"4084f75558fbb37fb63f7c0f70da4aecd0b2c6deaf",null),(0,b.registerServerReference)(j,"60d4125ce6a8d3394971bc7e45c12f70a786467ca4",null),a.s(["createPrompt",0,g,"deletePrompt",0,i,"getPrompts",0,e,"setDefaultPrompt",0,j,"updatePrompt",0,h])},732999,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587),a.i(796544);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),423101,a=>a.a(async(b,c)=>{try{var d=a.i(732999),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=a.i(796544),l=b([d,g,h]);[d,g,h]=l.then?(await l)():l,a.s(["007847fad96a3f9221506aa739c0454f481fb832eb",()=>h.getActualWsPort,"00980232976ff4e5d8239c03513711c533f22de33a",()=>j.getOnboardingStatus,"00e401a2e066dc0a2fdd558f645b0ae5cde6ee1b74",()=>h.getAvailableTerminalApps,"400f16ec4822157312241e4120389fe67f2b6d214d",()=>j.completeOnboarding,"4014d65a7cb4e44cef69364d4265db25536ad2b51b",()=>h.resolveGitLocalPath,"40174680574299f60aefb39ccf266a3ae8f1cd8eb6",()=>e.createProject,"40175af511da3f485551beb23f683777478a4f455c",()=>f.deleteLabel,"40257959581af70539abce0d52368f1b4e64d3b895",()=>i.checkMigrationSafety,"403c63e717ef620fe45e8e020075ffd93967718ebd",()=>e.deleteWorkspace,"403d4c6d2ec152f1ac6b886660d9a1f76afc455c95",()=>f.createLabel,"405b97e0c368e83d708d193cd7c08d345d16c53379",()=>k.createPrompt,"407216a6ad8b83764409f4170b0f67fedd774572d0",()=>j.setOnboardingProgress,"407d1ae7456d0a55a914be2f62c3e3bc14920a1383",()=>h.getConfigValues,"4083c2e344b79f5f91f776ebe891065f634fd9ebc3",()=>j.dispatchTaskCompletionEvent,"4084f75558fbb37fb63f7c0f70da4aecd0b2c6deaf",()=>k.deletePrompt,"40b15102de1db2bc4e8a6645b5c185c83f50624da1",()=>f.getLabelsForWorkspace,"40d84bfbd886a64cf28e6c1083a292b748ae2a60d8",()=>k.getPrompts,"40e8fed6ad958d2c3a38820b1025a1fc4098689fa3",()=>e.createWorkspace,"6001179c55b9e8fbaacafb8a92d90bded2fb982406",()=>g.globalSearch,"60875b160a0df1863b61aca756a5d59fc667390189",()=>e.updateWorkspace,"60876e2a334c30c5ba151f09d3308e73e858536678",()=>h.getConfigValue,"60c4f6293ed8680b936e6712d7ecf7f2ef5f2a85e7",()=>k.updatePrompt,"60c717998ae4577d9acbe23ed6297693b47434d782",()=>h.setConfigValue,"60d4125ce6a8d3394971bc7e45c12f70a786467ca4",()=>k.setDefaultPrompt,"60f4d0bc02bf4546f15e2988ea35e628c63de7fc47",()=>i.analyzeProjectDirectory,"60fabeca5f7653ab2766cf231a2885d26de4adb15e",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__08-2pn1._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0ex911v._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
1
+ module.exports=[796544,a=>{"use strict";var b=a.i(680889),c=a.i(832116),d=a.i(972795);async function e(a){return c.db.agentPrompt.findMany({where:a?{OR:[{workspaceId:a},{workspaceId:null}]}:{},orderBy:[{isDefault:"desc"},{name:"asc"}]})}async function f(a){return c.db.agentPrompt.findUnique({where:{id:a}})}async function g(a){if(a.content.length>1e5)throw Error("Prompt content exceeds maximum length of 100000 characters");let b=await c.db.agentPrompt.create({data:a});return(0,d.revalidatePath)("/workspaces"),(0,d.revalidatePath)("/settings"),b}async function h(a,b){if(void 0!==b.content&&b.content.length>1e5)throw Error("Prompt content exceeds maximum length of 100000 characters");let e=await c.db.agentPrompt.update({where:{id:a},data:b});return(0,d.revalidatePath)("/workspaces"),(0,d.revalidatePath)("/settings"),e}async function i(a){await c.db.agentPrompt.delete({where:{id:a}}),(0,d.revalidatePath)("/workspaces"),(0,d.revalidatePath)("/settings")}async function j(a,b){let e=await c.db.$transaction(async c=>(await c.agentPrompt.updateMany({where:b?{workspaceId:b,isDefault:!0}:{isDefault:!0},data:{isDefault:!1}}),c.agentPrompt.update({where:{id:a},data:{isDefault:!0}})));return(0,d.revalidatePath)("/workspaces"),(0,d.revalidatePath)("/settings"),e}(0,a.i(632919).ensureServerEntryExports)([e,f,g,h,i,j]),(0,b.registerServerReference)(e,"40ab37dc43dd234ce970d976d7ac08236e3631147f",null),(0,b.registerServerReference)(f,"4033b70ca047271dfbfed825453d0794fddcc5617d",null),(0,b.registerServerReference)(g,"40239bae703f615c18e06a93d25e577e8aa02ab0da",null),(0,b.registerServerReference)(h,"6082b2df2da8e3e6311a2f05ca829e1100cd82e859",null),(0,b.registerServerReference)(i,"405b9fdc6f86095fd9979d5f6acd237242d49dfc72",null),(0,b.registerServerReference)(j,"603e5e34a61ff9e137eccb87ad3a444cd3a1f71a58",null),a.s(["createPrompt",0,g,"deletePrompt",0,i,"getPrompts",0,e,"setDefaultPrompt",0,j,"updatePrompt",0,h])},732999,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587),a.i(796544);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),423101,a=>a.a(async(b,c)=>{try{var d=a.i(732999),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=a.i(796544),l=b([d,g,h]);[d,g,h]=l.then?(await l)():l,a.s(["00203bbda3efaa5dded8cbbefd27f746bb53266f21",()=>j.getOnboardingStatus,"007833899f8c9d9e8e952b61ff176230758229de16",()=>h.getActualWsPort,"00785d45bfd890cfe0f822b9c779b3be299de79b1c",()=>h.getAvailableTerminalApps,"4014bdcb9765396efe414741835e6be0a7882be8f5",()=>f.createLabel,"40239bae703f615c18e06a93d25e577e8aa02ab0da",()=>k.createPrompt,"404439a9790385718762b275fc0500acae5c3357d2",()=>j.dispatchTaskCompletionEvent,"4044694abea180e8be554d786bde1232322fb14aad",()=>f.getLabelsForWorkspace,"405689f53c34ab4be133884427289de76ae868650b",()=>j.setOnboardingProgress,"405b9fdc6f86095fd9979d5f6acd237242d49dfc72",()=>k.deletePrompt,"408b936d2350527048973473055399e594517834d4",()=>e.createProject,"40939248ba94f467ae6c0ca056c20cdf8fd7643275",()=>e.createWorkspace,"409ee98a06d63b435af3b096d320d081be06600e52",()=>f.deleteLabel,"40ab37dc43dd234ce970d976d7ac08236e3631147f",()=>k.getPrompts,"40b3c89b263d0da110d22604a11e3722b207f41a74",()=>i.checkMigrationSafety,"40beeb40d479aad1cef07db2e424e66a8f1f87114e",()=>h.resolveGitLocalPath,"40c2a7b826bd84837cc38f35577365d57e5aa9b43e",()=>e.deleteWorkspace,"40d029ca2de5de8c2bb0e80a100f164424c7078da9",()=>j.completeOnboarding,"40f8a36f4daae93f3177097def1340e8c3407d6fab",()=>h.getConfigValues,"6011594266e5349ec44fa3e334ae1732756fba101a",()=>h.setConfigValue,"6029753cde1a0af141c2d96cd5a3b0324314e6cc63",()=>i.analyzeProjectDirectory,"603e5e34a61ff9e137eccb87ad3a444cd3a1f71a58",()=>k.setDefaultPrompt,"604fcba71b9c0a5bff531fa1534ae98f9e665b0f82",()=>h.getConfigValue,"60519939be78ced789932933058ac226b0b3ed474c",()=>g.globalSearch,"605468dac93122485441f09a81ca4245c334976303",()=>e.updateWorkspace,"6082b2df2da8e3e6311a2f05ca829e1100cd82e859",()=>k.updatePrompt,"609e5df0c937f1b7e7296c30cf7bf17810cc0cea74",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__08-2pn1._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0ex911v._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
2
2
 
3
3
  //# sourceMappingURL=project_f_tower_0w01kgd._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[7533,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),157616,a=>a.a(async(b,c)=>{try{var d=a.i(7533),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["007847fad96a3f9221506aa739c0454f481fb832eb",()=>h.getActualWsPort,"007a65ed9cccdfb63e168573d3517c4e43ac1bf80c",()=>e.getWorkspacesWithProjects,"00980232976ff4e5d8239c03513711c533f22de33a",()=>j.getOnboardingStatus,"400f16ec4822157312241e4120389fe67f2b6d214d",()=>j.completeOnboarding,"4014d65a7cb4e44cef69364d4265db25536ad2b51b",()=>h.resolveGitLocalPath,"40168c3821f045fd64d0105bab8735f5e9e53547b7",()=>e.getRecentLocalProjects,"40174680574299f60aefb39ccf266a3ae8f1cd8eb6",()=>e.createProject,"40175af511da3f485551beb23f683777478a4f455c",()=>f.deleteLabel,"40257959581af70539abce0d52368f1b4e64d3b895",()=>i.checkMigrationSafety,"403c63e717ef620fe45e8e020075ffd93967718ebd",()=>e.deleteWorkspace,"403d4c6d2ec152f1ac6b886660d9a1f76afc455c95",()=>f.createLabel,"4062e4207ea1da3bc910bf578675fc13f57a38b71e",()=>e.getOrCreateTowerTaskId,"407216a6ad8b83764409f4170b0f67fedd774572d0",()=>j.setOnboardingProgress,"4083c2e344b79f5f91f776ebe891065f634fd9ebc3",()=>j.dispatchTaskCompletionEvent,"4098e0063f1ea45bd87ffdcc7cccea30b6478a6b3b",()=>e.deleteProject,"40a4e724488780bb8a72ac0e847372e67f3269f07a",()=>e.getWorkspacesWithRecentTasks,"40b15102de1db2bc4e8a6645b5c185c83f50624da1",()=>f.getLabelsForWorkspace,"40d72319498c9243000052ebebd4d0c6e8ad4ac122",()=>e.getWorkspaceById,"40e8fed6ad958d2c3a38820b1025a1fc4098689fa3",()=>e.createWorkspace,"40ecdb30cd8946f126b57541480d8bfa2a88a72f17",()=>e.getProjectByLocalPath,"6001179c55b9e8fbaacafb8a92d90bded2fb982406",()=>g.globalSearch,"60875b160a0df1863b61aca756a5d59fc667390189",()=>e.updateWorkspace,"60876e2a334c30c5ba151f09d3308e73e858536678",()=>h.getConfigValue,"60c717998ae4577d9acbe23ed6297693b47434d782",()=>h.setConfigValue,"60f4d0bc02bf4546f15e2988ea35e628c63de7fc47",()=>i.analyzeProjectDirectory,"60fabeca5f7653ab2766cf231a2885d26de4adb15e",()=>i.migrateProjectPath,"60ffd6739cc144b04e9275d1454c62efdf2609c0bd",()=>e.updateProject]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0fkkh9j._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__00.lowc._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
1
+ module.exports=[7533,a=>a.a(async(b,c)=>{try{a.i(279254),a.i(30292);var d=a.i(322220),e=a.i(727977);a.i(198433),a.i(541587);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),157616,a=>a.a(async(b,c)=>{try{var d=a.i(7533),e=a.i(279254),f=a.i(30292),g=a.i(322220),h=a.i(727977),i=a.i(198433),j=a.i(541587),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["00203bbda3efaa5dded8cbbefd27f746bb53266f21",()=>j.getOnboardingStatus,"007833899f8c9d9e8e952b61ff176230758229de16",()=>h.getActualWsPort,"00cdf92320810802f7befad0614543570433b6da7f",()=>e.getWorkspacesWithProjects,"4005592194057fa97140d7e6aa1008a7e8ce680cdb",()=>e.deleteProject,"4014bdcb9765396efe414741835e6be0a7882be8f5",()=>f.createLabel,"404439a9790385718762b275fc0500acae5c3357d2",()=>j.dispatchTaskCompletionEvent,"4044694abea180e8be554d786bde1232322fb14aad",()=>f.getLabelsForWorkspace,"4046c97154bc88c2eb859ff9faa281f3fe800afd15",()=>e.getProjectByLocalPath,"405689f53c34ab4be133884427289de76ae868650b",()=>j.setOnboardingProgress,"408b936d2350527048973473055399e594517834d4",()=>e.createProject,"40939248ba94f467ae6c0ca056c20cdf8fd7643275",()=>e.createWorkspace,"409ee98a06d63b435af3b096d320d081be06600e52",()=>f.deleteLabel,"40b3c89b263d0da110d22604a11e3722b207f41a74",()=>i.checkMigrationSafety,"40beeb40d479aad1cef07db2e424e66a8f1f87114e",()=>h.resolveGitLocalPath,"40c2a7b826bd84837cc38f35577365d57e5aa9b43e",()=>e.deleteWorkspace,"40d029ca2de5de8c2bb0e80a100f164424c7078da9",()=>j.completeOnboarding,"40e2010e943a937604f4e11faccc361f7a83651f9f",()=>e.getWorkspaceById,"40ed0fa56ef7ba34a5cc95e0573a9beea30338c576",()=>e.getWorkspacesWithRecentTasks,"40f2e58df657aa65fc4cf727ef5aa2e200e6bf23c0",()=>e.getRecentLocalProjects,"40fd328cbbaef7aa0fb964e14a65f2d88842ab71ff",()=>e.getOrCreateTowerTaskId,"6011594266e5349ec44fa3e334ae1732756fba101a",()=>h.setConfigValue,"6029753cde1a0af141c2d96cd5a3b0324314e6cc63",()=>i.analyzeProjectDirectory,"603e137103646b057eee613ffd44bc4bc4cb9e44c4",()=>e.updateProject,"604fcba71b9c0a5bff531fa1534ae98f9e665b0f82",()=>h.getConfigValue,"60519939be78ced789932933058ac226b0b3ed474c",()=>g.globalSearch,"605468dac93122485441f09a81ca4245c334976303",()=>e.updateWorkspace,"609e5df0c937f1b7e7296c30cf7bf17810cc0cea74",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),939768,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0fkkh9j._.js"].map(b=>a.l(b))).then(()=>b(326575)))},585988,a=>{a.v(a=>Promise.resolve().then(()=>a(264572)))},908462,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xe9b6_._.js"].map(b=>a.l(b))).then(()=>b(961374)))},302452,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__00.lowc._.js"].map(b=>a.l(b))).then(()=>b(396477)))}];
2
2
 
3
3
  //# sourceMappingURL=project_f_tower_0ym-aea._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[157948,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("407d1ae7456d0a55a914be2f62c3e3bc14920a1383",b.callServer,void 0,b.findSourceMapURL,"getConfigValues");a.s(["getConfigValues",0,c])},48300,a=>{"use strict";var b=a.i(293785),c=a.i(256116),d=a.i(488137),e=a.i(44585);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],48300)},57726,891903,a=>{"use strict";var b=a.i(65735);a.s(["CheckCircle2",()=>b.default],57726);let c=(0,a.i(302856).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"}]]);a.s(["XCircle",0,c],891903)},404681,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40d84bfbd886a64cf28e6c1083a292b748ae2a60d8",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},889822,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.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",a),...d})}])}];
1
+ module.exports=[107992,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40f8a36f4daae93f3177097def1340e8c3407d6fab",b.callServer,void 0,b.findSourceMapURL,"getConfigValues");a.s(["getConfigValues",0,c])},48300,a=>{"use strict";var b=a.i(293785),c=a.i(256116),d=a.i(488137),e=a.i(44585);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],48300)},57726,891903,a=>{"use strict";var b=a.i(65735);a.s(["CheckCircle2",()=>b.default],57726);let c=(0,a.i(302856).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"}]]);a.s(["XCircle",0,c],891903)},774085,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40ab37dc43dd234ce970d976d7ac08236e3631147f",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},889822,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.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",a),...d})}])}];
2
2
 
3
- //# sourceMappingURL=project_f_tower_07-hbsx._.js.map
3
+ //# sourceMappingURL=project_f_tower_0ysif1r._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[157948,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("407d1ae7456d0a55a914be2f62c3e3bc14920a1383",b.callServer,void 0,b.findSourceMapURL,"getConfigValues");a.s(["getConfigValues",0,c])},468518,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},48300,a=>{"use strict";var b=a.i(293785),c=a.i(256116),d=a.i(488137),e=a.i(44585);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],48300)},828591,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4069295d124f7a467ec7579037d131a5c9b67802a8",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},515539,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("78656b1089a99ee62580868de2813dc6bff192cf60",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},211971,595313,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("60bcfa88f82618a21319ddbb3d09fd2de03cdec86a",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],211971);let d=(0,a.i(302856).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"}]]);a.s(["RotateCcw",0,d],595313)},887491,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4095a3e15e499ebd7df25e69c8482c95ef7b6ff14c",b.callServer,void 0,b.findSourceMapURL,"openInTerminal");a.s(["openInTerminal",0,c])}];
1
+ module.exports=[107992,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40f8a36f4daae93f3177097def1340e8c3407d6fab",b.callServer,void 0,b.findSourceMapURL,"getConfigValues");a.s(["getConfigValues",0,c])},468518,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},48300,a=>{"use strict";var b=a.i(293785),c=a.i(256116),d=a.i(488137),e=a.i(44585);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],48300)},688221,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4011817d088a72a161c109394105b2d10de7c02e85",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},721460,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("78374c7bf0e2dfb01b8d6f89b9b4896a3e4c372f10",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},63057,595313,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("60398ad1521d8adea6d4c35543f4f49825deedf810",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],63057);let d=(0,a.i(302856).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"}]]);a.s(["RotateCcw",0,d],595313)},663324,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40462b467e45a8e9ee563893f89c7f6fdb27bfde04",b.callServer,void 0,b.findSourceMapURL,"openInTerminal");a.s(["openInTerminal",0,c])}];
2
2
 
3
- //# sourceMappingURL=project_f_tower_src_0p8gi_2._.js.map
3
+ //# sourceMappingURL=project_f_tower_src_09hh2zl._.js.map