@shipit-ai/cli 1.164.1 → 1.164.2-pr10.c4e0d39
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/dist/packages/core/src/infrastructure/services/agents/analyze-repo/analyze-repository-graph.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/badge.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/button.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +5 -5
- package/web/.next/fallback-build-manifest.json +3 -3
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +8 -8
- package/web/.next/required-server-files.json +8 -8
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/build-manifest.json +2 -2
- package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/build-manifest.json +2 -2
- package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/build-manifest.json +2 -2
- package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/build-manifest.json +2 -2
- package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0jx0isp._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0jx0isp._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0.j0ktf._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0.j0ktf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07m44ax._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07m44ax._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0frgz11._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0frgz11._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0oi7r67._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0pti1a3._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0pti1a3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0s9k_s3._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0s9k_s3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0v-vmgt._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0v-vmgt._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0yky~xo._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0yky~xo._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11dc42t._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11dc42t._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
- package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
- package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0aa~oer._.js +1 -1
- package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
- package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
- package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0ez.1o4._.js +1 -1
- package/web/.next/server/chunks/ssr/_0ez.1o4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_133.z2f._.js → _0f6z9wx._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_133.z2f._.js.map → _0f6z9wx._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0hovej-._.js +2 -2
- package/web/.next/server/chunks/ssr/_0hovej-._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0p3zs6p._.js +1 -1
- package/web/.next/server/chunks/ssr/_0p3zs6p._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
- package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_0aakgii._.js → _0rwm4wq._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0aakgii._.js.map → _0rwm4wq._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0sgeiju._.js +1 -1
- package/web/.next/server/chunks/ssr/_0sgeiju._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
- package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0utxfz5._.js +3 -0
- package/web/.next/server/chunks/ssr/{_0427j6p._.js.map → _0utxfz5._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0v.yfmg._.js +1 -1
- package/web/.next/server/chunks/ssr/_0v.yfmg._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
- package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0~ev6dw._.js +2 -2
- package/web/.next/server/chunks/ssr/_0~ev6dw._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
- package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_11kuznh._.js +1 -1
- package/web/.next/server/chunks/ssr/_11kuznh._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0y11iiz._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0y11iiz._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
- package/web/.next/server/middleware/middleware-manifest.json +5 -5
- package/web/.next/server/middleware-build-manifest.js +5 -5
- package/web/.next/server/middleware-manifest.json +5 -5
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +47 -47
- package/web/.next/static/chunks/{07lrq10rx0tp1.js → 0.hbng76i27nw.js} +1 -1
- package/web/.next/static/chunks/{0si_11yihc0-l.js → 02833lnol2gx-.js} +1 -1
- package/web/.next/static/chunks/{0dx9n.g50tq3h.js → 02b0d-jfu0-6d.js} +1 -1
- package/web/.next/static/chunks/{0fc4~7_n~k~-y.js → 02t~w.m0crz53.js} +1 -1
- package/web/.next/static/chunks/{0ureecfb3sk03.js → 0cj-x42guhnqx.js} +1 -1
- package/web/.next/static/chunks/{0yj1o1qkqnea0.js → 0gxp_yp8ssvve.js} +1 -1
- package/web/.next/static/chunks/{0.ot~ed_rh0ui.js → 0i8.i3jieogv5.js} +2 -2
- package/web/.next/static/chunks/{0_5~ye5oqkvog.js → 0po0ue~fgonw1.js} +1 -1
- package/web/.next/static/chunks/{0f698k1fycef7.js → 0tfdphimjl5ye.js} +1 -1
- package/web/.next/static/chunks/{09a1uo.4xdik3.js → 0w6qjg_fyb4vv.js} +1 -1
- package/web/.next/static/chunks/{0~io7k480nets.js → 0z1yhd4ri2_hl.js} +1 -1
- package/web/.next/static/chunks/{0~d8qka._ncpd.js → 0z5-igp~i~aiw.js} +2 -2
- package/web/.next/static/chunks/{0qm-9ipi3co.d.js → 10dvor.6l1cmy.js} +1 -1
- package/web/.next/static/chunks/{0bkt5slti~l1x.js → 14kxnhot63qht.js} +1 -1
- package/web/.next/static/chunks/{turbopack-10upsk2jydmq4.js → turbopack-0tcz030eo3-6l.js} +1 -1
- package/web/.next/server/chunks/ssr/_0427j6p._.js +0 -3
- /package/web/.next/static/{ZJku-LesX1icuSm9WAIO0 → tAEzEEsC14Bdgtrc-RPtH}/_buildManifest.js +0 -0
- /package/web/.next/static/{ZJku-LesX1icuSm9WAIO0 → tAEzEEsC14Bdgtrc-RPtH}/_clientMiddlewareManifest.js +0 -0
- /package/web/.next/static/{ZJku-LesX1icuSm9WAIO0 → tAEzEEsC14Bdgtrc-RPtH}/_ssgManifest.js +0 -0
|
@@ -4,4 +4,4 @@ You can add a description to the \`${h}\` by passing a \`${j}\` component as a c
|
|
|
4
4
|
|
|
5
5
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${h}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
6
6
|
|
|
7
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null};e.s(["Action",0,P,"AlertDialog",0,f,"AlertDialogAction",0,P,"AlertDialogCancel",0,N,"AlertDialogContent",0,y,"AlertDialogDescription",0,C,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,g,"AlertDialogTitle",0,S,"AlertDialogTrigger",0,p,"Cancel",0,N,"Content",0,y,"Description",0,C,"Overlay",0,m,"Portal",0,g,"Root",0,f,"Title",0,S,"Trigger",0,p,"createAlertDialogScope",0,c],37340);var E=e.i(37340),E=E,R=e.i(31777),T=e.i(35364);function A({...e}){return(0,t.jsx)(E.Portal,{"data-slot":"alert-dialog-portal",...e})}function I({className:e,onClick:r,...a}){return(0,t.jsx)(E.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,R.cn)("fixed inset-0 z-50 bg-black/50",e),onClick:e=>{e.stopPropagation(),r?.(e)},...a})}e.s(["AlertDialog",0,function({...e}){return(0,t.jsx)(E.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogAction",0,function({className:e,variant:r="default",size:a="default",...n}){return(0,t.jsx)(T.Button,{variant:r,size:a,asChild:!0,children:(0,t.jsx)(E.Action,{"data-slot":"alert-dialog-action",className:(0,R.cn)(e),...n})})},"AlertDialogCancel",0,function({className:e,variant:r="outline",size:a="default",...n}){return(0,t.jsx)(T.Button,{variant:r,size:a,asChild:!0,children:(0,t.jsx)(E.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,R.cn)(e),...n})})},"AlertDialogContent",0,function({className:e,size:r="default",...a}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(I,{}),(0,t.jsx)(E.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,R.cn)("bg-background group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg",e),...a})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(E.Description,{"data-slot":"alert-dialog-description",className:(0,R.cn)("text-muted-foreground text-sm",e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,R.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,R.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(E.Title,{"data-slot":"alert-dialog-title",className:(0,R.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}],71326)},30153,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(71326);let n=(0,r.createContext)(null);function o(){let e=(0,r.useContext)(n);if(!e)throw Error("useDrawerCloseGuard must be used within DrawerCloseGuardProvider");return e}e.s(["DrawerCloseGuardProvider",0,function({children:e}){let o=(0,r.useRef)(null),i=(0,r.useRef)(null),[l,s]=(0,r.useState)(!1),d=(0,r.useCallback)(e=>{o.current=e},[]),c=(0,r.useCallback)(e=>{if(o.current?.isDirty){i.current=e,s(!0);return}e()},[]),u=(0,r.useCallback)(()=>{s(!1),o.current?.onReset(),o.current=null,i.current?.(),i.current=null},[]),f=(0,r.useCallback)(()=>{s(!1),i.current=null},[]),p=(0,r.useCallback)(()=>o.current?.isDirty??!1,[]);return(0,t.jsxs)(n,{value:{setGuard:d,guardedNavigate:c,getIsDirty:p},children:[e,(0,t.jsx)(a.AlertDialog,{open:l,children:(0,t.jsxs)(a.AlertDialogContent,{children:[(0,t.jsxs)(a.AlertDialogHeader,{children:[(0,t.jsx)(a.AlertDialogTitle,{children:"Discard unsaved changes?"}),(0,t.jsx)(a.AlertDialogDescription,{children:"You have unsaved changes. Are you sure you want to discard them?"})]}),(0,t.jsxs)(a.AlertDialogFooter,{children:[(0,t.jsx)(a.AlertDialogAction,{variant:"destructive",onClick:u,children:"Discard"}),(0,t.jsx)(a.AlertDialogCancel,{onClick:f,children:"Keep editing"})]})]})})]})},"useDrawerCloseGuard",0,o,"useGuardedDrawerClose",0,function({open:e,isDirty:t,onClose:a,onReset:n}){let{setGuard:i,guardedNavigate:l}=o();return(0,r.useEffect)(()=>(e?i({isDirty:t,onReset:n}):i(null),()=>i(null)),[e,t,n,i]),{attemptClose:(0,r.useCallback)(()=>{l(()=>{n(),a()})},[l,a,n])}}])},80986,e=>{"use strict";let t=(0,e.i(3645).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",0,t],30090),e.s(["CircleX",0,t],54277)},10942,94819,e=>{"use strict";var t=e.i(80986);e.s(["CircleCheck",()=>t.default],10942);let r=(0,e.i(3645).default)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Ban",0,r],94819)},57779,80554,e=>{"use strict";var t=e.i(96871);e.s(["ChatDotIndicator",0,function({status:e,className:r=""}){return"idle"===e?null:(0,t.jsx)("span",{className:`absolute -top-0.5 -right-0.5 block rounded-full ${"processing"===e?"h-2.5 w-2.5 animate-pulse bg-blue-500":"h-2 w-2 bg-green-500"} ${r}`})}],57779);var r=e.i(16539),a=e.i(46535);let n=(0,r.createContext)({getStatus:()=>"idle"});e.s(["TurnStatusesProvider",0,function({children:e}){let o=function(){let{data:e}=(0,a.useQuery)({queryKey:["turn-statuses"],queryFn:async()=>{let e=await fetch("/api/interactive/chat/turn-statuses");return e.ok?e.json():{}},refetchInterval:5e3});return e??{}}(),i=(0,r.useMemo)(()=>({getStatus:e=>o[e]??"idle"}),[o]);return(0,t.jsx)(n.Provider,{value:i,children:e})},"useTurnStatus",0,function(e){return(0,r.useContext)(n).getStatus(e)}],80554)},79687,e=>{"use strict";var t=e.i(14748);e.s(["AlertCircle",()=>t.default])},48034,e=>{"use strict";var t=e.i(96871),r=e.i(16539);let a=(0,e.i(18354).createLogger)("[SSE]");function n(e,t,r,a){if("u"<typeof EventSource)return()=>{};let n=null,o=!1,i=1e3,l=null,s=null;return!function d(){o||(n=new EventSource(e?`/api/agent-events?runId=${encodeURIComponent(e)}`:"/api/agent-events"),a("connecting"),n.onopen=()=>{a("connected"),s=setTimeout(()=>{s=null,i=1e3},5e3)},n.onerror=()=>{n?.close(),n=null,a("disconnected"),null!==s&&(clearTimeout(s),s=null);let e=i;i=Math.min(2*e,3e4),l=setTimeout(()=>{l=null,d()},e)},n.addEventListener("notification",e=>{let a=JSON.parse(e.data),n={...a,timestamp:new Date(a.timestamp)};t(e=>{let t=[...e,n];return t.length>500?t.slice(-250):t}),r(n)}))}(),()=>{o=!0,null!==l&&(clearTimeout(l),l=null),null!==s&&(clearTimeout(s),s=null),n&&(n.close(),n=null)}}let o=(0,r.createContext)(null);e.s(["AgentEventsProvider",0,function({children:e,runId:i}){let{events:l,lastEvent:s,connectionStatus:d}=function(e){let[t,o]=(0,r.useState)([]),[i,l]=(0,r.useState)(null),[s,d]=(0,r.useState)("disconnected"),c=e?.runId,u=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{let t=e.data;if(t&&"object"==typeof t)if("notification"===t.type){let e=t.data;a.debug("event received:",e.eventType,e),o(t=>{let r=[...t,e];return r.length>500?r.slice(-250):r}),l(e)}else"status"===t.type&&d(t.status)},[]);return(0,r.useEffect)(()=>{let e="u">typeof location&&new URLSearchParams(location.search).has("sse");if(!navigator.serviceWorker||e)return n(c,o,l,d);let t=!1,r={current:void 0};function a(e){t||(u.current=e,e.postMessage({type:"subscribe",runId:c}),d("connecting"))}function i(){if(t)return;let e=navigator.serviceWorker.controller;e&&(u.current=e,e.postMessage({type:"subscribe",runId:c}),d("connecting"))}return navigator.serviceWorker.addEventListener("message",f),navigator.serviceWorker.addEventListener("controllerchange",i),navigator.serviceWorker.register("/agent-events-sw.js",{scope:"/"}).then(e=>{if(t)return;let i=e.active??e.installing??e.waiting;if(!i){r.current=n(c,o,l,d);return}if("activated"===i.state)a(i);else{let e=()=>{"activated"===i.state&&(i.removeEventListener("statechange",e),a(i))};i.addEventListener("statechange",e)}}).catch(()=>{t||(r.current=n(c,o,l,d))}),()=>{t=!0,navigator.serviceWorker.removeEventListener("message",f),navigator.serviceWorker.removeEventListener("controllerchange",i),u.current?.postMessage({type:"unsubscribe"}),u.current=null,r.current?.()}},[c,f]),{events:t,lastEvent:i,connectionStatus:s}}({runId:i}),c=(0,r.useMemo)(()=>({events:l,lastEvent:s,connectionStatus:d}),[l,s,d]);return(0,t.jsx)(o.Provider,{value:c,children:e})},"useAgentEventsContext",0,function(){let e=(0,r.useContext)(o);if(!e)throw Error("useAgentEventsContext must be used within an <AgentEventsProvider>");return e}],48034)},39200,e=>{"use strict";let t=(0,e.i(3645).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],39200)},81975,e=>{"use strict";let t=(0,e.i(3645).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",0,t],81975)},98127,e=>{"use strict";var t=e.i(96871),r=e.i(31777);e.s(["Input",0,function({className:e,type:a,...n}){return(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}])},66459,e=>{"use strict";let t=(0,e.i(3645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],66459)},12103,e=>{"use strict";let t=(0,e.i(3645).default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",0,t],12103)},97063,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return l},formatWithValidation:function(){return d},urlObjectKeys:function(){return s}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(44066)._(e.r(82977)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",l=e.hash||"",s=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||i.test(a))&&!1!==d?(d="//"+(d||""),n&&"/"!==n[0]&&(n="/"+n)):d||(d=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${d}${n}${c}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return l(e)}},20819,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let a=e.r(94576),n=e.r(66289);function o(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},78380,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},75459,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return v},useLinkStatus:function(){return x}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(44066),i=e.r(96871),l=o._(e.r(16539)),s=e.r(97063),d=e.r(45319),c=e.r(91992),u=e.r(94576),f=e.r(1921);e.r(88976);let p=e.r(94178),g=e.r(1242),m=e.r(20819),h=e.r(44023);function v(t){var r,a;let n,o,v,[x,y]=(0,l.useOptimistic)(g.IDLE_LINK_STATUS),w=(0,l.useRef)(null),{href:S,as:j,children:C,prefetch:P=null,passHref:k,replace:N,shallow:D,scroll:E,onClick:R,onMouseEnter:T,onTouchStart:A,legacyBehavior:I=!1,onNavigate:L,transitionTypes:_,ref:M,unstable_dynamicOnHover:O,...z}=t;n=C,I&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let F=l.default.useContext(d.AppRouterContext),B=!1!==P,H=!1!==P?null===(a=P)||"auto"===a?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,U="string"==typeof(r=j||S)?r:(0,s.formatUrl)(r);if(I){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(n)}let $=I?o&&"object"==typeof o&&o.ref:M,V=l.default.useCallback(e=>(null!==F&&(w.current=(0,g.mountLinkInstance)(e,U,F,H,B,y)),()=>{w.current&&((0,g.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,g.unmountPrefetchableInstance)(e)}),[B,U,F,H,y]),K={ref:(0,c.useMergedRef)(V,$),onClick(t){I||"function"!=typeof R||R(t),I&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!F||t.defaultPrevented||function(t,r,a,n,o,i,s){if("u">typeof window){let d,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(88095);l.default.startTransition(()=>{u(r,n?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,a.current,s)})}}(t,U,w,N,E,L,_)},onMouseEnter(e){I||"function"!=typeof T||T(e),I&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),F&&B&&(0,g.onNavigationIntent)(e.currentTarget,!0===O)},onTouchStart:function(e){I||"function"!=typeof A||A(e),I&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),F&&B&&(0,g.onNavigationIntent)(e.currentTarget,!0===O)}};return(0,u.isAbsoluteUrl)(U)?K.href=U:I&&!k&&("a"!==o.type||"href"in o.props)||(K.href=(0,f.addBasePath)(U)),v=I?l.default.cloneElement(o,K):(0,i.jsx)("a",{...z,...K,children:n}),(0,i.jsx)(b.Provider,{value:x,children:v})}e.r(78380);let b=(0,l.createContext)(g.IDLE_LINK_STATUS),x=()=>(0,l.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},44802,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let a=e.r(26728);function n({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},70399,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},77622,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return s}});let a=e.r(96871),n=e.r(70309),o=e.r(5474),i=e.r(70399),l=e.r(58349);function s({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let d=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,n.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},38762,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return d}});let a=e.r(96871),n=e.r(16539),o=e.r(44802),i=e.r(77622);function l(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},d=function(e){let t={...s,...e},r=(0,n.lazy)(()=>t.loader().then(l)),d=t.loading;function c(e){let l=d?(0,a.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,c=s?n.Suspense:n.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(c,{...s?{fallback:l}:{},children:u})}return c.displayName="LoadableComponent",c}},52199,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let a=e.r(81258)._(e.r(38762));function n(e,t){let r={};"function"==typeof e&&(r.loader=e);let n={...r,...t};return(0,a.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(52199),n=e.i(83428),o=e.i(60112),i=e.i(2287),l=e.i(35364);let s=(0,a.default)(()=>e.A(89305).then(e=>e.FileManager),{loadableGenerated:{modules:[15567]},ssr:!1,loading:()=>(0,t.jsx)(d,{})});function d(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function c(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}e.s(["ReactFileManagerDialog",0,function({open:e,onOpenChange:a,onSelect:n,initialPath:d}){let[u,f]=(0,r.useState)([]),[p,g]=(0,r.useState)(""),[m,h]=(0,r.useState)(!1),[v,b]=(0,r.useState)(null),x=(0,r.useRef)(!1),y=(0,r.useCallback)(async e=>{h(!0),b(null);try{let t=await c(e);f(t.entries),g(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";o.toast.error(e)}finally{h(!1)}},[]);(0,r.useEffect)(()=>{e&&!x.current&&(x.current=!0,y(d)),e||(x.current=!1)},[e,d,y]);let w=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&y(t)},[y]),S=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?b(e[0].absolutePath??null):b(null)},[]);function j(){n(null),a(!1)}return(0,t.jsx)(i.Dialog,{open:e,onOpenChange:e=>{e||j()},children:(0,t.jsxs)(i.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsx)(i.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(i.DialogDescription,{className:"truncate font-mono text-xs",children:p||"Loading..."})]}),(0,t.jsx)("div",{className:"shipit-ai-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(s,{files:u.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:m,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:w,onSelectionChange:S,onRefresh:()=>y(p)},p)}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:j,children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"secondary",onClick:function(){p&&(n(p),a(!1))},disabled:!p,children:"Select Current Folder"}),(0,t.jsx)(l.Button,{onClick:function(){v&&(n(v),a(!1))},disabled:!v,children:"Select Folder"})]})]})})}],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(96976);let r=(0,t.createServerReference)("009f3ac88ce9b697a0f0b32459f90c9fea6b6be4ea",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function a(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",0,a],78521)},81542,e=>{"use strict";let t=(0,e.i(3645).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);e.s(["GitFork",0,t],81542)},31364,e=>{"use strict";var t=e.i(75649);e.s(["Direction",0,t])},5812,71379,e=>{"use strict";let t=(0,e.i(3645).default)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);e.s(["default",0,t],71379),e.s(["PanelLeftIcon",0,t],5812)},57638,61238,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(94237);e.i(5812);var n=e.i(31364),o=e.i(74302),i=e.i(31777);e.i(35364),e.i(98127),e.i(25235);var l=e.i(48249),s=e.i(64541);function d({...e}){return(0,t.jsx)(s.Dialog.Root,{"data-slot":"sheet",...e})}function c({...e}){return(0,t.jsx)(s.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function u({className:e,...r}){return(0,t.jsx)(s.Dialog.Overlay,{"data-slot":"sheet-overlay",className:(0,i.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function f({className:e,children:r,side:a="right",showCloseButton:n=!0,...o}){return(0,t.jsxs)(c,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)(s.Dialog.Content,{"data-slot":"sheet-content",className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===a&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 end-0 h-full w-3/4 border-s sm:max-w-sm","left"===a&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 start-0 h-full w-3/4 border-e sm:max-w-sm","top"===a&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===a&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...o,children:[r,n?(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,t.jsx)(l.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})]})}function p({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,i.cn)("flex flex-col gap-1.5 p-4",e),...r})}function g({className:e,...r}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"sheet-title",className:(0,i.cn)("text-foreground font-semibold",e),...r})}function m({className:e,...r}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"sheet-description",className:(0,i.cn)("text-muted-foreground text-sm",e),...r})}e.s(["Skeleton",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,i.cn)("bg-accent animate-pulse rounded-md",e),...r})}],61238);var h=e.i(2828);let v="shipit-ai-sidebar-open",b=r.createContext(null);function x(){let e=r.useContext(b);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}let y=(0,a.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Sidebar",0,function({side:e="left",variant:r="sidebar",collapsible:a="offcanvas",className:n,children:o,...l}){let{isMobile:s,state:c,openMobile:u,setOpenMobile:h,animated:v}=x();return"none"===a?(0,t.jsx)("div",{"data-slot":"sidebar",className:(0,i.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",n),...l,children:o}):s?(0,t.jsx)(d,{open:u,onOpenChange:h,...l,children:(0,t.jsxs)(f,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:e,children:[(0,t.jsxs)(p,{className:"sr-only",children:[(0,t.jsx)(g,{children:"Sidebar"}),(0,t.jsx)(m,{children:"Displays the mobile sidebar."})]}),(0,t.jsx)("div",{className:"flex h-full w-full flex-col",children:o})]})}):(0,t.jsxs)("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":"collapsed"===c?a:"","data-variant":r,"data-side":e,"data-slot":"sidebar",children:[(0,t.jsx)("div",{"data-slot":"sidebar-gap",className:(0,i.cn)("relative w-(--sidebar-width) bg-transparent",v&&"transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","floating"===r||"inset"===r?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,t.jsx)("div",{"data-slot":"sidebar-container",className:(0,i.cn)("fixed inset-y-0 start-0 z-10 hidden h-svh w-(--sidebar-width) md:flex",v&&"transition-[inset-inline-start,width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:start-[calc(var(--sidebar-width)*-1)]","floating"===r||"inset"===r?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"border-e group-data-[collapsible=icon]:w-(--sidebar-width-icon)",n),...l,children:(0,t.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})},"SidebarContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,i.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r})},"SidebarFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:(0,i.cn)("flex flex-col gap-2 p-2",e),...r})},"SidebarGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:(0,i.cn)("relative flex w-full min-w-0 flex-col p-2",e),...r})},"SidebarGroupContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:(0,i.cn)("w-full text-sm",e),...r})},"SidebarGroupLabel",0,function({className:e,asChild:r=!1,...a}){let n=r?o.Slot.Root:"div";return(0,t.jsx)(n,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:(0,i.cn)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a})},"SidebarHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,i.cn)("flex flex-col gap-2 p-2",e),...r})},"SidebarInset",0,function({className:e,...r}){return(0,t.jsx)("main",{"data-slot":"sidebar-inset",className:(0,i.cn)("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",e),...r})},"SidebarMenu",0,function({className:e,...r}){return(0,t.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,i.cn)("flex w-full min-w-0 flex-col gap-1",e),...r})},"SidebarMenuButton",0,function({asChild:e=!1,isActive:r=!1,variant:a="default",size:l="default",tooltip:s,className:d,...c}){let u=e?o.Slot.Root:"button",{isMobile:f,state:p}=x(),g=n.Direction.useDirection(),m=(0,t.jsx)(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":l,"data-active":r,className:(0,i.cn)(y({variant:a,size:l}),d),...c});return s?("string"==typeof s&&(s={children:s}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:m}),(0,t.jsx)(h.TooltipContent,{side:"rtl"===g?"left":"right",align:"center",hidden:"collapsed"!==p||f,...s})]})):m},"SidebarMenuItem",0,function({className:e,...r}){return(0,t.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,i.cn)("group/menu-item relative",e),...r})},"SidebarProvider",0,function({defaultOpen:e=!0,open:a,onOpenChange:n,className:o,style:l,children:s,...d}){let c=function(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),r=()=>{t(window.innerWidth<768)};return e.addEventListener("change",r),t(window.innerWidth<768),()=>e.removeEventListener("change",r)},[]),!!e}(),[u,f]=r.useState(!1),[p,g]=r.useState(!1),[m,x]=r.useState(e),y=a??m,w=r.useCallback(e=>{let t="function"==typeof e?e(y):e;n?n(t):x(t);try{localStorage.setItem(v,String(t)),document.cookie=`${v}=${t}; path=/; max-age=31536000; SameSite=Lax`}catch{}},[n,y]),S=r.useCallback(()=>(g(!0),c?f(e=>!e):w(e=>!e)),[c,w,f]);r.useEffect(()=>{try{if(!document.cookie.includes(v)){let e=localStorage.getItem(v);null!=e&&(document.cookie=`${v}=${e}; path=/; max-age=31536000; SameSite=Lax`)}}catch{}},[]),r.useEffect(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),S())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[S]);let j=y?"expanded":"collapsed",C=r.useMemo(()=>({state:j,open:y,setOpen:w,isMobile:c,openMobile:u,setOpenMobile:f,toggleSidebar:S,animated:p}),[j,y,w,c,u,f,S,p]);return(0,t.jsx)(b.Provider,{value:C,children:(0,t.jsx)(h.TooltipProvider,{delayDuration:0,children:(0,t.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...l},className:(0,i.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...d,children:s})})})},"SidebarRail",0,function({className:e,...r}){let{toggleSidebar:a}=x();return(0,t.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:(0,i.cn)("hover:after:bg-sidebar-border absolute inset-y-0 -end-4 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:start-1/2 after:w-0.5 sm:flex","cursor-w-resize rtl:cursor-e-resize","in-data-[state=collapsed]:cursor-e-resize rtl:in-data-[state=collapsed]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:start-full","in-data-[collapsible=offcanvas]:-end-2",e),...r})},"useSidebar",0,x],57638)},38373,e=>{"use strict";var t=e.i(96871),r=e.i(16539);let a=(0,r.createContext)({swapPosition:!1});e.s(["FabLayoutProvider",0,function({children:e,layout:r}){return(0,t.jsx)(a.Provider,{value:r,children:e})},"useFabLayout",0,function(){return(0,r.useContext)(a)}])},5147,e=>{"use strict";var t=e.i(96871),r=e.i(16539);let a={"action-required":"action-needed",running:"in-progress",done:"done",blocked:"blocked",pending:"pending",error:"error",creating:null,deleting:null,archived:null},n=(0,r.createContext)(null);e.s(["SidebarFeaturesProvider",0,function({children:e}){let[a,o]=(0,r.useState)([]),[i,l]=(0,r.useState)(!1),s=(0,r.useMemo)(()=>({features:a,setFeatures:o,hasRepositories:i,setHasRepositories:l}),[a,i]);return(0,t.jsx)(n.Provider,{value:s,children:e})},"mapNodeStateToSidebarStatus",0,function(e){return a[e]},"useSidebarFeaturesContext",0,function(){let e=(0,r.useContext)(n);if(!e)throw Error("useSidebarFeaturesContext must be used within a <SidebarFeaturesProvider>");return e}])},47373,27069,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(70309);function n(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",0,n],27069);var o=e.i(91967),i=e.i(87099),l=e.i(22353),s=e.i(9413),d=e.i(75649),c=e.i(3659),u=e.i(87656),f=e.i(62854),p=e.i(11207),g=e.i(73071),m=e.i(76903),h=e.i(85565),v=e.i(60310),b=e.i(88248),x=e.i(36567),y=e.i(18731),w=e.i(9641),S=e.i(87312),j=e.i(73772),C=e.i(69759),P=[" ","Enter","ArrowUp","ArrowDown"],k=[" ","Enter"],N="Select",[D,E,R]=(0,i.createCollection)(N),[T,A]=(0,s.createContextScope)(N,[R,g.createPopperScope]),I=(0,g.createPopperScope)(),[L,_]=T(N),[M,O]=T(N),z=e=>{let{__scopeSelect:a,children:n,open:o,defaultOpen:i,onOpenChange:l,value:s,defaultValue:c,onValueChange:u,dir:f,name:m,autoComplete:h,disabled:v,required:b,form:y}=e,w=I(a),[S,j]=r.useState(null),[C,P]=r.useState(null),[k,E]=r.useState(!1),R=(0,d.useDirection)(f),[T,A]=(0,x.useControllableState)({prop:o,defaultProp:i??!1,onChange:l,caller:N}),[_,O]=(0,x.useControllableState)({prop:s,defaultProp:c,onChange:u,caller:N}),z=r.useRef(null),F=!S||y||!!S.closest("form"),[B,H]=r.useState(new Set),U=Array.from(B).map(e=>e.props.value).join(";");return(0,t.jsx)(g.Root,{...w,children:(0,t.jsxs)(L,{required:b,scope:a,trigger:S,onTriggerChange:j,valueNode:C,onValueNodeChange:P,valueNodeHasChildren:k,onValueNodeHasChildrenChange:E,contentId:(0,p.useId)(),value:_,onValueChange:O,open:T,onOpenChange:A,dir:R,triggerPointerDownPosRef:z,disabled:v,children:[(0,t.jsx)(D.Provider,{scope:a,children:(0,t.jsx)(M,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{H(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{H(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:n})}),F?(0,t.jsxs)(eP,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:h,value:_,onChange:e=>O(e.target.value),disabled:v,form:y,children:[void 0===_?(0,t.jsx)("option",{value:""}):null,Array.from(B)]},U):null]})})};z.displayName=N;var F="SelectTrigger",B=r.forwardRef((e,a)=>{let{__scopeSelect:n,disabled:i=!1,...s}=e,d=I(n),c=_(F,n),u=c.disabled||i,f=(0,l.useComposedRefs)(a,c.onTriggerChange),p=E(n),m=r.useRef("touch"),[v,b,x]=eN(e=>{let t=p().filter(e=>!e.disabled),r=t.find(e=>e.value===c.value),a=eD(t,e,r);void 0!==a&&c.onValueChange(a.value)}),y=e=>{u||(c.onOpenChange(!0),x()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(g.Anchor,{asChild:!0,...d,children:(0,t.jsx)(h.Primitive.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":ek(c.value)?"":void 0,...s,ref:f,onClick:(0,o.composeEventHandlers)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&y(e)}),onPointerDown:(0,o.composeEventHandlers)(s.onPointerDown,e=>{m.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())}),onKeyDown:(0,o.composeEventHandlers)(s.onKeyDown,e=>{let t=""!==v.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||b(e.key),(!t||" "!==e.key)&&P.includes(e.key)&&(y(),e.preventDefault())})})})});B.displayName=F;var H="SelectValue",U=r.forwardRef((e,r)=>{let{__scopeSelect:a,className:n,style:o,children:i,placeholder:s="",...d}=e,c=_(H,a),{onValueNodeHasChildrenChange:u}=c,f=void 0!==i,p=(0,l.useComposedRefs)(r,c.onValueNodeChange);return(0,y.useLayoutEffect)(()=>{u(f)},[u,f]),(0,t.jsx)(h.Primitive.span,{...d,ref:p,style:{pointerEvents:"none"},children:ek(c.value)?(0,t.jsx)(t.Fragment,{children:s}):i})});U.displayName=H;var $=r.forwardRef((e,r)=>{let{__scopeSelect:a,children:n,...o}=e;return(0,t.jsx)(h.Primitive.span,{"aria-hidden":!0,...o,ref:r,children:n||"▼"})});$.displayName="SelectIcon";var V=e=>(0,t.jsx)(m.Portal,{asChild:!0,...e});V.displayName="SelectPortal";var K="SelectContent",W=r.forwardRef((e,n)=>{let o=_(K,e.__scopeSelect),[i,l]=r.useState();return((0,y.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),o.open)?(0,t.jsx)(Y,{...e,ref:n}):i?a.createPortal((0,t.jsx)(G,{scope:e.__scopeSelect,children:(0,t.jsx)(D.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});W.displayName=K;var[G,q]=T(K),X=(0,v.createSlot)("SelectContent.RemoveScroll"),Y=r.forwardRef((e,a)=>{let{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:d,onPointerDownOutside:p,side:g,sideOffset:m,align:h,alignOffset:v,arrowPadding:b,collisionBoundary:x,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:P,...k}=e,N=_(K,n),[D,R]=r.useState(null),[T,A]=r.useState(null),I=(0,l.useComposedRefs)(a,e=>R(e)),[L,M]=r.useState(null),[O,z]=r.useState(null),F=E(n),[B,H]=r.useState(!1),U=r.useRef(!1);r.useEffect(()=>{if(D)return(0,j.hideOthers)(D)},[D]),(0,u.useFocusGuards)();let $=r.useCallback(e=>{let[t,...r]=F().map(e=>e.ref.current),[a]=r.slice(-1),n=document.activeElement;for(let r of e)if(r===n||(r?.scrollIntoView({block:"nearest"}),r===t&&T&&(T.scrollTop=0),r===a&&T&&(T.scrollTop=T.scrollHeight),r?.focus(),document.activeElement!==n))return},[F,T]),V=r.useCallback(()=>$([L,D]),[$,L,D]);r.useEffect(()=>{B&&V()},[B,V]);let{onOpenChange:W,triggerPointerDownPosRef:q}=N;r.useEffect(()=>{if(D){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(q.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():D.contains(r.target)||W(!1),document.removeEventListener("pointermove",t),q.current=null};return null!==q.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[D,W,q]),r.useEffect(()=>{let e=()=>W(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[W]);let[Y,J]=eN(e=>{let t=F().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),a=eD(t,e,r);a&&setTimeout(()=>a.ref.current.focus())}),ee=r.useCallback((e,t,r)=>{let a=!U.current&&!r;(void 0!==N.value&&N.value===t||a)&&(M(e),a&&(U.current=!0))},[N.value]),et=r.useCallback(()=>D?.focus(),[D]),er=r.useCallback((e,t,r)=>{let a=!U.current&&!r;(void 0!==N.value&&N.value===t||a)&&z(e)},[N.value]),ea="popper"===i?Z:Q,en=ea===Z?{side:g,sideOffset:m,align:h,alignOffset:v,arrowPadding:b,collisionBoundary:x,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:P}:{};return(0,t.jsx)(G,{scope:n,content:D,viewport:T,onViewportChange:A,itemRefCallback:ee,selectedItem:L,onItemLeave:et,itemTextRefCallback:er,focusSelectedItem:V,selectedItemText:O,position:i,isPositioned:B,searchRef:Y,children:(0,t.jsx)(C.RemoveScroll,{as:X,allowPinchZoom:!0,children:(0,t.jsx)(f.FocusScope,{asChild:!0,trapped:N.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,o.composeEventHandlers)(s,e=>{N.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(c.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:(0,t.jsx)(ea,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:e=>e.preventDefault(),...k,...en,onPlaced:()=>H(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:(0,o.composeEventHandlers)(k.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||J(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,a=t.indexOf(r);t=t.slice(a+1)}setTimeout(()=>$(t)),e.preventDefault()}})})})})})})});Y.displayName="SelectContentImpl";var Q=r.forwardRef((e,a)=>{let{__scopeSelect:o,onPlaced:i,...s}=e,d=_(K,o),c=q(K,o),[u,f]=r.useState(null),[p,g]=r.useState(null),m=(0,l.useComposedRefs)(a,e=>g(e)),v=E(o),b=r.useRef(!1),x=r.useRef(!0),{viewport:w,selectedItem:S,selectedItemText:j,focusSelectedItem:C}=c,P=r.useCallback(()=>{if(d.trigger&&d.valueNode&&u&&p&&w&&S&&j){let e=d.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),r=d.valueNode.getBoundingClientRect(),a=j.getBoundingClientRect();if("rtl"!==d.dir){let o=a.left-t.left,i=r.left-o,l=e.left-i,s=e.width+l,d=Math.max(s,t.width),c=n(i,[10,Math.max(10,window.innerWidth-10-d)]);u.style.minWidth=s+"px",u.style.left=c+"px"}else{let o=t.right-a.right,i=window.innerWidth-r.right-o,l=window.innerWidth-e.right-i,s=e.width+l,d=Math.max(s,t.width),c=n(i,[10,Math.max(10,window.innerWidth-10-d)]);u.style.minWidth=s+"px",u.style.right=c+"px"}let o=v(),l=window.innerHeight-20,s=w.scrollHeight,c=window.getComputedStyle(p),f=parseInt(c.borderTopWidth,10),g=parseInt(c.paddingTop,10),m=parseInt(c.borderBottomWidth,10),h=f+g+s+parseInt(c.paddingBottom,10)+m,x=Math.min(5*S.offsetHeight,h),y=window.getComputedStyle(w),C=parseInt(y.paddingTop,10),P=parseInt(y.paddingBottom,10),k=e.top+e.height/2-10,N=S.offsetHeight/2,D=f+g+(S.offsetTop+N);if(D<=k){let e=o.length>0&&S===o[o.length-1].ref.current;u.style.bottom="0px";let t=Math.max(l-k,N+(e?P:0)+(p.clientHeight-w.offsetTop-w.offsetHeight)+m);u.style.height=D+t+"px"}else{let e=o.length>0&&S===o[0].ref.current;u.style.top="0px";let t=Math.max(k,f+w.offsetTop+(e?C:0)+N);u.style.height=t+(h-D)+"px",w.scrollTop=D-k+w.offsetTop}u.style.margin="10px 0",u.style.minHeight=x+"px",u.style.maxHeight=l+"px",i?.(),requestAnimationFrame(()=>b.current=!0)}},[v,d.trigger,d.valueNode,u,p,w,S,j,d.dir,i]);(0,y.useLayoutEffect)(()=>P(),[P]);let[k,N]=r.useState();(0,y.useLayoutEffect)(()=>{p&&N(window.getComputedStyle(p).zIndex)},[p]);let D=r.useCallback(e=>{e&&!0===x.current&&(P(),C?.(),x.current=!1)},[P,C]);return(0,t.jsx)(J,{scope:o,contentWrapper:u,shouldExpandOnScrollRef:b,onScrollButtonChange:D,children:(0,t.jsx)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:(0,t.jsx)(h.Primitive.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Q.displayName="SelectItemAlignedPosition";var Z=r.forwardRef((e,r)=>{let{__scopeSelect:a,align:n="start",collisionPadding:o=10,...i}=e,l=I(a);return(0,t.jsx)(g.Content,{...l,...i,ref:r,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Z.displayName="SelectPopperPosition";var[J,ee]=T(K,{}),et="SelectViewport",er=r.forwardRef((e,a)=>{let{__scopeSelect:n,nonce:i,...s}=e,d=q(et,n),c=ee(et,n),u=(0,l.useComposedRefs)(a,d.onViewportChange),f=r.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(D.Slot,{scope:n,children:(0,t.jsx)(h.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:(0,o.composeEventHandlers)(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:a}=c;if(a?.current&&r){let e=Math.abs(f.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,n=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(n<a){let o=n+e,i=Math.min(a,o),l=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=l>0?l:0,r.style.justifyContent="flex-end")}}}f.current=t.scrollTop})})})]})});er.displayName=et;var ea="SelectGroup",[en,eo]=T(ea),ei=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e,o=(0,p.useId)();return(0,t.jsx)(en,{scope:a,id:o,children:(0,t.jsx)(h.Primitive.div,{role:"group","aria-labelledby":o,...n,ref:r})})});ei.displayName=ea;var el="SelectLabel",es=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e,o=eo(el,a);return(0,t.jsx)(h.Primitive.div,{id:o.id,...n,ref:r})});es.displayName=el;var ed="SelectItem",[ec,eu]=T(ed),ef=r.forwardRef((e,a)=>{let{__scopeSelect:n,value:i,disabled:s=!1,textValue:d,...c}=e,u=_(ed,n),f=q(ed,n),g=u.value===i,[m,v]=r.useState(d??""),[b,x]=r.useState(!1),y=(0,l.useComposedRefs)(a,e=>f.itemRefCallback?.(e,i,s)),w=(0,p.useId)(),S=r.useRef("touch"),j=()=>{s||(u.onValueChange(i),u.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(ec,{scope:n,value:i,disabled:s,textId:w,isSelected:g,onItemTextChange:r.useCallback(e=>{v(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(D.ItemSlot,{scope:n,value:i,disabled:s,textValue:m,children:(0,t.jsx)(h.Primitive.div,{role:"option","aria-labelledby":w,"data-highlighted":b?"":void 0,"aria-selected":g&&b,"data-state":g?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...c,ref:y,onFocus:(0,o.composeEventHandlers)(c.onFocus,()=>x(!0)),onBlur:(0,o.composeEventHandlers)(c.onBlur,()=>x(!1)),onClick:(0,o.composeEventHandlers)(c.onClick,()=>{"mouse"!==S.current&&j()}),onPointerUp:(0,o.composeEventHandlers)(c.onPointerUp,()=>{"mouse"===S.current&&j()}),onPointerDown:(0,o.composeEventHandlers)(c.onPointerDown,e=>{S.current=e.pointerType}),onPointerMove:(0,o.composeEventHandlers)(c.onPointerMove,e=>{S.current=e.pointerType,s?f.onItemLeave?.():"mouse"===S.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,o.composeEventHandlers)(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:(0,o.composeEventHandlers)(c.onKeyDown,e=>{(f.searchRef?.current===""||" "!==e.key)&&(k.includes(e.key)&&j()," "===e.key&&e.preventDefault())})})})})});ef.displayName=ed;var ep="SelectItemText",eg=r.forwardRef((e,n)=>{let{__scopeSelect:o,className:i,style:s,...d}=e,c=_(ep,o),u=q(ep,o),f=eu(ep,o),p=O(ep,o),[g,m]=r.useState(null),v=(0,l.useComposedRefs)(n,e=>m(e),f.onItemTextChange,e=>u.itemTextRefCallback?.(e,f.value,f.disabled)),b=g?.textContent,x=r.useMemo(()=>(0,t.jsx)("option",{value:f.value,disabled:f.disabled,children:b},f.value),[f.disabled,f.value,b]),{onNativeOptionAdd:w,onNativeOptionRemove:S}=p;return(0,y.useLayoutEffect)(()=>(w(x),()=>S(x)),[w,S,x]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Primitive.span,{id:f.textId,...d,ref:v}),f.isSelected&&c.valueNode&&!c.valueNodeHasChildren?a.createPortal(d.children,c.valueNode):null]})});eg.displayName=ep;var em="SelectItemIndicator",eh=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e;return eu(em,a).isSelected?(0,t.jsx)(h.Primitive.span,{"aria-hidden":!0,...n,ref:r}):null});eh.displayName=em;var ev="SelectScrollUpButton",eb=r.forwardRef((e,a)=>{let n=q(ev,e.__scopeSelect),o=ee(ev,e.__scopeSelect),[i,s]=r.useState(!1),d=(0,l.useComposedRefs)(a,o.onScrollButtonChange);return(0,y.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){s(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,t.jsx)(ew,{...e,ref:d,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eb.displayName=ev;var ex="SelectScrollDownButton",ey=r.forwardRef((e,a)=>{let n=q(ex,e.__scopeSelect),o=ee(ex,e.__scopeSelect),[i,s]=r.useState(!1),d=(0,l.useComposedRefs)(a,o.onScrollButtonChange);return(0,y.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,t.jsx)(ew,{...e,ref:d,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ey.displayName=ex;var ew=r.forwardRef((e,a)=>{let{__scopeSelect:n,onAutoScroll:i,...l}=e,s=q("SelectScrollButton",n),d=r.useRef(null),c=E(n),u=r.useCallback(()=>{null!==d.current&&(window.clearInterval(d.current),d.current=null)},[]);return r.useEffect(()=>()=>u(),[u]),(0,y.useLayoutEffect)(()=>{let e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,t.jsx)(h.Primitive.div,{"aria-hidden":!0,...l,ref:a,style:{flexShrink:0,...l.style},onPointerDown:(0,o.composeEventHandlers)(l.onPointerDown,()=>{null===d.current&&(d.current=window.setInterval(i,50))}),onPointerMove:(0,o.composeEventHandlers)(l.onPointerMove,()=>{s.onItemLeave?.(),null===d.current&&(d.current=window.setInterval(i,50))}),onPointerLeave:(0,o.composeEventHandlers)(l.onPointerLeave,()=>{u()})})}),eS=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e;return(0,t.jsx)(h.Primitive.div,{"aria-hidden":!0,...n,ref:r})});eS.displayName="SelectSeparator";var ej="SelectArrow",eC=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e,o=I(a),i=_(ej,a),l=q(ej,a);return i.open&&"popper"===l.position?(0,t.jsx)(g.Arrow,{...o,...n,ref:r}):null});eC.displayName=ej;var eP=r.forwardRef(({__scopeSelect:e,value:a,...n},o)=>{let i=r.useRef(null),s=(0,l.useComposedRefs)(o,i),d=(0,w.usePrevious)(a);return r.useEffect(()=>{let e=i.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(d!==a&&t){let r=new Event("change",{bubbles:!0});t.call(e,a),e.dispatchEvent(r)}},[d,a]),(0,t.jsx)(h.Primitive.select,{...n,style:{...S.VISUALLY_HIDDEN_STYLES,...n.style},ref:s,defaultValue:a})});function ek(e){return""===e||void 0===e}function eN(e){let t=(0,b.useCallbackRef)(e),a=r.useRef(""),n=r.useRef(0),o=r.useCallback(e=>{let r=a.current+e;t(r),function e(t){a.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),i=r.useCallback(()=>{a.current="",window.clearTimeout(n.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(n.current),[]),[a,o,i]}function eD(e,t,r){var a,n;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=r?e.indexOf(r):-1,l=(a=e,n=Math.max(i,0),a.map((e,t)=>a[(n+t)%a.length]));1===o.length&&(l=l.filter(e=>e!==r));let s=l.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==r?s:void 0}eP.displayName="SelectBubbleInput",e.s(["Arrow",0,eC,"Content",0,W,"Group",0,ei,"Icon",0,$,"Item",0,ef,"ItemIndicator",0,eh,"ItemText",0,eg,"Label",0,es,"Portal",0,V,"Root",0,z,"ScrollDownButton",0,ey,"ScrollUpButton",0,eb,"Select",0,z,"SelectArrow",0,eC,"SelectContent",0,W,"SelectGroup",0,ei,"SelectIcon",0,$,"SelectItem",0,ef,"SelectItemIndicator",0,eh,"SelectItemText",0,eg,"SelectLabel",0,es,"SelectPortal",0,V,"SelectScrollDownButton",0,ey,"SelectScrollUpButton",0,eb,"SelectSeparator",0,eS,"SelectTrigger",0,B,"SelectValue",0,U,"SelectViewport",0,er,"Separator",0,eS,"Trigger",0,B,"Value",0,U,"Viewport",0,er,"createSelectScope",0,A],74522);var eE=e.i(74522),eE=eE,eR=e.i(23925),eT=e.i(99105),eA=e.i(27728),eI=e.i(31777);let eL=eE.Root;eE.Group;let e_=eE.Value,eM=r.forwardRef(({className:e,children:r,...a},n)=>(0,t.jsxs)(eE.Trigger,{ref:n,className:(0,eI.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[r,(0,t.jsx)(eE.Icon,{asChild:!0,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eM.displayName=eE.Trigger.displayName;let eO=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE.ScrollUpButton,{ref:a,className:(0,eI.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eA.ChevronUp,{className:"h-4 w-4"})}));eO.displayName=eE.ScrollUpButton.displayName;let ez=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE.ScrollDownButton,{ref:a,className:(0,eI.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4"})}));ez.displayName=eE.ScrollDownButton.displayName;let eF=r.forwardRef(({className:e,children:r,position:a="popper",...n},o)=>(0,t.jsx)(eE.Portal,{children:(0,t.jsxs)(eE.Content,{ref:o,className:(0,eI.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[(0,t.jsx)(eO,{}),(0,t.jsx)(eE.Viewport,{className:(0,eI.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,t.jsx)(ez,{})]})}));eF.displayName=eE.Content.displayName,r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE.Label,{ref:a,className:(0,eI.cn)("px-2 py-1.5 text-sm font-semibold",e),...r})).displayName=eE.Label.displayName;let eB=r.forwardRef(({className:e,children:r,...a},n)=>(0,t.jsxs)(eE.Item,{ref:n,className:(0,eI.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 ps-2 pe-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,t.jsx)("span",{className:"absolute end-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eE.ItemIndicator,{children:(0,t.jsx)(eR.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eE.ItemText,{children:r})]}));eB.displayName=eE.Item.displayName,r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE.Separator,{ref:a,className:(0,eI.cn)("bg-muted -mx-1 my-1 h-px",e),...r})).displayName=eE.Separator.displayName,e.s(["Select",0,eL,"SelectContent",0,eF,"SelectItem",0,eB,"SelectTrigger",0,eM,"SelectValue",0,e_],47373)},89305,e=>{e.v(t=>Promise.all(["static/chunks/07yqyvabetyrh.js"].map(t=>e.l(t))).then(()=>t(15567)))}]);
|
|
7
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null};e.s(["Action",0,P,"AlertDialog",0,f,"AlertDialogAction",0,P,"AlertDialogCancel",0,N,"AlertDialogContent",0,y,"AlertDialogDescription",0,C,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,g,"AlertDialogTitle",0,S,"AlertDialogTrigger",0,p,"Cancel",0,N,"Content",0,y,"Description",0,C,"Overlay",0,m,"Portal",0,g,"Root",0,f,"Title",0,S,"Trigger",0,p,"createAlertDialogScope",0,c],37340);var E=e.i(37340),E=E,R=e.i(31777),T=e.i(35364);function A({...e}){return(0,t.jsx)(E.Portal,{"data-slot":"alert-dialog-portal",...e})}function I({className:e,onClick:r,...a}){return(0,t.jsx)(E.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,R.cn)("fixed inset-0 z-50 bg-black/50",e),onClick:e=>{e.stopPropagation(),r?.(e)},...a})}e.s(["AlertDialog",0,function({...e}){return(0,t.jsx)(E.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogAction",0,function({className:e,variant:r="default",size:a="default",...n}){return(0,t.jsx)(T.Button,{variant:r,size:a,asChild:!0,children:(0,t.jsx)(E.Action,{"data-slot":"alert-dialog-action",className:(0,R.cn)(e),...n})})},"AlertDialogCancel",0,function({className:e,variant:r="outline",size:a="default",...n}){return(0,t.jsx)(T.Button,{variant:r,size:a,asChild:!0,children:(0,t.jsx)(E.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,R.cn)(e),...n})})},"AlertDialogContent",0,function({className:e,size:r="default",...a}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(I,{}),(0,t.jsx)(E.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,R.cn)("bg-background group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg",e),...a})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(E.Description,{"data-slot":"alert-dialog-description",className:(0,R.cn)("text-muted-foreground text-sm",e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,R.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,R.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(E.Title,{"data-slot":"alert-dialog-title",className:(0,R.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}],71326)},30153,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(71326);let n=(0,r.createContext)(null);function o(){let e=(0,r.useContext)(n);if(!e)throw Error("useDrawerCloseGuard must be used within DrawerCloseGuardProvider");return e}e.s(["DrawerCloseGuardProvider",0,function({children:e}){let o=(0,r.useRef)(null),i=(0,r.useRef)(null),[l,s]=(0,r.useState)(!1),d=(0,r.useCallback)(e=>{o.current=e},[]),c=(0,r.useCallback)(e=>{if(o.current?.isDirty){i.current=e,s(!0);return}e()},[]),u=(0,r.useCallback)(()=>{s(!1),o.current?.onReset(),o.current=null,i.current?.(),i.current=null},[]),f=(0,r.useCallback)(()=>{s(!1),i.current=null},[]),p=(0,r.useCallback)(()=>o.current?.isDirty??!1,[]);return(0,t.jsxs)(n,{value:{setGuard:d,guardedNavigate:c,getIsDirty:p},children:[e,(0,t.jsx)(a.AlertDialog,{open:l,children:(0,t.jsxs)(a.AlertDialogContent,{children:[(0,t.jsxs)(a.AlertDialogHeader,{children:[(0,t.jsx)(a.AlertDialogTitle,{children:"Discard unsaved changes?"}),(0,t.jsx)(a.AlertDialogDescription,{children:"You have unsaved changes. Are you sure you want to discard them?"})]}),(0,t.jsxs)(a.AlertDialogFooter,{children:[(0,t.jsx)(a.AlertDialogAction,{variant:"destructive",onClick:u,children:"Discard"}),(0,t.jsx)(a.AlertDialogCancel,{onClick:f,children:"Keep editing"})]})]})})]})},"useDrawerCloseGuard",0,o,"useGuardedDrawerClose",0,function({open:e,isDirty:t,onClose:a,onReset:n}){let{setGuard:i,guardedNavigate:l}=o();return(0,r.useEffect)(()=>(e?i({isDirty:t,onReset:n}):i(null),()=>i(null)),[e,t,n,i]),{attemptClose:(0,r.useCallback)(()=>{l(()=>{n(),a()})},[l,a,n])}}])},80986,e=>{"use strict";let t=(0,e.i(3645).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",0,t],30090),e.s(["CircleX",0,t],54277)},10942,94819,e=>{"use strict";var t=e.i(80986);e.s(["CircleCheck",()=>t.default],10942);let r=(0,e.i(3645).default)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Ban",0,r],94819)},57779,80554,e=>{"use strict";var t=e.i(96871);e.s(["ChatDotIndicator",0,function({status:e,className:r=""}){return"idle"===e?null:(0,t.jsx)("span",{className:`absolute -top-0.5 -right-0.5 block rounded-full ${"processing"===e?"h-2.5 w-2.5 animate-pulse bg-blue-500":"h-2 w-2 bg-green-500"} ${r}`})}],57779);var r=e.i(16539),a=e.i(46535);let n=(0,r.createContext)({getStatus:()=>"idle"});e.s(["TurnStatusesProvider",0,function({children:e}){let o=function(){let{data:e}=(0,a.useQuery)({queryKey:["turn-statuses"],queryFn:async()=>{let e=await fetch("/api/interactive/chat/turn-statuses");return e.ok?e.json():{}},refetchInterval:5e3});return e??{}}(),i=(0,r.useMemo)(()=>({getStatus:e=>o[e]??"idle"}),[o]);return(0,t.jsx)(n.Provider,{value:i,children:e})},"useTurnStatus",0,function(e){return(0,r.useContext)(n).getStatus(e)}],80554)},79687,e=>{"use strict";var t=e.i(14748);e.s(["AlertCircle",()=>t.default])},48034,e=>{"use strict";var t=e.i(96871),r=e.i(16539);let a=(0,e.i(18354).createLogger)("[SSE]");function n(e,t,r,a){if("u"<typeof EventSource)return()=>{};let n=null,o=!1,i=1e3,l=null,s=null;return!function d(){o||(n=new EventSource(e?`/api/agent-events?runId=${encodeURIComponent(e)}`:"/api/agent-events"),a("connecting"),n.onopen=()=>{a("connected"),s=setTimeout(()=>{s=null,i=1e3},5e3)},n.onerror=()=>{n?.close(),n=null,a("disconnected"),null!==s&&(clearTimeout(s),s=null);let e=i;i=Math.min(2*e,3e4),l=setTimeout(()=>{l=null,d()},e)},n.addEventListener("notification",e=>{let a=JSON.parse(e.data),n={...a,timestamp:new Date(a.timestamp)};t(e=>{let t=[...e,n];return t.length>500?t.slice(-250):t}),r(n)}))}(),()=>{o=!0,null!==l&&(clearTimeout(l),l=null),null!==s&&(clearTimeout(s),s=null),n&&(n.close(),n=null)}}let o=(0,r.createContext)(null);e.s(["AgentEventsProvider",0,function({children:e,runId:i}){let{events:l,lastEvent:s,connectionStatus:d}=function(e){let[t,o]=(0,r.useState)([]),[i,l]=(0,r.useState)(null),[s,d]=(0,r.useState)("disconnected"),c=e?.runId,u=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{let t=e.data;if(t&&"object"==typeof t)if("notification"===t.type){let e=t.data;a.debug("event received:",e.eventType,e),o(t=>{let r=[...t,e];return r.length>500?r.slice(-250):r}),l(e)}else"status"===t.type&&d(t.status)},[]);return(0,r.useEffect)(()=>{let e="u">typeof location&&new URLSearchParams(location.search).has("sse");if(!navigator.serviceWorker||e)return n(c,o,l,d);let t=!1,r={current:void 0};function a(e){t||(u.current=e,e.postMessage({type:"subscribe",runId:c}),d("connecting"))}function i(){if(t)return;let e=navigator.serviceWorker.controller;e&&(u.current=e,e.postMessage({type:"subscribe",runId:c}),d("connecting"))}return navigator.serviceWorker.addEventListener("message",f),navigator.serviceWorker.addEventListener("controllerchange",i),navigator.serviceWorker.register("/agent-events-sw.js",{scope:"/"}).then(e=>{if(t)return;let i=e.active??e.installing??e.waiting;if(!i){r.current=n(c,o,l,d);return}if("activated"===i.state)a(i);else{let e=()=>{"activated"===i.state&&(i.removeEventListener("statechange",e),a(i))};i.addEventListener("statechange",e)}}).catch(()=>{t||(r.current=n(c,o,l,d))}),()=>{t=!0,navigator.serviceWorker.removeEventListener("message",f),navigator.serviceWorker.removeEventListener("controllerchange",i),u.current?.postMessage({type:"unsubscribe"}),u.current=null,r.current?.()}},[c,f]),{events:t,lastEvent:i,connectionStatus:s}}({runId:i}),c=(0,r.useMemo)(()=>({events:l,lastEvent:s,connectionStatus:d}),[l,s,d]);return(0,t.jsx)(o.Provider,{value:c,children:e})},"useAgentEventsContext",0,function(){let e=(0,r.useContext)(o);if(!e)throw Error("useAgentEventsContext must be used within an <AgentEventsProvider>");return e}],48034)},39200,e=>{"use strict";let t=(0,e.i(3645).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],39200)},81975,e=>{"use strict";let t=(0,e.i(3645).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",0,t],81975)},98127,e=>{"use strict";var t=e.i(96871),r=e.i(31777);e.s(["Input",0,function({className:e,type:a,...n}){return(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}])},66459,e=>{"use strict";let t=(0,e.i(3645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],66459)},12103,e=>{"use strict";let t=(0,e.i(3645).default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",0,t],12103)},97063,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return l},formatWithValidation:function(){return d},urlObjectKeys:function(){return s}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(44066)._(e.r(82977)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",l=e.hash||"",s=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||i.test(a))&&!1!==d?(d="//"+(d||""),n&&"/"!==n[0]&&(n="/"+n)):d||(d=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${d}${n}${c}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return l(e)}},20819,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let a=e.r(94576),n=e.r(66289);function o(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},78380,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},75459,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return v},useLinkStatus:function(){return x}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(44066),i=e.r(96871),l=o._(e.r(16539)),s=e.r(97063),d=e.r(45319),c=e.r(91992),u=e.r(94576),f=e.r(1921);e.r(88976);let p=e.r(94178),g=e.r(1242),m=e.r(20819),h=e.r(44023);function v(t){var r,a;let n,o,v,[x,y]=(0,l.useOptimistic)(g.IDLE_LINK_STATUS),w=(0,l.useRef)(null),{href:S,as:j,children:C,prefetch:P=null,passHref:k,replace:N,shallow:D,scroll:E,onClick:R,onMouseEnter:T,onTouchStart:A,legacyBehavior:I=!1,onNavigate:L,transitionTypes:_,ref:M,unstable_dynamicOnHover:O,...z}=t;n=C,I&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let F=l.default.useContext(d.AppRouterContext),B=!1!==P,H=!1!==P?null===(a=P)||"auto"===a?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,U="string"==typeof(r=j||S)?r:(0,s.formatUrl)(r);if(I){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(n)}let $=I?o&&"object"==typeof o&&o.ref:M,V=l.default.useCallback(e=>(null!==F&&(w.current=(0,g.mountLinkInstance)(e,U,F,H,B,y)),()=>{w.current&&((0,g.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,g.unmountPrefetchableInstance)(e)}),[B,U,F,H,y]),K={ref:(0,c.useMergedRef)(V,$),onClick(t){I||"function"!=typeof R||R(t),I&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!F||t.defaultPrevented||function(t,r,a,n,o,i,s){if("u">typeof window){let d,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(88095);l.default.startTransition(()=>{u(r,n?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,a.current,s)})}}(t,U,w,N,E,L,_)},onMouseEnter(e){I||"function"!=typeof T||T(e),I&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),F&&B&&(0,g.onNavigationIntent)(e.currentTarget,!0===O)},onTouchStart:function(e){I||"function"!=typeof A||A(e),I&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),F&&B&&(0,g.onNavigationIntent)(e.currentTarget,!0===O)}};return(0,u.isAbsoluteUrl)(U)?K.href=U:I&&!k&&("a"!==o.type||"href"in o.props)||(K.href=(0,f.addBasePath)(U)),v=I?l.default.cloneElement(o,K):(0,i.jsx)("a",{...z,...K,children:n}),(0,i.jsx)(b.Provider,{value:x,children:v})}e.r(78380);let b=(0,l.createContext)(g.IDLE_LINK_STATUS),x=()=>(0,l.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},44802,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let a=e.r(26728);function n({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},70399,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},77622,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return s}});let a=e.r(96871),n=e.r(70309),o=e.r(5474),i=e.r(70399),l=e.r(58349);function s({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let d=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,n.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},38762,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return d}});let a=e.r(96871),n=e.r(16539),o=e.r(44802),i=e.r(77622);function l(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},d=function(e){let t={...s,...e},r=(0,n.lazy)(()=>t.loader().then(l)),d=t.loading;function c(e){let l=d?(0,a.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,c=s?n.Suspense:n.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(c,{...s?{fallback:l}:{},children:u})}return c.displayName="LoadableComponent",c}},52199,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let a=e.r(81258)._(e.r(38762));function n(e,t){let r={};"function"==typeof e&&(r.loader=e);let n={...r,...t};return(0,a.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(52199),n=e.i(83428),o=e.i(60112),i=e.i(2287),l=e.i(35364);let s=(0,a.default)(()=>e.A(89305).then(e=>e.FileManager),{loadableGenerated:{modules:[15567]},ssr:!1,loading:()=>(0,t.jsx)(d,{})});function d(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function c(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}e.s(["ReactFileManagerDialog",0,function({open:e,onOpenChange:a,onSelect:n,initialPath:d}){let[u,f]=(0,r.useState)([]),[p,g]=(0,r.useState)(""),[m,h]=(0,r.useState)(!1),[v,b]=(0,r.useState)(null),x=(0,r.useRef)(!1),y=(0,r.useCallback)(async e=>{h(!0),b(null);try{let t=await c(e);f(t.entries),g(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";o.toast.error(e)}finally{h(!1)}},[]);(0,r.useEffect)(()=>{e&&!x.current&&(x.current=!0,y(d)),e||(x.current=!1)},[e,d,y]);let w=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&y(t)},[y]),S=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?b(e[0].absolutePath??null):b(null)},[]);function j(){n(null),a(!1)}return(0,t.jsx)(i.Dialog,{open:e,onOpenChange:e=>{e||j()},children:(0,t.jsxs)(i.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsx)(i.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(i.DialogDescription,{className:"truncate font-mono text-xs",children:p||"Loading..."})]}),(0,t.jsx)("div",{className:"shipit-ai-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(s,{files:u.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:m,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:w,onSelectionChange:S,onRefresh:()=>y(p)},p)}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:j,children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"secondary",onClick:function(){p&&(n(p),a(!1))},disabled:!p,children:"Select Current Folder"}),(0,t.jsx)(l.Button,{onClick:function(){v&&(n(v),a(!1))},disabled:!v,children:"Select Folder"})]})]})})}],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(96976);let r=(0,t.createServerReference)("00997780872a26f8c3cd2d13c5a2de6486c006750e",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function a(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",0,a],78521)},81542,e=>{"use strict";let t=(0,e.i(3645).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);e.s(["GitFork",0,t],81542)},31364,e=>{"use strict";var t=e.i(75649);e.s(["Direction",0,t])},5812,71379,e=>{"use strict";let t=(0,e.i(3645).default)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);e.s(["default",0,t],71379),e.s(["PanelLeftIcon",0,t],5812)},57638,61238,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(94237);e.i(5812);var n=e.i(31364),o=e.i(74302),i=e.i(31777);e.i(35364),e.i(98127),e.i(25235);var l=e.i(48249),s=e.i(64541);function d({...e}){return(0,t.jsx)(s.Dialog.Root,{"data-slot":"sheet",...e})}function c({...e}){return(0,t.jsx)(s.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function u({className:e,...r}){return(0,t.jsx)(s.Dialog.Overlay,{"data-slot":"sheet-overlay",className:(0,i.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function f({className:e,children:r,side:a="right",showCloseButton:n=!0,...o}){return(0,t.jsxs)(c,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)(s.Dialog.Content,{"data-slot":"sheet-content",className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===a&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 end-0 h-full w-3/4 border-s sm:max-w-sm","left"===a&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 start-0 h-full w-3/4 border-e sm:max-w-sm","top"===a&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===a&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...o,children:[r,n?(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,t.jsx)(l.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})]})}function p({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,i.cn)("flex flex-col gap-1.5 p-4",e),...r})}function g({className:e,...r}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"sheet-title",className:(0,i.cn)("text-foreground font-semibold",e),...r})}function m({className:e,...r}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"sheet-description",className:(0,i.cn)("text-muted-foreground text-sm",e),...r})}e.s(["Skeleton",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,i.cn)("bg-accent animate-pulse rounded-md",e),...r})}],61238);var h=e.i(2828);let v="shipit-ai-sidebar-open",b=r.createContext(null);function x(){let e=r.useContext(b);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}let y=(0,a.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Sidebar",0,function({side:e="left",variant:r="sidebar",collapsible:a="offcanvas",className:n,children:o,...l}){let{isMobile:s,state:c,openMobile:u,setOpenMobile:h,animated:v}=x();return"none"===a?(0,t.jsx)("div",{"data-slot":"sidebar",className:(0,i.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",n),...l,children:o}):s?(0,t.jsx)(d,{open:u,onOpenChange:h,...l,children:(0,t.jsxs)(f,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:e,children:[(0,t.jsxs)(p,{className:"sr-only",children:[(0,t.jsx)(g,{children:"Sidebar"}),(0,t.jsx)(m,{children:"Displays the mobile sidebar."})]}),(0,t.jsx)("div",{className:"flex h-full w-full flex-col",children:o})]})}):(0,t.jsxs)("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":"collapsed"===c?a:"","data-variant":r,"data-side":e,"data-slot":"sidebar",children:[(0,t.jsx)("div",{"data-slot":"sidebar-gap",className:(0,i.cn)("relative w-(--sidebar-width) bg-transparent",v&&"transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","floating"===r||"inset"===r?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,t.jsx)("div",{"data-slot":"sidebar-container",className:(0,i.cn)("fixed inset-y-0 start-0 z-10 hidden h-svh w-(--sidebar-width) md:flex",v&&"transition-[inset-inline-start,width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:start-[calc(var(--sidebar-width)*-1)]","floating"===r||"inset"===r?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"border-e group-data-[collapsible=icon]:w-(--sidebar-width-icon)",n),...l,children:(0,t.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})},"SidebarContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,i.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r})},"SidebarFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:(0,i.cn)("flex flex-col gap-2 p-2",e),...r})},"SidebarGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:(0,i.cn)("relative flex w-full min-w-0 flex-col p-2",e),...r})},"SidebarGroupContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:(0,i.cn)("w-full text-sm",e),...r})},"SidebarGroupLabel",0,function({className:e,asChild:r=!1,...a}){let n=r?o.Slot.Root:"div";return(0,t.jsx)(n,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:(0,i.cn)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a})},"SidebarHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,i.cn)("flex flex-col gap-2 p-2",e),...r})},"SidebarInset",0,function({className:e,...r}){return(0,t.jsx)("main",{"data-slot":"sidebar-inset",className:(0,i.cn)("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",e),...r})},"SidebarMenu",0,function({className:e,...r}){return(0,t.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,i.cn)("flex w-full min-w-0 flex-col gap-1",e),...r})},"SidebarMenuButton",0,function({asChild:e=!1,isActive:r=!1,variant:a="default",size:l="default",tooltip:s,className:d,...c}){let u=e?o.Slot.Root:"button",{isMobile:f,state:p}=x(),g=n.Direction.useDirection(),m=(0,t.jsx)(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":l,"data-active":r,className:(0,i.cn)(y({variant:a,size:l}),d),...c});return s?("string"==typeof s&&(s={children:s}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:m}),(0,t.jsx)(h.TooltipContent,{side:"rtl"===g?"left":"right",align:"center",hidden:"collapsed"!==p||f,...s})]})):m},"SidebarMenuItem",0,function({className:e,...r}){return(0,t.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,i.cn)("group/menu-item relative",e),...r})},"SidebarProvider",0,function({defaultOpen:e=!0,open:a,onOpenChange:n,className:o,style:l,children:s,...d}){let c=function(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),r=()=>{t(window.innerWidth<768)};return e.addEventListener("change",r),t(window.innerWidth<768),()=>e.removeEventListener("change",r)},[]),!!e}(),[u,f]=r.useState(!1),[p,g]=r.useState(!1),[m,x]=r.useState(e),y=a??m,w=r.useCallback(e=>{let t="function"==typeof e?e(y):e;n?n(t):x(t);try{localStorage.setItem(v,String(t)),document.cookie=`${v}=${t}; path=/; max-age=31536000; SameSite=Lax`}catch{}},[n,y]),S=r.useCallback(()=>(g(!0),c?f(e=>!e):w(e=>!e)),[c,w,f]);r.useEffect(()=>{try{if(!document.cookie.includes(v)){let e=localStorage.getItem(v);null!=e&&(document.cookie=`${v}=${e}; path=/; max-age=31536000; SameSite=Lax`)}}catch{}},[]),r.useEffect(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),S())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[S]);let j=y?"expanded":"collapsed",C=r.useMemo(()=>({state:j,open:y,setOpen:w,isMobile:c,openMobile:u,setOpenMobile:f,toggleSidebar:S,animated:p}),[j,y,w,c,u,f,S,p]);return(0,t.jsx)(b.Provider,{value:C,children:(0,t.jsx)(h.TooltipProvider,{delayDuration:0,children:(0,t.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...l},className:(0,i.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...d,children:s})})})},"SidebarRail",0,function({className:e,...r}){let{toggleSidebar:a}=x();return(0,t.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:(0,i.cn)("hover:after:bg-sidebar-border absolute inset-y-0 -end-4 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:start-1/2 after:w-0.5 sm:flex","cursor-w-resize rtl:cursor-e-resize","in-data-[state=collapsed]:cursor-e-resize rtl:in-data-[state=collapsed]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:start-full","in-data-[collapsible=offcanvas]:-end-2",e),...r})},"useSidebar",0,x],57638)},38373,e=>{"use strict";var t=e.i(96871),r=e.i(16539);let a=(0,r.createContext)({swapPosition:!1});e.s(["FabLayoutProvider",0,function({children:e,layout:r}){return(0,t.jsx)(a.Provider,{value:r,children:e})},"useFabLayout",0,function(){return(0,r.useContext)(a)}])},5147,e=>{"use strict";var t=e.i(96871),r=e.i(16539);let a={"action-required":"action-needed",running:"in-progress",done:"done",blocked:"blocked",pending:"pending",error:"error",creating:null,deleting:null,archived:null},n=(0,r.createContext)(null);e.s(["SidebarFeaturesProvider",0,function({children:e}){let[a,o]=(0,r.useState)([]),[i,l]=(0,r.useState)(!1),s=(0,r.useMemo)(()=>({features:a,setFeatures:o,hasRepositories:i,setHasRepositories:l}),[a,i]);return(0,t.jsx)(n.Provider,{value:s,children:e})},"mapNodeStateToSidebarStatus",0,function(e){return a[e]},"useSidebarFeaturesContext",0,function(){let e=(0,r.useContext)(n);if(!e)throw Error("useSidebarFeaturesContext must be used within a <SidebarFeaturesProvider>");return e}])},47373,27069,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(70309);function n(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",0,n],27069);var o=e.i(91967),i=e.i(87099),l=e.i(22353),s=e.i(9413),d=e.i(75649),c=e.i(3659),u=e.i(87656),f=e.i(62854),p=e.i(11207),g=e.i(73071),m=e.i(76903),h=e.i(85565),v=e.i(60310),b=e.i(88248),x=e.i(36567),y=e.i(18731),w=e.i(9641),S=e.i(87312),j=e.i(73772),C=e.i(69759),P=[" ","Enter","ArrowUp","ArrowDown"],k=[" ","Enter"],N="Select",[D,E,R]=(0,i.createCollection)(N),[T,A]=(0,s.createContextScope)(N,[R,g.createPopperScope]),I=(0,g.createPopperScope)(),[L,_]=T(N),[M,O]=T(N),z=e=>{let{__scopeSelect:a,children:n,open:o,defaultOpen:i,onOpenChange:l,value:s,defaultValue:c,onValueChange:u,dir:f,name:m,autoComplete:h,disabled:v,required:b,form:y}=e,w=I(a),[S,j]=r.useState(null),[C,P]=r.useState(null),[k,E]=r.useState(!1),R=(0,d.useDirection)(f),[T,A]=(0,x.useControllableState)({prop:o,defaultProp:i??!1,onChange:l,caller:N}),[_,O]=(0,x.useControllableState)({prop:s,defaultProp:c,onChange:u,caller:N}),z=r.useRef(null),F=!S||y||!!S.closest("form"),[B,H]=r.useState(new Set),U=Array.from(B).map(e=>e.props.value).join(";");return(0,t.jsx)(g.Root,{...w,children:(0,t.jsxs)(L,{required:b,scope:a,trigger:S,onTriggerChange:j,valueNode:C,onValueNodeChange:P,valueNodeHasChildren:k,onValueNodeHasChildrenChange:E,contentId:(0,p.useId)(),value:_,onValueChange:O,open:T,onOpenChange:A,dir:R,triggerPointerDownPosRef:z,disabled:v,children:[(0,t.jsx)(D.Provider,{scope:a,children:(0,t.jsx)(M,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{H(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{H(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:n})}),F?(0,t.jsxs)(eP,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:h,value:_,onChange:e=>O(e.target.value),disabled:v,form:y,children:[void 0===_?(0,t.jsx)("option",{value:""}):null,Array.from(B)]},U):null]})})};z.displayName=N;var F="SelectTrigger",B=r.forwardRef((e,a)=>{let{__scopeSelect:n,disabled:i=!1,...s}=e,d=I(n),c=_(F,n),u=c.disabled||i,f=(0,l.useComposedRefs)(a,c.onTriggerChange),p=E(n),m=r.useRef("touch"),[v,b,x]=eN(e=>{let t=p().filter(e=>!e.disabled),r=t.find(e=>e.value===c.value),a=eD(t,e,r);void 0!==a&&c.onValueChange(a.value)}),y=e=>{u||(c.onOpenChange(!0),x()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(g.Anchor,{asChild:!0,...d,children:(0,t.jsx)(h.Primitive.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":ek(c.value)?"":void 0,...s,ref:f,onClick:(0,o.composeEventHandlers)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&y(e)}),onPointerDown:(0,o.composeEventHandlers)(s.onPointerDown,e=>{m.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())}),onKeyDown:(0,o.composeEventHandlers)(s.onKeyDown,e=>{let t=""!==v.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||b(e.key),(!t||" "!==e.key)&&P.includes(e.key)&&(y(),e.preventDefault())})})})});B.displayName=F;var H="SelectValue",U=r.forwardRef((e,r)=>{let{__scopeSelect:a,className:n,style:o,children:i,placeholder:s="",...d}=e,c=_(H,a),{onValueNodeHasChildrenChange:u}=c,f=void 0!==i,p=(0,l.useComposedRefs)(r,c.onValueNodeChange);return(0,y.useLayoutEffect)(()=>{u(f)},[u,f]),(0,t.jsx)(h.Primitive.span,{...d,ref:p,style:{pointerEvents:"none"},children:ek(c.value)?(0,t.jsx)(t.Fragment,{children:s}):i})});U.displayName=H;var $=r.forwardRef((e,r)=>{let{__scopeSelect:a,children:n,...o}=e;return(0,t.jsx)(h.Primitive.span,{"aria-hidden":!0,...o,ref:r,children:n||"▼"})});$.displayName="SelectIcon";var V=e=>(0,t.jsx)(m.Portal,{asChild:!0,...e});V.displayName="SelectPortal";var K="SelectContent",W=r.forwardRef((e,n)=>{let o=_(K,e.__scopeSelect),[i,l]=r.useState();return((0,y.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),o.open)?(0,t.jsx)(Y,{...e,ref:n}):i?a.createPortal((0,t.jsx)(G,{scope:e.__scopeSelect,children:(0,t.jsx)(D.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});W.displayName=K;var[G,q]=T(K),X=(0,v.createSlot)("SelectContent.RemoveScroll"),Y=r.forwardRef((e,a)=>{let{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:d,onPointerDownOutside:p,side:g,sideOffset:m,align:h,alignOffset:v,arrowPadding:b,collisionBoundary:x,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:P,...k}=e,N=_(K,n),[D,R]=r.useState(null),[T,A]=r.useState(null),I=(0,l.useComposedRefs)(a,e=>R(e)),[L,M]=r.useState(null),[O,z]=r.useState(null),F=E(n),[B,H]=r.useState(!1),U=r.useRef(!1);r.useEffect(()=>{if(D)return(0,j.hideOthers)(D)},[D]),(0,u.useFocusGuards)();let $=r.useCallback(e=>{let[t,...r]=F().map(e=>e.ref.current),[a]=r.slice(-1),n=document.activeElement;for(let r of e)if(r===n||(r?.scrollIntoView({block:"nearest"}),r===t&&T&&(T.scrollTop=0),r===a&&T&&(T.scrollTop=T.scrollHeight),r?.focus(),document.activeElement!==n))return},[F,T]),V=r.useCallback(()=>$([L,D]),[$,L,D]);r.useEffect(()=>{B&&V()},[B,V]);let{onOpenChange:W,triggerPointerDownPosRef:q}=N;r.useEffect(()=>{if(D){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(q.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():D.contains(r.target)||W(!1),document.removeEventListener("pointermove",t),q.current=null};return null!==q.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[D,W,q]),r.useEffect(()=>{let e=()=>W(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[W]);let[Y,J]=eN(e=>{let t=F().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),a=eD(t,e,r);a&&setTimeout(()=>a.ref.current.focus())}),ee=r.useCallback((e,t,r)=>{let a=!U.current&&!r;(void 0!==N.value&&N.value===t||a)&&(M(e),a&&(U.current=!0))},[N.value]),et=r.useCallback(()=>D?.focus(),[D]),er=r.useCallback((e,t,r)=>{let a=!U.current&&!r;(void 0!==N.value&&N.value===t||a)&&z(e)},[N.value]),ea="popper"===i?Z:Q,en=ea===Z?{side:g,sideOffset:m,align:h,alignOffset:v,arrowPadding:b,collisionBoundary:x,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:P}:{};return(0,t.jsx)(G,{scope:n,content:D,viewport:T,onViewportChange:A,itemRefCallback:ee,selectedItem:L,onItemLeave:et,itemTextRefCallback:er,focusSelectedItem:V,selectedItemText:O,position:i,isPositioned:B,searchRef:Y,children:(0,t.jsx)(C.RemoveScroll,{as:X,allowPinchZoom:!0,children:(0,t.jsx)(f.FocusScope,{asChild:!0,trapped:N.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,o.composeEventHandlers)(s,e=>{N.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(c.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:(0,t.jsx)(ea,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:e=>e.preventDefault(),...k,...en,onPlaced:()=>H(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:(0,o.composeEventHandlers)(k.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||J(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,a=t.indexOf(r);t=t.slice(a+1)}setTimeout(()=>$(t)),e.preventDefault()}})})})})})})});Y.displayName="SelectContentImpl";var Q=r.forwardRef((e,a)=>{let{__scopeSelect:o,onPlaced:i,...s}=e,d=_(K,o),c=q(K,o),[u,f]=r.useState(null),[p,g]=r.useState(null),m=(0,l.useComposedRefs)(a,e=>g(e)),v=E(o),b=r.useRef(!1),x=r.useRef(!0),{viewport:w,selectedItem:S,selectedItemText:j,focusSelectedItem:C}=c,P=r.useCallback(()=>{if(d.trigger&&d.valueNode&&u&&p&&w&&S&&j){let e=d.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),r=d.valueNode.getBoundingClientRect(),a=j.getBoundingClientRect();if("rtl"!==d.dir){let o=a.left-t.left,i=r.left-o,l=e.left-i,s=e.width+l,d=Math.max(s,t.width),c=n(i,[10,Math.max(10,window.innerWidth-10-d)]);u.style.minWidth=s+"px",u.style.left=c+"px"}else{let o=t.right-a.right,i=window.innerWidth-r.right-o,l=window.innerWidth-e.right-i,s=e.width+l,d=Math.max(s,t.width),c=n(i,[10,Math.max(10,window.innerWidth-10-d)]);u.style.minWidth=s+"px",u.style.right=c+"px"}let o=v(),l=window.innerHeight-20,s=w.scrollHeight,c=window.getComputedStyle(p),f=parseInt(c.borderTopWidth,10),g=parseInt(c.paddingTop,10),m=parseInt(c.borderBottomWidth,10),h=f+g+s+parseInt(c.paddingBottom,10)+m,x=Math.min(5*S.offsetHeight,h),y=window.getComputedStyle(w),C=parseInt(y.paddingTop,10),P=parseInt(y.paddingBottom,10),k=e.top+e.height/2-10,N=S.offsetHeight/2,D=f+g+(S.offsetTop+N);if(D<=k){let e=o.length>0&&S===o[o.length-1].ref.current;u.style.bottom="0px";let t=Math.max(l-k,N+(e?P:0)+(p.clientHeight-w.offsetTop-w.offsetHeight)+m);u.style.height=D+t+"px"}else{let e=o.length>0&&S===o[0].ref.current;u.style.top="0px";let t=Math.max(k,f+w.offsetTop+(e?C:0)+N);u.style.height=t+(h-D)+"px",w.scrollTop=D-k+w.offsetTop}u.style.margin="10px 0",u.style.minHeight=x+"px",u.style.maxHeight=l+"px",i?.(),requestAnimationFrame(()=>b.current=!0)}},[v,d.trigger,d.valueNode,u,p,w,S,j,d.dir,i]);(0,y.useLayoutEffect)(()=>P(),[P]);let[k,N]=r.useState();(0,y.useLayoutEffect)(()=>{p&&N(window.getComputedStyle(p).zIndex)},[p]);let D=r.useCallback(e=>{e&&!0===x.current&&(P(),C?.(),x.current=!1)},[P,C]);return(0,t.jsx)(J,{scope:o,contentWrapper:u,shouldExpandOnScrollRef:b,onScrollButtonChange:D,children:(0,t.jsx)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:(0,t.jsx)(h.Primitive.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Q.displayName="SelectItemAlignedPosition";var Z=r.forwardRef((e,r)=>{let{__scopeSelect:a,align:n="start",collisionPadding:o=10,...i}=e,l=I(a);return(0,t.jsx)(g.Content,{...l,...i,ref:r,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Z.displayName="SelectPopperPosition";var[J,ee]=T(K,{}),et="SelectViewport",er=r.forwardRef((e,a)=>{let{__scopeSelect:n,nonce:i,...s}=e,d=q(et,n),c=ee(et,n),u=(0,l.useComposedRefs)(a,d.onViewportChange),f=r.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(D.Slot,{scope:n,children:(0,t.jsx)(h.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:(0,o.composeEventHandlers)(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:a}=c;if(a?.current&&r){let e=Math.abs(f.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,n=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(n<a){let o=n+e,i=Math.min(a,o),l=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=l>0?l:0,r.style.justifyContent="flex-end")}}}f.current=t.scrollTop})})})]})});er.displayName=et;var ea="SelectGroup",[en,eo]=T(ea),ei=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e,o=(0,p.useId)();return(0,t.jsx)(en,{scope:a,id:o,children:(0,t.jsx)(h.Primitive.div,{role:"group","aria-labelledby":o,...n,ref:r})})});ei.displayName=ea;var el="SelectLabel",es=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e,o=eo(el,a);return(0,t.jsx)(h.Primitive.div,{id:o.id,...n,ref:r})});es.displayName=el;var ed="SelectItem",[ec,eu]=T(ed),ef=r.forwardRef((e,a)=>{let{__scopeSelect:n,value:i,disabled:s=!1,textValue:d,...c}=e,u=_(ed,n),f=q(ed,n),g=u.value===i,[m,v]=r.useState(d??""),[b,x]=r.useState(!1),y=(0,l.useComposedRefs)(a,e=>f.itemRefCallback?.(e,i,s)),w=(0,p.useId)(),S=r.useRef("touch"),j=()=>{s||(u.onValueChange(i),u.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(ec,{scope:n,value:i,disabled:s,textId:w,isSelected:g,onItemTextChange:r.useCallback(e=>{v(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(D.ItemSlot,{scope:n,value:i,disabled:s,textValue:m,children:(0,t.jsx)(h.Primitive.div,{role:"option","aria-labelledby":w,"data-highlighted":b?"":void 0,"aria-selected":g&&b,"data-state":g?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...c,ref:y,onFocus:(0,o.composeEventHandlers)(c.onFocus,()=>x(!0)),onBlur:(0,o.composeEventHandlers)(c.onBlur,()=>x(!1)),onClick:(0,o.composeEventHandlers)(c.onClick,()=>{"mouse"!==S.current&&j()}),onPointerUp:(0,o.composeEventHandlers)(c.onPointerUp,()=>{"mouse"===S.current&&j()}),onPointerDown:(0,o.composeEventHandlers)(c.onPointerDown,e=>{S.current=e.pointerType}),onPointerMove:(0,o.composeEventHandlers)(c.onPointerMove,e=>{S.current=e.pointerType,s?f.onItemLeave?.():"mouse"===S.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,o.composeEventHandlers)(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:(0,o.composeEventHandlers)(c.onKeyDown,e=>{(f.searchRef?.current===""||" "!==e.key)&&(k.includes(e.key)&&j()," "===e.key&&e.preventDefault())})})})})});ef.displayName=ed;var ep="SelectItemText",eg=r.forwardRef((e,n)=>{let{__scopeSelect:o,className:i,style:s,...d}=e,c=_(ep,o),u=q(ep,o),f=eu(ep,o),p=O(ep,o),[g,m]=r.useState(null),v=(0,l.useComposedRefs)(n,e=>m(e),f.onItemTextChange,e=>u.itemTextRefCallback?.(e,f.value,f.disabled)),b=g?.textContent,x=r.useMemo(()=>(0,t.jsx)("option",{value:f.value,disabled:f.disabled,children:b},f.value),[f.disabled,f.value,b]),{onNativeOptionAdd:w,onNativeOptionRemove:S}=p;return(0,y.useLayoutEffect)(()=>(w(x),()=>S(x)),[w,S,x]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Primitive.span,{id:f.textId,...d,ref:v}),f.isSelected&&c.valueNode&&!c.valueNodeHasChildren?a.createPortal(d.children,c.valueNode):null]})});eg.displayName=ep;var em="SelectItemIndicator",eh=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e;return eu(em,a).isSelected?(0,t.jsx)(h.Primitive.span,{"aria-hidden":!0,...n,ref:r}):null});eh.displayName=em;var ev="SelectScrollUpButton",eb=r.forwardRef((e,a)=>{let n=q(ev,e.__scopeSelect),o=ee(ev,e.__scopeSelect),[i,s]=r.useState(!1),d=(0,l.useComposedRefs)(a,o.onScrollButtonChange);return(0,y.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){s(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,t.jsx)(ew,{...e,ref:d,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eb.displayName=ev;var ex="SelectScrollDownButton",ey=r.forwardRef((e,a)=>{let n=q(ex,e.__scopeSelect),o=ee(ex,e.__scopeSelect),[i,s]=r.useState(!1),d=(0,l.useComposedRefs)(a,o.onScrollButtonChange);return(0,y.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,t.jsx)(ew,{...e,ref:d,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ey.displayName=ex;var ew=r.forwardRef((e,a)=>{let{__scopeSelect:n,onAutoScroll:i,...l}=e,s=q("SelectScrollButton",n),d=r.useRef(null),c=E(n),u=r.useCallback(()=>{null!==d.current&&(window.clearInterval(d.current),d.current=null)},[]);return r.useEffect(()=>()=>u(),[u]),(0,y.useLayoutEffect)(()=>{let e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,t.jsx)(h.Primitive.div,{"aria-hidden":!0,...l,ref:a,style:{flexShrink:0,...l.style},onPointerDown:(0,o.composeEventHandlers)(l.onPointerDown,()=>{null===d.current&&(d.current=window.setInterval(i,50))}),onPointerMove:(0,o.composeEventHandlers)(l.onPointerMove,()=>{s.onItemLeave?.(),null===d.current&&(d.current=window.setInterval(i,50))}),onPointerLeave:(0,o.composeEventHandlers)(l.onPointerLeave,()=>{u()})})}),eS=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e;return(0,t.jsx)(h.Primitive.div,{"aria-hidden":!0,...n,ref:r})});eS.displayName="SelectSeparator";var ej="SelectArrow",eC=r.forwardRef((e,r)=>{let{__scopeSelect:a,...n}=e,o=I(a),i=_(ej,a),l=q(ej,a);return i.open&&"popper"===l.position?(0,t.jsx)(g.Arrow,{...o,...n,ref:r}):null});eC.displayName=ej;var eP=r.forwardRef(({__scopeSelect:e,value:a,...n},o)=>{let i=r.useRef(null),s=(0,l.useComposedRefs)(o,i),d=(0,w.usePrevious)(a);return r.useEffect(()=>{let e=i.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(d!==a&&t){let r=new Event("change",{bubbles:!0});t.call(e,a),e.dispatchEvent(r)}},[d,a]),(0,t.jsx)(h.Primitive.select,{...n,style:{...S.VISUALLY_HIDDEN_STYLES,...n.style},ref:s,defaultValue:a})});function ek(e){return""===e||void 0===e}function eN(e){let t=(0,b.useCallbackRef)(e),a=r.useRef(""),n=r.useRef(0),o=r.useCallback(e=>{let r=a.current+e;t(r),function e(t){a.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),i=r.useCallback(()=>{a.current="",window.clearTimeout(n.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(n.current),[]),[a,o,i]}function eD(e,t,r){var a,n;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=r?e.indexOf(r):-1,l=(a=e,n=Math.max(i,0),a.map((e,t)=>a[(n+t)%a.length]));1===o.length&&(l=l.filter(e=>e!==r));let s=l.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==r?s:void 0}eP.displayName="SelectBubbleInput",e.s(["Arrow",0,eC,"Content",0,W,"Group",0,ei,"Icon",0,$,"Item",0,ef,"ItemIndicator",0,eh,"ItemText",0,eg,"Label",0,es,"Portal",0,V,"Root",0,z,"ScrollDownButton",0,ey,"ScrollUpButton",0,eb,"Select",0,z,"SelectArrow",0,eC,"SelectContent",0,W,"SelectGroup",0,ei,"SelectIcon",0,$,"SelectItem",0,ef,"SelectItemIndicator",0,eh,"SelectItemText",0,eg,"SelectLabel",0,es,"SelectPortal",0,V,"SelectScrollDownButton",0,ey,"SelectScrollUpButton",0,eb,"SelectSeparator",0,eS,"SelectTrigger",0,B,"SelectValue",0,U,"SelectViewport",0,er,"Separator",0,eS,"Trigger",0,B,"Value",0,U,"Viewport",0,er,"createSelectScope",0,A],74522);var eE=e.i(74522),eE=eE,eR=e.i(23925),eT=e.i(99105),eA=e.i(27728),eI=e.i(31777);let eL=eE.Root;eE.Group;let e_=eE.Value,eM=r.forwardRef(({className:e,children:r,...a},n)=>(0,t.jsxs)(eE.Trigger,{ref:n,className:(0,eI.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[r,(0,t.jsx)(eE.Icon,{asChild:!0,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eM.displayName=eE.Trigger.displayName;let eO=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE.ScrollUpButton,{ref:a,className:(0,eI.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eA.ChevronUp,{className:"h-4 w-4"})}));eO.displayName=eE.ScrollUpButton.displayName;let ez=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE.ScrollDownButton,{ref:a,className:(0,eI.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4"})}));ez.displayName=eE.ScrollDownButton.displayName;let eF=r.forwardRef(({className:e,children:r,position:a="popper",...n},o)=>(0,t.jsx)(eE.Portal,{children:(0,t.jsxs)(eE.Content,{ref:o,className:(0,eI.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[(0,t.jsx)(eO,{}),(0,t.jsx)(eE.Viewport,{className:(0,eI.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,t.jsx)(ez,{})]})}));eF.displayName=eE.Content.displayName,r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE.Label,{ref:a,className:(0,eI.cn)("px-2 py-1.5 text-sm font-semibold",e),...r})).displayName=eE.Label.displayName;let eB=r.forwardRef(({className:e,children:r,...a},n)=>(0,t.jsxs)(eE.Item,{ref:n,className:(0,eI.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 ps-2 pe-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,t.jsx)("span",{className:"absolute end-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eE.ItemIndicator,{children:(0,t.jsx)(eR.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eE.ItemText,{children:r})]}));eB.displayName=eE.Item.displayName,r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE.Separator,{ref:a,className:(0,eI.cn)("bg-muted -mx-1 my-1 h-px",e),...r})).displayName=eE.Separator.displayName,e.s(["Select",0,eL,"SelectContent",0,eF,"SelectItem",0,eB,"SelectTrigger",0,eM,"SelectValue",0,e_],47373)},89305,e=>{e.v(t=>Promise.all(["static/chunks/07yqyvabetyrh.js"].map(t=>e.l(t))).then(()=>t(15567)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(96871),i=e.i(16539),n=e.i(23925),s=e.i(26370),a=e.i(38573),r=e.i(49228),l=e.i(74294),o=e.i(3645);let c=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),d=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var g=e.i(32494);let m=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var h=e.i(58860),p=e.i(48109);let f=(0,o.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);var x=e.i(60112);e.i(98026);var v=e.i(50728),b=e.i(31777),w=e.i(47373),j=e.i(96976);let y=(0,j.createServerReference)("4002c50773df6a66d80c66a754b2d564b1c81deb47",j.callServer,void 0,j.findSourceMapURL,"updateSettingsAction");var S=e.i(17406),k=e.i(30342),C=e.i(44229),M=e.i(83902);function N(e){return(0,t.jsx)(C.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function I({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function T({className:e}){return(0,t.jsx)(k.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function A({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function D({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function F({className:e,...i}){return(0,t.jsx)(M.Rocket,{className:(0,b.cn)("h-4 w-4",e),...i})}I.displayName="VsCodeIcon",T.displayName="CursorEditorIcon",A.displayName="WindsurfIcon",D.displayName="ZedIcon",F.displayName="AntigravityIcon";let P={vscode:I,cursor:T,windsurf:A,zed:D,antigravity:F};var E=e.i(9749),R=e.i(956),z=e.i(41957);let B=[{value:S.Language.English,label:"English",nativeName:"English"},{value:S.Language.Russian,label:"Русский",nativeName:"Русский"},{value:S.Language.Portuguese,label:"Português",nativeName:"Português"},{value:S.Language.Spanish,label:"Español",nativeName:"Español"},{value:S.Language.Arabic,label:"العربية",nativeName:"العربية"},{value:S.Language.Hebrew,label:"עברית",nativeName:"עברית"},{value:S.Language.French,label:"Français",nativeName:"Français"},{value:S.Language.German,label:"Deutsch",nativeName:"Deutsch"}];function L({language:e}){let{t:s,i18n:a}=(0,v.useTranslation)("web"),[r,l]=(0,i.useState)(e),[o,c]=(0,i.useTransition)(),[d,u]=(0,i.useState)(!1),m=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(m.current&&!o){u(!0);let e=setTimeout(()=>u(!1),2e3);return()=>clearTimeout(e)}m.current=o},[o]),(0,t.jsxs)(R.Card,{id:"language",className:"scroll-mt-6","data-testid":"language-settings-section",children:[(0,t.jsxs)(R.CardHeader,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Globe,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)(R.CardTitle,{children:s("settings.language.title")})]}),o?(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:s("common:labels.saving")}):null,d&&!o?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-green-600",children:[(0,t.jsx)(n.Check,{className:"h-3 w-3"}),s("common:labels.saved")]}):null]}),(0,t.jsx)(R.CardDescription,{children:s("settings.language.description")})]}),(0,t.jsx)(R.CardContent,{className:"space-y-4",children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.Label,{htmlFor:"display-language",children:s("settings.language.label")}),(0,t.jsxs)(w.Select,{value:r,onValueChange:function(e){l(e),a.changeLanguage(e);let t="ar"===e||"he"===e?"rtl":"ltr";document.documentElement.lang=e,document.documentElement.dir=t,c(async()=>{let t=await y({user:{preferredLanguage:e}});t.success||x.toast.error(t.error??s("settings.language.failedToSave","Failed to save language settings"))})},children:[(0,t.jsx)(w.SelectTrigger,{id:"display-language","data-testid":"language-select",children:(0,t.jsx)(w.SelectValue,{placeholder:s("settings.language.placeholder")})}),(0,t.jsx)(w.SelectContent,{children:B.map(e=>(0,t.jsx)(w.SelectItem,{value:e.value,children:e.nativeName},e.value))})]})]})})]})}var _=e.i(61569),_=_,K=e.i(3214),V=e.i(30702),W=e.i(51911);function H({label:e,description:i,htmlFor:n,children:s}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(z.Label,{htmlFor:n,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),i?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:i}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s})]})}function O({label:e,description:i,id:n,testId:s,checked:a,onChange:r,disabled:l}){return(0,t.jsx)(H,{label:e,description:i,htmlFor:n,children:(0,t.jsx)(W.Switch,{id:n,"data-testid":s,checked:a,onCheckedChange:r,disabled:l,className:(0,b.cn)("cursor-pointer",l&&"cursor-not-allowed opacity-50")})})}function q({icon:e,title:i,description:n,badge:s,testId:a,children:r}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":a,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:i}),s?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:s}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:n})]}),(0,t.jsx)("div",{className:"px-4",children:r})]})}function G({id:e,testId:i,value:n,onChange:s,onBlur:a,placeholder:r,min:l=1,max:o,step:c=1,suffix:d}){let{t:u}=(0,v.useTranslation)("web"),g=""===n?void 0:parseInt(n,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{s(String(Math.max(l,(g??parseInt(r,10))-c)))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":u("common.decrease"),children:(0,t.jsx)(_.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":i,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:n,placeholder:r,onChange:e=>{s(e.target.value.replace(/[^0-9]/g,""))},onBlur:a,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=g??parseInt(r,10),s(String(null!=o?Math.min(o,e+c):e+c))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":u("common.increase"),children:(0,t.jsx)(K.Plus,{className:"h-3 w-3"})})]}),d?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:d}):null]})}function U({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function $({children:e,links:i}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=i&&i.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:i.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(V.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function Z(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function X({settings:e}){let{t:n}=(0,v.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,r]=(0,i.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[o,c]=(0,i.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[d,u]=(0,i.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[g,m]=(0,i.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),[h,p]=(0,i.useState)(!1!==e.workflow.hideCiStatus),f=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",b=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",w=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",j=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"";function S(e){s(async()=>{let t=await y(e);t.success||x.toast.error(t.error??n("settings.failedToSave"))})}function k(e){let t=Z(e.ciTimeout??o);return{workflow:{ciMaxFixAttempts:Z(e.ciMaxFix??a),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:Z(e.ciLogMax??d),ciWatchPollIntervalSeconds:Z(e.ciPollInterval??g),hideCiStatus:e.hideCiStatus??h}}}return(0,t.jsxs)(q,{icon:l.Activity,title:n("settings.ci.title"),description:n("settings.ci.description"),testId:"ci-settings-section",children:[(0,t.jsx)(H,{label:n("settings.ci.maxFixAttempts"),description:n("settings.ci.maxFixAttemptsDescription"),htmlFor:"ci-max-fix",children:(0,t.jsx)(G,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:a,onChange:r,onBlur:()=>{a!==f&&S(k({ciMaxFix:a}))},min:1,max:10})}),(0,t.jsx)(H,{label:n("settings.ci.watchTimeout"),description:n("settings.ci.watchTimeoutDescription"),htmlFor:"ci-timeout",children:(0,t.jsx)(G,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:o,onChange:c,onBlur:()=>{o!==b&&S(k({ciTimeout:o}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(H,{label:n("settings.ci.maxLogSize"),description:n("settings.ci.maxLogSizeDescription"),htmlFor:"ci-log-max",children:(0,t.jsx)(G,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:d,onChange:u,onBlur:()=>{d!==w&&S(k({ciLogMax:d}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(H,{label:n("settings.ci.pollInterval"),description:n("settings.ci.pollIntervalDescription"),htmlFor:"ci-poll-interval",children:(0,t.jsx)(G,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:g,onChange:m,onBlur:()=>{g!==j&&S(k({ciPollInterval:g}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(O,{label:n("settings.ci.hideCiStatus"),description:n("settings.ci.hideCiStatusDescription"),id:"hide-ci-status",testId:"switch-hide-ci-status",checked:h,onChange:e=>{p(e),S(k({hideCiStatus:e}))}})]})}var Y=e.i(27069),J=e.i(91967),Q=e.i(22353),ee=e.i(9413),et=e.i(36567),ei=e.i(75649),en=e.i(9641),es=e.i(70391),ea=e.i(85565),er=e.i(87099),el=["PageUp","PageDown"],eo=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ec={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ed="Slider",[eu,eg,em]=(0,er.createCollection)(ed),[eh,ep]=(0,ee.createContextScope)(ed,[em]),[ef,ex]=eh(ed),ev=i.forwardRef((e,n)=>{let{name:s,min:a=0,max:r=100,step:l=1,orientation:o="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[a],value:g,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:f,...x}=e,v=i.useRef(new Set),b=i.useRef(0),w="horizontal"===o,[j=[],y]=(0,et.useControllableState)({prop:g,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),m(e)}}),S=i.useRef(j);function k(e,t,{commit:i}={commit:!1}){let n,s=(String(l).split(".")[1]||"").length,o=Math.round((Math.round((e-a)/l)*l+a)*(n=Math.pow(10,s)))/n,c=(0,Y.clamp)(o,[a,r]);y((e=[])=>{let n=function(e=[],t,i){let n=[...e];return n[i]=t,n.sort((e,t)=>e-t)}(e,c,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,i)=>e[i+1]-t))>=t;return!0}(n,d*l))return e;{b.current=n.indexOf(c);let t=String(n)!==String(e);return t&&i&&h(n),t?n:e}})}return(0,t.jsx)(ef,{scope:e.__scopeSlider,name:s,disabled:c,min:a,max:r,valueIndexToChangeRef:b,thumbs:v.current,values:j,orientation:o,form:f,children:(0,t.jsx)(eu.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(eu.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?ej:ey,{"aria-disabled":c,"data-disabled":c?"":void 0,...x,ref:n,onPointerDown:(0,J.composeEventHandlers)(x.onPointerDown,()=>{c||(S.current=j)}),min:a,max:r,inverted:p,onSlideStart:c?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let i=e.map(e=>Math.abs(e-t)),n=Math.min(...i);return i.indexOf(n)}(j,e);k(e,t)},onSlideMove:c?void 0:function(e){k(e,b.current)},onSlideEnd:c?void 0:function(){let e=S.current[b.current];j[b.current]!==e&&h(j)},onHomeKeyDown:()=>!c&&k(a,0,{commit:!0}),onEndKeyDown:()=>!c&&k(r,j.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){let i=el.includes(e.key)||e.shiftKey&&eo.includes(e.key),n=b.current;k(j[n]+l*(i?10:1)*t,n,{commit:!0})}}})})})})});ev.displayName=ed;var[eb,ew]=eh(ed,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ej=i.forwardRef((e,n)=>{let{min:s,max:a,dir:r,inverted:l,onSlideStart:o,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...g}=e,[m,h]=i.useState(null),p=(0,Q.useComposedRefs)(n,e=>h(e)),f=i.useRef(void 0),x=(0,ei.useDirection)(r),v="ltr"===x,b=v&&!l||!v&&l;function w(e){let t=f.current||m.getBoundingClientRect(),i=eP([0,t.width],b?[s,a]:[a,s]);return f.current=t,i(e-t.left)}return(0,t.jsx)(eb,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(eS,{dir:x,"data-orientation":"horizontal",...g,ref:p,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);o?.(t)},onSlideMove:e=>{let t=w(e.clientX);c?.(t)},onSlideEnd:()=>{f.current=void 0,d?.()},onStepKeyDown:e=>{let t=ec[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),ey=i.forwardRef((e,n)=>{let{min:s,max:a,inverted:r,onSlideStart:l,onSlideMove:o,onSlideEnd:c,onStepKeyDown:d,...u}=e,g=i.useRef(null),m=(0,Q.useComposedRefs)(n,g),h=i.useRef(void 0),p=!r;function f(e){let t=h.current||g.current.getBoundingClientRect(),i=eP([0,t.height],p?[a,s]:[s,a]);return h.current=t,i(e-t.top)}return(0,t.jsx)(eb,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,t.jsx)(eS,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=f(e.clientY);l?.(t)},onSlideMove:e=>{let t=f(e.clientY);o?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{let t=ec[p?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),eS=i.forwardRef((e,i)=>{let{__scopeSlider:n,onSlideStart:s,onSlideMove:a,onSlideEnd:r,onHomeKeyDown:l,onEndKeyDown:o,onStepKeyDown:c,...d}=e,u=ex(ed,n);return(0,t.jsx)(ea.Primitive.span,{...d,ref:i,onKeyDown:(0,J.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(l(e),e.preventDefault()):"End"===e.key?(o(e),e.preventDefault()):el.concat(eo).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:(0,J.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():s(e)}),onPointerMove:(0,J.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:(0,J.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),r(e))})})}),ek="SliderTrack",eC=i.forwardRef((e,i)=>{let{__scopeSlider:n,...s}=e,a=ex(ek,n);return(0,t.jsx)(ea.Primitive.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...s,ref:i})});eC.displayName=ek;var eM="SliderRange",eN=i.forwardRef((e,n)=>{let{__scopeSlider:s,...a}=e,r=ex(eM,s),l=ew(eM,s),o=i.useRef(null),c=(0,Q.useComposedRefs)(n,o),d=r.values.length,u=r.values.map(e=>eF(e,r.min,r.max)),g=d>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(ea.Primitive.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...a,ref:c,style:{...e.style,[l.startEdge]:g+"%",[l.endEdge]:m+"%"}})});eN.displayName=eM;var eI="SliderThumb",eT=i.forwardRef((e,n)=>{let s=eg(e.__scopeSlider),[a,r]=i.useState(null),l=(0,Q.useComposedRefs)(n,e=>r(e)),o=i.useMemo(()=>a?s().findIndex(e=>e.ref.current===a):-1,[s,a]);return(0,t.jsx)(eA,{...e,ref:l,index:o})}),eA=i.forwardRef((e,n)=>{var s,a,r,l,o;let c,d,{__scopeSlider:u,index:g,name:m,...h}=e,p=ex(eI,u),f=ew(eI,u),[x,v]=i.useState(null),b=(0,Q.useComposedRefs)(n,e=>v(e)),w=!x||p.form||!!x.closest("form"),j=(0,es.useSize)(x),y=p.values[g],S=void 0===y?0:eF(y,p.min,p.max),k=(s=g,(a=p.values.length)>2?`Value ${s+1} of ${a}`:2===a?["Minimum","Maximum"][s]:void 0),C=j?.[f.size],M=C?(r=C,l=S,o=f.direction,d=eP([0,50],[0,c=r/2]),(c-d(l)*o)*o):0;return i.useEffect(()=>{if(x)return p.thumbs.add(x),()=>{p.thumbs.delete(x)}},[x,p.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${S}% + ${M}px)`},children:[(0,t.jsx)(eu.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(ea.Primitive.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":p.min,"aria-valuenow":y,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...h,ref:b,style:void 0===y?{display:"none"}:e.style,onFocus:(0,J.composeEventHandlers)(e.onFocus,()=>{p.valueIndexToChangeRef.current=g})})}),w&&(0,t.jsx)(eD,{name:m??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:y},g)]})});eT.displayName=eI;var eD=i.forwardRef(({__scopeSlider:e,value:n,...s},a)=>{let r=i.useRef(null),l=(0,Q.useComposedRefs)(r,a),o=(0,en.usePrevious)(n);return i.useEffect(()=>{let e=r.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(o!==n&&t){let i=new Event("input",{bubbles:!0});t.call(e,n),e.dispatchEvent(i)}},[o,n]),(0,t.jsx)(ea.Primitive.input,{style:{display:"none"},...s,ref:l,defaultValue:n})});function eF(e,t,i){return(0,Y.clamp)(100/(i-t)*(e-t),[0,100])}function eP(e,t){return i=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(i-e[0])}}eD.displayName="RadioBubbleInput",e.s(["Range",0,eN,"Root",0,ev,"Slider",0,ev,"SliderRange",0,eN,"SliderThumb",0,eT,"SliderTrack",0,eC,"Thumb",0,eT,"Track",0,eC,"createSliderScope",0,ep],98207);var eE=e.i(98207),eE=eE;function eR({className:e,defaultValue:n,value:s,min:a=0,max:r=100,...l}){let o=i.useMemo(()=>Array.isArray(s)?s:Array.isArray(n)?n:[a,r],[s,n,a,r]);return(0,t.jsxs)(eE.Root,{"data-slot":"slider",defaultValue:n,value:s,min:a,max:r,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[(0,t.jsx)(eE.Track,{"data-slot":"slider-track",className:(0,b.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(eE.Range,{"data-slot":"slider-range",className:(0,b.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(e,i)=>(0,t.jsx)(eE.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},i))]})}let ez=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],eB=ez.length-1;function eL(e){let t=0,i=Math.abs(e-ez[0]);for(let n=1;n<ez.length;n++){let s=Math.abs(e-ez[n]);s<i&&(i=s,t=n)}return t}function e_({id:e,testId:n,value:s,onChange:a,onBlur:r,defaultSeconds:l=1800}){var o;let c,d,u=(""===s?l:parseInt(s,10))||l,[g,m]=(0,i.useState)(()=>eL(u)),h=eL(u);h!==g&&ez[g]!==u&&m(h);let p=(0,i.useCallback)(([e])=>{m(e),a(String(ez[e]))},[a]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(eR,{id:e,"data-testid":n,min:0,max:eB,step:1,value:[g],onValueChange:p,onValueCommit:()=>r(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(c=Math.floor((o=ez[g])/3600),d=Math.round(o%3600/60),0===c?`${d}m`:0===d?`${c}h`:`${c}h ${d}m`)})]})}function eK(e){if(void 0===e)return;let t=function(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}(e);return null!=t?1e3*t:void 0}function eV({settings:e}){let{t:n}=(0,v.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.workflow.stageTimeouts,r=e.workflow.analyzeRepoTimeouts,[l,o]=(0,i.useState)(String(Math.round((a?.analyzeMs??18e5)/1e3))),[c,d]=(0,i.useState)(String(Math.round((a?.requirementsMs??18e5)/1e3))),[u,g]=(0,i.useState)(String(Math.round((a?.researchMs??18e5)/1e3))),[m,p]=(0,i.useState)(String(Math.round((a?.planMs??18e5)/1e3))),[f,b]=(0,i.useState)(String(Math.round((a?.implementMs??18e5)/1e3))),[w,j]=(0,i.useState)(String(Math.round((a?.mergeMs??18e5)/1e3))),[S,k]=(0,i.useState)(String(Math.round((r?.analyzeMs??6e5)/1e3))),C=a?.analyzeMs!=null?String(Math.round(a.analyzeMs/1e3)):"",M=a?.requirementsMs!=null?String(Math.round(a.requirementsMs/1e3)):"",N=a?.researchMs!=null?String(Math.round(a.researchMs/1e3)):"",I=a?.planMs!=null?String(Math.round(a.planMs/1e3)):"",T=a?.implementMs!=null?String(Math.round(a.implementMs/1e3)):"",A=a?.mergeMs!=null?String(Math.round(a.mergeMs/1e3)):"",D=r?.analyzeMs!=null?String(Math.round(r.analyzeMs/1e3)):"";function F(e){return{workflow:{stageTimeouts:{analyzeMs:eK(e.analyzeTimeout??l),requirementsMs:eK(e.requirementsTimeout??c),researchMs:eK(e.researchTimeout??u),planMs:eK(e.planTimeout??m),implementMs:eK(e.implementTimeout??f),mergeMs:eK(e.mergeTimeout??w)},analyzeRepoTimeouts:{analyzeMs:eK(e.analyzeRepoTimeout??S)}}}}function P(e){s(async()=>{let t=await y(e);t.success||x.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(q,{icon:h.Timer,title:n("settings.stageTimeouts.title"),description:n("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(U,{children:n("settings.stageTimeouts.subsections.featureAgent")}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,t.jsx)(e_,{id:"timeout-analyze",testId:"timeout-analyze-input",value:l,onChange:o,onBlur:()=>{l!==C&&P(F({analyzeTimeout:l}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.requirements"),description:n("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,t.jsx)(e_,{id:"timeout-requirements",testId:"timeout-requirements-input",value:c,onChange:d,onBlur:()=>{c!==M&&P(F({requirementsTimeout:c}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.research"),description:n("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,t.jsx)(e_,{id:"timeout-research",testId:"timeout-research-input",value:u,onChange:g,onBlur:()=>{u!==N&&P(F({researchTimeout:u}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.plan"),description:n("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,t.jsx)(e_,{id:"timeout-plan",testId:"timeout-plan-input",value:m,onChange:p,onBlur:()=>{m!==I&&P(F({planTimeout:m}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.implement"),description:n("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,t.jsx)(e_,{id:"timeout-implement",testId:"timeout-implement-input",value:f,onChange:b,onBlur:()=>{f!==T&&P(F({implementTimeout:f}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.merge"),description:n("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,t.jsx)(e_,{id:"timeout-merge",testId:"timeout-merge-input",value:w,onChange:j,onBlur:()=>{w!==A&&P(F({mergeTimeout:w}))},defaultSeconds:1800})}),(0,t.jsx)(U,{children:n("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(e_,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:S,onChange:k,onBlur:()=>{S!==D&&P(F({analyzeRepoTimeout:S}))},defaultSeconds:600})})]})}function eW({settings:e}){let{t:n}=(0,v.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[r,l]=(0,i.useState)(a.enabled),[o,c]=(0,i.useState)(String(a.autoTimeoutMinutes)),[d,u]=(0,i.useState)(String(a.maxConcurrentSessions));function g(e){s(async()=>{let t=await y(e);t.success||x.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(q,{icon:p.MessageSquare,title:n("settings.interactiveAgent.title"),description:n("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",children:[(0,t.jsx)(O,{label:n("settings.interactiveAgent.enableChatTab"),description:n("settings.interactiveAgent.enableChatTabDescription"),id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:r,onChange:e=>{l(e),g({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(o,10)||15,maxConcurrentSessions:parseInt(d,10)||3}})}}),(0,t.jsx)(H,{label:n("settings.interactiveAgent.autoTimeout"),description:n("settings.interactiveAgent.autoTimeoutDescription"),htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(G,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:o,placeholder:"15",min:1,max:120,suffix:"min",onChange:c,onBlur:()=>{let e=parseInt(o,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));c(String(t)),g({interactiveAgent:{enabled:r,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(d,10)||3}})}})}),(0,t.jsx)(H,{label:n("settings.interactiveAgent.maxConcurrentSessions"),description:n("settings.interactiveAgent.maxConcurrentSessionsDescription"),htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(G,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:d,placeholder:"3",min:1,max:10,onChange:u,onBlur:()=>{let e=parseInt(d,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));u(String(t)),g({interactiveAgent:{enabled:r,autoTimeoutMinutes:parseInt(o,10)||15,maxConcurrentSessions:t}})}})})]})}function eH({settings:e}){let{t:n}=(0,v.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.fabLayout??{swapPosition:!1},[r,l]=(0,i.useState)(a.swapPosition);return(0,t.jsx)(q,{icon:f,title:n("settings.fabLayout.title"),description:n("settings.fabLayout.description"),testId:"fab-layout-settings-section",children:(0,t.jsx)(O,{label:n("settings.fabLayout.swapPosition"),description:n("settings.fabLayout.swapPositionDescription"),id:"fab-swap-position",testId:"switch-fab-swap-position",checked:r,onChange:e=>{var t;l(e),t={fabLayout:{swapPosition:e}},s(async()=>{let e=await y(t);e.success||x.toast.error(e.error??n("settings.failedToSave"))})}})})}let eO=[{value:S.EditorType.VsCode,label:"VS Code"},{value:S.EditorType.Cursor,label:"Cursor"},{value:S.EditorType.Windsurf,label:"Windsurf"},{value:S.EditorType.Zed,label:"Zed"},{value:S.EditorType.Antigravity,label:"Antigravity"}],eq=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],eG=[{id:"language",labelKey:"settings.sections.language",icon:g.Globe},{id:"agent",labelKey:"settings.sections.agent",icon:s.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:a.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:r.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:l.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:h.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:c},{id:"feature-flags",labelKey:"settings.sections.flags",icon:d},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:p.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:f},{id:"database",labelKey:"settings.sections.database",icon:u}];e.s(["SettingsPageClient",0,function({settings:e,shipitAiHome:l,dbFileSize:o,availableTerminals:g}){let{t:h}=(0,v.useTranslation)("web"),{showSaving:p,showSaved:f,save:j}=function(){let{t:e}=(0,v.useTranslation)("web"),[t,n]=(0,i.useTransition)(),[s,a]=(0,i.useState)(!1),[r,l]=(0,i.useState)(!1),o=(0,i.useRef)(null),c=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{t&&!s&&(a(!0),c.current=!1,o.current=setTimeout(()=>{o.current=null,c.current&&(a(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!t&&s&&(c.current=!0,o.current||(a(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[t,s]),{showSaving:s,showSaved:r,save:(0,i.useCallback)(t=>{n(async()=>{let i=await y(t);i.success||x.toast.error(i.error??e("settings.failedToSave"))})},[n,e])}}(),k=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[C,M]=(0,i.useState)(e.agent.type),[I,T]=(0,i.useState)(e.environment.defaultEditor),[A,D]=(0,i.useState)(e.environment.shellPreference),[F,R]=(0,i.useState)(e.environment.terminalPreference??S.TerminalType.System),z=g?g.filter(e=>e.available):[{id:S.TerminalType.System,name:h("settings.environment.systemTerminal"),available:!0}],[B,_]=(0,i.useState)(e.workflow.openPrOnImplementationComplete),[K,V]=(0,i.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[W,Z]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPrd),[Y,J]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPlan),[Q,ee]=(0,i.useState)(e.workflow.approvalGateDefaults.allowMerge),[et,ei]=(0,i.useState)(e.workflow.enableEvidence),[en,es]=(0,i.useState)(e.workflow.commitEvidence),[ea,er]=(0,i.useState)(!1!==e.workflow.ciWatchEnabled),[el,eo]=(0,i.useState)(!1!==e.workflow.defaultFastMode),[ec,ed]=(0,i.useState)((e.workflow.autoArchiveDelayMinutes??10)>0),[eu,eg]=(0,i.useState)(String(e.workflow.autoArchiveDelayMinutes??10)),[em,eh]=(0,i.useState)(e.notifications.inApp.enabled),[ep,ef]=(0,i.useState)({...e.notifications.events}),[ex,ev]=(0,i.useState)({...k});function eb(e={}){let t=e.autoArchiveEnabled??ec,i=parseInt(e.autoArchiveDelay??eu,10);return{workflow:{openPrOnImplementationComplete:e.openPr??B,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??K,allowPrd:e.allowPrd??W,allowPlan:e.allowPlan??Y,allowMerge:e.allowMerge??Q},enableEvidence:e.enableEvidence??et,commitEvidence:e.commitEvidence??en,ciWatchEnabled:e.ciWatchEnabled??ea,defaultFastMode:e.defaultFastMode??el,autoArchiveDelayMinutes:t?Number.isNaN(i)||i<1?10:i:0}}}function ew(e={}){return{notifications:{inApp:{enabled:e.inApp??em},events:e.events??ep}}}let[ej,ey]=(0,i.useState)("agent");(0,i.useEffect)(()=>{let e=eG.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&ey(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let i of e)t.observe(i);return()=>t.disconnect()},[]);let eS=(0,i.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:h("settings.title")}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,b.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",p?"opacity-100":"opacity-0"),children:h("settings.saving")}),(0,t.jsxs)("span",{className:(0,b.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",f&&!p?"opacity-100":"opacity-0"),children:[(0,t.jsx)(n.Check,{className:"h-3 w-3"}),h("settings.saved")]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:eG.map(e=>{let i=e.icon,n=ej===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eS(e.id),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",n?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(i,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:h(e.labelKey)})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)("div",{id:"section-language",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:(0,t.jsx)(L,{language:e.user?.preferredLanguage??S.Language.English})}),(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(q,{icon:s.Bot,title:h("settings.agent.sectionTitle"),description:h("settings.agent.sectionDescription"),testId:"agent-settings-section",children:(0,t.jsx)(H,{label:h("settings.agent.agentAndModel"),description:h("settings.agent.agentAndModelDescription"),htmlFor:"agent-model-picker",children:(0,t.jsx)(E.AgentModelPicker,{initialAgentType:C,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>M(e),className:"w-55"})})}),(0,t.jsx)($,{links:[{label:h("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:h("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:h("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:h("settings.agent.hint")})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:a.Terminal,title:h("settings.environment.sectionTitle"),description:h("settings.environment.sectionDescription"),testId:"environment-settings-section",children:[(0,t.jsx)(H,{label:h("settings.environment.defaultEditor"),description:h("settings.environment.defaultEditorDescription"),htmlFor:"default-editor",children:(0,t.jsxs)(w.Select,{value:I,onValueChange:e=>{T(e),j({environment:{defaultEditor:e,shellPreference:A,terminalPreference:F}})},children:[(0,t.jsx)(w.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(w.SelectValue,{})}),(0,t.jsx)(w.SelectContent,{children:eO.map(e=>{var i;let n=(i=e.value)&&i in P?P[i]:N;return(0,t.jsx)(w.SelectItem,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(n,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(H,{label:h("settings.environment.shell"),description:h("settings.environment.shellDescription"),htmlFor:"shell-preference",children:(0,t.jsxs)(w.Select,{value:A,onValueChange:e=>{D(e),j({environment:{defaultEditor:I,shellPreference:e,terminalPreference:F}})},children:[(0,t.jsx)(w.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(w.SelectValue,{})}),(0,t.jsx)(w.SelectContent,{children:eq.map(e=>(0,t.jsx)(w.SelectItem,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(H,{label:h("settings.environment.terminal"),description:h("settings.environment.terminalDescription"),htmlFor:"terminal-preference",children:(0,t.jsxs)(w.Select,{value:F,onValueChange:e=>{R(e),j({environment:{defaultEditor:I,shellPreference:A,terminalPreference:e}})},children:[(0,t.jsx)(w.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(w.SelectValue,{})}),(0,t.jsx)(w.SelectContent,{children:z.map(e=>(0,t.jsx)(w.SelectItem,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)($,{links:[{label:h("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:h("settings.environment.hint")})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:r.GitBranch,title:h("settings.workflow.title"),description:h("settings.workflow.sectionDescription"),testId:"workflow-settings-section",children:[(0,t.jsx)(O,{label:h("settings.workflow.defaultFastMode"),description:h("settings.workflow.defaultFastModeDescription"),id:"default-fast-mode",testId:"switch-default-fast-mode",checked:el,onChange:e=>{eo(e),j(eb({defaultFastMode:e}))}}),(0,t.jsx)(U,{children:h("settings.workflow.subsections.approve")}),(0,t.jsx)(O,{label:h("settings.workflow.autoApprovePrd"),description:h("settings.workflow.autoApprovePrdDescription"),id:"allow-prd",testId:"switch-allow-prd",checked:W,onChange:e=>{Z(e),j(eb({allowPrd:e}))}}),(0,t.jsx)(O,{label:h("settings.workflow.autoApprovePlan"),description:h("settings.workflow.autoApprovePlanDescription"),id:"allow-plan",testId:"switch-allow-plan",checked:Y,onChange:e=>{J(e),j(eb({allowPlan:e}))}}),(0,t.jsx)(O,{label:h("settings.workflow.autoApproveMerge"),description:h("settings.workflow.autoApproveMergeDescription"),id:"allow-merge",testId:"switch-allow-merge",checked:Q,onChange:e=>{ee(e),j(eb({allowMerge:e}))}}),(0,t.jsx)(U,{children:h("settings.workflow.subsections.evidence")}),(0,t.jsx)(O,{label:h("settings.workflow.collectEvidence"),description:h("settings.workflow.collectEvidenceDescription"),id:"enable-evidence",testId:"switch-enable-evidence",checked:et,onChange:e=>{ei(e),e?j(eb({enableEvidence:e})):(es(!1),j(eb({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(O,{label:h("settings.workflow.addEvidenceToPr"),description:h("settings.workflow.addEvidenceToPrDescription"),id:"commit-evidence",testId:"switch-commit-evidence",checked:en,disabled:!et||!B,onChange:e=>{es(e),j(eb({commitEvidence:e}))}}),(0,t.jsx)(U,{children:h("settings.workflow.subsections.git")}),(0,t.jsx)(O,{label:h("settings.workflow.pushOnComplete"),description:h("settings.workflow.pushOnCompleteDescription"),id:"push-on-complete",testId:"switch-push-on-complete",checked:K,onChange:e=>{V(e),j(eb({pushOnComplete:e}))}}),(0,t.jsx)(O,{label:h("settings.workflow.openPrOnComplete"),description:h("settings.workflow.openPrOnCompleteDescription"),id:"open-pr",testId:"switch-open-pr",checked:B,onChange:e=>{_(e),e?j(eb({openPr:e})):(es(!1),j(eb({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(O,{label:h("settings.workflow.watchCiAfterPush"),description:h("settings.workflow.watchCiAfterPushDescription"),id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:ea,onChange:e=>{er(e),j(eb({ciWatchEnabled:e}))}}),(0,t.jsx)(U,{children:"Archive"}),(0,t.jsx)(O,{label:"Auto-archive completed",description:"Automatically archive features after they reach the completed state",id:"auto-archive-enabled",testId:"switch-auto-archive-enabled",checked:ec,onChange:e=>{ed(e),j(eb({autoArchiveEnabled:e}))}}),(0,t.jsx)(H,{label:"Archive delay",description:"Minutes to wait after completion before archiving (1–1440)",htmlFor:"auto-archive-delay",children:(0,t.jsx)(G,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:eu,placeholder:"10",min:1,max:1440,suffix:"min",onChange:e=>{eg(e)},onBlur:()=>{if(!ec)return;let e=parseInt(eu,10),t=Number.isNaN(e)?10:Math.min(1440,Math.max(1,e));eg(String(t)),j(eb({autoArchiveDelay:String(t)}))}})})]}),(0,t.jsx)($,{links:[{label:h("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:h("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:h("settings.workflow.hint")})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(X,{settings:e}),(0,t.jsx)($,{links:[{label:h("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:h("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:h("settings.ci.hint")})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eV,{settings:e}),(0,t.jsx)($,{children:h("settings.stageTimeouts.hint")})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:c,title:h("settings.notifications.title"),description:h("settings.notifications.sectionDescription"),testId:"notification-settings-section",children:[(0,t.jsx)(U,{children:h("settings.notifications.channels")}),(0,t.jsx)(O,{label:h("settings.notifications.inAppLabel"),description:h("settings.notifications.inAppDescription"),id:"notif-in-app",testId:"switch-in-app",checked:em,onChange:e=>{eh(e),j(ew({inApp:e}))}}),(0,t.jsx)(U,{children:h("settings.notifications.subsections.agentEvents")}),(0,t.jsx)(O,{label:h("settings.notifications.events.agentStarted"),id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ep.agentStarted,onChange:e=>{let t={...ep,agentStarted:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.phaseCompleted"),id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ep.phaseCompleted,onChange:e=>{let t={...ep,phaseCompleted:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.waitingApproval"),id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ep.waitingApproval,onChange:e=>{let t={...ep,waitingApproval:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.agentCompleted"),id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ep.agentCompleted,onChange:e=>{let t={...ep,agentCompleted:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.agentFailed"),id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ep.agentFailed,onChange:e=>{let t={...ep,agentFailed:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(U,{children:h("settings.notifications.subsections.pullRequestEvents")}),(0,t.jsx)(O,{label:h("settings.notifications.events.prMerged"),id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ep.prMerged,onChange:e=>{let t={...ep,prMerged:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.prClosed"),id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ep.prClosed,onChange:e=>{let t={...ep,prClosed:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.prChecksPassed"),id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ep.prChecksPassed,onChange:e=>{let t={...ep,prChecksPassed:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.prChecksFailed"),id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ep.prChecksFailed,onChange:e=>{let t={...ep,prChecksFailed:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.prBlocked"),id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:ep.prBlocked,onChange:e=>{let t={...ep,prBlocked:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.mergeReviewReady"),id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:ep.mergeReviewReady,onChange:e=>{let t={...ep,mergeReviewReady:e};ef(t),j(ew({events:t}))}})]}),(0,t.jsx)($,{links:[{label:h("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:h("settings.notifications.hint")})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:d,title:h("settings.featureFlags.title"),description:h("settings.featureFlags.sectionDescription"),badge:h("settings.featureFlags.badge"),testId:"feature-flags-settings-section",children:[(0,t.jsx)(O,{label:h("settings.featureFlags.skills"),description:h("settings.featureFlags.skillsDescription"),id:"flag-skills",testId:"switch-flag-skills",checked:ex.skills,onChange:e=>{let t={...ex,skills:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.deployments"),description:h("settings.featureFlags.deploymentsDescription"),id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ex.envDeploy,onChange:e=>{let t={...ex,envDeploy:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.debug"),description:h("settings.featureFlags.debugDescription"),id:"flag-debug",testId:"switch-flag-debug",checked:ex.debug,onChange:e=>{let t={...ex,debug:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.githubImport"),description:h("settings.featureFlags.githubImportDescription"),id:"flag-githubImport",testId:"switch-flag-githubImport",checked:ex.githubImport,onChange:e=>{let t={...ex,githubImport:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.adoptBranch"),description:h("settings.featureFlags.adoptBranchDescription"),id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:ex.adoptBranch,onChange:e=>{let t={...ex,adoptBranch:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.gitRebaseSync"),description:h("settings.featureFlags.gitRebaseSyncDescription"),id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:ex.gitRebaseSync,onChange:e=>{let t={...ex,gitRebaseSync:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.reactFileManager"),description:h("settings.featureFlags.reactFileManagerDescription"),id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:ex.reactFileManager,onChange:e=>{let t={...ex,reactFileManager:e};ev(t),j({featureFlags:t})}})]}),(0,t.jsx)($,{children:h("settings.featureFlags.hint")})]}),(0,t.jsxs)("div",{id:"section-interactive-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eW,{settings:e}),(0,t.jsx)($,{children:h("settings.interactiveAgent.hint")})]}),(0,t.jsxs)("div",{id:"section-fab-layout",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eH,{settings:e}),(0,t.jsx)($,{children:h("settings.fabLayout.hint")})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:u,title:h("settings.database.title"),description:h("settings.database.sectionDescription"),testId:"database-settings-section",children:[(0,t.jsx)(H,{label:h("settings.database.location"),description:h("settings.database.locationDescription"),children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:l})}),(0,t.jsx)(H,{label:h("settings.database.size"),children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:o})})]}),(0,t.jsx)($,{links:[{label:h("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:h("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:h("settings.database.hint")})]})]})]})}],41952)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(96871),i=e.i(16539),n=e.i(23925),s=e.i(26370),a=e.i(38573),r=e.i(49228),l=e.i(74294),o=e.i(3645);let c=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),d=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var g=e.i(32494);let m=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var h=e.i(58860),p=e.i(48109);let f=(0,o.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);var x=e.i(60112);e.i(98026);var v=e.i(50728),b=e.i(31777),w=e.i(47373),j=e.i(96976);let y=(0,j.createServerReference)("40d382d6a9138e8b01113f38230d6a3fdfe547963d",j.callServer,void 0,j.findSourceMapURL,"updateSettingsAction");var S=e.i(17406),k=e.i(30342),C=e.i(44229),M=e.i(83902);function N(e){return(0,t.jsx)(C.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function I({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function T({className:e}){return(0,t.jsx)(k.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function A({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function D({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function F({className:e,...i}){return(0,t.jsx)(M.Rocket,{className:(0,b.cn)("h-4 w-4",e),...i})}I.displayName="VsCodeIcon",T.displayName="CursorEditorIcon",A.displayName="WindsurfIcon",D.displayName="ZedIcon",F.displayName="AntigravityIcon";let P={vscode:I,cursor:T,windsurf:A,zed:D,antigravity:F};var E=e.i(9749),R=e.i(956),z=e.i(41957);let B=[{value:S.Language.English,label:"English",nativeName:"English"},{value:S.Language.Russian,label:"Русский",nativeName:"Русский"},{value:S.Language.Portuguese,label:"Português",nativeName:"Português"},{value:S.Language.Spanish,label:"Español",nativeName:"Español"},{value:S.Language.Arabic,label:"العربية",nativeName:"العربية"},{value:S.Language.Hebrew,label:"עברית",nativeName:"עברית"},{value:S.Language.French,label:"Français",nativeName:"Français"},{value:S.Language.German,label:"Deutsch",nativeName:"Deutsch"}];function L({language:e}){let{t:s,i18n:a}=(0,v.useTranslation)("web"),[r,l]=(0,i.useState)(e),[o,c]=(0,i.useTransition)(),[d,u]=(0,i.useState)(!1),m=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(m.current&&!o){u(!0);let e=setTimeout(()=>u(!1),2e3);return()=>clearTimeout(e)}m.current=o},[o]),(0,t.jsxs)(R.Card,{id:"language",className:"scroll-mt-6","data-testid":"language-settings-section",children:[(0,t.jsxs)(R.CardHeader,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Globe,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)(R.CardTitle,{children:s("settings.language.title")})]}),o?(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:s("common:labels.saving")}):null,d&&!o?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-green-600",children:[(0,t.jsx)(n.Check,{className:"h-3 w-3"}),s("common:labels.saved")]}):null]}),(0,t.jsx)(R.CardDescription,{children:s("settings.language.description")})]}),(0,t.jsx)(R.CardContent,{className:"space-y-4",children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(z.Label,{htmlFor:"display-language",children:s("settings.language.label")}),(0,t.jsxs)(w.Select,{value:r,onValueChange:function(e){l(e),a.changeLanguage(e);let t="ar"===e||"he"===e?"rtl":"ltr";document.documentElement.lang=e,document.documentElement.dir=t,c(async()=>{let t=await y({user:{preferredLanguage:e}});t.success||x.toast.error(t.error??s("settings.language.failedToSave","Failed to save language settings"))})},children:[(0,t.jsx)(w.SelectTrigger,{id:"display-language","data-testid":"language-select",children:(0,t.jsx)(w.SelectValue,{placeholder:s("settings.language.placeholder")})}),(0,t.jsx)(w.SelectContent,{children:B.map(e=>(0,t.jsx)(w.SelectItem,{value:e.value,children:e.nativeName},e.value))})]})]})})]})}var _=e.i(61569),_=_,K=e.i(3214),V=e.i(30702),W=e.i(51911);function H({label:e,description:i,htmlFor:n,children:s}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(z.Label,{htmlFor:n,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),i?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:i}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s})]})}function O({label:e,description:i,id:n,testId:s,checked:a,onChange:r,disabled:l}){return(0,t.jsx)(H,{label:e,description:i,htmlFor:n,children:(0,t.jsx)(W.Switch,{id:n,"data-testid":s,checked:a,onCheckedChange:r,disabled:l,className:(0,b.cn)("cursor-pointer",l&&"cursor-not-allowed opacity-50")})})}function q({icon:e,title:i,description:n,badge:s,testId:a,children:r}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":a,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:i}),s?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:s}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:n})]}),(0,t.jsx)("div",{className:"px-4",children:r})]})}function G({id:e,testId:i,value:n,onChange:s,onBlur:a,placeholder:r,min:l=1,max:o,step:c=1,suffix:d}){let{t:u}=(0,v.useTranslation)("web"),g=""===n?void 0:parseInt(n,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{s(String(Math.max(l,(g??parseInt(r,10))-c)))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":u("common.decrease"),children:(0,t.jsx)(_.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":i,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:n,placeholder:r,onChange:e=>{s(e.target.value.replace(/[^0-9]/g,""))},onBlur:a,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=g??parseInt(r,10),s(String(null!=o?Math.min(o,e+c):e+c))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":u("common.increase"),children:(0,t.jsx)(K.Plus,{className:"h-3 w-3"})})]}),d?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:d}):null]})}function U({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function $({children:e,links:i}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=i&&i.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:i.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(V.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function Z(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function X({settings:e}){let{t:n}=(0,v.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,r]=(0,i.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[o,c]=(0,i.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[d,u]=(0,i.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[g,m]=(0,i.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),[h,p]=(0,i.useState)(!1!==e.workflow.hideCiStatus),f=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",b=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",w=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",j=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"";function S(e){s(async()=>{let t=await y(e);t.success||x.toast.error(t.error??n("settings.failedToSave"))})}function k(e){let t=Z(e.ciTimeout??o);return{workflow:{ciMaxFixAttempts:Z(e.ciMaxFix??a),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:Z(e.ciLogMax??d),ciWatchPollIntervalSeconds:Z(e.ciPollInterval??g),hideCiStatus:e.hideCiStatus??h}}}return(0,t.jsxs)(q,{icon:l.Activity,title:n("settings.ci.title"),description:n("settings.ci.description"),testId:"ci-settings-section",children:[(0,t.jsx)(H,{label:n("settings.ci.maxFixAttempts"),description:n("settings.ci.maxFixAttemptsDescription"),htmlFor:"ci-max-fix",children:(0,t.jsx)(G,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:a,onChange:r,onBlur:()=>{a!==f&&S(k({ciMaxFix:a}))},min:1,max:10})}),(0,t.jsx)(H,{label:n("settings.ci.watchTimeout"),description:n("settings.ci.watchTimeoutDescription"),htmlFor:"ci-timeout",children:(0,t.jsx)(G,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:o,onChange:c,onBlur:()=>{o!==b&&S(k({ciTimeout:o}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(H,{label:n("settings.ci.maxLogSize"),description:n("settings.ci.maxLogSizeDescription"),htmlFor:"ci-log-max",children:(0,t.jsx)(G,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:d,onChange:u,onBlur:()=>{d!==w&&S(k({ciLogMax:d}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(H,{label:n("settings.ci.pollInterval"),description:n("settings.ci.pollIntervalDescription"),htmlFor:"ci-poll-interval",children:(0,t.jsx)(G,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:g,onChange:m,onBlur:()=>{g!==j&&S(k({ciPollInterval:g}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(O,{label:n("settings.ci.hideCiStatus"),description:n("settings.ci.hideCiStatusDescription"),id:"hide-ci-status",testId:"switch-hide-ci-status",checked:h,onChange:e=>{p(e),S(k({hideCiStatus:e}))}})]})}var Y=e.i(27069),J=e.i(91967),Q=e.i(22353),ee=e.i(9413),et=e.i(36567),ei=e.i(75649),en=e.i(9641),es=e.i(70391),ea=e.i(85565),er=e.i(87099),el=["PageUp","PageDown"],eo=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ec={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ed="Slider",[eu,eg,em]=(0,er.createCollection)(ed),[eh,ep]=(0,ee.createContextScope)(ed,[em]),[ef,ex]=eh(ed),ev=i.forwardRef((e,n)=>{let{name:s,min:a=0,max:r=100,step:l=1,orientation:o="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[a],value:g,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:f,...x}=e,v=i.useRef(new Set),b=i.useRef(0),w="horizontal"===o,[j=[],y]=(0,et.useControllableState)({prop:g,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),m(e)}}),S=i.useRef(j);function k(e,t,{commit:i}={commit:!1}){let n,s=(String(l).split(".")[1]||"").length,o=Math.round((Math.round((e-a)/l)*l+a)*(n=Math.pow(10,s)))/n,c=(0,Y.clamp)(o,[a,r]);y((e=[])=>{let n=function(e=[],t,i){let n=[...e];return n[i]=t,n.sort((e,t)=>e-t)}(e,c,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,i)=>e[i+1]-t))>=t;return!0}(n,d*l))return e;{b.current=n.indexOf(c);let t=String(n)!==String(e);return t&&i&&h(n),t?n:e}})}return(0,t.jsx)(ef,{scope:e.__scopeSlider,name:s,disabled:c,min:a,max:r,valueIndexToChangeRef:b,thumbs:v.current,values:j,orientation:o,form:f,children:(0,t.jsx)(eu.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(eu.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?ej:ey,{"aria-disabled":c,"data-disabled":c?"":void 0,...x,ref:n,onPointerDown:(0,J.composeEventHandlers)(x.onPointerDown,()=>{c||(S.current=j)}),min:a,max:r,inverted:p,onSlideStart:c?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let i=e.map(e=>Math.abs(e-t)),n=Math.min(...i);return i.indexOf(n)}(j,e);k(e,t)},onSlideMove:c?void 0:function(e){k(e,b.current)},onSlideEnd:c?void 0:function(){let e=S.current[b.current];j[b.current]!==e&&h(j)},onHomeKeyDown:()=>!c&&k(a,0,{commit:!0}),onEndKeyDown:()=>!c&&k(r,j.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){let i=el.includes(e.key)||e.shiftKey&&eo.includes(e.key),n=b.current;k(j[n]+l*(i?10:1)*t,n,{commit:!0})}}})})})})});ev.displayName=ed;var[eb,ew]=eh(ed,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ej=i.forwardRef((e,n)=>{let{min:s,max:a,dir:r,inverted:l,onSlideStart:o,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...g}=e,[m,h]=i.useState(null),p=(0,Q.useComposedRefs)(n,e=>h(e)),f=i.useRef(void 0),x=(0,ei.useDirection)(r),v="ltr"===x,b=v&&!l||!v&&l;function w(e){let t=f.current||m.getBoundingClientRect(),i=eP([0,t.width],b?[s,a]:[a,s]);return f.current=t,i(e-t.left)}return(0,t.jsx)(eb,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(eS,{dir:x,"data-orientation":"horizontal",...g,ref:p,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);o?.(t)},onSlideMove:e=>{let t=w(e.clientX);c?.(t)},onSlideEnd:()=>{f.current=void 0,d?.()},onStepKeyDown:e=>{let t=ec[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),ey=i.forwardRef((e,n)=>{let{min:s,max:a,inverted:r,onSlideStart:l,onSlideMove:o,onSlideEnd:c,onStepKeyDown:d,...u}=e,g=i.useRef(null),m=(0,Q.useComposedRefs)(n,g),h=i.useRef(void 0),p=!r;function f(e){let t=h.current||g.current.getBoundingClientRect(),i=eP([0,t.height],p?[a,s]:[s,a]);return h.current=t,i(e-t.top)}return(0,t.jsx)(eb,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,t.jsx)(eS,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=f(e.clientY);l?.(t)},onSlideMove:e=>{let t=f(e.clientY);o?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{let t=ec[p?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),eS=i.forwardRef((e,i)=>{let{__scopeSlider:n,onSlideStart:s,onSlideMove:a,onSlideEnd:r,onHomeKeyDown:l,onEndKeyDown:o,onStepKeyDown:c,...d}=e,u=ex(ed,n);return(0,t.jsx)(ea.Primitive.span,{...d,ref:i,onKeyDown:(0,J.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(l(e),e.preventDefault()):"End"===e.key?(o(e),e.preventDefault()):el.concat(eo).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:(0,J.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():s(e)}),onPointerMove:(0,J.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:(0,J.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),r(e))})})}),ek="SliderTrack",eC=i.forwardRef((e,i)=>{let{__scopeSlider:n,...s}=e,a=ex(ek,n);return(0,t.jsx)(ea.Primitive.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...s,ref:i})});eC.displayName=ek;var eM="SliderRange",eN=i.forwardRef((e,n)=>{let{__scopeSlider:s,...a}=e,r=ex(eM,s),l=ew(eM,s),o=i.useRef(null),c=(0,Q.useComposedRefs)(n,o),d=r.values.length,u=r.values.map(e=>eF(e,r.min,r.max)),g=d>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(ea.Primitive.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...a,ref:c,style:{...e.style,[l.startEdge]:g+"%",[l.endEdge]:m+"%"}})});eN.displayName=eM;var eI="SliderThumb",eT=i.forwardRef((e,n)=>{let s=eg(e.__scopeSlider),[a,r]=i.useState(null),l=(0,Q.useComposedRefs)(n,e=>r(e)),o=i.useMemo(()=>a?s().findIndex(e=>e.ref.current===a):-1,[s,a]);return(0,t.jsx)(eA,{...e,ref:l,index:o})}),eA=i.forwardRef((e,n)=>{var s,a,r,l,o;let c,d,{__scopeSlider:u,index:g,name:m,...h}=e,p=ex(eI,u),f=ew(eI,u),[x,v]=i.useState(null),b=(0,Q.useComposedRefs)(n,e=>v(e)),w=!x||p.form||!!x.closest("form"),j=(0,es.useSize)(x),y=p.values[g],S=void 0===y?0:eF(y,p.min,p.max),k=(s=g,(a=p.values.length)>2?`Value ${s+1} of ${a}`:2===a?["Minimum","Maximum"][s]:void 0),C=j?.[f.size],M=C?(r=C,l=S,o=f.direction,d=eP([0,50],[0,c=r/2]),(c-d(l)*o)*o):0;return i.useEffect(()=>{if(x)return p.thumbs.add(x),()=>{p.thumbs.delete(x)}},[x,p.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${S}% + ${M}px)`},children:[(0,t.jsx)(eu.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(ea.Primitive.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":p.min,"aria-valuenow":y,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...h,ref:b,style:void 0===y?{display:"none"}:e.style,onFocus:(0,J.composeEventHandlers)(e.onFocus,()=>{p.valueIndexToChangeRef.current=g})})}),w&&(0,t.jsx)(eD,{name:m??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:y},g)]})});eT.displayName=eI;var eD=i.forwardRef(({__scopeSlider:e,value:n,...s},a)=>{let r=i.useRef(null),l=(0,Q.useComposedRefs)(r,a),o=(0,en.usePrevious)(n);return i.useEffect(()=>{let e=r.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(o!==n&&t){let i=new Event("input",{bubbles:!0});t.call(e,n),e.dispatchEvent(i)}},[o,n]),(0,t.jsx)(ea.Primitive.input,{style:{display:"none"},...s,ref:l,defaultValue:n})});function eF(e,t,i){return(0,Y.clamp)(100/(i-t)*(e-t),[0,100])}function eP(e,t){return i=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(i-e[0])}}eD.displayName="RadioBubbleInput",e.s(["Range",0,eN,"Root",0,ev,"Slider",0,ev,"SliderRange",0,eN,"SliderThumb",0,eT,"SliderTrack",0,eC,"Thumb",0,eT,"Track",0,eC,"createSliderScope",0,ep],98207);var eE=e.i(98207),eE=eE;function eR({className:e,defaultValue:n,value:s,min:a=0,max:r=100,...l}){let o=i.useMemo(()=>Array.isArray(s)?s:Array.isArray(n)?n:[a,r],[s,n,a,r]);return(0,t.jsxs)(eE.Root,{"data-slot":"slider",defaultValue:n,value:s,min:a,max:r,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[(0,t.jsx)(eE.Track,{"data-slot":"slider-track",className:(0,b.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(eE.Range,{"data-slot":"slider-range",className:(0,b.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(e,i)=>(0,t.jsx)(eE.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},i))]})}let ez=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],eB=ez.length-1;function eL(e){let t=0,i=Math.abs(e-ez[0]);for(let n=1;n<ez.length;n++){let s=Math.abs(e-ez[n]);s<i&&(i=s,t=n)}return t}function e_({id:e,testId:n,value:s,onChange:a,onBlur:r,defaultSeconds:l=1800}){var o;let c,d,u=(""===s?l:parseInt(s,10))||l,[g,m]=(0,i.useState)(()=>eL(u)),h=eL(u);h!==g&&ez[g]!==u&&m(h);let p=(0,i.useCallback)(([e])=>{m(e),a(String(ez[e]))},[a]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(eR,{id:e,"data-testid":n,min:0,max:eB,step:1,value:[g],onValueChange:p,onValueCommit:()=>r(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(c=Math.floor((o=ez[g])/3600),d=Math.round(o%3600/60),0===c?`${d}m`:0===d?`${c}h`:`${c}h ${d}m`)})]})}function eK(e){if(void 0===e)return;let t=function(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}(e);return null!=t?1e3*t:void 0}function eV({settings:e}){let{t:n}=(0,v.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.workflow.stageTimeouts,r=e.workflow.analyzeRepoTimeouts,[l,o]=(0,i.useState)(String(Math.round((a?.analyzeMs??18e5)/1e3))),[c,d]=(0,i.useState)(String(Math.round((a?.requirementsMs??18e5)/1e3))),[u,g]=(0,i.useState)(String(Math.round((a?.researchMs??18e5)/1e3))),[m,p]=(0,i.useState)(String(Math.round((a?.planMs??18e5)/1e3))),[f,b]=(0,i.useState)(String(Math.round((a?.implementMs??18e5)/1e3))),[w,j]=(0,i.useState)(String(Math.round((a?.mergeMs??18e5)/1e3))),[S,k]=(0,i.useState)(String(Math.round((r?.analyzeMs??6e5)/1e3))),C=a?.analyzeMs!=null?String(Math.round(a.analyzeMs/1e3)):"",M=a?.requirementsMs!=null?String(Math.round(a.requirementsMs/1e3)):"",N=a?.researchMs!=null?String(Math.round(a.researchMs/1e3)):"",I=a?.planMs!=null?String(Math.round(a.planMs/1e3)):"",T=a?.implementMs!=null?String(Math.round(a.implementMs/1e3)):"",A=a?.mergeMs!=null?String(Math.round(a.mergeMs/1e3)):"",D=r?.analyzeMs!=null?String(Math.round(r.analyzeMs/1e3)):"";function F(e){return{workflow:{stageTimeouts:{analyzeMs:eK(e.analyzeTimeout??l),requirementsMs:eK(e.requirementsTimeout??c),researchMs:eK(e.researchTimeout??u),planMs:eK(e.planTimeout??m),implementMs:eK(e.implementTimeout??f),mergeMs:eK(e.mergeTimeout??w)},analyzeRepoTimeouts:{analyzeMs:eK(e.analyzeRepoTimeout??S)}}}}function P(e){s(async()=>{let t=await y(e);t.success||x.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(q,{icon:h.Timer,title:n("settings.stageTimeouts.title"),description:n("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(U,{children:n("settings.stageTimeouts.subsections.featureAgent")}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,t.jsx)(e_,{id:"timeout-analyze",testId:"timeout-analyze-input",value:l,onChange:o,onBlur:()=>{l!==C&&P(F({analyzeTimeout:l}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.requirements"),description:n("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,t.jsx)(e_,{id:"timeout-requirements",testId:"timeout-requirements-input",value:c,onChange:d,onBlur:()=>{c!==M&&P(F({requirementsTimeout:c}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.research"),description:n("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,t.jsx)(e_,{id:"timeout-research",testId:"timeout-research-input",value:u,onChange:g,onBlur:()=>{u!==N&&P(F({researchTimeout:u}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.plan"),description:n("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,t.jsx)(e_,{id:"timeout-plan",testId:"timeout-plan-input",value:m,onChange:p,onBlur:()=>{m!==I&&P(F({planTimeout:m}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.implement"),description:n("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,t.jsx)(e_,{id:"timeout-implement",testId:"timeout-implement-input",value:f,onChange:b,onBlur:()=>{f!==T&&P(F({implementTimeout:f}))},defaultSeconds:1800})}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.merge"),description:n("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,t.jsx)(e_,{id:"timeout-merge",testId:"timeout-merge-input",value:w,onChange:j,onBlur:()=>{w!==A&&P(F({mergeTimeout:w}))},defaultSeconds:1800})}),(0,t.jsx)(U,{children:n("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,t.jsx)(H,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(e_,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:S,onChange:k,onBlur:()=>{S!==D&&P(F({analyzeRepoTimeout:S}))},defaultSeconds:600})})]})}function eW({settings:e}){let{t:n}=(0,v.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[r,l]=(0,i.useState)(a.enabled),[o,c]=(0,i.useState)(String(a.autoTimeoutMinutes)),[d,u]=(0,i.useState)(String(a.maxConcurrentSessions));function g(e){s(async()=>{let t=await y(e);t.success||x.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(q,{icon:p.MessageSquare,title:n("settings.interactiveAgent.title"),description:n("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",children:[(0,t.jsx)(O,{label:n("settings.interactiveAgent.enableChatTab"),description:n("settings.interactiveAgent.enableChatTabDescription"),id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:r,onChange:e=>{l(e),g({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(o,10)||15,maxConcurrentSessions:parseInt(d,10)||3}})}}),(0,t.jsx)(H,{label:n("settings.interactiveAgent.autoTimeout"),description:n("settings.interactiveAgent.autoTimeoutDescription"),htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(G,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:o,placeholder:"15",min:1,max:120,suffix:"min",onChange:c,onBlur:()=>{let e=parseInt(o,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));c(String(t)),g({interactiveAgent:{enabled:r,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(d,10)||3}})}})}),(0,t.jsx)(H,{label:n("settings.interactiveAgent.maxConcurrentSessions"),description:n("settings.interactiveAgent.maxConcurrentSessionsDescription"),htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(G,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:d,placeholder:"3",min:1,max:10,onChange:u,onBlur:()=>{let e=parseInt(d,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));u(String(t)),g({interactiveAgent:{enabled:r,autoTimeoutMinutes:parseInt(o,10)||15,maxConcurrentSessions:t}})}})})]})}function eH({settings:e}){let{t:n}=(0,v.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.fabLayout??{swapPosition:!1},[r,l]=(0,i.useState)(a.swapPosition);return(0,t.jsx)(q,{icon:f,title:n("settings.fabLayout.title"),description:n("settings.fabLayout.description"),testId:"fab-layout-settings-section",children:(0,t.jsx)(O,{label:n("settings.fabLayout.swapPosition"),description:n("settings.fabLayout.swapPositionDescription"),id:"fab-swap-position",testId:"switch-fab-swap-position",checked:r,onChange:e=>{var t;l(e),t={fabLayout:{swapPosition:e}},s(async()=>{let e=await y(t);e.success||x.toast.error(e.error??n("settings.failedToSave"))})}})})}let eO=[{value:S.EditorType.VsCode,label:"VS Code"},{value:S.EditorType.Cursor,label:"Cursor"},{value:S.EditorType.Windsurf,label:"Windsurf"},{value:S.EditorType.Zed,label:"Zed"},{value:S.EditorType.Antigravity,label:"Antigravity"}],eq=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],eG=[{id:"language",labelKey:"settings.sections.language",icon:g.Globe},{id:"agent",labelKey:"settings.sections.agent",icon:s.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:a.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:r.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:l.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:h.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:c},{id:"feature-flags",labelKey:"settings.sections.flags",icon:d},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:p.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:f},{id:"database",labelKey:"settings.sections.database",icon:u}];e.s(["SettingsPageClient",0,function({settings:e,shipitAiHome:l,dbFileSize:o,availableTerminals:g}){let{t:h}=(0,v.useTranslation)("web"),{showSaving:p,showSaved:f,save:j}=function(){let{t:e}=(0,v.useTranslation)("web"),[t,n]=(0,i.useTransition)(),[s,a]=(0,i.useState)(!1),[r,l]=(0,i.useState)(!1),o=(0,i.useRef)(null),c=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{t&&!s&&(a(!0),c.current=!1,o.current=setTimeout(()=>{o.current=null,c.current&&(a(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!t&&s&&(c.current=!0,o.current||(a(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[t,s]),{showSaving:s,showSaved:r,save:(0,i.useCallback)(t=>{n(async()=>{let i=await y(t);i.success||x.toast.error(i.error??e("settings.failedToSave"))})},[n,e])}}(),k=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[C,M]=(0,i.useState)(e.agent.type),[I,T]=(0,i.useState)(e.environment.defaultEditor),[A,D]=(0,i.useState)(e.environment.shellPreference),[F,R]=(0,i.useState)(e.environment.terminalPreference??S.TerminalType.System),z=g?g.filter(e=>e.available):[{id:S.TerminalType.System,name:h("settings.environment.systemTerminal"),available:!0}],[B,_]=(0,i.useState)(e.workflow.openPrOnImplementationComplete),[K,V]=(0,i.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[W,Z]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPrd),[Y,J]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPlan),[Q,ee]=(0,i.useState)(e.workflow.approvalGateDefaults.allowMerge),[et,ei]=(0,i.useState)(e.workflow.enableEvidence),[en,es]=(0,i.useState)(e.workflow.commitEvidence),[ea,er]=(0,i.useState)(!1!==e.workflow.ciWatchEnabled),[el,eo]=(0,i.useState)(!1!==e.workflow.defaultFastMode),[ec,ed]=(0,i.useState)((e.workflow.autoArchiveDelayMinutes??10)>0),[eu,eg]=(0,i.useState)(String(e.workflow.autoArchiveDelayMinutes??10)),[em,eh]=(0,i.useState)(e.notifications.inApp.enabled),[ep,ef]=(0,i.useState)({...e.notifications.events}),[ex,ev]=(0,i.useState)({...k});function eb(e={}){let t=e.autoArchiveEnabled??ec,i=parseInt(e.autoArchiveDelay??eu,10);return{workflow:{openPrOnImplementationComplete:e.openPr??B,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??K,allowPrd:e.allowPrd??W,allowPlan:e.allowPlan??Y,allowMerge:e.allowMerge??Q},enableEvidence:e.enableEvidence??et,commitEvidence:e.commitEvidence??en,ciWatchEnabled:e.ciWatchEnabled??ea,defaultFastMode:e.defaultFastMode??el,autoArchiveDelayMinutes:t?Number.isNaN(i)||i<1?10:i:0}}}function ew(e={}){return{notifications:{inApp:{enabled:e.inApp??em},events:e.events??ep}}}let[ej,ey]=(0,i.useState)("agent");(0,i.useEffect)(()=>{let e=eG.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&ey(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let i of e)t.observe(i);return()=>t.disconnect()},[]);let eS=(0,i.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:h("settings.title")}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,b.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",p?"opacity-100":"opacity-0"),children:h("settings.saving")}),(0,t.jsxs)("span",{className:(0,b.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",f&&!p?"opacity-100":"opacity-0"),children:[(0,t.jsx)(n.Check,{className:"h-3 w-3"}),h("settings.saved")]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:eG.map(e=>{let i=e.icon,n=ej===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eS(e.id),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",n?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(i,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:h(e.labelKey)})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)("div",{id:"section-language",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:(0,t.jsx)(L,{language:e.user?.preferredLanguage??S.Language.English})}),(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(q,{icon:s.Bot,title:h("settings.agent.sectionTitle"),description:h("settings.agent.sectionDescription"),testId:"agent-settings-section",children:(0,t.jsx)(H,{label:h("settings.agent.agentAndModel"),description:h("settings.agent.agentAndModelDescription"),htmlFor:"agent-model-picker",children:(0,t.jsx)(E.AgentModelPicker,{initialAgentType:C,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>M(e),className:"w-55"})})}),(0,t.jsx)($,{links:[{label:h("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:h("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:h("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:h("settings.agent.hint")})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:a.Terminal,title:h("settings.environment.sectionTitle"),description:h("settings.environment.sectionDescription"),testId:"environment-settings-section",children:[(0,t.jsx)(H,{label:h("settings.environment.defaultEditor"),description:h("settings.environment.defaultEditorDescription"),htmlFor:"default-editor",children:(0,t.jsxs)(w.Select,{value:I,onValueChange:e=>{T(e),j({environment:{defaultEditor:e,shellPreference:A,terminalPreference:F}})},children:[(0,t.jsx)(w.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(w.SelectValue,{})}),(0,t.jsx)(w.SelectContent,{children:eO.map(e=>{var i;let n=(i=e.value)&&i in P?P[i]:N;return(0,t.jsx)(w.SelectItem,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(n,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(H,{label:h("settings.environment.shell"),description:h("settings.environment.shellDescription"),htmlFor:"shell-preference",children:(0,t.jsxs)(w.Select,{value:A,onValueChange:e=>{D(e),j({environment:{defaultEditor:I,shellPreference:e,terminalPreference:F}})},children:[(0,t.jsx)(w.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(w.SelectValue,{})}),(0,t.jsx)(w.SelectContent,{children:eq.map(e=>(0,t.jsx)(w.SelectItem,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(H,{label:h("settings.environment.terminal"),description:h("settings.environment.terminalDescription"),htmlFor:"terminal-preference",children:(0,t.jsxs)(w.Select,{value:F,onValueChange:e=>{R(e),j({environment:{defaultEditor:I,shellPreference:A,terminalPreference:e}})},children:[(0,t.jsx)(w.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(w.SelectValue,{})}),(0,t.jsx)(w.SelectContent,{children:z.map(e=>(0,t.jsx)(w.SelectItem,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)($,{links:[{label:h("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:h("settings.environment.hint")})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:r.GitBranch,title:h("settings.workflow.title"),description:h("settings.workflow.sectionDescription"),testId:"workflow-settings-section",children:[(0,t.jsx)(O,{label:h("settings.workflow.defaultFastMode"),description:h("settings.workflow.defaultFastModeDescription"),id:"default-fast-mode",testId:"switch-default-fast-mode",checked:el,onChange:e=>{eo(e),j(eb({defaultFastMode:e}))}}),(0,t.jsx)(U,{children:h("settings.workflow.subsections.approve")}),(0,t.jsx)(O,{label:h("settings.workflow.autoApprovePrd"),description:h("settings.workflow.autoApprovePrdDescription"),id:"allow-prd",testId:"switch-allow-prd",checked:W,onChange:e=>{Z(e),j(eb({allowPrd:e}))}}),(0,t.jsx)(O,{label:h("settings.workflow.autoApprovePlan"),description:h("settings.workflow.autoApprovePlanDescription"),id:"allow-plan",testId:"switch-allow-plan",checked:Y,onChange:e=>{J(e),j(eb({allowPlan:e}))}}),(0,t.jsx)(O,{label:h("settings.workflow.autoApproveMerge"),description:h("settings.workflow.autoApproveMergeDescription"),id:"allow-merge",testId:"switch-allow-merge",checked:Q,onChange:e=>{ee(e),j(eb({allowMerge:e}))}}),(0,t.jsx)(U,{children:h("settings.workflow.subsections.evidence")}),(0,t.jsx)(O,{label:h("settings.workflow.collectEvidence"),description:h("settings.workflow.collectEvidenceDescription"),id:"enable-evidence",testId:"switch-enable-evidence",checked:et,onChange:e=>{ei(e),e?j(eb({enableEvidence:e})):(es(!1),j(eb({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(O,{label:h("settings.workflow.addEvidenceToPr"),description:h("settings.workflow.addEvidenceToPrDescription"),id:"commit-evidence",testId:"switch-commit-evidence",checked:en,disabled:!et||!B,onChange:e=>{es(e),j(eb({commitEvidence:e}))}}),(0,t.jsx)(U,{children:h("settings.workflow.subsections.git")}),(0,t.jsx)(O,{label:h("settings.workflow.pushOnComplete"),description:h("settings.workflow.pushOnCompleteDescription"),id:"push-on-complete",testId:"switch-push-on-complete",checked:K,onChange:e=>{V(e),j(eb({pushOnComplete:e}))}}),(0,t.jsx)(O,{label:h("settings.workflow.openPrOnComplete"),description:h("settings.workflow.openPrOnCompleteDescription"),id:"open-pr",testId:"switch-open-pr",checked:B,onChange:e=>{_(e),e?j(eb({openPr:e})):(es(!1),j(eb({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(O,{label:h("settings.workflow.watchCiAfterPush"),description:h("settings.workflow.watchCiAfterPushDescription"),id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:ea,onChange:e=>{er(e),j(eb({ciWatchEnabled:e}))}}),(0,t.jsx)(U,{children:"Archive"}),(0,t.jsx)(O,{label:"Auto-archive completed",description:"Automatically archive features after they reach the completed state",id:"auto-archive-enabled",testId:"switch-auto-archive-enabled",checked:ec,onChange:e=>{ed(e),j(eb({autoArchiveEnabled:e}))}}),(0,t.jsx)(H,{label:"Archive delay",description:"Minutes to wait after completion before archiving (1–1440)",htmlFor:"auto-archive-delay",children:(0,t.jsx)(G,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:eu,placeholder:"10",min:1,max:1440,suffix:"min",onChange:e=>{eg(e)},onBlur:()=>{if(!ec)return;let e=parseInt(eu,10),t=Number.isNaN(e)?10:Math.min(1440,Math.max(1,e));eg(String(t)),j(eb({autoArchiveDelay:String(t)}))}})})]}),(0,t.jsx)($,{links:[{label:h("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:h("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:h("settings.workflow.hint")})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(X,{settings:e}),(0,t.jsx)($,{links:[{label:h("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:h("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:h("settings.ci.hint")})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eV,{settings:e}),(0,t.jsx)($,{children:h("settings.stageTimeouts.hint")})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:c,title:h("settings.notifications.title"),description:h("settings.notifications.sectionDescription"),testId:"notification-settings-section",children:[(0,t.jsx)(U,{children:h("settings.notifications.channels")}),(0,t.jsx)(O,{label:h("settings.notifications.inAppLabel"),description:h("settings.notifications.inAppDescription"),id:"notif-in-app",testId:"switch-in-app",checked:em,onChange:e=>{eh(e),j(ew({inApp:e}))}}),(0,t.jsx)(U,{children:h("settings.notifications.subsections.agentEvents")}),(0,t.jsx)(O,{label:h("settings.notifications.events.agentStarted"),id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ep.agentStarted,onChange:e=>{let t={...ep,agentStarted:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.phaseCompleted"),id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ep.phaseCompleted,onChange:e=>{let t={...ep,phaseCompleted:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.waitingApproval"),id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ep.waitingApproval,onChange:e=>{let t={...ep,waitingApproval:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.agentCompleted"),id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ep.agentCompleted,onChange:e=>{let t={...ep,agentCompleted:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.agentFailed"),id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ep.agentFailed,onChange:e=>{let t={...ep,agentFailed:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(U,{children:h("settings.notifications.subsections.pullRequestEvents")}),(0,t.jsx)(O,{label:h("settings.notifications.events.prMerged"),id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ep.prMerged,onChange:e=>{let t={...ep,prMerged:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.prClosed"),id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ep.prClosed,onChange:e=>{let t={...ep,prClosed:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.prChecksPassed"),id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ep.prChecksPassed,onChange:e=>{let t={...ep,prChecksPassed:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.prChecksFailed"),id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ep.prChecksFailed,onChange:e=>{let t={...ep,prChecksFailed:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.prBlocked"),id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:ep.prBlocked,onChange:e=>{let t={...ep,prBlocked:e};ef(t),j(ew({events:t}))}}),(0,t.jsx)(O,{label:h("settings.notifications.events.mergeReviewReady"),id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:ep.mergeReviewReady,onChange:e=>{let t={...ep,mergeReviewReady:e};ef(t),j(ew({events:t}))}})]}),(0,t.jsx)($,{links:[{label:h("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:h("settings.notifications.hint")})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:d,title:h("settings.featureFlags.title"),description:h("settings.featureFlags.sectionDescription"),badge:h("settings.featureFlags.badge"),testId:"feature-flags-settings-section",children:[(0,t.jsx)(O,{label:h("settings.featureFlags.skills"),description:h("settings.featureFlags.skillsDescription"),id:"flag-skills",testId:"switch-flag-skills",checked:ex.skills,onChange:e=>{let t={...ex,skills:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.deployments"),description:h("settings.featureFlags.deploymentsDescription"),id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ex.envDeploy,onChange:e=>{let t={...ex,envDeploy:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.debug"),description:h("settings.featureFlags.debugDescription"),id:"flag-debug",testId:"switch-flag-debug",checked:ex.debug,onChange:e=>{let t={...ex,debug:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.githubImport"),description:h("settings.featureFlags.githubImportDescription"),id:"flag-githubImport",testId:"switch-flag-githubImport",checked:ex.githubImport,onChange:e=>{let t={...ex,githubImport:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.adoptBranch"),description:h("settings.featureFlags.adoptBranchDescription"),id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:ex.adoptBranch,onChange:e=>{let t={...ex,adoptBranch:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.gitRebaseSync"),description:h("settings.featureFlags.gitRebaseSyncDescription"),id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:ex.gitRebaseSync,onChange:e=>{let t={...ex,gitRebaseSync:e};ev(t),j({featureFlags:t})}}),(0,t.jsx)(O,{label:h("settings.featureFlags.reactFileManager"),description:h("settings.featureFlags.reactFileManagerDescription"),id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:ex.reactFileManager,onChange:e=>{let t={...ex,reactFileManager:e};ev(t),j({featureFlags:t})}})]}),(0,t.jsx)($,{children:h("settings.featureFlags.hint")})]}),(0,t.jsxs)("div",{id:"section-interactive-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eW,{settings:e}),(0,t.jsx)($,{children:h("settings.interactiveAgent.hint")})]}),(0,t.jsxs)("div",{id:"section-fab-layout",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eH,{settings:e}),(0,t.jsx)($,{children:h("settings.fabLayout.hint")})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(q,{icon:u,title:h("settings.database.title"),description:h("settings.database.sectionDescription"),testId:"database-settings-section",children:[(0,t.jsx)(H,{label:h("settings.database.location"),description:h("settings.database.locationDescription"),children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:l})}),(0,t.jsx)(H,{label:h("settings.database.size"),children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:o})})]}),(0,t.jsx)($,{links:[{label:h("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:h("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:h("settings.database.hint")})]})]})]})}],41952)}]);
|