import{e as _,ag as g,r as y,Q as m,f as b,g as n,n as l,w as s,v as d,p as a,T as w,q as f,t as u,B as v,l as p,C as h,bc as k,aN as x}from"./jwt-decode.esm-Di13oRQw.js";import{u as R}from"./organizationSwitcher-Cc7ll1IM.js";import"./router-BikqZ_12.js";import"./ts.worker-DMPFqrjQ.js";import"./organization-NLrfpGfD.js";import"./tables-C0s8s7P7.js";import"./string-BzsxlFG6.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]="b9af0473-f002-4420-a752-07c7cb0a3f7e",e._sentryDebugIdIdentifier="sentry-dbid-b9af0473-f002-4420-a752-07c7cb0a3f7e")}catch{}})();const D={class:"loading-container"},I=_({__name:"RootRedirector",setup(e){const r=R(),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",D,[o.value?(n(),l(a(h),{key:0,vertical:"",align:"center",gap:16},{default:s(()=>[d(a(w),{type:"danger"},{default:s(()=>[f(u(o.value),1)]),_:1}),d(a(v),{type:"primary",onClick:c},{default:s(()=>[f(u(a(p).translate("i18n_projectsview_retry")),1)]),_:1})]),_:1})):(n(),l(a(k),{key:1,size:"large"}))]))}}),O=x(I,[["__scopeId","data-v-c1eea334"]]);export{O as default};
//# sourceMappingURL=RootRedirector-B2xDPD6r.js.map
