tower-studio 0.1.0 → 0.1.1

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 (173) 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 +38 -38
  7. package/.next/fallback-build-manifest.json +3 -3
  8. package/.next/prerender-manifest.json +3 -3
  9. package/.next/required-server-files.js +0 -1
  10. package/.next/required-server-files.json +0 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
  19. package/.next/server/app/_not-found/page/server-reference-manifest.json +23 -23
  20. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  21. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/_not-found.html +1 -1
  23. package/.next/server/app/_not-found.rsc +14 -14
  24. package/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  25. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  26. package/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
  27. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  28. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  29. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  30. package/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  31. package/.next/server/app/api/git/route.js.nft.json +1 -1
  32. package/.next/server/app/index.html +1 -1
  33. package/.next/server/app/index.rsc +14 -14
  34. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  35. package/.next/server/app/index.segments/_full.segment.rsc +14 -14
  36. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  37. package/.next/server/app/index.segments/_index.segment.rsc +9 -9
  38. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  39. package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  40. package/.next/server/app/missions/page/server-reference-manifest.json +51 -51
  41. package/.next/server/app/missions/page.js.nft.json +1 -1
  42. package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  43. package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
  44. package/.next/server/app/onboarding/page/server-reference-manifest.json +23 -23
  45. package/.next/server/app/onboarding/page.js.nft.json +1 -1
  46. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/onboarding.html +1 -1
  48. package/.next/server/app/onboarding.rsc +16 -16
  49. package/.next/server/app/onboarding.segments/_full.segment.rsc +16 -16
  50. package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
  51. package/.next/server/app/onboarding.segments/_index.segment.rsc +9 -9
  52. package/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
  53. package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  54. package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
  55. package/.next/server/app/page/react-loadable-manifest.json +1 -1
  56. package/.next/server/app/page/server-reference-manifest.json +23 -23
  57. package/.next/server/app/page.js.nft.json +1 -1
  58. package/.next/server/app/page_client-reference-manifest.js +1 -1
  59. package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
  60. package/.next/server/app/settings/page/server-reference-manifest.json +32 -32
  61. package/.next/server/app/settings/page.js.nft.json +1 -1
  62. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app/settings.html +1 -1
  64. package/.next/server/app/settings.rsc +16 -16
  65. package/.next/server/app/settings.segments/_full.segment.rsc +16 -16
  66. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  67. package/.next/server/app/settings.segments/_index.segment.rsc +9 -9
  68. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  69. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  70. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  71. package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
  72. package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +79 -79
  73. package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  74. package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
  76. package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +70 -70
  77. package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  78. package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  79. package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
  80. package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +61 -61
  81. package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  82. package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  83. package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
  84. package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +51 -51
  85. package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  86. package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  87. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
  88. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +23 -23
  89. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  90. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  91. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
  92. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +56 -56
  93. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  94. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  95. package/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
  96. package/.next/server/app/workspaces/page/server-reference-manifest.json +43 -43
  97. package/.next/server/app/workspaces/page.js.nft.json +1 -1
  98. package/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  99. package/.next/server/chunks/10ge_next_dist_esm_build_templates_app-route_13~vb_i.js +2 -2
  100. package/.next/server/chunks/[root-of-the-server]__043lk8~._.js +2 -2
  101. package/.next/server/chunks/ssr/0~.g_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_0bbseig._.js +1 -1
  102. package/.next/server/chunks/ssr/[root-of-the-server]__0.8y0n9._.js +1 -1
  103. package/.next/server/chunks/ssr/[root-of-the-server]__01ws4-7._.js +1 -1
  104. package/.next/server/chunks/ssr/[root-of-the-server]__02ipahf._.js +1 -1
  105. package/.next/server/chunks/ssr/{[root-of-the-server]__0h44~z8._.js → [root-of-the-server]__03swpls._.js} +2 -2
  106. package/.next/server/chunks/ssr/[root-of-the-server]__0bk3s4l._.js +1 -1
  107. package/.next/server/chunks/ssr/[root-of-the-server]__0l~dc3x._.js +1 -1
  108. package/.next/server/chunks/ssr/[root-of-the-server]__0rs7pkn._.js +1 -1
  109. package/.next/server/chunks/ssr/[root-of-the-server]__0sysz2q._.js +3 -3
  110. package/.next/server/chunks/ssr/{[root-of-the-server]__0deh_.r._.js → [root-of-the-server]__0v0dk_o._.js} +2 -2
  111. package/.next/server/chunks/ssr/[root-of-the-server]__0vpgotk._.js +3 -0
  112. package/.next/server/chunks/ssr/[root-of-the-server]__0y-lkvf._.js +1 -1
  113. package/.next/server/chunks/ssr/[root-of-the-server]__12f810l._.js +1 -1
  114. package/.next/server/chunks/ssr/tower_0_i~57x._.js +3 -0
  115. package/.next/server/chunks/ssr/{tower_0j.-goc._.js → tower_0agzi_m._.js} +2 -2
  116. package/.next/server/chunks/ssr/tower_0kl_bfy._.js +1 -1
  117. package/.next/server/chunks/ssr/{tower_0mocaf7._.js → tower_0le1h0h._.js} +2 -2
  118. package/.next/server/chunks/ssr/tower_0mz4ut.._.js +1 -1
  119. package/.next/server/chunks/ssr/tower_0pcqezm._.js +1 -1
  120. package/.next/server/chunks/ssr/{tower_0txw7ny._.js → tower_0rdk81e._.js} +2 -2
  121. package/.next/server/chunks/ssr/tower_0wvk~r.._.js +1 -1
  122. package/.next/server/chunks/ssr/{tower_0x1wfcs._.js → tower_0xg_zeq._.js} +2 -2
  123. package/.next/server/chunks/ssr/{tower_11f_poc._.js → tower_0~oir9k._.js} +2 -2
  124. package/.next/server/chunks/ssr/tower_10p15te._.js +1 -1
  125. package/.next/server/chunks/ssr/tower_117pzh8._.js +1 -1
  126. package/.next/server/chunks/ssr/tower_11q5_.m._.js +1 -1
  127. package/.next/server/chunks/ssr/tower_138qlx5._.js +1 -1
  128. package/.next/server/chunks/ssr/tower_src_0puzd-6._.js +3 -0
  129. package/.next/server/chunks/ssr/tower_src_actions_agent-actions_ts_0j.e1tn._.js +1 -1
  130. package/.next/server/chunks/ssr/tower_src_actions_file-actions_ts_0424lna._.js +1 -1
  131. package/.next/server/chunks/ssr/tower_src_app_missions_missions-client_tsx_0a9vjyr._.js +1 -1
  132. package/.next/server/chunks/ssr/tower_src_app_onboarding_page_tsx_0_3krz1._.js +1 -1
  133. package/.next/server/chunks/ssr/tower_src_app_settings_page_tsx_0vo5e-o._.js +1 -1
  134. package/.next/server/chunks/ssr/tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0zfgzhi._.js +1 -1
  135. package/.next/server/chunks/ssr/tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0kjp1u0._.js +1 -1
  136. package/.next/server/chunks/tower_0a-x6m.._.js +1 -1
  137. package/.next/server/chunks/tower_src_0..vg-t._.js +1 -1
  138. package/.next/server/middleware-build-manifest.js +3 -3
  139. package/.next/server/pages/404.html +1 -1
  140. package/.next/server/pages/500.html +1 -1
  141. package/.next/server/server-reference-manifest.js +1 -1
  142. package/.next/server/server-reference-manifest.json +214 -214
  143. package/.next/static/chunks/0.uav~g39w7rr.js +1 -0
  144. package/.next/static/chunks/{11_3ea_a8knah.js → 02f8le_y~6gnd.js} +1 -1
  145. package/.next/static/chunks/{0o.ks3~iuzx4r.js → 06-mw~zl.diaf.js} +1 -1
  146. package/.next/static/chunks/{023~s6crmvsm8.js → 06fsp5nfga486.js} +1 -1
  147. package/.next/static/chunks/{0c.0-8lt3bz.1.js → 07~c.vc82_c1-.js} +1 -1
  148. package/.next/static/chunks/{179_l7917u3p2.js → 0amhu3hs4zxxw.js} +1 -1
  149. package/.next/static/chunks/0drgc-oztq6o-.css +1 -0
  150. package/.next/static/chunks/{0vg49pdw~qd37.js → 0k_9.73yz~q10.js} +1 -1
  151. package/.next/static/chunks/0ltsz~s~e4wzu.js +1 -0
  152. package/.next/static/chunks/{051mi_101oh.a.js → 0mf7~j7tvqr46.js} +1 -1
  153. package/.next/static/chunks/{0gt7r3-vbdfj9.js → 0qe.8bmmwuucu.js} +1 -1
  154. package/.next/static/chunks/0qpq1~6v-eql7.js +1 -0
  155. package/.next/static/chunks/0uxf0jd91e-0r.js +1 -0
  156. package/.next/static/chunks/{0r1oyqeuqr030.js → 0vn2y~4w7u3ui.js} +1 -1
  157. package/.next/static/chunks/{0ziax8rwv_767.js → 15gjy.xhhriy8.js} +2 -2
  158. package/.next/static/chunks/{0qagt5x67~~sx.js → 16ft9mdv3zwse.js} +1 -1
  159. package/.next/trace +2 -2
  160. package/.next/trace-build +1 -1
  161. package/next.config.ts +1 -1
  162. package/package.json +1 -1
  163. package/.next/server/chunks/ssr/[root-of-the-server]__0iluaa1._.js +0 -3
  164. package/.next/server/chunks/ssr/tower_0h2g2_e._.js +0 -3
  165. package/.next/server/chunks/ssr/tower_src_0u.-h7b._.js +0 -3
  166. package/.next/static/chunks/08g2tlzp2n4gz.js +0 -1
  167. package/.next/static/chunks/0_guif4s2s3q..css +0 -1
  168. package/.next/static/chunks/0q5~5fua-vef8.js +0 -1
  169. package/.next/static/chunks/0v1_be48b8jhu.js +0 -1
  170. package/.next/static/chunks/18augppu.eqk1.js +0 -1
  171. /package/.next/static/{BIQ1l5etqo7aJnbnv-Bqt → dwsGxWRLV_FPRJyEkai5s}/_buildManifest.js +0 -0
  172. /package/.next/static/{BIQ1l5etqo7aJnbnv-Bqt → dwsGxWRLV_FPRJyEkai5s}/_clientMiddlewareManifest.js +0 -0
  173. /package/.next/static/{BIQ1l5etqo7aJnbnv-Bqt → dwsGxWRLV_FPRJyEkai5s}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[684280,a=>{"use strict";let b=(0,a.i(173250).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);a.s(["GitCompare",0,b],684280)},776206,913983,a=>{"use strict";let b=(0,a.i(173250).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,b],776206);var c=a.i(387541);a.s(["AlertTriangle",()=>c.default],913983)},285064,780414,a=>{"use strict";var b=a.i(348273),c=a.i(399424),d=a.i(772253),e=a.i(759436),f=a.i(913983),g=a.i(684280),h=a.i(173250);let i=(0,h.default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);var j=a.i(422917),k=a.i(580283),l=a.i(481030),m=a.i(755811),n=a.i(302512),o=a.i(282980);a.s(["TaskDiffView",0,function({files:a,totalAdded:h,totalRemoved:p,hasConflicts:q,conflictFiles:r,onCommit:s,hasUncommitted:t}){let{t:u}=(0,o.useI18n)(),[v,w]=(0,c.useState)(new Set),[x,y]=(0,c.useState)(!1),[z,A]=(0,c.useState)(""),[B,C]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"flex flex-col h-full",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,b.jsxs)("span",{className:"font-medium text-foreground",children:[a.length," files changed"]}),(0,b.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",h]}),(0,b.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",p]})]}),(0,b.jsx)("div",{className:"flex items-center gap-2",children:t&&s&&(0,b.jsxs)(j.Button,{variant:"outline",onClick:()=>y(!0),className:"gap-2",children:[(0,b.jsx)(i,{className:"h-4 w-4"}),u("diff.commit")]})})]}),q&&(0,b.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,b.jsx)(f.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,b.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",r.length," conflicting file",1!==r.length?"s":""]})]}),(0,b.jsx)("ul",{className:"ml-6 space-y-1",children:r.map(a=>(0,b.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,b.jsx)("div",{className:"flex-1 overflow-auto",children:0===a.length?(0,b.jsx)(k.EmptyState,{icon:g.GitCompare,title:u("diff.noChanges"),className:"h-full"}):(0,b.jsx)("div",{className:"divide-y divide-border",children:a.map(a=>{let c=v.has(a.filename);return(0,b.jsxs)("div",{children:[(0,b.jsxs)(j.Button,{variant:"ghost",type:"button",onClick:()=>{var b;return b=a.filename,void w(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[c?(0,b.jsx)(e.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,b.jsx)(d.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,b.jsx)(l.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:"Binary"}):(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,b.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),c&&a.patch&&(0,b.jsx)("div",{className:"border-t border-border bg-background",children:(0,b.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:a.patch.split("\n").map((a,c)=>{let d=a.startsWith("+")&&!a.startsWith("+++")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")&&!a.startsWith("---")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,b.jsx)("span",{className:d,children:a||" "},c)})})})]},a.filename)})})}),(0,b.jsx)(m.Dialog,{open:x,onOpenChange:y,children:(0,b.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,b.jsx)(m.DialogHeader,{children:(0,b.jsx)(m.DialogTitle,{children:u("diff.commitChanges")})}),(0,b.jsx)("div",{className:"flex flex-col gap-3",children:(0,b.jsx)(n.Textarea,{value:z,onChange:a=>A(a.target.value),placeholder:u("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"ghost",onClick:()=>y(!1),children:u("common.cancel")}),(0,b.jsx)(j.Button,{onClick:async()=>{if(z.trim()&&s){C(!0);try{await s(z.trim()),A(""),y(!1)}finally{C(!1)}}},disabled:!z.trim()||B,children:B?"...":u("diff.commit")})]})]})})]})}],285064);var p=a.i(851033);let q=(0,h.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var r=a.i(348754);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:d,taskId:e,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:k=[],onMergeComplete:l}){let n=(0,p.useRouter)(),[o,s]=(0,c.useState)(!1),[t,u]=(0,c.useState)(null),v=async()=>{s(!0),u(null);try{let a=await fetch(`/api/tasks/${e}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){d(!1),l(),n.refresh();return}let b=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?u(`Merge conflicts detected: ${Array.isArray(b.conflictFiles)?b.conflictFiles.join(", "):"unknown files"}`):u(b.error??"Merge failed")}catch{u("Network error — merge failed")}finally{s(!1)}};return(0,b.jsx)(m.Dialog,{open:a,onOpenChange:d,children:(0,b.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,b.jsx)(m.DialogHeader,{children:(0,b.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)(q,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,b.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,b.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,b.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),k.length>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,b.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:k.map((a,c)=>(0,b.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},c))})]}),t&&(0,b.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,b.jsx)("p",{className:"text-xs text-red-400",children:t})})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"outline",onClick:()=>d(!1),disabled:o,children:"Cancel"}),(0,b.jsx)(j.Button,{onClick:v,disabled:o,className:"gap-2",children:o?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(q,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],780414)},25177,a=>{"use strict";let b=(0,a.i(173250).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);a.s(["ArrowUpFromLine",0,b],25177)},505454,a=>{"use strict";var b=a.i(348273),c=a.i(399424),d=a.i(280844),e=a.i(759436),f=a.i(764352),g=a.i(235022),h=a.i(348754),i=a.i(755811),j=a.i(422917),k=a.i(524513),l=a.i(302512),m=a.i(282980);a.s(["CreateBranchDialog",0,function({open:a,onOpenChange:n,branches:o,currentBranch:p,localPath:q,onCreated:r,onError:s}){let{t}=(0,m.useI18n)(),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(p),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(""),[E,F]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(v(""),x(p),z(""),D(""))},[a,p]);let G=[...new Set(o)].filter(a=>a.toLowerCase().includes(C.toLowerCase())),H=async()=>{if(u.trim()){B(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:q,branch:u.trim(),baseBranch:w})});if(a.ok)n(!1),r();else{let b=await a.json();s(b.error||"Unknown error")}}catch{s("Network error")}finally{B(!1)}}};return(0,b.jsx)(i.Dialog,{open:a,onOpenChange:n,children:(0,b.jsxs)(i.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(i.DialogHeader,{children:(0,b.jsx)(i.DialogTitle,{children:t("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchName")}),(0,b.jsx)(k.Input,{value:u,onChange:a=>v(a.target.value),placeholder:t("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&H()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>F(!E),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,b.jsx)("span",{className:"font-mono text-xs text-foreground",children:w})]}),(0,b.jsx)(e.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${E?"rotate-180":""}`})]}),E&&(0,b.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(f.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:C,onChange:a=>D(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:G.map(a=>(0,b.jsxs)("button",{onClick:()=>{x(a),F(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===w?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",children:a}),a===w&&(0,b.jsx)(g.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchDesc")}),(0,b.jsx)(l.Textarea,{value:y,onChange:a=>z(a.target.value),placeholder:t("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,b.jsxs)(i.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"outline",onClick:()=>n(!1),children:t("common.cancel")}),(0,b.jsxs)(j.Button,{onClick:H,disabled:!u.trim()||A,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[A?(0,b.jsx)(h.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,t("common.create")]})]})]})})}])},219082,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},101145,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("60d0eb7d2e029569ea749e944fcd325b0018454a83",b.callServer,void 0,b.findSourceMapURL,"updateProject");a.s(["updateProject",0,c])},677393,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("401822c186c107c6263d750905e04e0f3c50efa409",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,c])},585811,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40aa27a83e9645e48240c4dece40365e948a04fa08",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},641277,997352,357972,742023,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("6031daff48e2b45377a9f6d7b6eb537a5a7c75419f",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],641277);let d=(0,b.createServerReference)("40e2ef9cfdff35887d82f5e52b0343c8aa064a4c7f",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],997352);let e=(0,b.createServerReference)("6091e6fbec741a0762aec992240fcd7c555080c3d9",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],357972);let f=(0,a.i(173250).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,f],742023)},475127,a=>{"use strict";let b=(0,a.i(173250).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",0,b],475127)},657679,a=>{"use strict";var b=a.i(348273),c=a.i(399424),d=a.i(759436),e=a.i(222321),f=a.i(136913),g=a.i(526116),h=a.i(348754),i=a.i(742023),j=a.i(292441),k=a.i(659560),l=a.i(475127);let m=(0,a.i(173250).default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var n=a.i(422917),o=a.i(580283),p=a.i(282980);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}],657679)}];
1
+ module.exports=[684280,a=>{"use strict";let b=(0,a.i(173250).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);a.s(["GitCompare",0,b],684280)},776206,913983,a=>{"use strict";let b=(0,a.i(173250).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,b],776206);var c=a.i(387541);a.s(["AlertTriangle",()=>c.default],913983)},285064,780414,a=>{"use strict";var b=a.i(348273),c=a.i(399424),d=a.i(772253),e=a.i(759436),f=a.i(913983),g=a.i(684280),h=a.i(173250);let i=(0,h.default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);var j=a.i(422917),k=a.i(580283),l=a.i(481030),m=a.i(755811),n=a.i(302512),o=a.i(282980);a.s(["TaskDiffView",0,function({files:a,totalAdded:h,totalRemoved:p,hasConflicts:q,conflictFiles:r,onCommit:s,hasUncommitted:t}){let{t:u}=(0,o.useI18n)(),[v,w]=(0,c.useState)(new Set),[x,y]=(0,c.useState)(!1),[z,A]=(0,c.useState)(""),[B,C]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"flex flex-col h-full",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,b.jsxs)("span",{className:"font-medium text-foreground",children:[a.length," files changed"]}),(0,b.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",h]}),(0,b.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",p]})]}),(0,b.jsx)("div",{className:"flex items-center gap-2",children:t&&s&&(0,b.jsxs)(j.Button,{variant:"outline",onClick:()=>y(!0),className:"gap-2",children:[(0,b.jsx)(i,{className:"h-4 w-4"}),u("diff.commit")]})})]}),q&&(0,b.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,b.jsx)(f.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,b.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",r.length," conflicting file",1!==r.length?"s":""]})]}),(0,b.jsx)("ul",{className:"ml-6 space-y-1",children:r.map(a=>(0,b.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,b.jsx)("div",{className:"flex-1 overflow-auto",children:0===a.length?(0,b.jsx)(k.EmptyState,{icon:g.GitCompare,title:u("diff.noChanges"),className:"h-full"}):(0,b.jsx)("div",{className:"divide-y divide-border",children:a.map(a=>{let c=v.has(a.filename);return(0,b.jsxs)("div",{children:[(0,b.jsxs)(j.Button,{variant:"ghost",type:"button",onClick:()=>{var b;return b=a.filename,void w(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[c?(0,b.jsx)(e.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,b.jsx)(d.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,b.jsx)(l.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:"Binary"}):(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,b.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),c&&a.patch&&(0,b.jsx)("div",{className:"border-t border-border bg-background",children:(0,b.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:a.patch.split("\n").map((a,c)=>{let d=a.startsWith("+")&&!a.startsWith("+++")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")&&!a.startsWith("---")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,b.jsx)("span",{className:d,children:a||" "},c)})})})]},a.filename)})})}),(0,b.jsx)(m.Dialog,{open:x,onOpenChange:y,children:(0,b.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,b.jsx)(m.DialogHeader,{children:(0,b.jsx)(m.DialogTitle,{children:u("diff.commitChanges")})}),(0,b.jsx)("div",{className:"flex flex-col gap-3",children:(0,b.jsx)(n.Textarea,{value:z,onChange:a=>A(a.target.value),placeholder:u("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"ghost",onClick:()=>y(!1),children:u("common.cancel")}),(0,b.jsx)(j.Button,{onClick:async()=>{if(z.trim()&&s){C(!0);try{await s(z.trim()),A(""),y(!1)}finally{C(!1)}}},disabled:!z.trim()||B,children:B?"...":u("diff.commit")})]})]})})]})}],285064);var p=a.i(851033);let q=(0,h.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var r=a.i(348754);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:d,taskId:e,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:k=[],onMergeComplete:l}){let n=(0,p.useRouter)(),[o,s]=(0,c.useState)(!1),[t,u]=(0,c.useState)(null),v=async()=>{s(!0),u(null);try{let a=await fetch(`/api/tasks/${e}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){d(!1),l(),n.refresh();return}let b=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?u(`Merge conflicts detected: ${Array.isArray(b.conflictFiles)?b.conflictFiles.join(", "):"unknown files"}`):u(b.error??"Merge failed")}catch{u("Network error — merge failed")}finally{s(!1)}};return(0,b.jsx)(m.Dialog,{open:a,onOpenChange:d,children:(0,b.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,b.jsx)(m.DialogHeader,{children:(0,b.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)(q,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,b.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,b.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,b.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),k.length>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,b.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:k.map((a,c)=>(0,b.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},c))})]}),t&&(0,b.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,b.jsx)("p",{className:"text-xs text-red-400",children:t})})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"outline",onClick:()=>d(!1),disabled:o,children:"Cancel"}),(0,b.jsx)(j.Button,{onClick:v,disabled:o,className:"gap-2",children:o?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(q,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],780414)},25177,a=>{"use strict";let b=(0,a.i(173250).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);a.s(["ArrowUpFromLine",0,b],25177)},505454,a=>{"use strict";var b=a.i(348273),c=a.i(399424),d=a.i(280844),e=a.i(759436),f=a.i(764352),g=a.i(235022),h=a.i(348754),i=a.i(755811),j=a.i(422917),k=a.i(524513),l=a.i(302512),m=a.i(282980);a.s(["CreateBranchDialog",0,function({open:a,onOpenChange:n,branches:o,currentBranch:p,localPath:q,onCreated:r,onError:s}){let{t}=(0,m.useI18n)(),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(p),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(""),[E,F]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(v(""),x(p),z(""),D(""))},[a,p]);let G=[...new Set(o)].filter(a=>a.toLowerCase().includes(C.toLowerCase())),H=async()=>{if(u.trim()){B(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:q,branch:u.trim(),baseBranch:w})});if(a.ok)n(!1),r();else{let b=await a.json();s(b.error||"Unknown error")}}catch{s("Network error")}finally{B(!1)}}};return(0,b.jsx)(i.Dialog,{open:a,onOpenChange:n,children:(0,b.jsxs)(i.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(i.DialogHeader,{children:(0,b.jsx)(i.DialogTitle,{children:t("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchName")}),(0,b.jsx)(k.Input,{value:u,onChange:a=>v(a.target.value),placeholder:t("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&H()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>F(!E),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,b.jsx)("span",{className:"font-mono text-xs text-foreground",children:w})]}),(0,b.jsx)(e.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${E?"rotate-180":""}`})]}),E&&(0,b.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(f.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:C,onChange:a=>D(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:G.map(a=>(0,b.jsxs)("button",{onClick:()=>{x(a),F(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===w?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",children:a}),a===w&&(0,b.jsx)(g.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchDesc")}),(0,b.jsx)(l.Textarea,{value:y,onChange:a=>z(a.target.value),placeholder:t("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,b.jsxs)(i.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"outline",onClick:()=>n(!1),children:t("common.cancel")}),(0,b.jsxs)(j.Button,{onClick:H,disabled:!u.trim()||A,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[A?(0,b.jsx)(h.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,t("common.create")]})]})]})})}])},219082,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},462739,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("60830852add5609d46f1fa921dc10becc42c34cf9a",b.callServer,void 0,b.findSourceMapURL,"updateProject");a.s(["updateProject",0,c])},163033,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("4085bdb12a7c36130ca4425f712f21e4c411b89a51",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,c])},773026,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40a90c7d3374bc46c6aa4f2390ae82109f7ddeddf8",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},359218,191937,286070,742023,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("601fc56bc936bf802ec7aac5fb6fdfee34c17293ff",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],359218);let d=(0,b.createServerReference)("40fea9224868c1a15421bdee8a053b20283b3bb8b8",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],191937);let e=(0,b.createServerReference)("6090c0e8a20957323ccaaa23cfdb5fb61eb3c11374",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],286070);let f=(0,a.i(173250).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,f],742023)},475127,a=>{"use strict";let b=(0,a.i(173250).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",0,b],475127)},657679,a=>{"use strict";var b=a.i(348273),c=a.i(399424),d=a.i(759436),e=a.i(222321),f=a.i(136913),g=a.i(526116),h=a.i(348754),i=a.i(742023),j=a.i(292441),k=a.i(659560),l=a.i(475127);let m=(0,a.i(173250).default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var n=a.i(422917),o=a.i(580283),p=a.i(282980);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}],657679)}];
2
2
 
