import{_ as h}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.280ece81.js";import{C as b}from"./ContentLayout.991bbf22.js";import{l as k}from"./fetch.ac0cc198.js";import{d as w,e3 as g,e4 as v,f as C,c,w as s,o as d,b as f,a as x,u as i,d2 as _,az as m,Q as I}from"./index.e310aebb.js";import{u as T,E as D}from"./editor.8fcb8d02.js";import{C as L}from"./Card.adf1677c.js";import"./Logo.afdc4154.js";import"./userStore.e6231111.js";import"./workspaceStore.9673015c.js";import"./url.fb968ca0.js";import"./colorHelpers.0fc16894.js";import"./linters.686aafeb.js";import"./asyncComputed.6b1d4165.js";import"./TabPane.9d204c54.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2ba3263d-c5af-4cec-8d70-33e46681a18d",e._sentryDebugIdIdentifier="sentry-dbid-2ba3263d-c5af-4cec-8d70-33e46681a18d")}catch{}})();const N={class:"card-content"},j=w({__name:"Welcome",setup(e){const t=g(),{query:n}=v(),a=T();a.loadLogin();const l=C(!0),u=async()=>{l.value=!1,setInterval(()=>{var o;return window.location.replace(((o=a==null?void 0:a.links)==null?void 0:o.project)||D.consoleUrl)},5e3)};return(async()=>{const o=n.token,r=n.redirect,p=await k("/_editor/auth/set-cookie",{method:"POST",body:JSON.stringify({token:o}),headers:{"Content-Type":"application/json"}});if(!p.ok)return u();const{ok:y}=await p.json();if(!y)return u();r?await t.push({path:r}):await t.push({name:"workspace"})})(),(o,r)=>(d(),c(b,null,{default:s(()=>[f(i(L),{bordered:!1,class:"card"},{default:s(()=>[x("div",N,[f(h,{style:{"margin-bottom":"10px"}}),l.value?(d(),c(i(_),{key:0},{default:s(()=>[m("Loading...")]),_:1})):(d(),c(i(_),{key:1},{default:s(()=>[m("Authentication failed. You are been redirected...")]),_:1}))])]),_:1})]),_:1}))}});const Y=I(j,[["__scopeId","data-v-ba310460"]]);export{Y as default};
//# sourceMappingURL=Welcome.9bda2ba6.js.map
