const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./local-conversation-page-CANgTozJ.js","./rolldown-runtime-BG2f4sTM.js","./app-initial-BHB6SClA.js","./app-initial-Czet5G9g.css","./checkmark-arrows-counterclockwise-rotate-lg-DEezSDt2.js","./share-invite-autocomplete-Bj1i12Dp.js","./conversation-source-Bjyo78F2.js","./thread-scroll-layout-BywaziyM.js","./thread-scroll-controller-context-value-DPM3lN0e.js","./thread-virtualizer-43g3Bw27.js","./subagent-panel-f_gsLZAq.js","./toggle-thread-summary-panel-DoNWFew9.js","./use-debug-panel-zsasQ2Yw.js","./local-conversation-stream-role-product-event-C7wWoP3M.js","./local-conversation-thread-Bj5uKwgs.js","./realtime-voice-handoff-target-C5T0-pQL.js","./artifact-creation-prompts-DVGaR2UM.js","./use-git-config-value-BomyA3KR.js","./artifact-file-preview-icon-J_J1f2vx.js","./onboarding-banner-x8BEylhu.js","./turn-sources-model-knQ2PXxB.js","./star-BG4IWvX6.js","./app-window-T3Sqyas1.js","./environment-labels-3Dw3yDLw.js","./local-remote-dropdown-ZA9bm4_1.js","./use-git-submodule-paths-B2Fk2DHo.js","./dock-Cqukdv24.js","./use-codex-worktrees-BCat2O_G.js","./local-environment-workflow-messages-CqeXv1k-.js","./connect-plugins-submenu-item-BGJE5Nx-.js","./header-DqwsovE6.js","./realtime-voice-stage-layout-G6GXAFOl.js","./pulsing-dot.module-CR6Hfk8C.js","./pulsing-dot-CGC7XOvr.css","./thread-overflow-menu-CHu-muVE.js","./local-environment-editor-C04xQlCe.js","./play-outline-CTUUwJeL.js","./flask-BQjQDhOP.js","./esm-CafTuWNK.js","./circle-dashed-FJjZ89IN.js","./worktree-setup-auto-fix-FBjTPkPf.js","./pull-request-detail-query-DCslMuOg.js","./pull-request-media-Bg1EcPt4.js","./detail-page-CIsIvBGt.js","./thread-app-shell-chrome-DLtp8zjL.js","./thread-panel-toggle-button-CFhH1XBM.js","./use-media-query-_4fcOL58.js","./upgrade-plan-dialog-B_miDsDG.js","./color-icon-BlSnyJSz.js","./subscription-update-plan-BWen1E0m.js","./format-currency-Wwdloj8u.js","./plan-pricing-CDdVyvV-.js","./pricing-plan-page-1M1pu9H_.js","./trending-topics-BdDqGwcC.js","./thread-side-panel-tabs-B3tKzciM.js"])))=>i.map(i=>d[i]);
import{n as e,s as t}from"./rolldown-runtime-BG2f4sTM.js";import{$J as n,$b as r,A3 as i,AX as a,Bmt as o,Bpt as s,CN as c,DK as l,Fq as u,G0 as d,JY as f,K0 as p,L4 as ee,LX as m,M_t as h,Mvt as g,NX as _,Nvt as v,O_t as y,P4 as b,PX as x,P_t as S,Pq as C,Qb as te,RX as w,S5 as ne,SN as re,Smt as T,U0 as E,U4 as D,Vmt as O,W0 as k,W4 as A,X4 as j,XR as ie,Xct as ae,Y4 as oe,YJ as M,YR as N,YY as P,Yb as F,Zct as I,c2 as L,c3 as R,cdt as z,f3 as B,iK as V,iW as H,j3 as U,j4 as W,jX as G,ldt as K,m2 as q,nW as se,npt as J,o3 as ce,p3 as le,rW as ue,rlt as de,rx as fe,s3 as pe,t3 as me,tK as he,tW as ge,tlt as _e,tx as ve,u3 as ye,vD as be,wK as xe,x5 as Se,yD as Ce}from"./app-initial-BHB6SClA.js";import{n as we,t as Te}from"./use-git-config-value-BomyA3KR.js";import{n as Ee,t as De}from"./use-git-submodule-paths-B2Fk2DHo.js";var Y,X,Oe=e((()=>{K(),se(),Y=ge({method:`synced-branch`,getParams:e=>({cwd:e.root,operationSource:e.operationSource}),getOptions:()=>({staleTime:z.FIVE_SECONDS})}),X=Y.fromTarget$}));function ke(e,t,n){let r=(0,Z.c)(10),i=G(),a=e??null,o;r[0]!==i||r[1]!==a?(o=s(a,i),r[0]=i,r[1]=a,r[2]=o):o=r[2];let c;r[3]!==e||r[4]!==t?(c=e==null?null:{cwd:e,hostConfig:t},r[3]=e,r[4]=t,r[5]=c):c=r[5];let l;return r[6]!==n||r[7]!==o||r[8]!==c?(l={enabled:o,operationSource:n,lookup:c},r[6]=n,r[7]=o,r[8]=c,r[9]=l):l=r[9],h(X,l)}var Z,Ae=e((()=>{Z=g(),y(),J(),a(),Oe()}));function je({stage:e}){let t=e>=2,i=e>=3,a=e>=4,c=e>=5,u=e>=6,{authMethod:f,isLoading:p}=x(),{data:m,isLoading:g}=n(),_=_e(),v=de(),y=f===`chatgpt`&&!p&&!g&&m?.structure===`personal`,{data:b,isPending:E}=te({enabled:y});r({billingCurrency:E?void 0:b??_.getContext().user?.country??null,enabled:y}),ve({enabled:y,includePaymentMethod:!0}),fe({enabled:y}),S(le,{enabled:y}),(0,Q.useEffect)(()=>{o(()=>import(`./local-conversation-page-CANgTozJ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46]),import.meta.url).catch(()=>void 0)},[]),(0,Q.useEffect)(()=>{if(f!==`chatgpt`||p||v)return;let e=ae(_,$,{disableExposureLog:!0}).get(`surface`,`web`);e!==`dialog`&&e!==`page`||Promise.all([o(()=>import(`./upgrade-plan-dialog-B_miDsDG.js`),__vite__mapDeps([47,1,2,3,48,49,50,51]),import.meta.url),o(()=>import(`./pricing-plan-page-1M1pu9H_.js`),__vite__mapDeps([52,1,2,3,53,49,50,51]),import.meta.url)]).catch(()=>void 0)},[f,p,v,_]);let O=S(k,{enabled:t});(0,Q.useEffect)(()=>{O&&o(()=>import(`./thread-side-panel-tabs-B3tKzciM.js`),__vite__mapDeps([54,2,1,3]),import.meta.url).catch(()=>void 0)},[O]);let j=S(L),M=h(oe,j),N=h(ue,{hostConfig:M,operationSource:`startup_prefetch`},{enabled:i}).data?.available===!0,F=h(me,{hostId:j},{enabled:i}),I=S(A),z=R(S(pe),_.checkGate(ce)),B=s(I,G())?I:null,H=a&&N&&z===`full`;S(w,{enabled:t}),S(C,{enabled:t}),h(d,j,{enabled:t}),U(I==null?null:{cwd:I,hostConfig:M},`startup_prefetch`,{enabled:H,watchForGitInit:!0}),ie(I,M,`startup_prefetch`,{enabled:H}),Ce(I,M,`startup_prefetch`,{enabled:H}),Ee(I,M,`startup_prefetch`,{enabled:H}),we(H?B:null,M,T,`worktree`,`startup_prefetch`,{enabled:H}),ke(H?B:null,M,`startup_prefetch`),h(W,{authMethod:f,hostId:j},{enabled:c}),h(ee,j,{enabled:c}),P({enabled:c,hostId:j}),h(D,j,{enabled:c}),V({enabled:u,hostId:j}),l(j,F.data?.roots??[],{enabled:u&&!p&&F.isFetched});let K=S(re);return ne({enabled:u&&K===`available`}),null}var Q,$;e((()=>{y(),J(),Q=t(v(),1),q(),c(),Se(),_(),m(),E(),M(),H(),Te(),N(),be(),i(),De(),Ae(),a(),xe(),he(),u(),b(),p(),f(),B(),F(),ye(),j(),I(),O(),$=`1640366510`}))();export{je as AppPrefetchImpl};
//# sourceMappingURL=app-prefetch-impl-CQlmSGMX.js.map