3
- //# sourceMappingURL=tower_0j.-goc._.js.map
3
+ //# sourceMappingURL=tower_0agzi_m._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[148324,a=>{"use strict";let b=(0,a.i(173250).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])},916881,a=>{"use strict";var b=a.i(348273),c=a.i(399424),d=a.i(851033),e=a.i(15389),f=a.i(803330),g=a.i(709222),h=a.i(957751),i=a.i(657673),j=a.i(665488),k=a.i(173250);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(529917),o=a.i(522849);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(113514),r=a.i(55213),s=a.i(755811),t=a.i(348160),u=a.i(422917),v=a.i(524513),w=a.i(441388);let x=(0,w.createServerReference)("40fdaf8a2061f48b7c6c3bf53809ebc17208e3ff34",w.callServer,void 0,w.findSourceMapURL,"createWorkspace"),y=(0,w.createServerReference)("60fcf2f0b66e68c74b986ae9b194d8700d18b70e7c",w.callServer,void 0,w.findSourceMapURL,"updateWorkspace"),z=(0,w.createServerReference)("40e284d0affbfc5dab1ab6118453cdb85386729ec4",w.callServer,void 0,w.findSourceMapURL,"deleteWorkspace"),A=(0,w.createServerReference)("402f0ff6d94ed4ac587b83a00f736fafc08c87926e",w.callServer,void 0,w.findSourceMapURL,"getLabelsForWorkspace"),B=(0,w.createServerReference)("401ffb7a2c372d300b324d6236162f37868e4cedcf",w.callServer,void 0,w.findSourceMapURL,"createLabel"),C=(0,w.createServerReference)("40b0ecb3b3d2c63c9a40f31db86242d963dc63465e",w.callServer,void 0,w.findSourceMapURL,"deleteLabel");var D=a.i(282980),E=a.i(511153);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(706193),L=a.i(764352),M=a.i(885950);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(114982);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(538186),R=a.i(167727);a.s([],161491),a.i(161491);var S=a.i(944921),T=a.i(873946);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(867276),Z=a.i(36902),$=a.i(337990),_=a.i(269615),aa=a.i(457259),ab=a.i(490003);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(270912);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],170392);var ag=a.i(170392),ag=ag,ah=a.i(707466);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(280844);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(17787);let ap=(0,w.createServerReference)("604c021029ee9851cf8ba37f532fca192421425539",w.callServer,void 0,w.findSourceMapURL,"globalSearch");var aq=a.i(720267);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(348754),aE=a.i(235022),aF=a.i(147968),aG=a.i(132586),aH=a.i(560874),aI=a.i(302512);function aJ(a){return a.replace(/\.git\/?$/,"")}a.i(446786),a.i(814747);let aK=(0,w.createServerReference)("4027617f852a0470bfa1ef8389ba6fc84b5ce227d0",w.callServer,void 0,w.findSourceMapURL,"resolveGitLocalPath");var aL=a.i(985097);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(148324),aN=aN,aO=a.i(217250),aP=a.i(661964);let aQ=(0,w.createServerReference)("600207e0744dfe37495c218be782a0bfb30701e916",w.callServer,void 0,w.findSourceMapURL,"migrateProjectPath"),aR=(0,w.createServerReference)("40367069c92f4799ae44be7005a5311da959341d39",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(969948),aV=c,aW=a.i(385091);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(127015),aZ=a.i(496752),a$=a.i(759436);let a_=(0,aZ.default)(async()=>{},{loadableGenerated:{modules:[143824]},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(901927);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(341929);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=[148324,a=>{"use strict";let b=(0,a.i(173250).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])},916881,a=>{"use strict";var b=a.i(348273),c=a.i(399424),d=a.i(851033),e=a.i(15389),f=a.i(803330),g=a.i(709222),h=a.i(957751),i=a.i(657673),j=a.i(665488),k=a.i(173250);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(529917),o=a.i(522849);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(113514),r=a.i(55213),s=a.i(755811),t=a.i(348160),u=a.i(422917),v=a.i(524513),w=a.i(441388);let x=(0,w.createServerReference)("40664364b95b3b5a227f56340eb589c889776e78fb",w.callServer,void 0,w.findSourceMapURL,"createWorkspace"),y=(0,w.createServerReference)("6077486b91b4600a30ae403d32023b9e75730e4c05",w.callServer,void 0,w.findSourceMapURL,"updateWorkspace"),z=(0,w.createServerReference)("400b7f133e28e89b0387649c38609fae5fb871e73a",w.callServer,void 0,w.findSourceMapURL,"deleteWorkspace"),A=(0,w.createServerReference)("406cdedc87de27d3c504d53d054a8cb84a172ff400",w.callServer,void 0,w.findSourceMapURL,"getLabelsForWorkspace"),B=(0,w.createServerReference)("401503368c9decac1b3d8b14f29c6691cde06a3fef",w.callServer,void 0,w.findSourceMapURL,"createLabel"),C=(0,w.createServerReference)("4096680d6a4a8e5bfd1c701be533f9de9240c37aaf",w.callServer,void 0,w.findSourceMapURL,"deleteLabel");var D=a.i(282980),E=a.i(511153);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(706193),L=a.i(764352),M=a.i(885950);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(114982);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(538186),R=a.i(167727);a.s([],161491),a.i(161491);var S=a.i(944921),T=a.i(873946);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(867276),Z=a.i(36902),$=a.i(337990),_=a.i(269615),aa=a.i(457259),ab=a.i(490003);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(270912);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],170392);var ag=a.i(170392),ag=ag,ah=a.i(707466);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(280844);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(17787);let ap=(0,w.createServerReference)("60fbab8700474e53a0e400a32e40f79ba99dd9c527",w.callServer,void 0,w.findSourceMapURL,"globalSearch");var aq=a.i(731921);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(348754),aE=a.i(235022),aF=a.i(147968),aG=a.i(132586),aH=a.i(560874),aI=a.i(302512);function aJ(a){return a.replace(/\.git\/?$/,"")}a.i(446786),a.i(814747);let aK=(0,w.createServerReference)("40fcf870561199cd7c5d576202c9d659faf650df77",w.callServer,void 0,w.findSourceMapURL,"resolveGitLocalPath");var aL=a.i(603540);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(148324),aN=aN,aO=a.i(217250),aP=a.i(661964);let aQ=(0,w.createServerReference)("60ef5b03e946c7b42fa6df66b4bddcfc7b2dfea33e",w.callServer,void 0,w.findSourceMapURL,"migrateProjectPath"),aR=(0,w.createServerReference)("405b29fc4e26dc9ccbd23717c35edef73bb1138ced",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(969948),aV=c,aW=a.i(385091);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(26457),aZ=a.i(496752),a$=a.i(759436);let a_=(0,aZ.default)(async()=>{},{loadableGenerated:{modules:[143824]},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(901927);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(520237);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=[136913,526116,a=>{"use strict";var b=a.i(116840);a.s(["CheckCircle2",()=>b.default],136913);let c=(0,a.i(173250).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],526116)},737316,a=>{"use strict";let b=(0,a.i(173250).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],737316)},772253,a=>{"use strict";var b=a.i(379458);a.s(["ChevronRight",()=>b.default])},481030,a=>{"use strict";var b=a.i(163683),c=a.i(944921),d=a.i(340626),e=a.i(707466);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)}],481030)},325929,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("4047321a7abdfaaf09ebfaccc7c6f5575ea987fa11",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},917831,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("787e3bda2725d32a68cb2da8187fbe6638e9f9bf8a",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},269916,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40ac92863af9c83943ea9bf4a4806e9b2250ec60ab",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},587048,659560,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("601cd59cdad7f0fc9db897805c687ad392804fdebc",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],587048);let d=(0,a.i(173250).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],659560)},966761,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40e02b1de9e99ce6b035a489d0e3b46be7af5d4173",b.callServer,void 0,b.findSourceMapURL,"openInTerminal");a.s(["openInTerminal",0,c])},414836,a=>{"use strict";let b=(0,a.i(173250).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],414836)},580283,a=>{"use strict";var b=a.i(348273),c=a.i(707466);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})]})}])},292441,a=>{"use strict";let b=(0,a.i(173250).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],292441)},593677,a=>{"use strict";let b=(0,a.i(173250).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],593677)},774235,197984,322407,902459,91268,507238,802919,317640,415650,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("60bb30d6589f31b437253151964e615a89be42910e",b.callServer,void 0,b.findSourceMapURL,"listDirectory");a.s(["listDirectory",0,c],774235);let d=(0,b.createServerReference)("70cc3e540797eeafee2985fe364a7c54cc82d70586",b.callServer,void 0,b.findSourceMapURL,"getGitStatus");a.s(["getGitStatus",0,d],197984);let e=(0,b.createServerReference)("60d5d8d151a6ad74f459060274b0a192b2753e7271",b.callServer,void 0,b.findSourceMapURL,"createFile");a.s(["createFile",0,e],322407);let f=(0,b.createServerReference)("603dbcf04fcd9bcc277e8ddd27475bfab37f304a60",b.callServer,void 0,b.findSourceMapURL,"createDirectory");a.s(["createDirectory",0,f],902459);let g=(0,b.createServerReference)("7064cf2c6a4ca05458773ea702ceab1f6b2223c4ca",b.callServer,void 0,b.findSourceMapURL,"renameEntry");a.s(["renameEntry",0,g],91268);let h=(0,b.createServerReference)("60cf9cc7604ab9ef08ca2de5ec1442e9cd790250c2",b.callServer,void 0,b.findSourceMapURL,"deleteEntry");a.s(["deleteEntry",0,h],507238);let i=(0,b.createServerReference)("402f42e570414537cd8c7e6c52660f03cfadea94b4",b.callServer,void 0,b.findSourceMapURL,"listAllFiles");a.s(["listAllFiles",0,i],802919);let j=(0,b.createServerReference)("604078f3984c24c51531e4e4696adaae40285bc2b7",b.callServer,void 0,b.findSourceMapURL,"readFileContent");a.s(["readFileContent",0,j],317640);let k=(0,b.createServerReference)("70b58892e4e441e89c1c34c2f8621b728c445ad2d3",b.callServer,void 0,b.findSourceMapURL,"writeFileContent");a.s(["writeFileContent",0,k],415650)},819707,a=>{a.v(b=>Promise.all(["server/chunks/ssr/tower_src_actions_file-actions_ts_0424lna._.js"].map(b=>a.l(b))).then(()=>b(623296)))},229390,a=>{a.v(b=>Promise.all(["server/chunks/ssr/040e_@monaco-editor_react_dist_index_mjs_0z6t1fr._.js"].map(b=>a.l(b))).then(()=>b(595301)))}];
1
+ module.exports=[136913,526116,a=>{"use strict";var b=a.i(116840);a.s(["CheckCircle2",()=>b.default],136913);let c=(0,a.i(173250).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],526116)},737316,a=>{"use strict";let b=(0,a.i(173250).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],737316)},772253,a=>{"use strict";var b=a.i(379458);a.s(["ChevronRight",()=>b.default])},481030,a=>{"use strict";var b=a.i(163683),c=a.i(944921),d=a.i(340626),e=a.i(707466);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)}],481030)},611055,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40c9f4e50b0e1ed71eaaab93bfe9ce73fddd28d884",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},531084,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("7886ea6863d0931282634b87c57a3551c22c488c3b",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},713265,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("4012c0bc23424605056e6aae4956aa7718060ca459",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},877929,659560,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("60ff3af7bd9fbc86b8e4acf2805e6b108b1c083d61",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],877929);let d=(0,a.i(173250).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],659560)},353252,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("406ace73fa66f80c83acaaec980439ec83b119040f",b.callServer,void 0,b.findSourceMapURL,"openInTerminal");a.s(["openInTerminal",0,c])},414836,a=>{"use strict";let b=(0,a.i(173250).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],414836)},580283,a=>{"use strict";var b=a.i(348273),c=a.i(707466);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})]})}])},292441,a=>{"use strict";let b=(0,a.i(173250).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],292441)},593677,a=>{"use strict";let b=(0,a.i(173250).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],593677)},611866,211917,369115,1423,54891,835933,45706,131969,855259,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("60936f8147c964a9239c5bd88173345f7c53e7f8d1",b.callServer,void 0,b.findSourceMapURL,"listDirectory");a.s(["listDirectory",0,c],611866);let d=(0,b.createServerReference)("70ffd956f2f98a378b7872dd2cc012dadf27f90287",b.callServer,void 0,b.findSourceMapURL,"getGitStatus");a.s(["getGitStatus",0,d],211917);let e=(0,b.createServerReference)("6023e5214f600cf732637b3a646836ebb9638618f5",b.callServer,void 0,b.findSourceMapURL,"createFile");a.s(["createFile",0,e],369115);let f=(0,b.createServerReference)("60d7851211b9125a1fd440de7fbef4c550da2819d8",b.callServer,void 0,b.findSourceMapURL,"createDirectory");a.s(["createDirectory",0,f],1423);let g=(0,b.createServerReference)("70798e135699608a1e650843e18fa248985c13cab6",b.callServer,void 0,b.findSourceMapURL,"renameEntry");a.s(["renameEntry",0,g],54891);let h=(0,b.createServerReference)("606c1476dc3701db53f0f07134f238591a167d8004",b.callServer,void 0,b.findSourceMapURL,"deleteEntry");a.s(["deleteEntry",0,h],835933);let i=(0,b.createServerReference)("40de6f4db9aa8810e21c453c227da6761bc1576966",b.callServer,void 0,b.findSourceMapURL,"listAllFiles");a.s(["listAllFiles",0,i],45706);let j=(0,b.createServerReference)("6075acb1a0d0e6ad6f95b7b531a9ce781703f447b9",b.callServer,void 0,b.findSourceMapURL,"readFileContent");a.s(["readFileContent",0,j],131969);let k=(0,b.createServerReference)("7010dfe95f23ee445d689cb096aa5867fab2181eee",b.callServer,void 0,b.findSourceMapURL,"writeFileContent");a.s(["writeFileContent",0,k],855259)},819707,a=>{a.v(b=>Promise.all(["server/chunks/ssr/tower_src_actions_file-actions_ts_0424lna._.js"].map(b=>a.l(b))).then(()=>b(623296)))},229390,a=>{a.v(b=>Promise.all(["server/chunks/ssr/040e_@monaco-editor_react_dist_index_mjs_0z6t1fr._.js"].map(b=>a.l(b))).then(()=>b(595301)))}];
2
2
 
