import{e as _,ag as g,r as y,Q as m,f as b,g as n,n as d,w as s,v as l,p as a,T as w,q as u,t as f,B as v,l as p,D as h,bd as k,aO as x}from"./jwt-decode.esm-BYfS37aG.js";import{u as D}from"./organizationSwitcher-DapMvF_6.js";import"./router-D53qV9Zg.js";import"./ts.worker-Biy-7fEJ.js";import"./organization-BI2IWMw4.js";import"./tables-nYEEmE6H.js";import"./string-IQGGUV40.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="87cf0c15-4b9c-46b0-9e75-5a180de65d7a",e._sentryDebugIdIdentifier="sentry-dbid-87cf0c15-4b9c-46b0-9e75-5a180de65d7a")}catch{}})();const R={class:"loading-container"},I=_({__name:"RootRedirector",setup(e){const r=D(),i=g(),o=y(null);async function c(){o.value=null;try{const t=await r.selectDefaultOrganization();t.name==="onboarding"?window.location.href="/onboarding":i.replace(t)}catch(t){o.value=p.translate("i18n_projectsview_loading_error"),console.error("RootRedirector failed:",t)}}return m(c),(t,B)=>(n(),b("div",R,[o.value?(n(),d(a(h),{key:0,vertical:"",align:"center",gap:16},{default:s(()=>[l(a(w),{type:"danger"},{default:s(()=>[u(f(o.value),1)]),_:1}),l(a(v),{type:"primary",onClick:c},{default:s(()=>[u(f(a(p).translate("i18n_projectsview_retry")),1)]),_:1})]),_:1})):(n(),d(a(k),{key:1,size:"large"}))]))}}),N=x(I,[["__scopeId","data-v-c1eea334"]]);export{N as default};
//# sourceMappingURL=RootRedirector-XNLayHE5.js.map
