import{e as s}from"./index-DANKc53i.js";const o=typeof localStorage<"u"?localStorage.getItem("skyforge.sn.instance")??"":"",[l,n]=s(o),[f,g]=s("default");async function m(a,c){try{const t=await(c??globalThis.fetch)(`${a}/servicenow/instance`);if(!t.ok){localStorage.removeItem("skyforge.sn.instance"),n("");return}const e=await t.json();e.instance?(n(e.instance),localStorage.setItem("skyforge.sn.instance",e.instance)):(localStorage.removeItem("skyforge.sn.instance"),n(""))}catch{}}export{l as a,g as b,f as p,m as s};