3
- //# sourceMappingURL=tower_0mocaf7._.js.map
3
+ //# sourceMappingURL=tower_0le1h0h._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[243998,a=>a.a(async(b,c)=>{try{a.i(245744),a.i(160223);var d=a.i(584115),e=a.i(501942);a.i(693724),a.i(772887);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),753891,a=>a.a(async(b,c)=>{try{var d=a.i(243998),e=a.i(245744),f=a.i(160223),g=a.i(584115),h=a.i(501942),i=a.i(693724),j=a.i(772887),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["001dd80fe37bbdb476d40ee3aca7ce5fff1e4affd3",()=>j.getOnboardingStatus,"00b7eae21237f9057ae05fc89743cfe4afff37e1d1",()=>h.getActualWsPort,"401ffb7a2c372d300b324d6236162f37868e4cedcf",()=>f.createLabel,"4027617f852a0470bfa1ef8389ba6fc84b5ce227d0",()=>h.resolveGitLocalPath,"402f0ff6d94ed4ac587b83a00f736fafc08c87926e",()=>f.getLabelsForWorkspace,"40367069c92f4799ae44be7005a5311da959341d39",()=>i.checkMigrationSafety,"40393a10491ecd044960ad88649e1833d52238a7be",()=>j.dispatchTaskCompletionEvent,"40527d6e10a1745c51a0a9ffd192a9e74e880400f2",()=>j.completeOnboarding,"406945679a2ed467bcf9f443c616ca406566b10e84",()=>e.createProject,"40b0ecb3b3d2c63c9a40f31db86242d963dc63465e",()=>f.deleteLabel,"40da8820ce2a36b35aa91266678f5f65bd76de41f8",()=>j.setOnboardingProgress,"40e284d0affbfc5dab1ab6118453cdb85386729ec4",()=>e.deleteWorkspace,"40fdaf8a2061f48b7c6c3bf53809ebc17208e3ff34",()=>e.createWorkspace,"600207e0744dfe37495c218be782a0bfb30701e916",()=>i.migrateProjectPath,"6044146d7f7a3c3f41623a7cd430c9db50c0933ba9",()=>h.setConfigValue,"604c021029ee9851cf8ba37f532fca192421425539",()=>g.globalSearch,"60ac76f518b7ba6b5c6d1b6c9459b4898014a85611",()=>h.getConfigValue,"60acd70db0a2f7e7e476202e7119b37e137305f019",()=>i.analyzeProjectDirectory,"60fcf2f0b66e68c74b986ae9b194d8700d18b70e7c",()=>e.updateWorkspace]),c()}catch(a){c(a)}},!1),103488,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0t25~v8._.js"].map(b=>a.l(b))).then(()=>b(870282)))},93322,a=>{a.v(a=>Promise.resolve().then(()=>a(703714)))},702832,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0wwqzmm._.js"].map(b=>a.l(b))).then(()=>b(605389)))},148134,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0n32nv5._.js"].map(b=>a.l(b))).then(()=>b(157256)))}];
1
+ module.exports=[243998,a=>a.a(async(b,c)=>{try{a.i(245744),a.i(160223);var d=a.i(584115),e=a.i(501942);a.i(693724),a.i(772887);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),753891,a=>a.a(async(b,c)=>{try{var d=a.i(243998),e=a.i(245744),f=a.i(160223),g=a.i(584115),h=a.i(501942),i=a.i(693724),j=a.i(772887),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["000aa0201d3da49985af24347794aa2a7d5414e92f",()=>j.getOnboardingStatus,"0055bd033108a2e7dff9544389a879e96e003b5c0a",()=>h.getActualWsPort,"400b7f133e28e89b0387649c38609fae5fb871e73a",()=>e.deleteWorkspace,"401503368c9decac1b3d8b14f29c6691cde06a3fef",()=>f.createLabel,"40416858563dfcda6ad71f496e52f1c8ee5c6d10bf",()=>j.dispatchTaskCompletionEvent,"4058e8e4d312485dc58d5764250264411ed6d63a89",()=>j.setOnboardingProgress,"405b29fc4e26dc9ccbd23717c35edef73bb1138ced",()=>i.checkMigrationSafety,"40664364b95b3b5a227f56340eb589c889776e78fb",()=>e.createWorkspace,"406cdedc87de27d3c504d53d054a8cb84a172ff400",()=>f.getLabelsForWorkspace,"4096680d6a4a8e5bfd1c701be533f9de9240c37aaf",()=>f.deleteLabel,"40df2ebb30174c80ce20f8ebf38fad10c969c0e97f",()=>j.completeOnboarding,"40fcf870561199cd7c5d576202c9d659faf650df77",()=>h.resolveGitLocalPath,"40ff045525e13df0ce44875c7bd1d8cc43f76b126d",()=>e.createProject,"60320d47298b010f431f90d55a8e2068ba4aec2870",()=>h.setConfigValue,"6077486b91b4600a30ae403d32023b9e75730e4c05",()=>e.updateWorkspace,"60b0796f41581e28a124adebe3c3e1fe4a0705d3ad",()=>i.analyzeProjectDirectory,"60e490cf59a00c89c16874b64fb8c23438fde0af94",()=>h.getConfigValue,"60ef5b03e946c7b42fa6df66b4bddcfc7b2dfea33e",()=>i.migrateProjectPath,"60fbab8700474e53a0e400a32e40f79ba99dd9c527",()=>g.globalSearch]),c()}catch(a){c(a)}},!1),103488,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0t25~v8._.js"].map(b=>a.l(b))).then(()=>b(870282)))},93322,a=>{a.v(a=>Promise.resolve().then(()=>a(703714)))},702832,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0wwqzmm._.js"].map(b=>a.l(b))).then(()=>b(605389)))},148134,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0n32nv5._.js"].map(b=>a.l(b))).then(()=>b(157256)))}];
2
2
 
