var m=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),a={randomUUID:m};var u,l=new Uint8Array(16);function i(){if(!u){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");u=crypto.getRandomValues.bind(crypto)}return u(l)}var e=[];for(let t=0;t<256;++t)e.push((t+256).toString(16).slice(1));function p(t,r=0){return(e[t[r+0]]+e[t[r+1]]+e[t[r+2]]+e[t[r+3]]+"-"+e[t[r+4]]+e[t[r+5]]+"-"+e[t[r+6]]+e[t[r+7]]+"-"+e[t[r+8]]+e[t[r+9]]+"-"+e[t[r+10]]+e[t[r+11]]+e[t[r+12]]+e[t[r+13]]+e[t[r+14]]+e[t[r+15]]).toLowerCase()}function x(t,r,o){if(a.randomUUID&&!r&&!t)return a.randomUUID();t=t||{};let n=t.random??t.rng?.()??i();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){if(o=o||0,o<0||o+16>r.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let d=0;d<16;++d)r[o+d]=n[d];return r}return p(n)}var c=x;export{c as a};
//# sourceMappingURL=chunk-BYTBWJD6.js.map
