tower-studio 0.2.20 → 0.2.22
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/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- 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 +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +25 -25
- 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.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.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.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.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +3 -2
- 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/sessions/route.js.nft.json +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.nft.json +1 -1
- 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.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +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]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +63 -63
- 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 +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +25 -25
- 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 +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +25 -25
- 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 +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +106 -82
- package/.next/standalone/.next/server/app/settings/page.js +2 -2
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +84 -84
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +78 -78
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +57 -57
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +59 -59
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +25 -25
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +64 -64
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +72 -72
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +43 -43
- 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/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +12 -0
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03j20vp._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05se6yk._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05~g1fm._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06m1r8x._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_6swdz._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hc9vir._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iyp~.k._.js +10 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o3iihg._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ogh_qu._.js +10 -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.piu~._.js +10 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qdvear._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0umocfj._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wuzc5o._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xot7fu._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z-k6vg._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
- 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/[root-of-the-server]__02-6df-._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0th0_fo._.js → [root-of-the-server]__03e009u._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e_-mj-._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fzkdjl._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0f72pl_._.js → [root-of-the-server]__0i~v.f0._.js} +2 -2
- 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]__0l1.bgv._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pu-v0l._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ty1ao1._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0um1ugs._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.hrt0s._.js → [root-of-the-server]__0vrp4wc._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__08mkpqd._.js → [root-of-the-server]__0x2jop0._.js} +2 -2
- 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]__134_xv.._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13vgkq5._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0es22_y._.js → _00xgezz._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0z-mopi._.js → _01xe7~b._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_12e_1hd._.js → _02o-w3k._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0564air._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0rqf5w7._.js → _05xdaz3._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_060_9cj._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0unw1fq._.js → _070t_mh._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0-zk1xq._.js → _075_.cb._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0_2c7e0._.js → _07ca~8h._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_10sx3n7._.js → _084ifnn._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_08z-g~5._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0_vjay8._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ncltnn._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ln8vj0._.js → _0qq3k6g._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0r6gweb._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rt8jf_._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0ueyys5._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0uuzh5m._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0nzwk2y._.js → _0z58pqh._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0mqxe~e._.js → _0zbuayb._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0~aon4t._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_07~q7qs._.js → _13dksil._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.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]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0153vha._.js → src_lib_0.aklj3._.js} +1 -1
- 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 +302 -278
- package/.next/standalone/.next/static/chunks/{08q54xdtb58sp.js → 0.onfoo7t4w-m.js} +1 -1
- package/.next/standalone/.next/static/chunks/0132~w09sg8ej.js +1 -0
- package/.next/standalone/.next/static/chunks/015m584n.xxu~.js +1 -0
- package/.next/standalone/.next/static/chunks/{1157qwl1lq-uv.js → 01fk6.8bw14.7.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0wzn4nbo56gf3.js → 01vvdks5yzk7x.js} +1 -1
- package/.next/standalone/.next/static/chunks/{15nh9t21_9u6i.js → 030g1-s.qdj2n.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0bxz4rml4iaob.js → 07ucj-4sybtq9.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0m90vde-l0h1a.js → 08vuh22p.47~b.js} +2 -2
- package/.next/standalone/.next/static/chunks/0_t-j983f5f0p.js +1 -0
- package/.next/standalone/.next/static/chunks/{0yje2relcvr6r.js → 0cn44krrztr-n.js} +1 -1
- package/.next/standalone/.next/static/chunks/{163o-5kdc6me5.js → 0feyhaj64gfd~.js} +1 -1
- package/.next/standalone/.next/static/chunks/0hf2igz3z1v.5.js +1 -0
- package/.next/standalone/.next/static/chunks/0htnxzje.8d3f.js +5 -0
- package/.next/standalone/.next/static/chunks/0lq9lfznfhl-6.js +1 -0
- package/.next/standalone/.next/static/chunks/0plqjpgas0ygu.js +1 -0
- package/.next/standalone/.next/static/chunks/0t92fwd6kv5j_.js +5 -0
- package/.next/standalone/.next/static/chunks/0tfc~d_oxesgk.js +5 -0
- package/.next/standalone/.next/static/chunks/{0mqdumoz_frlg.js → 0w1jry5z5w5~5.js} +1 -1
- package/.next/standalone/.next/static/chunks/0x3tiuoe.l18z.js +1 -0
- package/.next/standalone/.next/static/chunks/{11~-fm76bj3r4.js → 0y8ywrftfsnux.js} +1 -1
- package/.next/standalone/.next/static/chunks/11jg-t_iw_8i6.js +1 -0
- package/.next/standalone/.next/static/chunks/{0-93a_ovah-e0.js → 11x05y67gti4v.js} +1 -1
- package/.next/standalone/.next/static/chunks/11yv2zlsl_i7z.js +1 -0
- package/.next/standalone/.next/static/chunks/{0odb2p6e7-8n8.js → 13z_8s26xa~p1.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0m2o51rtidmxh.js → 15.pdp8xgoni1.js} +1 -1
- package/.next/standalone/.next/static/chunks/15vogvewouq8e.js +1 -0
- package/.next/standalone/package.json +1 -1
- package/dist/mcp-server.cjs +19 -5
- package/package.json +1 -1
- package/skills/tower/SKILL.md +9 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o3ggen._.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ntdmyn._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_09b8zgw._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_0fhds8v._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0tua.9p._.js +0 -3
- package/.next/standalone/.next/static/chunks/0.rw..0v.8a1-.js +0 -5
- package/.next/standalone/.next/static/chunks/08rokhw7bg_zn.js +0 -1
- package/.next/standalone/.next/static/chunks/0gh2r0ji~m34y.js +0 -1
- package/.next/standalone/.next/static/chunks/0j157xr-bax~d.js +0 -1
- package/.next/standalone/.next/static/chunks/0t0.k0pugrmxt.js +0 -1
- package/.next/standalone/.next/static/chunks/0vykez3mijj6f.js +0 -1
- package/.next/standalone/.next/static/chunks/0xrhj92idqx72.js +0 -5
- package/.next/standalone/.next/static/chunks/0yj4qfp~pk5na.js +0 -1
- package/.next/standalone/.next/static/chunks/0zk-aoc.g8t8h.js +0 -1
- package/.next/standalone/.next/static/chunks/0~7zlta-boej_.js +0 -1
- package/.next/standalone/.next/static/chunks/13wlh1lxhudv~.js +0 -1
- package/.next/standalone/.next/static/chunks/16pnb9m-vqs75.js +0 -5
- package/.next/standalone/.next/static/chunks/18aqm8uawnpl3.js +0 -1
- /package/.next/standalone/.next/static/{QK0JGDY3UZSvD1SQgyL-w → hA1HHDvQi_vSYi568JXho}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{QK0JGDY3UZSvD1SQgyL-w → hA1HHDvQi_vSYi568JXho}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{QK0JGDY3UZSvD1SQgyL-w → hA1HHDvQi_vSYi568JXho}/_ssgManifest.js +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[283857,a=>{"use strict";let b=(0,a.i(711796).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",0,b],283857)},324263,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);a.s(["ArrowUpFromLine",0,b],324263)},7285,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},140597,694116,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["default",0,b],694116),a.s(["File",0,b],140597)},771313,307373,646788,806671,114884,604456,703903,a=>{"use strict";var b=a.i(711796);let c=(0,b.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"}]]);a.s(["FilePlus",0,c],771313);let d=(0,b.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"}]]);a.s(["FileMinus",0,d],307373);let e=(0,b.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"}]]);a.s(["FileQuestion",0,e],646788);let f=(0,b.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"}]]);a.s(["FileEdit",0,f],806671);let g=(0,b.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);a.s(["ArrowDown",0,g],114884);let h=(0,b.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);a.s(["ArrowUp",0,h],604456);let i=(0,b.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["Minus",0,i],703903)},985716,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(140597),e=a.i(771313),f=a.i(307373),g=a.i(646788),h=a.i(806671),i=a.i(704494),j=a.i(114884),k=a.i(604456),l=a.i(668116),m=a.i(10390),n=a.i(442620),o=a.i(146758),p=a.i(703903),q=a.i(774881),r=a.i(336771),s=a.i(192369),t=a.i(607219),u=a.i(324263);let v=(0,a.i(711796).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 w=a.i(577565),x=a.i(573242),y=a.i(851378),z=a.i(975231),A=a.i(699570),B=a.i(335732),C=a.i(269876),D=a.i(785259),E=a.i(814574),F=a.i(866718),G=a.i(429246),H=a.i(951192);function I({open:a,onOpenChange:d,branches:e,currentBranch:f,localPath:g,onCreated:h,onError:j}){let{t:k}=(0,H.useI18n)(),[m,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(f),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(!1),[v,y]=(0,c.useState)(""),[z,B]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(o(""),q(f),s(""),y(""))},[a,f]);let C=[...new Set(e)].filter(a=>a.toLowerCase().includes(v.toLowerCase())),D=async()=>{if(m.trim()){u(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:g,branch:m.trim(),baseBranch:p})});if(a.ok)d(!1),h();else{let b=await a.json();j(b.error||"Unknown error")}}catch{j("Network error")}finally{u(!1)}}};return(0,b.jsx)(E.Dialog,{open:a,onOpenChange:d,children:(0,b.jsxs)(E.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(E.DialogHeader,{children:(0,b.jsx)(E.DialogTitle,{children:k("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.branchName")}),(0,b.jsx)(F.Input,{value:m,onChange:a=>o(a.target.value),placeholder:k("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&D()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>B(!z),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:p,children:p})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${z?"rotate-180":""}`})]}),z&&(0,b.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:v,onChange:a=>y(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:C.map(a=>(0,b.jsxs)("button",{onClick:()=>{q(a),B(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===p?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),a===p&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.branchDesc")}),(0,b.jsx)(G.Textarea,{value:r,onChange:a=>s(a.target.value),placeholder:k("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,b.jsxs)(E.DialogFooter,{children:[(0,b.jsx)(A.Button,{variant:"outline",onClick:()=>d(!1),children:k("common.cancel")}),(0,b.jsxs)(A.Button,{onClick:D,disabled:!m.trim()||t,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[t?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,k("common.create")]})]})]})})}var J=a.i(952313),K=a.i(7285);let L={modified:h.FileEdit,added:e.FilePlus,deleted:f.FileMinus,untracked:g.FileQuestion,renamed:h.FileEdit},M={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},N={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function O(a){let b={name:"",path:"",isDir:!0,children:[]};for(let c of a){let a=c.file.split("/"),d=b;for(let b=0;b<a.length;b++){let e=a[b],f=b===a.length-1,g=a.slice(0,b+1).join("/");if(f)d.children.push({name:e,path:g,isDir:!1,children:[],file:c});else{let a=d.children.find(a=>a.isDir&&a.name===e);a||(a={name:e,path:g,isDir:!0,children:[]},d.children.push(a)),d=a}}}return(function a(b){if(b.isDir&&(b.children=b.children.map(a),1===b.children.length&&b.children[0].isDir&&""!==b.name)){let a=b.children[0];return{...a,name:`${b.name}/${a.name}`}}return b})(b).children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name))}function P({label:a,count:d,labelColor:e,tree:f,batchAction:g,batchLabel:h,batchIcon:i,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r}){let[s,t]=(0,c.useState)(!0);return 0===d?null:(0,b.jsxs)("div",{className:"border-b border-border",children:[(0,b.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,b.jsxs)("button",{onClick:()=>t(!s),className:"flex items-center gap-1 flex-1 min-w-0",children:[s?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${e}`,children:[a," (",d,")"]})]}),(0,b.jsx)(A.Button,{variant:"ghost",size:"icon-xs",onClick:g,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":h,children:i})]}),s&&(0,b.jsx)("div",{className:"pb-1",children:f.map(a=>(0,b.jsx)(Q,{node:a,depth:0,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r},a.path))})]})}function Q({node:a,depth:e,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l}){let[p,q]=(0,c.useState)(!0),r={paddingLeft:`calc(${e} * 8px + 4px)`};if(a.isDir)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{onClick:()=>q(!p),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:r,children:[p?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsx)(o.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:a.name})]}),p&&a.children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name)).map(a=>(0,b.jsx)(Q,{node:a,depth:e+1,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l},a.path))]});let s=a.file,t=L[s.status]||d.File,u=M[s.status]||"text-muted-foreground",v=N[s.status]||"?";return(0,b.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:r,onClick:()=>f(s),children:[(0,b.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,b.jsx)(t,{className:`h-3.5 w-3.5 shrink-0 ${u}`}),(0,b.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:a.name}),(0,b.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${u}`,children:v}),j&&(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{onClick:a=>{a.stopPropagation(),j(s.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":l??"",children:k}),l&&(0,b.jsx)(D.TooltipContent,{side:"bottom",children:l})]}),(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{onClick:a=>{a.stopPropagation(),g(s.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":i??"",children:h}),i&&(0,b.jsx)(D.TooltipContent,{side:"bottom",children:i})]})]})}a.s(["EditorGitPanel",0,function({localPath:a,onFileSelect:d,mode:e="project"}){let f="task"===e,{t:g}=(0,H.useI18n)(),[h,m]=(0,c.useState)(null),[o,E]=(0,c.useState)(!0),[F,G]=(0,c.useState)(""),[L,M]=(0,c.useState)(!1),[N,Q]=(0,c.useState)(!1),[R,S]=(0,c.useState)(!1),[T,U]=(0,c.useState)(!1),[V,W]=(0,c.useState)(!1),[X,Y]=(0,c.useState)(""),Z=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(V)return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a);function a(a){Z.current&&!Z.current.contains(a.target)&&W(!1)}},[V]);let[$,_]=(0,c.useState)(!1),aa=(0,c.useCallback)(async()=>{try{let b=await fetch(`/api/git?path=${encodeURIComponent(a)}`);if(b.ok){let c=await b.json();m({changedFiles:c.changedFiles??[],ahead:c.ahead??0,behind:c.behind??0,remoteUrl:c.remoteUrl??"",currentBranch:c.currentBranch??"",branches:c.branches??[],remoteBranches:c.remoteBranches??[],topLevel:c.topLevel??a})}}catch{}finally{E(!1)}},[a]);(0,c.useEffect)(()=>{aa();let a=setInterval(aa,5e3);return()=>clearInterval(a)},[aa]);let ab=async b=>{try{await (0,K.gitAction)(a,"stage",{files:b}),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},ac=async b=>{try{await (0,K.gitAction)(a,"unstage",{files:b}),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},ad=async()=>{if(F.trim()){M(!0);try{await (0,K.gitAction)(a,"commit",{message:F}),G(""),J.toast.success(g("git.commitSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}finally{M(!1)}}},ae=async b=>{Q(!0);try{await (0,K.gitAction)(a,"pull",b?{branch:b}:{}),J.toast.success(g("git.pullSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}finally{Q(!1)}},af=async b=>{S(!0);try{await (0,K.gitAction)(a,"push",b?{branch:b}:{}),J.toast.success(g("git.pushSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}finally{S(!1)}},ag=async()=>{U(!0);try{await (0,K.gitAction)(a,"fetch"),J.toast.success(g("git.fetchSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}finally{U(!1)}},ah=async b=>{try{await (0,K.gitAction)(a,"checkout",{branch:b}),W(!1),J.toast.success(`${g("git.switchSuccess")} ${b}`),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},ai=async()=>{try{await (0,K.gitAction)(a,"stash-save",{message:F||void 0}),G(""),J.toast.success(g("git.stashSaved")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},aj=async()=>{try{await (0,K.gitAction)(a,"stash-pop",{index:0}),J.toast.success(g("git.stashApplied")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},ak=async b=>{try{await (0,K.gitAction)(a,"discard-file",{file:b}),J.toast.success(g("git.discardFileSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},al=async()=>{try{await (0,K.gitAction)(a,"discard-all"),J.toast.success(g("git.discardSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},am=async b=>{if("deleted"===b.status)return;let c=h?.topLevel??a;try{let e=await (0,K.gitAction)(a,"show",{file:b.file});d?.(b.file,e.content??"",c)}catch{d?.(b.file,"",c)}},an=h?.changedFiles.filter(a=>a.staged)??[],ao=h?.changedFiles.filter(a=>!a.staged)??[],ap=(0,c.useMemo)(()=>O(an),[an]),aq=(0,c.useMemo)(()=>O(ao),[ao]);if(o)return(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsx)(i.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!h)return null;function ar(a){let b=[];for(let c of a)c.isDir?b.push(...ar(c.children)):c.file&&b.push(c.file.file);return b}let as=[...h?.branches??[],...(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a))],at=X?as.filter(a=>a.toLowerCase().includes(X.toLowerCase())):as;return(0,b.jsxs)("div",{className:"flex flex-col h-full overflow-hidden",children:[(0,b.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[f?(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{render:(0,b.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,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:h?.currentBranch||"—"})]})}),(0,b.jsx)(D.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:h?.currentBranch||"—"})]}):(0,b.jsxs)("div",{className:"relative flex-1 min-w-0",ref:Z,children:[(0,b.jsxs)("button",{onClick:()=>{W(!V),Y("")},className:"flex w-full 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,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:h?.currentBranch||void 0,children:h?.currentBranch||"—"})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${V?"rotate-180":""}`})]}),V&&(0,b.jsxs)("div",{className:"absolute left-0 top-full z-30 mt-1 min-w-full w-max max-w-[320px] rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:X,onChange:a=>Y(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(h?.branches??[]).filter(a=>a.toLowerCase().includes(X.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.localBranches")}),(h?.branches??[]).filter(a=>a.toLowerCase().includes(X.toLowerCase())).map(a=>{let c=a===h?.currentBranch;return(0,b.jsxs)("button",{onClick:()=>{c?W(!1):ah(a)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${c?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),c&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${a}`)}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(X.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.remoteBranches")}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(X.toLowerCase())).map(a=>(0,b.jsxs)("button",{onClick:()=>ah(a),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,b.jsx)(y.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a})]},`remote-${a}`)),0===at.length&&(0,b.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{onClick:ag,disabled:T,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,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 ${T?"animate-spin":""}`})}),(0,b.jsx)(D.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{onClick:()=>{W(!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":g("git.createBranch"),children:(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(D.TooltipContent,{side:"bottom",children:g("git.createBranch")})]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,b.jsx)("textarea",{value:F,onChange:a=>G(a.target.value),placeholder:g("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:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&ad()}}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsxs)(A.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:ad,disabled:L||!F.trim()||0===an.length,children:[L?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(l.Check,{className:"h-3 w-3"}),g("git.commit")]}),(0,b.jsxs)(B.DropdownMenu,{children:[(0,b.jsx)(B.DropdownMenuTrigger,{render:(0,b.jsx)(A.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,b.jsx)(r.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)(B.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.commit")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ad,disabled:!F.trim()||0===an.length,children:[(0,b.jsx)(l.Check,{className:"h-3.5 w-3.5 mr-2"}),g("git.commit")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.changes")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ab(ar(aq)),disabled:0===ao.length,children:[(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5 mr-2"}),g("git.stageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ac(ar(ap)),disabled:0===an.length,children:[(0,b.jsx)(p.Minus,{className:"h-3.5 w-3.5 mr-2"}),g("git.unstageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:al,disabled:0===ao.length,children:[(0,b.jsx)(v,{className:"h-3.5 w-3.5 mr-2"}),g("git.discardAll")]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.sync")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pull")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),disabled:R,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.push")]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pullFrom"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.behind>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",h.behind]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:R,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.pushTo"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.ahead>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",h.ahead]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ag,disabled:T,children:[(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${T?"animate-spin":""}`}),g("git.fetchAll")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.stash")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ai,disabled:0===h.changedFiles.length,children:[(0,b.jsx)(t.Archive,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashSave")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:aj,children:[(0,b.jsx)(u.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashPopLatest")]})]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,b.jsx)(w.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),h.currentBranch]})]})]})]})]}),(0,b.jsxs)(C.ScrollArea,{className:"flex-1 min-h-0",children:[(0,b.jsx)(P,{label:g("git.stagedChanges"),count:an.length,labelColor:"text-emerald-400",tree:ap,batchAction:()=>ac(ar(ap)),batchLabel:g("git.unstageAll"),batchIcon:(0,b.jsx)(p.Minus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ac([a]),fileActionIcon:"−",fileActionLabel:g("git.unstageFile")}),(0,b.jsx)(P,{label:g("git.unstagedChanges"),count:ao.length,labelColor:"text-muted-foreground",tree:aq,batchAction:()=>ab(ar(aq)),batchLabel:g("git.stageAll"),batchIcon:(0,b.jsx)(q.Plus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ab([a]),fileActionIcon:"+",fileActionLabel:g("git.stageFile"),onFileSecondaryAction:a=>ak(a),fileSecondaryIcon:(0,b.jsx)(z.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:g("git.discardFile")}),0===h.changedFiles.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,b.jsx)(l.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g("git.noChanges")})]})]}),(0,b.jsx)(I,{open:$,onOpenChange:_,branches:[...h?.branches??[],...h?.remoteBranches??[]],currentBranch:h?.currentBranch??"",localPath:a,onCreated:async()=>{J.toast.success(g("git.createSuccess")),await aa()},onError:a=>J.toast.error(`${g("git.createFailed")}: ${a}`)})]})}],985716)},300141,639138,88757,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,c],300141);var d=a.i(728778),e=a.i(374637),f=a.i(10390),g=a.i(442620),h=a.i(811344),i=a.i(394869),j=a.i(207339),k=a.i(704494),l=a.i(699570),m=a.i(579834),n=a.i(786304),o=a.i(814574),p=a.i(429246),q=a.i(951192);function r({patchState:a,isLargeFold:b,onLoad:c}){let{t:e}=(0,q.useI18n)();return b?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,d.jsx)(l.Button,{variant:"link",onClick:c,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,d.jsx)("span",{children:e("diff.loadFailed")}),(0,d.jsx)(l.Button,{variant:"ghost",onClick:c,children:e("diff.retry")})]}):"binary"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,d.jsx)(s,{patch:a.patch??""}):(0,d.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,d.jsx)(k.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function s({patch:a}){let{t:b}=(0,q.useI18n)(),c=a.split("\n"),e=c.length>500,f=e?c.slice(0,500):c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let c=a.startsWith("+++")||a.startsWith("---")?"px-4 block text-muted-foreground":a.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,d.jsx)("span",{className:c,children:a||" "},b)})}),e&&(0,d.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:b("diff.patchTruncated",{n:String(500),total:String(c.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:c,totalRemoved:k,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,q.useI18n)(),[x,y]=(0,e.useState)(new Set),[z,A]=(0,e.useState)(new Map),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),H=b=>{A(a=>new Map(a).set(b,{kind:"loading"})),fetch(`/api/tasks/${a}/diff-patch?file=${encodeURIComponent(b)}`).then(a=>a.ok?a.json():Promise.reject(Error(`HTTP ${a.status}`))).then(a=>{A(c=>{let d=new Map(c);return"binary"===a.kind?d.set(b,{kind:"binary"}):"empty"===a.kind?d.set(b,{kind:"empty"}):d.set(b,{kind:"ready",patch:a.patch??""}),d})}).catch(()=>{A(a=>new Map(a).set(b,{kind:"error"}))})};return(0,d.jsxs)("div",{className:"flex flex-col h-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,d.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,d.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",c]}),(0,d.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",k]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,d.jsxs)(l.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,d.jsx)(j.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,d.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,d.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,d.jsx)(h.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,d.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,d.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,d.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,d.jsx)(m.EmptyState,{icon:i.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,d.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),c=z.get(a.filename),e=a.added+a.removed;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(l.Button,{variant:"ghost",type:"button",onClick:()=>{let b;return b=x.has(a.filename),void(y(b=>{let c=new Set(b);return c.has(a.filename)?c.delete(a.filename):c.add(a.filename),c}),b||a.isBinary||z.has(a.filename)||a.added+a.removed<=200&&H(a.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:[b?(0,d.jsx)(g.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,d.jsx)(f.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,d.jsx)(n.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,d.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,d.jsx)("div",{className:"border-t border-border bg-background",children:(0,d.jsx)(r,{filename:a.filename,patchState:c,isLargeFold:!c&&e>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,d.jsx)(o.Dialog,{open:B,onOpenChange:C,children:(0,d.jsxs)(o.DialogContent,{className:"max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsx)(o.DialogTitle,{children:w("diff.commitChanges")})}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:(0,d.jsx)(p.Textarea,{value:D,onChange:a=>E(a.target.value),placeholder:w("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,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,d.jsx)(l.Button,{onClick:async()=>{if(D.trim()&&u){G(!0);try{await u(D.trim()),E(""),C(!1)}finally{G(!1)}}},disabled:!D.trim()||F,children:F?"...":w("diff.commit")})]})]})})]})}],639138);var t=a.i(553798);let u=(0,b.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"}]]);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:b,taskId:c,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:j=[],onMergeComplete:m}){let n=(0,t.useRouter)(),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),v=async()=>{q(!0),s(null);try{let a=await fetch(`/api/tasks/${c}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){b(!1),m(),n.refresh();return}let d=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?s(`Merge conflicts detected: ${Array.isArray(d.conflictFiles)?d.conflictFiles.join(", "):"unknown files"}`):s(d.error??"Merge failed")}catch{s("Network error — merge failed")}finally{q(!1)}};return(0,d.jsx)(o.Dialog,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsxs)(o.DialogTitle,{className:"flex items-center gap-2",children:[(0,d.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,d.jsxs)("div",{className:"space-y-3 py-2",children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,d.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),j.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,d.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:j.map((a,b)=>(0,d.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},b))})]}),r&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,d.jsx)("p",{className:"text-xs text-red-400",children:r})})]}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"outline",onClick:()=>b(!1),disabled:p,children:"Cancel"}),(0,d.jsx)(l.Button,{onClick:v,disabled:p,className:"gap-2",children:p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],88757)},723503,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407261dd77a1aed555bfefb9fa4175dab402f0fc86",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},798126,921793,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("7c8e64a7609183658c499a723fb9ddc268c4b93828",b.callServer,void 0,b.findSourceMapURL,"startPtyExecutionSafe");a.s(["startPtyExecutionSafe",0,c],798126);let d=(0,b.createServerReference)("40dbd9d9ece00eafcf38ec3c043d66e6df7a649cc3",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,d],921793)},274346,30771,234438,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("605e1a419b1d57c71f50b31c285b559cc200822a7a",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],274346);let d=(0,b.createServerReference)("4080b66c619f2654a2fee839c95fd37ce187381c88",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],30771);let e=(0,b.createServerReference)("603f511232cbef05181f32fde7b4bedb5dedee225f",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],234438)},970535,359948,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,c],970535);let d=(0,b.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"}]]);a.s(["History",0,d],359948)},715525,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(442620),e=a.i(745539),f=a.i(913284),g=a.i(468862),h=a.i(704494),i=a.i(970535),j=a.i(165614),k=a.i(747798),l=a.i(283857),m=a.i(359948),n=a.i(699570),o=a.i(579834),p=a.i(951192);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m.History,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}])},613525,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("605021ab2307e226d867a3f69b8bb639a7acd99981",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_0fhds8v._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[300141,639138,88757,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,c],300141);var d=a.i(728778),e=a.i(374637),f=a.i(10390),g=a.i(442620),h=a.i(811344),i=a.i(394869),j=a.i(207339),k=a.i(704494),l=a.i(699570),m=a.i(579834),n=a.i(786304),o=a.i(814574),p=a.i(429246),q=a.i(951192);function r({patchState:a,isLargeFold:b,onLoad:c}){let{t:e}=(0,q.useI18n)();return b?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,d.jsx)(l.Button,{variant:"link",onClick:c,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,d.jsx)("span",{children:e("diff.loadFailed")}),(0,d.jsx)(l.Button,{variant:"ghost",onClick:c,children:e("diff.retry")})]}):"binary"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,d.jsx)(s,{patch:a.patch??""}):(0,d.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,d.jsx)(k.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function s({patch:a}){let{t:b}=(0,q.useI18n)(),c=a.split("\n"),e=c.length>500,f=e?c.slice(0,500):c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let c=a.startsWith("+++")||a.startsWith("---")?"px-4 block text-muted-foreground":a.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,d.jsx)("span",{className:c,children:a||" "},b)})}),e&&(0,d.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:b("diff.patchTruncated",{n:String(500),total:String(c.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:c,totalRemoved:k,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,q.useI18n)(),[x,y]=(0,e.useState)(new Set),[z,A]=(0,e.useState)(new Map),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),H=b=>{A(a=>new Map(a).set(b,{kind:"loading"})),fetch(`/api/tasks/${a}/diff-patch?file=${encodeURIComponent(b)}`).then(a=>a.ok?a.json():Promise.reject(Error(`HTTP ${a.status}`))).then(a=>{A(c=>{let d=new Map(c);return"binary"===a.kind?d.set(b,{kind:"binary"}):"empty"===a.kind?d.set(b,{kind:"empty"}):d.set(b,{kind:"ready",patch:a.patch??""}),d})}).catch(()=>{A(a=>new Map(a).set(b,{kind:"error"}))})};return(0,d.jsxs)("div",{className:"flex flex-col h-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,d.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,d.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",c]}),(0,d.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",k]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,d.jsxs)(l.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,d.jsx)(j.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,d.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,d.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,d.jsx)(h.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,d.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,d.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,d.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,d.jsx)(m.EmptyState,{icon:i.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,d.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),c=z.get(a.filename),e=a.added+a.removed;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(l.Button,{variant:"ghost",type:"button",onClick:()=>{let b;return b=x.has(a.filename),void(y(b=>{let c=new Set(b);return c.has(a.filename)?c.delete(a.filename):c.add(a.filename),c}),b||a.isBinary||z.has(a.filename)||a.added+a.removed<=200&&H(a.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:[b?(0,d.jsx)(g.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,d.jsx)(f.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,d.jsx)(n.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,d.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,d.jsx)("div",{className:"border-t border-border bg-background",children:(0,d.jsx)(r,{filename:a.filename,patchState:c,isLargeFold:!c&&e>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,d.jsx)(o.Dialog,{open:B,onOpenChange:C,children:(0,d.jsxs)(o.DialogContent,{className:"max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsx)(o.DialogTitle,{children:w("diff.commitChanges")})}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:(0,d.jsx)(p.Textarea,{value:D,onChange:a=>E(a.target.value),placeholder:w("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,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,d.jsx)(l.Button,{onClick:async()=>{if(D.trim()&&u){G(!0);try{await u(D.trim()),E(""),C(!1)}finally{G(!1)}}},disabled:!D.trim()||F,children:F?"...":w("diff.commit")})]})]})})]})}],639138);var t=a.i(553798);let u=(0,b.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"}]]);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:b,taskId:c,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:j=[],onMergeComplete:m}){let n=(0,t.useRouter)(),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),v=async()=>{q(!0),s(null);try{let a=await fetch(`/api/tasks/${c}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){b(!1),m(),n.refresh();return}let d=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?s(`Merge conflicts detected: ${Array.isArray(d.conflictFiles)?d.conflictFiles.join(", "):"unknown files"}`):s(d.error??"Merge failed")}catch{s("Network error — merge failed")}finally{q(!1)}};return(0,d.jsx)(o.Dialog,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsxs)(o.DialogTitle,{className:"flex items-center gap-2",children:[(0,d.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,d.jsxs)("div",{className:"space-y-3 py-2",children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,d.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),j.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,d.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:j.map((a,b)=>(0,d.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},b))})]}),r&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,d.jsx)("p",{className:"text-xs text-red-400",children:r})})]}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"outline",onClick:()=>b(!1),disabled:p,children:"Cancel"}),(0,d.jsx)(l.Button,{onClick:v,disabled:p,className:"gap-2",children:p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],88757)},140597,694116,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["default",0,b],694116),a.s(["File",0,b],140597)},970535,359948,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,c],970535);let d=(0,b.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"}]]);a.s(["History",0,d],359948)},7285,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},771313,307373,646788,806671,114884,604456,703903,a=>{"use strict";var b=a.i(711796);let c=(0,b.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"}]]);a.s(["FilePlus",0,c],771313);let d=(0,b.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"}]]);a.s(["FileMinus",0,d],307373);let e=(0,b.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"}]]);a.s(["FileQuestion",0,e],646788);let f=(0,b.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"}]]);a.s(["FileEdit",0,f],806671);let g=(0,b.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);a.s(["ArrowDown",0,g],114884);let h=(0,b.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);a.s(["ArrowUp",0,h],604456);let i=(0,b.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["Minus",0,i],703903)},324263,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);a.s(["ArrowUpFromLine",0,b],324263)},985716,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(140597),e=a.i(771313),f=a.i(307373),g=a.i(646788),h=a.i(806671),i=a.i(704494),j=a.i(114884),k=a.i(604456),l=a.i(668116),m=a.i(10390),n=a.i(442620),o=a.i(146758),p=a.i(703903),q=a.i(774881),r=a.i(336771),s=a.i(192369),t=a.i(607219),u=a.i(324263);let v=(0,a.i(711796).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 w=a.i(577565),x=a.i(573242),y=a.i(851378),z=a.i(975231),A=a.i(699570),B=a.i(335732),C=a.i(269876),D=a.i(785259),E=a.i(814574),F=a.i(866718),G=a.i(429246),H=a.i(951192);function I({open:a,onOpenChange:d,branches:e,currentBranch:f,localPath:g,onCreated:h,onError:j}){let{t:k}=(0,H.useI18n)(),[m,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(f),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(!1),[v,y]=(0,c.useState)(""),[z,B]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(o(""),q(f),s(""),y(""))},[a,f]);let C=[...new Set(e)].filter(a=>a.toLowerCase().includes(v.toLowerCase())),D=async()=>{if(m.trim()){u(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:g,branch:m.trim(),baseBranch:p})});if(a.ok)d(!1),h();else{let b=await a.json();j(b.error||"Unknown error")}}catch{j("Network error")}finally{u(!1)}}};return(0,b.jsx)(E.Dialog,{open:a,onOpenChange:d,children:(0,b.jsxs)(E.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(E.DialogHeader,{children:(0,b.jsx)(E.DialogTitle,{children:k("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.branchName")}),(0,b.jsx)(F.Input,{value:m,onChange:a=>o(a.target.value),placeholder:k("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&D()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>B(!z),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:p,children:p})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${z?"rotate-180":""}`})]}),z&&(0,b.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:v,onChange:a=>y(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:C.map(a=>(0,b.jsxs)("button",{onClick:()=>{q(a),B(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===p?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),a===p&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.branchDesc")}),(0,b.jsx)(G.Textarea,{value:r,onChange:a=>s(a.target.value),placeholder:k("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,b.jsxs)(E.DialogFooter,{children:[(0,b.jsx)(A.Button,{variant:"outline",onClick:()=>d(!1),children:k("common.cancel")}),(0,b.jsxs)(A.Button,{onClick:D,disabled:!m.trim()||t,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[t?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,k("common.create")]})]})]})})}var J=a.i(952313),K=a.i(7285);let L={modified:h.FileEdit,added:e.FilePlus,deleted:f.FileMinus,untracked:g.FileQuestion,renamed:h.FileEdit},M={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},N={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function O(a){let b={name:"",path:"",isDir:!0,children:[]};for(let c of a){let a=c.file.split("/"),d=b;for(let b=0;b<a.length;b++){let e=a[b],f=b===a.length-1,g=a.slice(0,b+1).join("/");if(f)d.children.push({name:e,path:g,isDir:!1,children:[],file:c});else{let a=d.children.find(a=>a.isDir&&a.name===e);a||(a={name:e,path:g,isDir:!0,children:[]},d.children.push(a)),d=a}}}return(function a(b){if(b.isDir&&(b.children=b.children.map(a),1===b.children.length&&b.children[0].isDir&&""!==b.name)){let a=b.children[0];return{...a,name:`${b.name}/${a.name}`}}return b})(b).children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name))}function P({label:a,count:d,labelColor:e,tree:f,batchAction:g,batchLabel:h,batchIcon:i,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r}){let[s,t]=(0,c.useState)(!0);return 0===d?null:(0,b.jsxs)("div",{className:"border-b border-border",children:[(0,b.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,b.jsxs)("button",{onClick:()=>t(!s),className:"flex items-center gap-1 flex-1 min-w-0",children:[s?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${e}`,children:[a," (",d,")"]})]}),(0,b.jsx)(A.Button,{variant:"ghost",size:"icon-xs",onClick:g,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":h,children:i})]}),s&&(0,b.jsx)("div",{className:"pb-1",children:f.map(a=>(0,b.jsx)(Q,{node:a,depth:0,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r},a.path))})]})}function Q({node:a,depth:e,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l}){let[p,q]=(0,c.useState)(!0),r={paddingLeft:`calc(${e} * 8px + 4px)`};if(a.isDir)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{onClick:()=>q(!p),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:r,children:[p?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsx)(o.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:a.name})]}),p&&a.children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name)).map(a=>(0,b.jsx)(Q,{node:a,depth:e+1,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l},a.path))]});let s=a.file,t=L[s.status]||d.File,u=M[s.status]||"text-muted-foreground",v=N[s.status]||"?";return(0,b.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:r,onClick:()=>f(s),children:[(0,b.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,b.jsx)(t,{className:`h-3.5 w-3.5 shrink-0 ${u}`}),(0,b.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:a.name}),(0,b.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${u}`,children:v}),j&&(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{onClick:a=>{a.stopPropagation(),j(s.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":l??"",children:k}),l&&(0,b.jsx)(D.TooltipContent,{side:"bottom",children:l})]}),(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{onClick:a=>{a.stopPropagation(),g(s.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":i??"",children:h}),i&&(0,b.jsx)(D.TooltipContent,{side:"bottom",children:i})]})]})}a.s(["EditorGitPanel",0,function({localPath:a,onFileSelect:d,mode:e="project"}){let f="task"===e,{t:g}=(0,H.useI18n)(),[h,m]=(0,c.useState)(null),[o,E]=(0,c.useState)(!0),[F,G]=(0,c.useState)(""),[L,M]=(0,c.useState)(!1),[N,Q]=(0,c.useState)(!1),[R,S]=(0,c.useState)(!1),[T,U]=(0,c.useState)(!1),[V,W]=(0,c.useState)(!1),[X,Y]=(0,c.useState)(""),Z=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(V)return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a);function a(a){Z.current&&!Z.current.contains(a.target)&&W(!1)}},[V]);let[$,_]=(0,c.useState)(!1),aa=(0,c.useCallback)(async()=>{try{let b=await fetch(`/api/git?path=${encodeURIComponent(a)}`);if(b.ok){let c=await b.json();m({changedFiles:c.changedFiles??[],ahead:c.ahead??0,behind:c.behind??0,remoteUrl:c.remoteUrl??"",currentBranch:c.currentBranch??"",branches:c.branches??[],remoteBranches:c.remoteBranches??[],topLevel:c.topLevel??a})}}catch{}finally{E(!1)}},[a]);(0,c.useEffect)(()=>{aa();let a=setInterval(aa,5e3);return()=>clearInterval(a)},[aa]);let ab=async b=>{try{await (0,K.gitAction)(a,"stage",{files:b}),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},ac=async b=>{try{await (0,K.gitAction)(a,"unstage",{files:b}),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},ad=async()=>{if(F.trim()){M(!0);try{await (0,K.gitAction)(a,"commit",{message:F}),G(""),J.toast.success(g("git.commitSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}finally{M(!1)}}},ae=async b=>{Q(!0);try{await (0,K.gitAction)(a,"pull",b?{branch:b}:{}),J.toast.success(g("git.pullSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}finally{Q(!1)}},af=async b=>{S(!0);try{await (0,K.gitAction)(a,"push",b?{branch:b}:{}),J.toast.success(g("git.pushSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}finally{S(!1)}},ag=async()=>{U(!0);try{await (0,K.gitAction)(a,"fetch"),J.toast.success(g("git.fetchSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}finally{U(!1)}},ah=async b=>{try{await (0,K.gitAction)(a,"checkout",{branch:b}),W(!1),J.toast.success(`${g("git.switchSuccess")} ${b}`),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},ai=async()=>{try{await (0,K.gitAction)(a,"stash-save",{message:F||void 0}),G(""),J.toast.success(g("git.stashSaved")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},aj=async()=>{try{await (0,K.gitAction)(a,"stash-pop",{index:0}),J.toast.success(g("git.stashApplied")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},ak=async b=>{try{await (0,K.gitAction)(a,"discard-file",{file:b}),J.toast.success(g("git.discardFileSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},al=async()=>{try{await (0,K.gitAction)(a,"discard-all"),J.toast.success(g("git.discardSuccess")),await aa()}catch(a){J.toast.error(a instanceof Error?a.message:String(a))}},am=async b=>{if("deleted"===b.status)return;let c=h?.topLevel??a;try{let e=await (0,K.gitAction)(a,"show",{file:b.file});d?.(b.file,e.content??"",c)}catch{d?.(b.file,"",c)}},an=h?.changedFiles.filter(a=>a.staged)??[],ao=h?.changedFiles.filter(a=>!a.staged)??[],ap=(0,c.useMemo)(()=>O(an),[an]),aq=(0,c.useMemo)(()=>O(ao),[ao]);if(o)return(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsx)(i.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!h)return null;function ar(a){let b=[];for(let c of a)c.isDir?b.push(...ar(c.children)):c.file&&b.push(c.file.file);return b}let as=[...h?.branches??[],...(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a))],at=X?as.filter(a=>a.toLowerCase().includes(X.toLowerCase())):as;return(0,b.jsxs)("div",{className:"flex flex-col h-full overflow-hidden",children:[(0,b.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[f?(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{render:(0,b.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,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:h?.currentBranch||"—"})]})}),(0,b.jsx)(D.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:h?.currentBranch||"—"})]}):(0,b.jsxs)("div",{className:"relative flex-1 min-w-0",ref:Z,children:[(0,b.jsxs)("button",{onClick:()=>{W(!V),Y("")},className:"flex w-full 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,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:h?.currentBranch||void 0,children:h?.currentBranch||"—"})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${V?"rotate-180":""}`})]}),V&&(0,b.jsxs)("div",{className:"absolute left-0 top-full z-30 mt-1 min-w-full w-max max-w-[320px] rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:X,onChange:a=>Y(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(h?.branches??[]).filter(a=>a.toLowerCase().includes(X.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.localBranches")}),(h?.branches??[]).filter(a=>a.toLowerCase().includes(X.toLowerCase())).map(a=>{let c=a===h?.currentBranch;return(0,b.jsxs)("button",{onClick:()=>{c?W(!1):ah(a)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${c?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),c&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${a}`)}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(X.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.remoteBranches")}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(X.toLowerCase())).map(a=>(0,b.jsxs)("button",{onClick:()=>ah(a),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,b.jsx)(y.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a})]},`remote-${a}`)),0===at.length&&(0,b.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{onClick:ag,disabled:T,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,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 ${T?"animate-spin":""}`})}),(0,b.jsx)(D.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,b.jsxs)(D.Tooltip,{children:[(0,b.jsx)(D.TooltipTrigger,{onClick:()=>{W(!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":g("git.createBranch"),children:(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(D.TooltipContent,{side:"bottom",children:g("git.createBranch")})]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,b.jsx)("textarea",{value:F,onChange:a=>G(a.target.value),placeholder:g("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:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&ad()}}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsxs)(A.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:ad,disabled:L||!F.trim()||0===an.length,children:[L?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(l.Check,{className:"h-3 w-3"}),g("git.commit")]}),(0,b.jsxs)(B.DropdownMenu,{children:[(0,b.jsx)(B.DropdownMenuTrigger,{render:(0,b.jsx)(A.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,b.jsx)(r.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)(B.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.commit")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ad,disabled:!F.trim()||0===an.length,children:[(0,b.jsx)(l.Check,{className:"h-3.5 w-3.5 mr-2"}),g("git.commit")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.changes")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ab(ar(aq)),disabled:0===ao.length,children:[(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5 mr-2"}),g("git.stageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ac(ar(ap)),disabled:0===an.length,children:[(0,b.jsx)(p.Minus,{className:"h-3.5 w-3.5 mr-2"}),g("git.unstageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:al,disabled:0===ao.length,children:[(0,b.jsx)(v,{className:"h-3.5 w-3.5 mr-2"}),g("git.discardAll")]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.sync")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pull")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),disabled:R,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.push")]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pullFrom"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.behind>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",h.behind]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:R,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.pushTo"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.ahead>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",h.ahead]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ag,disabled:T,children:[(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${T?"animate-spin":""}`}),g("git.fetchAll")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.stash")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ai,disabled:0===h.changedFiles.length,children:[(0,b.jsx)(t.Archive,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashSave")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:aj,children:[(0,b.jsx)(u.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashPopLatest")]})]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,b.jsx)(w.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),h.currentBranch]})]})]})]})]}),(0,b.jsxs)(C.ScrollArea,{className:"flex-1 min-h-0",children:[(0,b.jsx)(P,{label:g("git.stagedChanges"),count:an.length,labelColor:"text-emerald-400",tree:ap,batchAction:()=>ac(ar(ap)),batchLabel:g("git.unstageAll"),batchIcon:(0,b.jsx)(p.Minus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ac([a]),fileActionIcon:"−",fileActionLabel:g("git.unstageFile")}),(0,b.jsx)(P,{label:g("git.unstagedChanges"),count:ao.length,labelColor:"text-muted-foreground",tree:aq,batchAction:()=>ab(ar(aq)),batchLabel:g("git.stageAll"),batchIcon:(0,b.jsx)(q.Plus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ab([a]),fileActionIcon:"+",fileActionLabel:g("git.stageFile"),onFileSecondaryAction:a=>ak(a),fileSecondaryIcon:(0,b.jsx)(z.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:g("git.discardFile")}),0===h.changedFiles.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,b.jsx)(l.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g("git.noChanges")})]})]}),(0,b.jsx)(I,{open:$,onOpenChange:_,branches:[...h?.branches??[],...h?.remoteBranches??[]],currentBranch:h?.currentBranch??"",localPath:a,onCreated:async()=>{J.toast.success(g("git.createSuccess")),await aa()},onError:a=>J.toast.error(`${g("git.createFailed")}: ${a}`)})]})}],985716)},613525,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("605021ab2307e226d867a3f69b8bb639a7acd99981",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])},798126,921793,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("7c8e64a7609183658c499a723fb9ddc268c4b93828",b.callServer,void 0,b.findSourceMapURL,"startPtyExecutionSafe");a.s(["startPtyExecutionSafe",0,c],798126);let d=(0,b.createServerReference)("40dbd9d9ece00eafcf38ec3c043d66e6df7a649cc3",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,d],921793)},723503,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407261dd77a1aed555bfefb9fa4175dab402f0fc86",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},274346,30771,234438,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("605e1a419b1d57c71f50b31c285b559cc200822a7a",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],274346);let d=(0,b.createServerReference)("4080b66c619f2654a2fee839c95fd37ce187381c88",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],30771);let e=(0,b.createServerReference)("603f511232cbef05181f32fde7b4bedb5dedee225f",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],234438)},283857,a=>{"use strict";let b=(0,a.i(711796).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",0,b],283857)},715525,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(442620),e=a.i(745539),f=a.i(913284),g=a.i(468862),h=a.i(704494),i=a.i(970535),j=a.i(165614),k=a.i(747798),l=a.i(283857),m=a.i(359948),n=a.i(699570),o=a.i(579834),p=a.i(951192);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m.History,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_0tua.9p._.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,938123,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40170991334b245c08bece90b1660e14a693a6a94d",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,r])},456346,317056,43811,848692,e=>{"use strict";let t,r,n,a=(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,a],456346);var o,i,l,u,s,c,d,f,p,m=e.i(289721),v=/[\\\/_+.#"@\[\(\{&]/,h=/[\\\/_+.#"@\[\(\{&]/g,g=/[\s-]/,b=/[\s-]/g;function y(e){return e.toLowerCase().replace(b," ")}var x=e.i(965652);function E(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function w(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function C(...e){return t=>{let r=!1,n=e.map(e=>{let n=w(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():w(e[t],null)}}}}function k(...e){return x.useCallback(C(...e),e)}"u">typeof window&&window.document&&window.document.createElement;var S=globalThis?.document?x.useLayoutEffect:()=>{},N=x[" useId ".trim().toString()]||(()=>void 0),j=0;function R(e){let[t,r]=x.useState(N());return S(()=>{e||r(e=>e??String(j++))},[e]),e||(t?`radix-${t}`:"")}x[" useEffectEvent ".trim().toString()],x[" useInsertionEffect ".trim().toString()];var I=x[" useInsertionEffect ".trim().toString()]||S;Symbol("RADIX:SYNC_STATE");var D=e.i(585012);function P(e){var t;let r,n=(t=e,(r=x.forwardRef((e,t)=>{let{children:r,...n}=e;if(x.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),l=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==x.Fragment&&(l.ref=t?C(t,i):i),x.cloneElement(r,l)}return x.Children.count(r)>1?x.Children.only(null):null})).displayName=`${t}.SlotClone`,r),a=x.forwardRef((e,t)=>{let{children:r,...a}=e,o=x.Children.toArray(r),i=o.find(A);if(i){let e=i.props.children,r=o.map(t=>t!==i?t:x.Children.count(e)>1?x.Children.only(null):x.isValidElement(e)?e.props.children:null);return(0,m.jsx)(n,{...a,ref:t,children:x.isValidElement(e)?x.cloneElement(e,void 0,r):null})}return(0,m.jsx)(n,{...a,ref:t,children:r})});return a.displayName=`${e}.Slot`,a}var M=Symbol("radix.slottable");function A(e){return x.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===M}var O=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=P(`Primitive.${t}`),n=x.forwardRef((e,n)=>{let{asChild:a,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,m.jsx)(a?r:t,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function L(e){let t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...e)=>t.current?.(...e),[])}var T="dismissableLayer.update",_=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$=x.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:l,...u}=e,s=x.useContext(_),[c,d]=x.useState(null),p=c?.ownerDocument??globalThis?.document,[,v]=x.useState({}),h=k(t,e=>d(e)),g=Array.from(s.layers),[b]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=c?g.indexOf(c):-1,C=s.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,N=function(e,t=globalThis?.document){let r=L(e),n=x.useRef(!1),a=x.useRef(()=>{});return x.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){W("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=n,t.addEventListener("click",a.current,{once:!0})):n()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...s.branches].some(e=>e.contains(t));S&&!r&&(a?.(e),i?.(e),e.defaultPrevented||l?.())},p),j=function(e,t=globalThis?.document){let r=L(e),n=x.useRef(!1);return x.useEffect(()=>{let e=e=>{e.target&&!n.current&&W("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;![...s.branches].some(e=>e.contains(t))&&(o?.(e),i?.(e),e.defaultPrevented||l?.())},p);return!function(e,t=globalThis?.document){let r=L(e);x.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{w===s.layers.size-1&&(n?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},p),x.useEffect(()=>{if(c)return r&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(f=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),F(),()=>{r&&1===s.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=f)}},[c,p,r,s]),x.useEffect(()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),F())},[c,s]),x.useEffect(()=>{let e=()=>v({});return document.addEventListener(T,e),()=>document.removeEventListener(T,e)},[]),(0,m.jsx)(O.div,{...u,ref:h,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:E(e.onFocusCapture,j.onFocusCapture),onBlurCapture:E(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:E(e.onPointerDownCapture,N.onPointerDownCapture)})});function F(){let e=new CustomEvent(T);document.dispatchEvent(e)}function W(e,t,r,{discrete:n}){let a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});if(t&&a.addEventListener(e,t,{once:!0}),n)a&&D.flushSync(()=>a.dispatchEvent(o));else a.dispatchEvent(o)}$.displayName="DismissableLayer",x.forwardRef((e,t)=>{let r=x.useContext(_),n=x.useRef(null),a=k(t,n);return x.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,m.jsx)(O.div,{...e,ref:a})}).displayName="DismissableLayerBranch";var B="focusScope.autoFocusOnMount",U="focusScope.autoFocusOnUnmount",z={bubbles:!1,cancelable:!0},K=x.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[l,u]=x.useState(null),s=L(a),c=L(o),d=x.useRef(null),f=k(t,e=>u(e)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let e=function(e){if(p.paused||!l)return;let t=e.target;l.contains(t)?d.current=t:q(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||q(d.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&q(l)});return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,l,p.paused]),x.useEffect(()=>{if(l){Y.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(B,z);l.addEventListener(B,s),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(q(n,{select:t}),document.activeElement!==r)return}(V(l).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&q(l))}return()=>{l.removeEventListener(B,s),setTimeout(()=>{let t=new CustomEvent(U,z);l.addEventListener(U,c),l.dispatchEvent(t),t.defaultPrevented||q(e??document.body,{select:!0}),l.removeEventListener(U,c),Y.remove(p)},0)}}},[l,s,c,p]);let v=x.useCallback(e=>{if(!r&&!n||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){var o;let t,n=e.currentTarget,[i,l]=[H(t=V(o=n),o),H(t.reverse(),o)];i&&l?e.shiftKey||a!==l?e.shiftKey&&a===i&&(e.preventDefault(),r&&q(l,{select:!0})):(e.preventDefault(),r&&q(i,{select:!0})):a===n&&e.preventDefault()}},[r,n,p.paused]);return(0,m.jsx)(O.div,{tabIndex:-1,...i,ref:f,onKeyDown:v})});function V(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function H(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function q(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}K.displayName="FocusScope";var Y=(n=[],{add(e){let t=n[0];e!==t&&t?.pause(),(n=G(n,e)).unshift(e)},remove(e){n=G(n,e),n[0]?.resume()}});function G(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var X=x.forwardRef((e,t)=>{let{container:r,...n}=e,[a,o]=x.useState(!1);S(()=>o(!0),[]);let i=r||a&&globalThis?.document?.body;return i?D.default.createPortal((0,m.jsx)(O.div,{...n,ref:t}),i):null});X.displayName="Portal";var Z=e=>{var t;let r,n,{present:a,children:o}=e,i=function(e){var t,r;let[n,a]=x.useState(),o=x.useRef(null),i=x.useRef(e),l=x.useRef("none"),[u,s]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},x.useReducer((e,t)=>r[e][t]??e,t));return x.useEffect(()=>{let e=J(o.current);l.current="mounted"===u?e:"none"},[u]),S(()=>{let t=o.current,r=i.current;if(r!==e){let n=l.current,a=J(t);e?s("MOUNT"):"none"===a||t?.display==="none"?s("UNMOUNT"):r&&n!==a?s("ANIMATION_OUT"):s("UNMOUNT"),i.current=e}},[e,s]),S(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let a=J(o.current).includes(CSS.escape(r.animationName));if(r.target===n&&a&&(s("ANIMATION_END"),!i.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},a=e=>{e.target===n&&(l.current=J(o.current))};return n.addEventListener("animationstart",a),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",a),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}s("ANIMATION_END")},[n,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:x.useCallback(e=>{o.current=e?getComputedStyle(e):null,a(e)},[])}}(a),l="function"==typeof o?o({present:i.isPresent}):x.Children.only(o),u=k(i.ref,(t=l,(n=(r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof o||i.isPresent?x.cloneElement(l,{ref:u}):null};function J(e){return e?.animationName||"none"}Z.displayName="Presence";var Q=0;function ee(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var et=function(){return(et=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function er(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var en=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),ea="width-before-scroll-bar";function eo(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ei="u">typeof window?x.useLayoutEffect:x.useEffect,el=new WeakMap,eu=(void 0===o&&(o={}),(void 0===i&&(i=function(e){return e}),l=[],u=!1,s={read:function(){if(u)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:null},useMedium:function(e){var t=i(e,u);return l.push(t),function(){l=l.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(u=!0;l.length;){var t=l;l=[],t.forEach(e)}l={push:function(t){return e(t)},filter:function(){return l}}},assignMedium:function(e){u=!0;var t=[];if(l.length){var r=l;l=[],r.forEach(e),t=l}var n=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(n)};a(),l={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),l}}}}).options=et({async:!0,ssr:!1},o),s),es=function(){},ec=x.forwardRef(function(e,t){var r,n,a,o,i=x.useRef(null),l=x.useState({onScrollCapture:es,onWheelCapture:es,onTouchMoveCapture:es}),u=l[0],s=l[1],c=e.forwardProps,d=e.children,f=e.className,p=e.removeScrollBar,m=e.enabled,v=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,y=e.inert,E=e.allowPinchZoom,w=e.as,C=e.gapMode,k=er(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=(r=[i,t],n=function(e){return r.forEach(function(t){return eo(t,e)})},(a=(0,x.useState)(function(){return{value:null,callback:n,facade:{get current(){return a.value},set current(value){var e=a.value;e!==value&&(a.value=value,a.callback(value,e))}}}})[0]).callback=n,o=a.facade,ei(function(){var e=el.get(o);if(e){var t=new Set(e),n=new Set(r),a=o.current;t.forEach(function(e){n.has(e)||eo(e,null)}),n.forEach(function(e){t.has(e)||eo(e,a)})}el.set(o,r)},[r]),o),N=et(et({},k),u);return x.createElement(x.Fragment,null,m&&x.createElement(h,{sideCar:eu,removeScrollBar:p,shards:v,noRelative:g,noIsolation:b,inert:y,setCallbacks:s,allowPinchZoom:!!E,lockRef:i,gapMode:C}),c?x.cloneElement(x.Children.only(d),et(et({},N),{ref:S})):x.createElement(void 0===w?"div":w,et({},N,{className:f,ref:S}),d))});ec.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ec.classNames={fullWidth:ea,zeroRight:en};var ed=function(e){var t=e.sideCar,r=er(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return x.createElement(n,et({},r))};ed.isSideCarExport=!0;var ef=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=p||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var n,a;(n=t).styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ep=function(){var e=ef();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},em=function(){var e=ep();return function(t){return e(t.styles,t.dynamic),null}},ev={left:0,top:0,right:0,gap:0},eh=function(e){return parseInt(e||"",10)||0},eg=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[eh(r),eh(n),eh(a)]},eb=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return ev;var t=eg(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ey=em(),ex="data-scroll-locked",eE=function(e,t,r,n){var a=e.left,o=e.top,i=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(ex,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(en," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(ea," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(en," .").concat(en," {\n right: 0 ").concat(n,";\n }\n \n .").concat(ea," .").concat(ea," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(ex,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},ew=function(){var e=parseInt(document.body.getAttribute(ex)||"0",10);return isFinite(e)?e:0},eC=function(){x.useEffect(function(){return document.body.setAttribute(ex,(ew()+1).toString()),function(){var e=ew()-1;e<=0?document.body.removeAttribute(ex):document.body.setAttribute(ex,e.toString())}},[])},ek=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=void 0===n?"margin":n;eC();var o=x.useMemo(function(){return eb(a)},[a]);return x.createElement(ey,{styles:eE(o,!t,a,r?"":"!important")})},eS=!1;if("u">typeof window)try{var eN=Object.defineProperty({},"passive",{get:function(){return eS=!0,!0}});window.addEventListener("test",eN,eN),window.removeEventListener("test",eN,eN)}catch(e){eS=!1}var ej=!!eS&&{passive:!1},eR=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},eI=function(e,t){var r=t.ownerDocument,n=t;do{if("u">typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),eD(e,n)){var a=eP(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body)return!1},eD=function(e,t){return"v"===e?eR(t,"overflowY"):eR(t,"overflowX")},eP=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},eM=function(e,t,r,n,a){var o,i=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),l=i*n,u=r.target,s=t.contains(u),c=!1,d=l>0,f=0,p=0;do{if(!u)break;var m=eP(e,u),v=m[0],h=m[1]-m[2]-i*v;(v||h)&&eD(e,u)&&(f+=h,p+=v);var g=u.parentNode;u=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!s&&u!==document.body||s&&(t.contains(u)||t===u))return d&&(a&&1>Math.abs(f)||!a&&l>f)?c=!0:!d&&(a&&1>Math.abs(p)||!a&&-l>p)&&(c=!0),c},eA=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eO=function(e){return[e.deltaX,e.deltaY]},eL=function(e){return e&&"current"in e?e.current:e},eT=0,e_=[];let e$=(c=function(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),a=x.useState(eT++)[0],o=x.useState(em)[0],i=x.useRef(e);x.useEffect(function(){i.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(eL),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=eA(e),l=r.current,u="deltaX"in e?e.deltaX:l[0]-o[0],s="deltaY"in e?e.deltaY:l[1]-o[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var m=eI(d,c);if(!m)return!0;if(m?a=d:(a="v"===d?"h":"v",m=eI(d,c)),!m)return!1;if(!n.current&&"changedTouches"in e&&(u||s)&&(n.current=a),!a)return!0;var v=n.current||a;return eM(v,t,e,"h"===v?u:s,!0)},[]),u=x.useCallback(function(e){if(e_.length&&e_[e_.length-1]===o){var r="deltaY"in e?eO(e):eA(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var a=(i.current.shards||[]).map(eL).filter(Boolean).filter(function(t){return t.contains(e.target)});(a.length>0?l(e,a[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),s=x.useCallback(function(e,r,n,a){var o={name:e,delta:r,target:n,should:a,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=x.useCallback(function(e){r.current=eA(e),n.current=void 0},[]),d=x.useCallback(function(t){s(t.type,eO(t),t.target,l(t,e.lockRef.current))},[]),f=x.useCallback(function(t){s(t.type,eA(t),t.target,l(t,e.lockRef.current))},[]);x.useEffect(function(){return e_.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,ej),document.addEventListener("touchmove",u,ej),document.addEventListener("touchstart",c,ej),function(){e_=e_.filter(function(e){return e!==o}),document.removeEventListener("wheel",u,ej),document.removeEventListener("touchmove",u,ej),document.removeEventListener("touchstart",c,ej)}},[]);var p=e.removeScrollBar,m=e.inert;return x.createElement(x.Fragment,null,m?x.createElement(o,{styles:"\n .block-interactivity-".concat(a," {pointer-events: none;}\n .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,p?x.createElement(ek,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},eu.useMedium(c),ed);var eF=x.forwardRef(function(e,t){return x.createElement(ec,et({},e,{ref:t,sideCar:e$}))});eF.classNames=ec.classNames;var eW=new WeakMap,eB=new WeakMap,eU={},ez=0,eK=function(e){return e&&(e.host||eK(e.parentNode))},eV=function(e,t,r,n){var a=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=eK(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});eU[r]||(eU[r]=new WeakMap);var o=eU[r],i=[],l=new Set,u=new Set(a),s=function(e){!e||l.has(e)||(l.add(e),s(e.parentNode))};a.forEach(s);var c=function(e){!e||u.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))c(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,u=(eW.get(e)||0)+1,s=(o.get(e)||0)+1;eW.set(e,u),o.set(e,s),i.push(e),1===u&&a&&eB.set(e,!0),1===s&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),l.clear(),ez++,function(){i.forEach(function(e){var t=eW.get(e)-1,a=o.get(e)-1;eW.set(e,t),o.set(e,a),t||(eB.has(e)||e.removeAttribute(n),eB.delete(e)),a||e.removeAttribute(r)}),--ez||(eW=new WeakMap,eW=new WeakMap,eB=new WeakMap,eU={})}},eH=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),eV(n,a,r,"aria-hidden")):function(){return null}},eq="Dialog",[eY,eG]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>x.createContext(e));return function(r){let n=r?.[e]||t;return x.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let a=x.createContext(n),o=r.length;r=[...r,n];let i=t=>{let{scope:r,children:n,...i}=t,l=r?.[e]?.[o]||a,u=x.useMemo(()=>i,Object.values(i));return(0,m.jsx)(l.Provider,{value:u,children:n})};return i.displayName=t+"Provider",[i,function(r,i){let l=i?.[e]?.[o]||a,u=x.useContext(l);if(u)return u;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let a=r(e)[`__scope${n}`];return{...t,...a}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(eq),[eX,eZ]=eY(eq),eJ=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,l=x.useRef(null),u=x.useRef(null),[s,c]=function({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[a,o,i]=function({defaultProp:e,onChange:t}){let[r,n]=x.useState(e),a=x.useRef(r),o=x.useRef(t);return I(()=>{o.current=t},[t]),x.useEffect(()=>{a.current!==r&&(o.current?.(r),a.current=r)},[r,a]),[r,n,o]}({defaultProp:t,onChange:r}),l=void 0!==e,u=l?e:a;{let t=x.useRef(void 0!==e);x.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,n])}return[u,x.useCallback(t=>{if(l){let r="function"==typeof t?t(e):t;r!==e&&i.current?.(r)}else o(t)},[l,e,o,i])]}({prop:n,defaultProp:a??!1,onChange:o,caller:eq});return(0,m.jsx)(eX,{scope:t,triggerRef:l,contentRef:u,contentId:R(),titleId:R(),descriptionId:R(),open:s,onOpenChange:c,onOpenToggle:x.useCallback(()=>c(e=>!e),[c]),modal:i,children:r})};eJ.displayName=eq;var eQ="DialogTrigger";x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(eQ,r),o=k(t,a.triggerRef);return(0,m.jsx)(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ti(a.open),...n,ref:o,onClick:E(e.onClick,a.onOpenToggle)})}).displayName=eQ;var e0="DialogPortal",[e1,e5]=eY(e0,{forceMount:void 0}),e2=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=eZ(e0,t);return(0,m.jsx)(e1,{scope:t,forceMount:r,children:x.Children.map(n,e=>(0,m.jsx)(Z,{present:r||o.open,children:(0,m.jsx)(X,{asChild:!0,container:a,children:e})}))})};e2.displayName=e0;var e3="DialogOverlay",e9=x.forwardRef((e,t)=>{let r=e5(e3,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=eZ(e3,e.__scopeDialog);return o.modal?(0,m.jsx)(Z,{present:n||o.open,children:(0,m.jsx)(e7,{...a,ref:t})}):null});e9.displayName=e3;var e4=P("DialogOverlay.RemoveScroll"),e7=x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(e3,r);return(0,m.jsx)(eF,{as:e4,allowPinchZoom:!0,shards:[a.contentRef],children:(0,m.jsx)(O.div,{"data-state":ti(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),e6="DialogContent",e8=x.forwardRef((e,t)=>{let r=e5(e6,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=eZ(e6,e.__scopeDialog);return(0,m.jsx)(Z,{present:n||o.open,children:o.modal?(0,m.jsx)(te,{...a,ref:t}):(0,m.jsx)(tt,{...a,ref:t})})});e8.displayName=e6;var te=x.forwardRef((e,t)=>{let r=eZ(e6,e.__scopeDialog),n=x.useRef(null),a=k(t,r.contentRef,n);return x.useEffect(()=>{let e=n.current;if(e)return eH(e)},[]),(0,m.jsx)(tr,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:E(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:E(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:E(e.onFocusOutside,e=>e.preventDefault())})}),tt=x.forwardRef((e,t)=>{let r=eZ(e6,e.__scopeDialog),n=x.useRef(!1),a=x.useRef(!1);return(0,m.jsx)(tr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));let o=t.target;r.triggerRef.current?.contains(o)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),tr=x.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,l=eZ(e6,r),u=x.useRef(null),s=k(t,u);return x.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ee()),document.body.insertAdjacentElement("beforeend",e[1]??ee()),Q++,()=>{1===Q&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Q--}},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,m.jsx)($,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ti(l.open),...i,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(tc,{titleId:l.titleId}),(0,m.jsx)(td,{contentRef:u,descriptionId:l.descriptionId})]})]})}),tn="DialogTitle";x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(tn,r);return(0,m.jsx)(O.h2,{id:a.titleId,...n,ref:t})}).displayName=tn;var ta="DialogDescription";x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(ta,r);return(0,m.jsx)(O.p,{id:a.descriptionId,...n,ref:t})}).displayName=ta;var to="DialogClose";function ti(e){return e?"open":"closed"}x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(to,r);return(0,m.jsx)(O.button,{type:"button",...n,ref:t,onClick:E(e.onClick,()=>a.onOpenChange(!1))})}).displayName=to;var tl="DialogTitleWarning",[tu,ts]=(d={contentName:e6,titleName:tn,docsSlug:"dialog"},t=x.createContext(d),(r=e=>{let{children:r,...n}=e,a=x.useMemo(()=>n,Object.values(n));return(0,m.jsx)(t.Provider,{value:a,children:r})}).displayName=tl+"Provider",[r,function(e){let r=x.useContext(t);if(r)return r;if(void 0!==d)return d;throw Error(`\`${e}\` must be used within \`${tl}\``)}]),tc=({titleId:e})=>{let t=ts(tl),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
-
|
|
5
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},td=({contentRef:e,descriptionId:t})=>{let r=ts("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return x.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},tf=Symbol.for("react.lazy"),tp=x[" use ".trim().toString()];function tm(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===tf&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var tv=Symbol("radix.slottable");function th(e){return x.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===tv}var tg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var r,n;let a,o,i,l=(n=r=`Primitive.${t}`,(a=x.forwardRef((e,t)=>{let{children:r,...n}=e;if(tm(r)&&"function"==typeof tp&&(r=tp(r._payload)),x.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),l=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==x.Fragment&&(l.ref=t?C(t,i):i),x.cloneElement(r,l)}return x.Children.count(r)>1?x.Children.only(null):null})).displayName=`${n}.SlotClone`,o=a,(i=x.forwardRef((e,t)=>{let{children:r,...n}=e;tm(r)&&"function"==typeof tp&&(r=tp(r._payload));let a=x.Children.toArray(r),i=a.find(th);if(i){let e=i.props.children,r=a.map(t=>t!==i?t:x.Children.count(e)>1?x.Children.only(null):x.isValidElement(e)?e.props.children:null);return(0,m.jsx)(o,{...n,ref:t,children:x.isValidElement(e)?x.cloneElement(e,void 0,r):null})}return(0,m.jsx)(o,{...n,ref:t,children:r})})).displayName=`${r}.Slot`,i),u=x.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,m.jsx)(n?l:t,{...a,ref:r})});return u.displayName=`Primitive.${t}`,{...e,[t]:u}},{}),tb='[cmdk-group=""]',ty='[cmdk-group-items=""]',tx='[cmdk-item=""]',tE=`${tx}:not([aria-disabled="true"])`,tw="cmdk-item-select",tC="data-value",tk=(e,t,r)=>{var n;return n=e,function e(t,r,n,a,o,i,l){if(i===r.length)return o===t.length?1:.99;var u=`${o},${i}`;if(void 0!==l[u])return l[u];for(var s,c,d,f,p=a.charAt(i),m=n.indexOf(p,o),y=0;m>=0;)(s=e(t,r,n,a,m+1,i+1,l))>y&&(m===o?s*=1:v.test(t.charAt(m-1))?(s*=.8,(d=t.slice(o,m-1).match(h))&&o>0&&(s*=Math.pow(.999,d.length))):g.test(t.charAt(m-1))?(s*=.9,(f=t.slice(o,m-1).match(b))&&o>0&&(s*=Math.pow(.999,f.length))):(s*=.17,o>0&&(s*=Math.pow(.999,m-o))),t.charAt(m)!==r.charAt(i)&&(s*=.9999)),(s<.1&&n.charAt(m-1)===a.charAt(i+1)||a.charAt(i+1)===a.charAt(i)&&n.charAt(m-1)!==a.charAt(i))&&.1*(c=e(t,r,n,a,m+1,i+2,l))>s&&(s=.1*c),s>y&&(y=s),m=n.indexOf(p,m+1);return l[u]=y,y}(n=r&&r.length>0?`${n+" "+r.join(" ")}`:n,t,y(n),y(t),0,0,{})},tS=x.createContext(void 0),tN=x.createContext(void 0),tj=x.createContext(void 0),tR=x.forwardRef((e,t)=>{let r=t$(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=t$(()=>new Set),a=t$(()=>new Map),o=t$(()=>new Map),i=t$(()=>new Set),l=tT(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:v=!1,vimBindings:h=!0,...g}=e,b=R(),y=R(),E=R(),w=x.useRef(null),C=tB();t_(()=>{if(void 0!==c){let e=c.trim();r.current.value=e,k.emit()}},[c]),t_(()=>{C(6,P)},[]);let k=x.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var a,o,i,u;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)D(),j(),C(1,I);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(E);e?e.focus():null==(a=document.getElementById(b))||a.focus()}if(C(7,()=>{var e;r.current.selectedItemId=null==(e=M())?void 0:e.id,k.emit()}),n||C(5,P),(null==(o=l.current)?void 0:o.value)!==void 0){null==(u=(i=l.current).onValueChange)||u.call(i,null!=t?t:"");return}}k.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),S=x.useMemo(()=>({value:(e,t,n)=>{var a;t!==(null==(a=o.current.get(e))?void 0:a.value)&&(o.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,N(t,n)),C(2,()=>{j(),k.emit()}))},item:(e,t)=>(n.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),C(3,()=>{D(),j(),r.current.value||I(),k.emit()}),()=>{o.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=M();C(4,()=>{D(),(null==t?void 0:t.getAttribute("id"))===e&&I(),k.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:E,labelId:y,listInnerRef:w}),[]);function N(e,t){var n,a;let o=null!=(a=null==(n=l.current)?void 0:n.filter)?a:tk;return e?o(e,r.current.search,t):0}function j(){if(!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=a.current.get(r),o=0;n.forEach(t=>{o=Math.max(e.get(t),o)}),t.push([r,o])});let n=w.current;A().sort((t,r)=>{var n,a;let o=t.getAttribute("id"),i=r.getAttribute("id");return(null!=(n=e.get(i))?n:0)-(null!=(a=e.get(o))?a:0)}).forEach(e=>{let t=e.closest(ty);t?t.appendChild(e.parentElement===t?e:e.closest(`${ty} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${ty} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=w.current)?void 0:t.querySelector(`${tb}[${tC}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function I(){let e=A().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(tC);k.setState("value",t||void 0)}function D(){var e,t,i,u;if(!r.current.search||!1===l.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let s=0;for(let a of n.current){let n=N(null!=(t=null==(e=o.current.get(a))?void 0:e.value)?t:"",null!=(u=null==(i=o.current.get(a))?void 0:i.keywords)?u:[]);r.current.filtered.items.set(a,n),n>0&&s++}for(let[e,t]of a.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=s}function P(){var e,t,r;let n=M();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(tb))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function M(){var e;return null==(e=w.current)?void 0:e.querySelector(`${tx}[aria-selected="true"]`)}function A(){var e;return Array.from((null==(e=w.current)?void 0:e.querySelectorAll(tE))||[])}function O(e){let t=A()[e];t&&k.setState("value",t.getAttribute(tC))}function L(e){var t;let r=M(),n=A(),a=n.findIndex(e=>e===r),o=n[a+e];null!=(t=l.current)&&t.loop&&(o=a+e<0?n[n.length-1]:a+e===n.length?n[0]:n[a+e]),o&&k.setState("value",o.getAttribute(tC))}function T(e){let t=M(),r=null==t?void 0:t.closest(tb),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,tb):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,tb))?void 0:r.querySelector(tE);n?k.setState("value",n.getAttribute(tC)):L(e)}let _=()=>O(A().length-1),$=e=>{e.preventDefault(),e.metaKey?_():e.altKey?T(1):L(1)},F=e=>{e.preventDefault(),e.metaKey?O(0):e.altKey?T(-1):L(-1)};return x.createElement(tg.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=g.onKeyDown)||t.call(g,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":h&&e.ctrlKey&&$(e);break;case"ArrowDown":$(e);break;case"p":case"k":h&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),O(0);break;case"End":e.preventDefault(),_();break;case"Enter":{e.preventDefault();let t=M();if(t){let e=new Event(tw);t.dispatchEvent(e)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:tz},u),tU(e,e=>x.createElement(tN.Provider,{value:k},x.createElement(tS.Provider,{value:S},e))))}),tI=x.forwardRef((e,t)=>{var r,n;let a=R(),o=x.useRef(null),i=x.useContext(tj),l=x.useContext(tS),u=tT(e),s=null!=(n=null==(r=u.current)?void 0:r.forceMount)?n:null==i?void 0:i.forceMount;t_(()=>{if(!s)return l.item(a,null==i?void 0:i.id)},[s]);let c=tW(a,o,[e.value,e.children,o],e.keywords),d=x.useContext(tN),f=tF(e=>e.value&&e.value===c.current),p=tF(e=>!!s||!1===l.filter()||!e.search||e.filtered.items.get(a)>0);function m(){var e,t;v(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function v(){d.setState("value",c.current,!0)}if(x.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(tw,m),()=>t.removeEventListener(tw,m)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:h,value:g,onSelect:b,forceMount:y,keywords:E,...w}=e;return x.createElement(tg.div,{ref:C(o,t),...w,id:a,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!f,"data-disabled":!!h,"data-selected":!!f,onPointerMove:h||l.getDisablePointerSelection()?void 0:v,onClick:h?void 0:m},e.children)}),tD=x.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,i=R(),l=x.useRef(null),u=x.useRef(null),s=R(),c=x.useContext(tS),d=tF(e=>!!a||!1===c.filter()||!e.search||e.filtered.groups.has(i));t_(()=>c.group(i),[]),tW(i,l,[e.value,e.heading,u]);let f=x.useMemo(()=>({id:i,forceMount:a}),[a]);return x.createElement(tg.div,{ref:C(l,t),...o,"cmdk-group":"",role:"presentation",hidden:!d||void 0},r&&x.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},r),tU(e,e=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?s:void 0},x.createElement(tj.Provider,{value:f},e))))}),tP=x.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=x.useRef(null),o=tF(e=>!e.search);return r||o?x.createElement(tg.div,{ref:C(a,t),...n,"cmdk-separator":"",role:"separator"}):null}),tM=x.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=null!=e.value,o=x.useContext(tN),i=tF(e=>e.search),l=tF(e=>e.selectedItemId),u=x.useContext(tS);return x.useEffect(()=>{null!=e.value&&o.setState("search",e.value)},[e.value]),x.createElement(tg.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:a?e.value:i,onChange:e=>{a||o.setState("search",e.target.value),null==r||r(e.target.value)}})}),tA=x.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=x.useRef(null),i=x.useRef(null),l=tF(e=>e.selectedItemId),u=x.useContext(tS);return x.useEffect(()=>{if(i.current&&o.current){let e=i.current,t=o.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),x.createElement(tg.div,{ref:C(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:u.listId},tU(e,e=>x.createElement("div",{ref:C(i,u.listInnerRef),"cmdk-list-sizer":""},e)))}),tO=x.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:i,...l}=e;return x.createElement(eJ,{open:r,onOpenChange:n},x.createElement(e2,{container:i},x.createElement(e9,{"cmdk-overlay":"",className:a}),x.createElement(e8,{"aria-label":e.label,"cmdk-dialog":"",className:o},x.createElement(tR,{ref:t,...l}))))}),tL=Object.assign(tR,{List:tA,Item:tI,Input:tM,Group:tD,Separator:tP,Dialog:tO,Empty:x.forwardRef((e,t)=>tF(e=>0===e.filtered.count)?x.createElement(tg.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:x.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return x.createElement(tg.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},tU(e,e=>x.createElement("div",{"aria-hidden":!0},e)))})});function tT(e){let t=x.useRef(e);return t_(()=>{t.current=e}),t}var t_="u"<typeof window?x.useEffect:x.useLayoutEffect;function t$(e){let t=x.useRef();return void 0===t.current&&(t.current=e()),t}function tF(e){let t=x.useContext(tN),r=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,r,r)}function tW(e,t,r,n=[]){let a=x.useRef(),o=x.useContext(tS);return t_(()=>{var i;let l=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),u=n.map(e=>e.trim());o.value(e,l,u),null==(i=t.current)||i.setAttribute(tC,l),a.current=l}),a}var tB=()=>{let[e,t]=x.useState(),r=t$(()=>new Map);return t_(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function tU({asChild:e,children:t},r){let n;return e&&x.isValidElement(t)?x.cloneElement("function"==typeof(n=t.type)?n(t.props):"render"in n?n.render(t.props):t,{ref:t.ref},r(t.props.children)):r(t)}var tz={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},tK=e.i(975157);e.i(776639);var tV=e.i(294237);function tH({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,tK.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}e.i(519455),e.i(793479),e.i(624687);let tq=(0,tV.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function tY({className:e,align:t="inline-start",...r}){return(0,m.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:(0,tK.cn)(tq({align:t}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}(0,tV.cva)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});var tG=e.i(298751),tG=tG,tX=e.i(533133);e.s(["Command",0,function({className:e,...t}){return(0,m.jsx)(tL,{"data-slot":"command",className:(0,tK.cn)("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...t})},"CommandEmpty",0,function({className:e,...t}){return(0,m.jsx)(tL.Empty,{"data-slot":"command-empty",className:(0,tK.cn)("py-6 text-center text-sm",e),...t})},"CommandGroup",0,function({className:e,...t}){return(0,m.jsx)(tL.Group,{"data-slot":"command-group",className:(0,tK.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...t})},"CommandInput",0,function({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,m.jsxs)(tH,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[(0,m.jsx)(tL.Input,{"data-slot":"command-input",className:(0,tK.cn)("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),(0,m.jsx)(tY,{children:(0,m.jsx)(tG.default,{className:"size-4 shrink-0 opacity-50"})})]})})},"CommandItem",0,function({className:e,children:t,...r}){return(0,m.jsxs)(tL.Item,{"data-slot":"command-item",className:(0,tK.cn)("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...r,children:[t,(0,m.jsx)(tX.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})},"CommandList",0,function({className:e,...t}){return(0,m.jsx)(tL.List,{"data-slot":"command-list",className:(0,tK.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}],317056);var tZ=e.i(514798);let tJ=(0,tZ.createServerReference)("406ab39f1bb8aa7d87788e7abe36c7f31481e89de8",tZ.callServer,void 0,tZ.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,tJ],43811);let tQ=(0,tZ.createServerReference)("4036aaba0d8c5c679356cff5916cc62d0c00afa0e5",tZ.callServer,void 0,tZ.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,tQ],848692)},744798,e=>{"use strict";var t=e.i(289721),r=e.i(965652),n=e.i(776639),a=e.i(519455),o=e.i(793479),i=e.i(624687),l=e.i(110204),u=e.i(226145),s=e.i(597746),c=e.i(456346),d=e.i(280027),f=e.i(337822),p=e.i(317056),m=e.i(533499),v=e.i(43811),h=e.i(848692),g=e.i(514798);let b=(0,g.createServerReference)("40cab6bfdce457414144715ec29ec6b0e9eeb638ae",g.callServer,void 0,g.findSourceMapURL,"getCurrentBranch");var y=e.i(609216);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:g,onSubmit:x,onUpdate:E,defaultStatus:w="TODO",editTask:C,editTaskLabelIds:k,prefillFromTask:S,labels:N,projectType:j,projectLocalPath:R,versions:I,defaultVersionId:D}){let P,[M,A]=(0,r.useState)(""),[O,L]=(0,r.useState)(""),[T,_]=(0,r.useState)("MEDIUM"),[$,F]=(0,r.useState)(""),[W,B]=(0,r.useState)([]),[U,z]=(0,r.useState)([]),[K,V]=(0,r.useState)(!1),[H,q]=(0,r.useState)(""),[Y,G]=(0,r.useState)(!1),[X,Z]=(0,r.useState)(!0),[J,Q]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(null),{t:er}=(0,m.useI18n)();(0,r.useEffect)(()=>{if(!e||C)return;let t=!1;return(0,y.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let r=e["task.defaultUseWorktree"],n=e["task.defaultAutoStart"];"boolean"==typeof r&&Z(r),"boolean"==typeof n&&Q(n)}).catch(()=>{}),()=>{t=!0}},[e,C]);let en=!!C,ea=!!R;return(0,r.useEffect)(()=>{C?(A(C.title),L(C.description??""),_(C.priority),F(C.subPath??""),B(k??[]),et(C.versionId??null)):(S?(A(S.title??""),L(S.description??""),_(S.priority??"MEDIUM"),F(S.subPath??""),B(S.labelIds??[])):(A(""),L(""),_("MEDIUM"),F(""),B([])),et(D??null))},[C,k,S,D]),(0,r.useEffect)(()=>{e||C||(A(""),L(""),_("MEDIUM"),F(""),B([]),z([]),q(""),G(!1),et(D??null))},[e,C,D]),(0,r.useEffect)(()=>{e&&ea&&!C&&(V(!0),Promise.all([(0,v.getProjectBranches)(R),b(R)]).then(([e,t])=>{z(e);let r=S?.baseBranch??null;r&&e.includes(r)?q(r):q(t&&e.includes(t)?t:e[0]??""),V(!1),(0,h.fetchRemoteBranches)(R).then(()=>{setTimeout(()=>{(0,v.getProjectBranches)(R).then(e=>{z(e),q(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{z([]),q(""),V(!1)}))},[e,ea,R,C,S]),(0,t.jsx)(n.Dialog,{open:e,onOpenChange:g,disablePointerDismissal:!0,children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsx)(n.DialogTitle,{children:en?er("task.edit"):er("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)(l.Label,{htmlFor:"title",children:er("task.title")}),(0,t.jsx)(o.Input,{id:"title","data-testid":"task-title",placeholder:er("task.titlePlaceholder"),value:M,onChange:e=>A(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"description",children:er("task.description")}),(0,t.jsx)(i.Textarea,{id:"description",placeholder:er("task.descPlaceholder"),rows:4,value:O,onChange:e=>L(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"subPath",children:er("task.subPath")}),(0,t.jsx)(o.Input,{id:"subPath",placeholder:er("task.subPathPlaceholder"),value:$,onChange:e=>F(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:er("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:er("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let r={LOW:{label:er("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:er("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:er("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:er("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>_(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${T===e?`${r.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:r.label},e)})})]}),ea&&!en&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:er("task.baseBranch")}),K?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchLoading")}):U.length>0?(0,t.jsxs)(f.Popover,{open:Y,onOpenChange:G,children:[(0,t.jsxs)(f.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)(u.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:H||void 0,children:H||er("task.branchNone")}),(0,t.jsx)(c.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(f.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(p.Command,{children:[(0,t.jsx)(p.CommandInput,{placeholder:er("task.branchSearch")}),(0,t.jsxs)(p.CommandList,{children:[(0,t.jsx)(p.CommandEmpty,{children:er("task.branchNone")}),(0,t.jsx)(p.CommandGroup,{children:U.map(e=>(0,t.jsxs)(p.CommandItem,{value:e,onSelect:()=>{q(e),G(!1)},children:[(0,t.jsx)(u.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===H&&(0,t.jsx)(s.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(l.Label,{className:"text-xs text-muted-foreground",children:er("task.worktreeLabel")}),(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 ${X===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.worktreeYes"):er("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(l.Label,{className:"text-xs text-muted-foreground",children:er("task.autoStartLabel")}),(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 ${J===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.autoStartYes"):er("task.autoStartNo")},String(e)))})]})]}),N.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:er("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:N.map(e=>{let r=W.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{B(t=>r?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${r?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:r?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!en||I&&I.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:er("version.picker.label")}),I&&I.length>0?(0,t.jsxs)(d.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(d.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(P=I.find(e=>e.id===ee))?P.isCurrent?`${P.number} \xb7 ${P.name} \xb7 ${er("version.currentShort")}`:`${P.number} \xb7 ${P.name}`:er("version.picker.none")})}),(0,t.jsxs)(d.SelectContent,{children:[(0,t.jsx)(d.SelectItem,{value:"__none__",children:er("version.picker.none")}),I.map(e=>(0,t.jsx)(d.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${er("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:er("version.picker.empty")})]})]}),(0,t.jsxs)(n.DialogFooter,{children:[(0,t.jsx)(a.Button,{variant:"outline",onClick:()=>g(!1),children:er("common.cancel")}),(0,t.jsx)(a.Button,{onClick:()=>{M.trim()&&(en&&E?E(C.id,{title:M,description:O,priority:T,labelIds:W,subPath:$.trim()||"",versionId:ee}):x({title:M,description:O,priority:T,status:w,labelIds:W,...ea&&X&&H?{baseBranch:H}:{},...$.trim()?{subPath:$.trim()}:{},versionId:ee,autoStart:J}),A(""),L(""),_("MEDIUM"),F(""),B([]),z([]),q(""),Z(!0),et(null),g(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:en?er("common.save"):er("common.create")})]})]})})}],744798)}]);
|