3
3
  //# sourceMappingURL=tower_0mz4ut.._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[594316,a=>a.a(async(b,c)=>{try{a.i(245744),a.i(160223);var d=a.i(584115),e=a.i(501942);a.i(693724),a.i(772887);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),349421,a=>a.a(async(b,c)=>{try{var d=a.i(594316),e=a.i(245744),f=a.i(160223),g=a.i(584115),h=a.i(501942),i=a.i(693724),j=a.i(772887),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["001dd80fe37bbdb476d40ee3aca7ce5fff1e4affd3",()=>j.getOnboardingStatus,"00b7eae21237f9057ae05fc89743cfe4afff37e1d1",()=>h.getActualWsPort,"00eaa3c3c469422d12e3f0f967bea1fe9ae6255f0d",()=>e.getWorkspacesWithProjects,"401ffb7a2c372d300b324d6236162f37868e4cedcf",()=>f.createLabel,"4027617f852a0470bfa1ef8389ba6fc84b5ce227d0",()=>h.resolveGitLocalPath,"402a0c75a3707e6c13c818eac9ee8118fc5344d89c",()=>e.deleteProject,"402f0ff6d94ed4ac587b83a00f736fafc08c87926e",()=>f.getLabelsForWorkspace,"40367069c92f4799ae44be7005a5311da959341d39",()=>i.checkMigrationSafety,"40393a10491ecd044960ad88649e1833d52238a7be",()=>j.dispatchTaskCompletionEvent,"40429088f426ec8fafd80558d3978f09d94570103a",()=>e.getRecentLocalProjects,"404f001000d7a9fd2f8b1ad449919e9514adbbfa88",()=>e.getWorkspacesWithRecentTasks,"40527d6e10a1745c51a0a9ffd192a9e74e880400f2",()=>j.completeOnboarding,"406945679a2ed467bcf9f443c616ca406566b10e84",()=>e.createProject,"406a62bd9cd6b1a4bca82c8daed58624442f44dfa1",()=>e.getWorkspaceById,"40b0ecb3b3d2c63c9a40f31db86242d963dc63465e",()=>f.deleteLabel,"40d21bd4c25eced0d3b76b04af1ef30e966383fdb2",()=>e.getOrCreateTowerTaskId,"40da8820ce2a36b35aa91266678f5f65bd76de41f8",()=>j.setOnboardingProgress,"40e284d0affbfc5dab1ab6118453cdb85386729ec4",()=>e.deleteWorkspace,"40eff18c286d0645a87d16a5d168c93bd0d24d57e4",()=>e.getProjectByLocalPath,"40fdaf8a2061f48b7c6c3bf53809ebc17208e3ff34",()=>e.createWorkspace,"600207e0744dfe37495c218be782a0bfb30701e916",()=>i.migrateProjectPath,"6044146d7f7a3c3f41623a7cd430c9db50c0933ba9",()=>h.setConfigValue,"604c021029ee9851cf8ba37f532fca192421425539",()=>g.globalSearch,"60ac76f518b7ba6b5c6d1b6c9459b4898014a85611",()=>h.getConfigValue,"60acd70db0a2f7e7e476202e7119b37e137305f019",()=>i.analyzeProjectDirectory,"60d0eb7d2e029569ea749e944fcd325b0018454a83",()=>e.updateProject,"60fcf2f0b66e68c74b986ae9b194d8700d18b70e7c",()=>e.updateWorkspace]),c()}catch(a){c(a)}},!1),103488,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xt3-qb._.js"].map(b=>a.l(b))).then(()=>b(870282)))},93322,a=>{a.v(a=>Promise.resolve().then(()=>a(703714)))},702832,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0wwqzmm._.js"].map(b=>a.l(b))).then(()=>b(605389)))},148134,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0d5p5d.._.js"].map(b=>a.l(b))).then(()=>b(157256)))}];
