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