@aws-amplify/core
Version:
Core category of aws-amplify
1 lines • 1.36 kB
Source Map (JSON)
{"version":3,"file":"index.native.mjs","sources":["../../../../src/utils/globalHelpers/index.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { loadBase64, loadGetRandomValues } from '@aws-amplify/react-native';\nimport { AmplifyError } from '../../errors';\nloadGetRandomValues();\nconst { encode, decode } = loadBase64();\nexport const getCrypto = () => {\n if (typeof crypto !== 'undefined' &&\n typeof crypto.getRandomValues === 'function') {\n return crypto;\n }\n throw new AmplifyError({\n name: 'MissingPolyfill',\n message: 'Cannot resolve the `crypto` function from the environment.',\n });\n};\nexport const getBtoa = () => {\n return encode;\n};\nexport const getAtob = () => {\n return decode;\n};\n"],"names":[],"mappings":";;;;;AAAA;AACA;AAGA,mBAAmB,EAAE,CAAC;AACtB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;AAC5B,MAAC,SAAS,GAAG,MAAM;AAC/B,IAAI,IAAI,OAAO,MAAM,KAAK,WAAW;AACrC,QAAQ,OAAO,MAAM,CAAC,eAAe,KAAK,UAAU,EAAE;AACtD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK;AACL,IAAI,MAAM,IAAI,YAAY,CAAC;AAC3B,QAAQ,IAAI,EAAE,iBAAiB;AAC/B,QAAQ,OAAO,EAAE,4DAA4D;AAC7E,KAAK,CAAC,CAAC;AACP,EAAE;AACU,MAAC,OAAO,GAAG,MAAM;AAC7B,IAAI,OAAO,MAAM,CAAC;AAClB,EAAE;AACU,MAAC,OAAO,GAAG,MAAM;AAC7B,IAAI,OAAO,MAAM,CAAC;AAClB;;;;"}