1
+ module.exports=[594316,a=>a.a(async(b,c)=>{try{a.i(245744),a.i(160223);var d=a.i(584115),e=a.i(501942);a.i(693724),a.i(772887);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),349421,a=>a.a(async(b,c)=>{try{var d=a.i(594316),e=a.i(245744),f=a.i(160223),g=a.i(584115),h=a.i(501942),i=a.i(693724),j=a.i(772887),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["000aa0201d3da49985af24347794aa2a7d5414e92f",()=>j.getOnboardingStatus,"0055bd033108a2e7dff9544389a879e96e003b5c0a",()=>h.getActualWsPort,"00cfc1cbbaa0e3f800fabda86f2ef0a9e603b7fc6d",()=>e.getWorkspacesWithProjects,"400b7f133e28e89b0387649c38609fae5fb871e73a",()=>e.deleteWorkspace,"401503368c9decac1b3d8b14f29c6691cde06a3fef",()=>f.createLabel,"40275ae914558cbf323b3f33269e46948537c6e7c1",()=>e.getWorkspacesWithRecentTasks,"40416858563dfcda6ad71f496e52f1c8ee5c6d10bf",()=>j.dispatchTaskCompletionEvent,"404206c6060c3322641729ddce3abb89d38576e15c",()=>e.deleteProject,"4058e8e4d312485dc58d5764250264411ed6d63a89",()=>j.setOnboardingProgress,"405b29fc4e26dc9ccbd23717c35edef73bb1138ced",()=>i.checkMigrationSafety,"406296ed89890f32faf3f37111aa09bcdf45834027",()=>e.getProjectByLocalPath,"40664364b95b3b5a227f56340eb589c889776e78fb",()=>e.createWorkspace,"406cdedc87de27d3c504d53d054a8cb84a172ff400",()=>f.getLabelsForWorkspace,"4070f38bc997ea067370eed4b14f25482cd6fc16e8",()=>e.getOrCreateTowerTaskId,"4096680d6a4a8e5bfd1c701be533f9de9240c37aaf",()=>f.deleteLabel,"40cb88b84f1a5315c10a26e42571f44d4c42cd7e3f",()=>e.getWorkspaceById,"40d15c9bded9be00ce540df2d7b7f052445490bfd9",()=>e.getRecentLocalProjects,"40df2ebb30174c80ce20f8ebf38fad10c969c0e97f",()=>j.completeOnboarding,"40fcf870561199cd7c5d576202c9d659faf650df77",()=>h.resolveGitLocalPath,"40ff045525e13df0ce44875c7bd1d8cc43f76b126d",()=>e.createProject,"60320d47298b010f431f90d55a8e2068ba4aec2870",()=>h.setConfigValue,"6077486b91b4600a30ae403d32023b9e75730e4c05",()=>e.updateWorkspace,"60830852add5609d46f1fa921dc10becc42c34cf9a",()=>e.updateProject,"60b0796f41581e28a124adebe3c3e1fe4a0705d3ad",()=>i.analyzeProjectDirectory,"60e490cf59a00c89c16874b64fb8c23438fde0af94",()=>h.getConfigValue,"60ef5b03e946c7b42fa6df66b4bddcfc7b2dfea33e",()=>i.migrateProjectPath,"60fbab8700474e53a0e400a32e40f79ba99dd9c527",()=>g.globalSearch]),c()}catch(a){c(a)}},!1),103488,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0xt3-qb._.js"].map(b=>a.l(b))).then(()=>b(870282)))},93322,a=>{a.v(a=>Promise.resolve().then(()=>a(703714)))},702832,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0wwqzmm._.js"].map(b=>a.l(b))).then(()=>b(605389)))},148134,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0d5p5d.._.js"].map(b=>a.l(b))).then(()=>b(157256)))}];
2
2
 
