import{exec as a}from"child_process";import{createHash as d}from"crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"4.2.860"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f2ff03e7-6576-4d84-a06f-ecf36d3a9cf2",e._sentryDebugIdIdentifier="sentry-dbid-f2ff03e7-6576-4d84-a06f-ecf36d3a9cf2")})()}catch{}const{platform:t}=process,f={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},c={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:`${f[u()]}\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`,linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"};function u(){return process.platform!=="win32"?"":process.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in process.env?"mixed":"native"}function l(e){return d("sha256").update(e).digest("hex")}function p(e){switch(t){case"darwin":return e.split("IOPlatformUUID")[1].split(`
`)[0].replace(/=|\s+|"/ig,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/ig,"").toLowerCase();case"linux":return e.toString().replace(/\r+|\n+|\s+/ig,"").toLowerCase();case"freebsd":return e.toString().replace(/\r+|\n+|\s+/ig,"").toLowerCase();default:throw new Error(`Unsupported platform: ${process.platform}`)}}function m(e){return new Promise((n,o)=>a(c[t],{},(r,s,w)=>{if(r)return o(new Error(`Error while obtaining machine id: ${r.stack}`));const i=p(s.toString());return n(e?i:l(i))}))}export{m as machineId};
//# sourceMappingURL=get-machine-id-BDPy52Bm.mjs.map
