From 2d919f1c9a0dbd0e3b8c634dc5e3e9f7aa01beec Mon Sep 17 00:00:00 2001 From: Kamil Szostak Date: Wed, 6 Jul 2016 10:29:55 -0700 Subject: [PATCH 1/2] Update dist - 0.23.0 --- dist/ai.0.js | 2 +- dist/ai.js | 331 +++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 253 insertions(+), 80 deletions(-) diff --git a/dist/ai.0.js b/dist/ai.0.js index 980d63580..cf3c5c042 100644 --- a/dist/ai.0.js +++ b/dist/ai.0.js @@ -1 +1 @@ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},Microsoft,AI;(function(n){var t;(function(n){var r,t,i,u;(function(n){n[n.CRITICAL=0]="CRITICAL";n[n.WARNING=1]="WARNING"})(n.LoggingSeverity||(n.LoggingSeverity={}));r=n.LoggingSeverity,function(n){n[n.NONUSRACT_BrowserDoesNotSupportLocalStorage=0]="NONUSRACT_BrowserDoesNotSupportLocalStorage";n[n.NONUSRACT_BrowserCannotReadLocalStorage=1]="NONUSRACT_BrowserCannotReadLocalStorage";n[n.NONUSRACT_BrowserCannotReadSessionStorage=2]="NONUSRACT_BrowserCannotReadSessionStorage";n[n.NONUSRACT_BrowserCannotWriteLocalStorage=3]="NONUSRACT_BrowserCannotWriteLocalStorage";n[n.NONUSRACT_BrowserCannotWriteSessionStorage=4]="NONUSRACT_BrowserCannotWriteSessionStorage";n[n.NONUSRACT_BrowserFailedRemovalFromLocalStorage=5]="NONUSRACT_BrowserFailedRemovalFromLocalStorage";n[n.NONUSRACT_BrowserFailedRemovalFromSessionStorage=6]="NONUSRACT_BrowserFailedRemovalFromSessionStorage";n[n.NONUSRACT_CannotSendEmptyTelemetry=7]="NONUSRACT_CannotSendEmptyTelemetry";n[n.NONUSRACT_ClientPerformanceMathError=8]="NONUSRACT_ClientPerformanceMathError";n[n.NONUSRACT_ErrorParsingAISessionCookie=9]="NONUSRACT_ErrorParsingAISessionCookie";n[n.NONUSRACT_ErrorPVCalc=10]="NONUSRACT_ErrorPVCalc";n[n.NONUSRACT_ExceptionWhileLoggingError=11]="NONUSRACT_ExceptionWhileLoggingError";n[n.NONUSRACT_FailedAddingTelemetryToBuffer=12]="NONUSRACT_FailedAddingTelemetryToBuffer";n[n.NONUSRACT_FailedMonitorAjaxAbort=13]="NONUSRACT_FailedMonitorAjaxAbort";n[n.NONUSRACT_FailedMonitorAjaxDur=14]="NONUSRACT_FailedMonitorAjaxDur";n[n.NONUSRACT_FailedMonitorAjaxOpen=15]="NONUSRACT_FailedMonitorAjaxOpen";n[n.NONUSRACT_FailedMonitorAjaxRSC=16]="NONUSRACT_FailedMonitorAjaxRSC";n[n.NONUSRACT_FailedMonitorAjaxSend=17]="NONUSRACT_FailedMonitorAjaxSend";n[n.NONUSRACT_FailedToAddHandlerForOnBeforeUnload=18]="NONUSRACT_FailedToAddHandlerForOnBeforeUnload";n[n.NONUSRACT_FailedToSendQueuedTelemetry=19]="NONUSRACT_FailedToSendQueuedTelemetry";n[n.NONUSRACT_FailedToReportDataLoss=20]="NONUSRACT_FailedToReportDataLoss";n[n.NONUSRACT_FlushFailed=21]="NONUSRACT_FlushFailed";n[n.NONUSRACT_MessageLimitPerPVExceeded=22]="NONUSRACT_MessageLimitPerPVExceeded";n[n.NONUSRACT_MissingRequiredFieldSpecification=23]="NONUSRACT_MissingRequiredFieldSpecification";n[n.NONUSRACT_NavigationTimingNotSupported=24]="NONUSRACT_NavigationTimingNotSupported";n[n.NONUSRACT_OnError=25]="NONUSRACT_OnError";n[n.NONUSRACT_SessionRenewalDateIsZero=26]="NONUSRACT_SessionRenewalDateIsZero";n[n.NONUSRACT_SenderNotInitialized=27]="NONUSRACT_SenderNotInitialized";n[n.NONUSRACT_StartTrackEventFailed=28]="NONUSRACT_StartTrackEventFailed";n[n.NONUSRACT_StopTrackEventFailed=29]="NONUSRACT_StopTrackEventFailed";n[n.NONUSRACT_StartTrackFailed=30]="NONUSRACT_StartTrackFailed";n[n.NONUSRACT_StopTrackFailed=31]="NONUSRACT_StopTrackFailed";n[n.NONUSRACT_TelemetrySampledAndNotSent=32]="NONUSRACT_TelemetrySampledAndNotSent";n[n.NONUSRACT_TrackEventFailed=33]="NONUSRACT_TrackEventFailed";n[n.NONUSRACT_TrackExceptionFailed=34]="NONUSRACT_TrackExceptionFailed";n[n.NONUSRACT_TrackMetricFailed=35]="NONUSRACT_TrackMetricFailed";n[n.NONUSRACT_TrackPVFailed=36]="NONUSRACT_TrackPVFailed";n[n.NONUSRACT_TrackPVFailedCalc=37]="NONUSRACT_TrackPVFailedCalc";n[n.NONUSRACT_TrackTraceFailed=38]="NONUSRACT_TrackTraceFailed";n[n.NONUSRACT_TransmissionFailed=39]="NONUSRACT_TransmissionFailed";n[n.NONUSRACT_FailToSetStorageBuffer=40]="NONUSRACT_FailToSetStorageBuffer";n[n.NONUSRACT_FailToRestoreStorageBuffer=41]="NONUSRACT_FailToRestoreStorageBuffer";n[n.USRACT_CannotSerializeObject=42]="USRACT_CannotSerializeObject";n[n.USRACT_CannotSerializeObjectNonSerializable=43]="USRACT_CannotSerializeObjectNonSerializable";n[n.USRACT_CircularReferenceDetected=44]="USRACT_CircularReferenceDetected";n[n.USRACT_ClearAuthContextFailed=45]="USRACT_ClearAuthContextFailed";n[n.USRACT_ExceptionTruncated=46]="USRACT_ExceptionTruncated";n[n.USRACT_IllegalCharsInName=47]="USRACT_IllegalCharsInName";n[n.USRACT_ItemNotInArray=48]="USRACT_ItemNotInArray";n[n.USRACT_MaxAjaxPerPVExceeded=49]="USRACT_MaxAjaxPerPVExceeded";n[n.USRACT_MessageTruncated=50]="USRACT_MessageTruncated";n[n.USRACT_NameTooLong=51]="USRACT_NameTooLong";n[n.USRACT_SampleRateOutOfRange=52]="USRACT_SampleRateOutOfRange";n[n.USRACT_SetAuthContextFailed=53]="USRACT_SetAuthContextFailed";n[n.USRACT_SetAuthContextFailedAccountName=54]="USRACT_SetAuthContextFailedAccountName";n[n.USRACT_StringValueTooLong=55]="USRACT_StringValueTooLong";n[n.USRACT_StartCalledMoreThanOnce=56]="USRACT_StartCalledMoreThanOnce";n[n.USRACT_StopCalledWithoutStart=57]="USRACT_StopCalledWithoutStart";n[n.USRACT_TelemetryInitializerFailed=58]="USRACT_TelemetryInitializerFailed";n[n.USRACT_TrackArgumentsNotSpecified=59]="USRACT_TrackArgumentsNotSpecified";n[n.USRACT_UrlTooLong=60]="USRACT_UrlTooLong"}(n._InternalMessageId||(n._InternalMessageId={}));t=n._InternalMessageId;i=function(){function n(i,r,u){this.message=t[i].toString();this.messageId=i;var f=(r?" message:"+n.sanitizeDiagnosticText(r):"")+(u?" props:"+n.sanitizeDiagnosticText(JSON.stringify(u)):"");this.message+=f}return n.sanitizeDiagnosticText=function(n){return'"'+n.replace(/\"/g,"")+'"'},n}();n._InternalLogMessage=i;u=function(){function u(){}return u.throwInternalNonUserActionable=function(n,t){if(this.enableDebugExceptions())throw t;else typeof t=="undefined"||!t||typeof t.message!="undefined"&&(t.message=this.AiNonUserActionablePrefix+t.message,this.verboseLogging()&&this.warnToConsole(t.message),this.logInternalMessage(n,t))},u.throwInternalUserActionable=function(n,t){if(this.enableDebugExceptions())throw t;else typeof t=="undefined"||!t||typeof t.message!="undefined"&&(t.message=this.AiUserActionablePrefix+t.message,this.warnToConsole(t.message),this.logInternalMessage(n,t))},u.warnToConsole=function(n){typeof console=="undefined"||!console||(typeof console.warn=="function"?console.warn(n):typeof console.log=="function"&&console.log(n))},u.resetInternalMessageCount=function(){this._messageCount=0},u.clearInternalMessageLoggedTypes=function(){var i,t;if(n.Util.canUseSessionStorage())for(i=n.Util.getSessionStorageKeys(),t=0;t=this.MAX_INTERNAL_MESSAGE_LIMIT},u.AiUserActionablePrefix="AI: ",u.AIInternalMessagePrefix="AITR_",u.AiNonUserActionablePrefix="AI (Internal): ",u.enableDebugExceptions=function(){return!1},u.verboseLogging=function(){return!1},u.queue=[],u.MAX_INTERNAL_MESSAGE_LIMIT=25,u._messageCount=0,u}();n._InternalLogging=u})(t=n.ApplicationInsights||(n.ApplicationInsights={}))})(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t,i,r;(function(n){n[n.LocalStorage=0]="LocalStorage";n[n.SessionStorage=1]="SessionStorage"})(t||(t={}));i=function(){function i(){}return i._getLocalStorageObject=function(){return i._getVerifiedStorageObject(t.LocalStorage)},i._getVerifiedStorageObject=function(n){var i=null,u,r;try{r=new Date;i=n===t.LocalStorage?window.localStorage:window.sessionStorage;i.setItem(r,r);u=i.getItem(r)!=r;i.removeItem(r);u&&(i=null)}catch(f){i=null}return i},i.canUseLocalStorage=function(){return!!i._getLocalStorageObject()},i.getStorage=function(t){var r=i._getLocalStorageObject(),f;if(r!==null)try{return r.getItem(t)}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,f)}return null},i.setStorage=function(t,r){var u=i._getLocalStorageObject(),e;if(u!==null)try{return u.setItem(t,r),!0}catch(f){e=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+i.getExceptionName(f),{exception:i.dump(f)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,e)}return!1},i.removeStorage=function(t){var r=i._getLocalStorageObject(),f;if(r!==null)try{return r.removeItem(t),!0}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,f)}return!1},i._getSessionStorageObject=function(){return i._getVerifiedStorageObject(t.SessionStorage)},i.canUseSessionStorage=function(){return!!i._getSessionStorageObject()},i.getSessionStorageKeys=function(){var n=[],t;if(i.canUseSessionStorage())for(t in window.sessionStorage)n.push(t);return n},i.getSessionStorage=function(t){var r=i._getSessionStorageObject(),f;if(r!==null)try{return r.getItem(t)}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,f)}return null},i.setSessionStorage=function(t,r){var u=i._getSessionStorageObject(),e;if(u!==null)try{return u.setItem(t,r),!0}catch(f){e=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+i.getExceptionName(f),{exception:i.dump(f)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,e)}return!1},i.removeSessionStorage=function(t){var r=i._getSessionStorageObject(),f;if(r!==null)try{return r.removeItem(t),!0}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,f)}return!1},i.setCookie=function(n,t,r){var u="";r&&(u=";domain="+r);i.document.cookie=n+"="+t+u+";path=/"},i.stringToBoolOrDefault=function(n){return n?n.toString().toLowerCase()==="true":!1},i.getCookie=function(n){var e="",f,u,r,t;if(n&&n.length)for(f=n+"=",u=i.document.cookie.split(";"),r=0;r0;)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n%64),t+=i,n=Math.floor(n/64);return t},i.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"},i.isError=function(n){return Object.prototype.toString.call(n)==="[object Error]"},i.isDate=function(n){return Object.prototype.toString.call(n)==="[object Date]"},i.toISOStringForIE8=function(n){if(i.isDate(n)){function t(n){var t=String(n);return t.length===1&&(t="0"+t),t}return Date.prototype.toISOString?n.toISOString():n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},i.getIEVersion=function(n){n===void 0&&(n=null);var t=n?n.toLowerCase():navigator.userAgent.toLowerCase();return t.indexOf("msie")!=-1?parseInt(t.split("msie")[1]):null},i.msToTimeSpan=function(n){(isNaN(n)||n<0)&&(n=0);var t=""+n%1e3,i=""+Math.floor(n/1e3)%60,r=""+Math.floor(n/6e4)%60,u=""+Math.floor(n/36e5)%24;return t=t.length===1?"00"+t:t.length===2?"0"+t:t,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,u=u.length<2?"0"+u:u,u+":"+r+":"+i+"."+t},i.isCrossOriginError=function(n,t,i,r,u){return(n==="Script error."||n==="Script error")&&u===null},i.dump=function(n){var t=Object.prototype.toString.call(n),i=JSON.stringify(n);return t==="[object Error]"&&(i="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'"),t+i},i.getExceptionName=function(n){var t=Object.prototype.toString.call(n);return t==="[object Error]"?n.name:""},i.addEventHandler=function(n,t){if(!window||typeof n!="string"||typeof t!="function")return!1;var i="on"+n;if(window.addEventListener)window.addEventListener(n,t,!1);else if(window.attachEvent)window.attachEvent.call(i,t);else return!1;return!0},i.document=typeof document!="undefined"?document:{},i.NotSpecified="not_specified",i}();n.Util=i;r=function(){function n(){}return n.parseUrl=function(t){return n.htmlAnchorElement||(n.htmlAnchorElement=!n.document.createElement?{}:n.document.createElement("a")),n.htmlAnchorElement.href=t,n.htmlAnchorElement},n.getAbsoluteUrl=function(t){var i,r=n.parseUrl(t);return r&&(i=r.href),i},n.getPathName=function(t){var i,r=n.parseUrl(t);return r&&(i=r.pathname),i},n.document=typeof document!="undefined"?document:{},n}();n.UrlHelper=r})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.IsNullOrUndefined=function(n){return typeof n=="undefined"||n===null},n}(),i,r,u;n.extensions=t;i=function(){function n(){}return n.GetLength=function(n){var i=0,r;if(!t.IsNullOrUndefined(n)){r="";try{r=n.toString()}catch(u){}i=r.length;i=isNaN(i)?0:i}return i},n}();n.stringUtils=i;r=function(){function n(){}return n.Now=window.performance&&window.performance.now?function(){return performance.now()}:function(){return(new Date).getTime()},n.GetDuration=function(n,i){var r=null;return n===0||i===0||t.IsNullOrUndefined(n)||t.IsNullOrUndefined(i)||(r=i-n),r},n}();n.dateTime=r;u=function(){function n(){}return n.AttachEvent=function(n,i,r){var u=!1;return t.IsNullOrUndefined(n)||(t.IsNullOrUndefined(n.attachEvent)?t.IsNullOrUndefined(n.addEventListener)||(n.addEventListener(i,r,!1),u=!0):(n.attachEvent("on"+i,r),u=!0)),u},n.DetachEvent=function(n,i,r){t.IsNullOrUndefined(n)||(t.IsNullOrUndefined(n.detachEvent)?t.IsNullOrUndefined(n.removeEventListener)||n.removeEventListener(i,r,!1):n.detachEvent("on"+i,r))},n}();n.EventHelper=u})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function n(){this.openDone=!1;this.setRequestHeaderDone=!1;this.sendDone=!1;this.abortDone=!1;this.onreadystatechangeCallbackAttached=!1}return n}(),i;n.XHRMonitoringState=t;i=function(){function i(i){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=n.dateTime.GetDuration(t.requestSentTime,t.responseFinishedTime)};this.id=i}return i.prototype.getAbsoluteUrl=function(){return this.requestUrl?n.UrlHelper.getAbsoluteUrl(this.requestUrl):null},i.prototype.getPathName=function(){return this.requestUrl?n.UrlHelper.getPathName(this.requestUrl):null},i}();n.ajaxRecord=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){"use strict";var i=function(){function i(n){this.currentWindowHost=window.location.host;this.appInsights=n;this.initialized=!1;this.Init()}return i.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},i.prototype.isMonitoredInstance=function(n,r){return this.initialized&&(r===!0||!t.extensions.IsNullOrUndefined(n.ajaxData))&&n[i.DisabledPropertyName]!==!0},i.prototype.supportsMonitoring=function(){var n=!1;return t.extensions.IsNullOrUndefined(XMLHttpRequest)||(n=!0),n},i.prototype.instrumentOpen=function(){var u=XMLHttpRequest.prototype.open,r=this;XMLHttpRequest.prototype.open=function(f,e,o){try{!r.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||r.openHandler(this,f,e,o)}catch(s){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(s)}))}return u.apply(this,arguments)}},i.prototype.openHandler=function(n,i,r){var u=new t.ajaxRecord(t.Util.newId());u.method=i;u.requestUrl=r;u.xhrMonitoringState.openDone=!0;n.ajaxData=u;this.attachToOnReadyStateChange(n)},i.getFailedAjaxDiagnosticsMessage=function(n){var i="";try{t.extensions.IsNullOrUndefined(n)||t.extensions.IsNullOrUndefined(n.ajaxData)||t.extensions.IsNullOrUndefined(n.ajaxData.requestUrl)||(i+="(url: '"+n.ajaxData.requestUrl+"')")}catch(r){}return i},i.prototype.instrumentSend=function(){var u=XMLHttpRequest.prototype.send,r=this;XMLHttpRequest.prototype.send=function(f){try{r.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&r.sendHandler(this,f)}catch(e){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(e)}))}return u.apply(this,arguments)}},i.prototype.sendHandler=function(n){n.ajaxData.requestSentTime=t.dateTime.Now();this.appInsights.config.disableCorrelationHeaders||t.UrlHelper.parseUrl(n.ajaxData.getAbsoluteUrl()).host!=this.currentWindowHost||n.setRequestHeader("x-ms-request-id",n.ajaxData.id);n.ajaxData.xhrMonitoringState.sendDone=!0},i.prototype.instrumentAbort=function(){var r=XMLHttpRequest.prototype.abort,u=this;XMLHttpRequest.prototype.abort=function(){try{u.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(f){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(f)}))}return r.apply(this,arguments)}},i.prototype.attachToOnReadyStateChange=function(r){var u=this;r.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=t.EventHelper.AttachEvent(r,"readystatechange",function(){try{if(u.isMonitoredInstance(r)&&r.readyState===4)u.onAjaxComplete(r)}catch(f){var e=n.ApplicationInsights.Util.dump(f);e&&e.toLowerCase().indexOf("c00c023f")!=-1||t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(r),exception:n.ApplicationInsights.Util.dump(f)}))}})},i.prototype.onAjaxComplete=function(n){n.ajaxData.responseFinishedTime=t.dateTime.Now();n.ajaxData.status=n.status;n.ajaxData.CalculateMetrics();n.ajaxData.ajaxTotalDuration<0?t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.WARNING,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(n),requestSentTime:n.ajaxData.requestSentTime,responseFinishedTime:n.ajaxData.responseFinishedTime})):(this.appInsights.trackAjax(n.ajaxData.id,n.ajaxData.getAbsoluteUrl(),n.ajaxData.getPathName(),n.ajaxData.ajaxTotalDuration,+n.ajaxData.status>=200&&+n.ajaxData.status<400,+n.ajaxData.status,n.ajaxData.method),n.ajaxData=null)},i.instrumentedByAppInsightsName="InstrumentedByAppInsights",i.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",i}();t.AjaxMonitor=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.getHashCodeScore=function(t){var i=this.getHashCode(t)/n.INT_MAX_VALUE;return i*100},n.prototype.getHashCode=function(t){var i,r;if(t=="")return 0;while(t.length100||t<0)&&(n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_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})),this.sampleRate=100);this.sampleRate=t;this.samplingScoreGenerator=new n.SamplingScoreGenerator}return t.prototype.isSampledIn=function(n){if(this.sampleRate==100)return!0;var t=this.samplingScoreGenerator.getSamplingScore(n);return tthis.config.sessionExpirationMs(),i=n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||i?(this.automaticSession.isFirst=undefined,this.renew()):(this.automaticSession.renewalDate=+new Date,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=n.Util.getCookie("ai_session"),i;t&&typeof t.split=="function"?this.initializeAutomaticSessionWithData(t):(i=n.Util.getStorage("ai_session"),i&&this.initializeAutomaticSessionWithData(i));this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},t.prototype.initializeAutomaticSessionWithData=function(t){var i=t.split("|"),r,u;i.length>0&&(this.automaticSession.id=i[0]);try{i.length>1&&(r=+i[1],this.automaticSession.acquisitionDate=+new Date(r),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0);i.length>2&&(u=+i[2],this.automaticSession.renewalDate=+new Date(u),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(f){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+n.Util.getExceptionName(f),{exception:n.Util.dump(f)}))}this.automaticSession.renewalDate==0&&n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset."))},t.prototype.renew=function(){var t=+new Date;this.automaticSession.id=n.Util.newId();this.automaticSession.acquisitionDate=t;this.automaticSession.renewalDate=t;this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate);n.Util.canUseLocalStorage()||n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate."))},t.prototype.setCookie=function(t,i,r){var f=i+this.config.sessionExpirationMs(),e=r+this.config.sessionRenewalMs(),u=new Date,s=[t,i,r],o;f0&&(this.id=e[0]));this.config=i;this.id||(this.id=n.Util.newId(),u=new Date,o=n.Util.toISOStringForIE8(u),this.accountAcquisitionDate=o,u.setTime(u.getTime()+31536e6),h=[this.id,o],c=this.config.cookieDomain?this.config.cookieDomain():undefined,n.Util.setCookie(t.userCookieName,h.join(t.cookieSeparator)+";expires="+u.toUTCString(),c),n.Util.removeStorage("ai_session"));this.accountId=i.accountId?i.accountId():undefined;f=n.Util.getCookie(t.authUserCookieName);f&&(f=decodeURI(f),r=f.split(t.cookieSeparator),r[0]&&(this.authenticatedId=r[0]),r.length>1&&r[1]&&(this.accountId=r[1]))}return t.prototype.setAuthenticatedUserContext=function(i,r){var f=!this.validateUserInput(i)||r&&!this.validateUserInput(r),u;if(f){n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_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."));return}this.authenticatedId=i;u=this.authenticatedId;r&&(this.accountId=r,u=[this.authenticatedId,this.accountId].join(t.cookieSeparator));n.Util.setCookie(t.authUserCookieName,encodeURI(u),this.config.cookieDomain())},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null;this.accountId=null;n.Util.deleteCookie(t.authUserCookieName)},t.prototype.validateUserInput=function(n){return typeof n!="string"||!n||n.match(/,|;|=| |\|/)?!1:!0},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}();t.User=i})(t=n.Context||(n.Context={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.reset=function(){t.isEnabled()&&(n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,"0"),t.itemsRestoredFromSessionBuffer=0)},t.isEnabled=function(){return t.enabled&&t.appInsights!=null&&t.appInsights.context._sender._XMLHttpRequestSupported&&n.Util.canUseSessionStorage()},t.getIssuesReported=function(){return!t.isEnabled()||isNaN(+n.Util.getSessionStorage(t.ISSUES_REPORTED_KEY))?0:+n.Util.getSessionStorage(t.ISSUES_REPORTED_KEY)},t.incrementItemsQueued=function(){try{if(t.isEnabled()){var i=t.getNumberOfLostItems();++i;n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,i.toString())}}catch(r){}},t.decrementItemsQueued=function(i){try{if(t.isEnabled()){var r=t.getNumberOfLostItems();r-=i;r<0&&(r=0);n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,r.toString())}}catch(u){}},t.getNumberOfLostItems=function(){var i=0;try{t.isEnabled()&&(i=isNaN(+n.Util.getSessionStorage(t.ITEMS_QUEUED_KEY))?0:+n.Util.getSessionStorage(t.ITEMS_QUEUED_KEY))}catch(r){i=0}return i},t.reportLostItems=function(){var r,i;try{t.isEnabled()&&t.getIssuesReported()0&&(r=t.getNumberOfLostItems()-t.itemsRestoredFromSessionBuffer,t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+r+'"',null),t.appInsights.flush(),i=t.getIssuesReported(),++i,n.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,i.toString()))}catch(u){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailedToReportDataLoss,"Failed to report data loss: "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}finally{try{t.reset()}catch(u){}}},t.enabled=!1,t.itemsRestoredFromSessionBuffer=0,t.LIMIT_PER_SESSION=10,t.ITEMS_QUEUED_KEY="AI_itemsQueued",t.ISSUES_REPORTED_KEY="AI_lossIssuesReported",t}();n.DataLossAnalyzer=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var i=function(){function n(n){this._config=n;this._buffer=[]}return n.prototype.enqueue=function(n){this._buffer.push(n)},n.prototype.count=function(){return this._buffer.length},n.prototype.clear=function(){this._buffer.length=0},n.prototype.getItems=function(){return this._buffer.slice(0)},n.prototype.batchPayloads=function(n){return n&&n.length>0?this._config.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null},n.prototype.markAsSent=function(){this.clear()},n.prototype.clearSent=function(){this.clear()},n}(),t;n.ArraySendBuffer=i;t=function(){function t(i){this._config=i;var r=this.getBuffer(t.BUFFER_KEY),u=this.getBuffer(t.SENT_BUFFER_KEY);this._buffer=r.concat(u);n.DataLossAnalyzer.itemsRestoredFromSessionBuffer=this._buffer.length;this.setBuffer(t.BUFFER_KEY,this._buffer);this.setBuffer(t.SENT_BUFFER_KEY,[])}return t.prototype.enqueue=function(n){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,[])},t.prototype.getItems=function(){return this._buffer.slice(0)},t.prototype.batchPayloads=function(n){return n&&n.length>0?this._config.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null},t.prototype.markAsSent=function(n){var i=this.getBuffer(t.SENT_BUFFER_KEY);i=i.concat(n);this._buffer=this.removePayloadsFromBuffer(n,this._buffer);this.setBuffer(t.BUFFER_KEY,this._buffer);this.setBuffer(t.SENT_BUFFER_KEY,i)},t.prototype.clearSent=function(n){var i=this.getBuffer(t.SENT_BUFFER_KEY);i=this.removePayloadsFromBuffer(n,i);this.setBuffer(t.SENT_BUFFER_KEY,i)},t.prototype.removePayloadsFromBuffer=function(n,t){var u=[],i,r,f;for(i in t){r=!1;for(f in n)if(n[f]===t[i]){r=!0;break}r||u.push(t[i])}return u},t.prototype.getBuffer=function(t){var i,r;try{if(i=n.Util.getSessionStorage(t),i&&(r=JSON.parse(i),r))return r}catch(u){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailToRestoreStorageBuffer," storage key: "+t+", "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}return[]},t.prototype.setBuffer=function(t,i){try{var u=JSON.stringify(i);n.Util.setSessionStorage(t,u)}catch(r){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailToSetStorageBuffer," storage key: "+t+", "+n.Util.getExceptionName(r),{exception:n.Util.dump(r)}))}},t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t}();n.SessionStorageSendBuffer=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){if(this._XMLHttpRequestSupported=!1,this._lastSend=0,this._config=t,this._sender=null,this._buffer=n.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new n.SessionStorageSendBuffer(t):new n.ArraySendBuffer(t),typeof XMLHttpRequest!="undefined"){var i=new XMLHttpRequest;"withCredentials"in i?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):typeof XDomainRequest!="undefined"&&(this._sender=this._xdrSender)}}return t.prototype.send=function(t){var i=this;try{if(this._config.disableTelemetry())return;if(!t){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_CannotSendEmptyTelemetry,"Cannot send empty telemetry"));return}if(!this._sender){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_SenderNotInitialized,"Sender was not initialized"));return}var r=n.Serializer.serialize(t),e=this._buffer.getItems(),u=this._buffer.batchPayloads(e);u&&u.length+r.length>this._config.maxBatchSizeInBytes()&&this.triggerSend();this._buffer.enqueue(r);this._timeoutHandle||(this._timeoutHandle=setTimeout(function(){i._timeoutHandle=null;i.triggerSend()},this._config.maxBatchInterval()));n.DataLossAnalyzer.incrementItemsQueued()}catch(f){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+n.Util.getExceptionName(f),{exception:n.Util.dump(f)}))}},t.prototype._getSizeInBytes=function(n){var r=0,t,i;if(n&&n.length)for(t=0;t0&&(r=this._buffer.getItems(),this._sender(r,i)),this._lastSend=+new Date);clearTimeout(this._timeoutHandle);this._timeoutHandle=null}catch(u){(!n.Util.getIEVersion()||n.Util.getIEVersion()>9)&&n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}},t.prototype._xhrSender=function(t,i){var u=this,r=new XMLHttpRequest,f;r[n.AjaxMonitor.DisabledPropertyName]=!0;r.open("POST",this._config.endpointUrl(),i);r.setRequestHeader("Content-type","application/json");r.onreadystatechange=function(){return u._xhrReadyStateChange(r,t,t.length)};r.onerror=function(n){return u._onError(t,r.responseText||r.response||"",n)};f=this._buffer.batchPayloads(t);r.send(f);this._buffer.markAsSent(t)},t.prototype._xdrSender=function(n){var i=this,t=new XDomainRequest,r;t.onload=function(){return i._xdrOnLoad(t,n)};t.onerror=function(r){return i._onError(n,t.responseText||"",r)};t.open("POST",this._config.endpointUrl());r=this._buffer.batchPayloads(n);t.send(r);this._buffer.markAsSent(n)},t.prototype._xhrReadyStateChange=function(n,t,i){n.readyState===4&&((n.status<200||n.status>=300)&&n.status!==0?this._onError(t,n.responseText||n.response||""):this._onSuccess(t,i))},t.prototype._xdrOnLoad=function(n,t){n&&(n.responseText+""=="200"||n.responseText==="")?this._onSuccess(t,0):this._onError(t,n&&n.responseText||"")},t.prototype._onError=function(t,i){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_OnError,"Failed to send telemetry.",{message:i}));this._buffer.clearSent(t)},t.prototype._onSuccess=function(t,i){n.DataLossAnalyzer.decrementItemsQueued(i);this._buffer.clearSent(t)},t}();n.Sender=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(){this.hashCodeGeneragor=new n.HashCodeScoreGenerator}return t.prototype.isEnabled=function(n,t){return this.hashCodeGeneragor.getHashCodeScore(n)=0&&(i=i.replace(/[^0-9a-zA-Z-._()\/ ]/g,"_"),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_IllegalCharsInName,"name contains illegal characters. Illegal characters have been replaced with '_'.",{newName:i}))),i.length>t.MAX_NAME_LENGTH&&(i=i.substring(0,t.MAX_NAME_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_NameTooLong,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:i})))),i},t.sanitizeString=function(i){return i&&(i=n.Util.trim(i),i.toString().length>t.MAX_STRING_LENGTH&&(i=i.toString().substring(0,t.MAX_STRING_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_StringValueTooLong,"string value is too long. It has been truncated to "+t.MAX_STRING_LENGTH+" characters.",{value:i})))),i},t.sanitizeUrl=function(i){return i&&(i=n.Util.trim(i),i.length>t.MAX_URL_LENGTH&&(i=i.substring(0,t.MAX_URL_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_UrlTooLong,"url is too long, it has been trucated to "+t.MAX_URL_LENGTH+" characters.",{url:i})))),i},t.sanitizeMessage=function(i){return i&&i.length>t.MAX_MESSAGE_LENGTH&&(i=i.substring(0,t.MAX_MESSAGE_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_MessageTruncated,"message is too long, it has been trucated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:i}))),i},t.sanitizeException=function(i){return i&&i.length>t.MAX_EXCEPTION_LENGTH&&(i=i.substring(0,t.MAX_EXCEPTION_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_ExceptionTruncated,"exception is too long, it has been trucated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:i}))),i},t.sanitizeProperties=function(n){var r,i,u;if(n){r={};for(i in n)u=t.sanitizeString(n[i]),i=t.sanitizeKeyAndAddUniqueness(i,r),r[i]=u;n=r}return n},t.sanitizeMeasurements=function(n){var r,i,u;if(n){r={};for(i in n)u=n[i],i=t.sanitizeKeyAndAddUniqueness(i,r),r[i]=u;n=r}return n},t.padNumber=function(n){var t="00"+n;return t.substr(t.length-3)},t.MAX_NAME_LENGTH=150,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}();t.DataSanitizer=i})(i=t.Common||(t.Common={}))})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u){i.call(this);this.aiDataContract={ver:n.FieldType.Required,message:n.FieldType.Required,severityLevel:n.FieldType.Default,measurements:n.FieldType.Default,properties:n.FieldType.Default};r=r||n.Util.NotSpecified;this.message=t.Common.DataSanitizer.sanitizeMessage(r);this.properties=t.Common.DataSanitizer.sanitizeProperties(u)}return __extends(r,i),r.envelopeType="Microsoft.ApplicationInsights.{0}.Message",r.dataType="MessageData",r}(AI.MessageData);t.Trace=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.EventData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(t){function i(i,r,u){t.call(this);this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Required,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.name=n.Telemetry.Common.DataSanitizer.sanitizeString(i)||n.Util.NotSpecified;this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(r);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(u)}return __extends(i,t),i.envelopeType="Microsoft.ApplicationInsights.{0}.Event",i.dataType="EventData",i}(AI.EventData);t.Event=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(){function n(){this.hasFullStack=!0;this.parsedStack=[]}return n}();n.ExceptionDetails=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.exceptions=[];this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.ExceptionData=t}(AI||(AI={})),function(n){"use strict";var t=function(){function n(){}return n}();n.StackFrame=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var u=function(t){function i(i,u,f,e,o){t.call(this);this.aiDataContract={ver:n.FieldType.Required,handledAt:n.FieldType.Required,exceptions:n.FieldType.Required,severityLevel:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(f);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(e);this.handledAt=u||"unhandled";this.exceptions=[new r(i)];o&&(this.severityLevel=o)}return __extends(i,t),i.CreateSimpleException=function(n,t,i,r,u,f,e){return{handledAt:e||"unhandled",exceptions:[{hasFullStack:!0,message:n,stack:u,typeName:t,parsedStack:[{level:0,assembly:i,fileName:r,line:f,method:"unknown"}]}]}},i.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",i.dataType="ExceptionData",i}(AI.ExceptionData),r,i;t.Exception=u;r=function(r){function u(i){r.call(this);this.aiDataContract={id:n.FieldType.Default,outerId:n.FieldType.Default,typeName:n.FieldType.Required,message:n.FieldType.Required,hasFullStack:n.FieldType.Default,stack:n.FieldType.Default,parsedStack:n.FieldType.Array};this.typeName=t.Common.DataSanitizer.sanitizeString(i.name)||n.Util.NotSpecified;this.message=t.Common.DataSanitizer.sanitizeMessage(i.message)||n.Util.NotSpecified;var u=i.stack;this.parsedStack=this.parseStack(u);this.stack=t.Common.DataSanitizer.sanitizeException(u);this.hasFullStack=n.Util.isArray(this.parsedStack)&&this.parsedStack.length>0}return __extends(u,r),u.prototype.parseStack=function(n){var t=undefined,e,l,o,r,a,s,h,p,w,b;if(typeof n=="string"){for(e=n.split("\n"),t=[],l=0,o=0,r=0;r<=e.length;r++)a=e[r],i.regex.test(a)&&(s=new i(e[r],l++),o+=s.sizeInBytes,t.push(s));if(h=32768,o>h)for(var u=0,f=t.length-1,v=0,c=u,y=f;uh){b=y-c+1;t.splice(c,b);break}c=u;y=f;u++;f--}}return t},u}(AI.ExceptionDetails);i=function(t){function i(r,u){t.call(this);this.sizeInBytes=0;this.aiDataContract={level:n.FieldType.Required,method:n.FieldType.Required,assembly:n.FieldType.Default,fileName:n.FieldType.Default,line:n.FieldType.Default};this.level=u;this.method="";this.assembly=n.Util.trim(r);var f=r.match(i.regex);f&&f.length>=5&&(this.method=n.Util.trim(f[2])||this.method,this.fileName=n.Util.trim(f[4]),this.line=parseInt(f[5])||0);this.sizeInBytes+=this.method.length;this.sizeInBytes+=this.fileName.length;this.sizeInBytes+=this.assembly.length;this.sizeInBytes+=i.baseSize;this.sizeInBytes+=this.level.toString().length;this.sizeInBytes+=this.line.toString().length}return __extends(i,t),i.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,i.baseSize=58,i}(AI.StackFrame);t._StackFrame=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.metrics=[];this.properties={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.MetricData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Measurement=0]="Measurement";n[n.Aggregation=1]="Aggregation"})(n.DataPointType||(n.DataPointType={}));var t=n.DataPointType}(AI||(AI={})),function(n){"use strict";var t=function(){function t(){this.kind=n.DataPointType.Measurement}return t}();n.DataPoint=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(t){function i(){t.apply(this,arguments);this.aiDataContract={name:n.FieldType.Required,kind:n.FieldType.Default,value:n.FieldType.Required,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default}}return __extends(i,t),i}(AI.DataPoint);t.DataPoint=i})(i=t.Common||(t.Common={}))})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(r){function u(u,f,e,o,s,h){r.call(this);this.aiDataContract={ver:t.FieldType.Required,metrics:t.FieldType.Required,properties:t.FieldType.Default};var c=new n.ApplicationInsights.Telemetry.Common.DataPoint;c.count=e>0?e:undefined;c.max=isNaN(s)||s===null?undefined:s;c.min=isNaN(o)||o===null?undefined:o;c.name=i.Common.DataSanitizer.sanitizeString(u)||t.Util.NotSpecified;c.value=f;this.metrics=[c];this.properties=t.Telemetry.Common.DataSanitizer.sanitizeProperties(h)}return __extends(u,r),u.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",u.dataType="MetricData",u}(AI.MetricData);i.Metric=r})(i=t.Telemetry||(t.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.EventData);n.PageViewData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u,f,e,o){i.call(this);this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.url=t.Common.DataSanitizer.sanitizeUrl(u);this.name=t.Common.DataSanitizer.sanitizeString(r)||n.Util.NotSpecified;isNaN(f)||(this.duration=n.Util.msToTimeSpan(f));this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(e);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o)}return __extends(r,i),r.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",r.dataType="PageviewData",r}(AI.PageViewData);t.PageView=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.PageViewPerfData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(u,f,e,o,s){var h;if(i.call(this),this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,perfTotal:n.FieldType.Default,networkConnect:n.FieldType.Default,sentRequest:n.FieldType.Default,receivedResponse:n.FieldType.Default,domProcessing:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default},this.isValid=!1,h=r.getPerformanceTiming(),h){var c=r.getDuration(h.navigationStart,h.loadEventEnd),l=r.getDuration(h.navigationStart,h.connectEnd),a=r.getDuration(h.requestStart,h.responseStart),v=r.getDuration(h.responseStart,h.responseEnd),y=r.getDuration(h.responseEnd,h.loadEventEnd);c==0?n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_ErrorPVCalc,"error calculating page view performance.",{total:c,network:l,request:a,response:v,dom:y})):c0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},r.getDuration=function(n,t){var i=0;return isNaN(n)||isNaN(t)||(i=Math.max(t-n,0)),i},r.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",r.dataType="PageviewPerformanceData",r}(AI.PageViewPerfData);t.PageViewPerformance=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){this._config=t;this._sender=new n.Sender(t);typeof window!="undefined"&&(this._sessionManager=new n.Context._SessionManager(t),this.application=new n.Context.Application,this.device=new n.Context.Device,this.internal=new n.Context.Internal,this.location=new n.Context.Location,this.user=new n.Context.User(t),this.operation=new n.Context.Operation,this.session=new n.Context.Session,this.sample=new n.Context.Sample(t.sampleRate()))}return t.prototype.addTelemetryInitializer=function(n){this.telemetryInitializers=this.telemetryInitializers||[];this.telemetryInitializers.push(n)},t.prototype.track=function(t){return t?(t.name===n.Telemetry.PageView.envelopeType&&n._InternalLogging.resetInternalMessageCount(),this.session&&typeof this.session.id!="string"&&this._sessionManager.update(),this._track(t)):n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.USRACT_TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument")),t},t.prototype._track=function(t){var i,f,r,u,o;this.session&&(typeof this.session.id=="string"?this._applySessionContext(t,this.session):this._applySessionContext(t,this._sessionManager.automaticSession));this._applyApplicationContext(t,this.application);this._applyDeviceContext(t,this.device);this._applyInternalContext(t,this.internal);this._applyLocationContext(t,this.location);this._applySampleContext(t,this.sample);this._applyUserContext(t,this.user);this._applyOperationContext(t,this.operation);t.iKey=this._config.instrumentationKey();i=!1;try{for(this.telemetryInitializers=this.telemetryInitializers||[],f=this.telemetryInitializers.length,r=0;rl&&(clearInterval(a),s||(o.appInsights.sendPageViewInternal(i,r,l,u,f),o.appInsights.flush()))}catch(v){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_TrackPVFailedCalc,"trackPageView failed on page load calculation: "+n.Util.getExceptionName(v),{exception:n.Util.dump(v)}))}},100)},i}();t.PageViewManager=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";var r=function(){function t(n){this.prevPageVisitDataKeyName="prevPageVisitData";this.pageVisitTimeTrackingHandler=n}return t.prototype.trackPreviousPageVisit=function(t,i){try{var r=this.restartPageVisitTimer(t,i);r&&this.pageVisitTimeTrackingHandler(r.pageName,r.pageUrl,r.pageVisitTime)}catch(u){n._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+n.Util.dump(u))}},t.prototype.restartPageVisitTimer=function(t,i){try{var r=this.stopPageVisitTimer();return this.startPageVisitTimer(t,i),r}catch(u){return n._InternalLogging.warnToConsole("Call to restart failed: "+n.Util.dump(u)),null}},t.prototype.startPageVisitTimer=function(t,r){try{if(n.Util.canUseSessionStorage()){if(n.Util.getSessionStorage(this.prevPageVisitDataKeyName)!=null)throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var u=new i(t,r),f=JSON.stringify(u);n.Util.setSessionStorage(this.prevPageVisitDataKeyName,f)}}catch(e){n._InternalLogging.warnToConsole("Call to start failed: "+n.Util.dump(e))}},t.prototype.stopPageVisitTimer=function(){var r,i,t;try{return n.Util.canUseSessionStorage()?(r=Date.now(),i=n.Util.getSessionStorage(this.prevPageVisitDataKeyName),i?(t=JSON.parse(i),t.pageVisitTime=r-t.pageVisitStartTime,n.Util.removeSessionStorage(this.prevPageVisitDataKeyName),t):null):null}catch(u){return n._InternalLogging.warnToConsole("Stop page visit timer failed: "+n.Util.dump(u)),null}},t}(),i;t.PageVisitTimeManager=r;i=function(){function n(n,t){this.pageVisitStartTime=Date.now();this.pageName=n;this.pageUrl=t}return n}();t.PageVisitData=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";(function(n){n[n.SQL=0]="SQL";n[n.Http=1]="Http";n[n.Other=2]="Other"})(n.DependencyKind||(n.DependencyKind={}));var t=n.DependencyKind}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Undefined=0]="Undefined";n[n.Aic=1]="Aic";n[n.Apmc=2]="Apmc"})(n.DependencySourceType||(n.DependencySourceType={}));var t=n.DependencySourceType}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.kind=n.DataPointType.Aggregation;this.dependencyKind=n.DependencyKind.Other;this.success=!0;this.dependencySource=n.DependencySourceType.Apmc;this.properties={};t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.RemoteDependencyData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u,f,e,o,s,h){i.call(this);this.aiDataContract={id:n.FieldType.Required,ver:n.FieldType.Required,name:n.FieldType.Default,kind:n.FieldType.Required,value:n.FieldType.Default,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default,dependencyKind:n.FieldType.Default,success:n.FieldType.Default,async:n.FieldType.Default,dependencySource:n.FieldType.Default,commandName:n.FieldType.Default,dependencyTypeName:n.FieldType.Default,properties:n.FieldType.Default,resultCode:n.FieldType.Default};this.id=r;this.name=this.formatDependencyName(h,u);this.commandName=t.Common.DataSanitizer.sanitizeUrl(f);this.value=e;this.success=o;this.resultCode=s+"";this.dependencyKind=AI.DependencyKind.Http;this.dependencyTypeName="Ajax"}return __extends(r,i),r.prototype.formatDependencyName=function(n,t){return n?n.toUpperCase()+" "+t:t},r.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",r.dataType="RemoteDependencyData",r}(AI.RemoteDependencyData);t.RemoteDependencyData=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){"use strict";var r,i;t.Version="0.22.19";r=function(){function r(u){var f=this,e,o,h,s;if(this._trackAjaxAttempts=0,this.config=u||{},e=r.defaultConfig,e!==undefined)for(o in e)this.config[o]===undefined&&(this.config[o]=e[o]);t._InternalLogging.verboseLogging=function(){return f.config.verboseLogging};t._InternalLogging.enableDebugExceptions=function(){return f.config.enableDebug};h={instrumentationKey:function(){return f.config.instrumentationKey},accountId:function(){return f.config.accountId},sessionRenewalMs:function(){return f.config.sessionRenewalMs},sessionExpirationMs:function(){return f.config.sessionExpirationMs},endpointUrl:function(){return f.config.endpointUrl},emitLineDelimitedJson:function(){return f.config.emitLineDelimitedJson},maxBatchSizeInBytes:function(){return f.config.maxBatchSizeInBytes},maxBatchInterval:function(){return f.config.maxBatchInterval},disableTelemetry:function(){return f.config.disableTelemetry},sampleRate:function(){return f.config.samplingPercentage},cookieDomain:function(){return f.config.cookieDomain},enableSessionStorageBuffer:function(){return f.config.enableSessionStorageBuffer}};s=(new t.SplitTest).isEnabled(this.config.instrumentationKey,5);this.config.enableSessionStorageBuffer=s;this.context=new t.TelemetryContext(h);t.DataLossAnalyzer.appInsights=this;t.DataLossAnalyzer.enabled=s;t.DataLossAnalyzer.reportLostItems();this._pageViewManager=new n.ApplicationInsights.Telemetry.PageViewManager(this,this.config.overridePageViewDuration);this._eventTracking=new i("trackEvent");this._eventTracking.action=function(n,i,r,u,e){e?isNaN(e.duration)&&(e.duration=r):e={duration:r};var o=new t.Telemetry.Event(n,u,e),s=new t.Telemetry.Common.Data(t.Telemetry.Event.dataType,o),h=new t.Telemetry.Common.Envelope(s,t.Telemetry.Event.envelopeType);f.context.track(h)};this._pageTracking=new i("trackPageView");this._pageTracking.action=function(n,t,i,r,u){f.sendPageViewInternal(n,t,i,r,u)};this._pageVisitTimeManager=new t.Telemetry.PageVisitTimeManager(function(n,t,i){return f.trackPageVisitTime(n,t,i)});this.config.disableAjaxTracking||new n.ApplicationInsights.AjaxMonitor(this)}return r.prototype.sendPageViewInternal=function(n,i,r,u,f){var e=new t.Telemetry.PageView(n,i,r,u,f),o=new t.Telemetry.Common.Data(t.Telemetry.PageView.dataType,e),s=new t.Telemetry.Common.Envelope(o,t.Telemetry.PageView.envelopeType);this.context.track(s);this._trackAjaxAttempts=0},r.prototype.sendPageViewPerformanceInternal=function(n){var i=new t.Telemetry.Common.Data(t.Telemetry.PageViewPerformance.dataType,n),r=new t.Telemetry.Common.Envelope(i,t.Telemetry.PageViewPerformance.envelopeType);this.context.track(r)},r.prototype.startTrackPage=function(n){try{typeof n!="string"&&(n=window.document&&window.document.title||"");this._pageTracking.start(n)}catch(i){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StartTrackFailed,"startTrackPage failed, page view may not be collected: "+t.Util.getExceptionName(i),{exception:t.Util.dump(i)}))}},r.prototype.stopTrackPage=function(n,i,r,u){try{typeof n!="string"&&(n=window.document&&window.document.title||"");typeof i!="string"&&(i=window.location&&window.location.href||"");this._pageTracking.stop(n,i,r,u);this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n,i)}catch(f){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+t.Util.getExceptionName(f),{exception:t.Util.dump(f)}))}},r.prototype.trackPageView=function(n,i,r,u,f){try{this._pageViewManager.trackPageView(n,i,r,u,f);this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n,i)}catch(e){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_TrackPVFailed,"trackPageView failed, page view will not be collected: "+t.Util.getExceptionName(e),{exception:t.Util.dump(e)}))}},r.prototype.startTrackEvent=function(n){try{this._eventTracking.start(n)}catch(i){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+t.Util.getExceptionName(i),{exception:t.Util.dump(i)}))}},r.prototype.stopTrackEvent=function(n,i,r){try{this._eventTracking.stop(n,undefined,i,r)}catch(u){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+t.Util.getExceptionName(u),{exception:t.Util.dump(u)}))}},r.prototype.trackEvent=function(n,i,r){try{var f=new t.Telemetry.Event(n,i,r),e=new t.Telemetry.Common.Data(t.Telemetry.Event.dataType,f),o=new t.Telemetry.Common.Envelope(e,t.Telemetry.Event.envelopeType);this.context.track(o)}catch(u){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_TrackEventFailed,"trackEvent failed, event will not be collected: "+t.Util.getExceptionName(u),{exception:t.Util.dump(u)}))}},r.prototype.trackAjax=function(n,i,r,u,f,e,o){if(this.config.maxAjaxCallsPerView===-1||this._trackAjaxAttempts0?n.maxBatchSizeInBytes:1e6,n.maxBatchInterval=isNaN(n.maxBatchInterval)?15e3:n.maxBatchInterval,n.enableDebug=t.Util.stringToBoolOrDefault(n.enableDebug),n.disableExceptionTracking=n.disableExceptionTracking!==undefined&&n.disableExceptionTracking!==null?t.Util.stringToBoolOrDefault(n.disableExceptionTracking):!1,n.disableTelemetry=t.Util.stringToBoolOrDefault(n.disableTelemetry),n.verboseLogging=t.Util.stringToBoolOrDefault(n.verboseLogging),n.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(n.emitLineDelimitedJson),n.diagnosticLogInterval=n.diagnosticLogInterval||1e4,n.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(n.autoTrackPageVisitTime),(isNaN(n.samplingPercentage)||n.samplingPercentage<=0||n.samplingPercentage>=100)&&(n.samplingPercentage=100),n.disableAjaxTracking=n.disableAjaxTracking!==undefined&&n.disableAjaxTracking!==null?t.Util.stringToBoolOrDefault(n.disableAjaxTracking):!1,n.maxAjaxCallsPerView=isNaN(n.maxAjaxCallsPerView)?500:n.maxAjaxCallsPerView,n.disableCorrelationHeaders=n.disableCorrelationHeaders!==undefined&&n.disableCorrelationHeaders!==null?t.Util.stringToBoolOrDefault(n.disableCorrelationHeaders):!0,n.disableFlushOnBeforeUnload=n.disableFlushOnBeforeUnload!==undefined&&n.disableFlushOnBeforeUnload!==null?t.Util.stringToBoolOrDefault(n.disableFlushOnBeforeUnload):!1,n.enableSessionStorageBuffer=n.enableSessionStorageBuffer!==undefined&&n.enableSessionStorageBuffer!==null?t.Util.stringToBoolOrDefault(n.enableSessionStorageBuffer):!1,n},i}();t.Initialization=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict";var r,u;try{if(typeof window!="undefined"&&typeof JSON!="undefined")if(r="appInsights",window[r]===undefined)n.ApplicationInsights.AppInsights.defaultConfig=n.ApplicationInsights.Initialization.getDefaultConfig();else{var f=window[r]||{},t=new n.ApplicationInsights.Initialization(f),i=t.loadAppInsights();for(u in i)f[u]=i[u];t.emptyQueue();t.pollInteralLogs(i);t.addHousekeepingBeforeUnload(i)}}catch(e){n.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+e.message)}})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.AjaxCallData=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.RequestData=t}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.state=n.SessionState.Start;t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.SessionStateData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Pass=0]="Pass";n[n.Fail=1]="Fail"})(n.TestResult||(n.TestResult={}));var t=n.TestResult}(AI||(AI={})) \ No newline at end of file +var __extends,Microsoft,AI;(function(n){var t;(function(n){var r,t,i,u;(function(n){n[n.CRITICAL=0]="CRITICAL";n[n.WARNING=1]="WARNING"})(n.LoggingSeverity||(n.LoggingSeverity={}));r=n.LoggingSeverity,function(n){n[n.NONUSRACT_BrowserDoesNotSupportLocalStorage=0]="NONUSRACT_BrowserDoesNotSupportLocalStorage";n[n.NONUSRACT_BrowserCannotReadLocalStorage=1]="NONUSRACT_BrowserCannotReadLocalStorage";n[n.NONUSRACT_BrowserCannotReadSessionStorage=2]="NONUSRACT_BrowserCannotReadSessionStorage";n[n.NONUSRACT_BrowserCannotWriteLocalStorage=3]="NONUSRACT_BrowserCannotWriteLocalStorage";n[n.NONUSRACT_BrowserCannotWriteSessionStorage=4]="NONUSRACT_BrowserCannotWriteSessionStorage";n[n.NONUSRACT_BrowserFailedRemovalFromLocalStorage=5]="NONUSRACT_BrowserFailedRemovalFromLocalStorage";n[n.NONUSRACT_BrowserFailedRemovalFromSessionStorage=6]="NONUSRACT_BrowserFailedRemovalFromSessionStorage";n[n.NONUSRACT_CannotSendEmptyTelemetry=7]="NONUSRACT_CannotSendEmptyTelemetry";n[n.NONUSRACT_ClientPerformanceMathError=8]="NONUSRACT_ClientPerformanceMathError";n[n.NONUSRACT_ErrorParsingAISessionCookie=9]="NONUSRACT_ErrorParsingAISessionCookie";n[n.NONUSRACT_ErrorPVCalc=10]="NONUSRACT_ErrorPVCalc";n[n.NONUSRACT_ExceptionWhileLoggingError=11]="NONUSRACT_ExceptionWhileLoggingError";n[n.NONUSRACT_FailedAddingTelemetryToBuffer=12]="NONUSRACT_FailedAddingTelemetryToBuffer";n[n.NONUSRACT_FailedMonitorAjaxAbort=13]="NONUSRACT_FailedMonitorAjaxAbort";n[n.NONUSRACT_FailedMonitorAjaxDur=14]="NONUSRACT_FailedMonitorAjaxDur";n[n.NONUSRACT_FailedMonitorAjaxOpen=15]="NONUSRACT_FailedMonitorAjaxOpen";n[n.NONUSRACT_FailedMonitorAjaxRSC=16]="NONUSRACT_FailedMonitorAjaxRSC";n[n.NONUSRACT_FailedMonitorAjaxSend=17]="NONUSRACT_FailedMonitorAjaxSend";n[n.NONUSRACT_FailedToAddHandlerForOnBeforeUnload=18]="NONUSRACT_FailedToAddHandlerForOnBeforeUnload";n[n.NONUSRACT_FailedToSendQueuedTelemetry=19]="NONUSRACT_FailedToSendQueuedTelemetry";n[n.NONUSRACT_FailedToReportDataLoss=20]="NONUSRACT_FailedToReportDataLoss";n[n.NONUSRACT_FlushFailed=21]="NONUSRACT_FlushFailed";n[n.NONUSRACT_MessageLimitPerPVExceeded=22]="NONUSRACT_MessageLimitPerPVExceeded";n[n.NONUSRACT_MissingRequiredFieldSpecification=23]="NONUSRACT_MissingRequiredFieldSpecification";n[n.NONUSRACT_NavigationTimingNotSupported=24]="NONUSRACT_NavigationTimingNotSupported";n[n.NONUSRACT_OnError=25]="NONUSRACT_OnError";n[n.NONUSRACT_SessionRenewalDateIsZero=26]="NONUSRACT_SessionRenewalDateIsZero";n[n.NONUSRACT_SenderNotInitialized=27]="NONUSRACT_SenderNotInitialized";n[n.NONUSRACT_StartTrackEventFailed=28]="NONUSRACT_StartTrackEventFailed";n[n.NONUSRACT_StopTrackEventFailed=29]="NONUSRACT_StopTrackEventFailed";n[n.NONUSRACT_StartTrackFailed=30]="NONUSRACT_StartTrackFailed";n[n.NONUSRACT_StopTrackFailed=31]="NONUSRACT_StopTrackFailed";n[n.NONUSRACT_TelemetrySampledAndNotSent=32]="NONUSRACT_TelemetrySampledAndNotSent";n[n.NONUSRACT_TrackEventFailed=33]="NONUSRACT_TrackEventFailed";n[n.NONUSRACT_TrackExceptionFailed=34]="NONUSRACT_TrackExceptionFailed";n[n.NONUSRACT_TrackMetricFailed=35]="NONUSRACT_TrackMetricFailed";n[n.NONUSRACT_TrackPVFailed=36]="NONUSRACT_TrackPVFailed";n[n.NONUSRACT_TrackPVFailedCalc=37]="NONUSRACT_TrackPVFailedCalc";n[n.NONUSRACT_TrackTraceFailed=38]="NONUSRACT_TrackTraceFailed";n[n.NONUSRACT_TransmissionFailed=39]="NONUSRACT_TransmissionFailed";n[n.NONUSRACT_FailToSetStorageBuffer=40]="NONUSRACT_FailToSetStorageBuffer";n[n.NONUSRACT_FailToRestoreStorageBuffer=41]="NONUSRACT_FailToRestoreStorageBuffer";n[n.USRACT_CannotSerializeObject=42]="USRACT_CannotSerializeObject";n[n.USRACT_CannotSerializeObjectNonSerializable=43]="USRACT_CannotSerializeObjectNonSerializable";n[n.USRACT_CircularReferenceDetected=44]="USRACT_CircularReferenceDetected";n[n.USRACT_ClearAuthContextFailed=45]="USRACT_ClearAuthContextFailed";n[n.USRACT_ExceptionTruncated=46]="USRACT_ExceptionTruncated";n[n.USRACT_IllegalCharsInName=47]="USRACT_IllegalCharsInName";n[n.USRACT_ItemNotInArray=48]="USRACT_ItemNotInArray";n[n.USRACT_MaxAjaxPerPVExceeded=49]="USRACT_MaxAjaxPerPVExceeded";n[n.USRACT_MessageTruncated=50]="USRACT_MessageTruncated";n[n.USRACT_NameTooLong=51]="USRACT_NameTooLong";n[n.USRACT_SampleRateOutOfRange=52]="USRACT_SampleRateOutOfRange";n[n.USRACT_SetAuthContextFailed=53]="USRACT_SetAuthContextFailed";n[n.USRACT_SetAuthContextFailedAccountName=54]="USRACT_SetAuthContextFailedAccountName";n[n.USRACT_StringValueTooLong=55]="USRACT_StringValueTooLong";n[n.USRACT_StartCalledMoreThanOnce=56]="USRACT_StartCalledMoreThanOnce";n[n.USRACT_StopCalledWithoutStart=57]="USRACT_StopCalledWithoutStart";n[n.USRACT_TelemetryInitializerFailed=58]="USRACT_TelemetryInitializerFailed";n[n.USRACT_TrackArgumentsNotSpecified=59]="USRACT_TrackArgumentsNotSpecified";n[n.USRACT_UrlTooLong=60]="USRACT_UrlTooLong";n[n.USRACT_SessionStorageBufferFull=61]="USRACT_SessionStorageBufferFull"}(n._InternalMessageId||(n._InternalMessageId={}));t=n._InternalMessageId;i=function(){function n(i,r,u){this.message=t[i].toString();this.messageId=i;var f=(r?" message:"+n.sanitizeDiagnosticText(r):"")+(u?" props:"+n.sanitizeDiagnosticText(JSON.stringify(u)):"");this.message+=f}return n.sanitizeDiagnosticText=function(n){return'"'+n.replace(/\"/g,"")+'"'},n}();n._InternalLogMessage=i;u=function(){function u(){}return u.throwInternalNonUserActionable=function(n,t){if(this.enableDebugExceptions())throw t;else typeof t=="undefined"||!t||typeof t.message!="undefined"&&(t.message=this.AiNonUserActionablePrefix+t.message,this.verboseLogging()&&this.warnToConsole(t.message),this.logInternalMessage(n,t))},u.throwInternalUserActionable=function(n,t){if(this.enableDebugExceptions())throw t;else typeof t=="undefined"||!t||typeof t.message!="undefined"&&(t.message=this.AiUserActionablePrefix+t.message,this.warnToConsole(t.message),this.logInternalMessage(n,t))},u.warnToConsole=function(n){typeof console=="undefined"||!console||(typeof console.warn=="function"?console.warn(n):typeof console.log=="function"&&console.log(n))},u.resetInternalMessageCount=function(){this._messageCount=0},u.clearInternalMessageLoggedTypes=function(){var i,t;if(n.Util.canUseSessionStorage())for(i=n.Util.getSessionStorageKeys(),t=0;t=this.MAX_INTERNAL_MESSAGE_LIMIT},u.AiUserActionablePrefix="AI: ",u.AIInternalMessagePrefix="AITR_",u.AiNonUserActionablePrefix="AI (Internal): ",u.enableDebugExceptions=function(){return!1},u.verboseLogging=function(){return!1},u.queue=[],u.MAX_INTERNAL_MESSAGE_LIMIT=25,u._messageCount=0,u}();n._InternalLogging=u})(t=n.ApplicationInsights||(n.ApplicationInsights={}))})(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t,i,r;(function(n){n[n.LocalStorage=0]="LocalStorage";n[n.SessionStorage=1]="SessionStorage"})(t||(t={}));i=function(){function i(){}return i._getLocalStorageObject=function(){return i._getVerifiedStorageObject(t.LocalStorage)},i._getVerifiedStorageObject=function(n){var i=null,u,r;try{r=new Date;i=n===t.LocalStorage?window.localStorage:window.sessionStorage;i.setItem(r,r);u=i.getItem(r)!=r;i.removeItem(r);u&&(i=null)}catch(f){i=null}return i},i.canUseLocalStorage=function(){return!!i._getLocalStorageObject()},i.getStorage=function(t){var r=i._getLocalStorageObject(),f;if(r!==null)try{return r.getItem(t)}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,f)}return null},i.setStorage=function(t,r){var u=i._getLocalStorageObject(),e;if(u!==null)try{return u.setItem(t,r),!0}catch(f){e=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+i.getExceptionName(f),{exception:i.dump(f)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,e)}return!1},i.removeStorage=function(t){var r=i._getLocalStorageObject(),f;if(r!==null)try{return r.removeItem(t),!0}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,f)}return!1},i._getSessionStorageObject=function(){return i._getVerifiedStorageObject(t.SessionStorage)},i.canUseSessionStorage=function(){return!!i._getSessionStorageObject()},i.getSessionStorageKeys=function(){var n=[],t;if(i.canUseSessionStorage())for(t in window.sessionStorage)n.push(t);return n},i.getSessionStorage=function(t){var r=i._getSessionStorageObject(),f;if(r!==null)try{return r.getItem(t)}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,f)}return null},i.setSessionStorage=function(t,r){var u=i._getSessionStorageObject(),e;if(u!==null)try{return u.setItem(t,r),!0}catch(f){e=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+i.getExceptionName(f),{exception:i.dump(f)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,e)}return!1},i.removeSessionStorage=function(t){var r=i._getSessionStorageObject(),f;if(r!==null)try{return r.removeItem(t),!0}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,f)}return!1},i.setCookie=function(n,t,r){var u="";r&&(u=";domain="+r);i.document.cookie=n+"="+t+u+";path=/"},i.stringToBoolOrDefault=function(n){return n?n.toString().toLowerCase()==="true":!1},i.getCookie=function(n){var e="",f,u,r,t;if(n&&n.length)for(f=n+"=",u=i.document.cookie.split(";"),r=0;r0;)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n%64),t+=i,n=Math.floor(n/64);return t},i.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"},i.isError=function(n){return Object.prototype.toString.call(n)==="[object Error]"},i.isDate=function(n){return Object.prototype.toString.call(n)==="[object Date]"},i.toISOStringForIE8=function(n){if(i.isDate(n)){function t(n){var t=String(n);return t.length===1&&(t="0"+t),t}return Date.prototype.toISOString?n.toISOString():n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},i.getIEVersion=function(n){n===void 0&&(n=null);var t=n?n.toLowerCase():navigator.userAgent.toLowerCase();return t.indexOf("msie")!=-1?parseInt(t.split("msie")[1]):null},i.msToTimeSpan=function(n){(isNaN(n)||n<0)&&(n=0);var t=""+n%1e3,i=""+Math.floor(n/1e3)%60,r=""+Math.floor(n/6e4)%60,u=""+Math.floor(n/36e5)%24;return t=t.length===1?"00"+t:t.length===2?"0"+t:t,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,u=u.length<2?"0"+u:u,u+":"+r+":"+i+"."+t},i.isCrossOriginError=function(n,t,i,r,u){return(n==="Script error."||n==="Script error")&&u===null},i.dump=function(n){var t=Object.prototype.toString.call(n),i=JSON.stringify(n);return t==="[object Error]"&&(i="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'"),t+i},i.getExceptionName=function(n){var t=Object.prototype.toString.call(n);return t==="[object Error]"?n.name:""},i.addEventHandler=function(n,t){if(!window||typeof n!="string"||typeof t!="function")return!1;var i="on"+n;if(window.addEventListener)window.addEventListener(n,t,!1);else if(window.attachEvent)window.attachEvent.call(i,t);else return!1;return!0},i.document=typeof document!="undefined"?document:{},i.NotSpecified="not_specified",i}();n.Util=i;r=function(){function n(){}return n.parseUrl=function(t){return n.htmlAnchorElement||(n.htmlAnchorElement=!n.document.createElement?{}:n.document.createElement("a")),n.htmlAnchorElement.href=t,n.htmlAnchorElement},n.getAbsoluteUrl=function(t){var i,r=n.parseUrl(t);return r&&(i=r.href),i},n.getPathName=function(t){var i,r=n.parseUrl(t);return r&&(i=r.pathname),i},n.document=typeof document!="undefined"?document:{},n}();n.UrlHelper=r})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.IsNullOrUndefined=function(n){return typeof n=="undefined"||n===null},n}(),i,r,u;n.extensions=t;i=function(){function n(){}return n.GetLength=function(n){var i=0,r;if(!t.IsNullOrUndefined(n)){r="";try{r=n.toString()}catch(u){}i=r.length;i=isNaN(i)?0:i}return i},n}();n.stringUtils=i;r=function(){function n(){}return n.Now=window.performance&&window.performance.now?function(){return performance.now()}:function(){return(new Date).getTime()},n.GetDuration=function(n,i){var r=null;return n===0||i===0||t.IsNullOrUndefined(n)||t.IsNullOrUndefined(i)||(r=i-n),r},n}();n.dateTime=r;u=function(){function n(){}return n.AttachEvent=function(n,i,r){var u=!1;return t.IsNullOrUndefined(n)||(t.IsNullOrUndefined(n.attachEvent)?t.IsNullOrUndefined(n.addEventListener)||(n.addEventListener(i,r,!1),u=!0):(n.attachEvent("on"+i,r),u=!0)),u},n.DetachEvent=function(n,i,r){t.IsNullOrUndefined(n)||(t.IsNullOrUndefined(n.detachEvent)?t.IsNullOrUndefined(n.removeEventListener)||n.removeEventListener(i,r,!1):n.detachEvent("on"+i,r))},n}();n.EventHelper=u})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function n(){this.openDone=!1;this.setRequestHeaderDone=!1;this.sendDone=!1;this.abortDone=!1;this.onreadystatechangeCallbackAttached=!1}return n}(),i;n.XHRMonitoringState=t;i=function(){function i(i){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=n.dateTime.GetDuration(t.requestSentTime,t.responseFinishedTime)};this.id=i}return i.prototype.getAbsoluteUrl=function(){return this.requestUrl?n.UrlHelper.getAbsoluteUrl(this.requestUrl):null},i.prototype.getPathName=function(){return this.requestUrl?n.UrlHelper.getPathName(this.requestUrl):null},i}();n.ajaxRecord=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){"use strict";var i=function(){function i(n){this.currentWindowHost=window.location.host;this.appInsights=n;this.initialized=!1;this.Init()}return i.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},i.prototype.isMonitoredInstance=function(n,r){return this.initialized&&(r===!0||!t.extensions.IsNullOrUndefined(n.ajaxData))&&n[i.DisabledPropertyName]!==!0},i.prototype.supportsMonitoring=function(){var n=!1;return t.extensions.IsNullOrUndefined(XMLHttpRequest)||(n=!0),n},i.prototype.instrumentOpen=function(){var u=XMLHttpRequest.prototype.open,r=this;XMLHttpRequest.prototype.open=function(f,e,o){try{!r.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||r.openHandler(this,f,e,o)}catch(s){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(s)}))}return u.apply(this,arguments)}},i.prototype.openHandler=function(n,i,r){var u=new t.ajaxRecord(t.Util.newId());u.method=i;u.requestUrl=r;u.xhrMonitoringState.openDone=!0;n.ajaxData=u;this.attachToOnReadyStateChange(n)},i.getFailedAjaxDiagnosticsMessage=function(n){var i="";try{t.extensions.IsNullOrUndefined(n)||t.extensions.IsNullOrUndefined(n.ajaxData)||t.extensions.IsNullOrUndefined(n.ajaxData.requestUrl)||(i+="(url: '"+n.ajaxData.requestUrl+"')")}catch(r){}return i},i.prototype.instrumentSend=function(){var u=XMLHttpRequest.prototype.send,r=this;XMLHttpRequest.prototype.send=function(f){try{r.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&r.sendHandler(this,f)}catch(e){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(e)}))}return u.apply(this,arguments)}},i.prototype.sendHandler=function(n){n.ajaxData.requestSentTime=t.dateTime.Now();this.appInsights.config.disableCorrelationHeaders||t.UrlHelper.parseUrl(n.ajaxData.getAbsoluteUrl()).host!=this.currentWindowHost||n.setRequestHeader("x-ms-request-id",n.ajaxData.id);n.ajaxData.xhrMonitoringState.sendDone=!0},i.prototype.instrumentAbort=function(){var r=XMLHttpRequest.prototype.abort,u=this;XMLHttpRequest.prototype.abort=function(){try{u.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(f){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(f)}))}return r.apply(this,arguments)}},i.prototype.attachToOnReadyStateChange=function(r){var u=this;r.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=t.EventHelper.AttachEvent(r,"readystatechange",function(){try{if(u.isMonitoredInstance(r)&&r.readyState===4)u.onAjaxComplete(r)}catch(f){var e=n.ApplicationInsights.Util.dump(f);e&&e.toLowerCase().indexOf("c00c023f")!=-1||t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(r),exception:n.ApplicationInsights.Util.dump(f)}))}})},i.prototype.onAjaxComplete=function(n){n.ajaxData.responseFinishedTime=t.dateTime.Now();n.ajaxData.status=n.status;n.ajaxData.CalculateMetrics();n.ajaxData.ajaxTotalDuration<0?t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.WARNING,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(n),requestSentTime:n.ajaxData.requestSentTime,responseFinishedTime:n.ajaxData.responseFinishedTime})):(this.appInsights.trackDependency(n.ajaxData.id,n.ajaxData.method,n.ajaxData.getAbsoluteUrl(),n.ajaxData.getPathName(),n.ajaxData.ajaxTotalDuration,+n.ajaxData.status>=200&&+n.ajaxData.status<400,+n.ajaxData.status),n.ajaxData=null)},i.instrumentedByAppInsightsName="InstrumentedByAppInsights",i.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",i}();t.AjaxMonitor=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.getHashCodeScore=function(t){var i=this.getHashCode(t)/n.INT_MAX_VALUE;return i*100},n.prototype.getHashCode=function(t){var i,r;if(t=="")return 0;while(t.length100||t<0)&&(n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_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})),this.sampleRate=100);this.sampleRate=t;this.samplingScoreGenerator=new n.SamplingScoreGenerator}return t.prototype.isSampledIn=function(n){if(this.sampleRate==100)return!0;var t=this.samplingScoreGenerator.getSamplingScore(n);return tthis.config.sessionExpirationMs(),i=n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||i?(this.automaticSession.isFirst=undefined,this.renew()):(this.automaticSession.renewalDate=+new Date,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=n.Util.getCookie("ai_session"),i;t&&typeof t.split=="function"?this.initializeAutomaticSessionWithData(t):(i=n.Util.getStorage("ai_session"),i&&this.initializeAutomaticSessionWithData(i));this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},t.prototype.initializeAutomaticSessionWithData=function(t){var i=t.split("|"),r,u;i.length>0&&(this.automaticSession.id=i[0]);try{i.length>1&&(r=+i[1],this.automaticSession.acquisitionDate=+new Date(r),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0);i.length>2&&(u=+i[2],this.automaticSession.renewalDate=+new Date(u),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(f){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+n.Util.getExceptionName(f),{exception:n.Util.dump(f)}))}this.automaticSession.renewalDate==0&&n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset."))},t.prototype.renew=function(){var t=+new Date;this.automaticSession.id=n.Util.newId();this.automaticSession.acquisitionDate=t;this.automaticSession.renewalDate=t;this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate);n.Util.canUseLocalStorage()||n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate."))},t.prototype.setCookie=function(t,i,r){var f=i+this.config.sessionExpirationMs(),e=r+this.config.sessionRenewalMs(),u=new Date,s=[t,i,r],o;f0&&(this.id=e[0]));this.config=i;this.id||(this.id=n.Util.newId(),u=new Date,o=n.Util.toISOStringForIE8(u),this.accountAcquisitionDate=o,u.setTime(u.getTime()+31536e6),h=[this.id,o],c=this.config.cookieDomain?this.config.cookieDomain():undefined,n.Util.setCookie(t.userCookieName,h.join(t.cookieSeparator)+";expires="+u.toUTCString(),c),n.Util.removeStorage("ai_session"));this.accountId=i.accountId?i.accountId():undefined;f=n.Util.getCookie(t.authUserCookieName);f&&(f=decodeURI(f),r=f.split(t.cookieSeparator),r[0]&&(this.authenticatedId=r[0]),r.length>1&&r[1]&&(this.accountId=r[1]))}return t.prototype.setAuthenticatedUserContext=function(i,r){var f=!this.validateUserInput(i)||r&&!this.validateUserInput(r),u;if(f){n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_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."));return}this.authenticatedId=i;u=this.authenticatedId;r&&(this.accountId=r,u=[this.authenticatedId,this.accountId].join(t.cookieSeparator));n.Util.setCookie(t.authUserCookieName,encodeURI(u),this.config.cookieDomain())},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null;this.accountId=null;n.Util.deleteCookie(t.authUserCookieName)},t.prototype.validateUserInput=function(n){return typeof n!="string"||!n||n.match(/,|;|=| |\|/)?!1:!0},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}();t.User=i})(t=n.Context||(n.Context={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.reset=function(){t.isEnabled()&&(n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,"0"),n.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,"0"),t.itemsRestoredFromSessionBuffer=0)},t.isEnabled=function(){return t.enabled&&t.appInsights!=null&&t.appInsights.context._sender._XMLHttpRequestSupported&&n.Util.canUseSessionStorage()},t.getIssuesReported=function(){return!t.isEnabled()||isNaN(+n.Util.getSessionStorage(t.ISSUES_REPORTED_KEY))?0:+n.Util.getSessionStorage(t.ISSUES_REPORTED_KEY)},t.incrementItemsQueued=function(){try{if(t.isEnabled()){var i=t.getNumberOfLostItems();++i;n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,i.toString())}}catch(r){}},t.decrementItemsQueued=function(i){try{if(t.isEnabled()){var r=t.getNumberOfLostItems();r-=i;r<0&&(r=0);n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,r.toString())}}catch(u){}},t.getNumberOfLostItems=function(){var i=0;try{t.isEnabled()&&(i=isNaN(+n.Util.getSessionStorage(t.ITEMS_QUEUED_KEY))?0:+n.Util.getSessionStorage(t.ITEMS_QUEUED_KEY))}catch(r){i=0}return i},t.reportLostItems=function(){var r,i;try{t.isEnabled()&&t.getIssuesReported()0&&(r=t.getNumberOfLostItems()-t.itemsRestoredFromSessionBuffer,t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+r+'"',null),t.appInsights.flush(),i=t.getIssuesReported(),++i,n.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,i.toString()))}catch(u){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailedToReportDataLoss,"Failed to report data loss: "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}finally{try{t.reset()}catch(u){}}},t.enabled=!1,t.itemsRestoredFromSessionBuffer=0,t.LIMIT_PER_SESSION=10,t.ITEMS_QUEUED_KEY="AI_itemsQueued",t.ISSUES_REPORTED_KEY="AI_lossIssuesReported",t}();n.DataLossAnalyzer=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var i=function(){function n(n){this._config=n;this._buffer=[]}return n.prototype.enqueue=function(n){this._buffer.push(n)},n.prototype.count=function(){return this._buffer.length},n.prototype.clear=function(){this._buffer.length=0},n.prototype.getItems=function(){return this._buffer.slice(0)},n.prototype.batchPayloads=function(n){return n&&n.length>0?this._config.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null},n.prototype.markAsSent=function(){this.clear()},n.prototype.clearSent=function(){this.clear()},n}(),t;n.ArraySendBuffer=i;t=function(){function t(i){this._bufferFullMessageSent=!1;this._config=i;var r=this.getBuffer(t.BUFFER_KEY),u=this.getBuffer(t.SENT_BUFFER_KEY);this._buffer=r.concat(u);n.DataLossAnalyzer.itemsRestoredFromSessionBuffer=this._buffer.length;this.setBuffer(t.BUFFER_KEY,this._buffer);this.setBuffer(t.SENT_BUFFER_KEY,[])}return t.prototype.enqueue=function(i){if(this._buffer.length>=t.MAX_BUFFER_SIZE){this._bufferFullMessageSent||(n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length)),this._bufferFullMessageSent=!0);return}this._buffer.push(i);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(n){return n&&n.length>0?this._config.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null},t.prototype.markAsSent=function(n){var i=this.getBuffer(t.SENT_BUFFER_KEY);i=i.concat(n);this._buffer=this.removePayloadsFromBuffer(n,this._buffer);this.setBuffer(t.BUFFER_KEY,this._buffer);this.setBuffer(t.SENT_BUFFER_KEY,i)},t.prototype.clearSent=function(n){var i=this.getBuffer(t.SENT_BUFFER_KEY);i=this.removePayloadsFromBuffer(n,i);this.setBuffer(t.SENT_BUFFER_KEY,i)},t.prototype.removePayloadsFromBuffer=function(n,t){var u=[],i,r,f;for(i in t){r=!1;for(f in n)if(n[f]===t[i]){r=!0;break}r||u.push(t[i])}return u},t.prototype.getBuffer=function(t){var i,r;try{if(i=n.Util.getSessionStorage(t),i&&(r=JSON.parse(i),r))return r}catch(u){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailToRestoreStorageBuffer," storage key: "+t+", "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}return[]},t.prototype.setBuffer=function(t,i){try{var u=JSON.stringify(i);n.Util.setSessionStorage(t,u)}catch(r){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailToSetStorageBuffer," storage key: "+t+", "+n.Util.getExceptionName(r),{exception:n.Util.dump(r)}))}},t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}();n.SessionStorageSendBuffer=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){if(this._XMLHttpRequestSupported=!1,this._lastSend=0,this._config=t,this._sender=null,this._buffer=n.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new n.SessionStorageSendBuffer(t):new n.ArraySendBuffer(t),typeof XMLHttpRequest!="undefined"){var i=new XMLHttpRequest;"withCredentials"in i?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):typeof XDomainRequest!="undefined"&&(this._sender=this._xdrSender)}}return t.prototype.send=function(t){var i=this;try{if(this._config.disableTelemetry())return;if(!t){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_CannotSendEmptyTelemetry,"Cannot send empty telemetry"));return}if(!this._sender){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_SenderNotInitialized,"Sender was not initialized"));return}var r=n.Serializer.serialize(t),e=this._buffer.getItems(),u=this._buffer.batchPayloads(e);u&&u.length+r.length>this._config.maxBatchSizeInBytes()&&this.triggerSend();this._buffer.enqueue(r);this._timeoutHandle||(this._timeoutHandle=setTimeout(function(){i._timeoutHandle=null;i.triggerSend()},this._config.maxBatchInterval()));n.DataLossAnalyzer.incrementItemsQueued()}catch(f){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+n.Util.getExceptionName(f),{exception:n.Util.dump(f)}))}},t.prototype._getSizeInBytes=function(n){var r=0,t,i;if(n&&n.length)for(t=0;t0&&(r=this._buffer.getItems(),this._sender(r,i)),this._lastSend=+new Date);clearTimeout(this._timeoutHandle);this._timeoutHandle=null}catch(u){(!n.Util.getIEVersion()||n.Util.getIEVersion()>9)&&n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}},t.prototype._xhrSender=function(t,i){var u=this,r=new XMLHttpRequest,f;r[n.AjaxMonitor.DisabledPropertyName]=!0;r.open("POST",this._config.endpointUrl(),i);r.setRequestHeader("Content-type","application/json");r.onreadystatechange=function(){return u._xhrReadyStateChange(r,t,t.length)};r.onerror=function(n){return u._onError(t,r.responseText||r.response||"",n)};f=this._buffer.batchPayloads(t);r.send(f);this._buffer.markAsSent(t)},t.prototype._xdrSender=function(n){var i=this,t=new XDomainRequest,r;t.onload=function(){return i._xdrOnLoad(t,n)};t.onerror=function(r){return i._onError(n,t.responseText||"",r)};t.open("POST",this._config.endpointUrl());r=this._buffer.batchPayloads(n);t.send(r);this._buffer.markAsSent(n)},t.prototype._xhrReadyStateChange=function(n,t,i){n.readyState===4&&((n.status<200||n.status>=300)&&n.status!==0?this._onError(t,n.responseText||n.response||""):this._onSuccess(t,i))},t.prototype._xdrOnLoad=function(n,t){n&&(n.responseText+""=="200"||n.responseText==="")?this._onSuccess(t,0):this._onError(t,n&&n.responseText||"")},t.prototype._onError=function(t,i){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_OnError,"Failed to send telemetry.",{message:i}));this._buffer.clearSent(t)},t.prototype._onSuccess=function(t,i){n.DataLossAnalyzer.decrementItemsQueued(i);this._buffer.clearSent(t)},t}();n.Sender=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(){this.hashCodeGeneragor=new n.HashCodeScoreGenerator}return t.prototype.isEnabled=function(n,t){return this.hashCodeGeneragor.getHashCodeScore(n)=0&&(i=i.replace(/[^0-9a-zA-Z-._()\/ ]/g,"_"),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_IllegalCharsInName,"name contains illegal characters. Illegal characters have been replaced with '_'.",{newName:i}))),i.length>t.MAX_NAME_LENGTH&&(i=i.substring(0,t.MAX_NAME_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_NameTooLong,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:i})))),i},t.sanitizeString=function(i){return i&&(i=n.Util.trim(i),i.toString().length>t.MAX_STRING_LENGTH&&(i=i.toString().substring(0,t.MAX_STRING_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_StringValueTooLong,"string value is too long. It has been truncated to "+t.MAX_STRING_LENGTH+" characters.",{value:i})))),i},t.sanitizeUrl=function(i){return i&&(i=n.Util.trim(i),i.length>t.MAX_URL_LENGTH&&(i=i.substring(0,t.MAX_URL_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_UrlTooLong,"url is too long, it has been trucated to "+t.MAX_URL_LENGTH+" characters.",{url:i})))),i},t.sanitizeMessage=function(i){return i&&i.length>t.MAX_MESSAGE_LENGTH&&(i=i.substring(0,t.MAX_MESSAGE_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_MessageTruncated,"message is too long, it has been trucated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:i}))),i},t.sanitizeException=function(i){return i&&i.length>t.MAX_EXCEPTION_LENGTH&&(i=i.substring(0,t.MAX_EXCEPTION_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_ExceptionTruncated,"exception is too long, it has been trucated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:i}))),i},t.sanitizeProperties=function(n){var r,i,u;if(n){r={};for(i in n)u=t.sanitizeString(n[i]),i=t.sanitizeKeyAndAddUniqueness(i,r),r[i]=u;n=r}return n},t.sanitizeMeasurements=function(n){var r,i,u;if(n){r={};for(i in n)u=n[i],i=t.sanitizeKeyAndAddUniqueness(i,r),r[i]=u;n=r}return n},t.padNumber=function(n){var t="00"+n;return t.substr(t.length-3)},t.MAX_NAME_LENGTH=150,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}();t.DataSanitizer=i})(i=t.Common||(t.Common={}))})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u){i.call(this);this.aiDataContract={ver:n.FieldType.Required,message:n.FieldType.Required,severityLevel:n.FieldType.Default,measurements:n.FieldType.Default,properties:n.FieldType.Default};r=r||n.Util.NotSpecified;this.message=t.Common.DataSanitizer.sanitizeMessage(r);this.properties=t.Common.DataSanitizer.sanitizeProperties(u)}return __extends(r,i),r.envelopeType="Microsoft.ApplicationInsights.{0}.Message",r.dataType="MessageData",r}(AI.MessageData);t.Trace=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.EventData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(t){function i(i,r,u){t.call(this);this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Required,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.name=n.Telemetry.Common.DataSanitizer.sanitizeString(i)||n.Util.NotSpecified;this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(r);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(u)}return __extends(i,t),i.envelopeType="Microsoft.ApplicationInsights.{0}.Event",i.dataType="EventData",i}(AI.EventData);t.Event=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(){function n(){this.hasFullStack=!0;this.parsedStack=[]}return n}();n.ExceptionDetails=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.exceptions=[];this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.ExceptionData=t}(AI||(AI={})),function(n){"use strict";var t=function(){function n(){}return n}();n.StackFrame=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var u=function(t){function i(i,u,f,e,o){t.call(this);this.aiDataContract={ver:n.FieldType.Required,handledAt:n.FieldType.Required,exceptions:n.FieldType.Required,severityLevel:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(f);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(e);this.handledAt=u||"unhandled";this.exceptions=[new r(i)];o&&(this.severityLevel=o)}return __extends(i,t),i.CreateSimpleException=function(n,t,i,r,u,f,e){return{handledAt:e||"unhandled",exceptions:[{hasFullStack:!0,message:n,stack:u,typeName:t,parsedStack:[{level:0,assembly:i,fileName:r,line:f,method:"unknown"}]}]}},i.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",i.dataType="ExceptionData",i}(AI.ExceptionData),r,i;t.Exception=u;r=function(r){function u(i){r.call(this);this.aiDataContract={id:n.FieldType.Default,outerId:n.FieldType.Default,typeName:n.FieldType.Required,message:n.FieldType.Required,hasFullStack:n.FieldType.Default,stack:n.FieldType.Default,parsedStack:n.FieldType.Array};this.typeName=t.Common.DataSanitizer.sanitizeString(i.name)||n.Util.NotSpecified;this.message=t.Common.DataSanitizer.sanitizeMessage(i.message)||n.Util.NotSpecified;var u=i.stack;this.parsedStack=this.parseStack(u);this.stack=t.Common.DataSanitizer.sanitizeException(u);this.hasFullStack=n.Util.isArray(this.parsedStack)&&this.parsedStack.length>0}return __extends(u,r),u.prototype.parseStack=function(n){var t=undefined,e,l,o,r,a,s,h,p,w,b;if(typeof n=="string"){for(e=n.split("\n"),t=[],l=0,o=0,r=0;r<=e.length;r++)a=e[r],i.regex.test(a)&&(s=new i(e[r],l++),o+=s.sizeInBytes,t.push(s));if(h=32768,o>h)for(var u=0,f=t.length-1,v=0,c=u,y=f;uh){b=y-c+1;t.splice(c,b);break}c=u;y=f;u++;f--}}return t},u}(AI.ExceptionDetails);i=function(t){function i(r,u){t.call(this);this.sizeInBytes=0;this.aiDataContract={level:n.FieldType.Required,method:n.FieldType.Required,assembly:n.FieldType.Default,fileName:n.FieldType.Default,line:n.FieldType.Default};this.level=u;this.method="";this.assembly=n.Util.trim(r);var f=r.match(i.regex);f&&f.length>=5&&(this.method=n.Util.trim(f[2])||this.method,this.fileName=n.Util.trim(f[4]),this.line=parseInt(f[5])||0);this.sizeInBytes+=this.method.length;this.sizeInBytes+=this.fileName.length;this.sizeInBytes+=this.assembly.length;this.sizeInBytes+=i.baseSize;this.sizeInBytes+=this.level.toString().length;this.sizeInBytes+=this.line.toString().length}return __extends(i,t),i.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,i.baseSize=58,i}(AI.StackFrame);t._StackFrame=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.metrics=[];this.properties={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.MetricData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Measurement=0]="Measurement";n[n.Aggregation=1]="Aggregation"})(n.DataPointType||(n.DataPointType={}));var t=n.DataPointType}(AI||(AI={})),function(n){"use strict";var t=function(){function t(){this.kind=n.DataPointType.Measurement}return t}();n.DataPoint=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(t){function i(){t.apply(this,arguments);this.aiDataContract={name:n.FieldType.Required,kind:n.FieldType.Default,value:n.FieldType.Required,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default}}return __extends(i,t),i}(AI.DataPoint);t.DataPoint=i})(i=t.Common||(t.Common={}))})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(r){function u(u,f,e,o,s,h){r.call(this);this.aiDataContract={ver:t.FieldType.Required,metrics:t.FieldType.Required,properties:t.FieldType.Default};var c=new n.ApplicationInsights.Telemetry.Common.DataPoint;c.count=e>0?e:undefined;c.max=isNaN(s)||s===null?undefined:s;c.min=isNaN(o)||o===null?undefined:o;c.name=i.Common.DataSanitizer.sanitizeString(u)||t.Util.NotSpecified;c.value=f;this.metrics=[c];this.properties=t.Telemetry.Common.DataSanitizer.sanitizeProperties(h)}return __extends(u,r),u.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",u.dataType="MetricData",u}(AI.MetricData);i.Metric=r})(i=t.Telemetry||(t.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.EventData);n.PageViewData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u,f,e,o){i.call(this);this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.url=t.Common.DataSanitizer.sanitizeUrl(u);this.name=t.Common.DataSanitizer.sanitizeString(r)||n.Util.NotSpecified;isNaN(f)||(this.duration=n.Util.msToTimeSpan(f));this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(e);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o)}return __extends(r,i),r.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",r.dataType="PageviewData",r}(AI.PageViewData);t.PageView=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.PageViewPerfData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(u,f,e,o,s){var h;if(i.call(this),this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,perfTotal:n.FieldType.Default,networkConnect:n.FieldType.Default,sentRequest:n.FieldType.Default,receivedResponse:n.FieldType.Default,domProcessing:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default},this.isValid=!1,h=r.getPerformanceTiming(),h){var c=r.getDuration(h.navigationStart,h.loadEventEnd),l=r.getDuration(h.navigationStart,h.connectEnd),a=r.getDuration(h.requestStart,h.responseStart),v=r.getDuration(h.responseStart,h.responseEnd),y=r.getDuration(h.responseEnd,h.loadEventEnd);c==0?n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_ErrorPVCalc,"error calculating page view performance.",{total:c,network:l,request:a,response:v,dom:y})):c0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},r.getDuration=function(n,t){var i=0;return isNaN(n)||isNaN(t)||(i=Math.max(t-n,0)),i},r.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",r.dataType="PageviewPerformanceData",r}(AI.PageViewPerfData);t.PageViewPerformance=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){this._config=t;this._sender=new n.Sender(t);typeof window!="undefined"&&(this._sessionManager=new n.Context._SessionManager(t),this.application=new n.Context.Application,this.device=new n.Context.Device,this.internal=new n.Context.Internal,this.location=new n.Context.Location,this.user=new n.Context.User(t),this.operation=new n.Context.Operation,this.session=new n.Context.Session,this.sample=new n.Context.Sample(t.sampleRate()))}return t.prototype.addTelemetryInitializer=function(n){this.telemetryInitializers=this.telemetryInitializers||[];this.telemetryInitializers.push(n)},t.prototype.track=function(t){return t?(t.name===n.Telemetry.PageView.envelopeType&&n._InternalLogging.resetInternalMessageCount(),this.session&&typeof this.session.id!="string"&&this._sessionManager.update(),this._track(t)):n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.USRACT_TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument")),t},t.prototype._track=function(t){var i,f,r,u,o;this.session&&(typeof this.session.id=="string"?this._applySessionContext(t,this.session):this._applySessionContext(t,this._sessionManager.automaticSession));this._applyApplicationContext(t,this.application);this._applyDeviceContext(t,this.device);this._applyInternalContext(t,this.internal);this._applyLocationContext(t,this.location);this._applySampleContext(t,this.sample);this._applyUserContext(t,this.user);this._applyOperationContext(t,this.operation);t.iKey=this._config.instrumentationKey();i=!1;try{for(this.telemetryInitializers=this.telemetryInitializers||[],f=this.telemetryInitializers.length,r=0;rl&&(clearInterval(a),s||(o.appInsights.sendPageViewInternal(i,r,l,u,f),o.appInsights.flush()))}catch(v){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_TrackPVFailedCalc,"trackPageView failed on page load calculation: "+n.Util.getExceptionName(v),{exception:n.Util.dump(v)}))}},100)},i}();t.PageViewManager=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";var r=function(){function t(n){this.prevPageVisitDataKeyName="prevPageVisitData";this.pageVisitTimeTrackingHandler=n}return t.prototype.trackPreviousPageVisit=function(t,i){try{var r=this.restartPageVisitTimer(t,i);r&&this.pageVisitTimeTrackingHandler(r.pageName,r.pageUrl,r.pageVisitTime)}catch(u){n._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+n.Util.dump(u))}},t.prototype.restartPageVisitTimer=function(t,i){try{var r=this.stopPageVisitTimer();return this.startPageVisitTimer(t,i),r}catch(u){return n._InternalLogging.warnToConsole("Call to restart failed: "+n.Util.dump(u)),null}},t.prototype.startPageVisitTimer=function(t,r){try{if(n.Util.canUseSessionStorage()){if(n.Util.getSessionStorage(this.prevPageVisitDataKeyName)!=null)throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var u=new i(t,r),f=JSON.stringify(u);n.Util.setSessionStorage(this.prevPageVisitDataKeyName,f)}}catch(e){n._InternalLogging.warnToConsole("Call to start failed: "+n.Util.dump(e))}},t.prototype.stopPageVisitTimer=function(){var r,i,t;try{return n.Util.canUseSessionStorage()?(r=Date.now(),i=n.Util.getSessionStorage(this.prevPageVisitDataKeyName),i?(t=JSON.parse(i),t.pageVisitTime=r-t.pageVisitStartTime,n.Util.removeSessionStorage(this.prevPageVisitDataKeyName),t):null):null}catch(u){return n._InternalLogging.warnToConsole("Stop page visit timer failed: "+n.Util.dump(u)),null}},t}(),i;t.PageVisitTimeManager=r;i=function(){function n(n,t){this.pageVisitStartTime=Date.now();this.pageName=n;this.pageUrl=t}return n}();t.PageVisitData=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";(function(n){n[n.SQL=0]="SQL";n[n.Http=1]="Http";n[n.Other=2]="Other"})(n.DependencyKind||(n.DependencyKind={}));var t=n.DependencyKind}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Undefined=0]="Undefined";n[n.Aic=1]="Aic";n[n.Apmc=2]="Apmc"})(n.DependencySourceType||(n.DependencySourceType={}));var t=n.DependencySourceType}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.kind=n.DataPointType.Aggregation;this.dependencyKind=n.DependencyKind.Other;this.success=!0;this.dependencySource=n.DependencySourceType.Apmc;this.properties={};t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.RemoteDependencyData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u,f,e,o,s,h){i.call(this);this.aiDataContract={id:n.FieldType.Required,ver:n.FieldType.Required,name:n.FieldType.Default,kind:n.FieldType.Required,value:n.FieldType.Default,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default,dependencyKind:n.FieldType.Default,success:n.FieldType.Default,async:n.FieldType.Default,dependencySource:n.FieldType.Default,commandName:n.FieldType.Default,dependencyTypeName:n.FieldType.Default,properties:n.FieldType.Default,resultCode:n.FieldType.Default};this.id=r;this.name=this.formatDependencyName(h,u);this.commandName=t.Common.DataSanitizer.sanitizeUrl(f);this.value=e;this.success=o;this.resultCode=s+"";this.dependencyKind=AI.DependencyKind.Http;this.dependencyTypeName="Ajax"}return __extends(r,i),r.prototype.formatDependencyName=function(n,t){return n?n.toUpperCase()+" "+t:t},r.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",r.dataType="RemoteDependencyData",r}(AI.RemoteDependencyData);t.RemoteDependencyData=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){"use strict";var r,i;t.Version="0.22.19";r=function(){function r(u){var f=this,e,o,s;if(this._trackAjaxAttempts=0,this.config=u||{},e=r.defaultConfig,e!==undefined)for(o in e)this.config[o]===undefined&&(this.config[o]=e[o]);t._InternalLogging.verboseLogging=function(){return f.config.verboseLogging};t._InternalLogging.enableDebugExceptions=function(){return f.config.enableDebug};s={instrumentationKey:function(){return f.config.instrumentationKey},accountId:function(){return f.config.accountId},sessionRenewalMs:function(){return f.config.sessionRenewalMs},sessionExpirationMs:function(){return f.config.sessionExpirationMs},endpointUrl:function(){return f.config.endpointUrl},emitLineDelimitedJson:function(){return f.config.emitLineDelimitedJson},maxBatchSizeInBytes:function(){return f.config.maxBatchSizeInBytes},maxBatchInterval:function(){return f.config.maxBatchInterval},disableTelemetry:function(){return f.config.disableTelemetry},sampleRate:function(){return f.config.samplingPercentage},cookieDomain:function(){return f.config.cookieDomain},enableSessionStorageBuffer:function(){return f.config.enableSessionStorageBuffer}};this.context=new t.TelemetryContext(s);this._pageViewManager=new n.ApplicationInsights.Telemetry.PageViewManager(this,this.config.overridePageViewDuration);this._eventTracking=new i("trackEvent");this._eventTracking.action=function(n,i,r,u,e){e?isNaN(e.duration)&&(e.duration=r):e={duration:r};var o=new t.Telemetry.Event(n,u,e),s=new t.Telemetry.Common.Data(t.Telemetry.Event.dataType,o),h=new t.Telemetry.Common.Envelope(s,t.Telemetry.Event.envelopeType);f.context.track(h)};this._pageTracking=new i("trackPageView");this._pageTracking.action=function(n,t,i,r,u){f.sendPageViewInternal(n,t,i,r,u)};this._pageVisitTimeManager=new t.Telemetry.PageVisitTimeManager(function(n,t,i){return f.trackPageVisitTime(n,t,i)});this.config.disableAjaxTracking||new n.ApplicationInsights.AjaxMonitor(this)}return r.prototype.sendPageViewInternal=function(n,i,r,u,f){var e=new t.Telemetry.PageView(n,i,r,u,f),o=new t.Telemetry.Common.Data(t.Telemetry.PageView.dataType,e),s=new t.Telemetry.Common.Envelope(o,t.Telemetry.PageView.envelopeType);this.context.track(s);this._trackAjaxAttempts=0},r.prototype.sendPageViewPerformanceInternal=function(n){var i=new t.Telemetry.Common.Data(t.Telemetry.PageViewPerformance.dataType,n),r=new t.Telemetry.Common.Envelope(i,t.Telemetry.PageViewPerformance.envelopeType);this.context.track(r)},r.prototype.startTrackPage=function(n){try{typeof n!="string"&&(n=window.document&&window.document.title||"");this._pageTracking.start(n)}catch(i){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StartTrackFailed,"startTrackPage failed, page view may not be collected: "+t.Util.getExceptionName(i),{exception:t.Util.dump(i)}))}},r.prototype.stopTrackPage=function(n,i,r,u){try{typeof n!="string"&&(n=window.document&&window.document.title||"");typeof i!="string"&&(i=window.location&&window.location.href||"");this._pageTracking.stop(n,i,r,u);this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n,i)}catch(f){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+t.Util.getExceptionName(f),{exception:t.Util.dump(f)}))}},r.prototype.trackPageView=function(n,i,r,u,f){try{this._pageViewManager.trackPageView(n,i,r,u,f);this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n,i)}catch(e){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_TrackPVFailed,"trackPageView failed, page view will not be collected: "+t.Util.getExceptionName(e),{exception:t.Util.dump(e)}))}},r.prototype.startTrackEvent=function(n){try{this._eventTracking.start(n)}catch(i){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+t.Util.getExceptionName(i),{exception:t.Util.dump(i)}))}},r.prototype.stopTrackEvent=function(n,i,r){try{this._eventTracking.stop(n,undefined,i,r)}catch(u){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+t.Util.getExceptionName(u),{exception:t.Util.dump(u)}))}},r.prototype.trackEvent=function(n,i,r){try{var f=new t.Telemetry.Event(n,i,r),e=new t.Telemetry.Common.Data(t.Telemetry.Event.dataType,f),o=new t.Telemetry.Common.Envelope(e,t.Telemetry.Event.envelopeType);this.context.track(o)}catch(u){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_TrackEventFailed,"trackEvent failed, event will not be collected: "+t.Util.getExceptionName(u),{exception:t.Util.dump(u)}))}},r.prototype.trackDependency=function(n,i,r,u,f,e,o){if(this.config.maxAjaxCallsPerView===-1||this._trackAjaxAttempts0?n.maxBatchSizeInBytes:1e6,n.maxBatchInterval=isNaN(n.maxBatchInterval)?15e3:n.maxBatchInterval,n.enableDebug=t.Util.stringToBoolOrDefault(n.enableDebug),n.disableExceptionTracking=n.disableExceptionTracking!==undefined&&n.disableExceptionTracking!==null?t.Util.stringToBoolOrDefault(n.disableExceptionTracking):!1,n.disableTelemetry=t.Util.stringToBoolOrDefault(n.disableTelemetry),n.verboseLogging=t.Util.stringToBoolOrDefault(n.verboseLogging),n.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(n.emitLineDelimitedJson),n.diagnosticLogInterval=n.diagnosticLogInterval||1e4,n.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(n.autoTrackPageVisitTime),(isNaN(n.samplingPercentage)||n.samplingPercentage<=0||n.samplingPercentage>=100)&&(n.samplingPercentage=100),n.disableAjaxTracking=n.disableAjaxTracking!==undefined&&n.disableAjaxTracking!==null?t.Util.stringToBoolOrDefault(n.disableAjaxTracking):!1,n.maxAjaxCallsPerView=isNaN(n.maxAjaxCallsPerView)?500:n.maxAjaxCallsPerView,n.disableCorrelationHeaders=n.disableCorrelationHeaders!==undefined&&n.disableCorrelationHeaders!==null?t.Util.stringToBoolOrDefault(n.disableCorrelationHeaders):!0,n.disableFlushOnBeforeUnload=n.disableFlushOnBeforeUnload!==undefined&&n.disableFlushOnBeforeUnload!==null?t.Util.stringToBoolOrDefault(n.disableFlushOnBeforeUnload):!1,n.enableSessionStorageBuffer=n.enableSessionStorageBuffer!==undefined&&n.enableSessionStorageBuffer!==null?t.Util.stringToBoolOrDefault(n.enableSessionStorageBuffer):!1,n},i}();t.Initialization=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict";var r,u;try{if(typeof window!="undefined"&&typeof JSON!="undefined")if(r="appInsights",window[r]===undefined)n.ApplicationInsights.AppInsights.defaultConfig=n.ApplicationInsights.Initialization.getDefaultConfig();else{var f=window[r]||{},t=new n.ApplicationInsights.Initialization(f),i=t.loadAppInsights();for(u in i)f[u]=i[u];t.emptyQueue();t.pollInteralLogs(i);t.addHousekeepingBeforeUnload(i)}}catch(e){n.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+e.message)}})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.AjaxCallData=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.RequestData=t}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.state=n.SessionState.Start;t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.SessionStateData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Pass=0]="Pass";n[n.Fail=1]="Fail"})(n.TestResult||(n.TestResult={}));var t=n.TestResult}(AI||(AI={})) \ No newline at end of file diff --git a/dist/ai.js b/dist/ai.js index e97fb5012..1213d4475 100644 --- a/dist/ai.js +++ b/dist/ai.js @@ -1,8 +1,3 @@ -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -74,6 +69,7 @@ var Microsoft; _InternalMessageId[_InternalMessageId["USRACT_TelemetryInitializerFailed"] = 58] = "USRACT_TelemetryInitializerFailed"; _InternalMessageId[_InternalMessageId["USRACT_TrackArgumentsNotSpecified"] = 59] = "USRACT_TrackArgumentsNotSpecified"; _InternalMessageId[_InternalMessageId["USRACT_UrlTooLong"] = 60] = "USRACT_UrlTooLong"; + _InternalMessageId[_InternalMessageId["USRACT_SessionStorageBufferFull"] = 61] = "USRACT_SessionStorageBufferFull"; })(ApplicationInsights._InternalMessageId || (ApplicationInsights._InternalMessageId = {})); var _InternalMessageId = ApplicationInsights._InternalMessageId; var _InternalLogMessage = (function () { @@ -88,7 +84,7 @@ var Microsoft; return "\"" + text.replace(/\"/g, "") + "\""; }; return _InternalLogMessage; - }()); + })(); ApplicationInsights._InternalLogMessage = _InternalLogMessage; var _InternalLogging = (function () { function _InternalLogging() { @@ -192,10 +188,11 @@ var Microsoft; _InternalLogging.MAX_INTERNAL_MESSAGE_LIMIT = 25; _InternalLogging._messageCount = 0; return _InternalLogging; - }()); + })(); ApplicationInsights._InternalLogging = _InternalLogging; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -467,7 +464,7 @@ var Microsoft; Util.document = typeof document !== "undefined" ? document : {}; Util.NotSpecified = "not_specified"; return Util; - }()); + })(); ApplicationInsights.Util = Util; var UrlHelper = (function () { function UrlHelper() { @@ -497,10 +494,12 @@ var Microsoft; }; UrlHelper.document = typeof document !== "undefined" ? document : {}; return UrlHelper; - }()); + })(); ApplicationInsights.UrlHelper = UrlHelper; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -513,7 +512,7 @@ var Microsoft; return typeof (obj) === "undefined" || obj === null; }; return extensions; - }()); + })(); ApplicationInsights.extensions = extensions; var stringUtils = (function () { function stringUtils() { @@ -533,7 +532,7 @@ var Microsoft; return res; }; return stringUtils; - }()); + })(); ApplicationInsights.stringUtils = stringUtils; var dateTime = (function () { function dateTime() { @@ -554,7 +553,7 @@ var Microsoft; return result; }; return dateTime; - }()); + })(); ApplicationInsights.dateTime = dateTime; var EventHelper = (function () { function EventHelper() { @@ -588,10 +587,13 @@ var Microsoft; } }; return EventHelper; - }()); + })(); ApplicationInsights.EventHelper = EventHelper; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -606,7 +608,7 @@ var Microsoft; this.onreadystatechangeCallbackAttached = false; } return XHRMonitoringState; - }()); + })(); ApplicationInsights.XHRMonitoringState = XHRMonitoringState; var ajaxRecord = (function () { function ajaxRecord(id) { @@ -643,12 +645,16 @@ var Microsoft; return this.requestUrl ? ApplicationInsights.UrlHelper.getPathName(this.requestUrl) : null; }; return ajaxRecord; - }()); + })(); ApplicationInsights.ajaxRecord = ajaxRecord; ; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); ; +/// +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -798,14 +804,14 @@ var Microsoft; })); } else { - this.appInsights.trackAjax(xhr.ajaxData.id, xhr.ajaxData.getAbsoluteUrl(), xhr.ajaxData.getPathName(), xhr.ajaxData.ajaxTotalDuration, (+(xhr.ajaxData.status)) >= 200 && (+(xhr.ajaxData.status)) < 400, +xhr.ajaxData.status, xhr.ajaxData.method); + this.appInsights.trackDependency(xhr.ajaxData.id, xhr.ajaxData.method, xhr.ajaxData.getAbsoluteUrl(), xhr.ajaxData.getPathName(), xhr.ajaxData.ajaxTotalDuration, (+(xhr.ajaxData.status)) >= 200 && (+(xhr.ajaxData.status)) < 400, +xhr.ajaxData.status); xhr.ajaxData = null; } }; AjaxMonitor.instrumentedByAppInsightsName = "InstrumentedByAppInsights"; AjaxMonitor.DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation"; return AjaxMonitor; - }()); + })(); ApplicationInsights.AjaxMonitor = AjaxMonitor; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); @@ -837,11 +843,21 @@ var Microsoft; HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647; HashCodeScoreGenerator.MIN_INPUT_LENGTH = 8; return HashCodeScoreGenerator; - }()); + })(); ApplicationInsights.HashCodeScoreGenerator = HashCodeScoreGenerator; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +var Microsoft; (function (Microsoft) { var ApplicationInsights; (function (ApplicationInsights) { @@ -994,7 +1010,7 @@ var Microsoft; return output; }; return Serializer; - }()); + })(); ApplicationInsights.Serializer = Serializer; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); @@ -1007,10 +1023,11 @@ var Microsoft; function Base() { } return Base; - }()); + })(); Telemetry.Base = Base; })(Telemetry = Microsoft.Telemetry || (Microsoft.Telemetry = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var Telemetry; @@ -1023,10 +1040,19 @@ var Microsoft; this.tags = {}; } return Envelope; - }()); + })(); Telemetry.Envelope = Envelope; })(Telemetry = Microsoft.Telemetry || (Microsoft.Telemetry = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + __.prototype = b.prototype; + d.prototype = new __(); +}; var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1056,12 +1082,13 @@ var Microsoft; }; } return Envelope; - }(Microsoft.Telemetry.Envelope)); + })(Microsoft.Telemetry.Envelope); Common.Envelope = Envelope; })(Common = Telemetry.Common || (Telemetry.Common = {})); })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1078,7 +1105,7 @@ var Microsoft; this.aiDataContract = {}; } return Base; - }(Microsoft.Telemetry.Base)); + })(Microsoft.Telemetry.Base); Common.Base = Base; })(Common = Telemetry.Common || (Telemetry.Common = {})); })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); @@ -1154,7 +1181,7 @@ var AI; this.internalIsDiagnosticExample = "ai.internal.isDiagnosticExample"; } return ContextTagKeys; - }()); + })(); AI.ContextTagKeys = ContextTagKeys; })(AI || (AI = {})); var Microsoft; @@ -1167,6 +1194,7 @@ var Microsoft; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1178,7 +1206,7 @@ var Microsoft; function Application() { } return Application; - }()); + })(); Context.Application = Application; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -1193,6 +1221,7 @@ var Microsoft; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1206,7 +1235,7 @@ var Microsoft; this.type = "Browser"; } return Device; - }()); + })(); Context.Device = Device; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -1221,6 +1250,7 @@ var Microsoft; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1233,7 +1263,7 @@ var Microsoft; this.sdkVersion = "javascript:" + ApplicationInsights.Version; } return Internal; - }()); + })(); Context.Internal = Internal; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -1248,6 +1278,7 @@ var Microsoft; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1259,7 +1290,7 @@ var Microsoft; function Location() { } return Location; - }()); + })(); Context.Location = Location; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -1274,6 +1305,8 @@ var Microsoft; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1289,11 +1322,13 @@ var Microsoft; } } return Operation; - }()); + })(); Context.Operation = Operation; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1317,7 +1352,7 @@ var Microsoft; return score; }; return SamplingScoreGenerator; - }()); + })(); ApplicationInsights.SamplingScoreGenerator = SamplingScoreGenerator; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); @@ -1331,6 +1366,9 @@ var Microsoft; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1355,7 +1393,7 @@ var Microsoft; return score < this.sampleRate; }; return Sample; - }()); + })(); Context.Sample = Sample; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -1379,6 +1417,9 @@ var Microsoft; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1390,7 +1431,7 @@ var Microsoft; function Session() { } return Session; - }()); + })(); Context.Session = Session; var _SessionManager = (function () { function _SessionManager(config) { @@ -1495,7 +1536,7 @@ var Microsoft; _SessionManager.acquisitionSpan = 86400000; _SessionManager.renewalSpan = 1800000; return _SessionManager; - }()); + })(); Context._SessionManager = _SessionManager; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -1510,6 +1551,8 @@ var Microsoft; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1583,7 +1626,7 @@ var Microsoft; User.userCookieName = 'ai_user'; User.authUserCookieName = 'ai_authUser'; return User; - }()); + })(); Context.User = User; })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -1599,6 +1642,7 @@ var Microsoft; DataLossAnalyzer.reset = function () { if (DataLossAnalyzer.isEnabled()) { ApplicationInsights.Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, "0"); + ApplicationInsights.Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, "0"); DataLossAnalyzer.itemsRestoredFromSessionBuffer = 0; } }; @@ -1679,10 +1723,24 @@ var Microsoft; DataLossAnalyzer.ITEMS_QUEUED_KEY = "AI_itemsQueued"; DataLossAnalyzer.ISSUES_REPORTED_KEY = "AI_lossIssuesReported"; return DataLossAnalyzer; - }()); + })(); ApplicationInsights.DataLossAnalyzer = DataLossAnalyzer; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1721,10 +1779,11 @@ var Microsoft; this.clear(); }; return ArraySendBuffer; - }()); + })(); ApplicationInsights.ArraySendBuffer = ArraySendBuffer; var SessionStorageSendBuffer = (function () { function SessionStorageSendBuffer(config) { + this._bufferFullMessageSent = false; this._config = config; var bufferItems = this.getBuffer(SessionStorageSendBuffer.BUFFER_KEY); var notDeliveredItems = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY); @@ -1734,6 +1793,13 @@ var Microsoft; this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []); } SessionStorageSendBuffer.prototype.enqueue = function (payload) { + if (this._buffer.length >= SessionStorageSendBuffer.MAX_BUFFER_SIZE) { + if (!this._bufferFullMessageSent) { + ApplicationInsights._InternalLogging.throwInternalUserActionable(ApplicationInsights.LoggingSeverity.WARNING, new ApplicationInsights._InternalLogMessage(ApplicationInsights._InternalMessageId.USRACT_SessionStorageBufferFull, "Maximum buffer size reached: " + this._buffer.length)); + this._bufferFullMessageSent = true; + } + return; + } this._buffer.push(payload); this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer); }; @@ -1744,6 +1810,7 @@ var Microsoft; this._buffer.length = 0; this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, []); this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []); + this._bufferFullMessageSent = false; }; SessionStorageSendBuffer.prototype.getItems = function () { return this._buffer.slice(0); @@ -1812,11 +1879,28 @@ var Microsoft; }; SessionStorageSendBuffer.BUFFER_KEY = "AI_buffer"; SessionStorageSendBuffer.SENT_BUFFER_KEY = "AI_sentBuffer"; + SessionStorageSendBuffer.MAX_BUFFER_SIZE = 2000; return SessionStorageSendBuffer; - }()); + })(); ApplicationInsights.SessionStorageSendBuffer = SessionStorageSendBuffer; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// ; var Microsoft; (function (Microsoft) { @@ -1961,10 +2045,11 @@ var Microsoft; this._buffer.clearSent(payload); }; return Sender; - }()); + })(); ApplicationInsights.Sender = Sender; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -1978,7 +2063,7 @@ var Microsoft; return this.hashCodeGeneragor.getHashCodeScore(key) < percentEnabled; }; return SplitTest; - }()); + })(); ApplicationInsights.SplitTest = SplitTest; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); @@ -1991,7 +2076,7 @@ var Microsoft; function Domain() { } return Domain; - }()); + })(); Telemetry.Domain = Domain; })(Telemetry = Microsoft.Telemetry || (Microsoft.Telemetry = {})); })(Microsoft || (Microsoft = {})); @@ -2007,6 +2092,8 @@ var AI; })(AI.SeverityLevel || (AI.SeverityLevel = {})); var SeverityLevel = AI.SeverityLevel; })(AI || (AI = {})); +/// +/// var AI; (function (AI) { "use strict"; @@ -2019,9 +2106,11 @@ var AI; _super.call(this); } return MessageData; - }(Microsoft.Telemetry.Domain)); + })(Microsoft.Telemetry.Domain); AI.MessageData = MessageData; })(AI || (AI = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2134,12 +2223,14 @@ var Microsoft; DataSanitizer.MAX_MESSAGE_LENGTH = 32768; DataSanitizer.MAX_EXCEPTION_LENGTH = 32768; return DataSanitizer; - }()); + })(); Common.DataSanitizer = DataSanitizer; })(Common = Telemetry.Common || (Telemetry.Common = {})); })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2165,11 +2256,12 @@ var Microsoft; Trace.envelopeType = "Microsoft.ApplicationInsights.{0}.Message"; Trace.dataType = "MessageData"; return Trace; - }(AI.MessageData)); + })(AI.MessageData); Telemetry.Trace = Trace; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var AI; (function (AI) { "use strict"; @@ -2183,9 +2275,11 @@ var AI; _super.call(this); } return EventData; - }(Microsoft.Telemetry.Domain)); + })(Microsoft.Telemetry.Domain); AI.EventData = EventData; })(AI || (AI = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2210,7 +2304,7 @@ var Microsoft; Event.envelopeType = "Microsoft.ApplicationInsights.{0}.Event"; Event.dataType = "EventData"; return Event; - }(AI.EventData)); + })(AI.EventData); Telemetry.Event = Event; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -2224,9 +2318,12 @@ var AI; this.parsedStack = []; } return ExceptionDetails; - }()); + })(); AI.ExceptionDetails = ExceptionDetails; })(AI || (AI = {})); +/// +/// +/// var AI; (function (AI) { "use strict"; @@ -2241,7 +2338,7 @@ var AI; _super.call(this); } return ExceptionData; - }(Microsoft.Telemetry.Domain)); + })(Microsoft.Telemetry.Domain); AI.ExceptionData = ExceptionData; })(AI || (AI = {})); var AI; @@ -2251,9 +2348,12 @@ var AI; function StackFrame() { } return StackFrame; - }()); + })(); AI.StackFrame = StackFrame; })(AI || (AI = {})); +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2306,7 +2406,7 @@ var Microsoft; Exception.envelopeType = "Microsoft.ApplicationInsights.{0}.Exception"; Exception.dataType = "ExceptionData"; return Exception; - }(AI.ExceptionData)); + })(AI.ExceptionData); Telemetry.Exception = Exception; var _ExceptionDetails = (function (_super) { __extends(_ExceptionDetails, _super); @@ -2369,7 +2469,7 @@ var Microsoft; return parsedStack; }; return _ExceptionDetails; - }(AI.ExceptionDetails)); + })(AI.ExceptionDetails); var _StackFrame = (function (_super) { __extends(_StackFrame, _super); function _StackFrame(frame, level) { @@ -2401,11 +2501,12 @@ var Microsoft; _StackFrame.regex = /^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/; _StackFrame.baseSize = 58; return _StackFrame; - }(AI.StackFrame)); + })(AI.StackFrame); Telemetry._StackFrame = _StackFrame; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var AI; (function (AI) { "use strict"; @@ -2419,7 +2520,7 @@ var AI; _super.call(this); } return MetricData; - }(Microsoft.Telemetry.Domain)); + })(Microsoft.Telemetry.Domain); AI.MetricData = MetricData; })(AI || (AI = {})); var AI; @@ -2431,6 +2532,7 @@ var AI; })(AI.DataPointType || (AI.DataPointType = {})); var DataPointType = AI.DataPointType; })(AI || (AI = {})); +/// var AI; (function (AI) { "use strict"; @@ -2439,9 +2541,10 @@ var AI; this.kind = AI.DataPointType.Measurement; } return DataPoint; - }()); + })(); AI.DataPoint = DataPoint; })(AI || (AI = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2466,12 +2569,15 @@ var Microsoft; }; } return DataPoint; - }(AI.DataPoint)); + })(AI.DataPoint); Common.DataPoint = DataPoint; })(Common = Telemetry.Common || (Telemetry.Common = {})); })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2500,11 +2606,12 @@ var Microsoft; Metric.envelopeType = "Microsoft.ApplicationInsights.{0}.Metric"; Metric.dataType = "MetricData"; return Metric; - }(AI.MetricData)); + })(AI.MetricData); Telemetry.Metric = Metric; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var AI; (function (AI) { "use strict"; @@ -2518,9 +2625,11 @@ var AI; _super.call(this); } return PageViewData; - }(AI.EventData)); + })(AI.EventData); AI.PageViewData = PageViewData; })(AI || (AI = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2551,11 +2660,12 @@ var Microsoft; PageView.envelopeType = "Microsoft.ApplicationInsights.{0}.Pageview"; PageView.dataType = "PageviewData"; return PageView; - }(AI.PageViewData)); + })(AI.PageViewData); Telemetry.PageView = PageView; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var AI; (function (AI) { "use strict"; @@ -2569,9 +2679,12 @@ var AI; _super.call(this); } return PageViewPerfData; - }(AI.PageViewData)); + })(AI.PageViewData); AI.PageViewPerfData = PageViewPerfData; })(AI || (AI = {})); +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2661,11 +2774,29 @@ var Microsoft; PageViewPerformance.envelopeType = "Microsoft.ApplicationInsights.{0}.PageviewPerformance"; PageViewPerformance.dataType = "PageviewPerformanceData"; return PageViewPerformance; - }(AI.PageViewPerfData)); + })(AI.PageViewPerfData); Telemetry.PageViewPerformance = PageViewPerformance; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2673,6 +2804,16 @@ var Microsoft; "use strict"; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2888,10 +3029,11 @@ var Microsoft; } }; return TelemetryContext; - }()); + })(); ApplicationInsights.TelemetryContext = TelemetryContext; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var Telemetry; @@ -2903,10 +3045,11 @@ var Microsoft; _super.call(this); } return Data; - }(Microsoft.Telemetry.Base)); + })(Microsoft.Telemetry.Base); Telemetry.Data = Data; })(Telemetry = Microsoft.Telemetry || (Microsoft.Telemetry = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -2928,12 +3071,14 @@ var Microsoft; this.baseData = data; } return Data; - }(Microsoft.Telemetry.Data)); + })(Microsoft.Telemetry.Data); Common.Data = Data; })(Common = Telemetry.Common || (Telemetry.Common = {})); })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -3011,11 +3156,12 @@ var Microsoft; }, 100); }; return PageViewManager; - }()); + })(); Telemetry.PageViewManager = PageViewManager; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -3088,7 +3234,7 @@ var Microsoft; } }; return PageVisitTimeManager; - }()); + })(); Telemetry.PageVisitTimeManager = PageVisitTimeManager; var PageVisitData = (function () { function PageVisitData(pageName, pageUrl) { @@ -3097,7 +3243,7 @@ var Microsoft; this.pageUrl = pageUrl; } return PageVisitData; - }()); + })(); Telemetry.PageVisitData = PageVisitData; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -3122,6 +3268,10 @@ var AI; })(AI.DependencySourceType || (AI.DependencySourceType = {})); var DependencySourceType = AI.DependencySourceType; })(AI || (AI = {})); +/// +/// +/// +/// var AI; (function (AI) { "use strict"; @@ -3138,9 +3288,13 @@ var AI; _super.call(this); } return RemoteDependencyData; - }(Microsoft.Telemetry.Domain)); + })(Microsoft.Telemetry.Domain); AI.RemoteDependencyData = RemoteDependencyData; })(AI || (AI = {})); +/// +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -3191,7 +3345,7 @@ var Microsoft; RemoteDependencyData.envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency"; RemoteDependencyData.dataType = "RemoteDependencyData"; return RemoteDependencyData; - }(AI.RemoteDependencyData)); + })(AI.RemoteDependencyData); Telemetry.RemoteDependencyData = RemoteDependencyData; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); @@ -3203,6 +3357,9 @@ var Microsoft; "use strict"; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -3210,6 +3367,17 @@ var Microsoft; "use strict"; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -3245,12 +3413,7 @@ var Microsoft; cookieDomain: function () { return _this.config.cookieDomain; }, enableSessionStorageBuffer: function () { return _this.config.enableSessionStorageBuffer; } }; - var enableExperiment = new ApplicationInsights.SplitTest().isEnabled(this.config.instrumentationKey, 5); - this.config.enableSessionStorageBuffer = enableExperiment; this.context = new ApplicationInsights.TelemetryContext(configGetters); - ApplicationInsights.DataLossAnalyzer.appInsights = this; - ApplicationInsights.DataLossAnalyzer.enabled = enableExperiment; - ApplicationInsights.DataLossAnalyzer.reportLostItems(); this._pageViewManager = new Microsoft.ApplicationInsights.Telemetry.PageViewManager(this, this.config.overridePageViewDuration); this._eventTracking = new Timing("trackEvent"); this._eventTracking.action = function (name, url, duration, properties, measurements) { @@ -3354,7 +3517,7 @@ var Microsoft; ApplicationInsights._InternalLogging.throwInternalNonUserActionable(ApplicationInsights.LoggingSeverity.CRITICAL, new ApplicationInsights._InternalLogMessage(ApplicationInsights._InternalMessageId.NONUSRACT_TrackEventFailed, "trackEvent failed, event will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) })); } }; - AppInsights.prototype.trackAjax = function (id, absoluteUrl, pathName, totalTime, success, resultCode, method) { + AppInsights.prototype.trackDependency = function (id, method, absoluteUrl, pathName, totalTime, success, resultCode) { if (this.config.maxAjaxCallsPerView === -1 || this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) { var dependency = new ApplicationInsights.Telemetry.RemoteDependencyData(id, absoluteUrl, pathName, totalTime, success, resultCode, method); @@ -3367,6 +3530,9 @@ var Microsoft; } ++this._trackAjaxAttempts; }; + AppInsights.prototype.trackAjax = function (id, absoluteUrl, pathName, totalTime, success, resultCode, method) { + this.trackDependency(id, null, absoluteUrl, pathName, totalTime, success, resultCode); + }; AppInsights.prototype.trackException = function (exception, handledAt, properties, measurements, severityLevel) { try { if (!ApplicationInsights.Util.isError(exception)) { @@ -3465,7 +3631,7 @@ var Microsoft; } }; return AppInsights; - }()); + })(); ApplicationInsights.AppInsights = AppInsights; var Timing = (function () { function Timing(name) { @@ -3492,9 +3658,10 @@ var Microsoft; this._events[name] = undefined; }; return Timing; - }()); + })(); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -3576,6 +3743,7 @@ var Microsoft; }, this.config.diagnosticLogInterval); }; Initialization.prototype.addHousekeepingBeforeUnload = function (appInsightsInstance) { + // Add callback to push events when the user navigates away if (!appInsightsInstance.config.disableFlushOnBeforeUnload && ('onbeforeunload' in window)) { var performHousekeeping = function () { appInsightsInstance.context._sender.triggerSend(); @@ -3623,10 +3791,11 @@ var Microsoft; return config; }; return Initialization; - }()); + })(); ApplicationInsights.Initialization = Initialization; })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var Microsoft; (function (Microsoft) { var ApplicationInsights; @@ -3656,6 +3825,7 @@ var Microsoft; } })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); +/// var AI; (function (AI) { "use strict"; @@ -3669,9 +3839,10 @@ var AI; _super.call(this); } return AjaxCallData; - }(AI.PageViewData)); + })(AI.PageViewData); AI.AjaxCallData = AjaxCallData; })(AI || (AI = {})); +/// var AI; (function (AI) { "use strict"; @@ -3685,9 +3856,11 @@ var AI; _super.call(this); } return RequestData; - }(Microsoft.Telemetry.Domain)); + })(Microsoft.Telemetry.Domain); AI.RequestData = RequestData; })(AI || (AI = {})); +/// +/// var AI; (function (AI) { "use strict"; @@ -3700,7 +3873,7 @@ var AI; _super.call(this); } return SessionStateData; - }(Microsoft.Telemetry.Domain)); + })(Microsoft.Telemetry.Domain); AI.SessionStateData = SessionStateData; })(AI || (AI = {})); var AI; From ec91fe25195ccb70732cd161ceae7f53d52275be Mon Sep 17 00:00:00 2001 From: Kamil Szostak Date: Wed, 6 Jul 2016 13:45:53 -0700 Subject: [PATCH 2/2] Update dist - v0.23.0 --- dist/ai.0.js | 2 +- dist/ai.js | 30 ++++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/dist/ai.0.js b/dist/ai.0.js index cf3c5c042..e9b961b42 100644 --- a/dist/ai.0.js +++ b/dist/ai.0.js @@ -1 +1 @@ -var __extends,Microsoft,AI;(function(n){var t;(function(n){var r,t,i,u;(function(n){n[n.CRITICAL=0]="CRITICAL";n[n.WARNING=1]="WARNING"})(n.LoggingSeverity||(n.LoggingSeverity={}));r=n.LoggingSeverity,function(n){n[n.NONUSRACT_BrowserDoesNotSupportLocalStorage=0]="NONUSRACT_BrowserDoesNotSupportLocalStorage";n[n.NONUSRACT_BrowserCannotReadLocalStorage=1]="NONUSRACT_BrowserCannotReadLocalStorage";n[n.NONUSRACT_BrowserCannotReadSessionStorage=2]="NONUSRACT_BrowserCannotReadSessionStorage";n[n.NONUSRACT_BrowserCannotWriteLocalStorage=3]="NONUSRACT_BrowserCannotWriteLocalStorage";n[n.NONUSRACT_BrowserCannotWriteSessionStorage=4]="NONUSRACT_BrowserCannotWriteSessionStorage";n[n.NONUSRACT_BrowserFailedRemovalFromLocalStorage=5]="NONUSRACT_BrowserFailedRemovalFromLocalStorage";n[n.NONUSRACT_BrowserFailedRemovalFromSessionStorage=6]="NONUSRACT_BrowserFailedRemovalFromSessionStorage";n[n.NONUSRACT_CannotSendEmptyTelemetry=7]="NONUSRACT_CannotSendEmptyTelemetry";n[n.NONUSRACT_ClientPerformanceMathError=8]="NONUSRACT_ClientPerformanceMathError";n[n.NONUSRACT_ErrorParsingAISessionCookie=9]="NONUSRACT_ErrorParsingAISessionCookie";n[n.NONUSRACT_ErrorPVCalc=10]="NONUSRACT_ErrorPVCalc";n[n.NONUSRACT_ExceptionWhileLoggingError=11]="NONUSRACT_ExceptionWhileLoggingError";n[n.NONUSRACT_FailedAddingTelemetryToBuffer=12]="NONUSRACT_FailedAddingTelemetryToBuffer";n[n.NONUSRACT_FailedMonitorAjaxAbort=13]="NONUSRACT_FailedMonitorAjaxAbort";n[n.NONUSRACT_FailedMonitorAjaxDur=14]="NONUSRACT_FailedMonitorAjaxDur";n[n.NONUSRACT_FailedMonitorAjaxOpen=15]="NONUSRACT_FailedMonitorAjaxOpen";n[n.NONUSRACT_FailedMonitorAjaxRSC=16]="NONUSRACT_FailedMonitorAjaxRSC";n[n.NONUSRACT_FailedMonitorAjaxSend=17]="NONUSRACT_FailedMonitorAjaxSend";n[n.NONUSRACT_FailedToAddHandlerForOnBeforeUnload=18]="NONUSRACT_FailedToAddHandlerForOnBeforeUnload";n[n.NONUSRACT_FailedToSendQueuedTelemetry=19]="NONUSRACT_FailedToSendQueuedTelemetry";n[n.NONUSRACT_FailedToReportDataLoss=20]="NONUSRACT_FailedToReportDataLoss";n[n.NONUSRACT_FlushFailed=21]="NONUSRACT_FlushFailed";n[n.NONUSRACT_MessageLimitPerPVExceeded=22]="NONUSRACT_MessageLimitPerPVExceeded";n[n.NONUSRACT_MissingRequiredFieldSpecification=23]="NONUSRACT_MissingRequiredFieldSpecification";n[n.NONUSRACT_NavigationTimingNotSupported=24]="NONUSRACT_NavigationTimingNotSupported";n[n.NONUSRACT_OnError=25]="NONUSRACT_OnError";n[n.NONUSRACT_SessionRenewalDateIsZero=26]="NONUSRACT_SessionRenewalDateIsZero";n[n.NONUSRACT_SenderNotInitialized=27]="NONUSRACT_SenderNotInitialized";n[n.NONUSRACT_StartTrackEventFailed=28]="NONUSRACT_StartTrackEventFailed";n[n.NONUSRACT_StopTrackEventFailed=29]="NONUSRACT_StopTrackEventFailed";n[n.NONUSRACT_StartTrackFailed=30]="NONUSRACT_StartTrackFailed";n[n.NONUSRACT_StopTrackFailed=31]="NONUSRACT_StopTrackFailed";n[n.NONUSRACT_TelemetrySampledAndNotSent=32]="NONUSRACT_TelemetrySampledAndNotSent";n[n.NONUSRACT_TrackEventFailed=33]="NONUSRACT_TrackEventFailed";n[n.NONUSRACT_TrackExceptionFailed=34]="NONUSRACT_TrackExceptionFailed";n[n.NONUSRACT_TrackMetricFailed=35]="NONUSRACT_TrackMetricFailed";n[n.NONUSRACT_TrackPVFailed=36]="NONUSRACT_TrackPVFailed";n[n.NONUSRACT_TrackPVFailedCalc=37]="NONUSRACT_TrackPVFailedCalc";n[n.NONUSRACT_TrackTraceFailed=38]="NONUSRACT_TrackTraceFailed";n[n.NONUSRACT_TransmissionFailed=39]="NONUSRACT_TransmissionFailed";n[n.NONUSRACT_FailToSetStorageBuffer=40]="NONUSRACT_FailToSetStorageBuffer";n[n.NONUSRACT_FailToRestoreStorageBuffer=41]="NONUSRACT_FailToRestoreStorageBuffer";n[n.USRACT_CannotSerializeObject=42]="USRACT_CannotSerializeObject";n[n.USRACT_CannotSerializeObjectNonSerializable=43]="USRACT_CannotSerializeObjectNonSerializable";n[n.USRACT_CircularReferenceDetected=44]="USRACT_CircularReferenceDetected";n[n.USRACT_ClearAuthContextFailed=45]="USRACT_ClearAuthContextFailed";n[n.USRACT_ExceptionTruncated=46]="USRACT_ExceptionTruncated";n[n.USRACT_IllegalCharsInName=47]="USRACT_IllegalCharsInName";n[n.USRACT_ItemNotInArray=48]="USRACT_ItemNotInArray";n[n.USRACT_MaxAjaxPerPVExceeded=49]="USRACT_MaxAjaxPerPVExceeded";n[n.USRACT_MessageTruncated=50]="USRACT_MessageTruncated";n[n.USRACT_NameTooLong=51]="USRACT_NameTooLong";n[n.USRACT_SampleRateOutOfRange=52]="USRACT_SampleRateOutOfRange";n[n.USRACT_SetAuthContextFailed=53]="USRACT_SetAuthContextFailed";n[n.USRACT_SetAuthContextFailedAccountName=54]="USRACT_SetAuthContextFailedAccountName";n[n.USRACT_StringValueTooLong=55]="USRACT_StringValueTooLong";n[n.USRACT_StartCalledMoreThanOnce=56]="USRACT_StartCalledMoreThanOnce";n[n.USRACT_StopCalledWithoutStart=57]="USRACT_StopCalledWithoutStart";n[n.USRACT_TelemetryInitializerFailed=58]="USRACT_TelemetryInitializerFailed";n[n.USRACT_TrackArgumentsNotSpecified=59]="USRACT_TrackArgumentsNotSpecified";n[n.USRACT_UrlTooLong=60]="USRACT_UrlTooLong";n[n.USRACT_SessionStorageBufferFull=61]="USRACT_SessionStorageBufferFull"}(n._InternalMessageId||(n._InternalMessageId={}));t=n._InternalMessageId;i=function(){function n(i,r,u){this.message=t[i].toString();this.messageId=i;var f=(r?" message:"+n.sanitizeDiagnosticText(r):"")+(u?" props:"+n.sanitizeDiagnosticText(JSON.stringify(u)):"");this.message+=f}return n.sanitizeDiagnosticText=function(n){return'"'+n.replace(/\"/g,"")+'"'},n}();n._InternalLogMessage=i;u=function(){function u(){}return u.throwInternalNonUserActionable=function(n,t){if(this.enableDebugExceptions())throw t;else typeof t=="undefined"||!t||typeof t.message!="undefined"&&(t.message=this.AiNonUserActionablePrefix+t.message,this.verboseLogging()&&this.warnToConsole(t.message),this.logInternalMessage(n,t))},u.throwInternalUserActionable=function(n,t){if(this.enableDebugExceptions())throw t;else typeof t=="undefined"||!t||typeof t.message!="undefined"&&(t.message=this.AiUserActionablePrefix+t.message,this.warnToConsole(t.message),this.logInternalMessage(n,t))},u.warnToConsole=function(n){typeof console=="undefined"||!console||(typeof console.warn=="function"?console.warn(n):typeof console.log=="function"&&console.log(n))},u.resetInternalMessageCount=function(){this._messageCount=0},u.clearInternalMessageLoggedTypes=function(){var i,t;if(n.Util.canUseSessionStorage())for(i=n.Util.getSessionStorageKeys(),t=0;t=this.MAX_INTERNAL_MESSAGE_LIMIT},u.AiUserActionablePrefix="AI: ",u.AIInternalMessagePrefix="AITR_",u.AiNonUserActionablePrefix="AI (Internal): ",u.enableDebugExceptions=function(){return!1},u.verboseLogging=function(){return!1},u.queue=[],u.MAX_INTERNAL_MESSAGE_LIMIT=25,u._messageCount=0,u}();n._InternalLogging=u})(t=n.ApplicationInsights||(n.ApplicationInsights={}))})(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t,i,r;(function(n){n[n.LocalStorage=0]="LocalStorage";n[n.SessionStorage=1]="SessionStorage"})(t||(t={}));i=function(){function i(){}return i._getLocalStorageObject=function(){return i._getVerifiedStorageObject(t.LocalStorage)},i._getVerifiedStorageObject=function(n){var i=null,u,r;try{r=new Date;i=n===t.LocalStorage?window.localStorage:window.sessionStorage;i.setItem(r,r);u=i.getItem(r)!=r;i.removeItem(r);u&&(i=null)}catch(f){i=null}return i},i.canUseLocalStorage=function(){return!!i._getLocalStorageObject()},i.getStorage=function(t){var r=i._getLocalStorageObject(),f;if(r!==null)try{return r.getItem(t)}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,f)}return null},i.setStorage=function(t,r){var u=i._getLocalStorageObject(),e;if(u!==null)try{return u.setItem(t,r),!0}catch(f){e=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+i.getExceptionName(f),{exception:i.dump(f)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,e)}return!1},i.removeStorage=function(t){var r=i._getLocalStorageObject(),f;if(r!==null)try{return r.removeItem(t),!0}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,f)}return!1},i._getSessionStorageObject=function(){return i._getVerifiedStorageObject(t.SessionStorage)},i.canUseSessionStorage=function(){return!!i._getSessionStorageObject()},i.getSessionStorageKeys=function(){var n=[],t;if(i.canUseSessionStorage())for(t in window.sessionStorage)n.push(t);return n},i.getSessionStorage=function(t){var r=i._getSessionStorageObject(),f;if(r!==null)try{return r.getItem(t)}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,f)}return null},i.setSessionStorage=function(t,r){var u=i._getSessionStorageObject(),e;if(u!==null)try{return u.setItem(t,r),!0}catch(f){e=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+i.getExceptionName(f),{exception:i.dump(f)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,e)}return!1},i.removeSessionStorage=function(t){var r=i._getSessionStorageObject(),f;if(r!==null)try{return r.removeItem(t),!0}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,f)}return!1},i.setCookie=function(n,t,r){var u="";r&&(u=";domain="+r);i.document.cookie=n+"="+t+u+";path=/"},i.stringToBoolOrDefault=function(n){return n?n.toString().toLowerCase()==="true":!1},i.getCookie=function(n){var e="",f,u,r,t;if(n&&n.length)for(f=n+"=",u=i.document.cookie.split(";"),r=0;r0;)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n%64),t+=i,n=Math.floor(n/64);return t},i.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"},i.isError=function(n){return Object.prototype.toString.call(n)==="[object Error]"},i.isDate=function(n){return Object.prototype.toString.call(n)==="[object Date]"},i.toISOStringForIE8=function(n){if(i.isDate(n)){function t(n){var t=String(n);return t.length===1&&(t="0"+t),t}return Date.prototype.toISOString?n.toISOString():n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},i.getIEVersion=function(n){n===void 0&&(n=null);var t=n?n.toLowerCase():navigator.userAgent.toLowerCase();return t.indexOf("msie")!=-1?parseInt(t.split("msie")[1]):null},i.msToTimeSpan=function(n){(isNaN(n)||n<0)&&(n=0);var t=""+n%1e3,i=""+Math.floor(n/1e3)%60,r=""+Math.floor(n/6e4)%60,u=""+Math.floor(n/36e5)%24;return t=t.length===1?"00"+t:t.length===2?"0"+t:t,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,u=u.length<2?"0"+u:u,u+":"+r+":"+i+"."+t},i.isCrossOriginError=function(n,t,i,r,u){return(n==="Script error."||n==="Script error")&&u===null},i.dump=function(n){var t=Object.prototype.toString.call(n),i=JSON.stringify(n);return t==="[object Error]"&&(i="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'"),t+i},i.getExceptionName=function(n){var t=Object.prototype.toString.call(n);return t==="[object Error]"?n.name:""},i.addEventHandler=function(n,t){if(!window||typeof n!="string"||typeof t!="function")return!1;var i="on"+n;if(window.addEventListener)window.addEventListener(n,t,!1);else if(window.attachEvent)window.attachEvent.call(i,t);else return!1;return!0},i.document=typeof document!="undefined"?document:{},i.NotSpecified="not_specified",i}();n.Util=i;r=function(){function n(){}return n.parseUrl=function(t){return n.htmlAnchorElement||(n.htmlAnchorElement=!n.document.createElement?{}:n.document.createElement("a")),n.htmlAnchorElement.href=t,n.htmlAnchorElement},n.getAbsoluteUrl=function(t){var i,r=n.parseUrl(t);return r&&(i=r.href),i},n.getPathName=function(t){var i,r=n.parseUrl(t);return r&&(i=r.pathname),i},n.document=typeof document!="undefined"?document:{},n}();n.UrlHelper=r})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.IsNullOrUndefined=function(n){return typeof n=="undefined"||n===null},n}(),i,r,u;n.extensions=t;i=function(){function n(){}return n.GetLength=function(n){var i=0,r;if(!t.IsNullOrUndefined(n)){r="";try{r=n.toString()}catch(u){}i=r.length;i=isNaN(i)?0:i}return i},n}();n.stringUtils=i;r=function(){function n(){}return n.Now=window.performance&&window.performance.now?function(){return performance.now()}:function(){return(new Date).getTime()},n.GetDuration=function(n,i){var r=null;return n===0||i===0||t.IsNullOrUndefined(n)||t.IsNullOrUndefined(i)||(r=i-n),r},n}();n.dateTime=r;u=function(){function n(){}return n.AttachEvent=function(n,i,r){var u=!1;return t.IsNullOrUndefined(n)||(t.IsNullOrUndefined(n.attachEvent)?t.IsNullOrUndefined(n.addEventListener)||(n.addEventListener(i,r,!1),u=!0):(n.attachEvent("on"+i,r),u=!0)),u},n.DetachEvent=function(n,i,r){t.IsNullOrUndefined(n)||(t.IsNullOrUndefined(n.detachEvent)?t.IsNullOrUndefined(n.removeEventListener)||n.removeEventListener(i,r,!1):n.detachEvent("on"+i,r))},n}();n.EventHelper=u})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function n(){this.openDone=!1;this.setRequestHeaderDone=!1;this.sendDone=!1;this.abortDone=!1;this.onreadystatechangeCallbackAttached=!1}return n}(),i;n.XHRMonitoringState=t;i=function(){function i(i){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=n.dateTime.GetDuration(t.requestSentTime,t.responseFinishedTime)};this.id=i}return i.prototype.getAbsoluteUrl=function(){return this.requestUrl?n.UrlHelper.getAbsoluteUrl(this.requestUrl):null},i.prototype.getPathName=function(){return this.requestUrl?n.UrlHelper.getPathName(this.requestUrl):null},i}();n.ajaxRecord=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){"use strict";var i=function(){function i(n){this.currentWindowHost=window.location.host;this.appInsights=n;this.initialized=!1;this.Init()}return i.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},i.prototype.isMonitoredInstance=function(n,r){return this.initialized&&(r===!0||!t.extensions.IsNullOrUndefined(n.ajaxData))&&n[i.DisabledPropertyName]!==!0},i.prototype.supportsMonitoring=function(){var n=!1;return t.extensions.IsNullOrUndefined(XMLHttpRequest)||(n=!0),n},i.prototype.instrumentOpen=function(){var u=XMLHttpRequest.prototype.open,r=this;XMLHttpRequest.prototype.open=function(f,e,o){try{!r.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||r.openHandler(this,f,e,o)}catch(s){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(s)}))}return u.apply(this,arguments)}},i.prototype.openHandler=function(n,i,r){var u=new t.ajaxRecord(t.Util.newId());u.method=i;u.requestUrl=r;u.xhrMonitoringState.openDone=!0;n.ajaxData=u;this.attachToOnReadyStateChange(n)},i.getFailedAjaxDiagnosticsMessage=function(n){var i="";try{t.extensions.IsNullOrUndefined(n)||t.extensions.IsNullOrUndefined(n.ajaxData)||t.extensions.IsNullOrUndefined(n.ajaxData.requestUrl)||(i+="(url: '"+n.ajaxData.requestUrl+"')")}catch(r){}return i},i.prototype.instrumentSend=function(){var u=XMLHttpRequest.prototype.send,r=this;XMLHttpRequest.prototype.send=function(f){try{r.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&r.sendHandler(this,f)}catch(e){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(e)}))}return u.apply(this,arguments)}},i.prototype.sendHandler=function(n){n.ajaxData.requestSentTime=t.dateTime.Now();this.appInsights.config.disableCorrelationHeaders||t.UrlHelper.parseUrl(n.ajaxData.getAbsoluteUrl()).host!=this.currentWindowHost||n.setRequestHeader("x-ms-request-id",n.ajaxData.id);n.ajaxData.xhrMonitoringState.sendDone=!0},i.prototype.instrumentAbort=function(){var r=XMLHttpRequest.prototype.abort,u=this;XMLHttpRequest.prototype.abort=function(){try{u.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(f){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(f)}))}return r.apply(this,arguments)}},i.prototype.attachToOnReadyStateChange=function(r){var u=this;r.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=t.EventHelper.AttachEvent(r,"readystatechange",function(){try{if(u.isMonitoredInstance(r)&&r.readyState===4)u.onAjaxComplete(r)}catch(f){var e=n.ApplicationInsights.Util.dump(f);e&&e.toLowerCase().indexOf("c00c023f")!=-1||t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(r),exception:n.ApplicationInsights.Util.dump(f)}))}})},i.prototype.onAjaxComplete=function(n){n.ajaxData.responseFinishedTime=t.dateTime.Now();n.ajaxData.status=n.status;n.ajaxData.CalculateMetrics();n.ajaxData.ajaxTotalDuration<0?t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.WARNING,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(n),requestSentTime:n.ajaxData.requestSentTime,responseFinishedTime:n.ajaxData.responseFinishedTime})):(this.appInsights.trackDependency(n.ajaxData.id,n.ajaxData.method,n.ajaxData.getAbsoluteUrl(),n.ajaxData.getPathName(),n.ajaxData.ajaxTotalDuration,+n.ajaxData.status>=200&&+n.ajaxData.status<400,+n.ajaxData.status),n.ajaxData=null)},i.instrumentedByAppInsightsName="InstrumentedByAppInsights",i.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",i}();t.AjaxMonitor=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.getHashCodeScore=function(t){var i=this.getHashCode(t)/n.INT_MAX_VALUE;return i*100},n.prototype.getHashCode=function(t){var i,r;if(t=="")return 0;while(t.length100||t<0)&&(n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_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})),this.sampleRate=100);this.sampleRate=t;this.samplingScoreGenerator=new n.SamplingScoreGenerator}return t.prototype.isSampledIn=function(n){if(this.sampleRate==100)return!0;var t=this.samplingScoreGenerator.getSamplingScore(n);return tthis.config.sessionExpirationMs(),i=n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||i?(this.automaticSession.isFirst=undefined,this.renew()):(this.automaticSession.renewalDate=+new Date,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=n.Util.getCookie("ai_session"),i;t&&typeof t.split=="function"?this.initializeAutomaticSessionWithData(t):(i=n.Util.getStorage("ai_session"),i&&this.initializeAutomaticSessionWithData(i));this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},t.prototype.initializeAutomaticSessionWithData=function(t){var i=t.split("|"),r,u;i.length>0&&(this.automaticSession.id=i[0]);try{i.length>1&&(r=+i[1],this.automaticSession.acquisitionDate=+new Date(r),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0);i.length>2&&(u=+i[2],this.automaticSession.renewalDate=+new Date(u),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(f){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+n.Util.getExceptionName(f),{exception:n.Util.dump(f)}))}this.automaticSession.renewalDate==0&&n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset."))},t.prototype.renew=function(){var t=+new Date;this.automaticSession.id=n.Util.newId();this.automaticSession.acquisitionDate=t;this.automaticSession.renewalDate=t;this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate);n.Util.canUseLocalStorage()||n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate."))},t.prototype.setCookie=function(t,i,r){var f=i+this.config.sessionExpirationMs(),e=r+this.config.sessionRenewalMs(),u=new Date,s=[t,i,r],o;f0&&(this.id=e[0]));this.config=i;this.id||(this.id=n.Util.newId(),u=new Date,o=n.Util.toISOStringForIE8(u),this.accountAcquisitionDate=o,u.setTime(u.getTime()+31536e6),h=[this.id,o],c=this.config.cookieDomain?this.config.cookieDomain():undefined,n.Util.setCookie(t.userCookieName,h.join(t.cookieSeparator)+";expires="+u.toUTCString(),c),n.Util.removeStorage("ai_session"));this.accountId=i.accountId?i.accountId():undefined;f=n.Util.getCookie(t.authUserCookieName);f&&(f=decodeURI(f),r=f.split(t.cookieSeparator),r[0]&&(this.authenticatedId=r[0]),r.length>1&&r[1]&&(this.accountId=r[1]))}return t.prototype.setAuthenticatedUserContext=function(i,r){var f=!this.validateUserInput(i)||r&&!this.validateUserInput(r),u;if(f){n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_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."));return}this.authenticatedId=i;u=this.authenticatedId;r&&(this.accountId=r,u=[this.authenticatedId,this.accountId].join(t.cookieSeparator));n.Util.setCookie(t.authUserCookieName,encodeURI(u),this.config.cookieDomain())},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null;this.accountId=null;n.Util.deleteCookie(t.authUserCookieName)},t.prototype.validateUserInput=function(n){return typeof n!="string"||!n||n.match(/,|;|=| |\|/)?!1:!0},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}();t.User=i})(t=n.Context||(n.Context={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.reset=function(){t.isEnabled()&&(n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,"0"),n.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,"0"),t.itemsRestoredFromSessionBuffer=0)},t.isEnabled=function(){return t.enabled&&t.appInsights!=null&&t.appInsights.context._sender._XMLHttpRequestSupported&&n.Util.canUseSessionStorage()},t.getIssuesReported=function(){return!t.isEnabled()||isNaN(+n.Util.getSessionStorage(t.ISSUES_REPORTED_KEY))?0:+n.Util.getSessionStorage(t.ISSUES_REPORTED_KEY)},t.incrementItemsQueued=function(){try{if(t.isEnabled()){var i=t.getNumberOfLostItems();++i;n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,i.toString())}}catch(r){}},t.decrementItemsQueued=function(i){try{if(t.isEnabled()){var r=t.getNumberOfLostItems();r-=i;r<0&&(r=0);n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,r.toString())}}catch(u){}},t.getNumberOfLostItems=function(){var i=0;try{t.isEnabled()&&(i=isNaN(+n.Util.getSessionStorage(t.ITEMS_QUEUED_KEY))?0:+n.Util.getSessionStorage(t.ITEMS_QUEUED_KEY))}catch(r){i=0}return i},t.reportLostItems=function(){var r,i;try{t.isEnabled()&&t.getIssuesReported()0&&(r=t.getNumberOfLostItems()-t.itemsRestoredFromSessionBuffer,t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+r+'"',null),t.appInsights.flush(),i=t.getIssuesReported(),++i,n.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,i.toString()))}catch(u){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailedToReportDataLoss,"Failed to report data loss: "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}finally{try{t.reset()}catch(u){}}},t.enabled=!1,t.itemsRestoredFromSessionBuffer=0,t.LIMIT_PER_SESSION=10,t.ITEMS_QUEUED_KEY="AI_itemsQueued",t.ISSUES_REPORTED_KEY="AI_lossIssuesReported",t}();n.DataLossAnalyzer=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var i=function(){function n(n){this._config=n;this._buffer=[]}return n.prototype.enqueue=function(n){this._buffer.push(n)},n.prototype.count=function(){return this._buffer.length},n.prototype.clear=function(){this._buffer.length=0},n.prototype.getItems=function(){return this._buffer.slice(0)},n.prototype.batchPayloads=function(n){return n&&n.length>0?this._config.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null},n.prototype.markAsSent=function(){this.clear()},n.prototype.clearSent=function(){this.clear()},n}(),t;n.ArraySendBuffer=i;t=function(){function t(i){this._bufferFullMessageSent=!1;this._config=i;var r=this.getBuffer(t.BUFFER_KEY),u=this.getBuffer(t.SENT_BUFFER_KEY);this._buffer=r.concat(u);n.DataLossAnalyzer.itemsRestoredFromSessionBuffer=this._buffer.length;this.setBuffer(t.BUFFER_KEY,this._buffer);this.setBuffer(t.SENT_BUFFER_KEY,[])}return t.prototype.enqueue=function(i){if(this._buffer.length>=t.MAX_BUFFER_SIZE){this._bufferFullMessageSent||(n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length)),this._bufferFullMessageSent=!0);return}this._buffer.push(i);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(n){return n&&n.length>0?this._config.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null},t.prototype.markAsSent=function(n){var i=this.getBuffer(t.SENT_BUFFER_KEY);i=i.concat(n);this._buffer=this.removePayloadsFromBuffer(n,this._buffer);this.setBuffer(t.BUFFER_KEY,this._buffer);this.setBuffer(t.SENT_BUFFER_KEY,i)},t.prototype.clearSent=function(n){var i=this.getBuffer(t.SENT_BUFFER_KEY);i=this.removePayloadsFromBuffer(n,i);this.setBuffer(t.SENT_BUFFER_KEY,i)},t.prototype.removePayloadsFromBuffer=function(n,t){var u=[],i,r,f;for(i in t){r=!1;for(f in n)if(n[f]===t[i]){r=!0;break}r||u.push(t[i])}return u},t.prototype.getBuffer=function(t){var i,r;try{if(i=n.Util.getSessionStorage(t),i&&(r=JSON.parse(i),r))return r}catch(u){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailToRestoreStorageBuffer," storage key: "+t+", "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}return[]},t.prototype.setBuffer=function(t,i){try{var u=JSON.stringify(i);n.Util.setSessionStorage(t,u)}catch(r){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailToSetStorageBuffer," storage key: "+t+", "+n.Util.getExceptionName(r),{exception:n.Util.dump(r)}))}},t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}();n.SessionStorageSendBuffer=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){if(this._XMLHttpRequestSupported=!1,this._lastSend=0,this._config=t,this._sender=null,this._buffer=n.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new n.SessionStorageSendBuffer(t):new n.ArraySendBuffer(t),typeof XMLHttpRequest!="undefined"){var i=new XMLHttpRequest;"withCredentials"in i?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):typeof XDomainRequest!="undefined"&&(this._sender=this._xdrSender)}}return t.prototype.send=function(t){var i=this;try{if(this._config.disableTelemetry())return;if(!t){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_CannotSendEmptyTelemetry,"Cannot send empty telemetry"));return}if(!this._sender){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_SenderNotInitialized,"Sender was not initialized"));return}var r=n.Serializer.serialize(t),e=this._buffer.getItems(),u=this._buffer.batchPayloads(e);u&&u.length+r.length>this._config.maxBatchSizeInBytes()&&this.triggerSend();this._buffer.enqueue(r);this._timeoutHandle||(this._timeoutHandle=setTimeout(function(){i._timeoutHandle=null;i.triggerSend()},this._config.maxBatchInterval()));n.DataLossAnalyzer.incrementItemsQueued()}catch(f){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+n.Util.getExceptionName(f),{exception:n.Util.dump(f)}))}},t.prototype._getSizeInBytes=function(n){var r=0,t,i;if(n&&n.length)for(t=0;t0&&(r=this._buffer.getItems(),this._sender(r,i)),this._lastSend=+new Date);clearTimeout(this._timeoutHandle);this._timeoutHandle=null}catch(u){(!n.Util.getIEVersion()||n.Util.getIEVersion()>9)&&n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}},t.prototype._xhrSender=function(t,i){var u=this,r=new XMLHttpRequest,f;r[n.AjaxMonitor.DisabledPropertyName]=!0;r.open("POST",this._config.endpointUrl(),i);r.setRequestHeader("Content-type","application/json");r.onreadystatechange=function(){return u._xhrReadyStateChange(r,t,t.length)};r.onerror=function(n){return u._onError(t,r.responseText||r.response||"",n)};f=this._buffer.batchPayloads(t);r.send(f);this._buffer.markAsSent(t)},t.prototype._xdrSender=function(n){var i=this,t=new XDomainRequest,r;t.onload=function(){return i._xdrOnLoad(t,n)};t.onerror=function(r){return i._onError(n,t.responseText||"",r)};t.open("POST",this._config.endpointUrl());r=this._buffer.batchPayloads(n);t.send(r);this._buffer.markAsSent(n)},t.prototype._xhrReadyStateChange=function(n,t,i){n.readyState===4&&((n.status<200||n.status>=300)&&n.status!==0?this._onError(t,n.responseText||n.response||""):this._onSuccess(t,i))},t.prototype._xdrOnLoad=function(n,t){n&&(n.responseText+""=="200"||n.responseText==="")?this._onSuccess(t,0):this._onError(t,n&&n.responseText||"")},t.prototype._onError=function(t,i){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_OnError,"Failed to send telemetry.",{message:i}));this._buffer.clearSent(t)},t.prototype._onSuccess=function(t,i){n.DataLossAnalyzer.decrementItemsQueued(i);this._buffer.clearSent(t)},t}();n.Sender=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(){this.hashCodeGeneragor=new n.HashCodeScoreGenerator}return t.prototype.isEnabled=function(n,t){return this.hashCodeGeneragor.getHashCodeScore(n)=0&&(i=i.replace(/[^0-9a-zA-Z-._()\/ ]/g,"_"),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_IllegalCharsInName,"name contains illegal characters. Illegal characters have been replaced with '_'.",{newName:i}))),i.length>t.MAX_NAME_LENGTH&&(i=i.substring(0,t.MAX_NAME_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_NameTooLong,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:i})))),i},t.sanitizeString=function(i){return i&&(i=n.Util.trim(i),i.toString().length>t.MAX_STRING_LENGTH&&(i=i.toString().substring(0,t.MAX_STRING_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_StringValueTooLong,"string value is too long. It has been truncated to "+t.MAX_STRING_LENGTH+" characters.",{value:i})))),i},t.sanitizeUrl=function(i){return i&&(i=n.Util.trim(i),i.length>t.MAX_URL_LENGTH&&(i=i.substring(0,t.MAX_URL_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_UrlTooLong,"url is too long, it has been trucated to "+t.MAX_URL_LENGTH+" characters.",{url:i})))),i},t.sanitizeMessage=function(i){return i&&i.length>t.MAX_MESSAGE_LENGTH&&(i=i.substring(0,t.MAX_MESSAGE_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_MessageTruncated,"message is too long, it has been trucated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:i}))),i},t.sanitizeException=function(i){return i&&i.length>t.MAX_EXCEPTION_LENGTH&&(i=i.substring(0,t.MAX_EXCEPTION_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_ExceptionTruncated,"exception is too long, it has been trucated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:i}))),i},t.sanitizeProperties=function(n){var r,i,u;if(n){r={};for(i in n)u=t.sanitizeString(n[i]),i=t.sanitizeKeyAndAddUniqueness(i,r),r[i]=u;n=r}return n},t.sanitizeMeasurements=function(n){var r,i,u;if(n){r={};for(i in n)u=n[i],i=t.sanitizeKeyAndAddUniqueness(i,r),r[i]=u;n=r}return n},t.padNumber=function(n){var t="00"+n;return t.substr(t.length-3)},t.MAX_NAME_LENGTH=150,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}();t.DataSanitizer=i})(i=t.Common||(t.Common={}))})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u){i.call(this);this.aiDataContract={ver:n.FieldType.Required,message:n.FieldType.Required,severityLevel:n.FieldType.Default,measurements:n.FieldType.Default,properties:n.FieldType.Default};r=r||n.Util.NotSpecified;this.message=t.Common.DataSanitizer.sanitizeMessage(r);this.properties=t.Common.DataSanitizer.sanitizeProperties(u)}return __extends(r,i),r.envelopeType="Microsoft.ApplicationInsights.{0}.Message",r.dataType="MessageData",r}(AI.MessageData);t.Trace=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.EventData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(t){function i(i,r,u){t.call(this);this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Required,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.name=n.Telemetry.Common.DataSanitizer.sanitizeString(i)||n.Util.NotSpecified;this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(r);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(u)}return __extends(i,t),i.envelopeType="Microsoft.ApplicationInsights.{0}.Event",i.dataType="EventData",i}(AI.EventData);t.Event=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(){function n(){this.hasFullStack=!0;this.parsedStack=[]}return n}();n.ExceptionDetails=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.exceptions=[];this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.ExceptionData=t}(AI||(AI={})),function(n){"use strict";var t=function(){function n(){}return n}();n.StackFrame=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var u=function(t){function i(i,u,f,e,o){t.call(this);this.aiDataContract={ver:n.FieldType.Required,handledAt:n.FieldType.Required,exceptions:n.FieldType.Required,severityLevel:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(f);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(e);this.handledAt=u||"unhandled";this.exceptions=[new r(i)];o&&(this.severityLevel=o)}return __extends(i,t),i.CreateSimpleException=function(n,t,i,r,u,f,e){return{handledAt:e||"unhandled",exceptions:[{hasFullStack:!0,message:n,stack:u,typeName:t,parsedStack:[{level:0,assembly:i,fileName:r,line:f,method:"unknown"}]}]}},i.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",i.dataType="ExceptionData",i}(AI.ExceptionData),r,i;t.Exception=u;r=function(r){function u(i){r.call(this);this.aiDataContract={id:n.FieldType.Default,outerId:n.FieldType.Default,typeName:n.FieldType.Required,message:n.FieldType.Required,hasFullStack:n.FieldType.Default,stack:n.FieldType.Default,parsedStack:n.FieldType.Array};this.typeName=t.Common.DataSanitizer.sanitizeString(i.name)||n.Util.NotSpecified;this.message=t.Common.DataSanitizer.sanitizeMessage(i.message)||n.Util.NotSpecified;var u=i.stack;this.parsedStack=this.parseStack(u);this.stack=t.Common.DataSanitizer.sanitizeException(u);this.hasFullStack=n.Util.isArray(this.parsedStack)&&this.parsedStack.length>0}return __extends(u,r),u.prototype.parseStack=function(n){var t=undefined,e,l,o,r,a,s,h,p,w,b;if(typeof n=="string"){for(e=n.split("\n"),t=[],l=0,o=0,r=0;r<=e.length;r++)a=e[r],i.regex.test(a)&&(s=new i(e[r],l++),o+=s.sizeInBytes,t.push(s));if(h=32768,o>h)for(var u=0,f=t.length-1,v=0,c=u,y=f;uh){b=y-c+1;t.splice(c,b);break}c=u;y=f;u++;f--}}return t},u}(AI.ExceptionDetails);i=function(t){function i(r,u){t.call(this);this.sizeInBytes=0;this.aiDataContract={level:n.FieldType.Required,method:n.FieldType.Required,assembly:n.FieldType.Default,fileName:n.FieldType.Default,line:n.FieldType.Default};this.level=u;this.method="";this.assembly=n.Util.trim(r);var f=r.match(i.regex);f&&f.length>=5&&(this.method=n.Util.trim(f[2])||this.method,this.fileName=n.Util.trim(f[4]),this.line=parseInt(f[5])||0);this.sizeInBytes+=this.method.length;this.sizeInBytes+=this.fileName.length;this.sizeInBytes+=this.assembly.length;this.sizeInBytes+=i.baseSize;this.sizeInBytes+=this.level.toString().length;this.sizeInBytes+=this.line.toString().length}return __extends(i,t),i.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,i.baseSize=58,i}(AI.StackFrame);t._StackFrame=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.metrics=[];this.properties={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.MetricData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Measurement=0]="Measurement";n[n.Aggregation=1]="Aggregation"})(n.DataPointType||(n.DataPointType={}));var t=n.DataPointType}(AI||(AI={})),function(n){"use strict";var t=function(){function t(){this.kind=n.DataPointType.Measurement}return t}();n.DataPoint=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(t){function i(){t.apply(this,arguments);this.aiDataContract={name:n.FieldType.Required,kind:n.FieldType.Default,value:n.FieldType.Required,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default}}return __extends(i,t),i}(AI.DataPoint);t.DataPoint=i})(i=t.Common||(t.Common={}))})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(r){function u(u,f,e,o,s,h){r.call(this);this.aiDataContract={ver:t.FieldType.Required,metrics:t.FieldType.Required,properties:t.FieldType.Default};var c=new n.ApplicationInsights.Telemetry.Common.DataPoint;c.count=e>0?e:undefined;c.max=isNaN(s)||s===null?undefined:s;c.min=isNaN(o)||o===null?undefined:o;c.name=i.Common.DataSanitizer.sanitizeString(u)||t.Util.NotSpecified;c.value=f;this.metrics=[c];this.properties=t.Telemetry.Common.DataSanitizer.sanitizeProperties(h)}return __extends(u,r),u.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",u.dataType="MetricData",u}(AI.MetricData);i.Metric=r})(i=t.Telemetry||(t.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.EventData);n.PageViewData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u,f,e,o){i.call(this);this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.url=t.Common.DataSanitizer.sanitizeUrl(u);this.name=t.Common.DataSanitizer.sanitizeString(r)||n.Util.NotSpecified;isNaN(f)||(this.duration=n.Util.msToTimeSpan(f));this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(e);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o)}return __extends(r,i),r.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",r.dataType="PageviewData",r}(AI.PageViewData);t.PageView=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.PageViewPerfData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(u,f,e,o,s){var h;if(i.call(this),this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,perfTotal:n.FieldType.Default,networkConnect:n.FieldType.Default,sentRequest:n.FieldType.Default,receivedResponse:n.FieldType.Default,domProcessing:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default},this.isValid=!1,h=r.getPerformanceTiming(),h){var c=r.getDuration(h.navigationStart,h.loadEventEnd),l=r.getDuration(h.navigationStart,h.connectEnd),a=r.getDuration(h.requestStart,h.responseStart),v=r.getDuration(h.responseStart,h.responseEnd),y=r.getDuration(h.responseEnd,h.loadEventEnd);c==0?n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_ErrorPVCalc,"error calculating page view performance.",{total:c,network:l,request:a,response:v,dom:y})):c0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},r.getDuration=function(n,t){var i=0;return isNaN(n)||isNaN(t)||(i=Math.max(t-n,0)),i},r.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",r.dataType="PageviewPerformanceData",r}(AI.PageViewPerfData);t.PageViewPerformance=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){this._config=t;this._sender=new n.Sender(t);typeof window!="undefined"&&(this._sessionManager=new n.Context._SessionManager(t),this.application=new n.Context.Application,this.device=new n.Context.Device,this.internal=new n.Context.Internal,this.location=new n.Context.Location,this.user=new n.Context.User(t),this.operation=new n.Context.Operation,this.session=new n.Context.Session,this.sample=new n.Context.Sample(t.sampleRate()))}return t.prototype.addTelemetryInitializer=function(n){this.telemetryInitializers=this.telemetryInitializers||[];this.telemetryInitializers.push(n)},t.prototype.track=function(t){return t?(t.name===n.Telemetry.PageView.envelopeType&&n._InternalLogging.resetInternalMessageCount(),this.session&&typeof this.session.id!="string"&&this._sessionManager.update(),this._track(t)):n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.USRACT_TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument")),t},t.prototype._track=function(t){var i,f,r,u,o;this.session&&(typeof this.session.id=="string"?this._applySessionContext(t,this.session):this._applySessionContext(t,this._sessionManager.automaticSession));this._applyApplicationContext(t,this.application);this._applyDeviceContext(t,this.device);this._applyInternalContext(t,this.internal);this._applyLocationContext(t,this.location);this._applySampleContext(t,this.sample);this._applyUserContext(t,this.user);this._applyOperationContext(t,this.operation);t.iKey=this._config.instrumentationKey();i=!1;try{for(this.telemetryInitializers=this.telemetryInitializers||[],f=this.telemetryInitializers.length,r=0;rl&&(clearInterval(a),s||(o.appInsights.sendPageViewInternal(i,r,l,u,f),o.appInsights.flush()))}catch(v){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_TrackPVFailedCalc,"trackPageView failed on page load calculation: "+n.Util.getExceptionName(v),{exception:n.Util.dump(v)}))}},100)},i}();t.PageViewManager=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";var r=function(){function t(n){this.prevPageVisitDataKeyName="prevPageVisitData";this.pageVisitTimeTrackingHandler=n}return t.prototype.trackPreviousPageVisit=function(t,i){try{var r=this.restartPageVisitTimer(t,i);r&&this.pageVisitTimeTrackingHandler(r.pageName,r.pageUrl,r.pageVisitTime)}catch(u){n._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+n.Util.dump(u))}},t.prototype.restartPageVisitTimer=function(t,i){try{var r=this.stopPageVisitTimer();return this.startPageVisitTimer(t,i),r}catch(u){return n._InternalLogging.warnToConsole("Call to restart failed: "+n.Util.dump(u)),null}},t.prototype.startPageVisitTimer=function(t,r){try{if(n.Util.canUseSessionStorage()){if(n.Util.getSessionStorage(this.prevPageVisitDataKeyName)!=null)throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var u=new i(t,r),f=JSON.stringify(u);n.Util.setSessionStorage(this.prevPageVisitDataKeyName,f)}}catch(e){n._InternalLogging.warnToConsole("Call to start failed: "+n.Util.dump(e))}},t.prototype.stopPageVisitTimer=function(){var r,i,t;try{return n.Util.canUseSessionStorage()?(r=Date.now(),i=n.Util.getSessionStorage(this.prevPageVisitDataKeyName),i?(t=JSON.parse(i),t.pageVisitTime=r-t.pageVisitStartTime,n.Util.removeSessionStorage(this.prevPageVisitDataKeyName),t):null):null}catch(u){return n._InternalLogging.warnToConsole("Stop page visit timer failed: "+n.Util.dump(u)),null}},t}(),i;t.PageVisitTimeManager=r;i=function(){function n(n,t){this.pageVisitStartTime=Date.now();this.pageName=n;this.pageUrl=t}return n}();t.PageVisitData=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";(function(n){n[n.SQL=0]="SQL";n[n.Http=1]="Http";n[n.Other=2]="Other"})(n.DependencyKind||(n.DependencyKind={}));var t=n.DependencyKind}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Undefined=0]="Undefined";n[n.Aic=1]="Aic";n[n.Apmc=2]="Apmc"})(n.DependencySourceType||(n.DependencySourceType={}));var t=n.DependencySourceType}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.kind=n.DataPointType.Aggregation;this.dependencyKind=n.DependencyKind.Other;this.success=!0;this.dependencySource=n.DependencySourceType.Apmc;this.properties={};t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.RemoteDependencyData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u,f,e,o,s,h){i.call(this);this.aiDataContract={id:n.FieldType.Required,ver:n.FieldType.Required,name:n.FieldType.Default,kind:n.FieldType.Required,value:n.FieldType.Default,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default,dependencyKind:n.FieldType.Default,success:n.FieldType.Default,async:n.FieldType.Default,dependencySource:n.FieldType.Default,commandName:n.FieldType.Default,dependencyTypeName:n.FieldType.Default,properties:n.FieldType.Default,resultCode:n.FieldType.Default};this.id=r;this.name=this.formatDependencyName(h,u);this.commandName=t.Common.DataSanitizer.sanitizeUrl(f);this.value=e;this.success=o;this.resultCode=s+"";this.dependencyKind=AI.DependencyKind.Http;this.dependencyTypeName="Ajax"}return __extends(r,i),r.prototype.formatDependencyName=function(n,t){return n?n.toUpperCase()+" "+t:t},r.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",r.dataType="RemoteDependencyData",r}(AI.RemoteDependencyData);t.RemoteDependencyData=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){"use strict";var r,i;t.Version="0.22.19";r=function(){function r(u){var f=this,e,o,s;if(this._trackAjaxAttempts=0,this.config=u||{},e=r.defaultConfig,e!==undefined)for(o in e)this.config[o]===undefined&&(this.config[o]=e[o]);t._InternalLogging.verboseLogging=function(){return f.config.verboseLogging};t._InternalLogging.enableDebugExceptions=function(){return f.config.enableDebug};s={instrumentationKey:function(){return f.config.instrumentationKey},accountId:function(){return f.config.accountId},sessionRenewalMs:function(){return f.config.sessionRenewalMs},sessionExpirationMs:function(){return f.config.sessionExpirationMs},endpointUrl:function(){return f.config.endpointUrl},emitLineDelimitedJson:function(){return f.config.emitLineDelimitedJson},maxBatchSizeInBytes:function(){return f.config.maxBatchSizeInBytes},maxBatchInterval:function(){return f.config.maxBatchInterval},disableTelemetry:function(){return f.config.disableTelemetry},sampleRate:function(){return f.config.samplingPercentage},cookieDomain:function(){return f.config.cookieDomain},enableSessionStorageBuffer:function(){return f.config.enableSessionStorageBuffer}};this.context=new t.TelemetryContext(s);this._pageViewManager=new n.ApplicationInsights.Telemetry.PageViewManager(this,this.config.overridePageViewDuration);this._eventTracking=new i("trackEvent");this._eventTracking.action=function(n,i,r,u,e){e?isNaN(e.duration)&&(e.duration=r):e={duration:r};var o=new t.Telemetry.Event(n,u,e),s=new t.Telemetry.Common.Data(t.Telemetry.Event.dataType,o),h=new t.Telemetry.Common.Envelope(s,t.Telemetry.Event.envelopeType);f.context.track(h)};this._pageTracking=new i("trackPageView");this._pageTracking.action=function(n,t,i,r,u){f.sendPageViewInternal(n,t,i,r,u)};this._pageVisitTimeManager=new t.Telemetry.PageVisitTimeManager(function(n,t,i){return f.trackPageVisitTime(n,t,i)});this.config.disableAjaxTracking||new n.ApplicationInsights.AjaxMonitor(this)}return r.prototype.sendPageViewInternal=function(n,i,r,u,f){var e=new t.Telemetry.PageView(n,i,r,u,f),o=new t.Telemetry.Common.Data(t.Telemetry.PageView.dataType,e),s=new t.Telemetry.Common.Envelope(o,t.Telemetry.PageView.envelopeType);this.context.track(s);this._trackAjaxAttempts=0},r.prototype.sendPageViewPerformanceInternal=function(n){var i=new t.Telemetry.Common.Data(t.Telemetry.PageViewPerformance.dataType,n),r=new t.Telemetry.Common.Envelope(i,t.Telemetry.PageViewPerformance.envelopeType);this.context.track(r)},r.prototype.startTrackPage=function(n){try{typeof n!="string"&&(n=window.document&&window.document.title||"");this._pageTracking.start(n)}catch(i){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StartTrackFailed,"startTrackPage failed, page view may not be collected: "+t.Util.getExceptionName(i),{exception:t.Util.dump(i)}))}},r.prototype.stopTrackPage=function(n,i,r,u){try{typeof n!="string"&&(n=window.document&&window.document.title||"");typeof i!="string"&&(i=window.location&&window.location.href||"");this._pageTracking.stop(n,i,r,u);this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n,i)}catch(f){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+t.Util.getExceptionName(f),{exception:t.Util.dump(f)}))}},r.prototype.trackPageView=function(n,i,r,u,f){try{this._pageViewManager.trackPageView(n,i,r,u,f);this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n,i)}catch(e){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_TrackPVFailed,"trackPageView failed, page view will not be collected: "+t.Util.getExceptionName(e),{exception:t.Util.dump(e)}))}},r.prototype.startTrackEvent=function(n){try{this._eventTracking.start(n)}catch(i){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+t.Util.getExceptionName(i),{exception:t.Util.dump(i)}))}},r.prototype.stopTrackEvent=function(n,i,r){try{this._eventTracking.stop(n,undefined,i,r)}catch(u){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+t.Util.getExceptionName(u),{exception:t.Util.dump(u)}))}},r.prototype.trackEvent=function(n,i,r){try{var f=new t.Telemetry.Event(n,i,r),e=new t.Telemetry.Common.Data(t.Telemetry.Event.dataType,f),o=new t.Telemetry.Common.Envelope(e,t.Telemetry.Event.envelopeType);this.context.track(o)}catch(u){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_TrackEventFailed,"trackEvent failed, event will not be collected: "+t.Util.getExceptionName(u),{exception:t.Util.dump(u)}))}},r.prototype.trackDependency=function(n,i,r,u,f,e,o){if(this.config.maxAjaxCallsPerView===-1||this._trackAjaxAttempts0?n.maxBatchSizeInBytes:1e6,n.maxBatchInterval=isNaN(n.maxBatchInterval)?15e3:n.maxBatchInterval,n.enableDebug=t.Util.stringToBoolOrDefault(n.enableDebug),n.disableExceptionTracking=n.disableExceptionTracking!==undefined&&n.disableExceptionTracking!==null?t.Util.stringToBoolOrDefault(n.disableExceptionTracking):!1,n.disableTelemetry=t.Util.stringToBoolOrDefault(n.disableTelemetry),n.verboseLogging=t.Util.stringToBoolOrDefault(n.verboseLogging),n.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(n.emitLineDelimitedJson),n.diagnosticLogInterval=n.diagnosticLogInterval||1e4,n.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(n.autoTrackPageVisitTime),(isNaN(n.samplingPercentage)||n.samplingPercentage<=0||n.samplingPercentage>=100)&&(n.samplingPercentage=100),n.disableAjaxTracking=n.disableAjaxTracking!==undefined&&n.disableAjaxTracking!==null?t.Util.stringToBoolOrDefault(n.disableAjaxTracking):!1,n.maxAjaxCallsPerView=isNaN(n.maxAjaxCallsPerView)?500:n.maxAjaxCallsPerView,n.disableCorrelationHeaders=n.disableCorrelationHeaders!==undefined&&n.disableCorrelationHeaders!==null?t.Util.stringToBoolOrDefault(n.disableCorrelationHeaders):!0,n.disableFlushOnBeforeUnload=n.disableFlushOnBeforeUnload!==undefined&&n.disableFlushOnBeforeUnload!==null?t.Util.stringToBoolOrDefault(n.disableFlushOnBeforeUnload):!1,n.enableSessionStorageBuffer=n.enableSessionStorageBuffer!==undefined&&n.enableSessionStorageBuffer!==null?t.Util.stringToBoolOrDefault(n.enableSessionStorageBuffer):!1,n},i}();t.Initialization=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict";var r,u;try{if(typeof window!="undefined"&&typeof JSON!="undefined")if(r="appInsights",window[r]===undefined)n.ApplicationInsights.AppInsights.defaultConfig=n.ApplicationInsights.Initialization.getDefaultConfig();else{var f=window[r]||{},t=new n.ApplicationInsights.Initialization(f),i=t.loadAppInsights();for(u in i)f[u]=i[u];t.emptyQueue();t.pollInteralLogs(i);t.addHousekeepingBeforeUnload(i)}}catch(e){n.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+e.message)}})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.AjaxCallData=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.RequestData=t}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.state=n.SessionState.Start;t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.SessionStateData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Pass=0]="Pass";n[n.Fail=1]="Fail"})(n.TestResult||(n.TestResult={}));var t=n.TestResult}(AI||(AI={})) \ No newline at end of file +var __extends,Microsoft,AI;(function(n){var t;(function(n){var r,t,i,u;(function(n){n[n.CRITICAL=0]="CRITICAL";n[n.WARNING=1]="WARNING"})(n.LoggingSeverity||(n.LoggingSeverity={}));r=n.LoggingSeverity,function(n){n[n.NONUSRACT_BrowserDoesNotSupportLocalStorage=0]="NONUSRACT_BrowserDoesNotSupportLocalStorage";n[n.NONUSRACT_BrowserCannotReadLocalStorage=1]="NONUSRACT_BrowserCannotReadLocalStorage";n[n.NONUSRACT_BrowserCannotReadSessionStorage=2]="NONUSRACT_BrowserCannotReadSessionStorage";n[n.NONUSRACT_BrowserCannotWriteLocalStorage=3]="NONUSRACT_BrowserCannotWriteLocalStorage";n[n.NONUSRACT_BrowserCannotWriteSessionStorage=4]="NONUSRACT_BrowserCannotWriteSessionStorage";n[n.NONUSRACT_BrowserFailedRemovalFromLocalStorage=5]="NONUSRACT_BrowserFailedRemovalFromLocalStorage";n[n.NONUSRACT_BrowserFailedRemovalFromSessionStorage=6]="NONUSRACT_BrowserFailedRemovalFromSessionStorage";n[n.NONUSRACT_CannotSendEmptyTelemetry=7]="NONUSRACT_CannotSendEmptyTelemetry";n[n.NONUSRACT_ClientPerformanceMathError=8]="NONUSRACT_ClientPerformanceMathError";n[n.NONUSRACT_ErrorParsingAISessionCookie=9]="NONUSRACT_ErrorParsingAISessionCookie";n[n.NONUSRACT_ErrorPVCalc=10]="NONUSRACT_ErrorPVCalc";n[n.NONUSRACT_ExceptionWhileLoggingError=11]="NONUSRACT_ExceptionWhileLoggingError";n[n.NONUSRACT_FailedAddingTelemetryToBuffer=12]="NONUSRACT_FailedAddingTelemetryToBuffer";n[n.NONUSRACT_FailedMonitorAjaxAbort=13]="NONUSRACT_FailedMonitorAjaxAbort";n[n.NONUSRACT_FailedMonitorAjaxDur=14]="NONUSRACT_FailedMonitorAjaxDur";n[n.NONUSRACT_FailedMonitorAjaxOpen=15]="NONUSRACT_FailedMonitorAjaxOpen";n[n.NONUSRACT_FailedMonitorAjaxRSC=16]="NONUSRACT_FailedMonitorAjaxRSC";n[n.NONUSRACT_FailedMonitorAjaxSend=17]="NONUSRACT_FailedMonitorAjaxSend";n[n.NONUSRACT_FailedToAddHandlerForOnBeforeUnload=18]="NONUSRACT_FailedToAddHandlerForOnBeforeUnload";n[n.NONUSRACT_FailedToSendQueuedTelemetry=19]="NONUSRACT_FailedToSendQueuedTelemetry";n[n.NONUSRACT_FailedToReportDataLoss=20]="NONUSRACT_FailedToReportDataLoss";n[n.NONUSRACT_FlushFailed=21]="NONUSRACT_FlushFailed";n[n.NONUSRACT_MessageLimitPerPVExceeded=22]="NONUSRACT_MessageLimitPerPVExceeded";n[n.NONUSRACT_MissingRequiredFieldSpecification=23]="NONUSRACT_MissingRequiredFieldSpecification";n[n.NONUSRACT_NavigationTimingNotSupported=24]="NONUSRACT_NavigationTimingNotSupported";n[n.NONUSRACT_OnError=25]="NONUSRACT_OnError";n[n.NONUSRACT_SessionRenewalDateIsZero=26]="NONUSRACT_SessionRenewalDateIsZero";n[n.NONUSRACT_SenderNotInitialized=27]="NONUSRACT_SenderNotInitialized";n[n.NONUSRACT_StartTrackEventFailed=28]="NONUSRACT_StartTrackEventFailed";n[n.NONUSRACT_StopTrackEventFailed=29]="NONUSRACT_StopTrackEventFailed";n[n.NONUSRACT_StartTrackFailed=30]="NONUSRACT_StartTrackFailed";n[n.NONUSRACT_StopTrackFailed=31]="NONUSRACT_StopTrackFailed";n[n.NONUSRACT_TelemetrySampledAndNotSent=32]="NONUSRACT_TelemetrySampledAndNotSent";n[n.NONUSRACT_TrackEventFailed=33]="NONUSRACT_TrackEventFailed";n[n.NONUSRACT_TrackExceptionFailed=34]="NONUSRACT_TrackExceptionFailed";n[n.NONUSRACT_TrackMetricFailed=35]="NONUSRACT_TrackMetricFailed";n[n.NONUSRACT_TrackPVFailed=36]="NONUSRACT_TrackPVFailed";n[n.NONUSRACT_TrackPVFailedCalc=37]="NONUSRACT_TrackPVFailedCalc";n[n.NONUSRACT_TrackTraceFailed=38]="NONUSRACT_TrackTraceFailed";n[n.NONUSRACT_TransmissionFailed=39]="NONUSRACT_TransmissionFailed";n[n.NONUSRACT_FailToSetStorageBuffer=40]="NONUSRACT_FailToSetStorageBuffer";n[n.NONUSRACT_FailToRestoreStorageBuffer=41]="NONUSRACT_FailToRestoreStorageBuffer";n[n.USRACT_CannotSerializeObject=42]="USRACT_CannotSerializeObject";n[n.USRACT_CannotSerializeObjectNonSerializable=43]="USRACT_CannotSerializeObjectNonSerializable";n[n.USRACT_CircularReferenceDetected=44]="USRACT_CircularReferenceDetected";n[n.USRACT_ClearAuthContextFailed=45]="USRACT_ClearAuthContextFailed";n[n.USRACT_ExceptionTruncated=46]="USRACT_ExceptionTruncated";n[n.USRACT_IllegalCharsInName=47]="USRACT_IllegalCharsInName";n[n.USRACT_ItemNotInArray=48]="USRACT_ItemNotInArray";n[n.USRACT_MaxAjaxPerPVExceeded=49]="USRACT_MaxAjaxPerPVExceeded";n[n.USRACT_MessageTruncated=50]="USRACT_MessageTruncated";n[n.USRACT_NameTooLong=51]="USRACT_NameTooLong";n[n.USRACT_SampleRateOutOfRange=52]="USRACT_SampleRateOutOfRange";n[n.USRACT_SetAuthContextFailed=53]="USRACT_SetAuthContextFailed";n[n.USRACT_SetAuthContextFailedAccountName=54]="USRACT_SetAuthContextFailedAccountName";n[n.USRACT_StringValueTooLong=55]="USRACT_StringValueTooLong";n[n.USRACT_StartCalledMoreThanOnce=56]="USRACT_StartCalledMoreThanOnce";n[n.USRACT_StopCalledWithoutStart=57]="USRACT_StopCalledWithoutStart";n[n.USRACT_TelemetryInitializerFailed=58]="USRACT_TelemetryInitializerFailed";n[n.USRACT_TrackArgumentsNotSpecified=59]="USRACT_TrackArgumentsNotSpecified";n[n.USRACT_UrlTooLong=60]="USRACT_UrlTooLong";n[n.USRACT_SessionStorageBufferFull=61]="USRACT_SessionStorageBufferFull";n[n.USRACT_CannotAccessCookie=62]="USRACT_CannotAccessCookie"}(n._InternalMessageId||(n._InternalMessageId={}));t=n._InternalMessageId;i=function(){function n(i,r,u){this.message=t[i].toString();this.messageId=i;var f=(r?" message:"+n.sanitizeDiagnosticText(r):"")+(u?" props:"+n.sanitizeDiagnosticText(JSON.stringify(u)):"");this.message+=f}return n.sanitizeDiagnosticText=function(n){return'"'+n.replace(/\"/g,"")+'"'},n}();n._InternalLogMessage=i;u=function(){function u(){}return u.throwInternalNonUserActionable=function(n,t){if(this.enableDebugExceptions())throw t;else typeof t=="undefined"||!t||typeof t.message!="undefined"&&(t.message=this.AiNonUserActionablePrefix+t.message,this.verboseLogging()&&this.warnToConsole(t.message),this.logInternalMessage(n,t))},u.throwInternalUserActionable=function(n,t){if(this.enableDebugExceptions())throw t;else typeof t=="undefined"||!t||typeof t.message!="undefined"&&(t.message=this.AiUserActionablePrefix+t.message,this.warnToConsole(t.message),this.logInternalMessage(n,t))},u.warnToConsole=function(n){typeof console=="undefined"||!console||(typeof console.warn=="function"?console.warn(n):typeof console.log=="function"&&console.log(n))},u.resetInternalMessageCount=function(){this._messageCount=0},u.clearInternalMessageLoggedTypes=function(){var i,t;if(n.Util.canUseSessionStorage())for(i=n.Util.getSessionStorageKeys(),t=0;t=this.MAX_INTERNAL_MESSAGE_LIMIT},u.AiUserActionablePrefix="AI: ",u.AIInternalMessagePrefix="AITR_",u.AiNonUserActionablePrefix="AI (Internal): ",u.enableDebugExceptions=function(){return!1},u.verboseLogging=function(){return!1},u.queue=[],u.MAX_INTERNAL_MESSAGE_LIMIT=25,u._messageCount=0,u}();n._InternalLogging=u})(t=n.ApplicationInsights||(n.ApplicationInsights={}))})(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t,i,r;(function(n){n[n.LocalStorage=0]="LocalStorage";n[n.SessionStorage=1]="SessionStorage"})(t||(t={}));i=function(){function i(){}return i._getLocalStorageObject=function(){return i._getVerifiedStorageObject(t.LocalStorage)},i._getVerifiedStorageObject=function(n){var i=null,u,r;try{r=new Date;i=n===t.LocalStorage?window.localStorage:window.sessionStorage;i.setItem(r,r);u=i.getItem(r)!=r;i.removeItem(r);u&&(i=null)}catch(f){i=null}return i},i.canUseLocalStorage=function(){return!!i._getLocalStorageObject()},i.getStorage=function(t){var r=i._getLocalStorageObject(),f;if(r!==null)try{return r.getItem(t)}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,f)}return null},i.setStorage=function(t,r){var u=i._getLocalStorageObject(),e;if(u!==null)try{return u.setItem(t,r),!0}catch(f){e=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+i.getExceptionName(f),{exception:i.dump(f)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,e)}return!1},i.removeStorage=function(t){var r=i._getLocalStorageObject(),f;if(r!==null)try{return r.removeItem(t),!0}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,f)}return!1},i._getSessionStorageObject=function(){return i._getVerifiedStorageObject(t.SessionStorage)},i.canUseSessionStorage=function(){return!!i._getSessionStorageObject()},i.getSessionStorageKeys=function(){var n=[],t;if(i.canUseSessionStorage())for(t in window.sessionStorage)n.push(t);return n},i.getSessionStorage=function(t){var r=i._getSessionStorageObject(),f;if(r!==null)try{return r.getItem(t)}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,f)}return null},i.setSessionStorage=function(t,r){var u=i._getSessionStorageObject(),e;if(u!==null)try{return u.setItem(t,r),!0}catch(f){e=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+i.getExceptionName(f),{exception:i.dump(f)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,e)}return!1},i.removeSessionStorage=function(t){var r=i._getSessionStorageObject(),f;if(r!==null)try{return r.removeItem(t),!0}catch(u){f=new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+i.getExceptionName(u),{exception:i.dump(u)});n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,f)}return!1},i.canUseCookies=function(){if(i._canUseCookies===undefined){i._canUseCookies=!1;try{i._canUseCookies=i.document.cookie!==undefined}catch(t){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_CannotAccessCookie,"Cannot access document.cookie - "+i.getExceptionName(t),{exception:i.dump(t)}))}}return i._canUseCookies},i.setCookie=function(n,t,r){var u="";r&&(u=";domain="+r);i.canUseCookies()&&(i.document.cookie=n+"="+t+u+";path=/")},i.stringToBoolOrDefault=function(n){return n?n.toString().toLowerCase()==="true":!1},i.getCookie=function(n){var f,e,u,r,t;if(i.canUseCookies()){if(f="",n&&n.length)for(e=n+"=",u=i.document.cookie.split(";"),r=0;r0;)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n%64),t+=i,n=Math.floor(n/64);return t},i.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"},i.isError=function(n){return Object.prototype.toString.call(n)==="[object Error]"},i.isDate=function(n){return Object.prototype.toString.call(n)==="[object Date]"},i.toISOStringForIE8=function(n){if(i.isDate(n)){function t(n){var t=String(n);return t.length===1&&(t="0"+t),t}return Date.prototype.toISOString?n.toISOString():n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},i.getIEVersion=function(n){n===void 0&&(n=null);var t=n?n.toLowerCase():navigator.userAgent.toLowerCase();return t.indexOf("msie")!=-1?parseInt(t.split("msie")[1]):null},i.msToTimeSpan=function(n){(isNaN(n)||n<0)&&(n=0);var t=""+n%1e3,i=""+Math.floor(n/1e3)%60,r=""+Math.floor(n/6e4)%60,u=""+Math.floor(n/36e5)%24;return t=t.length===1?"00"+t:t.length===2?"0"+t:t,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,u=u.length<2?"0"+u:u,u+":"+r+":"+i+"."+t},i.isCrossOriginError=function(n,t,i,r,u){return(n==="Script error."||n==="Script error")&&u===null},i.dump=function(n){var t=Object.prototype.toString.call(n),i=JSON.stringify(n);return t==="[object Error]"&&(i="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'"),t+i},i.getExceptionName=function(n){var t=Object.prototype.toString.call(n);return t==="[object Error]"?n.name:""},i.addEventHandler=function(n,t){if(!window||typeof n!="string"||typeof t!="function")return!1;var i="on"+n;if(window.addEventListener)window.addEventListener(n,t,!1);else if(window.attachEvent)window.attachEvent.call(i,t);else return!1;return!0},i.document=typeof document!="undefined"?document:{},i._canUseCookies=undefined,i.NotSpecified="not_specified",i}();n.Util=i;r=function(){function n(){}return n.parseUrl=function(t){return n.htmlAnchorElement||(n.htmlAnchorElement=!n.document.createElement?{}:n.document.createElement("a")),n.htmlAnchorElement.href=t,n.htmlAnchorElement},n.getAbsoluteUrl=function(t){var i,r=n.parseUrl(t);return r&&(i=r.href),i},n.getPathName=function(t){var i,r=n.parseUrl(t);return r&&(i=r.pathname),i},n.document=typeof document!="undefined"?document:{},n}();n.UrlHelper=r})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.IsNullOrUndefined=function(n){return typeof n=="undefined"||n===null},n}(),i,r,u;n.extensions=t;i=function(){function n(){}return n.GetLength=function(n){var i=0,r;if(!t.IsNullOrUndefined(n)){r="";try{r=n.toString()}catch(u){}i=r.length;i=isNaN(i)?0:i}return i},n}();n.stringUtils=i;r=function(){function n(){}return n.Now=window.performance&&window.performance.now?function(){return performance.now()}:function(){return(new Date).getTime()},n.GetDuration=function(n,i){var r=null;return n===0||i===0||t.IsNullOrUndefined(n)||t.IsNullOrUndefined(i)||(r=i-n),r},n}();n.dateTime=r;u=function(){function n(){}return n.AttachEvent=function(n,i,r){var u=!1;return t.IsNullOrUndefined(n)||(t.IsNullOrUndefined(n.attachEvent)?t.IsNullOrUndefined(n.addEventListener)||(n.addEventListener(i,r,!1),u=!0):(n.attachEvent("on"+i,r),u=!0)),u},n.DetachEvent=function(n,i,r){t.IsNullOrUndefined(n)||(t.IsNullOrUndefined(n.detachEvent)?t.IsNullOrUndefined(n.removeEventListener)||n.removeEventListener(i,r,!1):n.detachEvent("on"+i,r))},n}();n.EventHelper=u})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function n(){this.openDone=!1;this.setRequestHeaderDone=!1;this.sendDone=!1;this.abortDone=!1;this.onreadystatechangeCallbackAttached=!1}return n}(),i;n.XHRMonitoringState=t;i=function(){function i(i){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=n.dateTime.GetDuration(t.requestSentTime,t.responseFinishedTime)};this.id=i}return i.prototype.getAbsoluteUrl=function(){return this.requestUrl?n.UrlHelper.getAbsoluteUrl(this.requestUrl):null},i.prototype.getPathName=function(){return this.requestUrl?n.UrlHelper.getPathName(this.requestUrl):null},i}();n.ajaxRecord=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){"use strict";var i=function(){function i(n){this.currentWindowHost=window.location.host;this.appInsights=n;this.initialized=!1;this.Init()}return i.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},i.prototype.isMonitoredInstance=function(n,r){return this.initialized&&(r===!0||!t.extensions.IsNullOrUndefined(n.ajaxData))&&n[i.DisabledPropertyName]!==!0},i.prototype.supportsMonitoring=function(){var n=!1;return t.extensions.IsNullOrUndefined(XMLHttpRequest)||(n=!0),n},i.prototype.instrumentOpen=function(){var u=XMLHttpRequest.prototype.open,r=this;XMLHttpRequest.prototype.open=function(f,e,o){try{!r.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||r.openHandler(this,f,e,o)}catch(s){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(s)}))}return u.apply(this,arguments)}},i.prototype.openHandler=function(n,i,r){var u=new t.ajaxRecord(t.Util.newId());u.method=i;u.requestUrl=r;u.xhrMonitoringState.openDone=!0;n.ajaxData=u;this.attachToOnReadyStateChange(n)},i.getFailedAjaxDiagnosticsMessage=function(n){var i="";try{t.extensions.IsNullOrUndefined(n)||t.extensions.IsNullOrUndefined(n.ajaxData)||t.extensions.IsNullOrUndefined(n.ajaxData.requestUrl)||(i+="(url: '"+n.ajaxData.requestUrl+"')")}catch(r){}return i},i.prototype.instrumentSend=function(){var u=XMLHttpRequest.prototype.send,r=this;XMLHttpRequest.prototype.send=function(f){try{r.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&r.sendHandler(this,f)}catch(e){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(e)}))}return u.apply(this,arguments)}},i.prototype.sendHandler=function(n){n.ajaxData.requestSentTime=t.dateTime.Now();this.appInsights.config.disableCorrelationHeaders||t.UrlHelper.parseUrl(n.ajaxData.getAbsoluteUrl()).host!=this.currentWindowHost||n.setRequestHeader("x-ms-request-id",n.ajaxData.id);n.ajaxData.xhrMonitoringState.sendDone=!0},i.prototype.instrumentAbort=function(){var r=XMLHttpRequest.prototype.abort,u=this;XMLHttpRequest.prototype.abort=function(){try{u.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(f){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(this),exception:n.ApplicationInsights.Util.dump(f)}))}return r.apply(this,arguments)}},i.prototype.attachToOnReadyStateChange=function(r){var u=this;r.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=t.EventHelper.AttachEvent(r,"readystatechange",function(){try{if(u.isMonitoredInstance(r)&&r.readyState===4)u.onAjaxComplete(r)}catch(f){var e=n.ApplicationInsights.Util.dump(f);e&&e.toLowerCase().indexOf("c00c023f")!=-1||t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(r),exception:n.ApplicationInsights.Util.dump(f)}))}})},i.prototype.onAjaxComplete=function(n){n.ajaxData.responseFinishedTime=t.dateTime.Now();n.ajaxData.status=n.status;n.ajaxData.CalculateMetrics();n.ajaxData.ajaxTotalDuration<0?t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.WARNING,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:i.getFailedAjaxDiagnosticsMessage(n),requestSentTime:n.ajaxData.requestSentTime,responseFinishedTime:n.ajaxData.responseFinishedTime})):(this.appInsights.trackDependency(n.ajaxData.id,n.ajaxData.method,n.ajaxData.getAbsoluteUrl(),n.ajaxData.getPathName(),n.ajaxData.ajaxTotalDuration,+n.ajaxData.status>=200&&+n.ajaxData.status<400,+n.ajaxData.status),n.ajaxData=null)},i.instrumentedByAppInsightsName="InstrumentedByAppInsights",i.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",i}();t.AjaxMonitor=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.getHashCodeScore=function(t){var i=this.getHashCode(t)/n.INT_MAX_VALUE;return i*100},n.prototype.getHashCode=function(t){var i,r;if(t=="")return 0;while(t.length100||t<0)&&(n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_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})),this.sampleRate=100);this.sampleRate=t;this.samplingScoreGenerator=new n.SamplingScoreGenerator}return t.prototype.isSampledIn=function(n){if(this.sampleRate==100)return!0;var t=this.samplingScoreGenerator.getSamplingScore(n);return tthis.config.sessionExpirationMs(),i=n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||i?(this.automaticSession.isFirst=undefined,this.renew()):(this.automaticSession.renewalDate=+new Date,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=n.Util.getCookie("ai_session"),i;t&&typeof t.split=="function"?this.initializeAutomaticSessionWithData(t):(i=n.Util.getStorage("ai_session"),i&&this.initializeAutomaticSessionWithData(i));this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},t.prototype.initializeAutomaticSessionWithData=function(t){var i=t.split("|"),r,u;i.length>0&&(this.automaticSession.id=i[0]);try{i.length>1&&(r=+i[1],this.automaticSession.acquisitionDate=+new Date(r),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0);i.length>2&&(u=+i[2],this.automaticSession.renewalDate=+new Date(u),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(f){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+n.Util.getExceptionName(f),{exception:n.Util.dump(f)}))}this.automaticSession.renewalDate==0&&n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset."))},t.prototype.renew=function(){var t=+new Date;this.automaticSession.id=n.Util.newId();this.automaticSession.acquisitionDate=t;this.automaticSession.renewalDate=t;this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate);n.Util.canUseLocalStorage()||n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate."))},t.prototype.setCookie=function(t,i,r){var f=i+this.config.sessionExpirationMs(),e=r+this.config.sessionRenewalMs(),u=new Date,s=[t,i,r],o;f0&&(this.id=e[0]));this.config=i;this.id||(this.id=n.Util.newId(),u=new Date,o=n.Util.toISOStringForIE8(u),this.accountAcquisitionDate=o,u.setTime(u.getTime()+31536e6),h=[this.id,o],c=this.config.cookieDomain?this.config.cookieDomain():undefined,n.Util.setCookie(t.userCookieName,h.join(t.cookieSeparator)+";expires="+u.toUTCString(),c),n.Util.removeStorage("ai_session"));this.accountId=i.accountId?i.accountId():undefined;f=n.Util.getCookie(t.authUserCookieName);f&&(f=decodeURI(f),r=f.split(t.cookieSeparator),r[0]&&(this.authenticatedId=r[0]),r.length>1&&r[1]&&(this.accountId=r[1]))}return t.prototype.setAuthenticatedUserContext=function(i,r){var f=!this.validateUserInput(i)||r&&!this.validateUserInput(r),u;if(f){n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_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."));return}this.authenticatedId=i;u=this.authenticatedId;r&&(this.accountId=r,u=[this.authenticatedId,this.accountId].join(t.cookieSeparator));n.Util.setCookie(t.authUserCookieName,encodeURI(u),this.config.cookieDomain())},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null;this.accountId=null;n.Util.deleteCookie(t.authUserCookieName)},t.prototype.validateUserInput=function(n){return typeof n!="string"||!n||n.match(/,|;|=| |\|/)?!1:!0},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}();t.User=i})(t=n.Context||(n.Context={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.reset=function(){t.isEnabled()&&(n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,"0"),n.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,"0"),t.itemsRestoredFromSessionBuffer=0)},t.isEnabled=function(){return t.enabled&&t.appInsights!=null&&t.appInsights.context._sender._XMLHttpRequestSupported&&n.Util.canUseSessionStorage()},t.getIssuesReported=function(){return!t.isEnabled()||isNaN(+n.Util.getSessionStorage(t.ISSUES_REPORTED_KEY))?0:+n.Util.getSessionStorage(t.ISSUES_REPORTED_KEY)},t.incrementItemsQueued=function(){try{if(t.isEnabled()){var i=t.getNumberOfLostItems();++i;n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,i.toString())}}catch(r){}},t.decrementItemsQueued=function(i){try{if(t.isEnabled()){var r=t.getNumberOfLostItems();r-=i;r<0&&(r=0);n.Util.setSessionStorage(t.ITEMS_QUEUED_KEY,r.toString())}}catch(u){}},t.getNumberOfLostItems=function(){var i=0;try{t.isEnabled()&&(i=isNaN(+n.Util.getSessionStorage(t.ITEMS_QUEUED_KEY))?0:+n.Util.getSessionStorage(t.ITEMS_QUEUED_KEY))}catch(r){i=0}return i},t.reportLostItems=function(){var r,i;try{t.isEnabled()&&t.getIssuesReported()0&&(r=t.getNumberOfLostItems()-t.itemsRestoredFromSessionBuffer,t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+r+'"',null),t.appInsights.flush(),i=t.getIssuesReported(),++i,n.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,i.toString()))}catch(u){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailedToReportDataLoss,"Failed to report data loss: "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}finally{try{t.reset()}catch(u){}}},t.enabled=!1,t.itemsRestoredFromSessionBuffer=0,t.LIMIT_PER_SESSION=10,t.ITEMS_QUEUED_KEY="AI_itemsQueued",t.ISSUES_REPORTED_KEY="AI_lossIssuesReported",t}();n.DataLossAnalyzer=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var i=function(){function n(n){this._config=n;this._buffer=[]}return n.prototype.enqueue=function(n){this._buffer.push(n)},n.prototype.count=function(){return this._buffer.length},n.prototype.clear=function(){this._buffer.length=0},n.prototype.getItems=function(){return this._buffer.slice(0)},n.prototype.batchPayloads=function(n){return n&&n.length>0?this._config.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null},n.prototype.markAsSent=function(){this.clear()},n.prototype.clearSent=function(){this.clear()},n}(),t;n.ArraySendBuffer=i;t=function(){function t(i){this._bufferFullMessageSent=!1;this._config=i;var r=this.getBuffer(t.BUFFER_KEY),u=this.getBuffer(t.SENT_BUFFER_KEY);this._buffer=r.concat(u);n.DataLossAnalyzer.itemsRestoredFromSessionBuffer=this._buffer.length;this.setBuffer(t.BUFFER_KEY,this._buffer);this.setBuffer(t.SENT_BUFFER_KEY,[])}return t.prototype.enqueue=function(i){if(this._buffer.length>=t.MAX_BUFFER_SIZE){this._bufferFullMessageSent||(n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length)),this._bufferFullMessageSent=!0);return}this._buffer.push(i);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(n){return n&&n.length>0?this._config.emitLineDelimitedJson()?n.join("\n"):"["+n.join(",")+"]":null},t.prototype.markAsSent=function(n){var i=this.getBuffer(t.SENT_BUFFER_KEY);i=i.concat(n);this._buffer=this.removePayloadsFromBuffer(n,this._buffer);this.setBuffer(t.BUFFER_KEY,this._buffer);this.setBuffer(t.SENT_BUFFER_KEY,i)},t.prototype.clearSent=function(n){var i=this.getBuffer(t.SENT_BUFFER_KEY);i=this.removePayloadsFromBuffer(n,i);this.setBuffer(t.SENT_BUFFER_KEY,i)},t.prototype.removePayloadsFromBuffer=function(n,t){var u=[],i,r,f;for(i in t){r=!1;for(f in n)if(n[f]===t[i]){r=!0;break}r||u.push(t[i])}return u},t.prototype.getBuffer=function(t){var i,r;try{if(i=n.Util.getSessionStorage(t),i&&(r=JSON.parse(i),r))return r}catch(u){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailToRestoreStorageBuffer," storage key: "+t+", "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}return[]},t.prototype.setBuffer=function(t,i){try{var u=JSON.stringify(i);n.Util.setSessionStorage(t,u)}catch(r){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailToSetStorageBuffer," storage key: "+t+", "+n.Util.getExceptionName(r),{exception:n.Util.dump(r)}))}},t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}();n.SessionStorageSendBuffer=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){if(this._XMLHttpRequestSupported=!1,this._lastSend=0,this._config=t,this._sender=null,this._buffer=n.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new n.SessionStorageSendBuffer(t):new n.ArraySendBuffer(t),typeof XMLHttpRequest!="undefined"){var i=new XMLHttpRequest;"withCredentials"in i?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):typeof XDomainRequest!="undefined"&&(this._sender=this._xdrSender)}}return t.prototype.send=function(t){var i=this;try{if(this._config.disableTelemetry())return;if(!t){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_CannotSendEmptyTelemetry,"Cannot send empty telemetry"));return}if(!this._sender){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_SenderNotInitialized,"Sender was not initialized"));return}var r=n.Serializer.serialize(t),e=this._buffer.getItems(),u=this._buffer.batchPayloads(e);u&&u.length+r.length>this._config.maxBatchSizeInBytes()&&this.triggerSend();this._buffer.enqueue(r);this._timeoutHandle||(this._timeoutHandle=setTimeout(function(){i._timeoutHandle=null;i.triggerSend()},this._config.maxBatchInterval()));n.DataLossAnalyzer.incrementItemsQueued()}catch(f){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+n.Util.getExceptionName(f),{exception:n.Util.dump(f)}))}},t.prototype._getSizeInBytes=function(n){var r=0,t,i;if(n&&n.length)for(t=0;t0&&(r=this._buffer.getItems(),this._sender(r,i)),this._lastSend=+new Date);clearTimeout(this._timeoutHandle);this._timeoutHandle=null}catch(u){(!n.Util.getIEVersion()||n.Util.getIEVersion()>9)&&n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+n.Util.getExceptionName(u),{exception:n.Util.dump(u)}))}},t.prototype._xhrSender=function(t,i){var u=this,r=new XMLHttpRequest,f;r[n.AjaxMonitor.DisabledPropertyName]=!0;r.open("POST",this._config.endpointUrl(),i);r.setRequestHeader("Content-type","application/json");r.onreadystatechange=function(){return u._xhrReadyStateChange(r,t,t.length)};r.onerror=function(n){return u._onError(t,r.responseText||r.response||"",n)};f=this._buffer.batchPayloads(t);r.send(f);this._buffer.markAsSent(t)},t.prototype._xdrSender=function(n){var i=this,t=new XDomainRequest,r;t.onload=function(){return i._xdrOnLoad(t,n)};t.onerror=function(r){return i._onError(n,t.responseText||"",r)};t.open("POST",this._config.endpointUrl());r=this._buffer.batchPayloads(n);t.send(r);this._buffer.markAsSent(n)},t.prototype._xhrReadyStateChange=function(n,t,i){n.readyState===4&&((n.status<200||n.status>=300)&&n.status!==0?this._onError(t,n.responseText||n.response||""):this._onSuccess(t,i))},t.prototype._xdrOnLoad=function(n,t){n&&(n.responseText+""=="200"||n.responseText==="")?this._onSuccess(t,0):this._onError(t,n&&n.responseText||"")},t.prototype._onError=function(t,i){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_OnError,"Failed to send telemetry.",{message:i}));this._buffer.clearSent(t)},t.prototype._onSuccess=function(t,i){n.DataLossAnalyzer.decrementItemsQueued(i);this._buffer.clearSent(t)},t}();n.Sender=t})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(){this.hashCodeGeneragor=new n.HashCodeScoreGenerator}return t.prototype.isEnabled=function(n,t){return this.hashCodeGeneragor.getHashCodeScore(n)=0&&(i=i.replace(/[^0-9a-zA-Z-._()\/ ]/g,"_"),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_IllegalCharsInName,"name contains illegal characters. Illegal characters have been replaced with '_'.",{newName:i}))),i.length>t.MAX_NAME_LENGTH&&(i=i.substring(0,t.MAX_NAME_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_NameTooLong,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:i})))),i},t.sanitizeString=function(i){return i&&(i=n.Util.trim(i),i.toString().length>t.MAX_STRING_LENGTH&&(i=i.toString().substring(0,t.MAX_STRING_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_StringValueTooLong,"string value is too long. It has been truncated to "+t.MAX_STRING_LENGTH+" characters.",{value:i})))),i},t.sanitizeUrl=function(i){return i&&(i=n.Util.trim(i),i.length>t.MAX_URL_LENGTH&&(i=i.substring(0,t.MAX_URL_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_UrlTooLong,"url is too long, it has been trucated to "+t.MAX_URL_LENGTH+" characters.",{url:i})))),i},t.sanitizeMessage=function(i){return i&&i.length>t.MAX_MESSAGE_LENGTH&&(i=i.substring(0,t.MAX_MESSAGE_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_MessageTruncated,"message is too long, it has been trucated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:i}))),i},t.sanitizeException=function(i){return i&&i.length>t.MAX_EXCEPTION_LENGTH&&(i=i.substring(0,t.MAX_EXCEPTION_LENGTH),n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.USRACT_ExceptionTruncated,"exception is too long, it has been trucated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:i}))),i},t.sanitizeProperties=function(n){var r,i,u;if(n){r={};for(i in n)u=t.sanitizeString(n[i]),i=t.sanitizeKeyAndAddUniqueness(i,r),r[i]=u;n=r}return n},t.sanitizeMeasurements=function(n){var r,i,u;if(n){r={};for(i in n)u=n[i],i=t.sanitizeKeyAndAddUniqueness(i,r),r[i]=u;n=r}return n},t.padNumber=function(n){var t="00"+n;return t.substr(t.length-3)},t.MAX_NAME_LENGTH=150,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}();t.DataSanitizer=i})(i=t.Common||(t.Common={}))})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u){i.call(this);this.aiDataContract={ver:n.FieldType.Required,message:n.FieldType.Required,severityLevel:n.FieldType.Default,measurements:n.FieldType.Default,properties:n.FieldType.Default};r=r||n.Util.NotSpecified;this.message=t.Common.DataSanitizer.sanitizeMessage(r);this.properties=t.Common.DataSanitizer.sanitizeProperties(u)}return __extends(r,i),r.envelopeType="Microsoft.ApplicationInsights.{0}.Message",r.dataType="MessageData",r}(AI.MessageData);t.Trace=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.EventData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(t){function i(i,r,u){t.call(this);this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Required,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.name=n.Telemetry.Common.DataSanitizer.sanitizeString(i)||n.Util.NotSpecified;this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(r);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(u)}return __extends(i,t),i.envelopeType="Microsoft.ApplicationInsights.{0}.Event",i.dataType="EventData",i}(AI.EventData);t.Event=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(){function n(){this.hasFullStack=!0;this.parsedStack=[]}return n}();n.ExceptionDetails=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.exceptions=[];this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.ExceptionData=t}(AI||(AI={})),function(n){"use strict";var t=function(){function n(){}return n}();n.StackFrame=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var u=function(t){function i(i,u,f,e,o){t.call(this);this.aiDataContract={ver:n.FieldType.Required,handledAt:n.FieldType.Required,exceptions:n.FieldType.Required,severityLevel:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(f);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(e);this.handledAt=u||"unhandled";this.exceptions=[new r(i)];o&&(this.severityLevel=o)}return __extends(i,t),i.CreateSimpleException=function(n,t,i,r,u,f,e){return{handledAt:e||"unhandled",exceptions:[{hasFullStack:!0,message:n,stack:u,typeName:t,parsedStack:[{level:0,assembly:i,fileName:r,line:f,method:"unknown"}]}]}},i.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",i.dataType="ExceptionData",i}(AI.ExceptionData),r,i;t.Exception=u;r=function(r){function u(i){r.call(this);this.aiDataContract={id:n.FieldType.Default,outerId:n.FieldType.Default,typeName:n.FieldType.Required,message:n.FieldType.Required,hasFullStack:n.FieldType.Default,stack:n.FieldType.Default,parsedStack:n.FieldType.Array};this.typeName=t.Common.DataSanitizer.sanitizeString(i.name)||n.Util.NotSpecified;this.message=t.Common.DataSanitizer.sanitizeMessage(i.message)||n.Util.NotSpecified;var u=i.stack;this.parsedStack=this.parseStack(u);this.stack=t.Common.DataSanitizer.sanitizeException(u);this.hasFullStack=n.Util.isArray(this.parsedStack)&&this.parsedStack.length>0}return __extends(u,r),u.prototype.parseStack=function(n){var t=undefined,e,l,o,r,a,s,h,p,w,b;if(typeof n=="string"){for(e=n.split("\n"),t=[],l=0,o=0,r=0;r<=e.length;r++)a=e[r],i.regex.test(a)&&(s=new i(e[r],l++),o+=s.sizeInBytes,t.push(s));if(h=32768,o>h)for(var u=0,f=t.length-1,v=0,c=u,y=f;uh){b=y-c+1;t.splice(c,b);break}c=u;y=f;u++;f--}}return t},u}(AI.ExceptionDetails);i=function(t){function i(r,u){t.call(this);this.sizeInBytes=0;this.aiDataContract={level:n.FieldType.Required,method:n.FieldType.Required,assembly:n.FieldType.Default,fileName:n.FieldType.Default,line:n.FieldType.Default};this.level=u;this.method="";this.assembly=n.Util.trim(r);var f=r.match(i.regex);f&&f.length>=5&&(this.method=n.Util.trim(f[2])||this.method,this.fileName=n.Util.trim(f[4]),this.line=parseInt(f[5])||0);this.sizeInBytes+=this.method.length;this.sizeInBytes+=this.fileName.length;this.sizeInBytes+=this.assembly.length;this.sizeInBytes+=i.baseSize;this.sizeInBytes+=this.level.toString().length;this.sizeInBytes+=this.line.toString().length}return __extends(i,t),i.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,i.baseSize=58,i}(AI.StackFrame);t._StackFrame=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.metrics=[];this.properties={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.MetricData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Measurement=0]="Measurement";n[n.Aggregation=1]="Aggregation"})(n.DataPointType||(n.DataPointType={}));var t=n.DataPointType}(AI||(AI={})),function(n){"use strict";var t=function(){function t(){this.kind=n.DataPointType.Measurement}return t}();n.DataPoint=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(t){function i(){t.apply(this,arguments);this.aiDataContract={name:n.FieldType.Required,kind:n.FieldType.Default,value:n.FieldType.Required,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default}}return __extends(i,t),i}(AI.DataPoint);t.DataPoint=i})(i=t.Common||(t.Common={}))})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(r){function u(u,f,e,o,s,h){r.call(this);this.aiDataContract={ver:t.FieldType.Required,metrics:t.FieldType.Required,properties:t.FieldType.Default};var c=new n.ApplicationInsights.Telemetry.Common.DataPoint;c.count=e>0?e:undefined;c.max=isNaN(s)||s===null?undefined:s;c.min=isNaN(o)||o===null?undefined:o;c.name=i.Common.DataSanitizer.sanitizeString(u)||t.Util.NotSpecified;c.value=f;this.metrics=[c];this.properties=t.Telemetry.Common.DataSanitizer.sanitizeProperties(h)}return __extends(u,r),u.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",u.dataType="MetricData",u}(AI.MetricData);i.Metric=r})(i=t.Telemetry||(t.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.EventData);n.PageViewData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u,f,e,o){i.call(this);this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default};this.url=t.Common.DataSanitizer.sanitizeUrl(u);this.name=t.Common.DataSanitizer.sanitizeString(r)||n.Util.NotSpecified;isNaN(f)||(this.duration=n.Util.msToTimeSpan(f));this.properties=n.Telemetry.Common.DataSanitizer.sanitizeProperties(e);this.measurements=n.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o)}return __extends(r,i),r.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",r.dataType="PageviewData",r}(AI.PageViewData);t.PageView=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.PageViewPerfData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(u,f,e,o,s){var h;if(i.call(this),this.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,perfTotal:n.FieldType.Default,networkConnect:n.FieldType.Default,sentRequest:n.FieldType.Default,receivedResponse:n.FieldType.Default,domProcessing:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default},this.isValid=!1,h=r.getPerformanceTiming(),h){var c=r.getDuration(h.navigationStart,h.loadEventEnd),l=r.getDuration(h.navigationStart,h.connectEnd),a=r.getDuration(h.requestStart,h.responseStart),v=r.getDuration(h.responseStart,h.responseEnd),y=r.getDuration(h.responseEnd,h.loadEventEnd);c==0?n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.WARNING,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_ErrorPVCalc,"error calculating page view performance.",{total:c,network:l,request:a,response:v,dom:y})):c0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},r.getDuration=function(n,t){var i=0;return isNaN(n)||isNaN(t)||(i=Math.max(t-n,0)),i},r.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",r.dataType="PageviewPerformanceData",r}(AI.PageViewPerfData);t.PageViewPerformance=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){this._config=t;this._sender=new n.Sender(t);typeof window!="undefined"&&(this._sessionManager=new n.Context._SessionManager(t),this.application=new n.Context.Application,this.device=new n.Context.Device,this.internal=new n.Context.Internal,this.location=new n.Context.Location,this.user=new n.Context.User(t),this.operation=new n.Context.Operation,this.session=new n.Context.Session,this.sample=new n.Context.Sample(t.sampleRate()))}return t.prototype.addTelemetryInitializer=function(n){this.telemetryInitializers=this.telemetryInitializers||[];this.telemetryInitializers.push(n)},t.prototype.track=function(t){return t?(t.name===n.Telemetry.PageView.envelopeType&&n._InternalLogging.resetInternalMessageCount(),this.session&&typeof this.session.id!="string"&&this._sessionManager.update(),this._track(t)):n._InternalLogging.throwInternalUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.USRACT_TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument")),t},t.prototype._track=function(t){var i,f,r,u,o;this.session&&(typeof this.session.id=="string"?this._applySessionContext(t,this.session):this._applySessionContext(t,this._sessionManager.automaticSession));this._applyApplicationContext(t,this.application);this._applyDeviceContext(t,this.device);this._applyInternalContext(t,this.internal);this._applyLocationContext(t,this.location);this._applySampleContext(t,this.sample);this._applyUserContext(t,this.user);this._applyOperationContext(t,this.operation);t.iKey=this._config.instrumentationKey();i=!1;try{for(this.telemetryInitializers=this.telemetryInitializers||[],f=this.telemetryInitializers.length,r=0;rl&&(clearInterval(a),s||(o.appInsights.sendPageViewInternal(i,r,l,u,f),o.appInsights.flush()))}catch(v){n._InternalLogging.throwInternalNonUserActionable(n.LoggingSeverity.CRITICAL,new n._InternalLogMessage(n._InternalMessageId.NONUSRACT_TrackPVFailedCalc,"trackPageView failed on page load calculation: "+n.Util.getExceptionName(v),{exception:n.Util.dump(v)}))}},100)},i}();t.PageViewManager=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";var r=function(){function t(n){this.prevPageVisitDataKeyName="prevPageVisitData";this.pageVisitTimeTrackingHandler=n}return t.prototype.trackPreviousPageVisit=function(t,i){try{var r=this.restartPageVisitTimer(t,i);r&&this.pageVisitTimeTrackingHandler(r.pageName,r.pageUrl,r.pageVisitTime)}catch(u){n._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+n.Util.dump(u))}},t.prototype.restartPageVisitTimer=function(t,i){try{var r=this.stopPageVisitTimer();return this.startPageVisitTimer(t,i),r}catch(u){return n._InternalLogging.warnToConsole("Call to restart failed: "+n.Util.dump(u)),null}},t.prototype.startPageVisitTimer=function(t,r){try{if(n.Util.canUseSessionStorage()){if(n.Util.getSessionStorage(this.prevPageVisitDataKeyName)!=null)throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var u=new i(t,r),f=JSON.stringify(u);n.Util.setSessionStorage(this.prevPageVisitDataKeyName,f)}}catch(e){n._InternalLogging.warnToConsole("Call to start failed: "+n.Util.dump(e))}},t.prototype.stopPageVisitTimer=function(){var r,i,t;try{return n.Util.canUseSessionStorage()?(r=Date.now(),i=n.Util.getSessionStorage(this.prevPageVisitDataKeyName),i?(t=JSON.parse(i),t.pageVisitTime=r-t.pageVisitStartTime,n.Util.removeSessionStorage(this.prevPageVisitDataKeyName),t):null):null}catch(u){return n._InternalLogging.warnToConsole("Stop page visit timer failed: "+n.Util.dump(u)),null}},t}(),i;t.PageVisitTimeManager=r;i=function(){function n(n,t){this.pageVisitStartTime=Date.now();this.pageName=n;this.pageUrl=t}return n}();t.PageVisitData=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";(function(n){n[n.SQL=0]="SQL";n[n.Http=1]="Http";n[n.Other=2]="Other"})(n.DependencyKind||(n.DependencyKind={}));var t=n.DependencyKind}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Undefined=0]="Undefined";n[n.Aic=1]="Aic";n[n.Apmc=2]="Apmc"})(n.DependencySourceType||(n.DependencySourceType={}));var t=n.DependencySourceType}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.kind=n.DataPointType.Aggregation;this.dependencyKind=n.DependencyKind.Other;this.success=!0;this.dependencySource=n.DependencySourceType.Apmc;this.properties={};t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.RemoteDependencyData=t}(AI||(AI={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(i){function r(r,u,f,e,o,s,h){i.call(this);this.aiDataContract={id:n.FieldType.Required,ver:n.FieldType.Required,name:n.FieldType.Default,kind:n.FieldType.Required,value:n.FieldType.Default,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default,dependencyKind:n.FieldType.Default,success:n.FieldType.Default,async:n.FieldType.Default,dependencySource:n.FieldType.Default,commandName:n.FieldType.Default,dependencyTypeName:n.FieldType.Default,properties:n.FieldType.Default,resultCode:n.FieldType.Default};this.id=r;this.name=this.formatDependencyName(h,u);this.commandName=t.Common.DataSanitizer.sanitizeUrl(f);this.value=e;this.success=o;this.resultCode=s+"";this.dependencyKind=AI.DependencyKind.Http;this.dependencyTypeName="Ajax"}return __extends(r,i),r.prototype.formatDependencyName=function(n,t){return n?n.toUpperCase()+" "+t:t},r.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",r.dataType="RemoteDependencyData",r}(AI.RemoteDependencyData);t.RemoteDependencyData=i})(t=n.Telemetry||(n.Telemetry={}))})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict"})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){"use strict";var r,i;t.Version="0.23.0";r=function(){function r(u){var f=this,e,o,s;if(this._trackAjaxAttempts=0,this.config=u||{},e=r.defaultConfig,e!==undefined)for(o in e)this.config[o]===undefined&&(this.config[o]=e[o]);t._InternalLogging.verboseLogging=function(){return f.config.verboseLogging};t._InternalLogging.enableDebugExceptions=function(){return f.config.enableDebug};s={instrumentationKey:function(){return f.config.instrumentationKey},accountId:function(){return f.config.accountId},sessionRenewalMs:function(){return f.config.sessionRenewalMs},sessionExpirationMs:function(){return f.config.sessionExpirationMs},endpointUrl:function(){return f.config.endpointUrl},emitLineDelimitedJson:function(){return f.config.emitLineDelimitedJson},maxBatchSizeInBytes:function(){return f.config.maxBatchSizeInBytes},maxBatchInterval:function(){return f.config.maxBatchInterval},disableTelemetry:function(){return f.config.disableTelemetry},sampleRate:function(){return f.config.samplingPercentage},cookieDomain:function(){return f.config.cookieDomain},enableSessionStorageBuffer:function(){return f.config.enableSessionStorageBuffer}};this.context=new t.TelemetryContext(s);this._pageViewManager=new n.ApplicationInsights.Telemetry.PageViewManager(this,this.config.overridePageViewDuration);this._eventTracking=new i("trackEvent");this._eventTracking.action=function(n,i,r,u,e){e?isNaN(e.duration)&&(e.duration=r):e={duration:r};var o=new t.Telemetry.Event(n,u,e),s=new t.Telemetry.Common.Data(t.Telemetry.Event.dataType,o),h=new t.Telemetry.Common.Envelope(s,t.Telemetry.Event.envelopeType);f.context.track(h)};this._pageTracking=new i("trackPageView");this._pageTracking.action=function(n,t,i,r,u){f.sendPageViewInternal(n,t,i,r,u)};this._pageVisitTimeManager=new t.Telemetry.PageVisitTimeManager(function(n,t,i){return f.trackPageVisitTime(n,t,i)});this.config.disableAjaxTracking||new n.ApplicationInsights.AjaxMonitor(this)}return r.prototype.sendPageViewInternal=function(n,i,r,u,f){var e=new t.Telemetry.PageView(n,i,r,u,f),o=new t.Telemetry.Common.Data(t.Telemetry.PageView.dataType,e),s=new t.Telemetry.Common.Envelope(o,t.Telemetry.PageView.envelopeType);this.context.track(s);this._trackAjaxAttempts=0},r.prototype.sendPageViewPerformanceInternal=function(n){var i=new t.Telemetry.Common.Data(t.Telemetry.PageViewPerformance.dataType,n),r=new t.Telemetry.Common.Envelope(i,t.Telemetry.PageViewPerformance.envelopeType);this.context.track(r)},r.prototype.startTrackPage=function(n){try{typeof n!="string"&&(n=window.document&&window.document.title||"");this._pageTracking.start(n)}catch(i){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StartTrackFailed,"startTrackPage failed, page view may not be collected: "+t.Util.getExceptionName(i),{exception:t.Util.dump(i)}))}},r.prototype.stopTrackPage=function(n,i,r,u){try{typeof n!="string"&&(n=window.document&&window.document.title||"");typeof i!="string"&&(i=window.location&&window.location.href||"");this._pageTracking.stop(n,i,r,u);this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n,i)}catch(f){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+t.Util.getExceptionName(f),{exception:t.Util.dump(f)}))}},r.prototype.trackPageView=function(n,i,r,u,f){try{this._pageViewManager.trackPageView(n,i,r,u,f);this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n,i)}catch(e){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_TrackPVFailed,"trackPageView failed, page view will not be collected: "+t.Util.getExceptionName(e),{exception:t.Util.dump(e)}))}},r.prototype.startTrackEvent=function(n){try{this._eventTracking.start(n)}catch(i){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+t.Util.getExceptionName(i),{exception:t.Util.dump(i)}))}},r.prototype.stopTrackEvent=function(n,i,r){try{this._eventTracking.stop(n,undefined,i,r)}catch(u){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+t.Util.getExceptionName(u),{exception:t.Util.dump(u)}))}},r.prototype.trackEvent=function(n,i,r){try{var f=new t.Telemetry.Event(n,i,r),e=new t.Telemetry.Common.Data(t.Telemetry.Event.dataType,f),o=new t.Telemetry.Common.Envelope(e,t.Telemetry.Event.envelopeType);this.context.track(o)}catch(u){t._InternalLogging.throwInternalNonUserActionable(t.LoggingSeverity.CRITICAL,new t._InternalLogMessage(t._InternalMessageId.NONUSRACT_TrackEventFailed,"trackEvent failed, event will not be collected: "+t.Util.getExceptionName(u),{exception:t.Util.dump(u)}))}},r.prototype.trackDependency=function(n,i,r,u,f,e,o){if(this.config.maxAjaxCallsPerView===-1||this._trackAjaxAttempts0?n.maxBatchSizeInBytes:1e6,n.maxBatchInterval=isNaN(n.maxBatchInterval)?15e3:n.maxBatchInterval,n.enableDebug=t.Util.stringToBoolOrDefault(n.enableDebug),n.disableExceptionTracking=n.disableExceptionTracking!==undefined&&n.disableExceptionTracking!==null?t.Util.stringToBoolOrDefault(n.disableExceptionTracking):!1,n.disableTelemetry=t.Util.stringToBoolOrDefault(n.disableTelemetry),n.verboseLogging=t.Util.stringToBoolOrDefault(n.verboseLogging),n.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(n.emitLineDelimitedJson),n.diagnosticLogInterval=n.diagnosticLogInterval||1e4,n.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(n.autoTrackPageVisitTime),(isNaN(n.samplingPercentage)||n.samplingPercentage<=0||n.samplingPercentage>=100)&&(n.samplingPercentage=100),n.disableAjaxTracking=n.disableAjaxTracking!==undefined&&n.disableAjaxTracking!==null?t.Util.stringToBoolOrDefault(n.disableAjaxTracking):!1,n.maxAjaxCallsPerView=isNaN(n.maxAjaxCallsPerView)?500:n.maxAjaxCallsPerView,n.disableCorrelationHeaders=n.disableCorrelationHeaders!==undefined&&n.disableCorrelationHeaders!==null?t.Util.stringToBoolOrDefault(n.disableCorrelationHeaders):!0,n.disableFlushOnBeforeUnload=n.disableFlushOnBeforeUnload!==undefined&&n.disableFlushOnBeforeUnload!==null?t.Util.stringToBoolOrDefault(n.disableFlushOnBeforeUnload):!1,n.enableSessionStorageBuffer=n.enableSessionStorageBuffer!==undefined&&n.enableSessionStorageBuffer!==null?t.Util.stringToBoolOrDefault(n.enableSessionStorageBuffer):!0,n},i}();t.Initialization=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict";var r,u;try{if(typeof window!="undefined"&&typeof JSON!="undefined")if(r="appInsights",window[r]===undefined)n.ApplicationInsights.AppInsights.defaultConfig=n.ApplicationInsights.Initialization.getDefaultConfig();else{var f=window[r]||{},t=new n.ApplicationInsights.Initialization(f),i=t.loadAppInsights();for(u in i)f[u]=i[u];t.emptyQueue();t.pollInteralLogs(i);t.addHousekeepingBeforeUnload(i)}}catch(e){n.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+e.message)}})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.AjaxCallData=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.RequestData=t}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.state=n.SessionState.Start;t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.SessionStateData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Pass=0]="Pass";n[n.Fail=1]="Fail"})(n.TestResult||(n.TestResult={}));var t=n.TestResult}(AI||(AI={})) \ No newline at end of file diff --git a/dist/ai.js b/dist/ai.js index 1213d4475..2fcab6fc2 100644 --- a/dist/ai.js +++ b/dist/ai.js @@ -70,6 +70,7 @@ var Microsoft; _InternalMessageId[_InternalMessageId["USRACT_TrackArgumentsNotSpecified"] = 59] = "USRACT_TrackArgumentsNotSpecified"; _InternalMessageId[_InternalMessageId["USRACT_UrlTooLong"] = 60] = "USRACT_UrlTooLong"; _InternalMessageId[_InternalMessageId["USRACT_SessionStorageBufferFull"] = 61] = "USRACT_SessionStorageBufferFull"; + _InternalMessageId[_InternalMessageId["USRACT_CannotAccessCookie"] = 62] = "USRACT_CannotAccessCookie"; })(ApplicationInsights._InternalMessageId || (ApplicationInsights._InternalMessageId = {})); var _InternalMessageId = ApplicationInsights._InternalMessageId; var _InternalLogMessage = (function () { @@ -327,12 +328,27 @@ var Microsoft; } return false; }; + Util.canUseCookies = function () { + if (Util._canUseCookies === undefined) { + Util._canUseCookies = false; + try { + Util._canUseCookies = Util.document.cookie !== undefined; + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternalNonUserActionable(ApplicationInsights.LoggingSeverity.WARNING, new ApplicationInsights._InternalLogMessage(ApplicationInsights._InternalMessageId.USRACT_CannotAccessCookie, "Cannot access document.cookie - " + Util.getExceptionName(e), { exception: Util.dump(e) })); + } + ; + } + return Util._canUseCookies; + }; Util.setCookie = function (name, value, domain) { var domainAttrib = ""; if (domain) { domainAttrib = ";domain=" + domain; } - Util.document.cookie = name + "=" + value + domainAttrib + ";path=/"; + if (Util.canUseCookies()) { + Util.document.cookie = name + "=" + value + domainAttrib + ";path=/"; + } }; Util.stringToBoolOrDefault = function (str) { if (!str) { @@ -341,6 +357,9 @@ var Microsoft; return str.toString().toLowerCase() === "true"; }; Util.getCookie = function (name) { + if (!Util.canUseCookies()) { + return; + } var value = ""; if (name && name.length) { var cookieName = name + "="; @@ -357,7 +376,9 @@ var Microsoft; return value; }; Util.deleteCookie = function (name) { - Util.document.cookie = name + "=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;"; + if (Util.canUseCookies()) { + Util.document.cookie = name + "=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;"; + } }; Util.trim = function (str) { if (typeof str !== "string") @@ -462,6 +483,7 @@ var Microsoft; return true; }; Util.document = typeof document !== "undefined" ? document : {}; + Util._canUseCookies = undefined; Util.NotSpecified = "not_specified"; return Util; })(); @@ -3383,7 +3405,7 @@ var Microsoft; var ApplicationInsights; (function (ApplicationInsights) { "use strict"; - ApplicationInsights.Version = "0.22.19"; + ApplicationInsights.Version = "0.23.0"; var AppInsights = (function () { function AppInsights(config) { var _this = this; @@ -3787,7 +3809,7 @@ var Microsoft; false; config.enableSessionStorageBuffer = (config.enableSessionStorageBuffer !== undefined && config.enableSessionStorageBuffer !== null) ? ApplicationInsights.Util.stringToBoolOrDefault(config.enableSessionStorageBuffer) : - false; + true; return config; }; return Initialization;