import { mapCoseAlgToWebCryptoKeyAlgName } from '../helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.js'; /** * Base error class that helps disambiguate SimpleWebAuthn library errors from other library errors */ export class SimpleWebAuthnError extends Error { constructor({ message, code, cause }) { super(message, { cause }); Object.defineProperty(this, "code", { enumerable: true, configurable: true, writable: true, value: void 0 }); this.name = 'SimpleWebAuthnError'; this.code = code; } } export class PQCNotSupportedError extends SimpleWebAuthnError { constructor(alg) { const webCryptoAlg = mapCoseAlgToWebCryptoKeyAlgName(alg); const message = `This runtime's WebCrypto.subtle does not support use of ${webCryptoAlg}`; super({ message, code: 'RUNTIME_NO_PQC_SUPPORT' }); } }