var y=r=>{throw TypeError(r)};var g=(r,e,s)=>e.has(r)||y("Cannot "+s);var t=(r,e,s)=>(g(r,e,"read from private field"),s?s.call(r):e.get(r)),o=(r,e,s)=>e.has(r)?y("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,s);import{s as m,g as f,d as l}from"./DhUiKsxN.js";import{s as c}from"./QNXDtpsh.js";var i,a,n,h;class u{constructor(){o(this,i,m(null));o(this,a,m(null));o(this,n,m(!1));o(this,h,m(null))}get memory(){return f(t(this,i))}set memory(e){l(t(this,i),e,!0)}get info(){return f(t(this,a))}set info(e){l(t(this,a),e,!0)}get loading(){return f(t(this,n))}set loading(e){l(t(this,n),e,!0)}get error(){return f(t(this,h))}set error(e){l(t(this,h),e,!0)}async refreshMemory(){try{this.memory=await c.memory()}catch(e){console.error("Failed to fetch memory:",e)}}async refreshInfo(){this.loading=!0;try{this.info=await c.info()}catch(e){this.error=e instanceof Error?e.message:"Failed to fetch system info"}finally{this.loading=!1}}async refresh(){await Promise.all([this.refreshMemory(),this.refreshInfo()])}}i=new WeakMap,a=new WeakMap,n=new WeakMap,h=new WeakMap;const S=new u;export{S as s};
