{"version":3,"file":"webauthn.mjs","names":[],"sources":["../../src/webauthn.ts"],"sourcesContent":["import { isValidBrowser } from './browser';\n\n/**\n *\n */\nfunction isWebAuthnSupported() {\n  return (\n    isValidBrowser() &&\n    // Check if `PublicKeyCredential` is a constructor\n    typeof window.PublicKeyCredential === 'function'\n  );\n}\n\n/**\n *\n */\nasync function isWebAuthnAutofillSupported(): Promise<boolean> {\n  try {\n    return isWebAuthnSupported() && (await window.PublicKeyCredential.isConditionalMediationAvailable());\n  } catch {\n    return false;\n  }\n}\n\n/**\n *\n */\nasync function isWebAuthnPlatformAuthenticatorSupported(): Promise<boolean> {\n  try {\n    return (\n      typeof window !== 'undefined' &&\n      (await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable())\n    );\n  } catch {\n    return false;\n  }\n}\n\nexport { isWebAuthnPlatformAuthenticatorSupported, isWebAuthnAutofillSupported, isWebAuthnSupported };\n"],"mappings":";;;;;;AAKA,SAAS,sBAAsB;AAC7B,QACE,gBAAgB,IAEhB,OAAO,OAAO,wBAAwB;;;;;AAO1C,eAAe,8BAAgD;AAC7D,KAAI;AACF,SAAO,qBAAqB,IAAK,MAAM,OAAO,oBAAoB,iCAAiC;SAC7F;AACN,SAAO;;;;;;AAOX,eAAe,2CAA6D;AAC1E,KAAI;AACF,SACE,OAAO,WAAW,eACjB,MAAM,OAAO,oBAAoB,+CAA+C;SAE7E;AACN,SAAO"}