{"version":3,"sources":["webpack:///./node_modules/@azure/msal-common/dist/url/UrlString.js","webpack:///./node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js","webpack:///./node_modules/@azure/msal-common/dist/request/ScopeSet.js","webpack:///./node_modules/@azure/msal-common/dist/utils/Constants.js","webpack:///./node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js","webpack:///./node_modules/@azure/msal-common/dist/packageMetadata.js","webpack:///./node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js","webpack:///./node_modules/@azure/msal-common/dist/network/NetworkManager.js","webpack:///./node_modules/@azure/msal-common/dist/logger/Logger.js","webpack:///./node_modules/@azure/msal-common/dist/response/ResponseHandler.js","webpack:///./node_modules/@azure/msal-common/dist/utils/StringUtils.js","webpack:///./node_modules/@azure/msal-common/dist/network/INetworkModule.js","webpack:///./node_modules/@azure/msal-common/dist/request/RequestValidator.js","webpack:///./node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js","webpack:///./node_modules/@azure/msal-common/dist/utils/TimeUtils.js"],"names":["UrlString","url","this","_urlString","isEmpty","createUrlEmptyError","getHash","canonicalizeUri","Object","defineProperty","prototype","get","enumerable","configurable","lowerCaseUrl","toLowerCase","endsWith","slice","validateAsUri","components","getUrlComponents","e","createUrlParseError","HostNameAndPort","PathSegments","urlString","Protocol","createInsecureAuthorityUriError","appendQueryString","queryString","indexOf","removeHashFromUrl","split","replaceTenantPath","tenantId","urlObject","pathArray","length","COMMON","ORGANIZATIONS","constructAuthorityUriFromObject","parseHash","regEx","RegExp","match","urlComponents","AbsolutePath","QueryString","pathSegments","filter","val","substring","getDomainFromUrl","getAbsoluteUrl","relativeUrl","baseUrl","FORWARD_SLASH","baseComponents","hashString","hashIndex1","hashIndex2","join","getDeserializedHash","hash","parsedHash","deserializedHash","queryStringToObject","createHashNotDeserializedError","JSON","stringify","hashContainsKnownProperties","parameters","code","error_description","error","state","ProtocolUtils","setRequestState","cryptoObj","userState","meta","libraryState","generateLibraryState","RESOURCE_DELIM","createNoCryptoObjectError","stateObj","id","createNewGuid","stateString","base64Encode","parseRequestState","createInvalidStateError","splitState","libraryStateString","base64Decode","libraryStateObj","parse","userRequestState","ScopeSet","inputScopes","_this","scopeArr","trimArrayEntries","filteredInput","removeEmptyStringsFromArray","validateInputScopes","scopes","Set","forEach","scope","add","fromString","inputScopeString","scopeString","createEmptyScopesArrayError","containsScope","lowerCaseScopes","printScopesLowerCase","lowerCaseScopesSet","has","containsScopeSet","scopeSet","size","asArray","every","containsOnlyOIDCScopes","defaultScopeCount","defaultScope","appendScope","newScope","trim","appendScopes","newScopes","createAppendScopeSetError","removeScope","createRemoveEmptyScopeFromSetError","delete","removeOIDCScopes","unionScopeSets","otherScopes","createEmptyInputScopeSetError","unionScopes","intersectingScopeSets","sizeOtherScopes","getScopeCount","sizeThisScopes","sizeUnionScopes","array","push","printScopes","HeaderNames","PersistentCacheKeys","AADAuthorityConstants","AADServerParamKeys","ClaimsRequestKeys","Constants","LIBRARY_NAME","SKU","CACHE_PREFIX","DEFAULT_AUTHORITY","DEFAULT_AUTHORITY_HOST","ADFS","AAD_INSTANCE_DISCOVERY_ENDPT","NO_ACCOUNT","CLAIMS","CONSUMER_UTID","OPENID_SCOPE","PROFILE_SCOPE","OFFLINE_ACCESS_SCOPE","EMAIL_SCOPE","CODE_RESPONSE_TYPE","CODE_GRANT_TYPE","RT_GRANT_TYPE","FRAGMENT_RESPONSE_MODE","S256_CODE_CHALLENGE_METHOD","URL_FORM_CONTENT_TYPE","AUTHORIZATION_PENDING","NOT_DEFINED","EMPTY_STRING","IMDS_ENDPOINT","IMDS_VERSION","IMDS_TIMEOUT","AZURE_REGION_AUTO_DISCOVER_FLAG","REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX","KNOWN_PUBLIC_CLOUDS","OIDC_DEFAULT_SCOPES","OIDC_SCOPES","SSOTypes","PromptValue","LOGIN","SELECT_ACCOUNT","CONSENT","NONE","CREATE","ResponseMode","GrantType","CacheAccountType","Separators","CredentialType","CacheSchemaType","CacheType","CodeChallengeMethodValues","PLAIN","S256","AuthorityMetadataSource","APP_METADATA","CLIENT_INFO","THE_FAMILY_ID","AUTHORITY_METADATA_CONSTANTS","CACHE_KEY","REFRESH_TIME_SECONDS","AuthenticationScheme","SERVER_TELEM_CONSTANTS","SCHEMA_VERSION","MAX_CUR_HEADER_BYTES","MAX_LAST_HEADER_BYTES","MAX_CACHED_ERRORS","CATEGORY_SEPARATOR","VALUE_SEPARATOR","OVERFLOW_TRUE","OVERFLOW_FALSE","UNKNOWN_ERROR","PasswordGrantConstants","ResponseCodes","RegionDiscoverySources","RegionDiscoveryOutcomes","CacheOutcome","ThrottlingConstants","DEFAULT_THROTTLE_TIME_SECONDS","DEFAULT_MAX_THROTTLE_TIME_SECONDS","THROTTLING_PREFIX","X_MS_LIB_CAPABILITY_VALUE","Errors","INVALID_GRANT_ERROR","CLIENT_MISMATCH_ERROR","ThrottlingUtils","generateThrottlingStorageKey","thumbprint","preProcess","cacheManager","_a","key","value","getThrottlingCache","throttleTime","Date","now","removeItem","THROTTLING","errorCodes","errorMessage","subError","postProcess","response","checkResponseStatus","checkResponseForRetryAfter","thumbprintValue","calculateThrottleTime","parseInt","headers","RETRY_AFTER","body","error_codes","suberror","setThrottlingCache","status","hasOwnProperty","time","currentSeconds","Math","floor","min","removeThrottle","clientId","request","homeAccountIdentifier","authority","authenticationScheme","resourceRequestMethod","resourceRequestUri","shrClaims","sshJwk","sshKid","name","version","ServerTelemetryManager","telemetryRequest","cacheOutcome","NO_CACHE_HIT","apiId","correlationId","wrapperSKU","wrapperVer","telemetryCacheKey","CACHE_KEY_SEPARATOR","generateCurrentRequestHeaderValue","platformFields","regionDiscoveryFields","getRegionDiscoveryFields","requestWithRegionDiscoveryFields","generateLastRequestHeaderValue","lastRequests","getLastRequests","maxErrors","maxErrorsToSend","failedRequests","errors","errorCount","overflow","cacheHits","cacheFailedRequest","shift","errorCode","toString","setServerTelemetry","incrementCacheHits","initialValue","getServerTelemetry","clearTelemetryCache","numErrorsFlushed","serverTelemEntity","serverTelemetryEntity","i","dataSize","regionUsed","regionSource","regionOutcome","updateRegionDiscoveryMetadata","regionDiscoveryMetadata","region_used","region_source","region_outcome","setCacheOutcome","NetworkManager","networkClient","sendPostRequest","tokenEndpoint","options","e_1","label","trys","sendPostRequestAsync","sent","createNetworkError","LogLevel","Logger","loggerOptions","packageName","packageVersion","level","Info","defaultLoggerCallback","localCallback","loggerCallback","piiLoggingEnabled","logLevel","clone","logMessage","containsPii","logHeader","timestamp","toUTCString","log","executeCallback","message","Error","errorPii","warning","Warning","warningPii","info","infoPii","verbose","Verbose","verbosePii","trace","Trace","tracePii","isPiiLoggingEnabled","ResponseHandler","cacheStorage","logger","serializableCache","persistencePlugin","validateServerAuthorizationCodeResponse","serverResponseHash","cachedState","createStateNotFoundError","decodeURIComponent","createStateMismatchError","isInteractionRequiredError","client_info","validateTokenResponse","serverResponse","errString","correlation_id","trace_id","handleServerTokenResponse","serverTokenResponse","reqTimestamp","authCodePayload","oboAssertion","handlingRefreshTokenResponse","idTokenObj","requestStateObj","cacheRecord","cacheContext","account","id_token","nonce","claims","createNonceMismatchError","generateHomeAccountId","authorityType","key_id","undefined","generateCacheRecord","beforeCacheAccess","generateAccountKey","getAccount","generateAuthenticationResult","saveCacheRecord","afterCacheAccess","requestScopes","cachedIdToken","cachedAccount","env","getPreferredCache","createInvalidCacheEnvironmentError","createIdTokenEntity","tid","generateAccountEntity","cachedAccessToken","access_token","responseScopes","expiresIn","expires_in","extExpiresIn","ext_expires_in","refreshIn","refresh_in","tokenExpirationSeconds","extendedTokenExpirationSeconds","refreshOnSeconds","createAccessTokenEntity","tenant","token_type","cachedRefreshToken","refresh_token","createRefreshTokenEntity","foci","cachedAppMetadata","createAppMetadataEntity","idToken","cloudGraphHostName","cloud_graph_host_name","msGraphhost","msgraph_host","Adfs","createGenericAccount","protocolMode","createClientInfoEmptyError","createAccount","fromTokenCache","requestState","_b","_c","accessToken","expiresOn","extExpiresOn","familyId","popTokenGenerator","uid","_d","tokenType","POP","signPopToken","secret","target","Number","extendedExpiresOn","appMetadata","oid","sub","canonicalAuthority","uniqueId","getAccountInfo","rawToken","idTokenClaims","fromCache","msGraphHost","StringUtils","decodeAuthToken","authToken","createTokenNullOrEmptyError","tokenPartsRegex","matches","exec","createTokenParsingError","crackedToken","header","JWSPayload","JWSSig","str","isEmptyObj","strObj","obj","keys","startsWith","search","lastIndexOf","query","params","decode","s","replace","pair","arr","map","entry","jsonParseHelper","matchPattern","pattern","input","regex","test","StubbedNetworkModule","sendGetRequestAsync","notImplErr","Promise","reject","createUnexpectedError","RequestValidator","validateRedirectUri","redirectUri","ClientConfigurationError","createRedirectUriEmptyError","validatePrompt","prompt","promptValues","createInvalidPromptError","validateClaims","createInvalidClaimsRequestError","validateCodeChallengeParams","codeChallenge","codeChallengeMethod","createInvalidCodeChallengeParamsError","validateCodeChallengeMethod","createInvalidCodeChallengeMethodError","sanitizeEQParams","eQParams","queryParams","RequestParameterBuilder","Map","addResponseTypeCode","set","RESPONSE_TYPE","encodeURIComponent","addResponseMode","responseMode","RESPONSE_MODE","QUERY","addScopes","addOidcScopes","SCOPE","addClientId","CLIENT_ID","addRedirectUri","REDIRECT_URI","addPostLogoutRedirectUri","POST_LOGOUT_URI","addIdTokenHint","idTokenHint","ID_TOKEN_HINT","addDomainHint","domainHint","DOMAIN_HINT","addLoginHint","loginHint","LOGIN_HINT","addCcsUpn","CCS_HEADER","addCcsOid","clientInfo","utid","addSid","sid","SID","addClaims","clientCapabilities","mergedClaims","addClientCapabilitiesToClaims","addCorrelationId","CLIENT_REQUEST_ID","addLibraryInfo","libraryInfo","X_CLIENT_SKU","sku","X_CLIENT_VER","X_CLIENT_OS","os","X_CLIENT_CPU","cpu","addPrompt","PROMPT","addState","STATE","addNonce","NONCE","addCodeChallengeParams","CODE_CHALLENGE","CODE_CHALLENGE_METHOD","addAuthorizationCode","CODE","addDeviceCode","DEVICE_CODE","addRefreshToken","refreshToken","REFRESH_TOKEN","addCodeVerifier","codeVerifier","CODE_VERIFIER","addClientSecret","clientSecret","CLIENT_SECRET","addClientAssertion","clientAssertion","CLIENT_ASSERTION","addClientAssertionType","clientAssertionType","CLIENT_ASSERTION_TYPE","addOboAssertion","OBO_ASSERTION","addRequestTokenUse","tokenUse","REQUESTED_TOKEN_USE","addGrantType","grantType","GRANT_TYPE","addClientInfo","addExtraQueryParameters","eQparams","ACCESS_TOKEN","XMS_CC","values","addUsername","username","addPassword","password","addPopToken","cnfString","TOKEN_TYPE","REQ_CNF","addSshJwk","sshJwkString","SSH","addServerTelemetry","serverTelemetryManager","X_CLIENT_CURR_TELEM","X_CLIENT_LAST_TELEM","addThrottling","X_MS_LIB_CAPABILITY","createQueryString","queryParameterArray","Array","TimeUtils","nowSeconds","round","getTime","isTokenExpired","offset","expirationSec","offsetCurrentTimeSec","wasClockTurnedBack","cachedAt","cachedAtSec","delay","t","resolve","setTimeout"],"mappings":"0HAAA,sFAcIA,EAA2B,WAC3B,SAASA,EAAUC,GAEf,GADAC,KAAKC,WAAaF,EACd,OAAYG,QAAQF,KAAKC,YAEzB,MAAM,OAAyBE,sBAE/B,OAAYD,QAAQF,KAAKI,aACzBJ,KAAKC,WAAaH,EAAUO,gBAAgBN,IAqLpD,OAlLAO,OAAOC,eAAeT,EAAUU,UAAW,YAAa,CACpDC,IAAK,WACD,OAAOT,KAAKC,YAEhBS,YAAY,EACZC,cAAc,IAMlBb,EAAUO,gBAAkB,SAAUN,GAClC,GAAIA,EAAK,CACL,IAAIa,EAAeb,EAAIc,cAUvB,OATI,OAAYC,SAASF,EAAc,KACnCA,EAAeA,EAAaG,MAAM,GAAI,GAEjC,OAAYD,SAASF,EAAc,QACxCA,EAAeA,EAAaG,MAAM,GAAI,IAErC,OAAYD,SAASF,EAAc,OACpCA,GAAgB,KAEbA,EAEX,OAAOb,GAKXD,EAAUU,UAAUQ,cAAgB,WAEhC,IAAIC,EACJ,IACIA,EAAajB,KAAKkB,mBAEt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,WAAa,WAEnB,OAAO7Y,KAAK8Y,OAAM,IAAIta,MAAOua,UAAY,MAM7CH,EAAUI,eAAiB,SAAUzM,EAAW0M,GAE5C,IAAIC,EAAgBhM,OAAOX,IAAc,EACrC4M,EAAuBP,EAAUC,aAAeI,EAEpD,OAAQE,EAAuBD,GAQnCN,EAAUQ,mBAAqB,SAAUC,GACrC,IAAIC,EAAcpM,OAAOmM,GACzB,OAAOC,EAAcV,EAAUC,cAOnCD,EAAUW,MAAQ,SAAUC,EAAGnb,GAC3B,OAAO,IAAI+R,SAAQ,SAAUqJ,GAAW,OAAOC,YAAW,WAAc,OAAOD,EAAQpb,KAAWmb,OAE/FZ,EAvCmB","file":"js/chunk-vendors~8a5f784e.eec9db92.js","sourcesContent":["/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { ClientConfigurationError } from '../error/ClientConfigurationError.js';\nimport { ClientAuthError } from '../error/ClientAuthError.js';\nimport { StringUtils } from '../utils/StringUtils.js';\nimport { AADAuthorityConstants, Constants } from '../utils/Constants.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 * Url object class which can perform various transformations on url strings.\r\n */\r\nvar UrlString = /** @class */ (function () {\r\n function UrlString(url) {\r\n this._urlString = url;\r\n if (StringUtils.isEmpty(this._urlString)) {\r\n // Throws error if url is empty\r\n throw ClientConfigurationError.createUrlEmptyError();\r\n }\r\n if (StringUtils.isEmpty(this.getHash())) {\r\n this._urlString = UrlString.canonicalizeUri(url);\r\n }\r\n }\r\n Object.defineProperty(UrlString.prototype, \"urlString\", {\r\n get: function () {\r\n return this._urlString;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /**\r\n * Ensure urls are lower case and end with a / character.\r\n * @param url\r\n */\r\n UrlString.canonicalizeUri = function (url) {\r\n if (url) {\r\n var lowerCaseUrl = url.toLowerCase();\r\n if (StringUtils.endsWith(lowerCaseUrl, \"?\")) {\r\n lowerCaseUrl = lowerCaseUrl.slice(0, -1);\r\n }\r\n else if (StringUtils.endsWith(lowerCaseUrl, \"?/\")) {\r\n lowerCaseUrl = lowerCaseUrl.slice(0, -2);\r\n }\r\n if (!StringUtils.endsWith(lowerCaseUrl, \"/\")) {\r\n lowerCaseUrl += \"/\";\r\n }\r\n return lowerCaseUrl;\r\n }\r\n return url;\r\n };\r\n /**\r\n * Throws if urlString passed is not a valid authority URI string.\r\n */\r\n UrlString.prototype.validateAsUri = function () {\r\n // Attempts to parse url for uri components\r\n var components;\r\n try {\r\n components = this.getUrlComponents();\r\n }\r\n catch (e) {\r\n throw ClientConfigurationError.createUrlParseError(e);\r\n }\r\n // Throw error if URI or path segments are not parseable.\r\n if (!components.HostNameAndPort || !components.PathSegments) {\r\n throw ClientConfigurationError.createUrlParseError(\"Given url string: \" + this.urlString);\r\n }\r\n // Throw error if uri is insecure.\r\n if (!components.Protocol || components.Protocol.toLowerCase() !== \"https:\") {\r\n throw ClientConfigurationError.createInsecureAuthorityUriError(this.urlString);\r\n }\r\n };\r\n /**\r\n * Given a url and a query string return the url with provided query string appended\r\n * @param url\r\n * @param queryString\r\n */\r\n UrlString.appendQueryString = function (url, queryString) {\r\n if (StringUtils.isEmpty(queryString)) {\r\n return url;\r\n }\r\n return url.indexOf(\"?\") < 0 ? url + \"?\" + queryString : url + \"&\" + queryString;\r\n };\r\n /**\r\n * Returns a url with the hash removed\r\n * @param url\r\n */\r\n UrlString.removeHashFromUrl = function (url) {\r\n return UrlString.canonicalizeUri(url.split(\"#\")[0]);\r\n };\r\n /**\r\n * Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d\r\n * @param href The url\r\n * @param tenantId The tenant id to replace\r\n */\r\n UrlString.prototype.replaceTenantPath = function (tenantId) {\r\n var urlObject = this.getUrlComponents();\r\n var pathArray = urlObject.PathSegments;\r\n if (tenantId && (pathArray.length !== 0 && (pathArray[0] === AADAuthorityConstants.COMMON || pathArray[0] === AADAuthorityConstants.ORGANIZATIONS))) {\r\n pathArray[0] = tenantId;\r\n }\r\n return UrlString.constructAuthorityUriFromObject(urlObject);\r\n };\r\n /**\r\n * Returns the anchor part(#) of the URL\r\n */\r\n UrlString.prototype.getHash = function () {\r\n return UrlString.parseHash(this.urlString);\r\n };\r\n /**\r\n * Parses out the components from a url string.\r\n * @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url.\r\n */\r\n UrlString.prototype.getUrlComponents = function () {\r\n // https://gist.github.com/curtisz/11139b2cfcaef4a261e0\r\n var regEx = RegExp(\"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\");\r\n // If url string does not match regEx, we throw an error\r\n var match = this.urlString.match(regEx);\r\n if (!match) {\r\n throw ClientConfigurationError.createUrlParseError(\"Given url string: \" + this.urlString);\r\n }\r\n // Url component object\r\n var urlComponents = {\r\n Protocol: match[1],\r\n HostNameAndPort: match[4],\r\n AbsolutePath: match[5],\r\n QueryString: match[7]\r\n };\r\n var pathSegments = urlComponents.AbsolutePath.split(\"/\");\r\n pathSegments = pathSegments.filter(function (val) { return val && val.length > 0; }); // remove empty elements\r\n urlComponents.PathSegments = pathSegments;\r\n if (!StringUtils.isEmpty(urlComponents.QueryString) && urlComponents.QueryString.endsWith(\"/\")) {\r\n urlComponents.QueryString = urlComponents.QueryString.substring(0, urlComponents.QueryString.length - 1);\r\n }\r\n return urlComponents;\r\n };\r\n UrlString.getDomainFromUrl = function (url) {\r\n var regEx = RegExp(\"^([^:/?#]+://)?([^/?#]*)\");\r\n var match = url.match(regEx);\r\n if (!match) {\r\n throw ClientConfigurationError.createUrlParseError(\"Given url string: \" + url);\r\n }\r\n return match[2];\r\n };\r\n UrlString.getAbsoluteUrl = function (relativeUrl, baseUrl) {\r\n if (relativeUrl[0] === Constants.FORWARD_SLASH) {\r\n var url = new UrlString(baseUrl);\r\n var baseComponents = url.getUrlComponents();\r\n return baseComponents.Protocol + \"//\" + baseComponents.HostNameAndPort + relativeUrl;\r\n }\r\n return relativeUrl;\r\n };\r\n /**\r\n * Parses hash string from given string. Returns empty string if no hash symbol is found.\r\n * @param hashString\r\n */\r\n UrlString.parseHash = function (hashString) {\r\n var hashIndex1 = hashString.indexOf(\"#\");\r\n var hashIndex2 = hashString.indexOf(\"#/\");\r\n if (hashIndex2 > -1) {\r\n return hashString.substring(hashIndex2 + 2);\r\n }\r\n else if (hashIndex1 > -1) {\r\n return hashString.substring(hashIndex1 + 1);\r\n }\r\n return \"\";\r\n };\r\n UrlString.constructAuthorityUriFromObject = function (urlObject) {\r\n return new UrlString(urlObject.Protocol + \"//\" + urlObject.HostNameAndPort + \"/\" + urlObject.PathSegments.join(\"/\"));\r\n };\r\n /**\r\n * Returns URL hash as server auth code response object.\r\n */\r\n UrlString.getDeserializedHash = function (hash) {\r\n // Check if given hash is empty\r\n if (StringUtils.isEmpty(hash)) {\r\n return {};\r\n }\r\n // Strip the # symbol if present\r\n var parsedHash = UrlString.parseHash(hash);\r\n // If # symbol was not present, above will return empty string, so give original hash value\r\n var deserializedHash = StringUtils.queryStringToObject(StringUtils.isEmpty(parsedHash) ? hash : parsedHash);\r\n // Check if deserialization didn't work\r\n if (!deserializedHash) {\r\n throw ClientAuthError.createHashNotDeserializedError(JSON.stringify(deserializedHash));\r\n }\r\n return deserializedHash;\r\n };\r\n /**\r\n * Check if the hash of the URL string contains known properties\r\n */\r\n UrlString.hashContainsKnownProperties = function (hash) {\r\n if (StringUtils.isEmpty(hash) || hash.indexOf(\"=\") < 0) {\r\n // Hash doesn't contain key/value pairs\r\n return false;\r\n }\r\n var parameters = UrlString.getDeserializedHash(hash);\r\n return !!(parameters.code ||\r\n parameters.error_description ||\r\n parameters.error ||\r\n parameters.state);\r\n };\r\n return UrlString;\r\n}());\n\nexport { UrlString };\n//# sourceMappingURL=UrlString.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { StringUtils } from './StringUtils.js';\nimport { Constants } from './Constants.js';\nimport { ClientAuthError } from '../error/ClientAuthError.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 * Class which provides helpers for OAuth 2.0 protocol specific values\r\n */\r\nvar ProtocolUtils = /** @class */ (function () {\r\n function ProtocolUtils() {\r\n }\r\n /**\r\n * Appends user state with random guid, or returns random guid.\r\n * @param userState\r\n * @param randomGuid\r\n */\r\n ProtocolUtils.setRequestState = function (cryptoObj, userState, meta) {\r\n var libraryState = ProtocolUtils.generateLibraryState(cryptoObj, meta);\r\n return !StringUtils.isEmpty(userState) ? \"\" + libraryState + Constants.RESOURCE_DELIM + userState : libraryState;\r\n };\r\n /**\r\n * Generates the state value used by the common library.\r\n * @param randomGuid\r\n * @param cryptoObj\r\n */\r\n ProtocolUtils.generateLibraryState = function (cryptoObj, meta) {\r\n if (!cryptoObj) {\r\n throw ClientAuthError.createNoCryptoObjectError(\"generateLibraryState\");\r\n }\r\n // Create a state object containing a unique id and the timestamp of the request creation\r\n var stateObj = {\r\n id: cryptoObj.createNewGuid()\r\n };\r\n if (meta) {\r\n stateObj.meta = meta;\r\n }\r\n var stateString = JSON.stringify(stateObj);\r\n return cryptoObj.base64Encode(stateString);\r\n };\r\n /**\r\n * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.\r\n * @param state\r\n * @param cryptoObj\r\n */\r\n ProtocolUtils.parseRequestState = function (cryptoObj, state) {\r\n if (!cryptoObj) {\r\n throw ClientAuthError.createNoCryptoObjectError(\"parseRequestState\");\r\n }\r\n if (StringUtils.isEmpty(state)) {\r\n throw ClientAuthError.createInvalidStateError(state, \"Null, undefined or empty state\");\r\n }\r\n try {\r\n // Split the state between library state and user passed state and decode them separately\r\n var splitState = state.split(Constants.RESOURCE_DELIM);\r\n var libraryState = splitState[0];\r\n var userState = splitState.length > 1 ? splitState.slice(1).join(Constants.RESOURCE_DELIM) : \"\";\r\n var libraryStateString = cryptoObj.base64Decode(libraryState);\r\n var libraryStateObj = JSON.parse(libraryStateString);\r\n return {\r\n userRequestState: !StringUtils.isEmpty(userState) ? userState : \"\",\r\n libraryState: libraryStateObj\r\n };\r\n }\r\n catch (e) {\r\n throw ClientAuthError.createInvalidStateError(state, e);\r\n }\r\n };\r\n return ProtocolUtils;\r\n}());\n\nexport { ProtocolUtils };\n//# sourceMappingURL=ProtocolUtils.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { __spreadArrays } from '../_virtual/_tslib.js';\nimport { ClientConfigurationError } from '../error/ClientConfigurationError.js';\nimport { StringUtils } from '../utils/StringUtils.js';\nimport { ClientAuthError } from '../error/ClientAuthError.js';\nimport { OIDC_SCOPES } from '../utils/Constants.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 ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes\r\n * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions\r\n * to ensure uniqueness of strings.\r\n */\r\nvar ScopeSet = /** @class */ (function () {\r\n function ScopeSet(inputScopes) {\r\n var _this = this;\r\n // Filter empty string and null/undefined array items\r\n var scopeArr = inputScopes ? StringUtils.trimArrayEntries(__spreadArrays(inputScopes)) : [];\r\n var filteredInput = scopeArr ? StringUtils.removeEmptyStringsFromArray(scopeArr) : [];\r\n // Validate and filter scopes (validate function throws if validation fails)\r\n this.validateInputScopes(filteredInput);\r\n this.scopes = new Set(); // Iterator in constructor not supported by IE11\r\n filteredInput.forEach(function (scope) { return _this.scopes.add(scope); });\r\n }\r\n /**\r\n * Factory method to create ScopeSet from space-delimited string\r\n * @param inputScopeString\r\n * @param appClientId\r\n * @param scopesRequired\r\n */\r\n ScopeSet.fromString = function (inputScopeString) {\r\n var scopeString = inputScopeString || \"\";\r\n var inputScopes = scopeString.split(\" \");\r\n return new ScopeSet(inputScopes);\r\n };\r\n /**\r\n * Used to validate the scopes input parameter requested by the developer.\r\n * @param {Array} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned.\r\n * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not\r\n */\r\n ScopeSet.prototype.validateInputScopes = function (inputScopes) {\r\n // Check if scopes are required but not given or is an empty array\r\n if (!inputScopes || inputScopes.length < 1) {\r\n throw ClientConfigurationError.createEmptyScopesArrayError();\r\n }\r\n };\r\n /**\r\n * Check if a given scope is present in this set of scopes.\r\n * @param scope\r\n */\r\n ScopeSet.prototype.containsScope = function (scope) {\r\n var lowerCaseScopes = this.printScopesLowerCase().split(\" \");\r\n var lowerCaseScopesSet = new ScopeSet(lowerCaseScopes);\r\n // compare lowercase scopes\r\n return !StringUtils.isEmpty(scope) ? lowerCaseScopesSet.scopes.has(scope.toLowerCase()) : false;\r\n };\r\n /**\r\n * Check if a set of scopes is present in this set of scopes.\r\n * @param scopeSet\r\n */\r\n ScopeSet.prototype.containsScopeSet = function (scopeSet) {\r\n var _this = this;\r\n if (!scopeSet || scopeSet.scopes.size <= 0) {\r\n return false;\r\n }\r\n return (this.scopes.size >= scopeSet.scopes.size && scopeSet.asArray().every(function (scope) { return _this.containsScope(scope); }));\r\n };\r\n /**\r\n * Check if set of scopes contains only the defaults\r\n */\r\n ScopeSet.prototype.containsOnlyOIDCScopes = function () {\r\n var _this = this;\r\n var defaultScopeCount = 0;\r\n OIDC_SCOPES.forEach(function (defaultScope) {\r\n if (_this.containsScope(defaultScope)) {\r\n defaultScopeCount += 1;\r\n }\r\n });\r\n return this.scopes.size === defaultScopeCount;\r\n };\r\n /**\r\n * Appends single scope if passed\r\n * @param newScope\r\n */\r\n ScopeSet.prototype.appendScope = function (newScope) {\r\n if (!StringUtils.isEmpty(newScope)) {\r\n this.scopes.add(newScope.trim());\r\n }\r\n };\r\n /**\r\n * Appends multiple scopes if passed\r\n * @param newScopes\r\n */\r\n ScopeSet.prototype.appendScopes = function (newScopes) {\r\n var _this = this;\r\n try {\r\n newScopes.forEach(function (newScope) { return _this.appendScope(newScope); });\r\n }\r\n catch (e) {\r\n throw ClientAuthError.createAppendScopeSetError(e);\r\n }\r\n };\r\n /**\r\n * Removes element from set of scopes.\r\n * @param scope\r\n */\r\n ScopeSet.prototype.removeScope = function (scope) {\r\n if (StringUtils.isEmpty(scope)) {\r\n throw ClientAuthError.createRemoveEmptyScopeFromSetError(scope);\r\n }\r\n this.scopes.delete(scope.trim());\r\n };\r\n /**\r\n * Removes default scopes from set of scopes\r\n * Primarily used to prevent cache misses if the default scopes are not returned from the server\r\n */\r\n ScopeSet.prototype.removeOIDCScopes = function () {\r\n var _this = this;\r\n OIDC_SCOPES.forEach(function (defaultScope) {\r\n _this.scopes.delete(defaultScope);\r\n });\r\n };\r\n /**\r\n * Combines an array of scopes with the current set of scopes.\r\n * @param otherScopes\r\n */\r\n ScopeSet.prototype.unionScopeSets = function (otherScopes) {\r\n if (!otherScopes) {\r\n throw ClientAuthError.createEmptyInputScopeSetError();\r\n }\r\n var unionScopes = new Set(); // Iterator in constructor not supported in IE11\r\n otherScopes.scopes.forEach(function (scope) { return unionScopes.add(scope.toLowerCase()); });\r\n this.scopes.forEach(function (scope) { return unionScopes.add(scope.toLowerCase()); });\r\n return unionScopes;\r\n };\r\n /**\r\n * Check if scopes intersect between this set and another.\r\n * @param otherScopes\r\n */\r\n ScopeSet.prototype.intersectingScopeSets = function (otherScopes) {\r\n if (!otherScopes) {\r\n throw ClientAuthError.createEmptyInputScopeSetError();\r\n }\r\n // Do not allow OIDC scopes to be the only intersecting scopes\r\n if (!otherScopes.containsOnlyOIDCScopes()) {\r\n otherScopes.removeOIDCScopes();\r\n }\r\n var unionScopes = this.unionScopeSets(otherScopes);\r\n var sizeOtherScopes = otherScopes.getScopeCount();\r\n var sizeThisScopes = this.getScopeCount();\r\n var sizeUnionScopes = unionScopes.size;\r\n return sizeUnionScopes < (sizeThisScopes + sizeOtherScopes);\r\n };\r\n /**\r\n * Returns size of set of scopes.\r\n */\r\n ScopeSet.prototype.getScopeCount = function () {\r\n return this.scopes.size;\r\n };\r\n /**\r\n * Returns the scopes as an array of string values\r\n */\r\n ScopeSet.prototype.asArray = function () {\r\n var array = [];\r\n this.scopes.forEach(function (val) { return array.push(val); });\r\n return array;\r\n };\r\n /**\r\n * Prints scopes into a space-delimited string\r\n */\r\n ScopeSet.prototype.printScopes = function () {\r\n if (this.scopes) {\r\n var scopeArr = this.asArray();\r\n return scopeArr.join(\" \");\r\n }\r\n return \"\";\r\n };\r\n /**\r\n * Prints scopes into a space-delimited lower-case string (used for caching)\r\n */\r\n ScopeSet.prototype.printScopesLowerCase = function () {\r\n return this.printScopes().toLowerCase();\r\n };\r\n return ScopeSet;\r\n}());\n\nexport { ScopeSet };\n//# sourceMappingURL=ScopeSet.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { __spreadArrays } from '../_virtual/_tslib.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar Constants = {\r\n LIBRARY_NAME: \"MSAL.JS\",\r\n SKU: \"msal.js.common\",\r\n // Prefix for all library cache entries\r\n CACHE_PREFIX: \"msal\",\r\n // default authority\r\n DEFAULT_AUTHORITY: \"https://login.microsoftonline.com/common/\",\r\n DEFAULT_AUTHORITY_HOST: \"login.microsoftonline.com\",\r\n // ADFS String\r\n ADFS: \"adfs\",\r\n // Default AAD Instance Discovery Endpoint\r\n AAD_INSTANCE_DISCOVERY_ENDPT: \"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=\",\r\n // Resource delimiter - used for certain cache entries\r\n RESOURCE_DELIM: \"|\",\r\n // Placeholder for non-existent account ids/objects\r\n NO_ACCOUNT: \"NO_ACCOUNT\",\r\n // Claims\r\n CLAIMS: \"claims\",\r\n // Consumer UTID\r\n CONSUMER_UTID: \"9188040d-6c67-4c5b-b112-36a304b66dad\",\r\n // Default scopes\r\n OPENID_SCOPE: \"openid\",\r\n PROFILE_SCOPE: \"profile\",\r\n OFFLINE_ACCESS_SCOPE: \"offline_access\",\r\n EMAIL_SCOPE: \"email\",\r\n // Default response type for authorization code flow\r\n CODE_RESPONSE_TYPE: \"code\",\r\n CODE_GRANT_TYPE: \"authorization_code\",\r\n RT_GRANT_TYPE: \"refresh_token\",\r\n FRAGMENT_RESPONSE_MODE: \"fragment\",\r\n S256_CODE_CHALLENGE_METHOD: \"S256\",\r\n URL_FORM_CONTENT_TYPE: \"application/x-www-form-urlencoded;charset=utf-8\",\r\n AUTHORIZATION_PENDING: \"authorization_pending\",\r\n NOT_DEFINED: \"not_defined\",\r\n EMPTY_STRING: \"\",\r\n FORWARD_SLASH: \"/\",\r\n IMDS_ENDPOINT: \"http://169.254.169.254/metadata/instance/compute/location\",\r\n IMDS_VERSION: \"2020-06-01\",\r\n IMDS_TIMEOUT: 2000,\r\n AZURE_REGION_AUTO_DISCOVER_FLAG: \"TryAutoDetect\",\r\n REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: \"login.microsoft.com\",\r\n KNOWN_PUBLIC_CLOUDS: [\"login.microsoftonline.com\", \"login.windows.net\", \"login.microsoft.com\", \"sts.windows.net\"]\r\n};\r\nvar OIDC_DEFAULT_SCOPES = [\r\n Constants.OPENID_SCOPE,\r\n Constants.PROFILE_SCOPE,\r\n Constants.OFFLINE_ACCESS_SCOPE\r\n];\r\nvar OIDC_SCOPES = __spreadArrays(OIDC_DEFAULT_SCOPES, [\r\n Constants.EMAIL_SCOPE\r\n]);\r\n/**\r\n * Request header names\r\n */\r\nvar HeaderNames;\r\n(function (HeaderNames) {\r\n HeaderNames[\"CONTENT_TYPE\"] = \"Content-Type\";\r\n HeaderNames[\"RETRY_AFTER\"] = \"Retry-After\";\r\n HeaderNames[\"CCS_HEADER\"] = \"X-AnchorMailbox\";\r\n HeaderNames[\"WWWAuthenticate\"] = \"WWW-Authenticate\";\r\n HeaderNames[\"AuthenticationInfo\"] = \"Authentication-Info\";\r\n})(HeaderNames || (HeaderNames = {}));\r\n/**\r\n * Persistent cache keys MSAL which stay while user is logged in.\r\n */\r\nvar PersistentCacheKeys;\r\n(function (PersistentCacheKeys) {\r\n PersistentCacheKeys[\"ID_TOKEN\"] = \"idtoken\";\r\n PersistentCacheKeys[\"CLIENT_INFO\"] = \"client.info\";\r\n PersistentCacheKeys[\"ADAL_ID_TOKEN\"] = \"adal.idtoken\";\r\n PersistentCacheKeys[\"ERROR\"] = \"error\";\r\n PersistentCacheKeys[\"ERROR_DESC\"] = \"error.description\";\r\n PersistentCacheKeys[\"ACTIVE_ACCOUNT\"] = \"active-account\";\r\n})(PersistentCacheKeys || (PersistentCacheKeys = {}));\r\n/**\r\n * String constants related to AAD Authority\r\n */\r\nvar AADAuthorityConstants;\r\n(function (AADAuthorityConstants) {\r\n AADAuthorityConstants[\"COMMON\"] = \"common\";\r\n AADAuthorityConstants[\"ORGANIZATIONS\"] = \"organizations\";\r\n AADAuthorityConstants[\"CONSUMERS\"] = \"consumers\";\r\n})(AADAuthorityConstants || (AADAuthorityConstants = {}));\r\n/**\r\n * Keys in the hashParams sent by AAD Server\r\n */\r\nvar AADServerParamKeys;\r\n(function (AADServerParamKeys) {\r\n AADServerParamKeys[\"CLIENT_ID\"] = \"client_id\";\r\n AADServerParamKeys[\"REDIRECT_URI\"] = \"redirect_uri\";\r\n AADServerParamKeys[\"RESPONSE_TYPE\"] = \"response_type\";\r\n AADServerParamKeys[\"RESPONSE_MODE\"] = \"response_mode\";\r\n AADServerParamKeys[\"GRANT_TYPE\"] = \"grant_type\";\r\n AADServerParamKeys[\"CLAIMS\"] = \"claims\";\r\n AADServerParamKeys[\"SCOPE\"] = \"scope\";\r\n AADServerParamKeys[\"ERROR\"] = \"error\";\r\n AADServerParamKeys[\"ERROR_DESCRIPTION\"] = \"error_description\";\r\n AADServerParamKeys[\"ACCESS_TOKEN\"] = \"access_token\";\r\n AADServerParamKeys[\"ID_TOKEN\"] = \"id_token\";\r\n AADServerParamKeys[\"REFRESH_TOKEN\"] = \"refresh_token\";\r\n AADServerParamKeys[\"EXPIRES_IN\"] = \"expires_in\";\r\n AADServerParamKeys[\"STATE\"] = \"state\";\r\n AADServerParamKeys[\"NONCE\"] = \"nonce\";\r\n AADServerParamKeys[\"PROMPT\"] = \"prompt\";\r\n AADServerParamKeys[\"SESSION_STATE\"] = \"session_state\";\r\n AADServerParamKeys[\"CLIENT_INFO\"] = \"client_info\";\r\n AADServerParamKeys[\"CODE\"] = \"code\";\r\n AADServerParamKeys[\"CODE_CHALLENGE\"] = \"code_challenge\";\r\n AADServerParamKeys[\"CODE_CHALLENGE_METHOD\"] = \"code_challenge_method\";\r\n AADServerParamKeys[\"CODE_VERIFIER\"] = \"code_verifier\";\r\n AADServerParamKeys[\"CLIENT_REQUEST_ID\"] = \"client-request-id\";\r\n AADServerParamKeys[\"X_CLIENT_SKU\"] = \"x-client-SKU\";\r\n AADServerParamKeys[\"X_CLIENT_VER\"] = \"x-client-VER\";\r\n AADServerParamKeys[\"X_CLIENT_OS\"] = \"x-client-OS\";\r\n AADServerParamKeys[\"X_CLIENT_CPU\"] = \"x-client-CPU\";\r\n AADServerParamKeys[\"X_CLIENT_CURR_TELEM\"] = \"x-client-current-telemetry\";\r\n AADServerParamKeys[\"X_CLIENT_LAST_TELEM\"] = \"x-client-last-telemetry\";\r\n AADServerParamKeys[\"X_MS_LIB_CAPABILITY\"] = \"x-ms-lib-capability\";\r\n AADServerParamKeys[\"POST_LOGOUT_URI\"] = \"post_logout_redirect_uri\";\r\n AADServerParamKeys[\"ID_TOKEN_HINT\"] = \"id_token_hint\";\r\n AADServerParamKeys[\"DEVICE_CODE\"] = \"device_code\";\r\n AADServerParamKeys[\"CLIENT_SECRET\"] = \"client_secret\";\r\n AADServerParamKeys[\"CLIENT_ASSERTION\"] = \"client_assertion\";\r\n AADServerParamKeys[\"CLIENT_ASSERTION_TYPE\"] = \"client_assertion_type\";\r\n AADServerParamKeys[\"TOKEN_TYPE\"] = \"token_type\";\r\n AADServerParamKeys[\"REQ_CNF\"] = \"req_cnf\";\r\n AADServerParamKeys[\"OBO_ASSERTION\"] = \"assertion\";\r\n AADServerParamKeys[\"REQUESTED_TOKEN_USE\"] = \"requested_token_use\";\r\n AADServerParamKeys[\"ON_BEHALF_OF\"] = \"on_behalf_of\";\r\n AADServerParamKeys[\"FOCI\"] = \"foci\";\r\n AADServerParamKeys[\"CCS_HEADER\"] = \"X-AnchorMailbox\";\r\n})(AADServerParamKeys || (AADServerParamKeys = {}));\r\n/**\r\n * Claims request keys\r\n */\r\nvar ClaimsRequestKeys;\r\n(function (ClaimsRequestKeys) {\r\n ClaimsRequestKeys[\"ACCESS_TOKEN\"] = \"access_token\";\r\n ClaimsRequestKeys[\"XMS_CC\"] = \"xms_cc\";\r\n})(ClaimsRequestKeys || (ClaimsRequestKeys = {}));\r\n/**\r\n * we considered making this \"enum\" in the request instead of string, however it looks like the allowed list of\r\n * prompt values kept changing over past couple of years. There are some undocumented prompt values for some\r\n * internal partners too, hence the choice of generic \"string\" type instead of the \"enum\"\r\n */\r\nvar PromptValue = {\r\n LOGIN: \"login\",\r\n SELECT_ACCOUNT: \"select_account\",\r\n CONSENT: \"consent\",\r\n NONE: \"none\",\r\n CREATE: \"create\"\r\n};\r\n/**\r\n * SSO Types - generated to populate hints\r\n */\r\nvar SSOTypes;\r\n(function (SSOTypes) {\r\n SSOTypes[\"ACCOUNT\"] = \"account\";\r\n SSOTypes[\"SID\"] = \"sid\";\r\n SSOTypes[\"LOGIN_HINT\"] = \"login_hint\";\r\n SSOTypes[\"ID_TOKEN\"] = \"id_token\";\r\n SSOTypes[\"DOMAIN_HINT\"] = \"domain_hint\";\r\n SSOTypes[\"ORGANIZATIONS\"] = \"organizations\";\r\n SSOTypes[\"CONSUMERS\"] = \"consumers\";\r\n SSOTypes[\"ACCOUNT_ID\"] = \"accountIdentifier\";\r\n SSOTypes[\"HOMEACCOUNT_ID\"] = \"homeAccountIdentifier\";\r\n})(SSOTypes || (SSOTypes = {}));\r\n/**\r\n * allowed values for codeVerifier\r\n */\r\nvar CodeChallengeMethodValues = {\r\n PLAIN: \"plain\",\r\n S256: \"S256\"\r\n};\r\n/**\r\n * allowed values for response_mode\r\n */\r\nvar ResponseMode;\r\n(function (ResponseMode) {\r\n ResponseMode[\"QUERY\"] = \"query\";\r\n ResponseMode[\"FRAGMENT\"] = \"fragment\";\r\n ResponseMode[\"FORM_POST\"] = \"form_post\";\r\n})(ResponseMode || (ResponseMode = {}));\r\n/**\r\n * allowed grant_type\r\n */\r\nvar GrantType;\r\n(function (GrantType) {\r\n GrantType[\"IMPLICIT_GRANT\"] = \"implicit\";\r\n GrantType[\"AUTHORIZATION_CODE_GRANT\"] = \"authorization_code\";\r\n GrantType[\"CLIENT_CREDENTIALS_GRANT\"] = \"client_credentials\";\r\n GrantType[\"RESOURCE_OWNER_PASSWORD_GRANT\"] = \"password\";\r\n GrantType[\"REFRESH_TOKEN_GRANT\"] = \"refresh_token\";\r\n GrantType[\"DEVICE_CODE_GRANT\"] = \"device_code\";\r\n GrantType[\"JWT_BEARER\"] = \"urn:ietf:params:oauth:grant-type:jwt-bearer\";\r\n})(GrantType || (GrantType = {}));\r\n/**\r\n * Account types in Cache\r\n */\r\nvar CacheAccountType;\r\n(function (CacheAccountType) {\r\n CacheAccountType[\"MSSTS_ACCOUNT_TYPE\"] = \"MSSTS\";\r\n CacheAccountType[\"ADFS_ACCOUNT_TYPE\"] = \"ADFS\";\r\n CacheAccountType[\"MSAV1_ACCOUNT_TYPE\"] = \"MSA\";\r\n CacheAccountType[\"GENERIC_ACCOUNT_TYPE\"] = \"Generic\"; // NTLM, Kerberos, FBA, Basic etc\r\n})(CacheAccountType || (CacheAccountType = {}));\r\n/**\r\n * Separators used in cache\r\n */\r\nvar Separators;\r\n(function (Separators) {\r\n Separators[\"CACHE_KEY_SEPARATOR\"] = \"-\";\r\n Separators[\"CLIENT_INFO_SEPARATOR\"] = \".\";\r\n})(Separators || (Separators = {}));\r\n/**\r\n * Credential Type stored in the cache\r\n */\r\nvar CredentialType;\r\n(function (CredentialType) {\r\n CredentialType[\"ID_TOKEN\"] = \"IdToken\";\r\n CredentialType[\"ACCESS_TOKEN\"] = \"AccessToken\";\r\n CredentialType[\"ACCESS_TOKEN_WITH_AUTH_SCHEME\"] = \"AccessToken_With_AuthScheme\";\r\n CredentialType[\"REFRESH_TOKEN\"] = \"RefreshToken\";\r\n})(CredentialType || (CredentialType = {}));\r\n/**\r\n * Credential Type stored in the cache\r\n */\r\nvar CacheSchemaType;\r\n(function (CacheSchemaType) {\r\n CacheSchemaType[\"ACCOUNT\"] = \"Account\";\r\n CacheSchemaType[\"CREDENTIAL\"] = \"Credential\";\r\n CacheSchemaType[\"ID_TOKEN\"] = \"IdToken\";\r\n CacheSchemaType[\"ACCESS_TOKEN\"] = \"AccessToken\";\r\n CacheSchemaType[\"REFRESH_TOKEN\"] = \"RefreshToken\";\r\n CacheSchemaType[\"APP_METADATA\"] = \"AppMetadata\";\r\n CacheSchemaType[\"TEMPORARY\"] = \"TempCache\";\r\n CacheSchemaType[\"TELEMETRY\"] = \"Telemetry\";\r\n CacheSchemaType[\"UNDEFINED\"] = \"Undefined\";\r\n CacheSchemaType[\"THROTTLING\"] = \"Throttling\";\r\n})(CacheSchemaType || (CacheSchemaType = {}));\r\n/**\r\n * Combine all cache types\r\n */\r\nvar CacheType;\r\n(function (CacheType) {\r\n CacheType[CacheType[\"ADFS\"] = 1001] = \"ADFS\";\r\n CacheType[CacheType[\"MSA\"] = 1002] = \"MSA\";\r\n CacheType[CacheType[\"MSSTS\"] = 1003] = \"MSSTS\";\r\n CacheType[CacheType[\"GENERIC\"] = 1004] = \"GENERIC\";\r\n CacheType[CacheType[\"ACCESS_TOKEN\"] = 2001] = \"ACCESS_TOKEN\";\r\n CacheType[CacheType[\"REFRESH_TOKEN\"] = 2002] = \"REFRESH_TOKEN\";\r\n CacheType[CacheType[\"ID_TOKEN\"] = 2003] = \"ID_TOKEN\";\r\n CacheType[CacheType[\"APP_METADATA\"] = 3001] = \"APP_METADATA\";\r\n CacheType[CacheType[\"UNDEFINED\"] = 9999] = \"UNDEFINED\";\r\n})(CacheType || (CacheType = {}));\r\n/**\r\n * More Cache related constants\r\n */\r\nvar APP_METADATA = \"appmetadata\";\r\nvar CLIENT_INFO = \"client_info\";\r\nvar THE_FAMILY_ID = \"1\";\r\nvar AUTHORITY_METADATA_CONSTANTS = {\r\n CACHE_KEY: \"authority-metadata\",\r\n REFRESH_TIME_SECONDS: 3600 * 24 // 24 Hours\r\n};\r\nvar AuthorityMetadataSource;\r\n(function (AuthorityMetadataSource) {\r\n AuthorityMetadataSource[\"CONFIG\"] = \"config\";\r\n AuthorityMetadataSource[\"CACHE\"] = \"cache\";\r\n AuthorityMetadataSource[\"NETWORK\"] = \"network\";\r\n})(AuthorityMetadataSource || (AuthorityMetadataSource = {}));\r\nvar SERVER_TELEM_CONSTANTS = {\r\n SCHEMA_VERSION: 5,\r\n MAX_CUR_HEADER_BYTES: 80,\r\n MAX_LAST_HEADER_BYTES: 330,\r\n MAX_CACHED_ERRORS: 50,\r\n CACHE_KEY: \"server-telemetry\",\r\n CATEGORY_SEPARATOR: \"|\",\r\n VALUE_SEPARATOR: \",\",\r\n OVERFLOW_TRUE: \"1\",\r\n OVERFLOW_FALSE: \"0\",\r\n UNKNOWN_ERROR: \"unknown_error\"\r\n};\r\n/**\r\n * Type of the authentication request\r\n */\r\nvar AuthenticationScheme;\r\n(function (AuthenticationScheme) {\r\n AuthenticationScheme[\"BEARER\"] = \"Bearer\";\r\n AuthenticationScheme[\"POP\"] = \"pop\";\r\n AuthenticationScheme[\"SSH\"] = \"ssh-cert\";\r\n})(AuthenticationScheme || (AuthenticationScheme = {}));\r\n/**\r\n * Constants related to throttling\r\n */\r\nvar ThrottlingConstants = {\r\n // Default time to throttle RequestThumbprint in seconds\r\n DEFAULT_THROTTLE_TIME_SECONDS: 60,\r\n // Default maximum time to throttle in seconds, overrides what the server sends back\r\n DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600,\r\n // Prefix for storing throttling entries\r\n THROTTLING_PREFIX: \"throttling\",\r\n // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling\r\n X_MS_LIB_CAPABILITY_VALUE: \"retry-after, h429\"\r\n};\r\nvar Errors = {\r\n INVALID_GRANT_ERROR: \"invalid_grant\",\r\n CLIENT_MISMATCH_ERROR: \"client_mismatch\",\r\n};\r\n/**\r\n * Password grant parameters\r\n */\r\nvar PasswordGrantConstants;\r\n(function (PasswordGrantConstants) {\r\n PasswordGrantConstants[\"username\"] = \"username\";\r\n PasswordGrantConstants[\"password\"] = \"password\";\r\n})(PasswordGrantConstants || (PasswordGrantConstants = {}));\r\n/**\r\n * Response codes\r\n */\r\nvar ResponseCodes;\r\n(function (ResponseCodes) {\r\n ResponseCodes[ResponseCodes[\"httpSuccess\"] = 200] = \"httpSuccess\";\r\n ResponseCodes[ResponseCodes[\"httpBadRequest\"] = 400] = \"httpBadRequest\";\r\n})(ResponseCodes || (ResponseCodes = {}));\r\n/**\r\n * Region Discovery Sources\r\n */\r\nvar RegionDiscoverySources;\r\n(function (RegionDiscoverySources) {\r\n RegionDiscoverySources[\"FAILED_AUTO_DETECTION\"] = \"1\";\r\n RegionDiscoverySources[\"INTERNAL_CACHE\"] = \"2\";\r\n RegionDiscoverySources[\"ENVIRONMENT_VARIABLE\"] = \"3\";\r\n RegionDiscoverySources[\"IMDS\"] = \"4\";\r\n})(RegionDiscoverySources || (RegionDiscoverySources = {}));\r\n/**\r\n * Region Discovery Outcomes\r\n */\r\nvar RegionDiscoveryOutcomes;\r\n(function (RegionDiscoveryOutcomes) {\r\n RegionDiscoveryOutcomes[\"CONFIGURED_MATCHES_DETECTED\"] = \"1\";\r\n RegionDiscoveryOutcomes[\"CONFIGURED_NO_AUTO_DETECTION\"] = \"2\";\r\n RegionDiscoveryOutcomes[\"CONFIGURED_NOT_DETECTED\"] = \"3\";\r\n RegionDiscoveryOutcomes[\"AUTO_DETECTION_REQUESTED_SUCCESSFUL\"] = \"4\";\r\n RegionDiscoveryOutcomes[\"AUTO_DETECTION_REQUESTED_FAILED\"] = \"5\";\r\n})(RegionDiscoveryOutcomes || (RegionDiscoveryOutcomes = {}));\r\nvar CacheOutcome;\r\n(function (CacheOutcome) {\r\n CacheOutcome[\"NO_CACHE_HIT\"] = \"0\";\r\n CacheOutcome[\"FORCE_REFRESH\"] = \"1\";\r\n CacheOutcome[\"NO_CACHED_ACCESS_TOKEN\"] = \"2\";\r\n CacheOutcome[\"CACHED_ACCESS_TOKEN_EXPIRED\"] = \"3\";\r\n CacheOutcome[\"REFRESH_CACHED_ACCESS_TOKEN\"] = \"4\";\r\n})(CacheOutcome || (CacheOutcome = {}));\n\nexport { AADAuthorityConstants, AADServerParamKeys, APP_METADATA, AUTHORITY_METADATA_CONSTANTS, AuthenticationScheme, AuthorityMetadataSource, CLIENT_INFO, CacheAccountType, CacheOutcome, CacheSchemaType, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, Errors, GrantType, HeaderNames, OIDC_DEFAULT_SCOPES, OIDC_SCOPES, PasswordGrantConstants, PersistentCacheKeys, PromptValue, RegionDiscoveryOutcomes, RegionDiscoverySources, ResponseCodes, ResponseMode, SERVER_TELEM_CONSTANTS, SSOTypes, Separators, THE_FAMILY_ID, ThrottlingConstants };\n//# sourceMappingURL=Constants.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { ThrottlingConstants, CacheSchemaType, Constants, HeaderNames } from '../utils/Constants.js';\nimport { ServerError } from '../error/ServerError.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar ThrottlingUtils = /** @class */ (function () {\r\n function ThrottlingUtils() {\r\n }\r\n /**\r\n * Prepares a RequestThumbprint to be stored as a key.\r\n * @param thumbprint\r\n */\r\n ThrottlingUtils.generateThrottlingStorageKey = function (thumbprint) {\r\n return ThrottlingConstants.THROTTLING_PREFIX + \".\" + JSON.stringify(thumbprint);\r\n };\r\n /**\r\n * Performs necessary throttling checks before a network request.\r\n * @param cacheManager\r\n * @param thumbprint\r\n */\r\n ThrottlingUtils.preProcess = function (cacheManager, thumbprint) {\r\n var _a;\r\n var key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint);\r\n var value = cacheManager.getThrottlingCache(key);\r\n if (value) {\r\n if (value.throttleTime < Date.now()) {\r\n cacheManager.removeItem(key, CacheSchemaType.THROTTLING);\r\n return;\r\n }\r\n throw new ServerError(((_a = value.errorCodes) === null || _a === void 0 ? void 0 : _a.join(\" \")) || Constants.EMPTY_STRING, value.errorMessage, value.subError);\r\n }\r\n };\r\n /**\r\n * Performs necessary throttling checks after a network request.\r\n * @param cacheManager\r\n * @param thumbprint\r\n * @param response\r\n */\r\n ThrottlingUtils.postProcess = function (cacheManager, thumbprint, response) {\r\n if (ThrottlingUtils.checkResponseStatus(response) || ThrottlingUtils.checkResponseForRetryAfter(response)) {\r\n var thumbprintValue = {\r\n throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])),\r\n error: response.body.error,\r\n errorCodes: response.body.error_codes,\r\n errorMessage: response.body.error_description,\r\n subError: response.body.suberror\r\n };\r\n cacheManager.setThrottlingCache(ThrottlingUtils.generateThrottlingStorageKey(thumbprint), thumbprintValue);\r\n }\r\n };\r\n /**\r\n * Checks a NetworkResponse object's status codes against 429 or 5xx\r\n * @param response\r\n */\r\n ThrottlingUtils.checkResponseStatus = function (response) {\r\n return response.status === 429 || response.status >= 500 && response.status < 600;\r\n };\r\n /**\r\n * Checks a NetworkResponse object's RetryAfter header\r\n * @param response\r\n */\r\n ThrottlingUtils.checkResponseForRetryAfter = function (response) {\r\n if (response.headers) {\r\n return response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) && (response.status < 200 || response.status >= 300);\r\n }\r\n return false;\r\n };\r\n /**\r\n * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.\r\n * @param throttleTime\r\n */\r\n ThrottlingUtils.calculateThrottleTime = function (throttleTime) {\r\n var time = throttleTime <= 0 ? 0 : throttleTime;\r\n var currentSeconds = Date.now() / 1000;\r\n return Math.floor(Math.min(currentSeconds + (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS), currentSeconds + ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS) * 1000);\r\n };\r\n ThrottlingUtils.removeThrottle = function (cacheManager, clientId, request, homeAccountIdentifier) {\r\n var thumbprint = {\r\n clientId: clientId,\r\n authority: request.authority,\r\n scopes: request.scopes,\r\n homeAccountIdentifier: homeAccountIdentifier,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims,\r\n sshJwk: request.sshJwk,\r\n sshKid: request.sshKid\r\n };\r\n var key = this.generateThrottlingStorageKey(thumbprint);\r\n return cacheManager.removeItem(key, CacheSchemaType.THROTTLING);\r\n };\r\n return ThrottlingUtils;\r\n}());\n\nexport { ThrottlingUtils };\n//# sourceMappingURL=ThrottlingUtils.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\n/* eslint-disable header/header */\r\nvar name = \"@azure/msal-common\";\r\nvar version = \"5.1.0\";\n\nexport { name, version };\n//# sourceMappingURL=packageMetadata.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { SERVER_TELEM_CONSTANTS, CacheOutcome, Constants, Separators } from '../../utils/Constants.js';\nimport { ServerTelemetryEntity } from '../../cache/entities/ServerTelemetryEntity.js';\nimport { StringUtils } from '../../utils/StringUtils.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar ServerTelemetryManager = /** @class */ (function () {\r\n function ServerTelemetryManager(telemetryRequest, cacheManager) {\r\n this.cacheOutcome = CacheOutcome.NO_CACHE_HIT;\r\n this.cacheManager = cacheManager;\r\n this.apiId = telemetryRequest.apiId;\r\n this.correlationId = telemetryRequest.correlationId;\r\n this.wrapperSKU = telemetryRequest.wrapperSKU || Constants.EMPTY_STRING;\r\n this.wrapperVer = telemetryRequest.wrapperVer || Constants.EMPTY_STRING;\r\n this.telemetryCacheKey = SERVER_TELEM_CONSTANTS.CACHE_KEY + Separators.CACHE_KEY_SEPARATOR + telemetryRequest.clientId;\r\n }\r\n /**\r\n * API to add MSER Telemetry to request\r\n */\r\n ServerTelemetryManager.prototype.generateCurrentRequestHeaderValue = function () {\r\n var request = \"\" + this.apiId + SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR + this.cacheOutcome;\r\n var platformFields = [this.wrapperSKU, this.wrapperVer].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n var regionDiscoveryFields = this.getRegionDiscoveryFields();\r\n var requestWithRegionDiscoveryFields = [request, regionDiscoveryFields].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n return [SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, requestWithRegionDiscoveryFields, platformFields].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR);\r\n };\r\n /**\r\n * API to add MSER Telemetry for the last failed request\r\n */\r\n ServerTelemetryManager.prototype.generateLastRequestHeaderValue = function () {\r\n var lastRequests = this.getLastRequests();\r\n var maxErrors = ServerTelemetryManager.maxErrorsToSend(lastRequests);\r\n var failedRequests = lastRequests.failedRequests.slice(0, 2 * maxErrors).join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n var errors = lastRequests.errors.slice(0, maxErrors).join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n var errorCount = lastRequests.errors.length;\r\n // Indicate whether this header contains all data or partial data\r\n var overflow = maxErrors < errorCount ? SERVER_TELEM_CONSTANTS.OVERFLOW_TRUE : SERVER_TELEM_CONSTANTS.OVERFLOW_FALSE;\r\n var platformFields = [errorCount, overflow].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);\r\n return [SERVER_TELEM_CONSTANTS.SCHEMA_VERSION, lastRequests.cacheHits, failedRequests, errors, platformFields].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR);\r\n };\r\n /**\r\n * API to cache token failures for MSER data capture\r\n * @param error\r\n */\r\n ServerTelemetryManager.prototype.cacheFailedRequest = function (error) {\r\n var lastRequests = this.getLastRequests();\r\n if (lastRequests.errors.length >= SERVER_TELEM_CONSTANTS.MAX_CACHED_ERRORS) {\r\n // Remove a cached error to make room, first in first out\r\n lastRequests.failedRequests.shift(); // apiId\r\n lastRequests.failedRequests.shift(); // correlationId\r\n lastRequests.errors.shift();\r\n }\r\n lastRequests.failedRequests.push(this.apiId, this.correlationId);\r\n if (!StringUtils.isEmpty(error.subError)) {\r\n lastRequests.errors.push(error.subError);\r\n }\r\n else if (!StringUtils.isEmpty(error.errorCode)) {\r\n lastRequests.errors.push(error.errorCode);\r\n }\r\n else if (!!error && error.toString()) {\r\n lastRequests.errors.push(error.toString());\r\n }\r\n else {\r\n lastRequests.errors.push(SERVER_TELEM_CONSTANTS.UNKNOWN_ERROR);\r\n }\r\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests);\r\n return;\r\n };\r\n /**\r\n * Update server telemetry cache entry by incrementing cache hit counter\r\n */\r\n ServerTelemetryManager.prototype.incrementCacheHits = function () {\r\n var lastRequests = this.getLastRequests();\r\n lastRequests.cacheHits += 1;\r\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, lastRequests);\r\n return lastRequests.cacheHits;\r\n };\r\n /**\r\n * Get the server telemetry entity from cache or initialize a new one\r\n */\r\n ServerTelemetryManager.prototype.getLastRequests = function () {\r\n var initialValue = new ServerTelemetryEntity();\r\n var lastRequests = this.cacheManager.getServerTelemetry(this.telemetryCacheKey);\r\n return lastRequests || initialValue;\r\n };\r\n /**\r\n * Remove server telemetry cache entry\r\n */\r\n ServerTelemetryManager.prototype.clearTelemetryCache = function () {\r\n var lastRequests = this.getLastRequests();\r\n var numErrorsFlushed = ServerTelemetryManager.maxErrorsToSend(lastRequests);\r\n var errorCount = lastRequests.errors.length;\r\n if (numErrorsFlushed === errorCount) {\r\n // All errors were sent on last request, clear Telemetry cache\r\n this.cacheManager.removeItem(this.telemetryCacheKey);\r\n }\r\n else {\r\n // Partial data was flushed to server, construct a new telemetry cache item with errors that were not flushed\r\n var serverTelemEntity = new ServerTelemetryEntity();\r\n serverTelemEntity.failedRequests = lastRequests.failedRequests.slice(numErrorsFlushed * 2); // failedRequests contains 2 items for each error\r\n serverTelemEntity.errors = lastRequests.errors.slice(numErrorsFlushed);\r\n this.cacheManager.setServerTelemetry(this.telemetryCacheKey, serverTelemEntity);\r\n }\r\n };\r\n /**\r\n * Returns the maximum number of errors that can be flushed to the server in the next network request\r\n * @param serverTelemetryEntity\r\n */\r\n ServerTelemetryManager.maxErrorsToSend = function (serverTelemetryEntity) {\r\n var i;\r\n var maxErrors = 0;\r\n var dataSize = 0;\r\n var errorCount = serverTelemetryEntity.errors.length;\r\n for (i = 0; i < errorCount; i++) {\r\n // failedRequests parameter contains pairs of apiId and correlationId, multiply index by 2 to preserve pairs\r\n var apiId = serverTelemetryEntity.failedRequests[2 * i] || Constants.EMPTY_STRING;\r\n var correlationId = serverTelemetryEntity.failedRequests[2 * i + 1] || Constants.EMPTY_STRING;\r\n var errorCode = serverTelemetryEntity.errors[i] || Constants.EMPTY_STRING;\r\n // Count number of characters that would be added to header, each character is 1 byte. Add 3 at the end to account for separators\r\n dataSize += apiId.toString().length + correlationId.toString().length + errorCode.length + 3;\r\n if (dataSize < SERVER_TELEM_CONSTANTS.MAX_LAST_HEADER_BYTES) {\r\n // Adding this entry to the header would still keep header size below the limit\r\n maxErrors += 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n return maxErrors;\r\n };\r\n /**\r\n * Get the region discovery fields\r\n *\r\n * @returns string\r\n */\r\n ServerTelemetryManager.prototype.getRegionDiscoveryFields = function () {\r\n var regionDiscoveryFields = [];\r\n regionDiscoveryFields.push(this.regionUsed || \"\");\r\n regionDiscoveryFields.push(this.regionSource || \"\");\r\n regionDiscoveryFields.push(this.regionOutcome || \"\");\r\n return regionDiscoveryFields.join(\",\");\r\n };\r\n /**\r\n * Update the region discovery metadata\r\n *\r\n * @param regionDiscoveryMetadata\r\n * @returns void\r\n */\r\n ServerTelemetryManager.prototype.updateRegionDiscoveryMetadata = function (regionDiscoveryMetadata) {\r\n this.regionUsed = regionDiscoveryMetadata.region_used;\r\n this.regionSource = regionDiscoveryMetadata.region_source;\r\n this.regionOutcome = regionDiscoveryMetadata.region_outcome;\r\n };\r\n /**\r\n * Set cache outcome\r\n */\r\n ServerTelemetryManager.prototype.setCacheOutcome = function (cacheOutcome) {\r\n this.cacheOutcome = cacheOutcome;\r\n };\r\n return ServerTelemetryManager;\r\n}());\n\nexport { ServerTelemetryManager };\n//# sourceMappingURL=ServerTelemetryManager.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { __awaiter, __generator } from '../_virtual/_tslib.js';\nimport { ThrottlingUtils } from './ThrottlingUtils.js';\nimport { ClientAuthError } from '../error/ClientAuthError.js';\nimport { AuthError } from '../error/AuthError.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar NetworkManager = /** @class */ (function () {\r\n function NetworkManager(networkClient, cacheManager) {\r\n this.networkClient = networkClient;\r\n this.cacheManager = cacheManager;\r\n }\r\n /**\r\n * Wraps sendPostRequestAsync with necessary preflight and postflight logic\r\n * @param thumbprint\r\n * @param tokenEndpoint\r\n * @param options\r\n */\r\n NetworkManager.prototype.sendPostRequest = function (thumbprint, tokenEndpoint, options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var response, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n ThrottlingUtils.preProcess(this.cacheManager, thumbprint);\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.networkClient.sendPostRequestAsync(tokenEndpoint, options)];\r\n case 2:\r\n response = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_1 = _a.sent();\r\n if (e_1 instanceof AuthError) {\r\n throw e_1;\r\n }\r\n else {\r\n throw ClientAuthError.createNetworkError(tokenEndpoint, e_1);\r\n }\r\n case 4:\r\n ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response);\r\n return [2 /*return*/, response];\r\n }\r\n });\r\n });\r\n };\r\n return NetworkManager;\r\n}());\n\nexport { NetworkManager };\n//# sourceMappingURL=NetworkManager.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { StringUtils } from '../utils/StringUtils.js';\nimport { Constants } from '../utils/Constants.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 * Log message level.\r\n */\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Error\"] = 0] = \"Error\";\r\n LogLevel[LogLevel[\"Warning\"] = 1] = \"Warning\";\r\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\r\n LogLevel[LogLevel[\"Verbose\"] = 3] = \"Verbose\";\r\n LogLevel[LogLevel[\"Trace\"] = 4] = \"Trace\";\r\n})(LogLevel || (LogLevel = {}));\r\n/**\r\n * Class which facilitates logging of messages to a specific place.\r\n */\r\nvar Logger = /** @class */ (function () {\r\n function Logger(loggerOptions, packageName, packageVersion) {\r\n // Current log level, defaults to info.\r\n this.level = LogLevel.Info;\r\n var defaultLoggerCallback = function () {\r\n return;\r\n };\r\n this.localCallback = loggerOptions.loggerCallback || defaultLoggerCallback;\r\n this.piiLoggingEnabled = loggerOptions.piiLoggingEnabled || false;\r\n this.level = typeof (loggerOptions.logLevel) === \"number\" ? loggerOptions.logLevel : LogLevel.Info;\r\n this.correlationId = loggerOptions.correlationId || \"\";\r\n this.packageName = packageName || Constants.EMPTY_STRING;\r\n this.packageVersion = packageVersion || Constants.EMPTY_STRING;\r\n }\r\n /**\r\n * Create new Logger with existing configurations.\r\n */\r\n Logger.prototype.clone = function (packageName, packageVersion, correlationId) {\r\n return new Logger({ loggerCallback: this.localCallback, piiLoggingEnabled: this.piiLoggingEnabled, logLevel: this.level, correlationId: correlationId || this.correlationId }, packageName, packageVersion);\r\n };\r\n /**\r\n * Log message with required options.\r\n */\r\n Logger.prototype.logMessage = function (logMessage, options) {\r\n if ((options.logLevel > this.level) || (!this.piiLoggingEnabled && options.containsPii)) {\r\n return;\r\n }\r\n var timestamp = new Date().toUTCString();\r\n // Add correlationId to logs if set, correlationId provided on log messages take precedence\r\n var logHeader;\r\n if (!StringUtils.isEmpty(options.correlationId)) {\r\n logHeader = \"[\" + timestamp + \"] : [\" + options.correlationId + \"]\";\r\n }\r\n else if (!StringUtils.isEmpty(this.correlationId)) {\r\n logHeader = \"[\" + timestamp + \"] : [\" + this.correlationId + \"]\";\r\n }\r\n else {\r\n logHeader = \"[\" + timestamp + \"]\";\r\n }\r\n var log = logHeader + \" : \" + this.packageName + \"@\" + this.packageVersion + \" : \" + LogLevel[options.logLevel] + \" - \" + logMessage;\r\n // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? \"-Pii\": \"\"}${options.context ? `:${options.context}` : \"\"}`)(logMessage);\r\n this.executeCallback(options.logLevel, log, options.containsPii || false);\r\n };\r\n /**\r\n * Execute callback with message.\r\n */\r\n Logger.prototype.executeCallback = function (level, message, containsPii) {\r\n if (this.localCallback) {\r\n this.localCallback(level, message, containsPii);\r\n }\r\n };\r\n /**\r\n * Logs error messages.\r\n */\r\n Logger.prototype.error = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs error messages with PII.\r\n */\r\n Logger.prototype.errorPii = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs warning messages.\r\n */\r\n Logger.prototype.warning = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs warning messages with PII.\r\n */\r\n Logger.prototype.warningPii = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs info messages.\r\n */\r\n Logger.prototype.info = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs info messages with PII.\r\n */\r\n Logger.prototype.infoPii = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs verbose messages.\r\n */\r\n Logger.prototype.verbose = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs verbose messages with PII.\r\n */\r\n Logger.prototype.verbosePii = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs trace messages.\r\n */\r\n Logger.prototype.trace = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Logs trace messages with PII.\r\n */\r\n Logger.prototype.tracePii = function (message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n };\r\n /**\r\n * Returns whether PII Logging is enabled or not.\r\n */\r\n Logger.prototype.isPiiLoggingEnabled = function () {\r\n return this.piiLoggingEnabled || false;\r\n };\r\n return Logger;\r\n}());\n\nexport { LogLevel, Logger };\n//# sourceMappingURL=Logger.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { __awaiter, __generator } from '../_virtual/_tslib.js';\nimport { buildClientInfo } from '../account/ClientInfo.js';\nimport { ClientAuthError } from '../error/ClientAuthError.js';\nimport { StringUtils } from '../utils/StringUtils.js';\nimport { ServerError } from '../error/ServerError.js';\nimport { AuthToken } from '../account/AuthToken.js';\nimport { ScopeSet } from '../request/ScopeSet.js';\nimport { AccountEntity } from '../cache/entities/AccountEntity.js';\nimport { AuthorityType } from '../authority/AuthorityType.js';\nimport { IdTokenEntity } from '../cache/entities/IdTokenEntity.js';\nimport { AccessTokenEntity } from '../cache/entities/AccessTokenEntity.js';\nimport { RefreshTokenEntity } from '../cache/entities/RefreshTokenEntity.js';\nimport { InteractionRequiredAuthError } from '../error/InteractionRequiredAuthError.js';\nimport { CacheRecord } from '../cache/entities/CacheRecord.js';\nimport { ProtocolUtils } from '../utils/ProtocolUtils.js';\nimport { Constants, AuthenticationScheme, THE_FAMILY_ID } from '../utils/Constants.js';\nimport { PopTokenGenerator } from '../crypto/PopTokenGenerator.js';\nimport { AppMetadataEntity } from '../cache/entities/AppMetadataEntity.js';\nimport { TokenCacheContext } from '../cache/persistence/TokenCacheContext.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 * Class that handles response parsing.\r\n */\r\nvar ResponseHandler = /** @class */ (function () {\r\n function ResponseHandler(clientId, cacheStorage, cryptoObj, logger, serializableCache, persistencePlugin) {\r\n this.clientId = clientId;\r\n this.cacheStorage = cacheStorage;\r\n this.cryptoObj = cryptoObj;\r\n this.logger = logger;\r\n this.serializableCache = serializableCache;\r\n this.persistencePlugin = persistencePlugin;\r\n }\r\n /**\r\n * Function which validates server authorization code response.\r\n * @param serverResponseHash\r\n * @param cachedState\r\n * @param cryptoObj\r\n */\r\n ResponseHandler.prototype.validateServerAuthorizationCodeResponse = function (serverResponseHash, cachedState, cryptoObj) {\r\n if (!serverResponseHash.state || !cachedState) {\r\n throw !serverResponseHash.state ? ClientAuthError.createStateNotFoundError(\"Server State\") : ClientAuthError.createStateNotFoundError(\"Cached State\");\r\n }\r\n if (decodeURIComponent(serverResponseHash.state) !== decodeURIComponent(cachedState)) {\r\n throw ClientAuthError.createStateMismatchError();\r\n }\r\n // Check for error\r\n if (serverResponseHash.error || serverResponseHash.error_description || serverResponseHash.suberror) {\r\n if (InteractionRequiredAuthError.isInteractionRequiredError(serverResponseHash.error, serverResponseHash.error_description, serverResponseHash.suberror)) {\r\n throw new InteractionRequiredAuthError(serverResponseHash.error || Constants.EMPTY_STRING, serverResponseHash.error_description, serverResponseHash.suberror);\r\n }\r\n throw new ServerError(serverResponseHash.error || Constants.EMPTY_STRING, serverResponseHash.error_description, serverResponseHash.suberror);\r\n }\r\n if (serverResponseHash.client_info) {\r\n buildClientInfo(serverResponseHash.client_info, cryptoObj);\r\n }\r\n };\r\n /**\r\n * Function which validates server authorization token response.\r\n * @param serverResponse\r\n */\r\n ResponseHandler.prototype.validateTokenResponse = function (serverResponse) {\r\n // Check for error\r\n if (serverResponse.error || serverResponse.error_description || serverResponse.suberror) {\r\n if (InteractionRequiredAuthError.isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) {\r\n throw new InteractionRequiredAuthError(serverResponse.error, serverResponse.error_description, serverResponse.suberror);\r\n }\r\n var errString = serverResponse.error_codes + \" - [\" + serverResponse.timestamp + \"]: \" + serverResponse.error_description + \" - Correlation ID: \" + serverResponse.correlation_id + \" - Trace ID: \" + serverResponse.trace_id;\r\n throw new ServerError(serverResponse.error, errString, serverResponse.suberror);\r\n }\r\n };\r\n /**\r\n * Returns a constructed token response based on given string. Also manages the cache updates and cleanups.\r\n * @param serverTokenResponse\r\n * @param authority\r\n */\r\n ResponseHandler.prototype.handleServerTokenResponse = function (serverTokenResponse, authority, reqTimestamp, request, authCodePayload, oboAssertion, handlingRefreshTokenResponse) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var idTokenObj, requestStateObj, cacheRecord, cacheContext, key, account;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (serverTokenResponse.id_token) {\r\n idTokenObj = new AuthToken(serverTokenResponse.id_token || Constants.EMPTY_STRING, this.cryptoObj);\r\n // token nonce check (TODO: Add a warning if no nonce is given?)\r\n if (authCodePayload && !StringUtils.isEmpty(authCodePayload.nonce)) {\r\n if (idTokenObj.claims.nonce !== authCodePayload.nonce) {\r\n throw ClientAuthError.createNonceMismatchError();\r\n }\r\n }\r\n }\r\n // generate homeAccountId\r\n this.homeAccountIdentifier = AccountEntity.generateHomeAccountId(serverTokenResponse.client_info || Constants.EMPTY_STRING, authority.authorityType, this.logger, this.cryptoObj, idTokenObj);\r\n if (!!authCodePayload && !!authCodePayload.state) {\r\n requestStateObj = ProtocolUtils.parseRequestState(this.cryptoObj, authCodePayload.state);\r\n }\r\n // Add keyId from request to serverTokenResponse if defined\r\n serverTokenResponse.key_id = serverTokenResponse.key_id || request.sshKid || undefined;\r\n cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, idTokenObj, request.scopes, oboAssertion, authCodePayload);\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, , 5, 8]);\r\n if (!(this.persistencePlugin && this.serializableCache)) return [3 /*break*/, 3];\r\n this.logger.verbose(\"Persistence enabled, calling beforeCacheAccess\");\r\n cacheContext = new TokenCacheContext(this.serializableCache, true);\r\n return [4 /*yield*/, this.persistencePlugin.beforeCacheAccess(cacheContext)];\r\n case 2:\r\n _a.sent();\r\n _a.label = 3;\r\n case 3:\r\n /*\r\n * When saving a refreshed tokens to the cache, it is expected that the account that was used is present in the cache.\r\n * If not present, we should return null, as it's the case that another application called removeAccount in between\r\n * the calls to getAllAccounts and acquireTokenSilent. We should not overwrite that removal.\r\n */\r\n if (handlingRefreshTokenResponse && cacheRecord.account) {\r\n key = cacheRecord.account.generateAccountKey();\r\n account = this.cacheStorage.getAccount(key);\r\n if (!account) {\r\n this.logger.warning(\"Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache\");\r\n return [2 /*return*/, ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenObj, requestStateObj)];\r\n }\r\n }\r\n return [4 /*yield*/, this.cacheStorage.saveCacheRecord(cacheRecord)];\r\n case 4:\r\n _a.sent();\r\n return [3 /*break*/, 8];\r\n case 5:\r\n if (!(this.persistencePlugin && this.serializableCache && cacheContext)) return [3 /*break*/, 7];\r\n this.logger.verbose(\"Persistence enabled, calling afterCacheAccess\");\r\n return [4 /*yield*/, this.persistencePlugin.afterCacheAccess(cacheContext)];\r\n case 6:\r\n _a.sent();\r\n _a.label = 7;\r\n case 7: return [7 /*endfinally*/];\r\n case 8: return [2 /*return*/, ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenObj, requestStateObj)];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Generates CacheRecord\r\n * @param serverTokenResponse\r\n * @param idTokenObj\r\n * @param authority\r\n */\r\n ResponseHandler.prototype.generateCacheRecord = function (serverTokenResponse, authority, reqTimestamp, idTokenObj, requestScopes, oboAssertion, authCodePayload) {\r\n var env = authority.getPreferredCache();\r\n if (StringUtils.isEmpty(env)) {\r\n throw ClientAuthError.createInvalidCacheEnvironmentError();\r\n }\r\n // IdToken: non AAD scenarios can have empty realm\r\n var cachedIdToken;\r\n var cachedAccount;\r\n if (!StringUtils.isEmpty(serverTokenResponse.id_token) && !!idTokenObj) {\r\n cachedIdToken = IdTokenEntity.createIdTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.id_token || Constants.EMPTY_STRING, this.clientId, idTokenObj.claims.tid || Constants.EMPTY_STRING, oboAssertion);\r\n cachedAccount = this.generateAccountEntity(serverTokenResponse, idTokenObj, authority, oboAssertion, authCodePayload);\r\n }\r\n // AccessToken\r\n var cachedAccessToken = null;\r\n if (!StringUtils.isEmpty(serverTokenResponse.access_token)) {\r\n // If scopes not returned in server response, use request scopes\r\n var responseScopes = serverTokenResponse.scope ? ScopeSet.fromString(serverTokenResponse.scope) : new ScopeSet(requestScopes || []);\r\n /*\r\n * Use timestamp calculated before request\r\n * Server may return timestamps as strings, parse to numbers if so.\r\n */\r\n var expiresIn = (typeof serverTokenResponse.expires_in === \"string\" ? parseInt(serverTokenResponse.expires_in, 10) : serverTokenResponse.expires_in) || 0;\r\n var extExpiresIn = (typeof serverTokenResponse.ext_expires_in === \"string\" ? parseInt(serverTokenResponse.ext_expires_in, 10) : serverTokenResponse.ext_expires_in) || 0;\r\n var refreshIn = (typeof serverTokenResponse.refresh_in === \"string\" ? parseInt(serverTokenResponse.refresh_in, 10) : serverTokenResponse.refresh_in) || undefined;\r\n var tokenExpirationSeconds = reqTimestamp + expiresIn;\r\n var extendedTokenExpirationSeconds = tokenExpirationSeconds + extExpiresIn;\r\n var refreshOnSeconds = refreshIn && refreshIn > 0 ? reqTimestamp + refreshIn : undefined;\r\n // non AAD scenarios can have empty realm\r\n cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token || Constants.EMPTY_STRING, this.clientId, idTokenObj ? idTokenObj.claims.tid || Constants.EMPTY_STRING : authority.tenant, responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj, refreshOnSeconds, serverTokenResponse.token_type, oboAssertion, serverTokenResponse.key_id);\r\n }\r\n // refreshToken\r\n var cachedRefreshToken = null;\r\n if (!StringUtils.isEmpty(serverTokenResponse.refresh_token)) {\r\n cachedRefreshToken = RefreshTokenEntity.createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token || Constants.EMPTY_STRING, this.clientId, serverTokenResponse.foci, oboAssertion);\r\n }\r\n // appMetadata\r\n var cachedAppMetadata = null;\r\n if (!StringUtils.isEmpty(serverTokenResponse.foci)) {\r\n cachedAppMetadata = AppMetadataEntity.createAppMetadataEntity(this.clientId, env, serverTokenResponse.foci);\r\n }\r\n return new CacheRecord(cachedAccount, cachedIdToken, cachedAccessToken, cachedRefreshToken, cachedAppMetadata);\r\n };\r\n /**\r\n * Generate Account\r\n * @param serverTokenResponse\r\n * @param idToken\r\n * @param authority\r\n */\r\n ResponseHandler.prototype.generateAccountEntity = function (serverTokenResponse, idToken, authority, oboAssertion, authCodePayload) {\r\n var authorityType = authority.authorityType;\r\n var cloudGraphHostName = authCodePayload ? authCodePayload.cloud_graph_host_name : \"\";\r\n var msGraphhost = authCodePayload ? authCodePayload.msgraph_host : \"\";\r\n // ADFS does not require client_info in the response\r\n if (authorityType === AuthorityType.Adfs) {\r\n this.logger.verbose(\"Authority type is ADFS, creating ADFS account\");\r\n return AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost);\r\n }\r\n // This fallback applies to B2C as well as they fall under an AAD account type.\r\n if (StringUtils.isEmpty(serverTokenResponse.client_info) && authority.protocolMode === \"AAD\") {\r\n throw ClientAuthError.createClientInfoEmptyError();\r\n }\r\n return serverTokenResponse.client_info ?\r\n AccountEntity.createAccount(serverTokenResponse.client_info, this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost) :\r\n AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost);\r\n };\r\n /**\r\n * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache.\r\n *\r\n * Optionally takes a state string that is set as-is in the response.\r\n *\r\n * @param cacheRecord\r\n * @param idTokenObj\r\n * @param fromTokenCache\r\n * @param stateString\r\n */\r\n ResponseHandler.generateAuthenticationResult = function (cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenObj, requestState) {\r\n var _a, _b, _c;\r\n return __awaiter(this, void 0, void 0, function () {\r\n var accessToken, responseScopes, expiresOn, extExpiresOn, familyId, popTokenGenerator, uid, tid;\r\n return __generator(this, function (_d) {\r\n switch (_d.label) {\r\n case 0:\r\n accessToken = \"\";\r\n responseScopes = [];\r\n expiresOn = null;\r\n familyId = Constants.EMPTY_STRING;\r\n if (!cacheRecord.accessToken) return [3 /*break*/, 4];\r\n if (!(cacheRecord.accessToken.tokenType === AuthenticationScheme.POP)) return [3 /*break*/, 2];\r\n popTokenGenerator = new PopTokenGenerator(cryptoObj);\r\n return [4 /*yield*/, popTokenGenerator.signPopToken(cacheRecord.accessToken.secret, request)];\r\n case 1:\r\n accessToken = _d.sent();\r\n return [3 /*break*/, 3];\r\n case 2:\r\n accessToken = cacheRecord.accessToken.secret;\r\n _d.label = 3;\r\n case 3:\r\n responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target).asArray();\r\n expiresOn = new Date(Number(cacheRecord.accessToken.expiresOn) * 1000);\r\n extExpiresOn = new Date(Number(cacheRecord.accessToken.extendedExpiresOn) * 1000);\r\n _d.label = 4;\r\n case 4:\r\n if (cacheRecord.appMetadata) {\r\n familyId = cacheRecord.appMetadata.familyId === THE_FAMILY_ID ? THE_FAMILY_ID : Constants.EMPTY_STRING;\r\n }\r\n uid = (idTokenObj === null || idTokenObj === void 0 ? void 0 : idTokenObj.claims.oid) || (idTokenObj === null || idTokenObj === void 0 ? void 0 : idTokenObj.claims.sub) || Constants.EMPTY_STRING;\r\n tid = (idTokenObj === null || idTokenObj === void 0 ? void 0 : idTokenObj.claims.tid) || Constants.EMPTY_STRING;\r\n return [2 /*return*/, {\r\n authority: authority.canonicalAuthority,\r\n uniqueId: uid,\r\n tenantId: tid,\r\n scopes: responseScopes,\r\n account: cacheRecord.account ? cacheRecord.account.getAccountInfo() : null,\r\n idToken: idTokenObj ? idTokenObj.rawToken : Constants.EMPTY_STRING,\r\n idTokenClaims: idTokenObj ? idTokenObj.claims : {},\r\n accessToken: accessToken,\r\n fromCache: fromTokenCache,\r\n expiresOn: expiresOn,\r\n correlationId: request.correlationId,\r\n extExpiresOn: extExpiresOn,\r\n familyId: familyId,\r\n tokenType: ((_a = cacheRecord.accessToken) === null || _a === void 0 ? void 0 : _a.tokenType) || Constants.EMPTY_STRING,\r\n state: requestState ? requestState.userRequestState : Constants.EMPTY_STRING,\r\n cloudGraphHostName: ((_b = cacheRecord.account) === null || _b === void 0 ? void 0 : _b.cloudGraphHostName) || Constants.EMPTY_STRING,\r\n msGraphHost: ((_c = cacheRecord.account) === null || _c === void 0 ? void 0 : _c.msGraphHost) || Constants.EMPTY_STRING\r\n }];\r\n }\r\n });\r\n });\r\n };\r\n return ResponseHandler;\r\n}());\n\nexport { ResponseHandler };\n//# sourceMappingURL=ResponseHandler.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { ClientAuthError } from '../error/ClientAuthError.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 * @hidden\r\n */\r\nvar StringUtils = /** @class */ (function () {\r\n function StringUtils() {\r\n }\r\n /**\r\n * decode a JWT\r\n *\r\n * @param authToken\r\n */\r\n StringUtils.decodeAuthToken = function (authToken) {\r\n if (StringUtils.isEmpty(authToken)) {\r\n throw ClientAuthError.createTokenNullOrEmptyError(authToken);\r\n }\r\n var tokenPartsRegex = /^([^\\.\\s]*)\\.([^\\.\\s]+)\\.([^\\.\\s]*)$/;\r\n var matches = tokenPartsRegex.exec(authToken);\r\n if (!matches || matches.length < 4) {\r\n throw ClientAuthError.createTokenParsingError(\"Given token is malformed: \" + JSON.stringify(authToken));\r\n }\r\n var crackedToken = {\r\n header: matches[1],\r\n JWSPayload: matches[2],\r\n JWSSig: matches[3]\r\n };\r\n return crackedToken;\r\n };\r\n /**\r\n * Check if a string is empty.\r\n *\r\n * @param str\r\n */\r\n StringUtils.isEmpty = function (str) {\r\n return (typeof str === \"undefined\" || !str || 0 === str.length);\r\n };\r\n /**\r\n * Check if stringified object is empty\r\n * @param strObj\r\n */\r\n StringUtils.isEmptyObj = function (strObj) {\r\n if (strObj && !StringUtils.isEmpty(strObj)) {\r\n try {\r\n var obj = JSON.parse(strObj);\r\n return Object.keys(obj).length === 0;\r\n }\r\n catch (e) { }\r\n }\r\n return true;\r\n };\r\n StringUtils.startsWith = function (str, search) {\r\n return str.indexOf(search) === 0;\r\n };\r\n StringUtils.endsWith = function (str, search) {\r\n return (str.length >= search.length) && (str.lastIndexOf(search) === (str.length - search.length));\r\n };\r\n /**\r\n * Parses string into an object.\r\n *\r\n * @param query\r\n */\r\n StringUtils.queryStringToObject = function (query) {\r\n var obj = {};\r\n var params = query.split(\"&\");\r\n var decode = function (s) { return decodeURIComponent(s.replace(/\\+/g, \" \")); };\r\n params.forEach(function (pair) {\r\n if (pair.trim()) {\r\n var _a = pair.split(/=(.+)/g, 2), key = _a[0], value = _a[1]; // Split on the first occurence of the '=' character\r\n if (key && value) {\r\n obj[decode(key)] = decode(value);\r\n }\r\n }\r\n });\r\n return obj;\r\n };\r\n /**\r\n * Trims entries in an array.\r\n *\r\n * @param arr\r\n */\r\n StringUtils.trimArrayEntries = function (arr) {\r\n return arr.map(function (entry) { return entry.trim(); });\r\n };\r\n /**\r\n * Removes empty strings from array\r\n * @param arr\r\n */\r\n StringUtils.removeEmptyStringsFromArray = function (arr) {\r\n return arr.filter(function (entry) {\r\n return !StringUtils.isEmpty(entry);\r\n });\r\n };\r\n /**\r\n * Attempts to parse a string into JSON\r\n * @param str\r\n */\r\n StringUtils.jsonParseHelper = function (str) {\r\n try {\r\n return JSON.parse(str);\r\n }\r\n catch (e) {\r\n return null;\r\n }\r\n };\r\n /**\r\n * Tests if a given string matches a given pattern, with support for wildcards and queries.\r\n * @param pattern Wildcard pattern to string match. Supports \"*\" for wildcards and \"?\" for queries\r\n * @param input String to match against\r\n */\r\n StringUtils.matchPattern = function (pattern, input) {\r\n /**\r\n * Wildcard support: https://stackoverflow.com/a/3117248/4888559\r\n * Queries: replaces \"?\" in string with escaped \"\\?\" for regex test\r\n */\r\n var regex = new RegExp(pattern.replace(/\\\\/g, \"\\\\\\\\\").replace(/\\*/g, \"[^ ]*\").replace(/\\?/g, \"\\\\\\?\")); // eslint-disable-line security/detect-non-literal-regexp\r\n return regex.test(input);\r\n };\r\n return StringUtils;\r\n}());\n\nexport { StringUtils };\n//# sourceMappingURL=StringUtils.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { AuthError } from '../error/AuthError.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar StubbedNetworkModule = {\r\n sendGetRequestAsync: function () {\r\n var notImplErr = \"Network interface - sendGetRequestAsync() has not been implemented for the Network interface.\";\r\n return Promise.reject(AuthError.createUnexpectedError(notImplErr));\r\n },\r\n sendPostRequestAsync: function () {\r\n var notImplErr = \"Network interface - sendPostRequestAsync() has not been implemented for the Network interface.\";\r\n return Promise.reject(AuthError.createUnexpectedError(notImplErr));\r\n }\r\n};\n\nexport { StubbedNetworkModule };\n//# sourceMappingURL=INetworkModule.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { StringUtils } from '../utils/StringUtils.js';\nimport { ClientConfigurationError } from '../error/ClientConfigurationError.js';\nimport { CodeChallengeMethodValues, PromptValue } from '../utils/Constants.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 * Validates server consumable params from the \"request\" objects\r\n */\r\nvar RequestValidator = /** @class */ (function () {\r\n function RequestValidator() {\r\n }\r\n /**\r\n * Utility to check if the `redirectUri` in the request is a non-null value\r\n * @param redirectUri\r\n */\r\n RequestValidator.validateRedirectUri = function (redirectUri) {\r\n if (StringUtils.isEmpty(redirectUri)) {\r\n throw ClientConfigurationError.createRedirectUriEmptyError();\r\n }\r\n };\r\n /**\r\n * Utility to validate prompt sent by the user in the request\r\n * @param prompt\r\n */\r\n RequestValidator.validatePrompt = function (prompt) {\r\n var promptValues = [];\r\n for (var value in PromptValue) {\r\n promptValues.push(PromptValue[value]);\r\n }\r\n if (promptValues.indexOf(prompt) < 0) {\r\n throw ClientConfigurationError.createInvalidPromptError(prompt);\r\n }\r\n };\r\n RequestValidator.validateClaims = function (claims) {\r\n try {\r\n JSON.parse(claims);\r\n }\r\n catch (e) {\r\n throw ClientConfigurationError.createInvalidClaimsRequestError();\r\n }\r\n };\r\n /**\r\n * Utility to validate code_challenge and code_challenge_method\r\n * @param codeChallenge\r\n * @param codeChallengeMethod\r\n */\r\n RequestValidator.validateCodeChallengeParams = function (codeChallenge, codeChallengeMethod) {\r\n if (StringUtils.isEmpty(codeChallenge) || StringUtils.isEmpty(codeChallengeMethod)) {\r\n throw ClientConfigurationError.createInvalidCodeChallengeParamsError();\r\n }\r\n else {\r\n this.validateCodeChallengeMethod(codeChallengeMethod);\r\n }\r\n };\r\n /**\r\n * Utility to validate code_challenge_method\r\n * @param codeChallengeMethod\r\n */\r\n RequestValidator.validateCodeChallengeMethod = function (codeChallengeMethod) {\r\n if ([\r\n CodeChallengeMethodValues.PLAIN,\r\n CodeChallengeMethodValues.S256\r\n ].indexOf(codeChallengeMethod) < 0) {\r\n throw ClientConfigurationError.createInvalidCodeChallengeMethodError();\r\n }\r\n };\r\n /**\r\n * Removes unnecessary or duplicate query parameters from extraQueryParameters\r\n * @param request\r\n */\r\n RequestValidator.sanitizeEQParams = function (eQParams, queryParams) {\r\n if (!eQParams) {\r\n return {};\r\n }\r\n // Remove any query parameters already included in SSO params\r\n queryParams.forEach(function (value, key) {\r\n if (eQParams[key]) {\r\n delete eQParams[key];\r\n }\r\n });\r\n return eQParams;\r\n };\r\n return RequestValidator;\r\n}());\n\nexport { RequestValidator };\n//# sourceMappingURL=RequestValidator.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\nimport { __spreadArrays } from '../_virtual/_tslib.js';\nimport { AADServerParamKeys, Constants, ResponseMode, OIDC_DEFAULT_SCOPES, SSOTypes, HeaderNames, CLIENT_INFO, ClaimsRequestKeys, PasswordGrantConstants, AuthenticationScheme, ThrottlingConstants } from '../utils/Constants.js';\nimport { ScopeSet } from './ScopeSet.js';\nimport { ClientConfigurationError } from '../error/ClientConfigurationError.js';\nimport { RequestValidator } from './RequestValidator.js';\nimport { StringUtils } from '../utils/StringUtils.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar RequestParameterBuilder = /** @class */ (function () {\r\n function RequestParameterBuilder() {\r\n this.parameters = new Map();\r\n }\r\n /**\r\n * add response_type = code\r\n */\r\n RequestParameterBuilder.prototype.addResponseTypeCode = function () {\r\n this.parameters.set(AADServerParamKeys.RESPONSE_TYPE, encodeURIComponent(Constants.CODE_RESPONSE_TYPE));\r\n };\r\n /**\r\n * add response_mode. defaults to query.\r\n * @param responseMode\r\n */\r\n RequestParameterBuilder.prototype.addResponseMode = function (responseMode) {\r\n this.parameters.set(AADServerParamKeys.RESPONSE_MODE, encodeURIComponent((responseMode) ? responseMode : ResponseMode.QUERY));\r\n };\r\n /**\r\n * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios\r\n * @param scopeSet\r\n * @param addOidcScopes\r\n */\r\n RequestParameterBuilder.prototype.addScopes = function (scopes, addOidcScopes) {\r\n if (addOidcScopes === void 0) { addOidcScopes = true; }\r\n var requestScopes = addOidcScopes ? __spreadArrays(scopes || [], OIDC_DEFAULT_SCOPES) : scopes || [];\r\n var scopeSet = new ScopeSet(requestScopes);\r\n this.parameters.set(AADServerParamKeys.SCOPE, encodeURIComponent(scopeSet.printScopes()));\r\n };\r\n /**\r\n * add clientId\r\n * @param clientId\r\n */\r\n RequestParameterBuilder.prototype.addClientId = function (clientId) {\r\n this.parameters.set(AADServerParamKeys.CLIENT_ID, encodeURIComponent(clientId));\r\n };\r\n /**\r\n * add redirect_uri\r\n * @param redirectUri\r\n */\r\n RequestParameterBuilder.prototype.addRedirectUri = function (redirectUri) {\r\n RequestValidator.validateRedirectUri(redirectUri);\r\n this.parameters.set(AADServerParamKeys.REDIRECT_URI, encodeURIComponent(redirectUri));\r\n };\r\n /**\r\n * add post logout redirectUri\r\n * @param redirectUri\r\n */\r\n RequestParameterBuilder.prototype.addPostLogoutRedirectUri = function (redirectUri) {\r\n RequestValidator.validateRedirectUri(redirectUri);\r\n this.parameters.set(AADServerParamKeys.POST_LOGOUT_URI, encodeURIComponent(redirectUri));\r\n };\r\n /**\r\n * add id_token_hint to logout request\r\n * @param idTokenHint\r\n */\r\n RequestParameterBuilder.prototype.addIdTokenHint = function (idTokenHint) {\r\n this.parameters.set(AADServerParamKeys.ID_TOKEN_HINT, encodeURIComponent(idTokenHint));\r\n };\r\n /**\r\n * add domain_hint\r\n * @param domainHint\r\n */\r\n RequestParameterBuilder.prototype.addDomainHint = function (domainHint) {\r\n this.parameters.set(SSOTypes.DOMAIN_HINT, encodeURIComponent(domainHint));\r\n };\r\n /**\r\n * add login_hint\r\n * @param loginHint\r\n */\r\n RequestParameterBuilder.prototype.addLoginHint = function (loginHint) {\r\n this.parameters.set(SSOTypes.LOGIN_HINT, encodeURIComponent(loginHint));\r\n };\r\n /**\r\n * Adds the CCS (Cache Credential Service) query parameter for login_hint\r\n * @param loginHint\r\n */\r\n RequestParameterBuilder.prototype.addCcsUpn = function (loginHint) {\r\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(\"UPN:\" + loginHint));\r\n };\r\n /**\r\n * Adds the CCS (Cache Credential Service) query parameter for account object\r\n * @param loginHint\r\n */\r\n RequestParameterBuilder.prototype.addCcsOid = function (clientInfo) {\r\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(\"Oid:\" + clientInfo.uid + \"@\" + clientInfo.utid));\r\n };\r\n /**\r\n * add sid\r\n * @param sid\r\n */\r\n RequestParameterBuilder.prototype.addSid = function (sid) {\r\n this.parameters.set(SSOTypes.SID, encodeURIComponent(sid));\r\n };\r\n /**\r\n * add claims\r\n * @param claims\r\n */\r\n RequestParameterBuilder.prototype.addClaims = function (claims, clientCapabilities) {\r\n var mergedClaims = this.addClientCapabilitiesToClaims(claims, clientCapabilities);\r\n RequestValidator.validateClaims(mergedClaims);\r\n this.parameters.set(AADServerParamKeys.CLAIMS, encodeURIComponent(mergedClaims));\r\n };\r\n /**\r\n * add correlationId\r\n * @param correlationId\r\n */\r\n RequestParameterBuilder.prototype.addCorrelationId = function (correlationId) {\r\n this.parameters.set(AADServerParamKeys.CLIENT_REQUEST_ID, encodeURIComponent(correlationId));\r\n };\r\n /**\r\n * add library info query params\r\n * @param libraryInfo\r\n */\r\n RequestParameterBuilder.prototype.addLibraryInfo = function (libraryInfo) {\r\n // Telemetry Info\r\n this.parameters.set(AADServerParamKeys.X_CLIENT_SKU, libraryInfo.sku);\r\n this.parameters.set(AADServerParamKeys.X_CLIENT_VER, libraryInfo.version);\r\n this.parameters.set(AADServerParamKeys.X_CLIENT_OS, libraryInfo.os);\r\n this.parameters.set(AADServerParamKeys.X_CLIENT_CPU, libraryInfo.cpu);\r\n };\r\n /**\r\n * add prompt\r\n * @param prompt\r\n */\r\n RequestParameterBuilder.prototype.addPrompt = function (prompt) {\r\n RequestValidator.validatePrompt(prompt);\r\n this.parameters.set(\"\" + AADServerParamKeys.PROMPT, encodeURIComponent(prompt));\r\n };\r\n /**\r\n * add state\r\n * @param state\r\n */\r\n RequestParameterBuilder.prototype.addState = function (state) {\r\n if (!StringUtils.isEmpty(state)) {\r\n this.parameters.set(AADServerParamKeys.STATE, encodeURIComponent(state));\r\n }\r\n };\r\n /**\r\n * add nonce\r\n * @param nonce\r\n */\r\n RequestParameterBuilder.prototype.addNonce = function (nonce) {\r\n this.parameters.set(AADServerParamKeys.NONCE, encodeURIComponent(nonce));\r\n };\r\n /**\r\n * add code_challenge and code_challenge_method\r\n * - throw if either of them are not passed\r\n * @param codeChallenge\r\n * @param codeChallengeMethod\r\n */\r\n RequestParameterBuilder.prototype.addCodeChallengeParams = function (codeChallenge, codeChallengeMethod) {\r\n RequestValidator.validateCodeChallengeParams(codeChallenge, codeChallengeMethod);\r\n if (codeChallenge && codeChallengeMethod) {\r\n this.parameters.set(AADServerParamKeys.CODE_CHALLENGE, encodeURIComponent(codeChallenge));\r\n this.parameters.set(AADServerParamKeys.CODE_CHALLENGE_METHOD, encodeURIComponent(codeChallengeMethod));\r\n }\r\n else {\r\n throw ClientConfigurationError.createInvalidCodeChallengeParamsError();\r\n }\r\n };\r\n /**\r\n * add the `authorization_code` passed by the user to exchange for a token\r\n * @param code\r\n */\r\n RequestParameterBuilder.prototype.addAuthorizationCode = function (code) {\r\n this.parameters.set(AADServerParamKeys.CODE, encodeURIComponent(code));\r\n };\r\n /**\r\n * add the `authorization_code` passed by the user to exchange for a token\r\n * @param code\r\n */\r\n RequestParameterBuilder.prototype.addDeviceCode = function (code) {\r\n this.parameters.set(AADServerParamKeys.DEVICE_CODE, encodeURIComponent(code));\r\n };\r\n /**\r\n * add the `refreshToken` passed by the user\r\n * @param refreshToken\r\n */\r\n RequestParameterBuilder.prototype.addRefreshToken = function (refreshToken) {\r\n this.parameters.set(AADServerParamKeys.REFRESH_TOKEN, encodeURIComponent(refreshToken));\r\n };\r\n /**\r\n * add the `code_verifier` passed by the user to exchange for a token\r\n * @param codeVerifier\r\n */\r\n RequestParameterBuilder.prototype.addCodeVerifier = function (codeVerifier) {\r\n this.parameters.set(AADServerParamKeys.CODE_VERIFIER, encodeURIComponent(codeVerifier));\r\n };\r\n /**\r\n * add client_secret\r\n * @param clientSecret\r\n */\r\n RequestParameterBuilder.prototype.addClientSecret = function (clientSecret) {\r\n this.parameters.set(AADServerParamKeys.CLIENT_SECRET, encodeURIComponent(clientSecret));\r\n };\r\n /**\r\n * add clientAssertion for confidential client flows\r\n * @param clientAssertion\r\n */\r\n RequestParameterBuilder.prototype.addClientAssertion = function (clientAssertion) {\r\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION, encodeURIComponent(clientAssertion));\r\n };\r\n /**\r\n * add clientAssertionType for confidential client flows\r\n * @param clientAssertionType\r\n */\r\n RequestParameterBuilder.prototype.addClientAssertionType = function (clientAssertionType) {\r\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType));\r\n };\r\n /**\r\n * add OBO assertion for confidential client flows\r\n * @param clientAssertion\r\n */\r\n RequestParameterBuilder.prototype.addOboAssertion = function (oboAssertion) {\r\n this.parameters.set(AADServerParamKeys.OBO_ASSERTION, encodeURIComponent(oboAssertion));\r\n };\r\n /**\r\n * add grant type\r\n * @param grantType\r\n */\r\n RequestParameterBuilder.prototype.addRequestTokenUse = function (tokenUse) {\r\n this.parameters.set(AADServerParamKeys.REQUESTED_TOKEN_USE, encodeURIComponent(tokenUse));\r\n };\r\n /**\r\n * add grant type\r\n * @param grantType\r\n */\r\n RequestParameterBuilder.prototype.addGrantType = function (grantType) {\r\n this.parameters.set(AADServerParamKeys.GRANT_TYPE, encodeURIComponent(grantType));\r\n };\r\n /**\r\n * add client info\r\n *\r\n */\r\n RequestParameterBuilder.prototype.addClientInfo = function () {\r\n this.parameters.set(CLIENT_INFO, \"1\");\r\n };\r\n /**\r\n * add extraQueryParams\r\n * @param eQparams\r\n */\r\n RequestParameterBuilder.prototype.addExtraQueryParameters = function (eQparams) {\r\n var _this = this;\r\n RequestValidator.sanitizeEQParams(eQparams, this.parameters);\r\n Object.keys(eQparams).forEach(function (key) {\r\n _this.parameters.set(key, eQparams[key]);\r\n });\r\n };\r\n RequestParameterBuilder.prototype.addClientCapabilitiesToClaims = function (claims, clientCapabilities) {\r\n var mergedClaims;\r\n // Parse provided claims into JSON object or initialize empty object\r\n if (!claims) {\r\n mergedClaims = {};\r\n }\r\n else {\r\n try {\r\n mergedClaims = JSON.parse(claims);\r\n }\r\n catch (e) {\r\n throw ClientConfigurationError.createInvalidClaimsRequestError();\r\n }\r\n }\r\n if (clientCapabilities && clientCapabilities.length > 0) {\r\n if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)) {\r\n // Add access_token key to claims object\r\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {};\r\n }\r\n // Add xms_cc claim with provided clientCapabilities to access_token key\r\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC] = {\r\n values: clientCapabilities\r\n };\r\n }\r\n return JSON.stringify(mergedClaims);\r\n };\r\n /**\r\n * adds `username` for Password Grant flow\r\n * @param username\r\n */\r\n RequestParameterBuilder.prototype.addUsername = function (username) {\r\n this.parameters.set(PasswordGrantConstants.username, username);\r\n };\r\n /**\r\n * adds `password` for Password Grant flow\r\n * @param password\r\n */\r\n RequestParameterBuilder.prototype.addPassword = function (password) {\r\n this.parameters.set(PasswordGrantConstants.password, password);\r\n };\r\n /**\r\n * add pop_jwk to query params\r\n * @param cnfString\r\n */\r\n RequestParameterBuilder.prototype.addPopToken = function (cnfString) {\r\n if (!StringUtils.isEmpty(cnfString)) {\r\n this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.POP);\r\n this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(cnfString));\r\n }\r\n };\r\n /**\r\n * add SSH JWK and key ID to query params\r\n */\r\n RequestParameterBuilder.prototype.addSshJwk = function (sshJwkString) {\r\n if (!StringUtils.isEmpty(sshJwkString)) {\r\n this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.SSH);\r\n this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(sshJwkString));\r\n }\r\n };\r\n /**\r\n * add server telemetry fields\r\n * @param serverTelemetryManager\r\n */\r\n RequestParameterBuilder.prototype.addServerTelemetry = function (serverTelemetryManager) {\r\n this.parameters.set(AADServerParamKeys.X_CLIENT_CURR_TELEM, serverTelemetryManager.generateCurrentRequestHeaderValue());\r\n this.parameters.set(AADServerParamKeys.X_CLIENT_LAST_TELEM, serverTelemetryManager.generateLastRequestHeaderValue());\r\n };\r\n /**\r\n * Adds parameter that indicates to the server that throttling is supported\r\n */\r\n RequestParameterBuilder.prototype.addThrottling = function () {\r\n this.parameters.set(AADServerParamKeys.X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE);\r\n };\r\n /**\r\n * Utility to create a URL from the params map\r\n */\r\n RequestParameterBuilder.prototype.createQueryString = function () {\r\n var queryParameterArray = new Array();\r\n this.parameters.forEach(function (value, key) {\r\n queryParameterArray.push(key + \"=\" + value);\r\n });\r\n return queryParameterArray.join(\"&\");\r\n };\r\n return RequestParameterBuilder;\r\n}());\n\nexport { RequestParameterBuilder };\n//# sourceMappingURL=RequestParameterBuilder.js.map\n","/*! @azure/msal-common v5.1.0 2021-11-02 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Utility class which exposes functions for managing date and time operations.\r\n */\r\nvar TimeUtils = /** @class */ (function () {\r\n function TimeUtils() {\r\n }\r\n /**\r\n * return the current time in Unix time (seconds).\r\n */\r\n TimeUtils.nowSeconds = function () {\r\n // Date.getTime() returns in milliseconds.\r\n return Math.round(new Date().getTime() / 1000.0);\r\n };\r\n /**\r\n * check if a token is expired based on given UTC time in seconds.\r\n * @param expiresOn\r\n */\r\n TimeUtils.isTokenExpired = function (expiresOn, offset) {\r\n // check for access token expiry\r\n var expirationSec = Number(expiresOn) || 0;\r\n var offsetCurrentTimeSec = TimeUtils.nowSeconds() + offset;\r\n // If current time + offset is greater than token expiration time, then token is expired.\r\n return (offsetCurrentTimeSec > expirationSec);\r\n };\r\n /**\r\n * If the current time is earlier than the time that a token was cached at, we must discard the token\r\n * i.e. The system clock was turned back after acquiring the cached token\r\n * @param cachedAt\r\n * @param offset\r\n */\r\n TimeUtils.wasClockTurnedBack = function (cachedAt) {\r\n var cachedAtSec = Number(cachedAt);\r\n return cachedAtSec > TimeUtils.nowSeconds();\r\n };\r\n /**\r\n * Waits for t number of milliseconds\r\n * @param t number\r\n * @param value T\r\n */\r\n TimeUtils.delay = function (t, value) {\r\n return new Promise(function (resolve) { return setTimeout(function () { return resolve(value); }, t); });\r\n };\r\n return TimeUtils;\r\n}());\n\nexport { TimeUtils };\n//# sourceMappingURL=TimeUtils.js.map\n"],"sourceRoot":""}