import{et as e}from"./vendor-quasar-BP3JemFi.js";import{$t as t,Ht as n,In as r,Mn as i,So as a,Vt as o,wo as s}from"./ws-Dl8XkIy4.js";import{i as c,r as l}from"./index-DEgYmG5l.js";a(),n(),i(),l();var u=1200;function d(e,t){let n=new Map;for(let e of t){let t=e.split(`-`)[0].toLowerCase();n.has(t)||n.set(t,e)}for(let r of e){if(!r)continue;let e=r.replace(/_/g,`-`).toLowerCase(),i=t.find(t=>t.toLowerCase()===e);if(i)return i;let a=n.get(e.split(`-`)[0]);if(a)return a}return null}var f=e(async({app:e})=>{if(e.config.errorHandler=(e,t,n)=>{c(e,`vue`,n),console.error(`[Vue error]`,e,n)},r())return;let n=s();try{if(localStorage.getItem(`oobe-welcome`)!==`true`&&o(`general.language`)===`en-US`){let e=await n.fetchLanguages(),r=d(navigator.languages&&navigator.languages.length>0?navigator.languages:[navigator.language],e);r&&r!==`en-US`&&t(`general.language`,r)}}catch{}let i=n.fetchTranslation(o(`general.language`)).catch(()=>{});await Promise.race([i,new Promise(e=>setTimeout(e,u))]),e.use({install:e=>{e.config.globalProperties.$i=(e,t)=>n.getString(e,t),e.config.globalProperties.$lz=(e,t,r)=>n.getStringDefault(e,t,r)}}),e.mixin({mounted(){this?.$el?.setAttribute&&this?.$el?.setAttribute(`sfc-name`,this.$?.type?.name||this?.$options?.__name)}})});export{f as default};