import{cp as u,cm as g,bo as m,L as _,cq as f}from"./index-CiAiYnez.js";import{F as p,cb as I}from"./vendor-D8NNcBCx.js";const S=p({__name:"callback",async setup(d){let n,r;const{signIn:o,errors:t}=u(),{externalSignInCallback:c,errors:i}=g(),{analytics:s}=m();async function a(){try{await c(),await o()}catch(e){const l=e instanceof Error?e:new Error(String(e));_.error(a.name,e),s("login","external",{success:!1,errors:l?.message})}t.value?.length&&s("login","external",{success:!1,errors:t.value.map(e=>`${e.code}: ${e.description}`).join(", ")}),s("login","external",{success:!0}),i.value?.some(e=>e.code===f.SIGN_IN_NOT_ALLOWED)&&(location.href="/400")}return[n,r]=I(()=>a()),await n,r(),()=>{}}});export{S as default};
//# sourceMappingURL=callback-DdpTOReH.js.map
