(window["webpackJsonpc07208f0_ea3b_4c1a_9965_ac1b825211a6_1_10_0"] = window["webpackJsonpc07208f0_ea3b_4c1a_9965_ac1b825211a6_1_10_0"] || []).push([["sp-http-msal"],{

/***/ "dDMZ":
/*!********************************************!*\
  !*** ./lib/oauthTokenProvider/msal.min.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/*! msal v1.1.3 2019-09-20 */
!function(e,t){ true?module.exports=t():undefined}(window,function(){return n={},o.m=r=[function(e,t,r){
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return(n=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])})(e,t)};function i(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)s.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 s}function d(e){return this instanceof d?(this.v=e,this):new d(e)}t.__extends=function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},t.__assign=function(){return t.__assign=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},t.__assign.apply(this,arguments)},t.__rest=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},t.__decorate=function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;0<=a;a--)(o=e[a])&&(s=(i<3?o(s):3<i?o(t,r,s):o(t,r))||s);return 3<i&&s&&Object.defineProperty(t,r,s),s},t.__param=function(r,n){return function(e,t){n(e,t,r)}},t.__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},t.__awaiter=function(i,s,a,c){return new(a=a||Promise)(function(e,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){t.done?e(t.value):new a(function(e){e(t.value)}).then(r,n)}o((c=c.apply(i,s||[])).next())})},t.__generator=function(r,n){var o,i,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,i=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=n.call(r,a)}catch(e){t=[6,e],i=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},t.__exportStar=function(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])},t.__values=i,t.__read=o,t.__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},t.__spreadArrays=function(){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],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n},t.__await=d,t.__asyncGenerator=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,i=r.apply(e,t||[]),s=[];return o={},n("next"),n("throw"),n("return"),o[Symbol.asyncIterator]=function(){return this},o;function n(n){i[n]&&(o[n]=function(r){return new Promise(function(e,t){1<s.push([n,r,e,t])||a(n,r)})})}function a(e,t){try{!function(e){e.value instanceof d?Promise.resolve(e.value.v).then(c,u):l(s[0][2],e)}(i[e](t))}catch(e){l(s[0][3],e)}}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}},t.__asyncDelegator=function(n){var e,o;return e={},t("next"),t("throw",function(e){throw e}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(t,r){e[t]=n[t]?function(e){return(o=!o)?{value:d(n[t](e)),done:"return"===t}:r?r(e):e}:r}},t.__asyncValues=function(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=o[Symbol.asyncIterator];return t?t.call(o):(o=i(o),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=o[n]&&function(r){return new Promise(function(e,t){(function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)})(e,t,(r=o[n](r)).done,r.value)})}}},t.__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t.__importStar=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},t.__importDefault=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=(o.isEmpty=function(e){return void 0===e||!e||0===e.length},o);function o(){}t.StringUtils=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=(Object.defineProperty(o,"errorDescription",{get:function(){return"error_description"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"error",{get:function(){return"error"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"scope",{get:function(){return"scope"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"clientInfo",{get:function(){return"client_info"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"clientId",{get:function(){return"clientId"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"idToken",{get:function(){return"id_token"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"adalIdToken",{get:function(){return"adal.idtoken"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"accessToken",{get:function(){return"access_token"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"expiresIn",{get:function(){return"expires_in"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"sessionState",{get:function(){return"session_state"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"claims",{get:function(){return"claims"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"msalClientInfo",{get:function(){return"msal.client.info"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"msalError",{get:function(){return"msal.error"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"msalErrorDescription",{get:function(){return"msal.error.description"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"msalSessionState",{get:function(){return"msal.session.state"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"tokenKeys",{get:function(){return"msal.token.keys"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"accessTokenKey",{get:function(){return"msal.access.token.key"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"expirationKey",{get:function(){return"msal.expiration.key"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"stateLogin",{get:function(){return"msal.state.login"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"stateAcquireToken",{get:function(){return"msal.state.acquireToken"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"stateRenew",{get:function(){return"msal.state.renew"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"nonceIdToken",{get:function(){return"msal.nonce.idtoken"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"userName",{get:function(){return"msal.username"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"idTokenKey",{get:function(){return"msal.idtoken"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"loginRequest",{get:function(){return"msal.login.request"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"loginError",{get:function(){return"msal.login.error"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"renewStatus",{get:function(){return"msal.token.renew.status"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"urlHash",{get:function(){return"msal.urlHash"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"angularLoginRequest",{get:function(){return"msal.angular.login.request"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"msal",{get:function(){return"msal"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"no_account",{get:function(){return"NO_ACCOUNT"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"consumersUtid",{get:function(){return"9188040d-6c67-4c5b-b112-36a304b66dad"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"upn",{get:function(){return"upn"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"prompt_select_account",{get:function(){return"&prompt=select_account"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"prompt_none",{get:function(){return"&prompt=none"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"prompt",{get:function(){return"prompt"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"response_mode_fragment",{get:function(){return"&response_mode=fragment"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"resourceDelimiter",{get:function(){return"|"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"tokenRenewStatusCancelled",{get:function(){return"Canceled"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"tokenRenewStatusCompleted",{get:function(){return"Completed"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"tokenRenewStatusInProgress",{get:function(){return"In Progress"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"popUpWidth",{get:function(){return this._popUpWidth},set:function(e){this._popUpWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(o,"popUpHeight",{get:function(){return this._popUpHeight},set:function(e){this._popUpHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(o,"login",{get:function(){return"LOGIN"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"renewToken",{get:function(){return"RENEW_TOKEN"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"unknown",{get:function(){return"UNKNOWN"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"homeAccountIdentifier",{get:function(){return"homeAccountIdentifier"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"common",{get:function(){return"common"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"openidScope",{get:function(){return"openid"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"profileScope",{get:function(){return"profile"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"cacheLocationLocal",{get:function(){return"localStorage"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"cacheLocationSession",{get:function(){return"sessionStorage"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"interactionTypeRedirect",{get:function(){return"redirectInteraction"},enumerable:!0,configurable:!0}),Object.defineProperty(o,"interactionTypePopup",{get:function(){return"popupInteraction"},enumerable:!0,configurable:!0}),o._popUpWidth=483,o._popUpHeight=600,o);function o(){}t.Constants=n,t.CacheKeys={AUTHORITY:"msal.authority",ACQUIRE_TOKEN_ACCOUNT:"msal.acquireTokenAccount"},t.AADTrustedHostList={"login.windows.net":"login.windows.net","login.chinacloudapi.cn":"login.chinacloudapi.cn","login.cloudgovapi.us":"login.cloudgovapi.us","login.microsoftonline.com":"login.microsoftonline.com","login.microsoftonline.de":"login.microsoftonline.de","login.microsoftonline.us":"login.microsoftonline.us"},t.SSOTypes={ACCOUNT:"account",SID:"sid",LOGIN_HINT:"login_hint",ID_TOKEN:"id_token",DOMAIN_HINT:"domain_hint",ORGANIZATIONS:"organizations",CONSUMERS:"consumers",ACCOUNT_ID:"accountIdentifier",HOMEACCOUNT_ID:"homeAccountIdentifier",LOGIN_REQ:"login_req",DOMAIN_REQ:"domain_req"},t.BlacklistedEQParams=[t.SSOTypes.SID,t.SSOTypes.LOGIN_HINT],t.PromptState={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none"},t.libraryVersion=function(){return"1.1.3"}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=(a.createNewGuid=function(){var e=window.crypto;if(e&&e.getRandomValues){var t=new Uint8Array(16);return e.getRandomValues(t),t[6]|=64,t[6]&=79,t[8]|=128,t[8]&=191,a.decimalToHex(t[0])+a.decimalToHex(t[1])+a.decimalToHex(t[2])+a.decimalToHex(t[3])+"-"+a.decimalToHex(t[4])+a.decimalToHex(t[5])+"-"+a.decimalToHex(t[6])+a.decimalToHex(t[7])+"-"+a.decimalToHex(t[8])+a.decimalToHex(t[9])+"-"+a.decimalToHex(t[10])+a.decimalToHex(t[11])+a.decimalToHex(t[12])+a.decimalToHex(t[13])+a.decimalToHex(t[14])+a.decimalToHex(t[15])}for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",o=0,i="",s=0;s<36;s++)"-"!==r[s]&&"4"!==r[s]&&(o=16*Math.random()|0),"x"===r[s]?i+=n[o]:"y"===r[s]?(o&=3,i+=n[o|=8]):i+=r[s];return i},a.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},a.base64Encode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode(Number("0x"+t))}))},a.base64Decode=function(e){return decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))},a.deserialize=function(e){function t(e){return decodeURIComponent(e.replace(n," "))}var r,n=/\+/g,o=/([^&=]+)=([^&]*)/g,i={};for(r=o.exec(e);r;)i[t(r[1])]=t(r[2]),r=o.exec(e);return i},a);function a(){}t.CryptoUtils=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),n=r(13),i=r(1),s=r(3),a=(c.createNavigateUrl=function(e){var t=this.createNavigationUrlString(e),r=e.authorityInstance.AuthorizationEndpoint;return r.indexOf("?")<0?r+="?":r+="&",""+r+t.join("&")},c.createNavigationUrlString=function(e){var t=e.scopes;-1===t.indexOf(e.clientId)&&t.push(e.clientId);var r=[];return r.push("response_type="+e.responseType),this.translateclientIdUsedInScope(t,e.clientId),r.push("scope="+encodeURIComponent(n.ScopeSet.parseScope(t))),r.push("client_id="+encodeURIComponent(e.clientId)),r.push("redirect_uri="+encodeURIComponent(e.redirectUri)),r.push("state="+encodeURIComponent(e.state)),r.push("nonce="+encodeURIComponent(e.nonce)),r.push("client_info=1"),r.push("x-client-SKU="+e.xClientSku),r.push("x-client-Ver="+e.xClientVer),e.promptValue&&r.push("prompt="+encodeURIComponent(e.promptValue)),e.claimsValue&&r.push("claims="+encodeURIComponent(e.claimsValue)),e.queryParameters&&r.push(e.queryParameters),e.extraQueryParameters&&r.push(e.extraQueryParameters),r.push("client-request-id="+encodeURIComponent(e.correlationId)),r},c.translateclientIdUsedInScope=function(e,t){var r=e.indexOf(t);0<=r&&(e.splice(r,1),-1===e.indexOf("openid")&&e.push("openid"),-1===e.indexOf("profile")&&e.push("profile"))},c.getDefaultRedirectUri=function(){return window.location.href.split("?")[0].split("#")[0]},c.replaceTenantPath=function(e,t){e=e.toLowerCase();var r=this.GetUrlComponents(e),n=r.PathSegments;return!t||0===n.length||n[0]!==o.Constants.common&&n[0]!==o.SSOTypes.ORGANIZATIONS||(n[0]=t),this.constructAuthorityUriFromObject(r,n)},c.constructAuthorityUriFromObject=function(e,t){return this.CanonicalizeUri(e.Protocol+"//"+e.HostNameAndPort+"/"+t.join("/"))},c.GetUrlComponents=function(e){if(!e)throw"Url required";var t=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=e.match(t);if(!r||r.length<6)throw"Valid url required";var n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5]},o=n.AbsolutePath.split("/");return o=o.filter(function(e){return e&&0<e.length}),n.PathSegments=o,n},c.CanonicalizeUri=function(e){return(e=e&&e.toLowerCase())&&!c.endsWith(e,"/")&&(e+="/"),e},c.endsWith=function(e,t){return!(!e||!t)&&-1!==e.indexOf(t,e.length-t.length)},c.urlRemoveQueryStringParameter=function(e,t){if(i.StringUtils.isEmpty(e))return e;var r=new RegExp("(\\&"+t+"=)[^&]+");return e=e.replace(r,""),r=new RegExp("("+t+"=)[^&]+&"),e=e.replace(r,""),r=new RegExp("("+t+"=)[^&]+"),e=e.replace(r,"")},c.getHashFromUrl=function(e){var t=e.indexOf("#"),r=e.indexOf("#/");return-1<r?e.substring(r+2):-1<t?e.substring(t+1):e},c.urlContainsHash=function(e){var t=c.deserializeHash(e);return t.hasOwnProperty(o.Constants.errorDescription)||t.hasOwnProperty(o.Constants.error)||t.hasOwnProperty(o.Constants.accessToken)||t.hasOwnProperty(o.Constants.idToken)},c.deserializeHash=function(e){var t=c.getHashFromUrl(e);return s.CryptoUtils.deserialize(t)},c);function c(){}t.UrlUtils=a},function(e,i,t){Object.defineProperty(i,"__esModule",{value:!0});var r=t(0),n=t(2),o=t(6);i.ClientConfigurationErrorMessage={configurationNotSet:{code:"no_config_set",desc:"Configuration has not been set. Please call the UserAgentApplication constructor with a valid Configuration object."},invalidCacheLocation:{code:"invalid_cache_location",desc:"The cache location provided is not valid."},noStorageSupported:{code:"browser_storage_not_supported",desc:"localStorage and sessionStorage are not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},scopesRequired:{code:"scopes_required",desc:"Scopes are required to obtain an access token."},emptyScopes:{code:"empty_input_scopes_error",desc:"Scopes cannot be passed as empty array."},nonArrayScopes:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},clientScope:{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' and 'none'"},invalidAuthorityType:{code:"invalid_authority_type",desc:"The given authority is not a valid type of authority supported by MSAL. Please see here for valid authorities: <insert URL here>."},authorityUriInsecure:{code:"authority_uri_insecure",desc:"Authority URIs must use https."},authorityUriInvalidPath:{code:"authority_uri_invalid_path",desc:"Given authority URI is invalid."},unsupportedAuthorityValidation:{code:"unsupported_authority_validation",desc:"The authority validation is not supported for this authority type."},b2cAuthorityUriInvalidPath:{code:"b2c_authority_uri_invalid_path",desc:"The given URI for the B2C authority is invalid."},claimsRequestParsingError:{code:"claims_request_parsing_error",desc:"Could not parse the given claims request object."},emptyRequestError:{code:"empty_request_error",desc:"Request object is required."},telemetryConfigError:{code:"telemetry_config_error",desc:"Telemetry config is not configured with required values"}};var s,a=(s=o.ClientAuthError,r.__extends(c,s),c.createNoSetConfigurationError=function(){return new c(i.ClientConfigurationErrorMessage.configurationNotSet.code,""+i.ClientConfigurationErrorMessage.configurationNotSet.desc)},c.createInvalidCacheLocationConfigError=function(e){return new c(i.ClientConfigurationErrorMessage.invalidCacheLocation.code,i.ClientConfigurationErrorMessage.invalidCacheLocation.desc+" Provided value: "+e+". Possible values are: "+n.Constants.cacheLocationLocal+", "+n.Constants.cacheLocationSession+".")},c.createNoStorageSupportedError=function(){return new c(i.ClientConfigurationErrorMessage.noStorageSupported.code,i.ClientConfigurationErrorMessage.noStorageSupported.desc)},c.createRedirectCallbacksNotSetError=function(){return new c(i.ClientConfigurationErrorMessage.noRedirectCallbacksSet.code,i.ClientConfigurationErrorMessage.noRedirectCallbacksSet.desc)},c.createInvalidCallbackObjectError=function(e){return new c(i.ClientConfigurationErrorMessage.invalidCallbackObject.code,i.ClientConfigurationErrorMessage.invalidCallbackObject.desc+" Given value for callback function: "+e)},c.createEmptyScopesArrayError=function(e){return new c(i.ClientConfigurationErrorMessage.emptyScopes.code,i.ClientConfigurationErrorMessage.emptyScopes.desc+" Given value: "+e+".")},c.createScopesNonArrayError=function(e){return new c(i.ClientConfigurationErrorMessage.nonArrayScopes.code,i.ClientConfigurationErrorMessage.nonArrayScopes.desc+" Given value: "+e+".")},c.createClientIdSingleScopeError=function(e){return new c(i.ClientConfigurationErrorMessage.clientScope.code,i.ClientConfigurationErrorMessage.clientScope.desc+" Given value: "+e+".")},c.createScopesRequiredError=function(e){return new c(i.ClientConfigurationErrorMessage.scopesRequired.code,i.ClientConfigurationErrorMessage.scopesRequired.desc+" Given value: "+e)},c.createInvalidPromptError=function(e){return new c(i.ClientConfigurationErrorMessage.invalidPrompt.code,i.ClientConfigurationErrorMessage.invalidPrompt.desc+" Given value: "+e)},c.createClaimsRequestParsingError=function(e){return new c(i.ClientConfigurationErrorMessage.claimsRequestParsingError.code,i.ClientConfigurationErrorMessage.claimsRequestParsingError.desc+" Given value: "+e)},c.createEmptyRequestError=function(){var e=i.ClientConfigurationErrorMessage.emptyRequestError;return new c(e.code,e.desc)},c.createTelemetryConfigError=function(r){var e=i.ClientConfigurationErrorMessage.telemetryConfigError,t=e.code,n=e.desc,o={applicationName:"string",applicationVersion:"string",telemetryEmitter:"function"};return new c(t,n+" mising values: "+Object.keys(o).reduce(function(e,t){return r[t]?e:e.concat([t+" ("+o[t]+")"])},[]).join(","))},c);function c(e,t){var r=s.call(this,e,t)||this;return r.name="ClientConfigurationError",Object.setPrototypeOf(r,c.prototype),r}i.ClientConfigurationError=a},function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0});var n=t(0),o=t(7),i=t(1);r.ClientAuthErrorMessage={multipleMatchingTokens:{code:"multiple_matching_tokens",desc:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements like authority."},multipleCacheAuthorities:{code:"multiple_authorities",desc:"Multiple authorities found in the cache. Pass authority in the API overload."},endpointResolutionError:{code:"endpoints_resolution_error",desc:"Error: could not resolve endpoints. Please check network and try again."},popUpWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},tokenRenewalError:{code:"token_renewal_error",desc:"Token renewal operation failed due to timeout."},acquireTokenSilentError:{code:"server_failed_for_acquireTokenSilent_call",desc:"Please click the link for the server error: "},invalidIdToken:{code:"invalid_id_token",desc:"Invalid ID token format."},invalidStateError:{code:"invalid_state_error",desc:"Invalid state."},nonceMismatchError:{code:"nonce_mismatch_error",desc:"Nonce is not matching, Nonce received: "},loginProgressError:{code:"login_progress_error",desc:"Login_In_Progress: Error during login call - login is already in progress."},acquireTokenProgressError:{code:"acquiretoken_progress_error",desc:"AcquireToken_In_Progress: Error during login call - login is already in progress."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},callbackError:{code:"callback_error",desc:"Error occurred in token received callback function."},userLoginRequiredError:{code:"user_login_error",desc:"User login is required."},userDoesNotExistError:{code:"user_non_existent",desc:"User object does not exist. Please call a login API."},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."},clientInfoNotPopulatedError:{code:"client_info_not_populated_error",desc:"The service did not populate client_info in the response, Please verify with the service team"},nullOrEmptyIdToken:{code:"null_or_empty_id_token",desc:"The idToken is null or empty. Please review the trace to determine the root cause."},idTokenNotParsed:{code:"id_token_parsing_error",desc:"ID token cannot be parsed. Please review stack trace to determine root cause."},tokenEncodingError:{code:"token_encoding_error",desc:"The token to be decoded is not encoded correctly."},invalidInteractionType:{code:"invalid_interaction_type",desc:"The interaction type passed to the handler was incorrect or unknown"}};var s,a=(s=o.AuthError,n.__extends(c,s),c.createEndpointResolutionError=function(e){var t=r.ClientAuthErrorMessage.endpointResolutionError.desc;return e&&!i.StringUtils.isEmpty(e)&&(t+=" Details: "+e),new c(r.ClientAuthErrorMessage.endpointResolutionError.code,t)},c.createMultipleMatchingTokensInCacheError=function(e){return new c(r.ClientAuthErrorMessage.multipleMatchingTokens.code,"Cache error for scope "+e+": "+r.ClientAuthErrorMessage.multipleMatchingTokens.desc+".")},c.createMultipleAuthoritiesInCacheError=function(e){return new c(r.ClientAuthErrorMessage.multipleCacheAuthorities.code,"Cache error for scope "+e+": "+r.ClientAuthErrorMessage.multipleCacheAuthorities.desc+".")},c.createPopupWindowError=function(e){var t=r.ClientAuthErrorMessage.popUpWindowError.desc;return e&&!i.StringUtils.isEmpty(e)&&(t+=" Details: "+e),new c(r.ClientAuthErrorMessage.popUpWindowError.code,t)},c.createTokenRenewalTimeoutError=function(){return new c(r.ClientAuthErrorMessage.tokenRenewalError.code,r.ClientAuthErrorMessage.tokenRenewalError.desc)},c.createAcquireTokenSilentError=function(e){return new c(r.ClientAuthErrorMessage.acquireTokenSilentError.code,r.ClientAuthErrorMessage.acquireTokenSilentError.desc+e)},c.createInvalidIdTokenError=function(e){return new c(r.ClientAuthErrorMessage.invalidIdToken.code,r.ClientAuthErrorMessage.invalidIdToken.desc+" Given token: "+e)},c.createInvalidStateError=function(e,t){return new c(r.ClientAuthErrorMessage.invalidStateError.code,r.ClientAuthErrorMessage.invalidStateError.desc+" "+e+", state expected : "+t+".")},c.createNonceMismatchError=function(e,t){return new c(r.ClientAuthErrorMessage.nonceMismatchError.code,r.ClientAuthErrorMessage.nonceMismatchError.desc+" "+e+", nonce expected : "+t+".")},c.createLoginInProgressError=function(){return new c(r.ClientAuthErrorMessage.loginProgressError.code,r.ClientAuthErrorMessage.loginProgressError.desc)},c.createAcquireTokenInProgressError=function(){return new c(r.ClientAuthErrorMessage.acquireTokenProgressError.code,r.ClientAuthErrorMessage.acquireTokenProgressError.desc)},c.createUserCancelledError=function(){return new c(r.ClientAuthErrorMessage.userCancelledError.code,r.ClientAuthErrorMessage.userCancelledError.desc)},c.createErrorInCallbackFunction=function(e){return new c(r.ClientAuthErrorMessage.callbackError.code,r.ClientAuthErrorMessage.callbackError.desc+" "+e+".")},c.createUserLoginRequiredError=function(){return new c(r.ClientAuthErrorMessage.userLoginRequiredError.code,r.ClientAuthErrorMessage.userLoginRequiredError.desc)},c.createUserDoesNotExistError=function(){return new c(r.ClientAuthErrorMessage.userDoesNotExistError.code,r.ClientAuthErrorMessage.userDoesNotExistError.desc)},c.createClientInfoDecodingError=function(e){return new c(r.ClientAuthErrorMessage.clientInfoDecodingError.code,r.ClientAuthErrorMessage.clientInfoDecodingError.desc+" Failed with error: "+e)},c.createClientInfoNotPopulatedError=function(e){return new c(r.ClientAuthErrorMessage.clientInfoNotPopulatedError.code,r.ClientAuthErrorMessage.clientInfoNotPopulatedError.desc+" Failed with error: "+e)},c.createIdTokenNullOrEmptyError=function(e){return new c(r.ClientAuthErrorMessage.nullOrEmptyIdToken.code,r.ClientAuthErrorMessage.nullOrEmptyIdToken.desc+" Raw ID Token Value: "+e)},c.createIdTokenParsingError=function(e){return new c(r.ClientAuthErrorMessage.idTokenNotParsed.code,r.ClientAuthErrorMessage.idTokenNotParsed.desc+" Failed with error: "+e)},c.createTokenEncodingError=function(e){return new c(r.ClientAuthErrorMessage.tokenEncodingError.code,r.ClientAuthErrorMessage.tokenEncodingError.desc+" Attempted to decode: "+e)},c.createInvalidInteractionTypeError=function(){return new c(r.ClientAuthErrorMessage.invalidInteractionType.code,r.ClientAuthErrorMessage.invalidInteractionType.desc)},c);function c(e,t){var r=s.call(this,e,t)||this;return r.name="ClientAuthError",Object.setPrototypeOf(r,c.prototype),r}r.ClientAuthError=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.AuthErrorMessage={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."}};var o,i=(o=Error,n.__extends(s,o),s.createUnexpectedError=function(e){return new s(t.AuthErrorMessage.unexpectedError.code,t.AuthErrorMessage.unexpectedError.desc+": "+e)},s);function s(e,t){var r=o.call(this,t)||this;return Object.setPrototypeOf(r,s.prototype),r.errorCode=e,r.errorMessage=t,r.name="AuthError",r}t.AuthError=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(0),i=r(5),s=r(18),a=r(4);(n=t.AuthorityType||(t.AuthorityType={}))[n.Aad=0]="Aad",n[n.Adfs=1]="Adfs",n[n.B2C=2]="B2C";var c=(Object.defineProperty(u.prototype,"Tenant",{get:function(){return this.CanonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"AuthorizationEndpoint",{get:function(){return this.validateResolved(),this.tenantDiscoveryResponse.AuthorizationEndpoint.replace("{tenant}",this.Tenant)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"EndSessionEndpoint",{get:function(){return this.validateResolved(),this.tenantDiscoveryResponse.EndSessionEndpoint.replace("{tenant}",this.Tenant)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"SelfSignedJwtAudience",{get:function(){return this.validateResolved(),this.tenantDiscoveryResponse.Issuer.replace("{tenant}",this.Tenant)},enumerable:!0,configurable:!0}),u.prototype.validateResolved=function(){if(!this.tenantDiscoveryResponse)throw"Please call ResolveEndpointsAsync first"},Object.defineProperty(u.prototype,"CanonicalAuthority",{get:function(){return this.canonicalAuthority},set:function(e){this.canonicalAuthority=a.UrlUtils.CanonicalizeUri(e),this.canonicalAuthorityUrlComponents=null},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"CanonicalAuthorityUrlComponents",{get:function(){return this.canonicalAuthorityUrlComponents||(this.canonicalAuthorityUrlComponents=a.UrlUtils.GetUrlComponents(this.CanonicalAuthority)),this.canonicalAuthorityUrlComponents},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"DefaultOpenIdConfigurationEndpoint",{get:function(){return this.CanonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!0,configurable:!0}),u.prototype.validateAsUri=function(){var e;try{e=this.CanonicalAuthorityUrlComponents}catch(e){throw i.ClientConfigurationErrorMessage.invalidAuthorityType}if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw i.ClientConfigurationErrorMessage.authorityUriInsecure;if(!e.PathSegments||e.PathSegments.length<1)throw i.ClientConfigurationErrorMessage.authorityUriInvalidPath},u.prototype.DiscoverEndpoints=function(e){return(new s.XhrClient).sendRequestAsync(e,"GET",!0).then(function(e){return{AuthorizationEndpoint:e.authorization_endpoint,EndSessionEndpoint:e.end_session_endpoint,Issuer:e.issuer}})},u.prototype.resolveEndpointsAsync=function(){return o.__awaiter(this,void 0,Promise,function(){var t,r;return o.__generator(this,function(e){switch(e.label){case 0:return[4,this.GetOpenIdConfigurationEndpointAsync()];case 1:return t=e.sent(),[4,(r=this).DiscoverEndpoints(t)];case 2:return r.tenantDiscoveryResponse=e.sent(),[2,this]}})})},u);function u(e,t){this.IsValidationEnabled=t,this.CanonicalAuthority=e,this.validateAsUri()}t.Authority=c},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_NAME_PREFIX="msal.",t.EVENT_NAME_KEY="event_name",t.START_TIME_KEY="start_time",t.ELAPSED_TIME_KEY="elapsed_time",t.TELEMETRY_BLOB_EVENT_NAMES={MsalCorrelationIdConstStrKey:"Microsoft.MSAL.correlation_id",ApiTelemIdConstStrKey:"msal.api_telem_id",ApiIdConstStrKey:"msal.api_id",BrokerAppConstStrKey:"Microsoft_MSAL_broker_app",CacheEventCountConstStrKey:"Microsoft_MSAL_cache_event_count",HttpEventCountTelemetryBatchKey:"Microsoft_MSAL_http_event_count",IdpConstStrKey:"Microsoft_MSAL_idp",IsSilentTelemetryBatchKey:"",IsSuccessfulConstStrKey:"Microsoft_MSAL_is_successful",ResponseTimeConstStrKey:"Microsoft_MSAL_response_time",TenantIdConstStrKey:"Microsoft_MSAL_tenant_id",UiEventCountTelemetryBatchKey:"Microsoft_MSAL_ui_event_count"},t.TENANT_PLACEHOLDER="<tenant>"},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var c,n,i=r(1),s=r(2);(n=c=t.LogLevel||(t.LogLevel={}))[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Verbose=3]="Verbose";var o=(a.prototype.logMessage=function(e,t,r){if(!(e>this.level||!this.piiLoggingEnabled&&r)){var n,o=(new Date).toUTCString();n=i.StringUtils.isEmpty(this.correlationId)?o+":"+s.libraryVersion()+"-"+c[e]+" "+t:o+":"+this.correlationId+"-"+s.libraryVersion()+"-"+c[e]+" "+t,this.executeCallback(e,n,r)}},a.prototype.executeCallback=function(e,t,r){this.localCallback&&this.localCallback(e,t,r)},a.prototype.error=function(e){this.logMessage(c.Error,e,!1)},a.prototype.errorPii=function(e){this.logMessage(c.Error,e,!0)},a.prototype.warning=function(e){this.logMessage(c.Warning,e,!1)},a.prototype.warningPii=function(e){this.logMessage(c.Warning,e,!0)},a.prototype.info=function(e){this.logMessage(c.Info,e,!1)},a.prototype.infoPii=function(e){this.logMessage(c.Info,e,!0)},a.prototype.verbose=function(e){this.logMessage(c.Verbose,e,!1)},a.prototype.verbosePii=function(e){this.logMessage(c.Verbose,e,!0)},a.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled},a);function a(e,t){void 0===t&&(t={}),this.level=c.Info;var r=t.correlationId,n=void 0===r?"":r,o=t.level,i=void 0===o?c.Info:o,s=t.piiLoggingEnabled,a=void 0!==s&&s;this.localCallback=e,this.correlationId=n,this.level=i,this.piiLoggingEnabled=a}t.Logger=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.ServerErrorMessage={serverUnavailable:{code:"server_unavailable",desc:"Server is temporarily unavailable."},unknownServerError:{code:"unknown_server_error"}};var i,s=(i=o.AuthError,n.__extends(a,i),a.createServerUnavailableError=function(){return new a(t.ServerErrorMessage.serverUnavailable.code,t.ServerErrorMessage.serverUnavailable.desc)},a.createUnknownServerError=function(e){return new a(t.ServerErrorMessage.unknownServerError.code,e)},a);function a(e,t){var r=i.call(this,e,t)||this;return r.name="ServerError",Object.setPrototypeOf(r,a.prototype),r}t.ServerError=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var m=r(0),C=r(26),v=r(27),y=r(28),E=r(29),w=r(2),I=r(30),S=r(31),b=r(16),T=r(13),A=r(1),_=r(33),f=r(15),k=r(34),P=r(4),O=r(35),R=r(36),n=r(20),s=r(5),U=r(7),M=r(6),N=r(11),x=r(21),q=r(22),a=m.__importDefault(r(37)),L="id_token",o="token",i="id_token token",c=(Object.defineProperty(u.prototype,"authority",{get:function(){return this.authorityInstance.CanonicalAuthority},set:function(e){this.authorityInstance=R.AuthorityFactory.CreateInstance(e,this.config.auth.validateAuthority)},enumerable:!0,configurable:!0}),u.prototype.getAuthorityInstance=function(){return this.authorityInstance},u.prototype.handleRedirectCallback=function(e,t){if(!e)throw this.redirectCallbacksSet=!1,s.ClientConfigurationError.createInvalidCallbackObjectError(e);if(t?(this.tokenReceivedCallback=e,this.errorReceivedCallback=t,this.logger.warning("This overload for callback is deprecated - please change the format of the callbacks to a single callback as shown: (err: AuthError, response: AuthResponse).")):this.authResponseCallback=e,this.redirectCallbacksSet=!0,!this.config.framework.isAngular){var r=this.cacheStorage.getItem(w.Constants.urlHash);r&&this.processCallBack(r,null)}},u.prototype.authResponseHandler=function(e,t,r){if(e===w.Constants.interactionTypeRedirect)this.errorReceivedCallback?this.tokenReceivedCallback(t):this.authResponseCallback&&this.authResponseCallback(null,t);else{if(e!==w.Constants.interactionTypePopup)throw M.ClientAuthError.createInvalidInteractionTypeError();r(t)}},u.prototype.authErrorHandler=function(e,t,r,n){if(e===w.Constants.interactionTypeRedirect)this.errorReceivedCallback?this.errorReceivedCallback(t,r.accountState):this.authResponseCallback(t,r);else{if(e!==w.Constants.interactionTypePopup)throw M.ClientAuthError.createInvalidInteractionTypeError();n(t)}},u.prototype.loginRedirect=function(e){if(!this.redirectCallbacksSet)throw s.ClientConfigurationError.createRedirectCallbacksNotSetError();this.acquireTokenInteractive(w.Constants.interactionTypeRedirect,!0,e)},u.prototype.acquireTokenRedirect=function(e){if(!e)throw s.ClientConfigurationError.createEmptyRequestError();if(!this.redirectCallbacksSet)throw s.ClientConfigurationError.createRedirectCallbacksNotSetError();this.acquireTokenInteractive(w.Constants.interactionTypeRedirect,!1,e)},u.prototype.loginPopup=function(r){var n=this;return new Promise(function(e,t){n.acquireTokenInteractive(w.Constants.interactionTypePopup,!0,r,e,t)})},u.prototype.acquireTokenPopup=function(r){var n=this;if(!r)throw s.ClientConfigurationError.createEmptyRequestError();return new Promise(function(e,t){n.acquireTokenInteractive(w.Constants.interactionTypePopup,!1,r,e,t)})},u.prototype.acquireTokenInteractive=function(t,r,n,o,i){var s=this;if(this.loginInProgress||this.acquireTokenInProgress){var e=this.loginInProgress?M.ClientAuthError.createLoginInProgressError():M.ClientAuthError.createAcquireTokenInProgressError(),a=q.buildResponseStateOnly(this.getAccountState(n&&n.state));this.authErrorHandler(t,e,a,i)}else{var c=r?this.appendScopes(n):n.scopes;this.validateInputScope(c,!r);var u=n&&n.account&&!r?n.account:this.getAccount();if(u||y.ServerRequestParameters.isSSOParam(n))this.acquireTokenHelper(u,t,r,n,c,o,i);else{if(!r)throw this.logger.info("User login is required"),M.ClientAuthError.createUserLoginRequiredError();if(this.extractADALIdToken()&&!c){this.logger.info("ADAL's idToken exists. Extracting login information from ADAL's idToken ");var l=this.buildIDTokenRequest(n);this.silentLogin=!0,this.acquireTokenSilent(l).then(function(e){s.silentLogin=!1,s.logger.info("Unified cache call is successful"),s.authResponseHandler(t,e,o)},function(e){s.silentLogin=!1,s.logger.error("Error occurred during unified cache ATS: "+e),s.acquireTokenHelper(null,t,r,n,c,o,i)})}else this.acquireTokenHelper(null,t,r,n,c,o,i)}}},u.prototype.acquireTokenHelper=function(i,s,a,c,u,l,d){var t=this;a?this.loginInProgress=!0:this.acquireTokenInProgress=!0;var h,p,f=u?u.join(" ").toLowerCase():this.clientId.toLowerCase(),g=c&&c.authority?R.AuthorityFactory.CreateInstance(c.authority,this.config.auth.validateAuthority):this.authorityInstance;if(s===w.Constants.interactionTypePopup){try{p=this.openPopup("about:blank","msal",w.Constants.popUpWidth,w.Constants.popUpHeight),_.WindowUtils.trackPopup(p)}catch(e){this.loginInProgress=!1,this.acquireTokenInProgress=!1,this.logger.info(M.ClientAuthErrorMessage.popUpWindowError.code+":"+M.ClientAuthErrorMessage.popUpWindowError.desc),this.cacheStorage.setItem(w.Constants.msalError,M.ClientAuthErrorMessage.popUpWindowError.code),this.cacheStorage.setItem(w.Constants.msalErrorDescription,M.ClientAuthErrorMessage.popUpWindowError.desc),d&&d(M.ClientAuthError.createPopupWindowError())}if(!p)return}g.resolveEndpointsAsync().then(function(){return m.__awaiter(t,void 0,void 0,function(){var t,r,n,o;return m.__generator(this,function(e){switch(e.label){case 0:if(t=a?L:this.getTokenType(i,u,!1),a&&((r=this.cacheStorage.getItem(w.Constants.angularLoginRequest))&&""!==r?this.cacheStorage.setItem(w.Constants.angularLoginRequest,""):r=window.location.href),h=new y.ServerRequestParameters(g,this.clientId,u,t,this.getRedirectUri(),c&&c.state),this.updateCacheEntries(h,i,r),h.populateQueryParams(i,c),n=P.UrlUtils.createNavigateUrl(h)+w.Constants.response_mode_fragment,s===w.Constants.interactionTypeRedirect)a||this.cacheStorage.setItem(w.Constants.stateAcquireToken,h.state,this.inCookie);else{if(s!==w.Constants.interactionTypePopup)throw M.ClientAuthError.createInvalidInteractionTypeError();window.renewStates.push(h.state),window.requestType=a?w.Constants.login:w.Constants.renewToken,this.registerCallback(h.state,f,l,d)}return this.navigateWindow(n,p),p?[4,_.WindowUtils.monitorWindowForHash(p,this.config.system.loadFrameTimeout)]:[3,2];case 1:if(o=e.sent())this.handleAuthenticationResponse(o),this.loginInProgress=!1,this.acquireTokenInProgress=!1,this.logger.info("Closing popup window"),this.config.framework.isAngular&&(this.broadcast("msal:popUpHashChanged",o),_.WindowUtils.closePopups());else{if(d&&d(M.ClientAuthError.createUserCancelledError()),this.config.framework.isAngular)return this.broadcast("msal:popUpClosed",M.ClientAuthErrorMessage.userCancelledError.code+w.Constants.resourceDelimiter+M.ClientAuthErrorMessage.userCancelledError.desc),[2];this.loginInProgress=!1,this.acquireTokenInProgress=!1}e.label=2;case 2:return[2]}})})}).catch(function(e){t.logger.warning("could not resolve endpoints"),t.authErrorHandler(s,M.ClientAuthError.createEndpointResolutionError(e.toString),q.buildResponseStateOnly(c.state),d),p&&p.close()})},u.prototype.acquireTokenSilent=function(h){var p=this;if(!h)throw s.ClientConfigurationError.createEmptyRequestError();return new Promise(function(e,t){p.validateInputScope(h.scopes,!0);var r=h.scopes.join(" ").toLowerCase(),n=h.account||p.getAccount(),o=p.cacheStorage.getItem(w.Constants.adalIdToken);if(!n&&!h.sid&&!h.loginHint&&A.StringUtils.isEmpty(o))return p.logger.info("User login is required"),t(M.ClientAuthError.createUserLoginRequiredError());var i=p.getTokenType(n,h.scopes,!0),s=new y.ServerRequestParameters(R.AuthorityFactory.CreateInstance(h.authority,p.config.auth.validateAuthority),p.clientId,h.scopes,i,p.getRedirectUri(),h&&h.state);if(y.ServerRequestParameters.isSSOParam(h)||n)s.populateQueryParams(n,h);else if(!n&&!A.StringUtils.isEmpty(o)){var a=f.TokenUtils.extractIdToken(o);p.logger.verbose("ADAL's idToken exists. Extracting login information from ADAL's idToken "),s.populateQueryParams(n,null,a)}var c,u,l=h.claimsRequest||s.claimsValue;if(!l&&!h.forceRefresh)try{u=p.getCachedToken(s,n)}catch(e){c=e}if(u)return p.logger.info("Token is already in cache for scope:"+r),e(u),null;if(c)return p.logger.infoPii(c.errorCode+":"+c.errorMessage),t(c),null;var d=void 0;return d=l?"Skipped cache lookup since claims were given.":h.forceRefresh?"Skipped cache lookup since request.forceRefresh option was set to true":"Token is not in cache for scope:"+r,p.logger.verbose(d),s.authorityInstance||(s.authorityInstance=h.authority?R.AuthorityFactory.CreateInstance(h.authority,p.config.auth.validateAuthority):p.authorityInstance),s.authorityInstance.resolveEndpointsAsync().then(function(){window.activeRenewals[r]?(p.logger.verbose("Renew token for scope: "+r+" is in progress. Registering callback"),p.registerCallback(window.activeRenewals[r],r,e,t)):h.scopes&&-1<h.scopes.indexOf(p.clientId)&&1===h.scopes.length?(p.logger.verbose("renewing idToken"),p.silentLogin=!0,p.renewIdToken(h.scopes,e,t,n,s)):(p.logger.verbose("renewing accesstoken"),p.renewToken(h.scopes,e,t,n,s))}).catch(function(e){return p.logger.warning("could not resolve endpoints"),t(M.ClientAuthError.createEndpointResolutionError(e.toString())),null})})},u.prototype.openPopup=function(e,t,r,n){try{var o=window.screenLeft?window.screenLeft:window.screenX,i=window.screenTop?window.screenTop:window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,c=s/2-r/2+o,u=a/2-n/2+i,l=window.open(e,t,"width="+r+", height="+n+", top="+u+", left="+c);if(!l)throw M.ClientAuthError.createPopupWindowError();return l.focus&&l.focus(),l}catch(e){throw this.logger.error("error opening popup "+e.message),this.loginInProgress=!1,this.acquireTokenInProgress=!1,M.ClientAuthError.createPopupWindowError(e.toString())}},u.prototype.loadIframeTimeout=function(i,s,a){return m.__awaiter(this,void 0,Promise,function(){var t,r,n,o=this;return m.__generator(this,function(e){switch(e.label){case 0:return t=window.activeRenewals[a],this.logger.verbose("Set loading state to pending for: "+a+":"+t),this.cacheStorage.setItem(w.Constants.renewStatus+t,w.Constants.tokenRenewStatusInProgress),setTimeout(function(){o.cacheStorage.getItem(w.Constants.renewStatus+t)===w.Constants.tokenRenewStatusInProgress&&(o.logger.verbose("Loading frame has timed out after: "+o.config.system.loadFrameTimeout/1e3+" seconds for scope "+a+":"+t),t&&window.callbackMappedToRenewStates[t]&&window.callbackMappedToRenewStates[t](null,M.ClientAuthError.createTokenRenewalTimeoutError()),o.cacheStorage.setItem(w.Constants.renewStatus+t,w.Constants.tokenRenewStatusCancelled))},this.config.system.loadFrameTimeout),[4,_.WindowUtils.loadFrame(i,s,this.config.system.navigateFrameWait,this.logger)];case 1:return r=e.sent(),[4,_.WindowUtils.monitorWindowForHash(r.contentWindow,this.config.system.loadFrameTimeout,i)];case 2:return(n=e.sent())&&this.handleAuthenticationResponse(n),[2]}})})},u.prototype.navigateWindow=function(e,t){if(!e||A.StringUtils.isEmpty(e))throw this.logger.info("Navigate url is empty"),U.AuthError.createUnexpectedError("Navigate url is empty");var r=t||window,n=t?"Navigated Popup window to:"+e:"Navigate to:"+e;this.logger.infoPii(n),r.location.replace(e)},u.prototype.registerCallback=function(n,o,e,t){var i=this;window.activeRenewals[o]=n,window.promiseMappedToRenewStates[n]||(window.promiseMappedToRenewStates[n]=[]),window.promiseMappedToRenewStates[n].push({resolve:e,reject:t}),window.callbackMappedToRenewStates[n]||(window.callbackMappedToRenewStates[n]=function(e,t){window.activeRenewals[o]=null;for(var r=0;r<window.promiseMappedToRenewStates[n].length;++r)try{if(t)window.promiseMappedToRenewStates[n][r].reject(t);else{if(!e)throw U.AuthError.createUnexpectedError("Error and response are both null");window.promiseMappedToRenewStates[n][r].resolve(e)}}catch(e){i.logger.warning(e)}window.promiseMappedToRenewStates[n]=null,window.callbackMappedToRenewStates[n]=null})},u.prototype.logout=function(){var r=this;this.clearCache(),this.account=null;var n="";this.getPostLogoutRedirectUri()&&(n="post_logout_redirect_uri="+encodeURIComponent(this.getPostLogoutRedirectUri())),this.authorityInstance.resolveEndpointsAsync().then(function(e){var t=e.EndSessionEndpoint?e.EndSessionEndpoint+"?"+n:r.authority+"oauth2/v2.0/logout?"+n;r.navigateWindow(t)})},u.prototype.clearCache=function(){window.renewStates=[];for(var e=this.cacheStorage.getAllAccessTokens(w.Constants.clientId,w.Constants.homeAccountIdentifier),t=0;t<e.length;t++)this.cacheStorage.removeItem(JSON.stringify(e[t].key));this.cacheStorage.resetCacheItems(),this.cacheStorage.clearCookie()},u.prototype.clearCacheForScope=function(e){for(var t=this.cacheStorage.getAllAccessTokens(w.Constants.clientId,w.Constants.homeAccountIdentifier),r=0;r<t.length;r++){var n=t[r];n.value.accessToken===e&&this.cacheStorage.removeItem(JSON.stringify(n.key))}},u.prototype.isCallback=function(e){return this.logger.info("isCallback will be deprecated in favor of urlContainsHash in MSAL.js v2.0."),P.UrlUtils.urlContainsHash(e)},u.prototype.processCallBack=function(e,t,r){var n,o;this.logger.info("Processing the callback from redirect response"),t=t||this.getResponseState(e);try{n=this.saveTokenFromHash(e,t)}catch(e){o=e}this.cacheStorage.removeItem(w.Constants.urlHash);try{this.cacheStorage.clearCookie();var i=this.getAccountState(t.state);if(n){if(t.requestType===w.Constants.renewToken||n.accessToken?(window.parent!==window?this.logger.verbose("Window is in iframe, acquiring token silently"):this.logger.verbose("acquiring token interactive in progress"),n.tokenType=w.Constants.accessToken):t.requestType===w.Constants.login&&(n.tokenType=w.Constants.idToken),!r)return void this.authResponseHandler(w.Constants.interactionTypeRedirect,n)}else if(!r)return void this.authErrorHandler(w.Constants.interactionTypeRedirect,o,q.buildResponseStateOnly(i));r(n,o)}catch(e){throw this.logger.error("Error occurred in token received callback function: "+e),M.ClientAuthError.createErrorInCallbackFunction(e.toString())}},u.prototype.handleAuthenticationResponse=function(e){var t=e||window.location.hash,r=_.WindowUtils.getIframeWithHash(t),n=_.WindowUtils.getPopUpWithHash(t),o=!(!r&&!n),i=this.getResponseState(t),s=null;if(this.logger.info("Returned from redirect url"),o)s=window.callbackMappedToRenewStates[i.state];else{if(s=null,this.config.auth.navigateToLoginRequestUrl)return this.cacheStorage.setItem(w.Constants.urlHash,t),void(window.parent===window&&(window.location.href=this.cacheStorage.getItem(w.Constants.loginRequest,this.inCookie)));if(window.location.hash="",!this.redirectCallbacksSet)return void this.cacheStorage.setItem(w.Constants.urlHash,t)}this.processCallBack(t,i,s),o&&_.WindowUtils.closePopups()},u.prototype.getResponseState=function(e){var t,r=P.UrlUtils.deserializeHash(e);if(!r)throw U.AuthError.createUnexpectedError("Hash was not parsed correctly.");if(!r.hasOwnProperty("state"))throw U.AuthError.createUnexpectedError("Hash does not contain state.");if((t={requestType:w.Constants.unknown,state:r.state,stateMatch:!1}).state===this.cacheStorage.getItem(w.Constants.stateLogin,this.inCookie)||t.state===this.silentAuthenticationState)return t.requestType=w.Constants.login,t.stateMatch=!0,t;if(t.state===this.cacheStorage.getItem(w.Constants.stateAcquireToken,this.inCookie))return t.requestType=w.Constants.renewToken,t.stateMatch=!0,t;if(!t.stateMatch){t.requestType=window.requestType;for(var n=window.renewStates,o=0;o<n.length;o++)if(n[o]===t.state){t.stateMatch=!0;break}}return t},u.prototype.getCachedToken=function(e,t){var r=null,n=e.scopes,o=this.cacheStorage.getAllAccessTokens(this.clientId,t?t.homeAccountIdentifier:null);if(0===o.length)return null;var i=[];if(e.authority){for(s=0;s<o.length;s++)c=(a=o[s]).key.scopes.split(" "),T.ScopeSet.containsScope(c,n)&&P.UrlUtils.CanonicalizeUri(a.key.authority)===e.authority&&i.push(a);if(0===i.length)return null;if(1!==i.length)throw M.ClientAuthError.createMultipleMatchingTokensInCacheError(n.toString());r=i[0]}else{for(var s=0;s<o.length;s++){var a,c=(a=o[s]).key.scopes.split(" ");T.ScopeSet.containsScope(c,n)&&i.push(a)}if(1===i.length)r=i[0],e.authorityInstance=R.AuthorityFactory.CreateInstance(r.key.authority,this.config.auth.validateAuthority);else{if(1<i.length)throw M.ClientAuthError.createMultipleMatchingTokensInCacheError(n.toString());var u=this.getUniqueAuthority(o,"authority");if(1<u.length)throw M.ClientAuthError.createMultipleAuthoritiesInCacheError(n.toString());e.authorityInstance=R.AuthorityFactory.CreateInstance(u[0],this.config.auth.validateAuthority)}}if(null==r)return null;var l=Number(r.value.expiresIn),d=this.config.system.tokenRenewalOffsetSeconds||300;if(l&&l>k.TimeUtils.now()+d){var h=new I.IdToken(r.value.idToken);if(!t&&!(t=this.getAccount()))throw U.AuthError.createUnexpectedError("Account should not be null here.");var p=this.getAccountState(e.state),f={uniqueId:"",tenantId:"",tokenType:r.value.idToken===r.value.accessToken?w.Constants.idToken:w.Constants.accessToken,idToken:h,idTokenClaims:h.claims,accessToken:r.value.accessToken,scopes:r.key.scopes.split(" "),expiresOn:new Date(1e3*l),account:t,accountState:p};return O.ResponseUtils.setResponseIdToken(f,h),f}return this.cacheStorage.removeItem(JSON.stringify(i[0].key)),null},u.prototype.getUniqueAuthority=function(e,t){var r=[],n=[];return e.forEach(function(e){e.key.hasOwnProperty(t)&&-1===n.indexOf(e.key[t])&&(n.push(e.key[t]),r.push(e.key[t]))}),r},u.prototype.extractADALIdToken=function(){var e=this.cacheStorage.getItem(w.Constants.adalIdToken);return A.StringUtils.isEmpty(e)?null:f.TokenUtils.extractIdToken(e)},u.prototype.renewToken=function(e,t,r,n,o){var i=e.join(" ").toLowerCase();this.logger.verbose("renewToken is called for scope:"+i);var s="msalRenewFrame"+i,a=_.WindowUtils.addHiddenIFrame(s,this.logger);this.updateCacheEntries(o,n),this.logger.verbose("Renew token Expected state: "+o.state);var c=P.UrlUtils.urlRemoveQueryStringParameter(P.UrlUtils.createNavigateUrl(o),w.Constants.prompt)+w.Constants.prompt_none;window.renewStates.push(o.state),window.requestType=w.Constants.renewToken,this.registerCallback(o.state,i,t,r),this.logger.infoPii("Navigate to:"+c),a.src="about:blank",this.loadIframeTimeout(c,s,i)},u.prototype.renewIdToken=function(e,t,r,n,o){this.logger.info("renewidToken is called");var i="msalIdTokenFrame",s=_.WindowUtils.addHiddenIFrame(i,this.logger);this.updateCacheEntries(o,n),this.logger.verbose("Renew Idtoken Expected state: "+o.state);var a=P.UrlUtils.urlRemoveQueryStringParameter(P.UrlUtils.createNavigateUrl(o),w.Constants.prompt)+w.Constants.prompt_none;this.silentLogin?(window.requestType=w.Constants.login,this.silentAuthenticationState=o.state):(window.requestType=w.Constants.renewToken,window.renewStates.push(o.state)),this.registerCallback(o.state,this.clientId,t,r),this.logger.infoPii("Navigate to:"+a),s.src="about:blank",this.loadIframeTimeout(a,i,this.clientId)},u.prototype.saveAccessToken=function(e,t,r,n,o){var i,s,a=m.__assign({},e),c=new E.ClientInfo(n);if(r.hasOwnProperty("scope")){for(var u=(i=r.scope).split(" "),l=this.cacheStorage.getAllAccessTokens(this.clientId,t),d=0;d<l.length;d++){var h=l[d];if(h.key.homeAccountIdentifier===e.account.homeAccountIdentifier){var p=h.key.scopes.split(" ");T.ScopeSet.isIntersectingScopes(p,u)&&this.cacheStorage.removeItem(JSON.stringify(h.key))}}var f=k.TimeUtils.parseExpiresIn(r[w.Constants.expiresIn]);s=k.TimeUtils.now()+f;var g=new C.AccessTokenKey(t,this.clientId,i,c.uid,c.utid),y=new v.AccessTokenValue(r[w.Constants.accessToken],o.rawIdToken,s.toString(),n);this.cacheStorage.setItem(JSON.stringify(g),JSON.stringify(y)),a.accessToken=r[w.Constants.accessToken],a.scopes=u}else i=this.clientId,g=new C.AccessTokenKey(t,this.clientId,i,c.uid,c.utid),s=Number(o.expiration),y=new v.AccessTokenValue(r[w.Constants.idToken],r[w.Constants.idToken],s.toString(),n),this.cacheStorage.setItem(JSON.stringify(g),JSON.stringify(y)),a.scopes=[i],a.accessToken=r[w.Constants.idToken];return s?a.expiresOn=new Date(1e3*s):this.logger.error("Could not parse expiresIn parameter"),a},u.prototype.saveTokenFromHash=function(e,t){this.logger.info("State status:"+t.stateMatch+"; Request type:"+t.requestType);var r,n={uniqueId:"",tenantId:"",tokenType:"",idToken:null,idTokenClaims:null,accessToken:null,scopes:[],expiresOn:null,account:null,accountState:""},o=P.UrlUtils.deserializeHash(e),i="",s="",a=null;if(o.hasOwnProperty(w.Constants.errorDescription)||o.hasOwnProperty(w.Constants.error)){if(this.logger.infoPii("Error :"+o[w.Constants.error]+"; Error description:"+o[w.Constants.errorDescription]),this.cacheStorage.setItem(w.Constants.msalError,o[w.Constants.error]),this.cacheStorage.setItem(w.Constants.msalErrorDescription,o[w.Constants.errorDescription]),t.requestType===w.Constants.login&&(this.loginInProgress=!1,this.cacheStorage.setItem(w.Constants.loginError,o[w.Constants.errorDescription]+":"+o[w.Constants.error]),i=S.Storage.generateAuthorityKey(t.state)),t.requestType===w.Constants.renewToken){this.acquireTokenInProgress=!1,i=S.Storage.generateAuthorityKey(t.state);var c=this.getAccount(),u=void 0;u=c&&!A.StringUtils.isEmpty(c.homeAccountIdentifier)?c.homeAccountIdentifier:w.Constants.no_account,s=S.Storage.generateAcquireTokenAccountKey(u,t.state)}var l=o[w.Constants.error],d=o[w.Constants.errorDescription];r=x.InteractionRequiredAuthError.isInteractionRequiredError(l)||x.InteractionRequiredAuthError.isInteractionRequiredError(d)?new x.InteractionRequiredAuthError(o[w.Constants.error],o[w.Constants.errorDescription]):new N.ServerError(o[w.Constants.error],o[w.Constants.errorDescription])}else if(t.stateMatch){this.logger.info("State is right"),o.hasOwnProperty(w.Constants.sessionState)&&this.cacheStorage.setItem(w.Constants.msalSessionState,o[w.Constants.sessionState]),n.accountState=this.getAccountState(t.state);var h="";if(o.hasOwnProperty(w.Constants.accessToken)){this.logger.info("Fragment has access token"),this.acquireTokenInProgress=!1,o.hasOwnProperty(w.Constants.idToken)?(a=new I.IdToken(o[w.Constants.idToken]),n.idToken=a,n.idTokenClaims=a.claims):(a=new I.IdToken(this.cacheStorage.getItem(w.Constants.idTokenKey)),n=O.ResponseUtils.setResponseIdToken(n,a));var p=this.populateAuthority(t.state,this.inCookie,this.cacheStorage,a);if(!o.hasOwnProperty(w.Constants.clientInfo))throw this.logger.warning("ClientInfo not received in the response from AAD"),M.ClientAuthError.createClientInfoNotPopulatedError("ClientInfo not received in the response from the server");h=o[w.Constants.clientInfo],n.account=b.Account.createAccount(a,new E.ClientInfo(h));var f=void 0;f=n.account&&!A.StringUtils.isEmpty(n.account.homeAccountIdentifier)?n.account.homeAccountIdentifier:w.Constants.no_account,s=S.Storage.generateAcquireTokenAccountKey(f,t.state);var g=S.Storage.generateAcquireTokenAccountKey(w.Constants.no_account,t.state),y=this.cacheStorage.getItem(s),m=void 0;A.StringUtils.isEmpty(y)?A.StringUtils.isEmpty(this.cacheStorage.getItem(g))||(n=this.saveAccessToken(n,p,o,h,a)):(m=JSON.parse(y),n.account&&m&&b.Account.compareAccounts(n.account,m)?(n=this.saveAccessToken(n,p,o,h,a),this.logger.info("The user object received in the response is the same as the one passed in the acquireToken request")):this.logger.warning("The account object created from the response is not the same as the one passed in the acquireToken request"))}o.hasOwnProperty(w.Constants.idToken)&&(this.logger.info("Fragment has id token"),this.loginInProgress=!1,a=new I.IdToken(o[w.Constants.idToken]),n=O.ResponseUtils.setResponseIdToken(n,a),o.hasOwnProperty(w.Constants.clientInfo)?h=o[w.Constants.clientInfo]:this.logger.warning("ClientInfo not received in the response from AAD"),p=this.populateAuthority(t.state,this.inCookie,this.cacheStorage,a),this.account=b.Account.createAccount(a,new E.ClientInfo(h)),n.account=this.account,a&&a.nonce?a.nonce!==this.cacheStorage.getItem(w.Constants.nonceIdToken,this.inCookie)?(this.account=null,this.cacheStorage.setItem(w.Constants.loginError,"Nonce Mismatch. Expected Nonce: "+this.cacheStorage.getItem(w.Constants.nonceIdToken,this.inCookie)+",Actual Nonce: "+a.nonce),this.logger.error("Nonce Mismatch.Expected Nonce: "+this.cacheStorage.getItem(w.Constants.nonceIdToken,this.inCookie)+",Actual Nonce: "+a.nonce),r=M.ClientAuthError.createNonceMismatchError(this.cacheStorage.getItem(w.Constants.nonceIdToken,this.inCookie),a.nonce)):(this.cacheStorage.setItem(w.Constants.idTokenKey,o[w.Constants.idToken]),this.cacheStorage.setItem(w.Constants.msalClientInfo,h),this.saveAccessToken(n,p,o,h,a)):(i=t.state,s=t.state,this.logger.error("Invalid id_token received in the response"),r=M.ClientAuthError.createInvalidIdTokenError(a),this.cacheStorage.setItem(w.Constants.msalError,r.errorCode),this.cacheStorage.setItem(w.Constants.msalErrorDescription,r.errorMessage)))}else{i=t.state,s=t.state;var C=this.cacheStorage.getItem(w.Constants.stateLogin,this.inCookie);this.logger.error("State Mismatch.Expected State: "+C+",Actual State: "+t.state),r=M.ClientAuthError.createInvalidStateError(t.state,C),this.cacheStorage.setItem(w.Constants.msalError,r.errorCode),this.cacheStorage.setItem(w.Constants.msalErrorDescription,r.errorMessage)}if(this.cacheStorage.setItem(w.Constants.renewStatus+t.state,w.Constants.tokenRenewStatusCompleted),this.cacheStorage.removeAcquireTokenEntries(t.state),this.inCookie&&(this.cacheStorage.setItemCookie(i,"",-1),this.cacheStorage.clearCookie()),r)throw r;if(!n)throw U.AuthError.createUnexpectedError("Response is null");return n},u.prototype.populateAuthority=function(e,t,r,n){var o=S.Storage.generateAuthorityKey(e),i=r.getItem(o,t);return A.StringUtils.isEmpty(i)?i:P.UrlUtils.replaceTenantPath(i,n.tenantId)},u.prototype.getAccount=function(){if(this.account)return this.account;var e=this.cacheStorage.getItem(w.Constants.idTokenKey),t=this.cacheStorage.getItem(w.Constants.msalClientInfo);if(A.StringUtils.isEmpty(e)||A.StringUtils.isEmpty(t))return null;var r=new I.IdToken(e),n=new E.ClientInfo(t);return this.account=b.Account.createAccount(r,n),this.account},u.prototype.getAccountState=function(e){if(e){var t=e.indexOf("|");if(-1<t&&t+1<e.length)return e.substring(t+1)}return e},u.prototype.getAllAccounts=function(){for(var e=[],t=this.cacheStorage.getAllAccessTokens(w.Constants.clientId,w.Constants.homeAccountIdentifier),r=0;r<t.length;r++){var n=new I.IdToken(t[r].value.idToken),o=new E.ClientInfo(t[r].value.homeAccountIdentifier),i=b.Account.createAccount(n,o);e.push(i)}return this.getUniqueAccounts(e)},u.prototype.getUniqueAccounts=function(e){if(!e||e.length<=1)return e;for(var t=[],r=[],n=0;n<e.length;++n)e[n].homeAccountIdentifier&&-1===t.indexOf(e[n].homeAccountIdentifier)&&(t.push(e[n].homeAccountIdentifier),r.push(e[n]));return r},u.prototype.validateInputScope=function(e,t){if(e){if(!Array.isArray(e))throw s.ClientConfigurationError.createScopesNonArrayError(e);if(e.length<1)throw s.ClientConfigurationError.createEmptyScopesArrayError(e.toString());if(-1<e.indexOf(this.clientId)&&1<e.length)throw s.ClientConfigurationError.createClientIdSingleScopeError(e.toString())}else if(t)throw s.ClientConfigurationError.createScopesRequiredError(e)},u.prototype.getScopeFromState=function(e){if(e){var t=e.indexOf("|");if(-1<t&&t+1<e.length)return e.substring(t+1)}return""},u.prototype.appendScopes=function(e){var t;return e&&e.scopes&&(t=e.extraScopesToConsent?e.scopes.concat(e.extraScopesToConsent):e.scopes),t},u.prototype.broadcast=function(e,t){var r=new CustomEvent(e,{detail:t});window.dispatchEvent(r)},u.prototype.getCachedTokenInternal=function(e,t,r){var n=t||this.getAccount();if(!n)return null;var o=this.authorityInstance?this.authorityInstance:R.AuthorityFactory.CreateInstance(this.authority,this.config.auth.validateAuthority),i=this.getTokenType(n,e,!0),s=new y.ServerRequestParameters(o,this.clientId,e,i,this.getRedirectUri(),r);return this.getCachedToken(s,t)},u.prototype.getScopesForEndpoint=function(e){if(0<this.config.framework.unprotectedResources.length)for(var t=0;t<this.config.framework.unprotectedResources.length;t++)if(-1<e.indexOf(this.config.framework.unprotectedResources[t]))return null;if(0<this.config.framework.protectedResourceMap.size)for(var r=0,n=Array.from(this.config.framework.protectedResourceMap.keys());r<n.length;r++){var o=n[r];if(-1<e.indexOf(o))return this.config.framework.protectedResourceMap.get(o)}return-1<e.indexOf("http://")||-1<e.indexOf("https://")?this.getHostFromUri(e)===this.getHostFromUri(this.getRedirectUri())?new Array(this.clientId):null:new Array(this.clientId)},u.prototype.getLoginInProgress=function(){return!!this.cacheStorage.getItem(w.Constants.urlHash)||this.loginInProgress},u.prototype.setloginInProgress=function(e){this.loginInProgress=e},u.prototype.getAcquireTokenInProgress=function(){return this.acquireTokenInProgress},u.prototype.setAcquireTokenInProgress=function(e){this.acquireTokenInProgress=e},u.prototype.getLogger=function(){return this.config.system.logger},u.prototype.getRedirectUri=function(){return"function"==typeof this.config.auth.redirectUri?this.config.auth.redirectUri():this.config.auth.redirectUri},u.prototype.getPostLogoutRedirectUri=function(){return"function"==typeof this.config.auth.postLogoutRedirectUri?this.config.auth.postLogoutRedirectUri():this.config.auth.postLogoutRedirectUri},u.prototype.getCurrentConfiguration=function(){if(!this.config)throw s.ClientConfigurationError.createNoSetConfigurationError();return this.config},u.prototype.getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t=t.split("/")[0]},u.prototype.getTokenType=function(e,t,r){return r?b.Account.compareAccounts(e,this.getAccount())?-1<t.indexOf(this.config.auth.clientId)?L:o:-1<t.indexOf(this.config.auth.clientId)?L:i:b.Account.compareAccounts(e,this.getAccount())?-1<t.indexOf(this.clientId)?L:o:i},u.prototype.setAccountCache=function(e,t){var r=e?this.getAccountId(e):w.Constants.no_account,n=S.Storage.generateAcquireTokenAccountKey(r,t);this.cacheStorage.setItem(n,JSON.stringify(e))},u.prototype.setAuthorityCache=function(e,t){var r=S.Storage.generateAuthorityKey(e);this.cacheStorage.setItem(r,P.UrlUtils.CanonicalizeUri(t),this.inCookie)},u.prototype.updateCacheEntries=function(e,t,r){r?(this.cacheStorage.setItem(w.Constants.loginRequest,r,this.inCookie),this.cacheStorage.setItem(w.Constants.stateLogin,e.state,this.inCookie)):this.setAccountCache(t,e.state),this.setAuthorityCache(e.state,e.authority),this.cacheStorage.setItem(w.Constants.nonceIdToken,e.nonce,this.inCookie)},u.prototype.getAccountId=function(e){return A.StringUtils.isEmpty(e.homeAccountIdentifier)?w.Constants.no_account:e.homeAccountIdentifier},u.prototype.buildIDTokenRequest=function(e){return{scopes:[this.clientId],authority:this.authority,account:this.getAccount(),extraQueryParameters:e.extraQueryParameters}},u.prototype.getTelemetryManagerFromConfig=function(e,t){if(!e)return null;var r=e.applicationName,n=e.applicationVersion,o=e.telemetryEmitter;if(!r||!n||!o)throw s.ClientConfigurationError.createTelemetryConfigError(e);var i={platform:{sdk:"msal.js",sdkVersion:w.libraryVersion(),applicationName:r,applicationVersion:n},clientId:t};return new a.default(i,o)},u);function u(e){this.authResponseCallback=null,this.tokenReceivedCallback=null,this.errorReceivedCallback=null,this.config=n.buildConfiguration(e),this.redirectCallbacksSet=!1,this.logger=this.config.system.logger,this.clientId=this.config.auth.clientId,this.inCookie=this.config.cache.storeAuthStateInCookie,this.telemetryManager=this.getTelemetryManagerFromConfig(this.config.system.telemetry,this.clientId),this.authority=this.config.auth.authority||"https://login.microsoftonline.com/common",this.loginInProgress=!1,this.acquireTokenInProgress=!1;try{this.cacheStorage=new S.Storage(this.config.cache.cacheLocation)}catch(e){throw s.ClientConfigurationError.createInvalidCacheLocationConfigError(this.config.cache.cacheLocation)}window.activeRenewals={},window.renewStates=[],window.callbackMappedToRenewStates={},window.promiseMappedToRenewStates={},window.msal=this;var t=window.location.hash,r=P.UrlUtils.urlContainsHash(t);this.config.framework.isAngular||!r||_.WindowUtils.isInIframe()||_.WindowUtils.isInPopup()||this.handleAuthenticationResponse(t)}t.UserAgentApplication=c},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=(o.isIntersectingScopes=function(e,t){e=this.convertToLowerCase(e);for(var r=0;r<t.length;r++)if(-1<e.indexOf(t[r].toLowerCase()))return!0;return!1},o.containsScope=function(t,e){return t=this.convertToLowerCase(t),e.every(function(e){return 0<=t.indexOf(e.toString().toLowerCase())})},o.convertToLowerCase=function(e){return e.map(function(e){return e.toLowerCase()})},o.removeElement=function(e,t){return e.filter(function(e){return e!==t})},o.parseScope=function(e){var t="";if(e)for(var r=0;r<e.length;++r)t+=r!==e.length-1?e[r]+" ":e[r];return t},o);function o(){}t.ScopeSet=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.validateClaimsRequest=function(e){if(e.claimsRequest)try{JSON.parse(e.claimsRequest)}catch(e){throw n.ClientConfigurationError.createClaimsRequestParsingError(e)}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),n=r(1),i=(s.decodeJwt=function(e){if(n.StringUtils.isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);return!t||t.length<4?null:{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},s.extractIdToken=function(e){var t=this.decodeJwt(e);if(!t)return null;try{var r=t.JWSPayload,n=o.CryptoUtils.base64Decode(r);return n?JSON.parse(n):null}catch(e){}return null},s);function s(){}t.TokenUtils=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),a=r(1),n=(c.createAccount=function(e,t){var r,n=e.objectId||e.subject,o=t?t.uid:"",i=t?t.utid:"";return a.StringUtils.isEmpty(o)||a.StringUtils.isEmpty(i)||(r=s.CryptoUtils.base64Encode(o)+"."+s.CryptoUtils.base64Encode(i)),new c(n,r,e.preferredName,e.name,e.claims,e.sid,e.issuer)},c.compareAccounts=function(e,t){return!!(e&&t&&e.homeAccountIdentifier&&t.homeAccountIdentifier&&e.homeAccountIdentifier===t.homeAccountIdentifier)},c);function c(e,t,r,n,o,i,s){this.accountIdentifier=e,this.homeAccountIdentifier=t,this.userName=r,this.name=n,this.idToken=o,this.idTokenClaims=o,this.sid=i,this.environment=s}t.Account=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(0),i=r(8),s=r(18),a=r(2),c=(n=i.Authority,o.__extends(u,n),Object.defineProperty(u.prototype,"AadInstanceDiscoveryEndpointUrl",{get:function(){return u.AadInstanceDiscoveryEndpoint+"?api-version=1.0&authorization_endpoint="+this.CanonicalAuthority+"oauth2/v2.0/authorize"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"AuthorityType",{get:function(){return i.AuthorityType.Aad},enumerable:!0,configurable:!0}),u.prototype.GetOpenIdConfigurationEndpointAsync=function(){return o.__awaiter(this,void 0,Promise,function(){return o.__generator(this,function(e){return!this.IsValidationEnabled||this.IsInTrustedHostList(this.CanonicalAuthorityUrlComponents.HostNameAndPort)?[2,this.DefaultOpenIdConfigurationEndpoint]:[2,(new s.XhrClient).sendRequestAsync(this.AadInstanceDiscoveryEndpointUrl,"GET",!0).then(function(e){return e.tenant_discovery_endpoint})]})})},u.prototype.IsInTrustedHostList=function(e){return a.AADTrustedHostList[e.toLowerCase()]},u.AadInstanceDiscoveryEndpoint="https://login.microsoftonline.com/common/discovery/instance",u);function u(e,t){return n.call(this,e,t)||this}t.AadAuthority=c},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=(o.prototype.sendRequestAsync=function(e,t,r){var i=this;return new Promise(function(r,n){var o=new XMLHttpRequest;if(o.open(t,e,!0),o.onload=function(e){var t;(o.status<200||300<=o.status)&&n(i.handleError(o.responseText));try{t=JSON.parse(o.responseText)}catch(e){n(i.handleError(o.responseText))}r(t)},o.onerror=function(e){n(o.status)},"GET"!==t)throw"not implemented";o.send()})},o.prototype.handleError=function(t){var e;try{if((e=JSON.parse(t)).error)return e.error;throw t}catch(e){return t}},o);function o(){}t.XhrClient=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var i,n=r(0),o=r(17),s=r(8),a=r(5),c=r(4),u=(i=o.AadAuthority,n.__extends(l,i),Object.defineProperty(l.prototype,"AuthorityType",{get:function(){return s.AuthorityType.B2C},enumerable:!0,configurable:!0}),l.prototype.GetOpenIdConfigurationEndpointAsync=function(){return n.__awaiter(this,void 0,Promise,function(){return n.__generator(this,function(e){if(!this.IsValidationEnabled||this.IsInTrustedHostList(this.CanonicalAuthorityUrlComponents.HostNameAndPort))return[2,this.DefaultOpenIdConfigurationEndpoint];throw a.ClientConfigurationErrorMessage.unsupportedAuthorityValidation})})},l.B2C_PREFIX="tfp",l);function l(e,t){var r=i.call(this,e,t)||this,n=c.UrlUtils.GetUrlComponents(e),o=n.PathSegments;if(o.length<3)throw a.ClientConfigurationErrorMessage.b2cAuthorityUriInvalidPath;return r.CanonicalAuthority="https://"+n.HostNameAndPort+"/"+o[0]+"/"+o[1]+"/"+o[2]+"/",r}t.B2cAuthority=u},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var c=r(0),n=r(10),o=r(4),u={clientId:"",authority:null,validateAuthority:!0,redirectUri:function(){return o.UrlUtils.getDefaultRedirectUri()},postLogoutRedirectUri:function(){return o.UrlUtils.getDefaultRedirectUri()},navigateToLoginRequestUrl:!0},l={cacheLocation:"sessionStorage",storeAuthStateInCookie:!1},d={logger:new n.Logger(null),loadFrameTimeout:6e3,tokenRenewalOffsetSeconds:300,navigateFrameWait:500},h={isAngular:!1,unprotectedResources:new Array,protectedResourceMap:new Map};t.buildConfiguration=function(e){var t=e.auth,r=e.cache,n=void 0===r?{}:r,o=e.system,i=void 0===o?{}:o,s=e.framework,a=void 0===s?{}:s;return{auth:c.__assign({},u,t),cache:c.__assign({},l,n),system:c.__assign({},d,i),framework:c.__assign({},h,a)}}},function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0});var n=t(0),o=t(11);r.InteractionRequiredAuthErrorMessage={interactionRequired:{code:"interaction_required"},consentRequired:{code:"consent_required"},loginRequired:{code:"login_required"}};var i,s=(i=o.ServerError,n.__extends(a,i),a.isInteractionRequiredError=function(e){var t=[r.InteractionRequiredAuthErrorMessage.interactionRequired.code,r.InteractionRequiredAuthErrorMessage.consentRequired.code,r.InteractionRequiredAuthErrorMessage.loginRequired.code];return e&&-1<t.indexOf(e)},a.createLoginRequiredAuthError=function(e){return new a(r.InteractionRequiredAuthErrorMessage.loginRequired.code,e)},a.createInteractionRequiredAuthError=function(e){return new a(r.InteractionRequiredAuthErrorMessage.interactionRequired.code,e)},a.createConsentRequiredAuthError=function(e){return new a(r.InteractionRequiredAuthErrorMessage.consentRequired.code,e)},a);function a(e,t){var r=i.call(this,e,t)||this;return r.name="InteractionRequiredAuthError",Object.setPrototypeOf(r,a.prototype),r}r.InteractionRequiredAuthError=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.buildResponseStateOnly=function(e){return{uniqueId:"",tenantId:"",tokenType:"",idToken:null,idTokenClaims:null,accessToken:"",scopes:null,expiresOn:null,account:null,accountState:e}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(19),i=r(2),s=r(9),n=r(3),a=r(4);t.scrubTenantFromUri=function(e){var t=a.UrlUtils.GetUrlComponents(e);if(!i.AADTrustedHostList[t.HostNameAndPort.toLocaleLowerCase()])return null;var r=t.PathSegments;if(r&&2<=r.length){var n=r[1]===o.B2cAuthority.B2C_PREFIX?2:1;n<r.length&&(r[n]=s.TENANT_PLACEHOLDER)}return t.Protocol+"//"+t.HostNameAndPort+"/"+r.join("/")},t.hashPersonalIdentifier=function(e){return n.CryptoUtils.base64Encode(e)},t.prependEventNamePrefix=function(e){return""+s.EVENT_NAME_PREFIX+(e||"")}},function(e,t,r){e.exports=r(25)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(12);t.UserAgentApplication=n.UserAgentApplication;var o=r(10);t.Logger=o.Logger;var i=r(10);t.LogLevel=i.LogLevel;var s=r(16);t.Account=s.Account;var a=r(2);t.Constants=a.Constants;var c=r(8);t.Authority=c.Authority;var u=r(12);t.CacheResult=u.CacheResult;var l=r(20);t.CacheLocation=l.CacheLocation,t.Configuration=l.Configuration;var d=r(14);t.AuthenticationParameters=d.AuthenticationParameters;var h=r(22);t.AuthResponse=h.AuthResponse;var p=r(7);t.AuthError=p.AuthError;var f=r(6);t.ClientAuthError=f.ClientAuthError;var g=r(11);t.ServerError=g.ServerError;var y=r(5);t.ClientConfigurationError=y.ClientConfigurationError;var m=r(21);t.InteractionRequiredAuthError=m.InteractionRequiredAuthError},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t,r,n,o){this.authority=s.UrlUtils.CanonicalizeUri(e),this.clientId=t,this.scopes=r,this.homeAccountIdentifier=i.CryptoUtils.base64Encode(n)+"."+i.CryptoUtils.base64Encode(o)}var i=r(3),s=r(4);t.AccessTokenKey=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t,r,n){this.accessToken=e,this.idToken=t,this.expiresIn=r,this.homeAccountIdentifier=n}t.AccessTokenValue=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),i=r(14),a=r(2),n=r(5),c=r(1),o=(Object.defineProperty(u.prototype,"authority",{get:function(){return this.authorityInstance?this.authorityInstance.CanonicalAuthority:null},enumerable:!0,configurable:!0}),u.prototype.populateQueryParams=function(e,t,r){var n,o={};t&&(t.prompt&&(this.validatePromptParameter(t.prompt),this.promptValue=t.prompt),t.claimsRequest&&(i.validateClaimsRequest(t),this.claimsValue=t.claimsRequest),u.isSSOParam(t)&&(o=this.constructUnifiedCacheQueryParameter(t,null))),r&&(o=this.constructUnifiedCacheQueryParameter(null,r)),o=this.addHintParameters(e,o),t&&(n=this.sanitizeEQParams(t)),this.queryParameters=u.generateQueryParametersString(o),this.extraQueryParameters=u.generateQueryParametersString(n)},u.prototype.validatePromptParameter=function(e){if(!(0<=[a.PromptState.LOGIN,a.PromptState.SELECT_ACCOUNT,a.PromptState.CONSENT,a.PromptState.NONE].indexOf(e)))throw n.ClientConfigurationError.createInvalidPromptError(e)},u.prototype.constructUnifiedCacheQueryParameter=function(e,t){var r,n,o={};if(e)if(e.account){var i=e.account;i.sid?(r=a.SSOTypes.SID,n=i.sid):i.userName&&(r=a.SSOTypes.LOGIN_HINT,n=i.userName)}else e.sid?(r=a.SSOTypes.SID,n=e.sid):e.loginHint&&(r=a.SSOTypes.LOGIN_HINT,n=e.loginHint);else t&&(n=t.hasOwnProperty(a.Constants.upn)?(r=a.SSOTypes.ID_TOKEN,t.upn):(r=a.SSOTypes.ORGANIZATIONS,null));return o=this.addSSOParameter(r,n),e&&e.account&&e.account.homeAccountIdentifier&&(o=this.addSSOParameter(a.SSOTypes.HOMEACCOUNT_ID,e.account.homeAccountIdentifier,o)),o},u.prototype.addHintParameters=function(e,t){return e&&!t[a.SSOTypes.SID]&&(!t[a.SSOTypes.LOGIN_HINT]&&e.sid&&this.promptValue===a.PromptState.NONE?t=this.addSSOParameter(a.SSOTypes.SID,e.sid,t):t[a.SSOTypes.LOGIN_HINT]||!e.userName||c.StringUtils.isEmpty(e.userName)||(t=this.addSSOParameter(a.SSOTypes.LOGIN_HINT,e.userName,t)),t[a.SSOTypes.DOMAIN_REQ]||t[a.SSOTypes.LOGIN_REQ]||(t=this.addSSOParameter(a.SSOTypes.HOMEACCOUNT_ID,e.homeAccountIdentifier,t))),t},u.prototype.addSSOParameter=function(e,t,r){if(r=r||{},!t)return r;switch(e){case a.SSOTypes.SID:r[a.SSOTypes.SID]=t;break;case a.SSOTypes.ID_TOKEN:r[a.SSOTypes.LOGIN_HINT]=t,r[a.SSOTypes.DOMAIN_HINT]=a.SSOTypes.ORGANIZATIONS;break;case a.SSOTypes.LOGIN_HINT:r[a.SSOTypes.LOGIN_HINT]=t;break;case a.SSOTypes.ORGANIZATIONS:r[a.SSOTypes.DOMAIN_HINT]=a.SSOTypes.ORGANIZATIONS;break;case a.SSOTypes.CONSUMERS:r[a.SSOTypes.DOMAIN_HINT]=a.SSOTypes.CONSUMERS;break;case a.SSOTypes.HOMEACCOUNT_ID:var n=t.split("."),o=s.CryptoUtils.base64Decode(n[0]),i=s.CryptoUtils.base64Decode(n[1]);r[a.SSOTypes.LOGIN_REQ]=o,(r[a.SSOTypes.DOMAIN_REQ]=i)===a.Constants.consumersUtid?r[a.SSOTypes.DOMAIN_HINT]=a.SSOTypes.CONSUMERS:r[a.SSOTypes.DOMAIN_HINT]=a.SSOTypes.ORGANIZATIONS;break;case a.SSOTypes.LOGIN_REQ:r[a.SSOTypes.LOGIN_REQ]=t;break;case a.SSOTypes.DOMAIN_REQ:r[a.SSOTypes.DOMAIN_REQ]=t}return r},u.prototype.sanitizeEQParams=function(e){var t=e.extraQueryParameters;return t?(e.claimsRequest&&delete t[a.Constants.claims],a.BlacklistedEQParams.forEach(function(e){t[e]&&delete t[e]}),t):null},u.generateQueryParametersString=function(t){var r=null;return t&&Object.keys(t).forEach(function(e){null==r?r=e+"="+encodeURIComponent(t[e]):r+="&"+e+"="+encodeURIComponent(t[e])}),r},u.isSSOParam=function(e){return e&&(e.account||e.sid||e.loginHint)},u);function u(e,t,r,n,o,i){this.authorityInstance=e,this.clientId=t,this.scopes=r?r.slice():[t],this.nonce=s.CryptoUtils.createNewGuid(),this.state=i&&!c.StringUtils.isEmpty(i)?s.CryptoUtils.createNewGuid()+"|"+i:s.CryptoUtils.createNewGuid(),this.correlationId=s.CryptoUtils.createNewGuid(),this.xClientSku="MSAL.JS",this.xClientVer=a.libraryVersion(),this.responseType=n,this.redirectUri=o}t.ServerRequestParameters=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(6),i=r(1),s=(Object.defineProperty(a.prototype,"uid",{get:function(){return this._uid?this._uid:""},set:function(e){this._uid=e},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"utid",{get:function(){return this._utid?this._utid:""},set:function(e){this._utid=e},enumerable:!0,configurable:!0}),a);function a(e){if(!e||i.StringUtils.isEmpty(e))return this.uid="",void(this.utid="");try{var t=n.CryptoUtils.base64Decode(e),r=JSON.parse(t);r&&(r.hasOwnProperty("uid")&&(this.uid=r.uid),r.hasOwnProperty("utid")&&(this.utid=r.utid))}catch(e){throw o.ClientAuthError.createClientInfoDecodingError(e)}}t.ClientInfo=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});function n(e){if(s.StringUtils.isEmpty(e))throw o.ClientAuthError.createIdTokenNullOrEmptyError(e);try{this.rawIdToken=e,this.claims=i.TokenUtils.extractIdToken(e),this.claims&&(this.claims.hasOwnProperty("iss")&&(this.issuer=this.claims.iss),this.claims.hasOwnProperty("oid")&&(this.objectId=this.claims.oid),this.claims.hasOwnProperty("sub")&&(this.subject=this.claims.sub),this.claims.hasOwnProperty("tid")&&(this.tenantId=this.claims.tid),this.claims.hasOwnProperty("ver")&&(this.version=this.claims.ver),this.claims.hasOwnProperty("preferred_username")&&(this.preferredName=this.claims.preferred_username),this.claims.hasOwnProperty("name")&&(this.name=this.claims.name),this.claims.hasOwnProperty("nonce")&&(this.nonce=this.claims.nonce),this.claims.hasOwnProperty("exp")&&(this.expiration=this.claims.exp),this.claims.hasOwnProperty("home_oid")&&(this.homeObjectId=this.claims.home_oid),this.claims.hasOwnProperty("sid")&&(this.sid=this.claims.sid),this.claims.hasOwnProperty("cloud_instance_host_name")&&(this.cloudInstance=this.claims.cloud_instance_host_name))}catch(e){throw o.ClientAuthError.createIdTokenParsingError(e)}}var o=r(6),i=r(15),s=r(1);t.IdToken=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),a=r(32),n=r(5),o=(s.prototype.setItem=function(e,t,r){window[this.cacheLocation]&&window[this.cacheLocation].setItem(e,t),r&&this.setItemCookie(e,t)},s.prototype.getItem=function(e,t){return t&&this.getItemCookie(e)?this.getItemCookie(e):window[this.cacheLocation]?window[this.cacheLocation].getItem(e):null},s.prototype.removeItem=function(e){if(window[this.cacheLocation])return window[this.cacheLocation].removeItem(e)},s.prototype.clear=function(){if(window[this.cacheLocation])return window[this.cacheLocation].clear()},s.prototype.getAllAccessTokens=function(e,t){var r,n=[],o=window[this.cacheLocation];if(o){var i=void 0;for(i in o)if(o.hasOwnProperty(i)&&i.match(e)&&i.match(t)){var s=this.getItem(i);s&&(r=new a.AccessTokenCacheItem(JSON.parse(i),JSON.parse(s)),n.push(r))}}return n},s.prototype.removeAcquireTokenEntries=function(e){var t=window[this.cacheLocation];if(t){var r=void 0;for(r in t)if(t.hasOwnProperty(r)&&!(-1===r.indexOf(i.CacheKeys.AUTHORITY)&&1===r.indexOf(i.CacheKeys.ACQUIRE_TOKEN_ACCOUNT)||e&&-1===r.indexOf(e))){var n=r.split(i.Constants.resourceDelimiter),o=void 0;1<n.length&&(o=n[1]),o&&!this.tokenRenewalInProgress(o)&&(this.removeItem(r),this.removeItem(i.Constants.renewStatus+o),this.removeItem(i.Constants.stateLogin),this.removeItem(i.Constants.stateAcquireToken),this.removeItem(i.Constants.nonceIdToken),this.removeItem(i.Constants.loginRequest),this.setItemCookie(r,"",-1))}}this.clearCookie()},s.prototype.tokenRenewalInProgress=function(e){var t=window[this.cacheLocation][i.Constants.renewStatus+e];return!(!t||t!==i.Constants.tokenRenewStatusInProgress)},s.prototype.resetCacheItems=function(){var e=window[this.cacheLocation];if(e){var t=void 0;for(t in e)e.hasOwnProperty(t)&&-1!==t.indexOf(i.Constants.msal)&&this.removeItem(t);this.removeAcquireTokenEntries()}},s.prototype.setItemCookie=function(e,t,r){var n=e+"="+t+";";r&&(n+="expires="+this.getCookieExpirationTime(r)+";"),document.cookie=n},s.prototype.getItemCookie=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return""},s.prototype.getCookieExpirationTime=function(e){var t=new Date;return new Date(t.getTime()+24*e*60*60*1e3).toUTCString()},s.prototype.clearCookie=function(){this.setItemCookie(i.Constants.nonceIdToken,"",-1),this.setItemCookie(i.Constants.stateLogin,"",-1),this.setItemCookie(i.Constants.loginRequest,"",-1),this.setItemCookie(i.Constants.stateAcquireToken,"",-1)},s.generateAcquireTokenAccountKey=function(e,t){return i.CacheKeys.ACQUIRE_TOKEN_ACCOUNT+i.Constants.resourceDelimiter+""+e+i.Constants.resourceDelimiter+t},s.generateAuthorityKey=function(e){return i.CacheKeys.AUTHORITY+i.Constants.resourceDelimiter+""+e},s);function s(e){if(s.instance)return s.instance;if(this.cacheLocation=e,this.localStorageSupported=void 0!==window[this.cacheLocation]&&null!=window[this.cacheLocation],this.sessionStorageSupported=void 0!==window[e]&&null!=window[e],!(s.instance=this).localStorageSupported&&!this.sessionStorageSupported)throw n.ClientConfigurationError.createNoStorageSupportedError();return s.instance}t.Storage=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t){this.key=e,this.value=t}t.AccessTokenCacheItem=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var c=r(6),u=r(4),n=(l.isInIframe=function(){return window.parent!==window},l.isInPopup=function(){return!(!window.opener||window.opener===window)},l.monitorWindowForHash=function(s,e,a){return new Promise(function(t,r){var n=e/l.POLLING_INTERVAL_MS,o=0,i=setInterval(function(){var e;s.closed&&(clearInterval(i),t());try{e=s.location.href}catch(e){}e&&"about:blank"!==e&&(o++,u.UrlUtils.urlContainsHash(e)?(clearInterval(i),t(s.location.hash)):n<o&&(clearInterval(i),r(c.ClientAuthError.createAcquireTokenSilentError(a))))},l.POLLING_INTERVAL_MS)})},l.loadFrame=function(n,o,e,i){return i.info("LoadFrame: "+o),new Promise(function(t,r){setTimeout(function(){var e=l.addHiddenIFrame(o,i);e?(""!==e.src&&"about:blank"!==e.src||(e.src=n,i.infoPii("Frame Name : "+o+" Navigated to: "+n)),t(e)):r("Unable to load iframe with name: "+o)},e)})},l.addHiddenIFrame=function(e,t){if(void 0===e)return null;t.info("Add msal frame to document:"+e);var r=document.getElementById(e);if(!r){if(document.createElement&&document.documentElement&&-1===window.navigator.userAgent.indexOf("MSIE 5.0")){var n=document.createElement("iframe");n.setAttribute("id",e),n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height="0",n.style.border="0",n.setAttribute("sandbox","allow-same-origin"),r=document.getElementsByTagName("body")[0].appendChild(n)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeend","<iframe name='"+e+"' id='"+e+"' style='display:none'></iframe>");window.frames&&window.frames[e]&&(r=window.frames[e])}return r},l.getIframeWithHash=function(t){return Array.from(document.getElementsByTagName("iframe")).find(function(e){try{return e.contentWindow.location.hash===t}catch(e){return!1}})},l.getPopups=function(){return window.openedWindows||(window.openedWindows=[]),window.openedWindows},l.getPopUpWithHash=function(t){return l.getPopups().find(function(e){try{return e.location.hash===t}catch(e){return!1}})},l.trackPopup=function(e){l.getPopups().push(e)},l.closePopups=function(){l.getPopups().forEach(function(e){return e.close()})},l.POLLING_INTERVAL_MS=50,l);function l(){}t.WindowUtils=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=(o.parseExpiresIn=function(e){return e=e||"3599",parseInt(e,10)},o.now=function(){return Math.round((new Date).getTime()/1e3)},o);function o(){}t.TimeUtils=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=(i.setResponseIdToken=function(e,t){if(!e)return null;if(!t)return e;var r=Number(t.expiration);return r&&!e.expiresOn&&(e.expiresOn=new Date(1e3*r)),n.__assign({},e,{idToken:t,idTokenClaims:t.claims,uniqueId:t.objectId||t.subject,tenantId:t.tenantId})},i);function i(){}t.ResponseUtils=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(17),o=r(19),i=r(8),s=r(5),a=r(4),c=r(1),u=(l.DetectAuthorityFromUrl=function(e){switch(e=a.UrlUtils.CanonicalizeUri(e),a.UrlUtils.GetUrlComponents(e).PathSegments[0]){case"tfp":return i.AuthorityType.B2C;default:return i.AuthorityType.Aad}},l.CreateInstance=function(e,t){if(c.StringUtils.isEmpty(e))return null;switch(l.DetectAuthorityFromUrl(e)){case i.AuthorityType.B2C:return new o.B2cAuthority(e,t);case i.AuthorityType.Aad:return new n.AadAuthority(e,t);default:throw s.ClientConfigurationErrorMessage.invalidAuthorityType}},l);function l(){}t.AuthorityFactory=u},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});function n(e){return e.telemetryCorrelationId+"-"+e.eventId+"-"+e.eventName}var a=r(0).__importDefault(r(38)),o=(i.prototype.startEvent=function(e){if(this.telemetryEmitter){var t=n(e);this.inProgressEvents[t]=e}},i.prototype.stopEvent=function(e){var t=n(e);if(this.telemetryEmitter&&this.inProgressEvents[t]){e.stop(),this.incrementEventCount(e);var r=this.completedEvents[e.telemetryCorrelationId];this.completedEvents[e.telemetryCorrelationId]=(r||[]).concat([e]),delete this.inProgressEvents[t]}},i.prototype.flush=function(e){var t=this;if(this.telemetryEmitter&&this.completedEvents[e]){var r=this.getOrphanedEvents(e);r.forEach(function(e){return t.incrementEventCount(e)});var n=this.completedEvents[e].concat(r);delete this.completedEvents[e];var o=this.eventCountByCorrelationId[e];if(delete this.eventCountByCorrelationId[e],n&&n.length){var i=new a.default(this.telemetryPlatform,e,this.clientId,o),s=n.concat([i]);this.telemetryEmitter(s.map(function(e){return e.get()}))}}},i.prototype.incrementEventCount=function(e){var t,r=e.eventName,n=this.eventCountByCorrelationId[e.telemetryCorrelationId];n?n[r]=n[r]?n[r]+1:1:this.eventCountByCorrelationId[e.telemetryCorrelationId]=((t={})[r]=1,t)},i.prototype.getOrphanedEvents=function(n){var o=this;return Object.keys(this.inProgressEvents).reduce(function(e,t){if(-1===t.indexOf(n))return e;var r=o.inProgressEvents[t];return delete o.inProgressEvents[t],e.concat([r])},[])},i);function i(e,t){this.completedEvents={},this.inProgressEvents={},this.eventCountByCorrelationId={},this.onlySendFailureTelemetry=!1,this.telemetryPlatform=e.platform,this.clientId=e.clientId,this.onlySendFailureTelemetry=e.onlySendFailureTelemetry,this.telemetryEmitter=t}t.default=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var i,n=r(0),s=r(9),o=n.__importDefault(r(39)),a=r(23),c=(i=o.default,n.__extends(u,i),u.prototype.getEventCount=function(e,t){return t[e]?t[e]:0},u);function u(e,t,r,n){var o=i.call(this,a.prependEventNamePrefix("default_event"),t)||this;return o.event[a.prependEventNamePrefix("client_id")]=r,o.event[a.prependEventNamePrefix("sdk_plaform")]=e.sdk,o.event[a.prependEventNamePrefix("sdk_version")]=e.sdkVersion,o.event[a.prependEventNamePrefix("application_name")]=e.applicationName,o.event[a.prependEventNamePrefix("application_version")]=e.applicationVersion,o.event[""+s.TELEMETRY_BLOB_EVENT_NAMES.UiEventCountTelemetryBatchKey]=o.getEventCount(a.prependEventNamePrefix("ui_event"),n),o.event[""+s.TELEMETRY_BLOB_EVENT_NAMES.HttpEventCountTelemetryBatchKey]=o.getEventCount(a.prependEventNamePrefix("http_event"),n),o.event[""+s.TELEMETRY_BLOB_EVENT_NAMES.CacheEventCountConstStrKey]=o.getEventCount(a.prependEventNamePrefix("cache_event"),n),o}t.default=c},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(9),i=r(9),s=r(23),a=r(3),c=(u.prototype.setElapsedTime=function(e){this.event[s.prependEventNamePrefix(i.ELAPSED_TIME_KEY)]=e},u.prototype.stop=function(){this.setElapsedTime(+Date.now()-+this.startTimestamp)},Object.defineProperty(u.prototype,"telemetryCorrelationId",{get:function(){return this.event[""+o.TELEMETRY_BLOB_EVENT_NAMES.MsalCorrelationIdConstStrKey]},set:function(e){this.event[""+o.TELEMETRY_BLOB_EVENT_NAMES.MsalCorrelationIdConstStrKey]=e},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"eventName",{get:function(){return this.event[s.prependEventNamePrefix(i.EVENT_NAME_KEY)]},enumerable:!0,configurable:!0}),u.prototype.get=function(){return n.__assign({},this.event,{eventId:this.eventId})},u);function u(e,t){var r;this.startTimestamp=Date.now(),this.eventId=a.CryptoUtils.createNewGuid(),this.event=((r={})[s.prependEventNamePrefix(i.EVENT_NAME_KEY)]=e,r[s.prependEventNamePrefix(i.START_TIME_KEY)]=this.startTimestamp,r[s.prependEventNamePrefix(i.ELAPSED_TIME_KEY)]=-1,r[""+o.TELEMETRY_BLOB_EVENT_NAMES.MsalCorrelationIdConstStrKey]=t,r)}t.default=c}],o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=24);function o(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var r,n});

/***/ })

}]);
//# sourceMappingURL=chunk.sp-http-msal_c9a0974f935bb4b7c673.js.map