3
3
  //# sourceMappingURL=tower_0pcqezm._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[917831,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("787e3bda2725d32a68cb2da8187fbe6638e9f9bf8a",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},269916,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40ac92863af9c83943ea9bf4a4806e9b2250ec60ab",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},587048,659560,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("601cd59cdad7f0fc9db897805c687ad392804fdebc",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],587048);let d=(0,a.i(173250).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],659560)},136913,526116,a=>{"use strict";var b=a.i(116840);a.s(["CheckCircle2",()=>b.default],136913);let c=(0,a.i(173250).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],526116)},737316,a=>{"use strict";let b=(0,a.i(173250).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],737316)},772253,a=>{"use strict";var b=a.i(379458);a.s(["ChevronRight",()=>b.default])},148997,a=>{"use strict";let b=(0,a.i(173250).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",0,b],148997)},727946,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"])},902517,584366,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("400a783034e60a8fdc5047ac1f66aa8da453a35730",b.callServer,void 0,b.findSourceMapURL,"createNote");a.s(["createNote",0,c],902517);let d=(0,b.createServerReference)("40cf3ee2dcd956751b44d0acc835db566d2119c2ff",b.callServer,void 0,b.findSourceMapURL,"deleteNote");a.s(["deleteNote",0,d],584366)},481030,a=>{"use strict";var b=a.i(163683),c=a.i(944921),d=a.i(340626),e=a.i(707466);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)}],481030)},325929,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("4047321a7abdfaaf09ebfaccc7c6f5575ea987fa11",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},648667,a=>{"use strict";var b=a.i(348273),c=a.i(707466);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})}])},414836,a=>{"use strict";let b=(0,a.i(173250).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],414836)},580283,a=>{"use strict";var b=a.i(348273),c=a.i(707466);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})]})}])},292441,a=>{"use strict";let b=(0,a.i(173250).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],292441)},262392,557468,a=>{"use strict";let b=(0,a.i(173250).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],262392);var c=a.i(441388);let d=(0,c.createServerReference)("40b72343350b79baf0da7d1fdf2bc004c35753fdda",c.callServer,void 0,c.findSourceMapURL,"uploadAsset");a.s(["uploadAsset",0,d],557468)},540775,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40b641eb468f39b4b3b2078ec93511d1ce34b63c8e",b.callServer,void 0,b.findSourceMapURL,"deleteAsset");a.s(["deleteAsset",0,c])}];
