"use strict";var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){}}();e.Base=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){this.ver=1,this.sampleRate=100,this.tags={}}}();e.Envelope=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var AI;!function(e){!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(e.SeverityLevel||(e.SeverityLevel={}))}(AI||(AI={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t;!function(e){e[e.CRITICAL=0]="CRITICAL",e[e.WARNING=1]="WARNING"}(t=e.LoggingSeverity||(e.LoggingSeverity={}));var n;!function(e){e[e.BrowserDoesNotSupportLocalStorage=0]="BrowserDoesNotSupportLocalStorage",e[e.BrowserCannotReadLocalStorage=1]="BrowserCannotReadLocalStorage",e[e.BrowserCannotReadSessionStorage=2]="BrowserCannotReadSessionStorage",e[e.BrowserCannotWriteLocalStorage=3]="BrowserCannotWriteLocalStorage",e[e.BrowserCannotWriteSessionStorage=4]="BrowserCannotWriteSessionStorage",e[e.BrowserFailedRemovalFromLocalStorage=5]="BrowserFailedRemovalFromLocalStorage",e[e.BrowserFailedRemovalFromSessionStorage=6]="BrowserFailedRemovalFromSessionStorage",e[e.CannotSendEmptyTelemetry=7]="CannotSendEmptyTelemetry",e[e.ClientPerformanceMathError=8]="ClientPerformanceMathError",e[e.ErrorParsingAISessionCookie=9]="ErrorParsingAISessionCookie",e[e.ErrorPVCalc=10]="ErrorPVCalc",e[e.ExceptionWhileLoggingError=11]="ExceptionWhileLoggingError",e[e.FailedAddingTelemetryToBuffer=12]="FailedAddingTelemetryToBuffer",e[e.FailedMonitorAjaxAbort=13]="FailedMonitorAjaxAbort",e[e.FailedMonitorAjaxDur=14]="FailedMonitorAjaxDur",e[e.FailedMonitorAjaxOpen=15]="FailedMonitorAjaxOpen",e[e.FailedMonitorAjaxRSC=16]="FailedMonitorAjaxRSC",e[e.FailedMonitorAjaxSend=17]="FailedMonitorAjaxSend",e[e.FailedMonitorAjaxGetCorrelationHeader=18]="FailedMonitorAjaxGetCorrelationHeader",e[e.FailedToAddHandlerForOnBeforeUnload=19]="FailedToAddHandlerForOnBeforeUnload",e[e.FailedToSendQueuedTelemetry=20]="FailedToSendQueuedTelemetry",e[e.FailedToReportDataLoss=21]="FailedToReportDataLoss",e[e.FlushFailed=22]="FlushFailed",e[e.MessageLimitPerPVExceeded=23]="MessageLimitPerPVExceeded",e[e.MissingRequiredFieldSpecification=24]="MissingRequiredFieldSpecification",e[e.NavigationTimingNotSupported=25]="NavigationTimingNotSupported",e[e.OnError=26]="OnError",e[e.SessionRenewalDateIsZero=27]="SessionRenewalDateIsZero",e[e.SenderNotInitialized=28]="SenderNotInitialized",e[e.StartTrackEventFailed=29]="StartTrackEventFailed",e[e.StopTrackEventFailed=30]="StopTrackEventFailed",e[e.StartTrackFailed=31]="StartTrackFailed",e[e.StopTrackFailed=32]="StopTrackFailed",e[e.TelemetrySampledAndNotSent=33]="TelemetrySampledAndNotSent",e[e.TrackEventFailed=34]="TrackEventFailed",e[e.TrackExceptionFailed=35]="TrackExceptionFailed",e[e.TrackMetricFailed=36]="TrackMetricFailed",e[e.TrackPVFailed=37]="TrackPVFailed",e[e.TrackPVFailedCalc=38]="TrackPVFailedCalc",e[e.TrackTraceFailed=39]="TrackTraceFailed",e[e.TransmissionFailed=40]="TransmissionFailed",e[e.FailedToSetStorageBuffer=41]="FailedToSetStorageBuffer",e[e.FailedToRestoreStorageBuffer=42]="FailedToRestoreStorageBuffer",e[e.InvalidBackendResponse=43]="InvalidBackendResponse",e[e.FailedToFixDepricatedValues=44]="FailedToFixDepricatedValues",e[e.InvalidDurationValue=45]="InvalidDurationValue",e[e.CannotSerializeObject=46]="CannotSerializeObject",e[e.CannotSerializeObjectNonSerializable=47]="CannotSerializeObjectNonSerializable",e[e.CircularReferenceDetected=48]="CircularReferenceDetected",e[e.ClearAuthContextFailed=49]="ClearAuthContextFailed",e[e.ExceptionTruncated=50]="ExceptionTruncated",e[e.IllegalCharsInName=51]="IllegalCharsInName",e[e.ItemNotInArray=52]="ItemNotInArray",e[e.MaxAjaxPerPVExceeded=53]="MaxAjaxPerPVExceeded",e[e.MessageTruncated=54]="MessageTruncated",e[e.NameTooLong=55]="NameTooLong",e[e.SampleRateOutOfRange=56]="SampleRateOutOfRange",e[e.SetAuthContextFailed=57]="SetAuthContextFailed",e[e.SetAuthContextFailedAccountName=58]="SetAuthContextFailedAccountName",e[e.StringValueTooLong=59]="StringValueTooLong",e[e.StartCalledMoreThanOnce=60]="StartCalledMoreThanOnce",e[e.StopCalledWithoutStart=61]="StopCalledWithoutStart",e[e.TelemetryInitializerFailed=62]="TelemetryInitializerFailed",e[e.TrackArgumentsNotSpecified=63]="TrackArgumentsNotSpecified",e[e.UrlTooLong=64]="UrlTooLong",e[e.SessionStorageBufferFull=65]="SessionStorageBufferFull",e[e.CannotAccessCookie=66]="CannotAccessCookie",e[e.IdTooLong=67]="IdTooLong"}(n=e._InternalMessageId||(e._InternalMessageId={}));var i=function(){function e(t,i,o,a){void 0===o&&(o=!1),this.messageId=t,this.message=(o?e.AiUserActionablePrefix:e.AiNonUserActionablePrefix)+n[t].toString();var r=(i?" message:"+e.sanitizeDiagnosticText(i):"")+(a?" props:"+e.sanitizeDiagnosticText(JSON.stringify(a)):"");this.message+=r}return e.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},e.AiNonUserActionablePrefix="AI (Internal): ",e.AiUserActionablePrefix="AI: ",e}();e._InternalLogMessage=i;var o=function(){function o(){}return o.throwInternal=function(e,t,o,a,r){void 0===r&&(r=!1);var s=new i(t,o,r,a);if(this.enableDebugExceptions())throw s;if(void 0!==s&&s&&"undefined"!=typeof s.message){if(r){var l=n[s.messageId];this._messageLogged[l]&&!this.verboseLogging()||(this.warnToConsole(s.message),this._messageLogged[l]=!0)}else this.verboseLogging()&&this.warnToConsole(s.message);this.logInternalMessage(e,s)}},o.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},o.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},o.clearInternalMessageLoggedTypes=function(){if(e.Util.canUseSessionStorage())for(var t=e.Util.getSessionStorageKeys(),n=0;n=this.MAX_INTERNAL_MESSAGE_LIMIT},o.AIInternalMessagePrefix="AITR_",o.enableDebugExceptions=function(){return!1},o.verboseLogging=function(){return!1},o.queue=[],o.MAX_INTERNAL_MESSAGE_LIMIT=25,o._messageCount=0,o._messageLogged={},o}();e._InternalLogging=o}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.newId=function(){for(var e="",t=1073741824*Math.random();t>0;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},e}();e.UtilHelpers=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t;!function(e){e[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage"}(t||(t={}));var n=function(){function n(){}return n.disableStorage=function(){n._canUseLocalStorage=!1,n._canUseSessionStorage=!1},n._getLocalStorageObject=function(){return n.canUseLocalStorage()?n._getVerifiedStorageObject(t.LocalStorage):null},n._getVerifiedStorageObject=function(e){var n,i,o=null;try{i=new Date,(o=e===t.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),n=o.getItem(i)!=i,o.removeItem(i),n&&(o=null)}catch(a){o=null}return o},n.isInternalApplicationInsightsEndpoint=function(e){return-1!==n._internalEndpoints.indexOf(e.toLowerCase())},n.canUseLocalStorage=function(){return n._canUseLocalStorage===undefined&&(n._canUseLocalStorage=!!n._getVerifiedStorageObject(t.LocalStorage)),n._canUseLocalStorage},n.getStorage=function(t){var i=n._getLocalStorageObject();if(null!==i)try{return i.getItem(t)}catch(o){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+n.getExceptionName(o),{exception:n.dump(o)})}return null},n.setStorage=function(t,i){var o=n._getLocalStorageObject();if(null!==o)try{return o.setItem(t,i),!0}catch(a){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+n.getExceptionName(a),{exception:n.dump(a)})}return!1},n.removeStorage=function(t){var i=n._getLocalStorageObject();if(null!==i)try{return i.removeItem(t),!0}catch(o){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+n.getExceptionName(o),{exception:n.dump(o)})}return!1},n._getSessionStorageObject=function(){return n.canUseSessionStorage()?n._getVerifiedStorageObject(t.SessionStorage):null},n.canUseSessionStorage=function(){return n._canUseSessionStorage===undefined&&(n._canUseSessionStorage=!!n._getVerifiedStorageObject(t.SessionStorage)),n._canUseSessionStorage},n.getSessionStorageKeys=function(){var e=[];if(n.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},n.getSessionStorage=function(t){var i=n._getSessionStorageObject();if(null!==i)try{return i.getItem(t)}catch(o){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+n.getExceptionName(o),{exception:n.dump(o)})}return null},n.setSessionStorage=function(t,i){var o=n._getSessionStorageObject();if(null!==o)try{return o.setItem(t,i),!0}catch(a){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+n.getExceptionName(a),{exception:n.dump(a)})}return!1},n.removeSessionStorage=function(t){var i=n._getSessionStorageObject();if(null!==i)try{return i.removeItem(t),!0}catch(o){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+n.getExceptionName(o),{exception:n.dump(o)})}return!1},n.disableCookies=function(){n._canUseCookies=!1},n.canUseCookies=function(){if(n._canUseCookies===undefined){n._canUseCookies=!1;try{n._canUseCookies=n.document.cookie!==undefined}catch(t){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.CannotAccessCookie,"Cannot access document.cookie - "+n.getExceptionName(t),{exception:n.dump(t)})}}return n._canUseCookies},n.setCookie=function(e,t,i){var o="",a="";i&&(o=";domain="+i),n.document.location&&"https:"===n.document.location.protocol&&(a=";secure"),n.canUseCookies()&&(n.document.cookie=e+"="+t+o+";path=/"+a)},n.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},n.getCookie=function(e){if(n.canUseCookies()){var t="";if(e&&e.length)for(var i=e+"=",o=n.document.cookie.split(";"),a=0;a0?a+".":"")+o+":"+i+":"+n+"."+t},n.isCrossOriginError=function(e,t,n,i,o){return("Script error."===e||"Script error"===e)&&!o},n.dump=function(e){var t=Object.prototype.toString.call(e),n=JSON.stringify(e);return"[object Error]"===t&&(n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+n},n.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},n.addEventHandler=function(e,t){if(!window||"string"!=typeof e||"function"!=typeof t)return!1;var n="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(n,t)}return!0},n.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},n.document="undefined"!=typeof document?document:{},n._canUseCookies=undefined,n._canUseLocalStorage=undefined,n._canUseSessionStorage=undefined,n._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],n.NotSpecified="not_specified",n}();e.Util=n;var i=function(){function e(){}return e.parseUrl=function(t){return e.htmlAnchorElement||(e.htmlAnchorElement=e.document.createElement?e.document.createElement("a"):{}),e.htmlAnchorElement.href=t,e.htmlAnchorElement},e.getAbsoluteUrl=function(t){var n,i=e.parseUrl(t);return i&&(n=i.href),n},e.getPathName=function(t){var n,i=e.parseUrl(t);return i&&(n=i.pathname),n},e.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},e.document="undefined"!=typeof document?document:{},e}();e.UrlHelper=i;var o=function(){function t(){}return t.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var o=i.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||o===n))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var r=0;r100||t<0)&&(e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new e.SamplingScoreGenerator}return t.prototype.isSampledIn=function(e){return 100==this.sampleRate||this.samplingScoreGenerator.getSamplingScore(e)this.config.sessionExpirationMs(),o=n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();i||o?(this.automaticSession.isFirst=undefined,this.renew()):(!this.cookieUpdatedTimestamp||n-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=n,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},t.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},t.prototype.initializeAutomaticSession=function(){var t=e.Util.getCookie("ai_session");if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var n=e.Util.getStorage("ai_session");n&&this.initializeAutomaticSessionWithData(n)}this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},t.prototype.initializeAutomaticSessionWithData=function(t){var n=t.split("|");n.length>0&&(this.automaticSession.id=n[0]);try{if(n.length>1){var i=+n[1];this.automaticSession.acquisitionDate=+new Date(i),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0}if(n.length>2){var o=+n[2];this.automaticSession.renewalDate=+new Date(o),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0}}catch(a){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+e.Util.getExceptionName(a),{exception:e.Util.dump(a)})}0==this.automaticSession.renewalDate&&e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=e.dateTime.Now();this.automaticSession.id=e.Util.newId(),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),e.Util.canUseLocalStorage()||e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,n,i){var o=n+this.config.sessionExpirationMs(),a=i+this.config.sessionRenewalMs(),r=new Date,s=[t,n,i];o0&&(this.id=o[0])}if(this.config=n,!this.id){this.id=e.Util.newId();var a=new Date,r=e.Util.toISOStringForIE8(a);this.accountAcquisitionDate=r,a.setTime(a.getTime()+31536e6);var s=[this.id,r],l=this.config.cookieDomain?this.config.cookieDomain():undefined;e.Util.setCookie(t.userCookieName,s.join(t.cookieSeparator)+";expires="+a.toUTCString(),l),e.Util.removeStorage("ai_session")}this.accountId=n.accountId?n.accountId():undefined;var c=e.Util.getCookie(t.authUserCookieName);if(c){var u=(c=decodeURI(c)).split(t.cookieSeparator);u[0]&&(this.authenticatedId=u[0]),u.length>1&&u[1]&&(this.accountId=u[1])}}return t.prototype.setAuthenticatedUserContext=function(n,i,o){if(void 0===o&&(o=!1),!this.validateUserInput(n)||i&&!this.validateUserInput(i))e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=n;var a=this.authenticatedId;i&&(this.accountId=i,a=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),o&&e.Util.setCookie(t.authUserCookieName,encodeURI(a),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,e.Util.deleteCookie(t.authUserCookieName)},t.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}();t.User=n}(e.Context||(e.Context={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.IsNullOrUndefined=function(e){return void 0===e||null===e},e}();e.extensions=t;var n=function(){function e(){}return e.GetLength=function(e){var n=0;if(!t.IsNullOrUndefined(e)){var i="";try{i=e.toString()}catch(o){}n=i.length,n=isNaN(n)?0:n}return n},e}();e.stringUtils=n;var i=function(){function e(){}return e.Now=window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,n){var i=null;return 0===e||0===n||t.IsNullOrUndefined(e)||t.IsNullOrUndefined(n)||(i=n-e),i},e}();e.dateTime=i;var o=function(){function e(){}return e.AttachEvent=function(e,n,i){var o=!1;return t.IsNullOrUndefined(e)||(t.IsNullOrUndefined(e.attachEvent)?t.IsNullOrUndefined(e.addEventListener)||(e.addEventListener(n,i,!1),o=!0):(e.attachEvent("on"+n,i),o=!0)),o},e.DetachEvent=function(e,n,i){t.IsNullOrUndefined(e)||(t.IsNullOrUndefined(e.detachEvent)?t.IsNullOrUndefined(e.removeEventListener)||e.removeEventListener(n,i,!1):e.detachEvent("on"+n,i))},e}();e.EventHelper=o;var a=function(){function t(){}return t.ParseDependencyPath=function(t,n,i){var o,a;if(t&&t.length>0){var r=e.UrlHelper.parseUrl(t);o=r.host,null!=r.pathname?("/"!==(i=0===r.pathname.length?"/":r.pathname).charAt(0)&&(i="/"+i),a=e.Telemetry.Common.DataSanitizer.sanitizeString(n?n+" "+i:i)):a=e.Telemetry.Common.DataSanitizer.sanitizeString(t)}else o=i,a=i;return{target:o,name:a}},t}();e.AjaxHelper=a}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}}();e.XHRMonitoringState=t;var n=function(){function n(n){this.completed=!1,this.requestHeadersSize=null,this.ttfb=null,this.responseReceivingDuration=null,this.callbackDuration=null,this.ajaxTotalDuration=null,this.aborted=null,this.pageUrl=null,this.requestUrl=null,this.requestSize=0,this.method=null,this.status=null,this.requestSentTime=null,this.responseStartedTime=null,this.responseFinishedTime=null,this.callbackFinishedTime=null,this.endTime=null,this.originalOnreadystatechage=null,this.xhrMonitoringState=new t,this.clientFailure=0,this.CalculateMetrics=function(){var t=this;t.ajaxTotalDuration=Math.round(1e3*e.dateTime.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3},this.id=n}return n.prototype.getAbsoluteUrl=function(){return this.requestUrl?e.UrlHelper.getAbsoluteUrl(this.requestUrl):null},n.prototype.getPathName=function(){return this.requestUrl?e.Telemetry.Common.DataSanitizer.sanitizeUrl(e.UrlHelper.getCompleteUrl(this.method,this.requestUrl)):null},n}();e.ajaxRecord=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}();e.RequestHeaders=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){}}();e.Domain=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.EventData=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(e.EventData);e.PageViewData=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.RemoteDependencyData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){!function(t){var n=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(e,n){var i=e.length,o=t.sanitizeKey(e);if(o.length!==i){for(var a=0,r=o;n[r]!==undefined;)a++,r=o.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(a);o=r}return o},t.sanitizeKey=function(n){return n&&(n=e.Util.trim(n.toString())).length>t.MAX_NAME_LENGTH&&(n=n.substring(0,t.MAX_NAME_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.NameTooLong,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:n},!0)),n},t.sanitizeString=function(n,i){return void 0===i&&(i=t.MAX_STRING_LENGTH),n&&(i=i||t.MAX_STRING_LENGTH,(n=e.Util.trim(n)).toString().length>i&&(n=n.toString().substring(0,i),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.StringValueTooLong,"string value is too long. It has been truncated to "+i+" characters.",{value:n},!0))),n},t.sanitizeUrl=function(n){return t.sanitizeInput(n,t.MAX_URL_LENGTH,e._InternalMessageId.UrlTooLong)},t.sanitizeMessage=function(n){return n&&n.length>t.MAX_MESSAGE_LENGTH&&(n=n.substring(0,t.MAX_MESSAGE_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.MessageTruncated,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:n},!0)),n},t.sanitizeException=function(n){return n&&n.length>t.MAX_EXCEPTION_LENGTH&&(n=n.substring(0,t.MAX_EXCEPTION_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.ExceptionTruncated,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:n},!0)),n},t.sanitizeProperties=function(e){if(e){var n={};for(var i in e){var o=t.sanitizeString(e[i],t.MAX_PROPERTY_LENGTH);n[i=t.sanitizeKeyAndAddUniqueness(i,n)]=o}e=n}return e},t.sanitizeMeasurements=function(e){if(e){var n={};for(var i in e){var o=e[i];n[i=t.sanitizeKeyAndAddUniqueness(i,n)]=o}e=n}return e},t.sanitizeId=function(n){return n?t.sanitizeInput(n,t.MAX_ID_LENGTH,e._InternalMessageId.IdTooLong).toString():n},t.sanitizeInput=function(t,n,i){return t&&(t=e.Util.trim(t)).length>n&&(t=t.substring(0,n),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},t.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},t.MAX_NAME_LENGTH=150,t.MAX_ID_LENGTH=128,t.MAX_PROPERTY_LENGTH=8192,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}();t.DataSanitizer=n}(t.Common||(t.Common={}))}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a,r,s,l,c,u,g){var p=n.call(this)||this;p.aiDataContract={id:e.FieldType.Required,ver:e.FieldType.Required,name:e.FieldType.Default,resultCode:e.FieldType.Default,duration:e.FieldType.Default,success:e.FieldType.Default,data:e.FieldType.Default,target:e.FieldType.Default,type:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default,kind:e.FieldType.Default,value:e.FieldType.Default,count:e.FieldType.Default,min:e.FieldType.Default,max:e.FieldType.Default,stdDev:e.FieldType.Default,dependencyKind:e.FieldType.Default,dependencySource:e.FieldType.Default,commandName:e.FieldType.Default,dependencyTypeName:e.FieldType.Default},p.id=i,p.duration=e.Util.msToTimeSpan(r),p.success=s,p.resultCode=l+"",p.type="Ajax",p.data=t.Common.DataSanitizer.sanitizeUrl(a);var d=e.AjaxHelper.ParseDependencyPath(o,c,a);return p.target=d.target,p.name=d.name,p.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(u),p.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(g),p}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",i.dataType="RemoteDependencyData",i}(AI.RemoteDependencyData);t.RemoteDependencyData=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){this.currentWindowHost=window.location.host&&window.location.host.toLowerCase(),this.appInsights=e,this.initialized=!1,this.Init()}return n.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},n.prototype.isMonitoredInstance=function(e,i){return this.initialized&&(!0===i||!t.extensions.IsNullOrUndefined(e.ajaxData))&&!0!==e[n.DisabledPropertyName]},n.prototype.supportsMonitoring=function(){var e=!0;(t.extensions.IsNullOrUndefined(XMLHttpRequest)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1);try{" a ".trim()}catch(n){e=!1}return e},n.prototype.instrumentOpen=function(){var i=XMLHttpRequest.prototype.open,o=this;XMLHttpRequest.prototype.open=function(a,r,s){try{!o.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||o.openHandler(this,a,r,s)}catch(l){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(l)})}return i.apply(this,arguments)}},n.prototype.openHandler=function(e,n,i,o){var a="|"+this.appInsights.context.operation.id+"."+t.Util.newId(),r=new t.ajaxRecord(a);r.method=n,r.requestUrl=i,r.xhrMonitoringState.openDone=!0,e.ajaxData=r,this.attachToOnReadyStateChange(e)},n.getFailedAjaxDiagnosticsMessage=function(e){var n="";try{t.extensions.IsNullOrUndefined(e)||t.extensions.IsNullOrUndefined(e.ajaxData)||t.extensions.IsNullOrUndefined(e.ajaxData.requestUrl)||(n+="(url: '"+e.ajaxData.requestUrl+"')")}catch(i){}return n},n.prototype.instrumentSend=function(){var i=XMLHttpRequest.prototype.send,o=this;XMLHttpRequest.prototype.send=function(a){try{o.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&o.sendHandler(this,a)}catch(r){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(r)})}return i.apply(this,arguments)}},n.prototype.sendHandler=function(e,n){if(e.ajaxData.requestSentTime=t.dateTime.Now(),t.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config,e.ajaxData.getAbsoluteUrl(),this.currentWindowHost)&&(e.setRequestHeader(t.RequestHeaders.requestIdHeader,e.ajaxData.id),this.appInsights.context)){var i=this.appInsights.context.appId();i&&e.setRequestHeader(t.RequestHeaders.requestContextHeader,t.RequestHeaders.requestContextAppIdFormat+i)}e.ajaxData.xhrMonitoringState.sendDone=!0},n.prototype.instrumentAbort=function(){var i=XMLHttpRequest.prototype.abort,o=this;XMLHttpRequest.prototype.abort=function(){try{o.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(a){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(a)})}return i.apply(this,arguments)}},n.prototype.attachToOnReadyStateChange=function(i){var o=this;i.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=t.EventHelper.AttachEvent(i,"readystatechange",function(){try{o.isMonitoredInstance(i)&&4===i.readyState&&o.onAjaxComplete(i)}catch(r){var a=e.ApplicationInsights.Util.dump(r);a&&-1!=a.toLowerCase().indexOf("c00c023f")||t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(r)})}})},n.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=t.dateTime.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(e),requestSentTime:e.ajaxData.requestSentTime,responseFinishedTime:e.ajaxData.responseFinishedTime});else{var i=new t.Telemetry.RemoteDependencyData(e.ajaxData.id,e.ajaxData.getAbsoluteUrl(),e.ajaxData.getPathName(),e.ajaxData.ajaxTotalDuration,+e.ajaxData.status>=200&&+e.ajaxData.status<400,+e.ajaxData.status,e.ajaxData.method),o=this.getCorrelationContext(e);o&&(i.target=i.target+" | "+o),this.appInsights.trackDependencyData(i),e.ajaxData=null}},n.prototype.getCorrelationContext=function(i){try{var o=i.getAllResponseHeaders();if(null!==o&&-1!==o.toLowerCase().indexOf(t.RequestHeaders.requestContextHeaderLowerCase)){var a=i.getResponseHeader(t.RequestHeaders.requestContextHeader);return t.CorrelationIdHelper.getCorrelationContext(a)}}catch(r){t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(r)})}},n.instrumentedByAppInsightsName="InstrumentedByAppInsights",n.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",n}();t.AjaxMonitor=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}();e.ArraySendBuffer=t;var n=function(){function t(e){this._bufferFullMessageSent=!1,this._config=e;var n=this.getBuffer(t.BUFFER_KEY),i=this.getBuffer(t.SENT_BUFFER_KEY);this._buffer=n.concat(i),this._buffer.length>t.MAX_BUFFER_SIZE&&(this._buffer.length=t.MAX_BUFFER_SIZE),this.setBuffer(t.SENT_BUFFER_KEY,[]),this.setBuffer(t.BUFFER_KEY,this._buffer)}return t.prototype.enqueue=function(n){this._buffer.length>=t.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(n),this.setBuffer(t.BUFFER_KEY,this._buffer))},t.prototype.count=function(){return this._buffer.length},t.prototype.clear=function(){this._buffer.length=0,this.setBuffer(t.BUFFER_KEY,[]),this.setBuffer(t.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},t.prototype.getItems=function(){return this._buffer.slice(0)},t.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},t.prototype.markAsSent=function(n){this._buffer=this.removePayloadsFromBuffer(n,this._buffer),this.setBuffer(t.BUFFER_KEY,this._buffer);var i=this.getBuffer(t.SENT_BUFFER_KEY);i instanceof Array&&n instanceof Array&&((i=i.concat(n)).length>t.MAX_BUFFER_SIZE&&(e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+i.length,!0),i.length=t.MAX_BUFFER_SIZE),this.setBuffer(t.SENT_BUFFER_KEY,i))},t.prototype.clearSent=function(e){var n=this.getBuffer(t.SENT_BUFFER_KEY);n=this.removePayloadsFromBuffer(e,n),this.setBuffer(t.SENT_BUFFER_KEY,n)},t.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var o=!1;for(var a in e)if(e[a]===t[i]){o=!0;break}o||n.push(t[i])}return n},t.prototype.getBuffer=function(t){try{var n=e.Util.getSessionStorage(t);if(n){var i=JSON.parse(n);if(i)return i}}catch(o){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.FailedToRestoreStorageBuffer," storage key: "+t+", "+e.Util.getExceptionName(o),{exception:e.Util.dump(o)})}return[]},t.prototype.setBuffer=function(t,n){try{var i=JSON.stringify(n);e.Util.setSessionStorage(t,i)}catch(o){e.Util.setSessionStorage(t,JSON.stringify([])),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.FailedToSetStorageBuffer," storage key: "+t+", "+e.Util.getExceptionName(o)+". Buffer cleared",{exception:e.Util.dump(o)})}},t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}();e.SessionStorageSendBuffer=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function t(t){this._XMLHttpRequestSupported=!1,this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._config=t,this._sender=null,this._buffer=e.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new e.SessionStorageSendBuffer(t):new e.ArraySendBuffer(t),!this._config.isBeaconApiDisabled()&&e.Util.IsBeaconApiSupported()?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))}return t.prototype.send=function(t){try{if(this._config.disableTelemetry())return;if(!t)return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(!this._sender)return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.SenderNotInitialized,"Sender was not initialized");var n=e.Serializer.serialize(t),i=this._buffer.getItems(),o=this._buffer.batchPayloads(i);o&&o.length+n.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(n),this._setupTimer()}catch(a){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+e.Util.getExceptionName(a),{exception:e.Util.dump(a)})}},t.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},t.prototype._getSizeInBytes=function(e){var t=0;if(e&&e.length)for(var n=0;n0){var n=this._buffer.getItems();this._sender(n,t)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(i){(!e.Util.getIEVersion()||e.Util.getIEVersion()>9)&&e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+e.Util.getExceptionName(i),{exception:e.Util.dump(i)})}},t.prototype._setRetryTime=function(){var e;if(this._consecutiveErrors<=1)e=10;else{var t=(Math.pow(2,this._consecutiveErrors)-1)/2,n=Math.floor(Math.random()*t*10)+1;e=Math.max(Math.min(n,3600),10)}var i=Date.now()+1e3*e;this._retryAt=i},t.prototype._parseResponse=function(t){try{if(t&&""!==t){var n=JSON.parse(t);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted==n.errors.length)return n}}catch(i){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.InvalidBackendResponse,"Cannot parse the response. "+e.Util.getExceptionName(i),{response:t})}return null},t.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},t.prototype._resendPayload=function(e){if(e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var t=0,n=e;t=300)&&0!==t.status?!this._config.isRetryDisabled()&&this._isRetriable(t.status)?(this._resendPayload(n),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.TransmissionFailed,". Response code "+t.status+". Will retry to send "+n.length+" items.")):this._onError(n,this._formatErrorMessageXhr(t)):206===t.status?(o||(o=this._parseResponse(t.responseText||t.response)),o&&!this._config.isRetryDisabled()?this._onPartialSuccess(n,o):this._onError(n,this._formatErrorMessageXhr(t))):(this._consecutiveErrors=0,this._onSuccess(n,i))}},t.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},t.prototype._onPartialSuccess=function(t,n){for(var i=[],o=[],a=0,r=n.errors.reverse();a0&&this._onSuccess(t,n.itemsAccepted),i.length>0&&this._onError(i,this._formatErrorMessageXhr(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),o.length>0&&(this._resendPayload(o),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.TransmissionFailed,"Partial success. Delivered: "+t.length+", Failed: "+i.length+". Will retry to send "+o.length+" our of "+n.itemsReceived+" items"))},t.prototype._onError=function(t,n,i){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.OnError,"Failed to send telemetry.",{message:n}),this._buffer.clearSent(t)},t.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},t.MaxBeaconPayloadSize=65536,t}();e.Sender=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.MessageData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a){var r=n.call(this)||this;return r.aiDataContract={ver:e.FieldType.Required,message:e.FieldType.Required,severityLevel:e.FieldType.Default,properties:e.FieldType.Default},i=i||e.Util.NotSpecified,r.message=t.Common.DataSanitizer.sanitizeMessage(i),r.properties=t.Common.DataSanitizer.sanitizeProperties(o),a&&(r.severityLevel=a),r}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.Message",i.dataType="MessageData",i}(AI.MessageData);t.Trace=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(t){function n(n,i,o){var a=t.call(this)||this;return a.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Required,properties:e.FieldType.Default,measurements:e.FieldType.Default},a.name=e.Telemetry.Common.DataSanitizer.sanitizeString(n)||e.Util.NotSpecified,a.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(i),a.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o),a}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Event",n.dataType="EventData",n}(AI.EventData);t.Event=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(){return function(){this.hasFullStack=!0,this.parsedStack=[]}}();e.ExceptionDetails=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.ExceptionData=t}(AI||(AI={}));var AI;!function(e){var t=function(){return function(){}}();e.StackFrame=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(t){function n(n,o,a,r){var s=t.call(this)||this;return s.aiDataContract={ver:e.FieldType.Required,exceptions:e.FieldType.Required,severityLevel:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default},s.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(o),s.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(a),s.exceptions=[new i(n)],r&&(s.severityLevel=r),s}return __extends(n,t),n.CreateSimpleException=function(e,t,n,i,o,a){return{exceptions:[{hasFullStack:!0,message:e,stack:o,typeName:t}]}},n.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",n.dataType="ExceptionData",n}(AI.ExceptionData);t.Exception=n;var i=function(n){function i(i){var o=n.call(this)||this;o.aiDataContract={id:e.FieldType.Default,outerId:e.FieldType.Default,typeName:e.FieldType.Required,message:e.FieldType.Required,hasFullStack:e.FieldType.Default,stack:e.FieldType.Default,parsedStack:e.FieldType.Array},o.typeName=t.Common.DataSanitizer.sanitizeString(i.name)||e.Util.NotSpecified,o.message=t.Common.DataSanitizer.sanitizeMessage(i.message)||e.Util.NotSpecified;var a=i.stack;return o.parsedStack=o.parseStack(a),o.stack=t.Common.DataSanitizer.sanitizeException(a),o.hasFullStack=e.Util.isArray(o.parsedStack)&&o.parsedStack.length>0,o}return __extends(i,n),i.prototype.parseStack=function(e){var t=undefined;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,a=0,r=0;r<=n.length;r++){var s=n[r];if(o.regex.test(s)){var l=new o(n[r],i++);a+=l.sizeInBytes,t.push(l)}}if(a>32768)for(var c=0,u=t.length-1,g=0,p=c,d=u;c32768){var f=d-p+1;t.splice(p,f);break}p=c,d=u,c++,u--}}return t},i}(AI.ExceptionDetails),o=function(t){function n(i,o){var a=t.call(this)||this;a.sizeInBytes=0,a.aiDataContract={level:e.FieldType.Required,method:e.FieldType.Required,assembly:e.FieldType.Default,fileName:e.FieldType.Default,line:e.FieldType.Default},a.level=o,a.method="",a.assembly=e.Util.trim(i);var r=i.match(n.regex);return r&&r.length>=5&&(a.method=e.Util.trim(r[2])||a.method,a.fileName=e.Util.trim(r[4]),a.line=parseInt(r[5])||0),a.sizeInBytes+=a.method.length,a.sizeInBytes+=a.fileName.length,a.sizeInBytes+=a.assembly.length,a.sizeInBytes+=n.baseSize,a.sizeInBytes+=a.level.toString().length,a.sizeInBytes+=a.line.toString().length,a}return __extends(n,t),n.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,n.baseSize=58,n}(AI.StackFrame);t._StackFrame=o}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(e.DataPointType||(e.DataPointType={}))}(AI||(AI={}));var AI;!function(e){var t=function(){return function(){this.kind=e.DataPointType.Measurement}}();e.DataPoint=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.MetricData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.aiDataContract={name:e.FieldType.Required,kind:e.FieldType.Default,value:e.FieldType.Required,count:e.FieldType.Default,min:e.FieldType.Default,max:e.FieldType.Default,stdDev:e.FieldType.Default},n}return __extends(n,t),n}(AI.DataPoint);t.DataPoint=n}(t.Common||(t.Common={}))}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){!function(n){var i=function(i){function o(o,a,r,s,l,c){var u=i.call(this)||this;u.aiDataContract={ver:t.FieldType.Required,metrics:t.FieldType.Required,properties:t.FieldType.Default};var g=new e.ApplicationInsights.Telemetry.Common.DataPoint;return g.count=r>0?r:undefined,g.max=isNaN(l)||null===l?undefined:l,g.min=isNaN(s)||null===s?undefined:s,g.name=n.Common.DataSanitizer.sanitizeString(o)||t.Util.NotSpecified,g.value=a,u.metrics=[g],u.properties=t.Telemetry.Common.DataSanitizer.sanitizeProperties(c),u}return __extends(o,i),o.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",o.dataType="MetricData",o}(AI.MetricData);n.Metric=i}(t.Telemetry||(t.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a,r,s,l){var c=n.call(this)||this;return c.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Default,url:e.FieldType.Default,duration:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default,id:e.FieldType.Default},c.id=t.Common.DataSanitizer.sanitizeId(l),c.url=t.Common.DataSanitizer.sanitizeUrl(o),c.name=t.Common.DataSanitizer.sanitizeString(i)||e.Util.NotSpecified,isNaN(a)||(c.duration=e.Util.msToTimeSpan(a)),c.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(r),c.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(s),c}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",i.dataType="PageviewData",i}(AI.PageViewData);t.PageView=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(e.PageViewData);e.PageViewPerfData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(o,a,r,s,l){var c=n.call(this)||this;c.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Default,url:e.FieldType.Default,duration:e.FieldType.Default,perfTotal:e.FieldType.Default,networkConnect:e.FieldType.Default,sentRequest:e.FieldType.Default,receivedResponse:e.FieldType.Default,domProcessing:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default},c.isValid=!1;var u=i.getPerformanceTiming();if(u){var g=i.getDuration(u.navigationStart,u.loadEventEnd),p=i.getDuration(u.navigationStart,u.connectEnd),d=i.getDuration(u.requestStart,u.responseStart),f=i.getDuration(u.responseStart,u.responseEnd),h=i.getDuration(u.responseEnd,u.loadEventEnd);0==g?e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.ErrorPVCalc,"error calculating page view performance.",{total:g,network:p,request:d,response:f,dom:h}):i.shouldCollectDuration(g,p,d,f,h)?g0&&e.navigationStart>0&&e.responseStart>0&&e.requestStart>0&&e.loadEventEnd>0&&e.responseEnd>0&&e.connectEnd>0&&e.domLoading>0},i.getDuration=function(e,t){var n=undefined;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},i.shouldCollectDuration=function(){for(var e=[],t=0;t=i.MAX_DURATION_ALLOWED)return!1;return!0},i.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",i.dataType="PageviewPerformanceData",i.MAX_DURATION_ALLOWED=36e5,i}(AI.PageViewPerfData);t.PageViewPerformance=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){var n=this;this._config=e,this._sender=new t.Sender(e),this.appId=function(){return n._sender._appId},e.appId()&&(this._sender._appId=e.appId()),this.telemetryInitializers=[],"undefined"!=typeof window&&(this._sessionManager=new t.Context._SessionManager(e),this.application=new t.Context.Application,this.device=new t.Context.Device,this.internal=new t.Context.Internal(e),this.location=new t.Context.Location,this.user=new t.Context.User(e),this.operation=new t.Context.Operation,this.session=new t.Context.Session,this.sample=new t.Context.Sample(e.sampleRate())),this._addDefaultTelemetryInitializers()}return n.prototype.addTelemetryInitializer=function(e){this.telemetryInitializers.push(e)},n.prototype.track=function(e){return e?(e.name===t.Telemetry.PageView.envelopeType&&t._InternalLogging.resetInternalMessageCount(),this.session&&"string"!=typeof this.session.id&&this._sessionManager.update(),this._track(e)):t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument",null,!0),e},n.prototype._addDefaultTelemetryInitializers=function(){if(!this._config.isBrowserLinkTrackingEnabled()){var t=["/browserLinkSignalR/","/__browserLink/"];this.addTelemetryInitializer(function(n){if(n.name===e.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType){var i=n.data;if(i&&i.baseData)for(var o=0;o=0)return!1}return!0})}},n.prototype._track=function(e){this.session&&("string"==typeof this.session.id?this._applySessionContext(e,this.session):this._applySessionContext(e,this._sessionManager.automaticSession)),this._applyApplicationContext(e,this.application),this._applyDeviceContext(e,this.device),this._applyInternalContext(e,this.internal),this._applyLocationContext(e,this.location),this._applySampleContext(e,this.sample),this._applyUserContext(e,this.user),this._applyOperationContext(e,this.operation),e.iKey=this._config.instrumentationKey();var n=!1;try{for(var i=this.telemetryInitializers.length,o=0;o6e4&&(clearInterval(g),l||(s.appInsights.sendPageViewInternal(n,i,6e4,o,a),s.appInsights.flush()))}catch(p){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+e.Util.getExceptionName(p),{exception:e.Util.dump(p)})}},100);else e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.")},n}();t.PageViewManager=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(){function t(e){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=e}return t.prototype.trackPreviousPageVisit=function(t,n){try{var i=this.restartPageVisitTimer(t,n);i&&this.pageVisitTimeTrackingHandler(i.pageName,i.pageUrl,i.pageVisitTime)}catch(o){e._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+e.Util.dump(o))}},t.prototype.restartPageVisitTimer=function(t,n){try{var i=this.stopPageVisitTimer();return this.startPageVisitTimer(t,n),i}catch(o){return e._InternalLogging.warnToConsole("Call to restart failed: "+e.Util.dump(o)),null}},t.prototype.startPageVisitTimer=function(t,n){try{if(e.Util.canUseSessionStorage()){if(null!=e.Util.getSessionStorage(this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var o=new i(t,n),a=JSON.stringify(o);e.Util.setSessionStorage(this.prevPageVisitDataKeyName,a)}}catch(r){e._InternalLogging.warnToConsole("Call to start failed: "+e.Util.dump(r))}},t.prototype.stopPageVisitTimer=function(){try{if(e.Util.canUseSessionStorage()){var t=Date.now(),n=e.Util.getSessionStorage(this.prevPageVisitDataKeyName);if(n){var i=JSON.parse(n);return i.pageVisitTime=t-i.pageVisitStartTime,e.Util.removeSessionStorage(this.prevPageVisitDataKeyName),i}return null}return null}catch(o){return e._InternalLogging.warnToConsole("Stop page visit timer failed: "+e.Util.dump(o)),null}},t}();t.PageVisitTimeManager=n;var i=function(){return function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t}}();t.PageVisitData=i}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function t(){this.hashCodeGeneragor=new e.HashCodeScoreGenerator}return t.prototype.isEnabled=function(e,t){return this.hashCodeGeneragor.getHashCodeScore(e)0){var n=t.getNumberOfLostItems()-t.itemsRestoredFromSessionBuffer;t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+n+'"',null),t.appInsights.flush();var i=t.getIssuesReported();++i,e.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,i.toString())}}catch(o){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.FailedToReportDataLoss,"Failed to report data loss: "+e.Util.getExceptionName(o),{exception:e.Util.dump(o)})}finally{try{t.reset()}catch(o){}}},t.enabled=!1,t.itemsRestoredFromSessionBuffer=0,t.LIMIT_PER_SESSION=10,t.ITEMS_QUEUED_KEY="AI_itemsQueued",t.ISSUES_REPORTED_KEY="AI_lossIssuesReported",t}();e.DataLossAnalyzer=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(t){t.queue=t.queue||[];var i=t.config||{};if(i&&!i.instrumentationKey)if((i=t).iKey)e.ApplicationInsights.Version="0.10.0.0",i.instrumentationKey=i.iKey;else{if(!i.applicationInsightsId)throw new Error("Cannot load Application Insights SDK, no instrumentationKey was provided.");e.ApplicationInsights.Version="0.7.2.0",i.instrumentationKey=i.applicationInsightsId}i=n.getDefaultConfig(i),this.snippet=t,this.config=i}return n.prototype.loadAppInsights=function(){var t=new e.ApplicationInsights.AppInsights(this.config);if(this.config.iKey){var n=t.trackPageView;t.trackPageView=function(e,i,o){n.apply(t,[null,e,i,o])}}"function"==typeof this.snippet.logPageView&&(t.logPageView=function(e,n,i){t.trackPageView(null,e,n,i)});return"function"==typeof this.snippet.logEvent&&(t.logEvent=function(e,n,i){t.trackEvent(e,n,i)}),t},n.prototype.emptyQueue=function(){try{if(e.ApplicationInsights.Util.isArray(this.snippet.queue)){for(var n=this.snippet.queue.length,i=0;i0?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=t.Util.stringToBoolOrDefault(e.enableDebug),e.disableExceptionTracking=t.Util.stringToBoolOrDefault(e.disableExceptionTracking),e.disableTelemetry=t.Util.stringToBoolOrDefault(e.disableTelemetry),e.verboseLogging=t.Util.stringToBoolOrDefault(e.verboseLogging),e.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.disableAjaxTracking=t.Util.stringToBoolOrDefault(e.disableAjaxTracking),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=t.Util.stringToBoolOrDefault(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=t.Util.stringToBoolOrDefault(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=t.Util.stringToBoolOrDefault(e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=t.Util.stringToBoolOrDefault(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=t.Util.stringToBoolOrDefault(e.isRetryDisabled),e.isCookieUseDisabled=t.Util.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=t.Util.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=t.Util.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=t.Util.stringToBoolOrDefault(e.enableCorsCorrelation),e},n}();t.Initialization=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){try{if("undefined"!=typeof window&&"undefined"!=typeof JSON){if(window.appInsights===undefined)e.ApplicationInsights.AppInsights.defaultConfig=e.ApplicationInsights.Initialization.getDefaultConfig();else{var n=window.appInsights||{},i=new e.ApplicationInsights.Initialization(n),o=i.loadAppInsights();for(var a in o)n[a]=o[a];i.emptyQueue(),i.pollInteralLogs(o),i.addHousekeepingBeforeUnload(o)}}}catch(r){e.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+r.message)}}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})); //# sourceMappingURL=ai.0.js.map