import{ch as u,ce as g,bl as _,L as f,ci as m}from"./index-BZGh_npj.js";import{F as p,cb as I}from"./vendor-D0AQuxPe.js";const y=p({__name:"callback",async setup(d){let n,r;const{signIn:o,errors:t}=u(),{externalSignInCallback:c,errors:i}=g(),{analytics:s}=_();async function a(){try{await c(),await o()}catch(e){const l=e instanceof Error?e:new Error(String(e));f.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===m.SIGN_IN_NOT_ALLOWED)&&(location.href="/400")}return[n,r]=I(()=>a()),await n,r(),()=>{}}});export{y as default};
//# sourceMappingURL=callback-CneGuy83.js.map
