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SAAQ,SAAUC,GAAW,OAAOC,YAAW,WAAc,OAAOD,EAAQ1f,EAAQ,GAAGwf,EAAI,GAC1G,EACOX,CACX,CAxC8B,E,uBCTf,SAASe,EAAQpC,GAG9B,OAAOoC,EAAU,mBAAqBC,QAAU,iBAAmBA,OAAOC,SAAW,SAAUtC,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAO,mBAAqBqC,QAAUrC,EAAIuC,cAAgBF,QAAUrC,IAAQqC,OAAO1mB,UAAY,gBAAkBqkB,CAC1H,EAAGoC,EAAQpC,EACb,CCPe,SAASwC,EAAatB,EAAOuB,GAC1C,GAAuB,WAAnBL,EAAQlB,IAAiC,OAAVA,EAAgB,OAAOA,EAC1D,IAAIwB,EAAOxB,EAAMmB,OAAOM,aACxB,QAAa5Z,IAAT2Z,EAAoB,CACtB,IAAIE,EAAMF,EAAKG,KAAK3B,EAAOuB,GAAQ,WACnC,GAAqB,WAAjBL,EAAQQ,GAAmB,OAAOA,EACtC,MAAM,IAAIE,UAAU,+CACtB,CACA,OAAiB,WAATL,EAAoBM,OAASjW,QAAQoU,EAC/C,CCRe,SAAS8B,EAAeC,GACrC,IAAIniB,EAAM6hB,EAAYM,EAAK,UAC3B,MAAwB,WAAjBb,EAAQthB,GAAoBA,EAAMiiB,OAAOjiB,EAClD,CCJe,SAASoiB,EAAgBlD,EAAKlf,EAAK0B,GAYhD,OAXA1B,EAAMqiB,EAAcriB,GAChBA,KAAOkf,EACTrf,OAAOwU,eAAe6K,EAAKlf,EAAK,CAC9B0B,MAAOA,EACP4S,YAAY,EACZC,cAAc,EACd+N,UAAU,IAGZpD,EAAIlf,GAAO0B,EAENwd,CACT,C","sources":["webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/packageMetadata.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/request/RequestValidator.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/request/ScopeSet.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/response/ResponseHandler.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/url/UrlString.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/utils/Constants.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/utils/StringUtils.js","webpack://ida-jandaya/./node_modules/@azure/msal-common/dist/utils/TimeUtils.js","webpack://ida-jandaya/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://ida-jandaya/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://ida-jandaya/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://ida-jandaya/./node_modules/@babel/runtime/helpers/esm/defineProperty.js"],"sourcesContent":["/*! @azure/msal-common v7.6.0 2022-10-10 */\n'use strict';\n/* eslint-disable header/header */\r\nvar name = \"@azure/msal-common\";\r\nvar version = \"7.6.0\";\n\nexport { name, version };\n//# sourceMappingURL=packageMetadata.js.map\n","/*! @azure/msal-common v7.6.0 2022-10-10 */\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_type = token id_token\r\n */\r\n RequestParameterBuilder.prototype.addResponseTypeForTokenAndIdToken = function () {\r\n this.parameters.set(AADServerParamKeys.RESPONSE_TYPE, encodeURIComponent(Constants.TOKEN_RESPONSE_TYPE + \" \" + Constants.ID_TOKEN_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 flag to indicate STS should attempt to use WAM if available\r\n */\r\n RequestParameterBuilder.prototype.addNativeBroker = function () {\r\n this.parameters.set(AADServerParamKeys.NATIVE_BROKER, encodeURIComponent(\"1\"));\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 if (libraryInfo.os) {\r\n this.parameters.set(AADServerParamKeys.X_CLIENT_OS, libraryInfo.os);\r\n }\r\n if (libraryInfo.cpu) {\r\n this.parameters.set(AADServerParamKeys.X_CLIENT_CPU, libraryInfo.cpu);\r\n }\r\n };\r\n /**\r\n * Add client telemetry parameters\r\n * @param appTelemetry\r\n */\r\n RequestParameterBuilder.prototype.addApplicationTelemetry = function (appTelemetry) {\r\n if (appTelemetry === null || appTelemetry === void 0 ? void 0 : appTelemetry.appName) {\r\n this.parameters.set(AADServerParamKeys.X_APP_NAME, appTelemetry.appName);\r\n }\r\n if (appTelemetry === null || appTelemetry === void 0 ? void 0 : appTelemetry.appVersion) {\r\n this.parameters.set(AADServerParamKeys.X_APP_VER, appTelemetry.appVersion);\r\n }\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 if (!StringUtils.isEmpty(clientAssertion)) {\r\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION, encodeURIComponent(clientAssertion));\r\n }\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 if (!StringUtils.isEmpty(clientAssertionType)) {\r\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType));\r\n }\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, encodeURIComponent(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, encodeURIComponent(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 * Adds logout_hint parameter for \"silent\" logout which prevent server account picker\r\n */\r\n RequestParameterBuilder.prototype.addLogoutHint = function (logoutHint) {\r\n this.parameters.set(AADServerParamKeys.LOGOUT_HINT, encodeURIComponent(logoutHint));\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 v7.6.0 2022-10-10 */\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 v7.6.0 2022-10-10 */\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, 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 * 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 || Constants.EMPTY_STRING;\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 Constants.EMPTY_STRING;\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 v7.6.0 2022-10-10 */\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, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var idTokenObj, authTime, 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 // token max_age check\r\n if (request.maxAge || (request.maxAge === 0)) {\r\n authTime = idTokenObj.claims.auth_time;\r\n if (!authTime) {\r\n throw ClientAuthError.createAuthTimeNotFoundError();\r\n }\r\n AuthToken.checkMaxAge(authTime, request.maxAge);\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, request, idTokenObj, userAssertionHash, 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, unless explicitly flagged by\r\n * the developer, as in the case of refresh token flow used in ADAL Node to MSAL Node migration.\r\n */\r\n if (handlingRefreshTokenResponse && !forceCacheRefreshTokenResponse && 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, undefined, serverRequestId)];\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, serverTokenResponse.spa_code, serverRequestId)];\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, request, idTokenObj, userAssertionHash, 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);\r\n cachedAccount = this.generateAccountEntity(serverTokenResponse, idTokenObj, authority, 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(request.scopes || []);\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, userAssertionHash, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash);\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, userAssertionHash);\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, authCodePayload) {\r\n var authorityType = authority.authorityType;\r\n var cloudGraphHostName = authCodePayload ? authCodePayload.cloud_graph_host_name : Constants.EMPTY_STRING;\r\n var msGraphhost = authCodePayload ? authCodePayload.msgraph_host : Constants.EMPTY_STRING;\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, 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, cloudGraphHostName, msGraphhost) :\r\n AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, 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, code, requestId) {\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, _d, secret, keyId, uid, tid;\r\n return __generator(this, function (_e) {\r\n switch (_e.label) {\r\n case 0:\r\n accessToken = Constants.EMPTY_STRING;\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 _d = cacheRecord.accessToken, secret = _d.secret, keyId = _d.keyId;\r\n if (!keyId) {\r\n throw ClientAuthError.createKeyIdMissingError();\r\n }\r\n return [4 /*yield*/, popTokenGenerator.signPopToken(secret, keyId, request)];\r\n case 1:\r\n accessToken = _e.sent();\r\n return [3 /*break*/, 3];\r\n case 2:\r\n accessToken = cacheRecord.accessToken.secret;\r\n _e.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 _e.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 requestId: requestId || Constants.EMPTY_STRING,\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 code: code,\r\n fromNativeBroker: false\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 v7.6.0 2022-10-10 */\n'use strict';\nimport { __assign } from '../../_virtual/_tslib.js';\nimport { PerformanceEventStatus } from './PerformanceEvent.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar PerformanceClient = /** @class */ (function () {\r\n /**\r\n * Creates an instance of PerformanceClient,\r\n * an abstract class containing core performance telemetry logic.\r\n *\r\n * @constructor\r\n * @param {string} clientId Client ID of the application\r\n * @param {string} authority Authority used by the application\r\n * @param {Logger} logger Logger used by the application\r\n * @param {string} libraryName Name of the library\r\n * @param {string} libraryVersion Version of the library\r\n */\r\n function PerformanceClient(clientId, authority, logger, libraryName, libraryVersion, applicationTelemetry) {\r\n this.authority = authority;\r\n this.libraryName = libraryName;\r\n this.libraryVersion = libraryVersion;\r\n this.applicationTelemetry = applicationTelemetry;\r\n this.clientId = clientId;\r\n this.logger = logger;\r\n this.callbacks = new Map();\r\n this.eventsByCorrelationId = new Map();\r\n this.measurementsById = new Map();\r\n }\r\n /**\r\n * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement.\r\n *\r\n * @param {PerformanceEvents} measureName\r\n * @param {?string} [correlationId]\r\n * @returns {InProgressPerformanceEvent}\r\n */\r\n PerformanceClient.prototype.startMeasurement = function (measureName, correlationId) {\r\n var _this = this;\r\n var _a, _b;\r\n // Generate a placeholder correlation if the request does not provide one\r\n var eventCorrelationId = correlationId || this.generateId();\r\n if (!correlationId) {\r\n this.logger.info(\"PerformanceClient: No correlation id provided for \" + measureName + \", generating\", eventCorrelationId);\r\n }\r\n this.logger.trace(\"PerformanceClient: Performance measurement started for \" + measureName, eventCorrelationId);\r\n var performanceMeasurement = this.startPerformanceMeasuremeant(measureName, eventCorrelationId);\r\n performanceMeasurement.startMeasurement();\r\n var inProgressEvent = {\r\n eventId: this.generateId(),\r\n status: PerformanceEventStatus.InProgress,\r\n authority: this.authority,\r\n libraryName: this.libraryName,\r\n libraryVersion: this.libraryVersion,\r\n appName: (_a = this.applicationTelemetry) === null || _a === void 0 ? void 0 : _a.appName,\r\n appVersion: (_b = this.applicationTelemetry) === null || _b === void 0 ? void 0 : _b.appVersion,\r\n clientId: this.clientId,\r\n name: measureName,\r\n startTimeMs: Date.now(),\r\n correlationId: eventCorrelationId,\r\n };\r\n // Store in progress events so they can be discarded if not ended properly\r\n this.cacheEventByCorrelationId(inProgressEvent);\r\n this.cacheMeasurement(inProgressEvent, performanceMeasurement);\r\n // Return the event and functions the caller can use to properly end/flush the measurement\r\n return {\r\n endMeasurement: function (event) {\r\n var completedEvent = _this.endMeasurement(__assign(__assign({}, inProgressEvent), event));\r\n if (completedEvent) {\r\n // Cache event so that submeasurements can be added downstream\r\n _this.cacheEventByCorrelationId(completedEvent);\r\n }\r\n return completedEvent;\r\n },\r\n flushMeasurement: function () {\r\n return _this.flushMeasurements(inProgressEvent.name, inProgressEvent.correlationId);\r\n },\r\n discardMeasurement: function () {\r\n return _this.discardMeasurements(inProgressEvent.correlationId);\r\n },\r\n measurement: performanceMeasurement,\r\n event: inProgressEvent\r\n };\r\n };\r\n /**\r\n * Stops measuring the performance for an operation. Should only be called directly by PerformanceClient classes,\r\n * as consumers should instead use the function returned by startMeasurement.\r\n *\r\n * @param {PerformanceEvent} event\r\n * @returns {(PerformanceEvent | null)}\r\n */\r\n PerformanceClient.prototype.endMeasurement = function (event) {\r\n var performanceMeasurement = this.measurementsById.get(event.eventId);\r\n if (performanceMeasurement) {\r\n // Immediately delete so that the same event isnt ended twice\r\n this.measurementsById.delete(event.eventId);\r\n performanceMeasurement.endMeasurement();\r\n var durationMs = performanceMeasurement.flushMeasurement();\r\n // null indicates no measurement was taken (e.g. needed performance APIs not present)\r\n if (durationMs !== null) {\r\n this.logger.trace(\"PerformanceClient: Performance measurement ended for \" + event.name + \": \" + durationMs + \" ms\", event.correlationId);\r\n var completedEvent = __assign(__assign({ \r\n // Allow duration to be overwritten when event ends (e.g. testing), but not status\r\n durationMs: Math.round(durationMs) }, event), { status: PerformanceEventStatus.Completed });\r\n return completedEvent;\r\n }\r\n else {\r\n this.logger.trace(\"PerformanceClient: Performance measurement not taken\", event.correlationId);\r\n }\r\n }\r\n else {\r\n this.logger.trace(\"PerformanceClient: Measurement not found for \" + event.eventId, event.correlationId);\r\n }\r\n return null;\r\n };\r\n /**\r\n * Upserts event into event cache.\r\n * First key is the correlation id, second key is the event id.\r\n * Allows for events to be grouped by correlation id,\r\n * and to easily allow for properties on them to be updated.\r\n *\r\n * @private\r\n * @param {PerformanceEvent} event\r\n */\r\n PerformanceClient.prototype.cacheEventByCorrelationId = function (event) {\r\n var existingEvents = this.eventsByCorrelationId.get(event.correlationId);\r\n if (existingEvents) {\r\n this.logger.trace(\"PerformanceClient: Performance measurement for \" + event.name + \" added/updated\", event.correlationId);\r\n existingEvents.set(event.eventId, event);\r\n }\r\n else {\r\n this.logger.trace(\"PerformanceClient: Performance measurement for \" + event.name + \" started\", event.correlationId);\r\n this.eventsByCorrelationId.set(event.correlationId, new Map().set(event.eventId, event));\r\n }\r\n };\r\n /**\r\n * Cache measurements by their id.\r\n *\r\n * @private\r\n * @param {PerformanceEvent} event\r\n * @param {IPerformanceMeasurement} measurement\r\n */\r\n PerformanceClient.prototype.cacheMeasurement = function (event, measurement) {\r\n this.measurementsById.set(event.eventId, measurement);\r\n };\r\n /**\r\n * Gathers and emits performance events for measurements taked for the given top-level API and correlation ID.\r\n *\r\n * @param {PerformanceEvents} measureName\r\n * @param {string} correlationId\r\n */\r\n PerformanceClient.prototype.flushMeasurements = function (measureName, correlationId) {\r\n var _this = this;\r\n this.logger.trace(\"PerformanceClient: Performance measurements flushed for \" + measureName, correlationId);\r\n var eventsForCorrelationId = this.eventsByCorrelationId.get(correlationId);\r\n if (eventsForCorrelationId) {\r\n this.discardMeasurements(correlationId);\r\n /*\r\n * Manually end incomplete submeasurements to ensure there arent orphaned/never ending events.\r\n * Incomplete submeasurements are likely an instrumentation bug that should be fixed.\r\n * IE only supports Map.forEach.\r\n */\r\n var completedEvents_1 = [];\r\n eventsForCorrelationId.forEach(function (event) {\r\n if (event.name !== measureName && event.status !== PerformanceEventStatus.Completed) {\r\n _this.logger.trace(\"PerformanceClient: Incomplete submeasurement \" + event.name + \" found for \" + measureName, correlationId);\r\n var completedEvent = _this.endMeasurement(event);\r\n if (completedEvent) {\r\n completedEvents_1.push(completedEvent);\r\n }\r\n }\r\n completedEvents_1.push(event);\r\n });\r\n // Sort events by start time (earliest first)\r\n var sortedCompletedEvents = completedEvents_1.sort(function (eventA, eventB) { return eventA.startTimeMs - eventB.startTimeMs; });\r\n // Take completed top level event and add completed submeasurements durations as properties\r\n var topLevelEvents = sortedCompletedEvents.filter(function (event) { return event.name === measureName && event.status === PerformanceEventStatus.Completed; });\r\n if (topLevelEvents.length > 0) {\r\n /*\r\n * Only take the first top-level event if there are multiple events with the same correlation id.\r\n * This greatly simplifies logic for submeasurements.\r\n */\r\n if (topLevelEvents.length > 1) {\r\n this.logger.verbose(\"PerformanceClient: Multiple distinct top-level performance events found, using the first\", correlationId);\r\n }\r\n var topLevelEvent = topLevelEvents[0];\r\n this.logger.verbose(\"PerformanceClient: Measurement found for \" + measureName, correlationId);\r\n // Build event object with top level and sub measurements\r\n var eventToEmit = sortedCompletedEvents.reduce(function (previous, current) {\r\n if (current.name !== measureName) {\r\n _this.logger.trace(\"PerformanceClient: Complete submeasurement found for \" + current.name, correlationId);\r\n // TODO: Emit additional properties for each subMeasurement\r\n var subMeasurementName = current.name + \"DurationMs\";\r\n /*\r\n * Some code paths, such as resolving an authority, can occur multiple times.\r\n * Only take the first measurement, since the second could be read from the cache,\r\n * or due to the same correlation id being used for two distinct requests.\r\n */\r\n if (!previous[subMeasurementName]) {\r\n previous[subMeasurementName] = current.durationMs;\r\n }\r\n else {\r\n _this.logger.verbose(\"PerformanceClient: Submeasurement for \" + measureName + \" already exists for \" + current.name + \", ignoring\", correlationId);\r\n }\r\n if (current.accessTokenSize) {\r\n previous.accessTokenSize = current.accessTokenSize;\r\n }\r\n if (current.idTokenSize) {\r\n previous.idTokenSize = current.idTokenSize;\r\n }\r\n if (current.refreshTokenSize) {\r\n previous.refreshTokenSize = current.refreshTokenSize;\r\n }\r\n }\r\n return previous;\r\n }, topLevelEvent);\r\n this.emitEvents([eventToEmit], eventToEmit.correlationId);\r\n }\r\n else {\r\n this.logger.verbose(\"PerformanceClient: No completed top-level measurements found for \" + measureName, correlationId);\r\n }\r\n }\r\n else {\r\n this.logger.verbose(\"PerformanceClient: No measurements found\", correlationId);\r\n }\r\n };\r\n /**\r\n * Removes measurements for a given correlation id.\r\n *\r\n * @param {string} correlationId\r\n */\r\n PerformanceClient.prototype.discardMeasurements = function (correlationId) {\r\n this.logger.trace(\"PerformanceClient: Performance measurements discarded\", correlationId);\r\n this.eventsByCorrelationId.delete(correlationId);\r\n };\r\n /**\r\n * Registers a callback function to receive performance events.\r\n *\r\n * @param {PerformanceCallbackFunction} callback\r\n * @returns {string}\r\n */\r\n PerformanceClient.prototype.addPerformanceCallback = function (callback) {\r\n var callbackId = this.generateId();\r\n this.callbacks.set(callbackId, callback);\r\n this.logger.verbose(\"PerformanceClient: Performance callback registered with id: \" + callbackId);\r\n return callbackId;\r\n };\r\n /**\r\n * Removes a callback registered with addPerformanceCallback.\r\n *\r\n * @param {string} callbackId\r\n * @returns {boolean}\r\n */\r\n PerformanceClient.prototype.removePerformanceCallback = function (callbackId) {\r\n var result = this.callbacks.delete(callbackId);\r\n if (result) {\r\n this.logger.verbose(\"PerformanceClient: Performance callback \" + callbackId + \" removed.\");\r\n }\r\n else {\r\n this.logger.verbose(\"PerformanceClient: Performance callback \" + callbackId + \" not removed.\");\r\n }\r\n return result;\r\n };\r\n /**\r\n * Emits events to all registered callbacks.\r\n *\r\n * @param {PerformanceEvent[]} events\r\n * @param {?string} [correlationId]\r\n */\r\n PerformanceClient.prototype.emitEvents = function (events, correlationId) {\r\n var _this = this;\r\n this.logger.verbose(\"PerformanceClient: Emitting performance events\", correlationId);\r\n this.callbacks.forEach(function (callback, callbackId) {\r\n _this.logger.trace(\"PerformanceClient: Emitting event to callback \" + callbackId, correlationId);\r\n callback.apply(null, [events]);\r\n });\r\n };\r\n return PerformanceClient;\r\n}());\n\nexport { PerformanceClient };\n//# sourceMappingURL=PerformanceClient.js.map\n","/*! @azure/msal-common v7.6.0 2022-10-10 */\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 * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient.\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nvar PerformanceEvents;\r\n(function (PerformanceEvents) {\r\n /**\r\n * acquireTokenByCode API (msal-browser and msal-node).\r\n * Used to acquire tokens by trading an authorization code against the token endpoint.\r\n */\r\n PerformanceEvents[\"AcquireTokenByCode\"] = \"acquireTokenByCode\";\r\n /**\r\n * acquireTokenByRefreshToken API (msal-browser and msal-node).\r\n * Used to renew an access token using a refresh token against the token endpoint.\r\n */\r\n PerformanceEvents[\"AcquireTokenByRefreshToken\"] = \"acquireTokenByRefreshToken\";\r\n /**\r\n * acquireTokenSilent API (msal-browser and msal-node).\r\n * Used to silently acquire a new access token (from the cache or the network).\r\n */\r\n PerformanceEvents[\"AcquireTokenSilent\"] = \"acquireTokenSilent\";\r\n /**\r\n * acquireTokenSilentAsync (msal-browser).\r\n * Internal API for acquireTokenSilent.\r\n */\r\n PerformanceEvents[\"AcquireTokenSilentAsync\"] = \"acquireTokenSilentAsync\";\r\n /**\r\n * acquireTokenPopup (msal-browser).\r\n * Used to acquire a new access token interactively through pop ups\r\n */\r\n PerformanceEvents[\"AcquireTokenPopup\"] = \"acquireTokenPopup\";\r\n /**\r\n * getPublicKeyThumbprint API in CryptoOpts class (msal-browser).\r\n * Used to generate a public/private keypair and generate a public key thumbprint for pop requests.\r\n */\r\n PerformanceEvents[\"CryptoOptsGetPublicKeyThumbprint\"] = \"cryptoOptsGetPublicKeyThumbprint\";\r\n /**\r\n * signJwt API in CryptoOpts class (msal-browser).\r\n * Used to signed a pop token.\r\n */\r\n PerformanceEvents[\"CryptoOptsSignJwt\"] = \"cryptoOptsSignJwt\";\r\n /**\r\n * acquireToken API in the SilentCacheClient class (msal-browser).\r\n * Used to read access tokens from the cache.\r\n */\r\n PerformanceEvents[\"SilentCacheClientAcquireToken\"] = \"silentCacheClientAcquireToken\";\r\n /**\r\n * acquireToken API in the SilentIframeClient class (msal-browser).\r\n * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe.\r\n */\r\n PerformanceEvents[\"SilentIframeClientAcquireToken\"] = \"silentIframeClientAcquireToken\";\r\n /**\r\n * acquireToken API in SilentRereshClient (msal-browser).\r\n * Used to acquire a new set of tokens from the token endpoint using a refresh token.\r\n */\r\n PerformanceEvents[\"SilentRefreshClientAcquireToken\"] = \"silentRefreshClientAcquireToken\";\r\n /**\r\n * ssoSilent API (msal-browser).\r\n * Used to silently acquire an authorization code and set of tokens using a hidden iframe.\r\n */\r\n PerformanceEvents[\"SsoSilent\"] = \"ssoSilent\";\r\n /**\r\n * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser).\r\n * Used to load authority metadata for a request.\r\n */\r\n PerformanceEvents[\"StandardInteractionClientGetDiscoveredAuthority\"] = \"standardInteractionClientGetDiscoveredAuthority\";\r\n /**\r\n * acquireToken APIs in msal-browser.\r\n * Used to make an /authorize endpoint call with native brokering enabled.\r\n */\r\n PerformanceEvents[\"FetchAccountIdWithNativeBroker\"] = \"fetchAccountIdWithNativeBroker\";\r\n /**\r\n * acquireToken API in NativeInteractionClient class (msal-browser).\r\n * Used to acquire a token from Native component when native brokering is enabled.\r\n */\r\n PerformanceEvents[\"NativeInteractionClientAcquireToken\"] = \"nativeInteractionClientAcquireToken\";\r\n /**\r\n * Time spent creating default headers for requests to token endpoint\r\n */\r\n PerformanceEvents[\"BaseClientCreateTokenRequestHeaders\"] = \"baseClientCreateTokenRequestHeaders\";\r\n /**\r\n * Used to measure the time taken for completing embedded-broker handshake (PW-Broker).\r\n */\r\n PerformanceEvents[\"BrokerHandhshake\"] = \"brokerHandshake\";\r\n /**\r\n * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .\r\n */\r\n PerformanceEvents[\"AcquireTokenByRefreshTokenInBroker\"] = \"acquireTokenByRefreshTokenInBroker\";\r\n /**\r\n * Time taken for token acquisition by broker\r\n */\r\n PerformanceEvents[\"AcquireTokenByBroker\"] = \"acquireTokenByBroker\";\r\n /**\r\n * Time spent on the network for refresh token acquisition\r\n */\r\n PerformanceEvents[\"RefreshTokenClientExecuteTokenRequest\"] = \"refreshTokenClientExecuteTokenRequest\";\r\n /**\r\n * Time taken for acquiring refresh token , records RT size\r\n */\r\n PerformanceEvents[\"RefreshTokenClientAcquireToken\"] = \"refreshTokenClientAcquireToken\";\r\n /**\r\n * Time taken for acquiring cached refresh token\r\n */\r\n PerformanceEvents[\"RefreshTokenClientAcquireTokenWithCachedRefreshToken\"] = \"refreshTokenClientAcquireTokenWithCachedRefreshToken\";\r\n})(PerformanceEvents || (PerformanceEvents = {}));\r\n/**\r\n * State of the performance event.\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nvar PerformanceEventStatus;\r\n(function (PerformanceEventStatus) {\r\n PerformanceEventStatus[PerformanceEventStatus[\"NotStarted\"] = 0] = \"NotStarted\";\r\n PerformanceEventStatus[PerformanceEventStatus[\"InProgress\"] = 1] = \"InProgress\";\r\n PerformanceEventStatus[PerformanceEventStatus[\"Completed\"] = 2] = \"Completed\";\r\n})(PerformanceEventStatus || (PerformanceEventStatus = {}));\n\nexport { PerformanceEventStatus, PerformanceEvents };\n//# sourceMappingURL=PerformanceEvent.js.map\n","/*! @azure/msal-common v7.6.0 2022-10-10 */\n'use strict';\nimport { __extends } from '../../_virtual/_tslib.js';\nimport { PerformanceClient } from './PerformanceClient.js';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nvar StubPerformanceMeasurement = /** @class */ (function () {\r\n function StubPerformanceMeasurement() {\r\n }\r\n /* eslint-disable-next-line @typescript-eslint/no-empty-function */\r\n StubPerformanceMeasurement.prototype.startMeasurement = function () { };\r\n /* eslint-disable-next-line @typescript-eslint/no-empty-function */\r\n StubPerformanceMeasurement.prototype.endMeasurement = function () { };\r\n StubPerformanceMeasurement.prototype.flushMeasurement = function () {\r\n return null;\r\n };\r\n return StubPerformanceMeasurement;\r\n}());\r\nvar StubPerformanceClient = /** @class */ (function (_super) {\r\n __extends(StubPerformanceClient, _super);\r\n function StubPerformanceClient() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n StubPerformanceClient.prototype.generateId = function () {\r\n return \"callback-id\";\r\n };\r\n StubPerformanceClient.prototype.startPerformanceMeasuremeant = function () {\r\n return new StubPerformanceMeasurement();\r\n };\r\n return StubPerformanceClient;\r\n}(PerformanceClient));\n\nexport { StubPerformanceClient, StubPerformanceMeasurement };\n//# sourceMappingURL=StubPerformanceClient.js.map\n","/*! @azure/msal-common v7.6.0 2022-10-10 */\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 || Constants.EMPTY_STRING);\r\n regionDiscoveryFields.push(this.regionSource || Constants.EMPTY_STRING);\r\n regionDiscoveryFields.push(this.regionOutcome || Constants.EMPTY_STRING);\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 v7.6.0 2022-10-10 */\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 Constants.EMPTY_STRING;\r\n };\r\n /**\r\n * Parses query string from given string. Returns empty string if no query symbol is found.\r\n * @param queryString\r\n */\r\n UrlString.parseQueryString = function (queryString) {\r\n var queryIndex1 = queryString.indexOf(\"?\");\r\n var queryIndex2 = queryString.indexOf(\"/?\");\r\n if (queryIndex2 > -1) {\r\n return queryString.substring(queryIndex2 + 2);\r\n }\r\n else if (queryIndex1 > -1) {\r\n return queryString.substring(queryIndex1 + 1);\r\n }\r\n return Constants.EMPTY_STRING;\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 * Returns URL query string as server auth code response object.\r\n */\r\n UrlString.getDeserializedQueryString = function (query) {\r\n // Check if given query is empty\r\n if (StringUtils.isEmpty(query)) {\r\n return {};\r\n }\r\n // Strip the ? symbol if present\r\n var parsedQueryString = UrlString.parseQueryString(query);\r\n // If ? symbol was not present, above will return empty string, so give original query value\r\n var deserializedQueryString = StringUtils.queryStringToObject(StringUtils.isEmpty(parsedQueryString) ? query : parsedQueryString);\r\n // Check if deserialization didn't work\r\n if (!deserializedQueryString) {\r\n throw ClientAuthError.createHashNotDeserializedError(JSON.stringify(deserializedQueryString));\r\n }\r\n return deserializedQueryString;\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 v7.6.0 2022-10-10 */\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 DEFAULT_COMMON_TENANT: \"common\",\r\n // ADFS String\r\n ADFS: \"adfs\",\r\n DSTS: \"dstsv2\",\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 REGIONAL_AUTH_NON_MSI_QUERY_STRING: \"allowestsrnonmsi=true\",\r\n KNOWN_PUBLIC_CLOUDS: [\"login.microsoftonline.com\", \"login.windows.net\", \"login.microsoft.com\", \"sts.windows.net\"],\r\n TOKEN_RESPONSE_TYPE: \"token\",\r\n ID_TOKEN_RESPONSE_TYPE: \"id_token\",\r\n SHR_NONCE_VALIDITY: 240\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[\"X_MS_REQUEST_ID\"] = \"x-ms-request-id\";\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[\"ACTIVE_ACCOUNT_FILTERS\"] = \"active-account-filters\"; // new cache entry for active_account for a more robust version for browser\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[\"X_APP_NAME\"] = \"x-app-name\";\r\n AADServerParamKeys[\"X_APP_VER\"] = \"x-app-ver\";\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[\"RETURN_SPA_CODE\"] = \"return_spa_code\";\r\n AADServerParamKeys[\"NATIVE_BROKER\"] = \"nativebroker\";\r\n AADServerParamKeys[\"LOGOUT_HINT\"] = \"logout_hint\";\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 NO_SESSION: \"no_session\"\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[\"HARDCODED_VALUES\"] = \"hardcoded_values\";\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 = {}));\r\nvar JsonTypes;\r\n(function (JsonTypes) {\r\n JsonTypes[\"Jwt\"] = \"JWT\";\r\n JsonTypes[\"Jwk\"] = \"JWK\";\r\n})(JsonTypes || (JsonTypes = {}));\r\nvar ONE_DAY_IN_MS = 86400000;\n\nexport { AADAuthorityConstants, AADServerParamKeys, APP_METADATA, AUTHORITY_METADATA_CONSTANTS, AuthenticationScheme, AuthorityMetadataSource, CLIENT_INFO, CacheAccountType, CacheOutcome, CacheSchemaType, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, Errors, GrantType, HeaderNames, JsonTypes, OIDC_DEFAULT_SCOPES, OIDC_SCOPES, ONE_DAY_IN_MS, 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 v7.6.0 2022-10-10 */\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) : Constants.EMPTY_STRING;\r\n var libraryStateString = cryptoObj.base64Decode(libraryState);\r\n var libraryStateObj = JSON.parse(libraryStateString);\r\n return {\r\n userRequestState: !StringUtils.isEmpty(userState) ? userState : Constants.EMPTY_STRING,\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 v7.6.0 2022-10-10 */\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 v7.6.0 2022-10-10 */\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","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}"],"names":["name","version","RequestParameterBuilder","this","parameters","Map","prototype","addResponseTypeCode","set","encodeURIComponent","addResponseTypeForTokenAndIdToken","addResponseMode","responseMode","addNativeBroker","addScopes","scopes","addOidcScopes","requestScopes","scopeSet","printScopes","addClientId","clientId","addRedirectUri","redirectUri","addPostLogoutRedirectUri","addIdTokenHint","idTokenHint","addDomainHint","domainHint","addLoginHint","loginHint","addCcsUpn","addCcsOid","clientInfo","uid","utid","addSid","sid","addClaims","claims","clientCapabilities","mergedClaims","addClientCapabilitiesToClaims","addCorrelationId","correlationId","addLibraryInfo","libraryInfo","sku","os","cpu","addApplicationTelemetry","appTelemetry","appName","appVersion","addPrompt","prompt","addState","state","addNonce","nonce","addCodeChallengeParams","codeChallenge","codeChallengeMethod","addAuthorizationCode","code","addDeviceCode","addRefreshToken","refreshToken","addCodeVerifier","codeVerifier","addClientSecret","clientSecret","addClientAssertion","clientAssertion","addClientAssertionType","clientAssertionType","addOboAssertion","oboAssertion","addRequestTokenUse","tokenUse","addGrantType","grantType","addClientInfo","addExtraQueryParameters","eQparams","_this","Object","keys","forEach","key","JSON","parse","e","length","hasOwnProperty","values","stringify","addUsername","username","addPassword","password","addPopToken","cnfString","addSshJwk","sshJwkString","addServerTelemetry","serverTelemetryManager","generateCurrentRequestHeaderValue","generateLastRequestHeaderValue","addThrottling","addLogoutHint","logoutHint","createQueryString","queryParameterArray","Array","value","push","join","RequestValidator","validateRedirectUri","validatePrompt","promptValues","indexOf","validateClaims","validateCodeChallengeParams","validateCodeChallengeMethod","sanitizeEQParams","eQParams","queryParams","ScopeSet","inputScopes","scopeArr","filteredInput","validateInputScopes","Set","scope","add","fromString","inputScopeString","scopeString","split","containsScope","lowerCaseScopes","printScopesLowerCase","lowerCaseScopesSet","has","toLowerCase","containsScopeSet","size","asArray","every","containsOnlyOIDCScopes","defaultScopeCount","defaultScope","appendScope","newScope","trim","appendScopes","newScopes","removeScope","delete","removeOIDCScopes","unionScopeSets","otherScopes","unionScopes","intersectingScopeSets","sizeOtherScopes","getScopeCount","sizeThisScopes","sizeUnionScopes","array","val","ResponseHandler","cacheStorage","cryptoObj","logger","serializableCache","persistencePlugin","validateServerAuthorizationCodeResponse","serverResponseHash","cachedState","decodeURIComponent","error","error_description","suberror","client_info","validateTokenResponse","serverResponse","errString","error_codes","timestamp","correlation_id","trace_id","handleServerTokenResponse","serverTokenResponse","authority","reqTimestamp","request","authCodePayload","userAssertionHash","handlingRefreshTokenResponse","forceCacheRefreshTokenResponse","serverRequestId","idTokenObj","authTime","requestStateObj","cacheRecord","cacheContext","account","_a","label","id_token","maxAge","auth_time","homeAccountIdentifier","authorityType","key_id","sshKid","undefined","generateCacheRecord","trys","verbose","beforeCacheAccess","sent","generateAccountKey","getAccount","warning","generateAuthenticationResult","saveCacheRecord","afterCacheAccess","spa_code","cachedIdToken","cachedAccount","env","getPreferredCache","tid","generateAccountEntity","cachedAccessToken","access_token","responseScopes","expiresIn","expires_in","parseInt","extExpiresIn","ext_expires_in","refreshIn","refresh_in","tokenExpirationSeconds","extendedTokenExpirationSeconds","refreshOnSeconds","tenant","token_type","requestedClaimsHash","cachedRefreshToken","refresh_token","foci","cachedAppMetadata","idToken","cloudGraphHostName","cloud_graph_host_name","msGraphhost","msgraph_host","protocolMode","fromTokenCache","requestState","requestId","_b","_c","accessToken","expiresOn","extExpiresOn","familyId","popTokenGenerator","_d","secret","keyId","_e","tokenType","signPopToken","target","Date","Number","extendedExpiresOn","appMetadata","oid","sub","canonicalAuthority","uniqueId","tenantId","getAccountInfo","rawToken","idTokenClaims","fromCache","userRequestState","msGraphHost","fromNativeBroker","PerformanceClient","libraryName","libraryVersion","applicationTelemetry","callbacks","eventsByCorrelationId","measurementsById","startMeasurement","measureName","eventCorrelationId","generateId","info","trace","performanceMeasurement","startPerformanceMeasuremeant","inProgressEvent","eventId","status","startTimeMs","now","cacheEventByCorrelationId","cacheMeasurement","endMeasurement","event","completedEvent","flushMeasurement","flushMeasurements","discardMeasurement","discardMeasurements","measurement","get","durationMs","Math","round","existingEvents","eventsForCorrelationId","completedEvents_1","sortedCompletedEvents","sort","eventA","eventB","topLevelEvents","filter","topLevelEvent","eventToEmit","reduce","previous","current","subMeasurementName","accessTokenSize","idTokenSize","refreshTokenSize","emitEvents","addPerformanceCallback","callback","callbackId","removePerformanceCallback","result","events","apply","PerformanceEvents","PerformanceEventStatus","StubPerformanceMeasurement","StubPerformanceClient","_super","arguments","ServerTelemetryManager","telemetryRequest","cacheManager","cacheOutcome","apiId","wrapperSKU","wrapperVer","telemetryCacheKey","platformFields","regionDiscoveryFields","getRegionDiscoveryFields","requestWithRegionDiscoveryFields","lastRequests","getLastRequests","maxErrors","maxErrorsToSend","failedRequests","slice","errors","errorCount","overflow","cacheHits","cacheFailedRequest","shift","subError","errorCode","toString","setServerTelemetry","incrementCacheHits","initialValue","getServerTelemetry","clearTelemetryCache","numErrorsFlushed","removeItem","serverTelemEntity","serverTelemetryEntity","i","dataSize","regionUsed","regionSource","regionOutcome","updateRegionDiscoveryMetadata","regionDiscoveryMetadata","region_used","region_source","region_outcome","setCacheOutcome","UrlString","url","_urlString","getHash","canonicalizeUri","defineProperty","enumerable","configurable","lowerCaseUrl","validateAsUri","components","getUrlComponents","HostNameAndPort","PathSegments","urlString","Protocol","appendQueryString","queryString","removeHashFromUrl","replaceTenantPath","urlObject","pathArray","constructAuthorityUriFromObject","parseHash","regEx","RegExp","match","urlComponents","AbsolutePath","QueryString","pathSegments","endsWith","substring","getDomainFromUrl","getAbsoluteUrl","relativeUrl","baseUrl","baseComponents","hashString","hashIndex1","hashIndex2","parseQueryString","queryIndex1","queryIndex2","getDeserializedHash","hash","parsedHash","deserializedHash","getDeserializedQueryString","query","parsedQueryString","deserializedQueryString","hashContainsKnownProperties","HeaderNames","PersistentCacheKeys","AADAuthorityConstants","AADServerParamKeys","ClaimsRequestKeys","Constants","LIBRARY_NAME","SKU","CACHE_PREFIX","DEFAULT_AUTHORITY","DEFAULT_AUTHORITY_HOST","DEFAULT_COMMON_TENANT","ADFS","DSTS","AAD_INSTANCE_DISCOVERY_ENDPT","RESOURCE_DELIM","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","FORWARD_SLASH","IMDS_ENDPOINT","IMDS_VERSION","IMDS_TIMEOUT","AZURE_REGION_AUTO_DISCOVER_FLAG","REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX","REGIONAL_AUTH_NON_MSI_QUERY_STRING","KNOWN_PUBLIC_CLOUDS","TOKEN_RESPONSE_TYPE","ID_TOKEN_RESPONSE_TYPE","SHR_NONCE_VALIDITY","OIDC_DEFAULT_SCOPES","OIDC_SCOPES","SSOTypes","PromptValue","LOGIN","SELECT_ACCOUNT","CONSENT","NONE","CREATE","NO_SESSION","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","JsonTypes","ThrottlingConstants","DEFAULT_THROTTLE_TIME_SECONDS","DEFAULT_MAX_THROTTLE_TIME_SECONDS","THROTTLING_PREFIX","X_MS_LIB_CAPABILITY_VALUE","Errors","INVALID_GRANT_ERROR","CLIENT_MISMATCH_ERROR","ProtocolUtils","setRequestState","userState","meta","libraryState","generateLibraryState","stateObj","id","createNewGuid","stateString","base64Encode","parseRequestState","splitState","libraryStateString","base64Decode","libraryStateObj","StringUtils","decodeAuthToken","authToken","isEmpty","tokenPartsRegex","matches","exec","crackedToken","header","JWSPayload","JWSSig","str","isEmptyObj","strObj","obj","startsWith","search","lastIndexOf","queryStringToObject","params","decode","s","replace","pair","trimArrayEntries","arr","map","entry","removeEmptyStringsFromArray","jsonParseHelper","matchPattern","pattern","input","regex","test","TimeUtils","nowSeconds","getTime","isTokenExpired","offset","expirationSec","offsetCurrentTimeSec","wasClockTurnedBack","cachedAt","cachedAtSec","delay","t","Promise","resolve","setTimeout","_typeof","Symbol","iterator","constructor","_toPrimitive","hint","prim","toPrimitive","res","call","TypeError","String","_toPropertyKey","arg","_defineProperty","toPropertyKey","writable"],"sourceRoot":""}