var y,M=new Uint8Array(16);function S(){if(!y&&(y=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!y))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y(M)}var T=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function D(f){return typeof f=="string"&&T.test(f)}var a=[];for(var A=0;A<256;++A)a.push((A+256).toString(16).substr(1));function E(f){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(a[f[e+0]]+a[f[e+1]]+a[f[e+2]]+a[f[e+3]]+"-"+a[f[e+4]]+a[f[e+5]]+"-"+a[f[e+6]]+a[f[e+7]]+"-"+a[f[e+8]]+a[f[e+9]]+"-"+a[f[e+10]]+a[f[e+11]]+a[f[e+12]]+a[f[e+13]]+a[f[e+14]]+a[f[e+15]]).toLowerCase();if(!D(r))throw TypeError("Stringified UUID is invalid");return r}function L(f){if(!D(f))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(f.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(f.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(f.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(f.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(f.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function N(f){f=unescape(encodeURIComponent(f));for(var e=[],r=0;r>>32-e}function k(f){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof f=="string"){var n=unescape(encodeURIComponent(f));f=[];for(var o=0;o>>0;U=I,I=h,h=R(p,30)>>>0,p=l,l=V}r[0]=r[0]+l>>>0,r[1]=r[1]+p>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+I>>>0,r[4]=r[4]+U>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var K=O("v5",80,k),X=K;const $=()=>{const f=window.localStorage.getItem("MAGICBROAD_DEVICE_ID");if(f)return f;{const e=b();return window.localStorage.setItem("MAGICBROAD_DEVICE_ID",e),e}},q=f=>X($(),f),F="00000000-0000-0000-0000-000000000000";export{q as a,F as b,$ as g,D as v}; //# sourceMappingURL=getDeviceId.e8f3946a.js.map