tower-studio 0.2.42 → 0.2.43
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.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +27 -27
- package/.next/standalone/.next/server/app/_not-found/page.js +6 -6
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js +3 -3
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +3 -3
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +3 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js +8 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +4 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +6 -5
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +4 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +3 -3
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +64 -64
- package/.next/standalone/.next/server/app/missions/page.js +6 -6
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +27 -27
- package/.next/standalone/.next/server/app/onboarding/page.js +6 -6
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +27 -27
- package/.next/standalone/.next/server/app/page.js +6 -6
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +44 -44
- package/.next/standalone/.next/server/app/settings/page.js +6 -6
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +109 -109
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +88 -88
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +75 -75
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +75 -75
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +27 -27
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +7 -7
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +67 -67
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +79 -79
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +50 -50
- package/.next/standalone/.next/server/app/workspaces/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_03qwlhl.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_09pca3o.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0h5yr8p.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0m8aavq.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0yp430z.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0yzw48x.js +1 -1
- package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_terminal_[taskId]_paste-image_route_actions_0iegbi4.js +3 -0
- package/.next/standalone/.next/server/chunks/[externals]__0x_wqa7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-z_a1d._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.p6em~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.zmhk-._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0042hx5._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0b3m.jm._.js → [root-of-the-server]__03ufxqq._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04--bs7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04m2l8a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04r193~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05abzth._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0657y50._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__075a0hk._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08yqoti._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__098.3z2._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0obk~80._.js → [root-of-the-server]__0_d.s7s._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0askhfg._.js → [root-of-the-server]__0ajay8_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b25v3p._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xswbi9._.js → [root-of-the-server]__0clptds._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ai09na._.js → [root-of-the-server]__0g.k9o~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gn0ubd._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gwztza._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0h6bl6t._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iggiij._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0i~3dwq._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j1px8f._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0k-5ag7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0-~q463._.js → [root-of-the-server]__0lvlooo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0otyifi._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q~uf3u._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t31ba_._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_weyi._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__06qz5fz._.js → [root-of-the-server]__0uptkzd._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wkjqrd._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0x3kws1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xot7fu._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~6py0f._.js → [root-of-the-server]__0y8w5di._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~g6-c~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10fv6tt._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1189rd1._.js +4 -0
- package/.next/standalone/.next/server/chunks/{_06.mxka._.js → _0jmdgq~._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{_0aflzks._.js → _0q10iet._.js} +1 -1
- package/.next/standalone/.next/server/chunks/_0qk_esg._.js +2 -2
- package/.next/standalone/.next/server/chunks/_0t31z6q._.js +1 -1
- package/.next/standalone/.next/server/chunks/{_0b~hjvi._.js → _12537g8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/src_0fq3zjg._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0wlyw0g._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_0~ey84y._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0se9_next_11h0sx_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00dh103._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mmypbn._.js → [root-of-the-server]__00ebsjb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0c2mh1c._.js → [root-of-the-server]__01vm_46._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__025ol9g._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__094t44p._.js → [root-of-the-server]__04ednzb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__065f3ii._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pmjob9._.js → [root-of-the-server]__06dfcgo._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__038u_kv._.js → [root-of-the-server]__07xkj1s._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08k-xb7._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08tzbfh._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.infp2._.js → [root-of-the-server]__0_z5hke._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ce3fpq._.js → [root-of-the-server]__0ecd_1d._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10s67lq._.js → [root-of-the-server]__0iln7n_._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09z_ddd._.js → [root-of-the-server]__0j_-qk5._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.u-t.1._.js → [root-of-the-server]__0k6oo0n._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0h589~0._.js → [root-of-the-server]__0lws68d._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oq-j16._.js → [root-of-the-server]__0oamph.._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pvaj~l._.js → [root-of-the-server]__0pnv7nd._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0whlq2_._.js → [root-of-the-server]__0stlq2_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__03fujv7._.js → [root-of-the-server]__0tja~wz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0391jsv._.js → [root-of-the-server]__0ug022w._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0l6bt9t._.js → [root-of-the-server]__0x6k.ee._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dsaqeq._.js → [root-of-the-server]__0xr45lx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__058rbx5._.js → [root-of-the-server]__0xwzk2.._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12w35bx._.js → [root-of-the-server]__0yby8pl._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0rckee~._.js → [root-of-the-server]__0zxc81t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dux7x.._.js → [root-of-the-server]__0zzqn5z._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mq0f94._.js → [root-of-the-server]__10c.a3u._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.2h0ux._.js → [root-of-the-server]__10n3vn6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09t~p.u._.js → [root-of-the-server]__123rmyb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__124zb~p._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02j1enz._.js → [root-of-the-server]__127w3bm._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0h-se8t._.js → [root-of-the-server]__12ko8p6._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0odeai5._.js → [root-of-the-server]__13ce7v2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0f~l8kv._.js → _00l85fp._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0c2gong._.js → _00odlgv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0whlnt7._.js → _0463zy~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0rq68d8._.js → _047dh-f._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_03lt1_x._.js → _05a2u03._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0_5abui._.js → _05k76ur._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0n4bq0m._.js → _060e1u.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0n5do.z._.js → _07lq-bp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0p6p_68._.js → _07q06~v._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0mm~wxj._.js → _08-x_rp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_08bq4g8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_12ca88g._.js → _0_q41~z._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0o2tntr._.js → _0b7smy6._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0u7c6bz._.js → _0dxbp89._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0axcfvf._.js → _0gkid_a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0tvm5af._.js → _0j5.ig_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0py1s-f._.js → _0nze-e6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0u.n7v8._.js → _0oeih09._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0~oc5bl._.js → _0rrs.-d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0q2mf9q._.js → _0rtydyv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rxeqmo._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_04bt0.3._.js → _0s.h4l2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_09z2zmm._.js → _0s.ik0k._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_116-_2z._.js → _0syb503._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0m.wslt._.js → _0uryq~z._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_04~zqvy._.js → _0wqcz3w._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0rrzd20._.js → _113957g._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0_9avpk._.js → src_lib_0.~.oo-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_02~3_5t._.js → src_lib_005uqbe._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_04d~c.c._.js → src_lib_00wjv6n._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_08wv1le._.js → src_lib_01sr8_t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_08jql1e._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0b~j-9d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0eymyjf._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fkv9z3._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0n-n0.a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0sgt~lv._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0x-iyl1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0yjmty1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_13aevv6._.js +3 -0
- package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +246 -246
- package/.next/standalone/.next/static/chunks/{17fug-zaik-v~.js → 0-vgfstmpuwnx.js} +1 -1
- package/.next/standalone/.next/static/chunks/0.lyp-cx3zt9..js +2 -0
- package/.next/standalone/.next/static/chunks/{0clewc5ifaruu.js → 00z.kuqsfrxq5.js} +2 -2
- package/.next/standalone/.next/static/chunks/01j9m895w64zn.js +1 -0
- package/.next/standalone/.next/static/chunks/01rbl6a8z.tuw.js +1 -0
- package/.next/standalone/.next/static/chunks/{0.wxa05y455w7.js → 04op7bjge~n4l.js} +1 -1
- package/.next/standalone/.next/static/chunks/{13.3woq55msp..js → 05v-c3ir3ik_1.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0bdwzhoelky9-.js → 070fs6rmafi.i.js} +1 -1
- package/.next/standalone/.next/static/chunks/07i9j5yyg4vs3.js +1 -0
- package/.next/standalone/.next/static/chunks/{040j8d.w8mkyn.js → 08i9.47-_mxro.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ypd9eqm_pj-o.js → 0_yp-y9l0upp~.js} +1 -1
- package/.next/standalone/.next/static/chunks/0ddt-snh45031.js +1 -0
- package/.next/standalone/.next/static/chunks/0evfu1ozaw5ak.js +1 -0
- package/.next/standalone/.next/static/chunks/{0wcwdbtpm0~r6.js → 0gq65t6au55oa.js} +1 -1
- package/.next/standalone/.next/static/chunks/0gz71w_~yw2iu.js +1 -0
- package/.next/standalone/.next/static/chunks/{0dewfthzwmcwb.js → 0hk3lmsij2x1c.js} +1 -1
- package/.next/standalone/.next/static/chunks/0j1hqwmeaqnn2.js +1 -0
- package/.next/standalone/.next/static/chunks/{0_d04kox03m72.css → 0jrje~1gt6w85.css} +1 -1
- package/.next/standalone/.next/static/chunks/0prrt_bws8ml6.js +1 -0
- package/.next/standalone/.next/static/chunks/0qgqjy.9.-qpi.js +1 -0
- package/.next/standalone/.next/static/chunks/{0m~m1~si.ot17.js → 0rfq8fy71hj7c.js} +1 -1
- package/.next/standalone/.next/static/chunks/{02f8-ju2se8qw.js → 0rjt_ddd~6t8r.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0.onaugl2w8ci.js → 0rnitheqdpd1..js} +1 -1
- package/.next/standalone/.next/static/chunks/{035a_v6g7ioyw.js → 0sr-m2t6vck14.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0rozlwh3y46l0.js → 0ts___1ygewqp.js} +1 -1
- package/.next/standalone/.next/static/chunks/0vmy6tsqy.xf4.js +1 -0
- package/.next/standalone/.next/static/chunks/0wbq-_8jyxjxm.js +1 -0
- package/.next/standalone/.next/static/chunks/0xejm4ge9~cn..js +1 -0
- package/.next/standalone/.next/static/chunks/0~prx0ure_1i6.js +1 -0
- package/.next/standalone/.next/static/chunks/1107zshxaajt9.js +1 -0
- package/.next/standalone/.next/static/chunks/{17m4o~gdsvuo3.js → 11p.r-9wyh7_2.js} +1 -1
- package/.next/standalone/.next/static/chunks/11x3_612u8w~9.js +1 -0
- package/.next/standalone/.next/static/chunks/14mk_a0k99wbg.js +1 -0
- package/.next/standalone/package.json +9 -9
- package/dist/mcp-server.cjs +131 -74
- package/next.config.ts +4 -0
- package/package.json +9 -9
- package/skills/tower/SKILL.md +6 -0
- package/.next/standalone/.next/server/chunks/[externals]__0izylsq._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.tbb~k._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__032d9pl._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04jduyo._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05zlbau._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05~g1fm._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__075f7rs._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08b~~wj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bo_6v~._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c7z.~a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e~6fr~._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fey.8j._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fxmnch._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gr~8aq._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hd.0to._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j3l3l4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r-6wmj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rpck4h._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0skk0fd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_yyy8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0v2nkck._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z20rmt._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11l3gud._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__126b53k._.js +0 -4
- package/.next/standalone/.next/server/chunks/src_02ruq-1._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_07gek7k._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_0mqkaid._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__045k323._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__087pocz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gt5dbj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-_7_._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y~ooou._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0a60u40._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fu5szn._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0gve57o._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0koe0p0._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qdh-v4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ramp4w._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0sn1z-s._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0x6grav._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_110am8v._.js +0 -3
- package/.next/standalone/.next/static/chunks/0-efd~h5j2ufi.js +0 -1
- package/.next/standalone/.next/static/chunks/0.z171pzeg-.7.js +0 -1
- package/.next/standalone/.next/static/chunks/01zlxs4rl~h_o.js +0 -1
- package/.next/standalone/.next/static/chunks/0af7afat3acfx.js +0 -1
- package/.next/standalone/.next/static/chunks/0ais32-8.3wlj.js +0 -1
- package/.next/standalone/.next/static/chunks/0f43x~jzb70f4.js +0 -1
- package/.next/standalone/.next/static/chunks/0i-x__600fys6.js +0 -1
- package/.next/standalone/.next/static/chunks/0l25d0nc5ygyd.js +0 -1
- package/.next/standalone/.next/static/chunks/0lyq0-a32.15m.js +0 -1
- package/.next/standalone/.next/static/chunks/0t8lz62rmr801.js +0 -2
- package/.next/standalone/.next/static/chunks/0utrquxfg25b2.js +0 -1
- package/.next/standalone/.next/static/chunks/0wcdxs4sl-gjf.js +0 -1
- package/.next/standalone/.next/static/chunks/0x-ug4iz~~qr2.js +0 -1
- package/.next/standalone/.next/static/chunks/0xj6v_80hlyv0.js +0 -1
- package/.next/standalone/.next/static/chunks/0xl7h5fsfc7zk.js +0 -1
- package/.next/standalone/.next/static/chunks/115ae91fq~slq.js +0 -1
- package/.next/standalone/.next/static/chunks/13rq33eiffqaz.js +0 -1
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → d-Uhp63kgWdPkhPt7Fzyb}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → d-Uhp63kgWdPkhPt7Fzyb}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → d-Uhp63kgWdPkhPt7Fzyb}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},526222,551400,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("407f0085f8acfd1b53e6497cd1b6d8814b13c0592b",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],526222);let r=(0,t.createServerReference)("4042fc6771795cc29868d1736395aa5d23d6f56e4d",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],551400)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function n(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let l={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:n="",title:l}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${n}`,title:l??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,n],35967)},725111,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("403f6cd2a42a894f3241220ce550e1ccf61caebfb3",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},703902,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40b49003c304d7c031ba99ba38371cc3f541870712",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,a])},619634,314025,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40ce5129103fa4d584b6dcb3d93136330b4d143faf",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,a],619634);let r=(0,t.createServerReference)("40c636879063e8ff639203ab0e8dd999bca548b79d",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,r],314025)},456346,649164,313788,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var a=e.i(514798);let r=(0,a.createServerReference)("408c83cbcbc9c40b5dcf41089714371331b154751d",a.callServer,void 0,a.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,r],649164);let s=(0,a.createServerReference)("401ceca59f75a4449d2dc9b5f2e9cc00b6a37343f1",a.callServer,void 0,a.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],313788)},744798,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(776639),s=e.i(519455),n=e.i(793479),l=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(967489),x=e.i(337822),m=e.i(317056),h=e.i(533499),p=e.i(649164),g=e.i(313788),f=e.i(514798);let b=(0,f.createServerReference)("4096ba9c1176448ed1cde55662d3a6e7867c38f2d3",f.callServer,void 0,f.findSourceMapURL,"getCurrentBranch");var v=e.i(725111);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:f,onSubmit:y,onUpdate:j,defaultStatus:k="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:C,labels:S,projectType:I,projectLocalPath:D,versions:T,defaultVersionId:P}){let E,[M,L]=(0,a.useState)(""),[R,O]=(0,a.useState)(""),[$,B]=(0,a.useState)("MEDIUM"),[A,F]=(0,a.useState)(""),[U,_]=(0,a.useState)([]),[z,H]=(0,a.useState)([]),[V,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)(""),[X,J]=(0,a.useState)(!1),[K,q]=(0,a.useState)(!0),[Q,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(null),{t:ea}=(0,h.useI18n)();(0,a.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let a=e["task.defaultUseWorktree"],r=e["task.defaultAutoStart"];"boolean"==typeof a&&q(a),"boolean"==typeof r&&Z(r)}).catch(()=>{}),()=>{t=!0}},[e,w]);let er=!!w,es=!!D;return(0,a.useEffect)(()=>{w?(L(w.title),O(w.description??""),B(w.priority),F(w.subPath??""),_(N??[]),et(w.versionId??null)):(C?(L(C.title??""),O(C.description??""),B(C.priority??"MEDIUM"),F(C.subPath??""),_(C.labelIds??[])):(L(""),O(""),B("MEDIUM"),F(""),_([])),et(P??null))},[w,N,C,P]),(0,a.useEffect)(()=>{e||w||(L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),J(!1),et(P??null))},[e,w,P]),(0,a.useEffect)(()=>{e&&es&&!w&&(G(!0),Promise.all([(0,p.getProjectBranches)(D),b(D)]).then(([e,t])=>{H(e);let a=C?.baseBranch??null;a&&e.includes(a)?Y(a):Y(t&&e.includes(t)?t:e[0]??""),G(!1),(0,g.fetchRemoteBranches)(D).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(D).then(e=>{H(e),Y(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{H([]),Y(""),G(!1)}))},[e,es,D,w,C]),(0,t.jsx)(r.Dialog,{open:e,onOpenChange:f,disablePointerDismissal:!0,children:(0,t.jsxs)(r.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(r.DialogHeader,{children:(0,t.jsx)(r.DialogTitle,{children:er?ea("task.edit"):ea("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:ea("task.title")}),(0,t.jsx)(n.Input,{id:"title","data-testid":"task-title",placeholder:ea("task.titlePlaceholder"),value:M,onChange:e=>L(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:ea("task.description")}),(0,t.jsx)(l.Textarea,{id:"description",placeholder:ea("task.descPlaceholder"),rows:4,value:R,onChange:e=>O(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:ea("task.subPath")}),(0,t.jsx)(n.Input,{id:"subPath",placeholder:ea("task.subPathPlaceholder"),value:A,onChange:e=>F(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:ea("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let a={LOW:{label:ea("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ea("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ea("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ea("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>B(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${$===e?`${a.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:a.label},e)})})]}),es&&!er&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.baseBranch")}),V?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchLoading")}):z.length>0?(0,t.jsxs)(x.Popover,{open:X,onOpenChange:J,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||ea("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:ea("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:ea("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:z.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{Y(e),J(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>q(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.worktreeYes"):ea("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.autoStartYes"):ea("task.autoStartNo")},String(e)))})]})]}),S.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:S.map(e=>{let a=U.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{_(t=>a?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${a?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:a?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!er||T&&T.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("version.picker.label")}),T&&T.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(E=T.find(e=>e.id===ee))?E.isCurrent?`${E.number} \xb7 ${E.name} \xb7 ${ea("version.currentShort")}`:`${E.number} \xb7 ${E.name}`:ea("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:ea("version.picker.none")}),T.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${ea("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ea("version.picker.empty")})]})]}),(0,t.jsxs)(r.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>f(!1),children:ea("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{M.trim()&&(er&&j?j(w.id,{title:M,description:R,priority:$,labelIds:U,subPath:A.trim()||"",versionId:ee}):y({title:M,description:R,priority:$,status:k,labelIds:U,...es&&K&&W?{baseBranch:W}:{},...A.trim()?{subPath:A.trim()}:{},versionId:ee,autoStart:Q}),L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),q(!0),et(null),f(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:er?ea("common.save"):ea("common.create")})]})]})})}],744798)},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var a=e.i(309735),r=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:n,onOpenChange:l}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(r.Dialog,{open:n,onOpenChange:l,children:(0,t.jsxs)(r.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(a.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},235357,144640,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(585012),s=e.i(657153),n=e.i(19671),l=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:a,title:r,disabled:s,...n}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||a()},title:r,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...n,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:p,currentIndex:g,onIndexChange:f}){let{t:b}=(0,d.useI18n)(),[v,y]=(0,a.useState)(1),[j,k]=(0,a.useState)({x:0,y:0}),[w,N]=(0,a.useState)(!1),C=(0,a.useRef)(null),[S,I]=(0,a.useState)(!1),D=!!p&&p.length>1&&"number"==typeof g&&!!f,T=D&&g>0,P=D&&g<p.length-1,E=D?p.length:0,M=E>0?Math.ceil(E/10):0,L=D?Math.floor(g/10):0,R=10*L,O=Math.min(R+10,E),$=M>1,B=D&&L>0,A=D&&L<M-1;(0,a.useEffect)(()=>{I(!0)},[]),(0,a.useEffect)(()=>{y(1),k({x:0,y:0})},[e]),(0,a.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let F=(0,a.useCallback)(()=>h(!1),[h]),U=(0,a.useCallback)(()=>{D&&T&&f(g-1)},[D,T,f,g]),_=(0,a.useCallback)(()=>{D&&P&&f(g+1)},[D,P,f,g]),z=(0,a.useCallback)(()=>{D&&B&&f((L-1)*10)},[D,B,f,L]),H=(0,a.useCallback)(()=>{D&&A&&f(Math.min((L+1)*10,E-1))},[D,A,f,L,E]),V=(0,a.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),G=(0,a.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&k({x:0,y:0}),t})},[]),W=(0,a.useCallback)(()=>{y(1),k({x:0,y:0})},[]);(0,a.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),F();break;case"ArrowLeft":D&&(e.preventDefault(),U());break;case"ArrowRight":D&&(e.preventDefault(),_());break;case"+":case"=":e.preventDefault(),V();break;case"-":case"_":e.preventDefault(),G();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,D,F,U,_,V,G,W]);let Y=(0,a.useRef)(!1),X=()=>{w&&N(!1),C.current=null},J=w?"cursor-grabbing":"cursor-grab";if(!m||!S)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":b("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,D?` \xb7 ${g+1} / ${p.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${J}`,onClick:e=>{e.target===e.currentTarget&&F()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let a=Math.min(8,Math.max(.1,e*t));return a<=1&&k({x:0,y:0}),a})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),Y.current&&(Y.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),Y.current=!1,e.target.setPointerCapture?.(e.pointerId),C.current={x:e.clientX,y:e.clientY,panX:j.x,panY:j.y},N(!0))},onPointerMove:e=>{if(!C.current)return;let t=e.clientX-C.current.x,a=e.clientY-C.current.y;Math.abs(t)+Math.abs(a)>5&&(Y.current=!0),w&&k({x:C.current.panX+t,y:C.current.panY+a})},onPointerUp:X,onPointerLeave:X,onPointerCancel:X,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${j.x}px, ${j.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[D&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[$&&(0,t.jsx)(u,{onClick:z,title:`${b("assets.lightbox.prev")} (-10)`,"aria-label":`${b("assets.lightbox.prev")} (-10)`,disabled:!B,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:U,title:b("assets.lightbox.prev"),"aria-label":b("assets.lightbox.prev"),disabled:!T,children:(0,t.jsx)(n.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(R,O).map((e,a)=>{let r=R+a,s=r===g;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||f(r)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+r)})}),(0,t.jsx)(u,{onClick:_,title:b("assets.lightbox.next"),"aria-label":b("assets.lightbox.next"),disabled:!P,children:(0,t.jsx)(l.ChevronRight,{className:"h-4 w-4"})}),$&&(0,t.jsx)(u,{onClick:H,title:`${b("assets.lightbox.next")} (+10)`,"aria-label":`${b("assets.lightbox.next")} (+10)`,disabled:!A,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:b("assets.lightbox.reset"),"aria-label":b("assets.lightbox.reset"),disabled:1===v&&0===j.x&&0===j.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:F,title:b("assets.lightbox.close"),"aria-label":b("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,r.createPortal)(K,document.body)}],235357);var x=e.i(400355);e.i(254826);var m=e.i(309735),h=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:r,open:s,onOpenChange:n}){let{t:l}=(0,d.useI18n)(),[i,o]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),[p,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!s||!e){o(null),g(null);return}let t=!1;return u(!0),g(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?g(l("assets.fileTooLarge")):g(l("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,l]);let f=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(h.Dialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(h.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l("assets.loadingPreview")})]});if(p)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===i)return null;if("md"===f)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(m.Streamdown,{children:i})});if("json"===f){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,a){if(a?.startsWith("image/"))return!0;let r=e.split(".").pop()?.toLowerCase();return!!r&&t.has(r)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)},980376,663888,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),n=e.i(670123);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:c="right",showCloseButton:d=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":c,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,d&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let c=(0,o.createServerReference)("40c2020160cb48a1275725165ff2ce45a84d7457b6",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,c],663888)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),n=e.i(487486),l=e.i(519455),i=e.i(533499),o=e.i(703902),c=e.i(663888),d=e.i(949461),u=e.i(619634),x=e.i(314025),m=e.i(526222),h=e.i(551400),p=e.i(551254),g=e.i(744798),f=e.i(997025),b=e.i(235357),v=e.i(144640),y=e.i(937304),j=e.i(685149),k=e.i(606393),w=e.i(875840),N=e.i(245697),C=e.i(12659),S=e.i(736061),I=e.i(460707),D=e.i(567860),T=e.i(645378),P=e.i(867533),E=e.i(297338),M=e.i(453889);function L({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var R=e.i(35967),O=e.i(360112);let $=/\.(txt|md|json)$/i;function B({text:e}){let{t:r}=(0,i.useI18n)(),[s,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)(!1),c=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let e=c.current;e&&o(e.scrollHeight>e.clientHeight+1)},[]),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{ref:c,className:`text-sm text-foreground whitespace-pre-wrap ${s?"":"line-clamp-5"}`,children:e}),l&&(0,t.jsx)("button",{type:"button",onClick:()=>n(e=>!e),className:"mt-1 text-xs font-medium text-sky-600 hover:underline dark:text-sky-400",children:r(s?"taskDrawer.collapseDescription":"taskDrawer.expandDescription")})]})}e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:A,taskId:F,hideEnvActions:U=!1}){let{t:_}=(0,i.useI18n)(),[z,H]=(0,a.useState)(null),[V,G]=(0,a.useTransition)(),[W,Y]=(0,a.useState)(!1),[X,J]=(0,a.useState)([]),[K,q]=(0,a.useState)([]),[Q,Z]=(0,a.useState)(null),[ee,et]=(0,a.useState)([]),[ea,er]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!F||!e){H(null),q([]),et([]);return}(0,u.getTaskNotes)(F).then(e=>q(e.map(e=>({id:e.id,title:e.title,content:e.content,category:e.category})))).catch(()=>q([])),(0,x.getTaskAssets)(F).then(e=>et(e.map(e=>({id:e.id,filename:e.filename,path:e.path,mimeType:e.mimeType,size:e.size})))).catch(()=>et([])),G(async()=>{let e=await (0,c.getTaskOverview)(F);e&&(H(e),e.project?.workspaceId&&(0,d.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{J(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>J([])))})},[F,e]);let es=z?j.BOARD_COLUMNS.find(e=>e.id===z.status):null,en=z?j.PRIORITY_CONFIG[z.priority]:null,el=z?.executions?.[0]??null,ei=(()=>{if(el?.worktreePath)return el.worktreePath;let e=z?.project?.localPath;return e?z?.subPath?`${e}/${z.subPath}`:e:null})(),eo=(()=>{let e=el?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),ec=e=>(0,y.isImageAsset)(e.filename,e.mimeType)||$.test(e.filename),ed=e=>{ec(e)?er(e):O.toast.info(_("assets.previewNotSupported"))},eu=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));O.toast.error(e.error||_("git.openInFileManagerFailed"))}}catch{O.toast.error(_("git.openInFileManagerFailed"))}},ex=ea?(0,y.isImageAsset)(ea.filename,ea.mimeType)?"image":$.test(ea.filename)?"text":null:null,em=ee.filter(e=>(0,y.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,y.localPathToApiUrl)(e.path),filename:e.filename})),eh=ea?em.findIndex(e=>e.id===ea.id):-1,ep=async e=>{if(z?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:z.project.id}),O.toast.success(_("taskDrawer.duplicateSuccess")),Y(!1),A(!1)}catch{O.toast.error(_("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:A,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:z?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:_("taskDrawer.title")}),z&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[es&&(0,t.jsxs)(n.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${es.color}`}),es.label]}),en&&(0,t.jsx)(n.Badge,{variant:"secondary",className:`text-xs ${en.color}`,children:en.label}),z.version&&(0,t.jsx)(R.TaskVersionTag,{number:z.version.number,name:z.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:V&&!z?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:_("assets.loading")}):z?(0,t.jsxs)("div",{className:"p-4 pb-8 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:_("taskDrawer.description")}),z.description?(0,t.jsx)(B,{text:z.description},z.id):(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:_("taskDrawer.noDescription")})]}),z.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:_("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:z.labels.map(e=>(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(k.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:_("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(z.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(N.Package,{className:"h-3.5 w-3.5"}),_("taskDrawer.resources"),(0,t.jsx)("span",{className:"text-foreground",children:z._count.assets})]}),ee.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:ee.map(e=>{var a;let r=ec(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5",children:[(0,t.jsx)(E.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>ed(e),disabled:!r,className:`min-w-0 flex-1 truncate text-left text-sm ${r?"cursor-pointer hover:underline":"cursor-default"}`,title:r?_("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(a=e.size)?a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[r&&(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>ed(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:_("assets.preview"),children:(0,t.jsx)(P.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>eu(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:_("assets.revealInFinder"),children:(0,t.jsx)(M.FolderOpen,{className:"h-3 w-3"})})]})]},e.id)})}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noResources")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(T.FileText,{className:"h-3.5 w-3.5"}),_("taskDrawer.notes")]}),K.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:K.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>Z(e),className:"group/note flex w-full items-start gap-2 rounded-md border border-border p-2 text-left transition-colors hover:bg-accent/40",title:_("taskDrawer.previewNote"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 whitespace-pre-wrap text-xs text-muted-foreground",children:e.content})]}),(0,t.jsx)(P.Eye,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/note:opacity-100"})]},e.id))}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noNotes")})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:_("taskDrawer.fileChanges")}),eo?(0,t.jsx)(L,{added:eo.added,removed:eo.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(C.PlayCircle,{className:"h-3.5 w-3.5"}),_("taskDrawer.lastExecution")]}),el?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:el.status}),el.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:el.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noExecution")})]}),ei&&!U&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInFileManager)(ei)}catch(e){console.error("openInFileManager failed:",e),O.toast.error(_("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(S.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInFileManager")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,h.openInEditor)(ei)}catch(e){console.error("openInEditor failed:",e),O.toast.error(_("git.openInEditorFailed"))}},children:[(0,t.jsx)(I.Code,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInEditor")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,p.openInTerminal)(ei)}catch(e){console.error("openInTerminal failed:",e),O.toast.error(_("git.openInTerminalFailed"))}},children:[(0,t.jsx)(D.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(l.Button,{variant:"default",className:"w-full",onClick:()=>{z&&Y(!0)},disabled:!z,children:[(0,t.jsx)(w.Copy,{className:"h-4 w-4"}),_("taskDrawer.duplicate")]})})]}):null})]}),z?.project&&(0,t.jsx)(g.CreateTaskDialog,{open:W,onOpenChange:Y,onSubmit:ep,labels:X,projectType:z.project.type,projectLocalPath:z.project.localPath,prefillFromTask:{title:z.title,description:z.description,priority:z.priority,subPath:z.subPath,labelIds:z.labels.map(e=>e.label.id),baseBranch:z.baseBranch}}),(0,t.jsx)(f.NotePreviewDialog,{note:Q,open:null!==Q,onOpenChange:e=>{e||Z(null)}}),(0,t.jsx)(b.ImageLightbox,{imageUrl:"image"===ex&&eh>=0?em[eh].url:null,filename:"image"===ex&&eh>=0?em[eh].filename:"",open:"image"===ex,onOpenChange:e=>{e||er(null)},assets:em.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:eh>=0?eh:void 0,onIndexChange:e=>{let t=em[e];if(!t)return;let a=ee.find(e=>e.id===t.id);a&&er(a)}}),(0,t.jsx)(v.TextPreviewDialog,{url:"text"===ex&&ea?(0,y.localPathToApiUrl)(ea.path):null,filename:ea?.filename??"",open:"text"===ex,onOpenChange:e=>{e||er(null)}})]})}],605005)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69466,e=>{"use strict";e.s([],386333),e.i(386333),e.i(264730),e.i(85871),e.i(402879),e.i(514844),e.i(146946),e.i(926208),e.i(217664),e.i(605643),e.i(604003),e.i(853469);var i=e.i(514798);let r=(0,i.createServerReference)("60d46008cd52240a6df7117c5609c42298fe472e7d",i.callServer,void 0,i.findSourceMapURL,"revealInFinder");e.s(["revealInFinder",0,r],69466)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,967489,338973,e=>{"use strict";var t=e.i(289721);e.s([],648333),e.i(648333);var r=e.i(965652),n=e.i(416369),l=e.i(362891),o=e.i(903224),i=e.i(528796),s=e.i(314757),a=e.i(804849),u=e.i(887642),c=e.i(20746),d=e.i(812901),p=e.i(956741),f=e.i(430557),m=e.i(594640),g=e.i(592604),h=e.i(306296),v=e.i(234951),S=e.i(471959);e.i(708878);var b=e.i(462902);let x=r.createContext(null),y=r.createContext(null);function w(){let e=r.useContext(x);if(null===e)throw Error((0,b.default)(60));return e}function E(){let e=r.useContext(y);if(null===e)throw Error((0,b.default)(61));return e}var R=e.i(890514),M=e.i(103353),I=e.i(193214),A=e.i(596290);let C=(e,t)=>Object.is(e,t);function T(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}function P(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&T(e,t,r)):-1}function j(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function V(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function L(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?j(e.value):j(e)}function k(e,t,r){function n(){if(r&&null!=e)return r(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return j(e)}if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??n();if(Array.isArray(t)){let r=V(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:n()}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return n()}let O={id:(0,A.createSelector)(e=>e.id),labelId:(0,A.createSelector)(e=>e.labelId),modal:(0,A.createSelector)(e=>e.modal),multiple:(0,A.createSelector)(e=>e.multiple),items:(0,A.createSelector)(e=>e.items),itemToStringLabel:(0,A.createSelector)(e=>e.itemToStringLabel),itemToStringValue:(0,A.createSelector)(e=>e.itemToStringValue),isItemEqualToValue:(0,A.createSelector)(e=>e.isItemEqualToValue),value:(0,A.createSelector)(e=>e.value),hasSelectedValue:(0,A.createSelector)(e=>{let{value:t,multiple:r,itemToStringValue:n}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==L(t,n))}),hasNullItemLabel:(0,A.createSelector)((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(V(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:(0,A.createSelector)(e=>e.open),mounted:(0,A.createSelector)(e=>e.mounted),forceMount:(0,A.createSelector)(e=>e.forceMount),transitionStatus:(0,A.createSelector)(e=>e.transitionStatus),openMethod:(0,A.createSelector)(e=>e.openMethod),activeIndex:(0,A.createSelector)(e=>e.activeIndex),selectedIndex:(0,A.createSelector)(e=>e.selectedIndex),isActive:(0,A.createSelector)((e,t)=>e.activeIndex===t),isSelected:(0,A.createSelector)((e,t,r)=>{let n=e.isItemEqualToValue,l=e.value;return e.multiple?Array.isArray(l)&&l.some(e=>T(r,e,n)):e.selectedIndex===t&&null!==e.selectedIndex||T(r,l,n)}),isSelectedByFocus:(0,A.createSelector)((e,t)=>e.selectedIndex===t),popupProps:(0,A.createSelector)(e=>e.popupProps),triggerProps:(0,A.createSelector)(e=>e.triggerProps),triggerElement:(0,A.createSelector)(e=>e.triggerElement),positionerElement:(0,A.createSelector)(e=>e.positionerElement),listElement:(0,A.createSelector)(e=>e.listElement),scrollUpArrowVisible:(0,A.createSelector)(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:(0,A.createSelector)(e=>e.scrollDownArrowVisible),hasScrollArrows:(0,A.createSelector)(e=>e.hasScrollArrows)};var D=e.i(67077),U=e.i(586622),N=e.i(504068),H=e.i(571870),F=e.i(421689),B=e.i(954588),z=e.i(353052),_=e.i(892069),Y=e.i(565455),$=e.i(581263),q=e.i(551974),W=e.i(397791);let K=r.forwardRef(function(e,t){let{render:r,className:n,...l}=e;delete l.id;let o=(0,R.useFieldRootContext)(),{store:i}=w(),s=(0,d.useStore)(i,O.triggerElement),a=(0,d.useStore)(i,O.id),u=null==a?void 0:`${a}-label`,c=(0,W.useLabel)({id:u,fallbackControlId:s?.id??a,setLabelId(e){i.set("labelId",e)}});return(0,$.useRenderElement)("div",e,{ref:t,state:o.state,props:[c,l],stateAttributesMapping:q.fieldValidityMapping})});var X=e.i(102094),G=e.i(161476),J=e.i(179279),Q=e.i(845756),Z=e.i(748299),ee=e.i(682354),et=e.i(282109);let er={...Q.pressableTriggerOpenStateMapping,...q.fieldValidityMapping,value:()=>null},en=r.forwardRef(function(e,t){let{render:n,className:o,id:i,disabled:s=!1,nativeButton:a=!0,...p}=e,{setTouched:f,setFocused:m,validationMode:g,state:h,disabled:v}=(0,R.useFieldRootContext)(),{labelId:S}=(0,J.useLabelableContext)(),{store:b,setOpen:x,selectionRef:y,validation:E,readOnly:I,required:A,alignItemWithTriggerActiveRef:C,disabled:T,keyboardActiveRef:P}=w(),j=v||T||s,V=(0,d.useStore)(b,O.open),L=(0,d.useStore)(b,O.value),k=(0,d.useStore)(b,O.triggerProps),N=(0,d.useStore)(b,O.positionerElement),H=(0,d.useStore)(b,O.listElement),F=(0,d.useStore)(b,O.id),B=(0,d.useStore)(b,O.labelId),z=(0,d.useStore)(b,O.hasSelectedValue),_=!z&&V,q=(0,d.useStore)(b,O.hasNullItemLabel,_),W=i??F;(0,M.useLabelableId)({id:W});let K=(0,c.useValueAsRef)(N),Q=r.useRef(null),{getButtonProps:en,buttonRef:el}=(0,et.useButton)({disabled:j,native:a}),eo=(0,u.useStableCallback)(e=>{b.set("triggerElement",e)}),ei=(0,l.useMergedRefs)(t,Q,el,eo),es=(0,G.useTimeout)(),ea=(0,G.useTimeout)(),eu=(0,G.useTimeout)(),ec=(0,G.useTimeout)();r.useEffect(()=>{if(V)return z||q?ec.start(200,()=>{y.current.allowUnselectedMouseUp=!0,eu.start(200,()=>{y.current.allowSelectedMouseUp=!0})}):eu.start(400,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{eu.clear(),ec.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ea.clear()},[V,z,q,y,ea,eu,ec]);let ed=r.useMemo(()=>H?.id??(0,ee.getFloatingFocusElement)(N)?.id,[H,N]),ep=(0,Y.mergeProps)(k,{id:W,role:"combobox","aria-expanded":V?"true":"false","aria-haspopup":"listbox","aria-controls":V?ed:void 0,"aria-labelledby":S??B,"aria-readonly":I||void 0,"aria-required":A||void 0,tabIndex:j?-1:0,ref:ei,onFocus(e){m(!0),V&&C.current&&x(!1,(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent)),es.start(0,()=>{b.set("forceMount",!0)})},onBlur(e){(0,ee.contains)(N,e.relatedTarget)||(f(!0),m(!1),"onBlur"===g&&E.commit(L))},onPointerMove(){P.current=!1},onKeyDown(){P.current=!0},onMouseDown(e){if(V)return;let t=(0,X.ownerDocument)(e.currentTarget);function r(e){if(!Q.current)return;let t=e.target;if((0,ee.contains)(Q.current,t)||(0,ee.contains)(K.current,t)||t===Q.current)return;let r=(0,Z.getPseudoElementBounds)(Q.current);e.clientX>=r.left-2&&e.clientX<=r.right+2&&e.clientY>=r.top-2&&e.clientY<=r.bottom+2||x(!1,(0,D.createChangeEventDetails)(U.REASONS.cancelOpen,e))}ea.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},E.getValidationProps,p,en);ep.role="combobox";let ef={...h,open:V,disabled:j,value:L,readOnly:I,placeholder:!z};return(0,$.useRenderElement)("button",e,{ref:[t,Q],state:ef,stateAttributesMapping:er,props:ep})}),el={value:()=>null},eo=r.forwardRef(function(e,n){let{className:l,render:o,children:i,placeholder:s,...a}=e,{store:u,valueRef:c}=w(),p=(0,d.useStore)(u,O.value),f=(0,d.useStore)(u,O.items),m=(0,d.useStore)(u,O.itemToStringLabel),g=(0,d.useStore)(u,O.hasSelectedValue),h=(0,d.useStore)(u,O.hasNullItemLabel,!g&&null!=s&&null==i),v=null;if("function"==typeof i)v=i(p);else if(null!=i)v=i;else if(g||null==s||h)if(Array.isArray(p))v=p.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,t.jsx)(r.Fragment,{children:k(n,f,m)},l)),e),[]);else v=k(p,f,m);else v=s;return(0,$.useRenderElement)("span",e,{state:{value:p,placeholder:!g},ref:[n,c],props:[{children:v},a],stateAttributesMapping:el})}),ei=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open);return(0,$.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:Q.triggerOpenStateMapping})});var es=e.i(888393);let ea=r.createContext(void 0),eu=r.forwardRef(function(e,r){let{store:n}=w(),l=(0,d.useStore)(n,O.mounted),o=(0,d.useStore)(n,O.forceMount);return l||o?(0,t.jsx)(ea.Provider,{value:!0,children:(0,t.jsx)(es.FloatingPortal,{ref:r,...e})}):null});var ec=e.i(809058);let ed={...Q.popupStateMapping,...ec.transitionStatusMapping},ep=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open),s=(0,d.useStore)(o,O.mounted),a=(0,d.useStore)(o,O.transitionStatus);return(0,$.useRenderElement)("div",e,{state:{open:i,transitionStatus:a},ref:t,props:[{role:"presentation",hidden:!s,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:ed})});var ef=e.i(831766),em=e.i(620163),eg=e.i(579028),eh=e.i(887943);let ev=r.createContext(void 0);function eS(){let e=r.useContext(ev);if(!e)throw Error((0,b.default)(59));return e}var eb=e.i(72287),ex=e.i(693354),ey=e.i(808754);function ew(e,t){e&&Object.assign(e.style,t)}let eE={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},eR={position:"fixed"},eM=r.forwardRef(function(e,n){let{anchor:l,positionMethod:o="absolute",className:i,render:s,side:c="bottom",align:p="center",sideOffset:f=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:h,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:b,alignItemWithTrigger:x=!0,collisionAvoidance:y=ex.DROPDOWN_COLLISION_AVOIDANCE,...R}=e,{store:M,listRef:I,labelsRef:A,alignItemWithTriggerActiveRef:C,selectedItemTextRef:j,valuesRef:V,initialValueRef:L,popupRef:k,setValue:N}=w(),H=E(),F=(0,d.useStore)(M,O.open),B=(0,d.useStore)(M,O.mounted),z=(0,d.useStore)(M,O.modal),_=(0,d.useStore)(M,O.value),Y=(0,d.useStore)(M,O.openMethod),q=(0,d.useStore)(M,O.positionerElement),W=(0,d.useStore)(M,O.triggerElement),K=(0,d.useStore)(M,O.isItemEqualToValue),X=(0,d.useStore)(M,O.transitionStatus),G=r.useRef(null),J=r.useRef(null),[Z,ee]=r.useState(x),et=B&&Z&&"touch"!==Y;B||Z===x||ee(x),(0,a.useIsoLayoutEffect)(()=>{!B&&(O.scrollUpArrowVisible(M.state)&&M.set("scrollUpArrowVisible",!1),O.scrollDownArrowVisible(M.state)&&M.set("scrollDownArrowVisible",!1))},[M,B]),r.useImperativeHandle(C,()=>et),(0,em.useScrollLock)((et||z)&&F&&"touch"!==Y,W);let er=(0,eh.useAnchorPositioning)({anchor:l,floatingRootContext:H,positionMethod:o,mounted:B,side:c,sideOffset:f,align:p,alignOffset:m,arrowPadding:v,collisionBoundary:g,collisionPadding:h,sticky:S,disableAnchorTracking:b??et,collisionAvoidance:y,keepMounted:!0}),en=et?"none":er.side,el=et?eR:er.positionerStyles,eo=r.useMemo(()=>{let e={};return F||(e.pointerEvents="none"),{role:"presentation",hidden:!B,style:{...el,...e}}},[F,B,el]),ei={open:F,side:en,align:er.align,anchorHidden:er.anchorHidden},es=(0,u.useStableCallback)(e=>{M.set("positionerElement",e)}),ea=(0,$.useRenderElement)("div",e,{ref:[n,es],state:ei,stateAttributesMapping:Q.popupStateMapping,props:[eo,(0,ey.getDisabledMountTransitionStyles)(X),R]}),eu=r.useRef(0),ec=(0,u.useStableCallback)(e=>{if(0===e.size&&0===eu.current||0===V.current.length)return;let t=eu.current;if(eu.current=e.size,e.size===t)return;let r=(0,D.createChangeEventDetails)(U.REASONS.none);if(0!==t&&!M.state.multiple&&null!==_&&-1===P(V.current,_,K)){let e=L.current,t=null!=e&&-1!==P(V.current,e,K)?e:null;N(t,r),null===t&&(M.set("selectedIndex",null),j.current=null)}if(0!==t&&M.state.multiple&&Array.isArray(_)){let e=_.filter(e=>-1!==P(V.current,e,K));(e.length!==_.length||e.some(e=>!(_&&0!==_.length&&_.some(t=>void 0!==t&&T(e,t,K)))))&&(N(e,r),0===e.length&&(M.set("selectedIndex",null),j.current=null))}if(F&&et){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};ew(q,e),ew(k.current,e)}}),ed=r.useMemo(()=>({...er,side:en,alignItemWithTriggerActive:et,setControlledAlignItemWithTrigger:ee,scrollUpArrowRef:G,scrollDownArrowRef:J}),[er,en,et,ee]);return(0,t.jsx)(eg.CompositeList,{elementsRef:I,labelsRef:A,onMapChange:ec,children:(0,t.jsxs)(ev.Provider,{value:ed,children:[B&&z&&(0,t.jsx)(eb.InternalBackdrop,{inert:(0,ef.inertValue)(!F),cutout:W}),ea]})})});var eI=e.i(585012),eA=e.i(641645),eC=e.i(442383),eT=e.i(285182);function eP(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var ej=e.i(946467),eV=e.i(11931),eL=e.i(278928),ek=e.i(685668),eO=e.i(196368),eD=e.i(197920),eU=e.i(867467),eN=e.i(743945);let eH={...Q.popupStateMapping,...ec.transitionStatusMapping},eF=r.forwardRef(function(e,n){let{render:l,className:o,finalFocus:i,...s}=e,{store:c,popupRef:p,onOpenChangeComplete:f,setOpen:m,valueRef:g,selectedItemTextRef:h,keyboardActiveRef:v,multiple:S,handleScrollArrowVisibility:b,scrollHandlerRef:x,highlightItemOnHover:y}=w(),{side:R,align:M,alignItemWithTriggerActive:I,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:C,scrollUpArrowRef:T}=eS(),P=null!=(0,eO.useToolbarRootContext)(!0),j=E(),{nonce:V,disableStyleElements:L}=(0,eN.useCSPContext)(),k=(0,G.useTimeout)(),H=(0,d.useStore)(c,O.id),F=(0,d.useStore)(c,O.open),B=(0,d.useStore)(c,O.mounted),z=(0,d.useStore)(c,O.popupProps),_=(0,d.useStore)(c,O.transitionStatus),Y=(0,d.useStore)(c,O.triggerElement),q=(0,d.useStore)(c,O.positionerElement),W=(0,d.useStore)(c,O.listElement),K=r.useRef(0),J=r.useRef(!1),Q=r.useRef(0),Z=r.useRef(!1),ee=r.useRef({}),et=(0,ej.useAnimationFrame)(),er=(0,u.useStableCallback)(e=>{if(!q||!p.current||!Z.current)return;if(J.current||!I)return void b();let t="0px"===q.style.top,r="0px"===q.style.bottom,n=q.getBoundingClientRect().height,l=(0,X.ownerDocument)(q),o=getComputedStyle(q),i=parseFloat(o.marginTop),s=parseFloat(o.marginBottom),a=eB(getComputedStyle(p.current)),u=Math.min(l.documentElement.clientHeight-i-s,a),c=e.scrollTop,d=ez(e),f=0,m=null,g=!1,h=!1,v=e=>{q.style.height=`${e}px`},S=(t,r)=>{let l=(0,eU.clamp)(t,0,u-n);l>0&&v(n+l),e.scrollTop=r,u-(n+l)<=1&&(J.current=!0),b()};if(t){let e=d-c,t=Math.min(n+e,u);if(f=t,e<=1)return void S(e,d);u-t>1?h=!0:g=!0}else if(r){let e=n+c,t=Math.min(e,u);if(f=t,c<=1)return void S(c,0);u-t>1?m=0:(g=!0,c<d&&(m=c-(c-(e-u))))}if(0!==(f=Math.ceil(f))&&v(f),h||null!=m){let t=ez(e),r=h?t:(0,eU.clamp)(m,0,t);Math.abs(e.scrollTop-r)>1&&(e.scrollTop=r)}(g||f>=u-1)&&(J.current=!0),b()});r.useImperativeHandle(x,()=>er,[er]),(0,N.useOpenChangeComplete)({open:F,ref:p,onComplete(){F&&f?.(!0)}}),(0,a.useIsoLayoutEffect)(()=>{q&&p.current&&!Object.keys(ee.current).length&&(ee.current={top:q.style.top||"0",left:q.style.left||"0",right:q.style.right,height:q.style.height,bottom:q.style.bottom,minHeight:q.style.minHeight,maxHeight:q.style.maxHeight,marginTop:q.style.marginTop,marginBottom:q.style.marginBottom})},[p,q]),(0,a.useIsoLayoutEffect)(()=>{F||I||(Z.current=!1,J.current=!1,K.current=0,Q.current=0,ew(q,ee.current))},[F,I,q,p]),(0,a.useIsoLayoutEffect)(()=>{let e=p.current;if(F&&Y&&q&&e&&"ending"!==c.state.transitionStatus){if(!I){Z.current=!0,et.request(b),e.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{let t=function(e){let{style:t}=e,r={};for(let[e,n]of eY)r[e]=t.getPropertyValue(e),t.setProperty(e,n,"important");return()=>{for(let[e]of eY){let n=r[e];n?t.setProperty(e,n):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{var r;let t,n=getComputedStyle(q),l=getComputedStyle(e),o=(0,X.ownerDocument)(Y),i=(0,eT.ownerWindow)(q),s=(r=Y,eL.platform.getScale(r)),a=e_(Y.getBoundingClientRect(),s),u=e_(q.getBoundingClientRect(),s),c=a.left,d=a.height,p=W||e,f=p.scrollHeight,m=parseFloat(l.borderBottomWidth),v=parseFloat(n.marginTop)||10,S=parseFloat(n.marginBottom)||10,x=parseFloat(n.minHeight)||100,y=eB(l),w=o.documentElement.clientHeight-v-S,E=o.documentElement.clientWidth,R=w-a.bottom+d,M=h.current,I=g.current,C=0,T=0;if(M&&I){let e=e_(I.getBoundingClientRect(),s);t=e_(M.getBoundingClientRect(),s);let r=e.left-c,n=t.left-u.left,l=e.top-a.top+e.height/2,o=t.top-u.top+t.height/2;C=r-n,T=o-l}let P=R+T+S+m,j=Math.min(w,P),V=w-v-S,L=P-j,k=Math.max(5,c+C),O=Math.max(0,k+u.width-(E-5));q.style.left=`${k-O}px`,q.style.height=`${j}px`,q.style.maxHeight="auto",q.style.marginTop=`${v}px`,q.style.marginBottom=`${S}px`,e.style.height="100%";let D=ez(p),U=L>=D-1;U&&(j=Math.min(w,u.height)-(L-D));let N=a.top<20||a.bottom>w-20||Math.ceil(j)+1<Math.min(f,x),H=(i.visualViewport?.scale??1)!==1&&eC.isWebKit;if(N||H){Z.current=!0,ew(q,ee.current),eI.flushSync(()=>A(!1));return}if(U){let e=Math.max(0,w-P);q.style.top=u.height>=V?"0":`${e}px`,q.style.height=`${j}px`,p.scrollTop=ez(p),K.current=Math.max(x,j)}else q.style.bottom="0",K.current=Math.max(x,j),p.scrollTop=L;if(t){let r=u.top,n=u.height,l=t.top+t.height/2,o=(0,eU.clamp)(n>0?(l-r)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(K.current===w||j>=y)&&(J.current=!0),b(),setTimeout(()=>{Z.current=!0})}finally{t()}})}},[c,F,q,Y,g,h,p,b,I,A,et,C,T,W]),r.useEffect(()=>{if(!I||!q||!F)return;let e=(0,eT.ownerWindow)(q);function t(e){m(!1,(0,D.createChangeEventDetails)(U.REASONS.windowResize,e))}return e.addEventListener("resize",t),()=>{e.removeEventListener("resize",t)}},[m,I,q,F]);let en={...W?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${H}-list`},onKeyDown(e){v.current=!0,P&&eD.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onMouseMove(){v.current=!1},onPointerLeave(e){if(!y||eP(e)||"touch"===e.pointerType)return;let t=e.currentTarget;k.start(0,()=>{c.set("activeIndex",null),t.focus({preventScroll:!0})})},onScroll(e){W||er(e.currentTarget)},...I&&{style:W?{height:"100%"}:eE}},el=(0,$.useRenderElement)("div",e,{ref:[n,p],state:{open:F,transitionStatus:_,side:R,align:M},stateAttributesMapping:eH,props:[z,en,(0,ey.getDisabledMountTransitionStyles)(_),{className:!W&&I?ek.styleDisableScrollbar.className:void 0},s]});return(0,t.jsxs)(r.Fragment,{children:[!L&&ek.styleDisableScrollbar.getElement(V),(0,t.jsx)(eV.FloatingFocusManager,{context:j,modal:!1,disabled:!B,returnFocus:i,restoreFocus:!0,children:el})]})});function eB(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function ez(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function e_(e,t){return(0,eA.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let eY=[["transform","none"],["scale","1"],["translate","0 0"]],e$=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o,scrollHandlerRef:i}=w(),{alignItemWithTriggerActive:s}=eS(),a=(0,d.useStore)(o,O.hasScrollArrows),c=(0,d.useStore)(o,O.openMethod),p=(0,d.useStore)(o,O.multiple),f=(0,d.useStore)(o,O.id),m={id:`${f}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(e){i.current?.(e.currentTarget)},...s&&{style:eE},className:a&&"touch"!==c?ek.styleDisableScrollbar.className:void 0},g=(0,u.useStableCallback)(e=>{o.set("listElement",e)});return(0,$.useRenderElement)("div",e,{ref:[t,g],props:[m,l]})});var eq=e.i(655728);let eW=r.createContext(void 0);function eK(){let e=r.useContext(eW);if(!e)throw Error((0,b.default)(57));return e}let eX=r.memo(r.forwardRef(function(e,n){let{render:l,className:o,value:i=null,label:s,disabled:u=!1,nativeButton:p=!1,...f}=e,m=r.useRef(null),g=(0,eq.useCompositeListItem)({label:s,textRef:m,indexGuessBehavior:eq.IndexGuessBehavior.GuessFromOrder}),{store:h,getItemProps:v,setOpen:S,setValue:b,selectionRef:x,typingRef:y,valuesRef:E,keyboardActiveRef:R,multiple:M,highlightItemOnHover:I}=w(),A=(0,G.useTimeout)(),C=(0,d.useStore)(h,O.isActive,g.index),P=(0,d.useStore)(h,O.isSelected,g.index,i),j=(0,d.useStore)(h,O.isSelectedByFocus,g.index),V=(0,d.useStore)(h,O.isItemEqualToValue),L=g.index,k=-1!==L,N=r.useRef(null),H=(0,c.useValueAsRef)(L);(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=E.current;return e[L]=i,()=>{delete e[L]}},[k,L,i,E]),(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=h.state.value,t=e;M&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),void 0!==t&&T(i,t,V)&&h.set("selectedIndex",L)},[k,L,M,V,h,i]);let F=v({active:C,selected:P});F.onFocus=void 0,F.id=void 0;let B=r.useRef(null),z=r.useRef("mouse"),_=r.useRef(!1),{getButtonProps:Y,buttonRef:q}=(0,et.useButton)({disabled:u,focusableWhenDisabled:!0,native:p,composite:!0}),W=(0,$.useRenderElement)("div",e,{ref:[q,n,g.ref,N],state:{disabled:u,selected:P,highlighted:C},props:[F,{role:"option","aria-selected":P,tabIndex:C?0:-1,onFocus(){h.set("activeIndex",L)},onMouseEnter(){!R.current&&null===h.state.selectedIndex&&I&&h.set("activeIndex",L)},onMouseMove(){I&&h.set("activeIndex",L)},onMouseLeave(e){!I||R.current||eP(e)||A.start(0,()=>{h.state.activeIndex===L&&h.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){B.current=e.key,h.set("activeIndex",L)," "===e.key&&y.current&&e.preventDefault()},onClick(e){_.current=!1,"keydown"===e.type&&null===B.current||u||"keydown"===e.type&&" "===B.current&&y.current||"touch"!==z.current&&!C||(B.current=null,function(e){let t=h.state.value;if(M){let r=Array.isArray(t)?t:[];b(P?r.filter(e=>!T(i,e,V)):[...r,i],(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}else b(i,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e)),S(!1,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}(e.nativeEvent))},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,_.current=!0},onMouseUp(){if(u)return;if(_.current){_.current=!1;return}let e=!x.current.allowSelectedMouseUp&&P,t=!x.current.allowUnselectedMouseUp&&!P;e||t||"touch"!==z.current&&!C||N.current?.click()}},f,Y]}),K=r.useMemo(()=>({selected:P,indexRef:H,textRef:m,selectedByFocus:j,hasRegistered:k}),[P,H,m,j,k]);return(0,t.jsx)(eW.Provider,{value:K,children:W})})),eG=r.forwardRef(function(e,r){let n=e.keepMounted??!1,{selected:l}=eK();return n||l?(0,t.jsx)(eJ,{...e,ref:r}):null}),eJ=r.memo(r.forwardRef((e,t)=>{let{render:n,className:l,keepMounted:o,...i}=e,{selected:s}=eK(),a=r.useRef(null),{transitionStatus:u,setMounted:c}=(0,I.useTransitionStatus)(s),d=(0,$.useRenderElement)("span",e,{ref:[t,a],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:ec.transitionStatusMapping});return(0,N.useOpenChangeComplete)({open:s,ref:a,onComplete(){s||c(!1)}}),d})),eQ=r.memo(r.forwardRef(function(e,t){let{indexRef:n,textRef:l,selectedByFocus:o,hasRegistered:i}=eK(),{selectedItemTextRef:s}=w(),{className:a,render:u,...c}=e,d=r.useCallback(e=>{if(!e||!i)return;let t=null===s.current||!s.current.isConnected;(o||t&&0===n.current)&&(s.current=e)},[s,n,o,i]);return(0,$.useRenderElement)("div",e,{ref:[d,t,l],props:c})})),eZ={...Q.popupStateMapping,...ec.transitionStatusMapping},e0=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),{side:i,align:s,arrowRef:a,arrowStyles:u,arrowUncentered:c,alignItemWithTriggerActive:p}=eS(),f=(0,d.useStore)(o,O.open,!0),m=(0,$.useRenderElement)("div",e,{state:{open:f,side:i,align:s,uncentered:c},ref:[a,t],props:[{style:u,"aria-hidden":!0},l],stateAttributesMapping:eZ});return p?null:m}),e1=r.forwardRef(function(e,t){let{render:r,className:n,direction:l,keepMounted:o=!1,...i}=e,{store:s,popupRef:u,listRef:c,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:f}=w(),{side:m,scrollDownArrowRef:g,scrollUpArrowRef:h}=eS(),v="up"===l?O.scrollUpArrowVisible:O.scrollDownArrowVisible,S=(0,d.useStore)(s,v),b=(0,d.useStore)(s,O.openMethod),x=S&&"touch"!==b,y=(0,G.useTimeout)(),E="up"===l?h:g,{transitionStatus:R,setMounted:M}=(0,I.useTransitionStatus)(x);(0,a.useIsoLayoutEffect)(()=>(f.current+=1,s.state.hasScrollArrows||s.set("hasScrollArrows",!0),()=>{f.current=Math.max(0,f.current-1),0===f.current&&s.state.hasScrollArrows&&s.set("hasScrollArrows",!1)}),[s,f]),(0,N.useOpenChangeComplete)({open:x,ref:E,onComplete(){x||M(!1)}});let A=(0,$.useRenderElement)("div",e,{ref:[t,E],state:{direction:l,visible:x,side:m,transitionStatus:R},props:[{"aria-hidden":!0,children:"up"===l?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||y.isStarted()||(s.set("activeIndex",null),y.start(40,function e(){let t=s.state.listElement??u.current;if(!t)return;s.set("activeIndex",null),p();let r=0===t.scrollTop,n=Math.round(t.scrollTop+t.clientHeight)>=t.scrollHeight;if(0===c.current.length&&("up"===l?s.set("scrollUpArrowVisible",!r):s.set("scrollDownArrowVisible",!n)),"up"===l&&r||"down"===l&&n)return void y.clear();if((s.state.listElement||u.current)&&c.current&&c.current.length>0){let e=c.current,r=E.current?.offsetHeight||0;if("up"===l){let n=0,l=t.scrollTop+r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop>=l){n=t;break}}let o=Math.max(0,n-1);if(o<n){let n=e[o];n&&(t.scrollTop=Math.max(0,n.offsetTop-r))}else t.scrollTop=0}else{let n=e.length-1,l=t.scrollTop+t.clientHeight-r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>l){n=Math.max(0,t-1);break}}let o=Math.min(e.length-1,n+1);if(o>n){let n=e[o];n&&(t.scrollTop=n.offsetTop+n.offsetHeight-t.clientHeight+r)}else t.scrollTop=t.scrollHeight-t.clientHeight}}y.start(40,e)}))},onMouseLeave(){y.clear()}},i]});return x||o?A:null}),e2=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"down"})}),e5=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"up"})}),e8=r.createContext(void 0),e9=r.forwardRef(function(e,n){let{className:l,render:o,...i}=e,[s,a]=r.useState(),u=r.useMemo(()=>({labelId:s,setLabelId:a}),[s,a]),c=(0,$.useRenderElement)("div",e,{ref:n,props:[{role:"group","aria-labelledby":s},i]});return(0,t.jsx)(e8.Provider,{value:u,children:c})});var e6=e.i(207516);let e4=r.forwardRef(function(e,t){let{className:n,render:l,id:o,...i}=e,{setLabelId:s}=function(){let e=r.useContext(e8);if(void 0===e)throw Error((0,b.default)(56));return e}(),u=(0,e6.useBaseUiId)(o);return(0,a.useIsoLayoutEffect)(()=>{s(u)},[u,s]),(0,$.useRenderElement)("div",e,{ref:t,props:[{id:u},i]})});var e3=e.i(983640);e.s(["Arrow",0,e0,"Backdrop",0,ep,"Group",0,e9,"GroupLabel",0,e4,"Icon",0,ei,"Item",0,eX,"ItemIndicator",0,eG,"ItemText",0,eQ,"Label",0,K,"List",0,e$,"Popup",0,eF,"Portal",0,eu,"Positioner",0,eM,"Root",0,function(e){let{id:b,value:w,defaultValue:E=null,onValueChange:A,open:T,defaultOpen:j=!1,onOpenChange:V,name:k,autoComplete:$,disabled:q=!1,readOnly:W=!1,required:K=!1,modal:X=!0,actionsRef:G,inputRef:J,onOpenChangeComplete:Q,items:Z,multiple:ee=!1,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en=C,highlightItemOnHover:el=!0,children:eo}=e,{clearErrors:ei}=(0,H.useFormContext)(),{setDirty:es,setTouched:ea,setFocused:eu,shouldValidateOnChange:ec,validityData:ed,setFilled:ep,name:ef,disabled:em,validation:eg,validationMode:eh}=(0,R.useFieldRootContext)(),ev=(0,M.useLabelableId)({id:b}),eS=em||q,eb=ef??k,[ex,ey]=(0,s.useControlled)({controlled:w,default:ee?E??B.EMPTY_ARRAY:E,name:"Select",state:"value"}),[ew,eE]=(0,s.useControlled)({controlled:T,default:j,name:"Select",state:"open"}),eR=r.useRef([]),eM=r.useRef([]),eI=r.useRef(null),eA=r.useRef(null),eC=r.useRef(0),eT=r.useRef(null),eP=r.useRef([]),ej=r.useRef(!1),eV=r.useRef(!1),eL=r.useRef(null),ek=r.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),eO=r.useRef(!1),{mounted:eD,setMounted:eU,transitionStatus:eN}=(0,I.useTransitionStatus)(ew),{openMethod:eH,triggerProps:eF}=(0,_.useOpenInteractionType)(ew),eB=(0,o.useRefWithInit)(()=>new p.Store({id:ev,labelId:void 0,modal:X,multiple:ee,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,value:ex,open:ew,mounted:eD,transitionStatus:eN,items:Z,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ez=(0,d.useStore)(eB,O.activeIndex),e_=(0,d.useStore)(eB,O.selectedIndex),eY=(0,d.useStore)(eB,O.triggerElement),e$=(0,d.useStore)(eB,O.positionerElement),eq=r.useMemo(()=>ee&&Array.isArray(ex)&&0===ex.length?"":L(ex,er),[ee,ex,er]),eW=r.useMemo(()=>ee&&Array.isArray(ex)?ex.map(e=>L(e,er)):L(ex,er),[ee,ex,er]),eK=(0,c.useValueAsRef)(eB.state.triggerElement);(0,F.useField)({id:ev,commit:eg.commit,value:ex,controlRef:eK,name:eb,getValue:()=>eW});let eX=r.useRef(ex);(0,a.useIsoLayoutEffect)(()=>{ex!==eX.current&&eB.set("forceMount",!0)},[eB,ex]),(0,a.useIsoLayoutEffect)(()=>{ep(ee?Array.isArray(ex)&&ex.length>0:null!=ex)},[ee,ex,ep]),(0,a.useIsoLayoutEffect)(function(){if(ew)return;let e=eP.current;if(ee){let t=Array.isArray(ex)?ex:[];if(0===t.length)return void eB.set("selectedIndex",null);let r=P(e,t[t.length-1],en);return void eB.set("selectedIndex",-1===r?null:r)}let t=P(e,ex,en);eB.set("selectedIndex",-1===t?null:t)},[ee,ew,ex,eP,en,eB]),(0,z.useValueChanged)(ex,()=>{ei(eb),es(ex!==ed.initialValue),ec()?eg.commit(ex):eg.commit(ex,!0)});let eG=(0,u.useStableCallback)((e,t)=>{if(V?.(e,t),!t.isCanceled&&(eE(e),e||t.reason!==U.REASONS.focusOut&&t.reason!==U.REASONS.outsidePress||(ea(!0),eu(!1),"onBlur"===eh&&eg.commit(ex)),!e&&null!==eB.state.activeIndex)){let e=eR.current[eB.state.activeIndex];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}}),eJ=(0,u.useStableCallback)(()=>{eU(!1),eB.set("activeIndex",null),Q?.(!1)});(0,N.useOpenChangeComplete)({enabled:!G,open:ew,ref:eI,onComplete(){ew||eJ()}}),r.useImperativeHandle(G,()=>({unmount:eJ}),[eJ]);let eQ=(0,u.useStableCallback)((e,t)=>{A?.(e,t),t.isCanceled||ey(e)}),eZ=(0,u.useStableCallback)(()=>{let e=eB.state.listElement||eI.current;if(!e)return;let t=e.scrollTop,r=e.scrollTop+e.clientHeight,n=t>1,l=r<e.scrollHeight-1;eB.state.scrollUpArrowVisible!==n&&eB.set("scrollUpArrowVisible",n),eB.state.scrollDownArrowVisible!==l&&eB.set("scrollDownArrowVisible",l)}),e0=(0,g.useFloatingRootContext)({open:ew,onOpenChange:eG,elements:{reference:eY,floating:e$}}),e1=(0,f.useClick)(e0,{enabled:!W&&!eS,event:"mousedown"}),e2=(0,m.useDismiss)(e0,{bubbles:!1}),e5=(0,v.useListNavigation)(e0,{enabled:!W&&!eS,listRef:eR,activeIndex:ez,selectedIndex:e_,disabledIndices:B.EMPTY_ARRAY,onNavigate(e){(null!==e||ew)&&eB.set("activeIndex",e)},focusItemOnHover:!1}),e8=(0,S.useTypeahead)(e0,{enabled:!W&&!eS&&(ew||!ee),listRef:eM,activeIndex:ez,selectedIndex:e_,onMatch(e){ew?eB.set("activeIndex",e):eQ(eP.current[e],(0,D.createChangeEventDetails)("none"))},onTypingChange(e){ej.current=e}}),{getReferenceProps:e9,getFloatingProps:e6,getItemProps:e4}=(0,h.useInteractions)([e1,e2,e5,e8]),e3=r.useMemo(()=>(0,Y.mergeProps)(e9(),eF,ev?{id:ev}:B.EMPTY_OBJECT),[e9,eF,ev]);(0,i.useOnFirstRender)(()=>{eB.update({popupProps:e6(),triggerProps:e3})}),(0,a.useIsoLayoutEffect)(()=>{eB.update({id:ev,modal:X,multiple:ee,value:ex,open:ew,mounted:eD,transitionStatus:eN,popupProps:e6(),triggerProps:e3,items:Z,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,openMethod:eH})},[eB,ev,X,ee,ex,ew,eD,eN,e6,e3,Z,et,er,en,eH]);let e7=r.useMemo(()=>({store:eB,name:eb,required:K,disabled:eS,readOnly:W,multiple:ee,itemToStringLabel:et,itemToStringValue:er,highlightItemOnHover:el,setValue:eQ,setOpen:eG,listRef:eR,popupRef:eI,scrollHandlerRef:eA,handleScrollArrowVisibility:eZ,scrollArrowsMountedCountRef:eC,getItemProps:e4,events:e0.context.events,valueRef:eT,valuesRef:eP,labelsRef:eM,typingRef:ej,selectionRef:ek,selectedItemTextRef:eL,validation:eg,onOpenChangeComplete:Q,keyboardActiveRef:eV,alignItemWithTriggerActiveRef:eO,initialValueRef:eX}),[eB,eb,K,eS,W,ee,et,er,el,eQ,eG,e4,e0.context.events,eg,Q,eZ]),te=(0,l.useMergedRefs)(J,eg.inputRef),tt=ee&&Array.isArray(ex)&&ex.length>0,tr=ee?void 0:eb,tn=r.useMemo(()=>ee&&Array.isArray(ex)&&eb?ex.map(e=>{let r=L(e,er);return(0,t.jsx)("input",{type:"hidden",name:eb,value:r},r)}):null,[ee,ex,eb,er]);return(0,t.jsx)(x.Provider,{value:e7,children:(0,t.jsxs)(y.Provider,{value:e0,children:[eo,(0,t.jsx)("input",{...eg.getInputValidationProps({onFocus(){eB.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,r=(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent);eB.set("forceMount",!0),queueMicrotask(function(){if(ee)return;let e=eP.current.find(e=>L(e,er).toLowerCase()===t.toLowerCase());null!=e&&(es(e!==ed.initialValue),eQ(e,r),ec()&&eg.commit(e))})}}),id:ev&&null==tr?`${ev}-hidden-input`:void 0,name:tr,autoComplete:$,value:eq,disabled:eS,required:K&&!tt,readOnly:W,ref:te,style:eb?n.visuallyHiddenInput:n.visuallyHidden,tabIndex:-1,"aria-hidden":!0}),tn]})})},"ScrollDownArrow",0,e2,"ScrollUpArrow",0,e5,"Separator",()=>e3.Separator,"Trigger",0,en,"Value",0,eo],278289);var e7=e.i(278289),e7=e7,te=e.i(975157),tt=e.i(314338),tt=tt,tr=e.i(533133),tn=e.i(792566),tn=tn;function tl({className:e,...r}){return(0,t.jsx)(e7.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,te.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tn.default,{})})}function to({className:e,...r}){return(0,t.jsx)(e7.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,te.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tt.default,{})})}e.s(["Select",0,function(e){return(0,t.jsx)(e7.Root,{modal:!1,...e})},"SelectContent",0,function({className:e,children:r,side:n="bottom",sideOffset:l=4,align:o="start",alignOffset:i=0,alignItemWithTrigger:s=!1,...a}){return(0,t.jsxs)(e7.Portal,{children:[(0,t.jsx)(e7.Backdrop,{className:"fixed inset-0 z-50"}),(0,t.jsx)(e7.Positioner,{side:n,sideOffset:l,align:o,alignOffset:i,alignItemWithTrigger:s,className:"isolate z-50",children:(0,t.jsxs)(e7.Popup,{"data-slot":"select-content","data-align-trigger":s,className:(0,te.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a,children:[(0,t.jsx)(tl,{}),(0,t.jsx)(e7.List,{children:r}),(0,t.jsx)(to,{})]})})]})},"SelectItem",0,function({className:e,children:r,...n}){return(0,t.jsxs)(e7.Item,{"data-slot":"select-item",className:(0,te.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[(0,t.jsx)(e7.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:r}),(0,t.jsx)(e7.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(tr.CheckIcon,{className:"pointer-events-none"})})]})},"SelectTrigger",0,function({className:e,size:r="default",children:n,...l}){return(0,t.jsxs)(e7.Trigger,{"data-slot":"select-trigger","data-size":r,className:(0,te.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l,children:[n,(0,t.jsx)(e7.Icon,{render:(0,t.jsx)(tt.default,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}],967489);var ti=e.i(514798);let ts=(0,ti.createServerReference)("40118872f3d23c38466036d1df507ff3b1a2f96ba8",ti.callServer,void 0,ti.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,ts],338973)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,967489,551254,e=>{"use strict";var t=e.i(289721);e.s([],648333),e.i(648333);var r=e.i(965652),n=e.i(416369),l=e.i(362891),o=e.i(903224),i=e.i(528796),s=e.i(314757),a=e.i(804849),u=e.i(887642),c=e.i(20746),d=e.i(812901),p=e.i(956741),f=e.i(430557),m=e.i(594640),g=e.i(592604),h=e.i(306296),v=e.i(234951),S=e.i(471959);e.i(708878);var b=e.i(462902);let x=r.createContext(null),y=r.createContext(null);function w(){let e=r.useContext(x);if(null===e)throw Error((0,b.default)(60));return e}function E(){let e=r.useContext(y);if(null===e)throw Error((0,b.default)(61));return e}var R=e.i(890514),M=e.i(103353),I=e.i(193214),A=e.i(596290);let C=(e,t)=>Object.is(e,t);function T(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}function P(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&T(e,t,r)):-1}function j(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function V(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function L(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?j(e.value):j(e)}function k(e,t,r){function n(){if(r&&null!=e)return r(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return j(e)}if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??n();if(Array.isArray(t)){let r=V(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:n()}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return n()}let O={id:(0,A.createSelector)(e=>e.id),labelId:(0,A.createSelector)(e=>e.labelId),modal:(0,A.createSelector)(e=>e.modal),multiple:(0,A.createSelector)(e=>e.multiple),items:(0,A.createSelector)(e=>e.items),itemToStringLabel:(0,A.createSelector)(e=>e.itemToStringLabel),itemToStringValue:(0,A.createSelector)(e=>e.itemToStringValue),isItemEqualToValue:(0,A.createSelector)(e=>e.isItemEqualToValue),value:(0,A.createSelector)(e=>e.value),hasSelectedValue:(0,A.createSelector)(e=>{let{value:t,multiple:r,itemToStringValue:n}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==L(t,n))}),hasNullItemLabel:(0,A.createSelector)((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(V(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:(0,A.createSelector)(e=>e.open),mounted:(0,A.createSelector)(e=>e.mounted),forceMount:(0,A.createSelector)(e=>e.forceMount),transitionStatus:(0,A.createSelector)(e=>e.transitionStatus),openMethod:(0,A.createSelector)(e=>e.openMethod),activeIndex:(0,A.createSelector)(e=>e.activeIndex),selectedIndex:(0,A.createSelector)(e=>e.selectedIndex),isActive:(0,A.createSelector)((e,t)=>e.activeIndex===t),isSelected:(0,A.createSelector)((e,t,r)=>{let n=e.isItemEqualToValue,l=e.value;return e.multiple?Array.isArray(l)&&l.some(e=>T(r,e,n)):e.selectedIndex===t&&null!==e.selectedIndex||T(r,l,n)}),isSelectedByFocus:(0,A.createSelector)((e,t)=>e.selectedIndex===t),popupProps:(0,A.createSelector)(e=>e.popupProps),triggerProps:(0,A.createSelector)(e=>e.triggerProps),triggerElement:(0,A.createSelector)(e=>e.triggerElement),positionerElement:(0,A.createSelector)(e=>e.positionerElement),listElement:(0,A.createSelector)(e=>e.listElement),scrollUpArrowVisible:(0,A.createSelector)(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:(0,A.createSelector)(e=>e.scrollDownArrowVisible),hasScrollArrows:(0,A.createSelector)(e=>e.hasScrollArrows)};var D=e.i(67077),U=e.i(586622),N=e.i(504068),H=e.i(571870),F=e.i(421689),B=e.i(954588),z=e.i(271993),_=e.i(892069),Y=e.i(565455),$=e.i(581263),q=e.i(551974),W=e.i(397791);let K=r.forwardRef(function(e,t){let{render:r,className:n,...l}=e;delete l.id;let o=(0,R.useFieldRootContext)(),{store:i}=w(),s=(0,d.useStore)(i,O.triggerElement),a=(0,d.useStore)(i,O.id),u=null==a?void 0:`${a}-label`,c=(0,W.useLabel)({id:u,fallbackControlId:s?.id??a,setLabelId(e){i.set("labelId",e)}});return(0,$.useRenderElement)("div",e,{ref:t,state:o.state,props:[c,l],stateAttributesMapping:q.fieldValidityMapping})});var X=e.i(102094),G=e.i(161476),J=e.i(179279),Q=e.i(845756),Z=e.i(748299),ee=e.i(682354),et=e.i(282109);let er={...Q.pressableTriggerOpenStateMapping,...q.fieldValidityMapping,value:()=>null},en=r.forwardRef(function(e,t){let{render:n,className:o,id:i,disabled:s=!1,nativeButton:a=!0,...p}=e,{setTouched:f,setFocused:m,validationMode:g,state:h,disabled:v}=(0,R.useFieldRootContext)(),{labelId:S}=(0,J.useLabelableContext)(),{store:b,setOpen:x,selectionRef:y,validation:E,readOnly:I,required:A,alignItemWithTriggerActiveRef:C,disabled:T,keyboardActiveRef:P}=w(),j=v||T||s,V=(0,d.useStore)(b,O.open),L=(0,d.useStore)(b,O.value),k=(0,d.useStore)(b,O.triggerProps),N=(0,d.useStore)(b,O.positionerElement),H=(0,d.useStore)(b,O.listElement),F=(0,d.useStore)(b,O.id),B=(0,d.useStore)(b,O.labelId),z=(0,d.useStore)(b,O.hasSelectedValue),_=!z&&V,q=(0,d.useStore)(b,O.hasNullItemLabel,_),W=i??F;(0,M.useLabelableId)({id:W});let K=(0,c.useValueAsRef)(N),Q=r.useRef(null),{getButtonProps:en,buttonRef:el}=(0,et.useButton)({disabled:j,native:a}),eo=(0,u.useStableCallback)(e=>{b.set("triggerElement",e)}),ei=(0,l.useMergedRefs)(t,Q,el,eo),es=(0,G.useTimeout)(),ea=(0,G.useTimeout)(),eu=(0,G.useTimeout)(),ec=(0,G.useTimeout)();r.useEffect(()=>{if(V)return z||q?ec.start(200,()=>{y.current.allowUnselectedMouseUp=!0,eu.start(200,()=>{y.current.allowSelectedMouseUp=!0})}):eu.start(400,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{eu.clear(),ec.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ea.clear()},[V,z,q,y,ea,eu,ec]);let ed=r.useMemo(()=>H?.id??(0,ee.getFloatingFocusElement)(N)?.id,[H,N]),ep=(0,Y.mergeProps)(k,{id:W,role:"combobox","aria-expanded":V?"true":"false","aria-haspopup":"listbox","aria-controls":V?ed:void 0,"aria-labelledby":S??B,"aria-readonly":I||void 0,"aria-required":A||void 0,tabIndex:j?-1:0,ref:ei,onFocus(e){m(!0),V&&C.current&&x(!1,(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent)),es.start(0,()=>{b.set("forceMount",!0)})},onBlur(e){(0,ee.contains)(N,e.relatedTarget)||(f(!0),m(!1),"onBlur"===g&&E.commit(L))},onPointerMove(){P.current=!1},onKeyDown(){P.current=!0},onMouseDown(e){if(V)return;let t=(0,X.ownerDocument)(e.currentTarget);function r(e){if(!Q.current)return;let t=e.target;if((0,ee.contains)(Q.current,t)||(0,ee.contains)(K.current,t)||t===Q.current)return;let r=(0,Z.getPseudoElementBounds)(Q.current);e.clientX>=r.left-2&&e.clientX<=r.right+2&&e.clientY>=r.top-2&&e.clientY<=r.bottom+2||x(!1,(0,D.createChangeEventDetails)(U.REASONS.cancelOpen,e))}ea.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},E.getValidationProps,p,en);ep.role="combobox";let ef={...h,open:V,disabled:j,value:L,readOnly:I,placeholder:!z};return(0,$.useRenderElement)("button",e,{ref:[t,Q],state:ef,stateAttributesMapping:er,props:ep})}),el={value:()=>null},eo=r.forwardRef(function(e,n){let{className:l,render:o,children:i,placeholder:s,...a}=e,{store:u,valueRef:c}=w(),p=(0,d.useStore)(u,O.value),f=(0,d.useStore)(u,O.items),m=(0,d.useStore)(u,O.itemToStringLabel),g=(0,d.useStore)(u,O.hasSelectedValue),h=(0,d.useStore)(u,O.hasNullItemLabel,!g&&null!=s&&null==i),v=null;if("function"==typeof i)v=i(p);else if(null!=i)v=i;else if(g||null==s||h)if(Array.isArray(p))v=p.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,t.jsx)(r.Fragment,{children:k(n,f,m)},l)),e),[]);else v=k(p,f,m);else v=s;return(0,$.useRenderElement)("span",e,{state:{value:p,placeholder:!g},ref:[n,c],props:[{children:v},a],stateAttributesMapping:el})}),ei=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open);return(0,$.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:Q.triggerOpenStateMapping})});var es=e.i(888393);let ea=r.createContext(void 0),eu=r.forwardRef(function(e,r){let{store:n}=w(),l=(0,d.useStore)(n,O.mounted),o=(0,d.useStore)(n,O.forceMount);return l||o?(0,t.jsx)(ea.Provider,{value:!0,children:(0,t.jsx)(es.FloatingPortal,{ref:r,...e})}):null});var ec=e.i(809058);let ed={...Q.popupStateMapping,...ec.transitionStatusMapping},ep=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open),s=(0,d.useStore)(o,O.mounted),a=(0,d.useStore)(o,O.transitionStatus);return(0,$.useRenderElement)("div",e,{state:{open:i,transitionStatus:a},ref:t,props:[{role:"presentation",hidden:!s,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:ed})});var ef=e.i(831766),em=e.i(620163),eg=e.i(579028),eh=e.i(887943);let ev=r.createContext(void 0);function eS(){let e=r.useContext(ev);if(!e)throw Error((0,b.default)(59));return e}var eb=e.i(72287),ex=e.i(693354),ey=e.i(808754);function ew(e,t){e&&Object.assign(e.style,t)}let eE={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},eR={position:"fixed"},eM=r.forwardRef(function(e,n){let{anchor:l,positionMethod:o="absolute",className:i,render:s,side:c="bottom",align:p="center",sideOffset:f=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:h,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:b,alignItemWithTrigger:x=!0,collisionAvoidance:y=ex.DROPDOWN_COLLISION_AVOIDANCE,...R}=e,{store:M,listRef:I,labelsRef:A,alignItemWithTriggerActiveRef:C,selectedItemTextRef:j,valuesRef:V,initialValueRef:L,popupRef:k,setValue:N}=w(),H=E(),F=(0,d.useStore)(M,O.open),B=(0,d.useStore)(M,O.mounted),z=(0,d.useStore)(M,O.modal),_=(0,d.useStore)(M,O.value),Y=(0,d.useStore)(M,O.openMethod),q=(0,d.useStore)(M,O.positionerElement),W=(0,d.useStore)(M,O.triggerElement),K=(0,d.useStore)(M,O.isItemEqualToValue),X=(0,d.useStore)(M,O.transitionStatus),G=r.useRef(null),J=r.useRef(null),[Z,ee]=r.useState(x),et=B&&Z&&"touch"!==Y;B||Z===x||ee(x),(0,a.useIsoLayoutEffect)(()=>{!B&&(O.scrollUpArrowVisible(M.state)&&M.set("scrollUpArrowVisible",!1),O.scrollDownArrowVisible(M.state)&&M.set("scrollDownArrowVisible",!1))},[M,B]),r.useImperativeHandle(C,()=>et),(0,em.useScrollLock)((et||z)&&F&&"touch"!==Y,W);let er=(0,eh.useAnchorPositioning)({anchor:l,floatingRootContext:H,positionMethod:o,mounted:B,side:c,sideOffset:f,align:p,alignOffset:m,arrowPadding:v,collisionBoundary:g,collisionPadding:h,sticky:S,disableAnchorTracking:b??et,collisionAvoidance:y,keepMounted:!0}),en=et?"none":er.side,el=et?eR:er.positionerStyles,eo=r.useMemo(()=>{let e={};return F||(e.pointerEvents="none"),{role:"presentation",hidden:!B,style:{...el,...e}}},[F,B,el]),ei={open:F,side:en,align:er.align,anchorHidden:er.anchorHidden},es=(0,u.useStableCallback)(e=>{M.set("positionerElement",e)}),ea=(0,$.useRenderElement)("div",e,{ref:[n,es],state:ei,stateAttributesMapping:Q.popupStateMapping,props:[eo,(0,ey.getDisabledMountTransitionStyles)(X),R]}),eu=r.useRef(0),ec=(0,u.useStableCallback)(e=>{if(0===e.size&&0===eu.current||0===V.current.length)return;let t=eu.current;if(eu.current=e.size,e.size===t)return;let r=(0,D.createChangeEventDetails)(U.REASONS.none);if(0!==t&&!M.state.multiple&&null!==_&&-1===P(V.current,_,K)){let e=L.current,t=null!=e&&-1!==P(V.current,e,K)?e:null;N(t,r),null===t&&(M.set("selectedIndex",null),j.current=null)}if(0!==t&&M.state.multiple&&Array.isArray(_)){let e=_.filter(e=>-1!==P(V.current,e,K));(e.length!==_.length||e.some(e=>!(_&&0!==_.length&&_.some(t=>void 0!==t&&T(e,t,K)))))&&(N(e,r),0===e.length&&(M.set("selectedIndex",null),j.current=null))}if(F&&et){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};ew(q,e),ew(k.current,e)}}),ed=r.useMemo(()=>({...er,side:en,alignItemWithTriggerActive:et,setControlledAlignItemWithTrigger:ee,scrollUpArrowRef:G,scrollDownArrowRef:J}),[er,en,et,ee]);return(0,t.jsx)(eg.CompositeList,{elementsRef:I,labelsRef:A,onMapChange:ec,children:(0,t.jsxs)(ev.Provider,{value:ed,children:[B&&z&&(0,t.jsx)(eb.InternalBackdrop,{inert:(0,ef.inertValue)(!F),cutout:W}),ea]})})});var eI=e.i(585012),eA=e.i(641645),eC=e.i(442383),eT=e.i(285182);function eP(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var ej=e.i(946467),eV=e.i(11931),eL=e.i(278928),ek=e.i(685668),eO=e.i(196368),eD=e.i(197920),eU=e.i(867467),eN=e.i(743945);let eH={...Q.popupStateMapping,...ec.transitionStatusMapping},eF=r.forwardRef(function(e,n){let{render:l,className:o,finalFocus:i,...s}=e,{store:c,popupRef:p,onOpenChangeComplete:f,setOpen:m,valueRef:g,selectedItemTextRef:h,keyboardActiveRef:v,multiple:S,handleScrollArrowVisibility:b,scrollHandlerRef:x,highlightItemOnHover:y}=w(),{side:R,align:M,alignItemWithTriggerActive:I,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:C,scrollUpArrowRef:T}=eS(),P=null!=(0,eO.useToolbarRootContext)(!0),j=E(),{nonce:V,disableStyleElements:L}=(0,eN.useCSPContext)(),k=(0,G.useTimeout)(),H=(0,d.useStore)(c,O.id),F=(0,d.useStore)(c,O.open),B=(0,d.useStore)(c,O.mounted),z=(0,d.useStore)(c,O.popupProps),_=(0,d.useStore)(c,O.transitionStatus),Y=(0,d.useStore)(c,O.triggerElement),q=(0,d.useStore)(c,O.positionerElement),W=(0,d.useStore)(c,O.listElement),K=r.useRef(0),J=r.useRef(!1),Q=r.useRef(0),Z=r.useRef(!1),ee=r.useRef({}),et=(0,ej.useAnimationFrame)(),er=(0,u.useStableCallback)(e=>{if(!q||!p.current||!Z.current)return;if(J.current||!I)return void b();let t="0px"===q.style.top,r="0px"===q.style.bottom,n=q.getBoundingClientRect().height,l=(0,X.ownerDocument)(q),o=getComputedStyle(q),i=parseFloat(o.marginTop),s=parseFloat(o.marginBottom),a=eB(getComputedStyle(p.current)),u=Math.min(l.documentElement.clientHeight-i-s,a),c=e.scrollTop,d=ez(e),f=0,m=null,g=!1,h=!1,v=e=>{q.style.height=`${e}px`},S=(t,r)=>{let l=(0,eU.clamp)(t,0,u-n);l>0&&v(n+l),e.scrollTop=r,u-(n+l)<=1&&(J.current=!0),b()};if(t){let e=d-c,t=Math.min(n+e,u);if(f=t,e<=1)return void S(e,d);u-t>1?h=!0:g=!0}else if(r){let e=n+c,t=Math.min(e,u);if(f=t,c<=1)return void S(c,0);u-t>1?m=0:(g=!0,c<d&&(m=c-(c-(e-u))))}if(0!==(f=Math.ceil(f))&&v(f),h||null!=m){let t=ez(e),r=h?t:(0,eU.clamp)(m,0,t);Math.abs(e.scrollTop-r)>1&&(e.scrollTop=r)}(g||f>=u-1)&&(J.current=!0),b()});r.useImperativeHandle(x,()=>er,[er]),(0,N.useOpenChangeComplete)({open:F,ref:p,onComplete(){F&&f?.(!0)}}),(0,a.useIsoLayoutEffect)(()=>{q&&p.current&&!Object.keys(ee.current).length&&(ee.current={top:q.style.top||"0",left:q.style.left||"0",right:q.style.right,height:q.style.height,bottom:q.style.bottom,minHeight:q.style.minHeight,maxHeight:q.style.maxHeight,marginTop:q.style.marginTop,marginBottom:q.style.marginBottom})},[p,q]),(0,a.useIsoLayoutEffect)(()=>{F||I||(Z.current=!1,J.current=!1,K.current=0,Q.current=0,ew(q,ee.current))},[F,I,q,p]),(0,a.useIsoLayoutEffect)(()=>{let e=p.current;if(F&&Y&&q&&e&&"ending"!==c.state.transitionStatus){if(!I){Z.current=!0,et.request(b),e.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{let t=function(e){let{style:t}=e,r={};for(let[e,n]of eY)r[e]=t.getPropertyValue(e),t.setProperty(e,n,"important");return()=>{for(let[e]of eY){let n=r[e];n?t.setProperty(e,n):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{var r;let t,n=getComputedStyle(q),l=getComputedStyle(e),o=(0,X.ownerDocument)(Y),i=(0,eT.ownerWindow)(q),s=(r=Y,eL.platform.getScale(r)),a=e_(Y.getBoundingClientRect(),s),u=e_(q.getBoundingClientRect(),s),c=a.left,d=a.height,p=W||e,f=p.scrollHeight,m=parseFloat(l.borderBottomWidth),v=parseFloat(n.marginTop)||10,S=parseFloat(n.marginBottom)||10,x=parseFloat(n.minHeight)||100,y=eB(l),w=o.documentElement.clientHeight-v-S,E=o.documentElement.clientWidth,R=w-a.bottom+d,M=h.current,I=g.current,C=0,T=0;if(M&&I){let e=e_(I.getBoundingClientRect(),s);t=e_(M.getBoundingClientRect(),s);let r=e.left-c,n=t.left-u.left,l=e.top-a.top+e.height/2,o=t.top-u.top+t.height/2;C=r-n,T=o-l}let P=R+T+S+m,j=Math.min(w,P),V=w-v-S,L=P-j,k=Math.max(5,c+C),O=Math.max(0,k+u.width-(E-5));q.style.left=`${k-O}px`,q.style.height=`${j}px`,q.style.maxHeight="auto",q.style.marginTop=`${v}px`,q.style.marginBottom=`${S}px`,e.style.height="100%";let D=ez(p),U=L>=D-1;U&&(j=Math.min(w,u.height)-(L-D));let N=a.top<20||a.bottom>w-20||Math.ceil(j)+1<Math.min(f,x),H=(i.visualViewport?.scale??1)!==1&&eC.isWebKit;if(N||H){Z.current=!0,ew(q,ee.current),eI.flushSync(()=>A(!1));return}if(U){let e=Math.max(0,w-P);q.style.top=u.height>=V?"0":`${e}px`,q.style.height=`${j}px`,p.scrollTop=ez(p),K.current=Math.max(x,j)}else q.style.bottom="0",K.current=Math.max(x,j),p.scrollTop=L;if(t){let r=u.top,n=u.height,l=t.top+t.height/2,o=(0,eU.clamp)(n>0?(l-r)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(K.current===w||j>=y)&&(J.current=!0),b(),setTimeout(()=>{Z.current=!0})}finally{t()}})}},[c,F,q,Y,g,h,p,b,I,A,et,C,T,W]),r.useEffect(()=>{if(!I||!q||!F)return;let e=(0,eT.ownerWindow)(q);function t(e){m(!1,(0,D.createChangeEventDetails)(U.REASONS.windowResize,e))}return e.addEventListener("resize",t),()=>{e.removeEventListener("resize",t)}},[m,I,q,F]);let en={...W?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${H}-list`},onKeyDown(e){v.current=!0,P&&eD.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onMouseMove(){v.current=!1},onPointerLeave(e){if(!y||eP(e)||"touch"===e.pointerType)return;let t=e.currentTarget;k.start(0,()=>{c.set("activeIndex",null),t.focus({preventScroll:!0})})},onScroll(e){W||er(e.currentTarget)},...I&&{style:W?{height:"100%"}:eE}},el=(0,$.useRenderElement)("div",e,{ref:[n,p],state:{open:F,transitionStatus:_,side:R,align:M},stateAttributesMapping:eH,props:[z,en,(0,ey.getDisabledMountTransitionStyles)(_),{className:!W&&I?ek.styleDisableScrollbar.className:void 0},s]});return(0,t.jsxs)(r.Fragment,{children:[!L&&ek.styleDisableScrollbar.getElement(V),(0,t.jsx)(eV.FloatingFocusManager,{context:j,modal:!1,disabled:!B,returnFocus:i,restoreFocus:!0,children:el})]})});function eB(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function ez(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function e_(e,t){return(0,eA.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let eY=[["transform","none"],["scale","1"],["translate","0 0"]],e$=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o,scrollHandlerRef:i}=w(),{alignItemWithTriggerActive:s}=eS(),a=(0,d.useStore)(o,O.hasScrollArrows),c=(0,d.useStore)(o,O.openMethod),p=(0,d.useStore)(o,O.multiple),f=(0,d.useStore)(o,O.id),m={id:`${f}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(e){i.current?.(e.currentTarget)},...s&&{style:eE},className:a&&"touch"!==c?ek.styleDisableScrollbar.className:void 0},g=(0,u.useStableCallback)(e=>{o.set("listElement",e)});return(0,$.useRenderElement)("div",e,{ref:[t,g],props:[m,l]})});var eq=e.i(655728);let eW=r.createContext(void 0);function eK(){let e=r.useContext(eW);if(!e)throw Error((0,b.default)(57));return e}let eX=r.memo(r.forwardRef(function(e,n){let{render:l,className:o,value:i=null,label:s,disabled:u=!1,nativeButton:p=!1,...f}=e,m=r.useRef(null),g=(0,eq.useCompositeListItem)({label:s,textRef:m,indexGuessBehavior:eq.IndexGuessBehavior.GuessFromOrder}),{store:h,getItemProps:v,setOpen:S,setValue:b,selectionRef:x,typingRef:y,valuesRef:E,keyboardActiveRef:R,multiple:M,highlightItemOnHover:I}=w(),A=(0,G.useTimeout)(),C=(0,d.useStore)(h,O.isActive,g.index),P=(0,d.useStore)(h,O.isSelected,g.index,i),j=(0,d.useStore)(h,O.isSelectedByFocus,g.index),V=(0,d.useStore)(h,O.isItemEqualToValue),L=g.index,k=-1!==L,N=r.useRef(null),H=(0,c.useValueAsRef)(L);(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=E.current;return e[L]=i,()=>{delete e[L]}},[k,L,i,E]),(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=h.state.value,t=e;M&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),void 0!==t&&T(i,t,V)&&h.set("selectedIndex",L)},[k,L,M,V,h,i]);let F=v({active:C,selected:P});F.onFocus=void 0,F.id=void 0;let B=r.useRef(null),z=r.useRef("mouse"),_=r.useRef(!1),{getButtonProps:Y,buttonRef:q}=(0,et.useButton)({disabled:u,focusableWhenDisabled:!0,native:p,composite:!0}),W=(0,$.useRenderElement)("div",e,{ref:[q,n,g.ref,N],state:{disabled:u,selected:P,highlighted:C},props:[F,{role:"option","aria-selected":P,tabIndex:C?0:-1,onFocus(){h.set("activeIndex",L)},onMouseEnter(){!R.current&&null===h.state.selectedIndex&&I&&h.set("activeIndex",L)},onMouseMove(){I&&h.set("activeIndex",L)},onMouseLeave(e){!I||R.current||eP(e)||A.start(0,()=>{h.state.activeIndex===L&&h.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){B.current=e.key,h.set("activeIndex",L)," "===e.key&&y.current&&e.preventDefault()},onClick(e){_.current=!1,"keydown"===e.type&&null===B.current||u||"keydown"===e.type&&" "===B.current&&y.current||"touch"!==z.current&&!C||(B.current=null,function(e){let t=h.state.value;if(M){let r=Array.isArray(t)?t:[];b(P?r.filter(e=>!T(i,e,V)):[...r,i],(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}else b(i,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e)),S(!1,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}(e.nativeEvent))},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,_.current=!0},onMouseUp(){if(u)return;if(_.current){_.current=!1;return}let e=!x.current.allowSelectedMouseUp&&P,t=!x.current.allowUnselectedMouseUp&&!P;e||t||"touch"!==z.current&&!C||N.current?.click()}},f,Y]}),K=r.useMemo(()=>({selected:P,indexRef:H,textRef:m,selectedByFocus:j,hasRegistered:k}),[P,H,m,j,k]);return(0,t.jsx)(eW.Provider,{value:K,children:W})})),eG=r.forwardRef(function(e,r){let n=e.keepMounted??!1,{selected:l}=eK();return n||l?(0,t.jsx)(eJ,{...e,ref:r}):null}),eJ=r.memo(r.forwardRef((e,t)=>{let{render:n,className:l,keepMounted:o,...i}=e,{selected:s}=eK(),a=r.useRef(null),{transitionStatus:u,setMounted:c}=(0,I.useTransitionStatus)(s),d=(0,$.useRenderElement)("span",e,{ref:[t,a],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:ec.transitionStatusMapping});return(0,N.useOpenChangeComplete)({open:s,ref:a,onComplete(){s||c(!1)}}),d})),eQ=r.memo(r.forwardRef(function(e,t){let{indexRef:n,textRef:l,selectedByFocus:o,hasRegistered:i}=eK(),{selectedItemTextRef:s}=w(),{className:a,render:u,...c}=e,d=r.useCallback(e=>{if(!e||!i)return;let t=null===s.current||!s.current.isConnected;(o||t&&0===n.current)&&(s.current=e)},[s,n,o,i]);return(0,$.useRenderElement)("div",e,{ref:[d,t,l],props:c})})),eZ={...Q.popupStateMapping,...ec.transitionStatusMapping},e0=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),{side:i,align:s,arrowRef:a,arrowStyles:u,arrowUncentered:c,alignItemWithTriggerActive:p}=eS(),f=(0,d.useStore)(o,O.open,!0),m=(0,$.useRenderElement)("div",e,{state:{open:f,side:i,align:s,uncentered:c},ref:[a,t],props:[{style:u,"aria-hidden":!0},l],stateAttributesMapping:eZ});return p?null:m}),e1=r.forwardRef(function(e,t){let{render:r,className:n,direction:l,keepMounted:o=!1,...i}=e,{store:s,popupRef:u,listRef:c,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:f}=w(),{side:m,scrollDownArrowRef:g,scrollUpArrowRef:h}=eS(),v="up"===l?O.scrollUpArrowVisible:O.scrollDownArrowVisible,S=(0,d.useStore)(s,v),b=(0,d.useStore)(s,O.openMethod),x=S&&"touch"!==b,y=(0,G.useTimeout)(),E="up"===l?h:g,{transitionStatus:R,setMounted:M}=(0,I.useTransitionStatus)(x);(0,a.useIsoLayoutEffect)(()=>(f.current+=1,s.state.hasScrollArrows||s.set("hasScrollArrows",!0),()=>{f.current=Math.max(0,f.current-1),0===f.current&&s.state.hasScrollArrows&&s.set("hasScrollArrows",!1)}),[s,f]),(0,N.useOpenChangeComplete)({open:x,ref:E,onComplete(){x||M(!1)}});let A=(0,$.useRenderElement)("div",e,{ref:[t,E],state:{direction:l,visible:x,side:m,transitionStatus:R},props:[{"aria-hidden":!0,children:"up"===l?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||y.isStarted()||(s.set("activeIndex",null),y.start(40,function e(){let t=s.state.listElement??u.current;if(!t)return;s.set("activeIndex",null),p();let r=0===t.scrollTop,n=Math.round(t.scrollTop+t.clientHeight)>=t.scrollHeight;if(0===c.current.length&&("up"===l?s.set("scrollUpArrowVisible",!r):s.set("scrollDownArrowVisible",!n)),"up"===l&&r||"down"===l&&n)return void y.clear();if((s.state.listElement||u.current)&&c.current&&c.current.length>0){let e=c.current,r=E.current?.offsetHeight||0;if("up"===l){let n=0,l=t.scrollTop+r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop>=l){n=t;break}}let o=Math.max(0,n-1);if(o<n){let n=e[o];n&&(t.scrollTop=Math.max(0,n.offsetTop-r))}else t.scrollTop=0}else{let n=e.length-1,l=t.scrollTop+t.clientHeight-r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>l){n=Math.max(0,t-1);break}}let o=Math.min(e.length-1,n+1);if(o>n){let n=e[o];n&&(t.scrollTop=n.offsetTop+n.offsetHeight-t.clientHeight+r)}else t.scrollTop=t.scrollHeight-t.clientHeight}}y.start(40,e)}))},onMouseLeave(){y.clear()}},i]});return x||o?A:null}),e5=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"down"})}),e2=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"up"})}),e4=r.createContext(void 0),e8=r.forwardRef(function(e,n){let{className:l,render:o,...i}=e,[s,a]=r.useState(),u=r.useMemo(()=>({labelId:s,setLabelId:a}),[s,a]),c=(0,$.useRenderElement)("div",e,{ref:n,props:[{role:"group","aria-labelledby":s},i]});return(0,t.jsx)(e4.Provider,{value:u,children:c})});var e9=e.i(207516);let e6=r.forwardRef(function(e,t){let{className:n,render:l,id:o,...i}=e,{setLabelId:s}=function(){let e=r.useContext(e4);if(void 0===e)throw Error((0,b.default)(56));return e}(),u=(0,e9.useBaseUiId)(o);return(0,a.useIsoLayoutEffect)(()=>{s(u)},[u,s]),(0,$.useRenderElement)("div",e,{ref:t,props:[{id:u},i]})});var e7=e.i(983640);e.s(["Arrow",0,e0,"Backdrop",0,ep,"Group",0,e8,"GroupLabel",0,e6,"Icon",0,ei,"Item",0,eX,"ItemIndicator",0,eG,"ItemText",0,eQ,"Label",0,K,"List",0,e$,"Popup",0,eF,"Portal",0,eu,"Positioner",0,eM,"Root",0,function(e){let{id:b,value:w,defaultValue:E=null,onValueChange:A,open:T,defaultOpen:j=!1,onOpenChange:V,name:k,autoComplete:$,disabled:q=!1,readOnly:W=!1,required:K=!1,modal:X=!0,actionsRef:G,inputRef:J,onOpenChangeComplete:Q,items:Z,multiple:ee=!1,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en=C,highlightItemOnHover:el=!0,children:eo}=e,{clearErrors:ei}=(0,H.useFormContext)(),{setDirty:es,setTouched:ea,setFocused:eu,shouldValidateOnChange:ec,validityData:ed,setFilled:ep,name:ef,disabled:em,validation:eg,validationMode:eh}=(0,R.useFieldRootContext)(),ev=(0,M.useLabelableId)({id:b}),eS=em||q,eb=ef??k,[ex,ey]=(0,s.useControlled)({controlled:w,default:ee?E??B.EMPTY_ARRAY:E,name:"Select",state:"value"}),[ew,eE]=(0,s.useControlled)({controlled:T,default:j,name:"Select",state:"open"}),eR=r.useRef([]),eM=r.useRef([]),eI=r.useRef(null),eA=r.useRef(null),eC=r.useRef(0),eT=r.useRef(null),eP=r.useRef([]),ej=r.useRef(!1),eV=r.useRef(!1),eL=r.useRef(null),ek=r.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),eO=r.useRef(!1),{mounted:eD,setMounted:eU,transitionStatus:eN}=(0,I.useTransitionStatus)(ew),{openMethod:eH,triggerProps:eF}=(0,_.useOpenInteractionType)(ew),eB=(0,o.useRefWithInit)(()=>new p.Store({id:ev,labelId:void 0,modal:X,multiple:ee,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,value:ex,open:ew,mounted:eD,transitionStatus:eN,items:Z,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ez=(0,d.useStore)(eB,O.activeIndex),e_=(0,d.useStore)(eB,O.selectedIndex),eY=(0,d.useStore)(eB,O.triggerElement),e$=(0,d.useStore)(eB,O.positionerElement),eq=r.useMemo(()=>ee&&Array.isArray(ex)&&0===ex.length?"":L(ex,er),[ee,ex,er]),eW=r.useMemo(()=>ee&&Array.isArray(ex)?ex.map(e=>L(e,er)):L(ex,er),[ee,ex,er]),eK=(0,c.useValueAsRef)(eB.state.triggerElement);(0,F.useField)({id:ev,commit:eg.commit,value:ex,controlRef:eK,name:eb,getValue:()=>eW});let eX=r.useRef(ex);(0,a.useIsoLayoutEffect)(()=>{ex!==eX.current&&eB.set("forceMount",!0)},[eB,ex]),(0,a.useIsoLayoutEffect)(()=>{ep(ee?Array.isArray(ex)&&ex.length>0:null!=ex)},[ee,ex,ep]),(0,a.useIsoLayoutEffect)(function(){if(ew)return;let e=eP.current;if(ee){let t=Array.isArray(ex)?ex:[];if(0===t.length)return void eB.set("selectedIndex",null);let r=P(e,t[t.length-1],en);return void eB.set("selectedIndex",-1===r?null:r)}let t=P(e,ex,en);eB.set("selectedIndex",-1===t?null:t)},[ee,ew,ex,eP,en,eB]),(0,z.useValueChanged)(ex,()=>{ei(eb),es(ex!==ed.initialValue),ec()?eg.commit(ex):eg.commit(ex,!0)});let eG=(0,u.useStableCallback)((e,t)=>{if(V?.(e,t),!t.isCanceled&&(eE(e),e||t.reason!==U.REASONS.focusOut&&t.reason!==U.REASONS.outsidePress||(ea(!0),eu(!1),"onBlur"===eh&&eg.commit(ex)),!e&&null!==eB.state.activeIndex)){let e=eR.current[eB.state.activeIndex];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}}),eJ=(0,u.useStableCallback)(()=>{eU(!1),eB.set("activeIndex",null),Q?.(!1)});(0,N.useOpenChangeComplete)({enabled:!G,open:ew,ref:eI,onComplete(){ew||eJ()}}),r.useImperativeHandle(G,()=>({unmount:eJ}),[eJ]);let eQ=(0,u.useStableCallback)((e,t)=>{A?.(e,t),t.isCanceled||ey(e)}),eZ=(0,u.useStableCallback)(()=>{let e=eB.state.listElement||eI.current;if(!e)return;let t=e.scrollTop,r=e.scrollTop+e.clientHeight,n=t>1,l=r<e.scrollHeight-1;eB.state.scrollUpArrowVisible!==n&&eB.set("scrollUpArrowVisible",n),eB.state.scrollDownArrowVisible!==l&&eB.set("scrollDownArrowVisible",l)}),e0=(0,g.useFloatingRootContext)({open:ew,onOpenChange:eG,elements:{reference:eY,floating:e$}}),e1=(0,f.useClick)(e0,{enabled:!W&&!eS,event:"mousedown"}),e5=(0,m.useDismiss)(e0,{bubbles:!1}),e2=(0,v.useListNavigation)(e0,{enabled:!W&&!eS,listRef:eR,activeIndex:ez,selectedIndex:e_,disabledIndices:B.EMPTY_ARRAY,onNavigate(e){(null!==e||ew)&&eB.set("activeIndex",e)},focusItemOnHover:!1}),e4=(0,S.useTypeahead)(e0,{enabled:!W&&!eS&&(ew||!ee),listRef:eM,activeIndex:ez,selectedIndex:e_,onMatch(e){ew?eB.set("activeIndex",e):eQ(eP.current[e],(0,D.createChangeEventDetails)("none"))},onTypingChange(e){ej.current=e}}),{getReferenceProps:e8,getFloatingProps:e9,getItemProps:e6}=(0,h.useInteractions)([e1,e5,e2,e4]),e7=r.useMemo(()=>(0,Y.mergeProps)(e8(),eF,ev?{id:ev}:B.EMPTY_OBJECT),[e8,eF,ev]);(0,i.useOnFirstRender)(()=>{eB.update({popupProps:e9(),triggerProps:e7})}),(0,a.useIsoLayoutEffect)(()=>{eB.update({id:ev,modal:X,multiple:ee,value:ex,open:ew,mounted:eD,transitionStatus:eN,popupProps:e9(),triggerProps:e7,items:Z,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,openMethod:eH})},[eB,ev,X,ee,ex,ew,eD,eN,e9,e7,Z,et,er,en,eH]);let e3=r.useMemo(()=>({store:eB,name:eb,required:K,disabled:eS,readOnly:W,multiple:ee,itemToStringLabel:et,itemToStringValue:er,highlightItemOnHover:el,setValue:eQ,setOpen:eG,listRef:eR,popupRef:eI,scrollHandlerRef:eA,handleScrollArrowVisibility:eZ,scrollArrowsMountedCountRef:eC,getItemProps:e6,events:e0.context.events,valueRef:eT,valuesRef:eP,labelsRef:eM,typingRef:ej,selectionRef:ek,selectedItemTextRef:eL,validation:eg,onOpenChangeComplete:Q,keyboardActiveRef:eV,alignItemWithTriggerActiveRef:eO,initialValueRef:eX}),[eB,eb,K,eS,W,ee,et,er,el,eQ,eG,e6,e0.context.events,eg,Q,eZ]),te=(0,l.useMergedRefs)(J,eg.inputRef),tt=ee&&Array.isArray(ex)&&ex.length>0,tr=ee?void 0:eb,tn=r.useMemo(()=>ee&&Array.isArray(ex)&&eb?ex.map(e=>{let r=L(e,er);return(0,t.jsx)("input",{type:"hidden",name:eb,value:r},r)}):null,[ee,ex,eb,er]);return(0,t.jsx)(x.Provider,{value:e3,children:(0,t.jsxs)(y.Provider,{value:e0,children:[eo,(0,t.jsx)("input",{...eg.getInputValidationProps({onFocus(){eB.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,r=(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent);eB.set("forceMount",!0),queueMicrotask(function(){if(ee)return;let e=eP.current.find(e=>L(e,er).toLowerCase()===t.toLowerCase());null!=e&&(es(e!==ed.initialValue),eQ(e,r),ec()&&eg.commit(e))})}}),id:ev&&null==tr?`${ev}-hidden-input`:void 0,name:tr,autoComplete:$,value:eq,disabled:eS,required:K&&!tt,readOnly:W,ref:te,style:eb?n.visuallyHiddenInput:n.visuallyHidden,tabIndex:-1,"aria-hidden":!0}),tn]})})},"ScrollDownArrow",0,e5,"ScrollUpArrow",0,e2,"Separator",()=>e7.Separator,"Trigger",0,en,"Value",0,eo],278289);var e3=e.i(278289),e3=e3,te=e.i(975157),tt=e.i(314338),tt=tt,tr=e.i(533133),tn=e.i(792566),tn=tn;function tl({className:e,...r}){return(0,t.jsx)(e3.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,te.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tn.default,{})})}function to({className:e,...r}){return(0,t.jsx)(e3.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,te.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tt.default,{})})}e.s(["Select",0,function(e){return(0,t.jsx)(e3.Root,{modal:!1,...e})},"SelectContent",0,function({className:e,children:r,side:n="bottom",sideOffset:l=4,align:o="start",alignOffset:i=0,alignItemWithTrigger:s=!1,...a}){return(0,t.jsxs)(e3.Portal,{children:[(0,t.jsx)(e3.Backdrop,{className:"fixed inset-0 z-50"}),(0,t.jsx)(e3.Positioner,{side:n,sideOffset:l,align:o,alignOffset:i,alignItemWithTrigger:s,className:"isolate z-50",children:(0,t.jsxs)(e3.Popup,{"data-slot":"select-content","data-align-trigger":s,className:(0,te.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a,children:[(0,t.jsx)(tl,{}),(0,t.jsx)(e3.List,{children:r}),(0,t.jsx)(to,{})]})})]})},"SelectItem",0,function({className:e,children:r,...n}){return(0,t.jsxs)(e3.Item,{"data-slot":"select-item",className:(0,te.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[(0,t.jsx)(e3.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:r}),(0,t.jsx)(e3.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(tr.CheckIcon,{className:"pointer-events-none"})})]})},"SelectTrigger",0,function({className:e,size:r="default",children:n,...l}){return(0,t.jsxs)(e3.Trigger,{"data-slot":"select-trigger","data-size":r,className:(0,te.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l,children:[n,(0,t.jsx)(e3.Icon,{render:(0,t.jsx)(tt.default,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}],967489);var ti=e.i(514798);let ts=(0,ti.createServerReference)("40473e22f50d4fc9515efcd0a8c580914d082acddc",ti.callServer,void 0,ti.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,ts],551254)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,486077,e=>{"use strict";let t=(0,e.i(572989).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],486077)},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},244354,e=>{"use strict";async function t(e,s,r={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!a.ok)throw Error((await a.json()).error||`${s} failed`);return a.json()}e.s(["gitAction",0,t])},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let a=(0,t.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,a],755696);let n=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,n],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let l=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,l],719493);let o=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,o],436539)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),a=e.i(48019),n=e.i(782516),i=e.i(755696),l=e.i(886156),o=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),x=e.i(232280),u=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),M=e.i(755146),D=e.i(759684),L=e.i(337822),A=e.i(746798),F=e.i(776639),T=e.i(793479),B=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:a,currentBranch:n,localPath:i,onCreated:l,onError:c}){let{t:d}=(0,I.useI18n)(),[m,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(n),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,M]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(u(""),p(n),j(""),k(""))},[e,n]);let D=[...new Set(a)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),L=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),l();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(F.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(F.DialogHeader,{children:(0,t.jsx)(F.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(T.Input,{value:m,onChange:e=>u(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&L()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>M(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),M(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(B.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:L,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let R={modified:l.FileEdit,added:a.FilePlus,deleted:n.FileMinus,untracked:i.FileQuestion,renamed:l.FileEdit},z={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let a=e[t],n=t===e.length-1,i=e.slice(0,t+1).join("/");if(n)r.children.push({name:a,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===a);e||(e={name:a,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(D.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:a,tree:n,batchAction:i,batchLabel:l,batchIcon:o,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${a}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":l,children:o})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:n.map(e=>(0,t.jsx)(W,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function W({node:e,depth:a,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${a} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(u.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(W,{node:e,depth:a+1,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=R[j.status]||r.File,w=z[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>n(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":o??"",children:l}),o&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:o})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:a="project"}){let n="task"===a,{t:i}=(0,I.useI18n)(),[l,m]=(0,s.useState)(null),[u,D]=(0,s.useState)(!0),[F,T]=(0,s.useState)(""),[B,R]=(0,s.useState)(!1),[z,U]=(0,s.useState)(!1),[W,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{D(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(F.trim()){R(!0);try{await (0,P.gitAction)(e,"commit",{message:F}),T(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{R(!1)}}},ea=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},en=async t=>{V(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{V(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},el=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eo=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:F||void 0}),T(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=l?.topLevel??e;try{let a=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,a.content??"",s)}catch{r?.(t.file,"",s)}},ex=l?.changedFiles.filter(e=>e.staged)??[],eu=l?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(ex),[ex]),ep=(0,s.useMemo)(()=>G(eu),[eu]);if(u)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!l)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...l?.branches??[],...(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:n?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[n?(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:l?.currentBranch||"—"})]})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:l?.currentBranch||"—"})]}):(0,t.jsxs)(L.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(L.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l?.currentBranch||void 0,children:l?.currentBranch||"—"})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(L.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===l?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):el(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>el(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:ei,disabled:K,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${K?"animate-spin":""}`})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:F,onChange:e=>T(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:B||!F.trim()||0===ex.length,children:[B?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(M.DropdownMenu,{children:[(0,t.jsx)(M.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(M.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:er,disabled:!F.trim()||0===ex.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===eu.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===ex.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eh,disabled:0===eu.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",l.behind]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",l.ahead]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ei,disabled:K,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${K?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eo,disabled:0===l.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),l.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:n,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:ex.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:eu.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===l.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...l?.branches??[],...l?.remoteBranches??[]],currentBranch:l?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},14842,865514,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),a=e.i(232280),n=e.i(759686),i=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),x=e.i(624687),u=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:a}=(0,u.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,u.useI18n)(),r=e.split("\n"),a=r.length>500,n=a?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:n.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,u.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[M,D]=(0,s.useState)(!1),[L,A]=(0,s.useState)(""),[F,T]=(0,s.useState)(!1),B=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>D(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(n.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let s=v.has(e.filename),n=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&B(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:n,isLargeFold:!n&&i>200,onLoad:()=>B(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:M,onOpenChange:D,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(x.Textarea,{value:L,onChange:e=>A(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>D(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(L.trim()&&w){T(!0);try{await w(L.trim()),A(""),D(!1)}finally{T(!1)}}},disabled:!L.trim()||F,children:F?"...":y("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let j=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:r,taskId:a,taskTitle:n,baseBranch:i,fileCount:l,commitCount:d,commitLog:h=[],onMergeComplete:x}){let u=(0,g.useRouter)(),[f,p]=(0,s.useState)(!1),[b,w]=(0,s.useState)(null),N=async()=>{p(!0),w(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){r(!1),x(),u.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?w(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):w(t.error??"Merge failed")}catch{w("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(m.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:i})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:l})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]})]}),h.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:h.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),b&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:b})})]}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>r(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:N,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},838582,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("4059ebe87310fd6051a72d03ec63d9c6b59e067c77",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},698343,502889,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c861f495fd28ff313b1aa5a0c701fc1903aceeefb",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],698343);let r=(0,t.createServerReference)("40b3259dcce14539c8949fbff3152fe01393aa9e78",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],502889)},352290,207539,382644,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("601267a6272535b2fd7c6fc6542c9f87d6c25944dc",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,s],352290);let r=(0,t.createServerReference)("40331361e5c17195f9d0465a28076aab0f63d76013",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r],207539);let a=(0,t.createServerReference)("60ee4268e18658ca11a25fc44a40584e545b153e23",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],382644)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),a=e.i(472074),n=e.i(882651),i=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),x=e.i(519455),u=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(n.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:n,onContinueLatest:i}){let{t:l,locale:o}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(u.EmptyState,{icon:m.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),u=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let a=Math.floor(r/60);if(a<60)return`${a}m ${r%60}s`;let n=Math.floor(a/60);return`${n}h ${a%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",n=s.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===r?n:1===r?"zh"===t?`昨天 ${n}`:`Yesterday ${n}`:r<7?"zh"===t?`${r}天前 ${n}`:`${r}d ago ${n}`:s.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+n}(s.startedAt??null,o)}),u&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",u,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||l("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",l("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",l("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&n?(0,t.jsxs)(x.Button,{size:"sm",onClick:()=>n(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(x.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])},111114,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60b32d96afc12010ca0b2d2638c1f36cf9a7ae04c5",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,486077,e=>{"use strict";let t=(0,e.i(572989).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],486077)},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},244354,e=>{"use strict";async function t(e,s,r={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!a.ok)throw Error((await a.json()).error||`${s} failed`);return a.json()}e.s(["gitAction",0,t])},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let a=(0,t.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,a],755696);let n=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,n],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let l=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,l],719493);let o=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,o],436539)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),a=e.i(48019),n=e.i(782516),i=e.i(755696),l=e.i(886156),o=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),x=e.i(232280),u=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),M=e.i(755146),D=e.i(759684),L=e.i(337822),A=e.i(746798),F=e.i(776639),T=e.i(793479),B=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:a,currentBranch:n,localPath:i,onCreated:l,onError:c}){let{t:d}=(0,I.useI18n)(),[m,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(n),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,M]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(u(""),p(n),j(""),k(""))},[e,n]);let D=[...new Set(a)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),L=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),l();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(F.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(F.DialogHeader,{children:(0,t.jsx)(F.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(T.Input,{value:m,onChange:e=>u(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&L()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>M(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),M(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(B.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:L,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let R={modified:l.FileEdit,added:a.FilePlus,deleted:n.FileMinus,untracked:i.FileQuestion,renamed:l.FileEdit},z={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let a=e[t],n=t===e.length-1,i=e.slice(0,t+1).join("/");if(n)r.children.push({name:a,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===a);e||(e={name:a,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(D.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:a,tree:n,batchAction:i,batchLabel:l,batchIcon:o,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${a}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":l,children:o})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:n.map(e=>(0,t.jsx)(W,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function W({node:e,depth:a,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${a} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(u.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(W,{node:e,depth:a+1,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=R[j.status]||r.File,w=z[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>n(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":o??"",children:l}),o&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:o})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:a="project"}){let n="task"===a,{t:i}=(0,I.useI18n)(),[l,m]=(0,s.useState)(null),[u,D]=(0,s.useState)(!0),[F,T]=(0,s.useState)(""),[B,R]=(0,s.useState)(!1),[z,U]=(0,s.useState)(!1),[W,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{D(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(F.trim()){R(!0);try{await (0,P.gitAction)(e,"commit",{message:F}),T(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{R(!1)}}},ea=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},en=async t=>{V(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{V(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},el=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eo=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:F||void 0}),T(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=l?.topLevel??e;try{let a=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,a.content??"",s)}catch{r?.(t.file,"",s)}},ex=l?.changedFiles.filter(e=>e.staged)??[],eu=l?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(ex),[ex]),ep=(0,s.useMemo)(()=>G(eu),[eu]);if(u)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!l)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...l?.branches??[],...(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:n?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[n?(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:l?.currentBranch||"—"})]})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:l?.currentBranch||"—"})]}):(0,t.jsxs)(L.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(L.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l?.currentBranch||void 0,children:l?.currentBranch||"—"})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(L.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===l?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):el(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>el(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:ei,disabled:K,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${K?"animate-spin":""}`})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:F,onChange:e=>T(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:B||!F.trim()||0===ex.length,children:[B?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(M.DropdownMenu,{children:[(0,t.jsx)(M.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(M.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:er,disabled:!F.trim()||0===ex.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===eu.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===ex.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eh,disabled:0===eu.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",l.behind]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",l.ahead]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ei,disabled:K,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${K?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eo,disabled:0===l.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),l.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:n,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:ex.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:eu.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===l.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...l?.branches??[],...l?.remoteBranches??[]],currentBranch:l?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},14842,865514,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),a=e.i(232280),n=e.i(759686),i=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),x=e.i(624687),u=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:a}=(0,u.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,u.useI18n)(),r=e.split("\n"),a=r.length>500,n=a?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:n.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,u.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[M,D]=(0,s.useState)(!1),[L,A]=(0,s.useState)(""),[F,T]=(0,s.useState)(!1),B=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>D(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(n.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let s=v.has(e.filename),n=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&B(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:n,isLargeFold:!n&&i>200,onLoad:()=>B(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:M,onOpenChange:D,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(x.Textarea,{value:L,onChange:e=>A(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>D(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(L.trim()&&w){T(!0);try{await w(L.trim()),A(""),D(!1)}finally{T(!1)}}},disabled:!L.trim()||F,children:F?"...":y("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let j=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:r,taskId:a,taskTitle:n,baseBranch:i,fileCount:l,commitCount:d,commitLog:h=[],onMergeComplete:x}){let u=(0,g.useRouter)(),[f,p]=(0,s.useState)(!1),[b,w]=(0,s.useState)(null),N=async()=>{p(!0),w(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){r(!1),x(),u.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?w(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):w(t.error??"Merge failed")}catch{w("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(m.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:i})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:l})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]})]}),h.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:h.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),b&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:b})})]}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>r(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:N,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},271085,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("404d52059c47f9bd69cc1dc54c9a5b0b5329a4a5ce",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},3117,770358,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c0868c06b7af021524a56df961ada6682a134b71d",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],3117);let r=(0,t.createServerReference)("40c46a99d6959ba8c380e4f6ac7ccff4b78db03943",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],770358)},197031,410859,768980,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60c21cd0c7cd7695b5025277cba1d495f30a380a67",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,s],197031);let r=(0,t.createServerReference)("40b4445cc3e2279fb780c3b2568db04fc7660a2850",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r],410859);let a=(0,t.createServerReference)("60388df1e102fae171d9fb6a9c9fd58326555a7c05",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],768980)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),a=e.i(472074),n=e.i(882651),i=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),x=e.i(519455),u=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(n.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:n,onContinueLatest:i}){let{t:l,locale:o}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(u.EmptyState,{icon:m.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),u=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let a=Math.floor(r/60);if(a<60)return`${a}m ${r%60}s`;let n=Math.floor(a/60);return`${n}h ${a%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",n=s.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===r?n:1===r?"zh"===t?`昨天 ${n}`:`Yesterday ${n}`:r<7?"zh"===t?`${r}天前 ${n}`:`${r}d ago ${n}`:s.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+n}(s.startedAt??null,o)}),u&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",u,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||l("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",l("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",l("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&n?(0,t.jsxs)(x.Button,{size:"sm",onClick:()=>n(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(x.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])},17884,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60d8373e39ec46401ec71e909c20e9569c57c178d5",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},725111,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("403f6cd2a42a894f3241220ce550e1ccf61caebfb3",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}])},631675,e=>{"use strict";let t=(0,e.i(572989).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],631675)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let a=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,a],181209)},657374,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40bf757c5729cef17cc2c96073fa17f2ba3df7ea5e",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,a])},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},991838,e=>{"use strict";var t=e.i(965652),a=e.i(770303);e.s(["useExtension",0,function(e){let s=(0,t.useContext)(a.ExtensionContext);if(!s)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:s.statusMap[e],loading:s.loading,isInstalling:s.installing.has(e),install:()=>s.install(e),uninstall:()=>s.uninstall(e),refresh:()=>s.refresh(e)}}])}]);
|