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KAAM,MAAQoH,EAAIrH,EAAE+F,QAAQE,MAAMqB,EAAGhF,KAAK+E,EAAElI,MACxE,CACA,MAAOoI,GAAS3H,EAAI,CAAE2H,MAAOA,EAAS,CACtC,QACI,IACQF,IAAMA,EAAEpB,OAASmB,EAAIpH,EAAU,SAAIoH,EAAE9G,KAAKN,EAClD,CACA,QAAU,GAAIJ,EAAG,MAAMA,EAAE2H,KAAO,CACpC,CACA,OAAOD,CACT,CA+DyBzI,OAAOoE,OAyDkB,mBAApB6kF,iBAAiCA","sources":["webpack://ask-pcos-application/./node_modules/@aws-amplify/auth/lib-esm/types/Auth.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Parser.js","webpack://ask-pcos-application/./node_modules/universal-cookie/es6/utils.js","webpack://ask-pcos-application/./node_modules/universal-cookie/es6/Cookies.js","webpack://ask-pcos-application/./node_modules/universal-cookie/es6/index.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/UniversalStorage/index.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/auth/lib-esm/common/AuthErrorStrings.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/auth/lib-esm/OAuth/urlOpener.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/auth/lib-esm/OAuth/OAuth.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Util/StringUtils.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/auth/lib-esm/OAuth/oauthStorage.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/auth/lib-esm/Errors.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/auth/lib-esm/Auth.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/auth/lib-esm/urlListener.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Amplify.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/client-cognito-identity/dist/es/models/models_0.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/OAuthHelper/GoogleOAuth.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/OAuthHelper/FacebookOAuth.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/OAuthHelper/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-serde/dist/es/serdePlugin.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-serde/dist/es/deserializerMiddleware.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-serde/dist/es/serializerMiddleware.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-stack/dist/es/MiddlewareStack.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/smithy-client/dist/es/client.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/smithy-client/dist/es/command.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/smithy-client/dist/es/lazy-json.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/client-cognito-identity/dist/es/commands/GetCredentialsForIdentityCommand.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/property-provider/dist/es/ProviderError.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/resolveLogins.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/fromCognitoIdentity.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/client-cognito-identity/dist/es/commands/GetIdCommand.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/IndexedDbStorage.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/localStorage.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/InMemoryStorage.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/fromCognitoIdentityPool.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-uri-escape/dist/es/escape-uri.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-base64-browser/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/fetch-http-handler/dist/es/fetch-http-handler.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/querystring-builder/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/fetch-http-handler/dist/es/request-timeout.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/fetch-http-handler/dist/es/stream-collector.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/invalid-dependency/dist/es/invalidProvider.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-retry/dist/es/retryMiddleware.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/service-error-classification/dist/es/constants.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/service-error-classification/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-retry/dist/es/delayDecider.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-retry/dist/es/constants.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-retry/dist/es/retryDecider.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-retry/dist/es/defaultStrategy.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-retry/dist/es/defaultRetryQuota.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-retry/dist/es/configurations.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/client-cognito-identity/dist/es/endpoints.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/url-parser/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-user-agent-browser/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/client-cognito-identity/dist/es/runtimeConfig.shared.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/querystring-parser/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/client-cognito-identity/dist/es/runtimeConfig.browser.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-body-length-browser/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/config-resolver/dist/es/EndpointsConfig.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/config-resolver/dist/es/RegionConfig.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-content-length/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-host-header/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-logger/dist/es/loggerMiddleware.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/constants.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/credentialDerivation.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/getCanonicalHeaders.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/getPayloadHash.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/is-array-buffer/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/cloneRequest.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/prepareRequest.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/utilDate.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/SignatureV4.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/moveHeadersToQuery.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/hasHeader.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/signature-v4/dist/es/getCanonicalQuery.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-signing/dist/es/configurations.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-user-agent/dist/es/constants.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-user-agent/dist/es/user-agent-middleware.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/client-cognito-identity/dist/es/CognitoIdentityClient.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/middleware-user-agent/dist/es/configurations.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Credentials.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Hub.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/JS.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Logger/ConsoleLogger.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Platform/version.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Platform/index.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/StorageHelper/index.js","webpack://ask-pcos-application/./node_modules/@aws-amplify/core/lib-esm/Util/Retry.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/ie11-detection/build/Key.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/ie11-detection/build/KeyOperation.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/ie11-detection/build/MsWindow.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/ie11-detection/build/index.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-browser/build/constants.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-browser/build/index.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-js/build/RawSha256.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-js/build/constants.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-js/build/index.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/sha256-js/build/jsSha256.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/supports-web-crypto/build/index.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/supports-web-crypto/build/supportsWebCrypto.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/util/build/convertToBuffer.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/util/build/index.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/util/build/isEmptyData.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/util/build/numToUint8.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/util/build/uint32ArrayFrom.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/util/node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/util/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js","webpack://ask-pcos-application/./node_modules/@aws-crypto/util/node_modules/@aws-sdk/util-utf8-browser/dist-es/pureJs.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/protocol-http/dist/es/httpResponse.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/protocol-http/dist/es/httpRequest.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-hex-encoding/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-locate-window/dist-es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-utf8-browser/dist/es/whatwgEncodingApi.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/util-utf8-browser/dist/es/pureJs.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/AuthenticationDetails.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/utils/cryptoSecureRandomInt.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/utils/WordArray.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/BigInteger.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/AuthenticationHelper.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CognitoJwtToken.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CognitoAccessToken.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CognitoIdToken.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CognitoRefreshToken.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CognitoUserSession.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/DateHelper.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CognitoUserAttribute.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/StorageHelper.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CognitoUser.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/UserAgent.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/Client.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CognitoUserPool.js","webpack://ask-pcos-application/./node_modules/amazon-cognito-identity-js/es/CookieStorage.js","webpack://ask-pcos-application/./node_modules/base64-js/index.js","webpack://ask-pcos-application/./node_modules/bowser/es5.js","webpack://ask-pcos-application/./node_modules/buffer/index.js","webpack://ask-pcos-application/./node_modules/buffer/node_modules/isarray/index.js","webpack://ask-pcos-application/./node_modules/call-bind/callBound.js","webpack://ask-pcos-application/./node_modules/call-bind/index.js","webpack://ask-pcos-application/./node_modules/cookie/index.js","webpack://ask-pcos-application/./node_modules/crypto-js/core.js","webpack://ask-pcos-application/./node_modules/crypto-js/enc-base64.js","webpack://ask-pcos-application/./node_modules/crypto-js/hmac-sha256.js","webpack://ask-pcos-application/./node_modules/crypto-js/hmac.js","webpack://ask-pcos-application/./node_modules/crypto-js/lib-typedarrays.js","webpack://ask-pcos-application/./node_modules/crypto-js/sha256.js","webpack://ask-pcos-application/./node_modules/define-data-property/index.js","webpack://ask-pcos-application/./node_modules/es-define-property/index.js","webpack://ask-pcos-application/./node_modules/es-errors/eval.js","webpack://ask-pcos-application/./node_modules/es-errors/index.js","webpack://ask-pcos-application/./node_modules/es-errors/range.js","webpack://ask-pcos-application/./node_modules/es-errors/ref.js","webpack://ask-pcos-application/./node_modules/es-errors/syntax.js","webpack://ask-pcos-application/./node_modules/es-errors/type.js","webpack://ask-pcos-application/./node_modules/es-errors/uri.js","webpack://ask-pcos-application/./node_modules/function-bind/implementation.js","webpack://ask-pcos-application/./node_modules/function-bind/index.js","webpack://ask-pcos-application/./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/fetch.js","webpack://ask-pcos-application/./node_modules/get-intrinsic/index.js","webpack://ask-pcos-application/./node_modules/gopd/index.js","webpack://ask-pcos-application/./node_modules/has-property-descriptors/index.js","webpack://ask-pcos-application/./node_modules/has-proto/index.js","webpack://ask-pcos-application/./node_modules/has-symbols/index.js","webpack://ask-pcos-application/./node_modules/has-symbols/shams.js","webpack://ask-pcos-application/./node_modules/hasown/index.js","webpack://ask-pcos-application/./node_modules/ieee754/index.js","webpack://ask-pcos-application/./node_modules/js-cookie/src/js.cookie.js","webpack://ask-pcos-application/./node_modules/object-inspect/index.js","webpack://ask-pcos-application/./node_modules/set-function-length/index.js","webpack://ask-pcos-application/./node_modules/side-channel/index.js","webpack://ask-pcos-application/./node_modules/tslib/tslib.es6.js","webpack://ask-pcos-application/./node_modules/url/node_modules/punycode/punycode.js","webpack://ask-pcos-application/./node_modules/url/node_modules/qs/lib/formats.js","webpack://ask-pcos-application/./node_modules/url/node_modules/qs/lib/index.js","webpack://ask-pcos-application/./node_modules/url/node_modules/qs/lib/parse.js","webpack://ask-pcos-application/./node_modules/url/node_modules/qs/lib/stringify.js","webpack://ask-pcos-application/./node_modules/url/node_modules/qs/lib/utils.js","webpack://ask-pcos-application/./node_modules/url/url.js","webpack://ask-pcos-application/./node_modules/uuid/index.js","webpack://ask-pcos-application/./node_modules/uuid/lib/bytesToUuid.js","webpack://ask-pcos-application/./node_modules/uuid/lib/rng-browser.js","webpack://ask-pcos-application/./node_modules/uuid/v1.js","webpack://ask-pcos-application/./node_modules/uuid/v4.js","webpack://ask-pcos-application/./node_modules/@aws-sdk/client-cognito-identity/node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nexport var CognitoHostedUIIdentityProvider;\n(function (CognitoHostedUIIdentityProvider) {\n CognitoHostedUIIdentityProvider[\"Cognito\"] = \"COGNITO\";\n CognitoHostedUIIdentityProvider[\"Google\"] = \"Google\";\n CognitoHostedUIIdentityProvider[\"Facebook\"] = \"Facebook\";\n CognitoHostedUIIdentityProvider[\"Amazon\"] = \"LoginWithAmazon\";\n CognitoHostedUIIdentityProvider[\"Apple\"] = \"SignInWithApple\";\n})(CognitoHostedUIIdentityProvider || (CognitoHostedUIIdentityProvider = {}));\nexport function isFederatedSignInOptions(obj) {\n var keys = ['provider'];\n return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });\n}\nexport function isFederatedSignInOptionsCustom(obj) {\n var keys = ['customProvider'];\n return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });\n}\nexport function hasCustomState(obj) {\n var keys = ['customState'];\n return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });\n}\nexport function isCognitoHostedOpts(oauth) {\n return oauth.redirectSignIn !== undefined;\n}\nexport var AuthErrorTypes;\n(function (AuthErrorTypes) {\n AuthErrorTypes[\"NoConfig\"] = \"noConfig\";\n AuthErrorTypes[\"MissingAuthConfig\"] = \"missingAuthConfig\";\n AuthErrorTypes[\"EmptyUsername\"] = \"emptyUsername\";\n AuthErrorTypes[\"InvalidUsername\"] = \"invalidUsername\";\n AuthErrorTypes[\"EmptyPassword\"] = \"emptyPassword\";\n AuthErrorTypes[\"EmptyCode\"] = \"emptyCode\";\n AuthErrorTypes[\"SignUpError\"] = \"signUpError\";\n AuthErrorTypes[\"NoMFA\"] = \"noMFA\";\n AuthErrorTypes[\"InvalidMFA\"] = \"invalidMFA\";\n AuthErrorTypes[\"EmptyChallengeResponse\"] = \"emptyChallengeResponse\";\n AuthErrorTypes[\"NoUserSession\"] = \"noUserSession\";\n AuthErrorTypes[\"Default\"] = \"default\";\n})(AuthErrorTypes || (AuthErrorTypes = {}));\nexport function isUsernamePasswordOpts(obj) {\n return !!obj.username;\n}\n//# sourceMappingURL=Auth.js.map","import { ConsoleLogger as Logger } from './Logger';\nvar logger = new Logger('Parser');\nexport var parseMobileHubConfig = function (config) {\n var amplifyConfig = {};\n // Analytics\n if (config['aws_mobile_analytics_app_id']) {\n var Analytics = {\n AWSPinpoint: {\n appId: config['aws_mobile_analytics_app_id'],\n region: config['aws_mobile_analytics_app_region'],\n },\n };\n amplifyConfig.Analytics = Analytics;\n }\n // Auth\n if (config['aws_cognito_identity_pool_id'] || config['aws_user_pools_id']) {\n amplifyConfig.Auth = {\n userPoolId: config['aws_user_pools_id'],\n userPoolWebClientId: config['aws_user_pools_web_client_id'],\n region: config['aws_cognito_region'],\n identityPoolId: config['aws_cognito_identity_pool_id'],\n identityPoolRegion: config['aws_cognito_region'],\n mandatorySignIn: config['aws_mandatory_sign_in'] === 'enable',\n };\n }\n // Storage\n var storageConfig;\n if (config['aws_user_files_s3_bucket']) {\n storageConfig = {\n AWSS3: {\n bucket: config['aws_user_files_s3_bucket'],\n region: config['aws_user_files_s3_bucket_region'],\n dangerouslyConnectToHttpEndpointForTesting: config['aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing'],\n },\n };\n }\n else {\n storageConfig = config ? config.Storage || config : {};\n }\n amplifyConfig.Analytics = Object.assign({}, amplifyConfig.Analytics, config.Analytics);\n amplifyConfig.Auth = Object.assign({}, amplifyConfig.Auth, config.Auth);\n amplifyConfig.Storage = Object.assign({}, storageConfig);\n logger.debug('parse config', config, 'to amplifyconfig', amplifyConfig);\n return amplifyConfig;\n};\n/**\n * @deprecated use per-function export\n */\nvar Parser = /** @class */ (function () {\n function Parser() {\n }\n Parser.parseMobilehubConfig = parseMobileHubConfig;\n return Parser;\n}());\nexport { Parser };\n/**\n * @deprecated use per-function export\n */\nexport default Parser;\n//# sourceMappingURL=Parser.js.map","import * as cookie from 'cookie';\r\nexport function hasDocumentCookie() {\r\n // Can we get/set cookies on document.cookie?\r\n return typeof document === 'object' && typeof document.cookie === 'string';\r\n}\r\nexport function cleanCookies() {\r\n document.cookie.split(';').forEach(function (c) {\r\n document.cookie = c\r\n .replace(/^ +/, '')\r\n .replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/');\r\n });\r\n}\r\nexport function parseCookies(cookies, options) {\r\n if (typeof cookies === 'string') {\r\n return cookie.parse(cookies, options);\r\n }\r\n else if (typeof cookies === 'object' && cookies !== null) {\r\n return cookies;\r\n }\r\n else {\r\n return {};\r\n }\r\n}\r\nexport function isParsingCookie(value, doNotParse) {\r\n if (typeof doNotParse === 'undefined') {\r\n // We guess if the cookie start with { or [, it has been serialized\r\n doNotParse =\r\n !value || (value[0] !== '{' && value[0] !== '[' && value[0] !== '\"');\r\n }\r\n return !doNotParse;\r\n}\r\nexport function readCookie(value, options) {\r\n if (options === void 0) { options = {}; }\r\n var cleanValue = cleanupCookieValue(value);\r\n if (isParsingCookie(cleanValue, options.doNotParse)) {\r\n try {\r\n return JSON.parse(cleanValue);\r\n }\r\n catch (e) {\r\n // At least we tried\r\n }\r\n }\r\n // Ignore clean value if we failed the deserialization\r\n // It is not relevant anymore to trim those values\r\n return value;\r\n}\r\nfunction cleanupCookieValue(value) {\r\n // express prepend j: before serializing a cookie\r\n if (value && value[0] === 'j' && value[1] === ':') {\r\n return value.substr(2);\r\n }\r\n return value;\r\n}\r\n","var __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nimport * as cookie from 'cookie';\r\nimport { hasDocumentCookie, parseCookies, readCookie } from './utils';\r\nvar Cookies = /** @class */ (function () {\r\n function Cookies(cookies, options) {\r\n var _this = this;\r\n this.changeListeners = [];\r\n this.HAS_DOCUMENT_COOKIE = false;\r\n this.cookies = parseCookies(cookies, options);\r\n new Promise(function () {\r\n _this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();\r\n }).catch(function () { });\r\n }\r\n Cookies.prototype._updateBrowserValues = function (parseOptions) {\r\n if (!this.HAS_DOCUMENT_COOKIE) {\r\n return;\r\n }\r\n this.cookies = cookie.parse(document.cookie, parseOptions);\r\n };\r\n Cookies.prototype._emitChange = function (params) {\r\n for (var i = 0; i < this.changeListeners.length; ++i) {\r\n this.changeListeners[i](params);\r\n }\r\n };\r\n Cookies.prototype.get = function (name, options, parseOptions) {\r\n if (options === void 0) { options = {}; }\r\n this._updateBrowserValues(parseOptions);\r\n return readCookie(this.cookies[name], options);\r\n };\r\n Cookies.prototype.getAll = function (options, parseOptions) {\r\n if (options === void 0) { options = {}; }\r\n this._updateBrowserValues(parseOptions);\r\n var result = {};\r\n for (var name_1 in this.cookies) {\r\n result[name_1] = readCookie(this.cookies[name_1], options);\r\n }\r\n return result;\r\n };\r\n Cookies.prototype.set = function (name, value, options) {\r\n var _a;\r\n if (typeof value === 'object') {\r\n value = JSON.stringify(value);\r\n }\r\n this.cookies = __assign(__assign({}, this.cookies), (_a = {}, _a[name] = value, _a));\r\n if (this.HAS_DOCUMENT_COOKIE) {\r\n document.cookie = cookie.serialize(name, value, options);\r\n }\r\n this._emitChange({ name: name, value: value, options: options });\r\n };\r\n Cookies.prototype.remove = function (name, options) {\r\n var finalOptions = (options = __assign(__assign({}, options), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 }));\r\n this.cookies = __assign({}, this.cookies);\r\n delete this.cookies[name];\r\n if (this.HAS_DOCUMENT_COOKIE) {\r\n document.cookie = cookie.serialize(name, '', finalOptions);\r\n }\r\n this._emitChange({ name: name, value: undefined, options: options });\r\n };\r\n Cookies.prototype.addChangeListener = function (callback) {\r\n this.changeListeners.push(callback);\r\n };\r\n Cookies.prototype.removeChangeListener = function (callback) {\r\n var idx = this.changeListeners.indexOf(callback);\r\n if (idx >= 0) {\r\n this.changeListeners.splice(idx, 1);\r\n }\r\n };\r\n return Cookies;\r\n}());\r\nexport default Cookies;\r\n","import Cookies from './Cookies';\r\nexport default Cookies;\r\n","import Cookies from 'universal-cookie';\nimport { browserOrNode } from '../JS';\nvar isBrowser = browserOrNode().isBrowser;\nvar UniversalStorage = /** @class */ (function () {\n function UniversalStorage(context) {\n if (context === void 0) { context = {}; }\n this.cookies = new Cookies();\n this.store = isBrowser ? window.localStorage : Object.create(null);\n this.cookies = context.req\n ? new Cookies(context.req.headers.cookie)\n : new Cookies();\n Object.assign(this.store, this.cookies.getAll());\n }\n Object.defineProperty(UniversalStorage.prototype, \"length\", {\n get: function () {\n return Object.entries(this.store).length;\n },\n enumerable: true,\n configurable: true\n });\n UniversalStorage.prototype.clear = function () {\n var _this = this;\n Array.from(new Array(this.length))\n .map(function (_, i) { return _this.key(i); })\n .forEach(function (key) { return _this.removeItem(key); });\n };\n UniversalStorage.prototype.getItem = function (key) {\n return this.getLocalItem(key);\n };\n UniversalStorage.prototype.getLocalItem = function (key) {\n return Object.prototype.hasOwnProperty.call(this.store, key)\n ? this.store[key]\n : null;\n };\n UniversalStorage.prototype.getUniversalItem = function (key) {\n return this.cookies.get(key);\n };\n UniversalStorage.prototype.key = function (index) {\n return Object.keys(this.store)[index];\n };\n UniversalStorage.prototype.removeItem = function (key) {\n this.removeLocalItem(key);\n this.removeUniversalItem(key);\n };\n UniversalStorage.prototype.removeLocalItem = function (key) {\n delete this.store[key];\n };\n UniversalStorage.prototype.removeUniversalItem = function (key) {\n this.cookies.remove(key, {\n path: '/',\n });\n };\n UniversalStorage.prototype.setItem = function (key, value) {\n this.setLocalItem(key, value);\n // keys take the shape:\n // 1. `${ProviderPrefix}.${userPoolClientId}.${username}.${tokenType}\n // 2. `${ProviderPrefix}.${userPoolClientId}.LastAuthUser\n var tokenType = key.split('.').pop();\n switch (tokenType) {\n // LastAuthUser is needed for computing other key names\n case 'LastAuthUser':\n // accessToken is required for CognitoUserSession\n case 'accessToken':\n // Required for CognitoUserSession\n case 'idToken':\n this.setUniversalItem(key, value);\n // userData is used when `Auth.currentAuthenticatedUser({ bypassCache: false })`.\n // Can be persisted to speed up calls to `Auth.currentAuthenticatedUser()`\n // case 'userData':\n // refreshToken isn't shared with the server so that the client handles refreshing\n // case 'refreshToken':\n // Ignoring clockDrift on the server for now, but needs testing\n // case 'clockDrift':\n }\n };\n UniversalStorage.prototype.setLocalItem = function (key, value) {\n this.store[key] = value;\n };\n UniversalStorage.prototype.setUniversalItem = function (key, value) {\n this.cookies.set(key, value, {\n path: '/',\n // `httpOnly` cannot be set via JavaScript: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#JavaScript_access_using_Document.cookie\n sameSite: true,\n // Allow unsecure requests to http://localhost:3000/ when in development.\n secure: window.location.hostname === 'localhost' ? false : true,\n });\n };\n return UniversalStorage;\n}());\nexport { UniversalStorage };\n//# sourceMappingURL=index.js.map","export var AuthErrorStrings;\n(function (AuthErrorStrings) {\n AuthErrorStrings[\"DEFAULT_MSG\"] = \"Authentication Error\";\n AuthErrorStrings[\"EMPTY_USERNAME\"] = \"Username cannot be empty\";\n AuthErrorStrings[\"INVALID_USERNAME\"] = \"The username should either be a string or one of the sign in types\";\n AuthErrorStrings[\"EMPTY_PASSWORD\"] = \"Password cannot be empty\";\n AuthErrorStrings[\"EMPTY_CODE\"] = \"Confirmation code cannot be empty\";\n AuthErrorStrings[\"SIGN_UP_ERROR\"] = \"Error creating account\";\n AuthErrorStrings[\"NO_MFA\"] = \"No valid MFA method provided\";\n AuthErrorStrings[\"INVALID_MFA\"] = \"Invalid MFA type\";\n AuthErrorStrings[\"EMPTY_CHALLENGE\"] = \"Challenge response cannot be empty\";\n AuthErrorStrings[\"NO_USER_SESSION\"] = \"Failed to get the session because the user is empty\";\n})(AuthErrorStrings || (AuthErrorStrings = {}));\n//# sourceMappingURL=AuthErrorStrings.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar SELF = '_self';\nexport var launchUri = function (url) {\n var windowProxy = window.open(url, SELF);\n if (windowProxy) {\n return Promise.resolve(windowProxy);\n }\n else {\n return Promise.reject();\n }\n};\n//# sourceMappingURL=urlOpener.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { parse } from 'url'; // Used for OAuth parsing of Cognito Hosted UI\nimport { launchUri } from './urlOpener';\nimport * as oAuthStorage from './oauthStorage';\nimport { isCognitoHostedOpts, CognitoHostedUIIdentityProvider, } from '../types/Auth';\nimport { ConsoleLogger as Logger, Hub, urlSafeEncode } from '@aws-amplify/core';\nimport sha256 from 'crypto-js/sha256';\nimport Base64 from 'crypto-js/enc-base64';\nvar AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined' &&\n typeof Symbol.for === 'function'\n ? Symbol.for('amplify_default')\n : '@@amplify_default');\nvar dispatchAuthEvent = function (event, data, message) {\n Hub.dispatch('auth', { event: event, data: data, message: message }, 'Auth', AMPLIFY_SYMBOL);\n};\nvar logger = new Logger('OAuth');\nvar OAuth = /** @class */ (function () {\n function OAuth(_a) {\n var config = _a.config, cognitoClientId = _a.cognitoClientId, _b = _a.scopes, scopes = _b === void 0 ? [] : _b;\n this._urlOpener = config.urlOpener || launchUri;\n this._config = config;\n this._cognitoClientId = cognitoClientId;\n if (!this.isValidScopes(scopes))\n throw Error('scopes must be a String Array');\n this._scopes = scopes;\n }\n OAuth.prototype.isValidScopes = function (scopes) {\n return (Array.isArray(scopes) && scopes.every(function (scope) { return typeof scope === 'string'; }));\n };\n OAuth.prototype.oauthSignIn = function (responseType, domain, redirectSignIn, clientId, provider, customState) {\n if (responseType === void 0) { responseType = 'code'; }\n if (provider === void 0) { provider = CognitoHostedUIIdentityProvider.Cognito; }\n var generatedState = this._generateState(32);\n /* encodeURIComponent is not URL safe, use urlSafeEncode instead. Cognito\n single-encodes/decodes url on first sign in and double-encodes/decodes url\n when user already signed in. Using encodeURIComponent, Base32, Base64 add\n characters % or = which on further encoding becomes unsafe. '=' create issue\n for parsing query params.\n Refer: https://github.com/aws-amplify/amplify-js/issues/5218 */\n var state = customState\n ? generatedState + \"-\" + urlSafeEncode(customState)\n : generatedState;\n oAuthStorage.setState(state);\n var pkce_key = this._generateRandom(128);\n oAuthStorage.setPKCE(pkce_key);\n var code_challenge = this._generateChallenge(pkce_key);\n var code_challenge_method = 'S256';\n var scopesString = this._scopes.join(' ');\n var queryString = Object.entries(__assign(__assign({ redirect_uri: redirectSignIn, response_type: responseType, client_id: clientId, identity_provider: provider, scope: scopesString, state: state }, (responseType === 'code' ? { code_challenge: code_challenge } : {})), (responseType === 'code' ? { code_challenge_method: code_challenge_method } : {})))\n .map(function (_a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n return encodeURIComponent(k) + \"=\" + encodeURIComponent(v);\n })\n .join('&');\n var URL = \"https://\" + domain + \"/oauth2/authorize?\" + queryString;\n logger.debug(\"Redirecting to \" + URL);\n this._urlOpener(URL, redirectSignIn);\n };\n OAuth.prototype._handleCodeFlow = function (currentUrl) {\n return __awaiter(this, void 0, void 0, function () {\n var code, currentUrlPathname, redirectSignInPathname, oAuthTokenEndpoint, client_id, redirect_uri, code_verifier, oAuthTokenBody, body, _a, access_token, refresh_token, id_token, error;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n code = (parse(currentUrl).query || '')\n .split('&')\n .map(function (pairings) { return pairings.split('='); })\n .reduce(function (accum, _a) {\n var _b;\n var _c = __read(_a, 2), k = _c[0], v = _c[1];\n return (__assign(__assign({}, accum), (_b = {}, _b[k] = v, _b)));\n }, { code: undefined }).code;\n currentUrlPathname = parse(currentUrl).pathname || '/';\n redirectSignInPathname = parse(this._config.redirectSignIn).pathname || '/';\n if (!code || currentUrlPathname !== redirectSignInPathname) {\n return [2 /*return*/];\n }\n oAuthTokenEndpoint = 'https://' + this._config.domain + '/oauth2/token';\n dispatchAuthEvent('codeFlow', {}, \"Retrieving tokens from \" + oAuthTokenEndpoint);\n client_id = isCognitoHostedOpts(this._config)\n ? this._cognitoClientId\n : this._config.clientID;\n redirect_uri = isCognitoHostedOpts(this._config)\n ? this._config.redirectSignIn\n : this._config.redirectUri;\n code_verifier = oAuthStorage.getPKCE();\n oAuthTokenBody = __assign({ grant_type: 'authorization_code', code: code,\n client_id: client_id,\n redirect_uri: redirect_uri }, (code_verifier ? { code_verifier: code_verifier } : {}));\n logger.debug(\"Calling token endpoint: \" + oAuthTokenEndpoint + \" with\", oAuthTokenBody);\n body = Object.entries(oAuthTokenBody)\n .map(function (_a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n return encodeURIComponent(k) + \"=\" + encodeURIComponent(v);\n })\n .join('&');\n return [4 /*yield*/, fetch(oAuthTokenEndpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: body,\n })];\n case 1: return [4 /*yield*/, (_b.sent()).json()];\n case 2:\n _a = _b.sent(), access_token = _a.access_token, refresh_token = _a.refresh_token, id_token = _a.id_token, error = _a.error;\n if (error) {\n throw new Error(error);\n }\n return [2 /*return*/, {\n accessToken: access_token,\n refreshToken: refresh_token,\n idToken: id_token,\n }];\n }\n });\n });\n };\n OAuth.prototype._handleImplicitFlow = function (currentUrl) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, id_token, access_token;\n return __generator(this, function (_b) {\n _a = (parse(currentUrl).hash || '#')\n .substr(1) // Remove # from returned code\n .split('&')\n .map(function (pairings) { return pairings.split('='); })\n .reduce(function (accum, _a) {\n var _b;\n var _c = __read(_a, 2), k = _c[0], v = _c[1];\n return (__assign(__assign({}, accum), (_b = {}, _b[k] = v, _b)));\n }, {\n id_token: undefined,\n access_token: undefined,\n }), id_token = _a.id_token, access_token = _a.access_token;\n dispatchAuthEvent('implicitFlow', {}, \"Got tokens from \" + currentUrl);\n logger.debug(\"Retrieving implicit tokens from \" + currentUrl + \" with\");\n return [2 /*return*/, {\n accessToken: access_token,\n idToken: id_token,\n refreshToken: null,\n }];\n });\n });\n };\n OAuth.prototype.handleAuthResponse = function (currentUrl) {\n return __awaiter(this, void 0, void 0, function () {\n var urlParams, error, error_description, state, _a, _b, e_1;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _c.trys.push([0, 5, , 6]);\n urlParams = currentUrl\n ? __assign(__assign({}, (parse(currentUrl).hash || '#')\n .substr(1)\n .split('&')\n .map(function (entry) { return entry.split('='); })\n .reduce(function (acc, _a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n return ((acc[k] = v), acc);\n }, {})), (parse(currentUrl).query || '')\n .split('&')\n .map(function (entry) { return entry.split('='); })\n .reduce(function (acc, _a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n return ((acc[k] = v), acc);\n }, {}))\n : {};\n error = urlParams.error, error_description = urlParams.error_description;\n if (error) {\n throw new Error(error_description);\n }\n state = this._validateState(urlParams);\n logger.debug(\"Starting \" + this._config.responseType + \" flow with \" + currentUrl);\n if (!(this._config.responseType === 'code')) return [3 /*break*/, 2];\n _a = [{}];\n return [4 /*yield*/, this._handleCodeFlow(currentUrl)];\n case 1: return [2 /*return*/, __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_c.sent())])), { state: state }])];\n case 2:\n _b = [{}];\n return [4 /*yield*/, this._handleImplicitFlow(currentUrl)];\n case 3: return [2 /*return*/, __assign.apply(void 0, [__assign.apply(void 0, _b.concat([(_c.sent())])), { state: state }])];\n case 4: return [3 /*break*/, 6];\n case 5:\n e_1 = _c.sent();\n logger.error(\"Error handling auth response.\", e_1);\n throw e_1;\n case 6: return [2 /*return*/];\n }\n });\n });\n };\n OAuth.prototype._validateState = function (urlParams) {\n if (!urlParams) {\n return;\n }\n var savedState = oAuthStorage.getState();\n var returnedState = urlParams.state;\n // This is because savedState only exists if the flow was initiated by Amplify\n if (savedState && savedState !== returnedState) {\n throw new Error('Invalid state in OAuth flow');\n }\n return returnedState;\n };\n OAuth.prototype.signOut = function () {\n return __awaiter(this, void 0, void 0, function () {\n var oAuthLogoutEndpoint, client_id, signout_uri;\n return __generator(this, function (_a) {\n oAuthLogoutEndpoint = 'https://' + this._config.domain + '/logout?';\n client_id = isCognitoHostedOpts(this._config)\n ? this._cognitoClientId\n : this._config.oauth.clientID;\n signout_uri = isCognitoHostedOpts(this._config)\n ? this._config.redirectSignOut\n : this._config.returnTo;\n oAuthLogoutEndpoint += Object.entries({\n client_id: client_id,\n logout_uri: encodeURIComponent(signout_uri),\n })\n .map(function (_a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n return k + \"=\" + v;\n })\n .join('&');\n dispatchAuthEvent('oAuthSignOut', { oAuth: 'signOut' }, \"Signing out from \" + oAuthLogoutEndpoint);\n logger.debug(\"Signing out from \" + oAuthLogoutEndpoint);\n return [2 /*return*/, this._urlOpener(oAuthLogoutEndpoint)];\n });\n });\n };\n OAuth.prototype._generateState = function (length) {\n var result = '';\n var i = length;\n var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for (; i > 0; --i)\n result += chars[Math.round(Math.random() * (chars.length - 1))];\n return result;\n };\n OAuth.prototype._generateChallenge = function (code) {\n return this._base64URL(sha256(code));\n };\n OAuth.prototype._base64URL = function (string) {\n return string\n .toString(Base64)\n .replace(/=/g, '')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_');\n };\n OAuth.prototype._generateRandom = function (size) {\n var CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~';\n var buffer = new Uint8Array(size);\n if (typeof window !== 'undefined' && !!window.crypto) {\n window.crypto.getRandomValues(buffer);\n }\n else {\n for (var i = 0; i < size; i += 1) {\n buffer[i] = (Math.random() * CHARSET.length) | 0;\n }\n }\n return this._bufferToString(buffer);\n };\n OAuth.prototype._bufferToString = function (buffer) {\n var CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var state = [];\n for (var i = 0; i < buffer.byteLength; i += 1) {\n var index = buffer[i] % CHARSET.length;\n state.push(CHARSET[index]);\n }\n return state.join('');\n };\n return OAuth;\n}());\nexport default OAuth;\n//# sourceMappingURL=OAuth.js.map","export function urlSafeEncode(str) {\n return str\n .split('')\n .map(function (char) {\n return char\n .charCodeAt(0)\n .toString(16)\n .padStart(2, '0');\n })\n .join('');\n}\nexport function urlSafeDecode(hex) {\n return hex\n .match(/.{2}/g)\n .map(function (char) { return String.fromCharCode(parseInt(char, 16)); })\n .join('');\n}\n//# sourceMappingURL=StringUtils.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nexport var setState = function (state) {\n window.sessionStorage.setItem('oauth_state', state);\n};\nexport var getState = function () {\n var oauth_state = window.sessionStorage.getItem('oauth_state');\n window.sessionStorage.removeItem('oauth_state');\n return oauth_state;\n};\nexport var setPKCE = function (private_key) {\n window.sessionStorage.setItem('ouath_pkce_key', private_key);\n};\nexport var getPKCE = function () {\n var ouath_pkce_key = window.sessionStorage.getItem('ouath_pkce_key');\n window.sessionStorage.removeItem('ouath_pkce_key');\n return ouath_pkce_key;\n};\nexport var clearAll = function () {\n window.sessionStorage.removeItem('ouath_pkce_key');\n window.sessionStorage.removeItem('oauth_state');\n};\n//# sourceMappingURL=oauthStorage.js.map","/*\n * Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ConsoleLogger as Logger } from '@aws-amplify/core';\nimport { AuthErrorStrings } from './common/AuthErrorStrings';\nvar logger = new Logger('AuthError');\nvar AuthError = /** @class */ (function (_super) {\n __extends(AuthError, _super);\n function AuthError(type) {\n var _this = this;\n var _a = authErrorMessages[type], message = _a.message, log = _a.log;\n _this = _super.call(this, message) || this;\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n _this.constructor = AuthError;\n Object.setPrototypeOf(_this, AuthError.prototype);\n _this.name = 'AuthError';\n _this.log = log || message;\n logger.error(_this.log);\n return _this;\n }\n return AuthError;\n}(Error));\nexport { AuthError };\nvar NoUserPoolError = /** @class */ (function (_super) {\n __extends(NoUserPoolError, _super);\n function NoUserPoolError(type) {\n var _this = _super.call(this, type) || this;\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n _this.constructor = NoUserPoolError;\n Object.setPrototypeOf(_this, NoUserPoolError.prototype);\n _this.name = 'NoUserPoolError';\n return _this;\n }\n return NoUserPoolError;\n}(AuthError));\nexport { NoUserPoolError };\nexport var authErrorMessages = {\n noConfig: {\n message: AuthErrorStrings.DEFAULT_MSG,\n log: \"\\n Error: Amplify has not been configured correctly.\\n This error is typically caused by one of the following scenarios:\\n\\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\\n \\n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\\n\\t\\t\\t\\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\\n \",\n },\n missingAuthConfig: {\n message: AuthErrorStrings.DEFAULT_MSG,\n log: \"\\n Error: Amplify has not been configured correctly. \\n The configuration object is missing required auth properties.\\n This error is typically caused by one of the following scenarios:\\n\\n 1. Did you run `amplify push` after adding auth via `amplify add auth`?\\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\\n\\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\\n \",\n },\n emptyUsername: {\n message: AuthErrorStrings.EMPTY_USERNAME,\n },\n // TODO: should include a list of valid sign-in types\n invalidUsername: {\n message: AuthErrorStrings.INVALID_USERNAME,\n },\n emptyPassword: {\n message: AuthErrorStrings.EMPTY_PASSWORD,\n },\n emptyCode: {\n message: AuthErrorStrings.EMPTY_CODE,\n },\n signUpError: {\n message: AuthErrorStrings.SIGN_UP_ERROR,\n log: 'The first parameter should either be non-null string or object',\n },\n noMFA: {\n message: AuthErrorStrings.NO_MFA,\n },\n invalidMFA: {\n message: AuthErrorStrings.INVALID_MFA,\n },\n emptyChallengeResponse: {\n message: AuthErrorStrings.EMPTY_CHALLENGE,\n },\n noUserSession: {\n message: AuthErrorStrings.NO_USER_SESSION,\n },\n default: {\n message: AuthErrorStrings.DEFAULT_MSG,\n },\n};\n//# sourceMappingURL=Errors.js.map","/*\n * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n *\t http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { isUsernamePasswordOpts, isCognitoHostedOpts, isFederatedSignInOptions, isFederatedSignInOptionsCustom, hasCustomState, } from './types';\nimport { Amplify, ConsoleLogger as Logger, Credentials, Hub, StorageHelper, Parser, JS, UniversalStorage, urlSafeDecode, } from '@aws-amplify/core';\nimport { CookieStorage, CognitoUserPool, AuthenticationDetails, CognitoUser, CognitoUserSession, CognitoUserAttribute, CognitoIdToken, CognitoRefreshToken, CognitoAccessToken, } from 'amazon-cognito-identity-js';\nimport { parse } from 'url';\nimport OAuth from './OAuth/OAuth';\nimport { default as urlListener } from './urlListener';\nimport { AuthError, NoUserPoolError } from './Errors';\nimport { AuthErrorTypes, CognitoHostedUIIdentityProvider } from './types/Auth';\nvar logger = new Logger('AuthClass');\nvar USER_ADMIN_SCOPE = 'aws.cognito.signin.user.admin';\n// 10 sec, following this guide https://www.nngroup.com/articles/response-times-3-important-limits/\nvar OAUTH_FLOW_MS_TIMEOUT = 10 * 1000;\nvar AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined' &&\n typeof Symbol.for === 'function'\n ? Symbol.for('amplify_default')\n : '@@amplify_default');\nvar dispatchAuthEvent = function (event, data, message) {\n Hub.dispatch('auth', { event: event, data: data, message: message }, 'Auth', AMPLIFY_SYMBOL);\n};\n/**\n * Provide authentication steps\n */\nvar AuthClass = /** @class */ (function () {\n /**\n * Initialize Auth with AWS configurations\n * @param {Object} config - Configuration of the Auth\n */\n function AuthClass(config) {\n var _this = this;\n this.userPool = null;\n this.user = null;\n this.oAuthFlowInProgress = false;\n this.Credentials = Credentials;\n this.wrapRefreshSessionCallback = function (callback) {\n var wrapped = function (error, data) {\n if (data) {\n dispatchAuthEvent('tokenRefresh', undefined, \"New token retrieved\");\n }\n else {\n dispatchAuthEvent('tokenRefresh_failure', error, \"Failed to retrieve new token\");\n }\n return callback(error, data);\n };\n return wrapped;\n }; // prettier-ignore\n this.configure(config);\n this.currentCredentials = this.currentCredentials.bind(this);\n this.currentUserCredentials = this.currentUserCredentials.bind(this);\n Hub.listen('auth', function (_a) {\n var payload = _a.payload;\n var event = payload.event;\n switch (event) {\n case 'signIn':\n _this._storage.setItem('amplify-signin-with-hostedUI', 'false');\n break;\n case 'signOut':\n _this._storage.removeItem('amplify-signin-with-hostedUI');\n break;\n case 'cognitoHostedUI':\n _this._storage.setItem('amplify-signin-with-hostedUI', 'true');\n break;\n }\n });\n }\n AuthClass.prototype.getModuleName = function () {\n return 'Auth';\n };\n AuthClass.prototype.configure = function (config) {\n var _this = this;\n if (!config)\n return this._config || {};\n logger.debug('configure Auth');\n var conf = Object.assign({}, this._config, Parser.parseMobilehubConfig(config).Auth, config);\n this._config = conf;\n var _a = this._config, userPoolId = _a.userPoolId, userPoolWebClientId = _a.userPoolWebClientId, cookieStorage = _a.cookieStorage, oauth = _a.oauth, region = _a.region, identityPoolId = _a.identityPoolId, mandatorySignIn = _a.mandatorySignIn, refreshHandlers = _a.refreshHandlers, identityPoolRegion = _a.identityPoolRegion, clientMetadata = _a.clientMetadata, endpoint = _a.endpoint;\n if (!this._config.storage) {\n // backward compatability\n if (cookieStorage)\n this._storage = new CookieStorage(cookieStorage);\n else {\n this._storage = config.ssr\n ? new UniversalStorage()\n : new StorageHelper().getStorage();\n }\n }\n else {\n if (!this._isValidAuthStorage(this._config.storage)) {\n logger.error('The storage in the Auth config is not valid!');\n throw new Error('Empty storage object');\n }\n this._storage = this._config.storage;\n }\n this._storageSync = Promise.resolve();\n if (typeof this._storage['sync'] === 'function') {\n this._storageSync = this._storage['sync']();\n }\n if (userPoolId) {\n var userPoolData = {\n UserPoolId: userPoolId,\n ClientId: userPoolWebClientId,\n endpoint: endpoint,\n };\n userPoolData.Storage = this._storage;\n this.userPool = new CognitoUserPool(userPoolData, this.wrapRefreshSessionCallback);\n }\n this.Credentials.configure({\n mandatorySignIn: mandatorySignIn,\n region: identityPoolRegion || region,\n userPoolId: userPoolId,\n identityPoolId: identityPoolId,\n refreshHandlers: refreshHandlers,\n storage: this._storage,\n });\n // initialize cognitoauth client if hosted ui options provided\n // to keep backward compatibility:\n var cognitoHostedUIConfig = oauth\n ? isCognitoHostedOpts(this._config.oauth)\n ? oauth\n : oauth.awsCognito\n : undefined;\n if (cognitoHostedUIConfig) {\n var cognitoAuthParams = Object.assign({\n cognitoClientId: userPoolWebClientId,\n UserPoolId: userPoolId,\n domain: cognitoHostedUIConfig['domain'],\n scopes: cognitoHostedUIConfig['scope'],\n redirectSignIn: cognitoHostedUIConfig['redirectSignIn'],\n redirectSignOut: cognitoHostedUIConfig['redirectSignOut'],\n responseType: cognitoHostedUIConfig['responseType'],\n Storage: this._storage,\n urlOpener: cognitoHostedUIConfig['urlOpener'],\n clientMetadata: clientMetadata,\n }, cognitoHostedUIConfig['options']);\n this._oAuthHandler = new OAuth({\n scopes: cognitoAuthParams.scopes,\n config: cognitoAuthParams,\n cognitoClientId: cognitoAuthParams.cognitoClientId,\n });\n // **NOTE** - Remove this in a future major release as it is a breaking change\n // Prevents _handleAuthResponse from being called multiple times in Expo\n // See https://github.com/aws-amplify/amplify-js/issues/4388\n var usedResponseUrls_1 = {};\n urlListener(function (_a) {\n var url = _a.url;\n if (usedResponseUrls_1[url]) {\n return;\n }\n usedResponseUrls_1[url] = true;\n _this._handleAuthResponse(url);\n });\n }\n dispatchAuthEvent('configured', null, \"The Auth category has been configured successfully\");\n return this._config;\n };\n /**\n * Sign up with username, password and other attributes like phone, email\n * @param {String | object} params - The user attributes used for signin\n * @param {String[]} restOfAttrs - for the backward compatability\n * @return - A promise resolves callback data if success\n */\n AuthClass.prototype.signUp = function (params) {\n var _this = this;\n var restOfAttrs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n restOfAttrs[_i - 1] = arguments[_i];\n }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n var username = null;\n var password = null;\n var attributes = [];\n var validationData = null;\n var clientMetadata;\n if (params && typeof params === 'string') {\n username = params;\n password = restOfAttrs ? restOfAttrs[0] : null;\n var email = restOfAttrs ? restOfAttrs[1] : null;\n var phone_number = restOfAttrs ? restOfAttrs[2] : null;\n if (email)\n attributes.push(new CognitoUserAttribute({ Name: 'email', Value: email }));\n if (phone_number)\n attributes.push(new CognitoUserAttribute({\n Name: 'phone_number',\n Value: phone_number,\n }));\n }\n else if (params && typeof params === 'object') {\n username = params['username'];\n password = params['password'];\n if (params && params.clientMetadata) {\n clientMetadata = params.clientMetadata;\n }\n else if (this._config.clientMetadata) {\n clientMetadata = this._config.clientMetadata;\n }\n var attrs_1 = params['attributes'];\n if (attrs_1) {\n Object.keys(attrs_1).map(function (key) {\n attributes.push(new CognitoUserAttribute({ Name: key, Value: attrs_1[key] }));\n });\n }\n var validationDataObject_1 = params['validationData'];\n if (validationDataObject_1) {\n validationData = [];\n Object.keys(validationDataObject_1).map(function (key) {\n validationData.push(new CognitoUserAttribute({\n Name: key,\n Value: validationDataObject_1[key],\n }));\n });\n }\n }\n else {\n return this.rejectAuthError(AuthErrorTypes.SignUpError);\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n if (!password) {\n return this.rejectAuthError(AuthErrorTypes.EmptyPassword);\n }\n logger.debug('signUp attrs:', attributes);\n logger.debug('signUp validation data:', validationData);\n return new Promise(function (resolve, reject) {\n _this.userPool.signUp(username, password, attributes, validationData, function (err, data) {\n if (err) {\n dispatchAuthEvent('signUp_failure', err, username + \" failed to signup\");\n reject(err);\n }\n else {\n dispatchAuthEvent('signUp', data, username + \" has signed up successfully\");\n resolve(data);\n }\n }, clientMetadata);\n });\n };\n /**\n * Send the verification code to confirm sign up\n * @param {String} username - The username to be confirmed\n * @param {String} code - The verification code\n * @param {ConfirmSignUpOptions} options - other options for confirm signup\n * @return - A promise resolves callback data if success\n */\n AuthClass.prototype.confirmSignUp = function (username, code, options) {\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n if (!code) {\n return this.rejectAuthError(AuthErrorTypes.EmptyCode);\n }\n var user = this.createCognitoUser(username);\n var forceAliasCreation = options && typeof options.forceAliasCreation === 'boolean'\n ? options.forceAliasCreation\n : true;\n var clientMetadata;\n if (options && options.clientMetadata) {\n clientMetadata = options.clientMetadata;\n }\n else if (this._config.clientMetadata) {\n clientMetadata = this._config.clientMetadata;\n }\n return new Promise(function (resolve, reject) {\n user.confirmRegistration(code, forceAliasCreation, function (err, data) {\n if (err) {\n reject(err);\n }\n else {\n resolve(data);\n }\n }, clientMetadata);\n });\n };\n /**\n * Resend the verification code\n * @param {String} username - The username to be confirmed\n * @param {ClientMetadata} clientMetadata - Metadata to be passed to Cognito Lambda triggers\n * @return - A promise resolves code delivery details if successful\n */\n AuthClass.prototype.resendSignUp = function (username, clientMetadata) {\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n var user = this.createCognitoUser(username);\n return new Promise(function (resolve, reject) {\n user.resendConfirmationCode(function (err, data) {\n if (err) {\n reject(err);\n }\n else {\n resolve(data);\n }\n }, clientMetadata);\n });\n };\n /**\n * Sign in\n * @param {String | SignInOpts} usernameOrSignInOpts - The username to be signed in or the sign in options\n * @param {String} password - The password of the username\n * @return - A promise resolves the CognitoUser\n */\n AuthClass.prototype.signIn = function (usernameOrSignInOpts, pw, clientMetadata) {\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n var username = null;\n var password = null;\n var validationData = {};\n // for backward compatibility\n if (typeof usernameOrSignInOpts === 'string') {\n username = usernameOrSignInOpts;\n password = pw;\n }\n else if (isUsernamePasswordOpts(usernameOrSignInOpts)) {\n if (typeof pw !== 'undefined') {\n logger.warn('The password should be defined under the first parameter object!');\n }\n username = usernameOrSignInOpts.username;\n password = usernameOrSignInOpts.password;\n validationData = usernameOrSignInOpts.validationData;\n }\n else {\n return this.rejectAuthError(AuthErrorTypes.InvalidUsername);\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n var authDetails = new AuthenticationDetails({\n Username: username,\n Password: password,\n ValidationData: validationData,\n ClientMetadata: clientMetadata,\n });\n if (password) {\n return this.signInWithPassword(authDetails);\n }\n else {\n return this.signInWithoutPassword(authDetails);\n }\n };\n /**\n * Return an object with the authentication callbacks\n * @param {CognitoUser} user - the cognito user object\n * @param {} resolve - function called when resolving the current step\n * @param {} reject - function called when rejecting the current step\n * @return - an object with the callback methods for user authentication\n */\n AuthClass.prototype.authCallbacks = function (user, resolve, reject) {\n var _this = this;\n var that = this;\n return {\n onSuccess: function (session) { return __awaiter(_this, void 0, void 0, function () {\n var cred, e_1, currentUser, e_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug(session);\n delete user['challengeName'];\n delete user['challengeParam'];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, 5, 9]);\n return [4 /*yield*/, this.Credentials.clear()];\n case 2:\n _a.sent();\n return [4 /*yield*/, this.Credentials.set(session, 'session')];\n case 3:\n cred = _a.sent();\n logger.debug('succeed to get cognito credentials', cred);\n return [3 /*break*/, 9];\n case 4:\n e_1 = _a.sent();\n logger.debug('cannot get cognito credentials', e_1);\n return [3 /*break*/, 9];\n case 5:\n _a.trys.push([5, 7, , 8]);\n return [4 /*yield*/, this.currentUserPoolUser()];\n case 6:\n currentUser = _a.sent();\n that.user = currentUser;\n dispatchAuthEvent('signIn', currentUser, \"A user \" + user.getUsername() + \" has been signed in\");\n resolve(currentUser);\n return [3 /*break*/, 8];\n case 7:\n e_2 = _a.sent();\n logger.error('Failed to get the signed in user', e_2);\n reject(e_2);\n return [3 /*break*/, 8];\n case 8: return [7 /*endfinally*/];\n case 9: return [2 /*return*/];\n }\n });\n }); },\n onFailure: function (err) {\n logger.debug('signIn failure', err);\n dispatchAuthEvent('signIn_failure', err, user.getUsername() + \" failed to signin\");\n reject(err);\n },\n customChallenge: function (challengeParam) {\n logger.debug('signIn custom challenge answer required');\n user['challengeName'] = 'CUSTOM_CHALLENGE';\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n mfaRequired: function (challengeName, challengeParam) {\n logger.debug('signIn MFA required');\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n mfaSetup: function (challengeName, challengeParam) {\n logger.debug('signIn mfa setup', challengeName);\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n newPasswordRequired: function (userAttributes, requiredAttributes) {\n logger.debug('signIn new password');\n user['challengeName'] = 'NEW_PASSWORD_REQUIRED';\n user['challengeParam'] = {\n userAttributes: userAttributes,\n requiredAttributes: requiredAttributes,\n };\n resolve(user);\n },\n totpRequired: function (challengeName, challengeParam) {\n logger.debug('signIn totpRequired');\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n selectMFAType: function (challengeName, challengeParam) {\n logger.debug('signIn selectMFAType', challengeName);\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n };\n };\n /**\n * Sign in with a password\n * @private\n * @param {AuthenticationDetails} authDetails - the user sign in data\n * @return - A promise resolves the CognitoUser object if success or mfa required\n */\n AuthClass.prototype.signInWithPassword = function (authDetails) {\n var _this = this;\n if (this.pendingSignIn) {\n throw new Error('Pending sign-in attempt already in progress');\n }\n var user = this.createCognitoUser(authDetails.getUsername());\n this.pendingSignIn = new Promise(function (resolve, reject) {\n user.authenticateUser(authDetails, _this.authCallbacks(user, function (value) {\n _this.pendingSignIn = null;\n resolve(value);\n }, function (error) {\n _this.pendingSignIn = null;\n reject(error);\n }));\n });\n return this.pendingSignIn;\n };\n /**\n * Sign in without a password\n * @private\n * @param {AuthenticationDetails} authDetails - the user sign in data\n * @return - A promise resolves the CognitoUser object if success or mfa required\n */\n AuthClass.prototype.signInWithoutPassword = function (authDetails) {\n var _this = this;\n var user = this.createCognitoUser(authDetails.getUsername());\n user.setAuthenticationFlowType('CUSTOM_AUTH');\n return new Promise(function (resolve, reject) {\n user.initiateAuth(authDetails, _this.authCallbacks(user, resolve, reject));\n });\n };\n /**\n * This was previously used by an authenticated user to get MFAOptions,\n * but no longer returns a meaningful response. Refer to the documentation for\n * how to setup and use MFA: https://docs.amplify.aws/lib/auth/mfa/q/platform/js\n * @deprecated\n * @param {CognitoUser} user - the current user\n * @return - A promise resolves the current preferred mfa option if success\n */\n AuthClass.prototype.getMFAOptions = function (user) {\n return new Promise(function (res, rej) {\n user.getMFAOptions(function (err, mfaOptions) {\n if (err) {\n logger.debug('get MFA Options failed', err);\n rej(err);\n return;\n }\n logger.debug('get MFA options success', mfaOptions);\n res(mfaOptions);\n return;\n });\n });\n };\n /**\n * get preferred mfa method\n * @param {CognitoUser} user - the current cognito user\n * @param {GetPreferredMFAOpts} params - options for getting the current user preferred MFA\n */\n AuthClass.prototype.getPreferredMFA = function (user, params) {\n var _this = this;\n var that = this;\n return new Promise(function (res, rej) {\n var clientMetadata = _this._config.clientMetadata; // TODO: verify behavior if this is override during signIn\n var bypassCache = params ? params.bypassCache : false;\n user.getUserData(function (err, data) {\n if (err) {\n logger.debug('getting preferred mfa failed', err);\n rej(err);\n return;\n }\n var mfaType = that._getMfaTypeFromUserData(data);\n if (!mfaType) {\n rej('invalid MFA Type');\n return;\n }\n else {\n res(mfaType);\n return;\n }\n }, { bypassCache: bypassCache, clientMetadata: clientMetadata });\n });\n };\n AuthClass.prototype._getMfaTypeFromUserData = function (data) {\n var ret = null;\n var preferredMFA = data.PreferredMfaSetting;\n // if the user has used Auth.setPreferredMFA() to setup the mfa type\n // then the \"PreferredMfaSetting\" would exist in the response\n if (preferredMFA) {\n ret = preferredMFA;\n }\n else {\n // if mfaList exists but empty, then its noMFA\n var mfaList = data.UserMFASettingList;\n if (!mfaList) {\n // if SMS was enabled by using Auth.enableSMS(),\n // the response would contain MFAOptions\n // as for now Cognito only supports for SMS, so we will say it is 'SMS_MFA'\n // if it does not exist, then it should be NOMFA\n var MFAOptions = data.MFAOptions;\n if (MFAOptions) {\n ret = 'SMS_MFA';\n }\n else {\n ret = 'NOMFA';\n }\n }\n else if (mfaList.length === 0) {\n ret = 'NOMFA';\n }\n else {\n logger.debug('invalid case for getPreferredMFA', data);\n }\n }\n return ret;\n };\n AuthClass.prototype._getUserData = function (user, params) {\n return new Promise(function (res, rej) {\n user.getUserData(function (err, data) {\n if (err) {\n logger.debug('getting user data failed', err);\n rej(err);\n return;\n }\n else {\n res(data);\n return;\n }\n }, params);\n });\n };\n /**\n * set preferred MFA method\n * @param {CognitoUser} user - the current Cognito user\n * @param {string} mfaMethod - preferred mfa method\n * @return - A promise resolve if success\n */\n AuthClass.prototype.setPreferredMFA = function (user, mfaMethod) {\n return __awaiter(this, void 0, void 0, function () {\n var clientMetadata, userData, smsMfaSettings, totpMfaSettings, _a, mfaList, currentMFAType, that;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n clientMetadata = this._config.clientMetadata;\n return [4 /*yield*/, this._getUserData(user, {\n bypassCache: true,\n clientMetadata: clientMetadata,\n })];\n case 1:\n userData = _b.sent();\n smsMfaSettings = null;\n totpMfaSettings = null;\n _a = mfaMethod;\n switch (_a) {\n case 'TOTP' || 'SOFTWARE_TOKEN_MFA': return [3 /*break*/, 2];\n case 'SMS' || 'SMS_MFA': return [3 /*break*/, 3];\n case 'NOMFA': return [3 /*break*/, 4];\n }\n return [3 /*break*/, 6];\n case 2:\n totpMfaSettings = {\n PreferredMfa: true,\n Enabled: true,\n };\n return [3 /*break*/, 7];\n case 3:\n smsMfaSettings = {\n PreferredMfa: true,\n Enabled: true,\n };\n return [3 /*break*/, 7];\n case 4:\n mfaList = userData['UserMFASettingList'];\n return [4 /*yield*/, this._getMfaTypeFromUserData(userData)];\n case 5:\n currentMFAType = _b.sent();\n if (currentMFAType === 'NOMFA') {\n return [2 /*return*/, Promise.resolve('No change for mfa type')];\n }\n else if (currentMFAType === 'SMS_MFA') {\n smsMfaSettings = {\n PreferredMfa: false,\n Enabled: false,\n };\n }\n else if (currentMFAType === 'SOFTWARE_TOKEN_MFA') {\n totpMfaSettings = {\n PreferredMfa: false,\n Enabled: false,\n };\n }\n else {\n return [2 /*return*/, this.rejectAuthError(AuthErrorTypes.InvalidMFA)];\n }\n // if there is a UserMFASettingList in the response\n // we need to disable every mfa type in that list\n if (mfaList && mfaList.length !== 0) {\n // to disable SMS or TOTP if exists in that list\n mfaList.forEach(function (mfaType) {\n if (mfaType === 'SMS_MFA') {\n smsMfaSettings = {\n PreferredMfa: false,\n Enabled: false,\n };\n }\n else if (mfaType === 'SOFTWARE_TOKEN_MFA') {\n totpMfaSettings = {\n PreferredMfa: false,\n Enabled: false,\n };\n }\n });\n }\n return [3 /*break*/, 7];\n case 6:\n logger.debug('no validmfa method provided');\n return [2 /*return*/, this.rejectAuthError(AuthErrorTypes.NoMFA)];\n case 7:\n that = this;\n return [2 /*return*/, new Promise(function (res, rej) {\n user.setUserMfaPreference(smsMfaSettings, totpMfaSettings, function (err, result) {\n if (err) {\n logger.debug('Set user mfa preference error', err);\n return rej(err);\n }\n logger.debug('Set user mfa success', result);\n logger.debug('Caching the latest user data into local');\n // cache the latest result into user data\n user.getUserData(function (err, data) {\n if (err) {\n logger.debug('getting user data failed', err);\n return rej(err);\n }\n else {\n return res(result);\n }\n }, {\n bypassCache: true,\n clientMetadata: clientMetadata,\n });\n });\n })];\n }\n });\n });\n };\n /**\n * diable SMS\n * @deprecated\n * @param {CognitoUser} user - the current user\n * @return - A promise resolves is success\n */\n AuthClass.prototype.disableSMS = function (user) {\n return new Promise(function (res, rej) {\n user.disableMFA(function (err, data) {\n if (err) {\n logger.debug('disable mfa failed', err);\n rej(err);\n return;\n }\n logger.debug('disable mfa succeed', data);\n res(data);\n return;\n });\n });\n };\n /**\n * enable SMS\n * @deprecated\n * @param {CognitoUser} user - the current user\n * @return - A promise resolves is success\n */\n AuthClass.prototype.enableSMS = function (user) {\n return new Promise(function (res, rej) {\n user.enableMFA(function (err, data) {\n if (err) {\n logger.debug('enable mfa failed', err);\n rej(err);\n return;\n }\n logger.debug('enable mfa succeed', data);\n res(data);\n return;\n });\n });\n };\n /**\n * Setup TOTP\n * @param {CognitoUser} user - the current user\n * @return - A promise resolves with the secret code if success\n */\n AuthClass.prototype.setupTOTP = function (user) {\n return new Promise(function (res, rej) {\n user.associateSoftwareToken({\n onFailure: function (err) {\n logger.debug('associateSoftwareToken failed', err);\n rej(err);\n return;\n },\n associateSecretCode: function (secretCode) {\n logger.debug('associateSoftwareToken sucess', secretCode);\n res(secretCode);\n return;\n },\n });\n });\n };\n /**\n * verify TOTP setup\n * @param {CognitoUser} user - the current user\n * @param {string} challengeAnswer - challenge answer\n * @return - A promise resolves is success\n */\n AuthClass.prototype.verifyTotpToken = function (user, challengeAnswer) {\n logger.debug('verification totp token', user, challengeAnswer);\n return new Promise(function (res, rej) {\n user.verifySoftwareToken(challengeAnswer, 'My TOTP device', {\n onFailure: function (err) {\n logger.debug('verifyTotpToken failed', err);\n rej(err);\n return;\n },\n onSuccess: function (data) {\n dispatchAuthEvent('signIn', user, \"A user \" + user.getUsername() + \" has been signed in\");\n logger.debug('verifyTotpToken success', data);\n res(data);\n return;\n },\n });\n });\n };\n /**\n * Send MFA code to confirm sign in\n * @param {Object} user - The CognitoUser object\n * @param {String} code - The confirmation code\n */\n AuthClass.prototype.confirmSignIn = function (user, code, mfaType, clientMetadata) {\n var _this = this;\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n if (!code) {\n return this.rejectAuthError(AuthErrorTypes.EmptyCode);\n }\n var that = this;\n return new Promise(function (resolve, reject) {\n user.sendMFACode(code, {\n onSuccess: function (session) { return __awaiter(_this, void 0, void 0, function () {\n var cred, e_3;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug(session);\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, 5, 6]);\n return [4 /*yield*/, this.Credentials.clear()];\n case 2:\n _a.sent();\n return [4 /*yield*/, this.Credentials.set(session, 'session')];\n case 3:\n cred = _a.sent();\n logger.debug('succeed to get cognito credentials', cred);\n return [3 /*break*/, 6];\n case 4:\n e_3 = _a.sent();\n logger.debug('cannot get cognito credentials', e_3);\n return [3 /*break*/, 6];\n case 5:\n that.user = user;\n dispatchAuthEvent('signIn', user, \"A user \" + user.getUsername() + \" has been signed in\");\n resolve(user);\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n }); },\n onFailure: function (err) {\n logger.debug('confirm signIn failure', err);\n reject(err);\n },\n }, mfaType, clientMetadata);\n });\n };\n AuthClass.prototype.completeNewPassword = function (user, password, requiredAttributes, clientMetadata) {\n var _this = this;\n if (requiredAttributes === void 0) { requiredAttributes = {}; }\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n if (!password) {\n return this.rejectAuthError(AuthErrorTypes.EmptyPassword);\n }\n var that = this;\n return new Promise(function (resolve, reject) {\n user.completeNewPasswordChallenge(password, requiredAttributes, {\n onSuccess: function (session) { return __awaiter(_this, void 0, void 0, function () {\n var cred, e_4;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug(session);\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, 5, 6]);\n return [4 /*yield*/, this.Credentials.clear()];\n case 2:\n _a.sent();\n return [4 /*yield*/, this.Credentials.set(session, 'session')];\n case 3:\n cred = _a.sent();\n logger.debug('succeed to get cognito credentials', cred);\n return [3 /*break*/, 6];\n case 4:\n e_4 = _a.sent();\n logger.debug('cannot get cognito credentials', e_4);\n return [3 /*break*/, 6];\n case 5:\n that.user = user;\n dispatchAuthEvent('signIn', user, \"A user \" + user.getUsername() + \" has been signed in\");\n resolve(user);\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n }); },\n onFailure: function (err) {\n logger.debug('completeNewPassword failure', err);\n dispatchAuthEvent('completeNewPassword_failure', err, _this.user + \" failed to complete the new password flow\");\n reject(err);\n },\n mfaRequired: function (challengeName, challengeParam) {\n logger.debug('signIn MFA required');\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n mfaSetup: function (challengeName, challengeParam) {\n logger.debug('signIn mfa setup', challengeName);\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n totpRequired: function (challengeName, challengeParam) {\n logger.debug('signIn mfa setup', challengeName);\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n }, clientMetadata);\n });\n };\n /**\n * Send the answer to a custom challenge\n * @param {CognitoUser} user - The CognitoUser object\n * @param {String} challengeResponses - The confirmation code\n */\n AuthClass.prototype.sendCustomChallengeAnswer = function (user, challengeResponses, clientMetadata) {\n var _this = this;\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!challengeResponses) {\n return this.rejectAuthError(AuthErrorTypes.EmptyChallengeResponse);\n }\n var that = this;\n return new Promise(function (resolve, reject) {\n user.sendCustomChallengeAnswer(challengeResponses, _this.authCallbacks(user, resolve, reject), clientMetadata);\n });\n };\n /**\n * Update an authenticated users' attributes\n * @param {CognitoUser} - The currently logged in user object\n * @return {Promise}\n **/\n AuthClass.prototype.updateUserAttributes = function (user, attributes, clientMetadata) {\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n var attributeList = [];\n var that = this;\n return new Promise(function (resolve, reject) {\n that.userSession(user).then(function (session) {\n for (var key in attributes) {\n if (key !== 'sub' && key.indexOf('_verified') < 0) {\n var attr = {\n Name: key,\n Value: attributes[key],\n };\n attributeList.push(attr);\n }\n }\n user.updateAttributes(attributeList, function (err, result) {\n if (err) {\n return reject(err);\n }\n else {\n return resolve(result);\n }\n }, clientMetadata);\n });\n });\n };\n /**\n * Return user attributes\n * @param {Object} user - The CognitoUser object\n * @return - A promise resolves to user attributes if success\n */\n AuthClass.prototype.userAttributes = function (user) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.userSession(user).then(function (session) {\n user.getUserAttributes(function (err, attributes) {\n if (err) {\n reject(err);\n }\n else {\n resolve(attributes);\n }\n });\n });\n });\n };\n AuthClass.prototype.verifiedContact = function (user) {\n var that = this;\n return this.userAttributes(user).then(function (attributes) {\n var attrs = that.attributesToObject(attributes);\n var unverified = {};\n var verified = {};\n if (attrs['email']) {\n if (attrs['email_verified']) {\n verified['email'] = attrs['email'];\n }\n else {\n unverified['email'] = attrs['email'];\n }\n }\n if (attrs['phone_number']) {\n if (attrs['phone_number_verified']) {\n verified['phone_number'] = attrs['phone_number'];\n }\n else {\n unverified['phone_number'] = attrs['phone_number'];\n }\n }\n return {\n verified: verified,\n unverified: unverified,\n };\n });\n };\n /**\n * Get current authenticated user\n * @return - A promise resolves to current authenticated CognitoUser if success\n */\n AuthClass.prototype.currentUserPoolUser = function (params) {\n var _this = this;\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n return new Promise(function (res, rej) {\n _this._storageSync\n .then(function () { return __awaiter(_this, void 0, void 0, function () {\n var user, clientMetadata;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.isOAuthInProgress()) return [3 /*break*/, 2];\n logger.debug('OAuth signIn in progress, waiting for resolution...');\n return [4 /*yield*/, new Promise(function (res) {\n var timeoutId = setTimeout(function () {\n logger.debug('OAuth signIn in progress timeout');\n Hub.remove('auth', hostedUISignCallback);\n res();\n }, OAUTH_FLOW_MS_TIMEOUT);\n Hub.listen('auth', hostedUISignCallback);\n function hostedUISignCallback(_a) {\n var payload = _a.payload;\n var event = payload.event;\n if (event === 'cognitoHostedUI' ||\n event === 'cognitoHostedUI_failure') {\n logger.debug(\"OAuth signIn resolved: \" + event);\n clearTimeout(timeoutId);\n Hub.remove('auth', hostedUISignCallback);\n res();\n }\n }\n })];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n user = this.userPool.getCurrentUser();\n if (!user) {\n logger.debug('Failed to get user from user pool');\n rej('No current user');\n return [2 /*return*/];\n }\n clientMetadata = this._config.clientMetadata;\n // refresh the session if the session expired.\n user.getSession(function (err, session) { return __awaiter(_this, void 0, void 0, function () {\n var bypassCache, clientMetadata, _a, scope;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (err) {\n logger.debug('Failed to get the user session', err);\n rej(err);\n return [2 /*return*/];\n }\n bypassCache = params ? params.bypassCache : false;\n if (!bypassCache) return [3 /*break*/, 2];\n return [4 /*yield*/, this.Credentials.clear()];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n clientMetadata = this._config.clientMetadata;\n _a = session.getAccessToken().decodePayload().scope, scope = _a === void 0 ? '' : _a;\n if (scope.split(' ').includes(USER_ADMIN_SCOPE)) {\n user.getUserData(function (err, data) {\n if (err) {\n logger.debug('getting user data failed', err);\n // Make sure the user is still valid\n if (err.message === 'User is disabled.' ||\n err.message === 'User does not exist.' ||\n err.message === 'Access Token has been revoked' // Session revoked by another app\n ) {\n rej(err);\n }\n else {\n // the error may also be thrown when lack of permissions to get user info etc\n // in that case we just bypass the error\n res(user);\n }\n return;\n }\n var preferredMFA = data.PreferredMfaSetting || 'NOMFA';\n var attributeList = [];\n for (var i = 0; i < data.UserAttributes.length; i++) {\n var attribute = {\n Name: data.UserAttributes[i].Name,\n Value: data.UserAttributes[i].Value,\n };\n var userAttribute = new CognitoUserAttribute(attribute);\n attributeList.push(userAttribute);\n }\n var attributes = _this.attributesToObject(attributeList);\n Object.assign(user, { attributes: attributes, preferredMFA: preferredMFA });\n return res(user);\n }, { bypassCache: bypassCache, clientMetadata: clientMetadata });\n }\n else {\n logger.debug(\"Unable to get the user data because the \" + USER_ADMIN_SCOPE + \" \" +\n \"is not in the scopes of the access token\");\n return [2 /*return*/, res(user)];\n }\n return [2 /*return*/];\n }\n });\n }); }, { clientMetadata: clientMetadata });\n return [2 /*return*/];\n }\n });\n }); })\n .catch(function (e) {\n logger.debug('Failed to sync cache info into memory', e);\n return rej(e);\n });\n });\n };\n AuthClass.prototype.isOAuthInProgress = function () {\n return this.oAuthFlowInProgress;\n };\n /**\n * Get current authenticated user\n * @param {CurrentUserOpts} - options for getting the current user\n * @return - A promise resolves to current authenticated CognitoUser if success\n */\n AuthClass.prototype.currentAuthenticatedUser = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n var federatedUser, e_5, federatedInfo, user, e_6;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug('getting current authenticated user');\n federatedUser = null;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this._storageSync];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n e_5 = _a.sent();\n logger.debug('Failed to sync cache info into memory', e_5);\n throw e_5;\n case 4:\n try {\n federatedInfo = JSON.parse(this._storage.getItem('aws-amplify-federatedInfo'));\n if (federatedInfo) {\n federatedUser = __assign(__assign({}, federatedInfo.user), { token: federatedInfo.token });\n }\n }\n catch (e) {\n logger.debug('cannot load federated user from auth storage');\n }\n if (!federatedUser) return [3 /*break*/, 5];\n this.user = federatedUser;\n logger.debug('get current authenticated federated user', this.user);\n return [2 /*return*/, this.user];\n case 5:\n logger.debug('get current authenticated userpool user');\n user = null;\n _a.label = 6;\n case 6:\n _a.trys.push([6, 8, , 9]);\n return [4 /*yield*/, this.currentUserPoolUser(params)];\n case 7:\n user = _a.sent();\n return [3 /*break*/, 9];\n case 8:\n e_6 = _a.sent();\n if (e_6 === 'No userPool') {\n logger.error('Cannot get the current user because the user pool is missing. ' +\n 'Please make sure the Auth module is configured with a valid Cognito User Pool ID');\n }\n logger.debug('The user is not authenticated by the error', e_6);\n return [2 /*return*/, Promise.reject('The user is not authenticated')];\n case 9:\n this.user = user;\n return [2 /*return*/, this.user];\n }\n });\n });\n };\n /**\n * Get current user's session\n * @return - A promise resolves to session object if success\n */\n AuthClass.prototype.currentSession = function () {\n var that = this;\n logger.debug('Getting current session');\n // Purposely not calling the reject method here because we don't need a console error\n if (!this.userPool) {\n return Promise.reject();\n }\n return new Promise(function (res, rej) {\n that\n .currentUserPoolUser()\n .then(function (user) {\n that\n .userSession(user)\n .then(function (session) {\n res(session);\n return;\n })\n .catch(function (e) {\n logger.debug('Failed to get the current session', e);\n rej(e);\n return;\n });\n })\n .catch(function (e) {\n logger.debug('Failed to get the current user', e);\n rej(e);\n return;\n });\n });\n };\n /**\n * Get the corresponding user session\n * @param {Object} user - The CognitoUser object\n * @return - A promise resolves to the session\n */\n AuthClass.prototype.userSession = function (user) {\n if (!user) {\n logger.debug('the user is null');\n return this.rejectAuthError(AuthErrorTypes.NoUserSession);\n }\n var clientMetadata = this._config.clientMetadata; // TODO: verify behavior if this is override during signIn\n return new Promise(function (resolve, reject) {\n logger.debug('Getting the session from this user:', user);\n user.getSession(function (err, session) {\n if (err) {\n logger.debug('Failed to get the session from user', user);\n reject(err);\n return;\n }\n else {\n logger.debug('Succeed to get the user session', session);\n resolve(session);\n return;\n }\n }, { clientMetadata: clientMetadata });\n });\n };\n /**\n * Get authenticated credentials of current user.\n * @return - A promise resolves to be current user's credentials\n */\n AuthClass.prototype.currentUserCredentials = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_7, federatedInfo;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug('Getting current user credentials');\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this._storageSync];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n e_7 = _a.sent();\n logger.debug('Failed to sync cache info into memory', e_7);\n throw e_7;\n case 4:\n federatedInfo = null;\n try {\n federatedInfo = JSON.parse(this._storage.getItem('aws-amplify-federatedInfo'));\n }\n catch (e) {\n logger.debug('failed to get or parse item aws-amplify-federatedInfo', e);\n }\n if (federatedInfo) {\n // refresh the jwt token here if necessary\n return [2 /*return*/, this.Credentials.refreshFederatedToken(federatedInfo)];\n }\n else {\n return [2 /*return*/, this.currentSession()\n .then(function (session) {\n logger.debug('getting session success', session);\n return _this.Credentials.set(session, 'session');\n })\n .catch(function (error) {\n logger.debug('getting session failed', error);\n return _this.Credentials.set(null, 'guest');\n })];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n AuthClass.prototype.currentCredentials = function () {\n logger.debug('getting current credentials');\n return this.Credentials.get();\n };\n /**\n * Initiate an attribute confirmation request\n * @param {Object} user - The CognitoUser\n * @param {Object} attr - The attributes to be verified\n * @return - A promise resolves to callback data if success\n */\n AuthClass.prototype.verifyUserAttribute = function (user, attr, clientMetadata) {\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n return new Promise(function (resolve, reject) {\n user.getAttributeVerificationCode(attr, {\n onSuccess: function () {\n return resolve();\n },\n onFailure: function (err) {\n return reject(err);\n },\n }, clientMetadata);\n });\n };\n /**\n * Confirm an attribute using a confirmation code\n * @param {Object} user - The CognitoUser\n * @param {Object} attr - The attribute to be verified\n * @param {String} code - The confirmation code\n * @return - A promise resolves to callback data if success\n */\n AuthClass.prototype.verifyUserAttributeSubmit = function (user, attr, code) {\n if (!code) {\n return this.rejectAuthError(AuthErrorTypes.EmptyCode);\n }\n return new Promise(function (resolve, reject) {\n user.verifyAttribute(attr, code, {\n onSuccess: function (data) {\n resolve(data);\n return;\n },\n onFailure: function (err) {\n reject(err);\n return;\n },\n });\n });\n };\n AuthClass.prototype.verifyCurrentUserAttribute = function (attr) {\n var that = this;\n return that\n .currentUserPoolUser()\n .then(function (user) { return that.verifyUserAttribute(user, attr); });\n };\n /**\n * Confirm current user's attribute using a confirmation code\n * @param {Object} attr - The attribute to be verified\n * @param {String} code - The confirmation code\n * @return - A promise resolves to callback data if success\n */\n AuthClass.prototype.verifyCurrentUserAttributeSubmit = function (attr, code) {\n var that = this;\n return that\n .currentUserPoolUser()\n .then(function (user) { return that.verifyUserAttributeSubmit(user, attr, code); });\n };\n AuthClass.prototype.cognitoIdentitySignOut = function (opts, user) {\n return __awaiter(this, void 0, void 0, function () {\n var e_8, isSignedInHostedUI;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this._storageSync];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n e_8 = _a.sent();\n logger.debug('Failed to sync cache info into memory', e_8);\n throw e_8;\n case 3:\n isSignedInHostedUI = this._oAuthHandler &&\n this._storage.getItem('amplify-signin-with-hostedUI') === 'true';\n return [2 /*return*/, new Promise(function (res, rej) {\n if (opts && opts.global) {\n logger.debug('user global sign out', user);\n // in order to use global signout\n // we must validate the user as an authenticated user by using getSession\n var clientMetadata = _this._config.clientMetadata; // TODO: verify behavior if this is override during signIn\n user.getSession(function (err, result) {\n if (err) {\n logger.debug('failed to get the user session', err);\n return rej(err);\n }\n user.globalSignOut({\n onSuccess: function (data) {\n logger.debug('global sign out success');\n if (isSignedInHostedUI) {\n _this.oAuthSignOutRedirect(res, rej);\n }\n else {\n return res();\n }\n },\n onFailure: function (err) {\n logger.debug('global sign out failed', err);\n return rej(err);\n },\n });\n }, { clientMetadata: clientMetadata });\n }\n else {\n logger.debug('user sign out', user);\n user.signOut();\n if (isSignedInHostedUI) {\n _this.oAuthSignOutRedirect(res, rej);\n }\n else {\n return res();\n }\n }\n })];\n }\n });\n });\n };\n AuthClass.prototype.oAuthSignOutRedirect = function (resolve, reject) {\n var isBrowser = JS.browserOrNode().isBrowser;\n if (isBrowser) {\n this.oAuthSignOutRedirectOrReject(reject);\n }\n else {\n this.oAuthSignOutAndResolve(resolve);\n }\n };\n AuthClass.prototype.oAuthSignOutAndResolve = function (resolve) {\n this._oAuthHandler.signOut();\n resolve();\n };\n AuthClass.prototype.oAuthSignOutRedirectOrReject = function (reject) {\n this._oAuthHandler.signOut(); // this method redirects url\n // App should be redirected to another url otherwise it will reject\n setTimeout(function () { return reject('Signout timeout fail'); }, 3000);\n };\n /**\n * Sign out method\n * @\n * @return - A promise resolved if success\n */\n AuthClass.prototype.signOut = function (opts) {\n return __awaiter(this, void 0, void 0, function () {\n var e_9, user;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.cleanCachedItems()];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n e_9 = _a.sent();\n logger.debug('failed to clear cached items');\n return [3 /*break*/, 3];\n case 3:\n if (!this.userPool) return [3 /*break*/, 7];\n user = this.userPool.getCurrentUser();\n if (!user) return [3 /*break*/, 5];\n return [4 /*yield*/, this.cognitoIdentitySignOut(opts, user)];\n case 4:\n _a.sent();\n return [3 /*break*/, 6];\n case 5:\n logger.debug('no current Cognito user');\n _a.label = 6;\n case 6: return [3 /*break*/, 8];\n case 7:\n logger.debug('no Congito User pool');\n _a.label = 8;\n case 8:\n /**\n * Note for future refactor - no reliable way to get username with\n * Cognito User Pools vs Identity when federating with Social Providers\n * This is why we need a well structured session object that can be inspected\n * and information passed back in the message below for Hub dispatch\n */\n dispatchAuthEvent('signOut', this.user, \"A user has been signed out\");\n this.user = null;\n return [2 /*return*/];\n }\n });\n });\n };\n AuthClass.prototype.cleanCachedItems = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: \n // clear cognito cached item\n return [4 /*yield*/, this.Credentials.clear()];\n case 1:\n // clear cognito cached item\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Change a password for an authenticated user\n * @param {Object} user - The CognitoUser object\n * @param {String} oldPassword - the current password\n * @param {String} newPassword - the requested new password\n * @return - A promise resolves if success\n */\n AuthClass.prototype.changePassword = function (user, oldPassword, newPassword, clientMetadata) {\n var _this = this;\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n return new Promise(function (resolve, reject) {\n _this.userSession(user).then(function (session) {\n user.changePassword(oldPassword, newPassword, function (err, data) {\n if (err) {\n logger.debug('change password failure', err);\n return reject(err);\n }\n else {\n return resolve(data);\n }\n }, clientMetadata);\n });\n });\n };\n /**\n * Initiate a forgot password request\n * @param {String} username - the username to change password\n * @return - A promise resolves if success\n */\n AuthClass.prototype.forgotPassword = function (username, clientMetadata) {\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n var user = this.createCognitoUser(username);\n return new Promise(function (resolve, reject) {\n user.forgotPassword({\n onSuccess: function () {\n resolve();\n return;\n },\n onFailure: function (err) {\n logger.debug('forgot password failure', err);\n dispatchAuthEvent('forgotPassword_failure', err, username + \" forgotPassword failed\");\n reject(err);\n return;\n },\n inputVerificationCode: function (data) {\n dispatchAuthEvent('forgotPassword', user, username + \" has initiated forgot password flow\");\n resolve(data);\n return;\n },\n }, clientMetadata);\n });\n };\n /**\n * Confirm a new password using a confirmation Code\n * @param {String} username - The username\n * @param {String} code - The confirmation code\n * @param {String} password - The new password\n * @return - A promise that resolves if success\n */\n AuthClass.prototype.forgotPasswordSubmit = function (username, code, password, clientMetadata) {\n if (clientMetadata === void 0) { clientMetadata = this._config.clientMetadata; }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n if (!code) {\n return this.rejectAuthError(AuthErrorTypes.EmptyCode);\n }\n if (!password) {\n return this.rejectAuthError(AuthErrorTypes.EmptyPassword);\n }\n var user = this.createCognitoUser(username);\n return new Promise(function (resolve, reject) {\n user.confirmPassword(code, password, {\n onSuccess: function () {\n dispatchAuthEvent('forgotPasswordSubmit', user, username + \" forgotPasswordSubmit successful\");\n resolve();\n return;\n },\n onFailure: function (err) {\n dispatchAuthEvent('forgotPasswordSubmit_failure', err, username + \" forgotPasswordSubmit failed\");\n reject(err);\n return;\n },\n }, clientMetadata);\n });\n };\n /**\n * Get user information\n * @async\n * @return {Object }- current User's information\n */\n AuthClass.prototype.currentUserInfo = function () {\n return __awaiter(this, void 0, void 0, function () {\n var source, user, attributes, userAttrs, credentials, e_10, info, err_1, user;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n source = this.Credentials.getCredSource();\n if (!(!source || source === 'aws' || source === 'userPool')) return [3 /*break*/, 9];\n return [4 /*yield*/, this.currentUserPoolUser().catch(function (err) {\n return logger.debug(err);\n })];\n case 1:\n user = _a.sent();\n if (!user) {\n return [2 /*return*/, null];\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 8, , 9]);\n return [4 /*yield*/, this.userAttributes(user)];\n case 3:\n attributes = _a.sent();\n userAttrs = this.attributesToObject(attributes);\n credentials = null;\n _a.label = 4;\n case 4:\n _a.trys.push([4, 6, , 7]);\n return [4 /*yield*/, this.currentCredentials()];\n case 5:\n credentials = _a.sent();\n return [3 /*break*/, 7];\n case 6:\n e_10 = _a.sent();\n logger.debug('Failed to retrieve credentials while getting current user info', e_10);\n return [3 /*break*/, 7];\n case 7:\n info = {\n id: credentials ? credentials.identityId : undefined,\n username: user.getUsername(),\n attributes: userAttrs,\n };\n return [2 /*return*/, info];\n case 8:\n err_1 = _a.sent();\n logger.debug('currentUserInfo error', err_1);\n return [2 /*return*/, {}];\n case 9:\n if (source === 'federated') {\n user = this.user;\n return [2 /*return*/, user ? user : {}];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n AuthClass.prototype.federatedSignIn = function (providerOrOptions, response, user) {\n return __awaiter(this, void 0, void 0, function () {\n var options, provider, customState, client_id, redirect_uri, provider, loggedInUser, token, identity_id, expires_at, credentials, currentUser;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._config.identityPoolId && !this._config.userPoolId) {\n throw new Error(\"Federation requires either a User Pool or Identity Pool in config\");\n }\n // Ensure backwards compatability\n if (typeof providerOrOptions === 'undefined') {\n if (this._config.identityPoolId && !this._config.userPoolId) {\n throw new Error(\"Federation with Identity Pools requires tokens passed as arguments\");\n }\n }\n if (!(isFederatedSignInOptions(providerOrOptions) ||\n isFederatedSignInOptionsCustom(providerOrOptions) ||\n hasCustomState(providerOrOptions) ||\n typeof providerOrOptions === 'undefined')) return [3 /*break*/, 1];\n options = providerOrOptions || {\n provider: CognitoHostedUIIdentityProvider.Cognito,\n };\n provider = isFederatedSignInOptions(options)\n ? options.provider\n : options.customProvider;\n customState = isFederatedSignInOptions(options)\n ? options.customState\n : options.customState;\n if (this._config.userPoolId) {\n client_id = isCognitoHostedOpts(this._config.oauth)\n ? this._config.userPoolWebClientId\n : this._config.oauth.clientID;\n redirect_uri = isCognitoHostedOpts(this._config.oauth)\n ? this._config.oauth.redirectSignIn\n : this._config.oauth.redirectUri;\n this._oAuthHandler.oauthSignIn(this._config.oauth.responseType, this._config.oauth.domain, redirect_uri, client_id, provider, customState);\n }\n return [3 /*break*/, 4];\n case 1:\n provider = providerOrOptions;\n // To check if the user is already logged in\n try {\n loggedInUser = JSON.stringify(JSON.parse(this._storage.getItem('aws-amplify-federatedInfo')).user);\n if (loggedInUser) {\n logger.warn(\"There is already a signed in user: \" + loggedInUser + \" in your app.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.\");\n }\n }\n catch (e) { }\n token = response.token, identity_id = response.identity_id, expires_at = response.expires_at;\n return [4 /*yield*/, this.Credentials.set({ provider: provider, token: token, identity_id: identity_id, user: user, expires_at: expires_at }, 'federation')];\n case 2:\n credentials = _a.sent();\n return [4 /*yield*/, this.currentAuthenticatedUser()];\n case 3:\n currentUser = _a.sent();\n dispatchAuthEvent('signIn', currentUser, \"A user \" + currentUser.username + \" has been signed in\");\n logger.debug('federated sign in credentials', credentials);\n return [2 /*return*/, credentials];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Used to complete the OAuth flow with or without the Cognito Hosted UI\n * @param {String} URL - optional parameter for customers to pass in the response URL\n */\n AuthClass.prototype._handleAuthResponse = function (URL) {\n return __awaiter(this, void 0, void 0, function () {\n var currentUrl, hasCodeOrError, hasTokenOrError, _a, accessToken, idToken, refreshToken, state, session, credentials, isCustomStateIncluded, currentUser, customState, err_2;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (this.oAuthFlowInProgress) {\n logger.debug(\"Skipping URL \" + URL + \" current flow in progress\");\n return [2 /*return*/];\n }\n _b.label = 1;\n case 1:\n _b.trys.push([1, , 8, 9]);\n this.oAuthFlowInProgress = true;\n if (!this._config.userPoolId) {\n throw new Error(\"OAuth responses require a User Pool defined in config\");\n }\n dispatchAuthEvent('parsingCallbackUrl', { url: URL }, \"The callback url is being parsed\");\n currentUrl = URL || (JS.browserOrNode().isBrowser ? window.location.href : '');\n hasCodeOrError = !!(parse(currentUrl).query || '')\n .split('&')\n .map(function (entry) { return entry.split('='); })\n .find(function (_a) {\n var _b = __read(_a, 1), k = _b[0];\n return k === 'code' || k === 'error';\n });\n hasTokenOrError = !!(parse(currentUrl).hash || '#')\n .substr(1)\n .split('&')\n .map(function (entry) { return entry.split('='); })\n .find(function (_a) {\n var _b = __read(_a, 1), k = _b[0];\n return k === 'access_token' || k === 'error';\n });\n if (!(hasCodeOrError || hasTokenOrError)) return [3 /*break*/, 7];\n this._storage.setItem('amplify-redirected-from-hosted-ui', 'true');\n _b.label = 2;\n case 2:\n _b.trys.push([2, 6, , 7]);\n return [4 /*yield*/, this._oAuthHandler.handleAuthResponse(currentUrl)];\n case 3:\n _a = _b.sent(), accessToken = _a.accessToken, idToken = _a.idToken, refreshToken = _a.refreshToken, state = _a.state;\n session = new CognitoUserSession({\n IdToken: new CognitoIdToken({ IdToken: idToken }),\n RefreshToken: new CognitoRefreshToken({\n RefreshToken: refreshToken,\n }),\n AccessToken: new CognitoAccessToken({\n AccessToken: accessToken,\n }),\n });\n credentials = void 0;\n if (!this._config.identityPoolId) return [3 /*break*/, 5];\n return [4 /*yield*/, this.Credentials.set(session, 'session')];\n case 4:\n credentials = _b.sent();\n logger.debug('AWS credentials', credentials);\n _b.label = 5;\n case 5:\n isCustomStateIncluded = /-/.test(state);\n currentUser = this.createCognitoUser(session.getIdToken().decodePayload()['cognito:username']);\n // This calls cacheTokens() in Cognito SDK\n currentUser.setSignInUserSession(session);\n if (window && typeof window.history !== 'undefined') {\n window.history.replaceState({}, null, this._config.oauth.redirectSignIn);\n }\n dispatchAuthEvent('signIn', currentUser, \"A user \" + currentUser.getUsername() + \" has been signed in\");\n dispatchAuthEvent('cognitoHostedUI', currentUser, \"A user \" + currentUser.getUsername() + \" has been signed in via Cognito Hosted UI\");\n if (isCustomStateIncluded) {\n customState = state\n .split('-')\n .splice(1)\n .join('-');\n dispatchAuthEvent('customOAuthState', urlSafeDecode(customState), \"State for user \" + currentUser.getUsername());\n }\n //#endregion\n return [2 /*return*/, credentials];\n case 6:\n err_2 = _b.sent();\n logger.debug('Error in cognito hosted auth response', err_2);\n dispatchAuthEvent('signIn_failure', err_2, \"The OAuth response flow failed\");\n dispatchAuthEvent('cognitoHostedUI_failure', err_2, \"A failure occurred when returning to the Cognito Hosted UI\");\n dispatchAuthEvent('customState_failure', err_2, \"A failure occurred when returning state\");\n return [3 /*break*/, 7];\n case 7: return [3 /*break*/, 9];\n case 8:\n this.oAuthFlowInProgress = false;\n return [7 /*endfinally*/];\n case 9: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Compact version of credentials\n * @param {Object} credentials\n * @return {Object} - Credentials\n */\n AuthClass.prototype.essentialCredentials = function (credentials) {\n return {\n accessKeyId: credentials.accessKeyId,\n sessionToken: credentials.sessionToken,\n secretAccessKey: credentials.secretAccessKey,\n identityId: credentials.identityId,\n authenticated: credentials.authenticated,\n };\n };\n AuthClass.prototype.attributesToObject = function (attributes) {\n var _this = this;\n var obj = {};\n if (attributes) {\n attributes.map(function (attribute) {\n if (attribute.Name === 'email_verified' ||\n attribute.Name === 'phone_number_verified') {\n obj[attribute.Name] = _this.isTruthyString(attribute.Value) || attribute.Value === true;\n }\n else {\n obj[attribute.Name] = attribute.Value;\n }\n });\n }\n return obj;\n };\n AuthClass.prototype.isTruthyString = function (value) {\n return typeof value.toLowerCase === 'function' && value.toLowerCase() === 'true';\n };\n AuthClass.prototype.createCognitoUser = function (username) {\n var userData = {\n Username: username,\n Pool: this.userPool,\n };\n userData.Storage = this._storage;\n var authenticationFlowType = this._config.authenticationFlowType;\n var user = new CognitoUser(userData);\n if (authenticationFlowType) {\n user.setAuthenticationFlowType(authenticationFlowType);\n }\n return user;\n };\n AuthClass.prototype._isValidAuthStorage = function (obj) {\n // We need to check if the obj has the functions of Storage\n return (!!obj &&\n typeof obj.getItem === 'function' &&\n typeof obj.setItem === 'function' &&\n typeof obj.removeItem === 'function' &&\n typeof obj.clear === 'function');\n };\n AuthClass.prototype.noUserPoolErrorHandler = function (config) {\n if (config) {\n if (!config.userPoolId || !config.identityPoolId) {\n return AuthErrorTypes.MissingAuthConfig;\n }\n }\n return AuthErrorTypes.NoConfig;\n };\n AuthClass.prototype.rejectAuthError = function (type) {\n return Promise.reject(new AuthError(type));\n };\n AuthClass.prototype.rejectNoUserPool = function () {\n var type = this.noUserPoolErrorHandler(this._config);\n return Promise.reject(new NoUserPoolError(type));\n };\n return AuthClass;\n}());\nexport { AuthClass };\nexport var Auth = new AuthClass(null);\nAmplify.register(Auth);\n//# sourceMappingURL=Auth.js.map","/*\n * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { JS } from '@aws-amplify/core';\nexport default (function (callback) {\n if (JS.browserOrNode().isBrowser && window.location) {\n var url = window.location.href;\n callback({ url: url });\n }\n else if (JS.browserOrNode().isNode) {\n // continue building on ssr\n (function () { }); // noop\n }\n else {\n throw new Error('Not supported');\n }\n});\n//# sourceMappingURL=urlListener.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { ConsoleLogger as LoggerClass } from './Logger';\nvar logger = new LoggerClass('Amplify');\nvar AmplifyClass = /** @class */ (function () {\n function AmplifyClass() {\n // Everything that is `register`ed is tracked here\n this._components = [];\n this._config = {};\n // All modules (with `getModuleName()`) are stored here for dependency injection\n this._modules = {};\n // for backward compatibility to avoid breaking change\n // if someone is using like Amplify.Auth\n this.Auth = null;\n this.Analytics = null;\n this.API = null;\n this.Credentials = null;\n this.Storage = null;\n this.I18n = null;\n this.Cache = null;\n this.PubSub = null;\n this.Interactions = null;\n this.Pushnotification = null;\n this.UI = null;\n this.XR = null;\n this.Predictions = null;\n this.DataStore = null;\n this.Logger = LoggerClass;\n this.ServiceWorker = null;\n }\n AmplifyClass.prototype.register = function (comp) {\n logger.debug('component registered in amplify', comp);\n this._components.push(comp);\n if (typeof comp.getModuleName === 'function') {\n this._modules[comp.getModuleName()] = comp;\n this[comp.getModuleName()] = comp;\n }\n else {\n logger.debug('no getModuleName method for component', comp);\n }\n // Finally configure this new component(category) loaded\n // With the new modularization changes in Amplify V3, all the Amplify\n // component are not loaded/registered right away but when they are\n // imported (and hence instantiated) in the client's app. This ensures\n // that all new components imported get correctly configured with the\n // configuration that Amplify.configure() was called with.\n comp.configure(this._config);\n };\n AmplifyClass.prototype.configure = function (config) {\n var _this = this;\n if (!config)\n return this._config;\n this._config = Object.assign(this._config, config);\n logger.debug('amplify config', this._config);\n // Dependency Injection via property-setting.\n // This avoids introducing a public method/interface/setter that's difficult to remove later.\n // Plus, it reduces `if` statements within the `constructor` and `configure` of each module\n Object.entries(this._modules).forEach(function (_a) {\n var _b = __read(_a, 2), Name = _b[0], comp = _b[1];\n // e.g. Auth.*\n Object.keys(comp).forEach(function (property) {\n // e.g. Auth[\"Credentials\"] = this._modules[\"Credentials\"] when set\n if (_this._modules[property]) {\n comp[property] = _this._modules[property];\n }\n });\n });\n this._components.map(function (comp) {\n comp.configure(_this._config);\n });\n return this._config;\n };\n AmplifyClass.prototype.addPluggable = function (pluggable) {\n if (pluggable &&\n pluggable['getCategory'] &&\n typeof pluggable['getCategory'] === 'function') {\n this._components.map(function (comp) {\n if (comp['addPluggable'] &&\n typeof comp['addPluggable'] === 'function') {\n comp.addPluggable(pluggable);\n }\n });\n }\n };\n return AmplifyClass;\n}());\nexport { AmplifyClass };\nexport var Amplify = new AmplifyClass();\n/**\n * @deprecated use named import\n */\nexport default Amplify;\n//# sourceMappingURL=Amplify.js.map","import { __assign } from \"tslib\";\nexport var AmbiguousRoleResolutionType;\n(function (AmbiguousRoleResolutionType) {\n AmbiguousRoleResolutionType[\"AUTHENTICATED_ROLE\"] = \"AuthenticatedRole\";\n AmbiguousRoleResolutionType[\"DENY\"] = \"Deny\";\n})(AmbiguousRoleResolutionType || (AmbiguousRoleResolutionType = {}));\nexport var CognitoIdentityProvider;\n(function (CognitoIdentityProvider) {\n CognitoIdentityProvider.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(CognitoIdentityProvider || (CognitoIdentityProvider = {}));\nexport var CreateIdentityPoolInput;\n(function (CreateIdentityPoolInput) {\n CreateIdentityPoolInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(CreateIdentityPoolInput || (CreateIdentityPoolInput = {}));\nexport var IdentityPool;\n(function (IdentityPool) {\n IdentityPool.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(IdentityPool || (IdentityPool = {}));\nexport var InternalErrorException;\n(function (InternalErrorException) {\n InternalErrorException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(InternalErrorException || (InternalErrorException = {}));\nexport var InvalidParameterException;\n(function (InvalidParameterException) {\n InvalidParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(InvalidParameterException || (InvalidParameterException = {}));\nexport var LimitExceededException;\n(function (LimitExceededException) {\n LimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(LimitExceededException || (LimitExceededException = {}));\nexport var NotAuthorizedException;\n(function (NotAuthorizedException) {\n NotAuthorizedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(NotAuthorizedException || (NotAuthorizedException = {}));\nexport var ResourceConflictException;\n(function (ResourceConflictException) {\n ResourceConflictException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ResourceConflictException || (ResourceConflictException = {}));\nexport var TooManyRequestsException;\n(function (TooManyRequestsException) {\n TooManyRequestsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(TooManyRequestsException || (TooManyRequestsException = {}));\nexport var DeleteIdentitiesInput;\n(function (DeleteIdentitiesInput) {\n DeleteIdentitiesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DeleteIdentitiesInput || (DeleteIdentitiesInput = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ErrorCode[\"ACCESS_DENIED\"] = \"AccessDenied\";\n ErrorCode[\"INTERNAL_SERVER_ERROR\"] = \"InternalServerError\";\n})(ErrorCode || (ErrorCode = {}));\nexport var UnprocessedIdentityId;\n(function (UnprocessedIdentityId) {\n UnprocessedIdentityId.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UnprocessedIdentityId || (UnprocessedIdentityId = {}));\nexport var DeleteIdentitiesResponse;\n(function (DeleteIdentitiesResponse) {\n DeleteIdentitiesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DeleteIdentitiesResponse || (DeleteIdentitiesResponse = {}));\nexport var DeleteIdentityPoolInput;\n(function (DeleteIdentityPoolInput) {\n DeleteIdentityPoolInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DeleteIdentityPoolInput || (DeleteIdentityPoolInput = {}));\nexport var ResourceNotFoundException;\n(function (ResourceNotFoundException) {\n ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ResourceNotFoundException || (ResourceNotFoundException = {}));\nexport var DescribeIdentityInput;\n(function (DescribeIdentityInput) {\n DescribeIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DescribeIdentityInput || (DescribeIdentityInput = {}));\nexport var IdentityDescription;\n(function (IdentityDescription) {\n IdentityDescription.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(IdentityDescription || (IdentityDescription = {}));\nexport var DescribeIdentityPoolInput;\n(function (DescribeIdentityPoolInput) {\n DescribeIdentityPoolInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DescribeIdentityPoolInput || (DescribeIdentityPoolInput = {}));\nexport var ExternalServiceException;\n(function (ExternalServiceException) {\n ExternalServiceException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ExternalServiceException || (ExternalServiceException = {}));\nexport var GetCredentialsForIdentityInput;\n(function (GetCredentialsForIdentityInput) {\n GetCredentialsForIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetCredentialsForIdentityInput || (GetCredentialsForIdentityInput = {}));\nexport var Credentials;\n(function (Credentials) {\n Credentials.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(Credentials || (Credentials = {}));\nexport var GetCredentialsForIdentityResponse;\n(function (GetCredentialsForIdentityResponse) {\n GetCredentialsForIdentityResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetCredentialsForIdentityResponse || (GetCredentialsForIdentityResponse = {}));\nexport var InvalidIdentityPoolConfigurationException;\n(function (InvalidIdentityPoolConfigurationException) {\n InvalidIdentityPoolConfigurationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(InvalidIdentityPoolConfigurationException || (InvalidIdentityPoolConfigurationException = {}));\nexport var GetIdInput;\n(function (GetIdInput) {\n GetIdInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetIdInput || (GetIdInput = {}));\nexport var GetIdResponse;\n(function (GetIdResponse) {\n GetIdResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetIdResponse || (GetIdResponse = {}));\nexport var GetIdentityPoolRolesInput;\n(function (GetIdentityPoolRolesInput) {\n GetIdentityPoolRolesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetIdentityPoolRolesInput || (GetIdentityPoolRolesInput = {}));\nexport var MappingRuleMatchType;\n(function (MappingRuleMatchType) {\n MappingRuleMatchType[\"CONTAINS\"] = \"Contains\";\n MappingRuleMatchType[\"EQUALS\"] = \"Equals\";\n MappingRuleMatchType[\"NOT_EQUAL\"] = \"NotEqual\";\n MappingRuleMatchType[\"STARTS_WITH\"] = \"StartsWith\";\n})(MappingRuleMatchType || (MappingRuleMatchType = {}));\nexport var MappingRule;\n(function (MappingRule) {\n MappingRule.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(MappingRule || (MappingRule = {}));\nexport var RulesConfigurationType;\n(function (RulesConfigurationType) {\n RulesConfigurationType.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(RulesConfigurationType || (RulesConfigurationType = {}));\nexport var RoleMappingType;\n(function (RoleMappingType) {\n RoleMappingType[\"RULES\"] = \"Rules\";\n RoleMappingType[\"TOKEN\"] = \"Token\";\n})(RoleMappingType || (RoleMappingType = {}));\nexport var RoleMapping;\n(function (RoleMapping) {\n RoleMapping.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(RoleMapping || (RoleMapping = {}));\nexport var GetIdentityPoolRolesResponse;\n(function (GetIdentityPoolRolesResponse) {\n GetIdentityPoolRolesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetIdentityPoolRolesResponse || (GetIdentityPoolRolesResponse = {}));\nexport var GetOpenIdTokenInput;\n(function (GetOpenIdTokenInput) {\n GetOpenIdTokenInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetOpenIdTokenInput || (GetOpenIdTokenInput = {}));\nexport var GetOpenIdTokenResponse;\n(function (GetOpenIdTokenResponse) {\n GetOpenIdTokenResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetOpenIdTokenResponse || (GetOpenIdTokenResponse = {}));\nexport var DeveloperUserAlreadyRegisteredException;\n(function (DeveloperUserAlreadyRegisteredException) {\n DeveloperUserAlreadyRegisteredException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DeveloperUserAlreadyRegisteredException || (DeveloperUserAlreadyRegisteredException = {}));\nexport var GetOpenIdTokenForDeveloperIdentityInput;\n(function (GetOpenIdTokenForDeveloperIdentityInput) {\n GetOpenIdTokenForDeveloperIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetOpenIdTokenForDeveloperIdentityInput || (GetOpenIdTokenForDeveloperIdentityInput = {}));\nexport var GetOpenIdTokenForDeveloperIdentityResponse;\n(function (GetOpenIdTokenForDeveloperIdentityResponse) {\n GetOpenIdTokenForDeveloperIdentityResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetOpenIdTokenForDeveloperIdentityResponse || (GetOpenIdTokenForDeveloperIdentityResponse = {}));\nexport var ListIdentitiesInput;\n(function (ListIdentitiesInput) {\n ListIdentitiesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListIdentitiesInput || (ListIdentitiesInput = {}));\nexport var ListIdentitiesResponse;\n(function (ListIdentitiesResponse) {\n ListIdentitiesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListIdentitiesResponse || (ListIdentitiesResponse = {}));\nexport var ListIdentityPoolsInput;\n(function (ListIdentityPoolsInput) {\n ListIdentityPoolsInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListIdentityPoolsInput || (ListIdentityPoolsInput = {}));\nexport var IdentityPoolShortDescription;\n(function (IdentityPoolShortDescription) {\n IdentityPoolShortDescription.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(IdentityPoolShortDescription || (IdentityPoolShortDescription = {}));\nexport var ListIdentityPoolsResponse;\n(function (ListIdentityPoolsResponse) {\n ListIdentityPoolsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListIdentityPoolsResponse || (ListIdentityPoolsResponse = {}));\nexport var ListTagsForResourceInput;\n(function (ListTagsForResourceInput) {\n ListTagsForResourceInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListTagsForResourceInput || (ListTagsForResourceInput = {}));\nexport var ListTagsForResourceResponse;\n(function (ListTagsForResourceResponse) {\n ListTagsForResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListTagsForResourceResponse || (ListTagsForResourceResponse = {}));\nexport var LookupDeveloperIdentityInput;\n(function (LookupDeveloperIdentityInput) {\n LookupDeveloperIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(LookupDeveloperIdentityInput || (LookupDeveloperIdentityInput = {}));\nexport var LookupDeveloperIdentityResponse;\n(function (LookupDeveloperIdentityResponse) {\n LookupDeveloperIdentityResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(LookupDeveloperIdentityResponse || (LookupDeveloperIdentityResponse = {}));\nexport var MergeDeveloperIdentitiesInput;\n(function (MergeDeveloperIdentitiesInput) {\n MergeDeveloperIdentitiesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(MergeDeveloperIdentitiesInput || (MergeDeveloperIdentitiesInput = {}));\nexport var MergeDeveloperIdentitiesResponse;\n(function (MergeDeveloperIdentitiesResponse) {\n MergeDeveloperIdentitiesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(MergeDeveloperIdentitiesResponse || (MergeDeveloperIdentitiesResponse = {}));\nexport var ConcurrentModificationException;\n(function (ConcurrentModificationException) {\n ConcurrentModificationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ConcurrentModificationException || (ConcurrentModificationException = {}));\nexport var SetIdentityPoolRolesInput;\n(function (SetIdentityPoolRolesInput) {\n SetIdentityPoolRolesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(SetIdentityPoolRolesInput || (SetIdentityPoolRolesInput = {}));\nexport var TagResourceInput;\n(function (TagResourceInput) {\n TagResourceInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(TagResourceInput || (TagResourceInput = {}));\nexport var TagResourceResponse;\n(function (TagResourceResponse) {\n TagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(TagResourceResponse || (TagResourceResponse = {}));\nexport var UnlinkDeveloperIdentityInput;\n(function (UnlinkDeveloperIdentityInput) {\n UnlinkDeveloperIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UnlinkDeveloperIdentityInput || (UnlinkDeveloperIdentityInput = {}));\nexport var UnlinkIdentityInput;\n(function (UnlinkIdentityInput) {\n UnlinkIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UnlinkIdentityInput || (UnlinkIdentityInput = {}));\nexport var UntagResourceInput;\n(function (UntagResourceInput) {\n UntagResourceInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UntagResourceInput || (UntagResourceInput = {}));\nexport var UntagResourceResponse;\n(function (UntagResourceResponse) {\n UntagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UntagResourceResponse || (UntagResourceResponse = {}));\n//# sourceMappingURL=models_0.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { ConsoleLogger as Logger } from '../Logger';\nimport { browserOrNode } from '../JS';\nimport { NonRetryableError } from '../Util';\nvar logger = new Logger('CognitoCredentials');\nvar waitForInit = new Promise(function (res, rej) {\n if (!browserOrNode().isBrowser) {\n logger.debug('not in the browser, directly resolved');\n return res();\n }\n var ga = window['gapi'] && window['gapi'].auth2 ? window['gapi'].auth2 : null;\n if (ga) {\n logger.debug('google api already loaded');\n return res();\n }\n else {\n setTimeout(function () {\n return res();\n }, 2000);\n }\n});\nvar GoogleOAuth = /** @class */ (function () {\n function GoogleOAuth() {\n this.initialized = false;\n this.refreshGoogleToken = this.refreshGoogleToken.bind(this);\n this._refreshGoogleTokenImpl = this._refreshGoogleTokenImpl.bind(this);\n }\n GoogleOAuth.prototype.refreshGoogleToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!this.initialized) return [3 /*break*/, 2];\n logger.debug('need to wait for the Google SDK loaded');\n return [4 /*yield*/, waitForInit];\n case 1:\n _a.sent();\n this.initialized = true;\n logger.debug('finish waiting');\n _a.label = 2;\n case 2: return [2 /*return*/, this._refreshGoogleTokenImpl()];\n }\n });\n });\n };\n GoogleOAuth.prototype._refreshGoogleTokenImpl = function () {\n var ga = null;\n if (browserOrNode().isBrowser)\n ga = window['gapi'] && window['gapi'].auth2 ? window['gapi'].auth2 : null;\n if (!ga) {\n logger.debug('no gapi auth2 available');\n return Promise.reject('no gapi auth2 available');\n }\n return new Promise(function (res, rej) {\n ga.getAuthInstance()\n .then(function (googleAuth) {\n if (!googleAuth) {\n logger.debug('google Auth undefined');\n rej(new NonRetryableError('google Auth undefined'));\n }\n var googleUser = googleAuth.currentUser.get();\n // refresh the token\n if (googleUser.isSignedIn()) {\n logger.debug('refreshing the google access token');\n googleUser\n .reloadAuthResponse()\n .then(function (authResponse) {\n var id_token = authResponse.id_token, expires_at = authResponse.expires_at;\n res({ token: id_token, expires_at: expires_at });\n })\n .catch(function (err) {\n if (err && err.error === 'network_error') {\n // Not using NonRetryableError so handler will be retried\n rej('Network error reloading google auth response');\n }\n else {\n rej(new NonRetryableError('Failed to reload google auth response'));\n }\n });\n }\n else {\n rej(new NonRetryableError('User is not signed in with Google'));\n }\n })\n .catch(function (err) {\n logger.debug('Failed to refresh google token', err);\n rej(new NonRetryableError('Failed to refresh google token'));\n });\n });\n };\n return GoogleOAuth;\n}());\nexport { GoogleOAuth };\n/**\n * @deprecated use named import\n */\nexport default GoogleOAuth;\n//# sourceMappingURL=GoogleOAuth.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { ConsoleLogger as Logger } from '../Logger';\nimport { browserOrNode } from '../JS';\nimport { NonRetryableError } from '../Util';\nvar logger = new Logger('CognitoCredentials');\nvar waitForInit = new Promise(function (res, rej) {\n if (!browserOrNode().isBrowser) {\n logger.debug('not in the browser, directly resolved');\n return res();\n }\n var fb = window['FB'];\n if (fb) {\n logger.debug('FB SDK already loaded');\n return res();\n }\n else {\n setTimeout(function () {\n return res();\n }, 2000);\n }\n});\nvar FacebookOAuth = /** @class */ (function () {\n function FacebookOAuth() {\n this.initialized = false;\n this.refreshFacebookToken = this.refreshFacebookToken.bind(this);\n this._refreshFacebookTokenImpl = this._refreshFacebookTokenImpl.bind(this);\n }\n FacebookOAuth.prototype.refreshFacebookToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!this.initialized) return [3 /*break*/, 2];\n logger.debug('need to wait for the Facebook SDK loaded');\n return [4 /*yield*/, waitForInit];\n case 1:\n _a.sent();\n this.initialized = true;\n logger.debug('finish waiting');\n _a.label = 2;\n case 2: return [2 /*return*/, this._refreshFacebookTokenImpl()];\n }\n });\n });\n };\n FacebookOAuth.prototype._refreshFacebookTokenImpl = function () {\n var fb = null;\n if (browserOrNode().isBrowser)\n fb = window['FB'];\n if (!fb) {\n var errorMessage = 'no fb sdk available';\n logger.debug(errorMessage);\n return Promise.reject(new NonRetryableError(errorMessage));\n }\n return new Promise(function (res, rej) {\n fb.getLoginStatus(function (fbResponse) {\n if (!fbResponse || !fbResponse.authResponse) {\n var errorMessage = 'no response from facebook when refreshing the jwt token';\n logger.debug(errorMessage);\n // There is no definitive indication for a network error in\n // fbResponse, so we are treating it as an invalid token.\n rej(new NonRetryableError(errorMessage));\n }\n else {\n var response = fbResponse.authResponse;\n var accessToken = response.accessToken, expiresIn = response.expiresIn;\n var date = new Date();\n var expires_at = expiresIn * 1000 + date.getTime();\n if (!accessToken) {\n var errorMessage = 'the jwtToken is undefined';\n logger.debug(errorMessage);\n rej(new NonRetryableError(errorMessage));\n }\n res({\n token: accessToken,\n expires_at: expires_at,\n });\n }\n }, { scope: 'public_profile,email' });\n });\n };\n return FacebookOAuth;\n}());\nexport { FacebookOAuth };\n/**\n * @deprecated use named import\n */\nexport default FacebookOAuth;\n//# sourceMappingURL=FacebookOAuth.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { GoogleOAuth as GoogleOAuthClass } from './GoogleOAuth';\nimport { FacebookOAuth as FacebookOAuthClass } from './FacebookOAuth';\nexport var GoogleOAuth = new GoogleOAuthClass();\nexport var FacebookOAuth = new FacebookOAuthClass();\n//# sourceMappingURL=index.js.map","import { deserializerMiddleware } from \"./deserializerMiddleware\";\nimport { serializerMiddleware } from \"./serializerMiddleware\";\nexport var deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport var serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: function (commandStack) {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n },\n };\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyZGVQbHVnaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VyZGVQbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBV0EsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDbEUsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFOUQsTUFBTSxDQUFDLElBQU0sNEJBQTRCLEdBQThCO0lBQ3JFLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsSUFBSSxFQUFFLGFBQWE7SUFDbkIsSUFBSSxFQUFFLENBQUMsY0FBYyxDQUFDO0lBQ3RCLFFBQVEsRUFBRSxJQUFJO0NBQ2YsQ0FBQztBQUVGLE1BQU0sQ0FBQyxJQUFNLDBCQUEwQixHQUE0QjtJQUNqRSxJQUFJLEVBQUUsc0JBQXNCO0lBQzVCLElBQUksRUFBRSxXQUFXO0lBQ2pCLElBQUksRUFBRSxDQUFDLFlBQVksQ0FBQztJQUNwQixRQUFRLEVBQUUsSUFBSTtDQUNmLENBQUM7QUFFRixNQUFNLFVBQVUsY0FBYyxDQUs1QixNQUFvQixFQUNwQixVQUFnRCxFQUNoRCxZQUFpRTtJQUVqRSxPQUFPO1FBQ0wsWUFBWSxFQUFFLFVBQUMsWUFBb0Q7WUFDakUsWUFBWSxDQUFDLEdBQUcsQ0FBQyxzQkFBc0IsQ0FBQyxNQUFNLEVBQUUsWUFBWSxDQUFDLEVBQUUsNEJBQTRCLENBQUMsQ0FBQztZQUM3RixZQUFZLENBQUMsR0FBRyxDQUFDLG9CQUFvQixDQUFDLE1BQU0sRUFB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5leHBvcnQgZnVuY3Rpb24gZ2V0U2VyZGVQbHVnaW48XG4gIElucHV0VHlwZSBleHRlbmRzIG9iamVjdCxcbiAgU2VyRGVDb250ZXh0IGV4dGVuZHMgRW5kcG9pbnRCZWFyZXIsXG4gIE91dHB1dFR5cGUgZXh0ZW5kcyBNZXRhZGF0YUJlYXJlclxuPihcbiAgY29uZmlnOiBTZXJEZUNvbnRleHQsXG4gIHNlcmlhbGl6ZXI6IFJlcXVlc3RTZXJpYWxpemVyPGFueSwgU2VyRGVDb250ZXh0PixcbiAgZGVzZXJpYWxpemVyOiBSZXNwb25zZURlc2VyaWFsaXplcjxPdXRwdXRUeXBlLCBhbnksIFNlckRlQ29udGV4dD5cbik6IFBsdWdnYWJsZTxJbnB1dFR5cGUsIE91dHB1dFR5cGU+IHtcbiAgcmV0dXJuIHtcbiAgICBhcHBseVRvU3RhY2s6IChjb21tYW5kU3RhY2s6IE1pZGRsZXdhcmVTdGFjazxJbnB1dFR5cGUsIE91dHB1dFR5cGU+KSA9PiB7XG4gICAgICBjb21tYW5kU3RhY2suYWRkKGRlc2VyaWFsaXplck1pZGRsZXdhcmUoY29uZmlnLCBkZXNlcmlhbGl6ZXIpLCBkZXNlcmlhbGl6ZXJNaWRkbGV3YXJlT3B0aW9uKTtcbiAgICAgIGNvbW1hbmRTdGFjay5hZGQoc2VyaWFsaXplck1pZGRsZXdhcmUoY29uZmlnLCBzZXJpYWxpemVyKSwgc2VyaWFsaXplck1pZGRsZXdhcmVPcHRpb24pO1xuICAgIH0sXG4gIH07XG59XG4iXX0=","import { __awaiter, __generator } from \"tslib\";\nexport var deserializerMiddleware = function (options, deserializer) { return function (next, context) { return function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var response, parsed;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, next(args)];\n case 1:\n response = (_a.sent()).response;\n return [4 /*yield*/, deserializer(response, options)];\n case 2:\n parsed = _a.sent();\n return [2 /*return*/, {\n response: response,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lkZGxld2FyZSA9IDxJbnB1dCBleHRlbmRzIG9iamVjdCwgT3V0cHV0IGV4dGVuZHMgb2JqZWN0LCBSdW50aW1lVXRpbHMgPSBhbnk+KFxuICBvcHRpb25zOiBSdW50aW1lVXRpbHMsXG4gIGRlc2VyaWFsaXplcjogUmVzcG9uc2VEZXNlcmlhbGl6ZXI8YW55LCBhbnksIFJ1bnRpbWVVdGlscz5cbik6IERlc2VyaWFsaXplTWlkZGxld2FyZTxJbnB1dCwgT3V0cHV0PiA9PiAoXG4gIG5leHQ6IERlc2VyaWFsaXplSGFuZGxlcjxJbnB1dCwgT3V0cHV0PixcbiAgY29udGV4dDogSGFuZGxlckV4ZWN1dGlvbkNvbnRleHRcbik6IERlc2VyaWFsaXplSGFuZGxlcjxJbnB1dCwgT3V0cHV0PiA9PiBhc3luYyAoXG4gIGFyZ3M6IERlc2VyaWFsaXplSGFuZGxlckFyZ3VtZW50czxJbnB1dD5cbik6IFByb21pc2U8RGVzZXJpYWxpemVIYW5kbGVyT3V0cHV0PE91dHB1dD4+ID0+IHtcbiAgY29uc3QgeyByZXNwb25zZSB9ID0gYXdhaXQgbmV4dChhcmdzKTtcbiAgY29uc3QgcGFyc2VkID0gYXdhaXQgZGVzZXJpYWxpemVyKHJlc3BvbnNlLCBvcHRpb25zKTtcbiAgcmV0dXJuIHtcbiAgICByZXNwb25zZSxcbiAgICBvdXRwdXQ6IHBhcnNlZCBhcyBPdXRwdXQsXG4gIH07XG59O1xuIl19","import { __assign, __awaiter, __generator } from \"tslib\";\nexport var serializerMiddleware = function (options, serializer) { return function (next, context) { return function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var request;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, serializer(args.input, options)];\n case 1:\n request = _a.sent();\n return [2 /*return*/, next(__assign(__assign({}, args), { request: request }))];\n }\n });\n}); }; }; };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vy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FNlcmlhbGl6ZXI8YW55LCBSdW50aW1lVXRpbHM+XG4pOiBTZXJpYWxpemVNaWRkbGV3YXJlPElucHV0LCBPdXRwdXQ+ID0+IChcbiAgbmV4dDogU2VyaWFsaXplSGFuZGxlcjxJbnB1dCwgT3V0cHV0PixcbiAgY29udGV4dDogSGFuZGxlckV4ZWN1dGlvbkNvbnRleHRcbik6IFNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4gPT4gYXN5bmMgKFxuICBhcmdzOiBTZXJpYWxpemVIYW5kbGVyQXJndW1lbnRzPElucHV0PlxuKTogUHJvbWlzZTxTZXJpYWxpemVIYW5kbGVyT3V0cHV0PE91dHB1dD4+ID0+IHtcbiAgY29uc3QgcmVxdWVzdCA9IGF3YWl0IHNlcmlhbGl6ZXIoYXJncy5pbnB1dCwgb3B0aW9ucyk7XG4gIHJldHVybiBuZXh0KHtcbiAgICAuLi5hcmdzLFxuICAgIHJlcXVlc3QsXG4gIH0pO1xufTtcbiJdfQ==","import { __assign, __read, __spread, __values } from \"tslib\";\nexport var constructStack = function () {\n var absoluteEntries = [];\n var relativeEntries = [];\n var entriesNameSet = new Set();\n var sort = function (entries) {\n return entries.sort(function (a, b) {\n return stepWeights[b.step] - stepWeights[a.step] ||\n priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"];\n });\n };\n var removeByName = function (toRemove) {\n var isRemoved = false;\n var filterCb = function (entry) {\n if (entry.name && entry.name === toRemove) {\n isRemoved = true;\n entriesNameSet.delete(toRemove);\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n var removeByReference = function (toRemove) {\n var isRemoved = false;\n var filterCb = function (entry) {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n if (entry.name)\n entriesNameSet.delete(entry.name);\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n var cloneTo = function (toStack) {\n absoluteEntries.forEach(function (entry) {\n //@ts-ignore\n toStack.add(entry.middleware, __assign({}, entry));\n });\n relativeEntries.forEach(function (entry) {\n //@ts-ignore\n toStack.addRelativeTo(entry.middleware, __assign({}, entry));\n });\n return toStack;\n };\n var expandRelativeMiddlewareList = function (from) {\n var expandedMiddlewareList = [];\n from.before.forEach(function (entry) {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push.apply(expandedMiddlewareList, __spread(expandRelativeMiddlewareList(entry)));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach(function (entry) {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push.apply(expandedMiddlewareList, __spread(expandRelativeMiddlewareList(entry)));\n }\n });\n return expandedMiddlewareList;\n };\n /**\n * Get a final list of middleware in the order of being executed in the resolved handler.\n */\n var getMiddlewareList = function () {\n var normalizedAbsoluteEntries = [];\n var normalizedRelativeEntries = [];\n var normalizedEntriesNameMap = {};\n absoluteEntries.forEach(function (entry) {\n var normalizedEntry = __assign(__assign({}, entry), { before: [], after: [] });\n if (normalizedEntry.name)\n normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry;\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach(function (entry) {\n var normalizedEntry = __assign(__assign({}, entry), { before: [], after: [] });\n if (normalizedEntry.name)\n normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry;\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach(function (entry) {\n if (entry.toMiddleware) {\n var toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === undefined) {\n throw new Error(entry.toMiddleware + \" is not found when adding \" + (entry.name || \"anonymous\") + \" middleware \" + entry.relation + \" \" + entry.toMiddleware);\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n var mainChain = sort(normalizedAbsoluteEntries)\n .map(expandRelativeMiddlewareList)\n .reduce(function (wholeList, expendedMiddlewareList) {\n // TODO: Replace it with Array.flat();\n wholeList.push.apply(wholeList, __spread(expendedMiddlewareList));\n return wholeList;\n }, []);\n return mainChain.map(function (entry) { return entry.middleware; });\n };\n var stack = {\n add: function (middleware, options) {\n if (options === void 0) { options = {}; }\n var name = options.name, override = options.override;\n var entry = __assign({ step: \"initialize\", priority: \"normal\", middleware: middleware }, options);\n if (name) {\n if (entriesNameSet.has(name)) {\n if (!override)\n throw new Error(\"Duplicate middleware name '\" + name + \"'\");\n var toOverrideIndex = absoluteEntries.findIndex(function (entry) { return entry.name === name; });\n var toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || toOverride.priority !== entry.priority) {\n throw new Error(\"\\\"\" + name + \"\\\" middleware with \" + toOverride.priority + \" priority in \" + toOverride.step + \" step cannot be \" +\n (\"overridden by same-name middleware with \" + entry.priority + \" priority in \" + entry.step + \" step.\"));\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n entriesNameSet.add(name);\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: function (middleware, options) {\n var name = options.name, override = options.override;\n var entry = __assign({ middleware: middleware }, options);\n if (name) {\n if (entriesNameSet.has(name)) {\n if (!override)\n throw new Error(\"Duplicate middleware name '\" + name + \"'\");\n var toOverrideIndex = relativeEntries.findIndex(function (entry) { return entry.name === name; });\n var toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(\"\\\"\" + name + \"\\\" middleware \" + toOverride.relation + \" \\\"\" + toOverride.toMiddleware + \"\\\" middleware cannot be overridden \" +\n (\"by same-name middleware \" + entry.relation + \" \\\"\" + entry.toMiddleware + \"\\\" middleware.\"));\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n entriesNameSet.add(name);\n }\n relativeEntries.push(entry);\n },\n clone: function () { return cloneTo(constructStack()); },\n use: function (plugin) {\n plugin.applyToStack(stack);\n },\n remove: function (toRemove) {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: function (toRemove) {\n var isRemoved = false;\n var filterCb = function (entry) {\n var tags = entry.tags, name = entry.name;\n if (tags && tags.includes(toRemove)) {\n if (name)\n entriesNameSet.delete(name);\n isRemoved = true;\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: function (from) {\n var cloned = cloneTo(constructStack());\n cloned.use(from);\n return cloned;\n },\n applyToStack: cloneTo,\n resolve: function (handler, context) {\n var e_1, _a;\n try {\n for (var _b = __values(getMiddlewareList().reverse()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var middleware = _c.value;\n handler = middleware(handler, context);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return handler;\n },\n };\n return stack;\n};\nvar stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1,\n};\nvar priorityWeights = {\n high: 3,\n normal: 2,\n low: 1,\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlkZGxld2FyZVN0YWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL01pZGRsZXdhcmVTdGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBZ0JBLE1BQU0sQ0FBQyxJQUFNLGNBQWMsR0FBRztJQUM1QixJQUFJLGVBQWUsR0FBNkMsRUFBRSxDQUFDO0lBQ25FLElBQUksZUFBZSxH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T3V0cHV0VHlwZSBleHRlbmRzIE91dHB1dD4oXG4gICAgICBoYW5kbGVyOiBEZXNlcmlhbGl6ZUhhbmRsZXI8SW5wdXRUeXBlLCBPdXRwdXRUeXBlPixcbiAgICAgIGNvbnRleHQ6IEhhbmRsZXJFeGVjdXRpb25Db250ZXh0XG4gICAgKTogSGFuZGxlcjxJbnB1dFR5cGUsIE91dHB1dFR5cGU+ID0+IHtcbiAgICAgIGZvciAoY29uc3QgbWlkZGxld2FyZSBvZiBnZXRNaWRkbGV3YXJlTGlzdCgpLnJldmVyc2UoKSkge1xuICAgICAgICBoYW5kbGVyID0gbWlkZGxld2FyZShoYW5kbGVyIGFzIEhhbmRsZXI8SW5wdXQsIE91dHB1dFR5cGU+LCBjb250ZXh0KSBhcyBhbnk7XG4gICAgICB9XG4gICAgICByZXR1cm4gaGFuZGxlciBhcyBIYW5kbGVyPElucHV0VHlwZSwgT3V0cHV0VHlwZT47XG4gICAgfSxcbiAgfTtcbiAgcmV0dXJuIHN0YWNrO1xufTtcblxuY29uc3Qgc3RlcFdlaWdodHM6IHsgW2tleSBpbiBTdGVwXTogbnVtYmVyIH0gPSB7XG4gIGluaXRpYWxpemU6IDUsXG4gIHNlcmlhbGl6ZTogNCxcbiAgYnVpbGQ6IDMsXG4gIGZpbmFsaXplUmVxdWVzdDogMixcbiAgZGVzZXJpYWxpemU6IDEsXG59O1xuXG5jb25zdCBwcmlvcml0eVdlaWdodHM6IHsgW2tleSBpbiBQcmlvcml0eV06IG51bWJlciB9ID0ge1xuICBoaWdoOiAzLFxuICBub3JtYWw6IDIsXG4gIGxvdzogMSxcbn07XG4iXX0=","import { constructStack } from \"@aws-sdk/middleware-stack\";\nvar Client = /** @class */ (function () {\n function Client(config) {\n this.middlewareStack = constructStack();\n this.config = config;\n }\n Client.prototype.send = function (command, optionsOrCb, cb) {\n var options = typeof optionsOrCb !== \"function\" ? optionsOrCb : undefined;\n var callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n var handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n if (callback) {\n handler(command)\n .then(function (result) { return callback(null, result.output); }, function (err) { return callback(err); })\n .catch(\n // prevent any errors thrown in the callback from triggering an\n // unhandled promise rejection\n function () { });\n }\n else {\n return handler(command).then(function (result) { return result.output; });\n }\n };\n Client.prototype.destroy = function () {\n if (this.config.requestHandler.destroy)\n this.config.requestHandler.destroy();\n };\n return Client;\n}());\nexport { Client };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFlM0Q7SUFRRSxnQkFBWSxNQUFtQztRQUZ4QyxvQkFBZSxHQUFHLGNBQWMsRUFBNkIsQ0FBQztRQUduRSxJQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztJQUN2QixDQUFDO0lBY0QscUJBQUksR0FBSixVQUNFLE9BQStHLEVBQy9HLFdBQXNFLEVBQ3RFLEVBQTBDO1FBRTFDLElBQU0sT0FBTyxHQUFHLE9BQU8sV0FBVyxLQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUM7UUFDNUUsSUFBTSxRQUFRLEdBQUcsT0FBTyxXQUFXLEtBQUssVUFBVSxDQUFDLENBQUMsQ0FBRSxXQUFxRCxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUM7UUFDakgsSUFBTSxPQUFPLEdBQUcsT0FBTyxDQUFDLGlCQUFpQixDQUFDLElBQUksQ0FBQyxlQUFzQixFQUFFLElBQUksQ0FBQyxNQUFNLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDN0YsSUFBSSxRQUFRLEVBQUU7WUFDWix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RsZWQgcHJvbWlzZSByZWplY3Rpb25cbiAgICAgICAgICAoKSA9PiB7fVxuICAgICAgICApO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gaGFuZGxlcihjb21tYW5kKS50aGVuKChyZXN1bHQpID0+IHJlc3VsdC5vdXRwdXQpO1xuICAgIH1cbiAgfVxuXG4gIGRlc3Ryb3koKSB7XG4gICAgaWYgKHRoaXMuY29uZmlnLnJlcXVlc3RIYW5kbGVyLmRlc3Ryb3kpIHRoaXMuY29uZmlnLnJlcXVlc3RIYW5kbGVyLmRlc3Ryb3koKTtcbiAgfVxufVxuIl19","import { constructStack } from \"@aws-sdk/middleware-stack\";\nvar Command = /** @class */ (function () {\n function Command() {\n this.middlewareStack = constructStack();\n }\n return Command;\n}());\nexport { Command };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tYW5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUczRDtJQUFBO1FBUVcsb0JBQWUsR0FBb0MsY0FBYyxFQUFpQixDQUFDO0lBTTlGLENBQUM7SUFBRCxjQUFDO0FBQUQsQ0FBQyxBQWRELElBY0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjb25zdHJ1Y3RTdGFjayB9IGZyb20gXCJAYXdzLXNkay9taWRkbGV3YXJlLXN0YWNrXCI7XG5pbXBvcnQgeyBDb21tYW5kIGFzIElDb21tYW5kLCBIYW5kbGVyLCBNZXRhZGF0YUJlYXJlciwgTWlkZGxld2FyZVN0YWNrIGFzIElNaWRkbGV3YXJlU3RhY2sgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGFic3RyYWN0IGNsYXNzIENvbW1hbmQ8XG4gIElucHV0IGV4dGVuZHMgQ2xpZW50SW5wdXQsXG4gIE91dHB1dCBleHRlbmRzIENsaWVudE91dHB1dCxcbiAgUmVzb2x2ZWRDbGllbnRDb25maWd1cmF0aW9uLFxuICBDbGllbnRJbnB1dCBleHRlbmRzIG9iamVjdCA9IGFueSxcbiAgQ2xpZW50T3V0cHV0IGV4dGVuZHMgTWV0YWRhdGFCZWFyZXIgPSBhbnlcbj4gaW1wbGVtZW50cyBJQ29tbWFuZDxDbGllbnRJbnB1dCwgSW5wdXQsIENsaWVudE91dHB1dCwgT3V0cHV0LCBSZXNvbHZlZENsaWVudENvbmZpZ3VyYXRpb24+IHtcbiAgYWJzdHJhY3QgaW5wdXQ6IElucHV0O1xuICByZWFkb25seSBtaWRkbGV3YXJlU3RhY2s6IElNaWRkbGV3YXJlU3RhY2s8SW5wdXQsIE91dHB1dD4gPSBjb25zdHJ1Y3RTdGFjazxJbnB1dCwgT3V0cHV0PigpO1xuICBhYnN0cmFjdCByZXNvbHZlTWlkZGxld2FyZShcbiAgICBzdGFjazogSU1pZGRsZXdhcmVTdGFjazxDbGllbnRJbnB1dCwgQ2xpZW50T3V0cHV0PixcbiAgICBjb25maWd1cmF0aW9uOiBSZXNvbHZlZENsaWVudENvbmZpZ3VyYXRpb24sXG4gICAgb3B0aW9uczogYW55XG4gICk6IEhhbmRsZXI8SW5wdXQsIE91dHB1dD47XG59XG4iXX0=","/**\n * Lazy String holder for JSON typed contents.\n */\nimport { __extends, __read, __spread } from \"tslib\";\n/**\n * Because of https://github.com/microsoft/tslib/issues/95,\n * TS 'extends' shim doesn't support extending native types like String.\n * So here we create StringWrapper that duplicate everything from String\n * class including its prototype chain. So we can extend from here.\n */\n// @ts-ignore StringWrapper implementation is not a simple constructor\nexport var StringWrapper = function () {\n //@ts-ignore 'this' cannot be assigned to any, but Object.getPrototypeOf accepts any\n var Class = Object.getPrototypeOf(this).constructor;\n var Constructor = Function.bind.apply(String, __spread([null], arguments));\n //@ts-ignore Call wrapped String constructor directly, don't bother typing it.\n var instance = new Constructor();\n Object.setPrototypeOf(instance, Class.prototype);\n return instance;\n};\nStringWrapper.prototype = Object.create(String.prototype, {\n constructor: {\n value: StringWrapper,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n});\nObject.setPrototypeOf(StringWrapper, String);\nvar LazyJsonString = /** @class */ (function (_super) {\n __extends(LazyJsonString, _super);\n function LazyJsonString() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LazyJsonString.prototype.deserializeJSON = function () {\n return JSON.parse(_super.prototype.toString.call(this));\n };\n LazyJsonString.prototype.toJSON = function () {\n return _super.prototype.toString.call(this);\n };\n LazyJsonString.fromObject = function (object) {\n if (object instanceof LazyJsonString) {\n return object;\n }\n else if (object instanceof String || typeof object === \"string\") {\n return new LazyJsonString(object);\n }\n return new LazyJsonString(JSON.stringify(object));\n };\n return LazyJsonString;\n}(StringWrapper));\nexport { LazyJsonString };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1qc29uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2xhenktanNvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRzs7QUFNSDs7Ozs7R0FLRztBQUNILHNFQUFzRTtBQUN0RSxNQUFNLENBQUMsSUFBTSxhQUFhLEdBQWtCO0lBQzFDLG9GQUFvRjtJQUNwRixJQUFNLEtBQUssR0FBRyxNQUFNLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxDQUFDLFdBQVcsQ0FBQztJQUN0RCxJQUFNLFdBQVcsR0FBRyxRQUFRLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLFlBQUcsSUFBVyxHQUFLLFNBQVMsRUFBRSxDQUFDO0lBQzdFLDhFQUE4RTtJQUM5RSxJQUFNLFFBQVEsR0FBRyxJQUFJLFdBQVcsRUFBRSxD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HlwZW9mIG9iamVjdCA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgcmV0dXJuIG5ldyBMYXp5SnNvblN0cmluZyhvYmplY3QpO1xuICAgIH1cbiAgICByZXR1cm4gbmV3IExhenlKc29uU3RyaW5nKEpTT04uc3RyaW5naWZ5KG9iamVjdCkpO1xuICB9XG59XG4iXX0=","import { __extends } from \"tslib\";\nimport { GetCredentialsForIdentityInput, GetCredentialsForIdentityResponse } from \"../models/models_0\";\nimport { deserializeAws_json1_1GetCredentialsForIdentityCommand, serializeAws_json1_1GetCredentialsForIdentityCommand, } from \"../protocols/Aws_json1_1\";\nimport { getSerdePlugin } from \"@aws-sdk/middleware-serde\";\nimport { Command as $Command } from \"@aws-sdk/smithy-client\";\n/**\n *
Returns credentials for the provided identity ID. Any provided logins will be\n * validated against supported login providers. If the token is for\n * cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service\n * with the appropriate role for the token.
\n *This is a public API. You do not need any credentials to call this API.
\n */\nvar GetCredentialsForIdentityCommand = /** @class */ (function (_super) {\n __extends(GetCredentialsForIdentityCommand, _super);\n // Start section: command_properties\n // End section: command_properties\n function GetCredentialsForIdentityCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n GetCredentialsForIdentityCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {\n this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));\n var stack = clientStack.concat(this.middlewareStack);\n var logger = configuration.logger;\n var clientName = \"CognitoIdentityClient\";\n var commandName = \"GetCredentialsForIdentityCommand\";\n var handlerExecutionContext = {\n logger: logger,\n clientName: clientName,\n commandName: commandName,\n inputFilterSensitiveLog: GetCredentialsForIdentityInput.filterSensitiveLog,\n outputFilterSensitiveLog: GetCredentialsForIdentityResponse.filterSensitiveLog,\n };\n var requestHandler = configuration.requestHandler;\n return stack.resolve(function (request) {\n return requestHandler.handle(request.request, options || {});\n }, handlerExecutionContext);\n };\n GetCredentialsForIdentityCommand.prototype.serialize = function (input, context) {\n return serializeAws_json1_1GetCredentialsForIdentityCommand(input, context);\n };\n GetCredentialsForIdentityCommand.prototype.deserialize = function (output, context) {\n return deserializeAws_json1_1GetCredentialsForIdentityCommand(output, context);\n };\n return GetCredentialsForIdentityCommand;\n}($Command));\nexport { GetCredentialsForIdentityCommand };\n//# sourceMappingURL=GetCredentialsForIdentityCommand.js.map","import { __extends } from \"tslib\";\n/**\n * An error representing a failure of an individual credential provider.\n *\n * This error class has special meaning to the {@link chain} method. If a\n * provider in the chain is rejected with an error, the chain will only proceed\n * to the next provider if the value of the `tryNextLink` property on the error\n * is truthy. This allows individual providers to halt the chain and also\n * ensures the chain will stop if an entirely unexpected error is encountered.\n */\nvar ProviderError = /** @class */ (function (_super) {\n __extends(ProviderError, _super);\n function ProviderError(message, tryNextLink) {\n if (tryNextLink === void 0) { tryNextLink = true; }\n var _this = _super.call(this, message) || this;\n _this.tryNextLink = tryNextLink;\n return _this;\n }\n return ProviderError;\n}(Error));\nexport { ProviderError };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdmlkZXJFcnJvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qcm92aWRlckVycm9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7R0FRRztBQUNIO0lBQW1DLGlDQUFLO0lBQ3RDLHVCQUFZLE9BQWUsRUFBa0IsV0FBMkI7UUFBM0IsNEJBQUEsRUFBQSxrQkFBMkI7UUFBeEUsWUFDRSxrQkFBTSxPQUFPLENBQUMsU0FDZjtRQUY0QyxpQkFBVyxHQUFYLFdBQVcsQ0FBZ0I7O0lBRXhFLENBQUM7SUFDSCxvQkFBQztBQUFELENBQUMsQUFKRCxDQUFtQyxLQUFLLEdBSXZDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBBbiBlcnJvciByZXByZXNlbnRpbmcgYSBmYWlsdXJlIG9mIGFuIGluZGl2aWR1YWwgY3JlZGVudGlhbCBwcm92aWRlci5cbiAqXG4gKiBUaGlzIGVycm9yIGNsYXNzIGhhcyBzcGVjaWFsIG1lYW5pbmcgdG8gdGhlIHtAbGluayBjaGFpbn0gbWV0aG9kLiBJZiBhXG4gKiBwcm92aWRlciBpbiB0aGUgY2hhaW4gaXMgcmVqZWN0ZWQgd2l0aCBhbiBlcnJvciwgdGhlIGNoYWluIHdpbGwgb25seSBwcm9jZWVkXG4gKiB0byB0aGUgbmV4dCBwcm92aWRlciBpZiB0aGUgdmFsdWUgb2YgdGhlIGB0cnlOZXh0TGlua2AgcHJvcGVydHkgb24gdGhlIGVycm9yXG4gKiBpcyB0cnV0aHkuIFRoaXMgYWxsb3dzIGluZGl2aWR1YWwgcHJvdmlkZXJzIHRvIGhhbHQgdGhlIGNoYWluIGFuZCBhbHNvXG4gKiBlbnN1cmVzIHRoZSBjaGFpbiB3aWxsIHN0b3AgaWYgYW4gZW50aXJlbHkgdW5leHBlY3RlZCBlcnJvciBpcyBlbmNvdW50ZXJlZC5cbiAqL1xuZXhwb3J0IGNsYXNzIFByb3ZpZGVyRXJyb3IgZXh0ZW5kcyBFcnJvciB7XG4gIGNvbnN0cnVjdG9yKG1lc3NhZ2U6IHN0cmluZywgcHVibGljIHJlYWRvbmx5IHRyeU5leHRMaW5rOiBib29sZWFuID0gdHJ1ZSkge1xuICAgIHN1cGVyKG1lc3NhZ2UpO1xuICB9XG59XG4iXX0=","import { __read } from \"tslib\";\n/**\n * @internal\n */\nexport function resolveLogins(logins) {\n return Promise.all(Object.keys(logins).reduce(function (arr, name) {\n var tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n }\n else {\n arr.push(tokenOrProvider().then(function (token) { return [name, token]; }));\n }\n return arr;\n }, [])).then(function (resolvedPairs) {\n return resolvedPairs.reduce(function (logins, _a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n logins[key] = value;\n return logins;\n }, {});\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZUxvZ2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZXNvbHZlTG9naW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQTs7R0FFRztBQUNILE1BQU0sVUFBVSxhQUFhLENBQUMsTUFBYztJQUMxQyxPQUFPLE9BQU8sQ0FBQyxHQUFHLENBQ2hCLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsTUFBTSxDQUFDLFVBQUMsR0FBd0QsRUFBRSxJQUFZO1FBQ2hHLElBQU0sZUFBZSxHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNyQyxJQUFJLE9BQU8sZUFBZSxLQUFLLFFBQVEsRUFBRTtZQUN2QyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxFQUFFLGVBQWUsQ0FBcUIsQ0FBQyxDQUFDO1NBQ3ZEO2FBQU07WUFDTCxHQUFHLENBQUMsSUFBSSxDQUFDLGVBQWUsRUFBRSxDQUFDLElBQUksQ0FBQyxVQUFDLEtBQUssSUFBSyxPQUFBLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBcUIsRUFBakMsQ0FBaUMsQ0FBQyxDQUFDLENBQUM7U0FDaEY7UUFDRCxPQUFPLEdBQUcsQ0FBQztJQUNiLENBQUMsRUFBRSxFQUFzQyxDQUFDLENBQzNDLENBQUMsSUFBSSxDQUFDLFVBQUMsYUFBYTtRQUNuQixPQUFBLGFBQWEsQ0FBQyxNQUFNLENBQUMsVUFBQyxNQUFzQixFQUFFLEVBQVk7Z0JBQVosS0FBQSxhQUFZLEVBQVgsR0FBRyxRQUFBLEVB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mVkUGFpcnMucmVkdWNlKChsb2dpbnM6IFJlc29sdmVkTG9naW5zLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgIGxvZ2luc1trZXldID0gdmFsdWU7XG4gICAgICByZXR1cm4gbG9naW5zO1xuICAgIH0sIHt9IGFzIFJlc29sdmVkTG9naW5zKVxuICApO1xufVxuIl19","import { __awaiter, __generator } from \"tslib\";\nimport { GetCredentialsForIdentityCommand } from \"@aws-sdk/client-cognito-identity\";\nimport { ProviderError } from \"@aws-sdk/property-provider\";\nimport { resolveLogins } from \"./resolveLogins\";\n/**\n * Retrieves temporary AWS credentials using Amazon Cognito's\n * `GetCredentialsForIdentity` operation.\n *\n * Results from this function call are not cached internally.\n */\nexport function fromCognitoIdentity(parameters) {\n var _this = this;\n return function () { return __awaiter(_this, void 0, void 0, function () {\n var _a, _b, _c, AccessKeyId, Expiration, _d, SecretKey, SessionToken, _e, _f, _g, _h;\n var _j;\n return __generator(this, function (_k) {\n switch (_k.label) {\n case 0:\n _f = (_e = parameters.client).send;\n _g = GetCredentialsForIdentityCommand.bind;\n _j = {\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId\n };\n if (!parameters.logins) return [3 /*break*/, 2];\n return [4 /*yield*/, resolveLogins(parameters.logins)];\n case 1:\n _h = _k.sent();\n return [3 /*break*/, 3];\n case 2:\n _h = undefined;\n _k.label = 3;\n case 3: return [4 /*yield*/, _f.apply(_e, [new (_g.apply(GetCredentialsForIdentityCommand, [void 0, (_j.Logins = _h,\n _j)]))()])];\n case 4:\n _a = (_k.sent()).Credentials, _b = _a === void 0 ? throwOnMissingCredentials() : _a, _c = _b.AccessKeyId, AccessKeyId = _c === void 0 ? throwOnMissingAccessKeyId() : _c, Expiration = _b.Expiration, _d = _b.SecretKey, SecretKey = _d === void 0 ? throwOnMissingSecretKey() : _d, SessionToken = _b.SessionToken;\n return [2 /*return*/, {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration,\n }];\n }\n });\n }); };\n}\nfunction throwOnMissingAccessKeyId() {\n throw new ProviderError(\"Response from Amazon Cognito contained no access key ID\");\n}\nfunction throwOnMissingCredentials() {\n throw new ProviderError(\"Response from Amazon Cognito contained no credentials\");\n}\nfunction throwOnMissingSecretKey() {\n throw new ProviderError(\"Response from Amazon Cognito contained no secret key\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUNvZ25pdG9JZGVudGl0eS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mcm9tQ29nbml0b0lkZW50aXR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsZ0NBQWdDLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUNwRixPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFJM0QsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBU2hEOzs7OztHQUtHO0FBQ0gsTUFBTSxVQUFVLG1CQUFtQixDQUFDLFVBQXlDO0lBQTdFLGlCQXlCQztJQXhCQyxPQUFPOzs7Ozs7b0JBUUssS0FBQSxDQUFBLEtBQUEsVUFBVSxDQUFDLE1BQU0sQ0FBQSxDQUFDLElBQUksQ0FBQTt5QkFDMUIsZ0NBQWdDOzt3QkFDbEMsYUFBYSxFQUFFLFVBQVUsQ0FBQyxhQUFhO3dCQUN2QyxVQUFVLEVBQUUsVUFBVSxDQUFDLFVBQVU7O3lCQUN6QixVQUFVLENBQUMsTUFBTSxFQUFqQix3QkFBaUI7b0JBQUcscUJBQU0sYUFBYSxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsRUFBQTs7b0JBQXRDLEtBQUEsU0FBc0MsQ0FBQTs7O29CQUFHLEtBQUEsU0FBUyxDQUF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yB3aWxsIGJlXG4gICAqIGlzc3VlZC5cbiAgICovXG4gIGlkZW50aXR5SWQ6IHN0cmluZztcbn1cblxuZnVuY3Rpb24gdGhyb3dPbk1pc3NpbmdBY2Nlc3NLZXlJZCgpOiBuZXZlciB7XG4gIHRocm93IG5ldyBQcm92aWRlckVycm9yKFwiUmVzcG9uc2UgZnJvbSBBbWF6b24gQ29nbml0byBjb250YWluZWQgbm8gYWNjZXNzIGtleSBJRFwiKTtcbn1cblxuZnVuY3Rpb24gdGhyb3dPbk1pc3NpbmdDcmVkZW50aWFscygpOiBuZXZlciB7XG4gIHRocm93IG5ldyBQcm92aWRlckVycm9yKFwiUmVzcG9uc2UgZnJvbSBBbWF6b24gQ29nbml0byBjb250YWluZWQgbm8gY3JlZGVudGlhbHNcIik7XG59XG5cbmZ1bmN0aW9uIHRocm93T25NaXNzaW5nU2VjcmV0S2V5KCk6IG5ldmVyIHtcbiAgdGhyb3cgbmV3IFByb3ZpZGVyRXJyb3IoXCJSZXNwb25zZSBmcm9tIEFtYXpvbiBDb2duaXRvIGNvbnRhaW5lZCBubyBzZWNyZXQga2V5XCIpO1xufVxuIl19","import { __extends } from \"tslib\";\nimport { GetIdInput, GetIdResponse } from \"../models/models_0\";\nimport { deserializeAws_json1_1GetIdCommand, serializeAws_json1_1GetIdCommand } from \"../protocols/Aws_json1_1\";\nimport { getSerdePlugin } from \"@aws-sdk/middleware-serde\";\nimport { Command as $Command } from \"@aws-sdk/smithy-client\";\n/**\n *Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an\n * implicit linked account.
\n *This is a public API. You do not need any credentials to call this API.
\n */\nvar GetIdCommand = /** @class */ (function (_super) {\n __extends(GetIdCommand, _super);\n // Start section: command_properties\n // End section: command_properties\n function GetIdCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n GetIdCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {\n this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));\n var stack = clientStack.concat(this.middlewareStack);\n var logger = configuration.logger;\n var clientName = \"CognitoIdentityClient\";\n var commandName = \"GetIdCommand\";\n var handlerExecutionContext = {\n logger: logger,\n clientName: clientName,\n commandName: commandName,\n inputFilterSensitiveLog: GetIdInput.filterSensitiveLog,\n outputFilterSensitiveLog: GetIdResponse.filterSensitiveLog,\n };\n var requestHandler = configuration.requestHandler;\n return stack.resolve(function (request) {\n return requestHandler.handle(request.request, options || {});\n }, handlerExecutionContext);\n };\n GetIdCommand.prototype.serialize = function (input, context) {\n return serializeAws_json1_1GetIdCommand(input, context);\n };\n GetIdCommand.prototype.deserialize = function (output, context) {\n return deserializeAws_json1_1GetIdCommand(output, context);\n };\n return GetIdCommand;\n}($Command));\nexport { GetIdCommand };\n//# sourceMappingURL=GetIdCommand.js.map","var STORE_NAME = \"IdentityIds\";\nvar IndexedDbStorage = /** @class */ (function () {\n function IndexedDbStorage(dbName) {\n if (dbName === void 0) { dbName = \"aws:cognito-identity-ids\"; }\n this.dbName = dbName;\n }\n IndexedDbStorage.prototype.getItem = function (key) {\n return this.withObjectStore(\"readonly\", function (store) {\n var req = store.get(key);\n return new Promise(function (resolve) {\n req.onerror = function () { return resolve(null); };\n req.onsuccess = function () { return resolve(req.result ? req.result.value : null); };\n });\n }).catch(function () { return null; });\n };\n IndexedDbStorage.prototype.removeItem = function (key) {\n return this.withObjectStore(\"readwrite\", function (store) {\n var req = store.delete(key);\n return new Promise(function (resolve, reject) {\n req.onerror = function () { return reject(req.error); };\n req.onsuccess = function () { return resolve(); };\n });\n });\n };\n IndexedDbStorage.prototype.setItem = function (id, value) {\n return this.withObjectStore(\"readwrite\", function (store) {\n var req = store.put({ id: id, value: value });\n return new Promise(function (resolve, reject) {\n req.onerror = function () { return reject(req.error); };\n req.onsuccess = function () { return resolve(); };\n });\n });\n };\n IndexedDbStorage.prototype.getDb = function () {\n var openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise(function (resolve, reject) {\n openDbRequest.onsuccess = function () {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = function () {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = function () {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = function () {\n var db = openDbRequest.result;\n db.onerror = function () {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, { keyPath: \"id\" });\n };\n });\n };\n IndexedDbStorage.prototype.withObjectStore = function (mode, action) {\n return this.getDb().then(function (db) {\n var tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = function () { return db.close(); };\n return new Promise(function (resolve, reject) {\n tx.onerror = function () { return reject(tx.error); };\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch(function (err) {\n db.close();\n throw err;\n });\n });\n };\n return IndexedDbStorage;\n}());\nexport { IndexedDbStorage };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5kZXhlZERiU3RvcmFnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9JbmRleGVkRGJTdG9yYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLElBQU0sVUFBVSxHQUFHLGFBQWEsQ0FBQztBQUVqQztJQUNFLDBCQUE2QixNQUEyQztRQUEzQyx1QkFBQSxFQUFBLG1DQUEyQztRQUEzQyxXQUFNLEdBQU4sTUFBTSxDQUFxQztJQUFHLENBQUM7SUFFNUUsa0NBQU8sR0FBUCxVQUFRLEdBQVc7UUFDakIsT0FBTyxJQUFJLENBQUMsZUFBZSxDQUFDLFVBQVUsRUFBRSxVQUFDLEtBQUs7WUFDNUMsSUFBTSxHQUFHLEdBQUcsS0FBSyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQztZQUUzQixPQUFPLElBQUksT0FBTyxDQUFnQixVQUFDLE9BQU87Z0JBQ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G9yZShTVE9SRV9OQU1FKSkpO1xuICAgICAgfSkuY2F0Y2goKGVycikgPT4ge1xuICAgICAgICBkYi5jbG9zZSgpO1xuICAgICAgICB0aHJvdyBlcnI7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxufVxuIl19","import { IndexedDbStorage } from \"./IndexedDbStorage\";\nimport { InMemoryStorage } from \"./InMemoryStorage\";\nvar inMemoryStorage = new InMemoryStorage();\nexport function localStorage() {\n if (typeof self === \"object\" && self.indexedDB) {\n return new IndexedDbStorage();\n }\n if (typeof window === \"object\" && window.localStorage) {\n return window.localStorage;\n }\n return inMemoryStorage;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxTdG9yYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2xvY2FsU3RvcmFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUN0RCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFHcEQsSUFBTSxlQUFlLEdBQUcsSUFBSSxlQUFlLEVBQUUsQ0FBQztBQUU5QyxNQUFNLFVBQVUsWUFBWTtJQUMxQixJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsSUFBSSxJQUFJLENBQUMsU0FBUyxFQUFFO1FBQzlDLE9BQU8sSUFBSSxnQkFBZ0IsRUFBRSxDQUFDO0tBQy9CO0lBRUQsSUFBSSxPQUFPLE1BQU0sS0FBSyxRQUFRLElBQUksTUFBTSxDQUFDLFlBQVksRUFBRTtRQUNyRCxPQUFPLE1BQU0sQ0FBQyxZQUFZLENBQUM7S0FDNUI7SUFFRCxPQUFPLGVBQWUsQ0FBQztBQUN6QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5kZXhlZERiU3RvcmFnZSB9IGZyb20gXCIuL0luZGV4ZWREYlN0b3JhZ2VcIjtcbmltcG9ydCB7IEluTWVtb3J5U3RvcmFnZSB9IGZyb20gXCIuL0luTWVtb3J5U3RvcmFnZVwiO1xuaW1wb3J0IHsgU3RvcmFnZSB9IGZyb20gXCIuL1N0b3JhZ2VcIjtcblxuY29uc3QgaW5NZW1vcnlTdG9yYWdlID0gbmV3IEluTWVtb3J5U3RvcmFnZSgpO1xuXG5leHBvcnQgZnVuY3Rpb24gbG9jYWxTdG9yYWdlKCk6IFN0b3JhZ2Uge1xuICBpZiAodHlwZW9mIHNlbGYgPT09IFwib2JqZWN0XCIgJiYgc2VsZi5pbmRleGVkREIpIHtcbiAgICByZXR1cm4gbmV3IEluZGV4ZWREYlN0b3JhZ2UoKTtcbiAgfVxuXG4gIGlmICh0eXBlb2Ygd2luZG93ID09PSBcIm9iamVjdFwiICYmIHdpbmRvdy5sb2NhbFN0b3JhZ2UpIHtcbiAgICByZXR1cm4gd2luZG93LmxvY2FsU3RvcmFnZTtcbiAgfVxuXG4gIHJldHVybiBpbk1lbW9yeVN0b3JhZ2U7XG59XG4iXX0=","var InMemoryStorage = /** @class */ (function () {\n function InMemoryStorage(store) {\n if (store === void 0) { store = {}; }\n this.store = store;\n }\n InMemoryStorage.prototype.getItem = function (key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n };\n InMemoryStorage.prototype.removeItem = function (key) {\n delete this.store[key];\n };\n InMemoryStorage.prototype.setItem = function (key, value) {\n this.store[key] = value;\n };\n return InMemoryStorage;\n}());\nexport { InMemoryStorage };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5NZW1vcnlTdG9yYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0luTWVtb3J5U3RvcmFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQTtJQUNFLHlCQUFv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b3JlW2tleV07XG4gIH1cblxuICBzZXRJdGVtKGtleTogc3RyaW5nLCB2YWx1ZTogc3RyaW5nKTogdm9pZCB7XG4gICAgdGhpcy5zdG9yZVtrZXldID0gdmFsdWU7XG4gIH1cbn1cbiJdfQ==","import { __awaiter, __generator } from \"tslib\";\nimport { GetIdCommand } from \"@aws-sdk/client-cognito-identity\";\nimport { ProviderError } from \"@aws-sdk/property-provider\";\nimport { fromCognitoIdentity } from \"./fromCognitoIdentity\";\nimport { localStorage } from \"./localStorage\";\nimport { resolveLogins } from \"./resolveLogins\";\n/**\n * Retrieves or generates a unique identifier using Amazon Cognito's `GetId`\n * operation, then generates temporary AWS credentials using Amazon Cognito's\n * `GetCredentialsForIdentity` operation.\n *\n * Results from `GetId` are cached internally, but results from\n * `GetCredentialsForIdentity` are not.\n */\nexport function fromCognitoIdentityPool(_a) {\n var _this = this;\n var accountId = _a.accountId, _b = _a.cache, cache = _b === void 0 ? localStorage() : _b, client = _a.client, customRoleArn = _a.customRoleArn, identityPoolId = _a.identityPoolId, logins = _a.logins, _c = _a.userIdentifier, userIdentifier = _c === void 0 ? !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : undefined : _c;\n var cacheKey = userIdentifier ? \"aws:cognito-identity-credentials:\" + identityPoolId + \":\" + userIdentifier : undefined;\n var provider = function () { return __awaiter(_this, void 0, void 0, function () {\n var identityId, _a, _b, IdentityId, _c, _d, _e, _f;\n var _g;\n return __generator(this, function (_h) {\n switch (_h.label) {\n case 0:\n _a = cacheKey;\n if (!_a) return [3 /*break*/, 2];\n return [4 /*yield*/, cache.getItem(cacheKey)];\n case 1:\n _a = (_h.sent());\n _h.label = 2;\n case 2:\n identityId = _a;\n if (!!identityId) return [3 /*break*/, 7];\n _d = (_c = client).send;\n _e = GetIdCommand.bind;\n _g = {\n AccountId: accountId,\n IdentityPoolId: identityPoolId\n };\n if (!logins) return [3 /*break*/, 4];\n return [4 /*yield*/, resolveLogins(logins)];\n case 3:\n _f = _h.sent();\n return [3 /*break*/, 5];\n case 4:\n _f = undefined;\n _h.label = 5;\n case 5: return [4 /*yield*/, _d.apply(_c, [new (_e.apply(GetIdCommand, [void 0, (_g.Logins = _f,\n _g)]))()])];\n case 6:\n _b = (_h.sent()).IdentityId, IdentityId = _b === void 0 ? throwOnMissingId() : _b;\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(function () { });\n }\n _h.label = 7;\n case 7:\n provider = fromCognitoIdentity({\n client: client,\n customRoleArn: customRoleArn,\n logins: logins,\n identityId: identityId,\n });\n return [2 /*return*/, provider()];\n }\n });\n }); };\n return function () {\n return provider().catch(function (err) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(function () { });\n }\n throw err;\n });\n }); });\n };\n}\nfunction throwOnMissingId() {\n throw new ProviderError(\"Response from Amazon Cognito contained no identity ID\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUNvZ25pdG9JZGVudGl0eVBvb2wuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZnJvbUNvZ25pdG9JZGVudGl0eVBvb2wudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUNoRSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFJM0QsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDNUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzlDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUdoRDs7Ozs7OztHQU9HO0FBQ0gsTUFBTSxVQU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2lzLlxuICAgKi9cbiAgdXNlcklkZW50aWZpZXI/OiBzdHJpbmc7XG59XG5cbmZ1bmN0aW9uIHRocm93T25NaXNzaW5nSWQoKTogbmV2ZXIge1xuICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihcIlJlc3BvbnNlIGZyb20gQW1hem9uIENvZ25pdG8gY29udGFpbmVkIG5vIGlkZW50aXR5IElEXCIpO1xufVxuIl19","export var escapeUri = function (uri) {\n // AWS percent-encodes some extra non-standard characters in a URI\n return encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\n};\nvar hexEncode = function (c) { return \"%\" + c.charCodeAt(0).toString(16).toUpperCase(); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNjYXBlLXVyaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lc2NhcGUtdXJpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxJQUFNLFNBQVMsR0FBRyxVQUFDLEdBQVc7SUFDbkMsa0VBQWtFO0lBQ2xFLE9BQUEsa0JBQWtCLENBQUMsR0FBRyxDQUFDLENBQUMsT0FBTyxDQUFDLFVBQVUsRUFBRSxTQUFTLENBQUM7QUFBdEQsQ0FBc0QsQ0FBQztBQUV6RCxJQUFNLFNBQVMsR0FBRyxVQUFDLENBQVMsSUFBSyxPQUFBLE1BQUksQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFDLENBQUMsV0FBVyxFQUFJLEVBQWhELENBQWdELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgZXNjYXBlVXJpID0gKHVyaTogc3RyaW5nKTogc3RyaW5nID0+XG4gIC8vIEFXUyBwZXJjZW50LWVuY29kZXMgc29tZSBleHRyYSBub24tc3RhbmRhcmQgY2hhcmFjdGVycyBpbiBhIFVSSVxuICBlbmNvZGVVUklDb21wb25lbnQodXJpKS5yZXBsYWNlKC9bIScoKSpdL2csIGhleEVuY29kZSk7XG5cbmNvbnN0IGhleEVuY29kZSA9IChjOiBzdHJpbmcpID0+IGAlJHtjLmNoYXJDb2RlQXQoMCkudG9TdHJpbmcoMTYpLnRvVXBwZXJDYXNlKCl9YDtcbiJdfQ==","var alphabetByEncoding = {};\nvar alphabetByValue = new Array(64);\nfor (var i = 0, start = \"A\".charCodeAt(0), limit = \"Z\".charCodeAt(0); i + start <= limit; i++) {\n var char = String.fromCharCode(i + start);\n alphabetByEncoding[char] = i;\n alphabetByValue[i] = char;\n}\nfor (var i = 0, start = \"a\".charCodeAt(0), limit = \"z\".charCodeAt(0); i + start <= limit; i++) {\n var char = String.fromCharCode(i + start);\n var index = i + 26;\n alphabetByEncoding[char] = index;\n alphabetByValue[index] = char;\n}\nfor (var i = 0; i < 10; i++) {\n alphabetByEncoding[i.toString(10)] = i + 52;\n var char = i.toString(10);\n var index = i + 52;\n alphabetByEncoding[char] = index;\n alphabetByValue[index] = char;\n}\nalphabetByEncoding[\"+\"] = 62;\nalphabetByValue[62] = \"+\";\nalphabetByEncoding[\"/\"] = 63;\nalphabetByValue[63] = \"/\";\nvar bitsPerLetter = 6;\nvar bitsPerByte = 8;\nvar maxLetterValue = 63;\n/**\n * Converts a base-64 encoded string to a Uint8Array of bytes.\n *\n * @param input The base-64 encoded string\n *\n * @see https://tools.ietf.org/html/rfc4648#section-4\n */\nexport function fromBase64(input) {\n var totalByteLength = (input.length / 4) * 3;\n if (input.substr(-2) === \"==\") {\n totalByteLength -= 2;\n }\n else if (input.substr(-1) === \"=\") {\n totalByteLength--;\n }\n var out = new ArrayBuffer(totalByteLength);\n var dataView = new DataView(out);\n for (var i = 0; i < input.length; i += 4) {\n var bits = 0;\n var bitLength = 0;\n for (var j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter);\n bitLength += bitsPerLetter;\n }\n else {\n bits >>= bitsPerLetter;\n }\n }\n var chunkOffset = (i / 4) * 3;\n bits >>= bitLength % bitsPerByte;\n var byteLength = Math.floor(bitLength / bitsPerByte);\n for (var k = 0; k < byteLength; k++) {\n var offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);\n }\n }\n return new Uint8Array(out);\n}\n/**\n * Converts a Uint8Array of binary data to a base-64 encoded string.\n *\n * @param input The binary data to encode\n *\n * @see https://tools.ietf.org/html/rfc4648#section-4\n */\nexport function toBase64(input) {\n var str = \"\";\n for (var i = 0; i < input.length; i += 3) {\n var bits = 0;\n var bitLength = 0;\n for (var j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {\n bits |= input[j] << ((limit - j - 1) * bitsPerByte);\n bitLength += bitsPerByte;\n }\n var bitClusterCount = Math.ceil(bitLength / bitsPerLetter);\n bits <<= bitClusterCount * bitsPerLetter - bitLength;\n for (var k = 1; k <= bitClusterCount; k++) {\n var offset = (bitClusterCount - k) * bitsPerLetter;\n str += alphabetByValue[(bits & (maxLetterValue << offset)) >> offset];\n }\n str += \"==\".slice(0, 4 - bitClusterCount);\n }\n return str;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBTSxrQkFBa0IsR0FBOEIsRUFBRSxDQUFDO0FBQ3pELElBQU0sZUFBZSxHQUFrQixJQUFJLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQztBQUVyRCxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxLQUFLLEdBQUcsR0FBRyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsRUFBRSxLQUFLLEd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291bnQgKiBiaXRzUGVyTGV0dGVyIC0gYml0TGVuZ3RoO1xuICAgIGZvciAobGV0IGsgPSAxOyBrIDw9IGJpdENsdXN0ZXJDb3VudDsgaysrKSB7XG4gICAgICBjb25zdCBvZmZzZXQgPSAoYml0Q2x1c3RlckNvdW50IC0gaykgKiBiaXRzUGVyTGV0dGVyO1xuICAgICAgc3RyICs9IGFscGhhYmV0QnlWYWx1ZVsoYml0cyAmIChtYXhMZXR0ZXJWYWx1ZSA8PCBvZmZzZXQpKSA+PiBvZmZzZXRdO1xuICAgIH1cblxuICAgIHN0ciArPSBcIj09XCIuc2xpY2UoMCwgNCAtIGJpdENsdXN0ZXJDb3VudCk7XG4gIH1cblxuICByZXR1cm4gc3RyO1xufVxuIl19","import { __values } from \"tslib\";\nimport { HttpResponse } from \"@aws-sdk/protocol-http\";\nimport { buildQueryString } from \"@aws-sdk/querystring-builder\";\nimport { requestTimeout } from \"./request-timeout\";\nvar FetchHttpHandler = /** @class */ (function () {\n function FetchHttpHandler(_a) {\n var _b = _a === void 0 ? {} : _a, requestTimeout = _b.requestTimeout;\n this.requestTimeout = requestTimeout;\n }\n FetchHttpHandler.prototype.destroy = function () {\n // Do nothing. TLS and HTTP/2 connection pooling is handled by the browser.\n };\n FetchHttpHandler.prototype.handle = function (request, _a) {\n var _b = _a === void 0 ? {} : _a, abortSignal = _b.abortSignal;\n var requestTimeoutInMs = this.requestTimeout;\n // if the request was already aborted, prevent doing extra work\n if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n var abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return Promise.reject(abortError);\n }\n var path = request.path;\n if (request.query) {\n var queryString = buildQueryString(request.query);\n if (queryString) {\n path += \"?\" + queryString;\n }\n }\n var port = request.port, method = request.method;\n var url = request.protocol + \"//\" + request.hostname + (port ? \":\" + port : \"\") + path;\n // Request constructor doesn't allow GET/HEAD request with body\n // ref: https://github.com/whatwg/fetch/issues/551\n var body = method === \"GET\" || method === \"HEAD\" ? undefined : request.body;\n var requestOptions = {\n body: body,\n headers: new Headers(request.headers),\n method: method,\n };\n // some browsers support abort signal\n if (typeof AbortController !== \"undefined\") {\n requestOptions[\"signal\"] = abortSignal;\n }\n var fetchRequest = new Request(url, requestOptions);\n var raceOfPromises = [\n fetch(fetchRequest).then(function (response) {\n var e_1, _a;\n var fetchHeaders = response.headers;\n var transformedHeaders = {};\n try {\n for (var _b = __values(fetchHeaders.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var pair = _c.value;\n transformedHeaders[pair[0]] = pair[1];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var hasReadableStream = response.body !== undefined;\n // Return the response with buffered body\n if (!hasReadableStream) {\n return response.blob().then(function (body) { return ({\n response: new HttpResponse({\n headers: transformedHeaders,\n statusCode: response.status,\n body: body,\n }),\n }); });\n }\n // Return the response with streaming body\n return {\n response: new HttpResponse({\n headers: transformedHeaders,\n statusCode: response.status,\n body: response.body,\n }),\n };\n }),\n requestTimeout(requestTimeoutInMs),\n ];\n if (abortSignal) {\n raceOfPromises.push(new Promise(function (resolve, reject) {\n abortSignal.onabort = function () {\n var abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n };\n }));\n }\n return Promise.race(raceOfPromises);\n };\n return FetchHttpHandler;\n}());\nexport { FetchHttpHandler };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmV0Y2gtaHR0cC1oYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ZldGNoLWh0dHAtaGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUE0QixZQUFZLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQU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Ugd2l0aCBzdHJlYW1pbmcgYm9keVxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHJlc3BvbnNlOiBuZXcgSHR0cFJlc3BvbnNlKHtcbiAgICAgICAgICAgIGhlYWRlcnM6IHRyYW5zZm9ybWVkSGVhZGVycyxcbiAgICAgICAgICAgIHN0YXR1c0NvZGU6IHJlc3BvbnNlLnN0YXR1cyxcbiAgICAgICAgICAgIGJvZHk6IHJlc3BvbnNlLmJvZHksXG4gICAgICAgICAgfSksXG4gICAgICAgIH07XG4gICAgICB9KSxcbiAgICAgIHJlcXVlc3RUaW1lb3V0KHJlcXVlc3RUaW1lb3V0SW5NcyksXG4gICAgXTtcbiAgICBpZiAoYWJvcnRTaWduYWwpIHtcbiAgICAgIHJhY2VPZlByb21pc2VzLnB1c2goXG4gICAgICAgIG5ldyBQcm9taXNlPG5ldmVyPigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgYWJvcnRTaWduYWwub25hYm9ydCA9ICgpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGFib3J0RXJyb3IgPSBuZXcgRXJyb3IoXCJSZXF1ZXN0IGFib3J0ZWRcIik7XG4gICAgICAgICAgICBhYm9ydEVycm9yLm5hbWUgPSBcIkFib3J0RXJyb3JcIjtcbiAgICAgICAgICAgIHJlamVjdChhYm9ydEVycm9yKTtcbiAgICAgICAgICB9O1xuICAgICAgICB9KVxuICAgICAgKTtcbiAgICB9XG4gICAgcmV0dXJuIFByb21pc2UucmFjZShyYWNlT2ZQcm9taXNlcyk7XG4gIH1cbn1cbiJdfQ==","import { __values } from \"tslib\";\nimport { escapeUri } from \"@aws-sdk/util-uri-escape\";\nexport function buildQueryString(query) {\n var e_1, _a;\n var parts = [];\n try {\n for (var _b = __values(Object.keys(query).sort()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n var value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (var i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(key + \"=\" + escapeUri(value[i]));\n }\n }\n else {\n var qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += \"=\" + escapeUri(value);\n }\n parts.push(qsEntry);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return parts.join(\"&\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUVyRCxNQUFNLFVBQVUsZ0JBQWdCLENBQUMsS0FBd0I7O0lBQ3ZELElBQU0sS0FBSyxHQUFhLEVBQUUsQ0FBQzs7UUFDM0IsS0FBZ0IsSUFBQSxLQUFBLFNBQUEsTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxJQUFJLEVBQUUsQ0FBQSxnQkFBQSw0QkFBRTtZQUF0QyxJQUFJLEdBQUcsV0FBQTtZQUNWLElBQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztZQUN6QixHQUFHLEdBQUcsU0FBUyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1lBQ3JCLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRTtnQkFDeEIsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsSUFBSSxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLElBQUksRUFBRSxDQUFDLEVBQUUsRUFBRTtvQkFDbEQsS0FBSyxDQUFDLElBQUksQ0FBSSxHQUFHLFNBQUksU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Sh2YWx1ZVtpXSl9YCk7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIGxldCBxc0VudHJ5ID0ga2V5O1xuICAgICAgaWYgKHZhbHVlIHx8IHR5cGVvZiB2YWx1ZSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICBxc0VudHJ5ICs9IGA9JHtlc2NhcGVVcmkodmFsdWUpfWA7XG4gICAgICB9XG4gICAgICBwYXJ0cy5wdXNoKHFzRW50cnkpO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBwYXJ0cy5qb2luKFwiJlwiKTtcbn1cbiJdfQ==","export function requestTimeout(timeoutInMs) {\n if (timeoutInMs === void 0) { timeoutInMs = 0; }\n return new Promise(function (resolve, reject) {\n if (timeoutInMs) {\n setTimeout(function () {\n var timeoutError = new Error(\"Request did not complete within \" + timeoutInMs + \" ms\");\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC10aW1lb3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JlcXVlc3QtdGltZW91dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFVBQVUsY0FBYyxDQUFDLFdBQWU7SUFBZiw0QkFBQSxFQUFBLGVBQWU7SUFDNUMsT0FBTyxJQUFJLE9BQU8sQ0FBQyxVQUFDLE9BQU8sRUFBRSxNQUFNO1FBQ2pDLElBQUksV0FBVyxFQUFFO1lBQ2YsVUFBVSxDQUFDO2dCQUNULElBQU0sWUFBWSxHQUFHLElBQUksS0FBSyxDQUFDLHFDQUFtQyxXQUFXLFFBQUssQ0FBQyxDQUFDO2dCQUNwRixZQUFZLENBQUMsSUFBSSxHQUFHLGNBQWMsQ0FBQztnQkFDbkMsTUFBTSxDQUFDLFlBQVksQ0FBQyxDQUFDO1lBQ3ZCLENBQUMsRUFBRSxXQUFXLENBQUMsQ0FBQztTQUNqQjtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiByZXF1ZXN0VGltZW91dCh0aW1lb3V0SW5NcyA9IDApOiBQcm9taXNlPG5ldmVyPiB7XG4gIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgaWYgKHRpbWVvdXRJbk1zKSB7XG4gICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgY29uc3QgdGltZW91dEVycm9yID0gbmV3IEVycm9yKGBSZXF1ZXN0IGRpZCBub3QgY29tcGxldGUgd2l0aGluICR7dGltZW91dEluTXN9IG1zYCk7XG4gICAgICAgIHRpbWVvdXRFcnJvci5uYW1lID0gXCJUaW1lb3V0RXJyb3JcIjtcbiAgICAgICAgcmVqZWN0KHRpbWVvdXRFcnJvcik7XG4gICAgICB9LCB0aW1lb3V0SW5Ncyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==","import { __awaiter, __generator } from \"tslib\";\nimport { fromBase64 } from \"@aws-sdk/util-base64-browser\";\n//reference: https://snack.expo.io/r1JCSWRGU\nexport var streamCollector = function (stream) {\n if (typeof Blob === \"function\" && stream instanceof Blob) {\n return collectBlob(stream);\n }\n return collectStream(stream);\n};\nfunction collectBlob(blob) {\n return __awaiter(this, void 0, void 0, function () {\n var base64, arrayBuffer;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, readToBase64(blob)];\n case 1:\n base64 = _a.sent();\n arrayBuffer = fromBase64(base64);\n return [2 /*return*/, new Uint8Array(arrayBuffer)];\n }\n });\n });\n}\nfunction collectStream(stream) {\n return __awaiter(this, void 0, void 0, function () {\n var res, reader, isDone, _a, done, value, prior;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n res = new Uint8Array(0);\n reader = stream.getReader();\n isDone = false;\n _b.label = 1;\n case 1:\n if (!!isDone) return [3 /*break*/, 3];\n return [4 /*yield*/, reader.read()];\n case 2:\n _a = _b.sent(), done = _a.done, value = _a.value;\n if (value) {\n prior = res;\n res = new Uint8Array(prior.length + value.length);\n res.set(prior);\n res.set(value, prior.length);\n }\n isDone = done;\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/, res];\n }\n });\n });\n}\nfunction readToBase64(blob) {\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.onloadend = function () {\n var _a;\n // reference: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL\n // response from readAsDataURL is always prepended with \"data:*/*;base64,\"\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n var result = ((_a = reader.result) !== null && _a !== void 0 ? _a : \"\");\n // Response can include only 'data:' for empty blob, return empty string in this case.\n // Otherwise, return the string after ','\n var commaIndex = result.indexOf(\",\");\n var dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = function () { return reject(new Error(\"Read aborted\")); };\n reader.onerror = function () { return reject(reader.error); };\n // reader.readAsArrayBuffer is not always available\n reader.readAsDataURL(blob);\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyZWFtLWNvbGxlY3Rvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHJlYW0tY29sbGVjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFFMUQsNENBQTRDO0FBQzVDLE1BQU0sQ0FBQyxJQUFNLGVBQWUsR0FBb0IsVUFBQyxNQUE2QjtJQUM1RSxJQUFJLE9BQU8sSUFBSSxLQUFLLFVBQVUsSUFBSSxNQUFNLFlBQVksSUFBS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4gcmVqZWN0KG5ldyBFcnJvcihcIlJlYWRlciBhYm9ydGVkIHRvbyBlYXJseVwiKSk7XG4gICAgICB9XG4gICAgICBjb25zdCByZXN1bHQgPSAocmVhZGVyLnJlc3VsdCA/PyBcIlwiKSBhcyBzdHJpbmc7XG4gICAgICAvLyBSZXNwb25zZSBjYW4gaW5jbHVkZSBvbmx5ICdkYXRhOicgZm9yIGVtcHR5IGJsb2IsIHJldHVybiBlbXB0eSBzdHJpbmcgaW4gdGhpcyBjYXNlLlxuICAgICAgLy8gT3RoZXJ3aXNlLCByZXR1cm4gdGhlIHN0cmluZyBhZnRlciAnLCdcbiAgICAgIGNvbnN0IGNvbW1hSW5kZXggPSByZXN1bHQuaW5kZXhPZihcIixcIik7XG4gICAgICBjb25zdCBkYXRhT2Zmc2V0ID0gY29tbWFJbmRleCA+IC0xID8gY29tbWFJbmRleCArIDEgOiByZXN1bHQubGVuZ3RoO1xuICAgICAgcmVzb2x2ZShyZXN1bHQuc3Vic3RyaW5nKGRhdGFPZmZzZXQpKTtcbiAgICB9O1xuICAgIHJlYWRlci5vbmFib3J0ID0gKCkgPT4gcmVqZWN0KG5ldyBFcnJvcihcIlJlYWQgYWJvcnRlZFwiKSk7XG4gICAgcmVhZGVyLm9uZXJyb3IgPSAoKSA9PiByZWplY3QocmVhZGVyLmVycm9yKTtcbiAgICAvLyByZWFkZXIucmVhZEFzQXJyYXlCdWZmZXIgaXMgbm90IGFsd2F5cyBhdmFpbGFibGVcbiAgICByZWFkZXIucmVhZEFzRGF0YVVSTChibG9iKTtcbiAgfSk7XG59XG4iXX0=","export var invalidProvider = function (message) { return function () { return Promise.reject(message); }; };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52YWxpZFByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ludmFsaWRQcm92aWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxNQUFNLENBQUMsSUFBTSxlQUFlLEdBQXVDLFVBQUMsT0FBZSxJQUFLLE9BQUEsY0FBTSxPQUFBLE9BQU8sQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLEVBQXZCLENBQXVCLEVBQTdCLENBQTZCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuZXhwb3J0IGNvbnN0IGludmFsaWRQcm92aWRlcjogKG1lc3NhZ2U6IHN0cmluZykgPT4gUHJvdmlkZXI8YW55PiA9IChtZXNzYWdlOiBzdHJpbmcpID0+ICgpID0+IFByb21pc2UucmVqZWN0KG1lc3NhZ2UpO1xuIl19","import { __awaiter, __generator, __read, __spread } from \"tslib\";\nexport var retryMiddleware = function (options) { return function (next, context) { return function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var _a;\n return __generator(this, function (_b) {\n if ((_a = options === null || options === void 0 ? void 0 : options.retryStrategy) === null || _a === void 0 ? void 0 : _a.mode)\n context.userAgent = __spread((context.userAgent || []), [[\"cfg/retry-mode\", options.retryStrategy.mode]]);\n return [2 /*return*/, options.retryStrategy.retry(next, args)];\n });\n}); }; }; };\nexport var retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true,\n};\nexport var getRetryPlugin = function (options) { return ({\n applyToStack: function (clientStack) {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n },\n}); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cnlNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JldHJ5TWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBYUEsTUFBTSxDQUFDLElBQU0sZUFBZSxHQUFHL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VxdWVzdEhhbmRsZXJPcHRpb25zICYgQWJzb2x1dGVMb2NhdGlvbiA9IHtcbiAgbmFtZTogXCJyZXRyeU1pZGRsZXdhcmVcIixcbiAgdGFnczogW1wiUkVUUllcIl0sXG4gIHN0ZXA6IFwiZmluYWxpemVSZXF1ZXN0XCIsXG4gIHByaW9yaXR5OiBcImhpZ2hcIixcbiAgb3ZlcnJpZGU6IHRydWUsXG59O1xuXG5leHBvcnQgY29uc3QgZ2V0UmV0cnlQbHVnaW4gPSAob3B0aW9uczogUmV0cnlSZXNvbHZlZENvbmZpZyk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQocmV0cnlNaWRkbGV3YXJlKG9wdGlvbnMpLCByZXRyeU1pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19","/**\n * Errors encountered when the client clock and server clock cannot agree on the\n * current time.\n *\n * These errors are retryable, assuming the SDK has enabled clock skew\n * correction.\n */\nexport var CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\",\n];\n/**\n * Errors that indicate the SDK is being throttled.\n *\n * These errors are always retryable.\n */\nexport var THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\",\n];\n/**\n * Error codes that indicate transient issues\n */\nexport var TRANSIENT_ERROR_CODES = [\"AbortError\", \"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\n/**\n * Error codes that indicate transient issues\n */\nexport var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFDSCxNQUFNLENBQUMsSUFBTSxzQkFBc0IsR0FBRztJQUNwQyxhQUFhO0lBQ2IsMkJBQTJCO0lBQzNCLGdCQUFnQjtJQUNoQixvQkFBb0I7SUFDcEIsc0JBQXNCO0lBQ3RCLHVCQUF1QjtDQUN4QixDQUFDO0FBRUY7Ozs7R0FJRztBQUNILE1BQU0sQ0FBQyxJQUFNLHNCQUFzQixHQUFHO0lBQ3BDLHdCQUF3QjtJQUN4Qix1QkFBdUI7SUFDdkIsd0JBQXdCO0lBQ3hCLHlCQUF5QjtJQUN6Qix3Q0FBd0M7SUFDeEMsc0JBQXNCO0lBQ3RCLGtCQUFrQjtJQUNsQiwyQkFBMkI7SUFDM0IsVUFBVTtJQUNWLG9CQUFvQjtJQUNwQixZQUFZO0lBQ1oscUJBQXFCO0lBQ3JCLDBCQUEwQjtJQUMxQixnQ0FBZ0M7Q0FDakMsQ0FBQztBQUVGOztHQUVHO0FBQ0gsTUFBTSxDQUFDLElBQU0scUJBQXFCLEdBQUcsQ0FBQyxZQUFZLEVBQUUsY0FBYyxFQUFFLGdCQUFnQixFQUFFLHlCQUF5QixDQUFDLENBQUM7QUFFakg7O0dBRUc7QUFDSCxNQUFNLENBQUMsSUFBTSw0QkFBNEIsR0FBRyxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFcnJvcnMgZW5jb3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IFwiU2xvd0Rvd25cIixcbiAgXCJUaHJvdHRsZWRFeGNlcHRpb25cIixcbiAgXCJUaHJvdHRsaW5nXCIsXG4gIFwiVGhyb3R0bGluZ0V4Y2VwdGlvblwiLFxuICBcIlRvb01hbnlSZXF1ZXN0c0V4Y2VwdGlvblwiLFxuICBcIlRyYW5zYWN0aW9uSW5Qcm9ncmVzc0V4Y2VwdGlvblwiLCAvLyBEeW5hbW9EQlxuXTtcblxuLyoqXG4gKiBFcnJvciBjb2RlcyB0aGF0IGluZGljYXRlIHRyYW5zaWVudCBpc3N1ZXNcbiAqL1xuZXhwb3J0IGNvbnN0IFRSQU5TSUVOVF9FUlJPUl9DT0RFUyA9IFtcIkFib3J0RXJyb3JcIiwgXCJUaW1lb3V0RXJyb3JcIiwgXCJSZXF1ZXN0VGltZW91dFwiLCBcIlJlcXVlc3RUaW1lb3V0RXhjZXB0aW9uXCJdO1xuXG4vKipcbiAqIEVycm9yIGNvZGVzIHRoYXQgaW5kaWNhdGUgdHJhbnNpZW50IGlzc3Vlc1xuICovXG5leHBvcnQgY29uc3QgVFJBTlNJRU5UX0VSUk9SX1NUQVRVU19DT0RFUyA9IFs1MDAsIDUwMiwgNTAzLCA1MDRdO1xuIl19","import { CLOCK_SKEW_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from \"./constants\";\nexport var isRetryableByTrait = function (error) { return error.$retryable !== undefined; };\nexport var isClockSkewError = function (error) { return CLOCK_SKEW_ERROR_CODES.includes(error.name); };\nexport var isThrottlingError = function (error) {\n var _a, _b;\n return ((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) === 429 ||\n THROTTLING_ERROR_CODES.includes(error.name) ||\n ((_b = error.$retryable) === null || _b === void 0 ? void 0 : _b.throttling) == true;\n};\nexport var isTransientError = function (error) {\n var _a;\n return TRANSIENT_ERROR_CODES.includes(error.name) ||\n TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) || 0);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUNMLHNCQUFzQixFQUN0QixzQkFBc0IsRUFDdEIscUJBQXFCLEVBQ3JCLDRCQUE0QixHQUM3QixNQUFNLGFBQWEsQ0FBQztBQUVyQixNQUFNLENBQUMsSUFBTSxrQkFBa0IsR0FBRyxVQUFDLEtBQWUsSUFBSyxPQUFBLEtBQUssQ0FBQyxVQUFVLEtBQUssU0FBUyxFQUE5QixDQUE4QixDQUFDO0FBRXRGLE1BQU0sQ0FBQyxJQUFNLGdCQUFnQixHQUFHLFVBQUMsS0FBZSxJQUFLLE9BQUEsc0JBQXNCLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsRUFBM0MsQ0FBMkMsQ0FBQztBQUVqRyxNQUFNLENBQUMsSUFBTSxpQkFBaUIsR0FBRyxVQUFDLEtBQWU7O0lBQy9DLE9BQUEsT0FBQSxLQUFLLENBQUMsU0FBUywwQ0FBRSxjQUFjLE1BQUssR0FBRztRQUN2QyxzQkFBc0IsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQztRQUMzQyxPQUFBLEtBQUssQ0FBQyxVQUFVLDBDQUFFLFVBQVUsS0FBSSxJQUFJLENBQUE7Q0FBQSxDQUFDO0FBRXZDLE1BQU0sQ0FBQyxJQUFNLGdCQUFnQixHQUFHLFVBQUMsS0FBZTs7SUFDOUMsT0FBQSxxQkFBcUIsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQztRQUMxQyw0QkFBNEIsQ0FBQyxRQUFRLENBQUMsT0FBQSxLQUFLLENBQ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vci4kbWV0YWRhdGE/Lmh0dHBTdGF0dXNDb2RlIHx8IDApO1xuIl19","import { MAXIMUM_RETRY_DELAY } from \"./constants\";\n/**\n * Calculate a capped, fully-jittered exponential backoff time.\n */\nexport var defaultDelayDecider = function (delayBase, attempts) {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * Math.pow(2, attempts) * delayBase));\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsYXlEZWNpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlbGF5RGVjaWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFbEQ7O0dBRUc7QUFDSCxNQUFNLENBQUMsSUFBTSxtQkFBbUIsR0FBRyxVQUFDLFNBQWlCLEVBQUUsUUFBZ0I7SUFDckUsT0FBQSxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsbUJBQW1CLEVBQUUsSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLFNBQUEsQ0FBQyxFQUFJLFFBQVEsQ0FBQSxHQUFHLFNBQVMsQ0FBQyxDQUFDO0FBQXBGLENBQW9GLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBNQVhJTVVNX1JFVFJZX0RFTEFZIH0gZnJvbSBcIi4vY29uc3RhbnRzXCI7XG5cbi8qKlxuICogQ2FsY3VsYXRlIGEgY2FwcGVkLCBmdWxseS1qaXR0ZXJlZCBleHBvbmVudGlhbCBiYWNrb2ZmIHRpbWUuXG4gKi9cbmV4cG9ydCBjb25zdCBkZWZhdWx0RGVsYXlEZWNpZGVyID0gKGRlbGF5QmFzZTogbnVtYmVyLCBhdHRlbXB0czogbnVtYmVyKSA9PlxuICBNYXRoLmZsb29yKE1hdGgubWluKE1BWElNVU1fUkVUUllfREVMQVksIE1hdGgucmFuZG9tKCkgKiAyICoqIGF0dGVtcHRzICogZGVsYXlCYXNlKSk7XG4iXX0=","/**\n * The base number of milliseconds to use in calculating a suitable cool-down\n * time when a retryable error is encountered.\n */\nexport var DEFAULT_RETRY_DELAY_BASE = 100;\n/**\n * The maximum amount of time (in milliseconds) that will be used as a delay\n * between retry attempts.\n */\nexport var MAXIMUM_RETRY_DELAY = 20 * 1000;\n/**\n * The retry delay base (in milliseconds) to use when a throttling error is\n * encountered.\n */\nexport var THROTTLING_RETRY_DELAY_BASE = 500;\n/**\n * Initial number of retry tokens in Retry Quota\n */\nexport var INITIAL_RETRY_TOKENS = 500;\n/**\n * The total amount of retry tokens to be decremented from retry token balance.\n */\nexport var RETRY_COST = 5;\n/**\n * The total amount of retry tokens to be decremented from retry token balance\n * when a throttling error is encountered.\n */\nexport var TIMEOUT_RETRY_COST = 10;\n/**\n * The total amount of retry token to be incremented from retry token balance\n * if an SDK operation invocation succeeds without requiring a retry request.\n */\nexport var NO_RETRY_INCREMENT = 1;\n/**\n * Header name for SDK invocation ID\n */\nexport var INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\n/**\n * Header name for request retry information.\n */\nexport var REQUEST_HEADER = \"amz-sdk-request\";\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsSUFBTSx3QkFBd0IsR0FBRyxHQUFHLENBQUM7QUFFNUM7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLElBQU0sbUJBQW1CLEdBQUcsRUFBRSxHQUFHLElBQUksQ0FBQztBQUU3Qzs7O0dBR0c7QUFDSCxNQUFNLENBQUMsSUFBT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gbmFtZSBmb3IgcmVxdWVzdCByZXRyeSBpbmZvcm1hdGlvbi5cbiAqL1xuZXhwb3J0IGNvbnN0IFJFUVVFU1RfSEVBREVSID0gXCJhbXotc2RrLXJlcXVlc3RcIjtcbiJdfQ==","import { isClockSkewError, isRetryableByTrait, isThrottlingError, isTransientError, } from \"@aws-sdk/service-error-classification\";\nexport var defaultRetryDecider = function (error) {\n if (!error) {\n return false;\n }\n return isRetryableByTrait(error) || isClockSkewError(error) || isThrottlingError(error) || isTransientError(error);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cnlEZWNpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JldHJ5RGVjaWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsZ0JBQWdCLEVBQ2hCLGtCQUFrQixFQUNsQixpQkFBaUIsRUFDakIsZ0JBQWdCLEdBQ2pCLE1BQU0sdUNBQXVDLENBQUM7QUFHL0MsTUFBTSxDQUFDLElBQU0sbUJBQW1CLEdBQUcsVUFBQyxLQUFlO0lBQ2pELElBQUksQ0FBQyxLQUFLLEVBQUU7UUFDVixPQUFPLEtBQUssQ0FBQztLQUNkO0lBRUQsT0FBTyxrQkFBa0IsQ0FBQyxLQUFLLENBQUMsSUFBSSxnQkFBZ0IsQ0FBQyxLQUFLLENBQUMsSUFBSSxpQkFBaUIsQ0FBQyxLQUFLLENBQUMsSUFBSSxnQkFBZ0IsQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUNySCxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBpc0Nsb2NrU2tld0Vycm9yLFxuICBpc1JldHJ5YWJsZUJ5VHJhaXQsXG4gIGlzVGhyb3R0bGluZ0Vycm9yLFxuICBpc1RyYW5zaWVudEVycm9yLFxufSBmcm9tIFwiQGF3cy1zZGsvc2VydmljZS1lcnJvci1jbGFzc2lmaWNhdGlvblwiO1xuaW1wb3J0IHsgU2RrRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvc21pdGh5LWNsaWVudFwiO1xuXG5leHBvcnQgY29uc3QgZGVmYXVsdFJldHJ5RGVjaWRlciA9IChlcnJvcjogU2RrRXJyb3IpID0+IHtcbiAgaWYgKCFlcnJvcikge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBpc1JldHJ5YWJsZUJ5VHJhaXQoZXJyb3IpIHx8IGlzQ2xvY2tTa2V3RXJyb3IoZXJyb3IpIHx8IGlzVGhyb3R0bGluZ0Vycm9yKGVycm9yKSB8fCBpc1RyYW5zaWVudEVycm9yKGVycm9yKTtcbn07XG4iXX0=","import { __awaiter, __generator } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nimport { isThrottlingError } from \"@aws-sdk/service-error-classification\";\nimport { v4 } from \"uuid\";\nimport { DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, INVOCATION_ID_HEADER, REQUEST_HEADER, THROTTLING_RETRY_DELAY_BASE, } from \"./constants\";\nimport { getDefaultRetryQuota } from \"./defaultRetryQuota\";\nimport { defaultDelayDecider } from \"./delayDecider\";\nimport { defaultRetryDecider } from \"./retryDecider\";\n/**\n * The default value for how many HTTP requests an SDK should make for a\n * single SDK operation invocation before giving up\n */\nexport var DEFAULT_MAX_ATTEMPTS = 3;\n/**\n * The default retry algorithm to use.\n */\nexport var DEFAULT_RETRY_MODE = \"standard\";\nvar StandardRetryStrategy = /** @class */ (function () {\n function StandardRetryStrategy(maxAttemptsProvider, options) {\n var _a, _b, _c;\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = DEFAULT_RETRY_MODE;\n this.retryDecider = (_a = options === null || options === void 0 ? void 0 : options.retryDecider) !== null && _a !== void 0 ? _a : defaultRetryDecider;\n this.delayDecider = (_b = options === null || options === void 0 ? void 0 : options.delayDecider) !== null && _b !== void 0 ? _b : defaultDelayDecider;\n this.retryQuota = (_c = options === null || options === void 0 ? void 0 : options.retryQuota) !== null && _c !== void 0 ? _c : getDefaultRetryQuota(INITIAL_RETRY_TOKENS);\n }\n StandardRetryStrategy.prototype.shouldRetry = function (error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n };\n StandardRetryStrategy.prototype.getMaxAttempts = function () {\n return __awaiter(this, void 0, void 0, function () {\n var maxAttempts, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.maxAttemptsProvider()];\n case 1:\n maxAttempts = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n maxAttempts = DEFAULT_MAX_ATTEMPTS;\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/, maxAttempts];\n }\n });\n });\n };\n StandardRetryStrategy.prototype.retry = function (next, args) {\n return __awaiter(this, void 0, void 0, function () {\n var retryTokenAmount, attempts, totalDelay, maxAttempts, request, _loop_1, this_1, state_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n attempts = 0;\n totalDelay = 0;\n return [4 /*yield*/, this.getMaxAttempts()];\n case 1:\n maxAttempts = _a.sent();\n request = args.request;\n if (HttpRequest.isInstance(request)) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n _loop_1 = function () {\n var _a, response, output, err_1, delay_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 5]);\n if (HttpRequest.isInstance(request)) {\n request.headers[REQUEST_HEADER] = \"attempt=\" + (attempts + 1) + \"; max=\" + maxAttempts;\n }\n return [4 /*yield*/, next(args)];\n case 1:\n _a = _b.sent(), response = _a.response, output = _a.output;\n this_1.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return [2 /*return*/, { value: { response: response, output: output } }];\n case 2:\n err_1 = _b.sent();\n attempts++;\n if (!this_1.shouldRetry(err_1, attempts, maxAttempts)) return [3 /*break*/, 4];\n retryTokenAmount = this_1.retryQuota.retrieveRetryTokens(err_1);\n delay_1 = this_1.delayDecider(isThrottlingError(err_1) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts);\n totalDelay += delay_1;\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, delay_1); })];\n case 3:\n _b.sent();\n return [2 /*return*/, \"continue\"];\n case 4:\n if (!err_1.$metadata) {\n err_1.$metadata = {};\n }\n err_1.$metadata.attempts = attempts;\n err_1.$metadata.totalRetryDelay = totalDelay;\n throw err_1;\n case 5: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n _a.label = 2;\n case 2:\n if (!true) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1()];\n case 3:\n state_1 = _a.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n return [3 /*break*/, 2];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n return StandardRetryStrategy;\n}());\nexport { StandardRetryStrategy };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdFN0cmF0ZWd5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlZmF1bHRTdHJhdGVneS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3JELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHVDQUF1QyxDQUFDO0FBRzFFLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFFMUIsT0FBTyxFQUNMLHdCQUF3QixFQUN4QixvQkFBb0IsRUFDcEIsb0JBQW9CLEVBQ3BC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gICAgIGVyci4kbWV0YWRhdGEuYXR0ZW1wdHMgPSBhdHRlbXB0cztcbiAgICAgICAgZXJyLiRtZXRhZGF0YS50b3RhbFJldHJ5RGVsYXkgPSB0b3RhbERlbGF5O1xuICAgICAgICB0aHJvdyBlcnI7XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4iXX0=","import { NO_RETRY_INCREMENT, RETRY_COST, TIMEOUT_RETRY_COST } from \"./constants\";\nexport var getDefaultRetryQuota = function (initialRetryTokens) {\n var MAX_CAPACITY = initialRetryTokens;\n var availableCapacity = initialRetryTokens;\n var getCapacityAmount = function (error) { return (error.name === \"TimeoutError\" ? TIMEOUT_RETRY_COST : RETRY_COST); };\n var hasRetryTokens = function (error) { return getCapacityAmount(error) <= availableCapacity; };\n var retrieveRetryTokens = function (error) {\n if (!hasRetryTokens(error)) {\n // retryStrategy should stop retrying, and return last error\n throw new Error(\"No retry token available\");\n }\n var capacityAmount = getCapacityAmount(error);\n availableCapacity -= capacityAmount;\n return capacityAmount;\n };\n var releaseRetryTokens = function (capacityReleaseAmount) {\n availableCapacity += capacityReleaseAmount !== null && capacityReleaseAmount !== void 0 ? capacityReleaseAmount : NO_RETRY_INCREMENT;\n availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);\n };\n return Object.freeze({\n hasRetryTokens: hasRetryTokens,\n retrieveRetryTokens: retrieveRetryTokens,\n releaseRetryTokens: releaseRetryTokens,\n });\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdFJldHJ5UXVvdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGVmYXVsdFJldHJ5UXVvdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFVBQVUsRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUdqRixNQUFNLENBQUMsSUF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ldHJ5aW5nLCBhbmQgcmV0dXJuIGxhc3QgZXJyb3JcbiAgICAgIHRocm93IG5ldyBFcnJvcihcIk5vIHJldHJ5IHRva2VuIGF2YWlsYWJsZVwiKTtcbiAgICB9XG4gICAgY29uc3QgY2FwYWNpdHlBbW91bnQgPSBnZXRDYXBhY2l0eUFtb3VudChlcnJvcik7XG4gICAgYXZhaWxhYmxlQ2FwYWNpdHkgLT0gY2FwYWNpdHlBbW91bnQ7XG4gICAgcmV0dXJuIGNhcGFjaXR5QW1vdW50O1xuICB9O1xuXG4gIGNvbnN0IHJlbGVhc2VSZXRyeVRva2VucyA9IChjYXBhY2l0eVJlbGVhc2VBbW91bnQ/OiBudW1iZXIpID0+IHtcbiAgICBhdmFpbGFibGVDYXBhY2l0eSArPSBjYXBhY2l0eVJlbGVhc2VBbW91bnQgPz8gTk9fUkVUUllfSU5DUkVNRU5UO1xuICAgIGF2YWlsYWJsZUNhcGFjaXR5ID0gTWF0aC5taW4oYXZhaWxhYmxlQ2FwYWNpdHksIE1BWF9DQVBBQ0lUWSk7XG4gIH07XG5cbiAgcmV0dXJuIE9iamVjdC5mcmVlemUoe1xuICAgIGhhc1JldHJ5VG9rZW5zLFxuICAgIHJldHJpZXZlUmV0cnlUb2tlbnMsXG4gICAgcmVsZWFzZVJldHJ5VG9rZW5zLFxuICB9KTtcbn07XG4iXX0=","import { __assign } from \"tslib\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, StandardRetryStrategy } from \"./defaultStrategy\";\nexport var ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nexport var CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nexport var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: function (env) {\n var value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n var maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(\"Environment variable \" + ENV_MAX_ATTEMPTS + \" mast be a number, got \\\"\" + value + \"\\\"\");\n }\n return maxAttempt;\n },\n configFileSelector: function (profile) {\n var value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n var maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(\"Shared config file entry \" + CONFIG_MAX_ATTEMPTS + \" mast be a number, got \\\"\" + value + \"\\\"\");\n }\n return maxAttempt;\n },\n default: DEFAULT_MAX_ATTEMPTS,\n};\nexport var resolveRetryConfig = function (input) {\n var maxAttempts = normalizeMaxAttempts(input.maxAttempts);\n return __assign(__assign({}, input), { maxAttempts: maxAttempts, retryStrategy: input.retryStrategy || new StandardRetryStrategy(maxAttempts) });\n};\nvar normalizeMaxAttempts = function (maxAttempts) {\n if (maxAttempts === void 0) { maxAttempts = DEFAULT_MAX_ATTEMPTS; }\n if (typeof maxAttempts === \"number\") {\n var promisified_1 = Promise.resolve(maxAttempts);\n return function () { return promisified_1; };\n }\n return maxAttempts;\n};\nexport var ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nexport var CONFIG_RETRY_MODE = \"retry_mode\";\nexport var NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: function (env) { return env[ENV_RETRY_MODE]; },\n configFileSelector: function (profile) { return profile[CONFIG_RETRY_MODE]; },\n default: DEFAULT_RETRY_MODE,\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUdBLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxrQkFBa0IsRUFBRSxxQkFBcUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBRXBHLE1BQU0sQ0FBQyxJQUFNLGdCQUFnQixHQUFHLGtCQUFrQixDQUFDO0FBQ25ELE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mlnRmlsZVNlbGVjdG9yOiAocHJvZmlsZSkgPT4gcHJvZmlsZVtDT05GSUdfUkVUUllfTU9ERV0sXG4gIGRlZmF1bHQ6IERFRkFVTFRfUkVUUllfTU9ERSxcbn07XG4iXX0=","import { __assign } from \"tslib\";\n// Partition default templates\nvar AWS_TEMPLATE = \"cognito-identity.{region}.amazonaws.com\";\nvar AWS_CN_TEMPLATE = \"cognito-identity.{region}.amazonaws.com.cn\";\nvar AWS_ISO_TEMPLATE = \"cognito-identity.{region}.c2s.ic.gov\";\nvar AWS_ISO_B_TEMPLATE = \"cognito-identity.{region}.sc2s.sgov.gov\";\nvar AWS_US_GOV_TEMPLATE = \"cognito-identity.{region}.amazonaws.com\";\n// Partition regions\nvar AWS_REGIONS = new Set([\n \"af-south-1\",\n \"ap-east-1\",\n \"ap-northeast-1\",\n \"ap-northeast-2\",\n \"ap-south-1\",\n \"ap-southeast-1\",\n \"ap-southeast-2\",\n \"ca-central-1\",\n \"eu-central-1\",\n \"eu-north-1\",\n \"eu-south-1\",\n \"eu-west-1\",\n \"eu-west-2\",\n \"eu-west-3\",\n \"me-south-1\",\n \"sa-east-1\",\n \"us-east-1\",\n \"us-east-2\",\n \"us-west-1\",\n \"us-west-2\",\n]);\nvar AWS_CN_REGIONS = new Set([\"cn-north-1\", \"cn-northwest-1\"]);\nvar AWS_ISO_REGIONS = new Set([\"us-iso-east-1\"]);\nvar AWS_ISO_B_REGIONS = new Set([\"us-isob-east-1\"]);\nvar AWS_US_GOV_REGIONS = new Set([\"us-gov-east-1\", \"us-gov-west-1\"]);\nexport var defaultRegionInfoProvider = function (region, options) {\n var regionInfo = undefined;\n switch (region) {\n // First, try to match exact region names.\n case \"ap-northeast-1\":\n regionInfo = {\n hostname: \"cognito-identity.ap-northeast-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"ap-northeast-2\":\n regionInfo = {\n hostname: \"cognito-identity.ap-northeast-2.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"ap-south-1\":\n regionInfo = {\n hostname: \"cognito-identity.ap-south-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"ap-southeast-1\":\n regionInfo = {\n hostname: \"cognito-identity.ap-southeast-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"ap-southeast-2\":\n regionInfo = {\n hostname: \"cognito-identity.ap-southeast-2.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"ca-central-1\":\n regionInfo = {\n hostname: \"cognito-identity.ca-central-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"cn-north-1\":\n regionInfo = {\n hostname: \"cognito-identity.cn-north-1.amazonaws.com.cn\",\n partition: \"aws-cn\",\n };\n break;\n case \"eu-central-1\":\n regionInfo = {\n hostname: \"cognito-identity.eu-central-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"eu-north-1\":\n regionInfo = {\n hostname: \"cognito-identity.eu-north-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"eu-west-1\":\n regionInfo = {\n hostname: \"cognito-identity.eu-west-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"eu-west-2\":\n regionInfo = {\n hostname: \"cognito-identity.eu-west-2.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"eu-west-3\":\n regionInfo = {\n hostname: \"cognito-identity.eu-west-3.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"fips-us-east-1\":\n regionInfo = {\n hostname: \"cognito-identity-fips.us-east-1.amazonaws.com\",\n partition: \"aws\",\n signingRegion: \"us-east-1\",\n };\n break;\n case \"fips-us-east-2\":\n regionInfo = {\n hostname: \"cognito-identity-fips.us-east-2.amazonaws.com\",\n partition: \"aws\",\n signingRegion: \"us-east-2\",\n };\n break;\n case \"fips-us-gov-west-1\":\n regionInfo = {\n hostname: \"cognito-identity-fips.us-gov-west-1.amazonaws.com\",\n partition: \"aws-us-gov\",\n signingRegion: \"us-gov-west-1\",\n };\n break;\n case \"fips-us-west-2\":\n regionInfo = {\n hostname: \"cognito-identity-fips.us-west-2.amazonaws.com\",\n partition: \"aws\",\n signingRegion: \"us-west-2\",\n };\n break;\n case \"sa-east-1\":\n regionInfo = {\n hostname: \"cognito-identity.sa-east-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"us-east-1\":\n regionInfo = {\n hostname: \"cognito-identity.us-east-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"us-east-2\":\n regionInfo = {\n hostname: \"cognito-identity.us-east-2.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"us-gov-west-1\":\n regionInfo = {\n hostname: \"cognito-identity.us-gov-west-1.amazonaws.com\",\n partition: \"aws-us-gov\",\n };\n break;\n case \"us-west-1\":\n regionInfo = {\n hostname: \"cognito-identity.us-west-1.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n case \"us-west-2\":\n regionInfo = {\n hostname: \"cognito-identity.us-west-2.amazonaws.com\",\n partition: \"aws\",\n };\n break;\n // Next, try to match partition endpoints.\n default:\n if (AWS_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws\",\n };\n }\n if (AWS_CN_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_CN_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws-cn\",\n };\n }\n if (AWS_ISO_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_ISO_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws-iso\",\n };\n }\n if (AWS_ISO_B_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_ISO_B_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws-iso-b\",\n };\n }\n if (AWS_US_GOV_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_US_GOV_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws-us-gov\",\n };\n }\n // Finally, assume it's an AWS partition endpoint.\n if (regionInfo === undefined) {\n regionInfo = {\n hostname: AWS_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws\",\n };\n }\n }\n return Promise.resolve(__assign({ signingService: \"cognito-identity\" }, regionInfo));\n};\n//# sourceMappingURL=endpoints.js.map","import { parseQueryString } from \"@aws-sdk/querystring-parser\";\nexport var parseUrl = function (url) {\n var _a = new URL(url), hostname = _a.hostname, pathname = _a.pathname, port = _a.port, protocol = _a.protocol, search = _a.search;\n var query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname: hostname,\n port: port ? parseInt(port) : undefined,\n protocol: protocol,\n path: pathname,\n query: query,\n };\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFHL0QsTUFBTSxDQUFDLElBQU0sUUFBUSxHQUFjLFVBQUMsR0FBVztJQUN2QyxJQUFBLEtBQWlELElBQUksR0FBRyxDQUFDLEdBQUcsQ0FBQyxFQUEzRCxRQUFRLGNBQUEsRUFBRSxRQUFRLGNBQUEsRUFBRSxJQUFJLFVBQUEsRUFBRSxRQUFRLGNBQUEsRUFBRSxNQUFNLFlBQWlCLENBQUM7SUFFcEUsSUFBSSxLQUFvQyxDQUFDO0lBQ3pDLElBQUksTUFBTSxFQUFFO1FBQ1YsS0FBSyxHQUFHLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFDO0tBQ2xDO0lBRUQsT0FBTztRQUNMLFFBQVEsVUFBQTtRQUNSLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUztRQUN2QyxRQUFRLFVBQUE7UUFDUixJQUFJLEVBQUUsUUFBUTtRQUNkLEtBQUssT0FBQTtLQUNOLENBQUM7QUFDSixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBwYXJzZVF1ZXJ5U3RyaW5nIH0gZnJvbSBcIkBhd3Mtc2RrL3F1ZXJ5c3RyaW5nLXBhcnNlclwiO1xuaW1wb3J0IHsgRW5kcG9pbnQsIFF1ZXJ5UGFyYW1ldGVyQmFnLCBVcmxQYXJzZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGNvbnN0IHBhcnNlVXJsOiBVcmxQYXJzZXIgPSAodXJsOiBzdHJpbmcpOiBFbmRwb2ludCA9PiB7XG4gIGNvbnN0IHsgaG9zdG5hbWUsIHBhdGhuYW1lLCBwb3J0LCBwcm90b2NvbCwgc2VhcmNoIH0gPSBuZXcgVVJMKHVybCk7XG5cbiAgbGV0IHF1ZXJ5OiBRdWVyeVBhcmFtZXRlckJhZyB8IHVuZGVmaW5lZDtcbiAgaWYgKHNlYXJjaCkge1xuICAgIHF1ZXJ5ID0gcGFyc2VRdWVyeVN0cmluZyhzZWFyY2gpO1xuICB9XG5cbiAgcmV0dXJuIHtcbiAgICBob3N0bmFtZSxcbiAgICBwb3J0OiBwb3J0ID8gcGFyc2VJbnQocG9ydCkgOiB1bmRlZmluZWQsXG4gICAgcHJvdG9jb2wsXG4gICAgcGF0aDogcGF0aG5hbWUsXG4gICAgcXVlcnksXG4gIH07XG59O1xuIl19","import { __awaiter, __generator } from \"tslib\";\nimport bowser from \"bowser\";\n/**\n * Default provider to the user agent in browsers. It's a best effort to infer\n * the device information. It uses bowser library to detect the browser and virsion\n */\nexport var defaultUserAgent = function (_a) {\n var serviceId = _a.serviceId, clientVersion = _a.clientVersion;\n return function () { return __awaiter(void 0, void 0, void 0, function () {\n var parsedUA, sections;\n var _a, _b, _c, _d, _e, _f, _g;\n return __generator(this, function (_h) {\n parsedUA = ((_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) ? bowser.parse(window.navigator.userAgent) : undefined;\n sections = [\n // sdk-metadata\n [\"aws-sdk-js\", clientVersion],\n // os-metadata\n [\"os/\" + (((_b = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.os) === null || _b === void 0 ? void 0 : _b.name) || \"other\"), (_c = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.os) === null || _c === void 0 ? void 0 : _c.version],\n // language-metadata\n // ECMAScript edition doesn't matter in JS.\n [\"lang/js\"],\n // browser vendor and version.\n [\"md/browser\", ((_e = (_d = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.browser) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : \"unknown\") + \"_\" + ((_g = (_f = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.browser) === null || _f === void 0 ? void 0 : _f.version) !== null && _g !== void 0 ? _g : \"unknown\")],\n ];\n if (serviceId) {\n // api-metadata\n // service Id may not appear in non-AWS clients\n sections.push([\"api/\" + serviceId, clientVersion]);\n }\n return [2 /*return*/, sections];\n });\n }); };\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLE9BQU8sTUFBTSxNQUFNLFFBQVEsQ0FBQztBQUk1Qjs7O0dBR0c7QUFDSCxNQUFNLENBQUMsSUFBTSxnQkFBZ0IsR0FBRyxVQUFDLEVBR1A7UUFGeEIsU0FBUyxlQUFBLEVBQ1QsYUFBYSxtQkFBQTtJQUNxQyxPQUFBOzs7O1lBQzVDLFFBQVEsR0FBRyxPQUFBLE1BQU0sYUFBTixNQUFNLHVCQUFOLE1BQU0sQ0FBRSxTQUFTLDBDQUFFLFNBQVMsRUFBQyxDQUFDLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxNQUF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NlZFVBPy5icm93c2VyPy5uYW1lID8/IFwidW5rbm93blwifV8ke3BhcnNlZFVBPy5icm93c2VyPy52ZXJzaW9uID8/IFwidW5rbm93blwifWBdLFxuICBdO1xuXG4gIGlmIChzZXJ2aWNlSWQpIHtcbiAgICAvLyBhcGktbWV0YWRhdGFcbiAgICAvLyBzZXJ2aWNlIElkIG1heSBub3QgYXBwZWFyIGluIG5vbi1BV1MgY2xpZW50c1xuICAgIHNlY3Rpb25zLnB1c2goW2BhcGkvJHtzZXJ2aWNlSWR9YCwgY2xpZW50VmVyc2lvbl0pO1xuICB9XG5cbiAgcmV0dXJuIHNlY3Rpb25zO1xufTtcbiJdfQ==","import { defaultRegionInfoProvider } from \"./endpoints\";\nimport { parseUrl } from \"@aws-sdk/url-parser\";\n/**\n * @internal\n */\nexport var ClientSharedValues = {\n apiVersion: \"2014-06-30\",\n disableHostPrefix: false,\n logger: {},\n regionInfoProvider: defaultRegionInfoProvider,\n serviceId: \"Cognito Identity\",\n urlParser: parseUrl,\n};\n//# sourceMappingURL=runtimeConfig.shared.js.map","import { __read, __values } from \"tslib\";\nexport function parseQueryString(querystring) {\n var e_1, _a;\n var query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n try {\n for (var _b = __values(querystring.split(\"&\")), _c = _b.next(); !_c.done; _c = _b.next()) {\n var pair = _c.value;\n var _d = __read(pair.split(\"=\"), 2), key = _d[0], _e = _d[1], value = _e === void 0 ? null : _e;\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n }\n else if (Array.isArray(query[key])) {\n query[key].push(value);\n }\n else {\n query[key] = [query[key], value];\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n return query;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJ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xuICAgICAgICBxdWVyeVtrZXldID0gW3F1ZXJ5W2tleV0gYXMgc3RyaW5nLCB2YWx1ZSBhcyBzdHJpbmddO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBxdWVyeTtcbn1cbiJdfQ==","import { __assign } from \"tslib\";\nimport packageInfo from \"./package.json\";\nimport { Sha256 } from \"@aws-crypto/sha256-browser\";\nimport { FetchHttpHandler, streamCollector } from \"@aws-sdk/fetch-http-handler\";\nimport { invalidProvider } from \"@aws-sdk/invalid-dependency\";\nimport { DEFAULT_MAX_ATTEMPTS } from \"@aws-sdk/middleware-retry\";\nimport { fromBase64, toBase64 } from \"@aws-sdk/util-base64-browser\";\nimport { calculateBodyLength } from \"@aws-sdk/util-body-length-browser\";\nimport { defaultUserAgent } from \"@aws-sdk/util-user-agent-browser\";\nimport { fromUtf8, toUtf8 } from \"@aws-sdk/util-utf8-browser\";\nimport { ClientSharedValues } from \"./runtimeConfig.shared\";\n/**\n * @internal\n */\nexport var ClientDefaultValues = __assign(__assign({}, ClientSharedValues), { runtime: \"browser\", base64Decoder: fromBase64, base64Encoder: toBase64, bodyLengthChecker: calculateBodyLength, credentialDefaultProvider: function (_) { return function () { return Promise.reject(new Error(\"Credential is missing\")); }; }, defaultUserAgentProvider: defaultUserAgent({\n serviceId: ClientSharedValues.serviceId,\n clientVersion: packageInfo.version,\n }), maxAttempts: DEFAULT_MAX_ATTEMPTS, region: invalidProvider(\"Region is missing\"), requestHandler: new FetchHttpHandler(), sha256: Sha256, streamCollector: streamCollector, utf8Decoder: fromUtf8, utf8Encoder: toUtf8 });\n//# sourceMappingURL=runtimeConfig.browser.js.map","export function calculateBodyLength(body) {\n if (typeof body === \"string\") {\n var len = body.length;\n for (var i = len - 1; i >= 0; i--) {\n var code = body.charCodeAt(i);\n if (code > 0x7f && code <= 0x7ff)\n len++;\n else if (code > 0x7ff && code <= 0xffff)\n len += 2;\n }\n return len;\n }\n else if (typeof body.byteLength === \"number\") {\n // handles Uint8Array, ArrayBuffer, Buffer, and ArrayBufferView\n return body.byteLength;\n }\n else if (typeof body.size === \"number\") {\n // handles browser File object\n return body.size;\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLG1CQUFtQixDQUFDLElBQVM7SUFDM0MsSUFBSSxPQUFPLElBQUksS0FBSyxRQUFRLEVBQUU7UUFDNUIsSUFBSSxHQUFHLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQztRQUV0QixLQUFLLElBQUksQ0FBQyxHQUFHLEdBQUcsR0FBRyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtZQUNqQyxJQUFNLElBQUksR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQ2hDLElBQUksSUFBSSxHQUFHLElBQUksSUFBSSxJQUFJLElBQUksS0FBSztnQkFBRSxHQUFHLEVBQUUsQ0FBQztpQkFDbkMsSUFBSSxJQUFJLEdBQUcsS0FBSyxJQUFJLElBQUksSUFBSSxNQUFNO2dCQUFFLEdBQUcsSUFBSSxDQUFDLENBQUM7U0FDbkQ7UUFFRCxPQUFPLEdBQUcsQ0FBQztLQUNaO1NBQU0sSUFBSSxPQUFPLElBQUksQ0FBQyxVQUFVLEtBQUssUUFBUSxFQUFFO1FBQzlDLCtEQUErRDtRQUMvRCxPQUFPLElBQUksQ0FBQyxVQUFVLENBQUM7S0FDeEI7U0FBTSxJQUFJLE9BQU8sSUFBSSxDQUFDLElBQUksS0FBSyxRQUFRLEVBQUU7UUFDeEMsOEJBQThCO1FBQzlCLE9BQU8sSUFBSSxDQUFDLElBQUksQ0FBQztLQUNsQjtBQUNILENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gY2FsY3VsYXRlQm9keUxlbmd0aChib2R5OiBhbnkpOiBudW1iZXIgfCB1bmRlZmluZWQge1xuICBpZiAodHlwZW9mIGJvZHkgPT09IFwic3RyaW5nXCIpIHtcbiAgICBsZXQgbGVuID0gYm9keS5sZW5ndGg7XG5cbiAgICBmb3IgKGxldCBpID0gbGVuIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIGNvbnN0IGNvZGUgPSBib2R5LmNoYXJDb2RlQXQoaSk7XG4gICAgICBpZiAoY29kZSA+IDB4N2YgJiYgY29kZSA8PSAweDdmZikgbGVuKys7XG4gICAgICBlbHNlIGlmIChjb2RlID4gMHg3ZmYgJiYgY29kZSA8PSAweGZmZmYpIGxlbiArPSAyO1xuICAgIH1cblxuICAgIHJldHVybiBsZW47XG4gIH0gZWxzZSBpZiAodHlwZW9mIGJvZHkuYnl0ZUxlbmd0aCA9PT0gXCJudW1iZXJcIikge1xuICAgIC8vIGhhbmRsZXMgVWludDhBcnJheSwgQXJyYXlCdWZmZXIsIEJ1ZmZlciwgYW5kIEFycmF5QnVmZmVyVmlld1xuICAgIHJldHVybiBib2R5LmJ5dGVMZW5ndGg7XG4gIH0gZWxzZSBpZiAodHlwZW9mIGJvZHkuc2l6ZSA9PT0gXCJudW1iZXJcIikge1xuICAgIC8vIGhhbmRsZXMgYnJvd3NlciBGaWxlIG9iamVjdFxuICAgIHJldHVybiBib2R5LnNpemU7XG4gIH1cbn1cbiJdfQ==","import { __assign, __awaiter, __generator } from \"tslib\";\nexport var resolveEndpointsConfig = function (input) {\n var _a;\n return (__assign(__assign({}, input), { tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true, endpoint: input.endpoint ? normalizeEndpoint(input) : function () { return getEndPointFromRegion(input); }, isCustomEndpoint: input.endpoint ? true : false }));\n};\nvar normalizeEndpoint = function (input) {\n var endpoint = input.endpoint, urlParser = input.urlParser;\n if (typeof endpoint === \"string\") {\n var promisified_1 = Promise.resolve(urlParser(endpoint));\n return function () { return promisified_1; };\n }\n else if (typeof endpoint === \"object\") {\n var promisified_2 = Promise.resolve(endpoint);\n return function () { return promisified_2; };\n }\n return endpoint;\n};\nvar getEndPointFromRegion = function (input) { return __awaiter(void 0, void 0, void 0, function () {\n var _a, tls, region, dnsHostRegex, hostname;\n var _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = input.tls, tls = _a === void 0 ? true : _a;\n return [4 /*yield*/, input.region()];\n case 1:\n region = _c.sent();\n dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(region)) {\n throw new Error(\"Invalid region in client config\");\n }\n return [4 /*yield*/, input.regionInfoProvider(region)];\n case 2:\n hostname = ((_b = (_c.sent())) !== null && _b !== void 0 ? _b : {}).hostname;\n if (!hostname) {\n throw new Error(\"Cannot resolve hostname from client config\");\n }\n return [2 /*return*/, input.urlParser((tls ? \"https:\" : \"http:\") + \"//\" + hostname)];\n }\n });\n}); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnRzQ29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0VuZHBvaW50c0NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBeUJBLE1BQU0sQ0FBQyxJQUFNLHNCQUFzQixHQUFHLFVBQ3BDLEtBQW9EOztJQUNwQixPQUFBLHVCQUM3QixLQUFLLEtBQ1IsR0FBRyxRQUFFLEtBQUssQ0FBQyxHQUFHLG1DQUFJLElBQUksRUFDdEIsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLGlCQUFpQixDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxjQUF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G4gIHJldHVybiBpbnB1dC51cmxQYXJzZXIoYCR7dGxzID8gXCJodHRwczpcIiA6IFwiaHR0cDpcIn0vLyR7aG9zdG5hbWV9YCk7XG59O1xuIl19","import { __assign } from \"tslib\";\nexport var REGION_ENV_NAME = \"AWS_REGION\";\nexport var REGION_INI_NAME = \"region\";\nexport var NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: function (env) { return env[REGION_ENV_NAME]; },\n configFileSelector: function (profile) { return profile[REGION_INI_NAME]; },\n default: function () {\n throw new Error(\"Region is missing\");\n },\n};\nexport var NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\",\n};\nexport var resolveRegionConfig = function (input) {\n if (!input.region) {\n throw new Error(\"Region is missing\");\n }\n return __assign(__assign({}, input), { region: normalizeRegion(input.region) });\n};\nvar normalizeRegion = function (region) {\n if (typeof region === \"string\") {\n var promisified_1 = Promise.resolve(region);\n return function () { return promisified_1; };\n }\n return region;\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaW9uQ29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL1JlZ2lvbkNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBR0EsTUFBTSxDQUFDLElBQU0sZUFBZSxHQUFHLFlBQVksQ0FBQztBQUM1QyxNQUFNLENBQUMsSUFBTSxlQUFlLEdBQUcsUUFBUSxDQUFDO0FBRXhDLE1BQU0sQ0FBQyxJQUFNLDBCQUEwQixHQUFrQztJQUN2RSwyQkFBMkIsRUFBRSxVQUFDLEdBQUcsSUFBSyxPQUFBLEdBQUcsQ0FBQyxlQUFlLENBQUMsRUFBcEIsQ0FBb0I7SUFDMUQsa0JBQWtCLEVBQUUsVUFBQyxPQUFPLElBQUssT0FBQSxPQUFPLENBQUMsZUFBZSxDQUFDLEVBQXhCLENBQXdCO0lBQ3pELE9BQU8sR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m93IG5ldyBFcnJvcihcIlJlZ2lvbiBpcyBtaXNzaW5nXCIpO1xuICB9XG4gIHJldHVybiB7XG4gICAgLi4uaW5wdXQsXG4gICAgcmVnaW9uOiBub3JtYWxpemVSZWdpb24oaW5wdXQucmVnaW9uISksXG4gIH07XG59O1xuXG5jb25zdCBub3JtYWxpemVSZWdpb24gPSAocmVnaW9uOiBzdHJpbmcgfCBQcm92aWRlcjxzdHJpbmc+KTogUHJvdmlkZXI8c3RyaW5nPiA9PiB7XG4gIGlmICh0eXBlb2YgcmVnaW9uID09PSBcInN0cmluZ1wiKSB7XG4gICAgY29uc3QgcHJvbWlzaWZpZWQgPSBQcm9taXNlLnJlc29sdmUocmVnaW9uKTtcbiAgICByZXR1cm4gKCkgPT4gcHJvbWlzaWZpZWQ7XG4gIH1cbiAgcmV0dXJuIHJlZ2lvbiBhcyBQcm92aWRlcjxzdHJpbmc+O1xufTtcbiJdfQ==","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nvar CONTENT_LENGTH_HEADER = \"content-length\";\nexport function contentLengthMiddleware(bodyLengthChecker) {\n var _this = this;\n return function (next) { return function (args) { return __awaiter(_this, void 0, void 0, function () {\n var request, body, headers, length;\n var _a;\n return __generator(this, function (_b) {\n request = args.request;\n if (HttpRequest.isInstance(request)) {\n body = request.body, headers = request.headers;\n if (body &&\n Object.keys(headers)\n .map(function (str) { return str.toLowerCase(); })\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n length = bodyLengthChecker(body);\n if (length !== undefined) {\n request.headers = __assign(__assign({}, request.headers), (_a = {}, _a[CONTENT_LENGTH_HEADER] = String(length), _a));\n }\n }\n }\n return [2 /*return*/, next(__assign(__assign({}, args), { request: request }))];\n });\n }); }; };\n}\nexport var contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nexport var getContentLengthPlugin = function (options) { return ({\n applyToStack: function (clientStack) {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n },\n}); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQVlyRCxJQUFNLHFCQUFxQixHQUFHLGdCQUFnQixDQUFDO0FBRS9DLE1BQU0sVUFBVSx1QkFBdUIsQ0FBQyxpQkFBdUM7SUFBL0UsaUJBNEJDO0lBM0JDLE9BQU8sVUFBZ0MsSUFBK0IsSUFBZ0MsT0FBQSxVQUNwRyxJQUFnQzs7OztZQUUxQixPQUFPLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQztZQUM3QixJQUFJLFdBQVcsQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFDLEVBQUU7Z0JBQzNCLElBQUksR0FBYyxPQUFPLEtBQXJCLEVBQUUsT0FBTyxHQUFLLE9BQU8sUUFBWixDQUFhO2dCQUNsQyxJQUNFLElBQUk7b0JBQ0osTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7eUJBQ2pCLEdBQUcsQ0FBQyxVQUFDLEdBQUcsSUFBSyxPQUFBLEdBQUcsQ0FBQyxXQUFXLEVBQUUsRUFBakIsQ0FBaUIsQ0FBQzt5QkFDL0IsT0FBTyxDQUFDLHFCQUFxQixDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQ3hDO29CQUNNLE1BQU0sR0FBRyxpQkFBaUIsQ0FBQyxJQUFJLENBQUMsQ0FBQztvQkFDdkMsSUFBSSxNQUFNLEtBQUssU0FBUyxFQUFFO3dCQUN4QixPQUFPLENBQUMsT0FBTyx5QkFDVixP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4gICAgICAgICAgICBbQ09OVEVOVF9MRU5HVEhfSEVBREVSXTogU3RyaW5nKGxlbmd0aCksXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBuZXh0KHtcbiAgICAgIC4uLmFyZ3MsXG4gICAgICByZXF1ZXN0LFxuICAgIH0pO1xuICB9O1xufVxuXG5leHBvcnQgY29uc3QgY29udGVudExlbmd0aE1pZGRsZXdhcmVPcHRpb25zOiBCdWlsZEhhbmRsZXJPcHRpb25zID0ge1xuICBzdGVwOiBcImJ1aWxkXCIsXG4gIHRhZ3M6IFtcIlNFVF9DT05URU5UX0xFTkdUSFwiLCBcIkNPTlRFTlRfTEVOR1RIXCJdLFxuICBuYW1lOiBcImNvbnRlbnRMZW5ndGhNaWRkbGV3YXJlXCIsXG4gIG92ZXJyaWRlOiB0cnVlLFxufTtcblxuZXhwb3J0IGNvbnN0IGdldENvbnRlbnRMZW5ndGhQbHVnaW4gPSAob3B0aW9uczogeyBib2R5TGVuZ3RoQ2hlY2tlcjogQm9keUxlbmd0aENhbGN1bGF0b3IgfSk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQoY29udGVudExlbmd0aE1pZGRsZXdhcmUob3B0aW9ucy5ib2R5TGVuZ3RoQ2hlY2tlciksIGNvbnRlbnRMZW5ndGhNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ==","import { __awaiter, __generator } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nexport function resolveHostHeaderConfig(input) {\n return input;\n}\nexport var hostHeaderMiddleware = function (options) { return function (next) { return function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var request, _a, handlerProtocol;\n return __generator(this, function (_b) {\n if (!HttpRequest.isInstance(args.request))\n return [2 /*return*/, next(args)];\n request = args.request;\n _a = (options.requestHandler.metadata || {}).handlerProtocol, handlerProtocol = _a === void 0 ? \"\" : _a;\n //For H2 request, remove 'host' header and use ':authority' header instead\n //reference: https://nodejs.org/dist/latest-v13.x/docs/api/errors.html#ERR_HTTP2_INVALID_CONNECTION_HEADERS\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = \"\";\n //non-H2 request and 'host' header is not set, set the 'host' header to request's hostname.\n }\n else if (!request.headers[\"host\"]) {\n request.headers[\"host\"] = request.hostname;\n }\n return [2 /*return*/, next(args)];\n });\n}); }; }; };\nexport var hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true,\n};\nexport var getHostHeaderPlugin = function (options) { return ({\n applyToStack: function (clientStack) {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n },\n}); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQVVyRCxNQUFNLFVBQVUsdUJBQXVCLENBQ3JDLEtBQXFEO0lBRXJELE9BQU8sS0FBSyxDQUFDO0FBQ2YsQ0FBQztBQUVELE1BQU0sQ0FBQyxJQUFNLG9CQUFvQixHQUFHLFVBQ2xDLE9BQWlDLElBQ0UsT0FBQSxVQUFDLElBQUksSUFBSyxPQUFBLFVBQU8sSUFBSTs7O1FBQ3hELElBQUksQ0FBQyxXQUFXLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7WUFBRSxzQkFBTyxJQUFJLENBQUMsSUFBSSxDQUFDLEVB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G4gIH1cbiAgcmV0dXJuIG5leHQoYXJncyk7XG59O1xuXG5leHBvcnQgY29uc3QgaG9zdEhlYWRlck1pZGRsZXdhcmVPcHRpb25zOiBCdWlsZEhhbmRsZXJPcHRpb25zICYgQWJzb2x1dGVMb2NhdGlvbiA9IHtcbiAgbmFtZTogXCJob3N0SGVhZGVyTWlkZGxld2FyZVwiLFxuICBzdGVwOiBcImJ1aWxkXCIsXG4gIHByaW9yaXR5OiBcImxvd1wiLFxuICB0YWdzOiBbXCJIT1NUXCJdLFxuICBvdmVycmlkZTogdHJ1ZSxcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRIb3N0SGVhZGVyUGx1Z2luID0gKG9wdGlvbnM6IEhvc3RIZWFkZXJSZXNvbHZlZENvbmZpZyk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQoaG9zdEhlYWRlck1pZGRsZXdhcmUob3B0aW9ucyksIGhvc3RIZWFkZXJNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ==","import { __awaiter, __generator, __rest } from \"tslib\";\nexport var loggerMiddleware = function () { return function (next, context) { return function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var clientName, commandName, inputFilterSensitiveLog, logger, outputFilterSensitiveLog, response, _a, $metadata, outputWithoutMetadata;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n clientName = context.clientName, commandName = context.commandName, inputFilterSensitiveLog = context.inputFilterSensitiveLog, logger = context.logger, outputFilterSensitiveLog = context.outputFilterSensitiveLog;\n return [4 /*yield*/, next(args)];\n case 1:\n response = _b.sent();\n if (!logger) {\n return [2 /*return*/, response];\n }\n if (typeof logger.info === \"function\") {\n _a = response.output, $metadata = _a.$metadata, outputWithoutMetadata = __rest(_a, [\"$metadata\"]);\n logger.info({\n clientName: clientName,\n commandName: commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata,\n });\n }\n return [2 /*return*/, response];\n }\n });\n}); }; }; };\nexport var loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true,\n};\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport var getLoggerPlugin = function (options) { return ({\n applyToStack: function (clientStack) {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n },\n}); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyTWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXJNaWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFZQSxNQUFNLENBQUMsSUFBTSxnQkFBZ0IsR0FBRyxjQUFNLE9BQUEsVUFDcEMsSUFBb0MsRUFDcEMsT0FBZ0MsSUFDRyxPQUFBLFVBQ25DLElBQXFDOzs7OztnQkFFN0IsVUFBVSxHQUE2RSxPQUFPLFdBQXBGLEVBQUUsV0FBVyxHQUFnRSxPQUFPLFlBQXZFLEVBQUUsdUJBQXVCLEdBQXVDLE9BQU8sd0JBQTlDLEVBQUUsTUFBTSxHQUErQixPQUFPLE9BQXRDLEVBQUUsd0JBQXdCLEdBQUssT0FBTyx5QkFBWixDQUFhO2dCQUV0RixxQkFBTSxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUE7O2dCQUEzQixRQUFRLEdBQUcsU0FBZ0I7Z0JBRWpDLElBQUksQ0FBQyxNQUFNLEVBQUU7b0JBQ1gsc0JBQU8sUUFBUSxFQUFDO2lCQUNqQjtnQkFFRCxJQUFJLE9BQU8sTUFBTSxDQUFDLElBQUksS0FBSyxVQUFVLEVBQUU7b0JBQy9CLEtBQTBDLFFBQVEsQ0FBQyxNQUFNLEVBQX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cbiAgICAgIGNvbW1hbmROYW1lLFxuICAgICAgaW5wdXQ6IGlucHV0RmlsdGVyU2Vuc2l0aXZlTG9nKGFyZ3MuaW5wdXQpLFxuICAgICAgb3V0cHV0OiBvdXRwdXRGaWx0ZXJTZW5zaXRpdmVMb2cob3V0cHV0V2l0aG91dE1ldGFkYXRhKSxcbiAgICAgIG1ldGFkYXRhOiAkbWV0YWRhdGEsXG4gICAgfSk7XG4gIH1cblxuICByZXR1cm4gcmVzcG9uc2U7XG59O1xuXG5leHBvcnQgY29uc3QgbG9nZ2VyTWlkZGxld2FyZU9wdGlvbnM6IEluaXRpYWxpemVIYW5kbGVyT3B0aW9ucyAmIEFic29sdXRlTG9jYXRpb24gPSB7XG4gIG5hbWU6IFwibG9nZ2VyTWlkZGxld2FyZVwiLFxuICB0YWdzOiBbXCJMT0dHRVJcIl0sXG4gIHN0ZXA6IFwiaW5pdGlhbGl6ZVwiLFxuICBvdmVycmlkZTogdHJ1ZSxcbn07XG5cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnNcbmV4cG9ydCBjb25zdCBnZXRMb2dnZXJQbHVnaW4gPSAob3B0aW9uczogYW55KTogUGx1Z2dhYmxlPGFueSwgYW55PiA9PiAoe1xuICBhcHBseVRvU3RhY2s6IChjbGllbnRTdGFjaykgPT4ge1xuICAgIGNsaWVudFN0YWNrLmFkZChsb2dnZXJNaWRkbGV3YXJlKCksIGxvZ2dlck1pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19","export var ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport var CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport var AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport var SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport var EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport var SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nexport var TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nexport var AUTH_HEADER = \"authorization\";\nexport var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nexport var DATE_HEADER = \"date\";\nexport var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nexport var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nexport var SHA256_HEADER = \"x-amz-content-sha256\";\nexport var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nexport var HOST_HEADER = \"host\";\nexport var ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true,\n};\nexport var PROXY_HEADER_PATTERN = /^proxy-/;\nexport var SEC_HEADER_PATTERN = /^sec-/;\nexport var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nexport var ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nexport var EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nexport var UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport var MAX_CACHE_SIZE = 50;\nexport var KEY_TYPE_IDENTIFIER = \"aws4_request\";\nexport var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsSUFBTSxxQkFBc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ZXN0XCI7XG5cbmV4cG9ydCBjb25zdCBNQVhfUFJFU0lHTkVEX1RUTCA9IDYwICogNjAgKiAyNCAqIDc7XG4iXX0=","import { __awaiter, __generator, __values } from \"tslib\";\nimport { toHex } from \"@aws-sdk/util-hex-encoding\";\nimport { KEY_TYPE_IDENTIFIER, MAX_CACHE_SIZE } from \"./constants\";\nvar signingKeyCache = {};\nvar cacheQueue = [];\n/**\n * Create a string describing the scope of credentials used to sign a request.\n *\n * @param shortDate The current calendar date in the form YYYYMMDD.\n * @param region The AWS region in which the service resides.\n * @param service The service to which the signed request is being sent.\n */\nexport function createScope(shortDate, region, service) {\n return shortDate + \"/\" + region + \"/\" + service + \"/\" + KEY_TYPE_IDENTIFIER;\n}\n/**\n * Derive a signing key from its composite parts\n *\n * @param sha256Constructor A constructor function that can instantiate SHA-256\n * hash objects.\n * @param credentials The credentials with which the request will be\n * signed.\n * @param shortDate The current calendar date in the form YYYYMMDD.\n * @param region The AWS region in which the service resides.\n * @param service The service to which the signed request is being\n * sent.\n */\nexport var getSigningKey = function (sha256Constructor, credentials, shortDate, region, service) { return __awaiter(void 0, void 0, void 0, function () {\n var credsHash, cacheKey, key, _a, _b, signable, e_1_1;\n var e_1, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId)];\n case 1:\n credsHash = _d.sent();\n cacheKey = shortDate + \":\" + region + \":\" + service + \":\" + toHex(credsHash) + \":\" + credentials.sessionToken;\n if (cacheKey in signingKeyCache) {\n return [2 /*return*/, signingKeyCache[cacheKey]];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n key = \"AWS4\" + credentials.secretAccessKey;\n _d.label = 2;\n case 2:\n _d.trys.push([2, 7, 8, 9]);\n _a = __values([shortDate, region, service, KEY_TYPE_IDENTIFIER]), _b = _a.next();\n _d.label = 3;\n case 3:\n if (!!_b.done) return [3 /*break*/, 6];\n signable = _b.value;\n return [4 /*yield*/, hmac(sha256Constructor, key, signable)];\n case 4:\n key = _d.sent();\n _d.label = 5;\n case 5:\n _b = _a.next();\n return [3 /*break*/, 3];\n case 6: return [3 /*break*/, 9];\n case 7:\n e_1_1 = _d.sent();\n e_1 = { error: e_1_1 };\n return [3 /*break*/, 9];\n case 8:\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n return [7 /*endfinally*/];\n case 9: return [2 /*return*/, (signingKeyCache[cacheKey] = key)];\n }\n });\n}); };\n/**\n * @internal\n */\nexport function clearCredentialCache() {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach(function (cacheKey) {\n delete signingKeyCache[cacheKey];\n });\n}\nfunction hmac(ctor, secret, data) {\n var hash = new ctor(secret);\n hash.update(data);\n return hash.digest();\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlZGVudGlhbERlcml2YXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY3JlZGVudGlhbERlcml2YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUVuRCxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsY0FBYyxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBRWxFLElBQU0sZUFBZSxHQUFrQyxFQUFFLENBQUM7QUFDMUQsSUFBTSxVQUFVLEdBQWtCLEVBQUUsQ0FBQztBQUVyQzs7Ozs7O0dBTUc7QUFDSCxNQUFNLFVBQVUsV0FBVyxDQUFDLFNBQWlCLEVBQUUsTUFBYyxFQUFFLE9BQWU7SUFDNUUsT0FBVSxTQUFTLFNBQUksTUFBTSxTQUFJLE9BQU8sU0FBSSxtQkFBcUIsQ0F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IHN0cmluZ107XG4gIH1cblxuICBsZXQga2V5OiBTb3VyY2VEYXRhID0gYEFXUzQke2NyZWRlbnRpYWxzLnNlY3JldEFjY2Vzc0tleX1gO1xuICBmb3IgKGNvbnN0IHNpZ25hYmxlIG9mIFtzaG9ydERhdGUsIHJlZ2lvbiwgc2VydmljZSwgS0VZX1RZUEVfSURFTlRJRklFUl0pIHtcbiAgICBrZXkgPSBhd2FpdCBobWFjKHNoYTI1NkNvbnN0cnVjdG9yLCBrZXksIHNpZ25hYmxlKTtcbiAgfVxuICByZXR1cm4gKHNpZ25pbmdLZXlDYWNoZVtjYWNoZUtleV0gPSBrZXkgYXMgVWludDhBcnJheSk7XG59O1xuXG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgZnVuY3Rpb24gY2xlYXJDcmVkZW50aWFsQ2FjaGUoKTogdm9pZCB7XG4gIGNhY2hlUXVldWUubGVuZ3RoID0gMDtcbiAgT2JqZWN0LmtleXMoc2lnbmluZ0tleUNhY2hlKS5mb3JFYWNoKChjYWNoZUtleSkgPT4ge1xuICAgIGRlbGV0ZSBzaWduaW5nS2V5Q2FjaGVbY2FjaGVLZXldO1xuICB9KTtcbn1cblxuZnVuY3Rpb24gaG1hYyhjdG9yOiBIYXNoQ29uc3RydWN0b3IsIHNlY3JldDogU291cmNlRGF0YSwgZGF0YTogU291cmNlRGF0YSk6IFByb21pc2U8VWludDhBcnJheT4ge1xuICBjb25zdCBoYXNoID0gbmV3IGN0b3Ioc2VjcmV0KTtcbiAgaGFzaC51cGRhdGUoZGF0YSk7XG4gIHJldHVybiBoYXNoLmRpZ2VzdCgpO1xufVxuIl19","import { __values } from \"tslib\";\nimport { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from \"./constants\";\n/**\n * @internal\n */\nexport function getCanonicalHeaders(_a, unsignableHeaders, signableHeaders) {\n var e_1, _b;\n var headers = _a.headers;\n var canonical = {};\n try {\n for (var _c = __values(Object.keys(headers).sort()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var headerName = _d.value;\n var canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders === null || unsignableHeaders === void 0 ? void 0 : unsignableHeaders.has(canonicalHeaderName)) ||\n PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||\n SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return canonical;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0Q2Fub25pY2FsSGVhZGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nZXRDYW5vbmljYWxIZWFkZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxPQUFPLEVBQUUseUJBQXlCLEVBQUUsb0JBQW9CLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFbEc7O0dBRUc7QUFDSCxNQUFNLFVBQVUsbUJBQW1CLENBQ2pDLEVBQXdCLEVBQ3hCLGlCQUErQixFQUMvQixlQUE2Qjs7UUFGM0IsT0FBTyxhQUFBO0lBSVQsSUFBTSxTQUFTLEdBQWMsRUFBRSxDQUFDOztRQUNoQyxLQUF5QixJQUFBLEtBQUEsU0FBQSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLElBQUksRUFBRSxDQUFBLGdCQUFBLDRCQUFFO1lBQWpELElBQU0sVUFBVSxXQUFBO1lBQ25CL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xzdHJpbmc+LFxuICBzaWduYWJsZUhlYWRlcnM/OiBTZXQ8c3RyaW5nPlxuKTogSGVhZGVyQmFnIHtcbiAgY29uc3QgY2Fub25pY2FsOiBIZWFkZXJCYWcgPSB7fTtcbiAgZm9yIChjb25zdCBoZWFkZXJOYW1lIG9mIE9iamVjdC5rZXlzKGhlYWRlcnMpLnNvcnQoKSkge1xuICAgIGNvbnN0IGNhbm9uaWNhbEhlYWRlck5hbWUgPSBoZWFkZXJOYW1lLnRvTG93ZXJDYXNlKCk7XG4gICAgaWYgKFxuICAgICAgY2Fub25pY2FsSGVhZGVyTmFtZSBpbiBBTFdBWVNfVU5TSUdOQUJMRV9IRUFERVJTIHx8XG4gICAgICB1bnNpZ25hYmxlSGVhZGVycz8uaGFzKGNhbm9uaWNhbEhlYWRlck5hbWUpIHx8XG4gICAgICBQUk9YWV9IRUFERVJfUEFUVEVSTi50ZXN0KGNhbm9uaWNhbEhlYWRlck5hbWUpIHx8XG4gICAgICBTRUNfSEVBREVSX1BBVFRFUk4udGVzdChjYW5vbmljYWxIZWFkZXJOYW1lKVxuICAgICkge1xuICAgICAgaWYgKCFzaWduYWJsZUhlYWRlcnMgfHwgKHNpZ25hYmxlSGVhZGVycyAmJiAhc2lnbmFibGVIZWFkZXJzLmhhcyhjYW5vbmljYWxIZWFkZXJOYW1lKSkpIHtcbiAgICAgICAgY29udGludWU7XG4gICAgICB9XG4gICAgfVxuXG4gICAgY2Fub25pY2FsW2Nhbm9uaWNhbEhlYWRlck5hbWVdID0gaGVhZGVyc1toZWFkZXJOYW1lXS50cmltKCkucmVwbGFjZSgvXFxzKy9nLCBcIiBcIik7XG4gIH1cblxuICByZXR1cm4gY2Fub25pY2FsO1xufVxuIl19","import { __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayBuffer } from \"@aws-sdk/is-array-buffer\";\nimport { toHex } from \"@aws-sdk/util-hex-encoding\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\n/**\n * @internal\n */\nexport function getPayloadHash(_a, hashConstructor) {\n var headers = _a.headers, body = _a.body;\n return __awaiter(this, void 0, void 0, function () {\n var _b, _c, headerName, hashCtor, _d;\n var e_1, _e;\n return __generator(this, function (_f) {\n switch (_f.label) {\n case 0:\n try {\n for (_b = __values(Object.keys(headers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n headerName = _c.value;\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return [2 /*return*/, headers[headerName]];\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_e = _b.return)) _e.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (!(body == undefined)) return [3 /*break*/, 1];\n return [2 /*return*/, \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"];\n case 1:\n if (!(typeof body === \"string\" || ArrayBuffer.isView(body) || isArrayBuffer(body))) return [3 /*break*/, 3];\n hashCtor = new hashConstructor();\n hashCtor.update(body);\n _d = toHex;\n return [4 /*yield*/, hashCtor.digest()];\n case 2: return [2 /*return*/, _d.apply(void 0, [_f.sent()])];\n case 3: \n // As any defined body that is not a string or binary data is a stream, this\n // body is unsignable. Attempt to send the request with an unsigned payload,\n // which may or may not be accepted by the service.\n return [2 /*return*/, UNSIGNED_PAYLOAD];\n }\n });\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0UGF5bG9hZEhhc2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2V0UGF5bG9hZEhhc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUV6RCxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFFbkQsT0FBTyxFQUFFLGFBQWEsRUFBRSxn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BkYXRlKGJvZHkpO1xuICAgIHJldHVybiB0b0hleChhd2FpdCBoYXNoQ3Rvci5kaWdlc3QoKSk7XG4gIH1cblxuICAvLyBBcyBhbnkgZGVmaW5lZCBib2R5IHRoYXQgaXMgbm90IGEgc3RyaW5nIG9yIGJpbmFyeSBkYXRhIGlzIGEgc3RyZWFtLCB0aGlzXG4gIC8vIGJvZHkgaXMgdW5zaWduYWJsZS4gQXR0ZW1wdCB0byBzZW5kIHRoZSByZXF1ZXN0IHdpdGggYW4gdW5zaWduZWQgcGF5bG9hZCxcbiAgLy8gd2hpY2ggbWF5IG9yIG1heSBub3QgYmUgYWNjZXB0ZWQgYnkgdGhlIHNlcnZpY2UuXG4gIHJldHVybiBVTlNJR05FRF9QQVlMT0FEO1xufVxuIl19","export var isArrayBuffer = function (arg) {\n return (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLElBQU0sYUFBYSxHQUFHLFVBQUMsR0FBUTtJQUNwQyxPQUFBLENBQUMsT0FBTyxXQUFXLEtBQUssVUFBVSxJQUFJLEdBQUcsWUFBWSxXQUFXLENBQUM7UUFDakUsTUFBTSxDQUFDLFNBQVMsQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxLQUFLLHNCQUFzQjtBQUQ5RCxDQUM4RCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IGlzQXJyYXlCdWZmZXIgPSAoYXJnOiBhbnkpOiBhcmcgaXMgQXJyYXlCdWZmZXIgPT5cbiAgKHR5cGVvZiBBcnJheUJ1ZmZlciA9PT0gXCJmdW5jdGlvblwiICYmIGFyZyBpbnN0YW5jZW9mIEFycmF5QnVmZmVyKSB8fFxuICBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoYXJnKSA9PT0gXCJbb2JqZWN0IEFycmF5QnVmZmVyXVwiO1xuIl19","import { __assign, __read, __rest, __spread } from \"tslib\";\n/**\n * @internal\n */\nexport function cloneRequest(_a) {\n var headers = _a.headers, query = _a.query, rest = __rest(_a, [\"headers\", \"query\"]);\n return __assign(__assign({}, rest), { headers: __assign({}, headers), query: query ? cloneQuery(query) : undefined });\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce(function (carry, paramName) {\n var _a;\n var param = query[paramName];\n return __assign(__assign({}, carry), (_a = {}, _a[paramName] = Array.isArray(param) ? __spread(param) : param, _a));\n }, {});\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xvbmVSZXF1ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Nsb25lUmVxdWVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRUE7O0dBRUc7QUFDSCxNQUFNLFVBQVUsWUFBWSxDQUFDLEVBQXdDO0lBQXRDLElBQUEsT0FBTyxhQUFBLEVBQUUsS0FBSyxXQUFBLEVBQUssSUFBSSxjQUF6QixvQkFBMkIsQ0FBRjtJQUNwRCw2QkFDSyxJQUFJLEtBQ1AsT0FBTyxlQUFPLE9BQU8sR0FDckIsS0FBSyxFQUFFLEtBQUssQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTLElBQzVDO0FBQ0osQ0FBQztBQUVELFNBQVMsVUFBVSxDQUFDLEtBQXdCO0lBQzFDLE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxNQUFNLENBQUMsVUFB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SA/IFsuLi5wYXJhbV0gOiBwYXJhbSxcbiAgICB9O1xuICB9LCB7fSk7XG59XG4iXX0=","import { __values } from \"tslib\";\nimport { cloneRequest } from \"./cloneRequest\";\nimport { GENERATED_HEADERS } from \"./constants\";\n/**\n * @internal\n */\nexport function prepareRequest(request) {\n var e_1, _a;\n // Create a clone of the request object that does not clone the body\n request = typeof request.clone === \"function\" ? request.clone() : cloneRequest(request);\n try {\n for (var _b = __values(Object.keys(request.headers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var headerName = _c.value;\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return request;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlcGFyZVJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJlcGFyZVJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUVBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM5QyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFaEQ7O0dBRUc7QUFDSCxNQUFNLFVBQVUsY0FBYyxDQUFDLE9BQW9COztJQUNqRCxvRUFBb0U7SUFDcEUsT0FBTyxHQUFHLE9BQVEsT0FBZSxDQUFDLEtBQUssS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFFLE9BQWUsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUMsWUFBWSxDQUFDLE9BQU8sQ0FBQyxDQUFDOztRQUUxRyxLQUF5QixJQUFBLEtBQUEsU0FBQSxNQUFNLENBQUMsSUFBS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ZWFkZXJOYW1lLnRvTG93ZXJDYXNlKCkpID4gLTEpIHtcbiAgICAgIGRlbGV0ZSByZXF1ZXN0LmhlYWRlcnNbaGVhZGVyTmFtZV07XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHJlcXVlc3Q7XG59XG4iXX0=","export function iso8601(time) {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, \"Z\");\n}\nexport function toDate(time) {\n if (typeof time === \"number\") {\n return new Date(time * 1000);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1000);\n }\n return new Date(time);\n }\n return time;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbERhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbERhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLE9BQU8sQ0FBQyxJQUE0QjtJQUNsRCxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUM7U0FDaEIsV0FBVyxFQUFFO1NBQ2IsT0FBTyxDQUFDLFdBQVcsRUFBRSxHQUFHLENBQUMsQ0FBQztBQUMvQixDQUFDO0FBRUQsTUFBTSxVQUFVLE1BQU0sQ0FBQyxJQUE0QjtJQUNqRCxJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsRUFBRTtRQUM1QixPQUFPLElBQUksSUFBSSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUMsQ0FBQztLQUM5QjtJQUVELElBQUksT0FBTyxJQUFJLEtBQUssUUFBUSxFQUFFO1FBQzVCLElBQUksTUFBTSxDQUFDLElBQUksQ0FBQyxFQUFFO1lBQ2hCLE9BQU8sSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO1NBQ3RDO1FBQ0QsT0FBTyxJQUFJLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN2QjtJQUVELE9BQU8sSUFBSSxDQUFDO0FBQ2QsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBpc284NjAxKHRpbWU6IG51bWJlciB8IHN0cmluZyB8IERhdGUpOiBzdHJpbmcge1xuICByZXR1cm4gdG9EYXRlKHRpbWUpXG4gICAgLnRvSVNPU3RyaW5nKClcbiAgICAucmVwbGFjZSgvXFwuXFxkezN9WiQvLCBcIlpcIik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB0b0RhdGUodGltZTogbnVtYmVyIHwgc3RyaW5nIHwgRGF0ZSk6IERhdGUge1xuICBpZiAodHlwZW9mIHRpbWUgPT09IFwibnVtYmVyXCIpIHtcbiAgICByZXR1cm4gbmV3IERhdGUodGltZSAqIDEwMDApO1xuICB9XG5cbiAgaWYgKHR5cGVvZiB0aW1lID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKE51bWJlcih0aW1lKSkge1xuICAgICAgcmV0dXJuIG5ldyBEYXRlKE51bWJlcih0aW1lKSAqIDEwMDApO1xuICAgIH1cbiAgICByZXR1cm4gbmV3IERhdGUodGltZSk7XG4gIH1cblxuICByZXR1cm4gdGltZTtcbn1cbiJdfQ==","import { __awaiter, __generator } from \"tslib\";\nimport { toHex } from \"@aws-sdk/util-hex-encoding\";\nimport { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, } from \"./constants\";\nimport { createScope, getSigningKey } from \"./credentialDerivation\";\nimport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nimport { getCanonicalQuery } from \"./getCanonicalQuery\";\nimport { getPayloadHash } from \"./getPayloadHash\";\nimport { hasHeader } from \"./hasHeader\";\nimport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nimport { prepareRequest } from \"./prepareRequest\";\nimport { iso8601 } from \"./utilDate\";\nvar SignatureV4 = /** @class */ (function () {\n function SignatureV4(_a) {\n var applyChecksum = _a.applyChecksum, credentials = _a.credentials, region = _a.region, service = _a.service, sha256 = _a.sha256, _b = _a.uriEscapePath, uriEscapePath = _b === void 0 ? true : _b;\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n // default to true if applyChecksum isn't set\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = normalizeRegionProvider(region);\n this.credentialProvider = normalizeCredentialsProvider(credentials);\n }\n SignatureV4.prototype.presign = function (originalRequest, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var _a, signingDate, _b, expiresIn, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService, credentials, region, _c, _d, longDate, shortDate, scope, request, canonicalHeaders, _e, _f, _g, _h, _j, _k;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n _a = options.signingDate, signingDate = _a === void 0 ? new Date() : _a, _b = options.expiresIn, expiresIn = _b === void 0 ? 3600 : _b, unsignableHeaders = options.unsignableHeaders, unhoistableHeaders = options.unhoistableHeaders, signableHeaders = options.signableHeaders, signingRegion = options.signingRegion, signingService = options.signingService;\n return [4 /*yield*/, this.credentialProvider()];\n case 1:\n credentials = _l.sent();\n if (!(signingRegion !== null && signingRegion !== void 0)) return [3 /*break*/, 2];\n _c = signingRegion;\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, this.regionProvider()];\n case 3:\n _c = (_l.sent());\n _l.label = 4;\n case 4:\n region = _c;\n _d = formatDate(signingDate), longDate = _d.longDate, shortDate = _d.shortDate;\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return [2 /*return*/, Promise.reject(\"Signature version 4 presigned URLs\" + \" must have an expiration date less than one week in\" + \" the future\")];\n }\n scope = createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders: unhoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = credentials.accessKeyId + \"/\" + scope;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders);\n _e = request.query;\n _f = SIGNATURE_QUERY_PARAM;\n _g = this.getSignature;\n _h = [longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService)];\n _j = this.createCanonicalRequest;\n _k = [request, canonicalHeaders];\n return [4 /*yield*/, getPayloadHash(originalRequest, this.sha256)];\n case 5: return [4 /*yield*/, _g.apply(this, _h.concat([_j.apply(this, _k.concat([_l.sent()]))]))];\n case 6:\n _e[_f] = _l.sent();\n return [2 /*return*/, request];\n }\n });\n });\n };\n SignatureV4.prototype.sign = function (toSign, options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (typeof toSign === \"string\") {\n return [2 /*return*/, this.signString(toSign, options)];\n }\n else if (toSign.headers && toSign.payload) {\n return [2 /*return*/, this.signEvent(toSign, options)];\n }\n else {\n return [2 /*return*/, this.signRequest(toSign, options)];\n }\n return [2 /*return*/];\n });\n });\n };\n SignatureV4.prototype.signEvent = function (_a, _b) {\n var headers = _a.headers, payload = _a.payload;\n var _c = _b.signingDate, signingDate = _c === void 0 ? new Date() : _c, priorSignature = _b.priorSignature, signingRegion = _b.signingRegion, signingService = _b.signingService;\n return __awaiter(this, void 0, void 0, function () {\n var region, _d, _e, shortDate, longDate, scope, hashedPayload, hash, hashedHeaders, _f, stringToSign;\n return __generator(this, function (_g) {\n switch (_g.label) {\n case 0:\n if (!(signingRegion !== null && signingRegion !== void 0)) return [3 /*break*/, 1];\n _d = signingRegion;\n return [3 /*break*/, 3];\n case 1: return [4 /*yield*/, this.regionProvider()];\n case 2:\n _d = (_g.sent());\n _g.label = 3;\n case 3:\n region = _d;\n _e = formatDate(signingDate), shortDate = _e.shortDate, longDate = _e.longDate;\n scope = createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n return [4 /*yield*/, getPayloadHash({ headers: {}, body: payload }, this.sha256)];\n case 4:\n hashedPayload = _g.sent();\n hash = new this.sha256();\n hash.update(headers);\n _f = toHex;\n return [4 /*yield*/, hash.digest()];\n case 5:\n hashedHeaders = _f.apply(void 0, [_g.sent()]);\n stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload,\n ].join(\"\\n\");\n return [2 /*return*/, this.signString(stringToSign, { signingDate: signingDate, signingRegion: region, signingService: signingService })];\n }\n });\n });\n };\n SignatureV4.prototype.signString = function (stringToSign, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.signingDate, signingDate = _c === void 0 ? new Date() : _c, signingRegion = _b.signingRegion, signingService = _b.signingService;\n return __awaiter(this, void 0, void 0, function () {\n var credentials, region, _d, shortDate, hash, _e, _f, _g;\n return __generator(this, function (_h) {\n switch (_h.label) {\n case 0: return [4 /*yield*/, this.credentialProvider()];\n case 1:\n credentials = _h.sent();\n if (!(signingRegion !== null && signingRegion !== void 0)) return [3 /*break*/, 2];\n _d = signingRegion;\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, this.regionProvider()];\n case 3:\n _d = (_h.sent());\n _h.label = 4;\n case 4:\n region = _d;\n shortDate = formatDate(signingDate).shortDate;\n _f = (_e = this.sha256).bind;\n return [4 /*yield*/, this.getSigningKey(credentials, region, shortDate, signingService)];\n case 5:\n hash = new (_f.apply(_e, [void 0, _h.sent()]))();\n hash.update(stringToSign);\n _g = toHex;\n return [4 /*yield*/, hash.digest()];\n case 6: return [2 /*return*/, _g.apply(void 0, [_h.sent()])];\n }\n });\n });\n };\n SignatureV4.prototype.signRequest = function (requestToSign, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.signingDate, signingDate = _c === void 0 ? new Date() : _c, signableHeaders = _b.signableHeaders, unsignableHeaders = _b.unsignableHeaders, signingRegion = _b.signingRegion, signingService = _b.signingService;\n return __awaiter(this, void 0, void 0, function () {\n var credentials, region, _d, request, _e, longDate, shortDate, scope, payloadHash, canonicalHeaders, signature;\n return __generator(this, function (_f) {\n switch (_f.label) {\n case 0: return [4 /*yield*/, this.credentialProvider()];\n case 1:\n credentials = _f.sent();\n if (!(signingRegion !== null && signingRegion !== void 0)) return [3 /*break*/, 2];\n _d = signingRegion;\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, this.regionProvider()];\n case 3:\n _d = (_f.sent());\n _f.label = 4;\n case 4:\n region = _d;\n request = prepareRequest(requestToSign);\n _e = formatDate(signingDate), longDate = _e.longDate, shortDate = _e.shortDate;\n scope = createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n return [4 /*yield*/, getPayloadHash(request, this.sha256)];\n case 5:\n payloadHash = _f.sent();\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n return [4 /*yield*/, this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash))];\n case 6:\n signature = _f.sent();\n request.headers[AUTH_HEADER] =\n ALGORITHM_IDENTIFIER + \" \" +\n (\"Credential=\" + credentials.accessKeyId + \"/\" + scope + \", \") +\n (\"SignedHeaders=\" + getCanonicalHeaderList(canonicalHeaders) + \", \") +\n (\"Signature=\" + signature);\n return [2 /*return*/, request];\n }\n });\n });\n };\n SignatureV4.prototype.createCanonicalRequest = function (request, canonicalHeaders, payloadHash) {\n var sortedHeaders = Object.keys(canonicalHeaders).sort();\n return request.method + \"\\n\" + this.getCanonicalPath(request) + \"\\n\" + getCanonicalQuery(request) + \"\\n\" + sortedHeaders.map(function (name) { return name + \":\" + canonicalHeaders[name]; }).join(\"\\n\") + \"\\n\\n\" + sortedHeaders.join(\";\") + \"\\n\" + payloadHash;\n };\n SignatureV4.prototype.createStringToSign = function (longDate, credentialScope, canonicalRequest) {\n return __awaiter(this, void 0, void 0, function () {\n var hash, hashedRequest;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n hash = new this.sha256();\n hash.update(canonicalRequest);\n return [4 /*yield*/, hash.digest()];\n case 1:\n hashedRequest = _a.sent();\n return [2 /*return*/, ALGORITHM_IDENTIFIER + \"\\n\" + longDate + \"\\n\" + credentialScope + \"\\n\" + toHex(hashedRequest)];\n }\n });\n });\n };\n SignatureV4.prototype.getCanonicalPath = function (_a) {\n var path = _a.path;\n if (this.uriEscapePath) {\n var doubleEncoded = encodeURIComponent(path.replace(/^\\//, \"\"));\n return \"/\" + doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n };\n SignatureV4.prototype.getSignature = function (longDate, credentialScope, keyPromise, canonicalRequest) {\n return __awaiter(this, void 0, void 0, function () {\n var stringToSign, hash, _a, _b, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, this.createStringToSign(longDate, credentialScope, canonicalRequest)];\n case 1:\n stringToSign = _d.sent();\n _b = (_a = this.sha256).bind;\n return [4 /*yield*/, keyPromise];\n case 2:\n hash = new (_b.apply(_a, [void 0, _d.sent()]))();\n hash.update(stringToSign);\n _c = toHex;\n return [4 /*yield*/, hash.digest()];\n case 3: return [2 /*return*/, _c.apply(void 0, [_d.sent()])];\n }\n });\n });\n };\n SignatureV4.prototype.getSigningKey = function (credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n };\n return SignatureV4;\n}());\nexport { SignatureV4 };\nvar formatDate = function (now) {\n var longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate: longDate,\n shortDate: longDate.substr(0, 8),\n };\n};\nvar getCanonicalHeaderList = function (headers) { return Object.keys(headers).sort().join(\";\"); };\nvar normalizeRegionProvider = function (region) {\n if (typeof region === \"string\") {\n var promisified_1 = Promise.resolve(region);\n return function () { return promisified_1; };\n }\n else {\n return region;\n }\n};\nvar normalizeCredentialsProvider = function (credentials) {\n if (typeof credentials === \"object\") {\n var promisified_2 = Promise.resolve(credentials);\n return function () { return promisified_2; };\n }\n else {\n return credentials;\n }\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2lnbmF0dXJlVjQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvU2lnbmF0dXJlVjQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWlCQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFFbkQsT0FBTyxFQUNMLG9CQUFvQixFQUNwQixxQkFBcUIsRUFDckIsZUFBZSxFQUNmLG9CQUFvQixFQUNwQixXQUFXLEVBQ1gsc0JBQXNCLEVBQ3RCLDBCQUEwQixFQUMxQixtQkFBbUIsRUFDbkIsaUJBQWlCLEVBQ2pCLGFBQWEsRUFDYixxQkFBcUIsRUFDckIsMEJBQTBCLEVBQzFCLFlBQVksRUFDWixpQkFBaUIsR0FDbEIsTUFBTSxhQUFhLENBQUM7QUFDckIsT0FBTyxFQUFFLFdBQVcsRUFBRSxhQUFhLEVBQUUsTU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ZWQgPSBQcm9taXNlLnJlc29sdmUoY3JlZGVudGlhbHMpO1xuICAgIHJldHVybiAoKSA9PiBwcm9taXNpZmllZDtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gY3JlZGVudGlhbHM7XG4gIH1cbn07XG4iXX0=","import { __assign, __values } from \"tslib\";\nimport { cloneRequest } from \"./cloneRequest\";\n/**\n * @internal\n */\nexport function moveHeadersToQuery(request, options) {\n var e_1, _a;\n var _b;\n if (options === void 0) { options = {}; }\n var _c = typeof request.clone === \"function\" ? request.clone() : cloneRequest(request), headers = _c.headers, _d = _c.query, query = _d === void 0 ? {} : _d;\n try {\n for (var _e = __values(Object.keys(headers)), _f = _e.next(); !_f.done; _f = _e.next()) {\n var name = _f.value;\n var lname = name.toLowerCase();\n if (lname.substr(0, 6) === \"x-amz-\" && !((_b = options.unhoistableHeaders) === null || _b === void 0 ? void 0 : _b.has(lname))) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_a = _e.return)) _a.call(_e);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return __assign(__assign({}, request), { headers: headers,\n query: query });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW92ZUhlYWRlcnNUb1F1ZXJ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vdmVIZWFkZXJzVG9RdWVyeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRTlDOztHQUVHO0FBQ0gsTUFBTSxVQUFVLGtCQUFrQixDQUNoQyxPQUFvQixFQUNwQixPQUFrRDs7O0lBQWxELHdCQUFBLEVBQUEsWUFBa0Q7SUFFNUMsSUFBQSxLQUNKLE9BQVEsT0FBZSxDQUFDLEtBQUssS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zdDogSHR0cFJlcXVlc3QsXG4gIG9wdGlvbnM6IHsgdW5ob2lzdGFibGVIZWFkZXJzPzogU2V0PHN0cmluZz4gfSA9IHt9XG4pOiBIdHRwUmVxdWVzdCAmIHsgcXVlcnk6IFF1ZXJ5UGFyYW1ldGVyQmFnIH0ge1xuICBjb25zdCB7IGhlYWRlcnMsIHF1ZXJ5ID0ge30gYXMgUXVlcnlQYXJhbWV0ZXJCYWcgfSA9XG4gICAgdHlwZW9mIChyZXF1ZXN0IGFzIGFueSkuY2xvbmUgPT09IFwiZnVuY3Rpb25cIiA/IChyZXF1ZXN0IGFzIGFueSkuY2xvbmUoKSA6IGNsb25lUmVxdWVzdChyZXF1ZXN0KTtcbiAgZm9yIChjb25zdCBuYW1lIG9mIE9iamVjdC5rZXlzKGhlYWRlcnMpKSB7XG4gICAgY29uc3QgbG5hbWUgPSBuYW1lLnRvTG93ZXJDYXNlKCk7XG4gICAgaWYgKGxuYW1lLnN1YnN0cigwLCA2KSA9PT0gXCJ4LWFtei1cIiAmJiAhb3B0aW9ucy51bmhvaXN0YWJsZUhlYWRlcnM/LmhhcyhsbmFtZSkpIHtcbiAgICAgIHF1ZXJ5W25hbWVdID0gaGVhZGVyc1tuYW1lXTtcbiAgICAgIGRlbGV0ZSBoZWFkZXJzW25hbWVdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB7XG4gICAgLi4ucmVxdWVzdCxcbiAgICBoZWFkZXJzLFxuICAgIHF1ZXJ5LFxuICB9O1xufVxuIl19","import { __values } from \"tslib\";\nexport function hasHeader(soughtHeader, headers) {\n var e_1, _a;\n soughtHeader = soughtHeader.toLowerCase();\n try {\n for (var _b = __values(Object.keys(headers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var headerName = _c.value;\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if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biJdfQ==","import { __values } from \"tslib\";\nimport { escapeUri } from \"@aws-sdk/util-uri-escape\";\nimport { SIGNATURE_HEADER } from \"./constants\";\n/**\n * @internal\n */\nexport function getCanonicalQuery(_a) {\n var e_1, _b;\n var _c = _a.query, query = _c === void 0 ? {} : _c;\n var keys = [];\n var serialized = {};\n var _loop_1 = function (key) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n return \"continue\";\n }\n keys.push(key);\n var value = query[key];\n if (typeof value === \"string\") {\n serialized[key] = escapeUri(key) + \"=\" + escapeUri(value);\n }\n else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(function (encoded, value) { return encoded.concat([escapeUri(key) + \"=\" + escapeUri(value)]); }, [])\n .join(\"&\");\n }\n };\n try {\n for (var _d = __values(Object.keys(query).sort()), _e = _d.next(); !_e.done; _e = _d.next()) {\n var key = _e.value;\n _loop_1(key);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_e && !_e.done && (_b = _d.return)) _b.call(_d);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return keys\n .map(function (key) { return serialized[key]; })\n .filter(function (serialized) { return serialized; }) // omit any falsy values\n .join(\"&\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0Q2Fub25pY2FsUXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2V0Q2Fub25pY2FsUXVlcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUVyRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFL0M7O0dBRUc7QUFDSCxNQUFNLFVBQVUsaUJBQWlCLENBQUMsRUFBMkI7O1FBQXpCLGFBQVUsRUFBVixLQUFLLG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Iikge1xuICAgICAgc2VyaWFsaXplZFtrZXldID0gYCR7ZXNjYXBlVXJpKGtleSl9PSR7ZXNjYXBlVXJpKHZhbHVlKX1gO1xuICAgIH0gZWxzZSBpZiAoQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHtcbiAgICAgIHNlcmlhbGl6ZWRba2V5XSA9IHZhbHVlXG4gICAgICAgIC5zbGljZSgwKVxuICAgICAgICAuc29ydCgpXG4gICAgICAgIC5yZWR1Y2UoXG4gICAgICAgICAgKGVuY29kZWQ6IEFycmF5PHN0cmluZz4sIHZhbHVlOiBzdHJpbmcpID0+IGVuY29kZWQuY29uY2F0KFtgJHtlc2NhcGVVcmkoa2V5KX09JHtlc2NhcGVVcmkodmFsdWUpfWBdKSxcbiAgICAgICAgICBbXVxuICAgICAgICApXG4gICAgICAgIC5qb2luKFwiJlwiKTtcbiAgICB9XG4gIH1cblxuICByZXR1cm4ga2V5c1xuICAgIC5tYXAoKGtleSkgPT4gc2VyaWFsaXplZFtrZXldKVxuICAgIC5maWx0ZXIoKHNlcmlhbGl6ZWQpID0+IHNlcmlhbGl6ZWQpIC8vIG9taXQgYW55IGZhbHN5IHZhbHVlc1xuICAgIC5qb2luKFwiJlwiKTtcbn1cbiJdfQ==","import { __assign, __awaiter, __generator, __read } from \"tslib\";\nimport { SignatureV4 } from \"@aws-sdk/signature-v4\";\nexport function resolveAwsAuthConfig(input) {\n var _this = this;\n var credentials = input.credentials || input.credentialDefaultProvider(input);\n var normalizedCreds = normalizeProvider(credentials);\n var _a = input.signingEscapePath, signingEscapePath = _a === void 0 ? true : _a, _b = input.systemClockOffset, systemClockOffset = _b === void 0 ? input.systemClockOffset || 0 : _b, sha256 = input.sha256;\n var signer;\n if (input.signer) {\n //if signer is supplied by user, normalize it to a function returning a promise for signer.\n signer = normalizeProvider(input.signer);\n }\n else {\n //construct a provider inferring signing from region.\n signer = function () {\n return normalizeProvider(input.region)()\n .then(function (region) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, input.regionInfoProvider(region)];\n case 1: return [2 /*return*/, [(_a.sent()) || {}, region]];\n }\n }); }); })\n .then(function (_a) {\n var _b = __read(_a, 2), regionInfo = _b[0], region = _b[1];\n var signingRegion = regionInfo.signingRegion, signingService = regionInfo.signingService;\n //update client's singing region and signing service config if they are resolved.\n //signing region resolving order: user supplied signingRegion -> endpoints.json inferred region -> client region\n input.signingRegion = input.signingRegion || signingRegion || region;\n //signing name resolving order:\n //user supplied signingName -> endpoints.json inferred (credential scope -> model arnNamespace) -> model service id\n input.signingName = input.signingName || signingService || input.serviceId;\n return new SignatureV4({\n credentials: normalizedCreds,\n region: input.signingRegion,\n service: input.signingName,\n sha256: sha256,\n uriEscapePath: signingEscapePath,\n });\n });\n };\n }\n return __assign(__assign({}, input), { systemClockOffset: systemClockOffset,\n signingEscapePath: signingEscapePath, credentials: normalizedCreds, signer: signer });\n}\nfunction normalizeProvider(input) {\n if (typeof input === \"object\") {\n var promisified_1 = Promise.resolve(input);\n return function () { return promisified_1; };\n }\n return input;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQTRDcEQsTUFBTSxVQUFVLG9CQUFvQixDQUFJLEtBQWtEO0lBQTFGLGlCQXVDQztJQXRDQyxJQUFNLFdBQVcsR0FBRyxLQUFLLENBQUMsV0FBVyxJQUFJLEtBQUssQ0FBQyx5QkFBeUIsQ0FBQyxLQUFZLENBQUMsQ0FBQztJQUN2RixJQUFNLGVBQWUsR0FBRyxpQkFBaUIsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUMv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x-amz-user-agent\";\nexport var SPACE = \" \";\nexport var UA_ESCAPE_REGEX = /[^\\!\\#\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w]/g;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsSUFBTSxVQUFVLEdBQUcsWUFBWSxDQUFDO0FBRXZDLE1BQU0sQ0FBQyxJQUFNLGdCQUFnQixHQUFHLGtCQUFrQixDQUFDO0FBRW5ELE1BQU0sQ0FBQyxJQUFNLEtBQUssR0FBRyxHQUFHLENBQUM7QUFFekIsTUFBTSxDQUFDLElBQU0sZUFBZSxHQUFHLHdDQUF3QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IFVTRVJfQUdFTlQgPSBcInVzZXItYWdlbnRcIjtcblxuZXhwb3J0IGNvbnN0IFhfQU1aX1VTRVJfQUdFTlQgPSBcIngtYW16LXVzZXItYWdlbnRcIjtcblxuZXhwb3J0IGNvbnN0IFNQQUNFID0gXCIgXCI7XG5cbmV4cG9ydCBjb25zdCBVQV9FU0NBUEVfUkVHRVggPSAvW15cXCFcXCNcXCRcXCVcXCZcXCdcXCpcXCtcXC1cXC5cXF5cXF9cXGBcXHxcXH5cXGRcXHddL2c7XG4iXX0=","import { __assign, __awaiter, __generator, __read, __spread } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nimport { SPACE, UA_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT } from \"./constants\";\n/**\n * Build user agent header sections from:\n * 1. runtime-specific default user agent provider;\n * 2. custom user agent from `customUserAgent` client config;\n * 3. handler execution context set by internal SDK components;\n * The built user agent will be set to `x-amz-user-agent` header for ALL the\n * runtimes.\n * Please note that any override to the `user-agent` or `x-amz-user-agent` header\n * in the HTTP request is discouraged. Please use `customUserAgent` client\n * config or middleware setting the `userAgent` context to generate desired user\n * agent.\n */\nexport var userAgentMiddleware = function (options) { return function (next, context) { return function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var request, headers, userAgent, defaultUserAgent, customUserAgent, normalUAValue;\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n request = args.request;\n if (!HttpRequest.isInstance(request))\n return [2 /*return*/, next(args)];\n headers = request.headers;\n userAgent = ((_a = context === null || context === void 0 ? void 0 : context.userAgent) === null || _a === void 0 ? void 0 : _a.map(escapeUserAgent)) || [];\n return [4 /*yield*/, options.defaultUserAgentProvider()];\n case 1:\n defaultUserAgent = (_c.sent()).map(escapeUserAgent);\n customUserAgent = ((_b = options === null || options === void 0 ? void 0 : options.customUserAgent) === null || _b === void 0 ? void 0 : _b.map(escapeUserAgent)) || [];\n // Set value to AWS-specific user agent header\n headers[X_AMZ_USER_AGENT] = __spread(defaultUserAgent, userAgent, customUserAgent).join(SPACE);\n normalUAValue = __spread(defaultUserAgent.filter(function (section) { return section.startsWith(\"aws-sdk-\"); }), customUserAgent).join(SPACE);\n if (options.runtime !== \"browser\" && normalUAValue) {\n headers[USER_AGENT] = headers[USER_AGENT] ? headers[USER_AGENT] + \" \" + normalUAValue : normalUAValue;\n }\n return [2 /*return*/, next(__assign(__assign({}, args), { request: request }))];\n }\n });\n}); }; }; };\n/**\n * Escape the each pair according to https://tools.ietf.org/html/rfc5234 and join the pair with pattern `name/version`.\n * User agent name may include prefix like `md/`, `api/`, `os/` etc., we should not escape the `/` after the prefix.\n * @private\n */\nvar escapeUserAgent = function (_a) {\n var _b = __read(_a, 2), name = _b[0], version = _b[1];\n var prefixSeparatorIndex = name.indexOf(\"/\");\n var prefix = name.substring(0, prefixSeparatorIndex); // If no prefix, prefix is just \"\"\n var uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version]\n .filter(function (item) { return item && item.length > 0; })\n .map(function (item) { return item === null || item === void 0 ? void 0 : item.replace(UA_ESCAPE_REGEX, \"_\"); })\n .join(\"/\");\n};\nexport var getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true,\n};\nexport var getUserAgentPlugin = function (config) { return ({\n applyToStack: function (clientStack) {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n },\n}); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1hZ2VudC1taWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3VzZXItYWdlbnQtbWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBY3JELE9BQU8sRUFBRSxLQUFLLEVBQUUsZUFBZSxFQUFFLFVBQVUsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUVuRjs7Ozs7Ozs7Ozs7R0FXRztBQUNILE1BQU0sQ0FBQyxJQUFNLG1CQUFtQixHQUFHLFVBQUMsT0FBZ0MsSUFBSyxPQUFBLFVBQ3ZFLElBQTRCLEVBQzVCLE9BQWdDLElBQ0wsT0FBQSxVQUFPLElBQWdDOzs7Ozs7Z0JBQzFELE9BQU8sR0FBSyxJQUFJLFFBQVQsQ0FBVTtnQkFDekIsSUFBSSxDQUFDLFdBQVcsQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFDO29CQUFFLHNCQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsRUFBQztnQkFDaEQsT0FBTyxHQUFLLE9BQU8sUUFBWixDQUFhO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b25dXG4gICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbSAmJiBpdGVtLmxlbmd0aCA+IDApXG4gICAgLm1hcCgoaXRlbSkgPT4gaXRlbT8ucmVwbGFjZShVQV9FU0NBUEVfUkVHRVgsIFwiX1wiKSlcbiAgICAuam9pbihcIi9cIik7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0VXNlckFnZW50TWlkZGxld2FyZU9wdGlvbnM6IEJ1aWxkSGFuZGxlck9wdGlvbnMgJiBBYnNvbHV0ZUxvY2F0aW9uID0ge1xuICBuYW1lOiBcImdldFVzZXJBZ2VudE1pZGRsZXdhcmVcIixcbiAgc3RlcDogXCJidWlsZFwiLFxuICBwcmlvcml0eTogXCJsb3dcIixcbiAgdGFnczogW1wiU0VUX1VTRVJfQUdFTlRcIiwgXCJVU0VSX0FHRU5UXCJdLFxuICBvdmVycmlkZTogdHJ1ZSxcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRVc2VyQWdlbnRQbHVnaW4gPSAoY29uZmlnOiBVc2VyQWdlbnRSZXNvbHZlZENvbmZpZyk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQodXNlckFnZW50TWlkZGxld2FyZShjb25maWcpLCBnZXRVc2VyQWdlbnRNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ==","import { __assign, __extends } from \"tslib\";\nimport { ClientDefaultValues as __ClientDefaultValues } from \"./runtimeConfig\";\nimport { resolveEndpointsConfig, resolveRegionConfig, } from \"@aws-sdk/config-resolver\";\nimport { getContentLengthPlugin } from \"@aws-sdk/middleware-content-length\";\nimport { getHostHeaderPlugin, resolveHostHeaderConfig, } from \"@aws-sdk/middleware-host-header\";\nimport { getLoggerPlugin } from \"@aws-sdk/middleware-logger\";\nimport { getRetryPlugin, resolveRetryConfig } from \"@aws-sdk/middleware-retry\";\nimport { resolveAwsAuthConfig } from \"@aws-sdk/middleware-signing\";\nimport { getUserAgentPlugin, resolveUserAgentConfig, } from \"@aws-sdk/middleware-user-agent\";\nimport { Client as __Client, } from \"@aws-sdk/smithy-client\";\n/**\n *Amazon Cognito Federated Identities is a web service that delivers scoped temporary\n * credentials to mobile devices and other untrusted environments. It uniquely identifies a\n * device and supplies the user with a consistent identity over the lifetime of an\n * application.
\n *Using Amazon Cognito Federated Identities, you can enable authentication with one or\n * more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon\n * Cognito user pool, and you can also choose to support unauthenticated access from your app.\n * Cognito delivers a unique identifier for each user and acts as an OpenID token provider\n * trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS\n * credentials.
\n *For a description of the authentication flow from the Amazon Cognito Developer Guide\n * see Authentication Flow.
\n *For more information see Amazon Cognito Federated Identities.
\n */\nvar CognitoIdentityClient = /** @class */ (function (_super) {\n __extends(CognitoIdentityClient, _super);\n function CognitoIdentityClient(configuration) {\n var _this = this;\n var _config_0 = __assign(__assign({}, __ClientDefaultValues), configuration);\n var _config_1 = resolveRegionConfig(_config_0);\n var _config_2 = resolveEndpointsConfig(_config_1);\n var _config_3 = resolveAwsAuthConfig(_config_2);\n var _config_4 = resolveRetryConfig(_config_3);\n var _config_5 = resolveHostHeaderConfig(_config_4);\n var _config_6 = resolveUserAgentConfig(_config_5);\n _this = _super.call(this, _config_6) || this;\n _this.config = _config_6;\n _this.middlewareStack.use(getRetryPlugin(_this.config));\n _this.middlewareStack.use(getContentLengthPlugin(_this.config));\n _this.middlewareStack.use(getHostHeaderPlugin(_this.config));\n _this.middlewareStack.use(getLoggerPlugin(_this.config));\n _this.middlewareStack.use(getUserAgentPlugin(_this.config));\n return _this;\n }\n CognitoIdentityClient.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n return CognitoIdentityClient;\n}(__Client));\nexport { CognitoIdentityClient };\n//# sourceMappingURL=CognitoIdentityClient.js.map","import { __assign } from \"tslib\";\nexport function resolveUserAgentConfig(input) {\n return __assign(__assign({}, input), { customUserAgent: typeof input.customUserAgent === \"string\" ? [[input.customUserAgent]] : input.customUserAgent });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWdCQSxNQUFNLFVBQVUsc0JBQXNCLENBQ3BDLEtBQW9EO0lBRXBELDZCQUNLLEtBQUssS0FDUixlQUFlLEVBQUUsT0FBTyxLQUFLLENBQUMsZUFBZSxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxlQUFlLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsZUFBZSxJQUM5RztBQUNKLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlciwgVXNlckFnZW50IH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5leHBvcnQgaW50ZXJmYWNlIFVzZXJBZ2VudElucHV0Q29uZmlnIHtcbiAgLyoqXG4gICAqIFRoZSBjdXN0b20gdXNlciBhZ2VudCBoZWFkZXIgdGhhdCB3b3VsZCBiZSBhcHBlbmRlZCB0byBkZWZhdWx0IG9uZVxuICAgKi9cbiAgY3VzdG9tVXNlckFnZW50Pzogc3RyaW5nIHwgVXNlckFnZW50O1xufVxuaW50ZXJmYWNlIFByZXZpb3VzbHlSZXNvbHZlZCB7XG4gIGRlZmF1bHRVc2VyQWdlbnRQcm92aWRlcjogUHJvdmlkZXI8VXNlckFnZW50PjtcbiAgcnVudGltZTogc3RyaW5nO1xufVxuZXhwb3J0IGludGVyZmFjZSBVc2VyQWdlbnRSZXNvbHZlZENvbmZpZyB7XG4gIGRlZmF1bHRVc2VyQWdlbnRQcm92aWRlcjogUHJvdmlkZXI8VXNlckFnZW50PjtcbiAgY3VzdG9tVXNlckFnZW50PzogVXNlckFnZW50O1xuICBydW50aW1lOiBzdHJpbmc7XG59XG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZVVzZXJBZ2VudENvbmZpZzxUPihcbiAgaW5wdXQ6IFQgJiBQcmV2aW91c2x5UmVzb2x2ZWQgJiBVc2VyQWdlbnRJbnB1dENvbmZpZ1xuKTogVCAmIFVzZXJBZ2VudFJlc29sdmVkQ29uZmlnIHtcbiAgcmV0dXJuIHtcbiAgICAuLi5pbnB1dCxcbiAgICBjdXN0b21Vc2VyQWdlbnQ6IHR5cGVvZiBpbnB1dC5jdXN0b21Vc2VyQWdlbnQgPT09IFwic3RyaW5nXCIgPyBbW2lucHV0LmN1c3RvbVVzZXJBZ2VudF1dIDogaW5wdXQuY3VzdG9tVXNlckFnZW50LFxuICB9O1xufVxuIl19","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { ConsoleLogger as Logger } from './Logger';\nimport { StorageHelper } from './StorageHelper';\nimport { makeQuerablePromise } from './JS';\nimport { FacebookOAuth, GoogleOAuth } from './OAuthHelper';\nimport { jitteredExponentialRetry } from './Util';\nimport { getAmplifyUserAgent } from './Platform';\nimport { Amplify } from './Amplify';\nimport { fromCognitoIdentity, fromCognitoIdentityPool, } from '@aws-sdk/credential-provider-cognito-identity';\nimport { CognitoIdentityClient, GetIdCommand, } from '@aws-sdk/client-cognito-identity';\nvar logger = new Logger('Credentials');\nvar CREDENTIALS_TTL = 50 * 60 * 1000; // 50 min, can be modified on config if required in the future\nvar CredentialsClass = /** @class */ (function () {\n function CredentialsClass(config) {\n this._gettingCredPromise = null;\n this._refreshHandlers = {};\n // Allow `Auth` to be injected for SSR, but Auth isn't a required dependency for Credentials\n this.Auth = undefined;\n this.configure(config);\n this._refreshHandlers['google'] = GoogleOAuth.refreshGoogleToken;\n this._refreshHandlers['facebook'] = FacebookOAuth.refreshFacebookToken;\n }\n CredentialsClass.prototype.getModuleName = function () {\n return 'Credentials';\n };\n CredentialsClass.prototype.getCredSource = function () {\n return this._credentials_source;\n };\n CredentialsClass.prototype.configure = function (config) {\n if (!config)\n return this._config || {};\n this._config = Object.assign({}, this._config, config);\n var refreshHandlers = this._config.refreshHandlers;\n // If the developer has provided an object of refresh handlers,\n // then we can merge the provided handlers with the current handlers.\n if (refreshHandlers) {\n this._refreshHandlers = __assign(__assign({}, this._refreshHandlers), refreshHandlers);\n }\n this._storage = this._config.storage;\n if (!this._storage) {\n this._storage = new StorageHelper().getStorage();\n }\n this._storageSync = Promise.resolve();\n if (typeof this._storage['sync'] === 'function') {\n this._storageSync = this._storage['sync']();\n }\n return this._config;\n };\n CredentialsClass.prototype.get = function () {\n logger.debug('getting credentials');\n return this._pickupCredentials();\n };\n CredentialsClass.prototype._pickupCredentials = function () {\n logger.debug('picking up credentials');\n if (!this._gettingCredPromise || !this._gettingCredPromise.isPending()) {\n logger.debug('getting new cred promise');\n this._gettingCredPromise = makeQuerablePromise(this._keepAlive());\n }\n else {\n logger.debug('getting old cred promise');\n }\n return this._gettingCredPromise;\n };\n CredentialsClass.prototype._keepAlive = function () {\n return __awaiter(this, void 0, void 0, function () {\n var cred, _a, Auth, user_1, session, refreshToken_1, refreshRequest, err_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n logger.debug('checking if credentials exists and not expired');\n cred = this._credentials;\n if (cred && !this._isExpired(cred) && !this._isPastTTL()) {\n logger.debug('credentials not changed and not expired, directly return');\n return [2 /*return*/, Promise.resolve(cred)];\n }\n logger.debug('need to get a new credential or refresh the existing one');\n _a = this.Auth, Auth = _a === void 0 ? Amplify.Auth : _a;\n if (!Auth || typeof Auth.currentUserCredentials !== 'function') {\n return [2 /*return*/, Promise.reject('No Auth module registered in Amplify')];\n }\n if (!(!this._isExpired(cred) && this._isPastTTL())) return [3 /*break*/, 6];\n logger.debug('ttl has passed but token is not yet expired');\n _b.label = 1;\n case 1:\n _b.trys.push([1, 5, , 6]);\n return [4 /*yield*/, Auth.currentUserPoolUser()];\n case 2:\n user_1 = _b.sent();\n return [4 /*yield*/, Auth.currentSession()];\n case 3:\n session = _b.sent();\n refreshToken_1 = session.refreshToken;\n refreshRequest = new Promise(function (res, rej) {\n user_1.refreshSession(refreshToken_1, function (err, data) {\n return err ? rej(err) : res(data);\n });\n });\n return [4 /*yield*/, refreshRequest];\n case 4:\n _b.sent(); // note that rejections will be caught and handled in the catch block.\n return [3 /*break*/, 6];\n case 5:\n err_1 = _b.sent();\n // should not throw because user might just be on guest access or is authenticated through federation\n logger.debug('Error attempting to refreshing the session', err_1);\n return [3 /*break*/, 6];\n case 6: return [2 /*return*/, Auth.currentUserCredentials()];\n }\n });\n });\n };\n CredentialsClass.prototype.refreshFederatedToken = function (federatedInfo) {\n logger.debug('Getting federated credentials');\n var provider = federatedInfo.provider, user = federatedInfo.user, token = federatedInfo.token, identity_id = federatedInfo.identity_id;\n var expires_at = federatedInfo.expires_at;\n // Make sure expires_at is in millis\n expires_at =\n new Date(expires_at).getFullYear() === 1970\n ? expires_at * 1000\n : expires_at;\n var that = this;\n logger.debug('checking if federated jwt token expired');\n if (expires_at > new Date().getTime()) {\n // if not expired\n logger.debug('token not expired');\n return this._setCredentialsFromFederation({\n provider: provider,\n token: token,\n user: user,\n identity_id: identity_id,\n expires_at: expires_at,\n });\n }\n else {\n // if refresh handler exists\n if (that._refreshHandlers[provider] &&\n typeof that._refreshHandlers[provider] === 'function') {\n logger.debug('getting refreshed jwt token from federation provider');\n return this._providerRefreshWithRetry({\n refreshHandler: that._refreshHandlers[provider],\n provider: provider,\n user: user,\n });\n }\n else {\n logger.debug('no refresh handler for provider:', provider);\n this.clear();\n return Promise.reject('no refresh handler for provider');\n }\n }\n };\n CredentialsClass.prototype._providerRefreshWithRetry = function (_a) {\n var _this = this;\n var refreshHandler = _a.refreshHandler, provider = _a.provider, user = _a.user;\n var MAX_DELAY_MS = 10 * 1000;\n // refreshHandler will retry network errors, otherwise it will\n // return NonRetryableError to break out of jitteredExponentialRetry\n return jitteredExponentialRetry(refreshHandler, [], MAX_DELAY_MS)\n .then(function (data) {\n logger.debug('refresh federated token sucessfully', data);\n return _this._setCredentialsFromFederation({\n provider: provider,\n token: data.token,\n user: user,\n identity_id: data.identity_id,\n expires_at: data.expires_at,\n });\n })\n .catch(function (e) {\n var isNetworkError = typeof e === 'string' &&\n e.toLowerCase().lastIndexOf('network error', e.length) === 0;\n if (!isNetworkError) {\n _this.clear();\n }\n logger.debug('refresh federated token failed', e);\n return Promise.reject('refreshing federation token failed: ' + e);\n });\n };\n CredentialsClass.prototype._isExpired = function (credentials) {\n if (!credentials) {\n logger.debug('no credentials for expiration check');\n return true;\n }\n logger.debug('are these credentials expired?', credentials);\n var ts = Date.now();\n /* returns date object.\n https://github.com/aws/aws-sdk-js-v3/blob/v1.0.0-beta.1/packages/types/src/credentials.ts#L26\n */\n var expiration = credentials.expiration;\n return expiration.getTime() <= ts;\n };\n CredentialsClass.prototype._isPastTTL = function () {\n return this._nextCredentialsRefresh <= Date.now();\n };\n CredentialsClass.prototype._setCredentialsForGuest = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a, identityPoolId, region, mandatorySignIn, identityId, e_1, cognitoClient, credentials, cognitoIdentityParams, credentialsProvider;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n logger.debug('setting credentials for guest');\n _a = this._config, identityPoolId = _a.identityPoolId, region = _a.region, mandatorySignIn = _a.mandatorySignIn;\n if (mandatorySignIn) {\n return [2 /*return*/, Promise.reject('cannot get guest credentials when mandatory signin enabled')];\n }\n if (!identityPoolId) {\n logger.debug('No Cognito Identity pool provided for unauthenticated access');\n return [2 /*return*/, Promise.reject('No Cognito Identity pool provided for unauthenticated access')];\n }\n if (!region) {\n logger.debug('region is not configured for getting the credentials');\n return [2 /*return*/, Promise.reject('region is not configured for getting the credentials')];\n }\n identityId = undefined;\n _b.label = 1;\n case 1:\n _b.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this._storageSync];\n case 2:\n _b.sent();\n identityId = this._storage.getItem('CognitoIdentityId-' + identityPoolId);\n this._identityId = identityId;\n return [3 /*break*/, 4];\n case 3:\n e_1 = _b.sent();\n logger.debug('Failed to get the cached identityId', e_1);\n return [3 /*break*/, 4];\n case 4:\n cognitoClient = new CognitoIdentityClient({\n region: region,\n customUserAgent: getAmplifyUserAgent(),\n });\n credentials = undefined;\n if (identityId) {\n cognitoIdentityParams = {\n identityId: identityId,\n client: cognitoClient,\n };\n credentials = fromCognitoIdentity(cognitoIdentityParams)();\n }\n else {\n credentialsProvider = function () { return __awaiter(_this, void 0, void 0, function () {\n var IdentityId, cognitoIdentityParams, credentialsFromCognitoIdentity;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, cognitoClient.send(new GetIdCommand({\n IdentityPoolId: identityPoolId,\n }))];\n case 1:\n IdentityId = (_a.sent()).IdentityId;\n this._identityId = IdentityId;\n cognitoIdentityParams = {\n client: cognitoClient,\n identityId: IdentityId,\n };\n credentialsFromCognitoIdentity = fromCognitoIdentity(cognitoIdentityParams);\n return [2 /*return*/, credentialsFromCognitoIdentity()];\n }\n });\n }); };\n credentials = credentialsProvider().catch(function (err) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n throw err;\n });\n }); });\n }\n return [2 /*return*/, this._loadCredentials(credentials, 'guest', false, null)\n .then(function (res) {\n return res;\n })\n .catch(function (e) { return __awaiter(_this, void 0, void 0, function () {\n var credentialsProvider;\n var _this = this;\n return __generator(this, function (_a) {\n // If identity id is deleted in the console, we make one attempt to recreate it\n // and remove existing id from cache.\n if (e.name === 'ResourceNotFoundException' &&\n e.message === \"Identity '\" + identityId + \"' not found.\") {\n logger.debug('Failed to load guest credentials');\n this._storage.removeItem('CognitoIdentityId-' + identityPoolId);\n credentialsProvider = function () { return __awaiter(_this, void 0, void 0, function () {\n var IdentityId, cognitoIdentityParams, credentialsFromCognitoIdentity;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, cognitoClient.send(new GetIdCommand({\n IdentityPoolId: identityPoolId,\n }))];\n case 1:\n IdentityId = (_a.sent()).IdentityId;\n this._identityId = IdentityId;\n cognitoIdentityParams = {\n client: cognitoClient,\n identityId: IdentityId,\n };\n credentialsFromCognitoIdentity = fromCognitoIdentity(cognitoIdentityParams);\n return [2 /*return*/, credentialsFromCognitoIdentity()];\n }\n });\n }); };\n credentials = credentialsProvider().catch(function (err) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n throw err;\n });\n }); });\n return [2 /*return*/, this._loadCredentials(credentials, 'guest', false, null)];\n }\n else {\n return [2 /*return*/, e];\n }\n return [2 /*return*/];\n });\n }); })];\n }\n });\n });\n };\n CredentialsClass.prototype._setCredentialsFromFederation = function (params) {\n var provider = params.provider, token = params.token, identity_id = params.identity_id;\n var domains = {\n google: 'accounts.google.com',\n facebook: 'graph.facebook.com',\n amazon: 'www.amazon.com',\n developer: 'cognito-identity.amazonaws.com',\n };\n // Use custom provider url instead of the predefined ones\n var domain = domains[provider] || provider;\n if (!domain) {\n return Promise.reject('You must specify a federated provider');\n }\n var logins = {};\n logins[domain] = token;\n var _a = this._config, identityPoolId = _a.identityPoolId, region = _a.region;\n if (!identityPoolId) {\n logger.debug('No Cognito Federated Identity pool provided');\n return Promise.reject('No Cognito Federated Identity pool provided');\n }\n if (!region) {\n logger.debug('region is not configured for getting the credentials');\n return Promise.reject('region is not configured for getting the credentials');\n }\n var cognitoClient = new CognitoIdentityClient({\n region: region,\n customUserAgent: getAmplifyUserAgent(),\n });\n var credentials = undefined;\n if (identity_id) {\n var cognitoIdentityParams = {\n identityId: identity_id,\n logins: logins,\n client: cognitoClient,\n };\n credentials = fromCognitoIdentity(cognitoIdentityParams)();\n }\n else {\n var cognitoIdentityParams = {\n logins: logins,\n identityPoolId: identityPoolId,\n client: cognitoClient,\n };\n credentials = fromCognitoIdentityPool(cognitoIdentityParams)();\n }\n return this._loadCredentials(credentials, 'federated', true, params);\n };\n CredentialsClass.prototype._setCredentialsFromSession = function (session) {\n var _this = this;\n logger.debug('set credentials from session');\n var idToken = session.getIdToken().getJwtToken();\n var _a = this._config, region = _a.region, userPoolId = _a.userPoolId, identityPoolId = _a.identityPoolId;\n if (!identityPoolId) {\n logger.debug('No Cognito Federated Identity pool provided');\n return Promise.reject('No Cognito Federated Identity pool provided');\n }\n if (!region) {\n logger.debug('region is not configured for getting the credentials');\n return Promise.reject('region is not configured for getting the credentials');\n }\n var key = 'cognito-idp.' + region + '.amazonaws.com/' + userPoolId;\n var logins = {};\n logins[key] = idToken;\n var cognitoClient = new CognitoIdentityClient({\n region: region,\n customUserAgent: getAmplifyUserAgent(),\n });\n /*\n Retreiving identityId with GetIdCommand to mimic the behavior in the following code in aws-sdk-v3:\n https://git.io/JeDxU\n\n Note: Retreive identityId from CredentialsProvider once aws-sdk-js v3 supports this.\n */\n var credentialsProvider = function () { return __awaiter(_this, void 0, void 0, function () {\n var IdentityId, cognitoIdentityParams, credentialsFromCognitoIdentity;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, cognitoClient.send(new GetIdCommand({\n IdentityPoolId: identityPoolId,\n Logins: logins,\n }))];\n case 1:\n IdentityId = (_a.sent()).IdentityId;\n this._identityId = IdentityId;\n cognitoIdentityParams = {\n client: cognitoClient,\n logins: logins,\n identityId: IdentityId,\n };\n credentialsFromCognitoIdentity = fromCognitoIdentity(cognitoIdentityParams);\n return [2 /*return*/, credentialsFromCognitoIdentity()];\n }\n });\n }); };\n var credentials = credentialsProvider().catch(function (err) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n throw err;\n });\n }); });\n return this._loadCredentials(credentials, 'userPool', true, null);\n };\n CredentialsClass.prototype._loadCredentials = function (credentials, source, authenticated, info) {\n var _this = this;\n var that = this;\n var identityPoolId = this._config.identityPoolId;\n return new Promise(function (res, rej) {\n credentials\n .then(function (credentials) { return __awaiter(_this, void 0, void 0, function () {\n var user, provider, token, expires_at, identity_id, e_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug('Load credentials successfully', credentials);\n if (this._identityId && !credentials.identityId) {\n credentials['identityId'] = this._identityId;\n }\n that._credentials = credentials;\n that._credentials.authenticated = authenticated;\n that._credentials_source = source;\n that._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n if (source === 'federated') {\n user = Object.assign({ id: this._credentials.identityId }, info.user);\n provider = info.provider, token = info.token, expires_at = info.expires_at, identity_id = info.identity_id;\n try {\n this._storage.setItem('aws-amplify-federatedInfo', JSON.stringify({\n provider: provider,\n token: token,\n user: user,\n expires_at: expires_at,\n identity_id: identity_id,\n }));\n }\n catch (e) {\n logger.debug('Failed to put federated info into auth storage', e);\n }\n }\n if (!(source === 'guest')) return [3 /*break*/, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this._storageSync];\n case 2:\n _a.sent();\n this._storage.setItem('CognitoIdentityId-' + identityPoolId, credentials.identityId // TODO: IdentityId is currently not returned by fromCognitoIdentityPool()\n );\n return [3 /*break*/, 4];\n case 3:\n e_2 = _a.sent();\n logger.debug('Failed to cache identityId', e_2);\n return [3 /*break*/, 4];\n case 4:\n res(that._credentials);\n return [2 /*return*/];\n }\n });\n }); })\n .catch(function (err) {\n if (err) {\n logger.debug('Failed to load credentials', credentials);\n logger.debug('Error loading credentials', err);\n rej(err);\n return;\n }\n });\n });\n };\n CredentialsClass.prototype.set = function (params, source) {\n if (source === 'session') {\n return this._setCredentialsFromSession(params);\n }\n else if (source === 'federation') {\n return this._setCredentialsFromFederation(params);\n }\n else if (source === 'guest') {\n return this._setCredentialsForGuest();\n }\n else {\n logger.debug('no source specified for setting credentials');\n return Promise.reject('invalid source');\n }\n };\n CredentialsClass.prototype.clear = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this._credentials = null;\n this._credentials_source = null;\n logger.debug('removing aws-amplify-federatedInfo from storage');\n this._storage.removeItem('aws-amplify-federatedInfo');\n return [2 /*return*/];\n });\n });\n };\n /**\n * Compact version of credentials\n * @param {Object} credentials\n * @return {Object} - Credentials\n */\n CredentialsClass.prototype.shear = function (credentials) {\n return {\n accessKeyId: credentials.accessKeyId,\n sessionToken: credentials.sessionToken,\n secretAccessKey: credentials.secretAccessKey,\n identityId: credentials.identityId,\n authenticated: credentials.authenticated,\n };\n };\n return CredentialsClass;\n}());\nexport { CredentialsClass };\nexport var Credentials = new CredentialsClass(null);\nAmplify.register(Credentials);\n/**\n * @deprecated use named import\n */\nexport default Credentials;\n//# sourceMappingURL=Credentials.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { ConsoleLogger as Logger } from './Logger';\nvar logger = new Logger('Hub');\nvar AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined' &&\n typeof Symbol.for === 'function'\n ? Symbol.for('amplify_default')\n : '@@amplify_default');\nfunction isLegacyCallback(callback) {\n return callback.onHubCapsule !== undefined;\n}\nvar HubClass = /** @class */ (function () {\n function HubClass(name) {\n this.listeners = [];\n this.patterns = [];\n this.protectedChannels = [\n 'core',\n 'auth',\n 'api',\n 'analytics',\n 'interactions',\n 'pubsub',\n 'storage',\n 'xr',\n ];\n this.name = name;\n }\n // Note - Need to pass channel as a reference for removal to work and not anonymous function\n HubClass.prototype.remove = function (channel, listener) {\n if (channel instanceof RegExp) {\n var pattern_1 = this.patterns.find(function (_a) {\n var pattern = _a.pattern;\n return pattern.source === channel.source;\n });\n if (!pattern_1) {\n logger.warn(\"No listeners for \" + channel);\n return;\n }\n this.patterns = __spread(this.patterns.filter(function (x) { return x !== pattern_1; }));\n }\n else {\n var holder = this.listeners[channel];\n if (!holder) {\n logger.warn(\"No listeners for \" + channel);\n return;\n }\n this.listeners[channel] = __spread(holder.filter(function (_a) {\n var callback = _a.callback;\n return callback !== listener;\n }));\n }\n };\n HubClass.prototype.dispatch = function (channel, payload, source, ampSymbol) {\n if (source === void 0) { source = ''; }\n if (this.protectedChannels.indexOf(channel) > -1) {\n var hasAccess = ampSymbol === AMPLIFY_SYMBOL;\n if (!hasAccess) {\n logger.warn(\"WARNING: \" + channel + \" is protected and dispatching on it can have unintended consequences\");\n }\n }\n var capsule = {\n channel: channel,\n payload: __assign({}, payload),\n source: source,\n patternInfo: [],\n };\n try {\n this._toListeners(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n };\n HubClass.prototype.listen = function (channel, callback, listenerName) {\n var _this = this;\n if (listenerName === void 0) { listenerName = 'noname'; }\n var cb;\n // Check for legacy onHubCapsule callback for backwards compatability\n if (isLegacyCallback(callback)) {\n logger.warn(\"WARNING onHubCapsule is Deprecated. Please pass in a callback.\");\n cb = callback.onHubCapsule.bind(callback);\n }\n else if (typeof callback !== 'function') {\n throw new Error('No callback supplied to Hub');\n }\n else {\n cb = callback;\n }\n if (channel instanceof RegExp) {\n this.patterns.push({\n pattern: channel,\n callback: cb,\n });\n }\n else {\n var holder = this.listeners[channel];\n if (!holder) {\n holder = [];\n this.listeners[channel] = holder;\n }\n holder.push({\n name: listenerName,\n callback: cb,\n });\n }\n return function () {\n _this.remove(channel, cb);\n };\n };\n HubClass.prototype._toListeners = function (capsule) {\n var channel = capsule.channel, payload = capsule.payload;\n var holder = this.listeners[channel];\n if (holder) {\n holder.forEach(function (listener) {\n logger.debug(\"Dispatching to \" + channel + \" with \", payload);\n try {\n listener.callback(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n });\n }\n if (this.patterns.length > 0) {\n if (!payload.message) {\n logger.warn(\"Cannot perform pattern matching without a message key\");\n return;\n }\n var payloadStr_1 = payload.message;\n this.patterns.forEach(function (pattern) {\n var match = payloadStr_1.match(pattern.pattern);\n if (match) {\n var _a = __read(match), groups = _a.slice(1);\n var dispatchingCapsule = __assign(__assign({}, capsule), { patternInfo: groups });\n try {\n pattern.callback(dispatchingCapsule);\n }\n catch (e) {\n logger.error(e);\n }\n }\n });\n }\n };\n return HubClass;\n}());\nexport { HubClass };\n/*We export a __default__ instance of HubClass to use it as a\npsuedo Singleton for the main messaging bus, however you can still create\nyour own instance of HubClass() for a separate \"private bus\" of events.*/\nexport var Hub = new HubClass('__default__');\n/**\n * @deprecated use named import\n */\nexport default Hub;\n//# sourceMappingURL=Hub.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar MIME_MAP = [\n { type: 'text/plain', ext: 'txt' },\n { type: 'text/html', ext: 'html' },\n { type: 'text/javascript', ext: 'js' },\n { type: 'text/css', ext: 'css' },\n { type: 'text/csv', ext: 'csv' },\n { type: 'text/yaml', ext: 'yml' },\n { type: 'text/yaml', ext: 'yaml' },\n { type: 'text/calendar', ext: 'ics' },\n { type: 'text/calendar', ext: 'ical' },\n { type: 'image/apng', ext: 'apng' },\n { type: 'image/bmp', ext: 'bmp' },\n { type: 'image/gif', ext: 'gif' },\n { type: 'image/x-icon', ext: 'ico' },\n { type: 'image/x-icon', ext: 'cur' },\n { type: 'image/jpeg', ext: 'jpg' },\n { type: 'image/jpeg', ext: 'jpeg' },\n { type: 'image/jpeg', ext: 'jfif' },\n { type: 'image/jpeg', ext: 'pjp' },\n { type: 'image/jpeg', ext: 'pjpeg' },\n { type: 'image/png', ext: 'png' },\n { type: 'image/svg+xml', ext: 'svg' },\n { type: 'image/tiff', ext: 'tif' },\n { type: 'image/tiff', ext: 'tiff' },\n { type: 'image/webp', ext: 'webp' },\n { type: 'application/json', ext: 'json' },\n { type: 'application/xml', ext: 'xml' },\n { type: 'application/x-sh', ext: 'sh' },\n { type: 'application/zip', ext: 'zip' },\n { type: 'application/x-rar-compressed', ext: 'rar' },\n { type: 'application/x-tar', ext: 'tar' },\n { type: 'application/x-bzip', ext: 'bz' },\n { type: 'application/x-bzip2', ext: 'bz2' },\n { type: 'application/pdf', ext: 'pdf' },\n { type: 'application/java-archive', ext: 'jar' },\n { type: 'application/msword', ext: 'doc' },\n { type: 'application/vnd.ms-excel', ext: 'xls' },\n { type: 'application/vnd.ms-excel', ext: 'xlsx' },\n { type: 'message/rfc822', ext: 'eml' },\n];\nexport var isEmpty = function (obj) {\n if (obj === void 0) { obj = {}; }\n return Object.keys(obj).length === 0;\n};\nexport var sortByField = function (list, field, dir) {\n if (!list || !list.sort) {\n return false;\n }\n var dirX = dir && dir === 'desc' ? -1 : 1;\n list.sort(function (a, b) {\n var a_val = a[field];\n var b_val = b[field];\n if (typeof b_val === 'undefined') {\n return typeof a_val === 'undefined' ? 0 : 1 * dirX;\n }\n if (typeof a_val === 'undefined') {\n return -1 * dirX;\n }\n if (a_val < b_val) {\n return -1 * dirX;\n }\n if (a_val > b_val) {\n return 1 * dirX;\n }\n return 0;\n });\n return true;\n};\nexport var objectLessAttributes = function (obj, less) {\n var ret = Object.assign({}, obj);\n if (less) {\n if (typeof less === 'string') {\n delete ret[less];\n }\n else {\n less.forEach(function (attr) {\n delete ret[attr];\n });\n }\n }\n return ret;\n};\nexport var filenameToContentType = function (filename, defVal) {\n if (defVal === void 0) { defVal = 'application/octet-stream'; }\n var name = filename.toLowerCase();\n var filtered = MIME_MAP.filter(function (mime) { return name.endsWith('.' + mime.ext); });\n return filtered.length > 0 ? filtered[0].type : defVal;\n};\nexport var isTextFile = function (contentType) {\n var type = contentType.toLowerCase();\n if (type.startsWith('text/')) {\n return true;\n }\n return ('application/json' === type ||\n 'application/xml' === type ||\n 'application/sh' === type);\n};\nexport var generateRandomString = function () {\n var result = '';\n var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for (var i = 32; i > 0; i -= 1) {\n result += chars[Math.floor(Math.random() * chars.length)];\n }\n return result;\n};\nexport var makeQuerablePromise = function (promise) {\n if (promise.isResolved)\n return promise;\n var isPending = true;\n var isRejected = false;\n var isFullfilled = false;\n var result = promise.then(function (data) {\n isFullfilled = true;\n isPending = false;\n return data;\n }, function (e) {\n isRejected = true;\n isPending = false;\n throw e;\n });\n result.isFullfilled = function () { return isFullfilled; };\n result.isPending = function () { return isPending; };\n result.isRejected = function () { return isRejected; };\n return result;\n};\nexport var isWebWorker = function () {\n if (typeof self === 'undefined') {\n return false;\n }\n var selfContext = self;\n return typeof selfContext.WorkerGlobalScope !== 'undefined' &&\n self instanceof selfContext.WorkerGlobalScope;\n};\nexport var browserOrNode = function () {\n var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n var isNode = typeof process !== 'undefined' &&\n process.versions != null &&\n process.versions.node != null;\n return {\n isBrowser: isBrowser,\n isNode: isNode,\n };\n};\n/**\n * transfer the first letter of the keys to lowercase\n * @param {Object} obj - the object need to be transferred\n * @param {Array} whiteListForItself - whitelist itself from being transferred\n * @param {Array} whiteListForChildren - whitelist its children keys from being transferred\n */\nexport var transferKeyToLowerCase = function (obj, whiteListForItself, whiteListForChildren) {\n if (whiteListForItself === void 0) { whiteListForItself = []; }\n if (whiteListForChildren === void 0) { whiteListForChildren = []; }\n if (!isStrictObject(obj))\n return obj;\n var ret = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var transferedKey = whiteListForItself.includes(key)\n ? key\n : key[0].toLowerCase() + key.slice(1);\n ret[transferedKey] = whiteListForChildren.includes(key)\n ? obj[key]\n : transferKeyToLowerCase(obj[key], whiteListForItself, whiteListForChildren);\n }\n }\n return ret;\n};\n/**\n * transfer the first letter of the keys to lowercase\n * @param {Object} obj - the object need to be transferred\n * @param {Array} whiteListForItself - whitelist itself from being transferred\n * @param {Array} whiteListForChildren - whitelist its children keys from being transferred\n */\nexport var transferKeyToUpperCase = function (obj, whiteListForItself, whiteListForChildren) {\n if (whiteListForItself === void 0) { whiteListForItself = []; }\n if (whiteListForChildren === void 0) { whiteListForChildren = []; }\n if (!isStrictObject(obj))\n return obj;\n var ret = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var transferredKey = whiteListForItself.includes(key)\n ? key\n : key[0].toUpperCase() + key.slice(1);\n ret[transferredKey] = whiteListForChildren.includes(key)\n ? obj[key]\n : transferKeyToUpperCase(obj[key], whiteListForItself, whiteListForChildren);\n }\n }\n return ret;\n};\n/**\n * Return true if the object is a strict object\n * which means it's not Array, Function, Number, String, Boolean or Null\n * @param obj the Object\n */\nexport var isStrictObject = function (obj) {\n return (obj instanceof Object &&\n !(obj instanceof Array) &&\n !(obj instanceof Function) &&\n !(obj instanceof Number) &&\n !(obj instanceof String) &&\n !(obj instanceof Boolean));\n};\n/**\n * @deprecated use per-function imports\n */\nvar JS = /** @class */ (function () {\n function JS() {\n }\n JS.isEmpty = isEmpty;\n JS.sortByField = sortByField;\n JS.objectLessAttributes = objectLessAttributes;\n JS.filenameToContentType = filenameToContentType;\n JS.isTextFile = isTextFile;\n JS.generateRandomString = generateRandomString;\n JS.makeQuerablePromise = makeQuerablePromise;\n JS.isWebWorker = isWebWorker;\n JS.browserOrNode = browserOrNode;\n JS.transferKeyToLowerCase = transferKeyToLowerCase;\n JS.transferKeyToUpperCase = transferKeyToUpperCase;\n JS.isStrictObject = isStrictObject;\n return JS;\n}());\nexport { JS };\n/**\n * @deprecated use per-function imports\n */\nexport default JS;\n//# sourceMappingURL=JS.js.map","/*\n * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nvar LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n};\n/**\n * Write logs\n * @class Logger\n */\nvar ConsoleLogger = /** @class */ (function () {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n function ConsoleLogger(name, level) {\n if (level === void 0) { level = 'WARN'; }\n this.name = name;\n this.level = level;\n }\n ConsoleLogger.prototype._padding = function (n) {\n return n < 10 ? '0' + n : '' + n;\n };\n ConsoleLogger.prototype._ts = function () {\n var dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n };\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype._log = function (type) {\n var msg = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n msg[_i - 1] = arguments[_i];\n }\n var logger_level_name = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n logger_level_name = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n logger_level_name = window.LOG_LEVEL;\n }\n var logger_level = LOG_LEVELS[logger_level_name];\n var type_level = LOG_LEVELS[type];\n if (!(type_level >= logger_level)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n var log = console.log.bind(console);\n if (type === 'ERROR' && console.error) {\n log = console.error.bind(console);\n }\n if (type === 'WARN' && console.warn) {\n log = console.warn.bind(console);\n }\n var prefix = \"[\" + type + \"] \" + this._ts() + \" \" + this.name;\n if (msg.length === 1 && typeof msg[0] === 'string') {\n log(prefix + \" - \" + msg[0]);\n }\n else if (msg.length === 1) {\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n var obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n log(prefix + \" - \" + msg[0], obj);\n }\n else {\n log(prefix, msg);\n }\n };\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.log = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['INFO'], msg));\n };\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.info = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['INFO'], msg));\n };\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.warn = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['WARN'], msg));\n };\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.error = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['ERROR'], msg));\n };\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.debug = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['DEBUG'], msg));\n };\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.verbose = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['VERBOSE'], msg));\n };\n ConsoleLogger.LOG_LEVEL = null;\n return ConsoleLogger;\n}());\nexport { ConsoleLogger };\n//# sourceMappingURL=ConsoleLogger.js.map","// generated by genversion\nexport var version = '3.8.23';\n//# sourceMappingURL=version.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { version } from './version';\nvar BASE_USER_AGENT = \"aws-amplify/\" + version;\nexport var Platform = {\n userAgent: BASE_USER_AGENT + \" js\",\n product: '',\n navigator: null,\n isReactNative: false,\n};\nif (typeof navigator !== 'undefined' && navigator.product) {\n Platform.product = navigator.product || '';\n Platform.navigator = navigator || null;\n switch (navigator.product) {\n case 'ReactNative':\n Platform.userAgent = BASE_USER_AGENT + \" react-native\";\n Platform.isReactNative = true;\n break;\n default:\n Platform.userAgent = BASE_USER_AGENT + \" js\";\n Platform.isReactNative = false;\n break;\n }\n}\nexport var getAmplifyUserAgent = function () {\n return Platform.userAgent;\n};\n/**\n * @deprecated use named import\n */\nexport default Platform;\n//# sourceMappingURL=index.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar dataMemory = {};\n/** @class */\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage() {\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n MemoryStorage.setItem = function (key, value) {\n dataMemory[key] = value;\n return dataMemory[key];\n };\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n MemoryStorage.getItem = function (key) {\n return Object.prototype.hasOwnProperty.call(dataMemory, key)\n ? dataMemory[key]\n : undefined;\n };\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n MemoryStorage.removeItem = function (key) {\n return delete dataMemory[key];\n };\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n MemoryStorage.clear = function () {\n dataMemory = {};\n return dataMemory;\n };\n return MemoryStorage;\n}());\nexport { MemoryStorage };\nvar StorageHelper = /** @class */ (function () {\n /**\n * This is used to get a storage object\n * @returns {object} the storage\n */\n function StorageHelper() {\n try {\n this.storageWindow = window.localStorage;\n this.storageWindow.setItem('aws.amplify.test-ls', 1);\n this.storageWindow.removeItem('aws.amplify.test-ls');\n }\n catch (exception) {\n this.storageWindow = MemoryStorage;\n }\n }\n /**\n * This is used to return the storage\n * @returns {object} the storage\n */\n StorageHelper.prototype.getStorage = function () {\n return this.storageWindow;\n };\n return StorageHelper;\n}());\nexport { StorageHelper };\n/**\n * @deprecated use named import\n */\nexport default StorageHelper;\n//# sourceMappingURL=index.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { ConsoleLogger as Logger } from '../Logger/ConsoleLogger';\nvar logger = new Logger('Util');\nvar NonRetryableError = /** @class */ (function (_super) {\n __extends(NonRetryableError, _super);\n function NonRetryableError(message) {\n var _this = _super.call(this, message) || this;\n _this.nonRetryable = true;\n return _this;\n }\n return NonRetryableError;\n}(Error));\nexport { NonRetryableError };\nvar isNonRetryableError = function (obj) {\n var key = 'nonRetryable';\n return obj && obj[key];\n};\n/**\n * @private\n * Internal use of Amplify only\n */\nexport function retry(functionToRetry, args, delayFn, attempt) {\n if (attempt === void 0) { attempt = 1; }\n return __awaiter(this, void 0, void 0, function () {\n var err_1, retryIn_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (typeof functionToRetry !== 'function') {\n throw Error('functionToRetry must be a function');\n }\n logger.debug(functionToRetry.name + \" attempt #\" + attempt + \" with this vars: \" + JSON.stringify(args));\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 8]);\n return [4 /*yield*/, functionToRetry.apply(void 0, __spread(args))];\n case 2: return [2 /*return*/, _a.sent()];\n case 3:\n err_1 = _a.sent();\n logger.debug(\"error on \" + functionToRetry.name, err_1);\n if (isNonRetryableError(err_1)) {\n logger.debug(functionToRetry.name + \" non retryable error\", err_1);\n throw err_1;\n }\n retryIn_1 = delayFn(attempt, args, err_1);\n logger.debug(functionToRetry.name + \" retrying in \" + retryIn_1 + \" ms\");\n if (!(retryIn_1 !== false)) return [3 /*break*/, 6];\n return [4 /*yield*/, new Promise(function (res) { return setTimeout(res, retryIn_1); })];\n case 4:\n _a.sent();\n return [4 /*yield*/, retry(functionToRetry, args, delayFn, attempt + 1)];\n case 5: return [2 /*return*/, _a.sent()];\n case 6: throw err_1;\n case 7: return [3 /*break*/, 8];\n case 8: return [2 /*return*/];\n }\n });\n });\n}\nvar MAX_DELAY_MS = 5 * 60 * 1000;\nfunction jitteredBackoff(maxDelayMs) {\n var BASE_TIME_MS = 100;\n var JITTER_FACTOR = 100;\n return function (attempt) {\n var delay = Math.pow(2, attempt) * BASE_TIME_MS + JITTER_FACTOR * Math.random();\n return delay > maxDelayMs ? false : delay;\n };\n}\n/**\n * @private\n * Internal use of Amplify only\n */\nexport var jitteredExponentialRetry = function (functionToRetry, args, maxDelayMs) {\n if (maxDelayMs === void 0) { maxDelayMs = MAX_DELAY_MS; }\n return retry(functionToRetry, args, jitteredBackoff(maxDelayMs));\n};\n//# sourceMappingURL=Retry.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=CryptoOperation.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=Key.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=KeyOperation.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=MsSubtleCrypto.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isMsWindow = void 0;\nvar msSubtleCryptoMethods = [\n \"decrypt\",\n \"digest\",\n \"encrypt\",\n \"exportKey\",\n \"generateKey\",\n \"importKey\",\n \"sign\",\n \"verify\"\n];\nfunction quacksLikeAnMsWindow(window) {\n return \"MSInputMethodContext\" in window && \"msCrypto\" in window;\n}\n/**\n * Determines if the provided window is (or is like) the window object one would\n * expect to encounter in Internet Explorer 11.\n */\nfunction isMsWindow(window) {\n if (quacksLikeAnMsWindow(window) && window.msCrypto.subtle !== undefined) {\n var _a = window.msCrypto, getRandomValues = _a.getRandomValues, subtle_1 = _a.subtle;\n return msSubtleCryptoMethods\n .map(function (methodName) { return subtle_1[methodName]; })\n .concat(getRandomValues)\n .every(function (method) { return typeof method === \"function\"; });\n }\n return false;\n}\nexports.isMsWindow = isMsWindow;\n//# sourceMappingURL=MsWindow.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./CryptoOperation\"), exports);\ntslib_1.__exportStar(require(\"./Key\"), exports);\ntslib_1.__exportStar(require(\"./KeyOperation\"), exports);\ntslib_1.__exportStar(require(\"./MsSubtleCrypto\"), exports);\ntslib_1.__exportStar(require(\"./MsWindow\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EMPTY_DATA_SHA_256 = exports.SHA_256_HMAC_ALGO = exports.SHA_256_HASH = void 0;\nexports.SHA_256_HASH = { name: \"SHA-256\" };\nexports.SHA_256_HMAC_ALGO = {\n name: \"HMAC\",\n hash: exports.SHA_256_HASH\n};\nexports.EMPTY_DATA_SHA_256 = new Uint8Array([\n 227,\n 176,\n 196,\n 66,\n 152,\n 252,\n 28,\n 20,\n 154,\n 251,\n 244,\n 200,\n 153,\n 111,\n 185,\n 36,\n 39,\n 174,\n 65,\n 228,\n 100,\n 155,\n 147,\n 76,\n 164,\n 149,\n 153,\n 27,\n 120,\n 82,\n 184,\n 85\n]);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLFlBQVksR0FBd0IsRUFBRSxJQUFJLEVBQUUsU0FBUyxFQUFFLENBQUM7QUFFeEQsUUFBQSxpQkFBaUIsR0FBZ0Q7SUFDNUUsSUFB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yMDAsXG4gIDE1MyxcbiAgMTExLFxuICAxODUsXG4gIDM2LFxuICAzOSxcbiAgMTc0LFxuICA2NSxcbiAgMjI4LFxuICAxMDAsXG4gIDE1NSxcbiAgMTQ3LFxuICA3NixcbiAgMTY0LFxuICAxNDksXG4gIDE1MyxcbiAgMjcsXG4gIDEyMCxcbiAgODIsXG4gIDE4NCxcbiAgODVcbl0pO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Sha256 = void 0;\nvar ie11Sha256_1 = require(\"./ie11Sha256\");\nvar webCryptoSha256_1 = require(\"./webCryptoSha256\");\nvar sha256_js_1 = require(\"@aws-crypto/sha256-js\");\nvar supports_web_crypto_1 = require(\"@aws-crypto/supports-web-crypto\");\nvar ie11_detection_1 = require(\"@aws-crypto/ie11-detection\");\nvar util_locate_window_1 = require(\"@aws-sdk/util-locate-window\");\nvar Sha256 = /** @class */ (function () {\n function Sha256(secret) {\n if ((0, supports_web_crypto_1.supportsWebCrypto)((0, util_locate_window_1.locateWindow)())) {\n this.hash = new webCryptoSha256_1.Sha256(secret);\n }\n else if ((0, ie11_detection_1.isMsWindow)((0, util_locate_window_1.locateWindow)())) {\n this.hash = new ie11Sha256_1.Sha256(secret);\n }\n else {\n this.hash = new sha256_js_1.Sha256(secret);\n }\n }\n Sha256.prototype.update = function (data, encoding) {\n this.hash.update(data, encoding);\n };\n Sha256.prototype.digest = function () {\n return this.hash.digest();\n };\n return Sha256;\n}());\nexports.Sha256 = Sha256;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3Jvc3NQbGF0Zm9ybVNoYTI1Ni5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jcm9zc1BsYXRmb3JtU2hhMjU2LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDJDQUFvRDtBQUNwRCxxREFBOEQ7QUFDOUQsbURBQTJEO0F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GFzaC5kaWdlc3QoKTtcbiAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Sha256 = void 0;\nvar isEmptyData_1 = require(\"./isEmptyData\");\nvar constants_1 = require(\"./constants\");\nvar util_utf8_browser_1 = require(\"@aws-sdk/util-utf8-browser\");\nvar util_locate_window_1 = require(\"@aws-sdk/util-locate-window\");\nvar Sha256 = /** @class */ (function () {\n function Sha256(secret) {\n if (secret) {\n this.operation = getKeyPromise(secret).then(function (keyData) {\n return (0, util_locate_window_1.locateWindow)().msCrypto.subtle.sign(constants_1.SHA_256_HMAC_ALGO, keyData);\n });\n this.operation.catch(function () { });\n }\n else {\n this.operation = Promise.resolve((0, util_locate_window_1.locateWindow)().msCrypto.subtle.digest(\"SHA-256\"));\n }\n }\n Sha256.prototype.update = function (toHash) {\n var _this = this;\n if ((0, isEmptyData_1.isEmptyData)(toHash)) {\n return;\n }\n this.operation = this.operation.then(function (operation) {\n operation.onerror = function () {\n _this.operation = Promise.reject(new Error(\"Error encountered updating hash\"));\n };\n operation.process(toArrayBufferView(toHash));\n return operation;\n });\n this.operation.catch(function () { });\n };\n Sha256.prototype.digest = function () {\n return this.operation.then(function (operation) {\n return new Promise(function (resolve, reject) {\n operation.onerror = function () {\n reject(new Error(\"Error encountered finalizing hash\"));\n };\n operation.oncomplete = function () {\n if (operation.result) {\n resolve(new Uint8Array(operation.result));\n }\n reject(new Error(\"Error encountered finalizing hash\"));\n };\n operation.finish();\n });\n });\n };\n return Sha256;\n}());\nexports.Sha256 = Sha256;\nfunction getKeyPromise(secret) {\n return new Promise(function (resolve, reject) {\n var keyOperation = (0, util_locate_window_1.locateWindow)().msCrypto.subtle.importKey(\"raw\", toArrayBufferView(secret), constants_1.SHA_256_HMAC_ALGO, false, [\"sign\"]);\n keyOperation.oncomplete = function () {\n if (keyOperation.result) {\n resolve(keyOperation.result);\n }\n reject(new Error(\"ImportKey completed without importing key.\"));\n };\n keyOperation.onerror = function () {\n reject(new Error(\"ImportKey failed to import key.\"));\n };\n });\n}\nfunction toArrayBufferView(data) {\n if (typeof data === \"string\") {\n return (0, util_utf8_browser_1.fromUtf8)(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWUxMVNoYTI1Ni5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pZTExU2hhMjU2LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDZDQUE0QztBQUM1Qyx5Q0FBZ0Q7QUFFaEQsZ0VBQXNEO0FBRXRELGtFQUEyRDtBQUUzRDtJQUdFLGdCQUFZLE1BQW1CO1FBQzdCLElBQUksTUFBTSxFQUFFO1lBQ1YsSUFBSSxDQUFDLFNBQVMsR0FBRyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQUMsSUFBSSxDQUFDLFVBQUEsT0FBTztnQkFDakQsT0FBQyxJQUFBLGlDQUFZLEdBQWUsQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLElBQUksQ0FDL0MsNkJBQWlCLEVBQ2pCLE9BQU8sQ0FDUjtZQUhELENBR0MsQ0FDRixDQUFDO1lBQ0YsSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsY0FBTyxDQUFDLENBQUMsQ0FBQztTQUNoQzthQUFNO1lBQ0wsSUFBSSxDQUFDLFNBQVMsR0FBRyxPQUFPLENBQUMsT0FBTyxDQUM3QixJQUFBLGlDQUFZLEdBQWUsQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FDL0QsQ0FBQztTQUNIO0lBQ0gsQ0FBQztJQUVELHVCQUFNLEdBQU4sVUFBTyxNQUFrQjtRQUF6Qix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ub3BlcmF0aW9uLnRoZW48VWludDhBcnJheT4oXG4gICAgICBvcGVyYXRpb24gPT5cbiAgICAgICAgbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgIG9wZXJhdGlvbi5vbmVycm9yID0gKCkgPT4ge1xuICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihcIkVycm9yIGVuY291bnRlcmVkIGZpbmFsaXppbmcgaGFzaFwiKSk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBvcGVyYXRpb24ub25jb21wbGV0ZSA9ICgpID0+IHtcbiAgICAgICAgICAgIGlmIChvcGVyYXRpb24ucmVzdWx0KSB7XG4gICAgICAgICAgICAgIHJlc29sdmUobmV3IFVpbnQ4QXJyYXkob3BlcmF0aW9uLnJlc3VsdCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihcIkVycm9yIGVuY291bnRlcmVkIGZpbmFsaXppbmcgaGFzaFwiKSk7XG4gICAgICAgICAgfTtcblxuICAgICAgICAgIG9wZXJhdGlvbi5maW5pc2goKTtcbiAgICAgICAgfSlcbiAgICApO1xuICB9XG59XG5cbmZ1bmN0aW9uIGdldEtleVByb21pc2Uoc2VjcmV0OiBTb3VyY2VEYXRhKTogUHJvbWlzZTxLZXk+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICBjb25zdCBrZXlPcGVyYXRpb24gPSAobG9jYXRlV2luZG93KCkgYXMgTXNXaW5kb3cpLm1zQ3J5cHRvLnN1YnRsZS5pbXBvcnRLZXkoXG4gICAgICBcInJhd1wiLFxuICAgICAgdG9BcnJheUJ1ZmZlclZpZXcoc2VjcmV0KSxcbiAgICAgIFNIQV8yNTZfSE1BQ19BTEdPLFxuICAgICAgZmFsc2UsXG4gICAgICBbXCJzaWduXCJdXG4gICAgKTtcblxuICAgIGtleU9wZXJhdGlvbi5vbmNvbXBsZXRlID0gKCkgPT4ge1xuICAgICAgaWYgKGtleU9wZXJhdGlvbi5yZXN1bHQpIHtcbiAgICAgICAgcmVzb2x2ZShrZXlPcGVyYXRpb24ucmVzdWx0KTtcbiAgICAgIH1cblxuICAgICAgcmVqZWN0KG5ldyBFcnJvcihcIkltcG9ydEtleSBjb21wbGV0ZWQgd2l0aG91dCBpbXBvcnRpbmcga2V5LlwiKSk7XG4gICAgfTtcbiAgICBrZXlPcGVyYXRpb24ub25lcnJvciA9ICgpID0+IHtcbiAgICAgIHJlamVjdChuZXcgRXJyb3IoXCJJbXBvcnRLZXkgZmFpbGVkIHRvIGltcG9ydCBrZXkuXCIpKTtcbiAgICB9O1xuICB9KTtcbn1cblxuZnVuY3Rpb24gdG9BcnJheUJ1ZmZlclZpZXcoZGF0YTogU291cmNlRGF0YSk6IFVpbnQ4QXJyYXkge1xuICBpZiAodHlwZW9mIGRhdGEgPT09IFwic3RyaW5nXCIpIHtcbiAgICByZXR1cm4gZnJvbVV0ZjgoZGF0YSk7XG4gIH1cblxuICBpZiAoQXJyYXlCdWZmZXIuaXNWaWV3KGRhdGEpKSB7XG4gICAgcmV0dXJuIG5ldyBVaW50OEFycmF5KFxuICAgICAgZGF0YS5idWZmZXIsXG4gICAgICBkYXRhLmJ5dGVPZmZzZXQsXG4gICAgICBkYXRhLmJ5dGVMZW5ndGggLyBVaW50OEFycmF5LkJZVEVTX1BFUl9FTEVNRU5UXG4gICAgKTtcbiAgfVxuXG4gIHJldHVybiBuZXcgVWludDhBcnJheShkYXRhKTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WebCryptoSha256 = exports.Ie11Sha256 = void 0;\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./crossPlatformSha256\"), exports);\nvar ie11Sha256_1 = require(\"./ie11Sha256\");\nObject.defineProperty(exports, \"Ie11Sha256\", { enumerable: true, get: function () { return ie11Sha256_1.Sha256; } });\nvar webCryptoSha256_1 = require(\"./webCryptoSha256\");\nObject.defineProperty(exports, \"WebCryptoSha256\", { enumerable: true, get: function () { return webCryptoSha256_1.Sha256; } });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLHFFQUFzQztBQUN0QywyQ0FBb0Q7QUFBM0Msd0dBQUEsTUFBTSxPQUFjO0FBQzdCLHFEQUE4RDtBQUFyRCxrSEFBQSxNQUFNLE9BQW1CIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vY3Jvc3NQbGF0Zm9ybVNoYTI1NlwiO1xuZXhwb3J0IHsgU2hhMjU2IGFzIEllMTFTaGEyNTYgfSBmcm9tIFwiLi9pZTExU2hhMjU2XCI7XG5leHBvcnQgeyBTaGEyNTYgYXMgV2ViQ3J5cHRvU2hhMjU2IH0gZnJvbSBcIi4vd2ViQ3J5cHRvU2hhMjU2XCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXNFbXB0eURhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaXNFbXB0eURhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsU0FBZ0IsV0FBVyxDQUFDLElBQWdCO0lBQzFDLElBQUksT0FBTyxJQUFJLEtBQUssUUFBUSxFQUFFO1FBQzVCLE9BQU8sSUFBSSxDQUFDLE1BQU0sS0FBSyxDQUFDLENBQUM7S0FDMUI7SUFFRCxPQUFPLElBQUksQ0FBQyxVQUFVLEtBQUssQ0FBQyxDQUFDO0FBQy9CLENBQUM7QUFORCxrQ0FNQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFNvdXJjZURhdGEgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGZ1bmN0aW9uIGlzRW1wdHlEYXRhKGRhdGE6IFNvdXJjZURhdGEpOiBib29sZWFuIHtcbiAgaWYgKHR5cGVvZiBkYXRhID09PSBcInN0cmluZ1wiKSB7XG4gICAgcmV0dXJuIGRhdGEubGVuZ3RoID09PSAwO1xuICB9XG5cbiAgcmV0dXJuIGRhdGEuYnl0ZUxlbmd0aCA9PT0gMDtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Sha256 = void 0;\nvar util_1 = require(\"@aws-crypto/util\");\nvar constants_1 = require(\"./constants\");\nvar util_locate_window_1 = require(\"@aws-sdk/util-locate-window\");\nvar Sha256 = /** @class */ (function () {\n function Sha256(secret) {\n this.toHash = new Uint8Array(0);\n if (secret !== void 0) {\n this.key = new Promise(function (resolve, reject) {\n (0, util_locate_window_1.locateWindow)()\n .crypto.subtle.importKey(\"raw\", (0, util_1.convertToBuffer)(secret), constants_1.SHA_256_HMAC_ALGO, false, [\"sign\"])\n .then(resolve, reject);\n });\n this.key.catch(function () { });\n }\n }\n Sha256.prototype.update = function (data) {\n if ((0, util_1.isEmptyData)(data)) {\n return;\n }\n var update = (0, util_1.convertToBuffer)(data);\n var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength);\n typedArray.set(this.toHash, 0);\n typedArray.set(update, this.toHash.byteLength);\n this.toHash = typedArray;\n };\n Sha256.prototype.digest = function () {\n var _this = this;\n if (this.key) {\n return this.key.then(function (key) {\n return (0, util_locate_window_1.locateWindow)()\n .crypto.subtle.sign(constants_1.SHA_256_HMAC_ALGO, key, _this.toHash)\n .then(function (data) { return new Uint8Array(data); });\n });\n }\n if ((0, util_1.isEmptyData)(this.toHash)) {\n return Promise.resolve(constants_1.EMPTY_DATA_SHA_256);\n }\n return Promise.resolve()\n .then(function () {\n return (0, util_locate_window_1.locateWindow)().crypto.subtle.digest(constants_1.SHA_256_HASH, _this.toHash);\n })\n .then(function (data) { return Promise.resolve(new Uint8Array(data)); });\n };\n return Sha256;\n}());\nexports.Sha256 = Sha256;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2ViQ3J5cHRvU2hhMjU2LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3dlYkNyeXB0b1NoYTI1Ni50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSx5Q0FBZ0U7QUFDaEUseUNBSXFCO0FBQ3JCLGtFQUEyRDtBQUUzRDtJQUlFLGdCQUFZLE1BQW1CO1FBRnZCLFdBQU0sR0FBZSxJQUFJLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUc3QyxJQUFJLE1BQU0sS0FBSyxLQUFLLENBQUMsRUFBRTtZQUNyQixJQUFJLENBQUMsR0FBRyxHQUFHLElBQUksT0FBTyxDQUFDLFVBQUMsT0FBTyxFQUFFLE1BQU07Z0JBQ3JDLElBQUEsaUNBQVksR0FBRTtxQkFDWCxNQUFNLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FDdEIsS0FBSyxFQUNMLElBQUEsc0JBQWUsRUFBQyxNQUFNLENBQUMsRUFDdkIsNkJBQWlCLEVBQ2pCLEtBQUssRUFDTCxDQUFDLE1BQU0sQ0FBQyxDQUNUO3FCQUNBLElBQUksQ0FBQyxPQUFPLEVBQUUsTUFBTSxDQUFDLENBQUM7WUFDM0IsQ0FBQyxDQUFDLENBQUM7WUFDSCxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxjQUFPLENBQUMsQ0FBQyxDQUFDO1NBQzFCO0lB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tcbiAgICBpZiAodGhpcy5rZXkpIHtcbiAgICAgIHJldHVybiB0aGlzLmtleS50aGVuKChrZXkpID0+XG4gICAgICAgIGxvY2F0ZVdpbmRvdygpXG4gICAgICAgICAgLmNyeXB0by5zdWJ0bGUuc2lnbihTSEFfMjU2X0hNQUNfQUxHTywga2V5LCB0aGlzLnRvSGFzaClcbiAgICAgICAgICAudGhlbigoZGF0YSkgPT4gbmV3IFVpbnQ4QXJyYXkoZGF0YSkpXG4gICAgICApO1xuICAgIH1cblxuICAgIGlmIChpc0VtcHR5RGF0YSh0aGlzLnRvSGFzaCkpIHtcbiAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoRU1QVFlfREFUQV9TSEFfMjU2KTtcbiAgICB9XG5cbiAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKClcbiAgICAgIC50aGVuKCgpID0+XG4gICAgICAgIGxvY2F0ZVdpbmRvdygpLmNyeXB0by5zdWJ0bGUuZGlnZXN0KFNIQV8yNTZfSEFTSCwgdGhpcy50b0hhc2gpXG4gICAgICApXG4gICAgICAudGhlbigoZGF0YSkgPT4gUHJvbWlzZS5yZXNvbHZlKG5ldyBVaW50OEFycmF5KGRhdGEpKSk7XG4gIH1cbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RawSha256 = void 0;\nvar constants_1 = require(\"./constants\");\n/**\n * @internal\n */\nvar RawSha256 = /** @class */ (function () {\n function RawSha256() {\n this.state = Int32Array.from(constants_1.INIT);\n this.temp = new Int32Array(64);\n this.buffer = new Uint8Array(64);\n this.bufferLength = 0;\n this.bytesHashed = 0;\n /**\n * @internal\n */\n this.finished = false;\n }\n RawSha256.prototype.update = function (data) {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n var position = 0;\n var byteLength = data.byteLength;\n this.bytesHashed += byteLength;\n if (this.bytesHashed * 8 > constants_1.MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n if (this.bufferLength === constants_1.BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n };\n RawSha256.prototype.digest = function () {\n if (!this.finished) {\n var bitsHashed = this.bytesHashed * 8;\n var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength);\n var undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % constants_1.BLOCK_SIZE >= constants_1.BLOCK_SIZE - 8) {\n for (var i = this.bufferLength; i < constants_1.BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (var i = this.bufferLength; i < constants_1.BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(constants_1.BLOCK_SIZE - 8, Math.floor(bitsHashed / 0x100000000), true);\n bufferView.setUint32(constants_1.BLOCK_SIZE - 4, bitsHashed);\n this.hashBuffer();\n this.finished = true;\n }\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n var out = new Uint8Array(constants_1.DIGEST_LENGTH);\n for (var i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n return out;\n };\n RawSha256.prototype.hashBuffer = function () {\n var _a = this, buffer = _a.buffer, state = _a.state;\n var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7];\n for (var i = 0; i < constants_1.BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n }\n else {\n var u = this.temp[i - 2];\n var t1_1 = ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n u = this.temp[i - 15];\n var t2_1 = ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n this.temp[i] =\n ((t1_1 + this.temp[i - 7]) | 0) + ((t2_1 + this.temp[i - 16]) | 0);\n }\n var t1 = ((((((state4 >>> 6) | (state4 << 26)) ^\n ((state4 >>> 11) | (state4 << 21)) ^\n ((state4 >>> 25) | (state4 << 7))) +\n ((state4 & state5) ^ (~state4 & state6))) |\n 0) +\n ((state7 + ((constants_1.KEY[i] + this.temp[i]) | 0)) | 0)) |\n 0;\n var t2 = ((((state0 >>> 2) | (state0 << 30)) ^\n ((state0 >>> 13) | (state0 << 19)) ^\n ((state0 >>> 22) | (state0 << 10))) +\n ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |\n 0;\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n };\n return RawSha256;\n}());\nexports.RawSha256 = RawSha256;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmF3U2hhMjU2LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1Jhd1NoYTI1Ni50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5Q0FNcUI7QUFFckI7O0dBRUc7QUFDSDtJQUFBO1FBQ1UsVUFBSyxHQUFlLFVBQVUsQ0FBQyxJQUFJLENBQUMsZ0JBQUksQ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dGF0ZTAgJiBzdGF0ZTEpIF4gKHN0YXRlMCAmIHN0YXRlMikgXiAoc3RhdGUxICYgc3RhdGUyKSkpIHxcbiAgICAgICAgMDtcblxuICAgICAgc3RhdGU3ID0gc3RhdGU2O1xuICAgICAgc3RhdGU2ID0gc3RhdGU1O1xuICAgICAgc3RhdGU1ID0gc3RhdGU0O1xuICAgICAgc3RhdGU0ID0gKHN0YXRlMyArIHQxKSB8IDA7XG4gICAgICBzdGF0ZTMgPSBzdGF0ZTI7XG4gICAgICBzdGF0ZTIgPSBzdGF0ZTE7XG4gICAgICBzdGF0ZTEgPSBzdGF0ZTA7XG4gICAgICBzdGF0ZTAgPSAodDEgKyB0MikgfCAwO1xuICAgIH1cblxuICAgIHN0YXRlWzBdICs9IHN0YXRlMDtcbiAgICBzdGF0ZVsxXSArPSBzdGF0ZTE7XG4gICAgc3RhdGVbMl0gKz0gc3RhdGUyO1xuICAgIHN0YXRlWzNdICs9IHN0YXRlMztcbiAgICBzdGF0ZVs0XSArPSBzdGF0ZTQ7XG4gICAgc3RhdGVbNV0gKz0gc3RhdGU1O1xuICAgIHN0YXRlWzZdICs9IHN0YXRlNjtcbiAgICBzdGF0ZVs3XSArPSBzdGF0ZTc7XG4gIH1cbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MAX_HASHABLE_LENGTH = exports.INIT = exports.KEY = exports.DIGEST_LENGTH = exports.BLOCK_SIZE = void 0;\n/**\n * @internal\n */\nexports.BLOCK_SIZE = 64;\n/**\n * @internal\n */\nexports.DIGEST_LENGTH = 32;\n/**\n * @internal\n */\nexports.KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n/**\n * @internal\n */\nexports.INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\n/**\n * @internal\n */\nexports.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7R0FFRztBQUNVLFFBQUEsVUFBVSxHQUFXLEVBQUUsQ0FBQztBQUVyQzs7R0FFRztBQUNVLFFBQUEsYUFBYSxHQUFXLEVBQUUsQ0FBQztBQUV4Qzs7R0FFRztBQUNVLFF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.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./jsSha256\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQTJCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vanNTaGEyNTZcIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Sha256 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar constants_1 = require(\"./constants\");\nvar RawSha256_1 = require(\"./RawSha256\");\nvar util_1 = require(\"@aws-crypto/util\");\nvar Sha256 = /** @class */ (function () {\n function Sha256(secret) {\n this.hash = new RawSha256_1.RawSha256();\n if (secret) {\n this.outer = new RawSha256_1.RawSha256();\n var inner = bufferFromSecret(secret);\n var outer = new Uint8Array(constants_1.BLOCK_SIZE);\n outer.set(inner);\n for (var i = 0; i < constants_1.BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n this.hash.update(inner);\n this.outer.update(outer);\n // overwrite the copied key in memory\n for (var i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n }\n }\n Sha256.prototype.update = function (toHash) {\n if ((0, util_1.isEmptyData)(toHash) || this.error) {\n return;\n }\n try {\n this.hash.update((0, util_1.convertToBuffer)(toHash));\n }\n catch (e) {\n this.error = e;\n }\n };\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */\n Sha256.prototype.digestSync = function () {\n if (this.error) {\n throw this.error;\n }\n if (this.outer) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n return this.outer.digest();\n }\n return this.hash.digest();\n };\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */\n Sha256.prototype.digest = function () {\n return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {\n return (0, tslib_1.__generator)(this, function (_a) {\n return [2 /*return*/, this.digestSync()];\n });\n });\n };\n return Sha256;\n}());\nexports.Sha256 = Sha256;\nfunction bufferFromSecret(secret) {\n var input = (0, util_1.convertToBuffer)(secret);\n if (input.byteLength > constants_1.BLOCK_SIZE) {\n var bufferHash = new RawSha256_1.RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n var buffer = new Uint8Array(constants_1.BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNTaGEyNTYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvanNTaGEyNTYudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLHlDQUF5QztBQUN6Qyx5Q0FBd0M7QUFFeEMseUNBQWdFO0FBRWhFO0lBS0UsZ0JBQVksTUFBbUI7UUFKZCxTQUFJLEdBQUcsSUFBSSxxQkFBUyxFQUFFLENBQUM7UUFLdEMsSUFBSSxNQUFNLEVBQUU7WUFDVixJQUFJLENBQUMsS0FBSyxHQUFHLElBQUkscUJBQVMsRUFBRSxDQUFDO1lBQzdCLElBQU0sS0FBSyxHQUFHLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFDO1lBQ3ZDLElBQU0sS0FBSyxHQUFHLElBQUksVUFBVSxDQUFDLHNCQUFVLENBQUMsQ0FBQztZQUN6QyxLQUFLLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDO1lBRWpCLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxzQkFBVSxFQUFFLENBQUMsRUFBRSxFQUFFO2dCQUNuQyxLQUFLLENBQUM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2QuXG4gICAqL1xuICBhc3luYyBkaWdlc3QoKTogUHJvbWlzZTxVaW50OEFycmF5PiB7XG4gICAgcmV0dXJuIHRoaXMuZGlnZXN0U3luYygpO1xuICB9XG59XG5cbmZ1bmN0aW9uIGJ1ZmZlckZyb21TZWNyZXQoc2VjcmV0OiBTb3VyY2VEYXRhKTogVWludDhBcnJheSB7XG4gIGxldCBpbnB1dCA9IGNvbnZlcnRUb0J1ZmZlcihzZWNyZXQpO1xuXG4gIGlmIChpbnB1dC5ieXRlTGVuZ3RoID4gQkxPQ0tfU0laRSkge1xuICAgIGNvbnN0IGJ1ZmZlckhhc2ggPSBuZXcgUmF3U2hhMjU2KCk7XG4gICAgYnVmZmVySGFzaC51cGRhdGUoaW5wdXQpO1xuICAgIGlucHV0ID0gYnVmZmVySGFzaC5kaWdlc3QoKTtcbiAgfVxuXG4gIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KEJMT0NLX1NJWkUpO1xuICBidWZmZXIuc2V0KGlucHV0KTtcbiAgcmV0dXJuIGJ1ZmZlcjtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./supportsWebCrypto\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQW9DIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vc3VwcG9ydHNXZWJDcnlwdG9cIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.supportsZeroByteGCM = exports.supportsSubtleCrypto = exports.supportsSecureRandom = exports.supportsWebCrypto = void 0;\nvar tslib_1 = require(\"tslib\");\nvar subtleCryptoMethods = [\n \"decrypt\",\n \"digest\",\n \"encrypt\",\n \"exportKey\",\n \"generateKey\",\n \"importKey\",\n \"sign\",\n \"verify\"\n];\nfunction supportsWebCrypto(window) {\n if (supportsSecureRandom(window) &&\n typeof window.crypto.subtle === \"object\") {\n var subtle = window.crypto.subtle;\n return supportsSubtleCrypto(subtle);\n }\n return false;\n}\nexports.supportsWebCrypto = supportsWebCrypto;\nfunction supportsSecureRandom(window) {\n if (typeof window === \"object\" && typeof window.crypto === \"object\") {\n var getRandomValues = window.crypto.getRandomValues;\n return typeof getRandomValues === \"function\";\n }\n return false;\n}\nexports.supportsSecureRandom = supportsSecureRandom;\nfunction supportsSubtleCrypto(subtle) {\n return (subtle &&\n subtleCryptoMethods.every(function (methodName) { return typeof subtle[methodName] === \"function\"; }));\n}\nexports.supportsSubtleCrypto = supportsSubtleCrypto;\nfunction supportsZeroByteGCM(subtle) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var key, zeroByteAuthTag, _a;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!supportsSubtleCrypto(subtle))\n return [2 /*return*/, false];\n _b.label = 1;\n case 1:\n _b.trys.push([1, 4, , 5]);\n return [4 /*yield*/, subtle.generateKey({ name: \"AES-GCM\", length: 128 }, false, [\"encrypt\"])];\n case 2:\n key = _b.sent();\n return [4 /*yield*/, subtle.encrypt({\n name: \"AES-GCM\",\n iv: new Uint8Array(Array(12)),\n additionalData: new Uint8Array(Array(16)),\n tagLength: 128\n }, key, new Uint8Array(0))];\n case 3:\n zeroByteAuthTag = _b.sent();\n return [2 /*return*/, zeroByteAuthTag.byteLength === 16];\n case 4:\n _a = _b.sent();\n return [2 /*return*/, false];\n case 5: return [2 /*return*/];\n }\n });\n });\n}\nexports.supportsZeroByteGCM = supportsZeroByteGCM;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VwcG9ydHNXZWJDcnlwdG8uanMiLCJ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fQ==","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToBuffer = void 0;\nvar util_utf8_browser_1 = require(\"@aws-sdk/util-utf8-browser\");\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : util_utf8_browser_1.fromUtf8;\nfunction convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\nexports.convertToBuffer = convertToBuffer;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVydFRvQnVmZmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnZlcnRUb0J1ZmZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0VBQW9FO0FBQ3BFLHNDQUFzQzs7O0FBR3RDLGdFQUF5RTtBQUV6RSxpQkFBaUI7QUFDakIsSUFBTSxRQUFRLEdBQ1osT0FBTyxNQUFNLEtBQUssV0FBVyxJQUFJLE1BQU0sQ0FBQyxJQUFJO0lBQzFDLENBQUMsQ0FBQyxVQUFDLEtBQWEsSUFBSyxPQUFBLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLE1BQU0sQ0FBQyxFQUExQixDQUEwQjtJQUMvQyxDQUFDLENBQUMsNEJBQWUsQ0FBQztBQUV0QixTQUFnQixlQUFlLENBQUMsSUFBZ0I7SUFDOUMsOEJBQThCO0lBQzlCLElBQUksSUFBSSxZQUFZLFVBQVU7UUFBRSxPQUFPLElBQUksQ0F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YXkge1xuICAvLyBBbHJlYWR5IGEgVWludDgsIGRvIG5vdGhpbmdcbiAgaWYgKGRhdGEgaW5zdGFuY2VvZiBVaW50OEFycmF5KSByZXR1cm4gZGF0YTtcblxuICBpZiAodHlwZW9mIGRhdGEgPT09IFwic3RyaW5nXCIpIHtcbiAgICByZXR1cm4gZnJvbVV0ZjgoZGF0YSk7XG4gIH1cblxuICBpZiAoQXJyYXlCdWZmZXIuaXNWaWV3KGRhdGEpKSB7XG4gICAgcmV0dXJuIG5ldyBVaW50OEFycmF5KFxuICAgICAgZGF0YS5idWZmZXIsXG4gICAgICBkYXRhLmJ5dGVPZmZzZXQsXG4gICAgICBkYXRhLmJ5dGVMZW5ndGggLyBVaW50OEFycmF5LkJZVEVTX1BFUl9FTEVNRU5UXG4gICAgKTtcbiAgfVxuXG4gIHJldHVybiBuZXcgVWludDhBcnJheShkYXRhKTtcbn1cbiJdfQ==","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;\nvar convertToBuffer_1 = require(\"./convertToBuffer\");\nObject.defineProperty(exports, \"convertToBuffer\", { enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } });\nvar isEmptyData_1 = require(\"./isEmptyData\");\nObject.defineProperty(exports, \"isEmptyData\", { enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } });\nvar numToUint8_1 = require(\"./numToUint8\");\nObject.defineProperty(exports, \"numToUint8\", { enumerable: true, get: function () { return numToUint8_1.numToUint8; } });\nvar uint32ArrayFrom_1 = require(\"./uint32ArrayFrom\");\nObject.defineProperty(exports, \"uint32ArrayFrom\", { enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9FQUFvRTtBQUNwRSxzQ0FBc0M7OztBQUV0QyxxREFBb0Q7QUFBM0Msa0hBQUEsZUFBZSxPQUFBO0FBQ3hCLDZDQUE0QztBQUFuQywwR0FBQSxXQUFXLE9BQUE7QUFDcEIsMkNBQTBDO0FBQWpDLHdHQUFBLFVBQVUsT0FBQTtBQUNuQixxREFBa0Q7QUFBMUMsa0hBQUEsZUFBZSxPQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IEFtYXpvbi5jb20gSW5jLiBvciBpdHMgYWZmaWxpYXRlcy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wXG5cbmV4cG9ydCB7IGNvbnZlcnRUb0J1ZmZlciB9IGZyb20gXCIuL2NvbnZlcnRUb0J1ZmZlclwiO1xuZXhwb3J0IHsgaXNFbXB0eURhdGEgfSBmcm9tIFwiLi9pc0VtcHR5RGF0YVwiO1xuZXhwb3J0IHsgbnVtVG9VaW50OCB9IGZyb20gXCIuL251bVRvVWludDhcIjtcbmV4cG9ydCB7dWludDMyQXJyYXlGcm9tfSBmcm9tICcuL3VpbnQzMkFycmF5RnJvbSc7XG4iXX0=","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXNFbXB0eURhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaXNFbXB0eURhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9FQUFvRTtBQUNwRSxzQ0FBc0M7OztBQUl0QyxTQUFnQixXQUFXLENBQUMsSUFBZ0I7SUFDMUMsSUFBSSxPQUFPLElBQUksS0FBSyxRQUFRLEVBQUU7UUFDNUIsT0FBTyxJQUFJLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQztLQUMxQjtJQUVELE9BQU8sSUFBSSxDQUFDLFVBQVUsS0FBSyxDQUFDLENBQUM7QUFDL0IsQ0FBQztBQU5ELGtDQU1DIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IEFtYXpvbi5jb20gSW5jLiBvciBpdHMgYWZmaWxpYXRlcy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wXG5cbmltcG9ydCB7IFNvdXJjZURhdGEgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGZ1bmN0aW9uIGlzRW1wdHlEYXRhKGRhdGE6IFNvdXJjZURhdGEpOiBib29sZWFuIHtcbiAgaWYgKHR5cGVvZiBkYXRhID09PSBcInN0cmluZ1wiKSB7XG4gICAgcmV0dXJuIGRhdGEubGVuZ3RoID09PSAwO1xuICB9XG5cbiAgcmV0dXJuIGRhdGEuYnl0ZUxlbmd0aCA9PT0gMDtcbn1cbiJdfQ==","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.numToUint8 = void 0;\nfunction numToUint8(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\nexports.numToUint8 = numToUint8;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtVG9VaW50OC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9udW1Ub1VpbnQ4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvRUFBb0U7QUFDcEUsc0NBQXNDOzs7QUFFdEMsU0FBZ0IsVUFBVSxDQUFDLEdBQVc7SUFDcEMsT0FBTyxJQUFJLFVBQVUsQ0FBQztRQUNwQixDQUFDLEdBQUcsR0FBRyxVQUFVLENBQUMsSUFBSSxFQUFFO1FBQ3hCLENBQUMsR0FBRyxHQUFHLFVBQVUsQ0FBQyxJQUFJLEVBQUU7UUFDeEIsQ0FBQyxHQUFHLEdBQUcsVUFBVSxDQUFDLElBQUksQ0FBQztRQUN2QixHQUFHLEdBQUcsVUFBVTtLQUNqQixDQUFDLENBQUM7QUFDTCxDQUFDO0FBUEQsZ0NBT0MiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgQW1hem9uLmNvbSBJbmMuIG9yIGl0cyBhZmZpbGlhdGVzLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuLy8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEFwYWNoZS0yLjBcblxuZXhwb3J0IGZ1bmN0aW9uIG51bVRvVWludDgobnVtOiBudW1iZXIpIHtcbiAgcmV0dXJuIG5ldyBVaW50OEFycmF5KFtcbiAgICAobnVtICYgMHhmZjAwMDAwMCkgPj4gMjQsXG4gICAgKG51bSAmIDB4MDBmZjAwMDApID4+IDE2LFxuICAgIChudW0gJiAweDAwMDBmZjAwKSA+PiA4LFxuICAgIG51bSAmIDB4MDAwMDAwZmYsXG4gIF0pO1xufVxuIl19","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = void 0;\n// IE 11 does not support Array.from, so we do it manually\nfunction uint32ArrayFrom(a_lookUpTable) {\n if (!Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index];\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\nexports.uint32ArrayFrom = uint32ArrayFrom;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidWludDMyQXJyYXlGcm9tLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3VpbnQzMkFycmF5RnJvbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0VBQW9FO0FBQ3BFLHNDQUFzQzs7O0FBRXRDLDBEQUEwRDtBQUMxRCxTQUFnQixlQUFlLENBQUMsYUFBNEI7SUFDMUQsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLEVBQUU7UUFDZixJQUFNLFlBQVksR0FBRyxJQUFJLFdBQVcsQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQUE7UUFDMUQsSUFBSSxPQUFPLEdBQUcsQ0FBQyxDQUFBO1FBQ2YsT0FBTyxPQUFPLEdBQUcsYUFBYSxDQUFDLE1BQU0sRUFBRTtZQUNyQyxZQUFZLENBQUMsT0FBTyxDQUFDLEdBQUcsYUFBYSxDQUFDLE9BQU8sQ0FBQyxDQUFBO1NBQy9DO1FBQ0QsT0FBTyxZQUFZLENBQUE7S0FDcEI7SUFDRCxPQUFPLFdBQVcsQ0FBQyxJQUFJLENBQUMsYUFBYSxDQUFDLENBQUE7QUFDeEMsQ0FBQztBQVZELDBDQVVDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IEFtYXpvbi5jb20gSW5jLiBvciBpdHMgYWZmaWxpYXRlcy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wXG5cbi8vIElFIDExIGRvZXMgbm90IHN1cHBvcnQgQXJyYXkuZnJvbSwgc28gd2UgZG8gaXQgbWFudWFsbHlcbmV4cG9ydCBmdW5jdGlvbiB1aW50MzJBcnJheUZyb20oYV9sb29rVXBUYWJsZTogQXJyYXk8bnVtYmVyPik6IFVpbnQzMkFycmF5IHtcbiAgaWYgKCFBcnJheS5mcm9tKSB7XG4gICAgY29uc3QgcmV0dXJuX2FycmF5ID0gbmV3IFVpbnQzMkFycmF5KGFfbG9va1VwVGFibGUubGVuZ3RoKVxuICAgIGxldCBhX2luZGV4ID0gMFxuICAgIHdoaWxlIChhX2luZGV4IDwgYV9sb29rVXBUYWJsZS5sZW5ndGgpIHtcbiAgICAgIHJldHVybl9hcnJheVthX2luZGV4XSA9IGFfbG9va1VwVGFibGVbYV9pbmRleF1cbiAgICB9XG4gICAgcmV0dXJuIHJldHVybl9hcnJheVxuICB9XG4gIHJldHVybiBVaW50MzJBcnJheS5mcm9tKGFfbG9va1VwVGFibGUpXG59XG4iXX0=","import { fromUtf8 as jsFromUtf8, toUtf8 as jsToUtf8 } from \"./pureJs\";\nimport { fromUtf8 as textEncoderFromUtf8, toUtf8 as textEncoderToUtf8 } from \"./whatwgEncodingApi\";\nexport const fromUtf8 = (input) => typeof TextEncoder === \"function\" ? textEncoderFromUtf8(input) : jsFromUtf8(input);\nexport const toUtf8 = (input) => typeof TextDecoder === \"function\" ? textEncoderToUtf8(input) : jsToUtf8(input);\n","export function fromUtf8(input) {\n return new TextEncoder().encode(input);\n}\nexport function toUtf8(input) {\n return new TextDecoder(\"utf-8\").decode(input);\n}\n","export const fromUtf8 = (input) => {\n const bytes = [];\n for (let i = 0, len = input.length; i < len; i++) {\n const value = input.charCodeAt(i);\n if (value < 0x80) {\n bytes.push(value);\n }\n else if (value < 0x800) {\n bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);\n }\n else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);\n bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);\n }\n else {\n bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);\n }\n }\n return Uint8Array.from(bytes);\n};\nexport const toUtf8 = (input) => {\n let decoded = \"\";\n for (let i = 0, len = input.length; i < len; i++) {\n const byte = input[i];\n if (byte < 0x80) {\n decoded += String.fromCharCode(byte);\n }\n else if (0b11000000 <= byte && byte < 0b11100000) {\n const nextByte = input[++i];\n decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));\n }\n else if (0b11110000 <= byte && byte < 0b101101101) {\n const surrogatePair = [byte, input[++i], input[++i], input[++i]];\n const encoded = \"%\" + surrogatePair.map((byteValue) => byteValue.toString(16)).join(\"%\");\n decoded += decodeURIComponent(encoded);\n }\n else {\n decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));\n }\n }\n return decoded;\n};\n","var HttpResponse = /** @class */ (function () {\n function HttpResponse(options) {\n this.statusCode = options.statusCode;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n HttpResponse.isInstance = function (response) {\n //determine if response is a valid HttpResponse\n if (!response)\n return false;\n var resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n };\n return HttpResponse;\n}());\nexport { HttpResponse };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cFJlc3BvbnNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2h0dHBSZXNwb25zZS50cyJ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WMgYm9keT86IGFueTtcblxuICBjb25zdHJ1Y3RvcihvcHRpb25zOiBIdHRwUmVzcG9uc2VPcHRpb25zKSB7XG4gICAgdGhpcy5zdGF0dXNDb2RlID0gb3B0aW9ucy5zdGF0dXNDb2RlO1xuICAgIHRoaXMuaGVhZGVycyA9IG9wdGlvbnMuaGVhZGVycyB8fCB7fTtcbiAgICB0aGlzLmJvZHkgPSBvcHRpb25zLmJvZHk7XG4gIH1cblxuICBzdGF0aWMgaXNJbnN0YW5jZShyZXNwb25zZTogdW5rbm93bik6IHJlc3BvbnNlIGlzIEh0dHBSZXNwb25zZSB7XG4gICAgLy9kZXRlcm1pbmUgaWYgcmVzcG9uc2UgaXMgYSB2YWxpZCBIdHRwUmVzcG9uc2VcbiAgICBpZiAoIXJlc3BvbnNlKSByZXR1cm4gZmFsc2U7XG4gICAgY29uc3QgcmVzcCA9IHJlc3BvbnNlIGFzIGFueTtcbiAgICByZXR1cm4gdHlwZW9mIHJlc3Auc3RhdHVzQ29kZSA9PT0gXCJudW1iZXJcIiAmJiB0eXBlb2YgcmVzcC5oZWFkZXJzID09PSBcIm9iamVjdFwiO1xuICB9XG59XG4iXX0=","import { __assign, __read, __spread } from \"tslib\";\nvar HttpRequest = /** @class */ (function () {\n function HttpRequest(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.substr(-1) !== \":\"\n ? options.protocol + \":\"\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? \"/\" + options.path : options.path) : \"/\";\n }\n HttpRequest.isInstance = function (request) {\n //determine if request is a valid httpRequest\n if (!request)\n return false;\n var req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n };\n HttpRequest.prototype.clone = function () {\n var cloned = new HttpRequest(__assign(__assign({}, this), { headers: __assign({}, this.headers) }));\n if (cloned.query)\n cloned.query = cloneQuery(cloned.query);\n return cloned;\n };\n return HttpRequest;\n}());\nexport { HttpRequest };\nfunction cloneQuery(query) {\n return Object.keys(query).reduce(function (carry, paramName) {\n var _a;\n var param = query[paramName];\n return __assign(__assign({}, carry), (_a = {}, _a[paramName] = Array.isArray(param) ? __spread(param) : param, _a));\n }, {});\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cFJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaHR0cFJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQU1BO0lBVUUscUJBQVksT0FBMkI7UUFDckMsSUFBSSxDQUFDLE1BQU0sR0FBRyxPQUFPLENBQUMsTUFBTSxJQUFJLEtBQUssQ0FBQztRQUN0QyxJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQyxRQUFRLElBQUksV0FBVyxDQUFDO1FBQ2hELElBQUksQ0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztRQUN6QixJQUFJLENBQUMsS0FBSyxHQUFHLE9BQU8sQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDO1FBQ2pDLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDLE9BQU8sSUFBSSxFQUFFLENBQUM7UUFDckMsSUFBSSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDO1FBQ3pCLElBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDLFFBQVE7WUFDOUIsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssR0FBRztnQkFDbkMsQ0FBQyxDQUFJLE9BQU8sQ0FBQyx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5wYXJhbV0gOiBwYXJhbSxcbiAgICB9O1xuICB9LCB7fSk7XG59XG4iXX0=","var SHORT_TO_HEX = {};\nvar HEX_TO_SHORT = {};\nfor (var i = 0; i < 256; i++) {\n var encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = \"0\" + encodedByte;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\n/**\n * Converts a hexadecimal encoded string to a Uint8Array of bytes.\n *\n * @param encoded The hexadecimal encoded string\n */\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n var out = new Uint8Array(encoded.length / 2);\n for (var i = 0; i < encoded.length; i += 2) {\n var encodedByte = encoded.substr(i, 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(\"Cannot decode unrecognized sequence \" + encodedByte + \" as hexadecimal\");\n }\n }\n return out;\n}\n/**\n * Converts a Uint8Array of binary data to a hexadecimal encoded string.\n *\n * @param bytes The binary data to encode\n */\nexport function toHex(bytes) {\n var out = \"\";\n for (var i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBTSxZQUFZLEdBQThCLEVBQUUsQ0FBQztBQUNuRCxJQUFNLFlBQVksR0FBOEIsRUFBRSxDQUFDO0FBRW5ELEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxHQUFHLEVBQUUsQ0FBQyxFQUFFLEVBQUU7SUFDNUIsSUFBSSxXQUFXLEdBQUcs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dO1xuICB9XG5cbiAgcmV0dXJuIG91dDtcbn1cbiJdfQ==","const fallbackWindow = {};\nexport function locateWindow() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n else if (typeof self !== \"undefined\") {\n return self;\n }\n return fallbackWindow;\n}\n","import { fromUtf8 as jsFromUtf8, toUtf8 as jsToUtf8 } from \"./pureJs\";\nimport { fromUtf8 as textEncoderFromUtf8, toUtf8 as textEncoderToUtf8 } from \"./whatwgEncodingApi\";\nexport var fromUtf8 = function (input) {\n return typeof TextEncoder === \"function\" ? textEncoderFromUtf8(input) : jsFromUtf8(input);\n};\nexport var toUtf8 = function (input) {\n return typeof TextDecoder === \"function\" ? textEncoderToUtf8(input) : jsToUtf8(input);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsSUFBSSxVQUFVLEVBQUUsTUFBTSxJQUFJLFFBQVEsRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUN0RSxPQUFPLEVBQUUsUUFBUSxJQUFJLG1CQUFtQixFQUFFLE1BQU0sSUFBSSxpQkFBaUIsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBS25HLE1BQU0sQ0FBQyxJQUFNLFFBQVEsR0FBRyxVQUFDLEtBQWE7SUFDcEMsT0FBQSxPQUFPLFdBQVcsS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFDLG1CQUFtQixDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDO0FBQWxGLENBQWtGLENBQUM7QUFFckYsTUFBTSxDQUFDLElBQU0sTUFBTSxHQUFHLFVBQUMsS0FBaUI7SUFDdEMsT0FBQSxPQUFPLFdBQVcsS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFDLGlCQUFpQixDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDO0FBQTlFLENBQThFLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBmcm9tVXRmOCBhcyBqc0Zyb21VdGY4LCB0b1V0ZjggYXMganNUb1V0ZjggfSBmcm9tIFwiLi9wdXJlSnNcIjtcbmltcG9ydCB7IGZyb21VdGY4IGFzIHRleHRFbmNvZGVyRnJvbVV0ZjgsIHRvVXRmOCBhcyB0ZXh0RW5jb2RlclRvVXRmOCB9IGZyb20gXCIuL3doYXR3Z0VuY29kaW5nQXBpXCI7XG5cbmRlY2xhcmUgY29uc3QgVGV4dERlY29kZXI6IEZ1bmN0aW9uIHwgdW5kZWZpbmVkO1xuZGVjbGFyZSBjb25zdCBUZXh0RW5jb2RlcjogRnVuY3Rpb24gfCB1bmRlZmluZWQ7XG5cbmV4cG9ydCBjb25zdCBmcm9tVXRmOCA9IChpbnB1dDogc3RyaW5nKTogVWludDhBcnJheSA9PlxuICB0eXBlb2YgVGV4dEVuY29kZXIgPT09IFwiZnVuY3Rpb25cIiA/IHRleHRFbmNvZGVyRnJvbVV0ZjgoaW5wdXQpIDoganNGcm9tVXRmOChpbnB1dCk7XG5cbmV4cG9ydCBjb25zdCB0b1V0ZjggPSAoaW5wdXQ6IFVpbnQ4QXJyYXkpOiBzdHJpbmcgPT5cbiAgdHlwZW9mIFRleHREZWNvZGVyID09PSBcImZ1bmN0aW9uXCIgPyB0ZXh0RW5jb2RlclRvVXRmOChpbnB1dCkgOiBqc1RvVXRmOChpbnB1dCk7XG4iXX0=","export function fromUtf8(input) {\n return new TextEncoder().encode(input);\n}\nexport function toUtf8(input) {\n return new TextDecoder(\"utf-8\").decode(input);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2hhdHdnRW5jb2RpbmdBcGkuanMiLCJ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PzogQXJyYXlCdWZmZXIgfCBBcnJheUJ1ZmZlclZpZXcsIG9wdGlvbnM/OiBUZXh0RGVjb2RlT3B0aW9ucyk6IHN0cmluZztcbiAgfVxuXG4gIGV4cG9ydCBpbnRlcmZhY2UgVGV4dERlY29kZXJDb25zdHJ1Y3RvciB7XG4gICAgbmV3IChsYWJlbD86IHN0cmluZywgb3B0aW9ucz86IFRleHREZWNvZGVyT3B0aW9ucyk6IFRleHREZWNvZGVyO1xuICB9XG5cbiAgaW50ZXJmYWNlIFRleHRFbmNvZGVyIHtcbiAgICByZWFkb25seSBlbmNvZGluZzogXCJ1dGYtOFwiO1xuICAgIGVuY29kZShpbnB1dD86IHN0cmluZyk6IFVpbnQ4QXJyYXk7XG4gIH1cblxuICBleHBvcnQgaW50ZXJmYWNlIFRleHRFbmNvZGVyQ29uc3RydWN0b3Ige1xuICAgIG5ldyAoKTogVGV4dEVuY29kZXI7XG4gIH1cbn1cblxuZGVjbGFyZSBjb25zdCBUZXh0RGVjb2RlcjogRW5jb2RpbmcuVGV4dERlY29kZXJDb25zdHJ1Y3RvcjtcblxuZGVjbGFyZSBjb25zdCBUZXh0RW5jb2RlcjogRW5jb2RpbmcuVGV4dEVuY29kZXJDb25zdHJ1Y3RvcjtcblxuZXhwb3J0IGZ1bmN0aW9uIGZyb21VdGY4KGlucHV0OiBzdHJpbmcpOiBVaW50OEFycmF5IHtcbiAgcmV0dXJuIG5ldyBUZXh0RW5jb2RlcigpLmVuY29kZShpbnB1dCk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB0b1V0ZjgoaW5wdXQ6IFVpbnQ4QXJyYXkpOiBzdHJpbmcge1xuICByZXR1cm4gbmV3IFRleHREZWNvZGVyKFwidXRmLThcIikuZGVjb2RlKGlucHV0KTtcbn1cbiJdfQ==","/**\n * Converts a JS string from its native UCS-2/UTF-16 representation into a\n * Uint8Array of the bytes used to represent the equivalent characters in UTF-8.\n *\n * Cribbed from the `goog.crypt.stringToUtf8ByteArray` function in the Google\n * Closure library, though updated to use typed arrays.\n */\nexport var fromUtf8 = function (input) {\n var bytes = [];\n for (var i = 0, len = input.length; i < len; i++) {\n var value = input.charCodeAt(i);\n if (value < 0x80) {\n bytes.push(value);\n }\n else if (value < 0x800) {\n bytes.push((value >> 6) | 192, (value & 63) | 128);\n }\n else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n var surrogatePair = 0x10000 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);\n bytes.push((surrogatePair >> 18) | 240, ((surrogatePair >> 12) & 63) | 128, ((surrogatePair >> 6) & 63) | 128, (surrogatePair & 63) | 128);\n }\n else {\n bytes.push((value >> 12) | 224, ((value >> 6) & 63) | 128, (value & 63) | 128);\n }\n }\n return Uint8Array.from(bytes);\n};\n/**\n * Converts a typed array of bytes containing UTF-8 data into a native JS\n * string.\n *\n * Partly cribbed from the `goog.crypt.utf8ByteArrayToString` function in the\n * Google Closure library, though updated to use typed arrays and to better\n * handle astral plane code points.\n */\nexport var toUtf8 = function (input) {\n var decoded = \"\";\n for (var i = 0, len = input.length; i < len; i++) {\n var byte = input[i];\n if (byte < 0x80) {\n decoded += String.fromCharCode(byte);\n }\n else if (192 <= byte && byte < 224) {\n var nextByte = input[++i];\n decoded += String.fromCharCode(((byte & 31) << 6) | (nextByte & 63));\n }\n else if (240 <= byte && byte < 365) {\n var surrogatePair = [byte, input[++i], input[++i], input[++i]];\n var encoded = \"%\" + surrogatePair.map(function (byteValue) { return byteValue.toString(16); }).join(\"%\");\n decoded += decodeURIComponent(encoded);\n }\n else {\n decoded += String.fromCharCode(((byte & 15) << 12) | ((input[++i] & 63) << 6) | (input[++i] & 63));\n }\n }\n return decoded;\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVyZUpzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3B1cmVKc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BkZWNvZGVkICs9IGRlY29kZVVSSUNvbXBvbmVudChlbmNvZGVkKTtcbiAgICB9IGVsc2Uge1xuICAgICAgZGVjb2RlZCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKFxuICAgICAgICAoKGJ5dGUgJiAwYjExMTEpIDw8IDEyKSB8ICgoaW5wdXRbKytpXSAmIDBiMTExMTExKSA8PCA2KSB8IChpbnB1dFsrK2ldICYgMGIxMTExMTEpXG4gICAgICApO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBkZWNvZGVkO1xufTtcbiJdfQ==","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nvar AuthenticationDetails = /*#__PURE__*/function () {\n /**\n * Constructs a new AuthenticationDetails object\n * @param {object=} data Creation options.\n * @param {string} data.Username User being authenticated.\n * @param {string} data.Password Plain-text password to authenticate with.\n * @param {(AttributeArg[])?} data.ValidationData Application extra metadata.\n * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth.\n */\n function AuthenticationDetails(data) {\n var _ref = data || {},\n ValidationData = _ref.ValidationData,\n Username = _ref.Username,\n Password = _ref.Password,\n AuthParameters = _ref.AuthParameters,\n ClientMetadata = _ref.ClientMetadata;\n\n this.validationData = ValidationData || {};\n this.authParameters = AuthParameters || {};\n this.clientMetadata = ClientMetadata || {};\n this.username = Username;\n this.password = Password;\n }\n /**\n * @returns {string} the record's username\n */\n\n\n var _proto = AuthenticationDetails.prototype;\n\n _proto.getUsername = function getUsername() {\n return this.username;\n }\n /**\n * @returns {string} the record's password\n */\n ;\n\n _proto.getPassword = function getPassword() {\n return this.password;\n }\n /**\n * @returns {Array} the record's validationData\n */\n ;\n\n _proto.getValidationData = function getValidationData() {\n return this.validationData;\n }\n /**\n * @returns {Array} the record's authParameters\n */\n ;\n\n _proto.getAuthParameters = function getAuthParameters() {\n return this.authParameters;\n }\n /**\n * @returns {ClientMetadata} the clientMetadata for a Lambda trigger\n */\n ;\n\n _proto.getClientMetadata = function getClientMetadata() {\n return this.clientMetadata;\n };\n\n return AuthenticationDetails;\n}();\n\nexport { AuthenticationDetails as default };","var crypto; // Native crypto from window (Browser)\n\nif (typeof window !== 'undefined' && window.crypto) {\n crypto = window.crypto;\n} // Native (experimental IE 11) crypto from window (Browser)\n\n\nif (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n crypto = window.msCrypto;\n} // Native crypto from global (NodeJS)\n\n\nif (!crypto && typeof global !== 'undefined' && global.crypto) {\n crypto = global.crypto;\n} // Native crypto import via require (NodeJS)\n\n\nif (!crypto && typeof require === 'function') {\n try {\n crypto = require('crypto');\n } catch (err) {}\n}\n/*\n * Cryptographically secure pseudorandom number generator\n * As Math.random() is cryptographically not safe to use\n */\n\n\nexport default function cryptoSecureRandomInt() {\n if (crypto) {\n // Use getRandomValues method (Browser)\n if (typeof crypto.getRandomValues === 'function') {\n try {\n return crypto.getRandomValues(new Uint32Array(1))[0];\n } catch (err) {}\n } // Use randomBytes method (NodeJS)\n\n\n if (typeof crypto.randomBytes === 'function') {\n try {\n return crypto.randomBytes(4).readInt32LE();\n } catch (err) {}\n }\n }\n\n throw new Error('Native crypto module could not be used to get secure random number.');\n}","import cryptoSecureRandomInt from './cryptoSecureRandomInt';\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */\n\nfunction hexStringify(wordArray) {\n // Shortcuts\n var words = wordArray.words;\n var sigBytes = wordArray.sigBytes; // Convert\n\n var hexChars = [];\n\n for (var i = 0; i < sigBytes; i++) {\n var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n\n return hexChars.join('');\n}\n\nvar WordArray = /*#__PURE__*/function () {\n function WordArray(words, sigBytes) {\n words = this.words = words || [];\n\n if (sigBytes != undefined) {\n this.sigBytes = sigBytes;\n } else {\n this.sigBytes = words.length * 4;\n }\n }\n\n var _proto = WordArray.prototype;\n\n _proto.random = function random(nBytes) {\n var words = [];\n\n for (var i = 0; i < nBytes; i += 4) {\n words.push(cryptoSecureRandomInt());\n }\n\n return new WordArray(words, nBytes);\n };\n\n _proto.toString = function toString() {\n return hexStringify(this);\n };\n\n return WordArray;\n}();\n\nexport { WordArray as default };","// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n//\n// All public methods have been removed except the following:\n// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n// toString (only radix 2, 4, 8, 16 and 32 supported)\n// negate\n// abs\n// compareTo\n// bitLength\n// mod\n// equals\n// add\n// subtract\n// multiply\n// divide\n// modPow\nexport default BigInteger;\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */\n// (public) Constructor\n\nfunction BigInteger(a, b) {\n if (a != null) this.fromString(a, b);\n} // return new, unset BigInteger\n\n\nfunction nbi() {\n return new BigInteger(null);\n} // Bits per digit\n\n\nvar dbits; // JavaScript engine analysis\n\nvar canary = 0xdeadbeefcafe;\nvar j_lm = (canary & 0xffffff) == 0xefcafe; // am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n\nfunction am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n var v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n\n return c;\n} // am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n\n\nfunction am2(i, x, w, j, c, n) {\n var xl = x & 0x7fff,\n xh = x >> 15;\n\n while (--n >= 0) {\n var l = this[i] & 0x7fff;\n var h = this[i++] >> 15;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n\n return c;\n} // Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\n\n\nfunction am3(i, x, w, j, c, n) {\n var xl = x & 0x3fff,\n xh = x >> 14;\n\n while (--n >= 0) {\n var l = this[i] & 0x3fff;\n var h = this[i++] >> 14;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n\n return c;\n}\n\nvar inBrowser = typeof navigator !== 'undefined';\n\nif (inBrowser && j_lm && navigator.appName == 'Microsoft Internet Explorer') {\n BigInteger.prototype.am = am2;\n dbits = 30;\n} else if (inBrowser && j_lm && navigator.appName != 'Netscape') {\n BigInteger.prototype.am = am1;\n dbits = 26;\n} else {\n // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n}\n\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = (1 << dbits) - 1;\nBigInteger.prototype.DV = 1 << dbits;\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP; // Digit conversions\n\nvar BI_RM = '0123456789abcdefghijklmnopqrstuvwxyz';\nvar BI_RC = new Array();\nvar rr, vv;\nrr = '0'.charCodeAt(0);\n\nfor (vv = 0; vv <= 9; ++vv) {\n BI_RC[rr++] = vv;\n}\n\nrr = 'a'.charCodeAt(0);\n\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\n\nrr = 'A'.charCodeAt(0);\n\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\n\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\n\nfunction intAt(s, i) {\n var c = BI_RC[s.charCodeAt(i)];\n return c == null ? -1 : c;\n} // (protected) copy this to r\n\n\nfunction bnpCopyTo(r) {\n for (var i = this.t - 1; i >= 0; --i) {\n r[i] = this[i];\n }\n\n r.t = this.t;\n r.s = this.s;\n} // (protected) set from integer value x, -DV <= x < DV\n\n\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = x < 0 ? -1 : 0;\n if (x > 0) this[0] = x;else if (x < -1) this[0] = x + this.DV;else this.t = 0;\n} // return bigint initialized to value\n\n\nfunction nbv(i) {\n var r = nbi();\n r.fromInt(i);\n return r;\n} // (protected) set from string and radix\n\n\nfunction bnpFromString(s, b) {\n var k;\n if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n this.t = 0;\n this.s = 0;\n var i = s.length,\n mi = false,\n sh = 0;\n\n while (--i >= 0) {\n var x = intAt(s, i);\n\n if (x < 0) {\n if (s.charAt(i) == '-') mi = true;\n continue;\n }\n\n mi = false;\n if (sh == 0) this[this.t++] = x;else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & (1 << this.DB - sh) - 1) << sh;\n this[this.t++] = x >> this.DB - sh;\n } else this[this.t - 1] |= x << sh;\n sh += k;\n if (sh >= this.DB) sh -= this.DB;\n }\n\n this.clamp();\n if (mi) BigInteger.ZERO.subTo(this, this);\n} // (protected) clamp off excess high words\n\n\nfunction bnpClamp() {\n var c = this.s & this.DM;\n\n while (this.t > 0 && this[this.t - 1] == c) {\n --this.t;\n }\n} // (public) return string representation in given radix\n\n\nfunction bnToString(b) {\n if (this.s < 0) return '-' + this.negate().toString(b);\n var k;\n if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n var km = (1 << k) - 1,\n d,\n m = false,\n r = '',\n i = this.t;\n var p = this.DB - i * this.DB % k;\n\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = int2char(d);\n }\n\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & (1 << p) - 1) << k - p;\n d |= this[--i] >> (p += this.DB - k);\n } else {\n d = this[i] >> (p -= k) & km;\n\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n\n if (d > 0) m = true;\n if (m) r += int2char(d);\n }\n }\n\n return m ? r : '0';\n} // (public) -this\n\n\nfunction bnNegate() {\n var r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n} // (public) |this|\n\n\nfunction bnAbs() {\n return this.s < 0 ? this.negate() : this;\n} // (public) return + if this > a, - if this < a, 0 if equal\n\n\nfunction bnCompareTo(a) {\n var r = this.s - a.s;\n if (r != 0) return r;\n var i = this.t;\n r = i - a.t;\n if (r != 0) return this.s < 0 ? -r : r;\n\n while (--i >= 0) {\n if ((r = this[i] - a[i]) != 0) return r;\n }\n\n return 0;\n} // returns bit length of the integer x\n\n\nfunction nbits(x) {\n var r = 1,\n t;\n\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n\n return r;\n} // (public) return the number of bits in \"this\"\n\n\nfunction bnBitLength() {\n if (this.t <= 0) return 0;\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);\n} // (protected) r = this << n*DB\n\n\nfunction bnpDLShiftTo(n, r) {\n var i;\n\n for (i = this.t - 1; i >= 0; --i) {\n r[i + n] = this[i];\n }\n\n for (i = n - 1; i >= 0; --i) {\n r[i] = 0;\n }\n\n r.t = this.t + n;\n r.s = this.s;\n} // (protected) r = this >> n*DB\n\n\nfunction bnpDRShiftTo(n, r) {\n for (var i = n; i < this.t; ++i) {\n r[i - n] = this[i];\n }\n\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n} // (protected) r = this << n\n\n\nfunction bnpLShiftTo(n, r) {\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << cbs) - 1;\n var ds = Math.floor(n / this.DB),\n c = this.s << bs & this.DM,\n i;\n\n for (i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = this[i] >> cbs | c;\n c = (this[i] & bm) << bs;\n }\n\n for (i = ds - 1; i >= 0; --i) {\n r[i] = 0;\n }\n\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n} // (protected) r = this >> n\n\n\nfunction bnpRShiftTo(n, r) {\n r.s = this.s;\n var ds = Math.floor(n / this.DB);\n\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n\n for (var i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n\n if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;\n r.t = this.t - ds;\n r.clamp();\n} // (protected) r = this - a\n\n\nfunction bnpSubTo(a, r) {\n var i = 0,\n c = 0,\n m = Math.min(a.t, this.t);\n\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n\n if (a.t < this.t) {\n c -= a.s;\n\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n\n c += this.s;\n } else {\n c += this.s;\n\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n\n c -= a.s;\n }\n\n r.s = c < 0 ? -1 : 0;\n if (c < -1) r[i++] = this.DV + c;else if (c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n} // (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\n\n\nfunction bnpMultiplyTo(a, r) {\n var x = this.abs(),\n y = a.abs();\n var i = x.t;\n r.t = i + y.t;\n\n while (--i >= 0) {\n r[i] = 0;\n }\n\n for (i = 0; i < y.t; ++i) {\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n }\n\n r.s = 0;\n r.clamp();\n if (this.s != a.s) BigInteger.ZERO.subTo(r, r);\n} // (protected) r = this^2, r != this (HAC 14.16)\n\n\nfunction bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2 * x.t;\n\n while (--i >= 0) {\n r[i] = 0;\n }\n\n for (i = 0; i < x.t - 1; ++i) {\n var c = x.am(i, x[i], r, 2 * i, 0, 1);\n\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n\n if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n r.s = 0;\n r.clamp();\n} // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\n\n\nfunction bnpDivRemTo(m, q, r) {\n var pm = m.abs();\n if (pm.t <= 0) return;\n var pt = this.abs();\n\n if (pt.t < pm.t) {\n if (q != null) q.fromInt(0);\n if (r != null) this.copyTo(r);\n return;\n }\n\n if (r == null) r = nbi();\n var y = nbi(),\n ts = this.s,\n ms = m.s;\n var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus\n\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n } else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n\n var ys = y.t;\n var y0 = y[ys - 1];\n if (y0 == 0) return;\n var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n var d1 = this.FV / yt,\n d2 = (1 << this.F1) / yt,\n e = 1 << this.F2;\n var i = r.t,\n j = i - ys,\n t = q == null ? nbi() : q;\n y.dlShiftTo(j, t);\n\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y); // \"negative\" y so we can replace sub with am later\n\n while (y.t < ys) {\n y[y.t++] = 0;\n }\n\n while (--j >= 0) {\n // Estimate quotient digit\n var qd = r[--i] == y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n\n while (r[i] < --qd) {\n r.subTo(t, r);\n }\n }\n }\n\n if (q != null) {\n r.drShiftTo(ys, q);\n if (ts != ms) BigInteger.ZERO.subTo(q, q);\n }\n\n r.t = ys;\n r.clamp();\n if (nsh > 0) r.rShiftTo(nsh, r); // Denormalize remainder\n\n if (ts < 0) BigInteger.ZERO.subTo(r, r);\n} // (public) this mod a\n\n\nfunction bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);\n return r;\n} // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\n\n\nfunction bnpInvDigit() {\n if (this.t < 1) return 0;\n var x = this[0];\n if ((x & 1) == 0) return 0;\n var y = x & 3; // y == 1/x mod 2^2\n\n y = y * (2 - (x & 0xf) * y) & 0xf; // y == 1/x mod 2^4\n\n y = y * (2 - (x & 0xff) * y) & 0xff; // y == 1/x mod 2^8\n\n y = y * (2 - ((x & 0xffff) * y & 0xffff)) & 0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n\n y = y * (2 - x * y % this.DV) % this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n\n return y > 0 ? this.DV - y : -y;\n}\n\nfunction bnEquals(a) {\n return this.compareTo(a) == 0;\n} // (protected) r = this + a\n\n\nfunction bnpAddTo(a, r) {\n var i = 0,\n c = 0,\n m = Math.min(a.t, this.t);\n\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n\n if (a.t < this.t) {\n c += a.s;\n\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n\n c += this.s;\n } else {\n c += this.s;\n\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n\n c += a.s;\n }\n\n r.s = c < 0 ? -1 : 0;\n if (c > 0) r[i++] = c;else if (c < -1) r[i++] = this.DV + c;\n r.t = i;\n r.clamp();\n} // (public) this + a\n\n\nfunction bnAdd(a) {\n var r = nbi();\n this.addTo(a, r);\n return r;\n} // (public) this - a\n\n\nfunction bnSubtract(a) {\n var r = nbi();\n this.subTo(a, r);\n return r;\n} // (public) this * a\n\n\nfunction bnMultiply(a) {\n var r = nbi();\n this.multiplyTo(a, r);\n return r;\n} // (public) this / a\n\n\nfunction bnDivide(a) {\n var r = nbi();\n this.divRemTo(a, r, null);\n return r;\n} // Montgomery reduction\n\n\nfunction Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << m.DB - 15) - 1;\n this.mt2 = 2 * m.t;\n} // xR mod m\n\n\nfunction montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);\n return r;\n} // x/R mod m\n\n\nfunction montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n} // x = x/R mod m (HAC 14.32)\n\n\nfunction montReduce(x) {\n while (x.t <= this.mt2) {\n // pad x so am has enough room later\n x[x.t++] = 0;\n }\n\n for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = j * this.mpl + ((j * this.mph + (x[i] >> 15) * this.mpl & this.um) << 15) & x.DM; // use am to combine the multiply-shift-add into one call\n\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t); // propagate carry\n\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\n} // r = \"x^2/R mod m\"; x != r\n\n\nfunction montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n} // r = \"xy/R mod m\"; x,y != r\n\n\nfunction montMulTo(x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n}\n\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo; // (public) this^e % m (HAC 14.85)\n\nfunction bnModPow(e, m, callback) {\n var i = e.bitLength(),\n k,\n r = nbv(1),\n z = new Montgomery(m);\n if (i <= 0) return r;else if (i < 18) k = 1;else if (i < 48) k = 3;else if (i < 144) k = 4;else if (i < 768) k = 5;else k = 6; // precomputation\n\n var g = new Array(),\n n = 3,\n k1 = k - 1,\n km = (1 << k) - 1;\n g[1] = z.convert(this);\n\n if (k > 1) {\n var g2 = nbi();\n z.sqrTo(g[1], g2);\n\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n\n var j = e.t - 1,\n w,\n is1 = true,\n r2 = nbi(),\n t;\n i = nbits(e[j]) - 1;\n\n while (j >= 0) {\n if (i >= k1) w = e[j] >> i - k1 & km;else {\n w = (e[j] & (1 << i + 1) - 1) << k1 - i;\n if (j > 0) w |= e[j - 1] >> this.DB + i - k1;\n }\n n = k;\n\n while ((w & 1) == 0) {\n w >>= 1;\n --n;\n }\n\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n\n if (is1) {\n // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n } else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n\n if (n > 0) z.sqrTo(r, r2);else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n\n while (j >= 0 && (e[j] & 1 << i) == 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n\n var result = z.revert(r);\n callback(null, result);\n return result;\n} // protected\n\n\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.addTo = bnpAddTo; // public\n\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.modPow = bnModPow; // \"constants\"\n\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Buffer } from 'buffer';\nimport CryptoJS from 'crypto-js/core';\nimport 'crypto-js/lib-typedarrays'; // necessary for crypto js\n\nimport SHA256 from 'crypto-js/sha256';\nimport HmacSHA256 from 'crypto-js/hmac-sha256';\nimport WordArray from './utils/WordArray';\n/**\n * Returns a Buffer with a sequence of random nBytes\n *\n * @param {number} nBytes\n * @returns {Buffer} fixed-length sequence of random bytes\n */\n\nfunction randomBytes(nBytes) {\n return Buffer.from(new WordArray().random(nBytes).toString(), 'hex');\n}\n\nimport BigInteger from './BigInteger';\n/**\n * Tests if a hex string has it most significant bit set (case-insensitive regex)\n */\n\nvar HEX_MSB_REGEX = /^[89a-f]/i;\nvar initN = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' + '29024E088A67CC74020BBEA63B139B22514A08798E3404DD' + 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245' + 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED' + 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D' + 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F' + '83655D23DCA3AD961C62F356208552BB9ED529077096966D' + '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B' + 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9' + 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510' + '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64' + 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7' + 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B' + 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C' + 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' + '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\nvar newPasswordRequiredChallengeUserAttributePrefix = 'userAttributes.';\n/** @class */\n\nvar AuthenticationHelper = /*#__PURE__*/function () {\n /**\n * Constructs a new AuthenticationHelper object\n * @param {string} PoolName Cognito user pool name.\n */\n function AuthenticationHelper(PoolName) {\n this.N = new BigInteger(initN, 16);\n this.g = new BigInteger('2', 16);\n this.k = new BigInteger(this.hexHash(\"\" + this.padHex(this.N) + this.padHex(this.g)), 16);\n this.smallAValue = this.generateRandomSmallA();\n this.getLargeAValue(function () {});\n this.infoBits = Buffer.from('Caldera Derived Key', 'utf8');\n this.poolName = PoolName;\n }\n /**\n * @returns {BigInteger} small A, a random number\n */\n\n\n var _proto = AuthenticationHelper.prototype;\n\n _proto.getSmallAValue = function getSmallAValue() {\n return this.smallAValue;\n }\n /**\n * @param {nodeCallback