import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{i as n,r}from"./api-D3NfSChA.js";import{n as i,r as a}from"./remoteConfig-CWeq7CLH.js";async function refreshRemoteConfig(e={}){let{useAuth:t=!0}=e;try{let e=t?await r.fetchApi(`/features`,{cache:`no-store`}):await fetch(`/api/features`,{cache:`no-store`});if(e.ok){let t=await e.json();window.__CONFIG__=t,a.value=t;return}console.warn(`Failed to load remote config:`,e.statusText),(e.status===401||e.status===403)&&(window.__CONFIG__={},a.value={})}catch(e){console.error(`Failed to fetch remote config:`,e),window.__CONFIG__={},a.value={}}}var o=t((()=>{n(),i()}));export{refreshRemoteConfig as n,o as t};
//# sourceMappingURL=refreshRemoteConfig-CB69gbXn.js.map