const t=[];for(let u=0;u<256;++u)t.push((u+256).toString(16).slice(1));let o;const n=new Uint8Array(16);const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function e(e,u,d){if(r.randomUUID&&!e)return r.randomUUID();const a=(e=e||{}).random??e.rng?.()??function(){if(!o){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");o=crypto.getRandomValues.bind(crypto)}return o(n)}();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=15&a[6]|64,a[8]=63&a[8]|128,function(o,n=0){return(t[o[n+0]]+t[o[n+1]]+t[o[n+2]]+t[o[n+3]]+"-"+t[o[n+4]]+t[o[n+5]]+"-"+t[o[n+6]]+t[o[n+7]]+"-"+t[o[n+8]]+t[o[n+9]]+"-"+t[o[n+10]]+t[o[n+11]]+t[o[n+12]]+t[o[n+13]]+t[o[n+14]]+t[o[n+15]]).toLowerCase()}(a)}export{e as v};
