import{a}from"./chunk-5RLJWULN.js";import{Ib as c,J as s,M as r,e}from"./chunk-FLIJEKW7.js";var u=(()=>{let i=class i{constructor(t){this.http=t,this.deviceInfo=new e(void 0),this.location=new e(void 0),this.init()}init(){this.initSession(),this.initInfo(),this.initLocation()}initSession(){this.sessionId==null&&(this.sessionId=crypto.randomUUID())}getDeviceInfo(){let t=`${a.API_URL}/system/device-info`;this.http.get(t).subscribe({next:o=>{this.deviceInfo.next(o)}})}initInfo(){this.getDeviceInfo()}watchLocation(){this.locationTimer=window.setInterval(()=>{this.getLocation()},1e4)}getLocation(){navigator.geolocation!=null&&navigator.geolocation.getCurrentPosition(t=>{this.location.next(t)},t=>{},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})}initLocation(){this.getLocation(),this.watchLocation()}getLogs(){return this.http.get("{{api}}/system/logs/all")}ngOnDestroy(){window.clearInterval(this.locationTimer)}};i.\u0275fac=function(o){return new(o||i)(r(c))},i.\u0275prov=s({token:i,factory:i.\u0275fac});let n=i;return n})();export{u as a};