1
+ module.exports=[531084,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("7886ea6863d0931282634b87c57a3551c22c488c3b",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},713265,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("4012c0bc23424605056e6aae4956aa7718060ca459",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},877929,659560,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("60ff3af7bd9fbc86b8e4acf2805e6b108b1c083d61",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],877929);let d=(0,a.i(173250).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],659560)},136913,526116,a=>{"use strict";var b=a.i(116840);a.s(["CheckCircle2",()=>b.default],136913);let c=(0,a.i(173250).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],526116)},737316,a=>{"use strict";let b=(0,a.i(173250).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],737316)},772253,a=>{"use strict";var b=a.i(379458);a.s(["ChevronRight",()=>b.default])},148997,a=>{"use strict";let b=(0,a.i(173250).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",0,b],148997)},727946,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"])},956698,334394,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40d86375834c7666d6e6d3259411a40a2f112bc6d4",b.callServer,void 0,b.findSourceMapURL,"createNote");a.s(["createNote",0,c],956698);let d=(0,b.createServerReference)("405378479c4faca2e5653db95730369b873a071957",b.callServer,void 0,b.findSourceMapURL,"deleteNote");a.s(["deleteNote",0,d],334394)},481030,a=>{"use strict";var b=a.i(163683),c=a.i(944921),d=a.i(340626),e=a.i(707466);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)}],481030)},611055,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("40c9f4e50b0e1ed71eaaab93bfe9ce73fddd28d884",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},648667,a=>{"use strict";var b=a.i(348273),c=a.i(707466);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})}])},414836,a=>{"use strict";let b=(0,a.i(173250).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],414836)},580283,a=>{"use strict";var b=a.i(348273),c=a.i(707466);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})]})}])},292441,a=>{"use strict";let b=(0,a.i(173250).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],292441)},262392,54803,a=>{"use strict";let b=(0,a.i(173250).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],262392);var c=a.i(441388);let d=(0,c.createServerReference)("4059653d273e86f9a50303a80e5daa5c8410fa3597",c.callServer,void 0,c.findSourceMapURL,"uploadAsset");a.s(["uploadAsset",0,d],54803)},388265,a=>{"use strict";var b=a.i(441388);let c=(0,b.createServerReference)("4070586ed2e5cef09b54cdc9f4135aafb2110317f8",b.callServer,void 0,b.findSourceMapURL,"deleteAsset");a.s(["deleteAsset",0,c])}];
2
2
 
