import n from "./native.es.js";
import m from "./rng.es.js";
import { unsafeStringify as u } from "./stringify.es.js";
function o(r, t, e) {
  r = r || {};
  const f = r.random ?? r.rng?.() ?? m();
  if (f.length < 16)
    throw new Error("Random bytes length must be >= 16");
  return f[6] = f[6] & 15 | 64, f[8] = f[8] & 63 | 128, u(f);
}
function g(r, t, e) {
  return n.randomUUID && !r ? n.randomUUID() : o(r);
}
export {
  g as default
};
//# sourceMappingURL=v4.es.js.map
