@azure/msal-browser
Version:
Microsoft Authentication Library for js
48 lines (44 loc) • 317 kB
JavaScript
/*! @azure/msal-browser v2.28.1 2022-08-01 */
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).msal={})}(this,(function(e){
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},t(e,r)};function r(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function o(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function i(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function a(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}
/*! @azure/msal-common v7.3.0 2022-08-01 */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var c=function(e,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},c(e,t)};function u(e,t){function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function d(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function h(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function p(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}
/*! @azure/msal-common v7.3.0 2022-08-01 */var g,f,m,v,y,E={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240},C=[E.OPENID_SCOPE,E.PROFILE_SCOPE,E.OFFLINE_ACCESS_SCOPE],_=p(C,[E.EMAIL_SCOPE]);!function(e){e.CONTENT_TYPE="Content-Type",e.RETRY_AFTER="Retry-After",e.CCS_HEADER="X-AnchorMailbox",e.WWWAuthenticate="WWW-Authenticate",e.AuthenticationInfo="Authentication-Info"}(g||(g={})),function(e){e.ID_TOKEN="idtoken",e.CLIENT_INFO="client.info",e.ADAL_ID_TOKEN="adal.idtoken",e.ERROR="error",e.ERROR_DESC="error.description",e.ACTIVE_ACCOUNT="active-account",e.ACTIVE_ACCOUNT_FILTERS="active-account-filters"}(f||(f={})),function(e){e.COMMON="common",e.ORGANIZATIONS="organizations",e.CONSUMERS="consumers"}(m||(m={})),function(e){e.CLIENT_ID="client_id",e.REDIRECT_URI="redirect_uri",e.RESPONSE_TYPE="response_type",e.RESPONSE_MODE="response_mode",e.GRANT_TYPE="grant_type",e.CLAIMS="claims",e.SCOPE="scope",e.ERROR="error",e.ERROR_DESCRIPTION="error_description",e.ACCESS_TOKEN="access_token",e.ID_TOKEN="id_token",e.REFRESH_TOKEN="refresh_token",e.EXPIRES_IN="expires_in",e.STATE="state",e.NONCE="nonce",e.PROMPT="prompt",e.SESSION_STATE="session_state",e.CLIENT_INFO="client_info",e.CODE="code",e.CODE_CHALLENGE="code_challenge",e.CODE_CHALLENGE_METHOD="code_challenge_method",e.CODE_VERIFIER="code_verifier",e.CLIENT_REQUEST_ID="client-request-id",e.X_CLIENT_SKU="x-client-SKU",e.X_CLIENT_VER="x-client-VER",e.X_CLIENT_OS="x-client-OS",e.X_CLIENT_CPU="x-client-CPU",e.X_CLIENT_CURR_TELEM="x-client-current-telemetry",e.X_CLIENT_LAST_TELEM="x-client-last-telemetry",e.X_MS_LIB_CAPABILITY="x-ms-lib-capability",e.X_APP_NAME="x-app-name",e.X_APP_VER="x-app-ver",e.POST_LOGOUT_URI="post_logout_redirect_uri",e.ID_TOKEN_HINT="id_token_hint",e.DEVICE_CODE="device_code",e.CLIENT_SECRET="client_secret",e.CLIENT_ASSERTION="client_assertion",e.CLIENT_ASSERTION_TYPE="client_assertion_type",e.TOKEN_TYPE="token_type",e.REQ_CNF="req_cnf",e.OBO_ASSERTION="assertion",e.REQUESTED_TOKEN_USE="requested_token_use",e.ON_BEHALF_OF="on_behalf_of",e.FOCI="foci",e.CCS_HEADER="X-AnchorMailbox",e.RETURN_SPA_CODE="return_spa_code",e.NATIVE_BROKER="nativebroker",e.LOGOUT_HINT="logout_hint"}(v||(v={})),function(e){e.ACCESS_TOKEN="access_token",e.XMS_CC="xms_cc"}(y||(y={}));var T,w={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create"};!function(e){e.ACCOUNT="account",e.SID="sid",e.LOGIN_HINT="login_hint",e.ID_TOKEN="id_token",e.DOMAIN_HINT="domain_hint",e.ORGANIZATIONS="organizations",e.CONSUMERS="consumers",e.ACCOUNT_ID="accountIdentifier",e.HOMEACCOUNT_ID="homeAccountIdentifier"}(T||(T={}));var I,S,A,b,R,k,N,P={PLAIN:"plain",S256:"S256"};!function(e){e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post"}(I||(I={})),function(e){e.IMPLICIT_GRANT="implicit",e.AUTHORIZATION_CODE_GRANT="authorization_code",e.CLIENT_CREDENTIALS_GRANT="client_credentials",e.RESOURCE_OWNER_PASSWORD_GRANT="password",e.REFRESH_TOKEN_GRANT="refresh_token",e.DEVICE_CODE_GRANT="device_code",e.JWT_BEARER="urn:ietf:params:oauth:grant-type:jwt-bearer"}(S||(S={})),function(e){e.MSSTS_ACCOUNT_TYPE="MSSTS",e.ADFS_ACCOUNT_TYPE="ADFS",e.MSAV1_ACCOUNT_TYPE="MSA",e.GENERIC_ACCOUNT_TYPE="Generic"}(A||(A={})),function(e){e.CACHE_KEY_SEPARATOR="-",e.CLIENT_INFO_SEPARATOR="."}(b||(b={})),function(e){e.ID_TOKEN="IdToken",e.ACCESS_TOKEN="AccessToken",e.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",e.REFRESH_TOKEN="RefreshToken"}(R||(R={})),function(e){e.ACCOUNT="Account",e.CREDENTIAL="Credential",e.ID_TOKEN="IdToken",e.ACCESS_TOKEN="AccessToken",e.REFRESH_TOKEN="RefreshToken",e.APP_METADATA="AppMetadata",e.TEMPORARY="TempCache",e.TELEMETRY="Telemetry",e.UNDEFINED="Undefined",e.THROTTLING="Throttling"}(k||(k={})),function(e){e[e.ADFS=1001]="ADFS",e[e.MSA=1002]="MSA",e[e.MSSTS=1003]="MSSTS",e[e.GENERIC=1004]="GENERIC",e[e.ACCESS_TOKEN=2001]="ACCESS_TOKEN",e[e.REFRESH_TOKEN=2002]="REFRESH_TOKEN",e[e.ID_TOKEN=2003]="ID_TOKEN",e[e.APP_METADATA=3001]="APP_METADATA",e[e.UNDEFINED=9999]="UNDEFINED"}(N||(N={}));var O,M="appmetadata",U="1",q="authority-metadata",H=86400;!function(e){e.CONFIG="config",e.CACHE="cache",e.NETWORK="network",e.HARDCODED_VALUES="hardcoded_values"}(O||(O={}));var L,D={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"};e.AuthenticationScheme=void 0,(L=e.AuthenticationScheme||(e.AuthenticationScheme={})).BEARER="Bearer",L.POP="pop",L.SSH="ssh-cert";var F,x,K,B,G,z,j=60,Y=3600,W="throttling",V="retry-after, h429",J="invalid_grant",Q="client_mismatch";!function(e){e.username="username",e.password="password"}(F||(F={})),function(e){e[e.httpSuccess=200]="httpSuccess",e[e.httpBadRequest=400]="httpBadRequest"}(x||(x={})),function(e){e.FAILED_AUTO_DETECTION="1",e.INTERNAL_CACHE="2",e.ENVIRONMENT_VARIABLE="3",e.IMDS="4"}(K||(K={})),function(e){e.CONFIGURED_MATCHES_DETECTED="1",e.CONFIGURED_NO_AUTO_DETECTION="2",e.CONFIGURED_NOT_DETECTED="3",e.AUTO_DETECTION_REQUESTED_SUCCESSFUL="4",e.AUTO_DETECTION_REQUESTED_FAILED="5"}(B||(B={})),function(e){e.NO_CACHE_HIT="0",e.FORCE_REFRESH="1",e.NO_CACHED_ACCESS_TOKEN="2",e.CACHED_ACCESS_TOKEN_EXPIRED="3",e.REFRESH_CACHED_ACCESS_TOKEN="4"}(G||(G={})),function(e){e.Jwt="JWT",e.Jwk="JWK"}(z||(z={}));
/*! @azure/msal-common v7.3.0 2022-08-01 */
var X,Z={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."},postRequestFailed:{code:"post_request_failed",desc:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."}},$=function(e){function t(r,n,o){var i=this,a=n?r+": "+n:r;return i=e.call(this,a)||this,Object.setPrototypeOf(i,t.prototype),i.errorCode=r||E.EMPTY_STRING,i.errorMessage=n||E.EMPTY_STRING,i.subError=o||E.EMPTY_STRING,i.name="AuthError",i}return u(t,e),t.prototype.setCorrelationId=function(e){this.correlationId=e},t.createUnexpectedError=function(e){return new t(Z.unexpectedError.code,Z.unexpectedError.desc+": "+e)},t.createPostRequestFailed=function(e){return new t(Z.postRequestFailed.code,Z.postRequestFailed.desc+": "+e)},t}(Error),ee={createNewGuid:function(){throw $.createUnexpectedError("Crypto interface - createNewGuid() has not been implemented")},base64Decode:function(){throw $.createUnexpectedError("Crypto interface - base64Decode() has not been implemented")},base64Encode:function(){throw $.createUnexpectedError("Crypto interface - base64Encode() has not been implemented")},generatePkceCodes:function(){return d(this,void 0,void 0,(function(){return h(this,(function(e){throw"Crypto interface - generatePkceCodes() has not been implemented",$.createUnexpectedError("Crypto interface - generatePkceCodes() has not been implemented")}))}))},getPublicKeyThumbprint:function(){return d(this,void 0,void 0,(function(){return h(this,(function(e){throw"Crypto interface - getPublicKeyThumbprint() has not been implemented",$.createUnexpectedError("Crypto interface - getPublicKeyThumbprint() has not been implemented")}))}))},removeTokenBindingKey:function(){return d(this,void 0,void 0,(function(){return h(this,(function(e){throw"Crypto interface - removeTokenBindingKey() has not been implemented",$.createUnexpectedError("Crypto interface - removeTokenBindingKey() has not been implemented")}))}))},clearKeystore:function(){return d(this,void 0,void 0,(function(){return h(this,(function(e){throw"Crypto interface - clearKeystore() has not been implemented",$.createUnexpectedError("Crypto interface - clearKeystore() has not been implemented")}))}))},signJwt:function(){return d(this,void 0,void 0,(function(){return h(this,(function(e){throw"Crypto interface - signJwt() has not been implemented",$.createUnexpectedError("Crypto interface - signJwt() has not been implemented")}))}))},hashString:function(){return d(this,void 0,void 0,(function(){return h(this,(function(e){throw"Crypto interface - hashString() has not been implemented",$.createUnexpectedError("Crypto interface - hashString() has not been implemented")}))}))}},te={clientInfoDecodingError:{code:"client_info_decoding_error",desc:"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause."},clientInfoEmptyError:{code:"client_info_empty_error",desc:"The client info was empty. Please review the trace to determine the root cause."},tokenParsingError:{code:"token_parsing_error",desc:"Token cannot be parsed. Please review stack trace to determine root cause."},nullOrEmptyToken:{code:"null_or_empty_token",desc:"The token is null or empty. Please review the trace to determine the root cause."},endpointResolutionError:{code:"endpoints_resolution_error",desc:"Error: could not resolve endpoints. Please check network and try again."},networkError:{code:"network_error",desc:"Network request failed. Please check network trace to determine root cause."},unableToGetOpenidConfigError:{code:"openid_config_error",desc:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints."},hashNotDeserialized:{code:"hash_not_deserialized",desc:"The hash parameters could not be deserialized. Please review the trace to determine the root cause."},blankGuidGenerated:{code:"blank_guid_generated",desc:"The guid generated was blank. Please review the trace to determine the root cause."},invalidStateError:{code:"invalid_state",desc:"State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState()."},stateMismatchError:{code:"state_mismatch",desc:"State mismatch error. Please check your network. Continued requests may cause cache overflow."},stateNotFoundError:{code:"state_not_found",desc:"State not found"},nonceMismatchError:{code:"nonce_mismatch",desc:"Nonce mismatch error. This may be caused by a race condition in concurrent requests."},nonceNotFoundError:{code:"nonce_not_found",desc:"nonce not found"},noTokensFoundError:{code:"no_tokens_found",desc:"No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken()."},multipleMatchingTokens:{code:"multiple_matching_tokens",desc:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account."},multipleMatchingAccounts:{code:"multiple_matching_accounts",desc:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account"},multipleMatchingAppMetadata:{code:"multiple_matching_appMetadata",desc:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata"},tokenRequestCannotBeMade:{code:"request_cannot_be_made",desc:"Token request cannot be made without authorization code or refresh token."},appendEmptyScopeError:{code:"cannot_append_empty_scope",desc:"Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info."},removeEmptyScopeError:{code:"cannot_remove_empty_scope",desc:"Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info."},appendScopeSetError:{code:"cannot_append_scopeset",desc:"Cannot append ScopeSet due to error."},emptyInputScopeSetError:{code:"empty_input_scopeset",desc:"Empty input ScopeSet cannot be processed."},DeviceCodePollingCancelled:{code:"device_code_polling_cancelled",desc:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true."},DeviceCodeExpired:{code:"device_code_expired",desc:"Device code is expired."},DeviceCodeUnknownError:{code:"device_code_unknown_error",desc:"Device code stopped polling for unknown reasons."},NoAccountInSilentRequest:{code:"no_account_in_silent_request",desc:"Please pass an account object, silent flow is not supported without account information"},invalidCacheRecord:{code:"invalid_cache_record",desc:"Cache record object was null or undefined."},invalidCacheEnvironment:{code:"invalid_cache_environment",desc:"Invalid environment when attempting to create cache entry"},noAccountFound:{code:"no_account_found",desc:"No account found in cache for given key."},CachePluginError:{code:"no cache plugin set on CacheManager",desc:"ICachePlugin needs to be set before using readFromStorage or writeFromStorage"},noCryptoObj:{code:"no_crypto_object",desc:"No crypto object detected. This is required for the following operation: "},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},unexpectedAccountType:{code:"unexpected_account_type",desc:"Unexpected account type."},unexpectedCredentialType:{code:"unexpected_credential_type",desc:"Unexpected credential type."},invalidAssertion:{code:"invalid_assertion",desc:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515"},invalidClientCredential:{code:"invalid_client_credential",desc:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential"},tokenRefreshRequired:{code:"token_refresh_required",desc:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired."},userTimeoutReached:{code:"user_timeout_reached",desc:"User defined timeout for device code polling reached"},tokenClaimsRequired:{code:"token_claims_cnf_required_for_signedjwt",desc:"Cannot generate a POP jwt if the token_claims are not populated"},noAuthorizationCodeFromServer:{code:"authorization_code_missing_from_server_response",desc:"Server response does not contain an authorization code to proceed"},noAzureRegionDetected:{code:"no_azure_region_detected",desc:"No azure region was detected and no fallback was made available"},accessTokenEntityNullError:{code:"access_token_entity_null",desc:"Access token entity is null, please check logs and cache to ensure a valid access token is present."},bindingKeyNotRemovedError:{code:"binding_key_not_removed",desc:"Could not remove the credential's binding key from storage."},logoutNotSupported:{code:"end_session_endpoint_not_supported",desc:"Provided authority does not support logout."},keyIdMissing:{code:"key_id_missing",desc:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key."}},re=function(e){function t(r,n){var o=e.call(this,r,n)||this;return o.name="ClientAuthError",Object.setPrototypeOf(o,t.prototype),o}return u(t,e),t.createClientInfoDecodingError=function(e){return new t(te.clientInfoDecodingError.code,te.clientInfoDecodingError.desc+" Failed with error: "+e)},t.createClientInfoEmptyError=function(){return new t(te.clientInfoEmptyError.code,""+te.clientInfoEmptyError.desc)},t.createTokenParsingError=function(e){return new t(te.tokenParsingError.code,te.tokenParsingError.desc+" Failed with error: "+e)},t.createTokenNullOrEmptyError=function(e){return new t(te.nullOrEmptyToken.code,te.nullOrEmptyToken.desc+" Raw Token Value: "+e)},t.createEndpointDiscoveryIncompleteError=function(e){return new t(te.endpointResolutionError.code,te.endpointResolutionError.desc+" Detail: "+e)},t.createNetworkError=function(e,r){return new t(te.networkError.code,te.networkError.desc+" | Fetch client threw: "+r+" | Attempted to reach: "+e.split("?")[0])},t.createUnableToGetOpenidConfigError=function(e){return new t(te.unableToGetOpenidConfigError.code,te.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+e)},t.createHashNotDeserializedError=function(e){return new t(te.hashNotDeserialized.code,te.hashNotDeserialized.desc+" Given Object: "+e)},t.createInvalidStateError=function(e,r){return new t(te.invalidStateError.code,te.invalidStateError.desc+" Invalid State: "+e+", Root Err: "+r)},t.createStateMismatchError=function(){return new t(te.stateMismatchError.code,te.stateMismatchError.desc)},t.createStateNotFoundError=function(e){return new t(te.stateNotFoundError.code,te.stateNotFoundError.desc+": "+e)},t.createNonceMismatchError=function(){return new t(te.nonceMismatchError.code,te.nonceMismatchError.desc)},t.createNonceNotFoundError=function(e){return new t(te.nonceNotFoundError.code,te.nonceNotFoundError.desc+": "+e)},t.createMultipleMatchingTokensInCacheError=function(){return new t(te.multipleMatchingTokens.code,te.multipleMatchingTokens.desc+".")},t.createMultipleMatchingAccountsInCacheError=function(){return new t(te.multipleMatchingAccounts.code,te.multipleMatchingAccounts.desc)},t.createMultipleMatchingAppMetadataInCacheError=function(){return new t(te.multipleMatchingAppMetadata.code,te.multipleMatchingAppMetadata.desc)},t.createTokenRequestCannotBeMadeError=function(){return new t(te.tokenRequestCannotBeMade.code,te.tokenRequestCannotBeMade.desc)},t.createAppendEmptyScopeToSetError=function(e){return new t(te.appendEmptyScopeError.code,te.appendEmptyScopeError.desc+" Given Scope: "+e)},t.createRemoveEmptyScopeFromSetError=function(e){return new t(te.removeEmptyScopeError.code,te.removeEmptyScopeError.desc+" Given Scope: "+e)},t.createAppendScopeSetError=function(e){return new t(te.appendScopeSetError.code,te.appendScopeSetError.desc+" Detail Error: "+e)},t.createEmptyInputScopeSetError=function(){return new t(te.emptyInputScopeSetError.code,""+te.emptyInputScopeSetError.desc)},t.createDeviceCodeCancelledError=function(){return new t(te.DeviceCodePollingCancelled.code,""+te.DeviceCodePollingCancelled.desc)},t.createDeviceCodeExpiredError=function(){return new t(te.DeviceCodeExpired.code,""+te.DeviceCodeExpired.desc)},t.createDeviceCodeUnknownError=function(){return new t(te.DeviceCodeUnknownError.code,""+te.DeviceCodeUnknownError.desc)},t.createNoAccountInSilentRequestError=function(){return new t(te.NoAccountInSilentRequest.code,""+te.NoAccountInSilentRequest.desc)},t.createNullOrUndefinedCacheRecord=function(){return new t(te.invalidCacheRecord.code,te.invalidCacheRecord.desc)},t.createInvalidCacheEnvironmentError=function(){return new t(te.invalidCacheEnvironment.code,te.invalidCacheEnvironment.desc)},t.createNoAccountFoundError=function(){return new t(te.noAccountFound.code,te.noAccountFound.desc)},t.createCachePluginError=function(){return new t(te.CachePluginError.code,""+te.CachePluginError.desc)},t.createNoCryptoObjectError=function(e){return new t(te.noCryptoObj.code,""+te.noCryptoObj.desc+e)},t.createInvalidCacheTypeError=function(){return new t(te.invalidCacheType.code,""+te.invalidCacheType.desc)},t.createUnexpectedAccountTypeError=function(){return new t(te.unexpectedAccountType.code,""+te.unexpectedAccountType.desc)},t.createUnexpectedCredentialTypeError=function(){return new t(te.unexpectedCredentialType.code,""+te.unexpectedCredentialType.desc)},t.createInvalidAssertionError=function(){return new t(te.invalidAssertion.code,""+te.invalidAssertion.desc)},t.createInvalidCredentialError=function(){return new t(te.invalidClientCredential.code,""+te.invalidClientCredential.desc)},t.createRefreshRequiredError=function(){return new t(te.tokenRefreshRequired.code,te.tokenRefreshRequired.desc)},t.createUserTimeoutReachedError=function(){return new t(te.userTimeoutReached.code,te.userTimeoutReached.desc)},t.createTokenClaimsRequiredError=function(){return new t(te.tokenClaimsRequired.code,te.tokenClaimsRequired.desc)},t.createNoAuthCodeInServerResponseError=function(){return new t(te.noAuthorizationCodeFromServer.code,te.noAuthorizationCodeFromServer.desc)},t.createBindingKeyNotRemovedError=function(){return new t(te.bindingKeyNotRemovedError.code,te.bindingKeyNotRemovedError.desc)},t.createLogoutNotSupportedError=function(){return new t(te.logoutNotSupported.code,te.logoutNotSupported.desc)},t.createKeyIdMissingError=function(){return new t(te.keyIdMissing.code,te.keyIdMissing.desc)},t}($),ne=function(){function e(){}return e.decodeAuthToken=function(t){if(e.isEmpty(t))throw re.createTokenNullOrEmptyError(t);var r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);if(!r||r.length<4)throw re.createTokenParsingError("Given token is malformed: "+JSON.stringify(t));return{header:r[1],JWSPayload:r[2],JWSSig:r[3]}},e.isEmpty=function(e){return void 0===e||!e||0===e.length},e.isEmptyObj=function(t){if(t&&!e.isEmpty(t))try{var r=JSON.parse(t);return 0===Object.keys(r).length}catch(e){}return!0},e.startsWith=function(e,t){return 0===e.indexOf(t)},e.endsWith=function(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length},e.queryStringToObject=function(e){var t={},r=e.split("&"),n=function(e){return decodeURIComponent(e.replace(/\+/g," "))};return r.forEach((function(e){if(e.trim()){var r=e.split(/=(.+)/g,2),o=r[0],i=r[1];o&&i&&(t[n(o)]=n(i))}})),t},e.trimArrayEntries=function(e){return e.map((function(e){return e.trim()}))},e.removeEmptyStringsFromArray=function(t){return t.filter((function(t){return!e.isEmpty(t)}))},e.jsonParseHelper=function(e){try{return JSON.parse(e)}catch(e){return null}},e.matchPattern=function(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)},e}();
/*! @azure/msal-common v7.3.0 2022-08-01 */
e.LogLevel=void 0,(X=e.LogLevel||(e.LogLevel={}))[X.Error=0]="Error",X[X.Warning=1]="Warning",X[X.Info=2]="Info",X[X.Verbose=3]="Verbose",X[X.Trace=4]="Trace";var oe,ie=function(){function t(t,r,n){this.level=e.LogLevel.Info;this.localCallback=t.loggerCallback||function(){},this.piiLoggingEnabled=t.piiLoggingEnabled||!1,this.level="number"==typeof t.logLevel?t.logLevel:e.LogLevel.Info,this.correlationId=t.correlationId||E.EMPTY_STRING,this.packageName=r||E.EMPTY_STRING,this.packageVersion=n||E.EMPTY_STRING}return t.prototype.clone=function(e,r,n){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,r)},t.prototype.logMessage=function(t,r){if(!(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)){var n=(new Date).toUTCString(),o=(ne.isEmpty(r.correlationId)?ne.isEmpty(this.correlationId)?"["+n+"]":"["+n+"] : ["+this.correlationId+"]":"["+n+"] : ["+r.correlationId+"]")+" : "+this.packageName+"@"+this.packageVersion+" : "+e.LogLevel[r.logLevel]+" - "+t;this.executeCallback(r.logLevel,o,r.containsPii||!1)}},t.prototype.executeCallback=function(e,t,r){this.localCallback&&this.localCallback(e,t,r)},t.prototype.error=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Error,containsPii:!1,correlationId:r||E.EMPTY_STRING})},t.prototype.errorPii=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Error,containsPii:!0,correlationId:r||E.EMPTY_STRING})},t.prototype.warning=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Warning,containsPii:!1,correlationId:r||E.EMPTY_STRING})},t.prototype.warningPii=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Warning,containsPii:!0,correlationId:r||E.EMPTY_STRING})},t.prototype.info=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Info,containsPii:!1,correlationId:r||E.EMPTY_STRING})},t.prototype.infoPii=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Info,containsPii:!0,correlationId:r||E.EMPTY_STRING})},t.prototype.verbose=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Verbose,containsPii:!1,correlationId:r||E.EMPTY_STRING})},t.prototype.verbosePii=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Verbose,containsPii:!0,correlationId:r||E.EMPTY_STRING})},t.prototype.trace=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Trace,containsPii:!1,correlationId:r||E.EMPTY_STRING})},t.prototype.tracePii=function(t,r){this.logMessage(t,{logLevel:e.LogLevel.Trace,containsPii:!0,correlationId:r||E.EMPTY_STRING})},t.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},t}(),ae="7.3.0";
/*! @azure/msal-common v7.3.0 2022-08-01 */
/*! @azure/msal-common v7.3.0 2022-08-01 */
e.AzureCloudInstance=void 0,(oe=e.AzureCloudInstance||(e.AzureCloudInstance={}))[oe.None=0]="None",oe.AzurePublic="https://login.microsoftonline.com",oe.AzurePpe="https://login.windows-ppe.net",oe.AzureChina="https://login.chinacloudapi.cn",oe.AzureGermany="https://login.microsoftonline.de",oe.AzureUsGovernment="https://login.microsoftonline.us";
/*! @azure/msal-common v7.3.0 2022-08-01 */
var se,ce=function(){function t(){}return t.prototype.generateAccountId=function(){return t.generateAccountIdForCacheKey(this.homeAccountId,this.environment)},t.prototype.generateCredentialId=function(){return t.generateCredentialIdForCacheKey(this.credentialType,this.clientId,this.realm,this.familyId)},t.prototype.generateTarget=function(){return t.generateTargetForCacheKey(this.target)},t.prototype.generateCredentialKey=function(){return t.generateCredentialCacheKey(this.homeAccountId,this.environment,this.credentialType,this.clientId,this.realm,this.target,this.familyId,this.tokenType,this.requestedClaimsHash)},t.prototype.generateType=function(){switch(this.credentialType){case R.ID_TOKEN:return N.ID_TOKEN;case R.ACCESS_TOKEN:case R.ACCESS_TOKEN_WITH_AUTH_SCHEME:return N.ACCESS_TOKEN;case R.REFRESH_TOKEN:return N.REFRESH_TOKEN;default:throw re.createUnexpectedCredentialTypeError()}},t.getCredentialType=function(e){return-1!==e.indexOf(R.ACCESS_TOKEN.toLowerCase())?-1!==e.indexOf(R.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())?R.ACCESS_TOKEN_WITH_AUTH_SCHEME:R.ACCESS_TOKEN:-1!==e.indexOf(R.ID_TOKEN.toLowerCase())?R.ID_TOKEN:-1!==e.indexOf(R.REFRESH_TOKEN.toLowerCase())?R.REFRESH_TOKEN:E.NOT_DEFINED},t.generateCredentialCacheKey=function(e,t,r,n,o,i,a,s,c){return[this.generateAccountIdForCacheKey(e,t),this.generateCredentialIdForCacheKey(r,n,o,a),this.generateTargetForCacheKey(i),this.generateClaimsHashForCacheKey(c),this.generateSchemeForCacheKey(s)].join(b.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateAccountIdForCacheKey=function(e,t){return[e,t].join(b.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateCredentialIdForCacheKey=function(e,t,r,n){return[e,e===R.REFRESH_TOKEN&&n||t,r||E.EMPTY_STRING].join(b.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateTargetForCacheKey=function(e){return(e||E.EMPTY_STRING).toLowerCase()},t.generateClaimsHashForCacheKey=function(e){return(e||E.EMPTY_STRING).toLowerCase()},t.generateSchemeForCacheKey=function(t){return t&&t.toLowerCase()!==e.AuthenticationScheme.BEARER.toLowerCase()?t.toLowerCase():E.EMPTY_STRING},t}(),ue={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},claimsRequestParsingError:{code:"claims_request_parsing_error",desc:"Could not parse the given claims request object."},authorityUriInsecure:{code:"authority_uri_insecure",desc:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options"},urlParseError:{code:"url_parse_error",desc:"URL could not be parsed into appropriate segments."},urlEmptyError:{code:"empty_url_error",desc:"URL was empty or null."},emptyScopesError:{code:"empty_input_scopes_error",desc:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token."},nonArrayScopesError:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},clientIdSingleScopeError:{code:"clientid_input_scopes_error",desc:"Client ID can only be provided as a single scope."},invalidPrompt:{code:"invalid_prompt_value",desc:"Supported prompt values are 'login', 'select_account', 'consent', 'create' and 'none'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest"},invalidClaimsRequest:{code:"invalid_claims",desc:"Given claims parameter must be a stringified JSON object."},tokenRequestEmptyError:{code:"token_request_empty",desc:"Token request was empty and not found in cache."},logoutRequestEmptyError:{code:"logout_request_empty",desc:"The logout request was null or undefined."},invalidCodeChallengeMethod:{code:"invalid_code_challenge_method",desc:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".'},invalidCodeChallengeParams:{code:"pkce_params_missing",desc:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request"},invalidCloudDiscoveryMetadata:{code:"invalid_cloud_discovery_metadata",desc:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields"},invalidAuthorityMetadata:{code:"invalid_authority_metadata",desc:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields."},untrustedAuthority:{code:"untrusted_authority",desc:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."},invalidAzureCloudInstance:{code:"invalid_azure_cloud_instance",desc:"Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values"},missingSshJwk:{code:"missing_ssh_jwk",desc:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme."},missingSshKid:{code:"missing_ssh_kid",desc:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme."},missingNonceAuthenticationHeader:{code:"missing_nonce_authentication_header",desc:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce."},invalidAuthenticationHeader:{code:"invalid_authentication_header",desc:"Invalid authentication header provided"}},le=function(e){function t(r,n){var o=e.call(this,r,n)||this;return o.name="ClientConfigurationError",Object.setPrototypeOf(o,t.prototype),o}return u(t,e),t.createRedirectUriEmptyError=function(){return new t(ue.redirectUriNotSet.code,ue.redirectUriNotSet.desc)},t.createPostLogoutRedirectUriEmptyError=function(){return new t(ue.postLogoutUriNotSet.code,ue.postLogoutUriNotSet.desc)},t.createClaimsRequestParsingError=function(e){return new t(ue.claimsRequestParsingError.code,ue.claimsRequestParsingError.desc+" Given value: "+e)},t.createInsecureAuthorityUriError=function(e){return new t(ue.authorityUriInsecure.code,ue.authorityUriInsecure.desc+" Given URI: "+e)},t.createUrlParseError=function(e){return new t(ue.urlParseError.code,ue.urlParseError.desc+" Given Error: "+e)},t.createUrlEmptyError=function(){return new t(ue.urlEmptyError.code,ue.urlEmptyError.desc)},t.createEmptyScopesArrayError=function(){return new t(ue.emptyScopesError.code,""+ue.emptyScopesError.desc)},t.createClientIdSingleScopeError=function(e){return new t(ue.clientIdSingleScopeError.code,ue.clientIdSingleScopeError.desc+" Given Scopes: "+e)},t.createInvalidPromptError=function(e){return new t(ue.invalidPrompt.code,ue.invalidPrompt.desc+" Given value: "+e)},t.createInvalidClaimsRequestError=function(){return new t(ue.invalidClaimsRequest.code,ue.invalidClaimsRequest.desc)},t.createEmptyLogoutRequestError=function(){return new t(ue.logoutRequestEmptyError.code,ue.logoutRequestEmptyError.desc)},t.createEmptyTokenRequestError=function(){return new t(ue.tokenRequestEmptyError.code,ue.tokenRequestEmptyError.desc)},t.createInvalidCodeChallengeMethodError=function(){return new t(ue.invalidCodeChallengeMethod.code,ue.invalidCodeChallengeMethod.desc)},t.createInvalidCodeChallengeParamsError=function(){return new t(ue.invalidCodeChallengeParams.code,ue.invalidCodeChallengeParams.desc)},t.createInvalidCloudDiscoveryMetadataError=function(){return new t(ue.invalidCloudDiscoveryMetadata.code,ue.invalidCloudDiscoveryMetadata.desc)},t.createInvalidAuthorityMetadataError=function(){return new t(ue.invalidAuthorityMetadata.code,ue.invalidAuthorityMetadata.desc)},t.createUntrustedAuthorityError=function(){return new t(ue.untrustedAuthority.code,ue.untrustedAuthority.desc)},t.createInvalidAzureCloudInstanceError=function(){return new t(ue.invalidAzureCloudInstance.code,ue.invalidAzureCloudInstance.desc)},t.createMissingSshJwkError=function(){return new t(ue.missingSshJwk.code,ue.missingSshJwk.desc)},t.createMissingSshKidError=function(){return new t(ue.missingSshKid.code,ue.missingSshKid.desc)},t.createMissingNonceAuthenticationHeadersError=function(){return new t(ue.missingNonceAuthenticationHeader.code,ue.missingNonceAuthenticationHeader.desc)},t.createInvalidAuthenticationHeaderError=function(e,r){return new t(ue.invalidAuthenticationHeader.code,ue.invalidAuthenticationHeader.desc+". Invalid header: "+e+". Details: "+r)},t}(re),de=function(){function e(e){var t=this,r=e?ne.trimArrayEntries(p(e)):[],n=r?ne.removeEmptyStringsFromArray(r):[];this.validateInputScopes(n),this.scopes=new Set,n.forEach((function(e){return t.scopes.add(e)}))}return e.fromString=function(t){return new e((t||E.EMPTY_STRING).split(" "))},e.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw le.createEmptyScopesArrayError()},e.prototype.containsScope=function(t){var r=new e(this.printScopesLowerCase().split(" "));return!ne.isEmpty(t)&&r.scopes.has(t.toLowerCase())},e.prototype.containsScopeSet=function(e){var t=this;return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every((function(e){return t.containsScope(e)})))},e.prototype.containsOnlyOIDCScopes=function(){var e=this,t=0;return _.forEach((function(r){e.containsScope(r)&&(t+=1)})),this.scopes.size===t},e.prototype.appendScope=function(e){ne.isEmpty(e)||this.scopes.add(e.trim())},e.prototype.appendScopes=function(e){var t=this;try{e.forEach((function(e){return t.appendScope(e)}))}catch(e){throw re.createAppendScopeSetError(e)}},e.prototype.removeScope=function(e){if(ne.isEmpty(e))throw re.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},e.prototype.removeOIDCScopes=function(){var e=this;_.forEach((function(t){e.scopes.delete(t)}))},e.prototype.unionScopeSets=function(e){if(!e)throw re.createEmptyInputScopeSetError();var t=new Set;return e.scopes.forEach((function(e){return t.add(e.toLowerCase())})),this.scopes.forEach((function(e){return t.add(e.toLowerCase())})),t},e.prototype.intersectingScopeSets=function(e){if(!e)throw re.createEmptyInputScopeSetError();e.containsOnlyOIDCScopes()||e.removeOIDCScopes();var t=this.unionScopeSets(e),r=e.getScopeCount(),n=this.getScopeCount();return t.size<n+r},e.prototype.getScopeCount=function(){return this.scopes.size},e.prototype.asArray=function(){var e=[];return this.scopes.forEach((function(t){return e.push(t)})),e},e.prototype.printScopes=function(){return this.scopes?this.asArray().join(" "):E.EMPTY_STRING},e.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},e}();
/*! @azure/msal-common v7.3.0 2022-08-01 */
/*! @azure/msal-common v7.3.0 2022-08-01 */
function he(e,t){if(ne.isEmpty(e))throw re.createClientInfoEmptyError();try{var r=t.base64Decode(e);return JSON.parse(r)}catch(e){throw re.createClientInfoDecodingError(e)}}function pe(e){if(ne.isEmpty(e))throw re.createClientInfoDecodingError("Home account ID was empty.");var t=e.split(b.CLIENT_INFO_SEPARATOR,2);return{uid:t[0],utid:t.length<2?E.EMPTY_STRING:t[1]}}
/*! @azure/msal-common v7.3.0 2022-08-01 */!function(e){e[e.Default=0]="Default",e[e.Adfs=1]="Adfs"}(se||(se={}));
/*! @azure/msal-common v7.3.0 2022-08-01 */
var ge=function(){function e(){}return e.prototype.generateAccountId=function(){return[this.homeAccountId,this.environment].join(b.CACHE_KEY_SEPARATOR).toLowerCase()},e.prototype.generateAccountKey=function(){return e.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})},e.prototype.generateType=function(){switch(this.authorityType){case A.ADFS_ACCOUNT_TYPE:return N.ADFS;case A.MSAV1_ACCOUNT_TYPE:return N.MSA;case A.MSSTS_ACCOUNT_TYPE:return N.MSSTS;case A.GENERIC_ACCOUNT_TYPE:return N.GENERIC;default:throw re.createUnexpectedAccountTypeError()}},e.prototype.getAccountInfo=function(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,idTokenClaims:this.idTokenClaims,nativeAccountId:this.nativeAccountId}},e.generateAccountCacheKey=function(e){return[e.homeAccountId,e.environment||E.EMPTY_STRING,e.tenantId||E.EMPTY_STRING].join(b.CACHE_KEY_SEPARATOR).toLowerCase()},e.createAccount=function(t,r,n,o,i,a,s,c){var u,l,d,h,p,g,f=new e;f.authorityType=A.MSSTS_ACCOUNT_TYPE,f.clientInfo=t,f.homeAccountId=r,f.nativeAccountId=c;var m=s||o&&o.getPreferredCache();if(!m)throw re.createInvalidCacheEnvironmentError();return f.environment=m,f.realm=(null===(u=null==n?void 0:n.claims)||void 0===u?void 0:u.tid)||E.EMPTY_STRING,n&&(f.idTokenClaims=n.claims,f.localAccountId=(null===(l=null==n?void 0:n.claims)||void 0===l?void 0:l.oid)||(null===(d=null==n?void 0:n.claims)||void 0===d?void 0:d.sub)||E.EMPTY_STRING,f.username=(null===(h=null==n?void 0:n.claims)||void 0===h?void 0:h.preferred_username)||((null===(p=null==n?void 0:n.claims)||void 0===p?void 0:p.emails)?n.claims.emails[0]:E.EMPTY_STRING),f.name=null===(g=null==n?void 0:n.claims)||void 0===g?void 0:g.name),f.cloudGraphHostName=i,f.msGraphHost=a,f},e.createGenericAccount=function(t,r,n,o,i,a){var s,c,u,l,d=new e;d.authorityType=n&&n.authorityType===se.Adfs?A.ADFS_ACCOUNT_TYPE:A.GENERIC_ACCOUNT_TYPE,d.homeAccountId=t,d.realm=E.EMPTY_STRING;var h=a||n&&n.getPreferredCache();if(!h)throw re.createInvalidCacheEnvironmentError();return r&&(d.localAccountId=(null===(s=null==r?void 0:r.claims)||void 0===s?void 0:s.oid)||(null===(c=null==r?void 0:r.claims)||void 0===c?void 0:c.sub)||E.EMPTY_STRING,d.username=(null===(u=null==r?void 0:r.claims)||void 0===u?void 0:u.upn)||E.EMPTY_STRING,d.name=(null===(l=null==r?void 0:r.claims)||void 0===l?void 0:l.name)||E.EMPTY_STRING,d.idTokenClaims=null==r?void 0:r.claims),d.environment=h,d.cloudGraphHostName=o,d.msGraphHost=i,d},e.generateHomeAccountId=function(e,t,r,n,o){var i,a=(null===(i=null==o?void 0:o.claims)||void 0===i?void 0:i.sub)?o.claims.sub:E.EMPTY_STRING;if(t===se.Adfs)return a;if(e)try{var s=he(e,n);if(!ne.isEmpty(s.uid)&&!ne.isEmpty(s.utid))return""+s.uid+b.CLIENT_INFO_SEPARATOR+s.utid}catch(e){}return r.verbose("No client info in response"),a},e.isAccountEntity=function(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))},e.accountInfoIsEqual=function(e,t,r){if(!e||!t)return!1;var n=!0;if(r){var o=e.idTokenClaims||{},i=t.idTokenClaims||{};n=o.iat===i.iat&&o.nonce===i.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&n},e}(),fe=function(){function e(t,r){if(ne.isEmpty(t))throw re.createTokenNullOrEmptyError(t);this.rawToken=t,this.claims=e.extractTokenClaims(t,r)}return e.extractTokenClaims=function(e,t){var r=ne.decodeAuthToken(e);try{var n=r.JWSPayload,o=t.base64Decode(n);return JSON.parse(o)}catch(e){throw re.createTokenParsingError(e)}},e}(),me=function(){function t(e,t){this.clientId=e,this.cryptoImpl=t}return t.prototype.getAllAccounts=function(){var e=this,r=this.getAccountsFilteredBy(),n=Object.keys(r).map((function(e){return r[e]}));return n.length<1?[]:n.map((function(r){var n=t.toObject(new ge,r).getAccountInfo(),o=e.readIdTokenFromCache(e.clientId,n);return o&&!n.idTokenClaims&&(n.idTokenClaims=new fe(o.secret,e.cryptoImpl).claims),n}))},t.prototype.saveCacheRecord=function(e){return d(this,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:if(!e)throw re.createNullOrUndefinedCacheRecord();return e.account&&this.setAccount(e.account),e.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken?[4,this.saveAccessToken(e.accessToken)]:[3,2];case 1:t.sent(),t.label=2;case 2:return e.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata),[2]}}))}))},t.prototype.saveAccessToken=function(e){return d(this,void 0,void 0,(function(){var t,r,n,o,i=this;return h(this,(function(a){switch(a.label){case 0:return t=this.getCredentialsFilteredBy({clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash}),r=de.fromString(e.target),(n=Object.keys(t.accessTokens).map((function(e){return t.accessTokens[e]})))?(o=[],n.forEach((function(e){de.fromString(e.target).intersectingScopeSets(r)&&o.push(i.removeCredential(e))})),[4,Promise.all(o)]):[3,2];case 1:a.sent(),a.label=2;case 2:return this.setAccessTokenCredential(e),[2]}}))}))},t.prototype.getAccountsFilteredBy=function(e){return this.getAccountsFilteredByInternal(e?e.homeAccountId:E.EMPTY_STRING,e?e.environment:E.EMPTY_STRING,e?e.realm:E.EMPTY_STRING,e?e.nativeAccountId:E.EMPTY_STRING)},t.prototype.getAccountsFilteredByInternal=function(e,t,r,n){var o=this,i=this.getKeys(),a={};return i.forEach((function(i){var s=o.getAccount(i);s&&(e&&!o.matchHomeAccountId(s,e)||t&&!o.matchEnvironment(s,t)||r&&!o.matchRealm(s,r)||n&&!o.matchNativeAccountId(s,n)||(a[i]=s))})),a},t.prototype.getCredentialsFilteredBy=function(e){return this.getCredentialsFilteredByInternal(e.homeAccountId,e.environment,e.credentialType,e.clientId,e.familyId,e.realm,e.target,e.userAssertionHash,e.tokenType,e.keyId,e.requestedClaimsHash)},t.prototype.getCredentialsFilteredByInternal=function(t,r,n,o,i,a,s,c,u,l,d){var h=this,p=this.getKeys(),g={idTokens:{