import {
  isEqual,
  serialize
} from "./chunk-CEOYJPB2.js";
import {
  init_esm_shims
} from "./chunk-OFYOJ7GD.js";

// ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs
init_esm_shims();

// ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs
init_esm_shims();
import { createHash } from "node:crypto";
var e = globalThis.process?.getBuiltinModule?.("crypto")?.hash;
var r = "sha256";
var s = "base64url";
function digest(t) {
  if (e) return e(r, t, s);
  const o = createHash(r).update(t);
  return globalThis.process?.versions?.webcontainer ? o.digest().toString(s) : o.digest(s);
}

// ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs
function hash(input) {
  return digest(serialize(input));
}
export {
  digest,
  hash,
  isEqual,
  serialize
};
