import{Y as h,r,I as l}from"./Fc7vEJt1.js";import{c as s}from"./DE0mmtVA.js";const M=h("global",()=>{const c=r(null),i=r(null),d=r(null),o=l({download:[],upload:[]}),a=l([]),n=l([]);return{rootElement:c,latestTraffic:i,latestMemory:d,trafficChartHistory:o,memoryChartHistory:a,connectionCountHistory:n,setLatestTraffic:t=>{i.value=t},setLatestMemory:t=>{d.value=t},addTrafficDataPoint:(t,e,f)=>{o.download.push([t,e]),o.upload.push([t,f]),o.download.length>s&&o.download.shift(),o.upload.length>s&&o.upload.shift()},addMemoryDataPoint:(t,e)=>{a.push([t,e]),a.length>s&&a.shift()},addConnectionCountDataPoint:(t,e)=>{n.push([t,e]),n.length>s&&n.shift()},clearChartHistory:()=>{o.download.length=0,o.upload.length=0,a.length=0,n.length=0}}});export{M as u};
