import{e as _,ae as b,r as g,M as y,f as m,g as n,n as d,w as s,q as l,p as a,ai as w,R as u,S as f,B as v,l as p,b5 as R,bb as h,aM as k}from"./jwt-decode.esm-RrwddusF.js";import{u as x}from"./organizationSwitcher-pIo9V6kL.js";import"./router-Mf0aFyWQ.js";import"./ts.worker-DZw3sO0o.js";import"./organization-CIHxKoK0.js";import"./tables-BxB7qxLH.js";import"./string-DfWpluZV.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]="bd8b3f52-eabb-443a-808a-c4e6c1005860",e._sentryDebugIdIdentifier="sentry-dbid-bd8b3f52-eabb-443a-808a-c4e6c1005860")}catch{}})();const D={class:"loading-container"},I=_({__name:"RootRedirector",setup(e){const r=x(),i=b(),o=g(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 y(c),(t,B)=>(n(),m("div",D,[o.value?(n(),d(a(R),{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(h),{key:1,size:"large"}))]))}}),O=k(I,[["__scopeId","data-v-c1eea334"]]);export{O as default};
//# sourceMappingURL=RootRedirector-nJN5xfo8.js.map
