const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./upgrade-plan-dialog-DDMiM2nt.js","./app-server-manager-signals-Yn0WSnoY.js","./chunk-Bj-mKKzh.js","./preload-helper-Chd9yIcd.js","./vscode-api-DjORcpSo.js","./src-BOCweS1p.js","./jsx-runtime-CiQ1k8xo.js","./lib-MoKmYgcO.js","./tslib.es6-BbTQ3PDY.js","./statsig-BP9zNYqZ.js","./rpc-CJwVeoy_.js","./lib-DHgYfVJN.js","./marked.esm-BR-H6018.js","./v4-JB8aTMDB.js","./persisted-signal-CweW-bgN.js","./request-CBZ5m5yv.js","./dialog-layout-CJEsoqFP.js","./dist-B8SKCozm.js","./react-dom-CvzHKZGB.js","./Combination-9DfZp13g.js","./clsx-BcPLHiun.js","./window-zoom-context-CSPQZGcc.js","./button-Bi7lGVi1.js","./spinner-BAEL5-Nn.js","./reduced-motion-preference-Bd5_3c7y.js","./setting-storage-CwKZnsvR.js","./tooltip-dismiss-1FVw8OQP.js","./with-window-BoZr9BJk.js","./x-DypUcSQe.js","./dialog-layout-sS9Dm_y9.css","./proxy-BMi4zsAT.js","./single-value-DZHc7Ark.js","./_baseEach-Cu7b3gdA.js","./_baseOrderBy-DVNd69uu.js","./codex-api-BCmX_VRU.js","./fuse-Co_COJWH.js","./use-auth-CI-WraL2.js","./app-server-manager-hooks-Ps3s58Nc.js","./remote-connection-visibility-h0xR_JfY.js","./config-queries-Br8rhpJn.js","./invalidate-queries-and-broadcast-CivBKbpC.js","./thread-context-inputs-C9hcxtXy.js","./selectable-remote-connections-signal-db9FavQq.js","./sidebar-signals-b2zJ93fs.js","./use-is-copilot-api-available-Cju6TzB2.js","./use-global-state-baOKTuK6.js","./parse-owner-repo-BIB9Pu_g.js","./use-debounced-value-BrzCkakk.js","./animated-segmented-toggle-CZpqJKDH.js","./links-CnGTBd1G.js","./conversation-starter-card-DY1jRMuD.js","./use-is-dark-DM2fOM7F.js","./use-codex-pricing-url-B8HHuzvB.js","./google-drive-CC-Egn92.js","./lightning-bolt-COm2O9Ig.js","./get-codex-purchase-handoff-url-BpXR_E4f.js","./codex-api-error-C0Z_xLe-.js","./plan-management-state-DlOJb3eN.js","./skus-CJAzlvMK.js","./plan-pricing-BSUdEmSR.js"])))=>i.map(i=>d[i]);
import{s as e}from"./chunk-Bj-mKKzh.js";import{na as t,sa as n}from"./src-BOCweS1p.js";import{t as r}from"./preload-helper-Chd9yIcd.js";import{n as i}from"./jsx-runtime-CiQ1k8xo.js";import{V as a,f as o,h as s,lt as c,u as l}from"./vscode-api-DjORcpSo.js";import{f as u,m as d}from"./chunk-LFPYN7LY-PMGLV5Go.js";import{c as f,i as p}from"./statsig-BP9zNYqZ.js";import{t as m}from"./request-CBZ5m5yv.js";import{t as h}from"./use-auth-CI-WraL2.js";import{r as g}from"./modal-controller-state-pkzvzyfU.js";var _=`/pricing-plan`,v=(0,e(i(),1).lazy)(async()=>({default:(await r(async()=>{let{UpgradePlanDialogModal:e}=await import(`./upgrade-plan-dialog-DDMiM2nt.js`);return{UpgradePlanDialogModal:e}},__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,47,48,49,50,51,52,53,54,55,56,57,58,59]),import.meta.url)).UpgradePlanDialogModal})),y=c(),b=`1640366510`,x=`4066307019`,S=t({email_domain_type:n()}),C=a(s,e=>({queryKey:[`professional-email-domain`,e],queryFn:async()=>{let e=S.safeParse(await m.safeGet(`/me`));return e.success&&e.data.email_domain_type===`professional`},retry:!1,staleTime:l.INFINITE}));function w(){let e=(0,y.c)(5),{userId:t}=h(),n=f(),r=u(),i=d(),a;return e[0]!==r||e[1]!==i||e[2]!==n||e[3]!==t?(a=e=>{let{scope:a,currentPlan:o,defaultTab:s,source:c}=e;if(o==null)return!1;switch(p(n,b,{disableExposureLog:!1}).get(`surface`,`web`)){case`dialog`:return s==null?E(a,n,t).then(e=>{g(a,v,{currentPlan:o,defaultTab:e,source:c})}):g(a,v,{currentPlan:o,defaultTab:s,source:c}),!0;case`page`:{let e=e=>{i(_,{state:{defaultTab:e,returnPath:`${r.pathname}${r.search}${r.hash}`,source:c}})};return s==null?E(a,n,t).then(e):e(s),!0}default:return!1}},e[0]=r,e[1]=i,e[2]=n,e[3]=t,e[4]=a):a=e[4],a}function T(){let e=(0,y.c)(2),t=w(),n;return e[0]===t?n=e[1]:(n=e=>{let{scope:n,currentPlan:r,defaultTab:i,getPricingUrl:a,source:s}=e;t({scope:n,currentPlan:r,defaultTab:i,source:s})||o.dispatchMessage(`open-in-browser`,{url:a()})},e[0]=t,e[1]=n),n}async function E(e,t,n){if(n==null)return`personal`;try{if(!await e.query.getOrFetch(C,n))return`personal`}catch{return`personal`}return p(t,x,{disableExposureLog:!1}).get(`enabled`,!1)?`business`:`personal`}export{w as n,_ as r,T as t};
//# sourceMappingURL=upgrade-plan-dialog-launcher-BmfO_7Ry.js.map