import{e as _,N as g,r as y,n as m,f as b,g as n,q as d,x as s,v as l,s as a,a1 as v,T as f,U as u,B as w,K as p,at as x,as as h,ar as k}from"./jwt-decode.esm-CX61wVx3.js";import{u as R}from"./organizationSwitcher-BGkTY3e2.js";import"./router-C3xfRTQ9.js";import"./ts.worker-DBbJtN2A.js";import"./organization-CGHGUCUV.js";import"./tables-uXC0iev6.js";import"./string-BfaOmKtt.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]="f1405bfe-5f9d-4245-a0f7-d5847ce40a3b",e._sentryDebugIdIdentifier="sentry-dbid-f1405bfe-5f9d-4245-a0f7-d5847ce40a3b")}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(),d(a(x),{key:0,vertical:"",align:"center",gap:16},{default:s(()=>[l(a(v),{type:"danger"},{default:s(()=>[f(u(o.value),1)]),_:1}),l(a(w),{type:"primary",onClick:c},{default:s(()=>[f(u(a(p).translate("i18n_projectsview_retry")),1)]),_:1})]),_:1})):(n(),d(a(h),{key:1,size:"large"}))]))}}),O=k(I,[["__scopeId","data-v-c1eea334"]]);export{O as default};
//# sourceMappingURL=RootRedirector-BIhbRHAp.js.map
