import{_ as b}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.0bc3b012.js";import{C as h}from"./ContentLayout.fd58a72b.js";import{l as g}from"./fetch.b0ce5b11.js";import{d as k,e4 as w,ec as v,r as C,a as i,b as s,o as d,f as p,e as x,u as c,T as _,g as m,_ as I}from"./jwt-decode.esm.ea959866.js";import{u as T,E as D}from"./editor.dc8491d4.js";import{C as L}from"./Card.c65589a8.js";import"./Logo.12b771cc.js";import"./userStore.d0eca952.js";import"./linters.189a127d.js";import"./asyncComputed.51381bdd.js";import"./workspaceStore.05920c8f.js";import"./runnerData.c2d3943c.js";import"./url.1e21ad57.js";import"./colorHelpers.a2d56f29.js";import"./constants.6ec7c497.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]="2f408271-3655-4b3a-9065-af1d2223b1f1",e._sentryDebugIdIdentifier="sentry-dbid-2f408271-3655-4b3a-9065-af1d2223b1f1")}catch{}})();const N={class:"card-content"},j=k({__name:"Welcome",setup(e){const t=w(),{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,f=await g("/_editor/auth/set-cookie",{method:"POST",body:JSON.stringify({token:o}),headers:{"Content-Type":"application/json"}});if(!f.ok)return u();const{ok:y}=await f.json();if(!y)return u();r?await t.push({path:r}):await t.push({name:"editor"})})(),(o,r)=>(d(),i(h,null,{default:s(()=>[p(c(L),{bordered:!1,class:"card"},{default:s(()=>[x("div",N,[p(b,{style:{"margin-bottom":"10px"}}),l.value?(d(),i(c(_),{key:0},{default:s(()=>[m("Loading...")]),_:1})):(d(),i(c(_),{key:1},{default:s(()=>[m("Authentication failed. You are been redirected...")]),_:1}))])]),_:1})]),_:1}))}});const G=I(j,[["__scopeId","data-v-70d5febb"]]);export{G as default};
//# sourceMappingURL=Welcome.9b9e3112.js.map