3
- //# sourceMappingURL=tower_0txw7ny._.js.map
3
+ //# sourceMappingURL=tower_0rdk81e._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[832704,a=>a.a(async(b,c)=>{try{a.i(245744),a.i(160223);var d=a.i(584115),e=a.i(501942);a.i(693724),a.i(772887);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),651080,a=>a.a(async(b,c)=>{try{var d=a.i(832704),e=a.i(245744),f=a.i(160223),g=a.i(584115),h=a.i(501942),i=a.i(693724),j=a.i(772887),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["001dd80fe37bbdb476d40ee3aca7ce5fff1e4affd3",()=>j.getOnboardingStatus,"00b7eae21237f9057ae05fc89743cfe4afff37e1d1",()=>h.getActualWsPort,"401ffb7a2c372d300b324d6236162f37868e4cedcf",()=>f.createLabel,"4027617f852a0470bfa1ef8389ba6fc84b5ce227d0",()=>h.resolveGitLocalPath,"402f0ff6d94ed4ac587b83a00f736fafc08c87926e",()=>f.getLabelsForWorkspace,"40367069c92f4799ae44be7005a5311da959341d39",()=>i.checkMigrationSafety,"40393a10491ecd044960ad88649e1833d52238a7be",()=>j.dispatchTaskCompletionEvent,"40527d6e10a1745c51a0a9ffd192a9e74e880400f2",()=>j.completeOnboarding,"406945679a2ed467bcf9f443c616ca406566b10e84",()=>e.createProject,"40b0ecb3b3d2c63c9a40f31db86242d963dc63465e",()=>f.deleteLabel,"40da8820ce2a36b35aa91266678f5f65bd76de41f8",()=>j.setOnboardingProgress,"40e284d0affbfc5dab1ab6118453cdb85386729ec4",()=>e.deleteWorkspace,"40fdaf8a2061f48b7c6c3bf53809ebc17208e3ff34",()=>e.createWorkspace,"600207e0744dfe37495c218be782a0bfb30701e916",()=>i.migrateProjectPath,"6044146d7f7a3c3f41623a7cd430c9db50c0933ba9",()=>h.setConfigValue,"604c021029ee9851cf8ba37f532fca192421425539",()=>g.globalSearch,"60ac76f518b7ba6b5c6d1b6c9459b4898014a85611",()=>h.getConfigValue,"60acd70db0a2f7e7e476202e7119b37e137305f019",()=>i.analyzeProjectDirectory,"60fcf2f0b66e68c74b986ae9b194d8700d18b70e7c",()=>e.updateWorkspace]),c()}catch(a){c(a)}},!1),103488,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0_0kxz4._.js"].map(b=>a.l(b))).then(()=>b(870282)))},93322,a=>{a.v(a=>Promise.resolve().then(()=>a(703714)))},702832,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0wwqzmm._.js"].map(b=>a.l(b))).then(()=>b(605389)))},148134,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0adx8p4._.js"].map(b=>a.l(b))).then(()=>b(157256)))}];
1
+ module.exports=[832704,a=>a.a(async(b,c)=>{try{a.i(245744),a.i(160223);var d=a.i(584115),e=a.i(501942);a.i(693724),a.i(772887);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),651080,a=>a.a(async(b,c)=>{try{var d=a.i(832704),e=a.i(245744),f=a.i(160223),g=a.i(584115),h=a.i(501942),i=a.i(693724),j=a.i(772887),k=b([d,g,h]);[d,g,h]=k.then?(await k)():k,a.s(["000aa0201d3da49985af24347794aa2a7d5414e92f",()=>j.getOnboardingStatus,"0055bd033108a2e7dff9544389a879e96e003b5c0a",()=>h.getActualWsPort,"400b7f133e28e89b0387649c38609fae5fb871e73a",()=>e.deleteWorkspace,"401503368c9decac1b3d8b14f29c6691cde06a3fef",()=>f.createLabel,"40416858563dfcda6ad71f496e52f1c8ee5c6d10bf",()=>j.dispatchTaskCompletionEvent,"4058e8e4d312485dc58d5764250264411ed6d63a89",()=>j.setOnboardingProgress,"405b29fc4e26dc9ccbd23717c35edef73bb1138ced",()=>i.checkMigrationSafety,"40664364b95b3b5a227f56340eb589c889776e78fb",()=>e.createWorkspace,"406cdedc87de27d3c504d53d054a8cb84a172ff400",()=>f.getLabelsForWorkspace,"4096680d6a4a8e5bfd1c701be533f9de9240c37aaf",()=>f.deleteLabel,"40df2ebb30174c80ce20f8ebf38fad10c969c0e97f",()=>j.completeOnboarding,"40fcf870561199cd7c5d576202c9d659faf650df77",()=>h.resolveGitLocalPath,"40ff045525e13df0ce44875c7bd1d8cc43f76b126d",()=>e.createProject,"60320d47298b010f431f90d55a8e2068ba4aec2870",()=>h.setConfigValue,"6077486b91b4600a30ae403d32023b9e75730e4c05",()=>e.updateWorkspace,"60b0796f41581e28a124adebe3c3e1fe4a0705d3ad",()=>i.analyzeProjectDirectory,"60e490cf59a00c89c16874b64fb8c23438fde0af94",()=>h.getConfigValue,"60ef5b03e946c7b42fa6df66b4bddcfc7b2dfea33e",()=>i.migrateProjectPath,"60fbab8700474e53a0e400a32e40f79ba99dd9c527",()=>g.globalSearch]),c()}catch(a){c(a)}},!1),103488,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0_0kxz4._.js"].map(b=>a.l(b))).then(()=>b(870282)))},93322,a=>{a.v(a=>Promise.resolve().then(()=>a(703714)))},702832,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0wwqzmm._.js"].map(b=>a.l(b))).then(()=>b(605389)))},148134,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0adx8p4._.js"].map(b=>a.l(b))).then(()=>b(157256)))}];
2
2
 
3
3
  //# sourceMappingURL=tower_0wvk~r.._.js.map