@tapni/auth 1.0.69 → 1.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +8 -8
- package/dist/{Apps-Bizinac_.js → Apps-sXUoXUKA.js} +1 -1
- package/dist/{CustomApp-ByKAZ-DS.js → CustomApp-CEhqf3l-.js} +1 -1
- package/dist/{QR-QMncfIKM.js → QR-CBgahgDr.js} +1 -1
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +1 -1
- package/dist/{install-CNn0sOwx.js → install-Dh-6YUtB.js} +5 -6
- package/package.json +2 -2
- package/src/views/General.vue +2 -7
package/dist/TapniAuth.umd.js
CHANGED
|
@@ -160,7 +160,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
160
160
|
Error: `+l.errorCode+`
|
|
161
161
|
Error Description: `+l.errorMessage):(h=l,this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
|
|
162
162
|
Error: `+h.name+`
|
|
163
|
-
Error Description: `+h.message)),[2,null];case 4:return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,r]}})})},n.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Ur?Ur[this.canonicalAuthority]:null},n.prototype.isInKnownAuthorities=function(){var e=this,t=this.authorityOptions.knownAuthorities.filter(function(o){return de.getDomainFromUrl(o).toLowerCase()===e.hostnameAndPort});return t.length>0},n.generateAuthority=function(e,t){var o;if(t&&t.azureCloudInstance!==On.None){var r=t.tenant?t.tenant:b.DEFAULT_COMMON_TENANT;o=t.azureCloudInstance+"/"+r+"/"}return o||e},n.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},n.getCloudDiscoveryMetadataFromNetworkResponse=function(e,t){for(var o=0;o<e.length;o++){var r=e[o];if(r.aliases.indexOf(t)>-1)return r}return null},n.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},n.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},n.isPublicCloudAuthority=function(e){return b.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},n.buildRegionalAuthorityString=function(e,t,o){var r=new de(e);r.validateAsUri();var i=r.getUrlComponents(),s=t+"."+i.HostNameAndPort;this.isPublicCloudAuthority(i.HostNameAndPort)&&(s=t+"."+b.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var c=de.constructAuthorityUriFromObject(he(he({},r.getUrlComponents()),{HostNameAndPort:s})).urlString;return o?c+"?"+o:c},n.replaceWithRegionalInformation=function(e,t){return e.authorization_endpoint=n.buildRegionalAuthorityString(e.authorization_endpoint,t),e.token_endpoint=n.buildRegionalAuthorityString(e.token_endpoint,t,b.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=n.buildRegionalAuthorityString(e.end_session_endpoint,t)),e},n.transformCIAMAuthority=function(e){var t=e.endsWith(b.FORWARD_SLASH)?e:""+e+b.FORWARD_SLASH,o=new de(e),r=o.getUrlComponents();if(r.PathSegments.length===0&&r.HostNameAndPort.endsWith(b.CIAM_AUTH_URL)){var i=r.HostNameAndPort.split(".")[0];t=""+t+i+b.AAD_TENANT_DOMAIN_SUFFIX}return t},n.reservedTenantDomains=new Set(["{tenant}","{tenantid}",on.COMMON,on.CONSUMERS,on.ORGANIZATIONS]),n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var oo=function(){function n(){}return n.createDiscoveredInstance=function(e,t,o,r,i,s,c){return ne(this,void 0,void 0,function(){var l,h,u;return oe(this,function(g){switch(g.label){case 0:s==null||s.addQueueMeasurement(R.AuthorityFactoryCreateDiscoveredInstance,c),l=Un.transformCIAMAuthority(e),h=n.createInstance(l,t,o,r,i,s,c),g.label=1;case 1:return g.trys.push([1,3,,4]),s==null||s.setPreQueueTime(R.AuthorityResolveEndpointsAsync,c),[4,h.resolveEndpointsAsync()];case 2:return g.sent(),[2,h];case 3:throw u=g.sent(),K.createEndpointDiscoveryIncompleteError(u);case 4:return[2]}})})},n.createInstance=function(e,t,o,r,i,s,c){if(H.isEmpty(e))throw we.createUrlEmptyError();return new Un(e,t,o,r,i,s,c)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ro=function(){function n(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return n.isServerTelemetryEntity=function(e,t){var o=e.indexOf(Be.CACHE_KEY)===0,r=!0;return t&&(r=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),o&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Dr=function(){function n(){}return n.isThrottlingEntity=function(e,t){var o=!1;e&&(o=e.indexOf(Mn.THROTTLING_PREFIX)===0);var r=!0;return t&&(r=t.hasOwnProperty("throttleTime")),o&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ma={sendGetRequestAsync:function(){var n="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(n))},sendPostRequestAsync:function(){var n="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(n))}};/*! @azure/msal-common v13.3.1 2023-10-27 */var io={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},jr=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="JoseHeaderError",Object.setPrototypeOf(r,e.prototype),r}return e.createMissingKidError=function(){return new e(io.missingKidError.code,io.missingKidError.desc)},e.createMissingAlgError=function(){return new e(io.missingAlgError.code,io.missingAlgError.desc)},e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var fa=function(){function n(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return n.getShrHeaderString=function(e){if(!e.kid)throw jr.createMissingKidError();if(!e.alg)throw jr.createMissingAlgError();var t=new n({typ:e.typ||Io.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ga=function(){function n(e,t){this.cacheOutcome=Qt.NO_CACHE_HIT,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||b.EMPTY_STRING,this.wrapperVer=e.wrapperVer||b.EMPTY_STRING,this.telemetryCacheKey=Be.CACHE_KEY+Pe.CACHE_KEY_SEPARATOR+e.clientId}return n.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Be.VALUE_SEPARATOR+this.cacheOutcome,t=[this.wrapperSKU,this.wrapperVer].join(Be.VALUE_SEPARATOR),o=this.getRegionDiscoveryFields(),r=[e,o].join(Be.VALUE_SEPARATOR);return[Be.SCHEMA_VERSION,r,t].join(Be.CATEGORY_SEPARATOR)},n.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),t=n.maxErrorsToSend(e),o=e.failedRequests.slice(0,2*t).join(Be.VALUE_SEPARATOR),r=e.errors.slice(0,t).join(Be.VALUE_SEPARATOR),i=e.errors.length,s=t<i?Be.OVERFLOW_TRUE:Be.OVERFLOW_FALSE,c=[i,s].join(Be.VALUE_SEPARATOR);return[Be.SCHEMA_VERSION,e.cacheHits,o,r,c].join(Be.CATEGORY_SEPARATOR)},n.prototype.cacheFailedRequest=function(e){var t=this.getLastRequests();t.errors.length>=Be.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),H.isEmpty(e.subError)?H.isEmpty(e.errorCode)?e&&e.toString()?t.errors.push(e.toString()):t.errors.push(Be.UNKNOWN_ERROR):t.errors.push(e.errorCode):t.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)},n.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},n.prototype.getLastRequests=function(){var e=new ro,t=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return t||e},n.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),t=n.maxErrorsToSend(e),o=e.errors.length;if(t===o)this.cacheManager.removeItem(this.telemetryCacheKey);else{var r=new ro;r.failedRequests=e.failedRequests.slice(t*2),r.errors=e.errors.slice(t),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)}},n.maxErrorsToSend=function(e){var t,o=0,r=0,i=e.errors.length;for(t=0;t<i;t++){var s=e.failedRequests[2*t]||b.EMPTY_STRING,c=e.failedRequests[2*t+1]||b.EMPTY_STRING,l=e.errors[t]||b.EMPTY_STRING;if(r+=s.toString().length+c.toString().length+l.length+3,r<Be.MAX_LAST_HEADER_BYTES)o+=1;else break}return o},n.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||b.EMPTY_STRING),e.push(this.regionSource||b.EMPTY_STRING),e.push(this.regionOutcome||b.EMPTY_STRING),e.join(",")},n.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},n.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var qr=function(){function n(e,t,o,r,i,s){this.authority=t,this.libraryName=r,this.libraryVersion=i,this.applicationTelemetry=s,this.clientId=e,this.logger=o,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map}return n.prototype.startPerformanceMeasurement=function(e,t){return{}},n.prototype.startPerformanceMeasuremeant=function(e,t){return{}},n.prototype.getIntFields=function(){return sa},n.prototype.getPreQueueTime=function(e,t){var o=this.preQueueTimeByCorrelationId.get(t);if(o){if(o.name!==e){this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue time found for "+e+", unable to add queue measurement");return}}else{this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: "+t+", unable to add queue measurement");return}return o.time},n.prototype.calculateQueuedTime=function(e,t){return e<1?(this.logger.trace("PerformanceClient: preQueueTime should be a positive integer and not "+e),0):t<1?(this.logger.trace("PerformanceClient: currentTime should be a positive integer and not "+t),0):t<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):t-e},n.prototype.addQueueMeasurement=function(e,t,o,r){if(!t){this.logger.trace("PerformanceClient.addQueueMeasurement: correlationId not provided for "+e+", cannot add queue measurement");return}if(o===0)this.logger.trace("PerformanceClient.addQueueMeasurement: queue time provided for "+e+" is "+o);else if(!o){this.logger.trace("PerformanceClient.addQueueMeasurement: no queue time provided for "+e);return}var i={eventName:e,queueTime:o,manuallyCompleted:r},s=this.queueMeasurements.get(t);if(s)s.push(i),this.queueMeasurements.set(t,s);else{this.logger.trace("PerformanceClient.addQueueMeasurement: adding correlationId "+t+" to queue measurements");var c=[i];this.queueMeasurements.set(t,c)}this.preQueueTimeByCorrelationId.delete(t)},n.prototype.startMeasurement=function(e,t){var o=this,r,i,s=t||this.generateId();t||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",s),this.logger.trace("PerformanceClient: Performance measurement started for "+e,s);var c=this.startPerformanceMeasuremeant(e,s);c.startMeasurement();var l={eventId:this.generateId(),status:to.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:s,appName:(r=this.applicationTelemetry)===null||r===void 0?void 0:r.appName,appVersion:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appVersion};return this.cacheEventByCorrelationId(l),{endMeasurement:function(h){return o.endMeasurement(he(he({},l),h),c)},discardMeasurement:function(){return o.discardMeasurements(l.correlationId)},addStaticFields:function(h){return o.addStaticFields(h,l.correlationId)},increment:function(h){return o.increment(h,l.correlationId)},measurement:c,event:l}},n.prototype.endMeasurement=function(e,t){var o=this,r,i,s=this.eventsByCorrelationId.get(e.correlationId);if(!s)return this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId),null;var c=e.eventId===s.eventId,l={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};c?(l=this.getQueueInfo(e.correlationId),this.discardCache(s.correlationId)):(r=s.incompleteSubMeasurements)===null||r===void 0||r.delete(e.eventId),t==null||t.endMeasurement();var h=t==null?void 0:t.flushMeasurement();if(!h)return this.logger.trace("PerformanceClient: Performance measurement not taken",s.correlationId),null;if(this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+h+" ms",e.correlationId),!c)return s[e.name+"DurationMs"]=Math.floor(h),he({},s);var u=he(he({},s),e),g=0;return(i=u.incompleteSubMeasurements)===null||i===void 0||i.forEach(function(f){o.logger.trace("PerformanceClient: Incomplete submeasurement "+f.name+" found for "+e.name,u.correlationId),g++}),u.incompleteSubMeasurements=void 0,u=he(he({},u),{durationMs:Math.round(h),queuedTimeMs:l.totalQueueTime,queuedCount:l.totalQueueCount,queuedManuallyCompletedCount:l.manuallyCompletedCount,status:to.Completed,incompleteSubsCount:g}),this.truncateIntegralFields(u,this.getIntFields()),this.emitEvents([u],e.correlationId),u},n.prototype.addStaticFields=function(e,t){this.logger.trace("PerformanceClient: Updating static fields");var o=this.eventsByCorrelationId.get(t);o?this.eventsByCorrelationId.set(t,he(he({},o),e)):this.logger.trace("PerformanceClient: Event not found for",t)},n.prototype.increment=function(e,t){this.logger.trace("PerformanceClient: Updating counters");var o=this.eventsByCorrelationId.get(t);if(o)for(var r in e)o.hasOwnProperty(r)||(o[r]=0),o[r]+=e[r];else this.logger.trace("PerformanceClient: Event not found for",t)},n.prototype.cacheEventByCorrelationId=function(e){var t=this.eventsByCorrelationId.get(e.correlationId);t?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),t.incompleteSubMeasurements=t.incompleteSubMeasurements||new Map,t.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,he({},e)))},n.prototype.getQueueInfo=function(e){var t=this.queueMeasurements.get(e);t||this.logger.trace("PerformanceClient: no queue measurements found for for correlationId: "+e);var o=0,r=0,i=0;return t==null||t.forEach(function(s){o+=s.queueTime,r++,i+=s.manuallyCompleted?1:0}),{totalQueueTime:o,totalQueueCount:r,manuallyCompletedCount:i}},n.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},n.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: QueueMeasurements discarded",e),this.queueMeasurements.delete(e),this.logger.trace("PerformanceClient: Pre-queue times discarded",e),this.preQueueTimeByCorrelationId.delete(e)},n.prototype.addPerformanceCallback=function(e){var t=this.generateId();return this.callbacks.set(t,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+t),t},n.prototype.removePerformanceCallback=function(e){var t=this.callbacks.delete(e);return t?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),t},n.prototype.emitEvents=function(e,t){var o=this;this.logger.verbose("PerformanceClient: Emitting performance events",t),this.callbacks.forEach(function(r,i){o.logger.trace("PerformanceClient: Emitting event to callback "+i,t),r.apply(null,[e])})},n.prototype.truncateIntegralFields=function(e,t){t.forEach(function(o){o in e&&typeof e[o]=="number"&&(e[o]=Math.floor(e[o]))})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Fr=function(){function n(){}return n.prototype.startMeasurement=function(){},n.prototype.endMeasurement=function(){},n.prototype.flushMeasurement=function(){return null},n}(),_a=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new Fr},e.prototype.startPerformanceMeasurement=function(){return new Fr},e.prototype.calculateQueuedTime=function(t,o){return 0},e.prototype.addQueueMeasurement=function(t,o,r){},e.prototype.setPreQueueTime=function(t,o){},e}(qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var U={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},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."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},spaCodeAndNativeAccountPresent:{code:"spa_code_and_nativeAccountId_present",desc:"Request cannot contain both spa code and native account id."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},F=function(n){xe(e,n);function e(t,o){var r=n.call(this,t,o)||this;return Object.setPrototypeOf(r,e.prototype),r.name="BrowserAuthError",r}return e.createPkceNotGeneratedError=function(t){return new e(U.pkceNotGenerated.code,U.pkceNotGenerated.desc+" Detail:"+t)},e.createCryptoNotAvailableError=function(t){return new e(U.cryptoDoesNotExist.code,U.cryptoDoesNotExist.desc+" Detail:"+t)},e.createHttpMethodNotImplementedError=function(t){return new e(U.httpMethodNotImplementedError.code,U.httpMethodNotImplementedError.desc+" Given Method: "+t)},e.createEmptyNavigationUriError=function(){return new e(U.emptyNavigateUriError.code,U.emptyNavigateUriError.desc)},e.createEmptyHashError=function(t){return new e(U.hashEmptyError.code,U.hashEmptyError.desc+" Given Url: "+t)},e.createHashDoesNotContainStateError=function(){return new e(U.hashDoesNotContainStateError.code,U.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(U.hashDoesNotContainKnownPropertiesError.code,U.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(U.unableToParseStateError.code,U.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(U.stateInteractionTypeMismatchError.code,U.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(U.interactionInProgress.code,U.interactionInProgress.desc)},e.createPopupWindowError=function(t){var o=U.popupWindowError.desc;return o=H.isEmpty(t)?o:o+" Details: "+t,new e(U.popupWindowError.code,o)},e.createEmptyWindowCreatedError=function(){return new e(U.emptyWindowError.code,U.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(U.userCancelledError.code,U.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(U.monitorPopupTimeoutError.code,U.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(U.monitorIframeTimeoutError.code,U.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(t){return new e(U.redirectInIframeError.code,U.redirectInIframeError.desc+" (window.parent !== window) => "+t)},e.createBlockReloadInHiddenIframeError=function(){return new e(U.blockTokenRequestsInHiddenIframeError.code,U.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(U.blockAcquireTokenInPopupsError.code,U.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(U.iframeClosedPrematurelyError.code,U.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(U.silentLogoutUnsupportedError.code,U.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(U.noAccountError.code,U.noAccountError.desc)},e.createSilentPromptValueError=function(t){return new e(U.silentPromptValueError.code,U.silentPromptValueError.desc+" Given value: "+t)},e.createUnableToParseTokenRequestCacheError=function(){return new e(U.unableToParseTokenRequestCacheError.code,U.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(U.noTokenRequestCacheError.code,U.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(U.authRequestNotSet.code,U.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(U.noCachedAuthorityError.code,U.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(U.invalidCacheType.code,""+U.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(U.notInBrowserEnvironment.code,U.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(U.databaseNotOpen.code,U.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(U.noNetworkConnectivity.code,U.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(t,o){return new e(U.postRequestFailed.code,U.postRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+o.split("?")[0])},e.createGetRequestFailedError=function(t,o){return new e(U.getRequestFailed.code,U.getRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+o.split("?")[0])},e.createFailedToParseNetworkResponseError=function(t){return new e(U.failedToParseNetworkResponse.code,U.failedToParseNetworkResponse.desc+" | Attempted to reach: "+t.split("?")[0])},e.createUnableToLoadTokenError=function(t){return new e(U.unableToLoadTokenError.code,U.unableToLoadTokenError.desc+" | "+t)},e.createSigningKeyNotFoundInStorageError=function(t){return new e(U.signingKeyNotFoundInStorage.code,U.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+t)},e.createAuthCodeRequiredError=function(){return new e(U.authCodeRequired.code,U.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(U.authCodeOrNativeAccountRequired.code,U.authCodeOrNativeAccountRequired.desc)},e.createSpaCodeAndNativeAccountIdPresentError=function(){return new e(U.spaCodeAndNativeAccountPresent.code,U.spaCodeAndNativeAccountPresent.desc)},e.createDatabaseUnavailableError=function(){return new e(U.databaseUnavailable.code,U.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(U.unableToAcquireTokenFromNativePlatform.code,U.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(U.nativeHandshakeTimeout.code,U.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(U.nativeExtensionNotInstalled.code,U.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(U.nativeConnectionNotEstablished.code,U.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(U.nativeBrokerCalledBeforeInitialize.code,U.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(U.nativePromptNotSupported.code,U.nativePromptNotSupported.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var _t={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},Dn={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Vt;(function(n){n.HandshakeRequest="Handshake",n.HandshakeResponse="HandshakeResponse",n.GetToken="GetToken",n.Response="Response"})(Vt||(Vt={}));var Ae;(function(n){n.LocalStorage="localStorage",n.SessionStorage="sessionStorage",n.MemoryStorage="memoryStorage"})(Ae||(Ae={}));var At;(function(n){n.GET="GET",n.POST="POST"})(At||(At={}));var ue;(function(n){n.AUTHORITY="authority",n.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",n.SESSION_STATE="session.state",n.REQUEST_STATE="request.state",n.NONCE_IDTOKEN="nonce.id_token",n.ORIGIN_URI="request.origin",n.RENEW_STATUS="token.renew.status",n.URL_HASH="urlHash",n.REQUEST_PARAMS="request.params",n.SCOPES="scopes",n.INTERACTION_STATUS_KEY="interaction.status",n.CCS_CREDENTIAL="ccs.credential",n.CORRELATION_ID="request.correlationId",n.NATIVE_REQUEST="request.native",n.REDIRECT_CONTEXT="request.redirect.context"})(ue||(ue={}));var Rt;(function(n){n.ACCOUNT_KEYS="msal.account.keys",n.TOKEN_KEYS="msal.token.keys"})(Rt||(Rt={}));var kn;(function(n){n.WRAPPER_SKU="wrapper.sku",n.WRAPPER_VER="wrapper.version"})(kn||(kn={}));var ke;(function(n){n[n.acquireTokenRedirect=861]="acquireTokenRedirect",n[n.acquireTokenPopup=862]="acquireTokenPopup",n[n.ssoSilent=863]="ssoSilent",n[n.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",n[n.handleRedirectPromise=865]="handleRedirectPromise",n[n.acquireTokenByCode=866]="acquireTokenByCode",n[n.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",n[n.logout=961]="logout",n[n.logoutPopup=962]="logoutPopup"})(ke||(ke={}));var $;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})($||($={}));var Vr;(function(n){n.Startup="startup",n.Login="login",n.Logout="logout",n.AcquireToken="acquireToken",n.SsoSilent="ssoSilent",n.HandleRedirect="handleRedirect",n.None="none"})(Vr||(Vr={}));var Hr={scopes:An},Cn="jwk",Kr;(function(n){n.React="@azure/msal-react",n.Angular="@azure/msal-angular"})(Kr||(Kr={}));var zo="msal.db",va=1,ya=zo+".keys",Xe;(function(n){n[n.Default=0]="Default",n[n.AccessToken=1]="AccessToken",n[n.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",n[n.RefreshToken=3]="RefreshToken",n[n.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",n[n.Skip=5]="Skip"})(Xe||(Xe={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ze={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was 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."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},ao=function(n){xe(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="BrowserConfigurationAuthError",Object.setPrototypeOf(r,e.prototype),r}return e.createRedirectUriEmptyError=function(){return new e(Ze.redirectUriNotSet.code,Ze.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Ze.postLogoutUriNotSet.code,Ze.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(t){return new e(Ze.storageNotSupportedError.code,Ze.storageNotSupportedError.desc+" Given Location: "+t)},e.createRedirectCallbacksNotSetError=function(){return new e(Ze.noRedirectCallbacksSet.code,Ze.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(Ze.stubPcaInstanceCalled.code,Ze.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(Ze.inMemRedirectUnavailable.code,Ze.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(Ze.entropyNotProvided.code,Ze.entropyNotProvided.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Gr=function(){function n(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return n.prototype.validateWindowStorage=function(e){if(e!==Ae.LocalStorage&&e!==Ae.SessionStorage)throw ao.createStorageNotSupportedError(e);var t=!!window[e];if(!t)throw ao.createStorageNotSupportedError(e)},n.prototype.getItem=function(e){return this.windowStorage.getItem(e)},n.prototype.setItem=function(e,t){this.windowStorage.setItem(e,t)},n.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},n.prototype.getKeys=function(){return Object.keys(this.windowStorage)},n.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var xo=function(){function n(){this.cache=new Map}return n.prototype.getItem=function(e){return this.cache.get(e)||null},n.prototype.setItem=function(e,t){this.cache.set(e,t)},n.prototype.removeItem=function(e){this.cache.delete(e)},n.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(t,o){e.push(o)}),e},n.prototype.containsKey=function(e){return this.cache.has(e)},n.prototype.clear=function(){this.cache.clear()},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $r=function(){function n(){}return n.extractBrowserRequestState=function(e,t){if(H.isEmpty(t))return null;try{var o=Ft.parseRequestState(e,t);return o.libraryState.meta}catch(r){throw K.createInvalidStateError(t,r)}},n.parseServerResponseFromHash=function(e){if(!e)return{};var t=new de(e);return de.getDeserializedHash(t.getHash())},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Bo=function(n){xe(e,n);function e(t,o,r,i){var s=n.call(this,t,r,i)||this;return s.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,s.cacheConfig=o,s.logger=i,s.internalStorage=new xo,s.browserStorage=s.setupBrowserStorage(s.cacheConfig.cacheLocation),s.temporaryCacheStorage=s.setupTemporaryCacheStorage(s.cacheConfig.temporaryCacheLocation,s.cacheConfig.cacheLocation),o.cacheMigrationEnabled&&(s.migrateCacheEntries(),s.createKeyMaps()),s}return e.prototype.setupBrowserStorage=function(t){switch(t){case Ae.LocalStorage:case Ae.SessionStorage:try{return new Gr(t)}catch(o){this.logger.verbose(o);break}}return this.cacheConfig.cacheLocation=Ae.MemoryStorage,new xo},e.prototype.setupTemporaryCacheStorage=function(t,o){switch(o){case Ae.LocalStorage:case Ae.SessionStorage:try{return new Gr(t||Ae.SessionStorage)}catch(r){return this.logger.verbose(r),this.internalStorage}case Ae.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var t=this,o=b.CACHE_PREFIX+"."+Ne.ID_TOKEN,r=b.CACHE_PREFIX+"."+Ne.CLIENT_INFO,i=b.CACHE_PREFIX+"."+Ne.ERROR,s=b.CACHE_PREFIX+"."+Ne.ERROR_DESC,c=this.browserStorage.getItem(o),l=this.browserStorage.getItem(r),h=this.browserStorage.getItem(i),u=this.browserStorage.getItem(s),g=[c,l,h,u],f=[Ne.ID_TOKEN,Ne.CLIENT_INFO,Ne.ERROR,Ne.ERROR_DESC];f.forEach(function(w,C){return t.migrateCacheEntry(w,g[C])})},e.prototype.migrateCacheEntry=function(t,o){o&&this.setTemporaryCache(t,o,!0)},e.prototype.createKeyMaps=function(){var t=this;this.logger.trace("BrowserCacheManager - createKeyMaps called.");var o=this.getItem(Rt.ACCOUNT_KEYS),r=this.getItem(Rt.TOKEN_KEYS+"."+this.clientId);if(o&&r){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}var i=this.browserStorage.getKeys();i.forEach(function(s){if(t.isCredentialKey(s)){var c=t.getItem(s);if(c){var l=t.validateAndParseJson(c);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case Z.ID_TOKEN:if(sn.isIdTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: "+s+" found, saving key to token key map");var h=Je.toObject(new sn,l),u=t.updateCredentialCacheKey(s,h);t.addTokenKey(u,Z.ID_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: "+s);break;case Z.ACCESS_TOKEN:case Z.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(cn.isAccessTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: "+s+" found, saving key to token key map");var g=Je.toObject(new cn,l),u=t.updateCredentialCacheKey(s,g);t.addTokenKey(u,Z.ACCESS_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: "+s);break;case Z.REFRESH_TOKEN:if(yn.isRefreshTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: "+s+" found, saving key to token key map");var f=Je.toObject(new yn,l),u=t.updateCredentialCacheKey(s,f);t.addTokenKey(u,Z.REFRESH_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: "+s);break}}}if(t.isAccountKey(s)){var c=t.getItem(s);if(c){var w=t.validateAndParseJson(c);w&&Ue.isAccountEntity(w)&&(t.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: "+s+" found, saving key to account key map"),t.addAccountKeyToMap(s))}}})},e.prototype.validateAndParseJson=function(t){try{var o=JSON.parse(t);return o&&typeof o=="object"?o:null}catch{return null}},e.prototype.getItem=function(t){return this.browserStorage.getItem(t)},e.prototype.setItem=function(t,o){this.browserStorage.setItem(t,o)},e.prototype.getAccount=function(t){this.logger.trace("BrowserCacheManager.getAccount called");var o=this.getItem(t);if(!o)return this.removeAccountKeyFromMap(t),null;var r=this.validateAndParseJson(o);return!r||!Ue.isAccountEntity(r)?(this.removeAccountKeyFromMap(t),null):Je.toObject(new Ue,r)},e.prototype.setAccount=function(t){this.logger.trace("BrowserCacheManager.setAccount called");var o=t.generateAccountKey();this.setItem(o,JSON.stringify(t)),this.addAccountKeyToMap(o)},e.prototype.getAccountKeys=function(){this.logger.trace("BrowserCacheManager.getAccountKeys called");var t=this.getItem(Rt.ACCOUNT_KEYS);return t?JSON.parse(t):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])},e.prototype.addAccountKeyToMap=function(t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: "+t);var o=this.getAccountKeys();o.indexOf(t)===-1?(o.push(t),this.setItem(Rt.ACCOUNT_KEYS,JSON.stringify(o)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")},e.prototype.removeAccountKeyFromMap=function(t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: "+t);var o=this.getAccountKeys(),r=o.indexOf(t);r>-1?(o.splice(r,1),this.setItem(Rt.ACCOUNT_KEYS,JSON.stringify(o)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")},e.prototype.removeAccount=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){return n.prototype.removeAccount.call(this,t),this.removeAccountKeyFromMap(t),[2]})})},e.prototype.removeIdToken=function(t){n.prototype.removeIdToken.call(this,t),this.removeTokenKey(t,Z.ID_TOKEN)},e.prototype.removeAccessToken=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){return n.prototype.removeAccessToken.call(this,t),this.removeTokenKey(t,Z.ACCESS_TOKEN),[2]})})},e.prototype.removeRefreshToken=function(t){n.prototype.removeRefreshToken.call(this,t),this.removeTokenKey(t,Z.REFRESH_TOKEN)},e.prototype.getTokenKeys=function(){this.logger.trace("BrowserCacheManager.getTokenKeys called");var t=this.getItem(Rt.TOKEN_KEYS+"."+this.clientId);if(t){var o=this.validateAndParseJson(t);if(o&&o.hasOwnProperty("idToken")&&o.hasOwnProperty("accessToken")&&o.hasOwnProperty("refreshToken"))return o;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}},e.prototype.addTokenKey=function(t,o){this.logger.trace("BrowserCacheManager addTokenKey called");var r=this.getTokenKeys();switch(o){case Z.ID_TOKEN:r.idToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(t));break;case Z.ACCESS_TOKEN:r.accessToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),r.accessToken.push(t));break;case Z.REFRESH_TOKEN:r.refreshToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(t));break;default:this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: "+o),K.createUnexpectedCredentialTypeError()}this.setItem(Rt.TOKEN_KEYS+"."+this.clientId,JSON.stringify(r))},e.prototype.removeTokenKey=function(t,o){this.logger.trace("BrowserCacheManager removeTokenKey called");var r=this.getTokenKeys();switch(o){case Z.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: "+t+" from map");var i=r.idToken.indexOf(t);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),r.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case Z.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: "+t+" from map");var s=r.accessToken.indexOf(t);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),r.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case Z.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: "+t+" from map");var c=r.refreshToken.indexOf(t);c>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),r.refreshToken.splice(c,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: "+o),K.createUnexpectedCredentialTypeError()}this.setItem(Rt.TOKEN_KEYS+"."+this.clientId,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ID_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!sn.isIdTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Je.toObject(new sn,r))},e.prototype.setIdTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.ID_TOKEN)},e.prototype.getAccessTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ACCESS_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!cn.isAccessTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Je.toObject(new cn,r))},e.prototype.setAccessTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.ACCESS_TOKEN)},e.prototype.getRefreshTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.REFRESH_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!yn.isRefreshTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Je.toObject(new yn,r))},e.prototype.setRefreshTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.REFRESH_TOKEN)},e.prototype.getAppMetadata=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!Lo.isAppMetadataEntity(t,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Je.toObject(new Lo,r))},e.prototype.setAppMetadata=function(t){this.logger.trace("BrowserCacheManager.setAppMetadata called");var o=t.generateAppMetadataKey();this.setItem(o,JSON.stringify(t))},e.prototype.getServerTelemetry=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!ro.isServerTelemetryEntity(t,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Je.toObject(new ro,r))},e.prototype.setServerTelemetry=function(t,o){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(t,JSON.stringify(o))},e.prototype.getAuthorityMetadata=function(t){var o=this.internalStorage.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var r=this.validateAndParseJson(o);return r&&Oo.isAuthorityMetadataEntity(t,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Je.toObject(new Oo,r)):null},e.prototype.getAuthorityMetadataKeys=function(){var t=this,o=this.internalStorage.getKeys();return o.filter(function(r){return t.isAuthorityMetadata(r)})},e.prototype.setWrapperMetadata=function(t,o){this.internalStorage.setItem(kn.WRAPPER_SKU,t),this.internalStorage.setItem(kn.WRAPPER_VER,o)},e.prototype.getWrapperMetadata=function(){var t=this.internalStorage.getItem(kn.WRAPPER_SKU)||b.EMPTY_STRING,o=this.internalStorage.getItem(kn.WRAPPER_VER)||b.EMPTY_STRING;return[t,o]},e.prototype.setAuthorityMetadata=function(t,o){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(t,JSON.stringify(o))},e.prototype.getActiveAccount=function(){var t=this.generateCacheKey(Ne.ACTIVE_ACCOUNT_FILTERS),o=this.getItem(t);if(!o){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var r=this.generateCacheKey(Ne.ACTIVE_ACCOUNT),i=this.getItem(r);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var s=this.getAccountInfoByFilter({localAccountId:i})[0]||null;return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(s),s):null}var c=this.validateAndParseJson(o);return c?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:c.homeAccountId,localAccountId:c.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(t){var o=this.generateCacheKey(Ne.ACTIVE_ACCOUNT_FILTERS),r=this.generateCacheKey(Ne.ACTIVE_ACCOUNT);if(t){this.logger.verbose("setActiveAccount: Active account set");var i={homeAccountId:t.homeAccountId,localAccountId:t.localAccountId};this.browserStorage.setItem(o,JSON.stringify(i)),this.browserStorage.setItem(r,t.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(o),this.browserStorage.removeItem(r)},e.prototype.getAccountInfoByFilter=function(t){var o=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+o.length+" accounts found"),o.filter(function(r){return!(t.username&&t.username.toLowerCase()!==r.username.toLowerCase()||t.homeAccountId&&t.homeAccountId!==r.homeAccountId||t.localAccountId&&t.localAccountId!==r.localAccountId||t.tenantId&&t.tenantId!==r.tenantId||t.environment&&t.environment!==r.environment)})},e.prototype.getAccountInfoByHints=function(t,o){var r=this.getAllAccounts().filter(function(i){if(o){var s=i.idTokenClaims&&i.idTokenClaims.sid;return o===s}return t?t===i.username:!1});if(r.length===1)return r[0];if(r.length>1)throw K.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!Dr.isThrottlingEntity(t,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Je.toObject(new Dr,r))},e.prototype.setThrottlingCache=function(t,o){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(t,JSON.stringify(o))},e.prototype.getTemporaryCache=function(t,o){var r=o?this.generateCacheKey(t):t;if(this.cacheConfig.storeAuthStateInCookie){var i=this.getItemCookie(r);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}var s=this.temporaryCacheStorage.getItem(r);if(!s){if(this.cacheConfig.cacheLocation===Ae.LocalStorage){var c=this.browserStorage.getItem(r);if(c)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),c}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),s},e.prototype.setTemporaryCache=function(t,o,r){var i=r?this.generateCacheKey(t):t;this.temporaryCacheStorage.setItem(i,o),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(i,o))},e.prototype.removeItem=function(t){this.browserStorage.removeItem(t),this.temporaryCacheStorage.removeItem(t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(t))},e.prototype.containsKey=function(t){return this.browserStorage.containsKey(t)||this.temporaryCacheStorage.containsKey(t)},e.prototype.getKeys=function(){return Eo(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.removeAllAccounts()];case 1:return o.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(r){(t.browserStorage.containsKey(r)||t.temporaryCacheStorage.containsKey(r))&&(r.indexOf(b.CACHE_PREFIX)!==-1||r.indexOf(t.clientId)!==-1)&&t.removeItem(r)}),this.internalStorage.clear(),[2]}})})},e.prototype.clearTokensAndKeysWithClaims=function(){return z(this,void 0,void 0,function(){var t,o,r=this;return x(this,function(i){switch(i.label){case 0:return this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called"),t=this.getTokenKeys(),o=[],t.accessToken.forEach(function(s){var c=r.getAccessTokenCredential(s);c!=null&&c.requestedClaimsHash&&s.includes(c.requestedClaimsHash.toLowerCase())&&o.push(r.removeAccessToken(s))}),[4,Promise.all(o)];case 1:return i.sent(),o.length>0&&this.logger.warning(o.length+" access tokens with claims in the cache keys have been removed from the cache."),[2]}})})},e.prototype.setItemCookie=function(t,o,r){var i=encodeURIComponent(t)+"="+encodeURIComponent(o)+";path=/;SameSite=Lax;";if(r){var s=this.getCookieExpirationTime(r);i+="expires="+s+";"}this.cacheConfig.secureCookies&&(i+="Secure;"),document.cookie=i},e.prototype.getItemCookie=function(t){for(var o=encodeURIComponent(t)+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(var s=r[i];s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(o)===0)return decodeURIComponent(s.substring(o.length,s.length))}return b.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var t=this,o=b.CACHE_PREFIX+"."+this.clientId,r=document.cookie.split(";");r.forEach(function(i){for(;i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(o)===0){var s=i.split("=")[0];t.clearItemCookie(s)}})},e.prototype.clearItemCookie=function(t){this.setItemCookie(t,b.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(t){var o=new Date,r=new Date(o.getTime()+t*this.COOKIE_LIFE_MULTIPLIER);return r.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(t){var o=this.validateAndParseJson(t);return o?JSON.stringify(t):H.startsWith(t,b.CACHE_PREFIX)||H.startsWith(t,Ne.ADAL_ID_TOKEN)?t:b.CACHE_PREFIX+"."+this.clientId+"."+t},e.prototype.generateAuthorityKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.AUTHORITY+"."+o)},e.prototype.generateNonceKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.NONCE_IDTOKEN+"."+o)},e.prototype.generateStateKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.REQUEST_STATE+"."+o)},e.prototype.getCachedAuthority=function(t){var o=this.generateStateKey(t),r=this.getTemporaryCache(o);if(!r)return null;var i=this.generateAuthorityKey(r);return this.getTemporaryCache(i)},e.prototype.updateCacheEntries=function(t,o,r,i,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var c=this.generateStateKey(t);this.setTemporaryCache(c,t,!1);var l=this.generateNonceKey(t);this.setTemporaryCache(l,o,!1);var h=this.generateAuthorityKey(t);if(this.setTemporaryCache(h,r,!1),s){var u={credential:s.homeAccountId,type:rt.HOME_ACCOUNT_ID};this.setTemporaryCache(ue.CCS_CREDENTIAL,JSON.stringify(u),!0)}else if(!H.isEmpty(i)){var u={credential:i,type:rt.UPN};this.setTemporaryCache(ue.CCS_CREDENTIAL,JSON.stringify(u),!0)}},e.prototype.resetRequestCache=function(t){var o=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),H.isEmpty(t)||this.getKeys().forEach(function(r){r.indexOf(t)!==-1&&o.removeItem(r)}),t&&(this.removeItem(this.generateStateKey(t)),this.removeItem(this.generateNonceKey(t)),this.removeItem(this.generateAuthorityKey(t))),this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ue.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ue.URL_HASH)),this.removeItem(this.generateCacheKey(ue.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ue.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ue.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(t){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),t){var o=this.generateStateKey(t),r=this.temporaryCacheStorage.getItem(o);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+r),this.resetRequestCache(r||b.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(t){var o=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(r){if(r.indexOf(ue.REQUEST_STATE)!==-1){var i=o.temporaryCacheStorage.getItem(r);if(i){var s=$r.extractBrowserRequestState(o.cryptoImpl,i);s&&s.interactionType===t&&(o.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+i),o.resetRequestCache(i))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(t,o){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var r=o.base64Encode(JSON.stringify(t));this.setTemporaryCache(ue.REQUEST_PARAMS,r,!0)},e.prototype.getCachedRequest=function(t,o){this.logger.trace("BrowserCacheManager.getCachedRequest called");var r=this.getTemporaryCache(ue.REQUEST_PARAMS,!0);if(!r)throw F.createNoTokenRequestCacheError();var i=this.validateAndParseJson(o.base64Decode(r));if(!i)throw F.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)),H.isEmpty(i.authority)){var s=this.generateAuthorityKey(t),c=this.getTemporaryCache(s);if(!c)throw F.createNoCachedAuthorityError();i.authority=c}return i},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var t=this.getTemporaryCache(ue.NATIVE_REQUEST,!0);if(!t)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var o=this.validateAndParseJson(t);return o||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(t){var o=this.getInteractionInProgress();return t?o===this.clientId:!!o},e.prototype.getInteractionInProgress=function(){var t=b.CACHE_PREFIX+"."+ue.INTERACTION_STATUS_KEY;return this.getTemporaryCache(t,!1)},e.prototype.setInteractionInProgress=function(t){var o=b.CACHE_PREFIX+"."+ue.INTERACTION_STATUS_KEY;if(t){if(this.getInteractionInProgress())throw F.createInteractionInProgressError();this.setTemporaryCache(o,this.clientId,!1)}else!t&&this.getInteractionInProgress()===this.clientId&&this.removeItem(o)},e.prototype.getLegacyLoginHint=function(){var t=this.getTemporaryCache(Ne.ADAL_ID_TOKEN);t&&(this.browserStorage.removeItem(Ne.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var o=this.getTemporaryCache(Ne.ID_TOKEN,!0);o&&(this.removeItem(this.generateCacheKey(Ne.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var r=o||t;if(r){var i=new It(r,this.cryptoImpl);if(i.claims&&i.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.claims.preferred_username;if(i.claims&&i.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.claims.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null},e.prototype.updateCredentialCacheKey=function(t,o){var r=o.generateCredentialKey();if(t!==r){var i=this.getItem(t);if(i)return this.removeItem(t),this.setItem(r,i),this.logger.verbose("Updated an outdated "+o.credentialType+" cache key"),r;this.logger.error("Attempted to update an outdated "+o.credentialType+" cache key but no item matching the outdated key was found in storage")}return t},e.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(ue.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(t){this.setTemporaryCache(ue.REDIRECT_CONTEXT,t,!0)},e}(Je),ba=function(n,e){var t={cacheLocation:Ae.MemoryStorage,temporaryCacheLocation:Ae.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};return new Bo(n,t,Xn,e)};/*! @azure/msal-browser v2.38.3 2023-10-27 */var Uo="@azure/msal-browser",jn="2.38.3";/*! @azure/msal-browser v2.38.3 2023-10-27 */var wa=function(){function n(){}return n.prototype.sendGetRequestAsync=function(e,t){return z(this,void 0,void 0,function(){var o,r,i;return x(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,fetch(e,{method:At.GET,headers:this.getFetchHeaders(t)})];case 1:return o=s.sent(),[3,3];case 2:throw r=s.sent(),window.navigator.onLine?F.createGetRequestFailedError(r,e):F.createNoNetworkConnectivityError();case 3:return s.trys.push([3,5,,6]),i={headers:this.getHeaderDict(o.headers)},[4,o.json()];case 4:return[2,(i.body=s.sent(),i.status=o.status,i)];case 5:throw s.sent(),F.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},n.prototype.sendPostRequestAsync=function(e,t){return z(this,void 0,void 0,function(){var o,r,i,s;return x(this,function(c){switch(c.label){case 0:o=t&&t.body||b.EMPTY_STRING,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,fetch(e,{method:At.POST,headers:this.getFetchHeaders(t),body:o})];case 2:return r=c.sent(),[3,4];case 3:throw i=c.sent(),window.navigator.onLine?F.createPostRequestFailedError(i,e):F.createNoNetworkConnectivityError();case 4:return c.trys.push([4,6,,7]),s={headers:this.getHeaderDict(r.headers)},[4,r.json()];case 5:return[2,(s.body=c.sent(),s.status=r.status,s)];case 6:throw c.sent(),F.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},n.prototype.getFetchHeaders=function(e){var t=new Headers;if(!(e&&e.headers))return t;var o=e.headers;return Object.keys(o).forEach(function(r){t.append(r,o[r])}),t},n.prototype.getHeaderDict=function(e){var t={};return e.forEach(function(o,r){t[r]=o}),t},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ka=function(){function n(){}return n.prototype.sendGetRequestAsync=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.sendRequestAsync(e,At.GET,t)]})})},n.prototype.sendPostRequestAsync=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.sendRequestAsync(e,At.POST,t)]})})},n.prototype.sendRequestAsync=function(e,t,o){var r=this;return new Promise(function(i,s){var c=new XMLHttpRequest;if(c.open(t,e,!0),r.setXhrHeaders(c,o),c.onload=function(){(c.status<200||c.status>=300)&&(t===At.POST?s(F.createPostRequestFailedError("Failed with status "+c.status,e)):s(F.createGetRequestFailedError("Failed with status "+c.status,e)));try{var l=JSON.parse(c.responseText),h={headers:r.getHeaderDict(c),body:l,status:c.status};i(h)}catch{s(F.createFailedToParseNetworkResponseError(e))}},c.onerror=function(){window.navigator.onLine?t===At.POST?s(F.createPostRequestFailedError("Failed with status "+c.status,e)):s(F.createGetRequestFailedError("Failed with status "+c.status,e)):s(F.createNoNetworkConnectivityError())},t===At.POST&&o&&o.body)c.send(o.body);else if(t===At.GET)c.send();else throw F.createHttpMethodNotImplementedError(t)})},n.prototype.setXhrHeaders=function(e,t){if(t&&t.headers){var o=t.headers;Object.keys(o).forEach(function(r){e.setRequestHeader(r,o[r])})}},n.prototype.getHeaderDict=function(e){var t=e.getAllResponseHeaders(),o=t.trim().split(/[\r\n]+/),r={};return o.forEach(function(i){var s=i.split(": "),c=s.shift(),l=s.join(": ");c&&l&&(r[c]=l)}),r},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ee=function(){function n(){}return n.clearHash=function(e){e.location.hash=b.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,b.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},n.replaceHash=function(e){var t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):b.EMPTY_STRING},n.isInIframe=function(){return window.parent!==window},n.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(_t.POPUP_NAME_PREFIX+".")===0},n.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},n.getHomepage=function(){var e=new de(window.location.href),t=e.getUrlComponents();return t.Protocol+"//"+t.HostNameAndPort+"/"},n.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new wa:new ka},n.blockReloadInHiddenIframes=function(){var e=de.hashContainsKnownProperties(window.location.hash);if(e&&n.isInIframe())throw F.createBlockReloadInHiddenIframeError()},n.blockRedirectInIframe=function(e,t){var o=n.isInIframe();if(e===$.Redirect&&o&&!t)throw F.createRedirectInIframeError(o)},n.blockAcquireTokenInPopups=function(){if(n.isInPopup())throw F.createBlockAcquireTokenInPopupsError()},n.blockNonBrowserEnvironment=function(e){if(!e)throw F.createNonBrowserEnvironmentError()},n.blockNativeBrokerCalledBeforeInitialized=function(e,t){if(e&&!t)throw F.createNativeBrokerCalledBeforeInitialize()},n.detectIEOrEdge=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),o=e.indexOf("Trident/"),r=e.indexOf("Edge/"),i=t>0||o>0,s=r>0;return i||s},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qr=function(){function n(e,t,o,r,i,s,c,l,h){this.config=e,this.browserStorage=t,this.browserCrypto=o,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=s,this.nativeMessageHandler=l,this.correlationId=h||this.browserCrypto.createNewGuid(),this.logger=r.clone(_t.MSAL_SKU,jn,this.correlationId),this.performanceClient=c}return n.prototype.clearCacheOnLogout=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){switch(t.label){case 0:if(!e)return[3,5];Ue.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(Ue.generateAccountCacheKey(e))];case 2:return t.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return t.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return t.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return t.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return t.sent(),[3,9];case 8:return t.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},n.prototype.initializeBaseRequest=function(e,t){return z(this,void 0,void 0,function(){var o,r,i,s;return x(this,function(c){switch(c.label){case 0:return this.performanceClient.addQueueMeasurement(R.InitializeBaseRequest,e.correlationId),this.logger.verbose("Initializing BaseAuthRequest"),o=e.authority||this.config.auth.authority,t?[4,this.validateRequestAuthority(o,t)]:[3,2];case 1:c.sent(),c.label=2;case 2:if(r=Eo(e&&e.scopes||[]),i=Q(Q({},e),{correlationId:this.correlationId,authority:o,scopes:r}),!i.authenticationScheme)i.authenticationScheme=ge.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(i.authenticationScheme===ge.SSH){if(!e.sshJwk)throw we.createMissingSshJwkError();if(!e.sshKid)throw we.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+i.authenticationScheme+'" as configured in Auth request')}return this.config.cache.claimsBasedCachingEnabled&&e.claims&&!H.isEmptyObj(e.claims)?(s=i,[4,this.browserCrypto.hashString(e.claims)]):[3,4];case 3:s.requestedClaimsHash=c.sent(),c.label=4;case 4:return[2,i]}})})},n.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var t=e||this.config.auth.redirectUri||Ee.getCurrentUri();return de.getAbsoluteUrl(t,Ee.getCurrentUri())},n.prototype.validateRequestAuthority=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(r.label){case 0:return[4,this.getDiscoveredAuthority(e)];case 1:if(o=r.sent(),!o.isAlias(t.environment))throw we.createAuthorityMismatchError();return[2]}})})},n.prototype.initializeServerTelemetryManager=function(e,t){this.logger.verbose("initializeServerTelemetryManager called");var o={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new ga(o,this.browserStorage)},n.prototype.getDiscoveredAuthority=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),t={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,oo.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,t,this.logger)]):[3,2];case 1:return[2,o.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,oo.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,t,this.logger)];case 3:return[2,o.sent()]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var En=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(t){return z(this,void 0,void 0,function(){var o,r;return x(this,function(i){switch(i.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),this.logger.verbose("initializeAuthorizationRequest called",t.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return o=i.sent(),r=Q(Q({},t),{redirectUri:t.redirectUri,code:b.EMPTY_STRING,codeVerifier:o.verifier}),t.codeChallenge=o.challenge,t.codeChallengeMethod=b.S256_CODE_CHALLENGE_METHOD,[2,r]}})})},e.prototype.initializeLogoutRequest=function(t){this.logger.verbose("initializeLogoutRequest called",t==null?void 0:t.correlationId);var o=Q({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},t);if(t)if(t.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(t.account){var r=this.getLogoutHintFromIdTokenClaims(t.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),o.logoutHint=r)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!t||t.postLogoutRedirectUri!==null?t&&t.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(t.postLogoutRedirectUri,Ee.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",o.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Ee.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(Ee.getCurrentUri(),Ee.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",o.correlationId),o},e.prototype.getLogoutHintFromIdTokenClaims=function(t){var o=t.idTokenClaims;if(o){if(o.login_hint)return o.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},e.prototype.createAuthCodeClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientCreateAuthCodeClient,this.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new Or(i,this.performanceClient)]}})})},e.prototype.getClientConfiguration=function(t,o,r){return z(this,void 0,void 0,function(){var i,s;return x(this,function(c){switch(c.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientGetClientConfiguration,this.correlationId),this.logger.verbose("getClientConfiguration called",this.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),[4,this.getDiscoveredAuthority(o,r)];case 1:return i=c.sent(),s=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:i,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:_t.MSAL_SKU,version:jn,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(t,o,r){if(this.logger.verbose("validateAndExtractStateFromHash called",r),!t.state)throw F.createHashDoesNotContainStateError();var i=$r.extractBrowserRequestState(this.browserCrypto,t.state);if(!i)throw F.createUnableToParseStateError();if(i.interactionType!==o)throw F.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",r),t.state},e.prototype.getDiscoveredAuthority=function(t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l;return x(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),this.logger.verbose("getDiscoveredAuthority called",this.correlationId),i=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},c=t||this.config.auth.authority,l=Un.generateAuthority(c,o||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),this.performanceClient.setPreQueueTime(R.AuthorityFactoryCreateDiscoveredInstance,this.correlationId),[4,oo.createDiscoveredInstance(l,this.config.system.networkClient,this.browserStorage,s,this.logger,this.performanceClient,this.correlationId).then(function(u){return i.endMeasurement({success:!0}),u}).catch(function(u){throw i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})];case 1:return[2,h.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId),this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),r=this.getRedirectUri(t.redirectUri),i={interactionType:o},s=Ft.setRequestState(this.browserCrypto,t&&t.state||b.EMPTY_STRING,i),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,this.correlationId),l=[{}],[4,this.initializeBaseRequest(t)];case 1:return c=Q.apply(void 0,[Q.apply(void 0,l.concat([g.sent()])),{redirectUri:r,state:s,nonce:t.nonce||this.browserCrypto.createNewGuid(),responseMode:Qn.FRAGMENT}]),h=t.account||this.browserStorage.getActiveAccount(),h&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+h.homeAccountId,this.correlationId),c.account=h),H.isEmpty(c.loginHint)&&!h&&(u=this.browserStorage.getLegacyLoginHint(),u&&(c.loginHint=u)),[2,c]}})})},e}(Qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Do=function(){function n(e,t,o,r,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=o,this.logger=r,this.performanceClient=i}return n.prototype.handleCodeResponseFromHash=function(e,t,o,r){return z(this,void 0,void 0,function(){var i,s,c;return x(this,function(l){if(this.performanceClient.addQueueMeasurement(R.HandleCodeResponseFromHash,this.authCodeRequest.correlationId),this.logger.verbose("InteractionHandler.handleCodeResponse called"),H.isEmpty(e))throw F.createEmptyHashError(e);if(i=this.browserStorage.generateStateKey(t),s=this.browserStorage.getTemporaryCache(i),!s)throw K.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(e,s)}catch(h){throw h instanceof rn&&h.subError===U.userCancelledError.code?F.createUserCancelledError():h}return this.performanceClient.setPreQueueTime(R.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),[2,this.handleCodeResponseFromServer(c,t,o,r)]})})},n.prototype.handleCodeResponseFromServer=function(e,t,o,r,i){return i===void 0&&(i=!0),z(this,void 0,void 0,function(){var s,c,l,h,u,g;return x(this,function(f){switch(f.label){case 0:if(this.performanceClient.addQueueMeasurement(R.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),s=this.browserStorage.generateStateKey(t),c=this.browserStorage.getTemporaryCache(s),!c)throw K.createStateNotFoundError("Cached State");return l=this.browserStorage.generateNonceKey(c),h=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?(this.performanceClient.setPreQueueTime(R.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,o,r)]):[3,2];case 1:f.sent(),f.label=2;case 2:return i&&(e.nonce=h||void 0),e.state=c,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),this.performanceClient.setPreQueueTime(R.AuthClientAcquireToken,this.authCodeRequest.correlationId),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return g=f.sent(),this.browserStorage.cleanRequestByState(t),[2,g]}})})},n.prototype.updateTokenEndpointAuthority=function(e,t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(R.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),r="https://"+e+"/"+t.tenant+"/",[4,oo.createDiscoveredInstance(r,o,this.browserStorage,t.options,this.logger,this.performanceClient,this.authCodeRequest.correlationId)];case 1:return i=s.sent(),this.authModule.updateAuthority(i),[2]}})})},n.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ue.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wr=function(n){xe(e,n);function e(t,o,r,i,s,c){var l=n.call(this,t,o,r,i,c)||this;return l.browserCrypto=s,l}return e.prototype.initiateAuthRequest=function(t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),H.isEmpty(t)?[3,7]:(o.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ue.ORIGIN_URI,o.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ue.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+t),r={apiId:ke.acquireTokenRedirect,timeout:o.redirectTimeout,noHistory:!1},typeof o.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),i=o.onRedirectNavigate(t),i===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,o.navigationClient.navigateExternal(t,r)])));case 1:return s.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,o.navigationClient.navigateExternal(t,r)];case 5:return s.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),F.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(t,o,r,i){return z(this,void 0,void 0,function(){var s,c,l,h,u,g,f;return x(this,function(w){switch(w.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),H.isEmpty(t))throw F.createEmptyHashError(t);if(this.browserStorage.setInteractionInProgress(!1),s=this.browserStorage.generateStateKey(o),c=this.browserStorage.getTemporaryCache(s),!c)throw K.createStateNotFoundError("Cached State");try{l=this.authModule.handleFragmentResponse(t,c)}catch(C){throw C instanceof rn&&C.subError===U.userCancelledError.code?F.createUserCancelledError():C}return h=this.browserStorage.generateNonceKey(c),u=this.browserStorage.getTemporaryCache(h),this.authCodeRequest.code=l.code,l.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(l.cloud_instance_host_name,r,i)]:[3,2];case 1:w.sent(),w.label=2;case 2:return l.nonce=u||void 0,l.state=c,l.client_info?this.authCodeRequest.clientInfo=l.client_info:(g=this.checkCcsCredentials(),g&&(this.authCodeRequest.ccsCredential=g)),[4,this.authModule.acquireToken(this.authCodeRequest,l)];case 3:return f=w.sent(),this.browserStorage.cleanRequestByState(o),[2,f]}})})},e}(Do);/*! @azure/msal-browser v2.38.3 2023-10-27 */var te;(function(n){n.INITIALIZE_START="msal:initializeStart",n.INITIALIZE_END="msal:initializeEnd",n.ACCOUNT_ADDED="msal:accountAdded",n.ACCOUNT_REMOVED="msal:accountRemoved",n.LOGIN_START="msal:loginStart",n.LOGIN_SUCCESS="msal:loginSuccess",n.LOGIN_FAILURE="msal:loginFailure",n.ACQUIRE_TOKEN_START="msal:acquireTokenStart",n.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",n.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",n.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",n.SSO_SILENT_START="msal:ssoSilentStart",n.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",n.SSO_SILENT_FAILURE="msal:ssoSilentFailure",n.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",n.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",n.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",n.HANDLE_REDIRECT_START="msal:handleRedirectStart",n.HANDLE_REDIRECT_END="msal:handleRedirectEnd",n.POPUP_OPENED="msal:popupOpened",n.LOGOUT_START="msal:logoutStart",n.LOGOUT_SUCCESS="msal:logoutSuccess",n.LOGOUT_FAILURE="msal:logoutFailure",n.LOGOUT_END="msal:logoutEnd",n.RESTORE_FROM_BFCACHE="msal:restoreFromBFCache"})(te||(te={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wt;(function(n){n.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",n.USER_CANCEL="USER_CANCEL",n.NO_NETWORK="NO_NETWORK",n.TRANSIENT_ERROR="TRANSIENT_ERROR",n.PERSISTENT_ERROR="PERSISTENT_ERROR",n.DISABLED="DISABLED",n.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(Wt||(Wt={}));var qn={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},Nt=function(n){xe(e,n);function e(t,o,r){var i=n.call(this,t,o)||this;return Object.setPrototypeOf(i,e.prototype),i.name="NativeAuthError",i.ext=r,i}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===Wt.PERSISTENT_ERROR||this.ext.status===Wt.DISABLED))return!0;switch(this.errorCode){case qn.extensionError.code:return!0;default:return!1}},e.createError=function(t,o,r){if(r&&r.status)switch(r.status){case Wt.ACCOUNT_UNAVAILABLE:return gt.createNativeAccountUnavailableError();case Wt.USER_INTERACTION_REQUIRED:return new gt(t,o);case Wt.USER_CANCEL:return F.createUserCancelledError();case Wt.NO_NETWORK:return F.createNoNetworkConnectivityError()}return new e(t,o,r)},e.createUserSwitchError=function(){return new e(qn.userSwitch.code,qn.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(qn.tokensNotFoundInCache.code,qn.tokensNotFoundInCache.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Yr=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c;return x(this,function(l){switch(l.label){case 0:return o=this.performanceClient.startMeasurement(R.SilentCacheClientAcquireToken,t.correlationId),r=this.initializeServerTelemetryManager(ke.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(r,t.authority,t.azureCloudOptions)];case 1:i=l.sent(),this.logger.verbose("Silent auth client created"),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,i.acquireCachedToken(t)];case 3:return s=l.sent(),o.endMeasurement({success:!0,fromCache:!0}),[2,s];case 4:throw c=l.sent(),c instanceof F&&c.errorCode===U.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),o.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new la(i,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(t,o){return z(this,void 0,void 0,function(){var r;return x(this,function(i){switch(i.label){case 0:return this.performanceClient.addQueueMeasurement(R.InitializeSilentRequest,this.correlationId),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,this.correlationId),r=[Q({},t)],[4,this.initializeBaseRequest(t,o)];case 1:return[2,Q.apply(void 0,[Q.apply(void 0,r.concat([i.sent()])),{account:o,forceRefresh:t.forceRefresh||!1}])]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Tn=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g,f,w){var C=n.call(this,t,o,r,i,s,c,h,u,w)||this;return C.apiId=l,C.accountId=g,C.nativeMessageHandler=u,C.nativeStorageManager=f,C.silentCacheClient=new Yr(t,C.nativeStorageManager,r,i,s,c,h,u,w),C}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),o=this.performanceClient.startMeasurement(R.NativeInteractionClientAcquireToken,t.correlationId),r=pt.nowSeconds(),[4,this.initializeNativeRequest(t)];case 1:i=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,i)];case 3:return s=u.sent(),o.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,s];case 4:return u.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return c={method:Vt.GetToken,request:i},[4,this.nativeMessageHandler.sendMessage(c)];case 6:return l=u.sent(),h=this.validateNativeResponse(l),[2,this.handleNativeResponse(h,i,r).then(function(g){return o.endMeasurement({success:!0,isNativeBroker:!0,requestId:g.requestId}),g}).catch(function(g){throw o.endMeasurement({success:!1,errorCode:g.errorCode,subErrorCode:g.subError,isNativeBroker:!0}),g})]}})})},e.prototype.createSilentCacheRequest=function(t,o){return{authority:t.authority,correlationId:this.correlationId,scopes:He.fromString(t.scope).asArray(),account:o,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c;return x(this,function(l){switch(l.label){case 0:if(!t)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),K.createNoAccountFoundError();if(r=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t}),!r)throw K.createNoAccountFoundError();l.label=1;case 1:return l.trys.push([1,3,,4]),i=this.createSilentCacheRequest(o,r),[4,this.silentCacheClient.acquireToken(i)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l;return x(this,function(h){switch(h.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(t)];case 1:o=h.sent(),r={method:Vt.GetToken,request:o},h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(r)];case 3:return i=h.sent(),this.validateNativeResponse(i),[3,5];case 4:if(s=h.sent(),s instanceof Nt&&s.isFatal())throw s;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ue.NATIVE_REQUEST,JSON.stringify(o),!0),c={apiId:ke.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},l=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(t.redirectUri),[4,this.navigationClient.navigateExternal(l,c)];case 6:return h.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return z(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(t=this.browserStorage.getCachedNativeRequest(),!t)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];o=t.prompt,r=Ir(t,["prompt"]),o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ue.NATIVE_REQUEST)),i={method:Vt.GetToken,request:r},s=pt.nowSeconds(),u.label=1;case 1:return u.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(i)];case 2:return c=u.sent(),this.validateNativeResponse(c),l=this.handleNativeResponse(c,r,s),this.browserStorage.setInteractionInProgress(!1),[2,l];case 3:throw h=u.sent(),this.browserStorage.setInteractionInProgress(!1),h;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(t,o,r){return z(this,void 0,void 0,function(){var i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),t.account.id!==o.accountId)throw Nt.createUserSwitchError();return[4,this.getDiscoveredAuthority(o.authority)];case 1:return i=g.sent(),s=i.getPreferredCache(),c=this.createIdTokenObj(t),l=this.createHomeAccountIdentifier(t,c),h=this.createAccountEntity(t,l,c,s),[4,this.generateAuthenticationResult(t,o,c,h,i.canonicalAuthority,r)];case 2:return u=g.sent(),this.cacheAccount(h),this.cacheNativeTokens(t,o,l,h,c,u.accessToken,u.tenantId,r),[2,u]}})})},e.prototype.createIdTokenObj=function(t){return new It(t.id_token||b.EMPTY_STRING,this.browserCrypto)},e.prototype.createHomeAccountIdentifier=function(t,o){var r=Ue.generateHomeAccountId(t.client_info||b.EMPTY_STRING,$e.Default,this.logger,this.browserCrypto,o);return r},e.prototype.createAccountEntity=function(t,o,r,i){return Ue.createAccount(t.client_info,o,r,void 0,void 0,void 0,i,t.account.id)},e.prototype.generateScopes=function(t,o){return t.scope?He.fromString(t.scope):He.fromString(o.scope)},e.prototype.generatePopAccessToken=function(t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:if(o.tokenType!==ge.POP)return[3,2];if(t.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),[2,t.shr];if(r=new wn(this.browserCrypto),i={resourceRequestMethod:o.resourceRequestMethod,resourceRequestUri:o.resourceRequestUri,shrClaims:o.shrClaims,shrNonce:o.shrNonce},!o.keyId)throw K.createKeyIdMissingError();return[4,r.signPopToken(t.access_token,o.keyId,i)];case 1:return[2,s.sent()];case 2:return[2,t.access_token]}})})},e.prototype.generateAuthenticationResult=function(t,o,r,i,s,c){return z(this,void 0,void 0,function(){var l,h,u,g,f,w,C,P;return x(this,function(M){switch(M.label){case 0:return l=this.addTelemetryFromNativeResponse(t),h=t.scope?He.fromString(t.scope):He.fromString(o.scope),u=t.account.properties||{},g=u.UID||r.claims.oid||r.claims.sub||b.EMPTY_STRING,f=u.TenantId||r.claims.tid||b.EMPTY_STRING,[4,this.generatePopAccessToken(t,o)];case 1:return w=M.sent(),C=o.tokenType===ge.POP?ge.POP:ge.BEARER,P={authority:s,uniqueId:g,tenantId:f,scopes:h.asArray(),account:i.getAccountInfo(),idToken:t.id_token,idTokenClaims:r.claims,accessToken:w,fromCache:l?this.isResponseFromCache(l):!1,expiresOn:new Date(Number(c+t.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:t.state,fromNativeBroker:!0},[2,P]}})})},e.prototype.cacheAccount=function(t){var o=this;this.browserStorage.setAccount(t),this.browserStorage.removeAccountContext(t).catch(function(r){o.logger.error("Error occurred while removing account context from browser storage. "+r)})},e.prototype.cacheNativeTokens=function(t,o,r,i,s,c,l,h){var u=sn.createIdTokenEntity(r,o.authority,t.id_token||b.EMPTY_STRING,o.clientId,s.claims.tid||b.EMPTY_STRING),g=o.tokenType===ge.POP?b.SHR_NONCE_VALIDITY:(typeof t.expires_in=="string"?parseInt(t.expires_in,10):t.expires_in)||0,f=h+g,w=this.generateScopes(t,o),C=cn.createAccessTokenEntity(r,o.authority,c,o.clientId,s?s.claims.tid||b.EMPTY_STRING:l,w.printScopes(),f,0,this.browserCrypto),P=new xn(i,u,C);this.nativeStorageManager.saveCacheRecord(P)},e.prototype.addTelemetryFromNativeResponse=function(t){var o=this.getMATSFromResponse(t);return o?(this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:o.broker_version,matsAccountJoinOnStart:o.account_join_on_start,matsAccountJoinOnEnd:o.account_join_on_end,matsDeviceJoin:o.device_join,matsPromptBehavior:o.prompt_behavior,matsApiErrorCode:o.api_error_code,matsUiVisible:o.ui_visible,matsSilentCode:o.silent_code,matsSilentBiSubCode:o.silent_bi_sub_code,matsSilentMessage:o.silent_message,matsSilentStatus:o.silent_status,matsHttpStatus:o.http_status,matsHttpEventCount:o.http_event_count},this.correlationId),o):null},e.prototype.validateNativeResponse=function(t){if(t.hasOwnProperty("access_token")&&t.hasOwnProperty("id_token")&&t.hasOwnProperty("client_info")&&t.hasOwnProperty("account")&&t.hasOwnProperty("scope")&&t.hasOwnProperty("expires_in"))return t;throw Nt.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(t){if(t.properties.MATS)try{return JSON.parse(t.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(t){return typeof t.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!t.is_cached},e.prototype.initializeNativeRequest=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f,w=this;return x(this,function(C){switch(C.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),o=t.authority||this.config.auth.authority,t.account?[4,this.validateRequestAuthority(o,t.account)]:[3,2];case 1:C.sent(),C.label=2;case 2:return r=new de(o),r.validateAsUri(),i=t.scopes,s=Ir(t,["scopes"]),c=new He(i||[]),c.appendScopes(An),l=function(){switch(w.apiId){case ke.ssoSilent:case ke.acquireTokenSilent_silentFlow:return w.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Ve.NONE}if(!t.prompt){w.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(t.prompt){case Ve.NONE:case Ve.CONSENT:case Ve.LOGIN:return w.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),t.prompt;default:throw w.logger.trace("initializeNativeRequest: prompt = "+t.prompt+" is not compatible with native flow"),F.createNativePromptParameterNotSupportedError()}},h=Q(Q({},s),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:c.printScopes(),redirectUri:this.getRedirectUri(t.redirectUri),prompt:l(),correlationId:this.correlationId,tokenType:t.authenticationScheme,windowTitleSubstring:document.title,extraParameters:Q(Q(Q({},t.extraQueryParameters),t.tokenQueryParameters),{telemetry:Dn.MATS_TELEMETRY}),extendedExpiryToken:!1}),t.authenticationScheme!==ge.POP?[3,4]:(u={resourceRequestUri:t.resourceRequestUri,resourceRequestMethod:t.resourceRequestMethod,shrClaims:t.shrClaims,shrNonce:t.shrNonce},g=new wn(this.browserCrypto),[4,g.generateCnf(u)]);case 3:f=C.sent(),h.reqCnf=f.reqCnfString,h.keyId=f.kid,C.label=4;case 4:return[2,h]}})})},e}(Qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var ln=function(){function n(e,t,o,r){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=r,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=o,this.handshakeEvent=o.startMeasurement(R.NativeMessageHandlerHandshake)}return n.prototype.sendMessage=function(e){return z(this,void 0,void 0,function(){var t,o=this;return x(this,function(r){return this.logger.trace("NativeMessageHandler - sendMessage called."),t={channel:Dn.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(t)),this.messageChannel.port1.postMessage(t),[2,new Promise(function(i,s){o.resolvers.set(t.responseId,{resolve:i,reject:s})})]})})},n.createProvider=function(e,t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:e.trace("NativeMessageHandler - createProvider called."),s.label=1;case 1:return s.trys.push([1,3,,5]),r=new n(e,t,o,Dn.PREFERRED_EXTENSION_ID),[4,r.sendHandshakeRequest()];case 2:return s.sent(),[2,r];case 3:return s.sent(),i=new n(e,t,o),[4,i.sendHandshakeRequest()];case 4:return s.sent(),[2,i];case 5:return[2]}})})},n.prototype.sendHandshakeRequest=function(){return z(this,void 0,void 0,function(){var e,t=this;return x(this,function(o){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:Dn.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Vt.HandshakeRequest}},this.handshakeEvent.addStaticFields({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=function(r){t.onChannelMessage(r)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(r,i){t.handshakeResolvers.set(e.responseId,{resolve:r,reject:i}),t.timeoutId=window.setTimeout(function(){window.removeEventListener("message",t.windowListener,!1),t.messageChannel.port1.close(),t.messageChannel.port2.close(),t.handshakeEvent.endMeasurement({extensionHandshakeTimedOut:!0,success:!1}),i(F.createNativeHandshakeTimeoutError()),t.handshakeResolvers.delete(e.responseId)},t.handshakeTimeoutMs)})]})})},n.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var t=e.data;if(!(!t.channel||t.channel!==Dn.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===Vt.HandshakeRequest){this.logger.verbose(t.extensionId?"Extension with id: "+t.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var o=this.handshakeResolvers.get(t.responseId);o&&(this.handshakeEvent.endMeasurement({success:!1,extensionInstalled:!1}),o.reject(F.createNativeExtensionNotInstalledError()))}}},n.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var t=e.data,o=this.resolvers.get(t.responseId),r=this.handshakeResolvers.get(t.responseId);try{var i=t.body.method;if(i===Vt.Response){if(!o)return;var s=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(s)),s.status!=="Success")o.reject(Nt.createError(s.code,s.description,s.ext));else if(s.result)s.result.code&&s.result.description?o.reject(Nt.createError(s.result.code,s.result.description,s.result.ext)):o.resolve(s.result);else throw Y.createUnexpectedError("Event does not contain result.");this.resolvers.delete(t.responseId)}else if(i===Vt.HandshakeResponse){if(!r)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),this.handshakeEvent.endMeasurement({extensionInstalled:!0,success:!0}),r.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(c){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+c.toString()),this.logger.errorPii("Unable to parse "+e),o?o.reject(c):r&&r.reject(c)}},n.prototype.getExtensionId=function(){return this.extensionId},n.prototype.getExtensionVersion=function(){return this.extensionVersion},n.isNativeAvailable=function(e,t,o,r){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!o)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(r)switch(r){case ge.BEARER:case ge.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ca=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,l,u,g)||this;return f.nativeStorage=h,f}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f=this;return x(this,function(w){switch(w.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Redirect)];case 1:o=w.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||b.EMPTY_STRING,o.account||null),r=this.initializeServerTelemetryManager(ke.acquireTokenRedirect),i=function(C){C.persisted&&(f.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),f.browserStorage.cleanRequestByState(o.state),f.eventHandler.emitEvent(te.RESTORE_FROM_BFCACHE,$.Redirect))},w.label=2;case 2:return w.trys.push([2,7,,8]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(o)];case 3:return s=w.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(r,o.authority,o.azureCloudOptions)];case 4:return c=w.sent(),this.logger.verbose("Auth code client created"),l=new Wr(c,this.browserStorage,s,this.logger,this.browserCrypto,this.performanceClient),[4,c.getAuthCodeUrl(Q(Q({},o),{nativeBroker:ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}))];case 5:return h=w.sent(),u=this.getRedirectStartPage(t.redirectStartPage),this.logger.verbosePii("Redirect start page: "+u),window.addEventListener("pageshow",i),[4,l.initiateAuthRequest(h,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:u,onRedirectNavigate:t.onRedirectNavigate})];case 6:return[2,w.sent()];case 7:throw g=w.sent(),g instanceof Y&&g.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),r.cacheFailedRequest(g),this.browserStorage.cleanRequestByState(o.state),g;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f,w,C;return x(this,function(P){switch(P.label){case 0:o=this.initializeServerTelemetryManager(ke.handleRedirectPromise),P.label=1;case 1:if(P.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(r=this.getRedirectResponseHash(t||window.location.hash),!r)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType($.Redirect),[2,null];i=void 0;try{s=de.getDeserializedHash(r),i=this.validateAndExtractStateFromHash(s,$.Redirect),this.logger.verbose("State extracted from hash")}catch(M){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+M),this.browserStorage.cleanRequestByInteractionType($.Redirect),[2,null]}return c=this.browserStorage.getTemporaryCache(ue.ORIGIN_URI,!0)||b.EMPTY_STRING,l=de.removeHashFromUrl(c),h=de.removeHashFromUrl(window.location.href),l===h&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(r,i,o)]):[3,3];case 2:return u=P.sent(),c.indexOf("#")>-1&&Ee.replaceHash(c),[2,u];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(r,i,o)]);case 4:return!Ee.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ue.URL_HASH,r,!0),g={apiId:ke.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},f=!0,!c||c==="null"?(w=Ee.getHomepage(),this.browserStorage.setTemporaryCache(ue.ORIGIN_URI,w,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(w,g)]):[3,6]):[3,9];case 5:return f=P.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+c),[4,this.navigationClient.navigateInternal(c,g)];case 7:f=P.sent(),P.label=8;case 8:if(!f)return[2,this.handleHash(r,i,o)];P.label=9;case 9:return[2,null];case 10:throw C=P.sent(),C instanceof Y&&C.setCorrelationId(this.correlationId),o.cacheFailedRequest(C),this.browserStorage.cleanRequestByInteractionType($.Redirect),C;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(t){this.logger.verbose("getRedirectResponseHash called");var o=de.hashContainsKnownProperties(t);if(o)return Ee.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),t;var r=this.browserStorage.getTemporaryCache(ue.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ue.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),r},e.prototype.handleHash=function(t,o,r){return z(this,void 0,void 0,function(){var i,s,c,l,h,u,g,f=this;return x(this,function(w){switch(w.label){case 0:if(i=this.browserStorage.getCachedRequest(o,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),s=de.getDeserializedHash(t),s.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return c=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,s.accountId,this.nativeStorage,i.correlationId),l=Ft.parseRequestState(this.browserCrypto,o).userRequestState,[2,c.acquireToken(Q(Q({},i),{state:l,prompt:void 0})).finally(function(){f.browserStorage.cleanRequestByState(o)})]}if(h=this.browserStorage.getCachedAuthority(o),!h)throw F.createNoCachedAuthorityError();return this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,i.correlationId),[4,this.createAuthCodeClient(r,h)];case 1:return u=w.sent(),this.logger.verbose("Auth code client created"),eo.removeThrottle(this.browserStorage,this.config.auth.clientId,i),g=new Wr(u,this.browserStorage,i,this.logger,this.browserCrypto,this.performanceClient),[4,g.handleCodeResponseFromHash(t,o,u.authority,this.networkClient)];case 2:return[2,w.sent()]}})})},e.prototype.logout=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:this.logger.verbose("logoutRedirect called"),o=this.initializeLogoutRequest(t),r=this.initializeServerTelemetryManager(ke.logout),u.label=1;case 1:return u.trys.push([1,10,,11]),this.eventHandler.emitEvent(te.LOGOUT_START,$.Redirect,t),[4,this.clearCacheOnLogout(o.account)];case 2:return u.sent(),i={apiId:ke.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,o.correlationId),[4,this.createAuthCodeClient(r,t&&t.authority)];case 3:return s=u.sent(),this.logger.verbose("Auth code client created"),c=s.getLogoutUri(o),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,$.Redirect,o),t&&typeof t.onRedirectNavigate=="function"?(l=t.onRedirectNavigate(c),l===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(c,i)])):[3,7];case 4:return u.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),u.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(c,i)];case 8:return u.sent(),[2];case 9:return[3,11];case 10:throw h=u.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),r.cacheFailedRequest(h),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,$.Redirect,null,h),this.eventHandler.emitEvent(te.LOGOUT_END,$.Redirect),h;case 11:return this.eventHandler.emitEvent(te.LOGOUT_END,$.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(t){var o=t||window.location.href;return de.getAbsoluteUrl(o,Ee.getCurrentUri())},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ea=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,l,u,g)||this;return f.unloadWindow=f.unloadWindow.bind(f),f.nativeStorage=h,f}return e.prototype.acquireToken=function(t){try{var o=this.generatePopupName(t.scopes||An,t.authority||this.config.auth.authority),r=t.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(t,o,r);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var i=this.openSizedPopup("about:blank",o,r);return this.acquireTokenPopupAsync(t,o,r,i)}catch(s){return Promise.reject(s)}},e.prototype.logout=function(t){try{this.logger.verbose("logoutPopup called");var o=this.initializeLogoutRequest(t),r=this.generateLogoutPopupName(o),i=t&&t.authority,s=t&&t.mainWindowRedirectUri,c=(t==null?void 0:t.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(o,r,c,i,void 0,s);this.logger.verbose("asyncPopup set to false, opening popup");var l=this.openSizedPopup("about:blank",r,c);return this.logoutPopupAsync(o,r,c,i,l,s)}catch(h){return Promise.reject(h)}},e.prototype.acquireTokenPopupAsync=function(t,o,r,i){return z(this,void 0,void 0,function(){var s,c,l,h,u,g,f,w,C,P,M,j,N,T,B,V,G,J=this;return x(this,function(I){switch(I.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),s=this.initializeServerTelemetryManager(ke.acquireTokenPopup),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Popup)];case 1:c=I.sent(),this.browserStorage.updateCacheEntries(c.state,c.nonce,c.authority,c.loginHint||b.EMPTY_STRING,c.account||null),I.label=2;case 2:return I.trys.push([2,8,,9]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(c)];case 3:return l=I.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(s,c.authority,c.azureCloudOptions)];case 4:return h=I.sent(),this.logger.verbose("Auth code client created"),u=ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme),g=void 0,u&&(g=this.performanceClient.startMeasurement(R.FetchAccountIdWithNativeBroker,t.correlationId)),[4,h.getAuthCodeUrl(Q(Q({},c),{nativeBroker:u}))];case 5:return f=I.sent(),w=new Do(h,this.browserStorage,l,this.logger,this.performanceClient),C={popup:i,popupName:o,popupWindowAttributes:r},P=this.initiateAuthRequest(f,C),this.eventHandler.emitEvent(te.POPUP_OPENED,$.Popup,{popupWindow:P},null),[4,this.monitorPopupForHash(P)];case 6:if(M=I.sent(),j=de.getDeserializedHash(M),N=this.validateAndExtractStateFromHash(j,$.Popup,c.correlationId),eo.removeThrottle(this.browserStorage,this.config.auth.clientId,l),j.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),g&&g.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return T=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,j.accountId,this.nativeStorage,c.correlationId),B=Ft.parseRequestState(this.browserCrypto,N).userRequestState,[2,T.acquireToken(Q(Q({},c),{state:B,prompt:void 0})).finally(function(){J.browserStorage.cleanRequestByState(N)})]}return[4,w.handleCodeResponseFromHash(M,N,h.authority,this.networkClient)];case 7:return V=I.sent(),[2,V];case 8:throw G=I.sent(),i&&i.close(),G instanceof Y&&G.setCorrelationId(this.correlationId),s.cacheFailedRequest(G),this.browserStorage.cleanRequestByState(c.state),G;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(t,o,r,i,s,c){return z(this,void 0,void 0,function(){var l,h,u,g,f,w,C;return x(this,function(P){switch(P.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(te.LOGOUT_START,$.Popup,t),l=this.initializeServerTelemetryManager(ke.logoutPopup),P.label=1;case 1:return P.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(t.account)];case 2:return P.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(l,i)];case 3:return h=P.sent(),this.logger.verbose("Auth code client created"),u=h.getLogoutUri(t),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,$.Popup,t),g=this.openPopup(u,{popupName:o,popupWindowAttributes:r,popup:s}),this.eventHandler.emitEvent(te.POPUP_OPENED,$.Popup,{popupWindow:g},null),[4,this.waitForLogoutPopup(g)];case 4:return P.sent(),c?(f={apiId:ke.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},w=de.getAbsoluteUrl(c,Ee.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+w),this.navigationClient.navigateInternal(w,f)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw C=P.sent(),s&&s.close(),C instanceof Y&&C.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,$.Popup,null,C),this.eventHandler.emitEvent(te.LOGOUT_END,$.Popup),l.cacheFailedRequest(C),C;case 6:return this.eventHandler.emitEvent(te.LOGOUT_END,$.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(t,o){if(H.isEmpty(t))throw this.logger.error("Navigate url is empty"),F.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+t),this.openPopup(t,o)},e.prototype.monitorPopupForHash=function(t){var o=this;return new Promise(function(r,i){var s=o.config.system.windowHashTimeout/o.config.system.pollIntervalMilliseconds,c=0;o.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var l=setInterval(function(){if(t.closed){o.logger.error("PopupHandler.monitorPopupForHash - window closed"),o.cleanPopup(),clearInterval(l),i(F.createUserCancelledError());return}var h=b.EMPTY_STRING,u=b.EMPTY_STRING;try{h=t.location.href,u=t.location.hash}catch{}H.isEmpty(h)||h==="about:blank"||(o.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),c++,u?(o.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(l),o.cleanPopup(t),de.hashContainsKnownProperties(u)?(o.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),r(u)):(o.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),o.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+u),i(F.createHashDoesNotContainKnownPropertiesError()))):c>s&&(o.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(l),i(F.createMonitorPopupTimeoutError())))},o.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(t){var o=this;return new Promise(function(r){o.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var i=setInterval(function(){t.closed&&(o.logger.error("PopupHandler.waitForLogoutPopup - window closed"),o.cleanPopup(),clearInterval(i),r());var s=b.EMPTY_STRING;try{s=t.location.href}catch{}H.isEmpty(s)||s==="about:blank"||(o.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(i),o.cleanPopup(t),r())},o.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(t,o){try{var r=void 0;if(o.popup?(r=o.popup,this.logger.verbosePii("Navigating popup window to: "+t),r.location.assign(t)):typeof o.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+t),r=this.openSizedPopup(t,o.popupName,o.popupWindowAttributes)),!r)throw F.createEmptyWindowCreatedError();return r.focus&&r.focus(),this.currentWindow=r,window.addEventListener("beforeunload",this.unloadWindow),r}catch(i){throw this.logger.error("error opening popup "+i.message),this.browserStorage.setInteractionInProgress(!1),F.createPopupWindowError(i.toString())}},e.prototype.openSizedPopup=function(t,o,r){var i,s,c,l,h=window.screenLeft?window.screenLeft:window.screenX,u=window.screenTop?window.screenTop:window.screenY,g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,w=(i=r.popupSize)===null||i===void 0?void 0:i.width,C=(s=r.popupSize)===null||s===void 0?void 0:s.height,P=(c=r.popupPosition)===null||c===void 0?void 0:c.top,M=(l=r.popupPosition)===null||l===void 0?void 0:l.left;return(!w||w<0||w>g)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),w=_t.POPUP_WIDTH),(!C||C<0||C>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),C=_t.POPUP_HEIGHT),(!P||P<0||P>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),P=Math.max(0,f/2-_t.POPUP_HEIGHT/2+u)),(!M||M<0||M>g)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),M=Math.max(0,g/2-_t.POPUP_WIDTH/2+h)),window.open(t,o,"width="+w+", height="+C+", top="+P+", left="+M+", scrollbars=yes")},e.prototype.unloadWindow=function(t){this.browserStorage.cleanRequestByInteractionType($.Popup),this.currentWindow&&this.currentWindow.close(),t.preventDefault()},e.prototype.cleanPopup=function(t){t&&t.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(t,o){return _t.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+t.join("-")+"."+o+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(t){var o=t.account&&t.account.homeAccountId;return _t.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+o+"."+this.correlationId},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ta=function(){function n(){}return n.prototype.navigateInternal=function(e,t){return n.defaultNavigateWindow(e,t)},n.prototype.navigateExternal=function(e,t){return n.defaultNavigateWindow(e,t)},n.defaultNavigateWindow=function(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(o){setTimeout(function(){o(!0)},t.timeout)})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Sa=6e4,jo=6e3,Ia=3e4,Aa=2e3;function Ra(n,e){var t=n.auth,o=n.cache,r=n.system,i=n.telemetry,s={clientId:b.EMPTY_STRING,authority:""+b.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:b.EMPTY_STRING,authorityMetadata:b.EMPTY_STRING,redirectUri:b.EMPTY_STRING,postLogoutRedirectUri:b.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Bn.AAD,azureCloudOptions:{azureCloudInstance:On.None,tenant:b.EMPTY_STRING},skipAuthorityMetadataCache:!1},c={cacheLocation:Ae.SessionStorage,temporaryCacheLocation:Ae.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(o&&o.cacheLocation===Ae.LocalStorage),claimsBasedCachingEnabled:!0},l={loggerCallback:function(){},logLevel:ze.Info,piiLoggingEnabled:!1},h=Q(Q({},Mr),{loggerOptions:l,networkClient:e?Ee.getBrowserNetworkClient():ma,navigationClient:new Ta,loadFrameTimeout:0,windowHashTimeout:(r==null?void 0:r.loadFrameTimeout)||Sa,iframeHashTimeout:(r==null?void 0:r.loadFrameTimeout)||jo,navigateFrameWait:e&&Ee.detectIEOrEdge()?500:0,redirectNavigationTimeout:Ia,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(r==null?void 0:r.nativeBrokerHandshakeTimeout)||Aa,pollIntervalMilliseconds:_t.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),u=Q(Q({},r),{loggerOptions:(r==null?void 0:r.loggerOptions)||l}),g={application:{appName:b.EMPTY_STRING,appVersion:b.EMPTY_STRING}},f={auth:Q(Q({},s),t),cache:Q(Q({},c),o),system:Q(Q({},h),u),telemetry:Q(Q({},g),i)};return f}/*! @azure/msal-browser v2.38.3 2023-10-27 */var Jr=function(n){xe(e,n);function e(t,o,r,i,s,c){var l=n.call(this,t,o,r,i,c)||this;return l.navigateFrameWait=s.navigateFrameWait,l.pollIntervalMilliseconds=s.pollIntervalMilliseconds,l}return e.prototype.initiateAuthRequest=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){switch(o.label){case 0:if(this.performanceClient.addQueueMeasurement(R.SilentHandlerInitiateAuthRequest,this.authCodeRequest.correlationId),H.isEmpty(t))throw this.logger.info("Navigate url is empty"),F.createEmptyNavigationUriError();return this.navigateFrameWait?(this.performanceClient.setPreQueueTime(R.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),[4,this.loadFrame(t)]):[3,2];case 1:return[2,o.sent()];case 2:return[2,this.loadFrameSync(t)]}})})},e.prototype.monitorIframeForHash=function(t,o){var r=this;return this.performanceClient.addQueueMeasurement(R.SilentHandlerMonitorIframeForHash,this.authCodeRequest.correlationId),new Promise(function(i,s){o<jo&&r.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+o+"ms) than the default ("+jo+"ms). This may result in timeouts.");var c=window.performance.now(),l=c+o,h=setInterval(function(){if(window.performance.now()>l){r.removeHiddenIframe(t),clearInterval(h),s(F.createMonitorIframeTimeoutError());return}var u=b.EMPTY_STRING,g=t.contentWindow;try{u=g?g.location.href:b.EMPTY_STRING}catch{}if(!H.isEmpty(u)){var f=g?g.location.hash:b.EMPTY_STRING;if(de.hashContainsKnownProperties(f)){r.removeHiddenIframe(t),clearInterval(h),i(f);return}}},r.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(t){var o=this;return this.performanceClient.addQueueMeasurement(R.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),new Promise(function(r,i){var s=o.createHiddenIframe();setTimeout(function(){if(!s){i("Unable to load iframe");return}s.src=t,r(s)},o.navigateFrameWait)})},e.prototype.loadFrameSync=function(t){var o=this.createHiddenIframe();return o.src=t,o},e.prototype.createHiddenIframe=function(){var t=document.createElement("iframe");return t.style.visibility="hidden",t.style.position="absolute",t.style.width=t.style.height="0",t.style.border="0",t.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(t),t},e.prototype.removeHiddenIframe=function(t){document.body===t.parentNode&&document.body.removeChild(t)},e}(Do);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Na=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g,f){var w=n.call(this,t,o,r,i,s,c,h,g,f)||this;return w.apiId=l,w.nativeStorage=u,w}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c;return x(this,function(l){switch(l.label){case 0:if(this.performanceClient.addQueueMeasurement(R.SilentIframeClientAcquireToken,t.correlationId),this.logger.verbose("acquireTokenByIframe called"),o=this.performanceClient.startMeasurement(R.SilentIframeClientAcquireToken,t.correlationId),H.isEmpty(t.loginHint)&&H.isEmpty(t.sid)&&(!t.account||H.isEmpty(t.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),t.prompt&&t.prompt!==Ve.NONE&&t.prompt!==Ve.NO_SESSION)throw o.endMeasurement({success:!1}),F.createSilentPromptValueError(t.prompt);return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(Q(Q({},t),{prompt:t.prompt||Ve.NONE}),$.Silent)];case 1:r=l.sent(),this.browserStorage.updateCacheEntries(r.state,r.nonce,r.authority,r.loginHint||b.EMPTY_STRING,r.account||null),i=this.initializeServerTelemetryManager(this.apiId),l.label=2;case 2:return l.trys.push([2,5,,6]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(i,r.authority,r.azureCloudOptions)];case 3:return s=l.sent(),this.logger.verbose("Auth code client created"),this.performanceClient.setPreQueueTime(R.SilentIframeClientTokenHelper,t.correlationId),[4,this.silentTokenHelper(s,r).then(function(h){return o.endMeasurement({success:!0,fromCache:!1,requestId:h.requestId}),h})];case 4:return[2,l.sent()];case 5:throw c=l.sent(),c instanceof Y&&c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c),this.browserStorage.cleanRequestByState(r.state),o.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c,l,h,u,g,f,w=this;return x(this,function(C){switch(C.label){case 0:return this.performanceClient.addQueueMeasurement(R.SilentIframeClientTokenHelper,o.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,o.correlationId),[4,this.initializeAuthorizationCodeRequest(o)];case 1:return r=C.sent(),this.performanceClient.setPreQueueTime(R.GetAuthCodeUrl,o.correlationId),[4,t.getAuthCodeUrl(Q(Q({},o),{nativeBroker:ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,o.authenticationScheme)}))];case 2:return i=C.sent(),s=new Jr(t,this.browserStorage,r,this.logger,this.config.system,this.performanceClient),this.performanceClient.setPreQueueTime(R.SilentHandlerInitiateAuthRequest,o.correlationId),[4,s.initiateAuthRequest(i)];case 3:return c=C.sent(),this.performanceClient.setPreQueueTime(R.SilentHandlerMonitorIframeForHash,o.correlationId),[4,s.monitorIframeForHash(c,this.config.system.iframeHashTimeout)];case 4:if(l=C.sent(),h=de.getDeserializedHash(l),u=this.validateAndExtractStateFromHash(h,$.Silent,r.correlationId),h.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return g=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,h.accountId,this.browserStorage,this.correlationId),f=Ft.parseRequestState(this.browserCrypto,u).userRequestState,[2,g.acquireToken(Q(Q({},o),{state:f,prompt:o.prompt||Ve.NONE})).finally(function(){w.browserStorage.cleanRequestByState(u)})]}return this.performanceClient.setPreQueueTime(R.HandleCodeResponseFromHash,o.correlationId),[2,s.handleCodeResponseFromHash(l,u,t.authority,this.networkClient)]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Pa=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l=this;return x(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(R.SilentRefreshClientAcquireToken,t.correlationId),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,t.correlationId),r=[Q({},t)],[4,this.initializeBaseRequest(t,t.account)];case 1:return o=Q.apply(void 0,r.concat([h.sent()])),i=this.performanceClient.startMeasurement(R.SilentRefreshClientAcquireToken,o.correlationId),s=this.initializeServerTelemetryManager(ke.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(s,o.authority,o.azureCloudOptions)];case 2:return c=h.sent(),this.logger.verbose("Refresh token client created"),this.performanceClient.setPreQueueTime(R.RefreshTokenClientAcquireTokenByRefreshToken,t.correlationId),[2,c.acquireTokenByRefreshToken(o).then(function(u){return i.endMeasurement({success:!0,fromCache:u.fromCache,requestId:u.requestId}),u}).catch(function(u){throw u instanceof Y&&u.setCorrelationId(l.correlationId),s.cacheFailedRequest(u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new zr(i,this.performanceClient)]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ma=function(){function n(e,t){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=t,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return n.prototype.addEventCallback=function(e){if(typeof window<"u"){var t=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(t,e),this.logger.verbose("Event callback registered with id: "+t),t}return null},n.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},n.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))},n.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))},n.prototype.emitEvent=function(e,t,o,r){var i=this;if(typeof window<"u"){var s={eventType:e,interactionType:t||null,payload:o||null,error:r||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(c,l){i.logger.verbose("Emitting event to callback "+l+": "+e),c.apply(null,[s])})}},n.prototype.handleAccountCacheChange=function(e){try{var t=e.newValue||e.oldValue;if(!t)return;var o=JSON.parse(t);if(typeof o!="object"||!Ue.isAccountEntity(o))return;var r=Je.toObject(new Ue,o),i=r.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(te.ACCOUNT_ADDED,void 0,i)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(te.ACCOUNT_REMOVED,void 0,i))}catch{return}},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ke=function(){function n(){}return n.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Xr=function(){function n(e){this.cryptoObj=e}return n.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,Ke.decimalToHex(e[0])+Ke.decimalToHex(e[1])+Ke.decimalToHex(e[2])+Ke.decimalToHex(e[3])+"-"+Ke.decimalToHex(e[4])+Ke.decimalToHex(e[5])+"-"+Ke.decimalToHex(e[6])+Ke.decimalToHex(e[7])+"-"+Ke.decimalToHex(e[8])+Ke.decimalToHex(e[9])+"-"+Ke.decimalToHex(e[10])+Ke.decimalToHex(e[11])+Ke.decimalToHex(e[12])+Ke.decimalToHex(e[13])+Ke.decimalToHex(e[14])+Ke.decimalToHex(e[15])}catch{for(var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",o="0123456789abcdef",r=0,i=b.EMPTY_STRING,s=0;s<36;s++)t[s]!=="-"&&t[s]!=="4"&&(r=Math.random()*16|0),t[s]==="x"?i+=o[r]:t[s]==="y"?(r&=3,r|=8,i+=o[r]):i+=t[s];return i}},n.prototype.isGuid=function(e){var t=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return t.test(e)},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ht=function(){function n(){}return n.stringToUtf8Arr=function(e){for(var t,o=0,r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),o+=t<128?1:t<2048?2:t<65536?3:t<2097152?4:t<67108864?5:6;for(var s=new Uint8Array(o),c=0,l=0;c<o;l++)t=e.charCodeAt(l),t<128?s[c++]=t:t<2048?(s[c++]=192+(t>>>6),s[c++]=128+(t&63)):t<65536?(s[c++]=224+(t>>>12),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):t<2097152?(s[c++]=240+(t>>>18),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):t<67108864?(s[c++]=248+(t>>>24),s[c++]=128+(t>>>18&63),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):(s[c++]=252+(t>>>30),s[c++]=128+(t>>>24&63),s[c++]=128+(t>>>18&63),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63));return s},n.stringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),r=0;r<e.length;r++)o[r]=e.charCodeAt(r);return t},n.utf8ArrToString=function(e){for(var t=b.EMPTY_STRING,o=void 0,r=e.length,i=0;i<r;i++)o=e[i],t+=String.fromCharCode(o>251&&o<254&&i+5<r?(o-252)*1073741824+(e[++i]-128<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>247&&o<252&&i+4<r?(o-248<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>239&&o<248&&i+3<r?(o-240<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>223&&o<240&&i+2<r?(o-224<<12)+(e[++i]-128<<6)+e[++i]-128:o>191&&o<224&&i+1<r?(o-192<<6)+e[++i]-128:o);return t},n.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Zr=function(){function n(){}return n.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},n.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},n.prototype.encode=function(e){var t=Ht.stringToUtf8Arr(e);return this.base64EncArr(t)},n.prototype.base64EncArr=function(e){for(var t=(3-e.length%3)%3,o=b.EMPTY_STRING,r=void 0,i=e.length,s=0,c=0;c<i;c++)r=c%3,s|=e[c]<<(16>>>r&24),(r===2||e.length-c===1)&&(o+=String.fromCharCode(this.uint6ToB64(s>>>18&63),this.uint6ToB64(s>>>12&63),this.uint6ToB64(s>>>6&63),this.uint6ToB64(s&63)),s=0);return t===0?o:o.substring(0,o.length-t)+(t===1?"=":"==")},n.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var La=function(){function n(){}return n.prototype.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Invalid base64 string")}var o=this.base64DecToArr(t);return Ht.utf8ArrToString(o)},n.prototype.base64DecToArr=function(e,t){for(var o=e.replace(/[^A-Za-z0-9\+\/]/g,b.EMPTY_STRING),r=o.length,i=t?Math.ceil((r*3+1>>>2)/t)*t:r*3+1>>>2,s=new Uint8Array(i),c=void 0,l=void 0,h=0,u=0,g=0;g<r;g++)if(l=g&3,h|=this.b64ToUint6(o.charCodeAt(g))<<18-6*l,l===3||r-g===1){for(c=0;c<3&&u<i;c++,u++)s[u]=h>>>(16>>>c&24)&255;h=0}return s},n.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Oa=32,za=function(){function n(e){this.base64Encode=new Zr,this.cryptoObj=e}return n.prototype.generateCodes=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return t=o.sent(),[2,{verifier:e,challenge:t}]}})})},n.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(Oa);this.cryptoObj.getRandomValues(e);var t=this.base64Encode.urlEncodeArr(e);return t}catch(o){throw F.createPkceNotGeneratedError(o)}},n.prototype.generateCodeChallengeFromVerifier=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return t=r.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(t))];case 2:throw o=r.sent(),F.createPkceNotGeneratedError(o);case 3:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var xa=function(){function n(){}return n.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.crypto.subtle.generateKey(e,t,o)]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,window.crypto.subtle.exportKey(Cn,e)]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){return x(this,function(i){return[2,window.crypto.subtle.importKey(Cn,e,t,o,r)]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.crypto.subtle.sign(e,t,o)]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,window.crypto.subtle.digest(e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ba=function(){function n(){}return n.prototype.initPrng=function(e){return window.msrCrypto.initPrng(Eo(e))},n.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.msrCrypto.subtle.generateKey(e,t,o)]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,window.msrCrypto.subtle.exportKey(Cn,e)]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){return x(this,function(i){return[2,window.msrCrypto.subtle.importKey(Cn,e,t,o,r)]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.msrCrypto.subtle.sign(e,t,o)]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,window.msrCrypto.subtle.digest(e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ua=function(){function n(){}return n.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,new Promise(function(i,s){var c=window.msCrypto.subtle.generateKey(e,t,o);c.addEventListener("complete",function(l){i(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,new Promise(function(o,r){var i=window.msCrypto.subtle.exportKey(Cn,e);i.addEventListener("complete",function(s){var c=s.target.result,l=Ht.utf8ArrToString(new Uint8Array(c)).replace(/\r/g,b.EMPTY_STRING).replace(/\n/g,b.EMPTY_STRING).replace(/\t/g,b.EMPTY_STRING).split(" ").join(b.EMPTY_STRING).replace("\0",b.EMPTY_STRING);try{o(JSON.parse(l))}catch(h){r(h)}}),i.addEventListener("error",function(s){r(s)})})]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){var i,s;return x(this,function(c){return i=Ht.getSortedObjectString(e),s=Ht.stringToArrayBuffer(i),[2,new Promise(function(l,h){var u=window.msCrypto.subtle.importKey(Cn,s,t,o,r);u.addEventListener("complete",function(g){l(g.target.result)}),u.addEventListener("error",function(g){h(g)})})]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,new Promise(function(i,s){var c=window.msCrypto.subtle.sign(e,t,o);c.addEventListener("complete",function(l){i(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,new Promise(function(r,i){var s=window.msCrypto.subtle.digest(e,t.buffer);s.addEventListener("complete",function(c){r(c.target.result)}),s.addEventListener("error",function(c){i(c)})})]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Da="RSASSA-PKCS1-v1_5",ei="SHA-256",ja=2048,qa=new Uint8Array([1,0,1]),ti=function(){function n(e,t){var o,r;if(this.logger=e,this.cryptoOptions=t,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new xa;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new Ua;else if(this.hasMsrCrypto()&&(!((o=this.cryptoOptions)===null||o===void 0)&&o.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new Ba;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),F.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((r=this.cryptoOptions)===null||r===void 0)&&r.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),ao.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:Da,hash:ei,modulusLength:ja,publicExponent:qa}}return n.prototype.hasIECrypto=function(){return"msCrypto"in window},n.prototype.hasBrowserCrypto=function(){return"crypto"in window},n.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},n.prototype.sha256Digest=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return t=Ht.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:ei},t)]})})},n.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},n.prototype.generateKeyPair=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,t)]})})},n.prototype.exportJwk=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,this.subtleCrypto.exportKey(e)]})})},n.prototype.importJwk=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,t,o)]})})},n.prototype.sign=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Fa=function(){function n(){this.dbName=zo,this.version=va,this.tableName=ya,this.dbOpen=!1}return n.prototype.open=function(){return z(this,void 0,void 0,function(){var e=this;return x(this,function(t){return[2,new Promise(function(o,r){var i=window.indexedDB.open(e.dbName,e.version);i.addEventListener("upgradeneeded",function(s){var c=s;c.target.result.createObjectStore(e.tableName)}),i.addEventListener("success",function(s){var c=s;e.db=c.target.result,e.dbOpen=!0,o()}),i.addEventListener("error",function(){return r(F.createDatabaseUnavailableError())})})]})})},n.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},n.prototype.validateDbIsOpen=function(){return z(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},n.prototype.getItem=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readonly"),c=s.objectStore(t.tableName),l=c.get(e);l.addEventListener("success",function(h){var u=h;t.closeConnection(),r(u.target.result)}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.setItem=function(e,t){return z(this,void 0,void 0,function(){var o=this;return x(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(i,s){if(!o.db)return s(F.createDatabaseNotOpenError());var c=o.db.transaction([o.tableName],"readwrite"),l=c.objectStore(o.tableName),h=l.put(t,e);h.addEventListener("success",function(){o.closeConnection(),i()}),h.addEventListener("error",function(u){o.closeConnection(),s(u)})})]}})})},n.prototype.removeItem=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readwrite"),c=s.objectStore(t.tableName),l=c.delete(e);l.addEventListener("success",function(){t.closeConnection(),r()}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.getKeys=function(){return z(this,void 0,void 0,function(){var e=this;return x(this,function(t){switch(t.label){case 0:return[4,this.validateDbIsOpen()];case 1:return t.sent(),[2,new Promise(function(o,r){if(!e.db)return r(F.createDatabaseNotOpenError());var i=e.db.transaction([e.tableName],"readonly"),s=i.objectStore(e.tableName),c=s.getAllKeys();c.addEventListener("success",function(l){var h=l;e.closeConnection(),o(h.target.result)}),c.addEventListener("error",function(l){e.closeConnection(),r(l)})})]}})})},n.prototype.containsKey=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readonly"),c=s.objectStore(t.tableName),l=c.count(e);l.addEventListener("success",function(h){var u=h;t.closeConnection(),r(u.target.result===1)}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.deleteDatabase=function(){return z(this,void 0,void 0,function(){return x(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(t,o){var r=window.indexedDB.deleteDatabase(zo);r.addEventListener("success",function(){return t(!0)}),r.addEventListener("blocked",function(){return t(!0)}),r.addEventListener("error",function(){return o(!1)})})]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ni=function(){function n(e,t){this.inMemoryCache=new xo,this.indexedDBCache=new Fa,this.logger=e,this.storeName=t}return n.prototype.handleDatabaseAccessError=function(e){if(e instanceof F&&e.errorCode===U.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},n.prototype.getItem=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:if(t=this.inMemoryCache.getItem(e),t)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,r.sent()];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2,t]}})})},n.prototype.setItem=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(r.label){case 0:this.inMemoryCache.setItem(e,t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,t)];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2]}})})},n.prototype.removeItem=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:this.inMemoryCache.removeItem(e),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return o.sent(),[3,4];case 3:return t=o.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2]}})})},n.prototype.getKeys=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,o.sent()];case 3:return t=o.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2,e]}})})},n.prototype.containsKey=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:if(t=this.inMemoryCache.containsKey(e),t)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,r.sent()];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2,t]}})})},n.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},n.prototype.clearPersistent=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=o.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return t=o.sent(),this.handleDatabaseAccessError(t),[2,!1];case 3:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var so;(function(n){n.asymmetricKeys="asymmetricKeys",n.symmetricKeys="symmetricKeys"})(so||(so={}));var Va=function(){function n(e){this.logger=e,this.asymmetricKeys=new ni(this.logger,so.asymmetricKeys),this.symmetricKeys=new ni(this.logger,so.symmetricKeys)}return n.prototype.clear=function(){return z(this,void 0,void 0,function(){var e;return x(this,function(t){switch(t.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return t.sent(),[2,!0];case 3:return e=t.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ha=function(){function n(e,t,o){this.logger=e,this.browserCrypto=new ti(this.logger,o),this.b64Encode=new Zr,this.b64Decode=new La,this.guidGenerator=new Xr(this.browserCrypto),this.pkceGenerator=new za(this.browserCrypto),this.cache=new Va(this.logger),this.performanceClient=t}return n.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},n.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},n.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},n.prototype.generatePkceCodes=function(){return z(this,void 0,void 0,function(){return x(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},n.prototype.getPublicKeyThumbprint=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:return o=(t=this.performanceClient)===null||t===void 0?void 0:t.startMeasurement(R.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(n.EXTRACTABLE,n.POP_KEY_USAGES)];case 1:return r=g.sent(),[4,this.browserCrypto.exportJwk(r.publicKey)];case 2:return i=g.sent(),s={e:i.e,kty:i.kty,n:i.n},c=Ht.getSortedObjectString(s),[4,this.hashString(c)];case 3:return l=g.sent(),[4,this.browserCrypto.exportJwk(r.privateKey)];case 4:return h=g.sent(),[4,this.browserCrypto.importJwk(h,!1,["sign"])];case 5:return u=g.sent(),[4,this.cache.asymmetricKeys.setItem(l,{privateKey:u,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return g.sent(),o&&o.endMeasurement({success:!0}),[2,l]}})})},n.prototype.removeTokenBindingKey=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return o.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return t=o.sent(),[2,!t]}})})},n.prototype.clearKeystore=function(){return z(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},n.prototype.signJwt=function(e,t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l,h,u,g,f,w,C,P,M,j;return x(this,function(N){switch(N.label){case 0:return i=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.CryptoOptsSignJwt,o),[4,this.cache.asymmetricKeys.getItem(t)];case 1:if(s=N.sent(),!s)throw F.createSigningKeyNotFoundInStorageError(t);return[4,this.browserCrypto.exportJwk(s.publicKey)];case 2:return c=N.sent(),l=Ht.getSortedObjectString(c),h=this.b64Encode.urlEncode(JSON.stringify({kid:t})),u=fa.getShrHeaderString({kid:h,alg:c.alg}),g=this.b64Encode.urlEncode(u),e.cnf={jwk:JSON.parse(l)},f=this.b64Encode.urlEncode(JSON.stringify(e)),w=g+"."+f,C=Ht.stringToArrayBuffer(w),[4,this.browserCrypto.sign(s.privateKey,C)];case 3:return P=N.sent(),M=this.b64Encode.urlEncodeArr(new Uint8Array(P)),j=w+"."+M,i&&i.endMeasurement({success:!0}),[2,j]}})})},n.prototype.hashString=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return t=r.sent(),o=new Uint8Array(t),[2,this.b64Encode.urlEncodeArr(o)]}})})},n.POP_KEY_USAGES=["sign","verify"],n.EXTRACTABLE=!0,n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var oi=function(){function n(e,t){this.correlationId=t,this.measureName=n.makeMeasureName(e,t),this.startMark=n.makeStartMark(e,t),this.endMark=n.makeEndMark(e,t)}return n.makeMeasureName=function(e,t){return"msal.measure."+e+"."+t},n.makeStartMark=function(e,t){return"msal.start."+e+"."+t},n.makeEndMark=function(e,t){return"msal.end."+e+"."+t},n.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},n.flushMeasurements=function(e,t){if(n.supportsBrowserPerformance())try{t.forEach(function(o){var r=n.makeMeasureName(o.name,e),i=window.performance.getEntriesByName(r,"measure");i.length>0&&(window.performance.clearMeasures(r),window.performance.clearMarks(n.makeStartMark(r,e)),window.performance.clearMarks(n.makeEndMark(r,e)))})}catch{}},n.prototype.startMeasurement=function(){if(n.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},n.prototype.endMeasurement=function(){if(n.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},n.prototype.flushMeasurement=function(){if(n.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var t=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),t}}catch{}return null},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ka=function(n){xe(e,n);function e(t,o,r,i,s,c,l){var h=n.call(this,t,o,r,i,s,c)||this;return h.browserCrypto=new ti(h.logger,l),h.guidGenerator=new Xr(h.browserCrypto),h}return e.prototype.startPerformanceMeasuremeant=function(t,o){return new oi(t,o)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var t;return((t=document.visibilityState)===null||t===void 0?void 0:t.toString())||null},e.prototype.deleteIncompleteSubMeasurements=function(t){var o=this.eventsByCorrelationId.get(t.event.correlationId),r=o&&o.eventId===t.event.eventId,i=[];r&&(o!=null&&o.incompleteSubMeasurements)&&o.incompleteSubMeasurements.forEach(function(s){i.push(Q({},s))}),i.length>0&&oi.flushMeasurements(t.event.correlationId,i)},e.prototype.supportsBrowserPerformanceNow=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.now=="function"},e.prototype.startMeasurement=function(t,o){var r=this,i=this.getPageVisibility(),s=n.prototype.startMeasurement.call(this,t,o);return Q(Q({},s),{endMeasurement:function(c){var l=s.endMeasurement(Q({startPageVisibility:i,endPageVisibility:r.getPageVisibility()},c));return r.deleteIncompleteSubMeasurements(s),l},discardMeasurement:function(){s.discardMeasurement(),r.deleteIncompleteSubMeasurements(s),s.measurement.flushMeasurement()}})},e.prototype.setPreQueueTime=function(t,o){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for "+t);return}if(!o){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to set telemetry queue time");return}var r=this.preQueueTimeByCorrelationId.get(o);r&&(this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue "+r.name+" found",o),this.addQueueMeasurement(r.name,o,void 0,!0)),this.preQueueTimeByCorrelationId.set(o,{name:t,time:window.performance.now()})},e.prototype.addQueueMeasurement=function(t,o,r,i){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for "+t);return}if(!o){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to add queue measurement");return}var s=n.prototype.getPreQueueTime.call(this,t,o);if(s){var c=window.performance.now(),l=r||n.prototype.calculateQueuedTime.call(this,s,c);return n.prototype.addQueueMeasurement.call(this,t,o,l,i)}},e}(qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ga=function(){function n(e,t,o,r){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=o,this.cryptoObj=r}return n.prototype.loadExternalTokens=function(e,t,o){if(this.logger.info("TokenCache - loadExternalTokens called"),!t.id_token)throw F.createUnableToLoadTokenError("Please ensure server response includes id token.");var r=new It(t.id_token,this.cryptoObj),i,s;if(e.account){var c=this.loadAccount(r,e.account.environment,void 0,void 0,e.account.homeAccountId);i=new xn(c,this.loadIdToken(r,c.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,t,c.homeAccountId,e.account.environment,e.account.tenantId,o),this.loadRefreshToken(e,t,c.homeAccountId,e.account.environment))}else if(e.authority){var l=Un.generateAuthority(e.authority,e.azureCloudOptions),h={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(s=new Un(l,this.config.system.networkClient,this.storage,h,this.logger),o.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var c=this.loadAccount(r,s.hostnameAndPort,o.clientInfo,s.authorityType);i=new xn(c,this.loadIdToken(r,c.homeAccountId,s.hostnameAndPort,s.tenant),this.loadAccessToken(e,t,c.homeAccountId,s.hostnameAndPort,s.tenant,o),this.loadRefreshToken(e,t,c.homeAccountId,s.hostnameAndPort))}else if(t.client_info){this.logger.trace("TokenCache - homeAccountId from response");var c=this.loadAccount(r,s.hostnameAndPort,t.client_info,s.authorityType);i=new xn(c,this.loadIdToken(r,c.homeAccountId,s.hostnameAndPort,s.tenant),this.loadAccessToken(e,t,c.homeAccountId,s.hostnameAndPort,s.tenant,o),this.loadRefreshToken(e,t,c.homeAccountId,s.hostnameAndPort))}else throw F.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw F.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,r,i,s)},n.prototype.loadAccount=function(e,t,o,r,i){var s;if(i?s=i:r!==void 0&&o&&(s=Ue.generateHomeAccountId(o,r,this.logger,this.cryptoObj,e)),!s)throw F.createUnableToLoadTokenError("Unexpected missing homeAccountId");var c=o?Ue.createAccount(o,s,e,void 0,void 0,void 0,t):Ue.createGenericAccount(s,e,void 0,void 0,void 0,t);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(c),c;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadIdToken=function(e,t,o,r){var i=sn.createIdTokenEntity(t,o,e.rawToken,this.config.auth.clientId,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(i),i;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadAccessToken=function(e,t,o,r,i,s){if(!t.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!t.expires_in)throw F.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!s.extendedExpiresOn)throw F.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var c=new He(e.scopes).printScopes(),l=s.expiresOn||t.expires_in+new Date().getTime()/1e3,h=s.extendedExpiresOn,u=cn.createAccessTokenEntity(o,r,t.access_token,this.config.auth.clientId,i,c,l,h,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(u),u;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadRefreshToken=function(e,t,o,r){if(!t.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var i=yn.createRefreshTokenEntity(o,r,t.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(i),i;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.generateAuthenticationResult=function(e,t,o,r){var i,s,c,l=b.EMPTY_STRING,h=[],u=null,g;o!=null&&o.accessToken&&(l=o.accessToken.secret,h=He.fromString(o.accessToken.target).asArray(),u=new Date(Number(o.accessToken.expiresOn)*1e3),g=new Date(Number(o.accessToken.extendedExpiresOn)*1e3));var f=(t==null?void 0:t.claims.oid)||(t==null?void 0:t.claims.sub)||b.EMPTY_STRING,w=(t==null?void 0:t.claims.tid)||b.EMPTY_STRING;return{authority:r?r.canonicalAuthority:b.EMPTY_STRING,uniqueId:f,tenantId:w,scopes:h,account:o!=null&&o.account?o.account.getAccountInfo():null,idToken:t?t.rawToken:b.EMPTY_STRING,idTokenClaims:t?t.claims:{},accessToken:l,fromCache:!0,expiresOn:u,correlationId:e.correlationId||b.EMPTY_STRING,requestId:b.EMPTY_STRING,extExpiresOn:g,familyId:b.EMPTY_STRING,tokenType:((i=o==null?void 0:o.accessToken)===null||i===void 0?void 0:i.tokenType)||b.EMPTY_STRING,state:b.EMPTY_STRING,cloudGraphHostName:((s=o==null?void 0:o.account)===null||s===void 0?void 0:s.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((c=o==null?void 0:o.account)===null||c===void 0?void 0:c.msGraphHost)||b.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $a=function(n){xe(e,n);function e(t){var o=n.call(this,t)||this;return o.includeRedirectUri=!1,o}return e}(Or);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qa=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,h,u,g)||this;return f.apiId=l,f}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!t.code)throw F.createAuthCodeRequiredError();return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Silent)];case 1:o=u.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||b.EMPTY_STRING,o.account||null),r=this.initializeServerTelemetryManager(this.apiId),u.label=2;case 2:return u.trys.push([2,4,,5]),i=Q(Q({},o),{code:t.code}),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,t.correlationId),[4,this.getClientConfiguration(r,o.authority)];case 3:return s=u.sent(),c=new $a(s),this.logger.verbose("Auth code client created"),l=new Jr(c,this.browserStorage,i,this.logger,this.config.system,this.performanceClient),[2,l.handleCodeResponseFromServer({code:t.code,msgraph_host:t.msGraphHost,cloud_graph_host_name:t.cloudGraphHostName,cloud_instance_host_name:t.cloudInstanceHostName},o.state,c.authority,this.networkClient,!1)];case 4:throw h=u.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),r.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(o.state),h;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wa=function(){function n(e){this.isBrowserEnvironment=typeof window<"u",this.config=Ra(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new Ao(this.config.system.loggerOptions,Uo,jn),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new Ka(this.config.auth.clientId,this.config.auth.authority,this.logger,Uo,jn,this.config.telemetry.application,this.config.system.cryptoOptions):new _a(this.config.auth.clientId,this.config.auth.authority,this.logger,Uo,jn,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new Ha(this.logger,this.performanceClient,this.config.system.cryptoOptions):Xn,this.eventHandler=new Ma(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Bo(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):ba(this.config.auth.clientId,this.logger);var t={cacheLocation:Ae.MemoryStorage,temporaryCacheLocation:Ae.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};this.nativeInternalStorage=new Bo(this.config.auth.clientId,t,this.browserCrypto,this.logger),this.tokenCache=new Ga(this.config,this.browserStorage,this.logger,this.browserCrypto),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}return n.prototype.initialize=function(){return z(this,void 0,void 0,function(){var e,t,o,r,i;return x(this,function(s){switch(s.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(e=this.config.system.allowNativeBroker,t=this.performanceClient.startMeasurement(R.InitializeClientApplication),this.eventHandler.emitEvent(te.INITIALIZE_START),!e)return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),o=this,[4,ln.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)];case 2:return o.nativeExtensionProvider=s.sent(),[3,4];case 3:return r=s.sent(),this.logger.verbose(r),[3,4];case 4:return this.config.cache.claimsBasedCachingEnabled?[3,6]:(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),i=this.performanceClient.startMeasurement(R.ClearTokensAndKeysWithClaims),[4,this.browserStorage.clearTokensAndKeysWithClaims()]);case 5:s.sent(),i.endMeasurement({success:!0}),s.label=6;case 6:return this.initialized=!0,this.eventHandler.emitEvent(te.INITIALIZE_END),t.endMeasurement({allowNativeBroker:e,success:!0}),[2]}})})},n.prototype.handleRedirectPromise=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h,u=this;return x(this,function(g){return this.logger.verbose("handleRedirectPromise called"),Ee.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),t=this.getAllAccounts(),this.isBrowserEnvironment?(o=e||b.EMPTY_STRING,r=this.redirectResponse.get(o),typeof r>"u"?(this.eventHandler.emitEvent(te.HANDLE_REDIRECT_START,$.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),i=this.browserStorage.getCachedNativeRequest(),s=void 0,i&&ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),c=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,i.accountId,this.nativeInternalStorage,i.correlationId),s=c.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),l=this.browserStorage.getTemporaryCache(ue.CORRELATION_ID,!0)||b.EMPTY_STRING,h=this.createRedirectClient(l),s=h.handleRedirectPromise(e)),r=s.then(function(f){if(f){var w=t.length<u.getAllAccounts().length;w?(u.eventHandler.emitEvent(te.LOGIN_SUCCESS,$.Redirect,f),u.logger.verbose("handleRedirectResponse returned result, login success")):(u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Redirect,f),u.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return u.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,$.Redirect),f}).catch(function(f){throw t.length>0?u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Redirect,null,f):u.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Redirect,null,f),u.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,$.Redirect),f}),this.redirectResponse.set(o,r)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,r]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},n.prototype.acquireTokenRedirect=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s,c=this;return x(this,function(l){return t=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",t),this.preflightBrowserEnvironmentCheck($.Redirect),o=this.getAllAccounts().length>0,o?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Redirect,e):this.eventHandler.emitEvent(te.LOGIN_START,$.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(i=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),r=i.acquireTokenRedirect(e).catch(function(h){if(h instanceof Nt&&h.isFatal()){c.nativeExtensionProvider=void 0;var u=c.createRedirectClient(e.correlationId);return u.acquireToken(e)}else if(h instanceof gt){c.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var u=c.createRedirectClient(e.correlationId);return u.acquireToken(e)}throw c.browserStorage.setInteractionInProgress(!1),h})):(s=this.createRedirectClient(e.correlationId),r=s.acquireToken(e)),[2,r.catch(function(h){throw o?c.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Redirect,null,h):c.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Redirect,null,h),h})]})})},n.prototype.acquireTokenPopup=function(e){var t=this,o=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(R.AcquireTokenPopup,o);try{this.logger.verbose("acquireTokenPopup called",o),this.preflightBrowserEnvironmentCheck($.Popup)}catch(l){return Promise.reject(l)}var i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Popup,e):this.eventHandler.emitEvent(te.LOGIN_START,$.Popup,e);var s;if(this.canUseNative(e))s=this.acquireTokenNative(e,ke.acquireTokenPopup).then(function(l){return t.browserStorage.setInteractionInProgress(!1),r.endMeasurement({success:!0,isNativeBroker:!0,requestId:l.requestId}),l}).catch(function(l){if(l instanceof Nt&&l.isFatal()){t.nativeExtensionProvider=void 0;var h=t.createPopupClient(e.correlationId);return h.acquireToken(e)}else if(l instanceof gt){t.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var h=t.createPopupClient(e.correlationId);return h.acquireToken(e)}throw t.browserStorage.setInteractionInProgress(!1),l});else{var c=this.createPopupClient(e.correlationId);s=c.acquireToken(e)}return s.then(function(l){var h=i.length<t.getAllAccounts().length;return h?t.eventHandler.emitEvent(te.LOGIN_SUCCESS,$.Popup,l):t.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Popup,l),r.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),r.endMeasurement({success:!0,requestId:l.requestId}),l}).catch(function(l){return i.length>0?t.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Popup,null,l):t.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Popup,null,l),r.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),Promise.reject(l)})},n.prototype.trackPageVisibilityWithMeasurement=function(){var e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))},n.prototype.ssoSilent=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i,s,c=this;return x(this,function(l){return o=this.getRequestCorrelationId(e),r=Q(Q({},e),{prompt:e.prompt,correlationId:o}),this.preflightBrowserEnvironmentCheck($.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(R.SsoSilent,o),(t=this.ssoSilentMeasurement)===null||t===void 0||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",o),this.eventHandler.emitEvent(te.SSO_SILENT_START,$.Silent,r),this.canUseNative(r)?i=this.acquireTokenNative(r,ke.ssoSilent).catch(function(h){if(h instanceof Nt&&h.isFatal()){c.nativeExtensionProvider=void 0;var u=c.createSilentIframeClient(r.correlationId);return u.acquireToken(r)}throw h}):(s=this.createSilentIframeClient(r.correlationId),i=s.acquireToken(r)),[2,i.then(function(h){var u,g;return c.eventHandler.emitEvent(te.SSO_SILENT_SUCCESS,$.Silent,h),(u=c.ssoSilentMeasurement)===null||u===void 0||u.addStaticFields({accessTokenSize:h.accessToken.length,idTokenSize:h.idToken.length}),(g=c.ssoSilentMeasurement)===null||g===void 0||g.endMeasurement({success:!0,isNativeBroker:h.fromNativeBroker,requestId:h.requestId}),h}).catch(function(h){var u;throw c.eventHandler.emitEvent(te.SSO_SILENT_FAILURE,$.Silent,null,h),(u=c.ssoSilentMeasurement)===null||u===void 0||u.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}).finally(function(){document.removeEventListener("visibilitychange",c.trackPageVisibilityWithMeasurement)})]})})},n.prototype.acquireTokenByCode=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s=this;return x(this,function(c){t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck($.Silent),this.logger.trace("acquireTokenByCode called",t),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_START,$.Silent,e),o=this.performanceClient.startMeasurement(R.AcquireTokenByCode,e.correlationId);try{if(e.code&&e.nativeAccountId)throw F.createSpaCodeAndNativeAccountIdPresentError();if(e.code)return r=e.code,i=this.hybridAuthCodeResponses.get(r),i?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),o.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),i=this.acquireTokenByCodeAsync(Q(Q({},e),{correlationId:t})).then(function(l){return s.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_SUCCESS,$.Silent,l),s.hybridAuthCodeResponses.delete(r),o.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),o.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),l}).catch(function(l){throw s.hybridAuthCodeResponses.delete(r),s.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,$.Silent,null,l),o.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l}),this.hybridAuthCodeResponses.set(r,i)),[2,i];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,ke.acquireTokenByCode,e.nativeAccountId).catch(function(l){throw l instanceof Nt&&l.isFatal()&&(s.nativeExtensionProvider=void 0),l})];throw F.createUnableToAcquireTokenFromNativePlatformError()}else throw F.createAuthCodeOrNativeAccountIdRequiredError()}catch(l){throw this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,$.Silent,null,l),o.endMeasurement({errorCode:l instanceof Y&&l.errorCode||void 0,subErrorCode:l instanceof Y&&l.subError||void 0,success:!1}),l}return[2]})})},n.prototype.acquireTokenByCodeAsync=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i=this;return x(this,function(s){switch(s.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(R.AcquireTokenByCodeAsync,e.correlationId),(t=this.acquireTokenByCodeAsyncMeasurement)===null||t===void 0||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),o=this.createSilentAuthCodeClient(e.correlationId),[4,o.acquireToken(e).then(function(c){var l;return(l=i.acquireTokenByCodeAsyncMeasurement)===null||l===void 0||l.endMeasurement({success:!0,fromCache:c.fromCache,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),c}).catch(function(c){var l;throw(l=i.acquireTokenByCodeAsyncMeasurement)===null||l===void 0||l.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),c}).finally(function(){document.removeEventListener("visibilitychange",i.trackPageVisibilityWithMeasurement)})];case 1:return r=s.sent(),[2,r]}})})},n.prototype.acquireTokenFromCache=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){switch(this.performanceClient.addQueueMeasurement(R.AcquireTokenFromCache,t.correlationId),o.cacheLookupPolicy){case Xe.Default:case Xe.AccessToken:case Xe.AccessTokenAndRefreshToken:return[2,e.acquireToken(t)];default:throw K.createRefreshRequiredError()}return[2]})})},n.prototype.acquireTokenByRefreshToken=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(this.performanceClient.addQueueMeasurement(R.AcquireTokenByRefreshToken,e.correlationId),t.cacheLookupPolicy){case Xe.Default:case Xe.AccessTokenAndRefreshToken:case Xe.RefreshToken:case Xe.RefreshTokenAndNetwork:return o=this.createSilentRefreshClient(e.correlationId),this.performanceClient.setPreQueueTime(R.SilentRefreshClientAcquireToken,e.correlationId),[2,o.acquireToken(e)];default:throw K.createRefreshRequiredError()}return[2]})})},n.prototype.acquireTokenBySilentIframe=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return this.performanceClient.addQueueMeasurement(R.AcquireTokenBySilentIframe,e.correlationId),t=this.createSilentIframeClient(e.correlationId),this.performanceClient.setPreQueueTime(R.SilentIframeClientAcquireToken,e.correlationId),[2,t.acquireToken(e)]})})},n.prototype.logout=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return t=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),[2,this.logoutRedirect(Q({correlationId:t},e))]})})},n.prototype.logoutRedirect=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){return t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck($.Redirect),o=this.createRedirectClient(t),[2,o.logout(e)]})})},n.prototype.logoutPopup=function(e){try{var t=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck($.Popup);var o=this.createPopupClient(t);return o.logout(e)}catch(r){return Promise.reject(r)}},n.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},n.prototype.getAccountByUsername=function(e){if(this.logger.trace("getAccountByUsername called"),!e)return this.logger.warning("getAccountByUsername: No username provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({username:e});return t?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: "+e),t):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},n.prototype.getAccountByHomeId=function(e){if(this.logger.trace("getAccountByHomeId called"),!e)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:e});return t?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: "+e),t):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},n.prototype.getAccountByLocalId=function(e){if(this.logger.trace("getAccountByLocalId called"),!e)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({localAccountId:e});return t?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: "+e),t):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},n.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},n.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},n.prototype.preflightBrowserEnvironmentCheck=function(e,t){if(t===void 0&&(t=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),Ee.blockNonBrowserEnvironment(this.isBrowserEnvironment),Ee.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Ee.blockReloadInHiddenIframes(),Ee.blockAcquireTokenInPopups(),Ee.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===$.Redirect&&this.config.cache.cacheLocation===Ae.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw ao.createInMemoryRedirectUnavailableError();(e===$.Redirect||e===$.Popup)&&this.preflightInteractiveRequest(t)},n.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),Ee.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},n.prototype.acquireTokenNative=function(e,t,o){return z(this,void 0,void 0,function(){var r;return x(this,function(i){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw F.createNativeConnectionNotEstablishedError();return r=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,o||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,r.acquireToken(e)]})})},n.prototype.canUseNative=function(e,t){if(this.logger.trace("canUseNative called"),!ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case Ve.NONE:case Ve.CONSENT:case Ve.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},n.prototype.getNativeAccountId=function(e){var t=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return t&&t.nativeAccountId||""},n.prototype.createPopupClient=function(e){return new Ea(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createRedirectClient=function(e){return new Ca(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createSilentIframeClient=function(e){return new Na(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createSilentCacheClient=function(e){return new Yr(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.createSilentRefreshClient=function(e){return new Pa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.createSilentAuthCodeClient=function(e){return new Qa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},n.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},n.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},n.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},n.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},n.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},n.prototype.getTokenCache=function(){return this.tokenCache},n.prototype.getLogger=function(){return this.logger},n.prototype.setLogger=function(e){this.logger=e},n.prototype.initializeWrapperLibrary=function(e,t){this.browserStorage.setWrapperMetadata(e,t)},n.prototype.setNavigationClient=function(e){this.navigationClient=e},n.prototype.getConfiguration=function(){return this.config},n.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():b.EMPTY_STRING},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ya=function(n){xe(e,n);function e(t){var o=n.call(this,t)||this;return o.astsAsyncMeasurement=void 0,o.activeSilentTokenRequests=new Map,o.trackPageVisibility=o.trackPageVisibility.bind(o),o}return e.prototype.loginRedirect=function(t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){return o=this.getRequestCorrelationId(t),this.logger.verbose("loginRedirect called",o),[2,this.acquireTokenRedirect(Q({correlationId:o},t||Hr))]})})},e.prototype.loginPopup=function(t){var o=this.getRequestCorrelationId(t);return this.logger.verbose("loginPopup called",o),this.acquireTokenPopup(Q({correlationId:o},t||Hr))},e.prototype.acquireTokenSilent=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u=this;return x(this,function(g){if(o=this.getRequestCorrelationId(t),r=this.performanceClient.startMeasurement(R.AcquireTokenSilent,o),r.addStaticFields({cacheLookupPolicy:t.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck($.Silent),this.logger.verbose("acquireTokenSilent called",o),i=t.account||this.getActiveAccount(),!i)throw F.createNoAccountError();return s={clientId:this.config.auth.clientId,authority:t.authority||b.EMPTY_STRING,scopes:t.scopes,homeAccountIdentifier:i.homeAccountId,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},c=JSON.stringify(s),l=this.activeSilentTokenRequests.get(c),typeof l>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",o),this.performanceClient.setPreQueueTime(R.AcquireTokenSilentAsync,o),h=this.acquireTokenSilentAsync(Q(Q({},t),{correlationId:o}),i).then(function(f){return u.activeSilentTokenRequests.delete(c),r.addStaticFields({accessTokenSize:f.accessToken.length,idTokenSize:f.idToken.length}),r.endMeasurement({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,cacheLookupPolicy:t.cacheLookupPolicy,requestId:f.requestId}),f}).catch(function(f){throw u.activeSilentTokenRequests.delete(c),r.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f}),this.activeSilentTokenRequests.set(c,h),[2,h]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",o),r.discardMeasurement(),[2,l])})})},e.prototype.trackPageVisibility=function(){this.astsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.astsAsyncMeasurement.increment({visibilityChangeCount:1}))},e.prototype.acquireTokenSilentAsync=function(t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l,h,u=this;return x(this,function(g){switch(g.label){case 0:return this.performanceClient.addQueueMeasurement(R.AcquireTokenSilentAsync,t.correlationId),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Silent,t),this.astsAsyncMeasurement=this.performanceClient.startMeasurement(R.AcquireTokenSilentAsync,t.correlationId),(r=this.astsAsyncMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility),ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,t.authenticationScheme)&&o.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),s=Q(Q({},t),{account:o}),i=this.acquireTokenNative(s,ke.acquireTokenSilent_silentFlow).catch(function(f){return z(u,void 0,void 0,function(){var w;return x(this,function(C){if(f instanceof Nt&&f.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,w=this.createSilentIframeClient(t.correlationId),[2,w.acquireToken(t)];throw f})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),c=this.createSilentCacheClient(t.correlationId),this.performanceClient.setPreQueueTime(R.InitializeSilentRequest,t.correlationId),[4,c.initializeSilentRequest(t,o)];case 2:l=g.sent(),h=Q(Q({},t),{cacheLookupPolicy:t.cacheLookupPolicy||Xe.Default}),this.performanceClient.setPreQueueTime(R.AcquireTokenFromCache,l.correlationId),i=this.acquireTokenFromCache(c,l,h).catch(function(f){if(h.cacheLookupPolicy===Xe.AccessToken)throw f;return Ee.blockReloadInHiddenIframes(),u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_NETWORK_START,$.Silent,l),u.performanceClient.setPreQueueTime(R.AcquireTokenByRefreshToken,l.correlationId),u.acquireTokenByRefreshToken(l,h).catch(function(w){var C=w instanceof rn,P=w instanceof gt,M=w.errorCode===bn.noTokensFoundError.code,j=w.errorCode===_t.INVALID_GRANT_ERROR;if((!C||!j||P||h.cacheLookupPolicy===Xe.AccessTokenAndRefreshToken||h.cacheLookupPolicy===Xe.RefreshToken)&&h.cacheLookupPolicy!==Xe.Skip&&!M)throw w;return u.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",t.correlationId),u.performanceClient.setPreQueueTime(R.AcquireTokenBySilentIframe,l.correlationId),u.acquireTokenBySilentIframe(l)})}),g.label=3;case 3:return[2,i.then(function(f){var w;return u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Silent,f),(w=u.astsAsyncMeasurement)===null||w===void 0||w.endMeasurement({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,requestId:f.requestId}),f}).catch(function(f){var w;throw u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Silent,null,f),(w=u.astsAsyncMeasurement)===null||w===void 0||w.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f}).finally(function(){document.removeEventListener("visibilitychange",u.trackPageVisibility)})]}})})},e}(Wa);class Ja extends tt.WebPlugin{async login(e){const t=this.createContext(e);try{return await this.acquireTokenSilently(t,e.scopes).catch(()=>this.acquireTokenInteractively(t,e.scopes))}catch(o){throw console.error("MSAL: Error occurred while logging in",o),o}}logout(e){const t=this.createContext(e);return t.getAllAccounts()[0]?t.logoutPopup():Promise.reject(new Error("Nothing to sign out from."))}logoutAll(e){return this.logout(e)}createContext(e){var t,o,r;const i={auth:{clientId:e.clientId,domainHint:e.domainHint,authority:(t=e.authorityUrl)!==null&&t!==void 0?t:`https://login.microsoftonline.com/${(o=e.tenant)!==null&&o!==void 0?o:"common"}`,knownAuthorities:e.knownAuthorities,redirectUri:(r=e.redirectUri)!==null&&r!==void 0?r:this.getCurrentUrl()},cache:{cacheLocation:"localStorage"}};return new Ya(i)}getCurrentUrl(){return window.location.href.split(/[?#]/)[0]}async acquireTokenInteractively(e,t){const{accessToken:o,idToken:r}=await e.acquireTokenPopup({scopes:t,prompt:"select_account"});return{accessToken:o,idToken:r,scopes:t}}async acquireTokenSilently(e,t){const{accessToken:o,idToken:r}=await e.acquireTokenSilent({scopes:t,account:e.getAllAccounts()[0]});return{accessToken:o,idToken:r,scopes:t}}}const Xa=tt.registerPlugin("MsAuthPlugin",{web:()=>new Ja}),ri={data(){return{microsoftLoad:!1,microsoftSSOLoad:!1}},computed:{displayMicrosoftSSOLogin(){return!1}},methods:{async microsoftLogin(n,e={}){var r;n==="sso"?this.microsoftSSOLoad=!0:this.microsoftLoad=!0;const[t,o]=await fe(Xa.login({clientId:n==="sso"?e.clientID:"9cd47053-080a-4df8-8fd8-ca4389163fde",tenant:n==="sso"?e.tenant:"consumers",scopes:["User.Read"],knownAuthorities:[],keyHash:"4+5wCp8QcLptlO0aeP5RDTTOWyg=",redirectUri:`${window.location.origin}/login`}));if(t)return console.error("MsAuthPlugin Error: "+JSON.stringify(t)),this.microsoftLoad=!1;if(this.referral&&(o.ref=this.referral),this.display==="popup"&&(o.response_type="code"),o&&(o.accessToken||o.idToken)){const[i,s]=await fe(Fe.microsoftSDK(o,this.$storex));if(i)return this.microsoftLoad=!1,this.microsoftSSOLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(i);if(s.data.success){if(this.display==="popup")return(r=window.parent)==null?void 0:r.postMessage({code:s.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(s),await this.getLoggedInAccounts(),this.loginSuccess({...s,isModal:this.isModal}),setTimeout(()=>{this.microsoftLoad=!1,this.microsoftSSOLoad=!1},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)}else this.microsoftLoad=!1,this.microsoftSSOLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})}}},Za=n=>{try{return window.crypto.getRandomValues(n)}catch{for(let t=0;t<n.length;t++)n[t]=Math.floor(Math.random()*256);return n}},es=async n=>{try{return await window.crypto.subtle.digest("SHA-256",n)}catch{const t=rr.sha256(n);return new Uint8Array(t.match(/.{1,2}/g).map(o=>parseInt(o,16))).buffer}},ts=async(n,e,t)=>{try{return await window.crypto.subtle.encrypt(n,e,t)}catch{throw new Error("Encryption not supported in this environment")}},ns=async(n,e,t)=>{try{return await window.crypto.subtle.decrypt(n,e,t)}catch{throw new Error("Decryption not supported in this environment")}},Fn={getFirstBrowserLanguage(){let n=window.navigator,e=["language","browserLanguage","systemLanguage","userLanguage"],t,o;if(Array.isArray(n.languages)){for(t=0;t<n.languages.length;t++)if(o=n.languages[t],o&&o.length)return o.slice(0,2)}for(t=0;t<e.length;t++)if(o=n[e[t]],o&&o.length)return o.slice(0,2);return null},compareLangKeys(){const n=Object.keys(hr.state),e=Object.keys(mr.state),t=Object.keys(fr.state),o=Object.keys(br.state),r=Object.keys(_r.state),i=Object.keys(gr.state),s=Object.keys(vr.state),c=Object.keys(yr.state);console.log("In en but not in de",n.filter(l=>!e.includes(l))),console.log("In de but not in en",e.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in es",n.filter(l=>!t.includes(l))),console.log("In es but not in en",t.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in kr",n.filter(l=>!o.includes(l))),console.log("In kr but not in en",o.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in it",n.filter(l=>!r.includes(l))),console.log("In it but not in en",r.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in fr",n.filter(l=>!i.includes(l))),console.log("In fr but not in en",i.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in sr",n.filter(l=>!s.includes(l))),console.log("In sr but not in en",s.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in tr",n.filter(l=>!c.includes(l))),console.log("In tr but not in en",c.filter(l=>!n.includes(l))),console.log()},base64ImageToBlob(n){const e=n.split(";base64,"),t=e[0].split(":")[1],o=window.atob(e[1]),r=new Uint8Array(o.length);for(let i=0;i<o.length;++i)r[i]=o.charCodeAt(i);return new Blob([r],{type:t})},blobToBase64(n){const e=new FileReader;return e.readAsDataURL(n),new Promise(t=>{e.onloadend=()=>{t(e.result)}})},base64toFile(n,e){for(var t=n.split(","),o=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,s=new Uint8Array(i);i--;)s[i]=r.charCodeAt(i);return new File([s],e,{type:o})},fileToBase64(n){new Promise((e,t)=>{const o=new FileReader;o.readAsDataURL(n),o.onload=()=>e(o.result),o.onerror=r=>t(r)})},getUTMParams(n){let e={};return n.utm_source&&(e.utm_source=n.utm_source),n.utm_medium&&(e.utm_medium=n.utm_medium),n.utm_campaign&&(e.utm_campaign=n.utm_campaign),n.utm_term&&(e.utm_term=n.utm_term),n.utm_content&&(e.utm_content=n.utm_content),e},cropCardScan(n,e){const t=new window.Image,o=document.createElement("canvas"),r=o.getContext("2d");t.src="data:image/jpeg;base64,"+n,t.onload=()=>{const i=t.width,s=t.width/1.65,c=0,l=t.height/2-s/2,h=i,u=s;o.width=h,o.height=u,r.drawImage(t,c,l,i,s,0,0,h,u);const g=o.toDataURL();return e(g),g}},generateRandomString(n){let e=new Uint32Array(n);return Za(e),Array.from(e,t=>("0"+t.toString(16)).substr(-2)).join("")},async pkceChallengeFromVerifier(n){try{const t=new TextEncoder().encode(n),o=await es(t);return btoa(String.fromCharCode.apply(null,new Uint8Array(o))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch{const t=rr.sha256(n);return btoa(String.fromCharCode.apply(null,new Uint8Array(t.match(/.{1,2}/g).map(r=>parseInt(r,16))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},async encryptAES(n,e,t){try{let r=new TextEncoder().encode(t);return await ts({name:"AES-CBC",iv:e},n,r)}catch(o){throw o}},async decryptAES(n,e,t){try{const o=l=>Uint8Array.from(atob(l),h=>h.charCodeAt(0));t=t.replace(/ /g,"+");const r=new TextEncoder,i=new TextDecoder;n=r.encode(n),e=r.encode(e),t=o(t);const s=await window.crypto.subtle.importKey("raw",n,"AES-CBC",!0,["encrypt","decrypt"]);let c=await ns({name:"AES-CBC",iv:e},s,t);return c=i.decode(c),c=c.replace(/ /g,"+"),c=atob(c),c}catch(o){throw o}}},ii={data(){return{oktaAuth:null}},computed:{},watch:{},methods:{async exchangeCode(n){var r,i;let[e,t]=await fe(mo.post(n.domain+"/v1/token",new URLSearchParams({code:n.code,client_id:n.clientID,grant_type:"authorization_code",redirect_uri:this.isNative?"tapni://t.link/callback/okta":location.origin+"/callback/okta",code_verifier:localStorage.getItem("pkce_code_verifier")})));if(e)return this.errorHandler(e);localStorage.removeItem("pkce_code_verifier");let o={accessToken:(r=t.data)==null?void 0:r.access_token,domain:n.domain};if(this.display==="popup"&&(o.response_type="code"),[e,t]=await fe(Fe.oktaSDK(o,this.$storex)),e)return this.oktaLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(e);if(t.data.success){if(this.display==="popup")return(i=window.parent)==null?void 0:i.postMessage({code:t.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(t),await this.getLoggedInAccounts(),this.$router.push("/"+t.data.data.username+"#edit"),setTimeout(()=>{this.appleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)},async oktaLogin(n){const e=tt.Capacitor.getPlatform()||"web";let t=btoa("domain="+n.domain+"&client_id="+n.clientID+"&platform="+e+"&rand="+Fn.generateRandomString(28)),o=Fn.generateRandomString(28);localStorage.setItem("pkce_code_verifier",o);let r=await Fn.pkceChallengeFromVerifier(o),i=n.domain+"/v1/authorize",s;this.isNative?s="tapni://t.link/callback/okta":s=location.origin+"/callback/okta";let c=i+"?response_type=code&client_id="+encodeURIComponent(n.clientID)+"&state="+encodeURIComponent(t)+"&scope="+encodeURIComponent("openid email profile")+"&redirect_uri="+encodeURIComponent(s)+"&code_challenge="+encodeURIComponent(r)+"&code_challenge_method=S256",l=this,h;window.addEventListener("message",async u=>{if(!this.allowedOriginsAuth.includes(u.origin))return console.error("Origin is not allowed!");u.data.type==="okta"&&(h=u.data.code,await l.exchangeCode({domain:n.domain,code:h,clientID:n.clientID}))},{once:!0}),this.isNative?await Vn.Browser.open({url:c,presentationStyle:"popover"}):window.open(c,"popup","width=600,height=600")},async handleOktaRedirect(){let n=this.$route.query.code,e,t,o,r,i={type:"okta"};if(n&&(i.code=n),this.$route.query.state){e=this.$route.query.state,e=atob(e);const s=new URLSearchParams(e);t=s.get("client_id"),o=s.get("domain"),r=s.get("platform")}window.opener?(window.opener.postMessage(i,location.origin),window.close()):(this.isNative&&this.isiOS&&await Vn.Browser.close(),X.$emit("ssoEvent",{name:"setLoading",data:!0}),n&&t&&o&&await this.exchangeCode({code:n,clientID:t,domain:o,platform:r}),localStorage.removeItem("pkce_code_verifier"),X.$emit("ssoEvent",{name:"setLoading",data:!1}))}}},ai={data(){return{code_verifier:"",code_challenge:"",shouldCloseWindow:!1,popupWindow:null,checkInterval:null}},computed:{},watch:{"$route.path"(n){n==="/callback/saml"&&this.handleSamlRedirect(n)}},methods:{closeWindow(){try{window.close()}catch{}},async samlLogin(n){this.code_verifier=Fn.generateRandomString(28),localStorage.setItem("pkce_code_verifier",this.code_verifier),this.code_challenge=await Fn.pkceChallengeFromVerifier(this.code_verifier);const e=tt.Capacitor.getPlatform();let t=`code_challenge=${this.code_challenge}&platform=${e}&redirect_uri=${location.origin+(this.display==="npm"?"/app":"")+"/callback/saml"}&realm=${this.realm}&display=${this.display}`,o=btoa(t);n=`${n}&RelayState=${o}`;let r=this;window.addEventListener("message",async i=>{var l;if(!this.allowedOriginsAuth.includes(i.origin))return console.error("Origin is not allowed! "+i.origin);const s=i.data.code,c=localStorage.getItem("pkce_code_verifier");if(s){if(r.display==="popup")return(l=window.parent)==null?void 0:l.postMessage({code:s,state:i.data.state,code_verifier:c},"*");c&&(await r.exchangeAuthCode({code:i.data.code,code_verifier:c}),localStorage.removeItem("pkce_code_verifier"))}},{once:!0}),this.isNative?this.popupWindow=await Vn.Browser.open({url:n,presentationStyle:"popover"}):(this.checkInterval=setInterval(()=>{var c;const i=localStorage.getItem("auth_code"),s=localStorage.getItem("pkce_code_verifier");i&&(clearInterval(this.checkInterval),localStorage.removeItem("auth_code"),localStorage.removeItem("pkce_code_verifier"),(c=window.parent)==null||c.postMessage({code:i,state:this.$route.query.state,code_verifier:s},"*"),s&&(this.display==="npm"||this.display==="redirect")&&this.exchangeAuthCode({code:i,code_verifier:s}))},500),this.popupWindow=window.open(window.location.origin+(this.display==="npm"?"/app":"")+"/callback/redirect?uri="+btoa(n),"popup","width=600,height=600"))},async handleSamlRedirect(){var e;let n;if(this.$route.query.code&&(n=this.$route.query.code),window.opener)window.opener.postMessage({type:"saml",code:n},"*"),this.closeWindow();else{if(this.isNative&&this.isiOS&&await Vn.Browser.close(),X.$emit("ssoEvent",{name:"setLoading",data:!0}),n&&((this.display==="popup"||this.display==="npm")&&(localStorage.setItem("auth_code",n),this.shouldCloseWindow=!0,(e=window.parent)==null||e.postMessage({code:n,state:this.$route.query.state},"*"),this.closeWindow()),this.display==="redirect"||location.host==="auth.tapni.com")){let t="https://auth.tapni.com/callback/auth";return this.realm==="dashboard"&&(t="https://business.tapni.com/login"),location.href=t+"?code="+n+"&code_verifier="+localStorage.getItem("pkce_code_verifier")}X.$emit("ssoEvent",{name:"setLoading",data:!1})}}}},si={data(){return{isQrCodeLogin:!1,qrCode:null,qrCodeHash:null,qrCodeRefreshInterval:null,poolingInterval:null}},props:{isModal:{type:Boolean,required:!1,default:!1}},computed:{displayQRLogin(){return this.$route.name==="AuthLogin"&&this.display!=="npm"}},mounted(){this.$route.name==="AuthQR"&&this.changeLoginToQr()},methods:{async changeLoginToQr(){this.isQrCodeLogin=!0,await a.nextTick(),await this.initQrCodeLogin()},generateRandomHash(){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=n.length;let t="";const o=new Uint32Array(32);return window.crypto.getRandomValues(o),o.forEach(r=>{t+=n.charAt(r%e)}),t},refreshQrCode(){var n,e;this.qrCode&&((e=(n=document.getElementById("qrCodeContainer"))==null?void 0:n.childNodes[0])==null||e.remove()),this.qrCodeHash=this.generateRandomHash(),this.qrCode=new ir({width:300,height:300,type:"png",image:"",imageOptions:{margin:15},data:this.qrCodeHash,dotsOptions:{type:"extra-rounded",color:"#000000"},cornersSquareOptions:{type:"extra-rounded",color:"#000000"},cornersDotOptions:{type:"",color:"#000000"},backgroundOptions:{color:"#ffffff00"}}),this.qrCode.append(document.getElementById("qrCodeContainer"))},async startQrCodePooling(){this.poolingInterval=setInterval(async()=>{const[n,e]=await fe(ko.qrCodePooling({qrToken:this.qrCodeHash},this.$storex));if(n)return this.errorHandler(n);e.data.auth_code&&(this.display!=="popup"&&(this.loginSetup({...e,isModal:this.isModal}),await this.getLoggedInAccounts()),this.loginSuccess({...e,isModal:this.isModal}),clearInterval(this.poolingInterval),clearInterval(this.qrCodeRefreshInterval))},2e3)},async initQrCodeLogin(){this.refreshQrCode(),await a.nextTick(),await this.startQrCodePooling(),this.qrCodeRefreshInterval=setInterval(()=>{this.refreshQrCode()},6e4)}}},os={name:"AuthLogin",mixins:[Tr,Sr,ri,ii,ai,We,si],data(){return{loading:!0,submitted:!1,emailOrUsername:"",password:"",captcha:"",revealPassword:!1,emailLogin:!0,isSSOLogin:!1,otpToken:"",showOTP:!1}},computed:{displayFormLogin(){return this.emailLogin},displayResetPasswordLogin(){return!this.isSSOLogin},displayRegisterLogin(){return!0}},async mounted(){if(!this.isModal){if(this.$route.path==="/login/callback/okta")return await this.handleOktaRedirect();if(this.$route.path==="/login/callback/saml")return await this.handleSamlRedirect();this.$route.query.qrLogin&&this.changeLoginToQr(),setTimeout(()=>{this.$storex&&this.$storex.token?this.$router.push(this.home):X.$emit("ssoEvent",{name:"setLoading",data:!1})},2500)}X.$on("toggleOTPField",()=>{this.showOTP=!this.showOTP})},methods:{async ssoLoginSubmit(){this.loading=!0;const n=await this.getCompanyBySSOEmail({email:this.emailOrUsername});this.loading=!1;let e;if(!(!n||n.error))if(e=Object.keys(n.sso),e.length)e[0]==="azure"&&this.microsoftLogin("sso",n.sso.azure.sso),e[0]==="okta"&&this.oktaLogin(n.sso.okta.sso),e[0]==="saml"&&this.samlLogin(n.sso.saml.sso.loginUrl);else return this.errorSnack(this.ssoLang[this.appLanguage].no_sso_logins)},async submit(){if(this.submitted)return;if(this.submitted=!0,this.isSSOLogin)return this.ssoLoginSubmit();this.emailOrUsername=this.emailOrUsername.trim();let e={response_type:this.$route.query.response_type||"token",isModal:this.isModal,captcha:this.captcha,password:this.password,otpToken:this.otpToken};this.emailOrUsername.indexOf("@")!==-1?e.email=this.emailOrUsername:e.username=this.emailOrUsername;const[t,o]=await fe(this.login(e));t&&console.error(t),this.submitted=!1,o===!0&&(this.emailOrUsername="",this.password="")},close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},createAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalRegister",data:{}})}},watch:{emailOrUsername(n){n.includes("@")&&(this.$storex.verifyEmail=n)},"$route.path":async function(n){if(n==="/login/callback/okta")return await this.handleOktaRedirect();if(n==="/login/callback/saml")return await this.handleSamlRedirect()}}},rs={class:"bold no-bottom center-text text-[22px]",style:{"margin-top":"63px"}},is={key:0},as={key:1},ss={key:1},cs={class:"page-login-field half-top"},ls=["placeholder"],ds={key:0,class:"page-login-field half-bottom"},us=["type","placeholder"],ps={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},hs={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},ms={key:1,class:"page-login-field half-bottom"},fs=["placeholder"],gs={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},_s={key:0},vs={key:1,class:"button--loading button__loader"},ys={key:0},bs={key:1,class:"button--loading-black button__loader"},ws={key:0},ks={key:1,class:"button--loading-black button__loader"},Cs={key:0},Es={key:1,class:"button--loading-black button__loader"},Ts={key:0},Ss={key:1,class:"button--loading-black button__loader"},Is={key:0},As={key:1,class:"button--loading-black button__loader"},Rs={class:"close-text center-text half-top color-black"},Ns={class:"",href:"https://tapni.com/policies/terms-of-service"},Ps={href:"https://tapni.com/policies/privacy-policy"},Ms={key:2,class:"page-login-links"},Ls={class:"forgot center-text pointer small-top"};function Os(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[15]||(e[15]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),autocomplete:"on",style:a.normalizeStyle(n.isModal?"max-width: 500px;":"")},[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[16]||(e[16]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h2",rs,[r.isSSOLogin?(a.openBlock(),a.createElementBlock("span",is,a.toDisplayString(this.ssoLang[this.appLanguage].enter_company_email),1)):(a.openBlock(),a.createElementBlock("span",as,a.toDisplayString(this.ssoLang[this.appLanguage].login),1))]),e[34]||(e[34]=a.createElementVNode("p",{class:"half-bottom small-top center-text color-black"},null,-1)),i.displayFormLogin?(a.openBlock(),a.createElementBlock("span",ss,[a.createElementVNode("div",cs,[e[17]||(e[17]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/user.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>r.emailOrUsername=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),autocorrect:"off",autocapitalize:"off",spellcheck:"false",type:"text",name:"email",placeholder:r.isSSOLogin?n.ssoLang[this.appLanguage].email:n.ssoLang[this.appLanguage].email_username,required:""},null,40,ls),[[a.vModelText,r.emailOrUsername]]),e[18]||(e[18]=a.createElementVNode("em",null,null,-1))]),r.isSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",ds,[e[19]||(e[19]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,name:"password",required:"",minlength:"8"},null,8,us),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[4]||(e[4]=c=>r.revealPassword=!r.revealPassword),class:"pointer"},[a.withDirectives(a.createElementVNode("img",ps,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",hs,null,512),[[a.vShow,r.revealPassword]])])])),r.showOTP?(a.openBlock(),a.createElementBlock("div",ms,[e[20]||(e[20]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.otpToken=c),type:"text",placeholder:n.ssoLang[this.appLanguage].otp_code,name:"otpToken",required:"",minlength:"6"},null,8,fs),[[a.vModelText,r.otpToken]]),e[21]||(e[21]=a.createElementVNode("em",null,null,-1))])):a.createCommentVNode("",!0),a.createElementVNode("button",gs,[r.submitted?(a.openBlock(),a.createElementBlock("span",vs)):(a.openBlock(),a.createElementBlock("span",_s,a.toDisplayString(n.ssoLang[n.appLanguage].login),1))])])):a.createCommentVNode("",!0),e[35]||(e[35]=a.createElementVNode("div",{class:"decoration decoration-lines-thin half-top half-bottom"},null,-1)),a.withDirectives(a.createElementVNode("span",null,[n.displayAppleLogin?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[6]||(e[6]=(...c)=>n.appleLogin&&n.appleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[22]||(e[22]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/apple-logo.png",style:{position:"absolute","margin-left":"-11px",padding:"8px 0",height:"100%"}},null,-1)),n.appleLoad?(a.openBlock(),a.createElementBlock("span",bs)):(a.openBlock(),a.createElementBlock("span",ys,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Apple",1))])):a.createCommentVNode("",!0),n.displayGoogleLogin?(a.openBlock(),a.createElementBlock("a",{key:1,onClick:e[7]||(e[7]=(...c)=>n.googleLogin&&n.googleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[23]||(e[23]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/g-logo.png",style:{position:"absolute","margin-left":"-10px",padding:"8px 0",height:"100%"}},null,-1)),n.googleLoad?(a.openBlock(),a.createElementBlock("span",ks)):(a.openBlock(),a.createElementBlock("span",ws,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Google",1))])):a.createCommentVNode("",!0),n.displayMicrosoftSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[8]||(e[8]=(...c)=>n.microsoftLogin&&n.microsoftLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[24]||(e[24]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/outlook.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftLoad?(a.openBlock(),a.createElementBlock("span",Es)):(a.openBlock(),a.createElementBlock("span",Cs,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Outlook",1))])),n.displayMicrosoftSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:3,onClick:e[9]||(e[9]=c=>r.isSSOLogin=!0),class:"button-center button button-90 google-button pointer"},[e[25]||(e[25]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/sso-key.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftSSOLoad?(a.openBlock(),a.createElementBlock("span",Ss)):(a.openBlock(),a.createElementBlock("span",Ts,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" SSO",1))])),n.displayMicrosoftSSOLogin?(a.openBlock(),a.createElementBlock("a",{key:4,onClick:e[10]||(e[10]=c=>n.microsoftLogin("sso")),class:"button-center button button-90 google-button pointer"},[e[26]||(e[26]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/sso-key.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftSSOLoad?(a.openBlock(),a.createElementBlock("span",Is,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" SSO",1)):(a.openBlock(),a.createElementBlock("span",As))])):a.createCommentVNode("",!0),i.displayFormLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:5,onClick:e[11]||(e[11]=c=>r.emailLogin=!0),class:"button-center button button-90 google-button pointer"},[e[27]||(e[27]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",style:{position:"absolute","margin-left":"-8px",padding:"12px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Email",1)])),n.displayQRLogin?(a.openBlock(),a.createElementBlock("a",{key:6,onClick:e[12]||(e[12]=c=>n.$router.push("/qr")),class:"button-center button button-90 google-button pointer"},[e[28]||(e[28]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/qr.png",style:{position:"absolute","margin-left":"-5px",padding:"15px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" QR",1)])):a.createCommentVNode("",!0),e[29]||(e[29]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1))],512),[[a.vShow,!r.isSSOLogin]]),a.createElementVNode("p",Rs,[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].terms_by_signing_in)+" ",1),e[30]||(e[30]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("a",Ns,a.toDisplayString(n.ssoLang[this.appLanguage].terms_of_service),1),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[n.appLanguage].and)+" ",1),a.createElementVNode("a",Ps,a.toDisplayString(n.ssoLang[this.appLanguage].privacy_policy),1)]),e[36]||(e[36]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),n.isModal?(a.openBlock(),a.createElementBlock("div",{key:3,class:"page-login-links",onClick:e[14]||(e[14]=(...c)=>i.createAccountModal&&i.createAccountModal(...c))},[a.createElementVNode("a",Ls,[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].or)+" ",1),e[32]||(e[32]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[n.appLanguage].create_new_account),1)]),e[33]||(e[33]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Ms,[i.displayRegisterLogin?(a.openBlock(),a.createBlock(s,{key:0,class:"forgot float-right",to:"/register"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].create_account),1)]),_:1})):a.createCommentVNode("",!0),i.displayResetPasswordLogin?(a.openBlock(),a.createBlock(s,{key:1,class:"create float-left",to:"/reset"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].reset_password),1)]),_:1})):a.createCommentVNode("",!0),r.isSSOLogin?(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[13]||(e[13]=c=>r.isSSOLogin=!1),class:"create float-left pointer"},a.toDisplayString(n.ssoLang[n.appLanguage].go_back),1)):a.createCommentVNode("",!0),e[31]||(e[31]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const qo=nt(os,[["render",Os]]),zs=Object.freeze(Object.defineProperty({__proto__:null,default:qo},Symbol.toStringTag,{value:"Module"})),xs={WEB_VERSION:"1.0.1",SUPPORTED_LANGUAGES:["en","de","es","kr","it","fr","sr","tr","cn","pt","ja"]},Bs={mixins:[We],props:{isModal:{type:Boolean,default:!1}},data(){return{expanded:!1,addAccountReady:!1}},computed:{appVersion(){return xs.WEB_VERSION}},async mounted(){if(!this.isLoggedIn)return this.$router.push("/");await this.getAccountSettings()},methods:{continueTo(n){},addAccount(){this.$router.push("/login")},switchAccount(n){},toggleLanguageModal(){X.$emit("toggleSSOLanguageModal")},logoutAccount(){this.logout({refreshToken:this.refreshTokens[0],sendRequest:!0})}}},Us={class:"page-login content-boxed content-boxed-padding center-text",style:{"margin-top":"-1px",overflow:"hidden",border:"solid 0px #ffffff"}},Ds={class:"bold full-top no-bottom center-text text-[24px]"},js={class:"full-bottom half-top center-text font-16"},uh={key:1,class:"full-top full-bottom"},ph={class:"page-login-links center-text"},qs={class:"container left-text"},Fs={class:"firstRow"},Vs=["src"],Hs=["src"],Ks={class:"firstRow"},Gs=["src"],$s=["src"],Qs={class:"firstRow"},Ws=["src"],Ys=["src"],Js={class:"firstRow"},Xs=["src"],Zs=["src"],ec={class:"firstRow"},tc=["src"],nc=["src"],oc={class:"firstRow"},rc=["src"],ic=["src"],ac={class:"firstRow"},sc=["src"],cc={class:"red-text"},lc=["src"],dc={class:"moreFooter"},uc={class:"app-version",style:{"margin-top":"10px"}};function pc(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Us,[e[12]||(e[12]=a.createElementVNode("br",null,null,-1)),a.createCommentVNode("",!0),a.createElementVNode("h1",Ds,a.toDisplayString(n.ssoLang[n.appLanguage].welcome_account),1),a.createElementVNode("p",js,a.toDisplayString(n.account.email),1),(n.display,a.createCommentVNode("",!0)),a.createElementVNode("div",qs,[a.createCommentVNode("",!0),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:1,class:"settingRow",onClick:e[4]||(e[4]=c=>n.$emit("update:viewProp","AuthGeneral"))},[a.createElementVNode("div",Fs,[a.createElementVNode("img",{src:n.getIcon("user-black.svg"),class:"withBackground"},null,8,Vs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].general),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Hs)])])):(a.openBlock(),a.createBlock(s,{key:2,to:"/general",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",Ks,[a.createElementVNode("img",{src:n.getIcon("user-black.svg"),class:"withBackground"},null,8,Gs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].general),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,$s)])]),_:1})),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:3,class:"settingRow",onClick:e[5]||(e[5]=c=>n.$emit("update:viewProp","AuthSecurity"))},[a.createElementVNode("div",Qs,[a.createElementVNode("img",{src:n.getIcon("shield-black.svg"),class:"withBackground"},null,8,Ws),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].security),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Ys)])])):(a.openBlock(),a.createBlock(s,{key:4,to:"/security",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",Js,[a.createElementVNode("img",{src:n.getIcon("shield-black.svg"),class:"withBackground"},null,8,Xs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].security),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Zs)])]),_:1})),a.createCommentVNode("",!0),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:6,class:"settingRow",onClick:e[6]||(e[6]=c=>n.$emit("update:viewProp","AuthBilling"))},[a.createElementVNode("div",ec,[a.createElementVNode("img",{src:n.getIcon("billing-card-black.svg"),class:"withBackground"},null,8,tc),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,nc)])])):(a.openBlock(),a.createBlock(s,{key:7,to:"/billing",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",oc,[a.createElementVNode("img",{src:n.getIcon("billing-card-black.svg"),class:"withBackground"},null,8,rc),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,ic)])]),_:1})),t.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:8,class:"settingRow",onClick:e[7]||(e[7]=(...c)=>i.logoutAccount&&i.logoutAccount(...c))},[a.createElementVNode("div",ac,[a.createElementVNode("img",{src:n.getIcon("logout-red.svg"),class:"withBackground"},null,8,sc),a.createElementVNode("h4",cc,a.toDisplayString(n.ssoLang[n.appLanguage].logout),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,lc)])])),a.createElementVNode("div",dc,[a.createElementVNode("p",uc,a.toDisplayString(n.ssoLang[n.appLanguage].version)+": "+a.toDisplayString(i.appVersion),1),a.createCommentVNode("",!0)])])])}const Fo=nt(Bs,[["render",pc]]),hc=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"})),mc={name:"AuthRegister",mixins:[Tr,Sr,ri,We],props:{isModal:{type:Boolean,required:!1,default:!1}},data(){return{usernameRegister:!1,loading:!0,submitted:!1,formButtonText:"REGISTER",username:"",email:"",password:"",revealPassword:!1,emailLogin:!0,invitationCode:"",referral:""}},mounted(){this.isModal||(this.isLoggedIn?this.$router.push(this.home):!this.$route.query.state&&!this.$route.query.oauth&&!this.$route.params.oauth&&X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.invitationCode=this.$route.query.ic||"",this.$route.query.username&&(this.usernameRegister=!0,this.emailLogin=!0,this.username=this.$route.query.username),this.$route.query.ref?this.referral=this.$route.query.ref:this.$storex.referral&&(this.referral=this.$storex.referral))},methods:{async submit(){if(this.password.length<8)return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);if(this.password.search(/[a-z]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_lowercase);if(this.password.search(/[A-Z]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_uppercase);if(this.password.search(/[0-9]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_number);if(this.submitted)return;this.submitted=!0,this.email=this.email.trim(),this.username=this.username.trim();let n={response_type:this.response_type,email:this.email,username:this.username,password:this.password,ic:this.invitationCode,captchaToken:await this.getCaptchaToken("account_verify"),ref:this.referral},e=await this.register(n);this.submitted=!1,e.data&&e.data.success&&(e.data.message==="SUCCESS_REGISTER"?(this.isModal?X.$emit("ssoEvent",{name:"toggleAddAccountModalVerify",data:!1}):this.$router.push("/verify"),this.successSnack(this.ssoLang[this.appLanguage].register_success),this.formButtonText=this.ssoLang[this.appLanguage].check_your_inbox):e.data.message==="SUCCESS_LOGIN"&&(this.display!=="popup"&&(await this.loginSetup({...e,isModal:n.isModal}),await this.getLoggedInAccounts()),await this.loginSuccess({...e,isModal:n.isModal})))},close(){X.$emit("ssoEvent",{name:"toggleAddAccountModal",data:!0})},loginAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalLogin",data:!1})}},watch:{email(n){this.$storex.verifyEmail=n},referral(n){this.$storex.referral=n}}},fc={class:"bold no-bottom center-text text-[24px]",style:{"margin-top":"63px"}},gc={class:"half-bottom small-top center-text color-black"},_c={key:0},vc={key:1},yc={class:"page-login-field half-top"},bc=["placeholder"],wc={class:"page-login-field half-top"},kc=["placeholder","disabled"],Cc={class:"page-login-field half-top half-bottom"},Ec=["type","placeholder"],Tc={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Sc={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},Ic={type:"submit",class:"button black-button google-button bg-tapni-grey pointer button-90 button-center uppercase button-rounded bold full-top"},Ac={key:0},Rc={key:1,class:"button--loading button__loader"},Nc={key:0},Pc={key:1,class:"button--loading-black button__loader"},Mc={key:0},Lc={key:1,class:"button--loading-black button__loader"},Oc={class:"close-text center-text half-top color-black"},zc={class:"",href:"https://tapni.co/policies/terms-of-service"},xc={href:"https://tapni.co/policies/privacy-policy"},Bc={key:4,class:"page-login-links"},Uc={class:"forgot center-text pointer small-top"};function Dc(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[11]||(e[11]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),autocomplete:"on",style:a.normalizeStyle(t.isModal?"max-width: 500px;":"")},[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[12]||(e[12]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h1",fc,a.toDisplayString(n.ssoLang[this.appLanguage].register),1),a.createElementVNode("p",gc,[r.usernameRegister?(a.openBlock(),a.createElementBlock("span",_c,[a.createTextVNode(" t.link/"+a.toDisplayString(r.username)+" "+a.toDisplayString(n.ssoLang[this.appLanguage].username_is_free)+" ✅ ",1),e[13]||(e[13]=a.createElementVNode("br",null,null,-1))])):a.createCommentVNode("",!0)]),r.emailLogin?(a.openBlock(),a.createElementBlock("span",vc,[a.createElementVNode("div",yc,[e[14]||(e[14]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"60%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>r.email=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,name:"email",required:""},null,40,bc),[[a.vModelText,r.email]]),e[15]||(e[15]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",wc,[e[16]||(e[16]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/user.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.username=c),onKeydown:e[4]||(e[4]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",placeholder:n.ssoLang[this.appLanguage].username,name:"username",required:"",disabled:r.usernameRegister,class:a.normalizeClass({"input-disabled":r.usernameRegister})},null,42,kc),[[a.vModelText,r.username]]),e[17]||(e[17]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",Cc,[e[18]||(e[18]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,name:"password",required:"",minlength:"8"},null,8,Ec),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[6]||(e[6]=c=>r.revealPassword=!r.revealPassword),class:"pointer"},[a.withDirectives(a.createElementVNode("img",Tc,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",Sc,null,512),[[a.vShow,r.revealPassword]])])]),a.createElementVNode("button",Ic,[r.submitted?(a.openBlock(),a.createElementBlock("span",Rc)):(a.openBlock(),a.createElementBlock("span",Ac,a.toDisplayString(r.formButtonText),1))])])):a.createCommentVNode("",!0),e[26]||(e[26]=a.createElementVNode("div",{class:"decoration decoration-lines-thin half-top half-bottom"},null,-1)),n.displayAppleLogin?(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[7]||(e[7]=(...c)=>n.appleLogin&&n.appleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[19]||(e[19]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/apple-logo.png",style:{position:"absolute","margin-left":"-11px",padding:"8px 0",height:"100%"}},null,-1)),n.appleLoad?(a.openBlock(),a.createElementBlock("span",Pc)):(a.openBlock(),a.createElementBlock("span",Nc,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Apple",1))])):a.createCommentVNode("",!0),a.createElementVNode("a",{onClick:e[8]||(e[8]=(...c)=>n.googleLogin&&n.googleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[20]||(e[20]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/g-logo.png",style:{position:"absolute","margin-left":"-9px",padding:"8px 0",height:"100%"}},null,-1)),n.googleLoad?(a.openBlock(),a.createElementBlock("span",Lc)):(a.openBlock(),a.createElementBlock("span",Mc,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Google",1))]),r.emailLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:3,onClick:e[9]||(e[9]=c=>r.emailLogin=!0),class:"button-center button button-90 google-button pointer"},[e[21]||(e[21]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",style:{position:"absolute","margin-left":"-8px",padding:"12px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Email",1)])),e[27]||(e[27]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),a.createElementVNode("p",Oc,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].terms_by_registering)+" ",1),e[22]||(e[22]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("a",zc,a.toDisplayString(n.ssoLang[this.appLanguage].terms_of_service),1),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].and)+" ",1),a.createElementVNode("a",xc,a.toDisplayString(n.ssoLang[this.appLanguage].privacy_policy),1)]),e[28]||(e[28]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:5,class:"page-login-links",onClick:e[10]||(e[10]=(...c)=>i.loginAccountModal&&i.loginAccountModal(...c))},[a.createElementVNode("a",Uc,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].or)+" ",1),e[24]||(e[24]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].sign_in_with_new),1)]),e[25]||(e[25]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Bc,[a.createVNode(s,{class:"create float-right",to:"/verify"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[23]||(e[23]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const Vo=nt(mc,[["render",Dc]]),jc=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"})),qc={name:"AuthVerify",mixins:[We],props:{isModal:{type:Boolean,required:!1,default:!1}},data(){return{loading:!0,submitted:!1,action:"verify",email:"",code:"",captcha:""}},mounted(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route&&this.init()},methods:{init(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route.hash==="#reset"&&(this.action="reset"),this.$route.query.e&&(this.email=this.$route.query.e),this.$route.query.c&&(this.code=this.$route.query.c),X.$emit("ssoEvent",{name:"setLoading",data:!1})},async submit(){if(this.code.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);this.email=this.email.trim(),this.code=this.code.trim();let n={code:this.code,email:this.email,captchaToken:await this.getCaptchaToken("account_verify")};if(this.submitted)return!1;this.submitted=!0;let e=await this.verify(n);this.submitted=!1,e&&e.data&&e.data.success===!0?(this.action==="reset"&&(this.$router.push("/reset?c="+this.code+"&e="+this.email),this.successSnack(this.ssoLang[this.appLanguage].verify_account_success)),this.action==="verify"&&(this.isModal&&(this.email="",this.code="",X.$emit("closeModal")),await this.loginSetup(e),await this.getLoggedInAccounts(),this.$storex.verifyEmail="",this.$router.push("/"+e.data.data.username+"#edit"),this.successSnack(this.ssoLang[this.appLanguage].verify_account_success2))):this.submitted=!1},registerAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalRegister",data:!1})},close(){X.$emit("ssoEvent",{name:"toggleAddAccountModal",data:!0})}},watch:{"$storage.verifyEmail"(n){n&&(this.email=n)},"route.name"(n,e){!e&&n&&this.init()},"route.query":{handler(n){this.isEmpty(n)||this.init()},deep:!0}}},Fc={class:"bold no-bottom center-text text-[24px]",style:{"margin-top":"63px"}},Vc={class:"page-login-field half-top"},Hc=["placeholder"],Kc={class:"page-login-field half-top"},Gc=["placeholder"],$c={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Qc={key:0,class:"uppercase"},Wc={key:1,class:"button--loading button__loader"},Yc={class:"close-text center-text half-top color-black"},Jc=["innerHTML"],Xc={key:1,class:"page-login-links"},Zc={key:2,class:"page-login-links"};function el(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[6]||(e[6]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),style:a.normalizeStyle(t.isModal?"max-width: 500px;":"")},[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h1",Fc,a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1),e[16]||(e[16]=a.createElementVNode("p",{class:"half-bottom half-top center-text color-black"},null,-1)),a.createElementVNode("div",Vc,[e[8]||(e[8]=a.createElementVNode("i",{style:{"padding-top":"15px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"80%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"emailInput","onUpdate:modelValue":e[1]||(e[1]=c=>r.email=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,required:""},null,40,Hc),[[a.vModelText,r.email]]),e[9]||(e[9]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",Kc,[e[10]||(e[10]=a.createElementVNode("i",{style:{"padding-top":"15px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/password2.png",class:"responsive-image",style:{width:"100%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"codeInput","onUpdate:modelValue":e[3]||(e[3]=c=>r.code=c),onKeydown:e[4]||(e[4]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"tel",placeholder:n.ssoLang[this.appLanguage].code,required:""},null,40,Gc),[[a.vModelText,r.code]]),e[11]||(e[11]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("button",$c,[r.submitted?(a.openBlock(),a.createElementBlock("span",Wc)):(a.openBlock(),a.createElementBlock("span",Qc,a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1))]),e[17]||(e[17]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),a.createElementVNode("p",Yc,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].verify_account_p1},null,8,Jc),e[12]||(e[12]=a.createElementVNode("a",{href:"mailto:support@tapni.com?subject=Email Verification"}," support@tapni.com",-1))]),e[18]||(e[18]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),t.isModal?(a.openBlock(),a.createElementBlock("div",Zc,[a.createElementVNode("a",{class:"forgot center-text pointer small-top",onClick:e[5]||(e[5]=a.withModifiers((...c)=>i.registerAccountModal&&i.registerAccountModal(...c),["prevent"]))},[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].or)+" ",1),e[14]||(e[14]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].create_new_account),1)]),e[15]||(e[15]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Xc,[a.createVNode(s,{class:"create float-right",to:"/register"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].register),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[13]||(e[13]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const Ho=nt(qc,[["render",el],["__scopeId","data-v-96f72130"]]),tl=Object.freeze(Object.defineProperty({__proto__:null,default:Ho},Symbol.toStringTag,{value:"Module"}));var ci={exports:{}};(function(n,e){(function(t,o){n.exports=o()})(window,function(){return function(t){var o={};function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=o,r.d=function(i,s,c){r.o(i,s)||Object.defineProperty(i,s,{enumerable:!0,get:c})},r.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},r.t=function(i,s){if(1&s&&(i=r(i)),8&s||4&s&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&s&&typeof i!="string")for(var l in i)r.d(c,l,(function(h){return i[h]}).bind(null,l));return c},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=12)}([function(t,o,r){var i;t.exports=(i=i||function(s,c){var l=Object.create||function(){function T(){}return function(B){var V;return T.prototype=B,V=new T,T.prototype=null,V}}(),h={},u=h.lib={},g=u.Base={extend:function(T){var B=l(this);return T&&B.mixIn(T),B.hasOwnProperty("init")&&this.init!==B.init||(B.init=function(){B.$super.init.apply(this,arguments)}),B.init.prototype=B,B.$super=this,B},create:function(){var T=this.extend();return T.init.apply(T,arguments),T},init:function(){},mixIn:function(T){for(var B in T)T.hasOwnProperty(B)&&(this[B]=T[B]);T.hasOwnProperty("toString")&&(this.toString=T.toString)},clone:function(){return this.init.prototype.extend(this)}},f=u.WordArray=g.extend({init:function(T,B){T=this.words=T||[],this.sigBytes=B??4*T.length},toString:function(T){return(T||C).stringify(this)},concat:function(T){var B=this.words,V=T.words,G=this.sigBytes,J=T.sigBytes;if(this.clamp(),G%4)for(var I=0;I<J;I++){var W=V[I>>>2]>>>24-I%4*8&255;B[G+I>>>2]|=W<<24-(G+I)%4*8}else for(I=0;I<J;I+=4)B[G+I>>>2]=V[I>>>2];return this.sigBytes+=J,this},clamp:function(){var T=this.words,B=this.sigBytes;T[B>>>2]&=4294967295<<32-B%4*8,T.length=s.ceil(B/4)},clone:function(){var T=g.clone.call(this);return T.words=this.words.slice(0),T},random:function(T){for(var B,V=[],G=function(W){W=W;var ie=987654321,ee=4294967295;return function(){var ve=((ie=36969*(65535&ie)+(ie>>16)&ee)<<16)+(W=18e3*(65535&W)+(W>>16)&ee)ⅇreturn ve/=4294967296,(ve+=.5)*(s.random()>.5?1:-1)}},J=0;J<T;J+=4){var I=G(4294967296*(B||s.random()));B=987654071*I(),V.push(4294967296*I()|0)}return new f.init(V,T)}}),w=h.enc={},C=w.Hex={stringify:function(T){for(var B=T.words,V=T.sigBytes,G=[],J=0;J<V;J++){var I=B[J>>>2]>>>24-J%4*8&255;G.push((I>>>4).toString(16)),G.push((15&I).toString(16))}return G.join("")},parse:function(T){for(var B=T.length,V=[],G=0;G<B;G+=2)V[G>>>3]|=parseInt(T.substr(G,2),16)<<24-G%8*4;return new f.init(V,B/2)}},P=w.Latin1={stringify:function(T){for(var B=T.words,V=T.sigBytes,G=[],J=0;J<V;J++){var I=B[J>>>2]>>>24-J%4*8&255;G.push(String.fromCharCode(I))}return G.join("")},parse:function(T){for(var B=T.length,V=[],G=0;G<B;G++)V[G>>>2]|=(255&T.charCodeAt(G))<<24-G%4*8;return new f.init(V,B)}},M=w.Utf8={stringify:function(T){try{return decodeURIComponent(escape(P.stringify(T)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(T){return P.parse(unescape(encodeURIComponent(T)))}},j=u.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(T){typeof T=="string"&&(T=M.parse(T)),this._data.concat(T),this._nDataBytes+=T.sigBytes},_process:function(T){var B=this._data,V=B.words,G=B.sigBytes,J=this.blockSize,I=G/(4*J),W=(I=T?s.ceil(I):s.max((0|I)-this._minBufferSize,0))*J,ie=s.min(4*W,G);if(W){for(var ee=0;ee<W;ee+=J)this._doProcessBlock(V,ee);var ve=V.splice(0,W);B.sigBytes-=ie}return new f.init(ve,ie)},clone:function(){var T=g.clone.call(this);return T._data=this._data.clone(),T},_minBufferSize:0}),N=(u.Hasher=j.extend({cfg:g.extend(),init:function(T){this.cfg=this.cfg.extend(T),this.reset()},reset:function(){j.reset.call(this),this._doReset()},update:function(T){return this._append(T),this._process(),this},finalize:function(T){return T&&this._append(T),this._doFinalize()},blockSize:16,_createHelper:function(T){return function(B,V){return new T.init(V).finalize(B)}},_createHmacHelper:function(T){return function(B,V){return new N.HMAC.init(T,V).finalize(B)}}}),h.algo={});return h}(Math),i)},function(t,o,r){var i,s,c,l;t.exports=(i=r(0),c=(s=i).lib.Base,l=s.enc.Utf8,void(s.algo.HMAC=c.extend({init:function(h,u){h=this._hasher=new h.init,typeof u=="string"&&(u=l.parse(u));var g=h.blockSize,f=4*g;u.sigBytes>f&&(u=h.finalize(u)),u.clamp();for(var w=this._oKey=u.clone(),C=this._iKey=u.clone(),P=w.words,M=C.words,j=0;j<g;j++)P[j]^=1549556828,M[j]^=909522486;w.sigBytes=C.sigBytes=f,this.reset()},reset:function(){var h=this._hasher;h.reset(),h.update(this._iKey)},update:function(h){return this._hasher.update(h),this},finalize:function(h){var u=this._hasher,g=u.finalize(h);return u.reset(),u.finalize(this._oKey.clone().concat(g))}})))},function(t,o,r){var i;t.exports=(i=r(0),i.enc.Hex)},function(t,o,r){var i,s,c,l,h,u;t.exports=(u=r(0),s=(i=u).lib,c=s.Base,l=s.WordArray,(h=i.x64={}).Word=c.extend({init:function(g,f){this.high=g,this.low=f}}),h.WordArray=c.extend({init:function(g,f){g=this.words=g||[],this.sigBytes=f??8*g.length},toX32:function(){for(var g=this.words,f=g.length,w=[],C=0;C<f;C++){var P=g[C];w.push(P.high),w.push(P.low)}return l.create(w,this.sigBytes)},clone:function(){for(var g=c.clone.call(this),f=g.words=this.words.slice(0),w=f.length,C=0;C<w;C++)f[C]=f[C].clone();return g}}),u)},function(t,o,r){var i;t.exports=(i=r(0),r(9),r(1),i.HmacSHA1)},function(t,o,r){var i;t.exports=(i=r(0),r(10),r(1),i.HmacSHA256)},function(t,o,r){var i;t.exports=(i=r(0),r(3),r(11),r(1),i.HmacSHA512)},function(t,o){function r(i,s){var c=i.indexOf(s);if(c===-1)throw new Error("Invalid character found: "+s);return c}t.exports=function(i,s){var c;switch(s){case"RFC3548":case"RFC4648":c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i=i.replace(/=+$/,"");break;case"RFC4648-HEX":c="0123456789ABCDEFGHIJKLMNOPQRSTUV",i=i.replace(/=+$/,"");break;case"Crockford":c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=i.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1");break;default:throw new Error("Unknown base32 variant: "+s)}for(var l=i.length,h=0,u=0,g=0,f=new Uint8Array(5*l/8|0),w=0;w<l;w++)u=u<<5|r(c,i[w]),(h+=5)>=8&&(f[g++]=u>>>h-8&255,h-=8);return f.buffer}},function(t,o){t.exports=function(r,i,s){var c,l;switch(s=s||{},i){case"RFC3548":case"RFC4648":c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l=!0;break;case"RFC4648-HEX":c="0123456789ABCDEFGHIJKLMNOPQRSTUV",l=!0;break;case"Crockford":c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",l=!1;break;default:throw new Error("Unknown base32 variant: "+i)}for(var h=s.padding!==void 0?s.padding:l,u=r.byteLength,g=new Uint8Array(r),f=0,w=0,C="",P=0;P<u;P++)for(w=w<<8|g[P],f+=8;f>=5;)C+=c[w>>>f-5&31],f-=5;if(f>0&&(C+=c[w<<5-f&31]),h)for(;C.length%8!=0;)C+="=";return C}},function(t,o,r){var i,s,c,l,h,u,g,f;t.exports=(f=r(0),s=(i=f).lib,c=s.WordArray,l=s.Hasher,h=i.algo,u=[],g=h.SHA1=l.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,C){for(var P=this._hash.words,M=P[0],j=P[1],N=P[2],T=P[3],B=P[4],V=0;V<80;V++){if(V<16)u[V]=0|w[C+V];else{var G=u[V-3]^u[V-8]^u[V-14]^u[V-16];u[V]=G<<1|G>>>31}var J=(M<<5|M>>>27)+B+u[V];J+=V<20?1518500249+(j&N|~j&T):V<40?1859775393+(j^N^T):V<60?(j&N|j&T|N&T)-1894007588:(j^N^T)-899497514,B=T,T=N,N=j<<30|j>>>2,j=M,M=J}P[0]=P[0]+M|0,P[1]=P[1]+j|0,P[2]=P[2]+N|0,P[3]=P[3]+T|0,P[4]=P[4]+B|0},_doFinalize:function(){var w=this._data,C=w.words,P=8*this._nDataBytes,M=8*w.sigBytes;return C[M>>>5]|=128<<24-M%32,C[14+(M+64>>>9<<4)]=Math.floor(P/4294967296),C[15+(M+64>>>9<<4)]=P,w.sigBytes=4*C.length,this._process(),this._hash},clone:function(){var w=l.clone.call(this);return w._hash=this._hash.clone(),w}}),i.SHA1=l._createHelper(g),i.HmacSHA1=l._createHmacHelper(g),f.SHA1)},function(t,o,r){var i;t.exports=(i=r(0),function(s){var c=i,l=c.lib,h=l.WordArray,u=l.Hasher,g=c.algo,f=[],w=[];(function(){function M(B){for(var V=s.sqrt(B),G=2;G<=V;G++)if(!(B%G))return!1;return!0}function j(B){return 4294967296*(B-(0|B))|0}for(var N=2,T=0;T<64;)M(N)&&(T<8&&(f[T]=j(s.pow(N,.5))),w[T]=j(s.pow(N,1/3)),T++),N++})();var C=[],P=g.SHA256=u.extend({_doReset:function(){this._hash=new h.init(f.slice(0))},_doProcessBlock:function(M,j){for(var N=this._hash.words,T=N[0],B=N[1],V=N[2],G=N[3],J=N[4],I=N[5],W=N[6],ie=N[7],ee=0;ee<64;ee++){if(ee<16)C[ee]=0|M[j+ee];else{var ve=C[ee-15],Re=(ve<<25|ve>>>7)^(ve<<14|ve>>>18)^ve>>>3,le=C[ee-2],Me=(le<<15|le>>>17)^(le<<13|le>>>19)^le>>>10;C[ee]=Re+C[ee-7]+Me+C[ee-16]}var yt=T&B^T&V^B&V,Pt=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),at=ie+((J<<26|J>>>6)^(J<<21|J>>>11)^(J<<7|J>>>25))+(J&I^~J&W)+w[ee]+C[ee];ie=W,W=I,I=J,J=G+at|0,G=V,V=B,B=T,T=at+(Pt+yt)|0}N[0]=N[0]+T|0,N[1]=N[1]+B|0,N[2]=N[2]+V|0,N[3]=N[3]+G|0,N[4]=N[4]+J|0,N[5]=N[5]+I|0,N[6]=N[6]+W|0,N[7]=N[7]+ie|0},_doFinalize:function(){var M=this._data,j=M.words,N=8*this._nDataBytes,T=8*M.sigBytes;return j[T>>>5]|=128<<24-T%32,j[14+(T+64>>>9<<4)]=s.floor(N/4294967296),j[15+(T+64>>>9<<4)]=N,M.sigBytes=4*j.length,this._process(),this._hash},clone:function(){var M=u.clone.call(this);return M._hash=this._hash.clone(),M}});c.SHA256=u._createHelper(P),c.HmacSHA256=u._createHmacHelper(P)}(Math),i.SHA256)},function(t,o,r){var i;t.exports=(i=r(0),r(3),function(){var s=i,c=s.lib.Hasher,l=s.x64,h=l.Word,u=l.WordArray,g=s.algo;function f(){return h.create.apply(h,arguments)}var w=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],C=[];(function(){for(var M=0;M<80;M++)C[M]=f()})();var P=g.SHA512=c.extend({_doReset:function(){this._hash=new u.init([new h.init(1779033703,4089235720),new h.init(3144134277,2227873595),new h.init(1013904242,4271175723),new h.init(2773480762,1595750129),new h.init(1359893119,2917565137),new h.init(2600822924,725511199),new h.init(528734635,4215389547),new h.init(1541459225,327033209)])},_doProcessBlock:function(M,j){for(var N=this._hash.words,T=N[0],B=N[1],V=N[2],G=N[3],J=N[4],I=N[5],W=N[6],ie=N[7],ee=T.high,ve=T.low,Re=B.high,le=B.low,Me=V.high,yt=V.low,Pt=G.high,at=G.low,dn=J.high,Jt=J.low,un=I.high,Xt=I.low,Sn=W.high,Ce=W.low,Se=ie.high,Kt=ie.low,De=ee,Le=ve,Mt=Re,bt=le,Qe=Me,st=yt,Gt=Pt,Lt=at,Ge=dn,Ie=Jt,ct=un,Ot=Xt,zt=Sn,ht=Ce,pn=Se,wt=Kt,je=0;je<80;je++){var mt=C[je];if(je<16)var Oe=mt.high=0|M[j+2*je],lt=mt.low=0|M[j+2*je+1];else{var hn=C[je-15],qe=hn.high,xt=hn.low,m=(qe>>>1|xt<<31)^(qe>>>8|xt<<24)^qe>>>7,d=(xt>>>1|qe<<31)^(xt>>>8|qe<<24)^(xt>>>7|qe<<25),p=C[je-2],_=p.high,k=p.low,S=(_>>>19|k<<13)^(_<<3|k>>>29)^_>>>6,L=(k>>>19|_<<13)^(k<<3|_>>>29)^(k>>>6|_<<26),se=C[je-7],ye=se.high,_e=se.low,be=C[je-16],me=be.high,lo=be.low;Oe=(Oe=(Oe=m+ye+((lt=d+_e)>>>0<d>>>0?1:0))+S+((lt+=L)>>>0<L>>>0?1:0))+me+((lt+=lo)>>>0<lo>>>0?1:0),mt.high=Oe,mt.low=lt}var kt,Jo=Ge&ct^~Ge&zt,uo=Ie&Ot^~Ie&ht,Xo=De&Mt^De&Qe^Mt&Qe,Zo=Le&bt^Le&st^bt&st,po=(De>>>28|Le<<4)^(De<<30|Le>>>2)^(De<<25|Le>>>7),ho=(Le>>>28|De<<4)^(Le<<30|De>>>2)^(Le<<25|De>>>7),er=(Ge>>>14|Ie<<18)^(Ge>>>18|Ie<<14)^(Ge<<23|Ie>>>9),tr=(Ie>>>14|Ge<<18)^(Ie>>>18|Ge<<14)^(Ie<<23|Ge>>>9),v=w[je],y=v.high,E=v.low,A=pn+er+((kt=wt+tr)>>>0<wt>>>0?1:0),O=ho+Zo;pn=zt,wt=ht,zt=ct,ht=Ot,ct=Ge,Ot=Ie,Ge=Gt+(A=(A=(A=A+Jo+((kt+=uo)>>>0<uo>>>0?1:0))+y+((kt+=E)>>>0<E>>>0?1:0))+Oe+((kt+=lt)>>>0<lt>>>0?1:0))+((Ie=Lt+kt|0)>>>0<Lt>>>0?1:0)|0,Gt=Qe,Lt=st,Qe=Mt,st=bt,Mt=De,bt=Le,De=A+(po+Xo+(O>>>0<ho>>>0?1:0))+((Le=kt+O|0)>>>0<kt>>>0?1:0)|0}ve=T.low=ve+Le,T.high=ee+De+(ve>>>0<Le>>>0?1:0),le=B.low=le+bt,B.high=Re+Mt+(le>>>0<bt>>>0?1:0),yt=V.low=yt+st,V.high=Me+Qe+(yt>>>0<st>>>0?1:0),at=G.low=at+Lt,G.high=Pt+Gt+(at>>>0<Lt>>>0?1:0),Jt=J.low=Jt+Ie,J.high=dn+Ge+(Jt>>>0<Ie>>>0?1:0),Xt=I.low=Xt+Ot,I.high=un+ct+(Xt>>>0<Ot>>>0?1:0),Ce=W.low=Ce+ht,W.high=Sn+zt+(Ce>>>0<ht>>>0?1:0),Kt=ie.low=Kt+wt,ie.high=Se+pn+(Kt>>>0<wt>>>0?1:0)},_doFinalize:function(){var M=this._data,j=M.words,N=8*this._nDataBytes,T=8*M.sigBytes;return j[T>>>5]|=128<<24-T%32,j[30+(T+128>>>10<<5)]=Math.floor(N/4294967296),j[31+(T+128>>>10<<5)]=N,M.sigBytes=4*j.length,this._process(),this._hash.toX32()},clone:function(){var M=c.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:32});s.SHA512=c._createHelper(P),s.HmacSHA512=c._createHmacHelper(P)}(),i.SHA512)},function(t,o,r){r.r(o);var i,s=r(0),c=r.n(s),l=r(4),h=r.n(l),u=r(5),g=r.n(u),f=r(6),w=r.n(f),C=r(2),P=r.n(C);function M(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function j(v){for(var y=1;y<arguments.length;y++){var E=arguments[y]!=null?arguments[y]:{};y%2?M(Object(E),!0).forEach(function(A){N(v,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(E)):M(Object(E)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(E,A))})}return v}function N(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function T(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function B(v){return Object.keys(v).map(function(y){return v[y]})}(function(v){v.SHA1="sha1",v.SHA256="sha256",v.SHA512="sha512"})(i||(i={}));var V,G=B(i);(function(v){v.ASCII="ascii",v.BASE64="base64",v.HEX="hex",v.LATIN1="latin1",v.UTF8="utf8"})(V||(V={}));var J,I=B(V);(function(v){v.HOTP="hotp",v.TOTP="totp"})(J||(J={}));var W=B(J),ie=function(){throw new Error("Please provide an options.createDigest implementation.")};function ee(v){return/^(\d+)$/.test(v)}function ve(v,y,E){if(v.length>=y)return v;var A=Array(y+1).join(E);return"".concat(A).concat(v).slice(-1*y)}function Re(v){var y="otpauth://".concat(v.type,"/{labelPrefix}:{accountName}?secret={secret}{query}"),E=[];if(W.indexOf(v.type)<0)throw new Error("Expecting options.type to be one of ".concat(W.join(", "),". Received ").concat(v.type,"."));if(v.type==="hotp"){if(v.counter==null||typeof v.counter!="number")throw new Error('Expecting options.counter to be a number when options.type is "hotp".');E.push("&counter=".concat(v.counter))}return v.type==="totp"&&v.step&&E.push("&period=".concat(v.step)),v.digits&&E.push("&digits=".concat(v.digits)),v.algorithm&&E.push("&algorithm=".concat(v.algorithm.toUpperCase())),v.issuer&&E.push("&issuer=".concat(encodeURIComponent(v.issuer))),y.replace("{labelPrefix}",encodeURIComponent(v.issuer||v.accountName)).replace("{accountName}",encodeURIComponent(v.accountName)).replace("{secret}",v.secret).replace("{query}",E.join(""))}function le(v){return(le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function Me(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function yt(v,y){return!y||le(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function Pt(v){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function at(v,y){return(at=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function dn(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function Jt(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function un(v){if(typeof v.createDigest!="function")throw new Error("Expecting options.createDigest to be a function.");if(typeof v.createHmacKey!="function")throw new Error("Expecting options.createHmacKey to be a function.");if(typeof v.digits!="number")throw new Error("Expecting options.digits to be a number.");if(!v.algorithm||G.indexOf(v.algorithm)<0)throw new Error("Expecting options.algorithm to be one of ".concat(G.join(", "),". Received ").concat(v.algorithm,"."));if(!v.encoding||I.indexOf(v.encoding)<0)throw new Error("Expecting options.encoding to be one of ".concat(I.join(", "),". Received ").concat(v.encoding,"."))}var Xt=function(v,y,E){return nn.from(y,E).toString("hex")};function Sn(v){var y=function(E){for(var A=1;A<arguments.length;A++){var O=arguments[A]!=null?arguments[A]:{};A%2?dn(Object(O),!0).forEach(function(q){Jt(E,q,O[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):dn(Object(O)).forEach(function(q){Object.defineProperty(E,q,Object.getOwnPropertyDescriptor(O,q))})}return E}({},{algorithm:i.SHA1,createHmacKey:Xt,createDigest:ie,digits:6,encoding:V.ASCII},{},v);return un(y),Object.freeze(y)}function Ce(v,y,E){var A=function(q){return ve(q.toString(16),16,"0")}(y),O=E.createHmacKey(E.algorithm,v,E.encoding);return E.createDigest(E.algorithm,O,A)}function Se(v,y,E){return function(A,O){var q=nn.from(A,"hex"),pe=15&q[q.length-1],et=((127&q[pe])<<24|(255&q[pe+1])<<16|(255&q[pe+2])<<8|255&q[pe+3])%Math.pow(10,O);return ve(String(et),O,"0")}(E.digest||Ce(v,y,E),E.digits)}function Kt(v,y,E,A,O){return Re({algorithm:O.algorithm,digits:O.digits,type:J.HOTP,accountName:v,counter:A,issuer:y,secret:E})}var De=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),yt(this,Pt(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&at(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return Sn(this.options)}},{key:"generate",value:function(O,q){return Se(O,q,this.allOptions())}},{key:"check",value:function(O,q,pe){return function(et,Bt,Zt,nr){return!!ee(et)&&et===Se(Bt,Zt,nr)}(O,q,pe,this.allOptions())}},{key:"verify",value:function(O){if(le(O)!=="object")throw new Error("Expecting argument 0 of verify to be an object");return this.check(O.token,O.secret,O.counter)}},{key:"keyuri",value:function(O,q,pe,et){return Kt(O,q,pe,et,this.allOptions())}}])&&Me(E.prototype,A),y}(function(){function v(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")})(this,v),this._defaultOptions=Object.freeze(j({},A)),this._options=Object.freeze({})}var y,E;return y=v,(E=[{key:"create",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new v(A)}},{key:"clone",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=this.create(j({},this._defaultOptions,{},A));return O.options=this._options,O}},{key:"allOptions",value:function(){return this.options}},{key:"resetOptions",value:function(){this._options=Object.freeze({})}},{key:"options",get:function(){return Object.freeze(j({},this._defaultOptions,{},this._options))},set:function(A){this._options=Object.freeze(j({},this._options,{},A))}}])&&T(y.prototype,E),v}());function Le(v){return(Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function Mt(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function bt(v,y){return!y||Le(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function Qe(v){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function st(v,y){return(st=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function Gt(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function Lt(v){for(var y=1;y<arguments.length;y++){var E=arguments[y]!=null?arguments[y]:{};y%2?Gt(Object(E),!0).forEach(function(A){Ge(v,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(E)):Gt(Object(E)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(E,A))})}return v}function Ge(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function Ie(v,y){return function(E){if(Array.isArray(E))return E}(v)||function(E,A){if(Symbol.iterator in Object(E)||Object.prototype.toString.call(E)==="[object Arguments]"){var O=[],q=!0,pe=!1,et=void 0;try{for(var Bt,Zt=E[Symbol.iterator]();!(q=(Bt=Zt.next()).done)&&(O.push(Bt.value),!A||O.length!==A);q=!0);}catch(nr){pe=!0,et=nr}finally{try{q||Zt.return==null||Zt.return()}finally{if(pe)throw et}}return O}}(v,y)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ct(v){if(typeof v=="number")return[Math.abs(v),Math.abs(v)];if(Array.isArray(v)){var y=Ie(v,2),E=y[0],A=y[1];if(typeof E=="number"&&typeof A=="number")return[Math.abs(E),Math.abs(A)]}throw new Error("Expecting options.window to be an number or [number, number].")}function Ot(v){if(un(v),ct(v.window),typeof v.epoch!="number")throw new Error("Expecting options.epoch to be a number.");if(typeof v.step!="number")throw new Error("Expecting options.step to be a number.")}var zt=function(v,y,E){var A=v.length,O=nn.from(v,y).toString("hex");if(A<E){var q=new Array(E-A+1).join(O);return nn.from(q,"hex").slice(0,E).toString("hex")}return O},ht=function(v,y,E){switch(v){case i.SHA1:return zt(y,E,20);case i.SHA256:return zt(y,E,32);case i.SHA512:return zt(y,E,64);default:throw new Error("Expecting algorithm to be one of ".concat(G.join(", "),". Received ").concat(v,"."))}};function pn(v){var y=Lt({},{algorithm:i.SHA1,createDigest:ie,createHmacKey:ht,digits:6,encoding:V.ASCII,epoch:Date.now(),step:30,window:0},{},v);return Ot(y),Object.freeze(y)}function wt(v,y){var E,A;return Se(v,(E=y.epoch,A=y.step,Math.floor(E/A/1e3)),y)}function je(v,y,E,A){var O=[];if(A===0)return O;for(var q=1;q<=A;q++){var pe=y*q*E;O.push(v+pe)}return O}function mt(v,y,E){return!!ee(v)&&v===wt(y,E)}function Oe(v,y,E,A){var O=null;return v.some(function(q,pe){return!!mt(y,E,Lt({},A,{epoch:q}))&&(O=pe+1,!0)}),O}function lt(v,y,E){if(mt(v,y,E))return 0;var A,O,q,pe,et,Bt=(A=E.epoch,O=E.step,q=E.window,pe=ct(q),{current:A,past:je(A,-1,et=1e3*O,pe[0]),future:je(A,1,et,pe[1])}),Zt=Oe(Bt.past,v,y,E);return Zt!==null?-1*Zt:Oe(Bt.future,v,y,E)}function hn(v,y){return Math.floor(v/1e3)%y}function qe(v,y,E,A){return Re({algorithm:A.algorithm,digits:A.digits,step:A.step,type:J.TOTP,accountName:v,issuer:y,secret:E})}var xt=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),bt(this,Qe(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&st(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return pn(this.options)}},{key:"generate",value:function(O){return wt(O,this.allOptions())}},{key:"checkDelta",value:function(O,q){return lt(O,q,this.allOptions())}},{key:"check",value:function(O,q){return typeof this.checkDelta(O,q)=="number"}},{key:"verify",value:function(O){if(Le(O)!=="object")throw new Error("Expecting argument 0 of verify to be an object");return this.check(O.token,O.secret)}},{key:"timeRemaining",value:function(){var O,q,pe=this.allOptions();return O=pe.epoch,(q=pe.step)-hn(O,q)}},{key:"timeUsed",value:function(){var O=this.allOptions();return hn(O.epoch,O.step)}},{key:"keyuri",value:function(O,q,pe){return qe(O,q,pe,this.allOptions())}}])&&Mt(E.prototype,A),y}(De);function m(v){return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function d(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function p(v,y){return!y||m(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function _(v){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function k(v,y){return(k=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function S(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function L(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function se(v){var y=function(E){for(var A=1;A<arguments.length;A++){var O=arguments[A]!=null?arguments[A]:{};A%2?S(Object(O),!0).forEach(function(q){L(E,q,O[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):S(Object(O)).forEach(function(q){Object.defineProperty(E,q,Object.getOwnPropertyDescriptor(O,q))})}return E}({},{algorithm:i.SHA1,createDigest:ie,createHmacKey:ht,digits:6,encoding:V.HEX,epoch:Date.now(),step:30,window:0},{},v);return function(E){if(Ot(E),typeof E.keyDecoder!="function")throw new Error("Expecting options.keyDecoder to be a function.");if(E.keyEncoder&&typeof E.keyEncoder!="function")throw new Error("Expecting options.keyEncoder to be a function.")}(y),Object.freeze(y)}function ye(v,y){return y.keyEncoder(v,y.encoding)}function _e(v,y){return y.keyDecoder(v,y.encoding)}function be(v,y){return ye(y.createRandomBytes(v,y.encoding),y)}var me=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),p(this,_(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&k(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return se(this.options)}},{key:"generate",value:function(O){return function(q,pe){return wt(_e(q,pe),pe)}(O,this.allOptions())}},{key:"checkDelta",value:function(O,q){return function(pe,et,Bt){return lt(pe,_e(et,Bt),Bt)}(O,q,this.allOptions())}},{key:"encode",value:function(O){return ye(O,this.allOptions())}},{key:"decode",value:function(O){return _e(O,this.allOptions())}},{key:"generateSecret",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;return be(O,this.allOptions())}}])&&d(E.prototype,A),y}(xt),lo=c.a.lib.WordArray,kt=function(v,y,E){var A=function(pe){switch(pe){case i.SHA1:return h.a;case i.SHA256:return g.a;case i.SHA512:return w.a;default:throw new Error("Expecting argument 0 to be one of ".concat(G.join(", "),". Received ").concat(pe,"."))}}(v),O=P.a.parse(E),q=P.a.parse(y);return String(A(O,q))},Jo=r(7),uo=r.n(Jo),Xo=r(8),Zo=r.n(Xo);function po(v){return(po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}r.d(o,"hotp",function(){return ho}),r.d(o,"totp",function(){return er}),r.d(o,"authenticator",function(){return tr}),(typeof window>"u"?"undefined":po(window))==="object"&&window.Buffer===void 0&&(window.Buffer=buffer.Buffer);var ho=new De({createDigest:kt}),er=new xt({createDigest:kt}),tr=new me({createDigest:kt,createRandomBytes:function(v,y){var E=lo.random(v);return nn.from(E.toString(),"hex").toString(y)},keyDecoder:function(v,y){var E=uo()(v.toUpperCase(),"RFC4648");return nn.from(E).toString(y)},keyEncoder:function(v,y){return Zo()(nn.from(v,y),"RFC4648",{padding:!1})}})}])})})(ci);var li=ci.exports;const nl={name:"AuthSecurity",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{accountDelete:!1,changePassword:!1,password:"",passwordRepeat:"",currentPassword:"",otpSecret:null,mfaEnable:!1,qrCodeHash:null,qrCodeRefreshInterval:null,poolingInterval:null,loading:!1}},async mounted(){this.isLoggedIn||this.$router.push("/login"),this.renderView==="AuthSecurity"&&(await this.getAccountSettings(),this.generateOTPQrCode())},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},async deleteAccountSubmit(){await this.deleteAccount()===!0&&(this.successSnack(this.ssoLang[this.appLanguage].profile_delete_account_success),setTimeout(this.$store.dispatch("logout"),1e3))},generateOTPQrCode(){const n=this.account.email;if(this.account.mfaEnabled)this.mfaEnable=!0;else{const e="Tapni",t=li.authenticator.generateSecret();this.otpSecret=t;const o=li.authenticator.keyuri(n,e,t);new ir({width:200,height:200,data:o}).append(document.getElementById("qrCodeContainer"))}},async cancelMFA(){X.$emit("ssoEvent",{name:"mfaCancel",data:!0})},async validateMFA(){if(!this.otp||this.otp.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);this.loading=!0;let n={otpToken:this.otp,otpSecret:this.otpSecret,enable:this.mfaEnable};this.mfaEnable||delete n.otpSecret;const[e,t]=await fe(Fe.setMfa(n,this.$storex));if(e)return X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(e);t.data.success&&(this.getAccountSettings(),this.successSnack(t.data.message)),this.loading=!1},async submitChangePassword(){if(this.password.length<8)return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);if(this.password!==this.passwordRepeat)return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);await this.newPassword({currentPassword:this.currentPassword,password:this.password,passwordRepeat:this.passwordRepeat})===!0&&(this.successSnack(this.ssoLang[this.appLanguage].password_change_success),this.changePassword=!1)}}},ol={class:"page-login content-boxed content-boxed-padding"},rl={class:"subheaderContainer full-top"},il=["src"],al=["src"],sl={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},cl={class:"container center-text"},ll={class:"full-top"},dl={class:"settingRow"},ul={class:"firstRow"},pl={class:"ios-switch",style:{display:"inline-block"}},hl={class:"center-text half-top"},ml={class:"firstRow"},fl={class:"center-text no-margin"},gl={class:"margin-center left-text padding-left small-top"},_l={class:""},vl=["placeholder"],yl=["innerHTML"],bl={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},wl={key:0},kl={key:1,class:"button--loading button__loader"},Cl={class:"close-text center-text half-top"},El=["innerHTML"],Tl={key:1,class:"margin-center small-top",style:{width:"100%"}},Sl={class:"left-text"},Il={key:0},Al={key:1},Rl={class:"firstRow"},Nl=["src"],Pl=["placeholder"],Ml={class:"small-text small-top-padding small-bottom"},Ll=["placeholder"],Ol={class:"small-text small-top-padding small-bottom"},zl=["placeholder"],xl={class:"small-text small-top-padding small-bottom"},Bl={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},Ul={key:0},Dl={key:1,class:"button--loading button__loader"},jl={class:"center-text font-13 half-top half-bottom"},ql=["innerHTML"],Fl={class:"firstRow"},Vl={class:"red-text"},Hl=["src"],Kl={class:"center-text half-top"},Gl={class:"settingRow full-top"},$l={class:"firstRow"},Ql={class:"ios-switch",style:{display:"inline-block"}},Wl={class:"left-text small-top"},Yl={type:"submit",class:"button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},Jl={key:0},Xl={key:1,class:"button--loading button__loader"},Zl={class:"small-bottom red-text"};function ed(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",ol,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[15]||(e[15]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",rl,[n.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=c=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,il)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,al)]),_:1})),a.createElementVNode("h2",sl,a.toDisplayString(n.ssoLang[n.appLanguage].security),1)]),a.createElementVNode("div",cl,[a.createElementVNode("p",null,a.toDisplayString(n.ssoLang[n.appLanguage].security_p),1),a.createElementVNode("div",ll,[a.createElementVNode("div",dl,[a.createElementVNode("div",ul,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth),1),a.createElementVNode("div",pl,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",name:"ios-switch",class:"ios-switch-checkbox",id:"mfa-open-switch","onUpdate:modelValue":e[2]||(e[2]=c=>r.mfaEnable=c)},null,512),[[a.vModelCheckbox,r.mfaEnable]]),e[16]||(e[16]=a.createElementVNode("label",{class:"ios-switch-label",for:"mfa-open-switch"},null,-1))])])]),a.withDirectives(a.createElementVNode("div",hl,[e[17]||(e[17]=a.createElementVNode("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1)),e[18]||(e[18]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",{class:"settingRow",onClick:e[3]||(e[3]=c=>n.copy(r.otpSecret))},[a.createElementVNode("div",ml,[a.createElementVNode("h4",fl,a.toDisplayString(r.otpSecret),1)])]),a.createElementVNode("div",gl,[a.createElementVNode("p",_l,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_qr),1)])],512),[[a.vShow,r.mfaEnable&&!n.account.mfaEnabled]]),n.account.mfaEnabled!==r.mfaEnable?(a.openBlock(),a.createElementBlock("form",{key:0,onSubmit:e[6]||(e[6]=a.withModifiers((...c)=>i.validateMFA&&i.validateMFA(...c),["prevent"])),class:"half-top"},[a.createElementVNode("div",null,[a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[4]||(e[4]=c=>n.otp=c),placeholder:n.ssoLang[n.appLanguage].otp_code,class:"edit-input h-40 lh-40",style:{margin:"0 auto",height:"25px",width:"100%"},required:"",onKeydown:e[5]||(e[5]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"]))},null,40,vl),[[a.vModelText,n.otp]]),a.createElementVNode("p",{class:"small-top full-bottom padding-left left-text",innerHTML:n.ssoLang[n.appLanguage].otp_subtitle},null,8,yl)]),a.createElementVNode("button",bl,[r.loading?(a.openBlock(),a.createElementBlock("span",kl)):(a.openBlock(),a.createElementBlock("span",wl,a.toDisplayString(n.ssoLang[n.appLanguage].continue),1))]),a.createElementVNode("p",Cl,[a.createElementVNode("span",{innerHTML:n.ssoLang[n.appLanguage].otp_p1},null,8,El),e[19]||(e[19]=a.createElementVNode("a",{href:"mailto:support@tapni.com?subject=MFA Authentication Problem"}," support@tapni.com",-1))])],32)):(a.openBlock(),a.createElementBlock("div",Tl,[a.createElementVNode("div",Sl,[r.mfaEnable?(a.openBlock(),a.createElementBlock("p",Il,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_enabled),1)):(a.openBlock(),a.createElementBlock("p",Al,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_p),1))])])),a.createElementVNode("div",{class:"settingRow full-top",onClick:e[7]||(e[7]=c=>r.changePassword=!r.changePassword)},[a.createElementVNode("div",Rl,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].change_password),1),a.createElementVNode("img",{class:a.normalizeClass(["transition-icon",{"rotate-icon":!!r.changePassword}]),src:n.getIcon("arrow-gray-down.svg")},null,10,Nl)])]),a.withDirectives(a.createElementVNode("form",{onSubmit:e[11]||(e[11]=a.withModifiers((...c)=>i.submitChangePassword&&i.submitChangePassword(...c),["prevent"])),class:"center-text half-top"},[a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[8]||(e[8]=c=>r.currentPassword=c),placeholder:n.ssoLang[n.appLanguage].password_current_p,class:"edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,Pl),[[a.vModelText,r.currentPassword]]),a.createElementVNode("p",Ml,a.toDisplayString(n.ssoLang[n.appLanguage].password_current),1),a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[9]||(e[9]=c=>r.password=c),placeholder:n.ssoLang[n.appLanguage].password_new_p,class:"bg-white edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,Ll),[[a.vModelText,r.password]]),a.createElementVNode("p",Ol,a.toDisplayString(n.ssoLang[n.appLanguage].password_new),1),a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[10]||(e[10]=c=>r.passwordRepeat=c),placeholder:n.ssoLang[n.appLanguage].password_new_repeat_p,class:"edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,zl),[[a.vModelText,r.passwordRepeat]]),a.createElementVNode("p",xl,a.toDisplayString(n.ssoLang[n.appLanguage].password_new_repeat),1),a.createElementVNode("button",Bl,[r.loading?(a.openBlock(),a.createElementBlock("span",Dl)):(a.openBlock(),a.createElementBlock("span",Ul,a.toDisplayString(n.ssoLang[n.appLanguage].password_update),1))]),a.createElementVNode("p",jl,[a.createElementVNode("span",{innerHTML:n.ssoLang[n.appLanguage].password_reset},null,8,ql),a.createVNode(s,{to:"/reset",exact:"",class:"color-black"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].by_clicking_here),1)]),_:1})])],544),[[a.vShow,r.changePassword]]),a.createElementVNode("div",{class:"settingRow full-top",onClick:e[12]||(e[12]=c=>r.accountDelete=!r.accountDelete)},[a.createElementVNode("div",Fl,[a.createElementVNode("h4",Vl,a.toDisplayString(n.ssoLang[n.appLanguage].delete_account),1),a.createElementVNode("img",{class:a.normalizeClass(["transition-icon",{"rotate-icon":!!r.accountDelete}]),src:n.getIcon("arrow-gray-down.svg")},null,10,Hl)])]),a.withDirectives(a.createElementVNode("div",Kl,[a.createElementVNode("div",Gl,[a.createElementVNode("div",$l,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].active_account),1),a.createElementVNode("div",Ql,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",name:"ios-switch",class:"ios-switch-checkbox",id:"active-open-switch","onUpdate:modelValue":e[13]||(e[13]=c=>n.account.is_active=c)},null,512),[[a.vModelCheckbox,n.account.is_active]]),e[20]||(e[20]=a.createElementVNode("label",{class:"ios-switch-label",for:"active-open-switch"},null,-1))])])]),a.createElementVNode("p",Wl,a.toDisplayString(n.ssoLang[n.appLanguage].active_account_p),1),a.createElementVNode("form",{onSubmit:e[14]||(e[14]=a.withModifiers((...c)=>i.deleteAccountSubmit&&i.deleteAccountSubmit(...c),["prevent"]))},[a.createElementVNode("button",Yl,[r.loading?(a.openBlock(),a.createElementBlock("span",Xl)):(a.openBlock(),a.createElementBlock("span",Jl,a.toDisplayString(n.ssoLang[n.appLanguage].permanent_delete),1))]),a.createElementVNode("p",Zl,a.toDisplayString(n.ssoLang[n.appLanguage].permanent_delete_p),1)],32)],512),[[a.vShow,r.accountDelete]])])])])}const Ko=nt(nl,[["render",ed],["__scopeId","data-v-64ae2517"]]),td=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"})),nd={name:"AuthBilling",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,subscriptions:[],showCancelModal:!1,selectedSubscription:null,cancelFeedback:""}},async mounted(){this.isLoggedIn||this.$router.push("/login"),await this.getAccountSettings(),this.loadSubscriptions()},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},loadSubscriptions(){if(this.account.billing){const n=this.account.billing,e=[];for(const t in n)t!=="region"&&t!=="currency"&&t!=="paymentProfiles"&&typeof n[t]=="object"&&n[t].subscriptionId&&e.push(n[t]);this.subscriptions=e}},formatCurrency(n,e){return`${{EUR:"€",USD:"$",GBP:"£"}[e==null?void 0:e.toUpperCase()]||e||""}${(n==null?void 0:n.toFixed(2))||"0.00"}`},formatInterval(n){return n?`per ${n}`:""},formatDate(n){return n?new Date(n*1e3).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):""},getStatusText(n){return{trialing:"Trial",active:"Active",past_due:"Past Due",canceled:"Canceled",unpaid:"Unpaid"}[n]||n},getStatusClass(n){return`status-${n}`},openCancelModal(n){this.selectedSubscription=n,this.showCancelModal=!0,this.cancelFeedback=""},closeCancelModal(){this.showCancelModal=!1,this.selectedSubscription=null,this.cancelFeedback=""},async confirmCancel(){var n,e;if(this.selectedSubscription){if(this.selectedSubscription.paymentGateway==="revenuecat"){X.$emit("ssoEvent",{name:"subscriptionCancelled",data:{subscriptionId:this.selectedSubscription.subscriptionId,paymentGateway:this.selectedSubscription.paymentGateway,feedback:this.cancelFeedback}}),this.closeCancelModal();return}this.loading=!0;try{const t=await ce(!1,"v2").post("checkout/cancel/"+this.selectedSubscription.subscriptionId,{feedback:this.cancelFeedback});if(t.data.success)X.$emit("showToast",{type:"success",message:"Subscription canceled successfully"}),await this.getAccountSettings(),this.loadSubscriptions(),this.closeCancelModal();else throw new Error(t.data.message||"Failed to cancel subscription")}catch(t){console.error("Error canceling subscription:",t),X.$emit("showToast",{type:"error",message:((e=(n=t.response)==null?void 0:n.data)==null?void 0:e.message)||"Failed to cancel subscription. Please try again."})}finally{this.loading=!1}}}}},od={class:"page-login content-boxed content-boxed-padding tapni-auth-billing"},rd={class:"subheaderContainer full-top"},id=["src"],ad=["src"],sd={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},cd={class:"container left-text"},ld={class:"center-text"},dd={class:"full-top"},ud={key:0,class:"no-subscriptions center-text full-top"},pd={key:1},hd={class:"subscription-header"},md={class:"subscription-info"},fd={class:"subscription-name"},gd={class:"subscription-details"},_d={class:"detail-row"},vd={class:"detail-value"},yd={class:"detail-row"},bd={class:"detail-value"},wd={class:"detail-row"},kd={class:"detail-value"},Cd={key:0,class:"detail-row"},Ed={class:"detail-value"},Td={key:1,class:"detail-row"},Sd={class:"detail-value"},Id={key:0,class:"subscription-actions"},Ad=["onClick","disabled"],Rd={class:"modal-content"},Nd={class:"modal-header"},Pd={class:"modal-body"},Md={class:"modal-text"},Ld={class:"feedback-section"},Od={class:"modal-footer"},zd=["disabled"];function xd(n,e,t,o,r,i){var c;const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",od,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...l)=>i.close&&i.close(...l)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",rd,[n.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=l=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,id)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,ad)]),_:1})),a.createElementVNode("h2",sd,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1)]),a.createElementVNode("div",cd,[a.createElementVNode("p",ld,a.toDisplayString(n.ssoLang[n.appLanguage].billing_p),1),a.createElementVNode("div",dd,[r.subscriptions.length===0?(a.openBlock(),a.createElementBlock("div",ud,e[8]||(e[8]=[a.createElementVNode("p",{class:"gray-text"},"There are no active subscriptions at this point.",-1)]))):(a.openBlock(),a.createElementBlock("div",pd,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.subscriptions,l=>(a.openBlock(),a.createElementBlock("div",{key:l.subscriptionId,class:"subscription-card half-bottom"},[a.createElementVNode("div",hd,[a.createElementVNode("div",md,[a.createElementVNode("h3",fd,a.toDisplayString(l.subscriptionName),1),a.createElementVNode("span",{class:a.normalizeClass(["subscription-status",i.getStatusClass(l.status)])},a.toDisplayString(i.getStatusText(l.status)),3)])]),a.createElementVNode("div",gd,[a.createElementVNode("div",_d,[e[9]||(e[9]=a.createElementVNode("span",{class:"detail-label"},"Amount:",-1)),a.createElementVNode("span",vd,a.toDisplayString(i.formatCurrency(l.amount,l.currency)),1)]),a.createElementVNode("div",yd,[e[10]||(e[10]=a.createElementVNode("span",{class:"detail-label"},"Billing:",-1)),a.createElementVNode("span",bd,a.toDisplayString(i.formatInterval(l.interval)),1)]),a.createElementVNode("div",wd,[e[11]||(e[11]=a.createElementVNode("span",{class:"detail-label"},"Licenses:",-1)),a.createElementVNode("span",kd,a.toDisplayString(l.licenses),1)]),l.isTrial?(a.openBlock(),a.createElementBlock("div",Cd,[e[12]||(e[12]=a.createElementVNode("span",{class:"detail-label"},"Trial Ends:",-1)),a.createElementVNode("span",Ed,a.toDisplayString(i.formatDate(l.trialEnd)),1)])):l.endDate?(a.openBlock(),a.createElementBlock("div",Td,[e[13]||(e[13]=a.createElementVNode("span",{class:"detail-label"},"Next Billing:",-1)),a.createElementVNode("span",Sd,a.toDisplayString(i.formatDate(l.endDate)),1)])):a.createCommentVNode("",!0)]),l.status!=="canceled"?(a.openBlock(),a.createElementBlock("div",Id,[a.createElementVNode("button",{onClick:h=>i.openCancelModal(l),class:"cancel-button",disabled:r.loading},a.toDisplayString(r.loading?"Processing...":"Cancel Subscription"),9,Ad)])):a.createCommentVNode("",!0)]))),128))]))])]),r.showCancelModal?(a.openBlock(),a.createElementBlock("div",{key:1,class:"modal-overlay",onClick:e[6]||(e[6]=a.withModifiers((...l)=>i.closeCancelModal&&i.closeCancelModal(...l),["self"]))},[a.createElementVNode("div",Rd,[a.createElementVNode("div",Nd,[e[14]||(e[14]=a.createElementVNode("h3",null,"Cancel Subscription",-1)),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...l)=>i.closeCancelModal&&i.closeCancelModal(...l)),class:"close-button"},"×")]),a.createElementVNode("div",Pd,[a.createElementVNode("p",Md,[e[15]||(e[15]=a.createTextVNode(" Are you sure you want to cancel your subscription to ")),a.createElementVNode("b",null,a.toDisplayString((c=r.selectedSubscription)==null?void 0:c.subscriptionName),1),e[16]||(e[16]=a.createTextVNode("? "))]),a.createElementVNode("div",Ld,[e[17]||(e[17]=a.createElementVNode("label",{class:"feedback-label"},"We'd love to know why you're canceling (optional):",-1)),a.withDirectives(a.createElementVNode("textarea",{"onUpdate:modelValue":e[3]||(e[3]=l=>r.cancelFeedback=l),class:"feedback-textarea",placeholder:"Your feedback helps us improve our service...",rows:"4"},null,512),[[a.vModelText,r.cancelFeedback]])])]),a.createElementVNode("div",Od,[a.createElementVNode("button",{onClick:e[4]||(e[4]=(...l)=>i.closeCancelModal&&i.closeCancelModal(...l)),class:"button-secondary"}," Keep Subscription "),a.createElementVNode("button",{onClick:e[5]||(e[5]=(...l)=>i.confirmCancel&&i.confirmCancel(...l)),class:"button-danger",disabled:r.loading},a.toDisplayString(r.loading?"Canceling...":"Confirm Cancellation"),9,zd)])])])):a.createCommentVNode("",!0)])}const Go=nt(nd,[["render",xd]]),Bd=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"}));(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('@keyframes spinner-circle-animation-ed866313{0%,39%,to{opacity:0}40%{opacity:1}}.spinner[data-v-ed866313]{position:relative;width:var(--vs-spinner-size);height:var(--vs-spinner-size);margin:0;padding:0}.spinner-circle[data-v-ed866313]{width:100%;height:100%;position:absolute;left:0;top:0}.spinner-circle[data-v-ed866313]:before{content:"";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--vs-spinner-color);border-radius:100%;-webkit-animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both;animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both}.spinner-circle[data-v-ed866313]:nth-child(2){transform:rotate(30deg)}.spinner-circle[data-v-ed866313]:nth-child(3){transform:rotate(60deg)}.spinner-circle[data-v-ed866313]:nth-child(4){transform:rotate(90deg)}.spinner-circle[data-v-ed866313]:nth-child(5){transform:rotate(120deg)}.spinner-circle[data-v-ed866313]:nth-child(6){transform:rotate(150deg)}.spinner-circle[data-v-ed866313]:nth-child(7){transform:rotate(180deg)}.spinner-circle[data-v-ed866313]:nth-child(8){transform:rotate(210deg)}.spinner-circle[data-v-ed866313]:nth-child(9){transform:rotate(240deg)}.spinner-circle[data-v-ed866313]:nth-child(10){transform:rotate(270deg)}.spinner-circle[data-v-ed866313]:nth-child(11){transform:rotate(300deg)}.spinner-circle[data-v-ed866313]:nth-child(12){transform:rotate(330deg)}.spinner-circle[data-v-ed866313]:nth-child(2):before{animation-delay:-1.1s}.spinner-circle[data-v-ed866313]:nth-child(3):before{animation-delay:-1s}.spinner-circle[data-v-ed866313]:nth-child(4):before{animation-delay:-.9s}.spinner-circle[data-v-ed866313]:nth-child(5):before{animation-delay:-.8s}.spinner-circle[data-v-ed866313]:nth-child(6):before{animation-delay:-.7s}.spinner-circle[data-v-ed866313]:nth-child(7):before{animation-delay:-.6s}.spinner-circle[data-v-ed866313]:nth-child(8):before{animation-delay:-.5s}.spinner-circle[data-v-ed866313]:nth-child(9):before{animation-delay:-.4s}.spinner-circle[data-v-ed866313]:nth-child(10):before{animation-delay:-.3s}.spinner-circle[data-v-ed866313]:nth-child(11):before{animation-delay:-.2s}.spinner-circle[data-v-ed866313]:nth-child(12):before{animation-delay:-.1s}:root{--vs-input-bg: #fff;--vs-input-outline: #3b82f6;--vs-input-placeholder-color: #52525b;--vs-padding: .25rem .5rem;--vs-border: 1px solid #e4e4e7;--vs-border-radius: 4px;--vs-font-size: 16px;--vs-font-weight: 400;--vs-font-family: inherit;--vs-text-color: #18181b;--vs-line-height: 1.5;--vs-menu-offset-top: 8px;--vs-menu-height: 200px;--vs-menu-padding: 0;--vs-menu-border: 1px solid #e4e4e7;--vs-menu-bg: #fff;--vs-menu-box-shadow: none;--vs-menu-z-index: 2;--vs-option-padding: 8px 12px;--vs-option-font-size: var(--vs-font-size);--vs-option-font-weight: var(--vs-font-weight);--vs-option-text-color: var(--vs-text-color);--vs-option-bg: var(--vs-menu-bg);--vs-option-hover-color: #dbeafe;--vs-option-focused-color: var(--vs-option-hover-color);--vs-option-selected-color: #93c5fd;--vs-option-disabled-color: #f4f4f5;--vs-option-disabled-text-color: #52525b;--vs-multi-value-gap: 0px;--vs-multi-value-padding: 4px;--vs-multi-value-margin: 4px 0px 4px 6px;--vs-multi-value-font-size: 14px;--vs-multi-value-font-weight: 400;--vs-multi-value-line-height: 1;--vs-multi-value-text-color: #3f3f46;--vs-multi-value-bg: #f4f4f5;--vs-multi-value-xmark-size: 16px;--vs-multi-value-xmark-color: var(--vs-multi-value-text-color);--vs-indicators-gap: 4px;--vs-icon-size: 20px;--vs-icon-color: var(--vs-text-color);--vs-spinner-color: var(--vs-text-color);--vs-spinner-size: 20px;--vs-dropdown-transition: transform .25s ease-out}.vue-select[data-v-7f19f42a]{position:relative;box-sizing:border-box;width:100%}.vue-select[data-v-7f19f42a] *{box-sizing:border-box}.vue-select.open .single-value[data-v-7f19f42a]{position:absolute;opacity:.4}.vue-select.open .dropdown-icon[data-v-7f19f42a]{transform:rotate(180deg)}.vue-select.typing .single-value[data-v-7f19f42a]{opacity:0}.control[data-v-7f19f42a]{display:flex;min-height:32px;border:var(--vs-border);border-radius:var(--vs-border-radius);background-color:var(--vs-input-bg)}.control.focused[data-v-7f19f42a]{box-shadow:0 0 0 1px var(--vs-input-outline);border-color:var(--vs-input-outline)}.value-container[data-v-7f19f42a]{position:relative;display:flex;flex-wrap:wrap;align-items:center;flex-basis:100%;flex-grow:1}.value-container.multi[data-v-7f19f42a]{gap:var(--vs-multi-value-gap)}.single-value[data-v-7f19f42a]{display:flex;align-items:center;padding:var(--vs-padding);font-size:var(--vs-font-size);font-weight:var(--vs-font-weight);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);z-index:0}.multi-value[data-v-7f19f42a]{appearance:none;display:flex;align-items:center;gap:var(--vs-multi-value-gap);padding:var(--vs-multi-value-padding);margin:var(--vs-multi-value-margin);border:0;font-size:var(--vs-multi-value-font-size);font-weight:var(--vs-multi-value-font-weight);color:var(--vs-multi-value-text-color);line-height:var(--vs-multi-value-line-height);background:var(--vs-multi-value-bg);outline:none;cursor:pointer}.multi-value svg[data-v-7f19f42a]{width:var(--vs-multi-value-xmark-size);height:var(--vs-multi-value-xmark-size);fill:var(--vs-multi-value-xmark-color)}.search-input[data-v-7f19f42a]{appearance:none;display:inline-block;max-width:100%;flex-grow:1;width:0;margin:0;padding:0;border:0;background:none;padding:var(--vs-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);outline:none;z-index:1}.search-input[data-v-7f19f42a]::placeholder{color:var(--vs-input-placeholder-color)}.indicators-container[data-v-7f19f42a]{display:flex;align-items:center;flex-shrink:0;gap:var(--vs-indicators-gap);padding:var(--vs-padding)}.clear-button[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer}.dropdown-icon[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer;transition:var(--vs-dropdown-transition)}.menu[data-v-7f19f42a]{position:absolute;left:0;right:0;padding:var(--vs-menu-padding);margin-top:var(--vs-menu-offset-top);max-height:var(--vs-menu-height);overflow-y:auto;border:var(--vs-menu-border);border-radius:var(--vs-border-radius);box-shadow:var(--vs-menu-box-shadow);background-color:var(--vs-menu-bg);z-index:var(--vs-menu-z-index)}.menu-option[data-v-7f19f42a]{display:flex;width:100%;border:0;margin:0;padding:var(--vs-option-padding);font-size:var(--vs-option-font-size);font-weight:var(--vs-option-font-weight);font-family:var(--vs-font-family);color:var(--vs-option-text-color);background-color:var(--vs-option-bg);text-align:-webkit-auto;cursor:pointer}.menu-option[data-v-7f19f42a]:hover{background-color:var(--vs-option-hover-color)}.menu-option.focused[data-v-7f19f42a]{background-color:var(--vs-option-focused-color)}.menu-option.selected[data-v-7f19f42a]{background-color:var(--vs-option-selected-color)}.menu-option.disabled[data-v-7f19f42a]{background-color:var(--vs-option-disabled-color);color:var(--vs-option-disabled-text-color)}.no-results[data-v-7f19f42a]{padding:var(--vs-option-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);color:var(--vs-text-color)}')),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const co=(n,e)=>{const t=n.__vccOpts||n;for(const[o,r]of e)t[o]=r;return t},Ud={},Dd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"};function jd(n,e){return a.openBlock(),a.createElementBlock("svg",Dd,e[0]||(e[0]=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)]))}const qd=co(Ud,[["render",jd]]),Fd={},Vd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"};function Hd(n,e){return a.openBlock(),a.createElementBlock("svg",Vd,e[0]||(e[0]=[a.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"},null,-1)]))}const di=co(Fd,[["render",Hd]]),Kd=["aria-disabled","aria-selected"],Gd=a.defineComponent({__name:"MenuOption",props:{menu:{},index:{},isFocused:{type:Boolean},isSelected:{type:Boolean},isDisabled:{type:Boolean}},emits:["select"],setup(n,{emit:e}){const t=n,o=e,r=a.ref(null);return a.watch(()=>t.isFocused,()=>{if(t.isFocused&&t.menu){const i=t.menu.children[t.index],s=i.offsetTop,c=s+i.clientHeight,l=t.menu.scrollTop,h=t.menu.clientHeight;s<l?t.menu.scrollTop=s:c>l+h&&(t.menu.scrollTop=c-h)}}),(i,s)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"option",ref:r,tabindex:"-1",role:"option",class:a.normalizeClass({focused:i.isFocused,selected:i.isSelected,disabled:i.isDisabled}),"aria-disabled":i.isDisabled,"aria-selected":i.isSelected,onClick:s[0]||(s[0]=c=>o("select")),onKeydown:s[1]||(s[1]=a.withKeys(c=>o("select"),["enter"]))},[a.renderSlot(i.$slots,"default")],42,Kd))}}),$d={},Qd={className:"spinner"};function Wd(n,e){return a.openBlock(),a.createElementBlock("div",Qd,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(12,t=>a.createElementVNode("div",{key:t,class:"spinner-circle"})),64))])}const Yd=co($d,[["render",Wd],["__scopeId","data-v-ed866313"]]),Jd=["aria-expanded","aria-describedby","aria-description","aria-labelledby","aria-label","aria-required"],Xd=["onClick"],Zd=["id","disabled","placeholder"],eu={class:"indicators-container"},tu=["disabled"],nu=["disabled"],ou=["aria-label","aria-multiselectable"],ru={key:0,class:"no-results"},iu={name:"AuthGeneral",mixins:[We],components:{VueSelect:co(a.defineComponent({__name:"Select",props:a.mergeModels({options:{},displayedOptions:{},placeholder:{default:"Select an option"},isClearable:{type:Boolean,default:!0},isDisabled:{type:Boolean,default:!1},isSearchable:{type:Boolean,default:!0},isMulti:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},shouldAutofocusOption:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},teleport:{default:void 0},inputId:{default:void 0},aria:{default:void 0},filterBy:{type:Function,default:(n,e,t)=>e.toLowerCase().includes(t.toLowerCase())},getOptionLabel:{type:Function,default:n=>n.label},getMultiValueLabel:{type:Function,default:n=>n.label}},{modelValue:{required:!0,validator:(n,e)=>e.isMulti?Array.isArray(n):!Array.isArray(n)},modelModifiers:{}}),emits:a.mergeModels(["optionSelected","optionDeselected","search"],["update:modelValue"]),setup(n,{emit:e}){const t=n,o=e,r=a.useModel(n,"modelValue"),i=a.ref(null),s=a.ref(null),c=a.ref(null),l=a.ref(""),h=a.ref(!1),u=a.ref(-1),g=a.computed(()=>{const I=t.displayedOptions||t.options,W=ie=>ie.filter(ee=>!r.value.includes(ee.value));if(t.isSearchable&&l.value){const ie=I.filter(ee=>{const ve=t.isMulti?t.getMultiValueLabel(ee):t.getOptionLabel(ee);return t.filterBy(ee,ve,l.value)});return t.isMulti?W(ie):ie}return t.isMulti?W(I):I}),f=a.computed(()=>{if(t.isMulti&&Array.isArray(r.value))return r.value.map(W=>t.options.find(ie=>ie.value===W));t.isMulti&&!Array.isArray(r.value)&&console.warn(`[vue3-select-component warn]: The v-model provided should be an array when using \`isMulti\` prop, instead it was: ${r.value}`);const I=t.options.find(W=>W.value===r.value);return I?[I]:[]}),w=I=>{h.value=!0,t.shouldAutofocusOption&&(u.value=t.options.findIndex(W=>!W.disabled)),I!=null&&I.focusInput&&s.value&&s.value.focus()},C=()=>{h.value=!1,l.value=""},P=()=>{h.value?C():w()},M=I=>{I.disabled||(t.isMulti?r.value.push(I.value):r.value=I.value,o("optionSelected",I),l.value="",t.closeOnSelect&&(h.value=!1),s.value&&s.value.blur())},j=I=>{t.isMulti&&!t.isDisabled&&(r.value=r.value.filter(W=>W!==I.value),o("optionDeselected",I))},N=()=>{t.isMulti?(r.value=[],o("optionDeselected",null)):(r.value=void 0,o("optionDeselected",f.value[0])),h.value=!1,l.value="",s.value&&s.value.blur()},T=I=>{if(h.value){const W=u.value;if(I.key==="ArrowDown"){I.preventDefault();const ee=g.value.findIndex((Re,le)=>!Re.disabled&&le>W),ve=g.value.findIndex(Re=>!Re.disabled);u.value=ee===-1?ve:ee}if(I.key==="ArrowUp"){I.preventDefault();const ee=g.value.reduce((Re,le,Me)=>!le.disabled&&Me<W?Me:Re,-1),ve=g.value.reduce((Re,le,Me)=>le.disabled?Re:Me,-1);u.value=ee===-1?ve:ee}if(I.key==="Enter"){const ee=g.value[W];I.preventDefault(),ee&&M(ee)}if(I.code==="Space"&&l.value.length===0){const ee=g.value[W];I.preventDefault(),ee&&M(ee)}I.key==="Escape"&&(I.preventDefault(),h.value=!1,l.value="");const ie=t.isMulti?r.value.length>0:!!r.value;I.key==="Backspace"&&l.value.length===0&&ie&&(I.preventDefault(),t.isMulti?r.value=r.value.slice(0,-1):r.value=void 0)}},B=I=>{!h.value&&l.value.length===0&&(I.preventDefault(),I.stopImmediatePropagation(),w())},V=I=>{I.key==="Tab"?C():I.key==="Space"&&B(I)},G=I=>{i.value&&!i.value.contains(I.target)&&(h.value=!1,l.value="")},J=()=>{if(i.value){const I=i.value.getBoundingClientRect();return{left:`${I.x}px`,top:`${I.y+I.height}px`}}return console.warn("Unable to calculate dynamic menu position because of missing internal DOM reference."),{top:"0px",left:"0px"}};return a.watch(()=>l.value,()=>{o("search",l.value),l.value&&!h.value&&w()}),a.onMounted(()=>{document.addEventListener("click",G),document.addEventListener("keydown",T)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",G),document.removeEventListener("keydown",T)}),(I,W)=>{var ie,ee,ve,Re;return a.openBlock(),a.createElementBlock("div",{ref_key:"container",ref:i,dir:"auto",class:a.normalizeClass(["vue-select",{open:h.value,typing:h.value&&l.value.length>0,disabled:I.isDisabled}])},[a.createElementVNode("div",{class:a.normalizeClass(["control",{focused:h.value}])},[a.createElementVNode("div",{class:a.normalizeClass(["value-container",{multi:I.isMulti}]),role:"combobox","aria-expanded":h.value,"aria-describedby":I.placeholder,"aria-description":I.placeholder,"aria-labelledby":(ie=I.aria)==null?void 0:ie.labelledby,"aria-label":f.value.length?f.value.map(I.isMulti?I.getMultiValueLabel:I.getOptionLabel).join(", "):"","aria-required":(ee=I.aria)==null?void 0:ee.required},[!t.isMulti&&f.value[0]?(a.openBlock(),a.createElementBlock("div",{key:0,class:"single-value",onClick:W[0]||(W[0]=le=>t.isDisabled?null:w({focusInput:!0}))},[a.renderSlot(I.$slots,"value",{option:f.value[0]},()=>[a.createTextVNode(a.toDisplayString(I.getOptionLabel(f.value[0])),1)],!0)])):a.createCommentVNode("",!0),t.isMulti&&f.value.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(f.value,le=>a.renderSlot(I.$slots,"tag",{key:le.value,option:le,removeOption:()=>j(le)},()=>[a.createElementVNode("button",{type:"button",class:"multi-value",onClick:Me=>j(le)},[a.createTextVNode(a.toDisplayString(I.getMultiValueLabel(le)),1),a.createVNode(di)],8,Xd)],!0)),128)):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("input",{id:I.inputId,ref_key:"input",ref:s,"onUpdate:modelValue":W[1]||(W[1]=le=>l.value=le),class:"search-input",type:"text","aria-autocomplete":"list",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",tabindex:"0",disabled:I.isDisabled,placeholder:f.value.length===0?I.placeholder:"",onMousedown:W[2]||(W[2]=le=>w()),onKeydown:V},null,40,Zd),[[a.vModelText,l.value]])],10,Jd),a.createElementVNode("div",eu,[f.value.length>0&&I.isClearable&&!I.isLoading?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"clear-button",tabindex:"-1",disabled:I.isDisabled,onClick:N},[a.renderSlot(I.$slots,"clear",{},()=>[a.createVNode(di)],!0)],8,tu)):a.createCommentVNode("",!0),I.isLoading?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("button",{key:1,type:"button",class:"dropdown-icon",tabindex:"-1",disabled:I.isDisabled,onClick:P},[a.renderSlot(I.$slots,"dropdown",{},()=>[a.createVNode(qd)],!0)],8,nu)),a.renderSlot(I.$slots,"loading",{},()=>[I.isLoading?(a.openBlock(),a.createBlock(Yd,{key:0})):a.createCommentVNode("",!0)],!0)])],2),(a.openBlock(),a.createBlock(a.Teleport,{to:I.teleport,disabled:!I.teleport,defer:!0},[h.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"menu",ref:c,class:"menu",role:"listbox","aria-label":(ve=I.aria)==null?void 0:ve.labelledby,"aria-multiselectable":I.isMulti,style:a.normalizeStyle({width:t.teleport?`${(Re=i.value)==null?void 0:Re.getBoundingClientRect().width}px`:"100%",top:t.teleport?J().top:"unset",left:t.teleport?J().left:"unset"})},[a.renderSlot(I.$slots,"menu-header",{},void 0,!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(le,Me)=>(a.openBlock(),a.createBlock(Gd,{key:Me,type:"button",class:a.normalizeClass(["menu-option",{focused:u.value===Me,selected:le.value===r.value}]),menu:c.value,index:Me,"is-focused":u.value===Me,"is-selected":le.value===r.value,"is-disabled":le.disabled||!1,onSelect:yt=>M(le)},{default:a.withCtx(()=>[a.renderSlot(I.$slots,"option",{option:le},()=>[a.createTextVNode(a.toDisplayString(I.getOptionLabel(le)),1)],!0)]),_:2},1032,["class","menu","index","is-focused","is-selected","is-disabled","onSelect"]))),128)),g.value.length===0?(a.openBlock(),a.createElementBlock("div",ru,[a.renderSlot(I.$slots,"no-options",{},()=>[W[3]||(W[3]=a.createTextVNode(" No results found "))],!0)])):a.createCommentVNode("",!0)],12,ou)):a.createCommentVNode("",!0)],8,["to","disabled"]))],2)}}}),[["__scopeId","data-v-7f19f42a"]])},props:{isModal:{type:Boolean,default:!1},payload:{type:Object,default:{}}},data(){return{loading:!1}},watch:{"account.lang":{handler(n){n&&(this.updateLang(n),this.display==="npm"&&this.$store.commit("setLanguage",n))},immediate:!0}},async mounted(){this.isLoggedIn||this.$router.push("/login"),await this.getAccountSettings()},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},async submitGeneralUpdate(){this.loading=!0,console.log(this.account);const n={name:this.account.name,lang:this.account.lang,email:this.account.email,billing:this.account.billing?{region:this.account.billing.region}:void 0},[e,t]=await fe(In.updateAccount(n));e?this.errorHandler(e):t.data.success&&(this.successSnack(this.ssoLang[this.appLanguage].profile_update_success),await this.getAccountSettings()),this.loading=!1}}},au={class:"page-login content-boxed content-boxed-padding tapni-auth-general"},su={class:"subheaderContainer full-top"},cu=["src"],lu=["src"],du={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},uu={class:"container left-text"},pu={class:"center-text"},hu={class:"full-top bold small-bottom"},mu=["placeholder"],fu=["placeholder"],gu={class:"full-top bold"},_u={class:"full-top bold"},vu={type:"submit",class:"button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},yu={key:0},bu={key:1,class:"button--loading button__loader"};function wu(n,e,t,o,r,i){const s=a.resolveComponent("router-link"),c=a.resolveComponent("VueSelect");return a.openBlock(),a.createElementBlock("div",au,[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...l)=>i.close&&i.close(...l)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",su,[t.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=l=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,cu)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,lu)]),_:1})),a.createElementVNode("h2",du,a.toDisplayString(n.ssoLang[n.appLanguage].general),1)]),a.createElementVNode("div",uu,[a.createElementVNode("p",pu,a.toDisplayString(n.ssoLang[n.appLanguage].general_p),1),a.createElementVNode("form",{class:"full-top",onSubmit:e[6]||(e[6]=a.withModifiers((...l)=>i.submitGeneralUpdate&&i.submitGeneralUpdate(...l),["prevent"]))},[a.createElementVNode("h3",hu,a.toDisplayString(n.ssoLang[n.appLanguage].personal_details),1),a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=l=>n.account.name=l),placeholder:n.ssoLang[n.appLanguage].name,class:"edit-input h-40 lh-40 small-bottom",required:"",style:{width:"100%"}},null,8,mu),[[a.vModelText,n.account.name]]),a.withDirectives(a.createElementVNode("input",{disabled:"",type:"email","onUpdate:modelValue":e[3]||(e[3]=l=>n.account.email=l),placeholder:n.ssoLang[n.appLanguage].email,class:"bg-white edit-input h-40 lh-40 small-bottom",required:"",style:{width:"100%"}},null,8,fu),[[a.vModelText,n.account.email]]),a.createElementVNode("h3",gu,a.toDisplayString(n.ssoLang[n.appLanguage].app_region),1),n.account.billing?(a.openBlock(),a.createBlock(c,{key:0,modelValue:n.account.billing.region,"onUpdate:modelValue":e[4]||(e[4]=l=>n.account.billing.region=l),options:[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"European Union",value:"eu"},{label:"Mexico",value:"mx"},{label:"Mauritius",value:"mu"},{label:"Colombia",value:"co"},{label:"Serbia",value:"sr"},{label:"Singapore",value:"sg"},{label:"China",value:"cn"}],isClearable:!1,placeholder:"Select region"},null,8,["modelValue"])):a.createCommentVNode("",!0),a.createCommentVNode("",!0),a.createElementVNode("h3",_u,a.toDisplayString(n.ssoLang[n.appLanguage].app_language),1),a.createVNode(c,{modelValue:n.account.lang,"onUpdate:modelValue":e[5]||(e[5]=l=>n.account.lang=l),options:[{label:n.ssoLang[n.appLanguage].english,value:"en"},{label:n.ssoLang[n.appLanguage].german,value:"de"},{label:n.ssoLang[n.appLanguage].spanish,value:"es"},{label:n.ssoLang[n.appLanguage].italian,value:"it"},{label:n.ssoLang[n.appLanguage].french,value:"fr"},{label:n.ssoLang[n.appLanguage].turkish,value:"tr"},{label:n.ssoLang[n.appLanguage].serbian,value:"sr"},{label:n.ssoLang[n.appLanguage].korean,value:"kr"},{label:n.ssoLang[n.appLanguage].chinese,value:"cn"},{label:n.ssoLang[n.appLanguage].portuguese,value:"pt"},{label:n.ssoLang[n.appLanguage].japanese,value:"ja"}],isClearable:!1,placeholder:"Select language"},null,8,["modelValue","options"]),e[8]||(e[8]=a.createElementVNode("p",null,"Translate the app on your preferred language.",-1)),a.createElementVNode("button",vu,[r.loading?(a.openBlock(),a.createElementBlock("span",bu)):(a.openBlock(),a.createElementBlock("span",yu,a.toDisplayString(n.ssoLang[n.appLanguage].save),1))])],32)])])}const $o=nt(iu,[["render",wu]]),ku=Object.freeze(Object.defineProperty({__proto__:null,default:$o},Symbol.toStringTag,{value:"Module"})),Cu={name:"AuthReset",mixins:[We],data(){return{loading:!0,submitted:!1,passwordChange:!1,email:"",password:"",passwordRepeat:"",code:"",captcha:"",revealPassword:!1,revealPassword2:!1}},mounted(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route.query.c&&(this.code=this.$route.query.c,this.passwordChange=!0),this.$route.query.e&&(this.email=this.$route.query.e),X.$emit("ssoEvent",{name:"setLoading",data:!1})},methods:{async resetEmail(){if(this.submitted)return;this.submitted=!0,this.email=this.email.trim();let n={email:this.email,captchaToken:await this.getCaptchaToken("password_reset")};await this.reset(n),this.submitted=!1,await this.$router.push("/verify?e="+this.email+"#reset")},async changePw(){if(this.code.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);if(this.password!==this.passwordRepeat)return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);if(this.submitted)return;this.submitted=!0,this.email=this.email.trim(),this.code=this.code.trim();let n={email:this.email,code:this.code,password:this.password,passwordRepeat:this.passwordRepeat,captchaToken:await this.getCaptchaToken("password_reset")},e=await this.changePassword(n);this.submitted=!1,e===!0&&(this.$router.push("/login"),this.successSnack(this.ssoLang[this.appLanguage].password_reseted_success))}},watch:{email(n){this.$storex.verifyEmail=n}}},Eu={class:"bold no-bottom center-text text-[22px]",style:{"margin-top":"63px"}},Tu={class:"page-login-field half-top color-black"},Su=["placeholder"],Iu={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Au={key:0,class:"uppercase"},Ru={key:1,class:"button--loading button__loader"},Nu={class:"close-text center-text half-top color-black"},Pu=["innerHTML"],Mu=["href"],Lu={class:"page-login-links"},Ou={class:"bold no-bottom center-text",style:{"margin-top":"63px"}},zu={class:"half-bottom small-top center-text color-black"},xu={class:"page-login-field half-top"},Bu=["type","placeholder"],Uu={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Du={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},ju={class:"page-login-field half-top"},qu=["type","placeholder"],Fu={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Vu={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},Hu={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Ku={key:0,class:"uppercase"},Gu={key:1,class:"button--loading button__loader"},$u={class:"close-text center-text half-top color-black"},Qu=["innerHTML"],Wu=["href"];function Yu(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return r.passwordChange?(a.openBlock(),a.createElementBlock("form",{key:1,class:"page-login content-boxed content-boxed-padding",onSubmit:e[7]||(e[7]=a.withModifiers((...c)=>i.changePw&&i.changePw(...c),["prevent"]))},[a.createElementVNode("h3",Ou,a.toDisplayString(n.ssoLang[this.appLanguage].password_change),1),a.createElementVNode("p",zu,a.toDisplayString(n.ssoLang[this.appLanguage].password_new),1),a.createElementVNode("div",xu,[e[14]||(e[14]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,required:""},null,8,Bu),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[4]||(e[4]=c=>r.revealPassword=!r.revealPassword)},[a.withDirectives(a.createElementVNode("img",Uu,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",Du,null,512),[[a.vShow,r.revealPassword]])])]),a.createElementVNode("div",ju,[e[15]||(e[15]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.passwordRepeat=c),type:r.revealPassword2?"text":"password",placeholder:n.ssoLang[this.appLanguage].password_repeat,required:""},null,8,qu),[[a.vModelDynamic,r.passwordRepeat]]),a.createElementVNode("em",{onClick:e[6]||(e[6]=c=>r.revealPassword2=!r.revealPassword2)},[a.withDirectives(a.createElementVNode("img",Fu,null,512),[[a.vShow,!r.revealPassword2]]),a.withDirectives(a.createElementVNode("img",Vu,null,512),[[a.vShow,r.revealPassword2]])])]),a.createElementVNode("button",Hu,[r.submitted?(a.openBlock(),a.createElementBlock("span",Gu)):(a.openBlock(),a.createElementBlock("span",Ku,a.toDisplayString(n.ssoLang[this.appLanguage].password_change),1))]),e[17]||(e[17]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("p",$u,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].reset_password_p2},null,8,Qu),e[16]||(e[16]=a.createTextVNode()),a.createElementVNode("a",{href:"mailto:support@tapni.com?subject="+n.ssoLang[this.appLanguage].password_reset_t}," support@tapni.com",8,Wu)])],32)):(a.openBlock(),a.createElementBlock("form",{key:0,class:"page-login content-boxed content-boxed-padding",onSubmit:e[2]||(e[2]=a.withModifiers((...c)=>i.resetEmail&&i.resetEmail(...c),["prevent"])),autocomplete:"on"},[a.createElementVNode("h3",Eu,a.toDisplayString(n.ssoLang[this.appLanguage].reset_password),1),e[11]||(e[11]=a.createElementVNode("p",{class:"half-bottom small-top center-text color-black"},null,-1)),a.createElementVNode("div",Tu,[e[8]||(e[8]=a.createElementVNode("i",{style:{"padding-top":"10px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"80%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"emailInput","onUpdate:modelValue":e[0]||(e[0]=c=>r.email=c),onKeydown:e[1]||(e[1]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,required:""},null,40,Su),[[a.vModelText,r.email]]),e[9]||(e[9]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("button",Iu,[r.submitted?(a.openBlock(),a.createElementBlock("span",Ru)):(a.openBlock(),a.createElementBlock("span",Au,a.toDisplayString(n.ssoLang[this.appLanguage].reset_password),1))]),e[12]||(e[12]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("p",Nu,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].reset_password_p1},null,8,Pu),a.createElementVNode("a",{href:"mailto:support@tapni.com?subject="+n.ssoLang[this.appLanguage].password_reset_t}," support@tapni.com",8,Mu)]),e[13]||(e[13]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("div",Lu,[a.createVNode(s,{class:"create float-right",to:"/verify"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[10]||(e[10]=a.createElementVNode("div",{class:"clear"},null,-1))])],32))}const Qo=nt(Cu,[["render",Yu],["__scopeId","data-v-707a4b16"]]),Ju=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),Xu={name:"AuthCallback",mixins:[ii,ai,We],data(){return{}},async mounted(){if(this.$route.path==="/callback/redirect")return location.href=atob(this.$route.query.uri);if(this.$route.path==="/callback/auth"&&this.exchangeAuthCode({code:this.$route.query.code,code_verifier:this.$route.query.code_verifier}),this.$route.path==="/callback/okta")return await this.handleOktaRedirect();if(this.$route.path==="/callback/saml")return await this.handleSamlRedirect()},methods:{inAppRedirect(){let n=pi.sanitizeUrl(location.href);return n=n.replace("http","tapni"),n=n.replace("https","tapni"),window.open(n)}}},Zu={class:"page-login content-boxed content-boxed-padding"},ep={key:0,style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"260px"}},tp={key:1,style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"260px"}};function np(n,e,t,o,r,i){return a.openBlock(),a.createElementBlock("div",Zu,[(n.$route.query.platform==="android"||n.$route.query.platform==="ios")&&!n.isNative?(a.openBlock(),a.createElementBlock("h5",ep,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].you_will_be_redirected),1),e[1]||(e[1]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].if_redirect_not_directly)+", ",1),a.createElementVNode("span",{onClick:e[0]||(e[0]=(...s)=>i.inAppRedirect&&i.inAppRedirect(...s)),style:{color:"blue",cursor:"pointer"}},a.toDisplayString(n.ssoLang[this.appLanguage].click_here),1),e[2]||(e[2]=a.createTextVNode(". "))])):(a.openBlock(),a.createElementBlock("h4",tp,a.toDisplayString(n.ssoLang[this.appLanguage].please_wait),1))])}const Wo=nt(Xu,[["render",np]]),op=Object.freeze(Object.defineProperty({__proto__:null,default:Wo},Symbol.toStringTag,{value:"Module"})),Yt=tt.registerPlugin("Preferences",{web:()=>Promise.resolve().then(()=>Xp).then(n=>new n.PreferencesWeb)}),vt={async setObject(n,e){await Yt.set({key:n,value:JSON.stringify(e)})},async getAll(){const n=await this.keys(),e={};for(const t of n)e[t]=await Yt.get({key:t});return e},async setAll(n){const e=Object.keys(n);for(const t of e)await this.setItem(t,n[t])},async getObject(n){const e=await Yt.get({key:n});return JSON.parse(e.value)},async setItem(n,e){return await Yt.set({key:n,value:e})},async getItem(n){const{value:e}=await Yt.get({key:n});return e},async removeItem(n){return await Yt.remove({key:n})},async keys(){const{keys:n}=await Yt.keys();return n},async clear(){return await Yt.clear()}},it="vrs_",Yo={async _initialize(n){let e=await vt.getItem(it);if(e===null)await vt.setItem(it,JSON.stringify(n));else{let t=JSON.parse(e);this._objectDefaults(n,t),await vt.setItem(it,JSON.stringify(t))}},_objectDefaults(n,e){Object.keys(n).reduce((t,o)=>{let r=n[o];return typeof r=="object"?this._objectDefaults(e[o],r):e.hasOwnProperty(o)||(e[o]=r),t},[])},async getRaw(){let n=await vt.getItem(it);return JSON.parse(n)},async setRaw(n){let e=JSON.stringify(n);await vt.setItem(it,e)},async set(n,e){if(e===void 0)return this.remove(n);await vt.setItem(it+n,this.serialize(e));let t=this.getKeys();return t.indexOf(n)===-1&&t.push(n),await vt.setItem(it,this.serialize(t)),e},async get(n){let e=await vt.getItem(it+n);return e===null?null:this.deserialize(e)},async remove(n){let e=await this.get(n);await vt.removeItem(it+n);let t=await this.getKeys(),o=t.indexOf("test");return o!==-1&&t.splice(o,1),await vt.setItem(it,this.serialize(t)),e},async getAll(){let n=[],e=await this.getKeys();for(let t=0;t<e.length;t++)n[e[t]]=this.get(e[t]);return n},async getKeys(){return await this.deserialize(vt.getItem(it))},async clear(){await this.set(it,"[]");let n=this.getKeys();for(let e=0;e<n.length;e++)await this.remove(it+n[e])},serialize:function(n){return JSON.stringify(n)},deserialize:function(n,e){if(!n)return e;let t=JSON.parse(n);return t!==void 0?t:e}},rp={name:"ReactiveStorage",data(){return{strgReady:!1,strg:null}},async created(){this.strgReady=a.reactive({value:!1}),await Yo._initialize(this.options);let n=await Yo.getRaw();const e=a.reactive(n);this.strg=e,this.strgReady.value=!0,a.watch(e,async()=>{await Yo.setRaw(e)},{deep:!0})}},ip={key:0,href:"/",class:"header-logo"},ap=["src"],sp={class:"snackbar snackbar-boxed",id:"snackbar"},cp={class:"snack-body",id:"errorSnack"},lp={id:"errorMessage"},dp={class:"snack-body",id:"successSnack"},up={id:"successMessage"},pp=Object.assign({name:"TapniAuth",mixins:[rp,We],data(){return{storeInterval:null,isSetup:!1,isTapstackOrigin:typeof window<"u"?/(^|\.)tapstack\.com$/i.test(new URL(window.location.origin).hostname):!1}},components:{AuthCallback:Wo,AuthReset:Qo,AuthVerify:Ho,AuthSecurity:Ko,AuthRegister:Vo,AuthLogin:qo,AuthAccount:Fo,AuthBilling:Go,AuthWelcome:wo,AuthGeneral:$o},props:{viewProp:{type:String,default:""},isModal:{type:Boolean,default:!1},payload:{type:Object,default:{}},options:{type:Object,default:{token:"",refreshTokens:"",username:"",UserId:"",verifyEmail:"",subdomain:"",localUser:""}}},computed:{initialized(){return this.isSetup||this.isModal},headerLogoUrl(){return this.isTapstackOrigin?"https://cdn.tapni.co/company-media/e411a6e5-e8c1-40b3-aa4c-1214cfb43e8a/gallery/image/f910fa207addf7d3f7337faf098c4f82c79f755a3cf0032099655f2204e6a1e6.png":"https://cdn.tapni.co/images/logo-dark.png"},containerStyle(){return{maxHeight:this.isModal?"90vh":"auto",overflowY:this.isModal?"auto":"hidden"}}},async mounted(){this.checkAndClearStorage(),this.applyBgStyle(),this.setView(this.viewProp),this.updateMetadata(),X.$on("ssoEvent",this.ssoOutgoingEvent),X.$on("ssoLogout",n=>this.logout(n)),X.$on("getLoggedInAccounts",()=>this.getLoggedInAccounts()),X.$on("refreshTokenAction",n=>this.refreshTokenAction({...n,storage:this.$storex})),X.$on("switchAccount",n=>this.switchAccount(n)),X.$on("setToken",n=>this.setToken(n)),X.$on("setStorageItem",n=>this.setStorageItem(n)),this.isNative&&this.$nextTick(()=>{try{this.$store&&this.$store.state&&this.$store.state.auth&&this.$store.commit("auth/addAllowedOrigin","capacitor://localhost")}catch(n){console.error("Failed to add capacitor origin to allowed origins:",n)}})},methods:{checkAndClearStorage(){const n=new URLSearchParams(window.location.search);if(n.get("clean")==="true"){localStorage.clear(),sessionStorage.clear(),n.delete("clean");const e=window.location.pathname+(n.toString()?"?"+n.toString():"")+window.location.hash;window.history.replaceState({},"",e),console.log("Storage cleared due to clean=true parameter")}},async init(){this.$store.commit("auth/setApiRoot",this.$apiRoot||_i.env.VITE_APP_API_ROOT),this.setStorage(this.strg),!this.isSetup&&(this.isSetup=!0,await this.getLoggedInAccounts(),this.$emit("ssoLibraryReady",this.$storex))},ssoOutgoingEvent(n){this.$emit("ssoEvent",n)},ssoIncomingEvent(n){X.$emit(n.name,n.data)},updateMetadata(){if(!(typeof window>"u"))if(this.isTapstackOrigin){document.title="Tapstack - The modern stack for interactive docs and tools";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.");const e=document.querySelector('meta[property="og:title"]');e&&e.setAttribute("content","Tapstack - The modern stack for interactive docs and tools");const t=document.querySelector('meta[property="og:description"]');t&&t.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences.");const o=document.querySelector('meta[property="twitter:title"]');o&&o.setAttribute("content","Tapstack - The modern stack for interactive docs and tools");const r=document.querySelector('meta[property="twitter:description"]');r&&r.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.")}else document.title="Tapni - Share everything with just a tap"},applyBgStyle(){this.display==="redirect"?document.getElementsByTagName("html")[0].style="background: #dfeefe;":document.getElementsByTagName("html")[0].style=""}},watch:{viewProp(n){this.setView(n)},display(){this.applyBgStyle()},"strgReady.value"(n){n&&this.$nextTick(()=>{this.init()})},$storex:{handler(n){clearInterval(this.storeInterval),this.storeInterval=setTimeout(()=>{Object.keys(n).forEach(e=>{this.strg[e]=n[e]})},250)},deep:!0}}},{setup(n){return window.Buffer=Si,document.addEventListener("DOMContentLoaded",function(){const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render=undefined",document.head.appendChild(e)}),(e,t)=>(a.openBlock(),a.createElementBlock("div",{id:"ssoapp",style:a.normalizeStyle(e.containerStyle)},[e.display==="redirect"||e.renderView.includes("Auth")?(a.openBlock(),a.createElementBlock("a",ip,[a.createElementVNode("img",{src:e.headerLogoUrl,class:"header-logo-img"},null,8,ap)])):a.createCommentVNode("",!0),e.initialized&&e.renderView==="AuthWelcome"?(a.openBlock(),a.createBlock(wo,{key:1})):e.initialized&&e.renderView==="AuthLogin"?(a.openBlock(),a.createBlock(qo,{key:2,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthGeneral"?(a.openBlock(),a.createBlock($o,{key:3,isModal:n.isModal,"onUpdate:viewProp":e.setView},null,8,["isModal","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthAccount"?(a.openBlock(),a.createBlock(Fo,{key:4,isModal:n.isModal,"onUpdate:viewProp":e.setView},null,8,["isModal","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthRegister"?(a.openBlock(),a.createBlock(Vo,{key:5,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthVerify"?(a.openBlock(),a.createBlock(Ho,{key:6,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthSecurity"?(a.openBlock(),a.createBlock(Ko,{key:7,isModal:n.isModal,payload:n.payload,"onUpdate:viewProp":e.setView},null,8,["isModal","payload","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthBilling"?(a.openBlock(),a.createBlock(Go,{key:8,isModal:n.isModal,payload:n.payload,"onUpdate:viewProp":e.setView},null,8,["isModal","payload","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthReset"?(a.openBlock(),a.createBlock(Qo,{key:9})):e.initialized&&e.renderView==="AuthCallback"?(a.openBlock(),a.createBlock(Wo,{key:10})):e.display!=="npm"?(a.openBlock(),a.createBlock(a.unref(en.RouterView),{key:11})):a.createCommentVNode("",!0),a.createElementVNode("div",sp,[a.createElementVNode("p",cp,[a.createElementVNode("span",lp,a.toDisplayString(e.ssoLang[e.appLanguage].error),1),a.createElementVNode("a",{onClick:t[0]||(t[0]=(...o)=>e.closeSnacks&&e.closeSnacks(...o)),style:{position:"absolute",right:"10px",top:"10px",width:"50px",height:"50px"}},t[2]||(t[2]=[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/notification-close.png",style:{width:"100%"}},null,-1)]))]),a.createElementVNode("p",dp,[a.createElementVNode("span",up,a.toDisplayString(e.ssoLang[e.appLanguage].success),1),a.createElementVNode("a",{onClick:t[1]||(t[1]=(...o)=>e.closeSnacks&&e.closeSnacks(...o)),style:{position:"absolute",right:"10px",top:"10px",width:"50px",height:"50px"}},t[3]||(t[3]=[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/notification-close.png",style:{width:"100%"}},null,-1)]))])])],4))}}),hp={install:(n,{store:e,apiRoot:t})=>{n.component("TapniAuth",pp),e.hasModule("auth")||e.registerModule("auth",Cr),n.config.globalProperties.$apiRoot=t}},mp={name:"AuthQR",mixins:[We,si]},fp={class:"page-login content-boxed content-boxed-padding"},gp={style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"130px"}},_p={class:"center-text"},vp={style:{margin:"0 auto",width:"85%","text-align":"left"}},yp={class:"center-text"};function bp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",fp,[a.createElementVNode("h5",gp,a.toDisplayString(n.ssoLang[n.appLanguage].use_tapni_on_the_web),1),e[6]||(e[6]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",_p,[e[3]||(e[3]=a.createElementVNode("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1)),e[4]||(e[4]=a.createElementVNode("br",null,null,-1)),e[5]||(e[5]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",vp,[a.createElementVNode("h2",yp,a.toDisplayString(n.ssoLang[n.appLanguage].login_by_scanning_qr_code),1),e[0]||(e[0]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].open_tapni_app_on_your_phone),1),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].go_to_settings_link_a_device),1),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].point_your_phone_at_this_qr_code),1),e[1]||(e[1]=a.createElementVNode("br",null,null,-1)),e[2]||(e[2]=a.createElementVNode("br",null,null,-1))]),a.createVNode(s,{to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].choose_other_login_methods),1)]),_:1})])])}const wp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(mp,[["render",bp]])},Symbol.toStringTag,{value:"Module"})),kp={async getRecordById(n){return ce().post("/objects/record/"+n.id,n)},async getRecords(n){return ce().post("/objects/records",n)}},Cp={name:"AuthApps",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,apps:[]}},async mounted(){this.isLoggedIn||this.$router.push("/login");const n=await kp.getRecords({objectId:"6dc545ea-2e2f-4720-b4fe-c5ebdd8af063",query:{fields:["t_apps_name","t_apps_icon","t_apps_url"],relations:[]}});this.apps=n.data.records},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})}}},Ep={class:"page-login content-boxed content-boxed-padding"},Tp={class:"subheaderContainer full-top"},Sp=["src"],Ip={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},Ap={class:"container left-text"},Rp={class:"center-text"},Np={class:"full-top"},Pp=["href"],Mp={class:"firstRow"},Lp=["src"],Op=["src"];function zp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Ep,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[1]||(e[1]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",Tp,[n.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,Sp)]),_:1})),a.createElementVNode("h2",Ip,a.toDisplayString(n.ssoLang[n.appLanguage].apps),1)]),a.createElementVNode("div",Ap,[a.createElementVNode("p",Rp,a.toDisplayString(n.ssoLang[n.appLanguage].apps_p),1),a.createElementVNode("div",Np,[a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.apps,c=>(a.openBlock(),a.createElementBlock("a",{key:c.id,href:c.t_apps_url,target:"_blank",class:"settingRow half-bottom"},[a.createElementVNode("div",Mp,[a.createElementVNode("img",{src:n.getIcon(c.t_apps_icon),class:"withBackground"},null,8,Lp),a.createElementVNode("h4",null,a.toDisplayString(c.t_apps_name),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Op)])],8,Pp))),128))])])])}const xp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Cp,[["render",zp],["__scopeId","data-v-2f7f5584"]])},Symbol.toStringTag,{value:"Module"})),Bp={name:"AuthCustomApp",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,app:{}}},async mounted(){this.isLoggedIn||this.$router.push("/login");const n=await Fe.getRecordById({id:this.$route.params.app,query:{fields:["t_apps_name","t_apps_icon","t_apps_url"],relations:[]}});this.app=n.data.record},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})}}},Up={class:"page-login content-boxed content-boxed-padding"},Dp={class:"subheaderContainer full-top"},jp=["src"],qp={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},Fp={class:"container left-text"},Vp={class:"center-text"};function Hp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Up,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[1]||(e[1]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",Dp,[n.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,to:"/apps",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,jp)]),_:1})),a.createElementVNode("h2",qp,a.toDisplayString(r.app.t_apps_name),1)]),a.createElementVNode("div",Fp,[a.createElementVNode("p",Vp,a.toDisplayString(n.ssoLang[n.appLanguage].apps_p),1),e[2]||(e[2]=a.createElementVNode("div",{class:"full-top"},null,-1))])])}const Kp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Bp,[["render",Hp],["__scopeId","data-v-36b27d1f"]])},Symbol.toStringTag,{value:"Module"}));class Gp extends tt.WebPlugin{constructor(){super()}loadScript(){if(typeof document>"u")return;const e="gapi";if(document==null?void 0:document.getElementById(e))return;const o=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.defer=!0,r.async=!0,r.id=e,r.onload=this.platformJsLoaded.bind(this),r.src="https://apis.google.com/js/platform.js",o.appendChild(r)}initialize(e={clientId:"",scopes:[],grantOfflineAccess:!1}){var t,o;if(typeof window>"u")return;const r=(t=document.getElementsByName("google-signin-client_id")[0])===null||t===void 0?void 0:t.content,i=e.clientId||r||"";return i||console.warn("GoogleAuthPlugin - clientId is empty"),this.options={clientId:i,grantOfflineAccess:(o=e.grantOfflineAccess)!==null&&o!==void 0?o:!1,scopes:e.scopes||[]},this.gapiLoaded=new Promise(s=>{window.gapiResolve=s,this.loadScript()}),this.addUserChangeListener(),this.gapiLoaded}platformJsLoaded(){gapi.load("auth2",()=>{const e={client_id:this.options.clientId,plugin_name:"CodetrixStudioCapacitorGoogleAuth"};this.options.scopes.length&&(e.scope=this.options.scopes.join(" ")),gapi.auth2.init(e),window.gapiResolve()})}async signIn(){return new Promise(async(e,t)=>{var o;try{let r;const i=(o=this.options.grantOfflineAccess)!==null&&o!==void 0?o:!1;i?r=(await gapi.auth2.getAuthInstance().grantOfflineAccess()).code:await gapi.auth2.getAuthInstance().signIn();const s=gapi.auth2.getAuthInstance().currentUser.get();i&&await s.reloadAuthResponse();const c=this.getUserFrom(s);c.serverAuthCode=r,e(c)}catch(r){t(r)}})}async refresh(){const e=await gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse();return{accessToken:e.access_token,idToken:e.id_token,refreshToken:""}}async signOut(){return gapi.auth2.getAuthInstance().signOut()}async addUserChangeListener(){await this.gapiLoaded,gapi.auth2.getAuthInstance().currentUser.listen(e=>{this.notifyListeners("userChange",e.isSignedIn()?this.getUserFrom(e):null)})}getUserFrom(e){const t={},o=e.getBasicProfile();t.email=o.getEmail(),t.familyName=o.getFamilyName(),t.givenName=o.getGivenName(),t.id=o.getId(),t.imageUrl=o.getImageUrl(),t.name=o.getName();const r=e.getAuthResponse(!0);return t.authentication={accessToken:r.access_token,idToken:r.id_token,refreshToken:""},t}}const $p=Object.freeze(Object.defineProperty({__proto__:null,GoogleAuthWeb:Gp},Symbol.toStringTag,{value:"Module"}));var ui={exports:{}};/*!
|
|
163
|
+
Error Description: `+h.message)),[2,null];case 4:return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,r]}})})},n.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Ur?Ur[this.canonicalAuthority]:null},n.prototype.isInKnownAuthorities=function(){var e=this,t=this.authorityOptions.knownAuthorities.filter(function(o){return de.getDomainFromUrl(o).toLowerCase()===e.hostnameAndPort});return t.length>0},n.generateAuthority=function(e,t){var o;if(t&&t.azureCloudInstance!==On.None){var r=t.tenant?t.tenant:b.DEFAULT_COMMON_TENANT;o=t.azureCloudInstance+"/"+r+"/"}return o||e},n.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},n.getCloudDiscoveryMetadataFromNetworkResponse=function(e,t){for(var o=0;o<e.length;o++){var r=e[o];if(r.aliases.indexOf(t)>-1)return r}return null},n.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},n.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},n.isPublicCloudAuthority=function(e){return b.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},n.buildRegionalAuthorityString=function(e,t,o){var r=new de(e);r.validateAsUri();var i=r.getUrlComponents(),s=t+"."+i.HostNameAndPort;this.isPublicCloudAuthority(i.HostNameAndPort)&&(s=t+"."+b.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var c=de.constructAuthorityUriFromObject(he(he({},r.getUrlComponents()),{HostNameAndPort:s})).urlString;return o?c+"?"+o:c},n.replaceWithRegionalInformation=function(e,t){return e.authorization_endpoint=n.buildRegionalAuthorityString(e.authorization_endpoint,t),e.token_endpoint=n.buildRegionalAuthorityString(e.token_endpoint,t,b.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=n.buildRegionalAuthorityString(e.end_session_endpoint,t)),e},n.transformCIAMAuthority=function(e){var t=e.endsWith(b.FORWARD_SLASH)?e:""+e+b.FORWARD_SLASH,o=new de(e),r=o.getUrlComponents();if(r.PathSegments.length===0&&r.HostNameAndPort.endsWith(b.CIAM_AUTH_URL)){var i=r.HostNameAndPort.split(".")[0];t=""+t+i+b.AAD_TENANT_DOMAIN_SUFFIX}return t},n.reservedTenantDomains=new Set(["{tenant}","{tenantid}",on.COMMON,on.CONSUMERS,on.ORGANIZATIONS]),n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var oo=function(){function n(){}return n.createDiscoveredInstance=function(e,t,o,r,i,s,c){return ne(this,void 0,void 0,function(){var l,h,u;return oe(this,function(g){switch(g.label){case 0:s==null||s.addQueueMeasurement(R.AuthorityFactoryCreateDiscoveredInstance,c),l=Un.transformCIAMAuthority(e),h=n.createInstance(l,t,o,r,i,s,c),g.label=1;case 1:return g.trys.push([1,3,,4]),s==null||s.setPreQueueTime(R.AuthorityResolveEndpointsAsync,c),[4,h.resolveEndpointsAsync()];case 2:return g.sent(),[2,h];case 3:throw u=g.sent(),K.createEndpointDiscoveryIncompleteError(u);case 4:return[2]}})})},n.createInstance=function(e,t,o,r,i,s,c){if(H.isEmpty(e))throw we.createUrlEmptyError();return new Un(e,t,o,r,i,s,c)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ro=function(){function n(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return n.isServerTelemetryEntity=function(e,t){var o=e.indexOf(Be.CACHE_KEY)===0,r=!0;return t&&(r=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),o&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Dr=function(){function n(){}return n.isThrottlingEntity=function(e,t){var o=!1;e&&(o=e.indexOf(Mn.THROTTLING_PREFIX)===0);var r=!0;return t&&(r=t.hasOwnProperty("throttleTime")),o&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ma={sendGetRequestAsync:function(){var n="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(n))},sendPostRequestAsync:function(){var n="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(n))}};/*! @azure/msal-common v13.3.1 2023-10-27 */var io={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},jr=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="JoseHeaderError",Object.setPrototypeOf(r,e.prototype),r}return e.createMissingKidError=function(){return new e(io.missingKidError.code,io.missingKidError.desc)},e.createMissingAlgError=function(){return new e(io.missingAlgError.code,io.missingAlgError.desc)},e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var fa=function(){function n(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return n.getShrHeaderString=function(e){if(!e.kid)throw jr.createMissingKidError();if(!e.alg)throw jr.createMissingAlgError();var t=new n({typ:e.typ||Io.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ga=function(){function n(e,t){this.cacheOutcome=Qt.NO_CACHE_HIT,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||b.EMPTY_STRING,this.wrapperVer=e.wrapperVer||b.EMPTY_STRING,this.telemetryCacheKey=Be.CACHE_KEY+Pe.CACHE_KEY_SEPARATOR+e.clientId}return n.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Be.VALUE_SEPARATOR+this.cacheOutcome,t=[this.wrapperSKU,this.wrapperVer].join(Be.VALUE_SEPARATOR),o=this.getRegionDiscoveryFields(),r=[e,o].join(Be.VALUE_SEPARATOR);return[Be.SCHEMA_VERSION,r,t].join(Be.CATEGORY_SEPARATOR)},n.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),t=n.maxErrorsToSend(e),o=e.failedRequests.slice(0,2*t).join(Be.VALUE_SEPARATOR),r=e.errors.slice(0,t).join(Be.VALUE_SEPARATOR),i=e.errors.length,s=t<i?Be.OVERFLOW_TRUE:Be.OVERFLOW_FALSE,c=[i,s].join(Be.VALUE_SEPARATOR);return[Be.SCHEMA_VERSION,e.cacheHits,o,r,c].join(Be.CATEGORY_SEPARATOR)},n.prototype.cacheFailedRequest=function(e){var t=this.getLastRequests();t.errors.length>=Be.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),H.isEmpty(e.subError)?H.isEmpty(e.errorCode)?e&&e.toString()?t.errors.push(e.toString()):t.errors.push(Be.UNKNOWN_ERROR):t.errors.push(e.errorCode):t.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)},n.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},n.prototype.getLastRequests=function(){var e=new ro,t=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return t||e},n.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),t=n.maxErrorsToSend(e),o=e.errors.length;if(t===o)this.cacheManager.removeItem(this.telemetryCacheKey);else{var r=new ro;r.failedRequests=e.failedRequests.slice(t*2),r.errors=e.errors.slice(t),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)}},n.maxErrorsToSend=function(e){var t,o=0,r=0,i=e.errors.length;for(t=0;t<i;t++){var s=e.failedRequests[2*t]||b.EMPTY_STRING,c=e.failedRequests[2*t+1]||b.EMPTY_STRING,l=e.errors[t]||b.EMPTY_STRING;if(r+=s.toString().length+c.toString().length+l.length+3,r<Be.MAX_LAST_HEADER_BYTES)o+=1;else break}return o},n.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||b.EMPTY_STRING),e.push(this.regionSource||b.EMPTY_STRING),e.push(this.regionOutcome||b.EMPTY_STRING),e.join(",")},n.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},n.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var qr=function(){function n(e,t,o,r,i,s){this.authority=t,this.libraryName=r,this.libraryVersion=i,this.applicationTelemetry=s,this.clientId=e,this.logger=o,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map}return n.prototype.startPerformanceMeasurement=function(e,t){return{}},n.prototype.startPerformanceMeasuremeant=function(e,t){return{}},n.prototype.getIntFields=function(){return sa},n.prototype.getPreQueueTime=function(e,t){var o=this.preQueueTimeByCorrelationId.get(t);if(o){if(o.name!==e){this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue time found for "+e+", unable to add queue measurement");return}}else{this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: "+t+", unable to add queue measurement");return}return o.time},n.prototype.calculateQueuedTime=function(e,t){return e<1?(this.logger.trace("PerformanceClient: preQueueTime should be a positive integer and not "+e),0):t<1?(this.logger.trace("PerformanceClient: currentTime should be a positive integer and not "+t),0):t<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):t-e},n.prototype.addQueueMeasurement=function(e,t,o,r){if(!t){this.logger.trace("PerformanceClient.addQueueMeasurement: correlationId not provided for "+e+", cannot add queue measurement");return}if(o===0)this.logger.trace("PerformanceClient.addQueueMeasurement: queue time provided for "+e+" is "+o);else if(!o){this.logger.trace("PerformanceClient.addQueueMeasurement: no queue time provided for "+e);return}var i={eventName:e,queueTime:o,manuallyCompleted:r},s=this.queueMeasurements.get(t);if(s)s.push(i),this.queueMeasurements.set(t,s);else{this.logger.trace("PerformanceClient.addQueueMeasurement: adding correlationId "+t+" to queue measurements");var c=[i];this.queueMeasurements.set(t,c)}this.preQueueTimeByCorrelationId.delete(t)},n.prototype.startMeasurement=function(e,t){var o=this,r,i,s=t||this.generateId();t||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",s),this.logger.trace("PerformanceClient: Performance measurement started for "+e,s);var c=this.startPerformanceMeasuremeant(e,s);c.startMeasurement();var l={eventId:this.generateId(),status:to.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:s,appName:(r=this.applicationTelemetry)===null||r===void 0?void 0:r.appName,appVersion:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appVersion};return this.cacheEventByCorrelationId(l),{endMeasurement:function(h){return o.endMeasurement(he(he({},l),h),c)},discardMeasurement:function(){return o.discardMeasurements(l.correlationId)},addStaticFields:function(h){return o.addStaticFields(h,l.correlationId)},increment:function(h){return o.increment(h,l.correlationId)},measurement:c,event:l}},n.prototype.endMeasurement=function(e,t){var o=this,r,i,s=this.eventsByCorrelationId.get(e.correlationId);if(!s)return this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId),null;var c=e.eventId===s.eventId,l={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};c?(l=this.getQueueInfo(e.correlationId),this.discardCache(s.correlationId)):(r=s.incompleteSubMeasurements)===null||r===void 0||r.delete(e.eventId),t==null||t.endMeasurement();var h=t==null?void 0:t.flushMeasurement();if(!h)return this.logger.trace("PerformanceClient: Performance measurement not taken",s.correlationId),null;if(this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+h+" ms",e.correlationId),!c)return s[e.name+"DurationMs"]=Math.floor(h),he({},s);var u=he(he({},s),e),g=0;return(i=u.incompleteSubMeasurements)===null||i===void 0||i.forEach(function(f){o.logger.trace("PerformanceClient: Incomplete submeasurement "+f.name+" found for "+e.name,u.correlationId),g++}),u.incompleteSubMeasurements=void 0,u=he(he({},u),{durationMs:Math.round(h),queuedTimeMs:l.totalQueueTime,queuedCount:l.totalQueueCount,queuedManuallyCompletedCount:l.manuallyCompletedCount,status:to.Completed,incompleteSubsCount:g}),this.truncateIntegralFields(u,this.getIntFields()),this.emitEvents([u],e.correlationId),u},n.prototype.addStaticFields=function(e,t){this.logger.trace("PerformanceClient: Updating static fields");var o=this.eventsByCorrelationId.get(t);o?this.eventsByCorrelationId.set(t,he(he({},o),e)):this.logger.trace("PerformanceClient: Event not found for",t)},n.prototype.increment=function(e,t){this.logger.trace("PerformanceClient: Updating counters");var o=this.eventsByCorrelationId.get(t);if(o)for(var r in e)o.hasOwnProperty(r)||(o[r]=0),o[r]+=e[r];else this.logger.trace("PerformanceClient: Event not found for",t)},n.prototype.cacheEventByCorrelationId=function(e){var t=this.eventsByCorrelationId.get(e.correlationId);t?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),t.incompleteSubMeasurements=t.incompleteSubMeasurements||new Map,t.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,he({},e)))},n.prototype.getQueueInfo=function(e){var t=this.queueMeasurements.get(e);t||this.logger.trace("PerformanceClient: no queue measurements found for for correlationId: "+e);var o=0,r=0,i=0;return t==null||t.forEach(function(s){o+=s.queueTime,r++,i+=s.manuallyCompleted?1:0}),{totalQueueTime:o,totalQueueCount:r,manuallyCompletedCount:i}},n.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},n.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: QueueMeasurements discarded",e),this.queueMeasurements.delete(e),this.logger.trace("PerformanceClient: Pre-queue times discarded",e),this.preQueueTimeByCorrelationId.delete(e)},n.prototype.addPerformanceCallback=function(e){var t=this.generateId();return this.callbacks.set(t,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+t),t},n.prototype.removePerformanceCallback=function(e){var t=this.callbacks.delete(e);return t?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),t},n.prototype.emitEvents=function(e,t){var o=this;this.logger.verbose("PerformanceClient: Emitting performance events",t),this.callbacks.forEach(function(r,i){o.logger.trace("PerformanceClient: Emitting event to callback "+i,t),r.apply(null,[e])})},n.prototype.truncateIntegralFields=function(e,t){t.forEach(function(o){o in e&&typeof e[o]=="number"&&(e[o]=Math.floor(e[o]))})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Fr=function(){function n(){}return n.prototype.startMeasurement=function(){},n.prototype.endMeasurement=function(){},n.prototype.flushMeasurement=function(){return null},n}(),_a=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new Fr},e.prototype.startPerformanceMeasurement=function(){return new Fr},e.prototype.calculateQueuedTime=function(t,o){return 0},e.prototype.addQueueMeasurement=function(t,o,r){},e.prototype.setPreQueueTime=function(t,o){},e}(qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var U={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},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."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},spaCodeAndNativeAccountPresent:{code:"spa_code_and_nativeAccountId_present",desc:"Request cannot contain both spa code and native account id."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},F=function(n){xe(e,n);function e(t,o){var r=n.call(this,t,o)||this;return Object.setPrototypeOf(r,e.prototype),r.name="BrowserAuthError",r}return e.createPkceNotGeneratedError=function(t){return new e(U.pkceNotGenerated.code,U.pkceNotGenerated.desc+" Detail:"+t)},e.createCryptoNotAvailableError=function(t){return new e(U.cryptoDoesNotExist.code,U.cryptoDoesNotExist.desc+" Detail:"+t)},e.createHttpMethodNotImplementedError=function(t){return new e(U.httpMethodNotImplementedError.code,U.httpMethodNotImplementedError.desc+" Given Method: "+t)},e.createEmptyNavigationUriError=function(){return new e(U.emptyNavigateUriError.code,U.emptyNavigateUriError.desc)},e.createEmptyHashError=function(t){return new e(U.hashEmptyError.code,U.hashEmptyError.desc+" Given Url: "+t)},e.createHashDoesNotContainStateError=function(){return new e(U.hashDoesNotContainStateError.code,U.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(U.hashDoesNotContainKnownPropertiesError.code,U.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(U.unableToParseStateError.code,U.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(U.stateInteractionTypeMismatchError.code,U.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(U.interactionInProgress.code,U.interactionInProgress.desc)},e.createPopupWindowError=function(t){var o=U.popupWindowError.desc;return o=H.isEmpty(t)?o:o+" Details: "+t,new e(U.popupWindowError.code,o)},e.createEmptyWindowCreatedError=function(){return new e(U.emptyWindowError.code,U.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(U.userCancelledError.code,U.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(U.monitorPopupTimeoutError.code,U.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(U.monitorIframeTimeoutError.code,U.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(t){return new e(U.redirectInIframeError.code,U.redirectInIframeError.desc+" (window.parent !== window) => "+t)},e.createBlockReloadInHiddenIframeError=function(){return new e(U.blockTokenRequestsInHiddenIframeError.code,U.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(U.blockAcquireTokenInPopupsError.code,U.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(U.iframeClosedPrematurelyError.code,U.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(U.silentLogoutUnsupportedError.code,U.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(U.noAccountError.code,U.noAccountError.desc)},e.createSilentPromptValueError=function(t){return new e(U.silentPromptValueError.code,U.silentPromptValueError.desc+" Given value: "+t)},e.createUnableToParseTokenRequestCacheError=function(){return new e(U.unableToParseTokenRequestCacheError.code,U.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(U.noTokenRequestCacheError.code,U.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(U.authRequestNotSet.code,U.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(U.noCachedAuthorityError.code,U.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(U.invalidCacheType.code,""+U.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(U.notInBrowserEnvironment.code,U.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(U.databaseNotOpen.code,U.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(U.noNetworkConnectivity.code,U.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(t,o){return new e(U.postRequestFailed.code,U.postRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+o.split("?")[0])},e.createGetRequestFailedError=function(t,o){return new e(U.getRequestFailed.code,U.getRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+o.split("?")[0])},e.createFailedToParseNetworkResponseError=function(t){return new e(U.failedToParseNetworkResponse.code,U.failedToParseNetworkResponse.desc+" | Attempted to reach: "+t.split("?")[0])},e.createUnableToLoadTokenError=function(t){return new e(U.unableToLoadTokenError.code,U.unableToLoadTokenError.desc+" | "+t)},e.createSigningKeyNotFoundInStorageError=function(t){return new e(U.signingKeyNotFoundInStorage.code,U.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+t)},e.createAuthCodeRequiredError=function(){return new e(U.authCodeRequired.code,U.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(U.authCodeOrNativeAccountRequired.code,U.authCodeOrNativeAccountRequired.desc)},e.createSpaCodeAndNativeAccountIdPresentError=function(){return new e(U.spaCodeAndNativeAccountPresent.code,U.spaCodeAndNativeAccountPresent.desc)},e.createDatabaseUnavailableError=function(){return new e(U.databaseUnavailable.code,U.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(U.unableToAcquireTokenFromNativePlatform.code,U.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(U.nativeHandshakeTimeout.code,U.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(U.nativeExtensionNotInstalled.code,U.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(U.nativeConnectionNotEstablished.code,U.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(U.nativeBrokerCalledBeforeInitialize.code,U.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(U.nativePromptNotSupported.code,U.nativePromptNotSupported.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var _t={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},Dn={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Vt;(function(n){n.HandshakeRequest="Handshake",n.HandshakeResponse="HandshakeResponse",n.GetToken="GetToken",n.Response="Response"})(Vt||(Vt={}));var Ae;(function(n){n.LocalStorage="localStorage",n.SessionStorage="sessionStorage",n.MemoryStorage="memoryStorage"})(Ae||(Ae={}));var At;(function(n){n.GET="GET",n.POST="POST"})(At||(At={}));var ue;(function(n){n.AUTHORITY="authority",n.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",n.SESSION_STATE="session.state",n.REQUEST_STATE="request.state",n.NONCE_IDTOKEN="nonce.id_token",n.ORIGIN_URI="request.origin",n.RENEW_STATUS="token.renew.status",n.URL_HASH="urlHash",n.REQUEST_PARAMS="request.params",n.SCOPES="scopes",n.INTERACTION_STATUS_KEY="interaction.status",n.CCS_CREDENTIAL="ccs.credential",n.CORRELATION_ID="request.correlationId",n.NATIVE_REQUEST="request.native",n.REDIRECT_CONTEXT="request.redirect.context"})(ue||(ue={}));var Rt;(function(n){n.ACCOUNT_KEYS="msal.account.keys",n.TOKEN_KEYS="msal.token.keys"})(Rt||(Rt={}));var kn;(function(n){n.WRAPPER_SKU="wrapper.sku",n.WRAPPER_VER="wrapper.version"})(kn||(kn={}));var ke;(function(n){n[n.acquireTokenRedirect=861]="acquireTokenRedirect",n[n.acquireTokenPopup=862]="acquireTokenPopup",n[n.ssoSilent=863]="ssoSilent",n[n.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",n[n.handleRedirectPromise=865]="handleRedirectPromise",n[n.acquireTokenByCode=866]="acquireTokenByCode",n[n.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",n[n.logout=961]="logout",n[n.logoutPopup=962]="logoutPopup"})(ke||(ke={}));var $;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})($||($={}));var Vr;(function(n){n.Startup="startup",n.Login="login",n.Logout="logout",n.AcquireToken="acquireToken",n.SsoSilent="ssoSilent",n.HandleRedirect="handleRedirect",n.None="none"})(Vr||(Vr={}));var Hr={scopes:An},Cn="jwk",Kr;(function(n){n.React="@azure/msal-react",n.Angular="@azure/msal-angular"})(Kr||(Kr={}));var zo="msal.db",va=1,ya=zo+".keys",Xe;(function(n){n[n.Default=0]="Default",n[n.AccessToken=1]="AccessToken",n[n.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",n[n.RefreshToken=3]="RefreshToken",n[n.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",n[n.Skip=5]="Skip"})(Xe||(Xe={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ze={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was 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."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},ao=function(n){xe(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="BrowserConfigurationAuthError",Object.setPrototypeOf(r,e.prototype),r}return e.createRedirectUriEmptyError=function(){return new e(Ze.redirectUriNotSet.code,Ze.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Ze.postLogoutUriNotSet.code,Ze.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(t){return new e(Ze.storageNotSupportedError.code,Ze.storageNotSupportedError.desc+" Given Location: "+t)},e.createRedirectCallbacksNotSetError=function(){return new e(Ze.noRedirectCallbacksSet.code,Ze.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(Ze.stubPcaInstanceCalled.code,Ze.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(Ze.inMemRedirectUnavailable.code,Ze.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(Ze.entropyNotProvided.code,Ze.entropyNotProvided.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Gr=function(){function n(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return n.prototype.validateWindowStorage=function(e){if(e!==Ae.LocalStorage&&e!==Ae.SessionStorage)throw ao.createStorageNotSupportedError(e);var t=!!window[e];if(!t)throw ao.createStorageNotSupportedError(e)},n.prototype.getItem=function(e){return this.windowStorage.getItem(e)},n.prototype.setItem=function(e,t){this.windowStorage.setItem(e,t)},n.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},n.prototype.getKeys=function(){return Object.keys(this.windowStorage)},n.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var xo=function(){function n(){this.cache=new Map}return n.prototype.getItem=function(e){return this.cache.get(e)||null},n.prototype.setItem=function(e,t){this.cache.set(e,t)},n.prototype.removeItem=function(e){this.cache.delete(e)},n.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(t,o){e.push(o)}),e},n.prototype.containsKey=function(e){return this.cache.has(e)},n.prototype.clear=function(){this.cache.clear()},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $r=function(){function n(){}return n.extractBrowserRequestState=function(e,t){if(H.isEmpty(t))return null;try{var o=Ft.parseRequestState(e,t);return o.libraryState.meta}catch(r){throw K.createInvalidStateError(t,r)}},n.parseServerResponseFromHash=function(e){if(!e)return{};var t=new de(e);return de.getDeserializedHash(t.getHash())},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Bo=function(n){xe(e,n);function e(t,o,r,i){var s=n.call(this,t,r,i)||this;return s.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,s.cacheConfig=o,s.logger=i,s.internalStorage=new xo,s.browserStorage=s.setupBrowserStorage(s.cacheConfig.cacheLocation),s.temporaryCacheStorage=s.setupTemporaryCacheStorage(s.cacheConfig.temporaryCacheLocation,s.cacheConfig.cacheLocation),o.cacheMigrationEnabled&&(s.migrateCacheEntries(),s.createKeyMaps()),s}return e.prototype.setupBrowserStorage=function(t){switch(t){case Ae.LocalStorage:case Ae.SessionStorage:try{return new Gr(t)}catch(o){this.logger.verbose(o);break}}return this.cacheConfig.cacheLocation=Ae.MemoryStorage,new xo},e.prototype.setupTemporaryCacheStorage=function(t,o){switch(o){case Ae.LocalStorage:case Ae.SessionStorage:try{return new Gr(t||Ae.SessionStorage)}catch(r){return this.logger.verbose(r),this.internalStorage}case Ae.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var t=this,o=b.CACHE_PREFIX+"."+Ne.ID_TOKEN,r=b.CACHE_PREFIX+"."+Ne.CLIENT_INFO,i=b.CACHE_PREFIX+"."+Ne.ERROR,s=b.CACHE_PREFIX+"."+Ne.ERROR_DESC,c=this.browserStorage.getItem(o),l=this.browserStorage.getItem(r),h=this.browserStorage.getItem(i),u=this.browserStorage.getItem(s),g=[c,l,h,u],f=[Ne.ID_TOKEN,Ne.CLIENT_INFO,Ne.ERROR,Ne.ERROR_DESC];f.forEach(function(w,C){return t.migrateCacheEntry(w,g[C])})},e.prototype.migrateCacheEntry=function(t,o){o&&this.setTemporaryCache(t,o,!0)},e.prototype.createKeyMaps=function(){var t=this;this.logger.trace("BrowserCacheManager - createKeyMaps called.");var o=this.getItem(Rt.ACCOUNT_KEYS),r=this.getItem(Rt.TOKEN_KEYS+"."+this.clientId);if(o&&r){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}var i=this.browserStorage.getKeys();i.forEach(function(s){if(t.isCredentialKey(s)){var c=t.getItem(s);if(c){var l=t.validateAndParseJson(c);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case Z.ID_TOKEN:if(sn.isIdTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: "+s+" found, saving key to token key map");var h=Je.toObject(new sn,l),u=t.updateCredentialCacheKey(s,h);t.addTokenKey(u,Z.ID_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: "+s);break;case Z.ACCESS_TOKEN:case Z.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(cn.isAccessTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: "+s+" found, saving key to token key map");var g=Je.toObject(new cn,l),u=t.updateCredentialCacheKey(s,g);t.addTokenKey(u,Z.ACCESS_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: "+s);break;case Z.REFRESH_TOKEN:if(yn.isRefreshTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: "+s+" found, saving key to token key map");var f=Je.toObject(new yn,l),u=t.updateCredentialCacheKey(s,f);t.addTokenKey(u,Z.REFRESH_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: "+s);break}}}if(t.isAccountKey(s)){var c=t.getItem(s);if(c){var w=t.validateAndParseJson(c);w&&Ue.isAccountEntity(w)&&(t.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: "+s+" found, saving key to account key map"),t.addAccountKeyToMap(s))}}})},e.prototype.validateAndParseJson=function(t){try{var o=JSON.parse(t);return o&&typeof o=="object"?o:null}catch{return null}},e.prototype.getItem=function(t){return this.browserStorage.getItem(t)},e.prototype.setItem=function(t,o){this.browserStorage.setItem(t,o)},e.prototype.getAccount=function(t){this.logger.trace("BrowserCacheManager.getAccount called");var o=this.getItem(t);if(!o)return this.removeAccountKeyFromMap(t),null;var r=this.validateAndParseJson(o);return!r||!Ue.isAccountEntity(r)?(this.removeAccountKeyFromMap(t),null):Je.toObject(new Ue,r)},e.prototype.setAccount=function(t){this.logger.trace("BrowserCacheManager.setAccount called");var o=t.generateAccountKey();this.setItem(o,JSON.stringify(t)),this.addAccountKeyToMap(o)},e.prototype.getAccountKeys=function(){this.logger.trace("BrowserCacheManager.getAccountKeys called");var t=this.getItem(Rt.ACCOUNT_KEYS);return t?JSON.parse(t):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])},e.prototype.addAccountKeyToMap=function(t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: "+t);var o=this.getAccountKeys();o.indexOf(t)===-1?(o.push(t),this.setItem(Rt.ACCOUNT_KEYS,JSON.stringify(o)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")},e.prototype.removeAccountKeyFromMap=function(t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: "+t);var o=this.getAccountKeys(),r=o.indexOf(t);r>-1?(o.splice(r,1),this.setItem(Rt.ACCOUNT_KEYS,JSON.stringify(o)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")},e.prototype.removeAccount=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){return n.prototype.removeAccount.call(this,t),this.removeAccountKeyFromMap(t),[2]})})},e.prototype.removeIdToken=function(t){n.prototype.removeIdToken.call(this,t),this.removeTokenKey(t,Z.ID_TOKEN)},e.prototype.removeAccessToken=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){return n.prototype.removeAccessToken.call(this,t),this.removeTokenKey(t,Z.ACCESS_TOKEN),[2]})})},e.prototype.removeRefreshToken=function(t){n.prototype.removeRefreshToken.call(this,t),this.removeTokenKey(t,Z.REFRESH_TOKEN)},e.prototype.getTokenKeys=function(){this.logger.trace("BrowserCacheManager.getTokenKeys called");var t=this.getItem(Rt.TOKEN_KEYS+"."+this.clientId);if(t){var o=this.validateAndParseJson(t);if(o&&o.hasOwnProperty("idToken")&&o.hasOwnProperty("accessToken")&&o.hasOwnProperty("refreshToken"))return o;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}},e.prototype.addTokenKey=function(t,o){this.logger.trace("BrowserCacheManager addTokenKey called");var r=this.getTokenKeys();switch(o){case Z.ID_TOKEN:r.idToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(t));break;case Z.ACCESS_TOKEN:r.accessToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),r.accessToken.push(t));break;case Z.REFRESH_TOKEN:r.refreshToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(t));break;default:this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: "+o),K.createUnexpectedCredentialTypeError()}this.setItem(Rt.TOKEN_KEYS+"."+this.clientId,JSON.stringify(r))},e.prototype.removeTokenKey=function(t,o){this.logger.trace("BrowserCacheManager removeTokenKey called");var r=this.getTokenKeys();switch(o){case Z.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: "+t+" from map");var i=r.idToken.indexOf(t);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),r.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case Z.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: "+t+" from map");var s=r.accessToken.indexOf(t);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),r.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case Z.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: "+t+" from map");var c=r.refreshToken.indexOf(t);c>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),r.refreshToken.splice(c,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: "+o),K.createUnexpectedCredentialTypeError()}this.setItem(Rt.TOKEN_KEYS+"."+this.clientId,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ID_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!sn.isIdTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Je.toObject(new sn,r))},e.prototype.setIdTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.ID_TOKEN)},e.prototype.getAccessTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ACCESS_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!cn.isAccessTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Je.toObject(new cn,r))},e.prototype.setAccessTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.ACCESS_TOKEN)},e.prototype.getRefreshTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.REFRESH_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!yn.isRefreshTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Je.toObject(new yn,r))},e.prototype.setRefreshTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.REFRESH_TOKEN)},e.prototype.getAppMetadata=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!Lo.isAppMetadataEntity(t,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Je.toObject(new Lo,r))},e.prototype.setAppMetadata=function(t){this.logger.trace("BrowserCacheManager.setAppMetadata called");var o=t.generateAppMetadataKey();this.setItem(o,JSON.stringify(t))},e.prototype.getServerTelemetry=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!ro.isServerTelemetryEntity(t,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Je.toObject(new ro,r))},e.prototype.setServerTelemetry=function(t,o){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(t,JSON.stringify(o))},e.prototype.getAuthorityMetadata=function(t){var o=this.internalStorage.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var r=this.validateAndParseJson(o);return r&&Oo.isAuthorityMetadataEntity(t,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Je.toObject(new Oo,r)):null},e.prototype.getAuthorityMetadataKeys=function(){var t=this,o=this.internalStorage.getKeys();return o.filter(function(r){return t.isAuthorityMetadata(r)})},e.prototype.setWrapperMetadata=function(t,o){this.internalStorage.setItem(kn.WRAPPER_SKU,t),this.internalStorage.setItem(kn.WRAPPER_VER,o)},e.prototype.getWrapperMetadata=function(){var t=this.internalStorage.getItem(kn.WRAPPER_SKU)||b.EMPTY_STRING,o=this.internalStorage.getItem(kn.WRAPPER_VER)||b.EMPTY_STRING;return[t,o]},e.prototype.setAuthorityMetadata=function(t,o){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(t,JSON.stringify(o))},e.prototype.getActiveAccount=function(){var t=this.generateCacheKey(Ne.ACTIVE_ACCOUNT_FILTERS),o=this.getItem(t);if(!o){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var r=this.generateCacheKey(Ne.ACTIVE_ACCOUNT),i=this.getItem(r);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var s=this.getAccountInfoByFilter({localAccountId:i})[0]||null;return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(s),s):null}var c=this.validateAndParseJson(o);return c?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:c.homeAccountId,localAccountId:c.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(t){var o=this.generateCacheKey(Ne.ACTIVE_ACCOUNT_FILTERS),r=this.generateCacheKey(Ne.ACTIVE_ACCOUNT);if(t){this.logger.verbose("setActiveAccount: Active account set");var i={homeAccountId:t.homeAccountId,localAccountId:t.localAccountId};this.browserStorage.setItem(o,JSON.stringify(i)),this.browserStorage.setItem(r,t.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(o),this.browserStorage.removeItem(r)},e.prototype.getAccountInfoByFilter=function(t){var o=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+o.length+" accounts found"),o.filter(function(r){return!(t.username&&t.username.toLowerCase()!==r.username.toLowerCase()||t.homeAccountId&&t.homeAccountId!==r.homeAccountId||t.localAccountId&&t.localAccountId!==r.localAccountId||t.tenantId&&t.tenantId!==r.tenantId||t.environment&&t.environment!==r.environment)})},e.prototype.getAccountInfoByHints=function(t,o){var r=this.getAllAccounts().filter(function(i){if(o){var s=i.idTokenClaims&&i.idTokenClaims.sid;return o===s}return t?t===i.username:!1});if(r.length===1)return r[0];if(r.length>1)throw K.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!Dr.isThrottlingEntity(t,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Je.toObject(new Dr,r))},e.prototype.setThrottlingCache=function(t,o){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(t,JSON.stringify(o))},e.prototype.getTemporaryCache=function(t,o){var r=o?this.generateCacheKey(t):t;if(this.cacheConfig.storeAuthStateInCookie){var i=this.getItemCookie(r);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}var s=this.temporaryCacheStorage.getItem(r);if(!s){if(this.cacheConfig.cacheLocation===Ae.LocalStorage){var c=this.browserStorage.getItem(r);if(c)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),c}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),s},e.prototype.setTemporaryCache=function(t,o,r){var i=r?this.generateCacheKey(t):t;this.temporaryCacheStorage.setItem(i,o),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(i,o))},e.prototype.removeItem=function(t){this.browserStorage.removeItem(t),this.temporaryCacheStorage.removeItem(t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(t))},e.prototype.containsKey=function(t){return this.browserStorage.containsKey(t)||this.temporaryCacheStorage.containsKey(t)},e.prototype.getKeys=function(){return Eo(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.removeAllAccounts()];case 1:return o.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(r){(t.browserStorage.containsKey(r)||t.temporaryCacheStorage.containsKey(r))&&(r.indexOf(b.CACHE_PREFIX)!==-1||r.indexOf(t.clientId)!==-1)&&t.removeItem(r)}),this.internalStorage.clear(),[2]}})})},e.prototype.clearTokensAndKeysWithClaims=function(){return z(this,void 0,void 0,function(){var t,o,r=this;return x(this,function(i){switch(i.label){case 0:return this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called"),t=this.getTokenKeys(),o=[],t.accessToken.forEach(function(s){var c=r.getAccessTokenCredential(s);c!=null&&c.requestedClaimsHash&&s.includes(c.requestedClaimsHash.toLowerCase())&&o.push(r.removeAccessToken(s))}),[4,Promise.all(o)];case 1:return i.sent(),o.length>0&&this.logger.warning(o.length+" access tokens with claims in the cache keys have been removed from the cache."),[2]}})})},e.prototype.setItemCookie=function(t,o,r){var i=encodeURIComponent(t)+"="+encodeURIComponent(o)+";path=/;SameSite=Lax;";if(r){var s=this.getCookieExpirationTime(r);i+="expires="+s+";"}this.cacheConfig.secureCookies&&(i+="Secure;"),document.cookie=i},e.prototype.getItemCookie=function(t){for(var o=encodeURIComponent(t)+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(var s=r[i];s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(o)===0)return decodeURIComponent(s.substring(o.length,s.length))}return b.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var t=this,o=b.CACHE_PREFIX+"."+this.clientId,r=document.cookie.split(";");r.forEach(function(i){for(;i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(o)===0){var s=i.split("=")[0];t.clearItemCookie(s)}})},e.prototype.clearItemCookie=function(t){this.setItemCookie(t,b.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(t){var o=new Date,r=new Date(o.getTime()+t*this.COOKIE_LIFE_MULTIPLIER);return r.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(t){var o=this.validateAndParseJson(t);return o?JSON.stringify(t):H.startsWith(t,b.CACHE_PREFIX)||H.startsWith(t,Ne.ADAL_ID_TOKEN)?t:b.CACHE_PREFIX+"."+this.clientId+"."+t},e.prototype.generateAuthorityKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.AUTHORITY+"."+o)},e.prototype.generateNonceKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.NONCE_IDTOKEN+"."+o)},e.prototype.generateStateKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.REQUEST_STATE+"."+o)},e.prototype.getCachedAuthority=function(t){var o=this.generateStateKey(t),r=this.getTemporaryCache(o);if(!r)return null;var i=this.generateAuthorityKey(r);return this.getTemporaryCache(i)},e.prototype.updateCacheEntries=function(t,o,r,i,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var c=this.generateStateKey(t);this.setTemporaryCache(c,t,!1);var l=this.generateNonceKey(t);this.setTemporaryCache(l,o,!1);var h=this.generateAuthorityKey(t);if(this.setTemporaryCache(h,r,!1),s){var u={credential:s.homeAccountId,type:rt.HOME_ACCOUNT_ID};this.setTemporaryCache(ue.CCS_CREDENTIAL,JSON.stringify(u),!0)}else if(!H.isEmpty(i)){var u={credential:i,type:rt.UPN};this.setTemporaryCache(ue.CCS_CREDENTIAL,JSON.stringify(u),!0)}},e.prototype.resetRequestCache=function(t){var o=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),H.isEmpty(t)||this.getKeys().forEach(function(r){r.indexOf(t)!==-1&&o.removeItem(r)}),t&&(this.removeItem(this.generateStateKey(t)),this.removeItem(this.generateNonceKey(t)),this.removeItem(this.generateAuthorityKey(t))),this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ue.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ue.URL_HASH)),this.removeItem(this.generateCacheKey(ue.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ue.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ue.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(t){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),t){var o=this.generateStateKey(t),r=this.temporaryCacheStorage.getItem(o);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+r),this.resetRequestCache(r||b.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(t){var o=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(r){if(r.indexOf(ue.REQUEST_STATE)!==-1){var i=o.temporaryCacheStorage.getItem(r);if(i){var s=$r.extractBrowserRequestState(o.cryptoImpl,i);s&&s.interactionType===t&&(o.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+i),o.resetRequestCache(i))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(t,o){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var r=o.base64Encode(JSON.stringify(t));this.setTemporaryCache(ue.REQUEST_PARAMS,r,!0)},e.prototype.getCachedRequest=function(t,o){this.logger.trace("BrowserCacheManager.getCachedRequest called");var r=this.getTemporaryCache(ue.REQUEST_PARAMS,!0);if(!r)throw F.createNoTokenRequestCacheError();var i=this.validateAndParseJson(o.base64Decode(r));if(!i)throw F.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)),H.isEmpty(i.authority)){var s=this.generateAuthorityKey(t),c=this.getTemporaryCache(s);if(!c)throw F.createNoCachedAuthorityError();i.authority=c}return i},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var t=this.getTemporaryCache(ue.NATIVE_REQUEST,!0);if(!t)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var o=this.validateAndParseJson(t);return o||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(t){var o=this.getInteractionInProgress();return t?o===this.clientId:!!o},e.prototype.getInteractionInProgress=function(){var t=b.CACHE_PREFIX+"."+ue.INTERACTION_STATUS_KEY;return this.getTemporaryCache(t,!1)},e.prototype.setInteractionInProgress=function(t){var o=b.CACHE_PREFIX+"."+ue.INTERACTION_STATUS_KEY;if(t){if(this.getInteractionInProgress())throw F.createInteractionInProgressError();this.setTemporaryCache(o,this.clientId,!1)}else!t&&this.getInteractionInProgress()===this.clientId&&this.removeItem(o)},e.prototype.getLegacyLoginHint=function(){var t=this.getTemporaryCache(Ne.ADAL_ID_TOKEN);t&&(this.browserStorage.removeItem(Ne.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var o=this.getTemporaryCache(Ne.ID_TOKEN,!0);o&&(this.removeItem(this.generateCacheKey(Ne.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var r=o||t;if(r){var i=new It(r,this.cryptoImpl);if(i.claims&&i.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.claims.preferred_username;if(i.claims&&i.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.claims.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null},e.prototype.updateCredentialCacheKey=function(t,o){var r=o.generateCredentialKey();if(t!==r){var i=this.getItem(t);if(i)return this.removeItem(t),this.setItem(r,i),this.logger.verbose("Updated an outdated "+o.credentialType+" cache key"),r;this.logger.error("Attempted to update an outdated "+o.credentialType+" cache key but no item matching the outdated key was found in storage")}return t},e.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(ue.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(t){this.setTemporaryCache(ue.REDIRECT_CONTEXT,t,!0)},e}(Je),ba=function(n,e){var t={cacheLocation:Ae.MemoryStorage,temporaryCacheLocation:Ae.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};return new Bo(n,t,Xn,e)};/*! @azure/msal-browser v2.38.3 2023-10-27 */var Uo="@azure/msal-browser",jn="2.38.3";/*! @azure/msal-browser v2.38.3 2023-10-27 */var wa=function(){function n(){}return n.prototype.sendGetRequestAsync=function(e,t){return z(this,void 0,void 0,function(){var o,r,i;return x(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,fetch(e,{method:At.GET,headers:this.getFetchHeaders(t)})];case 1:return o=s.sent(),[3,3];case 2:throw r=s.sent(),window.navigator.onLine?F.createGetRequestFailedError(r,e):F.createNoNetworkConnectivityError();case 3:return s.trys.push([3,5,,6]),i={headers:this.getHeaderDict(o.headers)},[4,o.json()];case 4:return[2,(i.body=s.sent(),i.status=o.status,i)];case 5:throw s.sent(),F.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},n.prototype.sendPostRequestAsync=function(e,t){return z(this,void 0,void 0,function(){var o,r,i,s;return x(this,function(c){switch(c.label){case 0:o=t&&t.body||b.EMPTY_STRING,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,fetch(e,{method:At.POST,headers:this.getFetchHeaders(t),body:o})];case 2:return r=c.sent(),[3,4];case 3:throw i=c.sent(),window.navigator.onLine?F.createPostRequestFailedError(i,e):F.createNoNetworkConnectivityError();case 4:return c.trys.push([4,6,,7]),s={headers:this.getHeaderDict(r.headers)},[4,r.json()];case 5:return[2,(s.body=c.sent(),s.status=r.status,s)];case 6:throw c.sent(),F.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},n.prototype.getFetchHeaders=function(e){var t=new Headers;if(!(e&&e.headers))return t;var o=e.headers;return Object.keys(o).forEach(function(r){t.append(r,o[r])}),t},n.prototype.getHeaderDict=function(e){var t={};return e.forEach(function(o,r){t[r]=o}),t},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ka=function(){function n(){}return n.prototype.sendGetRequestAsync=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.sendRequestAsync(e,At.GET,t)]})})},n.prototype.sendPostRequestAsync=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.sendRequestAsync(e,At.POST,t)]})})},n.prototype.sendRequestAsync=function(e,t,o){var r=this;return new Promise(function(i,s){var c=new XMLHttpRequest;if(c.open(t,e,!0),r.setXhrHeaders(c,o),c.onload=function(){(c.status<200||c.status>=300)&&(t===At.POST?s(F.createPostRequestFailedError("Failed with status "+c.status,e)):s(F.createGetRequestFailedError("Failed with status "+c.status,e)));try{var l=JSON.parse(c.responseText),h={headers:r.getHeaderDict(c),body:l,status:c.status};i(h)}catch{s(F.createFailedToParseNetworkResponseError(e))}},c.onerror=function(){window.navigator.onLine?t===At.POST?s(F.createPostRequestFailedError("Failed with status "+c.status,e)):s(F.createGetRequestFailedError("Failed with status "+c.status,e)):s(F.createNoNetworkConnectivityError())},t===At.POST&&o&&o.body)c.send(o.body);else if(t===At.GET)c.send();else throw F.createHttpMethodNotImplementedError(t)})},n.prototype.setXhrHeaders=function(e,t){if(t&&t.headers){var o=t.headers;Object.keys(o).forEach(function(r){e.setRequestHeader(r,o[r])})}},n.prototype.getHeaderDict=function(e){var t=e.getAllResponseHeaders(),o=t.trim().split(/[\r\n]+/),r={};return o.forEach(function(i){var s=i.split(": "),c=s.shift(),l=s.join(": ");c&&l&&(r[c]=l)}),r},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ee=function(){function n(){}return n.clearHash=function(e){e.location.hash=b.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,b.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},n.replaceHash=function(e){var t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):b.EMPTY_STRING},n.isInIframe=function(){return window.parent!==window},n.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(_t.POPUP_NAME_PREFIX+".")===0},n.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},n.getHomepage=function(){var e=new de(window.location.href),t=e.getUrlComponents();return t.Protocol+"//"+t.HostNameAndPort+"/"},n.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new wa:new ka},n.blockReloadInHiddenIframes=function(){var e=de.hashContainsKnownProperties(window.location.hash);if(e&&n.isInIframe())throw F.createBlockReloadInHiddenIframeError()},n.blockRedirectInIframe=function(e,t){var o=n.isInIframe();if(e===$.Redirect&&o&&!t)throw F.createRedirectInIframeError(o)},n.blockAcquireTokenInPopups=function(){if(n.isInPopup())throw F.createBlockAcquireTokenInPopupsError()},n.blockNonBrowserEnvironment=function(e){if(!e)throw F.createNonBrowserEnvironmentError()},n.blockNativeBrokerCalledBeforeInitialized=function(e,t){if(e&&!t)throw F.createNativeBrokerCalledBeforeInitialize()},n.detectIEOrEdge=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),o=e.indexOf("Trident/"),r=e.indexOf("Edge/"),i=t>0||o>0,s=r>0;return i||s},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qr=function(){function n(e,t,o,r,i,s,c,l,h){this.config=e,this.browserStorage=t,this.browserCrypto=o,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=s,this.nativeMessageHandler=l,this.correlationId=h||this.browserCrypto.createNewGuid(),this.logger=r.clone(_t.MSAL_SKU,jn,this.correlationId),this.performanceClient=c}return n.prototype.clearCacheOnLogout=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){switch(t.label){case 0:if(!e)return[3,5];Ue.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(Ue.generateAccountCacheKey(e))];case 2:return t.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return t.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return t.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return t.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return t.sent(),[3,9];case 8:return t.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},n.prototype.initializeBaseRequest=function(e,t){return z(this,void 0,void 0,function(){var o,r,i,s;return x(this,function(c){switch(c.label){case 0:return this.performanceClient.addQueueMeasurement(R.InitializeBaseRequest,e.correlationId),this.logger.verbose("Initializing BaseAuthRequest"),o=e.authority||this.config.auth.authority,t?[4,this.validateRequestAuthority(o,t)]:[3,2];case 1:c.sent(),c.label=2;case 2:if(r=Eo(e&&e.scopes||[]),i=Q(Q({},e),{correlationId:this.correlationId,authority:o,scopes:r}),!i.authenticationScheme)i.authenticationScheme=ge.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(i.authenticationScheme===ge.SSH){if(!e.sshJwk)throw we.createMissingSshJwkError();if(!e.sshKid)throw we.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+i.authenticationScheme+'" as configured in Auth request')}return this.config.cache.claimsBasedCachingEnabled&&e.claims&&!H.isEmptyObj(e.claims)?(s=i,[4,this.browserCrypto.hashString(e.claims)]):[3,4];case 3:s.requestedClaimsHash=c.sent(),c.label=4;case 4:return[2,i]}})})},n.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var t=e||this.config.auth.redirectUri||Ee.getCurrentUri();return de.getAbsoluteUrl(t,Ee.getCurrentUri())},n.prototype.validateRequestAuthority=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(r.label){case 0:return[4,this.getDiscoveredAuthority(e)];case 1:if(o=r.sent(),!o.isAlias(t.environment))throw we.createAuthorityMismatchError();return[2]}})})},n.prototype.initializeServerTelemetryManager=function(e,t){this.logger.verbose("initializeServerTelemetryManager called");var o={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new ga(o,this.browserStorage)},n.prototype.getDiscoveredAuthority=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),t={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,oo.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,t,this.logger)]):[3,2];case 1:return[2,o.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,oo.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,t,this.logger)];case 3:return[2,o.sent()]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var En=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(t){return z(this,void 0,void 0,function(){var o,r;return x(this,function(i){switch(i.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),this.logger.verbose("initializeAuthorizationRequest called",t.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return o=i.sent(),r=Q(Q({},t),{redirectUri:t.redirectUri,code:b.EMPTY_STRING,codeVerifier:o.verifier}),t.codeChallenge=o.challenge,t.codeChallengeMethod=b.S256_CODE_CHALLENGE_METHOD,[2,r]}})})},e.prototype.initializeLogoutRequest=function(t){this.logger.verbose("initializeLogoutRequest called",t==null?void 0:t.correlationId);var o=Q({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},t);if(t)if(t.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(t.account){var r=this.getLogoutHintFromIdTokenClaims(t.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),o.logoutHint=r)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!t||t.postLogoutRedirectUri!==null?t&&t.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(t.postLogoutRedirectUri,Ee.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",o.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Ee.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(Ee.getCurrentUri(),Ee.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",o.correlationId),o},e.prototype.getLogoutHintFromIdTokenClaims=function(t){var o=t.idTokenClaims;if(o){if(o.login_hint)return o.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},e.prototype.createAuthCodeClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientCreateAuthCodeClient,this.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new Or(i,this.performanceClient)]}})})},e.prototype.getClientConfiguration=function(t,o,r){return z(this,void 0,void 0,function(){var i,s;return x(this,function(c){switch(c.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientGetClientConfiguration,this.correlationId),this.logger.verbose("getClientConfiguration called",this.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),[4,this.getDiscoveredAuthority(o,r)];case 1:return i=c.sent(),s=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:i,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:_t.MSAL_SKU,version:jn,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(t,o,r){if(this.logger.verbose("validateAndExtractStateFromHash called",r),!t.state)throw F.createHashDoesNotContainStateError();var i=$r.extractBrowserRequestState(this.browserCrypto,t.state);if(!i)throw F.createUnableToParseStateError();if(i.interactionType!==o)throw F.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",r),t.state},e.prototype.getDiscoveredAuthority=function(t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l;return x(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),this.logger.verbose("getDiscoveredAuthority called",this.correlationId),i=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},c=t||this.config.auth.authority,l=Un.generateAuthority(c,o||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),this.performanceClient.setPreQueueTime(R.AuthorityFactoryCreateDiscoveredInstance,this.correlationId),[4,oo.createDiscoveredInstance(l,this.config.system.networkClient,this.browserStorage,s,this.logger,this.performanceClient,this.correlationId).then(function(u){return i.endMeasurement({success:!0}),u}).catch(function(u){throw i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})];case 1:return[2,h.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId),this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),r=this.getRedirectUri(t.redirectUri),i={interactionType:o},s=Ft.setRequestState(this.browserCrypto,t&&t.state||b.EMPTY_STRING,i),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,this.correlationId),l=[{}],[4,this.initializeBaseRequest(t)];case 1:return c=Q.apply(void 0,[Q.apply(void 0,l.concat([g.sent()])),{redirectUri:r,state:s,nonce:t.nonce||this.browserCrypto.createNewGuid(),responseMode:Qn.FRAGMENT}]),h=t.account||this.browserStorage.getActiveAccount(),h&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+h.homeAccountId,this.correlationId),c.account=h),H.isEmpty(c.loginHint)&&!h&&(u=this.browserStorage.getLegacyLoginHint(),u&&(c.loginHint=u)),[2,c]}})})},e}(Qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Do=function(){function n(e,t,o,r,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=o,this.logger=r,this.performanceClient=i}return n.prototype.handleCodeResponseFromHash=function(e,t,o,r){return z(this,void 0,void 0,function(){var i,s,c;return x(this,function(l){if(this.performanceClient.addQueueMeasurement(R.HandleCodeResponseFromHash,this.authCodeRequest.correlationId),this.logger.verbose("InteractionHandler.handleCodeResponse called"),H.isEmpty(e))throw F.createEmptyHashError(e);if(i=this.browserStorage.generateStateKey(t),s=this.browserStorage.getTemporaryCache(i),!s)throw K.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(e,s)}catch(h){throw h instanceof rn&&h.subError===U.userCancelledError.code?F.createUserCancelledError():h}return this.performanceClient.setPreQueueTime(R.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),[2,this.handleCodeResponseFromServer(c,t,o,r)]})})},n.prototype.handleCodeResponseFromServer=function(e,t,o,r,i){return i===void 0&&(i=!0),z(this,void 0,void 0,function(){var s,c,l,h,u,g;return x(this,function(f){switch(f.label){case 0:if(this.performanceClient.addQueueMeasurement(R.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),s=this.browserStorage.generateStateKey(t),c=this.browserStorage.getTemporaryCache(s),!c)throw K.createStateNotFoundError("Cached State");return l=this.browserStorage.generateNonceKey(c),h=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?(this.performanceClient.setPreQueueTime(R.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,o,r)]):[3,2];case 1:f.sent(),f.label=2;case 2:return i&&(e.nonce=h||void 0),e.state=c,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),this.performanceClient.setPreQueueTime(R.AuthClientAcquireToken,this.authCodeRequest.correlationId),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return g=f.sent(),this.browserStorage.cleanRequestByState(t),[2,g]}})})},n.prototype.updateTokenEndpointAuthority=function(e,t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(R.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),r="https://"+e+"/"+t.tenant+"/",[4,oo.createDiscoveredInstance(r,o,this.browserStorage,t.options,this.logger,this.performanceClient,this.authCodeRequest.correlationId)];case 1:return i=s.sent(),this.authModule.updateAuthority(i),[2]}})})},n.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ue.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wr=function(n){xe(e,n);function e(t,o,r,i,s,c){var l=n.call(this,t,o,r,i,c)||this;return l.browserCrypto=s,l}return e.prototype.initiateAuthRequest=function(t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),H.isEmpty(t)?[3,7]:(o.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ue.ORIGIN_URI,o.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ue.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+t),r={apiId:ke.acquireTokenRedirect,timeout:o.redirectTimeout,noHistory:!1},typeof o.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),i=o.onRedirectNavigate(t),i===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,o.navigationClient.navigateExternal(t,r)])));case 1:return s.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,o.navigationClient.navigateExternal(t,r)];case 5:return s.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),F.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(t,o,r,i){return z(this,void 0,void 0,function(){var s,c,l,h,u,g,f;return x(this,function(w){switch(w.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),H.isEmpty(t))throw F.createEmptyHashError(t);if(this.browserStorage.setInteractionInProgress(!1),s=this.browserStorage.generateStateKey(o),c=this.browserStorage.getTemporaryCache(s),!c)throw K.createStateNotFoundError("Cached State");try{l=this.authModule.handleFragmentResponse(t,c)}catch(C){throw C instanceof rn&&C.subError===U.userCancelledError.code?F.createUserCancelledError():C}return h=this.browserStorage.generateNonceKey(c),u=this.browserStorage.getTemporaryCache(h),this.authCodeRequest.code=l.code,l.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(l.cloud_instance_host_name,r,i)]:[3,2];case 1:w.sent(),w.label=2;case 2:return l.nonce=u||void 0,l.state=c,l.client_info?this.authCodeRequest.clientInfo=l.client_info:(g=this.checkCcsCredentials(),g&&(this.authCodeRequest.ccsCredential=g)),[4,this.authModule.acquireToken(this.authCodeRequest,l)];case 3:return f=w.sent(),this.browserStorage.cleanRequestByState(o),[2,f]}})})},e}(Do);/*! @azure/msal-browser v2.38.3 2023-10-27 */var te;(function(n){n.INITIALIZE_START="msal:initializeStart",n.INITIALIZE_END="msal:initializeEnd",n.ACCOUNT_ADDED="msal:accountAdded",n.ACCOUNT_REMOVED="msal:accountRemoved",n.LOGIN_START="msal:loginStart",n.LOGIN_SUCCESS="msal:loginSuccess",n.LOGIN_FAILURE="msal:loginFailure",n.ACQUIRE_TOKEN_START="msal:acquireTokenStart",n.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",n.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",n.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",n.SSO_SILENT_START="msal:ssoSilentStart",n.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",n.SSO_SILENT_FAILURE="msal:ssoSilentFailure",n.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",n.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",n.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",n.HANDLE_REDIRECT_START="msal:handleRedirectStart",n.HANDLE_REDIRECT_END="msal:handleRedirectEnd",n.POPUP_OPENED="msal:popupOpened",n.LOGOUT_START="msal:logoutStart",n.LOGOUT_SUCCESS="msal:logoutSuccess",n.LOGOUT_FAILURE="msal:logoutFailure",n.LOGOUT_END="msal:logoutEnd",n.RESTORE_FROM_BFCACHE="msal:restoreFromBFCache"})(te||(te={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wt;(function(n){n.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",n.USER_CANCEL="USER_CANCEL",n.NO_NETWORK="NO_NETWORK",n.TRANSIENT_ERROR="TRANSIENT_ERROR",n.PERSISTENT_ERROR="PERSISTENT_ERROR",n.DISABLED="DISABLED",n.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(Wt||(Wt={}));var qn={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},Nt=function(n){xe(e,n);function e(t,o,r){var i=n.call(this,t,o)||this;return Object.setPrototypeOf(i,e.prototype),i.name="NativeAuthError",i.ext=r,i}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===Wt.PERSISTENT_ERROR||this.ext.status===Wt.DISABLED))return!0;switch(this.errorCode){case qn.extensionError.code:return!0;default:return!1}},e.createError=function(t,o,r){if(r&&r.status)switch(r.status){case Wt.ACCOUNT_UNAVAILABLE:return gt.createNativeAccountUnavailableError();case Wt.USER_INTERACTION_REQUIRED:return new gt(t,o);case Wt.USER_CANCEL:return F.createUserCancelledError();case Wt.NO_NETWORK:return F.createNoNetworkConnectivityError()}return new e(t,o,r)},e.createUserSwitchError=function(){return new e(qn.userSwitch.code,qn.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(qn.tokensNotFoundInCache.code,qn.tokensNotFoundInCache.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Yr=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c;return x(this,function(l){switch(l.label){case 0:return o=this.performanceClient.startMeasurement(R.SilentCacheClientAcquireToken,t.correlationId),r=this.initializeServerTelemetryManager(ke.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(r,t.authority,t.azureCloudOptions)];case 1:i=l.sent(),this.logger.verbose("Silent auth client created"),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,i.acquireCachedToken(t)];case 3:return s=l.sent(),o.endMeasurement({success:!0,fromCache:!0}),[2,s];case 4:throw c=l.sent(),c instanceof F&&c.errorCode===U.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),o.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new la(i,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(t,o){return z(this,void 0,void 0,function(){var r;return x(this,function(i){switch(i.label){case 0:return this.performanceClient.addQueueMeasurement(R.InitializeSilentRequest,this.correlationId),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,this.correlationId),r=[Q({},t)],[4,this.initializeBaseRequest(t,o)];case 1:return[2,Q.apply(void 0,[Q.apply(void 0,r.concat([i.sent()])),{account:o,forceRefresh:t.forceRefresh||!1}])]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Tn=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g,f,w){var C=n.call(this,t,o,r,i,s,c,h,u,w)||this;return C.apiId=l,C.accountId=g,C.nativeMessageHandler=u,C.nativeStorageManager=f,C.silentCacheClient=new Yr(t,C.nativeStorageManager,r,i,s,c,h,u,w),C}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),o=this.performanceClient.startMeasurement(R.NativeInteractionClientAcquireToken,t.correlationId),r=pt.nowSeconds(),[4,this.initializeNativeRequest(t)];case 1:i=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,i)];case 3:return s=u.sent(),o.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,s];case 4:return u.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return c={method:Vt.GetToken,request:i},[4,this.nativeMessageHandler.sendMessage(c)];case 6:return l=u.sent(),h=this.validateNativeResponse(l),[2,this.handleNativeResponse(h,i,r).then(function(g){return o.endMeasurement({success:!0,isNativeBroker:!0,requestId:g.requestId}),g}).catch(function(g){throw o.endMeasurement({success:!1,errorCode:g.errorCode,subErrorCode:g.subError,isNativeBroker:!0}),g})]}})})},e.prototype.createSilentCacheRequest=function(t,o){return{authority:t.authority,correlationId:this.correlationId,scopes:He.fromString(t.scope).asArray(),account:o,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c;return x(this,function(l){switch(l.label){case 0:if(!t)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),K.createNoAccountFoundError();if(r=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t}),!r)throw K.createNoAccountFoundError();l.label=1;case 1:return l.trys.push([1,3,,4]),i=this.createSilentCacheRequest(o,r),[4,this.silentCacheClient.acquireToken(i)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l;return x(this,function(h){switch(h.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(t)];case 1:o=h.sent(),r={method:Vt.GetToken,request:o},h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(r)];case 3:return i=h.sent(),this.validateNativeResponse(i),[3,5];case 4:if(s=h.sent(),s instanceof Nt&&s.isFatal())throw s;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ue.NATIVE_REQUEST,JSON.stringify(o),!0),c={apiId:ke.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},l=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(t.redirectUri),[4,this.navigationClient.navigateExternal(l,c)];case 6:return h.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return z(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(t=this.browserStorage.getCachedNativeRequest(),!t)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];o=t.prompt,r=Ir(t,["prompt"]),o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ue.NATIVE_REQUEST)),i={method:Vt.GetToken,request:r},s=pt.nowSeconds(),u.label=1;case 1:return u.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(i)];case 2:return c=u.sent(),this.validateNativeResponse(c),l=this.handleNativeResponse(c,r,s),this.browserStorage.setInteractionInProgress(!1),[2,l];case 3:throw h=u.sent(),this.browserStorage.setInteractionInProgress(!1),h;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(t,o,r){return z(this,void 0,void 0,function(){var i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),t.account.id!==o.accountId)throw Nt.createUserSwitchError();return[4,this.getDiscoveredAuthority(o.authority)];case 1:return i=g.sent(),s=i.getPreferredCache(),c=this.createIdTokenObj(t),l=this.createHomeAccountIdentifier(t,c),h=this.createAccountEntity(t,l,c,s),[4,this.generateAuthenticationResult(t,o,c,h,i.canonicalAuthority,r)];case 2:return u=g.sent(),this.cacheAccount(h),this.cacheNativeTokens(t,o,l,h,c,u.accessToken,u.tenantId,r),[2,u]}})})},e.prototype.createIdTokenObj=function(t){return new It(t.id_token||b.EMPTY_STRING,this.browserCrypto)},e.prototype.createHomeAccountIdentifier=function(t,o){var r=Ue.generateHomeAccountId(t.client_info||b.EMPTY_STRING,$e.Default,this.logger,this.browserCrypto,o);return r},e.prototype.createAccountEntity=function(t,o,r,i){return Ue.createAccount(t.client_info,o,r,void 0,void 0,void 0,i,t.account.id)},e.prototype.generateScopes=function(t,o){return t.scope?He.fromString(t.scope):He.fromString(o.scope)},e.prototype.generatePopAccessToken=function(t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:if(o.tokenType!==ge.POP)return[3,2];if(t.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),[2,t.shr];if(r=new wn(this.browserCrypto),i={resourceRequestMethod:o.resourceRequestMethod,resourceRequestUri:o.resourceRequestUri,shrClaims:o.shrClaims,shrNonce:o.shrNonce},!o.keyId)throw K.createKeyIdMissingError();return[4,r.signPopToken(t.access_token,o.keyId,i)];case 1:return[2,s.sent()];case 2:return[2,t.access_token]}})})},e.prototype.generateAuthenticationResult=function(t,o,r,i,s,c){return z(this,void 0,void 0,function(){var l,h,u,g,f,w,C,P;return x(this,function(M){switch(M.label){case 0:return l=this.addTelemetryFromNativeResponse(t),h=t.scope?He.fromString(t.scope):He.fromString(o.scope),u=t.account.properties||{},g=u.UID||r.claims.oid||r.claims.sub||b.EMPTY_STRING,f=u.TenantId||r.claims.tid||b.EMPTY_STRING,[4,this.generatePopAccessToken(t,o)];case 1:return w=M.sent(),C=o.tokenType===ge.POP?ge.POP:ge.BEARER,P={authority:s,uniqueId:g,tenantId:f,scopes:h.asArray(),account:i.getAccountInfo(),idToken:t.id_token,idTokenClaims:r.claims,accessToken:w,fromCache:l?this.isResponseFromCache(l):!1,expiresOn:new Date(Number(c+t.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:t.state,fromNativeBroker:!0},[2,P]}})})},e.prototype.cacheAccount=function(t){var o=this;this.browserStorage.setAccount(t),this.browserStorage.removeAccountContext(t).catch(function(r){o.logger.error("Error occurred while removing account context from browser storage. "+r)})},e.prototype.cacheNativeTokens=function(t,o,r,i,s,c,l,h){var u=sn.createIdTokenEntity(r,o.authority,t.id_token||b.EMPTY_STRING,o.clientId,s.claims.tid||b.EMPTY_STRING),g=o.tokenType===ge.POP?b.SHR_NONCE_VALIDITY:(typeof t.expires_in=="string"?parseInt(t.expires_in,10):t.expires_in)||0,f=h+g,w=this.generateScopes(t,o),C=cn.createAccessTokenEntity(r,o.authority,c,o.clientId,s?s.claims.tid||b.EMPTY_STRING:l,w.printScopes(),f,0,this.browserCrypto),P=new xn(i,u,C);this.nativeStorageManager.saveCacheRecord(P)},e.prototype.addTelemetryFromNativeResponse=function(t){var o=this.getMATSFromResponse(t);return o?(this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:o.broker_version,matsAccountJoinOnStart:o.account_join_on_start,matsAccountJoinOnEnd:o.account_join_on_end,matsDeviceJoin:o.device_join,matsPromptBehavior:o.prompt_behavior,matsApiErrorCode:o.api_error_code,matsUiVisible:o.ui_visible,matsSilentCode:o.silent_code,matsSilentBiSubCode:o.silent_bi_sub_code,matsSilentMessage:o.silent_message,matsSilentStatus:o.silent_status,matsHttpStatus:o.http_status,matsHttpEventCount:o.http_event_count},this.correlationId),o):null},e.prototype.validateNativeResponse=function(t){if(t.hasOwnProperty("access_token")&&t.hasOwnProperty("id_token")&&t.hasOwnProperty("client_info")&&t.hasOwnProperty("account")&&t.hasOwnProperty("scope")&&t.hasOwnProperty("expires_in"))return t;throw Nt.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(t){if(t.properties.MATS)try{return JSON.parse(t.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(t){return typeof t.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!t.is_cached},e.prototype.initializeNativeRequest=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f,w=this;return x(this,function(C){switch(C.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),o=t.authority||this.config.auth.authority,t.account?[4,this.validateRequestAuthority(o,t.account)]:[3,2];case 1:C.sent(),C.label=2;case 2:return r=new de(o),r.validateAsUri(),i=t.scopes,s=Ir(t,["scopes"]),c=new He(i||[]),c.appendScopes(An),l=function(){switch(w.apiId){case ke.ssoSilent:case ke.acquireTokenSilent_silentFlow:return w.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Ve.NONE}if(!t.prompt){w.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(t.prompt){case Ve.NONE:case Ve.CONSENT:case Ve.LOGIN:return w.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),t.prompt;default:throw w.logger.trace("initializeNativeRequest: prompt = "+t.prompt+" is not compatible with native flow"),F.createNativePromptParameterNotSupportedError()}},h=Q(Q({},s),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:c.printScopes(),redirectUri:this.getRedirectUri(t.redirectUri),prompt:l(),correlationId:this.correlationId,tokenType:t.authenticationScheme,windowTitleSubstring:document.title,extraParameters:Q(Q(Q({},t.extraQueryParameters),t.tokenQueryParameters),{telemetry:Dn.MATS_TELEMETRY}),extendedExpiryToken:!1}),t.authenticationScheme!==ge.POP?[3,4]:(u={resourceRequestUri:t.resourceRequestUri,resourceRequestMethod:t.resourceRequestMethod,shrClaims:t.shrClaims,shrNonce:t.shrNonce},g=new wn(this.browserCrypto),[4,g.generateCnf(u)]);case 3:f=C.sent(),h.reqCnf=f.reqCnfString,h.keyId=f.kid,C.label=4;case 4:return[2,h]}})})},e}(Qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var ln=function(){function n(e,t,o,r){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=r,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=o,this.handshakeEvent=o.startMeasurement(R.NativeMessageHandlerHandshake)}return n.prototype.sendMessage=function(e){return z(this,void 0,void 0,function(){var t,o=this;return x(this,function(r){return this.logger.trace("NativeMessageHandler - sendMessage called."),t={channel:Dn.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(t)),this.messageChannel.port1.postMessage(t),[2,new Promise(function(i,s){o.resolvers.set(t.responseId,{resolve:i,reject:s})})]})})},n.createProvider=function(e,t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:e.trace("NativeMessageHandler - createProvider called."),s.label=1;case 1:return s.trys.push([1,3,,5]),r=new n(e,t,o,Dn.PREFERRED_EXTENSION_ID),[4,r.sendHandshakeRequest()];case 2:return s.sent(),[2,r];case 3:return s.sent(),i=new n(e,t,o),[4,i.sendHandshakeRequest()];case 4:return s.sent(),[2,i];case 5:return[2]}})})},n.prototype.sendHandshakeRequest=function(){return z(this,void 0,void 0,function(){var e,t=this;return x(this,function(o){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:Dn.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Vt.HandshakeRequest}},this.handshakeEvent.addStaticFields({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=function(r){t.onChannelMessage(r)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(r,i){t.handshakeResolvers.set(e.responseId,{resolve:r,reject:i}),t.timeoutId=window.setTimeout(function(){window.removeEventListener("message",t.windowListener,!1),t.messageChannel.port1.close(),t.messageChannel.port2.close(),t.handshakeEvent.endMeasurement({extensionHandshakeTimedOut:!0,success:!1}),i(F.createNativeHandshakeTimeoutError()),t.handshakeResolvers.delete(e.responseId)},t.handshakeTimeoutMs)})]})})},n.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var t=e.data;if(!(!t.channel||t.channel!==Dn.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===Vt.HandshakeRequest){this.logger.verbose(t.extensionId?"Extension with id: "+t.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var o=this.handshakeResolvers.get(t.responseId);o&&(this.handshakeEvent.endMeasurement({success:!1,extensionInstalled:!1}),o.reject(F.createNativeExtensionNotInstalledError()))}}},n.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var t=e.data,o=this.resolvers.get(t.responseId),r=this.handshakeResolvers.get(t.responseId);try{var i=t.body.method;if(i===Vt.Response){if(!o)return;var s=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(s)),s.status!=="Success")o.reject(Nt.createError(s.code,s.description,s.ext));else if(s.result)s.result.code&&s.result.description?o.reject(Nt.createError(s.result.code,s.result.description,s.result.ext)):o.resolve(s.result);else throw Y.createUnexpectedError("Event does not contain result.");this.resolvers.delete(t.responseId)}else if(i===Vt.HandshakeResponse){if(!r)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),this.handshakeEvent.endMeasurement({extensionInstalled:!0,success:!0}),r.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(c){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+c.toString()),this.logger.errorPii("Unable to parse "+e),o?o.reject(c):r&&r.reject(c)}},n.prototype.getExtensionId=function(){return this.extensionId},n.prototype.getExtensionVersion=function(){return this.extensionVersion},n.isNativeAvailable=function(e,t,o,r){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!o)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(r)switch(r){case ge.BEARER:case ge.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ca=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,l,u,g)||this;return f.nativeStorage=h,f}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f=this;return x(this,function(w){switch(w.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Redirect)];case 1:o=w.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||b.EMPTY_STRING,o.account||null),r=this.initializeServerTelemetryManager(ke.acquireTokenRedirect),i=function(C){C.persisted&&(f.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),f.browserStorage.cleanRequestByState(o.state),f.eventHandler.emitEvent(te.RESTORE_FROM_BFCACHE,$.Redirect))},w.label=2;case 2:return w.trys.push([2,7,,8]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(o)];case 3:return s=w.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(r,o.authority,o.azureCloudOptions)];case 4:return c=w.sent(),this.logger.verbose("Auth code client created"),l=new Wr(c,this.browserStorage,s,this.logger,this.browserCrypto,this.performanceClient),[4,c.getAuthCodeUrl(Q(Q({},o),{nativeBroker:ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}))];case 5:return h=w.sent(),u=this.getRedirectStartPage(t.redirectStartPage),this.logger.verbosePii("Redirect start page: "+u),window.addEventListener("pageshow",i),[4,l.initiateAuthRequest(h,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:u,onRedirectNavigate:t.onRedirectNavigate})];case 6:return[2,w.sent()];case 7:throw g=w.sent(),g instanceof Y&&g.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),r.cacheFailedRequest(g),this.browserStorage.cleanRequestByState(o.state),g;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f,w,C;return x(this,function(P){switch(P.label){case 0:o=this.initializeServerTelemetryManager(ke.handleRedirectPromise),P.label=1;case 1:if(P.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(r=this.getRedirectResponseHash(t||window.location.hash),!r)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType($.Redirect),[2,null];i=void 0;try{s=de.getDeserializedHash(r),i=this.validateAndExtractStateFromHash(s,$.Redirect),this.logger.verbose("State extracted from hash")}catch(M){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+M),this.browserStorage.cleanRequestByInteractionType($.Redirect),[2,null]}return c=this.browserStorage.getTemporaryCache(ue.ORIGIN_URI,!0)||b.EMPTY_STRING,l=de.removeHashFromUrl(c),h=de.removeHashFromUrl(window.location.href),l===h&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(r,i,o)]):[3,3];case 2:return u=P.sent(),c.indexOf("#")>-1&&Ee.replaceHash(c),[2,u];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(r,i,o)]);case 4:return!Ee.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ue.URL_HASH,r,!0),g={apiId:ke.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},f=!0,!c||c==="null"?(w=Ee.getHomepage(),this.browserStorage.setTemporaryCache(ue.ORIGIN_URI,w,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(w,g)]):[3,6]):[3,9];case 5:return f=P.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+c),[4,this.navigationClient.navigateInternal(c,g)];case 7:f=P.sent(),P.label=8;case 8:if(!f)return[2,this.handleHash(r,i,o)];P.label=9;case 9:return[2,null];case 10:throw C=P.sent(),C instanceof Y&&C.setCorrelationId(this.correlationId),o.cacheFailedRequest(C),this.browserStorage.cleanRequestByInteractionType($.Redirect),C;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(t){this.logger.verbose("getRedirectResponseHash called");var o=de.hashContainsKnownProperties(t);if(o)return Ee.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),t;var r=this.browserStorage.getTemporaryCache(ue.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ue.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),r},e.prototype.handleHash=function(t,o,r){return z(this,void 0,void 0,function(){var i,s,c,l,h,u,g,f=this;return x(this,function(w){switch(w.label){case 0:if(i=this.browserStorage.getCachedRequest(o,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),s=de.getDeserializedHash(t),s.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return c=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,s.accountId,this.nativeStorage,i.correlationId),l=Ft.parseRequestState(this.browserCrypto,o).userRequestState,[2,c.acquireToken(Q(Q({},i),{state:l,prompt:void 0})).finally(function(){f.browserStorage.cleanRequestByState(o)})]}if(h=this.browserStorage.getCachedAuthority(o),!h)throw F.createNoCachedAuthorityError();return this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,i.correlationId),[4,this.createAuthCodeClient(r,h)];case 1:return u=w.sent(),this.logger.verbose("Auth code client created"),eo.removeThrottle(this.browserStorage,this.config.auth.clientId,i),g=new Wr(u,this.browserStorage,i,this.logger,this.browserCrypto,this.performanceClient),[4,g.handleCodeResponseFromHash(t,o,u.authority,this.networkClient)];case 2:return[2,w.sent()]}})})},e.prototype.logout=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:this.logger.verbose("logoutRedirect called"),o=this.initializeLogoutRequest(t),r=this.initializeServerTelemetryManager(ke.logout),u.label=1;case 1:return u.trys.push([1,10,,11]),this.eventHandler.emitEvent(te.LOGOUT_START,$.Redirect,t),[4,this.clearCacheOnLogout(o.account)];case 2:return u.sent(),i={apiId:ke.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,o.correlationId),[4,this.createAuthCodeClient(r,t&&t.authority)];case 3:return s=u.sent(),this.logger.verbose("Auth code client created"),c=s.getLogoutUri(o),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,$.Redirect,o),t&&typeof t.onRedirectNavigate=="function"?(l=t.onRedirectNavigate(c),l===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(c,i)])):[3,7];case 4:return u.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),u.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(c,i)];case 8:return u.sent(),[2];case 9:return[3,11];case 10:throw h=u.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),r.cacheFailedRequest(h),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,$.Redirect,null,h),this.eventHandler.emitEvent(te.LOGOUT_END,$.Redirect),h;case 11:return this.eventHandler.emitEvent(te.LOGOUT_END,$.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(t){var o=t||window.location.href;return de.getAbsoluteUrl(o,Ee.getCurrentUri())},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ea=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,l,u,g)||this;return f.unloadWindow=f.unloadWindow.bind(f),f.nativeStorage=h,f}return e.prototype.acquireToken=function(t){try{var o=this.generatePopupName(t.scopes||An,t.authority||this.config.auth.authority),r=t.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(t,o,r);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var i=this.openSizedPopup("about:blank",o,r);return this.acquireTokenPopupAsync(t,o,r,i)}catch(s){return Promise.reject(s)}},e.prototype.logout=function(t){try{this.logger.verbose("logoutPopup called");var o=this.initializeLogoutRequest(t),r=this.generateLogoutPopupName(o),i=t&&t.authority,s=t&&t.mainWindowRedirectUri,c=(t==null?void 0:t.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(o,r,c,i,void 0,s);this.logger.verbose("asyncPopup set to false, opening popup");var l=this.openSizedPopup("about:blank",r,c);return this.logoutPopupAsync(o,r,c,i,l,s)}catch(h){return Promise.reject(h)}},e.prototype.acquireTokenPopupAsync=function(t,o,r,i){return z(this,void 0,void 0,function(){var s,c,l,h,u,g,f,w,C,P,M,j,N,T,B,V,G,J=this;return x(this,function(I){switch(I.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),s=this.initializeServerTelemetryManager(ke.acquireTokenPopup),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Popup)];case 1:c=I.sent(),this.browserStorage.updateCacheEntries(c.state,c.nonce,c.authority,c.loginHint||b.EMPTY_STRING,c.account||null),I.label=2;case 2:return I.trys.push([2,8,,9]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(c)];case 3:return l=I.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(s,c.authority,c.azureCloudOptions)];case 4:return h=I.sent(),this.logger.verbose("Auth code client created"),u=ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme),g=void 0,u&&(g=this.performanceClient.startMeasurement(R.FetchAccountIdWithNativeBroker,t.correlationId)),[4,h.getAuthCodeUrl(Q(Q({},c),{nativeBroker:u}))];case 5:return f=I.sent(),w=new Do(h,this.browserStorage,l,this.logger,this.performanceClient),C={popup:i,popupName:o,popupWindowAttributes:r},P=this.initiateAuthRequest(f,C),this.eventHandler.emitEvent(te.POPUP_OPENED,$.Popup,{popupWindow:P},null),[4,this.monitorPopupForHash(P)];case 6:if(M=I.sent(),j=de.getDeserializedHash(M),N=this.validateAndExtractStateFromHash(j,$.Popup,c.correlationId),eo.removeThrottle(this.browserStorage,this.config.auth.clientId,l),j.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),g&&g.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return T=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,j.accountId,this.nativeStorage,c.correlationId),B=Ft.parseRequestState(this.browserCrypto,N).userRequestState,[2,T.acquireToken(Q(Q({},c),{state:B,prompt:void 0})).finally(function(){J.browserStorage.cleanRequestByState(N)})]}return[4,w.handleCodeResponseFromHash(M,N,h.authority,this.networkClient)];case 7:return V=I.sent(),[2,V];case 8:throw G=I.sent(),i&&i.close(),G instanceof Y&&G.setCorrelationId(this.correlationId),s.cacheFailedRequest(G),this.browserStorage.cleanRequestByState(c.state),G;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(t,o,r,i,s,c){return z(this,void 0,void 0,function(){var l,h,u,g,f,w,C;return x(this,function(P){switch(P.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(te.LOGOUT_START,$.Popup,t),l=this.initializeServerTelemetryManager(ke.logoutPopup),P.label=1;case 1:return P.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(t.account)];case 2:return P.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(l,i)];case 3:return h=P.sent(),this.logger.verbose("Auth code client created"),u=h.getLogoutUri(t),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,$.Popup,t),g=this.openPopup(u,{popupName:o,popupWindowAttributes:r,popup:s}),this.eventHandler.emitEvent(te.POPUP_OPENED,$.Popup,{popupWindow:g},null),[4,this.waitForLogoutPopup(g)];case 4:return P.sent(),c?(f={apiId:ke.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},w=de.getAbsoluteUrl(c,Ee.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+w),this.navigationClient.navigateInternal(w,f)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw C=P.sent(),s&&s.close(),C instanceof Y&&C.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,$.Popup,null,C),this.eventHandler.emitEvent(te.LOGOUT_END,$.Popup),l.cacheFailedRequest(C),C;case 6:return this.eventHandler.emitEvent(te.LOGOUT_END,$.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(t,o){if(H.isEmpty(t))throw this.logger.error("Navigate url is empty"),F.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+t),this.openPopup(t,o)},e.prototype.monitorPopupForHash=function(t){var o=this;return new Promise(function(r,i){var s=o.config.system.windowHashTimeout/o.config.system.pollIntervalMilliseconds,c=0;o.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var l=setInterval(function(){if(t.closed){o.logger.error("PopupHandler.monitorPopupForHash - window closed"),o.cleanPopup(),clearInterval(l),i(F.createUserCancelledError());return}var h=b.EMPTY_STRING,u=b.EMPTY_STRING;try{h=t.location.href,u=t.location.hash}catch{}H.isEmpty(h)||h==="about:blank"||(o.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),c++,u?(o.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(l),o.cleanPopup(t),de.hashContainsKnownProperties(u)?(o.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),r(u)):(o.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),o.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+u),i(F.createHashDoesNotContainKnownPropertiesError()))):c>s&&(o.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(l),i(F.createMonitorPopupTimeoutError())))},o.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(t){var o=this;return new Promise(function(r){o.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var i=setInterval(function(){t.closed&&(o.logger.error("PopupHandler.waitForLogoutPopup - window closed"),o.cleanPopup(),clearInterval(i),r());var s=b.EMPTY_STRING;try{s=t.location.href}catch{}H.isEmpty(s)||s==="about:blank"||(o.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(i),o.cleanPopup(t),r())},o.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(t,o){try{var r=void 0;if(o.popup?(r=o.popup,this.logger.verbosePii("Navigating popup window to: "+t),r.location.assign(t)):typeof o.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+t),r=this.openSizedPopup(t,o.popupName,o.popupWindowAttributes)),!r)throw F.createEmptyWindowCreatedError();return r.focus&&r.focus(),this.currentWindow=r,window.addEventListener("beforeunload",this.unloadWindow),r}catch(i){throw this.logger.error("error opening popup "+i.message),this.browserStorage.setInteractionInProgress(!1),F.createPopupWindowError(i.toString())}},e.prototype.openSizedPopup=function(t,o,r){var i,s,c,l,h=window.screenLeft?window.screenLeft:window.screenX,u=window.screenTop?window.screenTop:window.screenY,g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,w=(i=r.popupSize)===null||i===void 0?void 0:i.width,C=(s=r.popupSize)===null||s===void 0?void 0:s.height,P=(c=r.popupPosition)===null||c===void 0?void 0:c.top,M=(l=r.popupPosition)===null||l===void 0?void 0:l.left;return(!w||w<0||w>g)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),w=_t.POPUP_WIDTH),(!C||C<0||C>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),C=_t.POPUP_HEIGHT),(!P||P<0||P>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),P=Math.max(0,f/2-_t.POPUP_HEIGHT/2+u)),(!M||M<0||M>g)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),M=Math.max(0,g/2-_t.POPUP_WIDTH/2+h)),window.open(t,o,"width="+w+", height="+C+", top="+P+", left="+M+", scrollbars=yes")},e.prototype.unloadWindow=function(t){this.browserStorage.cleanRequestByInteractionType($.Popup),this.currentWindow&&this.currentWindow.close(),t.preventDefault()},e.prototype.cleanPopup=function(t){t&&t.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(t,o){return _t.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+t.join("-")+"."+o+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(t){var o=t.account&&t.account.homeAccountId;return _t.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+o+"."+this.correlationId},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ta=function(){function n(){}return n.prototype.navigateInternal=function(e,t){return n.defaultNavigateWindow(e,t)},n.prototype.navigateExternal=function(e,t){return n.defaultNavigateWindow(e,t)},n.defaultNavigateWindow=function(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(o){setTimeout(function(){o(!0)},t.timeout)})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Sa=6e4,jo=6e3,Ia=3e4,Aa=2e3;function Ra(n,e){var t=n.auth,o=n.cache,r=n.system,i=n.telemetry,s={clientId:b.EMPTY_STRING,authority:""+b.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:b.EMPTY_STRING,authorityMetadata:b.EMPTY_STRING,redirectUri:b.EMPTY_STRING,postLogoutRedirectUri:b.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Bn.AAD,azureCloudOptions:{azureCloudInstance:On.None,tenant:b.EMPTY_STRING},skipAuthorityMetadataCache:!1},c={cacheLocation:Ae.SessionStorage,temporaryCacheLocation:Ae.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(o&&o.cacheLocation===Ae.LocalStorage),claimsBasedCachingEnabled:!0},l={loggerCallback:function(){},logLevel:ze.Info,piiLoggingEnabled:!1},h=Q(Q({},Mr),{loggerOptions:l,networkClient:e?Ee.getBrowserNetworkClient():ma,navigationClient:new Ta,loadFrameTimeout:0,windowHashTimeout:(r==null?void 0:r.loadFrameTimeout)||Sa,iframeHashTimeout:(r==null?void 0:r.loadFrameTimeout)||jo,navigateFrameWait:e&&Ee.detectIEOrEdge()?500:0,redirectNavigationTimeout:Ia,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(r==null?void 0:r.nativeBrokerHandshakeTimeout)||Aa,pollIntervalMilliseconds:_t.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),u=Q(Q({},r),{loggerOptions:(r==null?void 0:r.loggerOptions)||l}),g={application:{appName:b.EMPTY_STRING,appVersion:b.EMPTY_STRING}},f={auth:Q(Q({},s),t),cache:Q(Q({},c),o),system:Q(Q({},h),u),telemetry:Q(Q({},g),i)};return f}/*! @azure/msal-browser v2.38.3 2023-10-27 */var Jr=function(n){xe(e,n);function e(t,o,r,i,s,c){var l=n.call(this,t,o,r,i,c)||this;return l.navigateFrameWait=s.navigateFrameWait,l.pollIntervalMilliseconds=s.pollIntervalMilliseconds,l}return e.prototype.initiateAuthRequest=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){switch(o.label){case 0:if(this.performanceClient.addQueueMeasurement(R.SilentHandlerInitiateAuthRequest,this.authCodeRequest.correlationId),H.isEmpty(t))throw this.logger.info("Navigate url is empty"),F.createEmptyNavigationUriError();return this.navigateFrameWait?(this.performanceClient.setPreQueueTime(R.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),[4,this.loadFrame(t)]):[3,2];case 1:return[2,o.sent()];case 2:return[2,this.loadFrameSync(t)]}})})},e.prototype.monitorIframeForHash=function(t,o){var r=this;return this.performanceClient.addQueueMeasurement(R.SilentHandlerMonitorIframeForHash,this.authCodeRequest.correlationId),new Promise(function(i,s){o<jo&&r.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+o+"ms) than the default ("+jo+"ms). This may result in timeouts.");var c=window.performance.now(),l=c+o,h=setInterval(function(){if(window.performance.now()>l){r.removeHiddenIframe(t),clearInterval(h),s(F.createMonitorIframeTimeoutError());return}var u=b.EMPTY_STRING,g=t.contentWindow;try{u=g?g.location.href:b.EMPTY_STRING}catch{}if(!H.isEmpty(u)){var f=g?g.location.hash:b.EMPTY_STRING;if(de.hashContainsKnownProperties(f)){r.removeHiddenIframe(t),clearInterval(h),i(f);return}}},r.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(t){var o=this;return this.performanceClient.addQueueMeasurement(R.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),new Promise(function(r,i){var s=o.createHiddenIframe();setTimeout(function(){if(!s){i("Unable to load iframe");return}s.src=t,r(s)},o.navigateFrameWait)})},e.prototype.loadFrameSync=function(t){var o=this.createHiddenIframe();return o.src=t,o},e.prototype.createHiddenIframe=function(){var t=document.createElement("iframe");return t.style.visibility="hidden",t.style.position="absolute",t.style.width=t.style.height="0",t.style.border="0",t.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(t),t},e.prototype.removeHiddenIframe=function(t){document.body===t.parentNode&&document.body.removeChild(t)},e}(Do);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Na=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g,f){var w=n.call(this,t,o,r,i,s,c,h,g,f)||this;return w.apiId=l,w.nativeStorage=u,w}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c;return x(this,function(l){switch(l.label){case 0:if(this.performanceClient.addQueueMeasurement(R.SilentIframeClientAcquireToken,t.correlationId),this.logger.verbose("acquireTokenByIframe called"),o=this.performanceClient.startMeasurement(R.SilentIframeClientAcquireToken,t.correlationId),H.isEmpty(t.loginHint)&&H.isEmpty(t.sid)&&(!t.account||H.isEmpty(t.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),t.prompt&&t.prompt!==Ve.NONE&&t.prompt!==Ve.NO_SESSION)throw o.endMeasurement({success:!1}),F.createSilentPromptValueError(t.prompt);return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(Q(Q({},t),{prompt:t.prompt||Ve.NONE}),$.Silent)];case 1:r=l.sent(),this.browserStorage.updateCacheEntries(r.state,r.nonce,r.authority,r.loginHint||b.EMPTY_STRING,r.account||null),i=this.initializeServerTelemetryManager(this.apiId),l.label=2;case 2:return l.trys.push([2,5,,6]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(i,r.authority,r.azureCloudOptions)];case 3:return s=l.sent(),this.logger.verbose("Auth code client created"),this.performanceClient.setPreQueueTime(R.SilentIframeClientTokenHelper,t.correlationId),[4,this.silentTokenHelper(s,r).then(function(h){return o.endMeasurement({success:!0,fromCache:!1,requestId:h.requestId}),h})];case 4:return[2,l.sent()];case 5:throw c=l.sent(),c instanceof Y&&c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c),this.browserStorage.cleanRequestByState(r.state),o.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c,l,h,u,g,f,w=this;return x(this,function(C){switch(C.label){case 0:return this.performanceClient.addQueueMeasurement(R.SilentIframeClientTokenHelper,o.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,o.correlationId),[4,this.initializeAuthorizationCodeRequest(o)];case 1:return r=C.sent(),this.performanceClient.setPreQueueTime(R.GetAuthCodeUrl,o.correlationId),[4,t.getAuthCodeUrl(Q(Q({},o),{nativeBroker:ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,o.authenticationScheme)}))];case 2:return i=C.sent(),s=new Jr(t,this.browserStorage,r,this.logger,this.config.system,this.performanceClient),this.performanceClient.setPreQueueTime(R.SilentHandlerInitiateAuthRequest,o.correlationId),[4,s.initiateAuthRequest(i)];case 3:return c=C.sent(),this.performanceClient.setPreQueueTime(R.SilentHandlerMonitorIframeForHash,o.correlationId),[4,s.monitorIframeForHash(c,this.config.system.iframeHashTimeout)];case 4:if(l=C.sent(),h=de.getDeserializedHash(l),u=this.validateAndExtractStateFromHash(h,$.Silent,r.correlationId),h.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return g=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,h.accountId,this.browserStorage,this.correlationId),f=Ft.parseRequestState(this.browserCrypto,u).userRequestState,[2,g.acquireToken(Q(Q({},o),{state:f,prompt:o.prompt||Ve.NONE})).finally(function(){w.browserStorage.cleanRequestByState(u)})]}return this.performanceClient.setPreQueueTime(R.HandleCodeResponseFromHash,o.correlationId),[2,s.handleCodeResponseFromHash(l,u,t.authority,this.networkClient)]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Pa=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l=this;return x(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(R.SilentRefreshClientAcquireToken,t.correlationId),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,t.correlationId),r=[Q({},t)],[4,this.initializeBaseRequest(t,t.account)];case 1:return o=Q.apply(void 0,r.concat([h.sent()])),i=this.performanceClient.startMeasurement(R.SilentRefreshClientAcquireToken,o.correlationId),s=this.initializeServerTelemetryManager(ke.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(s,o.authority,o.azureCloudOptions)];case 2:return c=h.sent(),this.logger.verbose("Refresh token client created"),this.performanceClient.setPreQueueTime(R.RefreshTokenClientAcquireTokenByRefreshToken,t.correlationId),[2,c.acquireTokenByRefreshToken(o).then(function(u){return i.endMeasurement({success:!0,fromCache:u.fromCache,requestId:u.requestId}),u}).catch(function(u){throw u instanceof Y&&u.setCorrelationId(l.correlationId),s.cacheFailedRequest(u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new zr(i,this.performanceClient)]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ma=function(){function n(e,t){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=t,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return n.prototype.addEventCallback=function(e){if(typeof window<"u"){var t=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(t,e),this.logger.verbose("Event callback registered with id: "+t),t}return null},n.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},n.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))},n.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))},n.prototype.emitEvent=function(e,t,o,r){var i=this;if(typeof window<"u"){var s={eventType:e,interactionType:t||null,payload:o||null,error:r||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(c,l){i.logger.verbose("Emitting event to callback "+l+": "+e),c.apply(null,[s])})}},n.prototype.handleAccountCacheChange=function(e){try{var t=e.newValue||e.oldValue;if(!t)return;var o=JSON.parse(t);if(typeof o!="object"||!Ue.isAccountEntity(o))return;var r=Je.toObject(new Ue,o),i=r.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(te.ACCOUNT_ADDED,void 0,i)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(te.ACCOUNT_REMOVED,void 0,i))}catch{return}},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ke=function(){function n(){}return n.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Xr=function(){function n(e){this.cryptoObj=e}return n.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,Ke.decimalToHex(e[0])+Ke.decimalToHex(e[1])+Ke.decimalToHex(e[2])+Ke.decimalToHex(e[3])+"-"+Ke.decimalToHex(e[4])+Ke.decimalToHex(e[5])+"-"+Ke.decimalToHex(e[6])+Ke.decimalToHex(e[7])+"-"+Ke.decimalToHex(e[8])+Ke.decimalToHex(e[9])+"-"+Ke.decimalToHex(e[10])+Ke.decimalToHex(e[11])+Ke.decimalToHex(e[12])+Ke.decimalToHex(e[13])+Ke.decimalToHex(e[14])+Ke.decimalToHex(e[15])}catch{for(var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",o="0123456789abcdef",r=0,i=b.EMPTY_STRING,s=0;s<36;s++)t[s]!=="-"&&t[s]!=="4"&&(r=Math.random()*16|0),t[s]==="x"?i+=o[r]:t[s]==="y"?(r&=3,r|=8,i+=o[r]):i+=t[s];return i}},n.prototype.isGuid=function(e){var t=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return t.test(e)},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ht=function(){function n(){}return n.stringToUtf8Arr=function(e){for(var t,o=0,r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),o+=t<128?1:t<2048?2:t<65536?3:t<2097152?4:t<67108864?5:6;for(var s=new Uint8Array(o),c=0,l=0;c<o;l++)t=e.charCodeAt(l),t<128?s[c++]=t:t<2048?(s[c++]=192+(t>>>6),s[c++]=128+(t&63)):t<65536?(s[c++]=224+(t>>>12),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):t<2097152?(s[c++]=240+(t>>>18),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):t<67108864?(s[c++]=248+(t>>>24),s[c++]=128+(t>>>18&63),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):(s[c++]=252+(t>>>30),s[c++]=128+(t>>>24&63),s[c++]=128+(t>>>18&63),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63));return s},n.stringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),r=0;r<e.length;r++)o[r]=e.charCodeAt(r);return t},n.utf8ArrToString=function(e){for(var t=b.EMPTY_STRING,o=void 0,r=e.length,i=0;i<r;i++)o=e[i],t+=String.fromCharCode(o>251&&o<254&&i+5<r?(o-252)*1073741824+(e[++i]-128<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>247&&o<252&&i+4<r?(o-248<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>239&&o<248&&i+3<r?(o-240<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>223&&o<240&&i+2<r?(o-224<<12)+(e[++i]-128<<6)+e[++i]-128:o>191&&o<224&&i+1<r?(o-192<<6)+e[++i]-128:o);return t},n.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Zr=function(){function n(){}return n.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},n.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},n.prototype.encode=function(e){var t=Ht.stringToUtf8Arr(e);return this.base64EncArr(t)},n.prototype.base64EncArr=function(e){for(var t=(3-e.length%3)%3,o=b.EMPTY_STRING,r=void 0,i=e.length,s=0,c=0;c<i;c++)r=c%3,s|=e[c]<<(16>>>r&24),(r===2||e.length-c===1)&&(o+=String.fromCharCode(this.uint6ToB64(s>>>18&63),this.uint6ToB64(s>>>12&63),this.uint6ToB64(s>>>6&63),this.uint6ToB64(s&63)),s=0);return t===0?o:o.substring(0,o.length-t)+(t===1?"=":"==")},n.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var La=function(){function n(){}return n.prototype.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Invalid base64 string")}var o=this.base64DecToArr(t);return Ht.utf8ArrToString(o)},n.prototype.base64DecToArr=function(e,t){for(var o=e.replace(/[^A-Za-z0-9\+\/]/g,b.EMPTY_STRING),r=o.length,i=t?Math.ceil((r*3+1>>>2)/t)*t:r*3+1>>>2,s=new Uint8Array(i),c=void 0,l=void 0,h=0,u=0,g=0;g<r;g++)if(l=g&3,h|=this.b64ToUint6(o.charCodeAt(g))<<18-6*l,l===3||r-g===1){for(c=0;c<3&&u<i;c++,u++)s[u]=h>>>(16>>>c&24)&255;h=0}return s},n.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Oa=32,za=function(){function n(e){this.base64Encode=new Zr,this.cryptoObj=e}return n.prototype.generateCodes=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return t=o.sent(),[2,{verifier:e,challenge:t}]}})})},n.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(Oa);this.cryptoObj.getRandomValues(e);var t=this.base64Encode.urlEncodeArr(e);return t}catch(o){throw F.createPkceNotGeneratedError(o)}},n.prototype.generateCodeChallengeFromVerifier=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return t=r.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(t))];case 2:throw o=r.sent(),F.createPkceNotGeneratedError(o);case 3:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var xa=function(){function n(){}return n.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.crypto.subtle.generateKey(e,t,o)]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,window.crypto.subtle.exportKey(Cn,e)]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){return x(this,function(i){return[2,window.crypto.subtle.importKey(Cn,e,t,o,r)]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.crypto.subtle.sign(e,t,o)]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,window.crypto.subtle.digest(e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ba=function(){function n(){}return n.prototype.initPrng=function(e){return window.msrCrypto.initPrng(Eo(e))},n.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.msrCrypto.subtle.generateKey(e,t,o)]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,window.msrCrypto.subtle.exportKey(Cn,e)]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){return x(this,function(i){return[2,window.msrCrypto.subtle.importKey(Cn,e,t,o,r)]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.msrCrypto.subtle.sign(e,t,o)]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,window.msrCrypto.subtle.digest(e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ua=function(){function n(){}return n.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,new Promise(function(i,s){var c=window.msCrypto.subtle.generateKey(e,t,o);c.addEventListener("complete",function(l){i(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,new Promise(function(o,r){var i=window.msCrypto.subtle.exportKey(Cn,e);i.addEventListener("complete",function(s){var c=s.target.result,l=Ht.utf8ArrToString(new Uint8Array(c)).replace(/\r/g,b.EMPTY_STRING).replace(/\n/g,b.EMPTY_STRING).replace(/\t/g,b.EMPTY_STRING).split(" ").join(b.EMPTY_STRING).replace("\0",b.EMPTY_STRING);try{o(JSON.parse(l))}catch(h){r(h)}}),i.addEventListener("error",function(s){r(s)})})]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){var i,s;return x(this,function(c){return i=Ht.getSortedObjectString(e),s=Ht.stringToArrayBuffer(i),[2,new Promise(function(l,h){var u=window.msCrypto.subtle.importKey(Cn,s,t,o,r);u.addEventListener("complete",function(g){l(g.target.result)}),u.addEventListener("error",function(g){h(g)})})]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,new Promise(function(i,s){var c=window.msCrypto.subtle.sign(e,t,o);c.addEventListener("complete",function(l){i(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,new Promise(function(r,i){var s=window.msCrypto.subtle.digest(e,t.buffer);s.addEventListener("complete",function(c){r(c.target.result)}),s.addEventListener("error",function(c){i(c)})})]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Da="RSASSA-PKCS1-v1_5",ei="SHA-256",ja=2048,qa=new Uint8Array([1,0,1]),ti=function(){function n(e,t){var o,r;if(this.logger=e,this.cryptoOptions=t,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new xa;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new Ua;else if(this.hasMsrCrypto()&&(!((o=this.cryptoOptions)===null||o===void 0)&&o.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new Ba;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),F.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((r=this.cryptoOptions)===null||r===void 0)&&r.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),ao.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:Da,hash:ei,modulusLength:ja,publicExponent:qa}}return n.prototype.hasIECrypto=function(){return"msCrypto"in window},n.prototype.hasBrowserCrypto=function(){return"crypto"in window},n.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},n.prototype.sha256Digest=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return t=Ht.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:ei},t)]})})},n.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},n.prototype.generateKeyPair=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,t)]})})},n.prototype.exportJwk=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,this.subtleCrypto.exportKey(e)]})})},n.prototype.importJwk=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,t,o)]})})},n.prototype.sign=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Fa=function(){function n(){this.dbName=zo,this.version=va,this.tableName=ya,this.dbOpen=!1}return n.prototype.open=function(){return z(this,void 0,void 0,function(){var e=this;return x(this,function(t){return[2,new Promise(function(o,r){var i=window.indexedDB.open(e.dbName,e.version);i.addEventListener("upgradeneeded",function(s){var c=s;c.target.result.createObjectStore(e.tableName)}),i.addEventListener("success",function(s){var c=s;e.db=c.target.result,e.dbOpen=!0,o()}),i.addEventListener("error",function(){return r(F.createDatabaseUnavailableError())})})]})})},n.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},n.prototype.validateDbIsOpen=function(){return z(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},n.prototype.getItem=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readonly"),c=s.objectStore(t.tableName),l=c.get(e);l.addEventListener("success",function(h){var u=h;t.closeConnection(),r(u.target.result)}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.setItem=function(e,t){return z(this,void 0,void 0,function(){var o=this;return x(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(i,s){if(!o.db)return s(F.createDatabaseNotOpenError());var c=o.db.transaction([o.tableName],"readwrite"),l=c.objectStore(o.tableName),h=l.put(t,e);h.addEventListener("success",function(){o.closeConnection(),i()}),h.addEventListener("error",function(u){o.closeConnection(),s(u)})})]}})})},n.prototype.removeItem=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readwrite"),c=s.objectStore(t.tableName),l=c.delete(e);l.addEventListener("success",function(){t.closeConnection(),r()}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.getKeys=function(){return z(this,void 0,void 0,function(){var e=this;return x(this,function(t){switch(t.label){case 0:return[4,this.validateDbIsOpen()];case 1:return t.sent(),[2,new Promise(function(o,r){if(!e.db)return r(F.createDatabaseNotOpenError());var i=e.db.transaction([e.tableName],"readonly"),s=i.objectStore(e.tableName),c=s.getAllKeys();c.addEventListener("success",function(l){var h=l;e.closeConnection(),o(h.target.result)}),c.addEventListener("error",function(l){e.closeConnection(),r(l)})})]}})})},n.prototype.containsKey=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readonly"),c=s.objectStore(t.tableName),l=c.count(e);l.addEventListener("success",function(h){var u=h;t.closeConnection(),r(u.target.result===1)}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.deleteDatabase=function(){return z(this,void 0,void 0,function(){return x(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(t,o){var r=window.indexedDB.deleteDatabase(zo);r.addEventListener("success",function(){return t(!0)}),r.addEventListener("blocked",function(){return t(!0)}),r.addEventListener("error",function(){return o(!1)})})]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ni=function(){function n(e,t){this.inMemoryCache=new xo,this.indexedDBCache=new Fa,this.logger=e,this.storeName=t}return n.prototype.handleDatabaseAccessError=function(e){if(e instanceof F&&e.errorCode===U.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},n.prototype.getItem=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:if(t=this.inMemoryCache.getItem(e),t)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,r.sent()];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2,t]}})})},n.prototype.setItem=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(r.label){case 0:this.inMemoryCache.setItem(e,t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,t)];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2]}})})},n.prototype.removeItem=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:this.inMemoryCache.removeItem(e),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return o.sent(),[3,4];case 3:return t=o.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2]}})})},n.prototype.getKeys=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,o.sent()];case 3:return t=o.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2,e]}})})},n.prototype.containsKey=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:if(t=this.inMemoryCache.containsKey(e),t)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,r.sent()];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2,t]}})})},n.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},n.prototype.clearPersistent=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=o.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return t=o.sent(),this.handleDatabaseAccessError(t),[2,!1];case 3:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var so;(function(n){n.asymmetricKeys="asymmetricKeys",n.symmetricKeys="symmetricKeys"})(so||(so={}));var Va=function(){function n(e){this.logger=e,this.asymmetricKeys=new ni(this.logger,so.asymmetricKeys),this.symmetricKeys=new ni(this.logger,so.symmetricKeys)}return n.prototype.clear=function(){return z(this,void 0,void 0,function(){var e;return x(this,function(t){switch(t.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return t.sent(),[2,!0];case 3:return e=t.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ha=function(){function n(e,t,o){this.logger=e,this.browserCrypto=new ti(this.logger,o),this.b64Encode=new Zr,this.b64Decode=new La,this.guidGenerator=new Xr(this.browserCrypto),this.pkceGenerator=new za(this.browserCrypto),this.cache=new Va(this.logger),this.performanceClient=t}return n.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},n.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},n.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},n.prototype.generatePkceCodes=function(){return z(this,void 0,void 0,function(){return x(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},n.prototype.getPublicKeyThumbprint=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:return o=(t=this.performanceClient)===null||t===void 0?void 0:t.startMeasurement(R.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(n.EXTRACTABLE,n.POP_KEY_USAGES)];case 1:return r=g.sent(),[4,this.browserCrypto.exportJwk(r.publicKey)];case 2:return i=g.sent(),s={e:i.e,kty:i.kty,n:i.n},c=Ht.getSortedObjectString(s),[4,this.hashString(c)];case 3:return l=g.sent(),[4,this.browserCrypto.exportJwk(r.privateKey)];case 4:return h=g.sent(),[4,this.browserCrypto.importJwk(h,!1,["sign"])];case 5:return u=g.sent(),[4,this.cache.asymmetricKeys.setItem(l,{privateKey:u,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return g.sent(),o&&o.endMeasurement({success:!0}),[2,l]}})})},n.prototype.removeTokenBindingKey=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return o.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return t=o.sent(),[2,!t]}})})},n.prototype.clearKeystore=function(){return z(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},n.prototype.signJwt=function(e,t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l,h,u,g,f,w,C,P,M,j;return x(this,function(N){switch(N.label){case 0:return i=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.CryptoOptsSignJwt,o),[4,this.cache.asymmetricKeys.getItem(t)];case 1:if(s=N.sent(),!s)throw F.createSigningKeyNotFoundInStorageError(t);return[4,this.browserCrypto.exportJwk(s.publicKey)];case 2:return c=N.sent(),l=Ht.getSortedObjectString(c),h=this.b64Encode.urlEncode(JSON.stringify({kid:t})),u=fa.getShrHeaderString({kid:h,alg:c.alg}),g=this.b64Encode.urlEncode(u),e.cnf={jwk:JSON.parse(l)},f=this.b64Encode.urlEncode(JSON.stringify(e)),w=g+"."+f,C=Ht.stringToArrayBuffer(w),[4,this.browserCrypto.sign(s.privateKey,C)];case 3:return P=N.sent(),M=this.b64Encode.urlEncodeArr(new Uint8Array(P)),j=w+"."+M,i&&i.endMeasurement({success:!0}),[2,j]}})})},n.prototype.hashString=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return t=r.sent(),o=new Uint8Array(t),[2,this.b64Encode.urlEncodeArr(o)]}})})},n.POP_KEY_USAGES=["sign","verify"],n.EXTRACTABLE=!0,n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var oi=function(){function n(e,t){this.correlationId=t,this.measureName=n.makeMeasureName(e,t),this.startMark=n.makeStartMark(e,t),this.endMark=n.makeEndMark(e,t)}return n.makeMeasureName=function(e,t){return"msal.measure."+e+"."+t},n.makeStartMark=function(e,t){return"msal.start."+e+"."+t},n.makeEndMark=function(e,t){return"msal.end."+e+"."+t},n.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},n.flushMeasurements=function(e,t){if(n.supportsBrowserPerformance())try{t.forEach(function(o){var r=n.makeMeasureName(o.name,e),i=window.performance.getEntriesByName(r,"measure");i.length>0&&(window.performance.clearMeasures(r),window.performance.clearMarks(n.makeStartMark(r,e)),window.performance.clearMarks(n.makeEndMark(r,e)))})}catch{}},n.prototype.startMeasurement=function(){if(n.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},n.prototype.endMeasurement=function(){if(n.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},n.prototype.flushMeasurement=function(){if(n.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var t=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),t}}catch{}return null},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ka=function(n){xe(e,n);function e(t,o,r,i,s,c,l){var h=n.call(this,t,o,r,i,s,c)||this;return h.browserCrypto=new ti(h.logger,l),h.guidGenerator=new Xr(h.browserCrypto),h}return e.prototype.startPerformanceMeasuremeant=function(t,o){return new oi(t,o)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var t;return((t=document.visibilityState)===null||t===void 0?void 0:t.toString())||null},e.prototype.deleteIncompleteSubMeasurements=function(t){var o=this.eventsByCorrelationId.get(t.event.correlationId),r=o&&o.eventId===t.event.eventId,i=[];r&&(o!=null&&o.incompleteSubMeasurements)&&o.incompleteSubMeasurements.forEach(function(s){i.push(Q({},s))}),i.length>0&&oi.flushMeasurements(t.event.correlationId,i)},e.prototype.supportsBrowserPerformanceNow=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.now=="function"},e.prototype.startMeasurement=function(t,o){var r=this,i=this.getPageVisibility(),s=n.prototype.startMeasurement.call(this,t,o);return Q(Q({},s),{endMeasurement:function(c){var l=s.endMeasurement(Q({startPageVisibility:i,endPageVisibility:r.getPageVisibility()},c));return r.deleteIncompleteSubMeasurements(s),l},discardMeasurement:function(){s.discardMeasurement(),r.deleteIncompleteSubMeasurements(s),s.measurement.flushMeasurement()}})},e.prototype.setPreQueueTime=function(t,o){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for "+t);return}if(!o){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to set telemetry queue time");return}var r=this.preQueueTimeByCorrelationId.get(o);r&&(this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue "+r.name+" found",o),this.addQueueMeasurement(r.name,o,void 0,!0)),this.preQueueTimeByCorrelationId.set(o,{name:t,time:window.performance.now()})},e.prototype.addQueueMeasurement=function(t,o,r,i){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for "+t);return}if(!o){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to add queue measurement");return}var s=n.prototype.getPreQueueTime.call(this,t,o);if(s){var c=window.performance.now(),l=r||n.prototype.calculateQueuedTime.call(this,s,c);return n.prototype.addQueueMeasurement.call(this,t,o,l,i)}},e}(qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ga=function(){function n(e,t,o,r){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=o,this.cryptoObj=r}return n.prototype.loadExternalTokens=function(e,t,o){if(this.logger.info("TokenCache - loadExternalTokens called"),!t.id_token)throw F.createUnableToLoadTokenError("Please ensure server response includes id token.");var r=new It(t.id_token,this.cryptoObj),i,s;if(e.account){var c=this.loadAccount(r,e.account.environment,void 0,void 0,e.account.homeAccountId);i=new xn(c,this.loadIdToken(r,c.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,t,c.homeAccountId,e.account.environment,e.account.tenantId,o),this.loadRefreshToken(e,t,c.homeAccountId,e.account.environment))}else if(e.authority){var l=Un.generateAuthority(e.authority,e.azureCloudOptions),h={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(s=new Un(l,this.config.system.networkClient,this.storage,h,this.logger),o.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var c=this.loadAccount(r,s.hostnameAndPort,o.clientInfo,s.authorityType);i=new xn(c,this.loadIdToken(r,c.homeAccountId,s.hostnameAndPort,s.tenant),this.loadAccessToken(e,t,c.homeAccountId,s.hostnameAndPort,s.tenant,o),this.loadRefreshToken(e,t,c.homeAccountId,s.hostnameAndPort))}else if(t.client_info){this.logger.trace("TokenCache - homeAccountId from response");var c=this.loadAccount(r,s.hostnameAndPort,t.client_info,s.authorityType);i=new xn(c,this.loadIdToken(r,c.homeAccountId,s.hostnameAndPort,s.tenant),this.loadAccessToken(e,t,c.homeAccountId,s.hostnameAndPort,s.tenant,o),this.loadRefreshToken(e,t,c.homeAccountId,s.hostnameAndPort))}else throw F.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw F.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,r,i,s)},n.prototype.loadAccount=function(e,t,o,r,i){var s;if(i?s=i:r!==void 0&&o&&(s=Ue.generateHomeAccountId(o,r,this.logger,this.cryptoObj,e)),!s)throw F.createUnableToLoadTokenError("Unexpected missing homeAccountId");var c=o?Ue.createAccount(o,s,e,void 0,void 0,void 0,t):Ue.createGenericAccount(s,e,void 0,void 0,void 0,t);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(c),c;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadIdToken=function(e,t,o,r){var i=sn.createIdTokenEntity(t,o,e.rawToken,this.config.auth.clientId,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(i),i;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadAccessToken=function(e,t,o,r,i,s){if(!t.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!t.expires_in)throw F.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!s.extendedExpiresOn)throw F.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var c=new He(e.scopes).printScopes(),l=s.expiresOn||t.expires_in+new Date().getTime()/1e3,h=s.extendedExpiresOn,u=cn.createAccessTokenEntity(o,r,t.access_token,this.config.auth.clientId,i,c,l,h,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(u),u;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadRefreshToken=function(e,t,o,r){if(!t.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var i=yn.createRefreshTokenEntity(o,r,t.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(i),i;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.generateAuthenticationResult=function(e,t,o,r){var i,s,c,l=b.EMPTY_STRING,h=[],u=null,g;o!=null&&o.accessToken&&(l=o.accessToken.secret,h=He.fromString(o.accessToken.target).asArray(),u=new Date(Number(o.accessToken.expiresOn)*1e3),g=new Date(Number(o.accessToken.extendedExpiresOn)*1e3));var f=(t==null?void 0:t.claims.oid)||(t==null?void 0:t.claims.sub)||b.EMPTY_STRING,w=(t==null?void 0:t.claims.tid)||b.EMPTY_STRING;return{authority:r?r.canonicalAuthority:b.EMPTY_STRING,uniqueId:f,tenantId:w,scopes:h,account:o!=null&&o.account?o.account.getAccountInfo():null,idToken:t?t.rawToken:b.EMPTY_STRING,idTokenClaims:t?t.claims:{},accessToken:l,fromCache:!0,expiresOn:u,correlationId:e.correlationId||b.EMPTY_STRING,requestId:b.EMPTY_STRING,extExpiresOn:g,familyId:b.EMPTY_STRING,tokenType:((i=o==null?void 0:o.accessToken)===null||i===void 0?void 0:i.tokenType)||b.EMPTY_STRING,state:b.EMPTY_STRING,cloudGraphHostName:((s=o==null?void 0:o.account)===null||s===void 0?void 0:s.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((c=o==null?void 0:o.account)===null||c===void 0?void 0:c.msGraphHost)||b.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $a=function(n){xe(e,n);function e(t){var o=n.call(this,t)||this;return o.includeRedirectUri=!1,o}return e}(Or);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qa=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,h,u,g)||this;return f.apiId=l,f}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!t.code)throw F.createAuthCodeRequiredError();return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Silent)];case 1:o=u.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||b.EMPTY_STRING,o.account||null),r=this.initializeServerTelemetryManager(this.apiId),u.label=2;case 2:return u.trys.push([2,4,,5]),i=Q(Q({},o),{code:t.code}),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,t.correlationId),[4,this.getClientConfiguration(r,o.authority)];case 3:return s=u.sent(),c=new $a(s),this.logger.verbose("Auth code client created"),l=new Jr(c,this.browserStorage,i,this.logger,this.config.system,this.performanceClient),[2,l.handleCodeResponseFromServer({code:t.code,msgraph_host:t.msGraphHost,cloud_graph_host_name:t.cloudGraphHostName,cloud_instance_host_name:t.cloudInstanceHostName},o.state,c.authority,this.networkClient,!1)];case 4:throw h=u.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),r.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(o.state),h;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wa=function(){function n(e){this.isBrowserEnvironment=typeof window<"u",this.config=Ra(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new Ao(this.config.system.loggerOptions,Uo,jn),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new Ka(this.config.auth.clientId,this.config.auth.authority,this.logger,Uo,jn,this.config.telemetry.application,this.config.system.cryptoOptions):new _a(this.config.auth.clientId,this.config.auth.authority,this.logger,Uo,jn,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new Ha(this.logger,this.performanceClient,this.config.system.cryptoOptions):Xn,this.eventHandler=new Ma(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Bo(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):ba(this.config.auth.clientId,this.logger);var t={cacheLocation:Ae.MemoryStorage,temporaryCacheLocation:Ae.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};this.nativeInternalStorage=new Bo(this.config.auth.clientId,t,this.browserCrypto,this.logger),this.tokenCache=new Ga(this.config,this.browserStorage,this.logger,this.browserCrypto),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}return n.prototype.initialize=function(){return z(this,void 0,void 0,function(){var e,t,o,r,i;return x(this,function(s){switch(s.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(e=this.config.system.allowNativeBroker,t=this.performanceClient.startMeasurement(R.InitializeClientApplication),this.eventHandler.emitEvent(te.INITIALIZE_START),!e)return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),o=this,[4,ln.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)];case 2:return o.nativeExtensionProvider=s.sent(),[3,4];case 3:return r=s.sent(),this.logger.verbose(r),[3,4];case 4:return this.config.cache.claimsBasedCachingEnabled?[3,6]:(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),i=this.performanceClient.startMeasurement(R.ClearTokensAndKeysWithClaims),[4,this.browserStorage.clearTokensAndKeysWithClaims()]);case 5:s.sent(),i.endMeasurement({success:!0}),s.label=6;case 6:return this.initialized=!0,this.eventHandler.emitEvent(te.INITIALIZE_END),t.endMeasurement({allowNativeBroker:e,success:!0}),[2]}})})},n.prototype.handleRedirectPromise=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h,u=this;return x(this,function(g){return this.logger.verbose("handleRedirectPromise called"),Ee.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),t=this.getAllAccounts(),this.isBrowserEnvironment?(o=e||b.EMPTY_STRING,r=this.redirectResponse.get(o),typeof r>"u"?(this.eventHandler.emitEvent(te.HANDLE_REDIRECT_START,$.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),i=this.browserStorage.getCachedNativeRequest(),s=void 0,i&&ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),c=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,i.accountId,this.nativeInternalStorage,i.correlationId),s=c.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),l=this.browserStorage.getTemporaryCache(ue.CORRELATION_ID,!0)||b.EMPTY_STRING,h=this.createRedirectClient(l),s=h.handleRedirectPromise(e)),r=s.then(function(f){if(f){var w=t.length<u.getAllAccounts().length;w?(u.eventHandler.emitEvent(te.LOGIN_SUCCESS,$.Redirect,f),u.logger.verbose("handleRedirectResponse returned result, login success")):(u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Redirect,f),u.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return u.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,$.Redirect),f}).catch(function(f){throw t.length>0?u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Redirect,null,f):u.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Redirect,null,f),u.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,$.Redirect),f}),this.redirectResponse.set(o,r)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,r]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},n.prototype.acquireTokenRedirect=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s,c=this;return x(this,function(l){return t=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",t),this.preflightBrowserEnvironmentCheck($.Redirect),o=this.getAllAccounts().length>0,o?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Redirect,e):this.eventHandler.emitEvent(te.LOGIN_START,$.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(i=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),r=i.acquireTokenRedirect(e).catch(function(h){if(h instanceof Nt&&h.isFatal()){c.nativeExtensionProvider=void 0;var u=c.createRedirectClient(e.correlationId);return u.acquireToken(e)}else if(h instanceof gt){c.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var u=c.createRedirectClient(e.correlationId);return u.acquireToken(e)}throw c.browserStorage.setInteractionInProgress(!1),h})):(s=this.createRedirectClient(e.correlationId),r=s.acquireToken(e)),[2,r.catch(function(h){throw o?c.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Redirect,null,h):c.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Redirect,null,h),h})]})})},n.prototype.acquireTokenPopup=function(e){var t=this,o=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(R.AcquireTokenPopup,o);try{this.logger.verbose("acquireTokenPopup called",o),this.preflightBrowserEnvironmentCheck($.Popup)}catch(l){return Promise.reject(l)}var i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Popup,e):this.eventHandler.emitEvent(te.LOGIN_START,$.Popup,e);var s;if(this.canUseNative(e))s=this.acquireTokenNative(e,ke.acquireTokenPopup).then(function(l){return t.browserStorage.setInteractionInProgress(!1),r.endMeasurement({success:!0,isNativeBroker:!0,requestId:l.requestId}),l}).catch(function(l){if(l instanceof Nt&&l.isFatal()){t.nativeExtensionProvider=void 0;var h=t.createPopupClient(e.correlationId);return h.acquireToken(e)}else if(l instanceof gt){t.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var h=t.createPopupClient(e.correlationId);return h.acquireToken(e)}throw t.browserStorage.setInteractionInProgress(!1),l});else{var c=this.createPopupClient(e.correlationId);s=c.acquireToken(e)}return s.then(function(l){var h=i.length<t.getAllAccounts().length;return h?t.eventHandler.emitEvent(te.LOGIN_SUCCESS,$.Popup,l):t.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Popup,l),r.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),r.endMeasurement({success:!0,requestId:l.requestId}),l}).catch(function(l){return i.length>0?t.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Popup,null,l):t.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Popup,null,l),r.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),Promise.reject(l)})},n.prototype.trackPageVisibilityWithMeasurement=function(){var e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))},n.prototype.ssoSilent=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i,s,c=this;return x(this,function(l){return o=this.getRequestCorrelationId(e),r=Q(Q({},e),{prompt:e.prompt,correlationId:o}),this.preflightBrowserEnvironmentCheck($.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(R.SsoSilent,o),(t=this.ssoSilentMeasurement)===null||t===void 0||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",o),this.eventHandler.emitEvent(te.SSO_SILENT_START,$.Silent,r),this.canUseNative(r)?i=this.acquireTokenNative(r,ke.ssoSilent).catch(function(h){if(h instanceof Nt&&h.isFatal()){c.nativeExtensionProvider=void 0;var u=c.createSilentIframeClient(r.correlationId);return u.acquireToken(r)}throw h}):(s=this.createSilentIframeClient(r.correlationId),i=s.acquireToken(r)),[2,i.then(function(h){var u,g;return c.eventHandler.emitEvent(te.SSO_SILENT_SUCCESS,$.Silent,h),(u=c.ssoSilentMeasurement)===null||u===void 0||u.addStaticFields({accessTokenSize:h.accessToken.length,idTokenSize:h.idToken.length}),(g=c.ssoSilentMeasurement)===null||g===void 0||g.endMeasurement({success:!0,isNativeBroker:h.fromNativeBroker,requestId:h.requestId}),h}).catch(function(h){var u;throw c.eventHandler.emitEvent(te.SSO_SILENT_FAILURE,$.Silent,null,h),(u=c.ssoSilentMeasurement)===null||u===void 0||u.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}).finally(function(){document.removeEventListener("visibilitychange",c.trackPageVisibilityWithMeasurement)})]})})},n.prototype.acquireTokenByCode=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s=this;return x(this,function(c){t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck($.Silent),this.logger.trace("acquireTokenByCode called",t),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_START,$.Silent,e),o=this.performanceClient.startMeasurement(R.AcquireTokenByCode,e.correlationId);try{if(e.code&&e.nativeAccountId)throw F.createSpaCodeAndNativeAccountIdPresentError();if(e.code)return r=e.code,i=this.hybridAuthCodeResponses.get(r),i?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),o.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),i=this.acquireTokenByCodeAsync(Q(Q({},e),{correlationId:t})).then(function(l){return s.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_SUCCESS,$.Silent,l),s.hybridAuthCodeResponses.delete(r),o.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),o.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),l}).catch(function(l){throw s.hybridAuthCodeResponses.delete(r),s.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,$.Silent,null,l),o.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l}),this.hybridAuthCodeResponses.set(r,i)),[2,i];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,ke.acquireTokenByCode,e.nativeAccountId).catch(function(l){throw l instanceof Nt&&l.isFatal()&&(s.nativeExtensionProvider=void 0),l})];throw F.createUnableToAcquireTokenFromNativePlatformError()}else throw F.createAuthCodeOrNativeAccountIdRequiredError()}catch(l){throw this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,$.Silent,null,l),o.endMeasurement({errorCode:l instanceof Y&&l.errorCode||void 0,subErrorCode:l instanceof Y&&l.subError||void 0,success:!1}),l}return[2]})})},n.prototype.acquireTokenByCodeAsync=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i=this;return x(this,function(s){switch(s.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(R.AcquireTokenByCodeAsync,e.correlationId),(t=this.acquireTokenByCodeAsyncMeasurement)===null||t===void 0||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),o=this.createSilentAuthCodeClient(e.correlationId),[4,o.acquireToken(e).then(function(c){var l;return(l=i.acquireTokenByCodeAsyncMeasurement)===null||l===void 0||l.endMeasurement({success:!0,fromCache:c.fromCache,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),c}).catch(function(c){var l;throw(l=i.acquireTokenByCodeAsyncMeasurement)===null||l===void 0||l.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),c}).finally(function(){document.removeEventListener("visibilitychange",i.trackPageVisibilityWithMeasurement)})];case 1:return r=s.sent(),[2,r]}})})},n.prototype.acquireTokenFromCache=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){switch(this.performanceClient.addQueueMeasurement(R.AcquireTokenFromCache,t.correlationId),o.cacheLookupPolicy){case Xe.Default:case Xe.AccessToken:case Xe.AccessTokenAndRefreshToken:return[2,e.acquireToken(t)];default:throw K.createRefreshRequiredError()}return[2]})})},n.prototype.acquireTokenByRefreshToken=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(this.performanceClient.addQueueMeasurement(R.AcquireTokenByRefreshToken,e.correlationId),t.cacheLookupPolicy){case Xe.Default:case Xe.AccessTokenAndRefreshToken:case Xe.RefreshToken:case Xe.RefreshTokenAndNetwork:return o=this.createSilentRefreshClient(e.correlationId),this.performanceClient.setPreQueueTime(R.SilentRefreshClientAcquireToken,e.correlationId),[2,o.acquireToken(e)];default:throw K.createRefreshRequiredError()}return[2]})})},n.prototype.acquireTokenBySilentIframe=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return this.performanceClient.addQueueMeasurement(R.AcquireTokenBySilentIframe,e.correlationId),t=this.createSilentIframeClient(e.correlationId),this.performanceClient.setPreQueueTime(R.SilentIframeClientAcquireToken,e.correlationId),[2,t.acquireToken(e)]})})},n.prototype.logout=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return t=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),[2,this.logoutRedirect(Q({correlationId:t},e))]})})},n.prototype.logoutRedirect=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){return t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck($.Redirect),o=this.createRedirectClient(t),[2,o.logout(e)]})})},n.prototype.logoutPopup=function(e){try{var t=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck($.Popup);var o=this.createPopupClient(t);return o.logout(e)}catch(r){return Promise.reject(r)}},n.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},n.prototype.getAccountByUsername=function(e){if(this.logger.trace("getAccountByUsername called"),!e)return this.logger.warning("getAccountByUsername: No username provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({username:e});return t?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: "+e),t):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},n.prototype.getAccountByHomeId=function(e){if(this.logger.trace("getAccountByHomeId called"),!e)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:e});return t?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: "+e),t):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},n.prototype.getAccountByLocalId=function(e){if(this.logger.trace("getAccountByLocalId called"),!e)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({localAccountId:e});return t?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: "+e),t):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},n.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},n.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},n.prototype.preflightBrowserEnvironmentCheck=function(e,t){if(t===void 0&&(t=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),Ee.blockNonBrowserEnvironment(this.isBrowserEnvironment),Ee.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Ee.blockReloadInHiddenIframes(),Ee.blockAcquireTokenInPopups(),Ee.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===$.Redirect&&this.config.cache.cacheLocation===Ae.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw ao.createInMemoryRedirectUnavailableError();(e===$.Redirect||e===$.Popup)&&this.preflightInteractiveRequest(t)},n.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),Ee.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},n.prototype.acquireTokenNative=function(e,t,o){return z(this,void 0,void 0,function(){var r;return x(this,function(i){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw F.createNativeConnectionNotEstablishedError();return r=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,o||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,r.acquireToken(e)]})})},n.prototype.canUseNative=function(e,t){if(this.logger.trace("canUseNative called"),!ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case Ve.NONE:case Ve.CONSENT:case Ve.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},n.prototype.getNativeAccountId=function(e){var t=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return t&&t.nativeAccountId||""},n.prototype.createPopupClient=function(e){return new Ea(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createRedirectClient=function(e){return new Ca(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createSilentIframeClient=function(e){return new Na(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createSilentCacheClient=function(e){return new Yr(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.createSilentRefreshClient=function(e){return new Pa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.createSilentAuthCodeClient=function(e){return new Qa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},n.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},n.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},n.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},n.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},n.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},n.prototype.getTokenCache=function(){return this.tokenCache},n.prototype.getLogger=function(){return this.logger},n.prototype.setLogger=function(e){this.logger=e},n.prototype.initializeWrapperLibrary=function(e,t){this.browserStorage.setWrapperMetadata(e,t)},n.prototype.setNavigationClient=function(e){this.navigationClient=e},n.prototype.getConfiguration=function(){return this.config},n.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():b.EMPTY_STRING},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ya=function(n){xe(e,n);function e(t){var o=n.call(this,t)||this;return o.astsAsyncMeasurement=void 0,o.activeSilentTokenRequests=new Map,o.trackPageVisibility=o.trackPageVisibility.bind(o),o}return e.prototype.loginRedirect=function(t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){return o=this.getRequestCorrelationId(t),this.logger.verbose("loginRedirect called",o),[2,this.acquireTokenRedirect(Q({correlationId:o},t||Hr))]})})},e.prototype.loginPopup=function(t){var o=this.getRequestCorrelationId(t);return this.logger.verbose("loginPopup called",o),this.acquireTokenPopup(Q({correlationId:o},t||Hr))},e.prototype.acquireTokenSilent=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u=this;return x(this,function(g){if(o=this.getRequestCorrelationId(t),r=this.performanceClient.startMeasurement(R.AcquireTokenSilent,o),r.addStaticFields({cacheLookupPolicy:t.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck($.Silent),this.logger.verbose("acquireTokenSilent called",o),i=t.account||this.getActiveAccount(),!i)throw F.createNoAccountError();return s={clientId:this.config.auth.clientId,authority:t.authority||b.EMPTY_STRING,scopes:t.scopes,homeAccountIdentifier:i.homeAccountId,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},c=JSON.stringify(s),l=this.activeSilentTokenRequests.get(c),typeof l>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",o),this.performanceClient.setPreQueueTime(R.AcquireTokenSilentAsync,o),h=this.acquireTokenSilentAsync(Q(Q({},t),{correlationId:o}),i).then(function(f){return u.activeSilentTokenRequests.delete(c),r.addStaticFields({accessTokenSize:f.accessToken.length,idTokenSize:f.idToken.length}),r.endMeasurement({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,cacheLookupPolicy:t.cacheLookupPolicy,requestId:f.requestId}),f}).catch(function(f){throw u.activeSilentTokenRequests.delete(c),r.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f}),this.activeSilentTokenRequests.set(c,h),[2,h]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",o),r.discardMeasurement(),[2,l])})})},e.prototype.trackPageVisibility=function(){this.astsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.astsAsyncMeasurement.increment({visibilityChangeCount:1}))},e.prototype.acquireTokenSilentAsync=function(t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l,h,u=this;return x(this,function(g){switch(g.label){case 0:return this.performanceClient.addQueueMeasurement(R.AcquireTokenSilentAsync,t.correlationId),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Silent,t),this.astsAsyncMeasurement=this.performanceClient.startMeasurement(R.AcquireTokenSilentAsync,t.correlationId),(r=this.astsAsyncMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility),ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,t.authenticationScheme)&&o.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),s=Q(Q({},t),{account:o}),i=this.acquireTokenNative(s,ke.acquireTokenSilent_silentFlow).catch(function(f){return z(u,void 0,void 0,function(){var w;return x(this,function(C){if(f instanceof Nt&&f.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,w=this.createSilentIframeClient(t.correlationId),[2,w.acquireToken(t)];throw f})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),c=this.createSilentCacheClient(t.correlationId),this.performanceClient.setPreQueueTime(R.InitializeSilentRequest,t.correlationId),[4,c.initializeSilentRequest(t,o)];case 2:l=g.sent(),h=Q(Q({},t),{cacheLookupPolicy:t.cacheLookupPolicy||Xe.Default}),this.performanceClient.setPreQueueTime(R.AcquireTokenFromCache,l.correlationId),i=this.acquireTokenFromCache(c,l,h).catch(function(f){if(h.cacheLookupPolicy===Xe.AccessToken)throw f;return Ee.blockReloadInHiddenIframes(),u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_NETWORK_START,$.Silent,l),u.performanceClient.setPreQueueTime(R.AcquireTokenByRefreshToken,l.correlationId),u.acquireTokenByRefreshToken(l,h).catch(function(w){var C=w instanceof rn,P=w instanceof gt,M=w.errorCode===bn.noTokensFoundError.code,j=w.errorCode===_t.INVALID_GRANT_ERROR;if((!C||!j||P||h.cacheLookupPolicy===Xe.AccessTokenAndRefreshToken||h.cacheLookupPolicy===Xe.RefreshToken)&&h.cacheLookupPolicy!==Xe.Skip&&!M)throw w;return u.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",t.correlationId),u.performanceClient.setPreQueueTime(R.AcquireTokenBySilentIframe,l.correlationId),u.acquireTokenBySilentIframe(l)})}),g.label=3;case 3:return[2,i.then(function(f){var w;return u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Silent,f),(w=u.astsAsyncMeasurement)===null||w===void 0||w.endMeasurement({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,requestId:f.requestId}),f}).catch(function(f){var w;throw u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Silent,null,f),(w=u.astsAsyncMeasurement)===null||w===void 0||w.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f}).finally(function(){document.removeEventListener("visibilitychange",u.trackPageVisibility)})]}})})},e}(Wa);class Ja extends tt.WebPlugin{async login(e){const t=this.createContext(e);try{return await this.acquireTokenSilently(t,e.scopes).catch(()=>this.acquireTokenInteractively(t,e.scopes))}catch(o){throw console.error("MSAL: Error occurred while logging in",o),o}}logout(e){const t=this.createContext(e);return t.getAllAccounts()[0]?t.logoutPopup():Promise.reject(new Error("Nothing to sign out from."))}logoutAll(e){return this.logout(e)}createContext(e){var t,o,r;const i={auth:{clientId:e.clientId,domainHint:e.domainHint,authority:(t=e.authorityUrl)!==null&&t!==void 0?t:`https://login.microsoftonline.com/${(o=e.tenant)!==null&&o!==void 0?o:"common"}`,knownAuthorities:e.knownAuthorities,redirectUri:(r=e.redirectUri)!==null&&r!==void 0?r:this.getCurrentUrl()},cache:{cacheLocation:"localStorage"}};return new Ya(i)}getCurrentUrl(){return window.location.href.split(/[?#]/)[0]}async acquireTokenInteractively(e,t){const{accessToken:o,idToken:r}=await e.acquireTokenPopup({scopes:t,prompt:"select_account"});return{accessToken:o,idToken:r,scopes:t}}async acquireTokenSilently(e,t){const{accessToken:o,idToken:r}=await e.acquireTokenSilent({scopes:t,account:e.getAllAccounts()[0]});return{accessToken:o,idToken:r,scopes:t}}}const Xa=tt.registerPlugin("MsAuthPlugin",{web:()=>new Ja}),ri={data(){return{microsoftLoad:!1,microsoftSSOLoad:!1}},computed:{displayMicrosoftSSOLogin(){return!1}},methods:{async microsoftLogin(n,e={}){var r;n==="sso"?this.microsoftSSOLoad=!0:this.microsoftLoad=!0;const[t,o]=await fe(Xa.login({clientId:n==="sso"?e.clientID:"9cd47053-080a-4df8-8fd8-ca4389163fde",tenant:n==="sso"?e.tenant:"consumers",scopes:["User.Read"],knownAuthorities:[],keyHash:"4+5wCp8QcLptlO0aeP5RDTTOWyg=",redirectUri:`${window.location.origin}/login`}));if(t)return console.error("MsAuthPlugin Error: "+JSON.stringify(t)),this.microsoftLoad=!1;if(this.referral&&(o.ref=this.referral),this.display==="popup"&&(o.response_type="code"),o&&(o.accessToken||o.idToken)){const[i,s]=await fe(Fe.microsoftSDK(o,this.$storex));if(i)return this.microsoftLoad=!1,this.microsoftSSOLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(i);if(s.data.success){if(this.display==="popup")return(r=window.parent)==null?void 0:r.postMessage({code:s.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(s),await this.getLoggedInAccounts(),this.loginSuccess({...s,isModal:this.isModal}),setTimeout(()=>{this.microsoftLoad=!1,this.microsoftSSOLoad=!1},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)}else this.microsoftLoad=!1,this.microsoftSSOLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})}}},Za=n=>{try{return window.crypto.getRandomValues(n)}catch{for(let t=0;t<n.length;t++)n[t]=Math.floor(Math.random()*256);return n}},es=async n=>{try{return await window.crypto.subtle.digest("SHA-256",n)}catch{const t=rr.sha256(n);return new Uint8Array(t.match(/.{1,2}/g).map(o=>parseInt(o,16))).buffer}},ts=async(n,e,t)=>{try{return await window.crypto.subtle.encrypt(n,e,t)}catch{throw new Error("Encryption not supported in this environment")}},ns=async(n,e,t)=>{try{return await window.crypto.subtle.decrypt(n,e,t)}catch{throw new Error("Decryption not supported in this environment")}},Fn={getFirstBrowserLanguage(){let n=window.navigator,e=["language","browserLanguage","systemLanguage","userLanguage"],t,o;if(Array.isArray(n.languages)){for(t=0;t<n.languages.length;t++)if(o=n.languages[t],o&&o.length)return o.slice(0,2)}for(t=0;t<e.length;t++)if(o=n[e[t]],o&&o.length)return o.slice(0,2);return null},compareLangKeys(){const n=Object.keys(hr.state),e=Object.keys(mr.state),t=Object.keys(fr.state),o=Object.keys(br.state),r=Object.keys(_r.state),i=Object.keys(gr.state),s=Object.keys(vr.state),c=Object.keys(yr.state);console.log("In en but not in de",n.filter(l=>!e.includes(l))),console.log("In de but not in en",e.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in es",n.filter(l=>!t.includes(l))),console.log("In es but not in en",t.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in kr",n.filter(l=>!o.includes(l))),console.log("In kr but not in en",o.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in it",n.filter(l=>!r.includes(l))),console.log("In it but not in en",r.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in fr",n.filter(l=>!i.includes(l))),console.log("In fr but not in en",i.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in sr",n.filter(l=>!s.includes(l))),console.log("In sr but not in en",s.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in tr",n.filter(l=>!c.includes(l))),console.log("In tr but not in en",c.filter(l=>!n.includes(l))),console.log()},base64ImageToBlob(n){const e=n.split(";base64,"),t=e[0].split(":")[1],o=window.atob(e[1]),r=new Uint8Array(o.length);for(let i=0;i<o.length;++i)r[i]=o.charCodeAt(i);return new Blob([r],{type:t})},blobToBase64(n){const e=new FileReader;return e.readAsDataURL(n),new Promise(t=>{e.onloadend=()=>{t(e.result)}})},base64toFile(n,e){for(var t=n.split(","),o=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,s=new Uint8Array(i);i--;)s[i]=r.charCodeAt(i);return new File([s],e,{type:o})},fileToBase64(n){new Promise((e,t)=>{const o=new FileReader;o.readAsDataURL(n),o.onload=()=>e(o.result),o.onerror=r=>t(r)})},getUTMParams(n){let e={};return n.utm_source&&(e.utm_source=n.utm_source),n.utm_medium&&(e.utm_medium=n.utm_medium),n.utm_campaign&&(e.utm_campaign=n.utm_campaign),n.utm_term&&(e.utm_term=n.utm_term),n.utm_content&&(e.utm_content=n.utm_content),e},cropCardScan(n,e){const t=new window.Image,o=document.createElement("canvas"),r=o.getContext("2d");t.src="data:image/jpeg;base64,"+n,t.onload=()=>{const i=t.width,s=t.width/1.65,c=0,l=t.height/2-s/2,h=i,u=s;o.width=h,o.height=u,r.drawImage(t,c,l,i,s,0,0,h,u);const g=o.toDataURL();return e(g),g}},generateRandomString(n){let e=new Uint32Array(n);return Za(e),Array.from(e,t=>("0"+t.toString(16)).substr(-2)).join("")},async pkceChallengeFromVerifier(n){try{const t=new TextEncoder().encode(n),o=await es(t);return btoa(String.fromCharCode.apply(null,new Uint8Array(o))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch{const t=rr.sha256(n);return btoa(String.fromCharCode.apply(null,new Uint8Array(t.match(/.{1,2}/g).map(r=>parseInt(r,16))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},async encryptAES(n,e,t){try{let r=new TextEncoder().encode(t);return await ts({name:"AES-CBC",iv:e},n,r)}catch(o){throw o}},async decryptAES(n,e,t){try{const o=l=>Uint8Array.from(atob(l),h=>h.charCodeAt(0));t=t.replace(/ /g,"+");const r=new TextEncoder,i=new TextDecoder;n=r.encode(n),e=r.encode(e),t=o(t);const s=await window.crypto.subtle.importKey("raw",n,"AES-CBC",!0,["encrypt","decrypt"]);let c=await ns({name:"AES-CBC",iv:e},s,t);return c=i.decode(c),c=c.replace(/ /g,"+"),c=atob(c),c}catch(o){throw o}}},ii={data(){return{oktaAuth:null}},computed:{},watch:{},methods:{async exchangeCode(n){var r,i;let[e,t]=await fe(mo.post(n.domain+"/v1/token",new URLSearchParams({code:n.code,client_id:n.clientID,grant_type:"authorization_code",redirect_uri:this.isNative?"tapni://t.link/callback/okta":location.origin+"/callback/okta",code_verifier:localStorage.getItem("pkce_code_verifier")})));if(e)return this.errorHandler(e);localStorage.removeItem("pkce_code_verifier");let o={accessToken:(r=t.data)==null?void 0:r.access_token,domain:n.domain};if(this.display==="popup"&&(o.response_type="code"),[e,t]=await fe(Fe.oktaSDK(o,this.$storex)),e)return this.oktaLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(e);if(t.data.success){if(this.display==="popup")return(i=window.parent)==null?void 0:i.postMessage({code:t.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(t),await this.getLoggedInAccounts(),this.$router.push("/"+t.data.data.username+"#edit"),setTimeout(()=>{this.appleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)},async oktaLogin(n){const e=tt.Capacitor.getPlatform()||"web";let t=btoa("domain="+n.domain+"&client_id="+n.clientID+"&platform="+e+"&rand="+Fn.generateRandomString(28)),o=Fn.generateRandomString(28);localStorage.setItem("pkce_code_verifier",o);let r=await Fn.pkceChallengeFromVerifier(o),i=n.domain+"/v1/authorize",s;this.isNative?s="tapni://t.link/callback/okta":s=location.origin+"/callback/okta";let c=i+"?response_type=code&client_id="+encodeURIComponent(n.clientID)+"&state="+encodeURIComponent(t)+"&scope="+encodeURIComponent("openid email profile")+"&redirect_uri="+encodeURIComponent(s)+"&code_challenge="+encodeURIComponent(r)+"&code_challenge_method=S256",l=this,h;window.addEventListener("message",async u=>{if(!this.allowedOriginsAuth.includes(u.origin))return console.error("Origin is not allowed!");u.data.type==="okta"&&(h=u.data.code,await l.exchangeCode({domain:n.domain,code:h,clientID:n.clientID}))},{once:!0}),this.isNative?await Vn.Browser.open({url:c,presentationStyle:"popover"}):window.open(c,"popup","width=600,height=600")},async handleOktaRedirect(){let n=this.$route.query.code,e,t,o,r,i={type:"okta"};if(n&&(i.code=n),this.$route.query.state){e=this.$route.query.state,e=atob(e);const s=new URLSearchParams(e);t=s.get("client_id"),o=s.get("domain"),r=s.get("platform")}window.opener?(window.opener.postMessage(i,location.origin),window.close()):(this.isNative&&this.isiOS&&await Vn.Browser.close(),X.$emit("ssoEvent",{name:"setLoading",data:!0}),n&&t&&o&&await this.exchangeCode({code:n,clientID:t,domain:o,platform:r}),localStorage.removeItem("pkce_code_verifier"),X.$emit("ssoEvent",{name:"setLoading",data:!1}))}}},ai={data(){return{code_verifier:"",code_challenge:"",shouldCloseWindow:!1,popupWindow:null,checkInterval:null}},computed:{},watch:{"$route.path"(n){n==="/callback/saml"&&this.handleSamlRedirect(n)}},methods:{closeWindow(){try{window.close()}catch{}},async samlLogin(n){this.code_verifier=Fn.generateRandomString(28),localStorage.setItem("pkce_code_verifier",this.code_verifier),this.code_challenge=await Fn.pkceChallengeFromVerifier(this.code_verifier);const e=tt.Capacitor.getPlatform();let t=`code_challenge=${this.code_challenge}&platform=${e}&redirect_uri=${location.origin+(this.display==="npm"?"/app":"")+"/callback/saml"}&realm=${this.realm}&display=${this.display}`,o=btoa(t);n=`${n}&RelayState=${o}`;let r=this;window.addEventListener("message",async i=>{var l;if(!this.allowedOriginsAuth.includes(i.origin))return console.error("Origin is not allowed! "+i.origin);const s=i.data.code,c=localStorage.getItem("pkce_code_verifier");if(s){if(r.display==="popup")return(l=window.parent)==null?void 0:l.postMessage({code:s,state:i.data.state,code_verifier:c},"*");c&&(await r.exchangeAuthCode({code:i.data.code,code_verifier:c}),localStorage.removeItem("pkce_code_verifier"))}},{once:!0}),this.isNative?this.popupWindow=await Vn.Browser.open({url:n,presentationStyle:"popover"}):(this.checkInterval=setInterval(()=>{var c;const i=localStorage.getItem("auth_code"),s=localStorage.getItem("pkce_code_verifier");i&&(clearInterval(this.checkInterval),localStorage.removeItem("auth_code"),localStorage.removeItem("pkce_code_verifier"),(c=window.parent)==null||c.postMessage({code:i,state:this.$route.query.state,code_verifier:s},"*"),s&&(this.display==="npm"||this.display==="redirect")&&this.exchangeAuthCode({code:i,code_verifier:s}))},500),this.popupWindow=window.open(window.location.origin+(this.display==="npm"?"/app":"")+"/callback/redirect?uri="+btoa(n),"popup","width=600,height=600"))},async handleSamlRedirect(){var e;let n;if(this.$route.query.code&&(n=this.$route.query.code),window.opener)window.opener.postMessage({type:"saml",code:n},"*"),this.closeWindow();else{if(this.isNative&&this.isiOS&&await Vn.Browser.close(),X.$emit("ssoEvent",{name:"setLoading",data:!0}),n&&((this.display==="popup"||this.display==="npm")&&(localStorage.setItem("auth_code",n),this.shouldCloseWindow=!0,(e=window.parent)==null||e.postMessage({code:n,state:this.$route.query.state},"*"),this.closeWindow()),this.display==="redirect"||location.host==="auth.tapni.com")){let t="https://auth.tapni.com/callback/auth";return this.realm==="dashboard"&&(t="https://business.tapni.com/login"),location.href=t+"?code="+n+"&code_verifier="+localStorage.getItem("pkce_code_verifier")}X.$emit("ssoEvent",{name:"setLoading",data:!1})}}}},si={data(){return{isQrCodeLogin:!1,qrCode:null,qrCodeHash:null,qrCodeRefreshInterval:null,poolingInterval:null}},props:{isModal:{type:Boolean,required:!1,default:!1}},computed:{displayQRLogin(){return this.$route.name==="AuthLogin"&&this.display!=="npm"}},mounted(){this.$route.name==="AuthQR"&&this.changeLoginToQr()},methods:{async changeLoginToQr(){this.isQrCodeLogin=!0,await a.nextTick(),await this.initQrCodeLogin()},generateRandomHash(){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=n.length;let t="";const o=new Uint32Array(32);return window.crypto.getRandomValues(o),o.forEach(r=>{t+=n.charAt(r%e)}),t},refreshQrCode(){var n,e;this.qrCode&&((e=(n=document.getElementById("qrCodeContainer"))==null?void 0:n.childNodes[0])==null||e.remove()),this.qrCodeHash=this.generateRandomHash(),this.qrCode=new ir({width:300,height:300,type:"png",image:"",imageOptions:{margin:15},data:this.qrCodeHash,dotsOptions:{type:"extra-rounded",color:"#000000"},cornersSquareOptions:{type:"extra-rounded",color:"#000000"},cornersDotOptions:{type:"",color:"#000000"},backgroundOptions:{color:"#ffffff00"}}),this.qrCode.append(document.getElementById("qrCodeContainer"))},async startQrCodePooling(){this.poolingInterval=setInterval(async()=>{const[n,e]=await fe(ko.qrCodePooling({qrToken:this.qrCodeHash},this.$storex));if(n)return this.errorHandler(n);e.data.auth_code&&(this.display!=="popup"&&(this.loginSetup({...e,isModal:this.isModal}),await this.getLoggedInAccounts()),this.loginSuccess({...e,isModal:this.isModal}),clearInterval(this.poolingInterval),clearInterval(this.qrCodeRefreshInterval))},2e3)},async initQrCodeLogin(){this.refreshQrCode(),await a.nextTick(),await this.startQrCodePooling(),this.qrCodeRefreshInterval=setInterval(()=>{this.refreshQrCode()},6e4)}}},os={name:"AuthLogin",mixins:[Tr,Sr,ri,ii,ai,We,si],data(){return{loading:!0,submitted:!1,emailOrUsername:"",password:"",captcha:"",revealPassword:!1,emailLogin:!0,isSSOLogin:!1,otpToken:"",showOTP:!1}},computed:{displayFormLogin(){return this.emailLogin},displayResetPasswordLogin(){return!this.isSSOLogin},displayRegisterLogin(){return!0}},async mounted(){if(!this.isModal){if(this.$route.path==="/login/callback/okta")return await this.handleOktaRedirect();if(this.$route.path==="/login/callback/saml")return await this.handleSamlRedirect();this.$route.query.qrLogin&&this.changeLoginToQr(),setTimeout(()=>{this.$storex&&this.$storex.token?this.$router.push(this.home):X.$emit("ssoEvent",{name:"setLoading",data:!1})},2500)}X.$on("toggleOTPField",()=>{this.showOTP=!this.showOTP})},methods:{async ssoLoginSubmit(){this.loading=!0;const n=await this.getCompanyBySSOEmail({email:this.emailOrUsername});this.loading=!1;let e;if(!(!n||n.error))if(e=Object.keys(n.sso),e.length)e[0]==="azure"&&this.microsoftLogin("sso",n.sso.azure.sso),e[0]==="okta"&&this.oktaLogin(n.sso.okta.sso),e[0]==="saml"&&this.samlLogin(n.sso.saml.sso.loginUrl);else return this.errorSnack(this.ssoLang[this.appLanguage].no_sso_logins)},async submit(){if(this.submitted)return;if(this.submitted=!0,this.isSSOLogin)return this.ssoLoginSubmit();this.emailOrUsername=this.emailOrUsername.trim();let e={response_type:this.$route.query.response_type||"token",isModal:this.isModal,captcha:this.captcha,password:this.password,otpToken:this.otpToken};this.emailOrUsername.indexOf("@")!==-1?e.email=this.emailOrUsername:e.username=this.emailOrUsername;const[t,o]=await fe(this.login(e));t&&console.error(t),this.submitted=!1,o===!0&&(this.emailOrUsername="",this.password="")},close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},createAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalRegister",data:{}})}},watch:{emailOrUsername(n){n.includes("@")&&(this.$storex.verifyEmail=n)},"$route.path":async function(n){if(n==="/login/callback/okta")return await this.handleOktaRedirect();if(n==="/login/callback/saml")return await this.handleSamlRedirect()}}},rs={class:"bold no-bottom center-text text-[22px]",style:{"margin-top":"63px"}},is={key:0},as={key:1},ss={key:1},cs={class:"page-login-field half-top"},ls=["placeholder"],ds={key:0,class:"page-login-field half-bottom"},us=["type","placeholder"],ps={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},hs={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},ms={key:1,class:"page-login-field half-bottom"},fs=["placeholder"],gs={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},_s={key:0},vs={key:1,class:"button--loading button__loader"},ys={key:0},bs={key:1,class:"button--loading-black button__loader"},ws={key:0},ks={key:1,class:"button--loading-black button__loader"},Cs={key:0},Es={key:1,class:"button--loading-black button__loader"},Ts={key:0},Ss={key:1,class:"button--loading-black button__loader"},Is={key:0},As={key:1,class:"button--loading-black button__loader"},Rs={class:"close-text center-text half-top color-black"},Ns={class:"",href:"https://tapni.com/policies/terms-of-service"},Ps={href:"https://tapni.com/policies/privacy-policy"},Ms={key:2,class:"page-login-links"},Ls={class:"forgot center-text pointer small-top"};function Os(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[15]||(e[15]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),autocomplete:"on",style:a.normalizeStyle(n.isModal?"max-width: 500px;":"")},[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[16]||(e[16]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h2",rs,[r.isSSOLogin?(a.openBlock(),a.createElementBlock("span",is,a.toDisplayString(this.ssoLang[this.appLanguage].enter_company_email),1)):(a.openBlock(),a.createElementBlock("span",as,a.toDisplayString(this.ssoLang[this.appLanguage].login),1))]),e[34]||(e[34]=a.createElementVNode("p",{class:"half-bottom small-top center-text color-black"},null,-1)),i.displayFormLogin?(a.openBlock(),a.createElementBlock("span",ss,[a.createElementVNode("div",cs,[e[17]||(e[17]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/user.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>r.emailOrUsername=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),autocorrect:"off",autocapitalize:"off",spellcheck:"false",type:"text",name:"email",placeholder:r.isSSOLogin?n.ssoLang[this.appLanguage].email:n.ssoLang[this.appLanguage].email_username,required:""},null,40,ls),[[a.vModelText,r.emailOrUsername]]),e[18]||(e[18]=a.createElementVNode("em",null,null,-1))]),r.isSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",ds,[e[19]||(e[19]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,name:"password",required:"",minlength:"8"},null,8,us),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[4]||(e[4]=c=>r.revealPassword=!r.revealPassword),class:"pointer"},[a.withDirectives(a.createElementVNode("img",ps,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",hs,null,512),[[a.vShow,r.revealPassword]])])])),r.showOTP?(a.openBlock(),a.createElementBlock("div",ms,[e[20]||(e[20]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.otpToken=c),type:"text",placeholder:n.ssoLang[this.appLanguage].otp_code,name:"otpToken",required:"",minlength:"6"},null,8,fs),[[a.vModelText,r.otpToken]]),e[21]||(e[21]=a.createElementVNode("em",null,null,-1))])):a.createCommentVNode("",!0),a.createElementVNode("button",gs,[r.submitted?(a.openBlock(),a.createElementBlock("span",vs)):(a.openBlock(),a.createElementBlock("span",_s,a.toDisplayString(n.ssoLang[n.appLanguage].login),1))])])):a.createCommentVNode("",!0),e[35]||(e[35]=a.createElementVNode("div",{class:"decoration decoration-lines-thin half-top half-bottom"},null,-1)),a.withDirectives(a.createElementVNode("span",null,[n.displayAppleLogin?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[6]||(e[6]=(...c)=>n.appleLogin&&n.appleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[22]||(e[22]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/apple-logo.png",style:{position:"absolute","margin-left":"-11px",padding:"8px 0",height:"100%"}},null,-1)),n.appleLoad?(a.openBlock(),a.createElementBlock("span",bs)):(a.openBlock(),a.createElementBlock("span",ys,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Apple",1))])):a.createCommentVNode("",!0),n.displayGoogleLogin?(a.openBlock(),a.createElementBlock("a",{key:1,onClick:e[7]||(e[7]=(...c)=>n.googleLogin&&n.googleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[23]||(e[23]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/g-logo.png",style:{position:"absolute","margin-left":"-10px",padding:"8px 0",height:"100%"}},null,-1)),n.googleLoad?(a.openBlock(),a.createElementBlock("span",ks)):(a.openBlock(),a.createElementBlock("span",ws,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Google",1))])):a.createCommentVNode("",!0),n.displayMicrosoftSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[8]||(e[8]=(...c)=>n.microsoftLogin&&n.microsoftLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[24]||(e[24]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/outlook.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftLoad?(a.openBlock(),a.createElementBlock("span",Es)):(a.openBlock(),a.createElementBlock("span",Cs,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Outlook",1))])),n.displayMicrosoftSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:3,onClick:e[9]||(e[9]=c=>r.isSSOLogin=!0),class:"button-center button button-90 google-button pointer"},[e[25]||(e[25]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/sso-key.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftSSOLoad?(a.openBlock(),a.createElementBlock("span",Ss)):(a.openBlock(),a.createElementBlock("span",Ts,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" SSO",1))])),n.displayMicrosoftSSOLogin?(a.openBlock(),a.createElementBlock("a",{key:4,onClick:e[10]||(e[10]=c=>n.microsoftLogin("sso")),class:"button-center button button-90 google-button pointer"},[e[26]||(e[26]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/sso-key.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftSSOLoad?(a.openBlock(),a.createElementBlock("span",Is,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" SSO",1)):(a.openBlock(),a.createElementBlock("span",As))])):a.createCommentVNode("",!0),i.displayFormLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:5,onClick:e[11]||(e[11]=c=>r.emailLogin=!0),class:"button-center button button-90 google-button pointer"},[e[27]||(e[27]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",style:{position:"absolute","margin-left":"-8px",padding:"12px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Email",1)])),n.displayQRLogin?(a.openBlock(),a.createElementBlock("a",{key:6,onClick:e[12]||(e[12]=c=>n.$router.push("/qr")),class:"button-center button button-90 google-button pointer"},[e[28]||(e[28]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/qr.png",style:{position:"absolute","margin-left":"-5px",padding:"15px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" QR",1)])):a.createCommentVNode("",!0),e[29]||(e[29]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1))],512),[[a.vShow,!r.isSSOLogin]]),a.createElementVNode("p",Rs,[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].terms_by_signing_in)+" ",1),e[30]||(e[30]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("a",Ns,a.toDisplayString(n.ssoLang[this.appLanguage].terms_of_service),1),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[n.appLanguage].and)+" ",1),a.createElementVNode("a",Ps,a.toDisplayString(n.ssoLang[this.appLanguage].privacy_policy),1)]),e[36]||(e[36]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),n.isModal?(a.openBlock(),a.createElementBlock("div",{key:3,class:"page-login-links",onClick:e[14]||(e[14]=(...c)=>i.createAccountModal&&i.createAccountModal(...c))},[a.createElementVNode("a",Ls,[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].or)+" ",1),e[32]||(e[32]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[n.appLanguage].create_new_account),1)]),e[33]||(e[33]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Ms,[i.displayRegisterLogin?(a.openBlock(),a.createBlock(s,{key:0,class:"forgot float-right",to:"/register"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].create_account),1)]),_:1})):a.createCommentVNode("",!0),i.displayResetPasswordLogin?(a.openBlock(),a.createBlock(s,{key:1,class:"create float-left",to:"/reset"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].reset_password),1)]),_:1})):a.createCommentVNode("",!0),r.isSSOLogin?(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[13]||(e[13]=c=>r.isSSOLogin=!1),class:"create float-left pointer"},a.toDisplayString(n.ssoLang[n.appLanguage].go_back),1)):a.createCommentVNode("",!0),e[31]||(e[31]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const qo=nt(os,[["render",Os]]),zs=Object.freeze(Object.defineProperty({__proto__:null,default:qo},Symbol.toStringTag,{value:"Module"})),xs={WEB_VERSION:"1.0.1",SUPPORTED_LANGUAGES:["en","de","es","kr","it","fr","sr","tr","cn","pt","ja"]},Bs={mixins:[We],props:{isModal:{type:Boolean,default:!1}},data(){return{expanded:!1,addAccountReady:!1}},computed:{appVersion(){return xs.WEB_VERSION}},async mounted(){if(!this.isLoggedIn)return this.$router.push("/");await this.getAccountSettings()},methods:{continueTo(n){},addAccount(){this.$router.push("/login")},switchAccount(n){},toggleLanguageModal(){X.$emit("toggleSSOLanguageModal")},logoutAccount(){this.logout({refreshToken:this.refreshTokens[0],sendRequest:!0})}}},Us={class:"page-login content-boxed content-boxed-padding center-text",style:{"margin-top":"-1px",overflow:"hidden",border:"solid 0px #ffffff"}},Ds={class:"bold full-top no-bottom center-text text-[24px]"},js={class:"full-bottom half-top center-text font-16"},uh={key:1,class:"full-top full-bottom"},ph={class:"page-login-links center-text"},qs={class:"container left-text"},Fs={class:"firstRow"},Vs=["src"],Hs=["src"],Ks={class:"firstRow"},Gs=["src"],$s=["src"],Qs={class:"firstRow"},Ws=["src"],Ys=["src"],Js={class:"firstRow"},Xs=["src"],Zs=["src"],ec={class:"firstRow"},tc=["src"],nc=["src"],oc={class:"firstRow"},rc=["src"],ic=["src"],ac={class:"firstRow"},sc=["src"],cc={class:"red-text"},lc=["src"],dc={class:"moreFooter"},uc={class:"app-version",style:{"margin-top":"10px"}};function pc(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Us,[e[12]||(e[12]=a.createElementVNode("br",null,null,-1)),a.createCommentVNode("",!0),a.createElementVNode("h1",Ds,a.toDisplayString(n.ssoLang[n.appLanguage].welcome_account),1),a.createElementVNode("p",js,a.toDisplayString(n.account.email),1),(n.display,a.createCommentVNode("",!0)),a.createElementVNode("div",qs,[a.createCommentVNode("",!0),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:1,class:"settingRow",onClick:e[4]||(e[4]=c=>n.$emit("update:viewProp","AuthGeneral"))},[a.createElementVNode("div",Fs,[a.createElementVNode("img",{src:n.getIcon("user-black.svg"),class:"withBackground"},null,8,Vs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].general),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Hs)])])):(a.openBlock(),a.createBlock(s,{key:2,to:"/general",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",Ks,[a.createElementVNode("img",{src:n.getIcon("user-black.svg"),class:"withBackground"},null,8,Gs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].general),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,$s)])]),_:1})),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:3,class:"settingRow",onClick:e[5]||(e[5]=c=>n.$emit("update:viewProp","AuthSecurity"))},[a.createElementVNode("div",Qs,[a.createElementVNode("img",{src:n.getIcon("shield-black.svg"),class:"withBackground"},null,8,Ws),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].security),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Ys)])])):(a.openBlock(),a.createBlock(s,{key:4,to:"/security",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",Js,[a.createElementVNode("img",{src:n.getIcon("shield-black.svg"),class:"withBackground"},null,8,Xs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].security),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Zs)])]),_:1})),a.createCommentVNode("",!0),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:6,class:"settingRow",onClick:e[6]||(e[6]=c=>n.$emit("update:viewProp","AuthBilling"))},[a.createElementVNode("div",ec,[a.createElementVNode("img",{src:n.getIcon("billing-card-black.svg"),class:"withBackground"},null,8,tc),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,nc)])])):(a.openBlock(),a.createBlock(s,{key:7,to:"/billing",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",oc,[a.createElementVNode("img",{src:n.getIcon("billing-card-black.svg"),class:"withBackground"},null,8,rc),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,ic)])]),_:1})),t.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:8,class:"settingRow",onClick:e[7]||(e[7]=(...c)=>i.logoutAccount&&i.logoutAccount(...c))},[a.createElementVNode("div",ac,[a.createElementVNode("img",{src:n.getIcon("logout-red.svg"),class:"withBackground"},null,8,sc),a.createElementVNode("h4",cc,a.toDisplayString(n.ssoLang[n.appLanguage].logout),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,lc)])])),a.createElementVNode("div",dc,[a.createElementVNode("p",uc,a.toDisplayString(n.ssoLang[n.appLanguage].version)+": "+a.toDisplayString(i.appVersion),1),a.createCommentVNode("",!0)])])])}const Fo=nt(Bs,[["render",pc]]),hc=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"})),mc={name:"AuthRegister",mixins:[Tr,Sr,ri,We],props:{isModal:{type:Boolean,required:!1,default:!1}},data(){return{usernameRegister:!1,loading:!0,submitted:!1,formButtonText:"REGISTER",username:"",email:"",password:"",revealPassword:!1,emailLogin:!0,invitationCode:"",referral:""}},mounted(){this.isModal||(this.isLoggedIn?this.$router.push(this.home):!this.$route.query.state&&!this.$route.query.oauth&&!this.$route.params.oauth&&X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.invitationCode=this.$route.query.ic||"",this.$route.query.username&&(this.usernameRegister=!0,this.emailLogin=!0,this.username=this.$route.query.username),this.$route.query.ref?this.referral=this.$route.query.ref:this.$storex.referral&&(this.referral=this.$storex.referral))},methods:{async submit(){if(this.password.length<8)return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);if(this.password.search(/[a-z]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_lowercase);if(this.password.search(/[A-Z]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_uppercase);if(this.password.search(/[0-9]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_number);if(this.submitted)return;this.submitted=!0,this.email=this.email.trim(),this.username=this.username.trim();let n={response_type:this.response_type,email:this.email,username:this.username,password:this.password,ic:this.invitationCode,captchaToken:await this.getCaptchaToken("account_verify"),ref:this.referral},e=await this.register(n);this.submitted=!1,e.data&&e.data.success&&(e.data.message==="SUCCESS_REGISTER"?(this.isModal?X.$emit("ssoEvent",{name:"toggleAddAccountModalVerify",data:!1}):this.$router.push("/verify"),this.successSnack(this.ssoLang[this.appLanguage].register_success),this.formButtonText=this.ssoLang[this.appLanguage].check_your_inbox):e.data.message==="SUCCESS_LOGIN"&&(this.display!=="popup"&&(await this.loginSetup({...e,isModal:n.isModal}),await this.getLoggedInAccounts()),await this.loginSuccess({...e,isModal:n.isModal})))},close(){X.$emit("ssoEvent",{name:"toggleAddAccountModal",data:!0})},loginAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalLogin",data:!1})}},watch:{email(n){this.$storex.verifyEmail=n},referral(n){this.$storex.referral=n}}},fc={class:"bold no-bottom center-text text-[24px]",style:{"margin-top":"63px"}},gc={class:"half-bottom small-top center-text color-black"},_c={key:0},vc={key:1},yc={class:"page-login-field half-top"},bc=["placeholder"],wc={class:"page-login-field half-top"},kc=["placeholder","disabled"],Cc={class:"page-login-field half-top half-bottom"},Ec=["type","placeholder"],Tc={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Sc={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},Ic={type:"submit",class:"button black-button google-button bg-tapni-grey pointer button-90 button-center uppercase button-rounded bold full-top"},Ac={key:0},Rc={key:1,class:"button--loading button__loader"},Nc={key:0},Pc={key:1,class:"button--loading-black button__loader"},Mc={key:0},Lc={key:1,class:"button--loading-black button__loader"},Oc={class:"close-text center-text half-top color-black"},zc={class:"",href:"https://tapni.co/policies/terms-of-service"},xc={href:"https://tapni.co/policies/privacy-policy"},Bc={key:4,class:"page-login-links"},Uc={class:"forgot center-text pointer small-top"};function Dc(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[11]||(e[11]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),autocomplete:"on",style:a.normalizeStyle(t.isModal?"max-width: 500px;":"")},[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[12]||(e[12]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h1",fc,a.toDisplayString(n.ssoLang[this.appLanguage].register),1),a.createElementVNode("p",gc,[r.usernameRegister?(a.openBlock(),a.createElementBlock("span",_c,[a.createTextVNode(" t.link/"+a.toDisplayString(r.username)+" "+a.toDisplayString(n.ssoLang[this.appLanguage].username_is_free)+" ✅ ",1),e[13]||(e[13]=a.createElementVNode("br",null,null,-1))])):a.createCommentVNode("",!0)]),r.emailLogin?(a.openBlock(),a.createElementBlock("span",vc,[a.createElementVNode("div",yc,[e[14]||(e[14]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"60%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>r.email=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,name:"email",required:""},null,40,bc),[[a.vModelText,r.email]]),e[15]||(e[15]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",wc,[e[16]||(e[16]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/user.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.username=c),onKeydown:e[4]||(e[4]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",placeholder:n.ssoLang[this.appLanguage].username,name:"username",required:"",disabled:r.usernameRegister,class:a.normalizeClass({"input-disabled":r.usernameRegister})},null,42,kc),[[a.vModelText,r.username]]),e[17]||(e[17]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",Cc,[e[18]||(e[18]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,name:"password",required:"",minlength:"8"},null,8,Ec),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[6]||(e[6]=c=>r.revealPassword=!r.revealPassword),class:"pointer"},[a.withDirectives(a.createElementVNode("img",Tc,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",Sc,null,512),[[a.vShow,r.revealPassword]])])]),a.createElementVNode("button",Ic,[r.submitted?(a.openBlock(),a.createElementBlock("span",Rc)):(a.openBlock(),a.createElementBlock("span",Ac,a.toDisplayString(r.formButtonText),1))])])):a.createCommentVNode("",!0),e[26]||(e[26]=a.createElementVNode("div",{class:"decoration decoration-lines-thin half-top half-bottom"},null,-1)),n.displayAppleLogin?(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[7]||(e[7]=(...c)=>n.appleLogin&&n.appleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[19]||(e[19]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/apple-logo.png",style:{position:"absolute","margin-left":"-11px",padding:"8px 0",height:"100%"}},null,-1)),n.appleLoad?(a.openBlock(),a.createElementBlock("span",Pc)):(a.openBlock(),a.createElementBlock("span",Nc,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Apple",1))])):a.createCommentVNode("",!0),a.createElementVNode("a",{onClick:e[8]||(e[8]=(...c)=>n.googleLogin&&n.googleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[20]||(e[20]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/g-logo.png",style:{position:"absolute","margin-left":"-9px",padding:"8px 0",height:"100%"}},null,-1)),n.googleLoad?(a.openBlock(),a.createElementBlock("span",Lc)):(a.openBlock(),a.createElementBlock("span",Mc,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Google",1))]),r.emailLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:3,onClick:e[9]||(e[9]=c=>r.emailLogin=!0),class:"button-center button button-90 google-button pointer"},[e[21]||(e[21]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",style:{position:"absolute","margin-left":"-8px",padding:"12px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Email",1)])),e[27]||(e[27]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),a.createElementVNode("p",Oc,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].terms_by_registering)+" ",1),e[22]||(e[22]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("a",zc,a.toDisplayString(n.ssoLang[this.appLanguage].terms_of_service),1),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].and)+" ",1),a.createElementVNode("a",xc,a.toDisplayString(n.ssoLang[this.appLanguage].privacy_policy),1)]),e[28]||(e[28]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:5,class:"page-login-links",onClick:e[10]||(e[10]=(...c)=>i.loginAccountModal&&i.loginAccountModal(...c))},[a.createElementVNode("a",Uc,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].or)+" ",1),e[24]||(e[24]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].sign_in_with_new),1)]),e[25]||(e[25]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Bc,[a.createVNode(s,{class:"create float-right",to:"/verify"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[23]||(e[23]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const Vo=nt(mc,[["render",Dc]]),jc=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"})),qc={name:"AuthVerify",mixins:[We],props:{isModal:{type:Boolean,required:!1,default:!1}},data(){return{loading:!0,submitted:!1,action:"verify",email:"",code:"",captcha:""}},mounted(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route&&this.init()},methods:{init(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route.hash==="#reset"&&(this.action="reset"),this.$route.query.e&&(this.email=this.$route.query.e),this.$route.query.c&&(this.code=this.$route.query.c),X.$emit("ssoEvent",{name:"setLoading",data:!1})},async submit(){if(this.code.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);this.email=this.email.trim(),this.code=this.code.trim();let n={code:this.code,email:this.email,captchaToken:await this.getCaptchaToken("account_verify")};if(this.submitted)return!1;this.submitted=!0;let e=await this.verify(n);this.submitted=!1,e&&e.data&&e.data.success===!0?(this.action==="reset"&&(this.$router.push("/reset?c="+this.code+"&e="+this.email),this.successSnack(this.ssoLang[this.appLanguage].verify_account_success)),this.action==="verify"&&(this.isModal&&(this.email="",this.code="",X.$emit("closeModal")),await this.loginSetup(e),await this.getLoggedInAccounts(),this.$storex.verifyEmail="",this.$router.push("/"+e.data.data.username+"#edit"),this.successSnack(this.ssoLang[this.appLanguage].verify_account_success2))):this.submitted=!1},registerAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalRegister",data:!1})},close(){X.$emit("ssoEvent",{name:"toggleAddAccountModal",data:!0})}},watch:{"$storage.verifyEmail"(n){n&&(this.email=n)},"route.name"(n,e){!e&&n&&this.init()},"route.query":{handler(n){this.isEmpty(n)||this.init()},deep:!0}}},Fc={class:"bold no-bottom center-text text-[24px]",style:{"margin-top":"63px"}},Vc={class:"page-login-field half-top"},Hc=["placeholder"],Kc={class:"page-login-field half-top"},Gc=["placeholder"],$c={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Qc={key:0,class:"uppercase"},Wc={key:1,class:"button--loading button__loader"},Yc={class:"close-text center-text half-top color-black"},Jc=["innerHTML"],Xc={key:1,class:"page-login-links"},Zc={key:2,class:"page-login-links"};function el(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[6]||(e[6]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),style:a.normalizeStyle(t.isModal?"max-width: 500px;":"")},[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h1",Fc,a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1),e[16]||(e[16]=a.createElementVNode("p",{class:"half-bottom half-top center-text color-black"},null,-1)),a.createElementVNode("div",Vc,[e[8]||(e[8]=a.createElementVNode("i",{style:{"padding-top":"15px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"80%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"emailInput","onUpdate:modelValue":e[1]||(e[1]=c=>r.email=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,required:""},null,40,Hc),[[a.vModelText,r.email]]),e[9]||(e[9]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",Kc,[e[10]||(e[10]=a.createElementVNode("i",{style:{"padding-top":"15px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/password2.png",class:"responsive-image",style:{width:"100%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"codeInput","onUpdate:modelValue":e[3]||(e[3]=c=>r.code=c),onKeydown:e[4]||(e[4]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"tel",placeholder:n.ssoLang[this.appLanguage].code,required:""},null,40,Gc),[[a.vModelText,r.code]]),e[11]||(e[11]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("button",$c,[r.submitted?(a.openBlock(),a.createElementBlock("span",Wc)):(a.openBlock(),a.createElementBlock("span",Qc,a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1))]),e[17]||(e[17]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),a.createElementVNode("p",Yc,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].verify_account_p1},null,8,Jc),e[12]||(e[12]=a.createElementVNode("a",{href:"mailto:support@tapni.com?subject=Email Verification"}," support@tapni.com",-1))]),e[18]||(e[18]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),t.isModal?(a.openBlock(),a.createElementBlock("div",Zc,[a.createElementVNode("a",{class:"forgot center-text pointer small-top",onClick:e[5]||(e[5]=a.withModifiers((...c)=>i.registerAccountModal&&i.registerAccountModal(...c),["prevent"]))},[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].or)+" ",1),e[14]||(e[14]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].create_new_account),1)]),e[15]||(e[15]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Xc,[a.createVNode(s,{class:"create float-right",to:"/register"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].register),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[13]||(e[13]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const Ho=nt(qc,[["render",el],["__scopeId","data-v-96f72130"]]),tl=Object.freeze(Object.defineProperty({__proto__:null,default:Ho},Symbol.toStringTag,{value:"Module"}));var ci={exports:{}};(function(n,e){(function(t,o){n.exports=o()})(window,function(){return function(t){var o={};function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=o,r.d=function(i,s,c){r.o(i,s)||Object.defineProperty(i,s,{enumerable:!0,get:c})},r.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},r.t=function(i,s){if(1&s&&(i=r(i)),8&s||4&s&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&s&&typeof i!="string")for(var l in i)r.d(c,l,(function(h){return i[h]}).bind(null,l));return c},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=12)}([function(t,o,r){var i;t.exports=(i=i||function(s,c){var l=Object.create||function(){function T(){}return function(B){var V;return T.prototype=B,V=new T,T.prototype=null,V}}(),h={},u=h.lib={},g=u.Base={extend:function(T){var B=l(this);return T&&B.mixIn(T),B.hasOwnProperty("init")&&this.init!==B.init||(B.init=function(){B.$super.init.apply(this,arguments)}),B.init.prototype=B,B.$super=this,B},create:function(){var T=this.extend();return T.init.apply(T,arguments),T},init:function(){},mixIn:function(T){for(var B in T)T.hasOwnProperty(B)&&(this[B]=T[B]);T.hasOwnProperty("toString")&&(this.toString=T.toString)},clone:function(){return this.init.prototype.extend(this)}},f=u.WordArray=g.extend({init:function(T,B){T=this.words=T||[],this.sigBytes=B??4*T.length},toString:function(T){return(T||C).stringify(this)},concat:function(T){var B=this.words,V=T.words,G=this.sigBytes,J=T.sigBytes;if(this.clamp(),G%4)for(var I=0;I<J;I++){var W=V[I>>>2]>>>24-I%4*8&255;B[G+I>>>2]|=W<<24-(G+I)%4*8}else for(I=0;I<J;I+=4)B[G+I>>>2]=V[I>>>2];return this.sigBytes+=J,this},clamp:function(){var T=this.words,B=this.sigBytes;T[B>>>2]&=4294967295<<32-B%4*8,T.length=s.ceil(B/4)},clone:function(){var T=g.clone.call(this);return T.words=this.words.slice(0),T},random:function(T){for(var B,V=[],G=function(W){W=W;var ie=987654321,ee=4294967295;return function(){var ve=((ie=36969*(65535&ie)+(ie>>16)&ee)<<16)+(W=18e3*(65535&W)+(W>>16)&ee)ⅇreturn ve/=4294967296,(ve+=.5)*(s.random()>.5?1:-1)}},J=0;J<T;J+=4){var I=G(4294967296*(B||s.random()));B=987654071*I(),V.push(4294967296*I()|0)}return new f.init(V,T)}}),w=h.enc={},C=w.Hex={stringify:function(T){for(var B=T.words,V=T.sigBytes,G=[],J=0;J<V;J++){var I=B[J>>>2]>>>24-J%4*8&255;G.push((I>>>4).toString(16)),G.push((15&I).toString(16))}return G.join("")},parse:function(T){for(var B=T.length,V=[],G=0;G<B;G+=2)V[G>>>3]|=parseInt(T.substr(G,2),16)<<24-G%8*4;return new f.init(V,B/2)}},P=w.Latin1={stringify:function(T){for(var B=T.words,V=T.sigBytes,G=[],J=0;J<V;J++){var I=B[J>>>2]>>>24-J%4*8&255;G.push(String.fromCharCode(I))}return G.join("")},parse:function(T){for(var B=T.length,V=[],G=0;G<B;G++)V[G>>>2]|=(255&T.charCodeAt(G))<<24-G%4*8;return new f.init(V,B)}},M=w.Utf8={stringify:function(T){try{return decodeURIComponent(escape(P.stringify(T)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(T){return P.parse(unescape(encodeURIComponent(T)))}},j=u.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(T){typeof T=="string"&&(T=M.parse(T)),this._data.concat(T),this._nDataBytes+=T.sigBytes},_process:function(T){var B=this._data,V=B.words,G=B.sigBytes,J=this.blockSize,I=G/(4*J),W=(I=T?s.ceil(I):s.max((0|I)-this._minBufferSize,0))*J,ie=s.min(4*W,G);if(W){for(var ee=0;ee<W;ee+=J)this._doProcessBlock(V,ee);var ve=V.splice(0,W);B.sigBytes-=ie}return new f.init(ve,ie)},clone:function(){var T=g.clone.call(this);return T._data=this._data.clone(),T},_minBufferSize:0}),N=(u.Hasher=j.extend({cfg:g.extend(),init:function(T){this.cfg=this.cfg.extend(T),this.reset()},reset:function(){j.reset.call(this),this._doReset()},update:function(T){return this._append(T),this._process(),this},finalize:function(T){return T&&this._append(T),this._doFinalize()},blockSize:16,_createHelper:function(T){return function(B,V){return new T.init(V).finalize(B)}},_createHmacHelper:function(T){return function(B,V){return new N.HMAC.init(T,V).finalize(B)}}}),h.algo={});return h}(Math),i)},function(t,o,r){var i,s,c,l;t.exports=(i=r(0),c=(s=i).lib.Base,l=s.enc.Utf8,void(s.algo.HMAC=c.extend({init:function(h,u){h=this._hasher=new h.init,typeof u=="string"&&(u=l.parse(u));var g=h.blockSize,f=4*g;u.sigBytes>f&&(u=h.finalize(u)),u.clamp();for(var w=this._oKey=u.clone(),C=this._iKey=u.clone(),P=w.words,M=C.words,j=0;j<g;j++)P[j]^=1549556828,M[j]^=909522486;w.sigBytes=C.sigBytes=f,this.reset()},reset:function(){var h=this._hasher;h.reset(),h.update(this._iKey)},update:function(h){return this._hasher.update(h),this},finalize:function(h){var u=this._hasher,g=u.finalize(h);return u.reset(),u.finalize(this._oKey.clone().concat(g))}})))},function(t,o,r){var i;t.exports=(i=r(0),i.enc.Hex)},function(t,o,r){var i,s,c,l,h,u;t.exports=(u=r(0),s=(i=u).lib,c=s.Base,l=s.WordArray,(h=i.x64={}).Word=c.extend({init:function(g,f){this.high=g,this.low=f}}),h.WordArray=c.extend({init:function(g,f){g=this.words=g||[],this.sigBytes=f??8*g.length},toX32:function(){for(var g=this.words,f=g.length,w=[],C=0;C<f;C++){var P=g[C];w.push(P.high),w.push(P.low)}return l.create(w,this.sigBytes)},clone:function(){for(var g=c.clone.call(this),f=g.words=this.words.slice(0),w=f.length,C=0;C<w;C++)f[C]=f[C].clone();return g}}),u)},function(t,o,r){var i;t.exports=(i=r(0),r(9),r(1),i.HmacSHA1)},function(t,o,r){var i;t.exports=(i=r(0),r(10),r(1),i.HmacSHA256)},function(t,o,r){var i;t.exports=(i=r(0),r(3),r(11),r(1),i.HmacSHA512)},function(t,o){function r(i,s){var c=i.indexOf(s);if(c===-1)throw new Error("Invalid character found: "+s);return c}t.exports=function(i,s){var c;switch(s){case"RFC3548":case"RFC4648":c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i=i.replace(/=+$/,"");break;case"RFC4648-HEX":c="0123456789ABCDEFGHIJKLMNOPQRSTUV",i=i.replace(/=+$/,"");break;case"Crockford":c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=i.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1");break;default:throw new Error("Unknown base32 variant: "+s)}for(var l=i.length,h=0,u=0,g=0,f=new Uint8Array(5*l/8|0),w=0;w<l;w++)u=u<<5|r(c,i[w]),(h+=5)>=8&&(f[g++]=u>>>h-8&255,h-=8);return f.buffer}},function(t,o){t.exports=function(r,i,s){var c,l;switch(s=s||{},i){case"RFC3548":case"RFC4648":c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l=!0;break;case"RFC4648-HEX":c="0123456789ABCDEFGHIJKLMNOPQRSTUV",l=!0;break;case"Crockford":c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",l=!1;break;default:throw new Error("Unknown base32 variant: "+i)}for(var h=s.padding!==void 0?s.padding:l,u=r.byteLength,g=new Uint8Array(r),f=0,w=0,C="",P=0;P<u;P++)for(w=w<<8|g[P],f+=8;f>=5;)C+=c[w>>>f-5&31],f-=5;if(f>0&&(C+=c[w<<5-f&31]),h)for(;C.length%8!=0;)C+="=";return C}},function(t,o,r){var i,s,c,l,h,u,g,f;t.exports=(f=r(0),s=(i=f).lib,c=s.WordArray,l=s.Hasher,h=i.algo,u=[],g=h.SHA1=l.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,C){for(var P=this._hash.words,M=P[0],j=P[1],N=P[2],T=P[3],B=P[4],V=0;V<80;V++){if(V<16)u[V]=0|w[C+V];else{var G=u[V-3]^u[V-8]^u[V-14]^u[V-16];u[V]=G<<1|G>>>31}var J=(M<<5|M>>>27)+B+u[V];J+=V<20?1518500249+(j&N|~j&T):V<40?1859775393+(j^N^T):V<60?(j&N|j&T|N&T)-1894007588:(j^N^T)-899497514,B=T,T=N,N=j<<30|j>>>2,j=M,M=J}P[0]=P[0]+M|0,P[1]=P[1]+j|0,P[2]=P[2]+N|0,P[3]=P[3]+T|0,P[4]=P[4]+B|0},_doFinalize:function(){var w=this._data,C=w.words,P=8*this._nDataBytes,M=8*w.sigBytes;return C[M>>>5]|=128<<24-M%32,C[14+(M+64>>>9<<4)]=Math.floor(P/4294967296),C[15+(M+64>>>9<<4)]=P,w.sigBytes=4*C.length,this._process(),this._hash},clone:function(){var w=l.clone.call(this);return w._hash=this._hash.clone(),w}}),i.SHA1=l._createHelper(g),i.HmacSHA1=l._createHmacHelper(g),f.SHA1)},function(t,o,r){var i;t.exports=(i=r(0),function(s){var c=i,l=c.lib,h=l.WordArray,u=l.Hasher,g=c.algo,f=[],w=[];(function(){function M(B){for(var V=s.sqrt(B),G=2;G<=V;G++)if(!(B%G))return!1;return!0}function j(B){return 4294967296*(B-(0|B))|0}for(var N=2,T=0;T<64;)M(N)&&(T<8&&(f[T]=j(s.pow(N,.5))),w[T]=j(s.pow(N,1/3)),T++),N++})();var C=[],P=g.SHA256=u.extend({_doReset:function(){this._hash=new h.init(f.slice(0))},_doProcessBlock:function(M,j){for(var N=this._hash.words,T=N[0],B=N[1],V=N[2],G=N[3],J=N[4],I=N[5],W=N[6],ie=N[7],ee=0;ee<64;ee++){if(ee<16)C[ee]=0|M[j+ee];else{var ve=C[ee-15],Re=(ve<<25|ve>>>7)^(ve<<14|ve>>>18)^ve>>>3,le=C[ee-2],Me=(le<<15|le>>>17)^(le<<13|le>>>19)^le>>>10;C[ee]=Re+C[ee-7]+Me+C[ee-16]}var yt=T&B^T&V^B&V,Pt=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),at=ie+((J<<26|J>>>6)^(J<<21|J>>>11)^(J<<7|J>>>25))+(J&I^~J&W)+w[ee]+C[ee];ie=W,W=I,I=J,J=G+at|0,G=V,V=B,B=T,T=at+(Pt+yt)|0}N[0]=N[0]+T|0,N[1]=N[1]+B|0,N[2]=N[2]+V|0,N[3]=N[3]+G|0,N[4]=N[4]+J|0,N[5]=N[5]+I|0,N[6]=N[6]+W|0,N[7]=N[7]+ie|0},_doFinalize:function(){var M=this._data,j=M.words,N=8*this._nDataBytes,T=8*M.sigBytes;return j[T>>>5]|=128<<24-T%32,j[14+(T+64>>>9<<4)]=s.floor(N/4294967296),j[15+(T+64>>>9<<4)]=N,M.sigBytes=4*j.length,this._process(),this._hash},clone:function(){var M=u.clone.call(this);return M._hash=this._hash.clone(),M}});c.SHA256=u._createHelper(P),c.HmacSHA256=u._createHmacHelper(P)}(Math),i.SHA256)},function(t,o,r){var i;t.exports=(i=r(0),r(3),function(){var s=i,c=s.lib.Hasher,l=s.x64,h=l.Word,u=l.WordArray,g=s.algo;function f(){return h.create.apply(h,arguments)}var w=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],C=[];(function(){for(var M=0;M<80;M++)C[M]=f()})();var P=g.SHA512=c.extend({_doReset:function(){this._hash=new u.init([new h.init(1779033703,4089235720),new h.init(3144134277,2227873595),new h.init(1013904242,4271175723),new h.init(2773480762,1595750129),new h.init(1359893119,2917565137),new h.init(2600822924,725511199),new h.init(528734635,4215389547),new h.init(1541459225,327033209)])},_doProcessBlock:function(M,j){for(var N=this._hash.words,T=N[0],B=N[1],V=N[2],G=N[3],J=N[4],I=N[5],W=N[6],ie=N[7],ee=T.high,ve=T.low,Re=B.high,le=B.low,Me=V.high,yt=V.low,Pt=G.high,at=G.low,dn=J.high,Jt=J.low,un=I.high,Xt=I.low,Sn=W.high,Ce=W.low,Se=ie.high,Kt=ie.low,De=ee,Le=ve,Mt=Re,bt=le,Qe=Me,st=yt,Gt=Pt,Lt=at,Ge=dn,Ie=Jt,ct=un,Ot=Xt,zt=Sn,ht=Ce,pn=Se,wt=Kt,je=0;je<80;je++){var mt=C[je];if(je<16)var Oe=mt.high=0|M[j+2*je],lt=mt.low=0|M[j+2*je+1];else{var hn=C[je-15],qe=hn.high,xt=hn.low,m=(qe>>>1|xt<<31)^(qe>>>8|xt<<24)^qe>>>7,d=(xt>>>1|qe<<31)^(xt>>>8|qe<<24)^(xt>>>7|qe<<25),p=C[je-2],_=p.high,k=p.low,S=(_>>>19|k<<13)^(_<<3|k>>>29)^_>>>6,L=(k>>>19|_<<13)^(k<<3|_>>>29)^(k>>>6|_<<26),se=C[je-7],ye=se.high,_e=se.low,be=C[je-16],me=be.high,lo=be.low;Oe=(Oe=(Oe=m+ye+((lt=d+_e)>>>0<d>>>0?1:0))+S+((lt+=L)>>>0<L>>>0?1:0))+me+((lt+=lo)>>>0<lo>>>0?1:0),mt.high=Oe,mt.low=lt}var kt,Jo=Ge&ct^~Ge&zt,uo=Ie&Ot^~Ie&ht,Xo=De&Mt^De&Qe^Mt&Qe,Zo=Le&bt^Le&st^bt&st,po=(De>>>28|Le<<4)^(De<<30|Le>>>2)^(De<<25|Le>>>7),ho=(Le>>>28|De<<4)^(Le<<30|De>>>2)^(Le<<25|De>>>7),er=(Ge>>>14|Ie<<18)^(Ge>>>18|Ie<<14)^(Ge<<23|Ie>>>9),tr=(Ie>>>14|Ge<<18)^(Ie>>>18|Ge<<14)^(Ie<<23|Ge>>>9),v=w[je],y=v.high,E=v.low,A=pn+er+((kt=wt+tr)>>>0<wt>>>0?1:0),O=ho+Zo;pn=zt,wt=ht,zt=ct,ht=Ot,ct=Ge,Ot=Ie,Ge=Gt+(A=(A=(A=A+Jo+((kt+=uo)>>>0<uo>>>0?1:0))+y+((kt+=E)>>>0<E>>>0?1:0))+Oe+((kt+=lt)>>>0<lt>>>0?1:0))+((Ie=Lt+kt|0)>>>0<Lt>>>0?1:0)|0,Gt=Qe,Lt=st,Qe=Mt,st=bt,Mt=De,bt=Le,De=A+(po+Xo+(O>>>0<ho>>>0?1:0))+((Le=kt+O|0)>>>0<kt>>>0?1:0)|0}ve=T.low=ve+Le,T.high=ee+De+(ve>>>0<Le>>>0?1:0),le=B.low=le+bt,B.high=Re+Mt+(le>>>0<bt>>>0?1:0),yt=V.low=yt+st,V.high=Me+Qe+(yt>>>0<st>>>0?1:0),at=G.low=at+Lt,G.high=Pt+Gt+(at>>>0<Lt>>>0?1:0),Jt=J.low=Jt+Ie,J.high=dn+Ge+(Jt>>>0<Ie>>>0?1:0),Xt=I.low=Xt+Ot,I.high=un+ct+(Xt>>>0<Ot>>>0?1:0),Ce=W.low=Ce+ht,W.high=Sn+zt+(Ce>>>0<ht>>>0?1:0),Kt=ie.low=Kt+wt,ie.high=Se+pn+(Kt>>>0<wt>>>0?1:0)},_doFinalize:function(){var M=this._data,j=M.words,N=8*this._nDataBytes,T=8*M.sigBytes;return j[T>>>5]|=128<<24-T%32,j[30+(T+128>>>10<<5)]=Math.floor(N/4294967296),j[31+(T+128>>>10<<5)]=N,M.sigBytes=4*j.length,this._process(),this._hash.toX32()},clone:function(){var M=c.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:32});s.SHA512=c._createHelper(P),s.HmacSHA512=c._createHmacHelper(P)}(),i.SHA512)},function(t,o,r){r.r(o);var i,s=r(0),c=r.n(s),l=r(4),h=r.n(l),u=r(5),g=r.n(u),f=r(6),w=r.n(f),C=r(2),P=r.n(C);function M(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function j(v){for(var y=1;y<arguments.length;y++){var E=arguments[y]!=null?arguments[y]:{};y%2?M(Object(E),!0).forEach(function(A){N(v,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(E)):M(Object(E)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(E,A))})}return v}function N(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function T(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function B(v){return Object.keys(v).map(function(y){return v[y]})}(function(v){v.SHA1="sha1",v.SHA256="sha256",v.SHA512="sha512"})(i||(i={}));var V,G=B(i);(function(v){v.ASCII="ascii",v.BASE64="base64",v.HEX="hex",v.LATIN1="latin1",v.UTF8="utf8"})(V||(V={}));var J,I=B(V);(function(v){v.HOTP="hotp",v.TOTP="totp"})(J||(J={}));var W=B(J),ie=function(){throw new Error("Please provide an options.createDigest implementation.")};function ee(v){return/^(\d+)$/.test(v)}function ve(v,y,E){if(v.length>=y)return v;var A=Array(y+1).join(E);return"".concat(A).concat(v).slice(-1*y)}function Re(v){var y="otpauth://".concat(v.type,"/{labelPrefix}:{accountName}?secret={secret}{query}"),E=[];if(W.indexOf(v.type)<0)throw new Error("Expecting options.type to be one of ".concat(W.join(", "),". Received ").concat(v.type,"."));if(v.type==="hotp"){if(v.counter==null||typeof v.counter!="number")throw new Error('Expecting options.counter to be a number when options.type is "hotp".');E.push("&counter=".concat(v.counter))}return v.type==="totp"&&v.step&&E.push("&period=".concat(v.step)),v.digits&&E.push("&digits=".concat(v.digits)),v.algorithm&&E.push("&algorithm=".concat(v.algorithm.toUpperCase())),v.issuer&&E.push("&issuer=".concat(encodeURIComponent(v.issuer))),y.replace("{labelPrefix}",encodeURIComponent(v.issuer||v.accountName)).replace("{accountName}",encodeURIComponent(v.accountName)).replace("{secret}",v.secret).replace("{query}",E.join(""))}function le(v){return(le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function Me(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function yt(v,y){return!y||le(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function Pt(v){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function at(v,y){return(at=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function dn(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function Jt(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function un(v){if(typeof v.createDigest!="function")throw new Error("Expecting options.createDigest to be a function.");if(typeof v.createHmacKey!="function")throw new Error("Expecting options.createHmacKey to be a function.");if(typeof v.digits!="number")throw new Error("Expecting options.digits to be a number.");if(!v.algorithm||G.indexOf(v.algorithm)<0)throw new Error("Expecting options.algorithm to be one of ".concat(G.join(", "),". Received ").concat(v.algorithm,"."));if(!v.encoding||I.indexOf(v.encoding)<0)throw new Error("Expecting options.encoding to be one of ".concat(I.join(", "),". Received ").concat(v.encoding,"."))}var Xt=function(v,y,E){return nn.from(y,E).toString("hex")};function Sn(v){var y=function(E){for(var A=1;A<arguments.length;A++){var O=arguments[A]!=null?arguments[A]:{};A%2?dn(Object(O),!0).forEach(function(q){Jt(E,q,O[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):dn(Object(O)).forEach(function(q){Object.defineProperty(E,q,Object.getOwnPropertyDescriptor(O,q))})}return E}({},{algorithm:i.SHA1,createHmacKey:Xt,createDigest:ie,digits:6,encoding:V.ASCII},{},v);return un(y),Object.freeze(y)}function Ce(v,y,E){var A=function(q){return ve(q.toString(16),16,"0")}(y),O=E.createHmacKey(E.algorithm,v,E.encoding);return E.createDigest(E.algorithm,O,A)}function Se(v,y,E){return function(A,O){var q=nn.from(A,"hex"),pe=15&q[q.length-1],et=((127&q[pe])<<24|(255&q[pe+1])<<16|(255&q[pe+2])<<8|255&q[pe+3])%Math.pow(10,O);return ve(String(et),O,"0")}(E.digest||Ce(v,y,E),E.digits)}function Kt(v,y,E,A,O){return Re({algorithm:O.algorithm,digits:O.digits,type:J.HOTP,accountName:v,counter:A,issuer:y,secret:E})}var De=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),yt(this,Pt(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&at(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return Sn(this.options)}},{key:"generate",value:function(O,q){return Se(O,q,this.allOptions())}},{key:"check",value:function(O,q,pe){return function(et,Bt,Zt,nr){return!!ee(et)&&et===Se(Bt,Zt,nr)}(O,q,pe,this.allOptions())}},{key:"verify",value:function(O){if(le(O)!=="object")throw new Error("Expecting argument 0 of verify to be an object");return this.check(O.token,O.secret,O.counter)}},{key:"keyuri",value:function(O,q,pe,et){return Kt(O,q,pe,et,this.allOptions())}}])&&Me(E.prototype,A),y}(function(){function v(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")})(this,v),this._defaultOptions=Object.freeze(j({},A)),this._options=Object.freeze({})}var y,E;return y=v,(E=[{key:"create",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new v(A)}},{key:"clone",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=this.create(j({},this._defaultOptions,{},A));return O.options=this._options,O}},{key:"allOptions",value:function(){return this.options}},{key:"resetOptions",value:function(){this._options=Object.freeze({})}},{key:"options",get:function(){return Object.freeze(j({},this._defaultOptions,{},this._options))},set:function(A){this._options=Object.freeze(j({},this._options,{},A))}}])&&T(y.prototype,E),v}());function Le(v){return(Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function Mt(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function bt(v,y){return!y||Le(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function Qe(v){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function st(v,y){return(st=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function Gt(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function Lt(v){for(var y=1;y<arguments.length;y++){var E=arguments[y]!=null?arguments[y]:{};y%2?Gt(Object(E),!0).forEach(function(A){Ge(v,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(E)):Gt(Object(E)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(E,A))})}return v}function Ge(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function Ie(v,y){return function(E){if(Array.isArray(E))return E}(v)||function(E,A){if(Symbol.iterator in Object(E)||Object.prototype.toString.call(E)==="[object Arguments]"){var O=[],q=!0,pe=!1,et=void 0;try{for(var Bt,Zt=E[Symbol.iterator]();!(q=(Bt=Zt.next()).done)&&(O.push(Bt.value),!A||O.length!==A);q=!0);}catch(nr){pe=!0,et=nr}finally{try{q||Zt.return==null||Zt.return()}finally{if(pe)throw et}}return O}}(v,y)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ct(v){if(typeof v=="number")return[Math.abs(v),Math.abs(v)];if(Array.isArray(v)){var y=Ie(v,2),E=y[0],A=y[1];if(typeof E=="number"&&typeof A=="number")return[Math.abs(E),Math.abs(A)]}throw new Error("Expecting options.window to be an number or [number, number].")}function Ot(v){if(un(v),ct(v.window),typeof v.epoch!="number")throw new Error("Expecting options.epoch to be a number.");if(typeof v.step!="number")throw new Error("Expecting options.step to be a number.")}var zt=function(v,y,E){var A=v.length,O=nn.from(v,y).toString("hex");if(A<E){var q=new Array(E-A+1).join(O);return nn.from(q,"hex").slice(0,E).toString("hex")}return O},ht=function(v,y,E){switch(v){case i.SHA1:return zt(y,E,20);case i.SHA256:return zt(y,E,32);case i.SHA512:return zt(y,E,64);default:throw new Error("Expecting algorithm to be one of ".concat(G.join(", "),". Received ").concat(v,"."))}};function pn(v){var y=Lt({},{algorithm:i.SHA1,createDigest:ie,createHmacKey:ht,digits:6,encoding:V.ASCII,epoch:Date.now(),step:30,window:0},{},v);return Ot(y),Object.freeze(y)}function wt(v,y){var E,A;return Se(v,(E=y.epoch,A=y.step,Math.floor(E/A/1e3)),y)}function je(v,y,E,A){var O=[];if(A===0)return O;for(var q=1;q<=A;q++){var pe=y*q*E;O.push(v+pe)}return O}function mt(v,y,E){return!!ee(v)&&v===wt(y,E)}function Oe(v,y,E,A){var O=null;return v.some(function(q,pe){return!!mt(y,E,Lt({},A,{epoch:q}))&&(O=pe+1,!0)}),O}function lt(v,y,E){if(mt(v,y,E))return 0;var A,O,q,pe,et,Bt=(A=E.epoch,O=E.step,q=E.window,pe=ct(q),{current:A,past:je(A,-1,et=1e3*O,pe[0]),future:je(A,1,et,pe[1])}),Zt=Oe(Bt.past,v,y,E);return Zt!==null?-1*Zt:Oe(Bt.future,v,y,E)}function hn(v,y){return Math.floor(v/1e3)%y}function qe(v,y,E,A){return Re({algorithm:A.algorithm,digits:A.digits,step:A.step,type:J.TOTP,accountName:v,issuer:y,secret:E})}var xt=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),bt(this,Qe(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&st(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return pn(this.options)}},{key:"generate",value:function(O){return wt(O,this.allOptions())}},{key:"checkDelta",value:function(O,q){return lt(O,q,this.allOptions())}},{key:"check",value:function(O,q){return typeof this.checkDelta(O,q)=="number"}},{key:"verify",value:function(O){if(Le(O)!=="object")throw new Error("Expecting argument 0 of verify to be an object");return this.check(O.token,O.secret)}},{key:"timeRemaining",value:function(){var O,q,pe=this.allOptions();return O=pe.epoch,(q=pe.step)-hn(O,q)}},{key:"timeUsed",value:function(){var O=this.allOptions();return hn(O.epoch,O.step)}},{key:"keyuri",value:function(O,q,pe){return qe(O,q,pe,this.allOptions())}}])&&Mt(E.prototype,A),y}(De);function m(v){return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function d(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function p(v,y){return!y||m(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function _(v){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function k(v,y){return(k=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function S(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function L(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function se(v){var y=function(E){for(var A=1;A<arguments.length;A++){var O=arguments[A]!=null?arguments[A]:{};A%2?S(Object(O),!0).forEach(function(q){L(E,q,O[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):S(Object(O)).forEach(function(q){Object.defineProperty(E,q,Object.getOwnPropertyDescriptor(O,q))})}return E}({},{algorithm:i.SHA1,createDigest:ie,createHmacKey:ht,digits:6,encoding:V.HEX,epoch:Date.now(),step:30,window:0},{},v);return function(E){if(Ot(E),typeof E.keyDecoder!="function")throw new Error("Expecting options.keyDecoder to be a function.");if(E.keyEncoder&&typeof E.keyEncoder!="function")throw new Error("Expecting options.keyEncoder to be a function.")}(y),Object.freeze(y)}function ye(v,y){return y.keyEncoder(v,y.encoding)}function _e(v,y){return y.keyDecoder(v,y.encoding)}function be(v,y){return ye(y.createRandomBytes(v,y.encoding),y)}var me=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),p(this,_(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&k(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return se(this.options)}},{key:"generate",value:function(O){return function(q,pe){return wt(_e(q,pe),pe)}(O,this.allOptions())}},{key:"checkDelta",value:function(O,q){return function(pe,et,Bt){return lt(pe,_e(et,Bt),Bt)}(O,q,this.allOptions())}},{key:"encode",value:function(O){return ye(O,this.allOptions())}},{key:"decode",value:function(O){return _e(O,this.allOptions())}},{key:"generateSecret",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;return be(O,this.allOptions())}}])&&d(E.prototype,A),y}(xt),lo=c.a.lib.WordArray,kt=function(v,y,E){var A=function(pe){switch(pe){case i.SHA1:return h.a;case i.SHA256:return g.a;case i.SHA512:return w.a;default:throw new Error("Expecting argument 0 to be one of ".concat(G.join(", "),". Received ").concat(pe,"."))}}(v),O=P.a.parse(E),q=P.a.parse(y);return String(A(O,q))},Jo=r(7),uo=r.n(Jo),Xo=r(8),Zo=r.n(Xo);function po(v){return(po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}r.d(o,"hotp",function(){return ho}),r.d(o,"totp",function(){return er}),r.d(o,"authenticator",function(){return tr}),(typeof window>"u"?"undefined":po(window))==="object"&&window.Buffer===void 0&&(window.Buffer=buffer.Buffer);var ho=new De({createDigest:kt}),er=new xt({createDigest:kt}),tr=new me({createDigest:kt,createRandomBytes:function(v,y){var E=lo.random(v);return nn.from(E.toString(),"hex").toString(y)},keyDecoder:function(v,y){var E=uo()(v.toUpperCase(),"RFC4648");return nn.from(E).toString(y)},keyEncoder:function(v,y){return Zo()(nn.from(v,y),"RFC4648",{padding:!1})}})}])})})(ci);var li=ci.exports;const nl={name:"AuthSecurity",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{accountDelete:!1,changePassword:!1,password:"",passwordRepeat:"",currentPassword:"",otpSecret:null,mfaEnable:!1,qrCodeHash:null,qrCodeRefreshInterval:null,poolingInterval:null,loading:!1}},async mounted(){this.isLoggedIn||this.$router.push("/login"),this.renderView==="AuthSecurity"&&(await this.getAccountSettings(),this.generateOTPQrCode())},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},async deleteAccountSubmit(){await this.deleteAccount()===!0&&(this.successSnack(this.ssoLang[this.appLanguage].profile_delete_account_success),setTimeout(this.$store.dispatch("logout"),1e3))},generateOTPQrCode(){const n=this.account.email;if(this.account.mfaEnabled)this.mfaEnable=!0;else{const e="Tapni",t=li.authenticator.generateSecret();this.otpSecret=t;const o=li.authenticator.keyuri(n,e,t);new ir({width:200,height:200,data:o}).append(document.getElementById("qrCodeContainer"))}},async cancelMFA(){X.$emit("ssoEvent",{name:"mfaCancel",data:!0})},async validateMFA(){if(!this.otp||this.otp.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);this.loading=!0;let n={otpToken:this.otp,otpSecret:this.otpSecret,enable:this.mfaEnable};this.mfaEnable||delete n.otpSecret;const[e,t]=await fe(Fe.setMfa(n,this.$storex));if(e)return X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(e);t.data.success&&(this.getAccountSettings(),this.successSnack(t.data.message)),this.loading=!1},async submitChangePassword(){if(this.password.length<8)return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);if(this.password!==this.passwordRepeat)return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);await this.newPassword({currentPassword:this.currentPassword,password:this.password,passwordRepeat:this.passwordRepeat})===!0&&(this.successSnack(this.ssoLang[this.appLanguage].password_change_success),this.changePassword=!1)}}},ol={class:"page-login content-boxed content-boxed-padding"},rl={class:"subheaderContainer full-top"},il=["src"],al=["src"],sl={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},cl={class:"container center-text"},ll={class:"full-top"},dl={class:"settingRow"},ul={class:"firstRow"},pl={class:"ios-switch",style:{display:"inline-block"}},hl={class:"center-text half-top"},ml={class:"firstRow"},fl={class:"center-text no-margin"},gl={class:"margin-center left-text padding-left small-top"},_l={class:""},vl=["placeholder"],yl=["innerHTML"],bl={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},wl={key:0},kl={key:1,class:"button--loading button__loader"},Cl={class:"close-text center-text half-top"},El=["innerHTML"],Tl={key:1,class:"margin-center small-top",style:{width:"100%"}},Sl={class:"left-text"},Il={key:0},Al={key:1},Rl={class:"firstRow"},Nl=["src"],Pl=["placeholder"],Ml={class:"small-text small-top-padding small-bottom"},Ll=["placeholder"],Ol={class:"small-text small-top-padding small-bottom"},zl=["placeholder"],xl={class:"small-text small-top-padding small-bottom"},Bl={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},Ul={key:0},Dl={key:1,class:"button--loading button__loader"},jl={class:"center-text font-13 half-top half-bottom"},ql=["innerHTML"],Fl={class:"firstRow"},Vl={class:"red-text"},Hl=["src"],Kl={class:"center-text half-top"},Gl={class:"settingRow full-top"},$l={class:"firstRow"},Ql={class:"ios-switch",style:{display:"inline-block"}},Wl={class:"left-text small-top"},Yl={type:"submit",class:"button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},Jl={key:0},Xl={key:1,class:"button--loading button__loader"},Zl={class:"small-bottom red-text"};function ed(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",ol,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[15]||(e[15]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",rl,[n.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=c=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,il)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,al)]),_:1})),a.createElementVNode("h2",sl,a.toDisplayString(n.ssoLang[n.appLanguage].security),1)]),a.createElementVNode("div",cl,[a.createElementVNode("p",null,a.toDisplayString(n.ssoLang[n.appLanguage].security_p),1),a.createElementVNode("div",ll,[a.createElementVNode("div",dl,[a.createElementVNode("div",ul,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth),1),a.createElementVNode("div",pl,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",name:"ios-switch",class:"ios-switch-checkbox",id:"mfa-open-switch","onUpdate:modelValue":e[2]||(e[2]=c=>r.mfaEnable=c)},null,512),[[a.vModelCheckbox,r.mfaEnable]]),e[16]||(e[16]=a.createElementVNode("label",{class:"ios-switch-label",for:"mfa-open-switch"},null,-1))])])]),a.withDirectives(a.createElementVNode("div",hl,[e[17]||(e[17]=a.createElementVNode("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1)),e[18]||(e[18]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",{class:"settingRow",onClick:e[3]||(e[3]=c=>n.copy(r.otpSecret))},[a.createElementVNode("div",ml,[a.createElementVNode("h4",fl,a.toDisplayString(r.otpSecret),1)])]),a.createElementVNode("div",gl,[a.createElementVNode("p",_l,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_qr),1)])],512),[[a.vShow,r.mfaEnable&&!n.account.mfaEnabled]]),n.account.mfaEnabled!==r.mfaEnable?(a.openBlock(),a.createElementBlock("form",{key:0,onSubmit:e[6]||(e[6]=a.withModifiers((...c)=>i.validateMFA&&i.validateMFA(...c),["prevent"])),class:"half-top"},[a.createElementVNode("div",null,[a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[4]||(e[4]=c=>n.otp=c),placeholder:n.ssoLang[n.appLanguage].otp_code,class:"edit-input h-40 lh-40",style:{margin:"0 auto",height:"25px",width:"100%"},required:"",onKeydown:e[5]||(e[5]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"]))},null,40,vl),[[a.vModelText,n.otp]]),a.createElementVNode("p",{class:"small-top full-bottom padding-left left-text",innerHTML:n.ssoLang[n.appLanguage].otp_subtitle},null,8,yl)]),a.createElementVNode("button",bl,[r.loading?(a.openBlock(),a.createElementBlock("span",kl)):(a.openBlock(),a.createElementBlock("span",wl,a.toDisplayString(n.ssoLang[n.appLanguage].continue),1))]),a.createElementVNode("p",Cl,[a.createElementVNode("span",{innerHTML:n.ssoLang[n.appLanguage].otp_p1},null,8,El),e[19]||(e[19]=a.createElementVNode("a",{href:"mailto:support@tapni.com?subject=MFA Authentication Problem"}," support@tapni.com",-1))])],32)):(a.openBlock(),a.createElementBlock("div",Tl,[a.createElementVNode("div",Sl,[r.mfaEnable?(a.openBlock(),a.createElementBlock("p",Il,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_enabled),1)):(a.openBlock(),a.createElementBlock("p",Al,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_p),1))])])),a.createElementVNode("div",{class:"settingRow full-top",onClick:e[7]||(e[7]=c=>r.changePassword=!r.changePassword)},[a.createElementVNode("div",Rl,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].change_password),1),a.createElementVNode("img",{class:a.normalizeClass(["transition-icon",{"rotate-icon":!!r.changePassword}]),src:n.getIcon("arrow-gray-down.svg")},null,10,Nl)])]),a.withDirectives(a.createElementVNode("form",{onSubmit:e[11]||(e[11]=a.withModifiers((...c)=>i.submitChangePassword&&i.submitChangePassword(...c),["prevent"])),class:"center-text half-top"},[a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[8]||(e[8]=c=>r.currentPassword=c),placeholder:n.ssoLang[n.appLanguage].password_current_p,class:"edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,Pl),[[a.vModelText,r.currentPassword]]),a.createElementVNode("p",Ml,a.toDisplayString(n.ssoLang[n.appLanguage].password_current),1),a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[9]||(e[9]=c=>r.password=c),placeholder:n.ssoLang[n.appLanguage].password_new_p,class:"bg-white edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,Ll),[[a.vModelText,r.password]]),a.createElementVNode("p",Ol,a.toDisplayString(n.ssoLang[n.appLanguage].password_new),1),a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[10]||(e[10]=c=>r.passwordRepeat=c),placeholder:n.ssoLang[n.appLanguage].password_new_repeat_p,class:"edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,zl),[[a.vModelText,r.passwordRepeat]]),a.createElementVNode("p",xl,a.toDisplayString(n.ssoLang[n.appLanguage].password_new_repeat),1),a.createElementVNode("button",Bl,[r.loading?(a.openBlock(),a.createElementBlock("span",Dl)):(a.openBlock(),a.createElementBlock("span",Ul,a.toDisplayString(n.ssoLang[n.appLanguage].password_update),1))]),a.createElementVNode("p",jl,[a.createElementVNode("span",{innerHTML:n.ssoLang[n.appLanguage].password_reset},null,8,ql),a.createVNode(s,{to:"/reset",exact:"",class:"color-black"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].by_clicking_here),1)]),_:1})])],544),[[a.vShow,r.changePassword]]),a.createElementVNode("div",{class:"settingRow full-top",onClick:e[12]||(e[12]=c=>r.accountDelete=!r.accountDelete)},[a.createElementVNode("div",Fl,[a.createElementVNode("h4",Vl,a.toDisplayString(n.ssoLang[n.appLanguage].delete_account),1),a.createElementVNode("img",{class:a.normalizeClass(["transition-icon",{"rotate-icon":!!r.accountDelete}]),src:n.getIcon("arrow-gray-down.svg")},null,10,Hl)])]),a.withDirectives(a.createElementVNode("div",Kl,[a.createElementVNode("div",Gl,[a.createElementVNode("div",$l,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].active_account),1),a.createElementVNode("div",Ql,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",name:"ios-switch",class:"ios-switch-checkbox",id:"active-open-switch","onUpdate:modelValue":e[13]||(e[13]=c=>n.account.is_active=c)},null,512),[[a.vModelCheckbox,n.account.is_active]]),e[20]||(e[20]=a.createElementVNode("label",{class:"ios-switch-label",for:"active-open-switch"},null,-1))])])]),a.createElementVNode("p",Wl,a.toDisplayString(n.ssoLang[n.appLanguage].active_account_p),1),a.createElementVNode("form",{onSubmit:e[14]||(e[14]=a.withModifiers((...c)=>i.deleteAccountSubmit&&i.deleteAccountSubmit(...c),["prevent"]))},[a.createElementVNode("button",Yl,[r.loading?(a.openBlock(),a.createElementBlock("span",Xl)):(a.openBlock(),a.createElementBlock("span",Jl,a.toDisplayString(n.ssoLang[n.appLanguage].permanent_delete),1))]),a.createElementVNode("p",Zl,a.toDisplayString(n.ssoLang[n.appLanguage].permanent_delete_p),1)],32)],512),[[a.vShow,r.accountDelete]])])])])}const Ko=nt(nl,[["render",ed],["__scopeId","data-v-64ae2517"]]),td=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"})),nd={name:"AuthBilling",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,subscriptions:[],showCancelModal:!1,selectedSubscription:null,cancelFeedback:""}},async mounted(){this.isLoggedIn||this.$router.push("/login"),await this.getAccountSettings(),this.loadSubscriptions()},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},loadSubscriptions(){if(this.account.billing){const n=this.account.billing,e=[];for(const t in n)t!=="region"&&t!=="currency"&&t!=="paymentProfiles"&&typeof n[t]=="object"&&n[t].subscriptionId&&e.push(n[t]);this.subscriptions=e}},formatCurrency(n,e){return`${{EUR:"€",USD:"$",GBP:"£"}[e==null?void 0:e.toUpperCase()]||e||""}${(n==null?void 0:n.toFixed(2))||"0.00"}`},formatInterval(n){return n?`per ${n}`:""},formatDate(n){return n?new Date(n*1e3).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):""},getStatusText(n){return{trialing:"Trial",active:"Active",past_due:"Past Due",canceled:"Canceled",unpaid:"Unpaid"}[n]||n},getStatusClass(n){return`status-${n}`},openCancelModal(n){this.selectedSubscription=n,this.showCancelModal=!0,this.cancelFeedback=""},closeCancelModal(){this.showCancelModal=!1,this.selectedSubscription=null,this.cancelFeedback=""},async confirmCancel(){var n,e;if(this.selectedSubscription){if(this.selectedSubscription.paymentGateway==="revenuecat"){X.$emit("ssoEvent",{name:"subscriptionCancelled",data:{subscriptionId:this.selectedSubscription.subscriptionId,paymentGateway:this.selectedSubscription.paymentGateway,feedback:this.cancelFeedback}}),this.closeCancelModal();return}this.loading=!0;try{const t=await ce(!1,"v2").post("checkout/cancel/"+this.selectedSubscription.subscriptionId,{feedback:this.cancelFeedback});if(t.data.success)X.$emit("showToast",{type:"success",message:"Subscription canceled successfully"}),await this.getAccountSettings(),this.loadSubscriptions(),this.closeCancelModal();else throw new Error(t.data.message||"Failed to cancel subscription")}catch(t){console.error("Error canceling subscription:",t),X.$emit("showToast",{type:"error",message:((e=(n=t.response)==null?void 0:n.data)==null?void 0:e.message)||"Failed to cancel subscription. Please try again."})}finally{this.loading=!1}}}}},od={class:"page-login content-boxed content-boxed-padding tapni-auth-billing"},rd={class:"subheaderContainer full-top"},id=["src"],ad=["src"],sd={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},cd={class:"container left-text"},ld={class:"center-text"},dd={class:"full-top"},ud={key:0,class:"no-subscriptions center-text full-top"},pd={key:1},hd={class:"subscription-header"},md={class:"subscription-info"},fd={class:"subscription-name"},gd={class:"subscription-details"},_d={class:"detail-row"},vd={class:"detail-value"},yd={class:"detail-row"},bd={class:"detail-value"},wd={class:"detail-row"},kd={class:"detail-value"},Cd={key:0,class:"detail-row"},Ed={class:"detail-value"},Td={key:1,class:"detail-row"},Sd={class:"detail-value"},Id={key:0,class:"subscription-actions"},Ad=["onClick","disabled"],Rd={class:"modal-content"},Nd={class:"modal-header"},Pd={class:"modal-body"},Md={class:"modal-text"},Ld={class:"feedback-section"},Od={class:"modal-footer"},zd=["disabled"];function xd(n,e,t,o,r,i){var c;const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",od,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...l)=>i.close&&i.close(...l)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",rd,[n.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=l=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,id)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,ad)]),_:1})),a.createElementVNode("h2",sd,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1)]),a.createElementVNode("div",cd,[a.createElementVNode("p",ld,a.toDisplayString(n.ssoLang[n.appLanguage].billing_p),1),a.createElementVNode("div",dd,[r.subscriptions.length===0?(a.openBlock(),a.createElementBlock("div",ud,e[8]||(e[8]=[a.createElementVNode("p",{class:"gray-text"},"There are no active subscriptions at this point.",-1)]))):(a.openBlock(),a.createElementBlock("div",pd,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.subscriptions,l=>(a.openBlock(),a.createElementBlock("div",{key:l.subscriptionId,class:"subscription-card half-bottom"},[a.createElementVNode("div",hd,[a.createElementVNode("div",md,[a.createElementVNode("h3",fd,a.toDisplayString(l.subscriptionName),1),a.createElementVNode("span",{class:a.normalizeClass(["subscription-status",i.getStatusClass(l.status)])},a.toDisplayString(i.getStatusText(l.status)),3)])]),a.createElementVNode("div",gd,[a.createElementVNode("div",_d,[e[9]||(e[9]=a.createElementVNode("span",{class:"detail-label"},"Amount:",-1)),a.createElementVNode("span",vd,a.toDisplayString(i.formatCurrency(l.amount,l.currency)),1)]),a.createElementVNode("div",yd,[e[10]||(e[10]=a.createElementVNode("span",{class:"detail-label"},"Billing:",-1)),a.createElementVNode("span",bd,a.toDisplayString(i.formatInterval(l.interval)),1)]),a.createElementVNode("div",wd,[e[11]||(e[11]=a.createElementVNode("span",{class:"detail-label"},"Licenses:",-1)),a.createElementVNode("span",kd,a.toDisplayString(l.licenses),1)]),l.isTrial?(a.openBlock(),a.createElementBlock("div",Cd,[e[12]||(e[12]=a.createElementVNode("span",{class:"detail-label"},"Trial Ends:",-1)),a.createElementVNode("span",Ed,a.toDisplayString(i.formatDate(l.trialEnd)),1)])):l.endDate?(a.openBlock(),a.createElementBlock("div",Td,[e[13]||(e[13]=a.createElementVNode("span",{class:"detail-label"},"Next Billing:",-1)),a.createElementVNode("span",Sd,a.toDisplayString(i.formatDate(l.endDate)),1)])):a.createCommentVNode("",!0)]),l.status!=="canceled"?(a.openBlock(),a.createElementBlock("div",Id,[a.createElementVNode("button",{onClick:h=>i.openCancelModal(l),class:"cancel-button",disabled:r.loading},a.toDisplayString(r.loading?"Processing...":"Cancel Subscription"),9,Ad)])):a.createCommentVNode("",!0)]))),128))]))])]),r.showCancelModal?(a.openBlock(),a.createElementBlock("div",{key:1,class:"modal-overlay",onClick:e[6]||(e[6]=a.withModifiers((...l)=>i.closeCancelModal&&i.closeCancelModal(...l),["self"]))},[a.createElementVNode("div",Rd,[a.createElementVNode("div",Nd,[e[14]||(e[14]=a.createElementVNode("h3",null,"Cancel Subscription",-1)),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...l)=>i.closeCancelModal&&i.closeCancelModal(...l)),class:"close-button"},"×")]),a.createElementVNode("div",Pd,[a.createElementVNode("p",Md,[e[15]||(e[15]=a.createTextVNode(" Are you sure you want to cancel your subscription to ")),a.createElementVNode("b",null,a.toDisplayString((c=r.selectedSubscription)==null?void 0:c.subscriptionName),1),e[16]||(e[16]=a.createTextVNode("? "))]),a.createElementVNode("div",Ld,[e[17]||(e[17]=a.createElementVNode("label",{class:"feedback-label"},"We'd love to know why you're canceling (optional):",-1)),a.withDirectives(a.createElementVNode("textarea",{"onUpdate:modelValue":e[3]||(e[3]=l=>r.cancelFeedback=l),class:"feedback-textarea",placeholder:"Your feedback helps us improve our service...",rows:"4"},null,512),[[a.vModelText,r.cancelFeedback]])])]),a.createElementVNode("div",Od,[a.createElementVNode("button",{onClick:e[4]||(e[4]=(...l)=>i.closeCancelModal&&i.closeCancelModal(...l)),class:"button-secondary"}," Keep Subscription "),a.createElementVNode("button",{onClick:e[5]||(e[5]=(...l)=>i.confirmCancel&&i.confirmCancel(...l)),class:"button-danger",disabled:r.loading},a.toDisplayString(r.loading?"Canceling...":"Confirm Cancellation"),9,zd)])])])):a.createCommentVNode("",!0)])}const Go=nt(nd,[["render",xd]]),Bd=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"}));(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('@keyframes spinner-circle-animation-ed866313{0%,39%,to{opacity:0}40%{opacity:1}}.spinner[data-v-ed866313]{position:relative;width:var(--vs-spinner-size);height:var(--vs-spinner-size);margin:0;padding:0}.spinner-circle[data-v-ed866313]{width:100%;height:100%;position:absolute;left:0;top:0}.spinner-circle[data-v-ed866313]:before{content:"";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--vs-spinner-color);border-radius:100%;-webkit-animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both;animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both}.spinner-circle[data-v-ed866313]:nth-child(2){transform:rotate(30deg)}.spinner-circle[data-v-ed866313]:nth-child(3){transform:rotate(60deg)}.spinner-circle[data-v-ed866313]:nth-child(4){transform:rotate(90deg)}.spinner-circle[data-v-ed866313]:nth-child(5){transform:rotate(120deg)}.spinner-circle[data-v-ed866313]:nth-child(6){transform:rotate(150deg)}.spinner-circle[data-v-ed866313]:nth-child(7){transform:rotate(180deg)}.spinner-circle[data-v-ed866313]:nth-child(8){transform:rotate(210deg)}.spinner-circle[data-v-ed866313]:nth-child(9){transform:rotate(240deg)}.spinner-circle[data-v-ed866313]:nth-child(10){transform:rotate(270deg)}.spinner-circle[data-v-ed866313]:nth-child(11){transform:rotate(300deg)}.spinner-circle[data-v-ed866313]:nth-child(12){transform:rotate(330deg)}.spinner-circle[data-v-ed866313]:nth-child(2):before{animation-delay:-1.1s}.spinner-circle[data-v-ed866313]:nth-child(3):before{animation-delay:-1s}.spinner-circle[data-v-ed866313]:nth-child(4):before{animation-delay:-.9s}.spinner-circle[data-v-ed866313]:nth-child(5):before{animation-delay:-.8s}.spinner-circle[data-v-ed866313]:nth-child(6):before{animation-delay:-.7s}.spinner-circle[data-v-ed866313]:nth-child(7):before{animation-delay:-.6s}.spinner-circle[data-v-ed866313]:nth-child(8):before{animation-delay:-.5s}.spinner-circle[data-v-ed866313]:nth-child(9):before{animation-delay:-.4s}.spinner-circle[data-v-ed866313]:nth-child(10):before{animation-delay:-.3s}.spinner-circle[data-v-ed866313]:nth-child(11):before{animation-delay:-.2s}.spinner-circle[data-v-ed866313]:nth-child(12):before{animation-delay:-.1s}:root{--vs-input-bg: #fff;--vs-input-outline: #3b82f6;--vs-input-placeholder-color: #52525b;--vs-padding: .25rem .5rem;--vs-border: 1px solid #e4e4e7;--vs-border-radius: 4px;--vs-font-size: 16px;--vs-font-weight: 400;--vs-font-family: inherit;--vs-text-color: #18181b;--vs-line-height: 1.5;--vs-menu-offset-top: 8px;--vs-menu-height: 200px;--vs-menu-padding: 0;--vs-menu-border: 1px solid #e4e4e7;--vs-menu-bg: #fff;--vs-menu-box-shadow: none;--vs-menu-z-index: 2;--vs-option-padding: 8px 12px;--vs-option-font-size: var(--vs-font-size);--vs-option-font-weight: var(--vs-font-weight);--vs-option-text-color: var(--vs-text-color);--vs-option-bg: var(--vs-menu-bg);--vs-option-hover-color: #dbeafe;--vs-option-focused-color: var(--vs-option-hover-color);--vs-option-selected-color: #93c5fd;--vs-option-disabled-color: #f4f4f5;--vs-option-disabled-text-color: #52525b;--vs-multi-value-gap: 0px;--vs-multi-value-padding: 4px;--vs-multi-value-margin: 4px 0px 4px 6px;--vs-multi-value-font-size: 14px;--vs-multi-value-font-weight: 400;--vs-multi-value-line-height: 1;--vs-multi-value-text-color: #3f3f46;--vs-multi-value-bg: #f4f4f5;--vs-multi-value-xmark-size: 16px;--vs-multi-value-xmark-color: var(--vs-multi-value-text-color);--vs-indicators-gap: 4px;--vs-icon-size: 20px;--vs-icon-color: var(--vs-text-color);--vs-spinner-color: var(--vs-text-color);--vs-spinner-size: 20px;--vs-dropdown-transition: transform .25s ease-out}.vue-select[data-v-7f19f42a]{position:relative;box-sizing:border-box;width:100%}.vue-select[data-v-7f19f42a] *{box-sizing:border-box}.vue-select.open .single-value[data-v-7f19f42a]{position:absolute;opacity:.4}.vue-select.open .dropdown-icon[data-v-7f19f42a]{transform:rotate(180deg)}.vue-select.typing .single-value[data-v-7f19f42a]{opacity:0}.control[data-v-7f19f42a]{display:flex;min-height:32px;border:var(--vs-border);border-radius:var(--vs-border-radius);background-color:var(--vs-input-bg)}.control.focused[data-v-7f19f42a]{box-shadow:0 0 0 1px var(--vs-input-outline);border-color:var(--vs-input-outline)}.value-container[data-v-7f19f42a]{position:relative;display:flex;flex-wrap:wrap;align-items:center;flex-basis:100%;flex-grow:1}.value-container.multi[data-v-7f19f42a]{gap:var(--vs-multi-value-gap)}.single-value[data-v-7f19f42a]{display:flex;align-items:center;padding:var(--vs-padding);font-size:var(--vs-font-size);font-weight:var(--vs-font-weight);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);z-index:0}.multi-value[data-v-7f19f42a]{appearance:none;display:flex;align-items:center;gap:var(--vs-multi-value-gap);padding:var(--vs-multi-value-padding);margin:var(--vs-multi-value-margin);border:0;font-size:var(--vs-multi-value-font-size);font-weight:var(--vs-multi-value-font-weight);color:var(--vs-multi-value-text-color);line-height:var(--vs-multi-value-line-height);background:var(--vs-multi-value-bg);outline:none;cursor:pointer}.multi-value svg[data-v-7f19f42a]{width:var(--vs-multi-value-xmark-size);height:var(--vs-multi-value-xmark-size);fill:var(--vs-multi-value-xmark-color)}.search-input[data-v-7f19f42a]{appearance:none;display:inline-block;max-width:100%;flex-grow:1;width:0;margin:0;padding:0;border:0;background:none;padding:var(--vs-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);outline:none;z-index:1}.search-input[data-v-7f19f42a]::placeholder{color:var(--vs-input-placeholder-color)}.indicators-container[data-v-7f19f42a]{display:flex;align-items:center;flex-shrink:0;gap:var(--vs-indicators-gap);padding:var(--vs-padding)}.clear-button[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer}.dropdown-icon[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer;transition:var(--vs-dropdown-transition)}.menu[data-v-7f19f42a]{position:absolute;left:0;right:0;padding:var(--vs-menu-padding);margin-top:var(--vs-menu-offset-top);max-height:var(--vs-menu-height);overflow-y:auto;border:var(--vs-menu-border);border-radius:var(--vs-border-radius);box-shadow:var(--vs-menu-box-shadow);background-color:var(--vs-menu-bg);z-index:var(--vs-menu-z-index)}.menu-option[data-v-7f19f42a]{display:flex;width:100%;border:0;margin:0;padding:var(--vs-option-padding);font-size:var(--vs-option-font-size);font-weight:var(--vs-option-font-weight);font-family:var(--vs-font-family);color:var(--vs-option-text-color);background-color:var(--vs-option-bg);text-align:-webkit-auto;cursor:pointer}.menu-option[data-v-7f19f42a]:hover{background-color:var(--vs-option-hover-color)}.menu-option.focused[data-v-7f19f42a]{background-color:var(--vs-option-focused-color)}.menu-option.selected[data-v-7f19f42a]{background-color:var(--vs-option-selected-color)}.menu-option.disabled[data-v-7f19f42a]{background-color:var(--vs-option-disabled-color);color:var(--vs-option-disabled-text-color)}.no-results[data-v-7f19f42a]{padding:var(--vs-option-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);color:var(--vs-text-color)}')),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const co=(n,e)=>{const t=n.__vccOpts||n;for(const[o,r]of e)t[o]=r;return t},Ud={},Dd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"};function jd(n,e){return a.openBlock(),a.createElementBlock("svg",Dd,e[0]||(e[0]=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)]))}const qd=co(Ud,[["render",jd]]),Fd={},Vd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"};function Hd(n,e){return a.openBlock(),a.createElementBlock("svg",Vd,e[0]||(e[0]=[a.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"},null,-1)]))}const di=co(Fd,[["render",Hd]]),Kd=["aria-disabled","aria-selected"],Gd=a.defineComponent({__name:"MenuOption",props:{menu:{},index:{},isFocused:{type:Boolean},isSelected:{type:Boolean},isDisabled:{type:Boolean}},emits:["select"],setup(n,{emit:e}){const t=n,o=e,r=a.ref(null);return a.watch(()=>t.isFocused,()=>{if(t.isFocused&&t.menu){const i=t.menu.children[t.index],s=i.offsetTop,c=s+i.clientHeight,l=t.menu.scrollTop,h=t.menu.clientHeight;s<l?t.menu.scrollTop=s:c>l+h&&(t.menu.scrollTop=c-h)}}),(i,s)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"option",ref:r,tabindex:"-1",role:"option",class:a.normalizeClass({focused:i.isFocused,selected:i.isSelected,disabled:i.isDisabled}),"aria-disabled":i.isDisabled,"aria-selected":i.isSelected,onClick:s[0]||(s[0]=c=>o("select")),onKeydown:s[1]||(s[1]=a.withKeys(c=>o("select"),["enter"]))},[a.renderSlot(i.$slots,"default")],42,Kd))}}),$d={},Qd={className:"spinner"};function Wd(n,e){return a.openBlock(),a.createElementBlock("div",Qd,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(12,t=>a.createElementVNode("div",{key:t,class:"spinner-circle"})),64))])}const Yd=co($d,[["render",Wd],["__scopeId","data-v-ed866313"]]),Jd=["aria-expanded","aria-describedby","aria-description","aria-labelledby","aria-label","aria-required"],Xd=["onClick"],Zd=["id","disabled","placeholder"],eu={class:"indicators-container"},tu=["disabled"],nu=["disabled"],ou=["aria-label","aria-multiselectable"],ru={key:0,class:"no-results"},iu={name:"AuthGeneral",mixins:[We],components:{VueSelect:co(a.defineComponent({__name:"Select",props:a.mergeModels({options:{},displayedOptions:{},placeholder:{default:"Select an option"},isClearable:{type:Boolean,default:!0},isDisabled:{type:Boolean,default:!1},isSearchable:{type:Boolean,default:!0},isMulti:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},shouldAutofocusOption:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},teleport:{default:void 0},inputId:{default:void 0},aria:{default:void 0},filterBy:{type:Function,default:(n,e,t)=>e.toLowerCase().includes(t.toLowerCase())},getOptionLabel:{type:Function,default:n=>n.label},getMultiValueLabel:{type:Function,default:n=>n.label}},{modelValue:{required:!0,validator:(n,e)=>e.isMulti?Array.isArray(n):!Array.isArray(n)},modelModifiers:{}}),emits:a.mergeModels(["optionSelected","optionDeselected","search"],["update:modelValue"]),setup(n,{emit:e}){const t=n,o=e,r=a.useModel(n,"modelValue"),i=a.ref(null),s=a.ref(null),c=a.ref(null),l=a.ref(""),h=a.ref(!1),u=a.ref(-1),g=a.computed(()=>{const I=t.displayedOptions||t.options,W=ie=>ie.filter(ee=>!r.value.includes(ee.value));if(t.isSearchable&&l.value){const ie=I.filter(ee=>{const ve=t.isMulti?t.getMultiValueLabel(ee):t.getOptionLabel(ee);return t.filterBy(ee,ve,l.value)});return t.isMulti?W(ie):ie}return t.isMulti?W(I):I}),f=a.computed(()=>{if(t.isMulti&&Array.isArray(r.value))return r.value.map(W=>t.options.find(ie=>ie.value===W));t.isMulti&&!Array.isArray(r.value)&&console.warn(`[vue3-select-component warn]: The v-model provided should be an array when using \`isMulti\` prop, instead it was: ${r.value}`);const I=t.options.find(W=>W.value===r.value);return I?[I]:[]}),w=I=>{h.value=!0,t.shouldAutofocusOption&&(u.value=t.options.findIndex(W=>!W.disabled)),I!=null&&I.focusInput&&s.value&&s.value.focus()},C=()=>{h.value=!1,l.value=""},P=()=>{h.value?C():w()},M=I=>{I.disabled||(t.isMulti?r.value.push(I.value):r.value=I.value,o("optionSelected",I),l.value="",t.closeOnSelect&&(h.value=!1),s.value&&s.value.blur())},j=I=>{t.isMulti&&!t.isDisabled&&(r.value=r.value.filter(W=>W!==I.value),o("optionDeselected",I))},N=()=>{t.isMulti?(r.value=[],o("optionDeselected",null)):(r.value=void 0,o("optionDeselected",f.value[0])),h.value=!1,l.value="",s.value&&s.value.blur()},T=I=>{if(h.value){const W=u.value;if(I.key==="ArrowDown"){I.preventDefault();const ee=g.value.findIndex((Re,le)=>!Re.disabled&&le>W),ve=g.value.findIndex(Re=>!Re.disabled);u.value=ee===-1?ve:ee}if(I.key==="ArrowUp"){I.preventDefault();const ee=g.value.reduce((Re,le,Me)=>!le.disabled&&Me<W?Me:Re,-1),ve=g.value.reduce((Re,le,Me)=>le.disabled?Re:Me,-1);u.value=ee===-1?ve:ee}if(I.key==="Enter"){const ee=g.value[W];I.preventDefault(),ee&&M(ee)}if(I.code==="Space"&&l.value.length===0){const ee=g.value[W];I.preventDefault(),ee&&M(ee)}I.key==="Escape"&&(I.preventDefault(),h.value=!1,l.value="");const ie=t.isMulti?r.value.length>0:!!r.value;I.key==="Backspace"&&l.value.length===0&&ie&&(I.preventDefault(),t.isMulti?r.value=r.value.slice(0,-1):r.value=void 0)}},B=I=>{!h.value&&l.value.length===0&&(I.preventDefault(),I.stopImmediatePropagation(),w())},V=I=>{I.key==="Tab"?C():I.key==="Space"&&B(I)},G=I=>{i.value&&!i.value.contains(I.target)&&(h.value=!1,l.value="")},J=()=>{if(i.value){const I=i.value.getBoundingClientRect();return{left:`${I.x}px`,top:`${I.y+I.height}px`}}return console.warn("Unable to calculate dynamic menu position because of missing internal DOM reference."),{top:"0px",left:"0px"}};return a.watch(()=>l.value,()=>{o("search",l.value),l.value&&!h.value&&w()}),a.onMounted(()=>{document.addEventListener("click",G),document.addEventListener("keydown",T)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",G),document.removeEventListener("keydown",T)}),(I,W)=>{var ie,ee,ve,Re;return a.openBlock(),a.createElementBlock("div",{ref_key:"container",ref:i,dir:"auto",class:a.normalizeClass(["vue-select",{open:h.value,typing:h.value&&l.value.length>0,disabled:I.isDisabled}])},[a.createElementVNode("div",{class:a.normalizeClass(["control",{focused:h.value}])},[a.createElementVNode("div",{class:a.normalizeClass(["value-container",{multi:I.isMulti}]),role:"combobox","aria-expanded":h.value,"aria-describedby":I.placeholder,"aria-description":I.placeholder,"aria-labelledby":(ie=I.aria)==null?void 0:ie.labelledby,"aria-label":f.value.length?f.value.map(I.isMulti?I.getMultiValueLabel:I.getOptionLabel).join(", "):"","aria-required":(ee=I.aria)==null?void 0:ee.required},[!t.isMulti&&f.value[0]?(a.openBlock(),a.createElementBlock("div",{key:0,class:"single-value",onClick:W[0]||(W[0]=le=>t.isDisabled?null:w({focusInput:!0}))},[a.renderSlot(I.$slots,"value",{option:f.value[0]},()=>[a.createTextVNode(a.toDisplayString(I.getOptionLabel(f.value[0])),1)],!0)])):a.createCommentVNode("",!0),t.isMulti&&f.value.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(f.value,le=>a.renderSlot(I.$slots,"tag",{key:le.value,option:le,removeOption:()=>j(le)},()=>[a.createElementVNode("button",{type:"button",class:"multi-value",onClick:Me=>j(le)},[a.createTextVNode(a.toDisplayString(I.getMultiValueLabel(le)),1),a.createVNode(di)],8,Xd)],!0)),128)):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("input",{id:I.inputId,ref_key:"input",ref:s,"onUpdate:modelValue":W[1]||(W[1]=le=>l.value=le),class:"search-input",type:"text","aria-autocomplete":"list",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",tabindex:"0",disabled:I.isDisabled,placeholder:f.value.length===0?I.placeholder:"",onMousedown:W[2]||(W[2]=le=>w()),onKeydown:V},null,40,Zd),[[a.vModelText,l.value]])],10,Jd),a.createElementVNode("div",eu,[f.value.length>0&&I.isClearable&&!I.isLoading?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"clear-button",tabindex:"-1",disabled:I.isDisabled,onClick:N},[a.renderSlot(I.$slots,"clear",{},()=>[a.createVNode(di)],!0)],8,tu)):a.createCommentVNode("",!0),I.isLoading?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("button",{key:1,type:"button",class:"dropdown-icon",tabindex:"-1",disabled:I.isDisabled,onClick:P},[a.renderSlot(I.$slots,"dropdown",{},()=>[a.createVNode(qd)],!0)],8,nu)),a.renderSlot(I.$slots,"loading",{},()=>[I.isLoading?(a.openBlock(),a.createBlock(Yd,{key:0})):a.createCommentVNode("",!0)],!0)])],2),(a.openBlock(),a.createBlock(a.Teleport,{to:I.teleport,disabled:!I.teleport,defer:!0},[h.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"menu",ref:c,class:"menu",role:"listbox","aria-label":(ve=I.aria)==null?void 0:ve.labelledby,"aria-multiselectable":I.isMulti,style:a.normalizeStyle({width:t.teleport?`${(Re=i.value)==null?void 0:Re.getBoundingClientRect().width}px`:"100%",top:t.teleport?J().top:"unset",left:t.teleport?J().left:"unset"})},[a.renderSlot(I.$slots,"menu-header",{},void 0,!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(le,Me)=>(a.openBlock(),a.createBlock(Gd,{key:Me,type:"button",class:a.normalizeClass(["menu-option",{focused:u.value===Me,selected:le.value===r.value}]),menu:c.value,index:Me,"is-focused":u.value===Me,"is-selected":le.value===r.value,"is-disabled":le.disabled||!1,onSelect:yt=>M(le)},{default:a.withCtx(()=>[a.renderSlot(I.$slots,"option",{option:le},()=>[a.createTextVNode(a.toDisplayString(I.getOptionLabel(le)),1)],!0)]),_:2},1032,["class","menu","index","is-focused","is-selected","is-disabled","onSelect"]))),128)),g.value.length===0?(a.openBlock(),a.createElementBlock("div",ru,[a.renderSlot(I.$slots,"no-options",{},()=>[W[3]||(W[3]=a.createTextVNode(" No results found "))],!0)])):a.createCommentVNode("",!0)],12,ou)):a.createCommentVNode("",!0)],8,["to","disabled"]))],2)}}}),[["__scopeId","data-v-7f19f42a"]])},props:{isModal:{type:Boolean,default:!1},payload:{type:Object,default:{}}},data(){return{loading:!1}},watch:{"account.lang":{handler(n){n&&(this.updateLang(n),this.display==="npm"&&this.$store.commit("setLanguage",n))},immediate:!0}},async mounted(){this.isLoggedIn||this.$router.push("/login"),await this.getAccountSettings()},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},async submitGeneralUpdate(){var o;this.loading=!0;const n={name:this.account.name,lang:this.account.lang,email:this.account.email,region:(o=this.account.billing)==null?void 0:o.region},[e,t]=await fe(In.updateAccount(n));e?this.errorHandler(e):t.data.success&&(this.successSnack(this.ssoLang[this.appLanguage].profile_update_success),await this.getAccountSettings()),this.loading=!1}}},au={class:"page-login content-boxed content-boxed-padding tapni-auth-general"},su={class:"subheaderContainer full-top"},cu=["src"],lu=["src"],du={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},uu={class:"container left-text"},pu={class:"center-text"},hu={class:"full-top bold small-bottom"},mu=["placeholder"],fu=["placeholder"],gu={class:"full-top bold"},_u={class:"full-top bold"},vu={type:"submit",class:"button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},yu={key:0},bu={key:1,class:"button--loading button__loader"};function wu(n,e,t,o,r,i){const s=a.resolveComponent("router-link"),c=a.resolveComponent("VueSelect");return a.openBlock(),a.createElementBlock("div",au,[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...l)=>i.close&&i.close(...l)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",su,[t.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=l=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,cu)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,lu)]),_:1})),a.createElementVNode("h2",du,a.toDisplayString(n.ssoLang[n.appLanguage].general),1)]),a.createElementVNode("div",uu,[a.createElementVNode("p",pu,a.toDisplayString(n.ssoLang[n.appLanguage].general_p),1),a.createElementVNode("form",{class:"full-top",onSubmit:e[6]||(e[6]=a.withModifiers((...l)=>i.submitGeneralUpdate&&i.submitGeneralUpdate(...l),["prevent"]))},[a.createElementVNode("h3",hu,a.toDisplayString(n.ssoLang[n.appLanguage].personal_details),1),a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=l=>n.account.name=l),placeholder:n.ssoLang[n.appLanguage].name,class:"edit-input h-40 lh-40 small-bottom",required:"",style:{width:"100%"}},null,8,mu),[[a.vModelText,n.account.name]]),a.withDirectives(a.createElementVNode("input",{disabled:"",type:"email","onUpdate:modelValue":e[3]||(e[3]=l=>n.account.email=l),placeholder:n.ssoLang[n.appLanguage].email,class:"bg-white edit-input h-40 lh-40 small-bottom",required:"",style:{width:"100%"}},null,8,fu),[[a.vModelText,n.account.email]]),a.createElementVNode("h3",gu,a.toDisplayString(n.ssoLang[n.appLanguage].app_region),1),n.account.billing?(a.openBlock(),a.createBlock(c,{key:0,modelValue:n.account.billing.region,"onUpdate:modelValue":e[4]||(e[4]=l=>n.account.billing.region=l),options:[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"European Union",value:"eu"},{label:"Mexico",value:"mx"},{label:"Mauritius",value:"mu"},{label:"Colombia",value:"co"},{label:"Serbia",value:"rs"},{label:"Singapore",value:"sg"},{label:"China",value:"cn"}],isClearable:!1,placeholder:"Select region"},null,8,["modelValue"])):a.createCommentVNode("",!0),a.createCommentVNode("",!0),a.createElementVNode("h3",_u,a.toDisplayString(n.ssoLang[n.appLanguage].app_language),1),a.createVNode(c,{modelValue:n.account.lang,"onUpdate:modelValue":e[5]||(e[5]=l=>n.account.lang=l),options:[{label:n.ssoLang[n.appLanguage].english,value:"en"},{label:n.ssoLang[n.appLanguage].german,value:"de"},{label:n.ssoLang[n.appLanguage].spanish,value:"es"},{label:n.ssoLang[n.appLanguage].italian,value:"it"},{label:n.ssoLang[n.appLanguage].french,value:"fr"},{label:n.ssoLang[n.appLanguage].turkish,value:"tr"},{label:n.ssoLang[n.appLanguage].serbian,value:"sr"},{label:n.ssoLang[n.appLanguage].korean,value:"kr"},{label:n.ssoLang[n.appLanguage].chinese,value:"cn"},{label:n.ssoLang[n.appLanguage].portuguese,value:"pt"},{label:n.ssoLang[n.appLanguage].japanese,value:"ja"}],isClearable:!1,placeholder:"Select language"},null,8,["modelValue","options"]),e[8]||(e[8]=a.createElementVNode("p",null,"Translate the app on your preferred language.",-1)),a.createElementVNode("button",vu,[r.loading?(a.openBlock(),a.createElementBlock("span",bu)):(a.openBlock(),a.createElementBlock("span",yu,a.toDisplayString(n.ssoLang[n.appLanguage].save),1))])],32)])])}const $o=nt(iu,[["render",wu]]),ku=Object.freeze(Object.defineProperty({__proto__:null,default:$o},Symbol.toStringTag,{value:"Module"})),Cu={name:"AuthReset",mixins:[We],data(){return{loading:!0,submitted:!1,passwordChange:!1,email:"",password:"",passwordRepeat:"",code:"",captcha:"",revealPassword:!1,revealPassword2:!1}},mounted(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route.query.c&&(this.code=this.$route.query.c,this.passwordChange=!0),this.$route.query.e&&(this.email=this.$route.query.e),X.$emit("ssoEvent",{name:"setLoading",data:!1})},methods:{async resetEmail(){if(this.submitted)return;this.submitted=!0,this.email=this.email.trim();let n={email:this.email,captchaToken:await this.getCaptchaToken("password_reset")};await this.reset(n),this.submitted=!1,await this.$router.push("/verify?e="+this.email+"#reset")},async changePw(){if(this.code.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);if(this.password!==this.passwordRepeat)return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);if(this.submitted)return;this.submitted=!0,this.email=this.email.trim(),this.code=this.code.trim();let n={email:this.email,code:this.code,password:this.password,passwordRepeat:this.passwordRepeat,captchaToken:await this.getCaptchaToken("password_reset")},e=await this.changePassword(n);this.submitted=!1,e===!0&&(this.$router.push("/login"),this.successSnack(this.ssoLang[this.appLanguage].password_reseted_success))}},watch:{email(n){this.$storex.verifyEmail=n}}},Eu={class:"bold no-bottom center-text text-[22px]",style:{"margin-top":"63px"}},Tu={class:"page-login-field half-top color-black"},Su=["placeholder"],Iu={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Au={key:0,class:"uppercase"},Ru={key:1,class:"button--loading button__loader"},Nu={class:"close-text center-text half-top color-black"},Pu=["innerHTML"],Mu=["href"],Lu={class:"page-login-links"},Ou={class:"bold no-bottom center-text",style:{"margin-top":"63px"}},zu={class:"half-bottom small-top center-text color-black"},xu={class:"page-login-field half-top"},Bu=["type","placeholder"],Uu={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Du={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},ju={class:"page-login-field half-top"},qu=["type","placeholder"],Fu={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Vu={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},Hu={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Ku={key:0,class:"uppercase"},Gu={key:1,class:"button--loading button__loader"},$u={class:"close-text center-text half-top color-black"},Qu=["innerHTML"],Wu=["href"];function Yu(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return r.passwordChange?(a.openBlock(),a.createElementBlock("form",{key:1,class:"page-login content-boxed content-boxed-padding",onSubmit:e[7]||(e[7]=a.withModifiers((...c)=>i.changePw&&i.changePw(...c),["prevent"]))},[a.createElementVNode("h3",Ou,a.toDisplayString(n.ssoLang[this.appLanguage].password_change),1),a.createElementVNode("p",zu,a.toDisplayString(n.ssoLang[this.appLanguage].password_new),1),a.createElementVNode("div",xu,[e[14]||(e[14]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,required:""},null,8,Bu),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[4]||(e[4]=c=>r.revealPassword=!r.revealPassword)},[a.withDirectives(a.createElementVNode("img",Uu,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",Du,null,512),[[a.vShow,r.revealPassword]])])]),a.createElementVNode("div",ju,[e[15]||(e[15]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.passwordRepeat=c),type:r.revealPassword2?"text":"password",placeholder:n.ssoLang[this.appLanguage].password_repeat,required:""},null,8,qu),[[a.vModelDynamic,r.passwordRepeat]]),a.createElementVNode("em",{onClick:e[6]||(e[6]=c=>r.revealPassword2=!r.revealPassword2)},[a.withDirectives(a.createElementVNode("img",Fu,null,512),[[a.vShow,!r.revealPassword2]]),a.withDirectives(a.createElementVNode("img",Vu,null,512),[[a.vShow,r.revealPassword2]])])]),a.createElementVNode("button",Hu,[r.submitted?(a.openBlock(),a.createElementBlock("span",Gu)):(a.openBlock(),a.createElementBlock("span",Ku,a.toDisplayString(n.ssoLang[this.appLanguage].password_change),1))]),e[17]||(e[17]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("p",$u,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].reset_password_p2},null,8,Qu),e[16]||(e[16]=a.createTextVNode()),a.createElementVNode("a",{href:"mailto:support@tapni.com?subject="+n.ssoLang[this.appLanguage].password_reset_t}," support@tapni.com",8,Wu)])],32)):(a.openBlock(),a.createElementBlock("form",{key:0,class:"page-login content-boxed content-boxed-padding",onSubmit:e[2]||(e[2]=a.withModifiers((...c)=>i.resetEmail&&i.resetEmail(...c),["prevent"])),autocomplete:"on"},[a.createElementVNode("h3",Eu,a.toDisplayString(n.ssoLang[this.appLanguage].reset_password),1),e[11]||(e[11]=a.createElementVNode("p",{class:"half-bottom small-top center-text color-black"},null,-1)),a.createElementVNode("div",Tu,[e[8]||(e[8]=a.createElementVNode("i",{style:{"padding-top":"10px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"80%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"emailInput","onUpdate:modelValue":e[0]||(e[0]=c=>r.email=c),onKeydown:e[1]||(e[1]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,required:""},null,40,Su),[[a.vModelText,r.email]]),e[9]||(e[9]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("button",Iu,[r.submitted?(a.openBlock(),a.createElementBlock("span",Ru)):(a.openBlock(),a.createElementBlock("span",Au,a.toDisplayString(n.ssoLang[this.appLanguage].reset_password),1))]),e[12]||(e[12]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("p",Nu,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].reset_password_p1},null,8,Pu),a.createElementVNode("a",{href:"mailto:support@tapni.com?subject="+n.ssoLang[this.appLanguage].password_reset_t}," support@tapni.com",8,Mu)]),e[13]||(e[13]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("div",Lu,[a.createVNode(s,{class:"create float-right",to:"/verify"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[10]||(e[10]=a.createElementVNode("div",{class:"clear"},null,-1))])],32))}const Qo=nt(Cu,[["render",Yu],["__scopeId","data-v-707a4b16"]]),Ju=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),Xu={name:"AuthCallback",mixins:[ii,ai,We],data(){return{}},async mounted(){if(this.$route.path==="/callback/redirect")return location.href=atob(this.$route.query.uri);if(this.$route.path==="/callback/auth"&&this.exchangeAuthCode({code:this.$route.query.code,code_verifier:this.$route.query.code_verifier}),this.$route.path==="/callback/okta")return await this.handleOktaRedirect();if(this.$route.path==="/callback/saml")return await this.handleSamlRedirect()},methods:{inAppRedirect(){let n=pi.sanitizeUrl(location.href);return n=n.replace("http","tapni"),n=n.replace("https","tapni"),window.open(n)}}},Zu={class:"page-login content-boxed content-boxed-padding"},ep={key:0,style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"260px"}},tp={key:1,style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"260px"}};function np(n,e,t,o,r,i){return a.openBlock(),a.createElementBlock("div",Zu,[(n.$route.query.platform==="android"||n.$route.query.platform==="ios")&&!n.isNative?(a.openBlock(),a.createElementBlock("h5",ep,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].you_will_be_redirected),1),e[1]||(e[1]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].if_redirect_not_directly)+", ",1),a.createElementVNode("span",{onClick:e[0]||(e[0]=(...s)=>i.inAppRedirect&&i.inAppRedirect(...s)),style:{color:"blue",cursor:"pointer"}},a.toDisplayString(n.ssoLang[this.appLanguage].click_here),1),e[2]||(e[2]=a.createTextVNode(". "))])):(a.openBlock(),a.createElementBlock("h4",tp,a.toDisplayString(n.ssoLang[this.appLanguage].please_wait),1))])}const Wo=nt(Xu,[["render",np]]),op=Object.freeze(Object.defineProperty({__proto__:null,default:Wo},Symbol.toStringTag,{value:"Module"})),Yt=tt.registerPlugin("Preferences",{web:()=>Promise.resolve().then(()=>Xp).then(n=>new n.PreferencesWeb)}),vt={async setObject(n,e){await Yt.set({key:n,value:JSON.stringify(e)})},async getAll(){const n=await this.keys(),e={};for(const t of n)e[t]=await Yt.get({key:t});return e},async setAll(n){const e=Object.keys(n);for(const t of e)await this.setItem(t,n[t])},async getObject(n){const e=await Yt.get({key:n});return JSON.parse(e.value)},async setItem(n,e){return await Yt.set({key:n,value:e})},async getItem(n){const{value:e}=await Yt.get({key:n});return e},async removeItem(n){return await Yt.remove({key:n})},async keys(){const{keys:n}=await Yt.keys();return n},async clear(){return await Yt.clear()}},it="vrs_",Yo={async _initialize(n){let e=await vt.getItem(it);if(e===null)await vt.setItem(it,JSON.stringify(n));else{let t=JSON.parse(e);this._objectDefaults(n,t),await vt.setItem(it,JSON.stringify(t))}},_objectDefaults(n,e){Object.keys(n).reduce((t,o)=>{let r=n[o];return typeof r=="object"?this._objectDefaults(e[o],r):e.hasOwnProperty(o)||(e[o]=r),t},[])},async getRaw(){let n=await vt.getItem(it);return JSON.parse(n)},async setRaw(n){let e=JSON.stringify(n);await vt.setItem(it,e)},async set(n,e){if(e===void 0)return this.remove(n);await vt.setItem(it+n,this.serialize(e));let t=this.getKeys();return t.indexOf(n)===-1&&t.push(n),await vt.setItem(it,this.serialize(t)),e},async get(n){let e=await vt.getItem(it+n);return e===null?null:this.deserialize(e)},async remove(n){let e=await this.get(n);await vt.removeItem(it+n);let t=await this.getKeys(),o=t.indexOf("test");return o!==-1&&t.splice(o,1),await vt.setItem(it,this.serialize(t)),e},async getAll(){let n=[],e=await this.getKeys();for(let t=0;t<e.length;t++)n[e[t]]=this.get(e[t]);return n},async getKeys(){return await this.deserialize(vt.getItem(it))},async clear(){await this.set(it,"[]");let n=this.getKeys();for(let e=0;e<n.length;e++)await this.remove(it+n[e])},serialize:function(n){return JSON.stringify(n)},deserialize:function(n,e){if(!n)return e;let t=JSON.parse(n);return t!==void 0?t:e}},rp={name:"ReactiveStorage",data(){return{strgReady:!1,strg:null}},async created(){this.strgReady=a.reactive({value:!1}),await Yo._initialize(this.options);let n=await Yo.getRaw();const e=a.reactive(n);this.strg=e,this.strgReady.value=!0,a.watch(e,async()=>{await Yo.setRaw(e)},{deep:!0})}},ip={key:0,href:"/",class:"header-logo"},ap=["src"],sp={class:"snackbar snackbar-boxed",id:"snackbar"},cp={class:"snack-body",id:"errorSnack"},lp={id:"errorMessage"},dp={class:"snack-body",id:"successSnack"},up={id:"successMessage"},pp=Object.assign({name:"TapniAuth",mixins:[rp,We],data(){return{storeInterval:null,isSetup:!1,isTapstackOrigin:typeof window<"u"?/(^|\.)tapstack\.com$/i.test(new URL(window.location.origin).hostname):!1}},components:{AuthCallback:Wo,AuthReset:Qo,AuthVerify:Ho,AuthSecurity:Ko,AuthRegister:Vo,AuthLogin:qo,AuthAccount:Fo,AuthBilling:Go,AuthWelcome:wo,AuthGeneral:$o},props:{viewProp:{type:String,default:""},isModal:{type:Boolean,default:!1},payload:{type:Object,default:{}},options:{type:Object,default:{token:"",refreshTokens:"",username:"",UserId:"",verifyEmail:"",subdomain:"",localUser:""}}},computed:{initialized(){return this.isSetup||this.isModal},headerLogoUrl(){return this.isTapstackOrigin?"https://cdn.tapni.co/company-media/e411a6e5-e8c1-40b3-aa4c-1214cfb43e8a/gallery/image/f910fa207addf7d3f7337faf098c4f82c79f755a3cf0032099655f2204e6a1e6.png":"https://cdn.tapni.co/images/logo-dark.png"},containerStyle(){return{maxHeight:this.isModal?"90vh":"auto",overflowY:this.isModal?"auto":"hidden"}}},async mounted(){this.checkAndClearStorage(),this.applyBgStyle(),this.setView(this.viewProp),this.updateMetadata(),X.$on("ssoEvent",this.ssoOutgoingEvent),X.$on("ssoLogout",n=>this.logout(n)),X.$on("getLoggedInAccounts",()=>this.getLoggedInAccounts()),X.$on("refreshTokenAction",n=>this.refreshTokenAction({...n,storage:this.$storex})),X.$on("switchAccount",n=>this.switchAccount(n)),X.$on("setToken",n=>this.setToken(n)),X.$on("setStorageItem",n=>this.setStorageItem(n)),this.isNative&&this.$nextTick(()=>{try{this.$store&&this.$store.state&&this.$store.state.auth&&this.$store.commit("auth/addAllowedOrigin","capacitor://localhost")}catch(n){console.error("Failed to add capacitor origin to allowed origins:",n)}})},methods:{checkAndClearStorage(){const n=new URLSearchParams(window.location.search);if(n.get("clean")==="true"){localStorage.clear(),sessionStorage.clear(),n.delete("clean");const e=window.location.pathname+(n.toString()?"?"+n.toString():"")+window.location.hash;window.history.replaceState({},"",e),console.log("Storage cleared due to clean=true parameter")}},async init(){this.$store.commit("auth/setApiRoot",this.$apiRoot||_i.env.VITE_APP_API_ROOT),this.setStorage(this.strg),!this.isSetup&&(this.isSetup=!0,await this.getLoggedInAccounts(),this.$emit("ssoLibraryReady",this.$storex))},ssoOutgoingEvent(n){this.$emit("ssoEvent",n)},ssoIncomingEvent(n){X.$emit(n.name,n.data)},updateMetadata(){if(!(typeof window>"u"))if(this.isTapstackOrigin){document.title="Tapstack - The modern stack for interactive docs and tools";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.");const e=document.querySelector('meta[property="og:title"]');e&&e.setAttribute("content","Tapstack - The modern stack for interactive docs and tools");const t=document.querySelector('meta[property="og:description"]');t&&t.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences.");const o=document.querySelector('meta[property="twitter:title"]');o&&o.setAttribute("content","Tapstack - The modern stack for interactive docs and tools");const r=document.querySelector('meta[property="twitter:description"]');r&&r.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.")}else document.title="Tapni - Share everything with just a tap"},applyBgStyle(){this.display==="redirect"?document.getElementsByTagName("html")[0].style="background: #dfeefe;":document.getElementsByTagName("html")[0].style=""}},watch:{viewProp(n){this.setView(n)},display(){this.applyBgStyle()},"strgReady.value"(n){n&&this.$nextTick(()=>{this.init()})},$storex:{handler(n){clearInterval(this.storeInterval),this.storeInterval=setTimeout(()=>{Object.keys(n).forEach(e=>{this.strg[e]=n[e]})},250)},deep:!0}}},{setup(n){return window.Buffer=Si,document.addEventListener("DOMContentLoaded",function(){const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render=undefined",document.head.appendChild(e)}),(e,t)=>(a.openBlock(),a.createElementBlock("div",{id:"ssoapp",style:a.normalizeStyle(e.containerStyle)},[e.display==="redirect"||e.renderView.includes("Auth")?(a.openBlock(),a.createElementBlock("a",ip,[a.createElementVNode("img",{src:e.headerLogoUrl,class:"header-logo-img"},null,8,ap)])):a.createCommentVNode("",!0),e.initialized&&e.renderView==="AuthWelcome"?(a.openBlock(),a.createBlock(wo,{key:1})):e.initialized&&e.renderView==="AuthLogin"?(a.openBlock(),a.createBlock(qo,{key:2,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthGeneral"?(a.openBlock(),a.createBlock($o,{key:3,isModal:n.isModal,"onUpdate:viewProp":e.setView},null,8,["isModal","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthAccount"?(a.openBlock(),a.createBlock(Fo,{key:4,isModal:n.isModal,"onUpdate:viewProp":e.setView},null,8,["isModal","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthRegister"?(a.openBlock(),a.createBlock(Vo,{key:5,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthVerify"?(a.openBlock(),a.createBlock(Ho,{key:6,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthSecurity"?(a.openBlock(),a.createBlock(Ko,{key:7,isModal:n.isModal,payload:n.payload,"onUpdate:viewProp":e.setView},null,8,["isModal","payload","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthBilling"?(a.openBlock(),a.createBlock(Go,{key:8,isModal:n.isModal,payload:n.payload,"onUpdate:viewProp":e.setView},null,8,["isModal","payload","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthReset"?(a.openBlock(),a.createBlock(Qo,{key:9})):e.initialized&&e.renderView==="AuthCallback"?(a.openBlock(),a.createBlock(Wo,{key:10})):e.display!=="npm"?(a.openBlock(),a.createBlock(a.unref(en.RouterView),{key:11})):a.createCommentVNode("",!0),a.createElementVNode("div",sp,[a.createElementVNode("p",cp,[a.createElementVNode("span",lp,a.toDisplayString(e.ssoLang[e.appLanguage].error),1),a.createElementVNode("a",{onClick:t[0]||(t[0]=(...o)=>e.closeSnacks&&e.closeSnacks(...o)),style:{position:"absolute",right:"10px",top:"10px",width:"50px",height:"50px"}},t[2]||(t[2]=[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/notification-close.png",style:{width:"100%"}},null,-1)]))]),a.createElementVNode("p",dp,[a.createElementVNode("span",up,a.toDisplayString(e.ssoLang[e.appLanguage].success),1),a.createElementVNode("a",{onClick:t[1]||(t[1]=(...o)=>e.closeSnacks&&e.closeSnacks(...o)),style:{position:"absolute",right:"10px",top:"10px",width:"50px",height:"50px"}},t[3]||(t[3]=[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/notification-close.png",style:{width:"100%"}},null,-1)]))])])],4))}}),hp={install:(n,{store:e,apiRoot:t})=>{n.component("TapniAuth",pp),e.hasModule("auth")||e.registerModule("auth",Cr),n.config.globalProperties.$apiRoot=t}},mp={name:"AuthQR",mixins:[We,si]},fp={class:"page-login content-boxed content-boxed-padding"},gp={style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"130px"}},_p={class:"center-text"},vp={style:{margin:"0 auto",width:"85%","text-align":"left"}},yp={class:"center-text"};function bp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",fp,[a.createElementVNode("h5",gp,a.toDisplayString(n.ssoLang[n.appLanguage].use_tapni_on_the_web),1),e[6]||(e[6]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",_p,[e[3]||(e[3]=a.createElementVNode("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1)),e[4]||(e[4]=a.createElementVNode("br",null,null,-1)),e[5]||(e[5]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",vp,[a.createElementVNode("h2",yp,a.toDisplayString(n.ssoLang[n.appLanguage].login_by_scanning_qr_code),1),e[0]||(e[0]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].open_tapni_app_on_your_phone),1),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].go_to_settings_link_a_device),1),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].point_your_phone_at_this_qr_code),1),e[1]||(e[1]=a.createElementVNode("br",null,null,-1)),e[2]||(e[2]=a.createElementVNode("br",null,null,-1))]),a.createVNode(s,{to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].choose_other_login_methods),1)]),_:1})])])}const wp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(mp,[["render",bp]])},Symbol.toStringTag,{value:"Module"})),kp={async getRecordById(n){return ce().post("/objects/record/"+n.id,n)},async getRecords(n){return ce().post("/objects/records",n)}},Cp={name:"AuthApps",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,apps:[]}},async mounted(){this.isLoggedIn||this.$router.push("/login");const n=await kp.getRecords({objectId:"6dc545ea-2e2f-4720-b4fe-c5ebdd8af063",query:{fields:["t_apps_name","t_apps_icon","t_apps_url"],relations:[]}});this.apps=n.data.records},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})}}},Ep={class:"page-login content-boxed content-boxed-padding"},Tp={class:"subheaderContainer full-top"},Sp=["src"],Ip={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},Ap={class:"container left-text"},Rp={class:"center-text"},Np={class:"full-top"},Pp=["href"],Mp={class:"firstRow"},Lp=["src"],Op=["src"];function zp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Ep,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[1]||(e[1]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",Tp,[n.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,Sp)]),_:1})),a.createElementVNode("h2",Ip,a.toDisplayString(n.ssoLang[n.appLanguage].apps),1)]),a.createElementVNode("div",Ap,[a.createElementVNode("p",Rp,a.toDisplayString(n.ssoLang[n.appLanguage].apps_p),1),a.createElementVNode("div",Np,[a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.apps,c=>(a.openBlock(),a.createElementBlock("a",{key:c.id,href:c.t_apps_url,target:"_blank",class:"settingRow half-bottom"},[a.createElementVNode("div",Mp,[a.createElementVNode("img",{src:n.getIcon(c.t_apps_icon),class:"withBackground"},null,8,Lp),a.createElementVNode("h4",null,a.toDisplayString(c.t_apps_name),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Op)])],8,Pp))),128))])])])}const xp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Cp,[["render",zp],["__scopeId","data-v-2f7f5584"]])},Symbol.toStringTag,{value:"Module"})),Bp={name:"AuthCustomApp",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,app:{}}},async mounted(){this.isLoggedIn||this.$router.push("/login");const n=await Fe.getRecordById({id:this.$route.params.app,query:{fields:["t_apps_name","t_apps_icon","t_apps_url"],relations:[]}});this.app=n.data.record},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})}}},Up={class:"page-login content-boxed content-boxed-padding"},Dp={class:"subheaderContainer full-top"},jp=["src"],qp={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},Fp={class:"container left-text"},Vp={class:"center-text"};function Hp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Up,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[1]||(e[1]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",Dp,[n.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,to:"/apps",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,jp)]),_:1})),a.createElementVNode("h2",qp,a.toDisplayString(r.app.t_apps_name),1)]),a.createElementVNode("div",Fp,[a.createElementVNode("p",Vp,a.toDisplayString(n.ssoLang[n.appLanguage].apps_p),1),e[2]||(e[2]=a.createElementVNode("div",{class:"full-top"},null,-1))])])}const Kp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Bp,[["render",Hp],["__scopeId","data-v-36b27d1f"]])},Symbol.toStringTag,{value:"Module"}));class Gp extends tt.WebPlugin{constructor(){super()}loadScript(){if(typeof document>"u")return;const e="gapi";if(document==null?void 0:document.getElementById(e))return;const o=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.defer=!0,r.async=!0,r.id=e,r.onload=this.platformJsLoaded.bind(this),r.src="https://apis.google.com/js/platform.js",o.appendChild(r)}initialize(e={clientId:"",scopes:[],grantOfflineAccess:!1}){var t,o;if(typeof window>"u")return;const r=(t=document.getElementsByName("google-signin-client_id")[0])===null||t===void 0?void 0:t.content,i=e.clientId||r||"";return i||console.warn("GoogleAuthPlugin - clientId is empty"),this.options={clientId:i,grantOfflineAccess:(o=e.grantOfflineAccess)!==null&&o!==void 0?o:!1,scopes:e.scopes||[]},this.gapiLoaded=new Promise(s=>{window.gapiResolve=s,this.loadScript()}),this.addUserChangeListener(),this.gapiLoaded}platformJsLoaded(){gapi.load("auth2",()=>{const e={client_id:this.options.clientId,plugin_name:"CodetrixStudioCapacitorGoogleAuth"};this.options.scopes.length&&(e.scope=this.options.scopes.join(" ")),gapi.auth2.init(e),window.gapiResolve()})}async signIn(){return new Promise(async(e,t)=>{var o;try{let r;const i=(o=this.options.grantOfflineAccess)!==null&&o!==void 0?o:!1;i?r=(await gapi.auth2.getAuthInstance().grantOfflineAccess()).code:await gapi.auth2.getAuthInstance().signIn();const s=gapi.auth2.getAuthInstance().currentUser.get();i&&await s.reloadAuthResponse();const c=this.getUserFrom(s);c.serverAuthCode=r,e(c)}catch(r){t(r)}})}async refresh(){const e=await gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse();return{accessToken:e.access_token,idToken:e.id_token,refreshToken:""}}async signOut(){return gapi.auth2.getAuthInstance().signOut()}async addUserChangeListener(){await this.gapiLoaded,gapi.auth2.getAuthInstance().currentUser.listen(e=>{this.notifyListeners("userChange",e.isSignedIn()?this.getUserFrom(e):null)})}getUserFrom(e){const t={},o=e.getBasicProfile();t.email=o.getEmail(),t.familyName=o.getFamilyName(),t.givenName=o.getGivenName(),t.id=o.getId(),t.imageUrl=o.getImageUrl(),t.name=o.getName();const r=e.getAuthResponse(!0);return t.authentication={accessToken:r.access_token,idToken:r.id_token,refreshToken:""},t}}const $p=Object.freeze(Object.defineProperty({__proto__:null,GoogleAuthWeb:Gp},Symbol.toStringTag,{value:"Module"}));var ui={exports:{}};/*!
|
|
164
164
|
* $script.js JS loader & dependency manager
|
|
165
165
|
* https://github.com/ded/script.js
|
|
166
166
|
* (c) Dustin Diaz 2014 | License MIT
|