import{aa as e,ab as t,d as a,I as s,ac as o,x as n,l as i,X as u,Z as r,c as l,w as d,i as c,m as g,a as m,b as p,_ as b}from"./index-CY26MUkV.js";import{u as v}from"./useUserStore.Cw6yzw5k.js";e.success=(a,s=2e3,o={})=>{let n=t(e,{...o,visibile:!0,title:a,duration:s,type:"success"});f(n,e=>{setTimeout(()=>{h(n,e)},s)})},e.error=(a,s=2e3,o={})=>{let n=t(e,{...o,visibile:!0,title:a,duration:s,type:"error"});f(n,e=>{setTimeout(()=>{h(n,e)},s)})},e.warning=(a,s=2e3,o={})=>{let n=t(e,{...o,visibile:!0,title:a,duration:s,type:"error"});f(n,e=>{setTimeout(()=>{h(n,e)},s)})},e.info=(a,s=2e3,o={})=>{let n=t(e,{...o,visibile:!0,title:a,duration:s,type:"info"});f(n,e=>{setTimeout(()=>{h(n,e)},s)})},e.loading=(a,s=2e3,o={})=>{let n=t(e,{...o,visibile:!0,title:a,duration:s,type:"loading"});f(n,e=>{setTimeout(()=>{h(n,e)},s)})};const f=(e,t)=>{const a=document.createElement("view");document.body.appendChild(a),e.mount(a),t(a)},h=(e,t)=>{e.unmount(),document.body.removeChild(t)},y=b(a({__name:"whitePage",setup(t){const{l:a}=s(),b=v();o(e=>{f(e)});const f=e=>{const t=e.path;t&&1==t&&h()},h=()=>{n("/api/services/app/Session/GetUserConfigurations",{}).then(t=>{if(!t.success)return e.error(a("配置获取错误，请重试"));const s=t.result||{},o=s.auth||{},n=s.localization||{},l=s.setting||{},d=(null==n?void 0:n.values.YoyoBoot)||{};b.setAuth(o.grantedPermissions||{}),b.updateNowLanguage(n.currentLanguage||{}),b.updateLanguages(n.languages||[]),b.updateSetting(l.values||{}),i.set("language",n.currentLanguage.name),u.global.setLocaleMessage(n.currentLanguage.name,d),u.global.locale=n.currentLanguage.name,r({url:"/app/main/dashboard"})})};return(e,t)=>{const a=g("m-loading-cloud"),s=c;return m(),l(s,{class:"load_container"},{default:d(()=>[p(a)]),_:1})}}}),[["__scopeId","data-v-88e0dfd9"]]);export{y as default};
