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C,KAAKwjB,eAAeT,kBAC7C,KAAK,EAKD,OAJAgB,EAAYtX,EAAGpK,OACX0hB,GACA/jB,KAAK2E,OAAOU,QAAQ,uBAAyBrF,KAAKsjB,UAAY,YAE3D,CAAC,EAAcS,GAC1B,KAAK,EAGD,OAFAC,EAAMvX,EAAGpK,OACTrC,KAAKyjB,0BAA0BO,GACxB,CAAC,GAAc,GAC1B,KAAK,EAAG,MAAO,CAAC,GAExB,GACJ,GACJ,EACOX,CACX,CA3LuC,E;;ACTvC,IAAIte,EAA+B,WAC/B,SAASA,IACL/E,KAAKqW,MAAQ,IAAIV,GACrB,CAuBA,OAtBA5Q,EAAcpF,UAAUoE,QAAU,SAAUC,GACxC,OAAOhE,KAAKqW,MAAMmB,IAAIxT,IAAQ,IAClC,EACAe,EAAcpF,UAAUsE,QAAU,SAAUD,EAAK9C,GAC7ClB,KAAKqW,MAAMyB,IAAI9T,EAAK9C,EACxB,EACA6D,EAAcpF,UAAUuE,WAAa,SAAUF,GAC3ChE,KAAKqW,MAAM+D,OAAOpW,EACtB,EACAe,EAAcpF,UAAUwE,QAAU,WAC9B,IAAIyf,EAAY,GAIhB,OAHA5jB,KAAKqW,MAAMpQ,SAAQ,SAAU/E,EAAO8C,GAChC4f,EAAU7gB,KAAKiB,EACnB,IACO4f,CACX,EACA7e,EAAcpF,UAAU0E,YAAc,SAAUL,GAC5C,OAAOhE,KAAKqW,MAAM4N,IAAIjgB,EAC1B,EACAe,EAAcpF,UAAU6M,MAAQ,WAC5BxM,KAAKqW,MAAM7J,OACf,EACOzH,CACX,CA3BkC,E","sources":["webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/_virtual/_tslib.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/cache/BrowserStorage.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/cache/BrowserCacheManager.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/cache/TokenCache.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/app/ClientApplication.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/app/PublicClientApplication.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/broker/nativeBroker/NativeMessageHandler.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/cache/DatabaseStorage.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/cache/AsyncMemoryStorage.js","webpack://ida-jandaya/./node_modules/@azure/msal-browser/dist/cache/MemoryStorage.js"],"sourcesContent":["/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(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)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nfunction __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\n\nexport { __assign, __awaiter, __extends, __generator, __read, __spread };\n//# sourceMappingURL=_tslib.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\nimport { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js';\nimport { BrowserCacheLocation } from '../utils/BrowserConstants.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar BrowserStorage = /** @class */ (function () {\r\n function BrowserStorage(cacheLocation) {\r\n this.validateWindowStorage(cacheLocation);\r\n this.windowStorage = window[cacheLocation];\r\n }\r\n BrowserStorage.prototype.validateWindowStorage = function (cacheLocation) {\r\n if (cacheLocation !== BrowserCacheLocation.LocalStorage && cacheLocation !== BrowserCacheLocation.SessionStorage) {\r\n throw BrowserConfigurationAuthError.createStorageNotSupportedError(cacheLocation);\r\n }\r\n var storageSupported = !!window[cacheLocation];\r\n if (!storageSupported) {\r\n throw BrowserConfigurationAuthError.createStorageNotSupportedError(cacheLocation);\r\n }\r\n };\r\n BrowserStorage.prototype.getItem = function (key) {\r\n return this.windowStorage.getItem(key);\r\n };\r\n BrowserStorage.prototype.setItem = function (key, value) {\r\n this.windowStorage.setItem(key, value);\r\n };\r\n BrowserStorage.prototype.removeItem = function (key) {\r\n this.windowStorage.removeItem(key);\r\n };\r\n BrowserStorage.prototype.getKeys = function () {\r\n return Object.keys(this.windowStorage);\r\n };\r\n BrowserStorage.prototype.containsKey = function (key) {\r\n return this.windowStorage.hasOwnProperty(key);\r\n };\r\n return BrowserStorage;\r\n}());\n\nexport { BrowserStorage };\n//# sourceMappingURL=BrowserStorage.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\nimport { __extends, __spread, __awaiter, __generator } from '../_virtual/_tslib.js';\nimport { AccountEntity, CacheManager, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, AuthorityMetadataEntity, Constants, PersistentCacheKeys, ClientAuthError, ThrottlingEntity, StringUtils, ProtocolUtils, CcsCredentialType, IdToken, DEFAULT_CRYPTO_IMPLEMENTATION } from '@azure/msal-common';\nimport { BrowserAuthError } from '../error/BrowserAuthError.js';\nimport { BrowserCacheLocation, InMemoryCacheKeys, TemporaryCacheKeys } from '../utils/BrowserConstants.js';\nimport { BrowserStorage } from './BrowserStorage.js';\nimport { MemoryStorage } from './MemoryStorage.js';\nimport { BrowserProtocolUtils } from '../utils/BrowserProtocolUtils.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * This class implements the cache storage interface for MSAL through browser local or session storage.\r\n * Cookies are only used if storeAuthStateInCookie is true, and are only used for\r\n * parameters such as state and nonce, generally.\r\n */\r\nvar BrowserCacheManager = /** @class */ (function (_super) {\r\n __extends(BrowserCacheManager, _super);\r\n function BrowserCacheManager(clientId, cacheConfig, cryptoImpl, logger) {\r\n var _this = _super.call(this, clientId, cryptoImpl) || this;\r\n // Cookie life calculation (hours * minutes * seconds * ms)\r\n _this.COOKIE_LIFE_MULTIPLIER = 24 * 60 * 60 * 1000;\r\n _this.cacheConfig = cacheConfig;\r\n _this.logger = logger;\r\n _this.internalStorage = new MemoryStorage();\r\n _this.browserStorage = _this.setupBrowserStorage(_this.cacheConfig.cacheLocation);\r\n _this.temporaryCacheStorage = _this.setupTemporaryCacheStorage(_this.cacheConfig.cacheLocation);\r\n // Migrate any cache entries from older versions of MSAL.\r\n _this.migrateCacheEntries();\r\n return _this;\r\n }\r\n /**\r\n * Returns a window storage class implementing the IWindowStorage interface that corresponds to the configured cacheLocation.\r\n * @param cacheLocation\r\n */\r\n BrowserCacheManager.prototype.setupBrowserStorage = function (cacheLocation) {\r\n switch (cacheLocation) {\r\n case BrowserCacheLocation.LocalStorage:\r\n case BrowserCacheLocation.SessionStorage:\r\n try {\r\n // Temporary cache items will always be stored in session storage to mitigate problems caused by multiple tabs\r\n return new BrowserStorage(cacheLocation);\r\n }\r\n catch (e) {\r\n this.logger.verbose(e);\r\n break;\r\n }\r\n }\r\n this.cacheConfig.cacheLocation = BrowserCacheLocation.MemoryStorage;\r\n return new MemoryStorage();\r\n };\r\n /**\r\n *\r\n * @param cacheLocation\r\n */\r\n BrowserCacheManager.prototype.setupTemporaryCacheStorage = function (cacheLocation) {\r\n switch (cacheLocation) {\r\n case BrowserCacheLocation.LocalStorage:\r\n case BrowserCacheLocation.SessionStorage:\r\n try {\r\n // Temporary cache items will always be stored in session storage to mitigate problems caused by multiple tabs\r\n return new BrowserStorage(BrowserCacheLocation.SessionStorage);\r\n }\r\n catch (e) {\r\n this.logger.verbose(e);\r\n return this.internalStorage;\r\n }\r\n case BrowserCacheLocation.MemoryStorage:\r\n default:\r\n return this.internalStorage;\r\n }\r\n };\r\n /**\r\n * Migrate all old cache entries to new schema. No rollback supported.\r\n * @param storeAuthStateInCookie\r\n */\r\n BrowserCacheManager.prototype.migrateCacheEntries = function () {\r\n var _this = this;\r\n var idTokenKey = Constants.CACHE_PREFIX + \".\" + PersistentCacheKeys.ID_TOKEN;\r\n var clientInfoKey = Constants.CACHE_PREFIX + \".\" + PersistentCacheKeys.CLIENT_INFO;\r\n var errorKey = Constants.CACHE_PREFIX + \".\" + PersistentCacheKeys.ERROR;\r\n var errorDescKey = Constants.CACHE_PREFIX + \".\" + PersistentCacheKeys.ERROR_DESC;\r\n var idTokenValue = this.browserStorage.getItem(idTokenKey);\r\n var clientInfoValue = this.browserStorage.getItem(clientInfoKey);\r\n var errorValue = this.browserStorage.getItem(errorKey);\r\n var errorDescValue = this.browserStorage.getItem(errorDescKey);\r\n var values = [idTokenValue, clientInfoValue, errorValue, errorDescValue];\r\n var keysToMigrate = [PersistentCacheKeys.ID_TOKEN, PersistentCacheKeys.CLIENT_INFO, PersistentCacheKeys.ERROR, PersistentCacheKeys.ERROR_DESC];\r\n keysToMigrate.forEach(function (cacheKey, index) { return _this.migrateCacheEntry(cacheKey, values[index]); });\r\n };\r\n /**\r\n * Utility function to help with migration.\r\n * @param newKey\r\n * @param value\r\n * @param storeAuthStateInCookie\r\n */\r\n BrowserCacheManager.prototype.migrateCacheEntry = function (newKey, value) {\r\n if (value) {\r\n this.setTemporaryCache(newKey, value, true);\r\n }\r\n };\r\n /**\r\n * Parses passed value as JSON object, JSON.parse() will throw an error.\r\n * @param input\r\n */\r\n BrowserCacheManager.prototype.validateAndParseJson = function (jsonValue) {\r\n try {\r\n var parsedJson = JSON.parse(jsonValue);\r\n /**\r\n * There are edge cases in which JSON.parse will successfully parse a non-valid JSON object\r\n * (e.g. JSON.parse will parse an escaped string into an unescaped string), so adding a type check\r\n * of the parsed value is necessary in order to be certain that the string represents a valid JSON object.\r\n *\r\n */\r\n return (parsedJson && typeof parsedJson === \"object\") ? parsedJson : null;\r\n }\r\n catch (error) {\r\n return null;\r\n }\r\n };\r\n /**\r\n * fetches the entry from the browser storage based off the key\r\n * @param key\r\n */\r\n BrowserCacheManager.prototype.getItem = function (key) {\r\n return this.browserStorage.getItem(key);\r\n };\r\n /**\r\n * sets the entry in the browser storage\r\n * @param key\r\n * @param value\r\n */\r\n BrowserCacheManager.prototype.setItem = function (key, value) {\r\n this.browserStorage.setItem(key, value);\r\n };\r\n /**\r\n * fetch the account entity from the platform cache\r\n * @param accountKey\r\n */\r\n BrowserCacheManager.prototype.getAccount = function (accountKey) {\r\n var account = this.getItem(accountKey);\r\n if (!account) {\r\n return null;\r\n }\r\n var parsedAccount = this.validateAndParseJson(account);\r\n if (!parsedAccount || !AccountEntity.isAccountEntity(parsedAccount)) {\r\n return null;\r\n }\r\n return CacheManager.toObject(new AccountEntity(), parsedAccount);\r\n };\r\n /**\r\n * set account entity in the platform cache\r\n * @param key\r\n * @param value\r\n */\r\n BrowserCacheManager.prototype.setAccount = function (account) {\r\n this.logger.trace(\"BrowserCacheManager.setAccount called\");\r\n var key = account.generateAccountKey();\r\n this.setItem(key, JSON.stringify(account));\r\n };\r\n /**\r\n * generates idToken entity from a string\r\n * @param idTokenKey\r\n */\r\n BrowserCacheManager.prototype.getIdTokenCredential = function (idTokenKey) {\r\n var value = this.getItem(idTokenKey);\r\n if (!value) {\r\n this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: called, no cache hit\");\r\n return null;\r\n }\r\n var parsedIdToken = this.validateAndParseJson(value);\r\n if (!parsedIdToken || !IdTokenEntity.isIdTokenEntity(parsedIdToken)) {\r\n this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: called, no cache hit\");\r\n return null;\r\n }\r\n this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: cache hit\");\r\n return CacheManager.toObject(new IdTokenEntity(), parsedIdToken);\r\n };\r\n /**\r\n * set IdToken credential to the platform cache\r\n * @param idToken\r\n */\r\n BrowserCacheManager.prototype.setIdTokenCredential = function (idToken) {\r\n this.logger.trace(\"BrowserCacheManager.setIdTokenCredential called\");\r\n var idTokenKey = idToken.generateCredentialKey();\r\n this.setItem(idTokenKey, JSON.stringify(idToken));\r\n };\r\n /**\r\n * generates accessToken entity from a string\r\n * @param key\r\n */\r\n BrowserCacheManager.prototype.getAccessTokenCredential = function (accessTokenKey) {\r\n var value = this.getItem(accessTokenKey);\r\n if (!value) {\r\n this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: called, no cache hit\");\r\n return null;\r\n }\r\n var parsedAccessToken = this.validateAndParseJson(value);\r\n if (!parsedAccessToken || !AccessTokenEntity.isAccessTokenEntity(parsedAccessToken)) {\r\n this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: called, no cache hit\");\r\n return null;\r\n }\r\n this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: cache hit\");\r\n return CacheManager.toObject(new AccessTokenEntity(), parsedAccessToken);\r\n };\r\n /**\r\n * set accessToken credential to the platform cache\r\n * @param accessToken\r\n */\r\n BrowserCacheManager.prototype.setAccessTokenCredential = function (accessToken) {\r\n this.logger.trace(\"BrowserCacheManager.setAccessTokenCredential called\");\r\n var accessTokenKey = accessToken.generateCredentialKey();\r\n this.setItem(accessTokenKey, JSON.stringify(accessToken));\r\n };\r\n /**\r\n * generates refreshToken entity from a string\r\n * @param refreshTokenKey\r\n */\r\n BrowserCacheManager.prototype.getRefreshTokenCredential = function (refreshTokenKey) {\r\n var value = this.getItem(refreshTokenKey);\r\n if (!value) {\r\n this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: called, no cache hit\");\r\n return null;\r\n }\r\n var parsedRefreshToken = this.validateAndParseJson(value);\r\n if (!parsedRefreshToken || !RefreshTokenEntity.isRefreshTokenEntity(parsedRefreshToken)) {\r\n this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: called, no cache hit\");\r\n return null;\r\n }\r\n this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: cache hit\");\r\n return CacheManager.toObject(new RefreshTokenEntity(), parsedRefreshToken);\r\n };\r\n /**\r\n * set refreshToken credential to the platform cache\r\n * @param refreshToken\r\n */\r\n BrowserCacheManager.prototype.setRefreshTokenCredential = function (refreshToken) {\r\n this.logger.trace(\"BrowserCacheManager.setRefreshTokenCredential called\");\r\n var refreshTokenKey = refreshToken.generateCredentialKey();\r\n this.setItem(refreshTokenKey, JSON.stringify(refreshToken));\r\n };\r\n /**\r\n * fetch appMetadata entity from the platform cache\r\n * @param appMetadataKey\r\n */\r\n BrowserCacheManager.prototype.getAppMetadata = function (appMetadataKey) {\r\n var value = this.getItem(appMetadataKey);\r\n if (!value) {\r\n this.logger.trace(\"BrowserCacheManager.getAppMetadata: called, no cache hit\");\r\n return null;\r\n }\r\n var parsedMetadata = this.validateAndParseJson(value);\r\n if (!parsedMetadata || !AppMetadataEntity.isAppMetadataEntity(appMetadataKey, parsedMetadata)) {\r\n this.logger.trace(\"BrowserCacheManager.getAppMetadata: called, no cache hit\");\r\n return null;\r\n }\r\n this.logger.trace(\"BrowserCacheManager.getAppMetadata: cache hit\");\r\n return CacheManager.toObject(new AppMetadataEntity(), parsedMetadata);\r\n };\r\n /**\r\n * set appMetadata entity to the platform cache\r\n * @param appMetadata\r\n */\r\n BrowserCacheManager.prototype.setAppMetadata = function (appMetadata) {\r\n this.logger.trace(\"BrowserCacheManager.setAppMetadata called\");\r\n var appMetadataKey = appMetadata.generateAppMetadataKey();\r\n this.setItem(appMetadataKey, JSON.stringify(appMetadata));\r\n };\r\n /**\r\n * fetch server telemetry entity from the platform cache\r\n * @param serverTelemetryKey\r\n */\r\n BrowserCacheManager.prototype.getServerTelemetry = function (serverTelemetryKey) {\r\n var value = this.getItem(serverTelemetryKey);\r\n if (!value) {\r\n this.logger.trace(\"BrowserCacheManager.getServerTelemetry: called, no cache hit\");\r\n return null;\r\n }\r\n var parsedMetadata = this.validateAndParseJson(value);\r\n if (!parsedMetadata || !ServerTelemetryEntity.isServerTelemetryEntity(serverTelemetryKey, parsedMetadata)) {\r\n this.logger.trace(\"BrowserCacheManager.getServerTelemetry: called, no cache hit\");\r\n return null;\r\n }\r\n this.logger.trace(\"BrowserCacheManager.getServerTelemetry: cache hit\");\r\n return CacheManager.toObject(new ServerTelemetryEntity(), parsedMetadata);\r\n };\r\n /**\r\n * set server telemetry entity to the platform cache\r\n * @param serverTelemetryKey\r\n * @param serverTelemetry\r\n */\r\n BrowserCacheManager.prototype.setServerTelemetry = function (serverTelemetryKey, serverTelemetry) {\r\n this.logger.trace(\"BrowserCacheManager.setServerTelemetry called\");\r\n this.setItem(serverTelemetryKey, JSON.stringify(serverTelemetry));\r\n };\r\n /**\r\n *\r\n */\r\n BrowserCacheManager.prototype.getAuthorityMetadata = function (key) {\r\n var value = this.internalStorage.getItem(key);\r\n if (!value) {\r\n this.logger.trace(\"BrowserCacheManager.getAuthorityMetadata: called, no cache hit\");\r\n return null;\r\n }\r\n var parsedMetadata = this.validateAndParseJson(value);\r\n if (parsedMetadata && AuthorityMetadataEntity.isAuthorityMetadataEntity(key, parsedMetadata)) {\r\n this.logger.trace(\"BrowserCacheManager.getAuthorityMetadata: cache hit\");\r\n return CacheManager.toObject(new AuthorityMetadataEntity(), parsedMetadata);\r\n }\r\n return null;\r\n };\r\n /**\r\n *\r\n */\r\n BrowserCacheManager.prototype.getAuthorityMetadataKeys = function () {\r\n var _this = this;\r\n var allKeys = this.internalStorage.getKeys();\r\n return allKeys.filter(function (key) {\r\n return _this.isAuthorityMetadata(key);\r\n });\r\n };\r\n /**\r\n * Sets wrapper metadata in memory\r\n * @param wrapperSKU\r\n * @param wrapperVersion\r\n */\r\n BrowserCacheManager.prototype.setWrapperMetadata = function (wrapperSKU, wrapperVersion) {\r\n this.internalStorage.setItem(InMemoryCacheKeys.WRAPPER_SKU, wrapperSKU);\r\n this.internalStorage.setItem(InMemoryCacheKeys.WRAPPER_VER, wrapperVersion);\r\n };\r\n /**\r\n * Returns wrapper metadata from in-memory storage\r\n */\r\n BrowserCacheManager.prototype.getWrapperMetadata = function () {\r\n var sku = this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_SKU) || Constants.EMPTY_STRING;\r\n var version = this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_VER) || Constants.EMPTY_STRING;\r\n return [sku, version];\r\n };\r\n /**\r\n *\r\n * @param entity\r\n */\r\n BrowserCacheManager.prototype.setAuthorityMetadata = function (key, entity) {\r\n this.logger.trace(\"BrowserCacheManager.setAuthorityMetadata called\");\r\n this.internalStorage.setItem(key, JSON.stringify(entity));\r\n };\r\n /**\r\n * Gets the active account\r\n */\r\n BrowserCacheManager.prototype.getActiveAccount = function () {\r\n var activeAccountIdKey = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);\r\n var activeAccountId = this.browserStorage.getItem(activeAccountIdKey);\r\n if (!activeAccountId) {\r\n return null;\r\n }\r\n return this.getAccountInfoByFilter({ localAccountId: activeAccountId })[0] || null;\r\n };\r\n /**\r\n * Sets the active account's localAccountId in cache\r\n * @param account\r\n */\r\n BrowserCacheManager.prototype.setActiveAccount = function (account) {\r\n var activeAccountIdKey = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);\r\n if (account) {\r\n this.logger.verbose(\"setActiveAccount: Active account set\");\r\n this.browserStorage.setItem(activeAccountIdKey, account.localAccountId);\r\n }\r\n else {\r\n this.logger.verbose(\"setActiveAccount: No account passed, active account not set\");\r\n this.browserStorage.removeItem(activeAccountIdKey);\r\n }\r\n };\r\n /**\r\n * Gets a list of accounts that match all of the filters provided\r\n * @param account\r\n */\r\n BrowserCacheManager.prototype.getAccountInfoByFilter = function (accountFilter) {\r\n var allAccounts = this.getAllAccounts();\r\n return allAccounts.filter(function (accountObj) {\r\n if (accountFilter.username && accountFilter.username.toLowerCase() !== accountObj.username.toLowerCase()) {\r\n return false;\r\n }\r\n if (accountFilter.homeAccountId && accountFilter.homeAccountId !== accountObj.homeAccountId) {\r\n return false;\r\n }\r\n if (accountFilter.localAccountId && accountFilter.localAccountId !== accountObj.localAccountId) {\r\n return false;\r\n }\r\n if (accountFilter.tenantId && accountFilter.tenantId !== accountObj.tenantId) {\r\n return false;\r\n }\r\n if (accountFilter.environment && accountFilter.environment !== accountObj.environment) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n };\r\n /**\r\n * Checks the cache for accounts matching loginHint or SID\r\n * @param loginHint\r\n * @param sid\r\n */\r\n BrowserCacheManager.prototype.getAccountInfoByHints = function (loginHint, sid) {\r\n var matchingAccounts = this.getAllAccounts().filter(function (accountInfo) {\r\n if (sid) {\r\n var accountSid = accountInfo.idTokenClaims && accountInfo.idTokenClaims[\"sid\"];\r\n return sid === accountSid;\r\n }\r\n if (loginHint) {\r\n return loginHint === accountInfo.username;\r\n }\r\n return false;\r\n });\r\n if (matchingAccounts.length === 1) {\r\n return matchingAccounts[0];\r\n }\r\n else if (matchingAccounts.length > 1) {\r\n throw ClientAuthError.createMultipleMatchingAccountsInCacheError();\r\n }\r\n return null;\r\n };\r\n /**\r\n * fetch throttling entity from the platform cache\r\n * @param throttlingCacheKey\r\n */\r\n BrowserCacheManager.prototype.getThrottlingCache = function (throttlingCacheKey) {\r\n var value = this.getItem(throttlingCacheKey);\r\n if (!value) {\r\n this.logger.trace(\"BrowserCacheManager.getThrottlingCache: called, no cache hit\");\r\n return null;\r\n }\r\n var parsedThrottlingCache = this.validateAndParseJson(value);\r\n if (!parsedThrottlingCache || !ThrottlingEntity.isThrottlingEntity(throttlingCacheKey, parsedThrottlingCache)) {\r\n this.logger.trace(\"BrowserCacheManager.getThrottlingCache: called, no cache hit\");\r\n return null;\r\n }\r\n this.logger.trace(\"BrowserCacheManager.getThrottlingCache: cache hit\");\r\n return CacheManager.toObject(new ThrottlingEntity(), parsedThrottlingCache);\r\n };\r\n /**\r\n * set throttling entity to the platform cache\r\n * @param throttlingCacheKey\r\n * @param throttlingCache\r\n */\r\n BrowserCacheManager.prototype.setThrottlingCache = function (throttlingCacheKey, throttlingCache) {\r\n this.logger.trace(\"BrowserCacheManager.setThrottlingCache called\");\r\n this.setItem(throttlingCacheKey, JSON.stringify(throttlingCache));\r\n };\r\n /**\r\n * Gets cache item with given key.\r\n * Will retrieve from cookies if storeAuthStateInCookie is set to true.\r\n * @param key\r\n */\r\n BrowserCacheManager.prototype.getTemporaryCache = function (cacheKey, generateKey) {\r\n var key = generateKey ? this.generateCacheKey(cacheKey) : cacheKey;\r\n if (this.cacheConfig.storeAuthStateInCookie) {\r\n var itemCookie = this.getItemCookie(key);\r\n if (itemCookie) {\r\n this.logger.trace(\"BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies\");\r\n return itemCookie;\r\n }\r\n }\r\n var value = this.temporaryCacheStorage.getItem(key);\r\n if (!value) {\r\n // If temp cache item not found in session/memory, check local storage for items set by old versions\r\n if (this.cacheConfig.cacheLocation === BrowserCacheLocation.LocalStorage) {\r\n var item = this.browserStorage.getItem(key);\r\n if (item) {\r\n this.logger.trace(\"BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage\");\r\n return item;\r\n }\r\n }\r\n this.logger.trace(\"BrowserCacheManager.getTemporaryCache: No cache item found in local storage\");\r\n return null;\r\n }\r\n this.logger.trace(\"BrowserCacheManager.getTemporaryCache: Temporary cache item returned\");\r\n return value;\r\n };\r\n /**\r\n * Sets the cache item with the key and value given.\r\n * Stores in cookie if storeAuthStateInCookie is set to true.\r\n * This can cause cookie overflow if used incorrectly.\r\n * @param key\r\n * @param value\r\n */\r\n BrowserCacheManager.prototype.setTemporaryCache = function (cacheKey, value, generateKey) {\r\n var key = generateKey ? this.generateCacheKey(cacheKey) : cacheKey;\r\n this.temporaryCacheStorage.setItem(key, value);\r\n if (this.cacheConfig.storeAuthStateInCookie) {\r\n this.logger.trace(\"BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie\");\r\n this.setItemCookie(key, value);\r\n }\r\n };\r\n /**\r\n * Removes the cache item with the given key.\r\n * Will also clear the cookie item if storeAuthStateInCookie is set to true.\r\n * @param key\r\n */\r\n BrowserCacheManager.prototype.removeItem = function (key) {\r\n this.browserStorage.removeItem(key);\r\n this.temporaryCacheStorage.removeItem(key);\r\n if (this.cacheConfig.storeAuthStateInCookie) {\r\n this.logger.trace(\"BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie\");\r\n this.clearItemCookie(key);\r\n }\r\n return true;\r\n };\r\n /**\r\n * Checks whether key is in cache.\r\n * @param key\r\n */\r\n BrowserCacheManager.prototype.containsKey = function (key) {\r\n return this.browserStorage.containsKey(key) || this.temporaryCacheStorage.containsKey(key);\r\n };\r\n /**\r\n * Gets all keys in window.\r\n */\r\n BrowserCacheManager.prototype.getKeys = function () {\r\n return __spread(this.browserStorage.getKeys(), this.temporaryCacheStorage.getKeys());\r\n };\r\n /**\r\n * Clears all cache entries created by MSAL.\r\n */\r\n BrowserCacheManager.prototype.clear = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: \r\n // Removes all accounts and their credentials\r\n return [4 /*yield*/, this.removeAllAccounts()];\r\n case 1:\r\n // Removes all accounts and their credentials\r\n _a.sent();\r\n this.removeAppMetadata();\r\n // Removes all remaining MSAL cache items\r\n this.getKeys().forEach(function (cacheKey) {\r\n // Check if key contains msal prefix; For now, we are clearing all the cache items created by MSAL.js\r\n if ((_this.browserStorage.containsKey(cacheKey) || _this.temporaryCacheStorage.containsKey(cacheKey)) && ((cacheKey.indexOf(Constants.CACHE_PREFIX) !== -1) || (cacheKey.indexOf(_this.clientId) !== -1))) {\r\n _this.removeItem(cacheKey);\r\n }\r\n });\r\n this.internalStorage.clear();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Add value to cookies\r\n * @param cookieName\r\n * @param cookieValue\r\n * @param expires\r\n */\r\n BrowserCacheManager.prototype.setItemCookie = function (cookieName, cookieValue, expires) {\r\n var cookieStr = encodeURIComponent(cookieName) + \"=\" + encodeURIComponent(cookieValue) + \";path=/;SameSite=Lax;\";\r\n if (expires) {\r\n var expireTime = this.getCookieExpirationTime(expires);\r\n cookieStr += \"expires=\" + expireTime + \";\";\r\n }\r\n if (this.cacheConfig.secureCookies) {\r\n cookieStr += \"Secure;\";\r\n }\r\n document.cookie = cookieStr;\r\n };\r\n /**\r\n * Get one item by key from cookies\r\n * @param cookieName\r\n */\r\n BrowserCacheManager.prototype.getItemCookie = function (cookieName) {\r\n var name = encodeURIComponent(cookieName) + \"=\";\r\n var cookieList = document.cookie.split(\";\");\r\n for (var i = 0; i < cookieList.length; i++) {\r\n var cookie = cookieList[i];\r\n while (cookie.charAt(0) === \" \") {\r\n cookie = cookie.substring(1);\r\n }\r\n if (cookie.indexOf(name) === 0) {\r\n return decodeURIComponent(cookie.substring(name.length, cookie.length));\r\n }\r\n }\r\n return Constants.EMPTY_STRING;\r\n };\r\n /**\r\n * Clear all msal-related cookies currently set in the browser. Should only be used to clear temporary cache items.\r\n */\r\n BrowserCacheManager.prototype.clearMsalCookies = function () {\r\n var _this = this;\r\n var cookiePrefix = Constants.CACHE_PREFIX + \".\" + this.clientId;\r\n var cookieList = document.cookie.split(\";\");\r\n cookieList.forEach(function (cookie) {\r\n while (cookie.charAt(0) === \" \") {\r\n // eslint-disable-next-line no-param-reassign\r\n cookie = cookie.substring(1);\r\n }\r\n if (cookie.indexOf(cookiePrefix) === 0) {\r\n var cookieKey = cookie.split(\"=\")[0];\r\n _this.clearItemCookie(cookieKey);\r\n }\r\n });\r\n };\r\n /**\r\n * Clear an item in the cookies by key\r\n * @param cookieName\r\n */\r\n BrowserCacheManager.prototype.clearItemCookie = function (cookieName) {\r\n this.setItemCookie(cookieName, Constants.EMPTY_STRING, -1);\r\n };\r\n /**\r\n * Get cookie expiration time\r\n * @param cookieLifeDays\r\n */\r\n BrowserCacheManager.prototype.getCookieExpirationTime = function (cookieLifeDays) {\r\n var today = new Date();\r\n var expr = new Date(today.getTime() + cookieLifeDays * this.COOKIE_LIFE_MULTIPLIER);\r\n return expr.toUTCString();\r\n };\r\n /**\r\n * Gets the cache object referenced by the browser\r\n */\r\n BrowserCacheManager.prototype.getCache = function () {\r\n return this.browserStorage;\r\n };\r\n /**\r\n * interface compat, we cannot overwrite browser cache; Functionality is supported by individual entities in browser\r\n */\r\n BrowserCacheManager.prototype.setCache = function () {\r\n // sets nothing\r\n };\r\n /**\r\n * Prepend msal. to each key; Skip for any JSON object as Key (defined schemas do not need the key appended: AccessToken Keys or the upcoming schema)\r\n * @param key\r\n * @param addInstanceId\r\n */\r\n BrowserCacheManager.prototype.generateCacheKey = function (key) {\r\n var generatedKey = this.validateAndParseJson(key);\r\n if (!generatedKey) {\r\n if (StringUtils.startsWith(key, Constants.CACHE_PREFIX) || StringUtils.startsWith(key, PersistentCacheKeys.ADAL_ID_TOKEN)) {\r\n return key;\r\n }\r\n return Constants.CACHE_PREFIX + \".\" + this.clientId + \".\" + key;\r\n }\r\n return JSON.stringify(key);\r\n };\r\n /**\r\n * Create authorityKey to cache authority\r\n * @param state\r\n */\r\n BrowserCacheManager.prototype.generateAuthorityKey = function (stateString) {\r\n var stateId = ProtocolUtils.parseRequestState(this.cryptoImpl, stateString).libraryState.id;\r\n return this.generateCacheKey(TemporaryCacheKeys.AUTHORITY + \".\" + stateId);\r\n };\r\n /**\r\n * Create Nonce key to cache nonce\r\n * @param state\r\n */\r\n BrowserCacheManager.prototype.generateNonceKey = function (stateString) {\r\n var stateId = ProtocolUtils.parseRequestState(this.cryptoImpl, stateString).libraryState.id;\r\n return this.generateCacheKey(TemporaryCacheKeys.NONCE_IDTOKEN + \".\" + stateId);\r\n };\r\n /**\r\n * Creates full cache key for the request state\r\n * @param stateString State string for the request\r\n */\r\n BrowserCacheManager.prototype.generateStateKey = function (stateString) {\r\n // Use the library state id to key temp storage for uniqueness for multiple concurrent requests\r\n var stateId = ProtocolUtils.parseRequestState(this.cryptoImpl, stateString).libraryState.id;\r\n return this.generateCacheKey(TemporaryCacheKeys.REQUEST_STATE + \".\" + stateId);\r\n };\r\n /**\r\n * Gets the cached authority based on the cached state. Returns empty if no cached state found.\r\n */\r\n BrowserCacheManager.prototype.getCachedAuthority = function (cachedState) {\r\n var stateCacheKey = this.generateStateKey(cachedState);\r\n var state = this.getTemporaryCache(stateCacheKey);\r\n if (!state) {\r\n return null;\r\n }\r\n var authorityCacheKey = this.generateAuthorityKey(state);\r\n return this.getTemporaryCache(authorityCacheKey);\r\n };\r\n /**\r\n * Updates account, authority, and state in cache\r\n * @param serverAuthenticationRequest\r\n * @param account\r\n */\r\n BrowserCacheManager.prototype.updateCacheEntries = function (state, nonce, authorityInstance, loginHint, account) {\r\n this.logger.trace(\"BrowserCacheManager.updateCacheEntries called\");\r\n // Cache the request state\r\n var stateCacheKey = this.generateStateKey(state);\r\n this.setTemporaryCache(stateCacheKey, state, false);\r\n // Cache the nonce\r\n var nonceCacheKey = this.generateNonceKey(state);\r\n this.setTemporaryCache(nonceCacheKey, nonce, false);\r\n // Cache authorityKey\r\n var authorityCacheKey = this.generateAuthorityKey(state);\r\n this.setTemporaryCache(authorityCacheKey, authorityInstance, false);\r\n if (account) {\r\n var ccsCredential = {\r\n credential: account.homeAccountId,\r\n type: CcsCredentialType.HOME_ACCOUNT_ID\r\n };\r\n this.setTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL, JSON.stringify(ccsCredential), true);\r\n }\r\n else if (!StringUtils.isEmpty(loginHint)) {\r\n var ccsCredential = {\r\n credential: loginHint,\r\n type: CcsCredentialType.UPN\r\n };\r\n this.setTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL, JSON.stringify(ccsCredential), true);\r\n }\r\n };\r\n /**\r\n * Reset all temporary cache items\r\n * @param state\r\n */\r\n BrowserCacheManager.prototype.resetRequestCache = function (state) {\r\n var _this = this;\r\n this.logger.trace(\"BrowserCacheManager.resetRequestCache called\");\r\n // check state and remove associated cache items\r\n if (!StringUtils.isEmpty(state)) {\r\n this.getKeys().forEach(function (key) {\r\n if (key.indexOf(state) !== -1) {\r\n _this.removeItem(key);\r\n }\r\n });\r\n }\r\n // delete generic interactive request parameters\r\n if (state) {\r\n this.removeItem(this.generateStateKey(state));\r\n this.removeItem(this.generateNonceKey(state));\r\n this.removeItem(this.generateAuthorityKey(state));\r\n }\r\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.REQUEST_PARAMS));\r\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.ORIGIN_URI));\r\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.URL_HASH));\r\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.CORRELATION_ID));\r\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.CCS_CREDENTIAL));\r\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));\r\n this.setInteractionInProgress(false);\r\n };\r\n /**\r\n * Removes temporary cache for the provided state\r\n * @param stateString\r\n */\r\n BrowserCacheManager.prototype.cleanRequestByState = function (stateString) {\r\n this.logger.trace(\"BrowserCacheManager.cleanRequestByState called\");\r\n // Interaction is completed - remove interaction status.\r\n if (stateString) {\r\n var stateKey = this.generateStateKey(stateString);\r\n var cachedState = this.temporaryCacheStorage.getItem(stateKey);\r\n this.logger.infoPii(\"BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: \" + cachedState);\r\n this.resetRequestCache(cachedState || Constants.EMPTY_STRING);\r\n }\r\n this.clearMsalCookies();\r\n };\r\n /**\r\n * Looks in temporary cache for any state values with the provided interactionType and removes all temporary cache items for that state\r\n * Used in scenarios where temp cache needs to be cleaned but state is not known, such as clicking browser back button.\r\n * @param interactionType\r\n */\r\n BrowserCacheManager.prototype.cleanRequestByInteractionType = function (interactionType) {\r\n var _this = this;\r\n this.logger.trace(\"BrowserCacheManager.cleanRequestByInteractionType called\");\r\n // Loop through all keys to find state key\r\n this.getKeys().forEach(function (key) {\r\n // If this key is not the state key, move on\r\n if (key.indexOf(TemporaryCacheKeys.REQUEST_STATE) === -1) {\r\n return;\r\n }\r\n // Retrieve state value, return if not a valid value\r\n var stateValue = _this.temporaryCacheStorage.getItem(key);\r\n if (!stateValue) {\r\n return;\r\n }\r\n // Extract state and ensure it matches given InteractionType, then clean request cache\r\n var parsedState = BrowserProtocolUtils.extractBrowserRequestState(_this.cryptoImpl, stateValue);\r\n if (parsedState && parsedState.interactionType === interactionType) {\r\n _this.logger.infoPii(\"BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: \" + stateValue);\r\n _this.resetRequestCache(stateValue);\r\n }\r\n });\r\n this.clearMsalCookies();\r\n this.setInteractionInProgress(false);\r\n };\r\n BrowserCacheManager.prototype.cacheCodeRequest = function (authCodeRequest, browserCrypto) {\r\n this.logger.trace(\"BrowserCacheManager.cacheCodeRequest called\");\r\n var encodedValue = browserCrypto.base64Encode(JSON.stringify(authCodeRequest));\r\n this.setTemporaryCache(TemporaryCacheKeys.REQUEST_PARAMS, encodedValue, true);\r\n };\r\n /**\r\n * Gets the token exchange parameters from the cache. Throws an error if nothing is found.\r\n */\r\n BrowserCacheManager.prototype.getCachedRequest = function (state, browserCrypto) {\r\n this.logger.trace(\"BrowserCacheManager.getCachedRequest called\");\r\n // Get token request from cache and parse as TokenExchangeParameters.\r\n var encodedTokenRequest = this.getTemporaryCache(TemporaryCacheKeys.REQUEST_PARAMS, true);\r\n if (!encodedTokenRequest) {\r\n throw BrowserAuthError.createNoTokenRequestCacheError();\r\n }\r\n var parsedRequest = this.validateAndParseJson(browserCrypto.base64Decode(encodedTokenRequest));\r\n if (!parsedRequest) {\r\n throw BrowserAuthError.createUnableToParseTokenRequestCacheError();\r\n }\r\n this.removeItem(this.generateCacheKey(TemporaryCacheKeys.REQUEST_PARAMS));\r\n // Get cached authority and use if no authority is cached with request.\r\n if (StringUtils.isEmpty(parsedRequest.authority)) {\r\n var authorityCacheKey = this.generateAuthorityKey(state);\r\n var cachedAuthority = this.getTemporaryCache(authorityCacheKey);\r\n if (!cachedAuthority) {\r\n throw BrowserAuthError.createNoCachedAuthorityError();\r\n }\r\n parsedRequest.authority = cachedAuthority;\r\n }\r\n return parsedRequest;\r\n };\r\n /**\r\n * Gets cached native request for redirect flows\r\n */\r\n BrowserCacheManager.prototype.getCachedNativeRequest = function () {\r\n this.logger.trace(\"BrowserCacheManager.getCachedNativeRequest called\");\r\n var cachedRequest = this.getTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, true);\r\n if (!cachedRequest) {\r\n this.logger.trace(\"BrowserCacheManager.getCachedNativeRequest: No cached native request found\");\r\n return null;\r\n }\r\n var parsedRequest = this.validateAndParseJson(cachedRequest);\r\n if (!parsedRequest) {\r\n this.logger.error(\"BrowserCacheManager.getCachedNativeRequest: Unable to parse native request\");\r\n return null;\r\n }\r\n return parsedRequest;\r\n };\r\n BrowserCacheManager.prototype.isInteractionInProgress = function (matchClientId) {\r\n var clientId = this.getInteractionInProgress();\r\n if (matchClientId) {\r\n return clientId === this.clientId;\r\n }\r\n else {\r\n return !!clientId;\r\n }\r\n };\r\n BrowserCacheManager.prototype.getInteractionInProgress = function () {\r\n var key = Constants.CACHE_PREFIX + \".\" + TemporaryCacheKeys.INTERACTION_STATUS_KEY;\r\n return this.getTemporaryCache(key, false);\r\n };\r\n BrowserCacheManager.prototype.setInteractionInProgress = function (inProgress) {\r\n // Ensure we don't overwrite interaction in progress for a different clientId\r\n var key = Constants.CACHE_PREFIX + \".\" + TemporaryCacheKeys.INTERACTION_STATUS_KEY;\r\n if (inProgress) {\r\n if (this.getInteractionInProgress()) {\r\n throw BrowserAuthError.createInteractionInProgressError();\r\n }\r\n else {\r\n // No interaction is in progress\r\n this.setTemporaryCache(key, this.clientId, false);\r\n }\r\n }\r\n else if (!inProgress && this.getInteractionInProgress() === this.clientId) {\r\n this.removeItem(key);\r\n }\r\n };\r\n /**\r\n * Returns username retrieved from ADAL or MSAL v1 idToken\r\n */\r\n BrowserCacheManager.prototype.getLegacyLoginHint = function () {\r\n // Only check for adal/msal token if no SSO params are being used\r\n var adalIdTokenString = this.getTemporaryCache(PersistentCacheKeys.ADAL_ID_TOKEN);\r\n if (adalIdTokenString) {\r\n this.browserStorage.removeItem(PersistentCacheKeys.ADAL_ID_TOKEN);\r\n this.logger.verbose(\"Cached ADAL id token retrieved.\");\r\n }\r\n // Check for cached MSAL v1 id token\r\n var msalIdTokenString = this.getTemporaryCache(PersistentCacheKeys.ID_TOKEN, true);\r\n if (msalIdTokenString) {\r\n this.removeItem(this.generateCacheKey(PersistentCacheKeys.ID_TOKEN));\r\n this.logger.verbose(\"Cached MSAL.js v1 id token retrieved\");\r\n }\r\n var cachedIdTokenString = msalIdTokenString || adalIdTokenString;\r\n if (cachedIdTokenString) {\r\n var cachedIdToken = new IdToken(cachedIdTokenString, this.cryptoImpl);\r\n if (cachedIdToken.claims && cachedIdToken.claims.preferred_username) {\r\n this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint\");\r\n return cachedIdToken.claims.preferred_username;\r\n }\r\n else if (cachedIdToken.claims && cachedIdToken.claims.upn) {\r\n this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint\");\r\n return cachedIdToken.claims.upn;\r\n }\r\n else {\r\n this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.\");\r\n }\r\n }\r\n return null;\r\n };\r\n /**\r\n * Updates a credential's cache key if the current cache key is outdated\r\n */\r\n BrowserCacheManager.prototype.updateCredentialCacheKey = function (currentCacheKey, credential) {\r\n var updatedCacheKey = credential.generateCredentialKey();\r\n if (currentCacheKey !== updatedCacheKey) {\r\n var cacheItem = this.getItem(currentCacheKey);\r\n if (cacheItem) {\r\n this.removeItem(currentCacheKey);\r\n this.setItem(updatedCacheKey, cacheItem);\r\n this.logger.verbose(\"Updated an outdated \" + credential.credentialType + \" cache key\");\r\n return updatedCacheKey;\r\n }\r\n else {\r\n this.logger.error(\"Attempted to update an outdated \" + credential.credentialType + \" cache key but no item matching the outdated key was found in storage\");\r\n }\r\n }\r\n return currentCacheKey;\r\n };\r\n return BrowserCacheManager;\r\n}(CacheManager));\r\nvar DEFAULT_BROWSER_CACHE_MANAGER = function (clientId, logger) {\r\n var cacheOptions = {\r\n cacheLocation: BrowserCacheLocation.MemoryStorage,\r\n storeAuthStateInCookie: false,\r\n secureCookies: false\r\n };\r\n return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger);\r\n};\n\nexport { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER };\n//# sourceMappingURL=BrowserCacheManager.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\nimport { Authority, IdTokenEntity, AuthToken, AccountEntity, ScopeSet, AccessTokenEntity } from '@azure/msal-common';\nimport { BrowserAuthError } from '../error/BrowserAuthError.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Token cache manager\r\n */\r\nvar TokenCache = /** @class */ (function () {\r\n function TokenCache(configuration, storage, logger, cryptoObj) {\r\n this.isBrowserEnvironment = typeof window !== \"undefined\";\r\n this.config = configuration;\r\n this.storage = storage;\r\n this.logger = logger;\r\n this.cryptoObj = cryptoObj;\r\n }\r\n // Move getAllAccounts here and cache utility APIs\r\n /**\r\n * API to load tokens to msal-browser cache.\r\n * @param request\r\n * @param response\r\n * @param options\r\n */\r\n TokenCache.prototype.loadExternalTokens = function (request, response, options) {\r\n this.logger.info(\"TokenCache - loadExternalTokens called\");\r\n if (!response.id_token) {\r\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please ensure server response includes id token.\");\r\n }\r\n if (request.account) {\r\n this.loadIdToken(response.id_token, request.account.homeAccountId, request.account.environment, request.account.tenantId, options);\r\n this.loadAccessToken(request, response, request.account.homeAccountId, request.account.environment, request.account.tenantId, options);\r\n }\r\n else if (request.authority) {\r\n var authorityUrl = Authority.generateAuthority(request.authority, request.azureCloudOptions);\r\n var authorityOptions = {\r\n protocolMode: this.config.auth.protocolMode,\r\n knownAuthorities: this.config.auth.knownAuthorities,\r\n cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,\r\n authorityMetadata: this.config.auth.authorityMetadata,\r\n skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,\r\n };\r\n var authority = new Authority(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions);\r\n // \"clientInfo\" from options takes precedence over \"clientInfo\" in response\r\n if (options.clientInfo) {\r\n this.logger.trace(\"TokenCache - homeAccountId from options\");\r\n this.loadIdToken(response.id_token, options.clientInfo, authority.hostnameAndPort, authority.tenant, options);\r\n this.loadAccessToken(request, response, options.clientInfo, authority.hostnameAndPort, authority.tenant, options);\r\n }\r\n else if (response.client_info) {\r\n this.logger.trace(\"TokenCache - homeAccountId from response\");\r\n this.loadIdToken(response.id_token, response.client_info, authority.hostnameAndPort, authority.tenant, options);\r\n this.loadAccessToken(request, response, response.client_info, authority.hostnameAndPort, authority.tenant, options);\r\n }\r\n else {\r\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please provide clientInfo in the response or options.\");\r\n }\r\n }\r\n else {\r\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please provide a request with an account or a request with authority.\");\r\n }\r\n };\r\n /**\r\n * Helper function to load id tokens to msal-browser cache\r\n * @param idToken\r\n * @param homeAccountId\r\n * @param environment\r\n * @param tenantId\r\n * @param options\r\n */\r\n TokenCache.prototype.loadIdToken = function (idToken, homeAccountId, environment, tenantId, options) {\r\n var idTokenEntity = IdTokenEntity.createIdTokenEntity(homeAccountId, environment, idToken, this.config.auth.clientId, tenantId);\r\n var idAuthToken = new AuthToken(idToken, this.cryptoObj);\r\n var accountEntity = options.clientInfo ?\r\n AccountEntity.createAccount(options.clientInfo, homeAccountId, idAuthToken, undefined, undefined, undefined, environment) :\r\n AccountEntity.createGenericAccount(homeAccountId, idAuthToken, undefined, undefined, undefined, environment);\r\n if (this.isBrowserEnvironment) {\r\n this.logger.verbose(\"TokenCache - loading id token\");\r\n this.storage.setAccount(accountEntity);\r\n this.storage.setIdTokenCredential(idTokenEntity);\r\n }\r\n else {\r\n throw BrowserAuthError.createUnableToLoadTokenError(\"loadExternalTokens is designed to work in browser environments only.\");\r\n }\r\n };\r\n /**\r\n * Helper function to load access tokens to msal-browser cache\r\n * @param request\r\n * @param response\r\n * @param options\r\n * @param homeAccountId\r\n * @param environment\r\n * @param tenantId\r\n * @returns\r\n */\r\n TokenCache.prototype.loadAccessToken = function (request, response, homeAccountId, environment, tenantId, options) {\r\n if (!response.access_token) {\r\n this.logger.verbose(\"TokenCache - No access token provided for caching\");\r\n return;\r\n }\r\n if (!response.expires_in) {\r\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please ensure server response includes expires_in value.\");\r\n }\r\n if (!options.extendedExpiresOn) {\r\n throw BrowserAuthError.createUnableToLoadTokenError(\"Please provide an extendedExpiresOn value in the options.\");\r\n }\r\n var scopes = new ScopeSet(request.scopes).printScopes();\r\n var expiresOn = options.expiresOn || (response.expires_in + new Date().getTime() / 1000);\r\n var extendedExpiresOn = options.extendedExpiresOn;\r\n var accessTokenEntity = AccessTokenEntity.createAccessTokenEntity(homeAccountId, environment, response.access_token, this.config.auth.clientId, tenantId, scopes, expiresOn, extendedExpiresOn, this.cryptoObj);\r\n if (this.isBrowserEnvironment) {\r\n this.logger.verbose(\"TokenCache - loading access token\");\r\n this.storage.setAccessTokenCredential(accessTokenEntity);\r\n }\r\n else {\r\n throw BrowserAuthError.createUnableToLoadTokenError(\"loadExternalTokens is designed to work in browser environments only.\");\r\n }\r\n };\r\n return TokenCache;\r\n}());\n\nexport { TokenCache };\n//# sourceMappingURL=TokenCache.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\nimport { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';\nimport { CryptoOps } from '../crypto/CryptoOps.js';\nimport { Constants, InteractionRequiredAuthError, PerformanceEvents, PromptValue, AuthError, StringUtils, Logger, StubPerformanceClient, DEFAULT_CRYPTO_IMPLEMENTATION, ServerError } from '@azure/msal-common';\nimport { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from '../cache/BrowserCacheManager.js';\nimport { buildConfiguration } from '../config/Configuration.js';\nimport { InteractionType, ApiId, TemporaryCacheKeys, BrowserCacheLocation, BrowserConstants } from '../utils/BrowserConstants.js';\nimport { BrowserUtils } from '../utils/BrowserUtils.js';\nimport { name, version } from '../packageMetadata.js';\nimport { EventType } from '../event/EventType.js';\nimport { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js';\nimport { EventHandler } from '../event/EventHandler.js';\nimport { PopupClient } from '../interaction_client/PopupClient.js';\nimport { RedirectClient } from '../interaction_client/RedirectClient.js';\nimport { SilentIframeClient } from '../interaction_client/SilentIframeClient.js';\nimport { SilentRefreshClient } from '../interaction_client/SilentRefreshClient.js';\nimport { TokenCache } from '../cache/TokenCache.js';\nimport { NativeInteractionClient } from '../interaction_client/NativeInteractionClient.js';\nimport { NativeMessageHandler } from '../broker/nativeBroker/NativeMessageHandler.js';\nimport { NativeAuthError } from '../error/NativeAuthError.js';\nimport { SilentCacheClient } from '../interaction_client/SilentCacheClient.js';\nimport { SilentAuthCodeClient } from '../interaction_client/SilentAuthCodeClient.js';\nimport { BrowserAuthError } from '../error/BrowserAuthError.js';\nimport { BrowserPerformanceClient } from '../telemetry/BrowserPerformanceClient.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar ClientApplication = /** @class */ (function () {\r\n /**\r\n * @constructor\r\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\r\n *\r\n * Important attributes in the Configuration object for auth are:\r\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\r\n * - authority: the authority URL for your application.\r\n * - redirect_uri: the uri of your application registered in the portal.\r\n *\r\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\r\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\r\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\r\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\r\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\r\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\r\n *\r\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\r\n * Full B2C functionality will be available in this library in future versions.\r\n *\r\n * @param configuration Object for the MSAL PublicClientApplication instance\r\n */\r\n function ClientApplication(configuration) {\r\n /*\r\n * If loaded in an environment where window is not available,\r\n * set internal flag to false so that further requests fail.\r\n * This is to support server-side rendering environments.\r\n */\r\n this.isBrowserEnvironment = typeof window !== \"undefined\";\r\n // Set the configuration.\r\n this.config = buildConfiguration(configuration, this.isBrowserEnvironment);\r\n this.initialized = false;\r\n // Initialize logger\r\n this.logger = new Logger(this.config.system.loggerOptions, name, version);\r\n // Initialize the network module class.\r\n this.networkClient = this.config.system.networkClient;\r\n // Initialize the navigation client class.\r\n this.navigationClient = this.config.system.navigationClient;\r\n // Initialize redirectResponse Map\r\n this.redirectResponse = new Map();\r\n // Initial hybrid spa map\r\n this.hybridAuthCodeResponses = new Map();\r\n // Initialize performance client\r\n this.performanceClient = this.isBrowserEnvironment ?\r\n new BrowserPerformanceClient(this.config.auth.clientId, this.config.auth.authority, this.logger, name, version, this.config.telemetry.application) :\r\n new StubPerformanceClient(this.config.auth.clientId, this.config.auth.authority, this.logger, name, version, this.config.telemetry.application);\r\n // Initialize the crypto class.\r\n this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps(this.logger, this.performanceClient) : DEFAULT_CRYPTO_IMPLEMENTATION;\r\n this.eventHandler = new EventHandler(this.logger, this.browserCrypto);\r\n // Initialize the browser storage class.\r\n this.browserStorage = this.isBrowserEnvironment ?\r\n new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger) :\r\n DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);\r\n // Initialize the token cache\r\n this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);\r\n }\r\n /**\r\n * Initializer function to perform async startup tasks such as connecting to WAM extension\r\n */\r\n ClientApplication.prototype.initialize = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a, e_1;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n this.logger.trace(\"initialize called\");\r\n if (this.initialized) {\r\n this.logger.info(\"initialize has already been called, exiting early.\");\r\n return [2 /*return*/];\r\n }\r\n this.eventHandler.emitEvent(EventType.INITIALIZE_START);\r\n if (!this.config.system.allowNativeBroker) return [3 /*break*/, 4];\r\n _b.label = 1;\r\n case 1:\r\n _b.trys.push([1, 3, , 4]);\r\n _a = this;\r\n return [4 /*yield*/, NativeMessageHandler.createProvider(this.logger, this.config.system.nativeBrokerHandshakeTimeout)];\r\n case 2:\r\n _a.nativeExtensionProvider = _b.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_1 = _b.sent();\r\n this.logger.verbose(e_1);\r\n return [3 /*break*/, 4];\r\n case 4:\r\n this.initialized = true;\r\n this.eventHandler.emitEvent(EventType.INITIALIZE_END);\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n // #region Redirect Flow\r\n /**\r\n * Event handler function which allows users to fire events after the PublicClientApplication object\r\n * has loaded during redirect flows. This should be invoked on all page loads involved in redirect\r\n * auth flows.\r\n * @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.\r\n * @returns Token response or null. If the return value is null, then no auth redirect was detected.\r\n */\r\n ClientApplication.prototype.handleRedirectPromise = function (hash) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var loggedInAccounts, redirectResponseKey, response, request, redirectResponse, nativeClient, correlationId, redirectClient;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n this.logger.verbose(\"handleRedirectPromise called\");\r\n // Block token acquisition before initialize has been called if native brokering is enabled\r\n BrowserUtils.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker, this.initialized);\r\n loggedInAccounts = this.getAllAccounts();\r\n if (this.isBrowserEnvironment) {\r\n redirectResponseKey = hash || Constants.EMPTY_STRING;\r\n response = this.redirectResponse.get(redirectResponseKey);\r\n if (typeof response === \"undefined\") {\r\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, InteractionType.Redirect);\r\n this.logger.verbose(\"handleRedirectPromise has been called for the first time, storing the promise\");\r\n request = this.browserStorage.getCachedNativeRequest();\r\n redirectResponse = void 0;\r\n if (request && NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider) && this.nativeExtensionProvider && !hash) {\r\n this.logger.trace(\"handleRedirectPromise - acquiring token from native platform\");\r\n nativeClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.handleRedirectPromise, this.performanceClient, this.nativeExtensionProvider, request.accountId, request.correlationId);\r\n redirectResponse = nativeClient.handleRedirectPromise();\r\n }\r\n else {\r\n this.logger.trace(\"handleRedirectPromise - acquiring token from web flow\");\r\n correlationId = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, true) || Constants.EMPTY_STRING;\r\n redirectClient = this.createRedirectClient(correlationId);\r\n redirectResponse = redirectClient.handleRedirectPromise(hash);\r\n }\r\n response = redirectResponse.then(function (result) {\r\n if (result) {\r\n // Emit login event if number of accounts change\r\n var isLoggingIn = loggedInAccounts.length < _this.getAllAccounts().length;\r\n if (isLoggingIn) {\r\n _this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Redirect, result);\r\n _this.logger.verbose(\"handleRedirectResponse returned result, login success\");\r\n }\r\n else {\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Redirect, result);\r\n _this.logger.verbose(\"handleRedirectResponse returned result, acquire token success\");\r\n }\r\n }\r\n _this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\r\n return result;\r\n }).catch(function (e) {\r\n // Emit login event if there is an account\r\n if (loggedInAccounts.length > 0) {\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\r\n }\r\n else {\r\n _this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\r\n }\r\n _this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\r\n throw e;\r\n });\r\n this.redirectResponse.set(redirectResponseKey, response);\r\n }\r\n else {\r\n this.logger.verbose(\"handleRedirectPromise has been called previously, returning the result from the first call\");\r\n }\r\n return [2 /*return*/, response];\r\n }\r\n this.logger.verbose(\"handleRedirectPromise returns null, not browser environment\");\r\n return [2 /*return*/, null];\r\n });\r\n });\r\n };\r\n /**\r\n * Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects\r\n * the page, so any code that follows this function will not execute.\r\n *\r\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\r\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\r\n *\r\n * @param request\r\n */\r\n ClientApplication.prototype.acquireTokenRedirect = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var correlationId, isLoggedIn, result, nativeClient, redirectClient;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n correlationId = this.getRequestCorrelationId(request);\r\n this.logger.verbose(\"acquireTokenRedirect called\", correlationId);\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\r\n isLoggedIn = this.getAllAccounts().length > 0;\r\n if (isLoggedIn) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Redirect, request);\r\n }\r\n else {\r\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Redirect, request);\r\n }\r\n if (this.nativeExtensionProvider && this.canUseNative(request)) {\r\n nativeClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenRedirect, this.performanceClient, this.nativeExtensionProvider, this.getNativeAccountId(request), request.correlationId);\r\n result = nativeClient.acquireTokenRedirect(request).catch(function (e) {\r\n if (e instanceof NativeAuthError && e.isFatal()) {\r\n _this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt\r\n var redirectClient = _this.createRedirectClient(request.correlationId);\r\n return redirectClient.acquireToken(request);\r\n }\r\n else if (e instanceof InteractionRequiredAuthError) {\r\n _this.logger.verbose(\"acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow\");\r\n var redirectClient = _this.createRedirectClient(request.correlationId);\r\n return redirectClient.acquireToken(request);\r\n }\r\n _this.browserStorage.setInteractionInProgress(false);\r\n throw e;\r\n });\r\n }\r\n else {\r\n redirectClient = this.createRedirectClient(request.correlationId);\r\n result = redirectClient.acquireToken(request);\r\n }\r\n return [2 /*return*/, result.catch(function (e) {\r\n // If logged in, emit acquire token events\r\n if (isLoggedIn) {\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\r\n }\r\n else {\r\n _this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\r\n }\r\n throw e;\r\n })];\r\n });\r\n });\r\n };\r\n // #endregion\r\n // #region Popup Flow\r\n /**\r\n * Use when you want to obtain an access_token for your API via opening a popup window in the user's browser\r\n *\r\n * @param request\r\n *\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n ClientApplication.prototype.acquireTokenPopup = function (request) {\r\n var _this = this;\r\n var correlationId = this.getRequestCorrelationId(request);\r\n var atPopupMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenPopup, correlationId);\r\n try {\r\n this.logger.verbose(\"acquireTokenPopup called\", correlationId);\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\r\n }\r\n catch (e) {\r\n // Since this function is syncronous we need to reject\r\n return Promise.reject(e);\r\n }\r\n // If logged in, emit acquire token events\r\n var loggedInAccounts = this.getAllAccounts();\r\n if (loggedInAccounts.length > 0) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Popup, request);\r\n }\r\n else {\r\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Popup, request);\r\n }\r\n var result;\r\n if (this.canUseNative(request)) {\r\n result = this.acquireTokenNative(request, ApiId.acquireTokenPopup).then(function (response) {\r\n _this.browserStorage.setInteractionInProgress(false);\r\n atPopupMeasurement.endMeasurement({\r\n success: true,\r\n isNativeBroker: true\r\n });\r\n atPopupMeasurement.flushMeasurement();\r\n return response;\r\n }).catch(function (e) {\r\n if (e instanceof NativeAuthError && e.isFatal()) {\r\n _this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt\r\n var popupClient = _this.createPopupClient(request.correlationId);\r\n return popupClient.acquireToken(request);\r\n }\r\n else if (e instanceof InteractionRequiredAuthError) {\r\n _this.logger.verbose(\"acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow\");\r\n var popupClient = _this.createPopupClient(request.correlationId);\r\n return popupClient.acquireToken(request);\r\n }\r\n _this.browserStorage.setInteractionInProgress(false);\r\n throw e;\r\n });\r\n }\r\n else {\r\n var popupClient = this.createPopupClient(request.correlationId);\r\n result = popupClient.acquireToken(request);\r\n }\r\n return result.then(function (result) {\r\n // If logged in, emit acquire token events\r\n var isLoggingIn = loggedInAccounts.length < _this.getAllAccounts().length;\r\n if (isLoggingIn) {\r\n _this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Popup, result);\r\n }\r\n else {\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Popup, result);\r\n }\r\n atPopupMeasurement.endMeasurement({\r\n success: true\r\n });\r\n atPopupMeasurement.flushMeasurement();\r\n return result;\r\n }).catch(function (e) {\r\n if (loggedInAccounts.length > 0) {\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Popup, null, e);\r\n }\r\n else {\r\n _this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Popup, null, e);\r\n }\r\n atPopupMeasurement.endMeasurement({\r\n errorCode: e.errorCode,\r\n subErrorCode: e.subError,\r\n success: false\r\n });\r\n atPopupMeasurement.flushMeasurement();\r\n // Since this function is syncronous we need to reject\r\n return Promise.reject(e);\r\n });\r\n };\r\n // #endregion\r\n // #region Silent Flow\r\n /**\r\n * This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:\r\n * - Any browser using a form of Intelligent Tracking Prevention\r\n * - If there is not an established session with the service\r\n *\r\n * In these cases, the request must be done inside a popup or full frame redirect.\r\n *\r\n * For the cases where interaction is required, you cannot send a request with prompt=none.\r\n *\r\n * If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as\r\n * you session on the server still exists.\r\n * @param request {@link SsoSilentRequest}\r\n *\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n ClientApplication.prototype.ssoSilent = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var correlationId, validRequest, ssoSilentMeasurement, result, silentIframeClient;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n correlationId = this.getRequestCorrelationId(request);\r\n validRequest = __assign(__assign({}, request), { prompt: PromptValue.NONE, correlationId: correlationId });\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\r\n ssoSilentMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.SsoSilent, correlationId);\r\n this.logger.verbose(\"ssoSilent called\", correlationId);\r\n this.eventHandler.emitEvent(EventType.SSO_SILENT_START, InteractionType.Silent, validRequest);\r\n if (this.canUseNative(validRequest)) {\r\n result = this.acquireTokenNative(validRequest, ApiId.ssoSilent).catch(function (e) {\r\n // If native token acquisition fails for availability reasons fallback to standard flow\r\n if (e instanceof NativeAuthError && e.isFatal()) {\r\n _this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt\r\n var silentIframeClient = _this.createSilentIframeClient(validRequest.correlationId);\r\n return silentIframeClient.acquireToken(validRequest);\r\n }\r\n throw e;\r\n });\r\n }\r\n else {\r\n silentIframeClient = this.createSilentIframeClient(validRequest.correlationId);\r\n result = silentIframeClient.acquireToken(validRequest);\r\n }\r\n return [2 /*return*/, result.then(function (response) {\r\n _this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS, InteractionType.Silent, response);\r\n ssoSilentMeasurement.endMeasurement({\r\n success: true,\r\n isNativeBroker: response.fromNativeBroker\r\n });\r\n ssoSilentMeasurement.flushMeasurement();\r\n return response;\r\n }).catch(function (e) {\r\n _this.eventHandler.emitEvent(EventType.SSO_SILENT_FAILURE, InteractionType.Silent, null, e);\r\n ssoSilentMeasurement.endMeasurement({\r\n errorCode: e.errorCode,\r\n subErrorCode: e.subError,\r\n success: false\r\n });\r\n ssoSilentMeasurement.flushMeasurement();\r\n throw e;\r\n })];\r\n });\r\n });\r\n };\r\n /**\r\n * This function redeems an authorization code (passed as code) from the eSTS token endpoint.\r\n * This authorization code should be acquired server-side using a confidential client to acquire a spa_code.\r\n * This API is not indended for normal authorization code acquisition and redemption.\r\n *\r\n * Redemption of this authorization code will not require PKCE, as it was acquired by a confidential client.\r\n *\r\n * @param request {@link AuthorizationCodeRequest}\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n ClientApplication.prototype.acquireTokenByCode = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var correlationId, atbcMeasurement, hybridAuthCode_1, response;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n correlationId = this.getRequestCorrelationId(request);\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\r\n this.logger.trace(\"acquireTokenByCode called\", correlationId);\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_START, InteractionType.Silent, request);\r\n atbcMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenByCode, request.correlationId);\r\n try {\r\n if (request.code) {\r\n hybridAuthCode_1 = request.code;\r\n response = this.hybridAuthCodeResponses.get(hybridAuthCode_1);\r\n if (!response) {\r\n this.logger.verbose(\"Initiating new acquireTokenByCode request\", correlationId);\r\n response = this.acquireTokenByCodeAsync(__assign(__assign({}, request), { correlationId: correlationId }))\r\n .then(function (result) {\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_SUCCESS, InteractionType.Silent, result);\r\n _this.hybridAuthCodeResponses.delete(hybridAuthCode_1);\r\n atbcMeasurement.endMeasurement({\r\n success: true,\r\n isNativeBroker: result.fromNativeBroker\r\n });\r\n atbcMeasurement.flushMeasurement();\r\n return result;\r\n })\r\n .catch(function (error) {\r\n _this.hybridAuthCodeResponses.delete(hybridAuthCode_1);\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE, InteractionType.Silent, null, error);\r\n atbcMeasurement.endMeasurement({\r\n errorCode: error.errorCode,\r\n subErrorCode: error.subError,\r\n success: false\r\n });\r\n atbcMeasurement.flushMeasurement();\r\n throw error;\r\n });\r\n this.hybridAuthCodeResponses.set(hybridAuthCode_1, response);\r\n }\r\n else {\r\n this.logger.verbose(\"Existing acquireTokenByCode request found\", request.correlationId);\r\n atbcMeasurement.endMeasurement({\r\n success: true\r\n });\r\n atbcMeasurement.discardMeasurement();\r\n }\r\n return [2 /*return*/, response];\r\n }\r\n else if (request.nativeAccountId) {\r\n if (this.canUseNative(request, request.nativeAccountId)) {\r\n return [2 /*return*/, this.acquireTokenNative(request, ApiId.acquireTokenByCode, request.nativeAccountId).catch(function (e) {\r\n // If native token acquisition fails for availability reasons fallback to standard flow\r\n if (e instanceof NativeAuthError && e.isFatal()) {\r\n _this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt\r\n }\r\n throw e;\r\n })];\r\n }\r\n else {\r\n throw BrowserAuthError.createUnableToAcquireTokenFromNativePlatformError();\r\n }\r\n }\r\n else {\r\n throw BrowserAuthError.createAuthCodeOrNativeAccountIdRequiredError();\r\n }\r\n }\r\n catch (e) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE, InteractionType.Silent, null, e);\r\n atbcMeasurement.endMeasurement({\r\n errorCode: e instanceof AuthError && e.errorCode || undefined,\r\n subErrorCode: e instanceof AuthError && e.subError || undefined,\r\n success: false\r\n });\r\n throw e;\r\n }\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n /**\r\n * Creates a SilentAuthCodeClient to redeem an authorization code.\r\n * @param request\r\n * @returns Result of the operation to redeem the authorization code\r\n */\r\n ClientApplication.prototype.acquireTokenByCodeAsync = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var silentAuthCodeClient, silentTokenResult;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n this.logger.trace(\"acquireTokenByCodeAsync called\", request.correlationId);\r\n silentAuthCodeClient = this.createSilentAuthCodeClient(request.correlationId);\r\n return [4 /*yield*/, silentAuthCodeClient.acquireToken(request)];\r\n case 1:\r\n silentTokenResult = _a.sent();\r\n return [2 /*return*/, silentTokenResult];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Use this function to obtain a token before every call to the API / resource provider\r\n *\r\n * MSAL return's a cached token when available\r\n * Or it send's a request to the STS to obtain a new token using a refresh token.\r\n *\r\n * @param {@link SilentRequest}\r\n *\r\n * To renew idToken, please pass clientId as the only scope in the Authentication Parameters\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n ClientApplication.prototype.acquireTokenByRefreshToken = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var atbrtMeasurement, silentRefreshClient;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n // block the reload if it occurred inside a hidden iframe\r\n BrowserUtils.blockReloadInHiddenIframes();\r\n atbrtMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenByRefreshToken, request.correlationId);\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, request);\r\n silentRefreshClient = this.createSilentRefreshClient(request.correlationId);\r\n return [2 /*return*/, silentRefreshClient.acquireToken(request)\r\n .then(function (result) {\r\n atbrtMeasurement.endMeasurement({\r\n success: true,\r\n fromCache: result.fromCache\r\n });\r\n return result;\r\n })\r\n .catch(function (e) {\r\n var isServerError = e instanceof ServerError;\r\n var isInteractionRequiredError = e instanceof InteractionRequiredAuthError;\r\n var isInvalidGrantError = (e.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\r\n if (isServerError && isInvalidGrantError && !isInteractionRequiredError) {\r\n _this.logger.verbose(\"Refresh token expired or invalid, attempting acquire token by iframe\", request.correlationId);\r\n var silentIframeClient = _this.createSilentIframeClient(request.correlationId);\r\n return silentIframeClient.acquireToken(request)\r\n .then(function (result) {\r\n atbrtMeasurement.endMeasurement({\r\n success: true,\r\n fromCache: result.fromCache\r\n });\r\n return result;\r\n })\r\n .catch(function (error) {\r\n atbrtMeasurement.endMeasurement({\r\n errorCode: error.errorCode,\r\n subErrorCode: error.subError,\r\n success: false\r\n });\r\n throw error;\r\n });\r\n }\r\n atbrtMeasurement.endMeasurement({\r\n success: false\r\n });\r\n throw e;\r\n })];\r\n });\r\n });\r\n };\r\n // #endregion\r\n // #region Logout\r\n /**\r\n * Deprecated logout function. Use logoutRedirect or logoutPopup instead\r\n * @param logoutRequest\r\n * @deprecated\r\n */\r\n ClientApplication.prototype.logout = function (logoutRequest) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var correlationId;\r\n return __generator(this, function (_a) {\r\n correlationId = this.getRequestCorrelationId(logoutRequest);\r\n this.logger.warning(\"logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.\", correlationId);\r\n return [2 /*return*/, this.logoutRedirect(__assign({ correlationId: correlationId }, logoutRequest))];\r\n });\r\n });\r\n };\r\n /**\r\n * Use to log out the current user, and redirect the user to the postLogoutRedirectUri.\r\n * Default behaviour is to redirect the user to `window.location.href`.\r\n * @param logoutRequest\r\n */\r\n ClientApplication.prototype.logoutRedirect = function (logoutRequest) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var correlationId, redirectClient;\r\n return __generator(this, function (_a) {\r\n correlationId = this.getRequestCorrelationId(logoutRequest);\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\r\n redirectClient = this.createRedirectClient(correlationId);\r\n return [2 /*return*/, redirectClient.logout(logoutRequest)];\r\n });\r\n });\r\n };\r\n /**\r\n * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server\r\n * @param logoutRequest\r\n */\r\n ClientApplication.prototype.logoutPopup = function (logoutRequest) {\r\n try {\r\n var correlationId = this.getRequestCorrelationId(logoutRequest);\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\r\n var popupClient = this.createPopupClient(correlationId);\r\n return popupClient.logout(logoutRequest);\r\n }\r\n catch (e) {\r\n // Since this function is syncronous we need to reject\r\n return Promise.reject(e);\r\n }\r\n };\r\n // #endregion\r\n // #region Account APIs\r\n /**\r\n * Returns all accounts that MSAL currently has data for.\r\n * (the account object is created at the time of successful login)\r\n * or empty array when no accounts are found\r\n * @returns Array of account objects in cache\r\n */\r\n ClientApplication.prototype.getAllAccounts = function () {\r\n this.logger.verbose(\"getAllAccounts called\");\r\n return this.isBrowserEnvironment ? this.browserStorage.getAllAccounts() : [];\r\n };\r\n /**\r\n * Returns the signed in account matching username.\r\n * (the account object is created at the time of successful login)\r\n * or null when no matching account is found.\r\n * This API is provided for convenience but getAccountById should be used for best reliability\r\n * @param userName\r\n * @returns The account object stored in MSAL\r\n */\r\n ClientApplication.prototype.getAccountByUsername = function (userName) {\r\n var allAccounts = this.getAllAccounts();\r\n if (!StringUtils.isEmpty(userName) && allAccounts && allAccounts.length) {\r\n this.logger.verbose(\"Account matching username found, returning\");\r\n this.logger.verbosePii(\"Returning signed-in accounts matching username: \" + userName);\r\n return allAccounts.filter(function (accountObj) { return accountObj.username.toLowerCase() === userName.toLowerCase(); })[0] || null;\r\n }\r\n else {\r\n this.logger.verbose(\"getAccountByUsername: No matching account found, returning null\");\r\n return null;\r\n }\r\n };\r\n /**\r\n * Returns the signed in account matching homeAccountId.\r\n * (the account object is created at the time of successful login)\r\n * or null when no matching account is found\r\n * @param homeAccountId\r\n * @returns The account object stored in MSAL\r\n */\r\n ClientApplication.prototype.getAccountByHomeId = function (homeAccountId) {\r\n var allAccounts = this.getAllAccounts();\r\n if (!StringUtils.isEmpty(homeAccountId) && allAccounts && allAccounts.length) {\r\n this.logger.verbose(\"Account matching homeAccountId found, returning\");\r\n this.logger.verbosePii(\"Returning signed-in accounts matching homeAccountId: \" + homeAccountId);\r\n return allAccounts.filter(function (accountObj) { return accountObj.homeAccountId === homeAccountId; })[0] || null;\r\n }\r\n else {\r\n this.logger.verbose(\"getAccountByHomeId: No matching account found, returning null\");\r\n return null;\r\n }\r\n };\r\n /**\r\n * Returns the signed in account matching localAccountId.\r\n * (the account object is created at the time of successful login)\r\n * or null when no matching account is found\r\n * @param localAccountId\r\n * @returns The account object stored in MSAL\r\n */\r\n ClientApplication.prototype.getAccountByLocalId = function (localAccountId) {\r\n var allAccounts = this.getAllAccounts();\r\n if (!StringUtils.isEmpty(localAccountId) && allAccounts && allAccounts.length) {\r\n this.logger.verbose(\"Account matching localAccountId found, returning\");\r\n this.logger.verbosePii(\"Returning signed-in accounts matching localAccountId: \" + localAccountId);\r\n return allAccounts.filter(function (accountObj) { return accountObj.localAccountId === localAccountId; })[0] || null;\r\n }\r\n else {\r\n this.logger.verbose(\"getAccountByLocalId: No matching account found, returning null\");\r\n return null;\r\n }\r\n };\r\n /**\r\n * Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.\r\n * @param account\r\n */\r\n ClientApplication.prototype.setActiveAccount = function (account) {\r\n this.browserStorage.setActiveAccount(account);\r\n };\r\n /**\r\n * Gets the currently active account\r\n */\r\n ClientApplication.prototype.getActiveAccount = function () {\r\n return this.browserStorage.getActiveAccount();\r\n };\r\n // #endregion\r\n // #region Helpers\r\n /**\r\n * Helper to validate app environment before making an auth request\r\n *\r\n * @protected\r\n * @param {InteractionType} interactionType What kind of interaction is being used\r\n * @param {boolean} [setInteractionInProgress=true] Whether to set interaction in progress temp cache flag\r\n */\r\n ClientApplication.prototype.preflightBrowserEnvironmentCheck = function (interactionType, setInteractionInProgress) {\r\n if (setInteractionInProgress === void 0) { setInteractionInProgress = true; }\r\n this.logger.verbose(\"preflightBrowserEnvironmentCheck started\");\r\n // Block request if not in browser environment\r\n BrowserUtils.blockNonBrowserEnvironment(this.isBrowserEnvironment);\r\n // Block redirects if in an iframe\r\n BrowserUtils.blockRedirectInIframe(interactionType, this.config.system.allowRedirectInIframe);\r\n // Block auth requests inside a hidden iframe\r\n BrowserUtils.blockReloadInHiddenIframes();\r\n // Block redirectUri opened in a popup from calling MSAL APIs\r\n BrowserUtils.blockAcquireTokenInPopups();\r\n // Block token acquisition before initialize has been called if native brokering is enabled\r\n BrowserUtils.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker, this.initialized);\r\n // Block redirects if memory storage is enabled but storeAuthStateInCookie is not\r\n if (interactionType === InteractionType.Redirect &&\r\n this.config.cache.cacheLocation === BrowserCacheLocation.MemoryStorage &&\r\n !this.config.cache.storeAuthStateInCookie) {\r\n throw BrowserConfigurationAuthError.createInMemoryRedirectUnavailableError();\r\n }\r\n if (interactionType === InteractionType.Redirect || interactionType === InteractionType.Popup) {\r\n this.preflightInteractiveRequest(setInteractionInProgress);\r\n }\r\n };\r\n /**\r\n * Preflight check for interactive requests\r\n *\r\n * @protected\r\n * @param {boolean} setInteractionInProgress Whether to set interaction in progress temp cache flag\r\n */\r\n ClientApplication.prototype.preflightInteractiveRequest = function (setInteractionInProgress) {\r\n this.logger.verbose(\"preflightInteractiveRequest called, validating app environment\");\r\n // block the reload if it occurred inside a hidden iframe\r\n BrowserUtils.blockReloadInHiddenIframes();\r\n // Set interaction in progress temporary cache or throw if alread set.\r\n if (setInteractionInProgress) {\r\n this.browserStorage.setInteractionInProgress(true);\r\n }\r\n };\r\n /**\r\n * Acquire a token from native device (e.g. WAM)\r\n * @param request\r\n */\r\n ClientApplication.prototype.acquireTokenNative = function (request, apiId, accountId) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var nativeClient;\r\n return __generator(this, function (_a) {\r\n this.logger.trace(\"acquireTokenNative called\");\r\n if (!this.nativeExtensionProvider) {\r\n throw BrowserAuthError.createNativeConnectionNotEstablishedError();\r\n }\r\n nativeClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, apiId, this.performanceClient, this.nativeExtensionProvider, accountId || this.getNativeAccountId(request), request.correlationId);\r\n return [2 /*return*/, nativeClient.acquireToken(request)];\r\n });\r\n });\r\n };\r\n /**\r\n * Returns boolean indicating if this request can use the native broker\r\n * @param request\r\n */\r\n ClientApplication.prototype.canUseNative = function (request, accountId) {\r\n this.logger.trace(\"canUseNative called\");\r\n if (!NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme)) {\r\n this.logger.trace(\"canUseNative: isNativeAvailable returned false, returning false\");\r\n return false;\r\n }\r\n if (request.prompt) {\r\n switch (request.prompt) {\r\n case PromptValue.NONE:\r\n case PromptValue.CONSENT:\r\n case PromptValue.LOGIN:\r\n this.logger.trace(\"canUseNative: prompt is compatible with native flow\");\r\n break;\r\n default:\r\n this.logger.trace(\"canUseNative: prompt = \" + request.prompt + \" is not compatible with native flow, returning false\");\r\n return false;\r\n }\r\n }\r\n if (!accountId && !this.getNativeAccountId(request)) {\r\n this.logger.trace(\"canUseNative: nativeAccountId is not available, returning false\");\r\n return false;\r\n }\r\n return true;\r\n };\r\n /**\r\n * Get the native accountId from the account\r\n * @param request\r\n * @returns\r\n */\r\n ClientApplication.prototype.getNativeAccountId = function (request) {\r\n var account = request.account || this.browserStorage.getAccountInfoByHints(request.loginHint, request.sid) || this.getActiveAccount();\r\n return account && account.nativeAccountId || \"\";\r\n };\r\n /**\r\n * Returns new instance of the Popup Interaction Client\r\n * @param correlationId\r\n */\r\n ClientApplication.prototype.createPopupClient = function (correlationId) {\r\n return new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.performanceClient, this.nativeExtensionProvider, correlationId);\r\n };\r\n /**\r\n * Returns new instance of the Redirect Interaction Client\r\n * @param correlationId\r\n */\r\n ClientApplication.prototype.createRedirectClient = function (correlationId) {\r\n return new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.performanceClient, this.nativeExtensionProvider, correlationId);\r\n };\r\n /**\r\n * Returns new instance of the Silent Iframe Interaction Client\r\n * @param correlationId\r\n */\r\n ClientApplication.prototype.createSilentIframeClient = function (correlationId) {\r\n return new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.ssoSilent, this.performanceClient, this.nativeExtensionProvider, correlationId);\r\n };\r\n /**\r\n * Returns new instance of the Silent Cache Interaction Client\r\n */\r\n ClientApplication.prototype.createSilentCacheClient = function (correlationId) {\r\n return new SilentCacheClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.performanceClient, this.nativeExtensionProvider, correlationId);\r\n };\r\n /**\r\n * Returns new instance of the Silent Refresh Interaction Client\r\n */\r\n ClientApplication.prototype.createSilentRefreshClient = function (correlationId) {\r\n return new SilentRefreshClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.performanceClient, this.nativeExtensionProvider, correlationId);\r\n };\r\n /**\r\n * Returns new instance of the Silent AuthCode Interaction Client\r\n */\r\n ClientApplication.prototype.createSilentAuthCodeClient = function (correlationId) {\r\n return new SilentAuthCodeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenByCode, this.performanceClient, this.nativeExtensionProvider, correlationId);\r\n };\r\n /**\r\n * Adds event callbacks to array\r\n * @param callback\r\n */\r\n ClientApplication.prototype.addEventCallback = function (callback) {\r\n return this.eventHandler.addEventCallback(callback);\r\n };\r\n /**\r\n * Removes callback with provided id from callback array\r\n * @param callbackId\r\n */\r\n ClientApplication.prototype.removeEventCallback = function (callbackId) {\r\n this.eventHandler.removeEventCallback(callbackId);\r\n };\r\n /**\r\n * Registers a callback to receive performance events.\r\n *\r\n * @param {PerformanceCallbackFunction} callback\r\n * @returns {string}\r\n */\r\n ClientApplication.prototype.addPerformanceCallback = function (callback) {\r\n return this.performanceClient.addPerformanceCallback(callback);\r\n };\r\n /**\r\n * Removes a callback registered with addPerformanceCallback.\r\n *\r\n * @param {string} callbackId\r\n * @returns {boolean}\r\n */\r\n ClientApplication.prototype.removePerformanceCallback = function (callbackId) {\r\n return this.performanceClient.removePerformanceCallback(callbackId);\r\n };\r\n /**\r\n * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\r\n */\r\n ClientApplication.prototype.enableAccountStorageEvents = function () {\r\n this.eventHandler.enableAccountStorageEvents();\r\n };\r\n /**\r\n * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\r\n */\r\n ClientApplication.prototype.disableAccountStorageEvents = function () {\r\n this.eventHandler.disableAccountStorageEvents();\r\n };\r\n /**\r\n * Gets the token cache for the application.\r\n */\r\n ClientApplication.prototype.getTokenCache = function () {\r\n return this.tokenCache;\r\n };\r\n /**\r\n * Returns the logger instance\r\n */\r\n ClientApplication.prototype.getLogger = function () {\r\n return this.logger;\r\n };\r\n /**\r\n * Replaces the default logger set in configurations with new Logger with new configurations\r\n * @param logger Logger instance\r\n */\r\n ClientApplication.prototype.setLogger = function (logger) {\r\n this.logger = logger;\r\n };\r\n /**\r\n * Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.\r\n * @param sku\r\n * @param version\r\n */\r\n ClientApplication.prototype.initializeWrapperLibrary = function (sku, version) {\r\n // Validate the SKU passed in is one we expect\r\n this.browserStorage.setWrapperMetadata(sku, version);\r\n };\r\n /**\r\n * Sets navigation client\r\n * @param navigationClient\r\n */\r\n ClientApplication.prototype.setNavigationClient = function (navigationClient) {\r\n this.navigationClient = navigationClient;\r\n };\r\n /**\r\n * Returns the configuration object\r\n */\r\n ClientApplication.prototype.getConfiguration = function () {\r\n return this.config;\r\n };\r\n /**\r\n * Generates a correlation id for a request if none is provided.\r\n *\r\n * @protected\r\n * @param {?Partial} [request]\r\n * @returns {string}\r\n */\r\n ClientApplication.prototype.getRequestCorrelationId = function (request) {\r\n if (request === null || request === void 0 ? void 0 : request.correlationId) {\r\n return request.correlationId;\r\n }\r\n if (this.isBrowserEnvironment) {\r\n return this.browserCrypto.createNewGuid();\r\n }\r\n /*\r\n * Included for fallback for non-browser environments,\r\n * and to ensure this method always returns a string.\r\n */\r\n return Constants.EMPTY_STRING;\r\n };\r\n return ClientApplication;\r\n}());\n\nexport { ClientApplication };\n//# sourceMappingURL=ClientApplication.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\nimport { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';\nimport { PerformanceEvents, Constants } from '@azure/msal-common';\nimport { DEFAULT_REQUEST, InteractionType, ApiId } from '../utils/BrowserConstants.js';\nimport { ClientApplication } from './ClientApplication.js';\nimport { EventType } from '../event/EventType.js';\nimport { BrowserAuthError } from '../error/BrowserAuthError.js';\nimport { NativeAuthError } from '../error/NativeAuthError.js';\nimport { NativeMessageHandler } from '../broker/nativeBroker/NativeMessageHandler.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications\r\n * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.\r\n */\r\nvar PublicClientApplication = /** @class */ (function (_super) {\r\n __extends(PublicClientApplication, _super);\r\n /**\r\n * @constructor\r\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\r\n *\r\n * Important attributes in the Configuration object for auth are:\r\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\r\n * - authority: the authority URL for your application.\r\n * - redirect_uri: the uri of your application registered in the portal.\r\n *\r\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\r\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\r\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\r\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\r\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\r\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\r\n *\r\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\r\n * Full B2C functionality will be available in this library in future versions.\r\n *\r\n * @param configuration object for the MSAL PublicClientApplication instance\r\n */\r\n function PublicClientApplication(configuration) {\r\n var _this = _super.call(this, configuration) || this;\r\n _this.activeSilentTokenRequests = new Map();\r\n return _this;\r\n }\r\n /**\r\n * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so\r\n * any code that follows this function will not execute.\r\n *\r\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\r\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\r\n *\r\n * @param request\r\n */\r\n PublicClientApplication.prototype.loginRedirect = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var correlationId;\r\n return __generator(this, function (_a) {\r\n correlationId = this.getRequestCorrelationId(request);\r\n this.logger.verbose(\"loginRedirect called\", correlationId);\r\n return [2 /*return*/, this.acquireTokenRedirect(__assign({ correlationId: correlationId }, (request || DEFAULT_REQUEST)))];\r\n });\r\n });\r\n };\r\n /**\r\n * Use when initiating the login process via opening a popup window in the user's browser\r\n *\r\n * @param request\r\n *\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n PublicClientApplication.prototype.loginPopup = function (request) {\r\n var correlationId = this.getRequestCorrelationId(request);\r\n this.logger.verbose(\"loginPopup called\", correlationId);\r\n return this.acquireTokenPopup(__assign({ correlationId: correlationId }, (request || DEFAULT_REQUEST)));\r\n };\r\n /**\r\n * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.\r\n *\r\n * @param {@link (SilentRequest:type)}\r\n * @returns {Promise.} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object\r\n */\r\n PublicClientApplication.prototype.acquireTokenSilent = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var correlationId, atsMeasurement, account, thumbprint, silentRequestKey, cachedResponse, response;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n correlationId = this.getRequestCorrelationId(request);\r\n atsMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilent, correlationId);\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\r\n this.logger.verbose(\"acquireTokenSilent called\", correlationId);\r\n account = request.account || this.getActiveAccount();\r\n if (!account) {\r\n throw BrowserAuthError.createNoAccountError();\r\n }\r\n thumbprint = {\r\n clientId: this.config.auth.clientId,\r\n authority: request.authority || Constants.EMPTY_STRING,\r\n scopes: request.scopes,\r\n homeAccountIdentifier: account.homeAccountId,\r\n claims: request.claims,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims,\r\n sshKid: request.sshKid\r\n };\r\n silentRequestKey = JSON.stringify(thumbprint);\r\n cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);\r\n if (typeof cachedResponse === \"undefined\") {\r\n this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\", correlationId);\r\n response = this.acquireTokenSilentAsync(__assign(__assign({}, request), { correlationId: correlationId }), account)\r\n .then(function (result) {\r\n _this.activeSilentTokenRequests.delete(silentRequestKey);\r\n atsMeasurement.endMeasurement({\r\n success: true,\r\n fromCache: result.fromCache,\r\n isNativeBroker: result.fromNativeBroker\r\n });\r\n atsMeasurement.flushMeasurement();\r\n return result;\r\n })\r\n .catch(function (error) {\r\n _this.activeSilentTokenRequests.delete(silentRequestKey);\r\n atsMeasurement.endMeasurement({\r\n errorCode: error.errorCode,\r\n subErrorCode: error.subError,\r\n success: false\r\n });\r\n atsMeasurement.flushMeasurement();\r\n throw error;\r\n });\r\n this.activeSilentTokenRequests.set(silentRequestKey, response);\r\n return [2 /*return*/, response];\r\n }\r\n else {\r\n this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\", correlationId);\r\n atsMeasurement.endMeasurement({\r\n success: true\r\n });\r\n // Discard measurements for memoized calls, as they are usually only a couple of ms and will artificially deflate metrics\r\n atsMeasurement.discardMeasurement();\r\n return [2 /*return*/, cachedResponse];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.\r\n * @param {@link (SilentRequest:type)}\r\n * @param {@link (AccountInfo:type)}\r\n * @returns {Promise.} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse}\r\n */\r\n PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var astsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);\r\n astsAsyncMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);\r\n if (!(NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId)) return [3 /*break*/, 1];\r\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from native platform\");\r\n silentRequest = __assign(__assign({}, request), { account: account });\r\n result = this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch(function (e) { return __awaiter(_this, void 0, void 0, function () {\r\n var silentIframeClient;\r\n return __generator(this, function (_a) {\r\n // If native token acquisition fails for availability reasons fallback to web flow\r\n if (e instanceof NativeAuthError && e.isFatal()) {\r\n this.logger.verbose(\"acquireTokenSilent - native platform unavailable, falling back to web flow\");\r\n this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt \r\n silentIframeClient = this.createSilentIframeClient(request.correlationId);\r\n return [2 /*return*/, silentIframeClient.acquireToken(request)];\r\n }\r\n throw e;\r\n });\r\n }); });\r\n return [3 /*break*/, 3];\r\n case 1:\r\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from web flow\");\r\n silentCacheClient = this.createSilentCacheClient(request.correlationId);\r\n return [4 /*yield*/, silentCacheClient.initializeSilentRequest(request, account)];\r\n case 2:\r\n silentRequest_1 = _a.sent();\r\n result = silentCacheClient.acquireToken(silentRequest_1).catch(function () { return __awaiter(_this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n return [2 /*return*/, this.acquireTokenByRefreshToken(silentRequest_1)];\r\n });\r\n }); });\r\n _a.label = 3;\r\n case 3: return [2 /*return*/, result.then(function (response) {\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, response);\r\n astsAsyncMeasurement.endMeasurement({\r\n success: true,\r\n fromCache: response.fromCache,\r\n isNativeBroker: response.fromNativeBroker\r\n });\r\n return response;\r\n }).catch(function (tokenRenewalError) {\r\n _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);\r\n astsAsyncMeasurement.endMeasurement({\r\n errorCode: tokenRenewalError.errorCode,\r\n subErrorCode: tokenRenewalError.subError,\r\n success: false\r\n });\r\n throw tokenRenewalError;\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n return PublicClientApplication;\r\n}(ClientApplication));\n\nexport { PublicClientApplication };\n//# sourceMappingURL=PublicClientApplication.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\nimport { __awaiter, __generator } from '../../_virtual/_tslib.js';\nimport { NativeConstants, NativeExtensionMethod } from '../../utils/BrowserConstants.js';\nimport { AuthError, AuthenticationScheme } from '@azure/msal-common';\nimport { NativeAuthError } from '../../error/NativeAuthError.js';\nimport { BrowserAuthError } from '../../error/BrowserAuthError.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar NativeMessageHandler = /** @class */ (function () {\r\n function NativeMessageHandler(logger, handshakeTimeoutMs, extensionId) {\r\n this.logger = logger;\r\n this.handshakeTimeoutMs = handshakeTimeoutMs;\r\n this.extensionId = extensionId;\r\n this.resolvers = new Map(); // Used for non-handshake messages\r\n this.handshakeResolvers = new Map(); // Used for handshake messages\r\n this.responseId = 0;\r\n this.messageChannel = new MessageChannel();\r\n this.windowListener = this.onWindowMessage.bind(this); // Window event callback doesn't have access to 'this' unless it's bound\r\n }\r\n /**\r\n * Sends a given message to the extension and resolves with the extension response\r\n * @param body\r\n */\r\n NativeMessageHandler.prototype.sendMessage = function (body) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var req;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n this.logger.trace(\"NativeMessageHandler - sendMessage called.\");\r\n req = {\r\n channel: NativeConstants.CHANNEL_ID,\r\n extensionId: this.extensionId,\r\n responseId: this.responseId++,\r\n body: body\r\n };\r\n this.logger.trace(\"NativeMessageHandler - Sending request to browser extension\");\r\n this.logger.tracePii(\"NativeMessageHandler - Sending request to browser extension: \" + JSON.stringify(req));\r\n this.messageChannel.port1.postMessage(req);\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n _this.resolvers.set(req.responseId, { resolve: resolve, reject: reject });\r\n })];\r\n });\r\n });\r\n };\r\n /**\r\n * Returns an instance of the MessageHandler that has successfully established a connection with an extension\r\n * @param logger\r\n * @param handshakeTimeoutMs\r\n */\r\n NativeMessageHandler.createProvider = function (logger, handshakeTimeoutMs) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var preferredProvider, backupProvider;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n logger.trace(\"NativeMessageHandler - createProvider called.\");\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 5]);\r\n preferredProvider = new NativeMessageHandler(logger, handshakeTimeoutMs, NativeConstants.PREFERRED_EXTENSION_ID);\r\n return [4 /*yield*/, preferredProvider.sendHandshakeRequest()];\r\n case 2:\r\n _a.sent();\r\n return [2 /*return*/, preferredProvider];\r\n case 3:\r\n _a.sent();\r\n backupProvider = new NativeMessageHandler(logger, handshakeTimeoutMs);\r\n return [4 /*yield*/, backupProvider.sendHandshakeRequest()];\r\n case 4:\r\n _a.sent();\r\n return [2 /*return*/, backupProvider];\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Send handshake request helper.\r\n */\r\n NativeMessageHandler.prototype.sendHandshakeRequest = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var req;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n this.logger.trace(\"NativeMessageHandler - sendHandshakeRequest called.\");\r\n // Register this event listener before sending handshake\r\n window.addEventListener(\"message\", this.windowListener, false); // false is important, because content script message processing should work first\r\n req = {\r\n channel: NativeConstants.CHANNEL_ID,\r\n extensionId: this.extensionId,\r\n responseId: this.responseId++,\r\n body: {\r\n method: NativeExtensionMethod.HandshakeRequest\r\n }\r\n };\r\n this.messageChannel.port1.onmessage = function (event) {\r\n _this.onChannelMessage(event);\r\n };\r\n window.postMessage(req, window.origin, [this.messageChannel.port2]);\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n _this.handshakeResolvers.set(req.responseId, { resolve: resolve, reject: reject });\r\n _this.timeoutId = window.setTimeout(function () {\r\n /*\r\n * Throw an error if neither HandshakeResponse nor original Handshake request are received in a reasonable timeframe.\r\n * This typically suggests an event handler stopped propagation of the Handshake request but did not respond to it on the MessageChannel port\r\n */\r\n window.removeEventListener(\"message\", _this.windowListener, false);\r\n _this.messageChannel.port1.close();\r\n _this.messageChannel.port2.close();\r\n reject(BrowserAuthError.createNativeHandshakeTimeoutError());\r\n _this.handshakeResolvers.delete(req.responseId);\r\n }, _this.handshakeTimeoutMs); // Use a reasonable timeout in milliseconds here\r\n })];\r\n });\r\n });\r\n };\r\n /**\r\n * Invoked when a message is posted to the window. If a handshake request is received it means the extension is not installed.\r\n * @param event\r\n */\r\n NativeMessageHandler.prototype.onWindowMessage = function (event) {\r\n this.logger.trace(\"NativeMessageHandler - onWindowMessage called\");\r\n // We only accept messages from ourselves\r\n if (event.source !== window) {\r\n return;\r\n }\r\n var request = event.data;\r\n if (!request.channel || request.channel !== NativeConstants.CHANNEL_ID) {\r\n return;\r\n }\r\n if (request.extensionId && request.extensionId !== this.extensionId) {\r\n return;\r\n }\r\n if (request.body.method === NativeExtensionMethod.HandshakeRequest) {\r\n // If we receive this message back it means no extension intercepted the request, meaning no extension supporting handshake protocol is installed\r\n this.logger.verbose(request.extensionId ? \"Extension with id: \" + request.extensionId + \" not installed\" : \"No extension installed\");\r\n clearTimeout(this.timeoutId);\r\n this.messageChannel.port1.close();\r\n this.messageChannel.port2.close();\r\n window.removeEventListener(\"message\", this.windowListener, false);\r\n var handshakeResolver = this.handshakeResolvers.get(request.responseId);\r\n if (handshakeResolver) {\r\n handshakeResolver.reject(BrowserAuthError.createNativeExtensionNotInstalledError());\r\n }\r\n }\r\n };\r\n /**\r\n * Invoked when a message is received from the extension on the MessageChannel port\r\n * @param event\r\n */\r\n NativeMessageHandler.prototype.onChannelMessage = function (event) {\r\n this.logger.trace(\"NativeMessageHandler - onChannelMessage called.\");\r\n var request = event.data;\r\n var resolver = this.resolvers.get(request.responseId);\r\n var handshakeResolver = this.handshakeResolvers.get(request.responseId);\r\n try {\r\n var method = request.body.method;\r\n if (method === NativeExtensionMethod.Response) {\r\n if (!resolver) {\r\n return;\r\n }\r\n var response = request.body.response;\r\n this.logger.trace(\"NativeMessageHandler - Received response from browser extension\");\r\n this.logger.tracePii(\"NativeMessageHandler - Received response from browser extension: \" + JSON.stringify(response));\r\n if (response.status !== \"Success\") {\r\n resolver.reject(NativeAuthError.createError(response.code, response.description, response.ext));\r\n }\r\n else if (response.result) {\r\n if (response.result[\"code\"] && response.result[\"description\"]) {\r\n resolver.reject(NativeAuthError.createError(response.result[\"code\"], response.result[\"description\"], response.result[\"ext\"]));\r\n }\r\n else {\r\n resolver.resolve(response.result);\r\n }\r\n }\r\n else {\r\n throw AuthError.createUnexpectedError(\"Event does not contain result.\");\r\n }\r\n this.resolvers.delete(request.responseId);\r\n }\r\n else if (method === NativeExtensionMethod.HandshakeResponse) {\r\n if (!handshakeResolver) {\r\n return;\r\n }\r\n clearTimeout(this.timeoutId); // Clear setTimeout\r\n window.removeEventListener(\"message\", this.windowListener, false); // Remove 'No extension' listener\r\n this.extensionId = request.extensionId;\r\n this.logger.verbose(\"NativeMessageHandler - Received HandshakeResponse from extension: \" + this.extensionId);\r\n handshakeResolver.resolve();\r\n this.handshakeResolvers.delete(request.responseId);\r\n }\r\n // Do nothing if method is not Response or HandshakeResponse\r\n }\r\n catch (err) {\r\n this.logger.error(\"Error parsing response from WAM Extension\");\r\n this.logger.errorPii(\"Error parsing response from WAM Extension: \" + err.toString());\r\n this.logger.errorPii(\"Unable to parse \" + event);\r\n if (resolver) {\r\n resolver.reject(err);\r\n }\r\n else if (handshakeResolver) {\r\n handshakeResolver.reject(err);\r\n }\r\n }\r\n };\r\n /**\r\n * Returns boolean indicating whether or not the request should attempt to use native broker\r\n * @param logger\r\n * @param config\r\n * @param nativeExtensionProvider\r\n * @param authenticationScheme\r\n */\r\n NativeMessageHandler.isNativeAvailable = function (config, logger, nativeExtensionProvider, authenticationScheme) {\r\n logger.trace(\"isNativeAvailable called\");\r\n if (!config.system.allowNativeBroker) {\r\n logger.trace(\"isNativeAvailable: allowNativeBroker is not enabled, returning false\");\r\n // Developer disabled WAM\r\n return false;\r\n }\r\n if (!nativeExtensionProvider) {\r\n logger.trace(\"isNativeAvailable: WAM extension provider is not initialized, returning false\");\r\n // Extension is not available\r\n return false;\r\n }\r\n if (authenticationScheme) {\r\n switch (authenticationScheme) {\r\n case AuthenticationScheme.BEARER:\r\n case AuthenticationScheme.POP:\r\n logger.trace(\"isNativeAvailable: authenticationScheme is supported, returning true\");\r\n return true;\r\n default:\r\n logger.trace(\"isNativeAvailable: authenticationScheme is not supported, returning false\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n return NativeMessageHandler;\r\n}());\n\nexport { NativeMessageHandler };\n//# sourceMappingURL=NativeMessageHandler.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\nimport { __awaiter, __generator } from '../_virtual/_tslib.js';\nimport { BrowserAuthError } from '../error/BrowserAuthError.js';\nimport { DB_NAME, DB_VERSION, DB_TABLE_NAME } from '../utils/BrowserConstants.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Storage wrapper for IndexedDB storage in browsers: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API\r\n */\r\nvar DatabaseStorage = /** @class */ (function () {\r\n function DatabaseStorage() {\r\n this.dbName = DB_NAME;\r\n this.version = DB_VERSION;\r\n this.tableName = DB_TABLE_NAME;\r\n this.dbOpen = false;\r\n }\r\n /**\r\n * Opens IndexedDB instance.\r\n */\r\n DatabaseStorage.prototype.open = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n var openDB = window.indexedDB.open(_this.dbName, _this.version);\r\n openDB.addEventListener(\"upgradeneeded\", function (e) {\r\n var event = e;\r\n event.target.result.createObjectStore(_this.tableName);\r\n });\r\n openDB.addEventListener(\"success\", function (e) {\r\n var event = e;\r\n _this.db = event.target.result;\r\n _this.dbOpen = true;\r\n resolve();\r\n });\r\n openDB.addEventListener(\"error\", function () { return reject(BrowserAuthError.createDatabaseUnavailableError()); });\r\n })];\r\n });\r\n });\r\n };\r\n /**\r\n * Closes the connection to IndexedDB database when all pending transactions\r\n * complete.\r\n */\r\n DatabaseStorage.prototype.closeConnection = function () {\r\n var db = this.db;\r\n if (db && this.dbOpen) {\r\n db.close();\r\n this.dbOpen = false;\r\n }\r\n };\r\n /**\r\n * Opens database if it's not already open\r\n */\r\n DatabaseStorage.prototype.validateDbIsOpen = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!!this.dbOpen) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.open()];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n case 2: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Retrieves item from IndexedDB instance.\r\n * @param key\r\n */\r\n DatabaseStorage.prototype.getItem = function (key) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.validateDbIsOpen()];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n // TODO: Add timeouts?\r\n if (!_this.db) {\r\n return reject(BrowserAuthError.createDatabaseNotOpenError());\r\n }\r\n var transaction = _this.db.transaction([_this.tableName], \"readonly\");\r\n var objectStore = transaction.objectStore(_this.tableName);\r\n var dbGet = objectStore.get(key);\r\n dbGet.addEventListener(\"success\", function (e) {\r\n var event = e;\r\n _this.closeConnection();\r\n resolve(event.target.result);\r\n });\r\n dbGet.addEventListener(\"error\", function (e) {\r\n _this.closeConnection();\r\n reject(e);\r\n });\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Adds item to IndexedDB under given key\r\n * @param key\r\n * @param payload\r\n */\r\n DatabaseStorage.prototype.setItem = function (key, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.validateDbIsOpen()];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n // TODO: Add timeouts?\r\n if (!_this.db) {\r\n return reject(BrowserAuthError.createDatabaseNotOpenError());\r\n }\r\n var transaction = _this.db.transaction([_this.tableName], \"readwrite\");\r\n var objectStore = transaction.objectStore(_this.tableName);\r\n var dbPut = objectStore.put(payload, key);\r\n dbPut.addEventListener(\"success\", function () {\r\n _this.closeConnection();\r\n resolve();\r\n });\r\n dbPut.addEventListener(\"error\", function (e) {\r\n _this.closeConnection();\r\n reject(e);\r\n });\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Removes item from IndexedDB under given key\r\n * @param key\r\n */\r\n DatabaseStorage.prototype.removeItem = function (key) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.validateDbIsOpen()];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n if (!_this.db) {\r\n return reject(BrowserAuthError.createDatabaseNotOpenError());\r\n }\r\n var transaction = _this.db.transaction([_this.tableName], \"readwrite\");\r\n var objectStore = transaction.objectStore(_this.tableName);\r\n var dbDelete = objectStore.delete(key);\r\n dbDelete.addEventListener(\"success\", function () {\r\n _this.closeConnection();\r\n resolve();\r\n });\r\n dbDelete.addEventListener(\"error\", function (e) {\r\n _this.closeConnection();\r\n reject(e);\r\n });\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Get all the keys from the storage object as an iterable array of strings.\r\n */\r\n DatabaseStorage.prototype.getKeys = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.validateDbIsOpen()];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n if (!_this.db) {\r\n return reject(BrowserAuthError.createDatabaseNotOpenError());\r\n }\r\n var transaction = _this.db.transaction([_this.tableName], \"readonly\");\r\n var objectStore = transaction.objectStore(_this.tableName);\r\n var dbGetKeys = objectStore.getAllKeys();\r\n dbGetKeys.addEventListener(\"success\", function (e) {\r\n var event = e;\r\n _this.closeConnection();\r\n resolve(event.target.result);\r\n });\r\n dbGetKeys.addEventListener(\"error\", function (e) {\r\n _this.closeConnection();\r\n reject(e);\r\n });\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n *\r\n * Checks whether there is an object under the search key in the object store\r\n */\r\n DatabaseStorage.prototype.containsKey = function (key) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.validateDbIsOpen()];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n if (!_this.db) {\r\n return reject(BrowserAuthError.createDatabaseNotOpenError());\r\n }\r\n var transaction = _this.db.transaction([_this.tableName], \"readonly\");\r\n var objectStore = transaction.objectStore(_this.tableName);\r\n var dbContainsKey = objectStore.count(key);\r\n dbContainsKey.addEventListener(\"success\", function (e) {\r\n var event = e;\r\n _this.closeConnection();\r\n resolve(event.target.result === 1);\r\n });\r\n dbContainsKey.addEventListener(\"error\", function (e) {\r\n _this.closeConnection();\r\n reject(e);\r\n });\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Deletes the MSAL database. The database is deleted rather than cleared to make it possible\r\n * for client applications to downgrade to a previous MSAL version without worrying about forward compatibility issues\r\n * with IndexedDB database versions.\r\n */\r\n DatabaseStorage.prototype.deleteDatabase = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var existingDatabases, database;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // Check if database being deleted exists\r\n if (this.db && this.dbOpen) {\r\n this.closeConnection();\r\n }\r\n return [4 /*yield*/, window.indexedDB.databases()];\r\n case 1:\r\n existingDatabases = _a.sent();\r\n database = existingDatabases.find(function (database) { return database.name === DB_NAME; });\r\n // If database exists, delete it\r\n if (database) {\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n var deleteDbRequest = window.indexedDB.deleteDatabase(DB_NAME);\r\n deleteDbRequest.addEventListener(\"success\", function () { return resolve(true); });\r\n deleteDbRequest.addEventListener(\"error\", function () { return reject(false); });\r\n })];\r\n }\r\n // Database doesn't exist, return true\r\n return [2 /*return*/, true];\r\n }\r\n });\r\n });\r\n };\r\n return DatabaseStorage;\r\n}());\n\nexport { DatabaseStorage };\n//# sourceMappingURL=DatabaseStorage.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\nimport { __awaiter, __generator } from '../_virtual/_tslib.js';\nimport { BrowserAuthError, BrowserAuthErrorMessage } from '../error/BrowserAuthError.js';\nimport { DatabaseStorage } from './DatabaseStorage.js';\nimport { MemoryStorage } from './MemoryStorage.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * This class allows MSAL to store artifacts asynchronously using the DatabaseStorage IndexedDB wrapper,\r\n * backed up with the more volatile MemoryStorage object for cases in which IndexedDB may be unavailable.\r\n */\r\nvar AsyncMemoryStorage = /** @class */ (function () {\r\n function AsyncMemoryStorage(logger, storeName) {\r\n this.inMemoryCache = new MemoryStorage();\r\n this.indexedDBCache = new DatabaseStorage();\r\n this.logger = logger;\r\n this.storeName = storeName;\r\n }\r\n AsyncMemoryStorage.prototype.handleDatabaseAccessError = function (error) {\r\n if (error instanceof BrowserAuthError && error.errorCode === BrowserAuthErrorMessage.databaseUnavailable.code) {\r\n this.logger.error(\"Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.\");\r\n }\r\n else {\r\n throw error;\r\n }\r\n };\r\n /**\r\n * Get the item matching the given key. Tries in-memory cache first, then in the asynchronous\r\n * storage object if item isn't found in-memory.\r\n * @param key\r\n */\r\n AsyncMemoryStorage.prototype.getItem = function (key) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var item, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n item = this.inMemoryCache.getItem(key);\r\n if (!!item) return [3 /*break*/, 4];\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n this.logger.verbose(\"Queried item not found in in-memory cache, now querying persistent storage.\");\r\n return [4 /*yield*/, this.indexedDBCache.getItem(key)];\r\n case 2: return [2 /*return*/, _a.sent()];\r\n case 3:\r\n e_1 = _a.sent();\r\n this.handleDatabaseAccessError(e_1);\r\n return [3 /*break*/, 4];\r\n case 4: return [2 /*return*/, item];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Sets the item in the in-memory cache and then tries to set it in the asynchronous\r\n * storage object with the given key.\r\n * @param key\r\n * @param value\r\n */\r\n AsyncMemoryStorage.prototype.setItem = function (key, value) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var e_2;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n this.inMemoryCache.setItem(key, value);\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.indexedDBCache.setItem(key, value)];\r\n case 2:\r\n _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_2 = _a.sent();\r\n this.handleDatabaseAccessError(e_2);\r\n return [3 /*break*/, 4];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Removes the item matching the key from the in-memory cache, then tries to remove it from the asynchronous storage object.\r\n * @param key\r\n */\r\n AsyncMemoryStorage.prototype.removeItem = function (key) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var e_3;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n this.inMemoryCache.removeItem(key);\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.indexedDBCache.removeItem(key)];\r\n case 2:\r\n _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_3 = _a.sent();\r\n this.handleDatabaseAccessError(e_3);\r\n return [3 /*break*/, 4];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Get all the keys from the in-memory cache as an iterable array of strings. If no keys are found, query the keys in the\r\n * asynchronous storage object.\r\n */\r\n AsyncMemoryStorage.prototype.getKeys = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var cacheKeys, e_4;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n cacheKeys = this.inMemoryCache.getKeys();\r\n if (!(cacheKeys.length === 0)) return [3 /*break*/, 4];\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n this.logger.verbose(\"In-memory cache is empty, now querying persistent storage.\");\r\n return [4 /*yield*/, this.indexedDBCache.getKeys()];\r\n case 2: return [2 /*return*/, _a.sent()];\r\n case 3:\r\n e_4 = _a.sent();\r\n this.handleDatabaseAccessError(e_4);\r\n return [3 /*break*/, 4];\r\n case 4: return [2 /*return*/, cacheKeys];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Returns true or false if the given key is present in the cache.\r\n * @param key\r\n */\r\n AsyncMemoryStorage.prototype.containsKey = function (key) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var containsKey, e_5;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n containsKey = this.inMemoryCache.containsKey(key);\r\n if (!!containsKey) return [3 /*break*/, 4];\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n this.logger.verbose(\"Key not found in in-memory cache, now querying persistent storage.\");\r\n return [4 /*yield*/, this.indexedDBCache.containsKey(key)];\r\n case 2: return [2 /*return*/, _a.sent()];\r\n case 3:\r\n e_5 = _a.sent();\r\n this.handleDatabaseAccessError(e_5);\r\n return [3 /*break*/, 4];\r\n case 4: return [2 /*return*/, containsKey];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Clears in-memory Map and tries to delete the IndexedDB database.\r\n */\r\n AsyncMemoryStorage.prototype.clear = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var dbDeleted, e_6;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // InMemory cache is a Map instance, clear is straightforward\r\n this.logger.verbose(\"Deleting in-memory keystore \" + this.storeName);\r\n this.inMemoryCache.clear();\r\n this.logger.verbose(\"In-memory keystore \" + this.storeName + \" deleted\");\r\n this.logger.verbose(\"Deleting persistent keystore \" + this.storeName);\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.indexedDBCache.deleteDatabase()];\r\n case 2:\r\n dbDeleted = _a.sent();\r\n if (dbDeleted) {\r\n this.logger.verbose(\"Persistent keystore \" + this.storeName + \" deleted\");\r\n }\r\n return [2 /*return*/, dbDeleted];\r\n case 3:\r\n e_6 = _a.sent();\r\n this.handleDatabaseAccessError(e_6);\r\n return [2 /*return*/, false];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n return AsyncMemoryStorage;\r\n}());\n\nexport { AsyncMemoryStorage };\n//# sourceMappingURL=AsyncMemoryStorage.js.map\n","/*! @azure/msal-browser v2.27.0 2022-07-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar MemoryStorage = /** @class */ (function () {\r\n function MemoryStorage() {\r\n this.cache = new Map();\r\n }\r\n MemoryStorage.prototype.getItem = function (key) {\r\n return this.cache.get(key) || null;\r\n };\r\n MemoryStorage.prototype.setItem = function (key, value) {\r\n this.cache.set(key, value);\r\n };\r\n MemoryStorage.prototype.removeItem = function (key) {\r\n this.cache.delete(key);\r\n };\r\n MemoryStorage.prototype.getKeys = function () {\r\n var cacheKeys = [];\r\n this.cache.forEach(function (value, key) {\r\n cacheKeys.push(key);\r\n });\r\n return cacheKeys;\r\n };\r\n MemoryStorage.prototype.containsKey = function (key) {\r\n return this.cache.has(key);\r\n };\r\n MemoryStorage.prototype.clear = function () {\r\n this.cache.clear();\r\n };\r\n return MemoryStorage;\r\n}());\n\nexport { MemoryStorage };\n//# sourceMappingURL=MemoryStorage.js.map\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","Symbol","iterator","v","op","TypeError","pop","push","__read","o","m","r","ar","error","__spread","concat","BrowserStorage","cacheLocation","validateWindowStorage","windowStorage","window","BrowserConfigurationAuthError","storageSupported","getItem","key","setItem","removeItem","getKeys","keys","containsKey","BrowserCacheManager","_super","clientId","cacheConfig","cryptoImpl","logger","_this","COOKIE_LIFE_MULTIPLIER","internalStorage","MemoryStorage","browserStorage","setupBrowserStorage","temporaryCacheStorage","setupTemporaryCacheStorage","migrateCacheEntries","verbose","idTokenKey","Constants","clientInfoKey","errorKey","errorDescKey","idTokenValue","clientInfoValue","errorValue","errorDescValue","values","keysToMigrate","forEach","cacheKey","index","migrateCacheEntry","newKey","setTemporaryCache","validateAndParseJson","jsonValue","parsedJson","JSON","parse","getAccount","accountKey","account","parsedAccount","AccountEntity","CacheManager","setAccount","trace","generateAccountKey","stringify","getIdTokenCredential","parsedIdToken","IdTokenEntity","setIdTokenCredential","idToken","generateCredentialKey","getAccessTokenCredential","accessTokenKey","parsedAccessToken","AccessTokenEntity","setAccessTokenCredential","accessToken","getRefreshTokenCredential","refreshTokenKey","parsedRefreshToken","RefreshTokenEntity","setRefreshTokenCredential","refreshToken","getAppMetadata","appMetadataKey","parsedMetadata","AppMetadataEntity","setAppMetadata","appMetadata","generateAppMetadataKey","getServerTelemetry","serverTelemetryKey","ServerTelemetryEntity","setServerTelemetry","serverTelemetry","getAuthorityMetadata","AuthorityMetadataEntity","getAuthorityMetadataKeys","allKeys","filter","isAuthorityMetadata","setWrapperMetadata","wrapperSKU","wrapperVersion","getWrapperMetadata","sku","version","setAuthorityMetadata","entity","getActiveAccount","activeAccountIdKey","generateCacheKey","activeAccountId","getAccountInfoByFilter","localAccountId","setActiveAccount","accountFilter","allAccounts","getAllAccounts","accountObj","username","toLowerCase","homeAccountId","tenantId","environment","getAccountInfoByHints","loginHint","sid","matchingAccounts","accountInfo","accountSid","idTokenClaims","ClientAuthError","getThrottlingCache","throttlingCacheKey","parsedThrottlingCache","ThrottlingEntity","setThrottlingCache","throttlingCache","getTemporaryCache","generateKey","storeAuthStateInCookie","itemCookie","getItemCookie","item","setItemCookie","clearItemCookie","clear","_a","removeAllAccounts","removeAppMetadata","indexOf","cookieName","cookieValue","expires","cookieStr","encodeURIComponent","expireTime","getCookieExpirationTime","secureCookies","document","cookie","name","cookieList","split","charAt","substring","decodeURIComponent","clearMsalCookies","cookiePrefix","cookieKey","cookieLifeDays","today","Date","expr","getTime","toUTCString","getCache","setCache","generatedKey","StringUtils","generateAuthorityKey","stateString","stateId","ProtocolUtils","libraryState","id","generateNonceKey","generateStateKey","getCachedAuthority","cachedState","stateCacheKey","state","authorityCacheKey","updateCacheEntries","nonce","authorityInstance","nonceCacheKey","ccsCredential","credential","type","CcsCredential","resetRequestCache","setInteractionInProgress","cleanRequestByState","stateKey","infoPii","cleanRequestByInteractionType","interactionType","stateValue","parsedState","BrowserProtocolUtils","cacheCodeRequest","authCodeRequest","browserCrypto","encodedValue","base64Encode","getCachedRequest","encodedTokenRequest","BrowserAuthError","parsedRequest","base64Decode","authority","cachedAuthority","getCachedNativeRequest","cachedRequest","isInteractionInProgress","matchClientId","getInteractionInProgress","inProgress","getLegacyLoginHint","adalIdTokenString","msalIdTokenString","cachedIdTokenString","cachedIdToken","claims","preferred_username","upn","updateCredentialCacheKey","currentCacheKey","updatedCacheKey","cacheItem","credentialType","DEFAULT_BROWSER_CACHE_MANAGER","cacheOptions","TokenCache","configuration","storage","cryptoObj","isBrowserEnvironment","config","loadExternalTokens","request","response","options","info","id_token","loadIdToken","loadAccessToken","authorityUrl","Authority","azureCloudOptions","authorityOptions","protocolMode","auth","knownAuthorities","cloudDiscoveryMetadata","authorityMetadata","skipAuthorityMetadataCache","system","networkClient","clientInfo","hostnameAndPort","tenant","client_info","idTokenEntity","idAuthToken","AuthToken","accountEntity","undefined","access_token","expires_in","extendedExpiresOn","scopes","ScopeSet","printScopes","expiresOn","accessTokenEntity","ClientApplication","initialized","Logger","loggerOptions","navigationClient","redirectResponse","Map","hybridAuthCodeResponses","performanceClient","BrowserPerformanceClient","telemetry","application","StubPerformanceClient","CryptoOps","eventHandler","EventHandler","cache","tokenCache","initialize","e_1","_b","emitEvent","EventType","allowNativeBroker","NativeMessageHandler","nativeBrokerHandshakeTimeout","nativeExtensionProvider","handleRedirectPromise","hash","loggedInAccounts","redirectResponseKey","nativeClient","correlationId","redirectClient","BrowserUtils","get","NativeInteractionClient","accountId","createRedirectClient","isLoggingIn","catch","set","acquireTokenRedirect","isLoggedIn","getRequestCorrelationId","preflightBrowserEnvironmentCheck","canUseNative","getNativeAccountId","NativeAuthError","isFatal","acquireToken","InteractionRequiredAuthError","acquireTokenPopup","atPopupMeasurement","startMeasurement","PerformanceEvent","acquireTokenNative","endMeasurement","success","isNativeBroker","flushMeasurement","popupClient","createPopupClient","errorCode","subErrorCode","subError","ssoSilent","validRequest","ssoSilentMeasurement","silentIframeClient","prompt","createSilentIframeClient","fromNativeBroker","acquireTokenByCode","atbcMeasurement","hybridAuthCode_1","code","discardMeasurement","acquireTokenByCodeAsync","delete","nativeAccountId","AuthError","silentAuthCodeClient","silentTokenResult","createSilentAuthCodeClient","acquireTokenByRefreshToken","atbrtMeasurement","silentRefreshClient","createSilentRefreshClient","fromCache","isServerError","ServerError","isInteractionRequiredError","isInvalidGrantError","BrowserConstants","logout","logoutRequest","warning","logoutRedirect","logoutPopup","getAccountByUsername","userName","verbosePii","getAccountByHomeId","getAccountByLocalId","allowRedirectInIframe","preflightInteractiveRequest","apiId","authenticationScheme","PopupClient","RedirectClient","SilentIframeClient","createSilentCacheClient","SilentCacheClient","SilentRefreshClient","SilentAuthCodeClient","addEventCallback","callback","removeEventCallback","callbackId","addPerformanceCallback","removePerformanceCallback","enableAccountStorageEvents","disableAccountStorageEvents","getTokenCache","getLogger","setLogger","initializeWrapperLibrary","setNavigationClient","getConfiguration","createNewGuid","PublicClientApplication","activeSilentTokenRequests","loginRedirect","loginPopup","acquireTokenSilent","atsMeasurement","thumbprint","silentRequestKey","cachedResponse","homeAccountIdentifier","resourceRequestMethod","resourceRequestUri","shrClaims","sshKid","acquireTokenSilentAsync","astsAsyncMeasurement","silentRequest","silentCacheClient","silentRequest_1","initializeSilentRequest","tokenRenewalError","handshakeTimeoutMs","extensionId","resolvers","handshakeResolvers","responseId","messageChannel","MessageChannel","windowListener","onWindowMessage","bind","sendMessage","req","channel","tracePii","port1","postMessage","createProvider","preferredProvider","backupProvider","sendHandshakeRequest","addEventListener","method","onmessage","event","onChannelMessage","origin","port2","timeoutId","setTimeout","removeEventListener","close","source","data","clearTimeout","handshakeResolver","resolver","status","description","ext","err","errorPii","toString","isNativeAvailable","DatabaseStorage","dbName","tableName","dbOpen","open","openDB","indexedDB","target","createObjectStore","db","closeConnection","validateDbIsOpen","transaction","objectStore","dbGet","payload","dbPut","put","dbDelete","dbGetKeys","getAllKeys","dbContainsKey","count","deleteDatabase","existingDatabases","database","databases","find","deleteDbRequest","AsyncMemoryStorage","storeName","inMemoryCache","indexedDBCache","handleDatabaseAccessError","e_2","e_3","cacheKeys","e_4","e_5","dbDeleted","e_6","has"],"sourceRoot":""}