From 12db75d8891933f8dd2596dd4158fdc0d13e8de9 Mon Sep 17 00:00:00 2001 From: Piyali Jana Date: Mon, 27 Aug 2018 12:51:55 -0700 Subject: [PATCH] Commit files for 1.0.20 --- dist/ai.0.js | 2 +- dist/ai.0.js.map | 2 +- dist/ai.1.0.20.js | 5200 +++++++++++++++++++++++++++++++++++++++++ dist/ai.1.0.20.min.js | 2 + dist/ai.js | 209 +- dist/ai.js.map | 2 +- 6 files changed, 5206 insertions(+), 211 deletions(-) create mode 100644 dist/ai.1.0.20.js create mode 100644 dist/ai.1.0.20.min.js diff --git a/dist/ai.0.js b/dist/ai.0.js index bb3b3c24..dd22520c 100644 --- a/dist/ai.0.js +++ b/dist/ai.0.js @@ -1,2 +1,2 @@ -"use strict";var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){}}();e.Base=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){this.ver=1,this.sampleRate=100,this.tags={}}}();e.Envelope=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var AI;!function(e){!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(e.SeverityLevel||(e.SeverityLevel={}))}(AI||(AI={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t;!function(e){e[e.CRITICAL=0]="CRITICAL",e[e.WARNING=1]="WARNING"}(t=e.LoggingSeverity||(e.LoggingSeverity={}));var n;!function(e){e[e.BrowserDoesNotSupportLocalStorage=0]="BrowserDoesNotSupportLocalStorage",e[e.BrowserCannotReadLocalStorage=1]="BrowserCannotReadLocalStorage",e[e.BrowserCannotReadSessionStorage=2]="BrowserCannotReadSessionStorage",e[e.BrowserCannotWriteLocalStorage=3]="BrowserCannotWriteLocalStorage",e[e.BrowserCannotWriteSessionStorage=4]="BrowserCannotWriteSessionStorage",e[e.BrowserFailedRemovalFromLocalStorage=5]="BrowserFailedRemovalFromLocalStorage",e[e.BrowserFailedRemovalFromSessionStorage=6]="BrowserFailedRemovalFromSessionStorage",e[e.CannotSendEmptyTelemetry=7]="CannotSendEmptyTelemetry",e[e.ClientPerformanceMathError=8]="ClientPerformanceMathError",e[e.ErrorParsingAISessionCookie=9]="ErrorParsingAISessionCookie",e[e.ErrorPVCalc=10]="ErrorPVCalc",e[e.ExceptionWhileLoggingError=11]="ExceptionWhileLoggingError",e[e.FailedAddingTelemetryToBuffer=12]="FailedAddingTelemetryToBuffer",e[e.FailedMonitorAjaxAbort=13]="FailedMonitorAjaxAbort",e[e.FailedMonitorAjaxDur=14]="FailedMonitorAjaxDur",e[e.FailedMonitorAjaxOpen=15]="FailedMonitorAjaxOpen",e[e.FailedMonitorAjaxRSC=16]="FailedMonitorAjaxRSC",e[e.FailedMonitorAjaxSend=17]="FailedMonitorAjaxSend",e[e.FailedMonitorAjaxGetCorrelationHeader=18]="FailedMonitorAjaxGetCorrelationHeader",e[e.FailedToAddHandlerForOnBeforeUnload=19]="FailedToAddHandlerForOnBeforeUnload",e[e.FailedToSendQueuedTelemetry=20]="FailedToSendQueuedTelemetry",e[e.FailedToReportDataLoss=21]="FailedToReportDataLoss",e[e.FlushFailed=22]="FlushFailed",e[e.MessageLimitPerPVExceeded=23]="MessageLimitPerPVExceeded",e[e.MissingRequiredFieldSpecification=24]="MissingRequiredFieldSpecification",e[e.NavigationTimingNotSupported=25]="NavigationTimingNotSupported",e[e.OnError=26]="OnError",e[e.SessionRenewalDateIsZero=27]="SessionRenewalDateIsZero",e[e.SenderNotInitialized=28]="SenderNotInitialized",e[e.StartTrackEventFailed=29]="StartTrackEventFailed",e[e.StopTrackEventFailed=30]="StopTrackEventFailed",e[e.StartTrackFailed=31]="StartTrackFailed",e[e.StopTrackFailed=32]="StopTrackFailed",e[e.TelemetrySampledAndNotSent=33]="TelemetrySampledAndNotSent",e[e.TrackEventFailed=34]="TrackEventFailed",e[e.TrackExceptionFailed=35]="TrackExceptionFailed",e[e.TrackMetricFailed=36]="TrackMetricFailed",e[e.TrackPVFailed=37]="TrackPVFailed",e[e.TrackPVFailedCalc=38]="TrackPVFailedCalc",e[e.TrackTraceFailed=39]="TrackTraceFailed",e[e.TransmissionFailed=40]="TransmissionFailed",e[e.FailedToSetStorageBuffer=41]="FailedToSetStorageBuffer",e[e.FailedToRestoreStorageBuffer=42]="FailedToRestoreStorageBuffer",e[e.InvalidBackendResponse=43]="InvalidBackendResponse",e[e.FailedToFixDepricatedValues=44]="FailedToFixDepricatedValues",e[e.InvalidDurationValue=45]="InvalidDurationValue",e[e.CannotSerializeObject=46]="CannotSerializeObject",e[e.CannotSerializeObjectNonSerializable=47]="CannotSerializeObjectNonSerializable",e[e.CircularReferenceDetected=48]="CircularReferenceDetected",e[e.ClearAuthContextFailed=49]="ClearAuthContextFailed",e[e.ExceptionTruncated=50]="ExceptionTruncated",e[e.IllegalCharsInName=51]="IllegalCharsInName",e[e.ItemNotInArray=52]="ItemNotInArray",e[e.MaxAjaxPerPVExceeded=53]="MaxAjaxPerPVExceeded",e[e.MessageTruncated=54]="MessageTruncated",e[e.NameTooLong=55]="NameTooLong",e[e.SampleRateOutOfRange=56]="SampleRateOutOfRange",e[e.SetAuthContextFailed=57]="SetAuthContextFailed",e[e.SetAuthContextFailedAccountName=58]="SetAuthContextFailedAccountName",e[e.StringValueTooLong=59]="StringValueTooLong",e[e.StartCalledMoreThanOnce=60]="StartCalledMoreThanOnce",e[e.StopCalledWithoutStart=61]="StopCalledWithoutStart",e[e.TelemetryInitializerFailed=62]="TelemetryInitializerFailed",e[e.TrackArgumentsNotSpecified=63]="TrackArgumentsNotSpecified",e[e.UrlTooLong=64]="UrlTooLong",e[e.SessionStorageBufferFull=65]="SessionStorageBufferFull",e[e.CannotAccessCookie=66]="CannotAccessCookie",e[e.IdTooLong=67]="IdTooLong"}(n=e._InternalMessageId||(e._InternalMessageId={}));var i=function(){function e(t,i,o,a){void 0===o&&(o=!1),this.messageId=t,this.message=(o?e.AiUserActionablePrefix:e.AiNonUserActionablePrefix)+n[t].toString();var r=(i?" message:"+e.sanitizeDiagnosticText(i):"")+(a?" props:"+e.sanitizeDiagnosticText(JSON.stringify(a)):"");this.message+=r}return e.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},e.AiNonUserActionablePrefix="AI (Internal): ",e.AiUserActionablePrefix="AI: ",e}();e._InternalLogMessage=i;var o=function(){function o(){}return o.throwInternal=function(e,t,o,a,r){void 0===r&&(r=!1);var s=new i(t,o,r,a);if(this.enableDebugExceptions())throw s;if(void 0!==s&&s&&"undefined"!=typeof s.message){if(r){var l=n[s.messageId];this._messageLogged[l]&&!this.verboseLogging()||(this.warnToConsole(s.message),this._messageLogged[l]=!0)}else this.verboseLogging()&&this.warnToConsole(s.message);this.logInternalMessage(e,s)}},o.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},o.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},o.clearInternalMessageLoggedTypes=function(){if(e.Util.canUseSessionStorage())for(var t=e.Util.getSessionStorageKeys(),n=0;n=this.MAX_INTERNAL_MESSAGE_LIMIT},o.AIInternalMessagePrefix="AITR_",o.enableDebugExceptions=function(){return!1},o.verboseLogging=function(){return!1},o.queue=[],o.MAX_INTERNAL_MESSAGE_LIMIT=25,o._messageCount=0,o._messageLogged={},o}();e._InternalLogging=o}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.newId=function(){for(var e="",t=1073741824*Math.random();t>0;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},e}();e.UtilHelpers=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t;!function(e){e[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage"}(t||(t={}));var n=function(){function n(){}return n.disableStorage=function(){n._canUseLocalStorage=!1,n._canUseSessionStorage=!1},n._getLocalStorageObject=function(){return n.canUseLocalStorage()?n._getVerifiedStorageObject(t.LocalStorage):null},n._getVerifiedStorageObject=function(e){var n,i,o=null;try{i=new Date,(o=e===t.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),n=o.getItem(i)!=i,o.removeItem(i),n&&(o=null)}catch(a){o=null}return o},n.isInternalApplicationInsightsEndpoint=function(e){return-1!==n._internalEndpoints.indexOf(e.toLowerCase())},n.canUseLocalStorage=function(){return n._canUseLocalStorage===undefined&&(n._canUseLocalStorage=!!n._getVerifiedStorageObject(t.LocalStorage)),n._canUseLocalStorage},n.getStorage=function(t){var i=n._getLocalStorageObject();if(null!==i)try{return i.getItem(t)}catch(o){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+n.getExceptionName(o),{exception:n.dump(o)})}return null},n.setStorage=function(t,i){var o=n._getLocalStorageObject();if(null!==o)try{return o.setItem(t,i),!0}catch(a){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+n.getExceptionName(a),{exception:n.dump(a)})}return!1},n.removeStorage=function(t){var i=n._getLocalStorageObject();if(null!==i)try{return i.removeItem(t),!0}catch(o){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+n.getExceptionName(o),{exception:n.dump(o)})}return!1},n._getSessionStorageObject=function(){return n.canUseSessionStorage()?n._getVerifiedStorageObject(t.SessionStorage):null},n.canUseSessionStorage=function(){return n._canUseSessionStorage===undefined&&(n._canUseSessionStorage=!!n._getVerifiedStorageObject(t.SessionStorage)),n._canUseSessionStorage},n.getSessionStorageKeys=function(){var e=[];if(n.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},n.getSessionStorage=function(t){var i=n._getSessionStorageObject();if(null!==i)try{return i.getItem(t)}catch(o){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+n.getExceptionName(o),{exception:n.dump(o)})}return null},n.setSessionStorage=function(t,i){var o=n._getSessionStorageObject();if(null!==o)try{return o.setItem(t,i),!0}catch(a){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+n.getExceptionName(a),{exception:n.dump(a)})}return!1},n.removeSessionStorage=function(t){var i=n._getSessionStorageObject();if(null!==i)try{return i.removeItem(t),!0}catch(o){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+n.getExceptionName(o),{exception:n.dump(o)})}return!1},n.disableCookies=function(){n._canUseCookies=!1},n.canUseCookies=function(){if(n._canUseCookies===undefined){n._canUseCookies=!1;try{n._canUseCookies=n.document.cookie!==undefined}catch(t){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.CannotAccessCookie,"Cannot access document.cookie - "+n.getExceptionName(t),{exception:n.dump(t)})}}return n._canUseCookies},n.setCookie=function(e,t,i){var o="",a="";i&&(o=";domain="+i),n.document.location&&"https:"===n.document.location.protocol&&(a=";secure"),n.canUseCookies()&&(n.document.cookie=e+"="+t+o+";path=/"+a)},n.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},n.getCookie=function(e){if(n.canUseCookies()){var t="";if(e&&e.length)for(var i=e+"=",o=n.document.cookie.split(";"),a=0;a0?a+".":"")+o+":"+i+":"+n+"."+t},n.isCrossOriginError=function(e,t,n,i,o){return("Script error."===e||"Script error"===e)&&!o},n.dump=function(e){var t=Object.prototype.toString.call(e),n=JSON.stringify(e);return"[object Error]"===t&&(n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+n},n.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},n.addEventHandler=function(e,t){if(!window||"string"!=typeof e||"function"!=typeof t)return!1;var n="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(n,t)}return!0},n.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},n.document="undefined"!=typeof document?document:{},n._canUseCookies=undefined,n._canUseLocalStorage=undefined,n._canUseSessionStorage=undefined,n._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],n.NotSpecified="not_specified",n}();e.Util=n;var i=function(){function e(){}return e.parseUrl=function(t){return e.htmlAnchorElement||(e.htmlAnchorElement=e.document.createElement?e.document.createElement("a"):{}),e.htmlAnchorElement.href=t,e.htmlAnchorElement},e.getAbsoluteUrl=function(t){var n,i=e.parseUrl(t);return i&&(n=i.href),n},e.getPathName=function(t){var n,i=e.parseUrl(t);return i&&(n=i.pathname),n},e.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},e.document="undefined"!=typeof document?document:{},e}();e.UrlHelper=i;var o=function(){function t(){}return t.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var o=i.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||o===n))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var r=0;r100||t<0)&&(e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new e.SamplingScoreGenerator}return t.prototype.isSampledIn=function(e){return 100==this.sampleRate||this.samplingScoreGenerator.getSamplingScore(e)this.config.sessionExpirationMs(),o=n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();i||o?(this.automaticSession.isFirst=undefined,this.renew()):(!this.cookieUpdatedTimestamp||n-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=n,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},t.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},t.prototype.initializeAutomaticSession=function(){var t=e.Util.getCookie("ai_session");if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var n=e.Util.getStorage("ai_session");n&&this.initializeAutomaticSessionWithData(n)}this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},t.prototype.initializeAutomaticSessionWithData=function(t){var n=t.split("|");n.length>0&&(this.automaticSession.id=n[0]);try{if(n.length>1){var i=+n[1];this.automaticSession.acquisitionDate=+new Date(i),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0}if(n.length>2){var o=+n[2];this.automaticSession.renewalDate=+new Date(o),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0}}catch(a){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+e.Util.getExceptionName(a),{exception:e.Util.dump(a)})}0==this.automaticSession.renewalDate&&e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=e.dateTime.Now();this.automaticSession.id=e.Util.newId(),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),e.Util.canUseLocalStorage()||e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,n,i){var o=n+this.config.sessionExpirationMs(),a=i+this.config.sessionRenewalMs(),r=new Date,s=[t,n,i];o0&&(this.id=o[0])}if(this.config=n,!this.id){this.id=e.Util.newId();var a=new Date,r=e.Util.toISOStringForIE8(a);this.accountAcquisitionDate=r,a.setTime(a.getTime()+31536e6);var s=[this.id,r],l=this.config.cookieDomain?this.config.cookieDomain():undefined;e.Util.setCookie(t.userCookieName,s.join(t.cookieSeparator)+";expires="+a.toUTCString(),l),e.Util.removeStorage("ai_session")}this.accountId=n.accountId?n.accountId():undefined;var c=e.Util.getCookie(t.authUserCookieName);if(c){var u=(c=decodeURI(c)).split(t.cookieSeparator);u[0]&&(this.authenticatedId=u[0]),u.length>1&&u[1]&&(this.accountId=u[1])}}return t.prototype.setAuthenticatedUserContext=function(n,i,o){if(void 0===o&&(o=!1),!this.validateUserInput(n)||i&&!this.validateUserInput(i))e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=n;var a=this.authenticatedId;i&&(this.accountId=i,a=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),o&&e.Util.setCookie(t.authUserCookieName,encodeURI(a),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,e.Util.deleteCookie(t.authUserCookieName)},t.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}();t.User=n}(e.Context||(e.Context={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.IsNullOrUndefined=function(e){return void 0===e||null===e},e}();e.extensions=t;var n=function(){function e(){}return e.GetLength=function(e){var n=0;if(!t.IsNullOrUndefined(e)){var i="";try{i=e.toString()}catch(o){}n=i.length,n=isNaN(n)?0:n}return n},e}();e.stringUtils=n;var i=function(){function e(){}return e.Now=window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,n){var i=null;return 0===e||0===n||t.IsNullOrUndefined(e)||t.IsNullOrUndefined(n)||(i=n-e),i},e}();e.dateTime=i;var o=function(){function e(){}return e.AttachEvent=function(e,n,i){var o=!1;return t.IsNullOrUndefined(e)||(t.IsNullOrUndefined(e.attachEvent)?t.IsNullOrUndefined(e.addEventListener)||(e.addEventListener(n,i,!1),o=!0):(e.attachEvent("on"+n,i),o=!0)),o},e.DetachEvent=function(e,n,i){t.IsNullOrUndefined(e)||(t.IsNullOrUndefined(e.detachEvent)?t.IsNullOrUndefined(e.removeEventListener)||e.removeEventListener(n,i,!1):e.detachEvent("on"+n,i))},e}();e.EventHelper=o;var a=function(){function t(){}return t.ParseDependencyPath=function(t,n,i){var o,a;if(t&&t.length>0){var r=e.UrlHelper.parseUrl(t);o=r.host,null!=r.pathname?("/"!==(i=0===r.pathname.length?"/":r.pathname).charAt(0)&&(i="/"+i),a=e.Telemetry.Common.DataSanitizer.sanitizeString(n?n+" "+i:i)):a=e.Telemetry.Common.DataSanitizer.sanitizeString(t)}else o=i,a=i;return{target:o,name:a}},t}();e.AjaxHelper=a}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}}();e.XHRMonitoringState=t;var n=function(){function n(n){this.completed=!1,this.requestHeadersSize=null,this.ttfb=null,this.responseReceivingDuration=null,this.callbackDuration=null,this.ajaxTotalDuration=null,this.aborted=null,this.pageUrl=null,this.requestUrl=null,this.requestSize=0,this.method=null,this.status=null,this.requestSentTime=null,this.responseStartedTime=null,this.responseFinishedTime=null,this.callbackFinishedTime=null,this.endTime=null,this.originalOnreadystatechage=null,this.xhrMonitoringState=new t,this.clientFailure=0,this.CalculateMetrics=function(){var t=this;t.ajaxTotalDuration=Math.round(1e3*e.dateTime.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3},this.id=n}return n.prototype.getAbsoluteUrl=function(){return this.requestUrl?e.UrlHelper.getAbsoluteUrl(this.requestUrl):null},n.prototype.getPathName=function(){return this.requestUrl?e.Telemetry.Common.DataSanitizer.sanitizeUrl(e.UrlHelper.getCompleteUrl(this.method,this.requestUrl)):null},n}();e.ajaxRecord=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}();e.RequestHeaders=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){}}();e.Domain=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.EventData=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(e.EventData);e.PageViewData=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.RemoteDependencyData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){!function(t){var n=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(e,n){var i=e.length,o=t.sanitizeKey(e);if(o.length!==i){for(var a=0,r=o;n[r]!==undefined;)a++,r=o.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(a);o=r}return o},t.sanitizeKey=function(n){return n&&(n=e.Util.trim(n.toString())).length>t.MAX_NAME_LENGTH&&(n=n.substring(0,t.MAX_NAME_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.NameTooLong,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:n},!0)),n},t.sanitizeString=function(n,i){return void 0===i&&(i=t.MAX_STRING_LENGTH),n&&(i=i||t.MAX_STRING_LENGTH,(n=e.Util.trim(n)).toString().length>i&&(n=n.toString().substring(0,i),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.StringValueTooLong,"string value is too long. It has been truncated to "+i+" characters.",{value:n},!0))),n},t.sanitizeUrl=function(n){return t.sanitizeInput(n,t.MAX_URL_LENGTH,e._InternalMessageId.UrlTooLong)},t.sanitizeMessage=function(n){return n&&n.length>t.MAX_MESSAGE_LENGTH&&(n=n.substring(0,t.MAX_MESSAGE_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.MessageTruncated,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:n},!0)),n},t.sanitizeException=function(n){return n&&n.length>t.MAX_EXCEPTION_LENGTH&&(n=n.substring(0,t.MAX_EXCEPTION_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.ExceptionTruncated,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:n},!0)),n},t.sanitizeProperties=function(e){if(e){var n={};for(var i in e){var o=t.sanitizeString(e[i],t.MAX_PROPERTY_LENGTH);n[i=t.sanitizeKeyAndAddUniqueness(i,n)]=o}e=n}return e},t.sanitizeMeasurements=function(e){if(e){var n={};for(var i in e){var o=e[i];n[i=t.sanitizeKeyAndAddUniqueness(i,n)]=o}e=n}return e},t.sanitizeId=function(n){return n?t.sanitizeInput(n,t.MAX_ID_LENGTH,e._InternalMessageId.IdTooLong).toString():n},t.sanitizeInput=function(t,n,i){return t&&(t=e.Util.trim(t)).length>n&&(t=t.substring(0,n),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},t.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},t.MAX_NAME_LENGTH=150,t.MAX_ID_LENGTH=128,t.MAX_PROPERTY_LENGTH=8192,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}();t.DataSanitizer=n}(t.Common||(t.Common={}))}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a,r,s,l,c,u,g){var p=n.call(this)||this;p.aiDataContract={id:e.FieldType.Required,ver:e.FieldType.Required,name:e.FieldType.Default,resultCode:e.FieldType.Default,duration:e.FieldType.Default,success:e.FieldType.Default,data:e.FieldType.Default,target:e.FieldType.Default,type:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default,kind:e.FieldType.Default,value:e.FieldType.Default,count:e.FieldType.Default,min:e.FieldType.Default,max:e.FieldType.Default,stdDev:e.FieldType.Default,dependencyKind:e.FieldType.Default,dependencySource:e.FieldType.Default,commandName:e.FieldType.Default,dependencyTypeName:e.FieldType.Default},p.id=i,p.duration=e.Util.msToTimeSpan(r),p.success=s,p.resultCode=l+"",p.type="Ajax",p.data=t.Common.DataSanitizer.sanitizeUrl(a);var d=e.AjaxHelper.ParseDependencyPath(o,c,a);return p.target=d.target,p.name=d.name,p.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(u),p.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(g),p}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",i.dataType="RemoteDependencyData",i}(AI.RemoteDependencyData);t.RemoteDependencyData=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){this.currentWindowHost=window.location.host&&window.location.host.toLowerCase(),this.appInsights=e,this.initialized=!1,this.Init()}return n.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},n.prototype.isMonitoredInstance=function(e,i){return this.initialized&&(!0===i||!t.extensions.IsNullOrUndefined(e.ajaxData))&&!0!==e[n.DisabledPropertyName]},n.prototype.supportsMonitoring=function(){var e=!0;(t.extensions.IsNullOrUndefined(XMLHttpRequest)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1);try{" a ".trim()}catch(n){e=!1}return e},n.prototype.instrumentOpen=function(){var i=XMLHttpRequest.prototype.open,o=this;XMLHttpRequest.prototype.open=function(a,r,s){try{!o.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||o.openHandler(this,a,r,s)}catch(l){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(l)})}return i.apply(this,arguments)}},n.prototype.openHandler=function(e,n,i,o){var a="|"+this.appInsights.context.operation.id+"."+t.Util.newId(),r=new t.ajaxRecord(a);r.method=n,r.requestUrl=i,r.xhrMonitoringState.openDone=!0,e.ajaxData=r,this.attachToOnReadyStateChange(e)},n.getFailedAjaxDiagnosticsMessage=function(e){var n="";try{t.extensions.IsNullOrUndefined(e)||t.extensions.IsNullOrUndefined(e.ajaxData)||t.extensions.IsNullOrUndefined(e.ajaxData.requestUrl)||(n+="(url: '"+e.ajaxData.requestUrl+"')")}catch(i){}return n},n.prototype.instrumentSend=function(){var i=XMLHttpRequest.prototype.send,o=this;XMLHttpRequest.prototype.send=function(a){try{o.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&o.sendHandler(this,a)}catch(r){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(r)})}return i.apply(this,arguments)}},n.prototype.sendHandler=function(e,n){if(e.ajaxData.requestSentTime=t.dateTime.Now(),t.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config,e.ajaxData.getAbsoluteUrl(),this.currentWindowHost)&&(e.setRequestHeader(t.RequestHeaders.requestIdHeader,e.ajaxData.id),this.appInsights.context)){var i=this.appInsights.context.appId();i&&e.setRequestHeader(t.RequestHeaders.requestContextHeader,t.RequestHeaders.requestContextAppIdFormat+i)}e.ajaxData.xhrMonitoringState.sendDone=!0},n.prototype.instrumentAbort=function(){var i=XMLHttpRequest.prototype.abort,o=this;XMLHttpRequest.prototype.abort=function(){try{o.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(a){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(a)})}return i.apply(this,arguments)}},n.prototype.attachToOnReadyStateChange=function(i){var o=this;i.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=t.EventHelper.AttachEvent(i,"readystatechange",function(){try{o.isMonitoredInstance(i)&&4===i.readyState&&o.onAjaxComplete(i)}catch(r){var a=e.ApplicationInsights.Util.dump(r);a&&-1!=a.toLowerCase().indexOf("c00c023f")||t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(r)})}})},n.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=t.dateTime.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(e),requestSentTime:e.ajaxData.requestSentTime,responseFinishedTime:e.ajaxData.responseFinishedTime});else{var i=new t.Telemetry.RemoteDependencyData(e.ajaxData.id,e.ajaxData.getAbsoluteUrl(),e.ajaxData.getPathName(),e.ajaxData.ajaxTotalDuration,+e.ajaxData.status>=200&&+e.ajaxData.status<400,+e.ajaxData.status,e.ajaxData.method),o=this.getCorrelationContext(e);o&&(i.target=i.target+" | "+o),this.appInsights.trackDependencyData(i),e.ajaxData=null}},n.prototype.getCorrelationContext=function(i){try{var o=i.getAllResponseHeaders();if(null!==o&&-1!==o.toLowerCase().indexOf(t.RequestHeaders.requestContextHeaderLowerCase)){var a=i.getResponseHeader(t.RequestHeaders.requestContextHeader);return t.CorrelationIdHelper.getCorrelationContext(a)}}catch(r){t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(r)})}},n.instrumentedByAppInsightsName="InstrumentedByAppInsights",n.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",n}();t.AjaxMonitor=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}();e.ArraySendBuffer=t;var n=function(){function t(e){this._bufferFullMessageSent=!1,this._config=e;var n=this.getBuffer(t.BUFFER_KEY),i=this.getBuffer(t.SENT_BUFFER_KEY);this._buffer=n.concat(i),this._buffer.length>t.MAX_BUFFER_SIZE&&(this._buffer.length=t.MAX_BUFFER_SIZE),this.setBuffer(t.SENT_BUFFER_KEY,[]),this.setBuffer(t.BUFFER_KEY,this._buffer)}return t.prototype.enqueue=function(n){this._buffer.length>=t.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(n),this.setBuffer(t.BUFFER_KEY,this._buffer))},t.prototype.count=function(){return this._buffer.length},t.prototype.clear=function(){this._buffer.length=0,this.setBuffer(t.BUFFER_KEY,[]),this.setBuffer(t.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},t.prototype.getItems=function(){return this._buffer.slice(0)},t.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},t.prototype.markAsSent=function(n){this._buffer=this.removePayloadsFromBuffer(n,this._buffer),this.setBuffer(t.BUFFER_KEY,this._buffer);var i=this.getBuffer(t.SENT_BUFFER_KEY);i instanceof Array&&n instanceof Array&&((i=i.concat(n)).length>t.MAX_BUFFER_SIZE&&(e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+i.length,!0),i.length=t.MAX_BUFFER_SIZE),this.setBuffer(t.SENT_BUFFER_KEY,i))},t.prototype.clearSent=function(e){var n=this.getBuffer(t.SENT_BUFFER_KEY);n=this.removePayloadsFromBuffer(e,n),this.setBuffer(t.SENT_BUFFER_KEY,n)},t.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var o=!1;for(var a in e)if(e[a]===t[i]){o=!0;break}o||n.push(t[i])}return n},t.prototype.getBuffer=function(t){try{var n=e.Util.getSessionStorage(t);if(n){var i=JSON.parse(n);if(i)return i}}catch(o){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.FailedToRestoreStorageBuffer," storage key: "+t+", "+e.Util.getExceptionName(o),{exception:e.Util.dump(o)})}return[]},t.prototype.setBuffer=function(t,n){try{var i=JSON.stringify(n);e.Util.setSessionStorage(t,i)}catch(o){e.Util.setSessionStorage(t,JSON.stringify([])),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.FailedToSetStorageBuffer," storage key: "+t+", "+e.Util.getExceptionName(o)+". Buffer cleared",{exception:e.Util.dump(o)})}},t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}();e.SessionStorageSendBuffer=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function t(t){this._XMLHttpRequestSupported=!1,this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._config=t,this._sender=null,this._buffer=e.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new e.SessionStorageSendBuffer(t):new e.ArraySendBuffer(t),!this._config.isBeaconApiDisabled()&&e.Util.IsBeaconApiSupported()?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))}return t.prototype.send=function(t){try{if(this._config.disableTelemetry())return;if(!t)return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(!this._sender)return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.SenderNotInitialized,"Sender was not initialized");var n=e.Serializer.serialize(t),i=this._buffer.getItems(),o=this._buffer.batchPayloads(i);o&&o.length+n.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(n),this._setupTimer()}catch(a){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+e.Util.getExceptionName(a),{exception:e.Util.dump(a)})}},t.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},t.prototype._getSizeInBytes=function(e){var t=0;if(e&&e.length)for(var n=0;n0){var n=this._buffer.getItems();this._sender(n,t)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(i){(!e.Util.getIEVersion()||e.Util.getIEVersion()>9)&&e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+e.Util.getExceptionName(i),{exception:e.Util.dump(i)})}},t.prototype._setRetryTime=function(){var e;if(this._consecutiveErrors<=1)e=10;else{var t=(Math.pow(2,this._consecutiveErrors)-1)/2,n=Math.floor(Math.random()*t*10)+1;e=Math.max(Math.min(n,3600),10)}var i=Date.now()+1e3*e;this._retryAt=i},t.prototype._parseResponse=function(t){try{if(t&&""!==t){var n=JSON.parse(t);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted==n.errors.length)return n}}catch(i){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.InvalidBackendResponse,"Cannot parse the response. "+e.Util.getExceptionName(i),{response:t})}return null},t.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},t.prototype._resendPayload=function(e){if(e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var t=0,n=e;t=300)&&0!==t.status?!this._config.isRetryDisabled()&&this._isRetriable(t.status)?(this._resendPayload(n),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.TransmissionFailed,". Response code "+t.status+". Will retry to send "+n.length+" items.")):this._onError(n,this._formatErrorMessageXhr(t)):206===t.status?(o||(o=this._parseResponse(t.responseText||t.response)),o&&!this._config.isRetryDisabled()?this._onPartialSuccess(n,o):this._onError(n,this._formatErrorMessageXhr(t))):(this._consecutiveErrors=0,this._onSuccess(n,i))}},t.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},t.prototype._onPartialSuccess=function(t,n){for(var i=[],o=[],a=0,r=n.errors.reverse();a0&&this._onSuccess(t,n.itemsAccepted),i.length>0&&this._onError(i,this._formatErrorMessageXhr(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),o.length>0&&(this._resendPayload(o),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.TransmissionFailed,"Partial success. Delivered: "+t.length+", Failed: "+i.length+". Will retry to send "+o.length+" our of "+n.itemsReceived+" items"))},t.prototype._onError=function(t,n,i){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.OnError,"Failed to send telemetry.",{message:n}),this._buffer.clearSent(t)},t.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},t.MaxBeaconPayloadSize=65536,t}();e.Sender=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.MessageData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a){var r=n.call(this)||this;return r.aiDataContract={ver:e.FieldType.Required,message:e.FieldType.Required,severityLevel:e.FieldType.Default,properties:e.FieldType.Default},i=i||e.Util.NotSpecified,r.message=t.Common.DataSanitizer.sanitizeMessage(i),r.properties=t.Common.DataSanitizer.sanitizeProperties(o),a&&(r.severityLevel=a),r}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.Message",i.dataType="MessageData",i}(AI.MessageData);t.Trace=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(t){function n(n,i,o){var a=t.call(this)||this;return a.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Required,properties:e.FieldType.Default,measurements:e.FieldType.Default},a.name=e.Telemetry.Common.DataSanitizer.sanitizeString(n)||e.Util.NotSpecified,a.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(i),a.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o),a}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Event",n.dataType="EventData",n}(AI.EventData);t.Event=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(){return function(){this.hasFullStack=!0,this.parsedStack=[]}}();e.ExceptionDetails=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.ExceptionData=t}(AI||(AI={}));var AI;!function(e){var t=function(){return function(){}}();e.StackFrame=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(t){function n(n,o,a,r){var s=t.call(this)||this;return s.aiDataContract={ver:e.FieldType.Required,exceptions:e.FieldType.Required,severityLevel:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default},s.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(o),s.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(a),s.exceptions=[new i(n)],r&&(s.severityLevel=r),s}return __extends(n,t),n.CreateSimpleException=function(e,t,n,i,o,a){return{exceptions:[{hasFullStack:!0,message:e,stack:o,typeName:t}]}},n.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",n.dataType="ExceptionData",n}(AI.ExceptionData);t.Exception=n;var i=function(n){function i(i){var o=n.call(this)||this;o.aiDataContract={id:e.FieldType.Default,outerId:e.FieldType.Default,typeName:e.FieldType.Required,message:e.FieldType.Required,hasFullStack:e.FieldType.Default,stack:e.FieldType.Default,parsedStack:e.FieldType.Array},o.typeName=t.Common.DataSanitizer.sanitizeString(i.name)||e.Util.NotSpecified,o.message=t.Common.DataSanitizer.sanitizeMessage(i.message)||e.Util.NotSpecified;var a=i.stack;return o.parsedStack=o.parseStack(a),o.stack=t.Common.DataSanitizer.sanitizeException(a),o.hasFullStack=e.Util.isArray(o.parsedStack)&&o.parsedStack.length>0,o}return __extends(i,n),i.prototype.parseStack=function(e){var t=undefined;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,a=0,r=0;r<=n.length;r++){var s=n[r];if(o.regex.test(s)){var l=new o(n[r],i++);a+=l.sizeInBytes,t.push(l)}}if(a>32768)for(var c=0,u=t.length-1,g=0,p=c,d=u;c32768){var f=d-p+1;t.splice(p,f);break}p=c,d=u,c++,u--}}return t},i}(AI.ExceptionDetails),o=function(t){function n(i,o){var a=t.call(this)||this;a.sizeInBytes=0,a.aiDataContract={level:e.FieldType.Required,method:e.FieldType.Required,assembly:e.FieldType.Default,fileName:e.FieldType.Default,line:e.FieldType.Default},a.level=o,a.method="",a.assembly=e.Util.trim(i);var r=i.match(n.regex);return r&&r.length>=5&&(a.method=e.Util.trim(r[2])||a.method,a.fileName=e.Util.trim(r[4]),a.line=parseInt(r[5])||0),a.sizeInBytes+=a.method.length,a.sizeInBytes+=a.fileName.length,a.sizeInBytes+=a.assembly.length,a.sizeInBytes+=n.baseSize,a.sizeInBytes+=a.level.toString().length,a.sizeInBytes+=a.line.toString().length,a}return __extends(n,t),n.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,n.baseSize=58,n}(AI.StackFrame);t._StackFrame=o}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(e.DataPointType||(e.DataPointType={}))}(AI||(AI={}));var AI;!function(e){var t=function(){return function(){this.kind=e.DataPointType.Measurement}}();e.DataPoint=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.MetricData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.aiDataContract={name:e.FieldType.Required,kind:e.FieldType.Default,value:e.FieldType.Required,count:e.FieldType.Default,min:e.FieldType.Default,max:e.FieldType.Default,stdDev:e.FieldType.Default},n}return __extends(n,t),n}(AI.DataPoint);t.DataPoint=n}(t.Common||(t.Common={}))}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){!function(n){var i=function(i){function o(o,a,r,s,l,c){var u=i.call(this)||this;u.aiDataContract={ver:t.FieldType.Required,metrics:t.FieldType.Required,properties:t.FieldType.Default};var g=new e.ApplicationInsights.Telemetry.Common.DataPoint;return g.count=r>0?r:undefined,g.max=isNaN(l)||null===l?undefined:l,g.min=isNaN(s)||null===s?undefined:s,g.name=n.Common.DataSanitizer.sanitizeString(o)||t.Util.NotSpecified,g.value=a,u.metrics=[g],u.properties=t.Telemetry.Common.DataSanitizer.sanitizeProperties(c),u}return __extends(o,i),o.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",o.dataType="MetricData",o}(AI.MetricData);n.Metric=i}(t.Telemetry||(t.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a,r,s,l){var c=n.call(this)||this;return c.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Default,url:e.FieldType.Default,duration:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default,id:e.FieldType.Default},c.id=t.Common.DataSanitizer.sanitizeId(l),c.url=t.Common.DataSanitizer.sanitizeUrl(o),c.name=t.Common.DataSanitizer.sanitizeString(i)||e.Util.NotSpecified,isNaN(a)||(c.duration=e.Util.msToTimeSpan(a)),c.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(r),c.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(s),c}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",i.dataType="PageviewData",i}(AI.PageViewData);t.PageView=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(e.PageViewData);e.PageViewPerfData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(o,a,r,s,l){var c=n.call(this)||this;c.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Default,url:e.FieldType.Default,duration:e.FieldType.Default,perfTotal:e.FieldType.Default,networkConnect:e.FieldType.Default,sentRequest:e.FieldType.Default,receivedResponse:e.FieldType.Default,domProcessing:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default},c.isValid=!1;var u=i.getPerformanceTiming();if(u){var g=i.getDuration(u.navigationStart,u.loadEventEnd),p=i.getDuration(u.navigationStart,u.connectEnd),d=i.getDuration(u.requestStart,u.responseStart),f=i.getDuration(u.responseStart,u.responseEnd),h=i.getDuration(u.responseEnd,u.loadEventEnd);0==g?e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.ErrorPVCalc,"error calculating page view performance.",{total:g,network:p,request:d,response:f,dom:h}):i.shouldCollectDuration(g,p,d,f,h)?g0&&e.navigationStart>0&&e.responseStart>0&&e.requestStart>0&&e.loadEventEnd>0&&e.responseEnd>0&&e.connectEnd>0&&e.domLoading>0},i.getDuration=function(e,t){var n=undefined;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},i.shouldCollectDuration=function(){for(var e=[],t=0;t=i.MAX_DURATION_ALLOWED)return!1;return!0},i.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",i.dataType="PageviewPerformanceData",i.MAX_DURATION_ALLOWED=36e5,i}(AI.PageViewPerfData);t.PageViewPerformance=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){var n=this;this._config=e,this._sender=new t.Sender(e),this.appId=function(){return n._sender._appId},e.appId()&&(this._sender._appId=e.appId()),this.telemetryInitializers=[],"undefined"!=typeof window&&(this._sessionManager=new t.Context._SessionManager(e),this.application=new t.Context.Application,this.device=new t.Context.Device,this.internal=new t.Context.Internal(e),this.location=new t.Context.Location,this.user=new t.Context.User(e),this.operation=new t.Context.Operation,this.session=new t.Context.Session,this.sample=new t.Context.Sample(e.sampleRate())),this._addDefaultTelemetryInitializers()}return n.prototype.addTelemetryInitializer=function(e){this.telemetryInitializers.push(e)},n.prototype.track=function(e){return e?(e.name===t.Telemetry.PageView.envelopeType&&t._InternalLogging.resetInternalMessageCount(),this.session&&"string"!=typeof this.session.id&&this._sessionManager.update(),this._track(e)):t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument",null,!0),e},n.prototype._addDefaultTelemetryInitializers=function(){if(!this._config.isBrowserLinkTrackingEnabled()){var t=["/browserLinkSignalR/","/__browserLink/"];this.addTelemetryInitializer(function(n){if(n.name===e.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType){var i=n.data;if(i&&i.baseData)for(var o=0;o=0)return!1}return!0})}},n.prototype._track=function(e){this.session&&("string"==typeof this.session.id?this._applySessionContext(e,this.session):this._applySessionContext(e,this._sessionManager.automaticSession)),this._applyApplicationContext(e,this.application),this._applyDeviceContext(e,this.device),this._applyInternalContext(e,this.internal),this._applyLocationContext(e,this.location),this._applySampleContext(e,this.sample),this._applyUserContext(e,this.user),this._applyOperationContext(e,this.operation),e.iKey=this._config.instrumentationKey();var n=!1;try{for(var i=this.telemetryInitializers.length,o=0;o6e4&&(clearInterval(g),l||(s.appInsights.sendPageViewInternal(n,i,6e4,o,a),s.appInsights.flush()))}catch(p){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+e.Util.getExceptionName(p),{exception:e.Util.dump(p)})}},100);else e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.")},n}();t.PageViewManager=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(){function t(e){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=e}return t.prototype.trackPreviousPageVisit=function(t,n){try{var i=this.restartPageVisitTimer(t,n);i&&this.pageVisitTimeTrackingHandler(i.pageName,i.pageUrl,i.pageVisitTime)}catch(o){e._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+e.Util.dump(o))}},t.prototype.restartPageVisitTimer=function(t,n){try{var i=this.stopPageVisitTimer();return this.startPageVisitTimer(t,n),i}catch(o){return e._InternalLogging.warnToConsole("Call to restart failed: "+e.Util.dump(o)),null}},t.prototype.startPageVisitTimer=function(t,n){try{if(e.Util.canUseSessionStorage()){if(null!=e.Util.getSessionStorage(this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var o=new i(t,n),a=JSON.stringify(o);e.Util.setSessionStorage(this.prevPageVisitDataKeyName,a)}}catch(r){e._InternalLogging.warnToConsole("Call to start failed: "+e.Util.dump(r))}},t.prototype.stopPageVisitTimer=function(){try{if(e.Util.canUseSessionStorage()){var t=Date.now(),n=e.Util.getSessionStorage(this.prevPageVisitDataKeyName);if(n){var i=JSON.parse(n);return i.pageVisitTime=t-i.pageVisitStartTime,e.Util.removeSessionStorage(this.prevPageVisitDataKeyName),i}return null}return null}catch(o){return e._InternalLogging.warnToConsole("Stop page visit timer failed: "+e.Util.dump(o)),null}},t}();t.PageVisitTimeManager=n;var i=function(){return function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t}}();t.PageVisitData=i}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){this.currentWindowHost=window.location.host&&window.location.host.toLowerCase(),this.appInsights=e,this.initialized=!1,this.Init()}return n.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentFetch(),this.initialized=!0)},n.prototype.isMonitoredInstance=function(e){return this.initialized&&!0!==e[n.DisabledPropertyName]},n.prototype.supportsMonitoring=function(){var e=!0;return(t.extensions.IsNullOrUndefined(window.Request)||t.extensions.IsNullOrUndefined(window.Request.prototype)||t.extensions.IsNullOrUndefined(window.fetch)||-1!==window.fetch.toString().indexOf("new XMLHttpRequest"))&&(e=!1),e},n.prototype.instrumentFetch=function(){var i=window.fetch,o=this;window.fetch=function(a,r){var s;if(o.isMonitoredInstance(a))try{s=o.createAjaxRecord(a,r),r=o.includeCorrelationHeaders(s,a,r)}catch(l){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedFetchDiagnosticsMessage(a),exception:e.ApplicationInsights.Util.dump(l)})}return i(a,r).then(function(e){return o.onFetchComplete(e,s),e}).catch(function(e){throw o.onFetchFailed(a,s,e),e})},window.fetch[n.instrumentedByAppInsightsName]=!0},n.prototype.createAjaxRecord=function(e,n){var i="|"+this.appInsights.context.operation.id+"."+t.Util.newId(),o=new t.ajaxRecord(i);return o.requestSentTime=t.dateTime.Now(),e instanceof Request?(e.ajaxData=o,o.requestUrl=e?e.url:""):o.requestUrl=e,n&&n.method?o.method=n.method:e&&e instanceof Request?o.method=e.method:o.method="GET",o},n.prototype.includeCorrelationHeaders=function(e,n,i){if(t.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config,e.getAbsoluteUrl(),this.currentWindowHost)){i||(i={}),i.headers=new Headers(i.headers||(n instanceof Request?n.headers||{}:{})),i.headers.set(t.RequestHeaders.requestIdHeader,e.id);var o=this.appInsights.context?this.appInsights.context.appId():null;o&&i.headers.set(t.RequestHeaders.requestContextHeader,t.RequestHeaders.requestContextAppIdFormat+o)}return i},n.getFailedFetchDiagnosticsMessage=function(e){var n="";try{t.extensions.IsNullOrUndefined(e)||(n+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(i){}return n},n.prototype.onFetchComplete=function(i,o){if(o)try{if(o.responseFinishedTime=t.dateTime.Now(),o.CalculateMetrics(),o.ajaxTotalDuration<0)t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxDur,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:n.getFailedFetchDiagnosticsMessage(i),requestSentTime:o.requestSentTime,responseFinishedTime:o.responseFinishedTime});else{var a=new t.Telemetry.RemoteDependencyData(o.id,o.getAbsoluteUrl(),o.getPathName(),o.ajaxTotalDuration,i.status>=200&&i.status<400,i.status,o.method),r=this.getCorrelationContext(i);r&&(a.target=a.target+" | "+r),this.appInsights.trackDependencyData(a)}}catch(s){t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:n.getFailedFetchDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(s)})}},n.prototype.onFetchFailed=function(i,o,a){if(o)try{if(o.responseFinishedTime=t.dateTime.Now(),o.CalculateMetrics(),o.ajaxTotalDuration<0)t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxDur,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:n.getFailedFetchDiagnosticsMessage(i),requestSentTime:o.requestSentTime,responseFinishedTime:o.responseFinishedTime});else{var r=new t.Telemetry.RemoteDependencyData(o.id,o.getAbsoluteUrl(),o.getPathName(),o.ajaxTotalDuration,!1,0,o.method);r.properties={error:a.message},this.appInsights.trackDependencyData(r)}}catch(s){t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:n.getFailedFetchDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(s)})}},n.prototype.getCorrelationContext=function(i){try{var o=i.headers.get(t.RequestHeaders.requestContextHeader);return t.CorrelationIdHelper.getCorrelationContext(o)}catch(a){t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:n.getFailedFetchDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(a)})}},n.instrumentedByAppInsightsName="InstrumentedByAppInsights",n.DisabledPropertyName="Microsoft_ApplicationInsights_BypassFetchInstrumentation",n}();t.FetchMonitor=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function t(){this.hashCodeGeneragor=new e.HashCodeScoreGenerator}return t.prototype.isEnabled=function(e,t){return this.hashCodeGeneragor.getHashCodeScore(e)0){var n=t.getNumberOfLostItems()-t.itemsRestoredFromSessionBuffer;t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+n+'"',null),t.appInsights.flush();var i=t.getIssuesReported();++i,e.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,i.toString())}}catch(o){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.FailedToReportDataLoss,"Failed to report data loss: "+e.Util.getExceptionName(o),{exception:e.Util.dump(o)})}finally{try{t.reset()}catch(o){}}},t.enabled=!1,t.itemsRestoredFromSessionBuffer=0,t.LIMIT_PER_SESSION=10,t.ITEMS_QUEUED_KEY="AI_itemsQueued",t.ISSUES_REPORTED_KEY="AI_lossIssuesReported",t}();e.DataLossAnalyzer=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(t){t.queue=t.queue||[];var i=t.config||{};if(i&&!i.instrumentationKey)if((i=t).iKey)e.ApplicationInsights.Version="0.10.0.0",i.instrumentationKey=i.iKey;else{if(!i.applicationInsightsId)throw new Error("Cannot load Application Insights SDK, no instrumentationKey was provided.");e.ApplicationInsights.Version="0.7.2.0",i.instrumentationKey=i.applicationInsightsId}i=n.getDefaultConfig(i),this.snippet=t,this.config=i}return n.prototype.loadAppInsights=function(){var t=new e.ApplicationInsights.AppInsights(this.config);if(this.config.iKey){var n=t.trackPageView;t.trackPageView=function(e,i,o){n.apply(t,[null,e,i,o])}}"function"==typeof this.snippet.logPageView&&(t.logPageView=function(e,n,i){t.trackPageView(null,e,n,i)});return"function"==typeof this.snippet.logEvent&&(t.logEvent=function(e,n,i){t.trackEvent(e,n,i)}),t},n.prototype.emptyQueue=function(){try{if(e.ApplicationInsights.Util.isArray(this.snippet.queue)){for(var n=this.snippet.queue.length,i=0;i0?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=t.Util.stringToBoolOrDefault(e.enableDebug),e.disableExceptionTracking=t.Util.stringToBoolOrDefault(e.disableExceptionTracking),e.disableTelemetry=t.Util.stringToBoolOrDefault(e.disableTelemetry),e.verboseLogging=t.Util.stringToBoolOrDefault(e.verboseLogging),e.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.disableAjaxTracking=t.Util.stringToBoolOrDefault(e.disableAjaxTracking),e.disableFetchTracking=t.Util.stringToBoolOrDefault(e.disableFetchTracking,!0),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=t.Util.stringToBoolOrDefault(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=t.Util.stringToBoolOrDefault(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=t.Util.stringToBoolOrDefault(e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=t.Util.stringToBoolOrDefault(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=t.Util.stringToBoolOrDefault(e.isRetryDisabled),e.isCookieUseDisabled=t.Util.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=t.Util.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=t.Util.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=t.Util.stringToBoolOrDefault(e.enableCorsCorrelation),e},n}();t.Initialization=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){try{if("undefined"!=typeof window&&"undefined"!=typeof JSON){if(window.appInsights===undefined)e.ApplicationInsights.AppInsights.defaultConfig=e.ApplicationInsights.Initialization.getDefaultConfig();else{var n=window.appInsights||{},i=new e.ApplicationInsights.Initialization(n),o=i.loadAppInsights();for(var a in o)n[a]=o[a];i.emptyQueue(),i.pollInteralLogs(o),i.addHousekeepingBeforeUnload(o)}}}catch(r){e.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+r.message)}}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})); +"use strict";var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){}}();e.Base=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){this.ver=1,this.sampleRate=100,this.tags={}}}();e.Envelope=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var AI;!function(e){!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(e.SeverityLevel||(e.SeverityLevel={}))}(AI||(AI={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t;!function(e){e[e.CRITICAL=0]="CRITICAL",e[e.WARNING=1]="WARNING"}(t=e.LoggingSeverity||(e.LoggingSeverity={}));var n;!function(e){e[e.BrowserDoesNotSupportLocalStorage=0]="BrowserDoesNotSupportLocalStorage",e[e.BrowserCannotReadLocalStorage=1]="BrowserCannotReadLocalStorage",e[e.BrowserCannotReadSessionStorage=2]="BrowserCannotReadSessionStorage",e[e.BrowserCannotWriteLocalStorage=3]="BrowserCannotWriteLocalStorage",e[e.BrowserCannotWriteSessionStorage=4]="BrowserCannotWriteSessionStorage",e[e.BrowserFailedRemovalFromLocalStorage=5]="BrowserFailedRemovalFromLocalStorage",e[e.BrowserFailedRemovalFromSessionStorage=6]="BrowserFailedRemovalFromSessionStorage",e[e.CannotSendEmptyTelemetry=7]="CannotSendEmptyTelemetry",e[e.ClientPerformanceMathError=8]="ClientPerformanceMathError",e[e.ErrorParsingAISessionCookie=9]="ErrorParsingAISessionCookie",e[e.ErrorPVCalc=10]="ErrorPVCalc",e[e.ExceptionWhileLoggingError=11]="ExceptionWhileLoggingError",e[e.FailedAddingTelemetryToBuffer=12]="FailedAddingTelemetryToBuffer",e[e.FailedMonitorAjaxAbort=13]="FailedMonitorAjaxAbort",e[e.FailedMonitorAjaxDur=14]="FailedMonitorAjaxDur",e[e.FailedMonitorAjaxOpen=15]="FailedMonitorAjaxOpen",e[e.FailedMonitorAjaxRSC=16]="FailedMonitorAjaxRSC",e[e.FailedMonitorAjaxSend=17]="FailedMonitorAjaxSend",e[e.FailedMonitorAjaxGetCorrelationHeader=18]="FailedMonitorAjaxGetCorrelationHeader",e[e.FailedToAddHandlerForOnBeforeUnload=19]="FailedToAddHandlerForOnBeforeUnload",e[e.FailedToSendQueuedTelemetry=20]="FailedToSendQueuedTelemetry",e[e.FailedToReportDataLoss=21]="FailedToReportDataLoss",e[e.FlushFailed=22]="FlushFailed",e[e.MessageLimitPerPVExceeded=23]="MessageLimitPerPVExceeded",e[e.MissingRequiredFieldSpecification=24]="MissingRequiredFieldSpecification",e[e.NavigationTimingNotSupported=25]="NavigationTimingNotSupported",e[e.OnError=26]="OnError",e[e.SessionRenewalDateIsZero=27]="SessionRenewalDateIsZero",e[e.SenderNotInitialized=28]="SenderNotInitialized",e[e.StartTrackEventFailed=29]="StartTrackEventFailed",e[e.StopTrackEventFailed=30]="StopTrackEventFailed",e[e.StartTrackFailed=31]="StartTrackFailed",e[e.StopTrackFailed=32]="StopTrackFailed",e[e.TelemetrySampledAndNotSent=33]="TelemetrySampledAndNotSent",e[e.TrackEventFailed=34]="TrackEventFailed",e[e.TrackExceptionFailed=35]="TrackExceptionFailed",e[e.TrackMetricFailed=36]="TrackMetricFailed",e[e.TrackPVFailed=37]="TrackPVFailed",e[e.TrackPVFailedCalc=38]="TrackPVFailedCalc",e[e.TrackTraceFailed=39]="TrackTraceFailed",e[e.TransmissionFailed=40]="TransmissionFailed",e[e.FailedToSetStorageBuffer=41]="FailedToSetStorageBuffer",e[e.FailedToRestoreStorageBuffer=42]="FailedToRestoreStorageBuffer",e[e.InvalidBackendResponse=43]="InvalidBackendResponse",e[e.FailedToFixDepricatedValues=44]="FailedToFixDepricatedValues",e[e.InvalidDurationValue=45]="InvalidDurationValue",e[e.CannotSerializeObject=46]="CannotSerializeObject",e[e.CannotSerializeObjectNonSerializable=47]="CannotSerializeObjectNonSerializable",e[e.CircularReferenceDetected=48]="CircularReferenceDetected",e[e.ClearAuthContextFailed=49]="ClearAuthContextFailed",e[e.ExceptionTruncated=50]="ExceptionTruncated",e[e.IllegalCharsInName=51]="IllegalCharsInName",e[e.ItemNotInArray=52]="ItemNotInArray",e[e.MaxAjaxPerPVExceeded=53]="MaxAjaxPerPVExceeded",e[e.MessageTruncated=54]="MessageTruncated",e[e.NameTooLong=55]="NameTooLong",e[e.SampleRateOutOfRange=56]="SampleRateOutOfRange",e[e.SetAuthContextFailed=57]="SetAuthContextFailed",e[e.SetAuthContextFailedAccountName=58]="SetAuthContextFailedAccountName",e[e.StringValueTooLong=59]="StringValueTooLong",e[e.StartCalledMoreThanOnce=60]="StartCalledMoreThanOnce",e[e.StopCalledWithoutStart=61]="StopCalledWithoutStart",e[e.TelemetryInitializerFailed=62]="TelemetryInitializerFailed",e[e.TrackArgumentsNotSpecified=63]="TrackArgumentsNotSpecified",e[e.UrlTooLong=64]="UrlTooLong",e[e.SessionStorageBufferFull=65]="SessionStorageBufferFull",e[e.CannotAccessCookie=66]="CannotAccessCookie",e[e.IdTooLong=67]="IdTooLong"}(n=e._InternalMessageId||(e._InternalMessageId={}));var i=function(){function e(t,i,o,a){void 0===o&&(o=!1),this.messageId=t,this.message=(o?e.AiUserActionablePrefix:e.AiNonUserActionablePrefix)+n[t].toString();var r=(i?" message:"+e.sanitizeDiagnosticText(i):"")+(a?" props:"+e.sanitizeDiagnosticText(JSON.stringify(a)):"");this.message+=r}return e.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},e.AiNonUserActionablePrefix="AI (Internal): ",e.AiUserActionablePrefix="AI: ",e}();e._InternalLogMessage=i;var o=function(){function o(){}return o.throwInternal=function(e,t,o,a,r){void 0===r&&(r=!1);var s=new i(t,o,r,a);if(this.enableDebugExceptions())throw s;if(void 0!==s&&s&&"undefined"!=typeof s.message){if(r){var l=n[s.messageId];this._messageLogged[l]&&!this.verboseLogging()||(this.warnToConsole(s.message),this._messageLogged[l]=!0)}else this.verboseLogging()&&this.warnToConsole(s.message);this.logInternalMessage(e,s)}},o.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},o.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},o.clearInternalMessageLoggedTypes=function(){if(e.Util.canUseSessionStorage())for(var t=e.Util.getSessionStorageKeys(),n=0;n=this.MAX_INTERNAL_MESSAGE_LIMIT},o.AIInternalMessagePrefix="AITR_",o.enableDebugExceptions=function(){return!1},o.verboseLogging=function(){return!1},o.queue=[],o.MAX_INTERNAL_MESSAGE_LIMIT=25,o._messageCount=0,o._messageLogged={},o}();e._InternalLogging=o}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.newId=function(){for(var e="",t=1073741824*Math.random();t>0;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},e}();e.UtilHelpers=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t;!function(e){e[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage"}(t||(t={}));var n=function(){function n(){}return n.disableStorage=function(){n._canUseLocalStorage=!1,n._canUseSessionStorage=!1},n._getLocalStorageObject=function(){return n.canUseLocalStorage()?n._getVerifiedStorageObject(t.LocalStorage):null},n._getVerifiedStorageObject=function(e){var n,i,o=null;try{i=new Date,(o=e===t.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),n=o.getItem(i)!=i,o.removeItem(i),n&&(o=null)}catch(a){o=null}return o},n.isInternalApplicationInsightsEndpoint=function(e){return-1!==n._internalEndpoints.indexOf(e.toLowerCase())},n.canUseLocalStorage=function(){return n._canUseLocalStorage===undefined&&(n._canUseLocalStorage=!!n._getVerifiedStorageObject(t.LocalStorage)),n._canUseLocalStorage},n.getStorage=function(t){var i=n._getLocalStorageObject();if(null!==i)try{return i.getItem(t)}catch(o){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+n.getExceptionName(o),{exception:n.dump(o)})}return null},n.setStorage=function(t,i){var o=n._getLocalStorageObject();if(null!==o)try{return o.setItem(t,i),!0}catch(a){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+n.getExceptionName(a),{exception:n.dump(a)})}return!1},n.removeStorage=function(t){var i=n._getLocalStorageObject();if(null!==i)try{return i.removeItem(t),!0}catch(o){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+n.getExceptionName(o),{exception:n.dump(o)})}return!1},n._getSessionStorageObject=function(){return n.canUseSessionStorage()?n._getVerifiedStorageObject(t.SessionStorage):null},n.canUseSessionStorage=function(){return n._canUseSessionStorage===undefined&&(n._canUseSessionStorage=!!n._getVerifiedStorageObject(t.SessionStorage)),n._canUseSessionStorage},n.getSessionStorageKeys=function(){var e=[];if(n.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},n.getSessionStorage=function(t){var i=n._getSessionStorageObject();if(null!==i)try{return i.getItem(t)}catch(o){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+n.getExceptionName(o),{exception:n.dump(o)})}return null},n.setSessionStorage=function(t,i){var o=n._getSessionStorageObject();if(null!==o)try{return o.setItem(t,i),!0}catch(a){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+n.getExceptionName(a),{exception:n.dump(a)})}return!1},n.removeSessionStorage=function(t){var i=n._getSessionStorageObject();if(null!==i)try{return i.removeItem(t),!0}catch(o){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+n.getExceptionName(o),{exception:n.dump(o)})}return!1},n.disableCookies=function(){n._canUseCookies=!1},n.canUseCookies=function(){if(n._canUseCookies===undefined){n._canUseCookies=!1;try{n._canUseCookies=n.document.cookie!==undefined}catch(t){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.CannotAccessCookie,"Cannot access document.cookie - "+n.getExceptionName(t),{exception:n.dump(t)})}}return n._canUseCookies},n.setCookie=function(e,t,i){var o="",a="";i&&(o=";domain="+i),n.document.location&&"https:"===n.document.location.protocol&&(a=";secure"),n.canUseCookies()&&(n.document.cookie=e+"="+t+o+";path=/"+a)},n.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},n.getCookie=function(e){if(n.canUseCookies()){var t="";if(e&&e.length)for(var i=e+"=",o=n.document.cookie.split(";"),a=0;a0?a+".":"")+o+":"+i+":"+n+"."+t},n.isCrossOriginError=function(e,t,n,i,o){return("Script error."===e||"Script error"===e)&&!o},n.dump=function(e){var t=Object.prototype.toString.call(e),n=JSON.stringify(e);return"[object Error]"===t&&(n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+n},n.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},n.addEventHandler=function(e,t){if(!window||"string"!=typeof e||"function"!=typeof t)return!1;var n="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(n,t)}return!0},n.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},n.document="undefined"!=typeof document?document:{},n._canUseCookies=undefined,n._canUseLocalStorage=undefined,n._canUseSessionStorage=undefined,n._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],n.NotSpecified="not_specified",n}();e.Util=n;var i=function(){function e(){}return e.parseUrl=function(t){return e.htmlAnchorElement||(e.htmlAnchorElement=e.document.createElement?e.document.createElement("a"):{}),e.htmlAnchorElement.href=t,e.htmlAnchorElement},e.getAbsoluteUrl=function(t){var n,i=e.parseUrl(t);return i&&(n=i.href),n},e.getPathName=function(t){var n,i=e.parseUrl(t);return i&&(n=i.pathname),n},e.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},e.document="undefined"!=typeof document?document:{},e}();e.UrlHelper=i;var o=function(){function t(){}return t.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var o=i.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||o===n))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var r=0;r100||t<0)&&(e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new e.SamplingScoreGenerator}return t.prototype.isSampledIn=function(e){return 100==this.sampleRate||this.samplingScoreGenerator.getSamplingScore(e)this.config.sessionExpirationMs(),o=n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();i||o?(this.automaticSession.isFirst=undefined,this.renew()):(!this.cookieUpdatedTimestamp||n-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=n,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},t.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},t.prototype.initializeAutomaticSession=function(){var t=e.Util.getCookie("ai_session");if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var n=e.Util.getStorage("ai_session");n&&this.initializeAutomaticSessionWithData(n)}this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},t.prototype.initializeAutomaticSessionWithData=function(t){var n=t.split("|");n.length>0&&(this.automaticSession.id=n[0]);try{if(n.length>1){var i=+n[1];this.automaticSession.acquisitionDate=+new Date(i),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0}if(n.length>2){var o=+n[2];this.automaticSession.renewalDate=+new Date(o),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0}}catch(a){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+e.Util.getExceptionName(a),{exception:e.Util.dump(a)})}0==this.automaticSession.renewalDate&&e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=e.dateTime.Now();this.automaticSession.id=e.Util.newId(),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),e.Util.canUseLocalStorage()||e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,n,i){var o=n+this.config.sessionExpirationMs(),a=i+this.config.sessionRenewalMs(),r=new Date,s=[t,n,i];o0&&(this.id=o[0])}if(this.config=n,!this.id){this.id=e.Util.newId();var a=new Date,r=e.Util.toISOStringForIE8(a);this.accountAcquisitionDate=r,a.setTime(a.getTime()+31536e6);var s=[this.id,r],l=this.config.cookieDomain?this.config.cookieDomain():undefined;e.Util.setCookie(t.userCookieName,s.join(t.cookieSeparator)+";expires="+a.toUTCString(),l),e.Util.removeStorage("ai_session")}this.accountId=n.accountId?n.accountId():undefined;var c=e.Util.getCookie(t.authUserCookieName);if(c){var u=(c=decodeURI(c)).split(t.cookieSeparator);u[0]&&(this.authenticatedId=u[0]),u.length>1&&u[1]&&(this.accountId=u[1])}}return t.prototype.setAuthenticatedUserContext=function(n,i,o){if(void 0===o&&(o=!1),!this.validateUserInput(n)||i&&!this.validateUserInput(i))e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=n;var a=this.authenticatedId;i&&(this.accountId=i,a=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),o&&e.Util.setCookie(t.authUserCookieName,encodeURI(a),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,e.Util.deleteCookie(t.authUserCookieName)},t.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}();t.User=n}(e.Context||(e.Context={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.IsNullOrUndefined=function(e){return void 0===e||null===e},e}();e.extensions=t;var n=function(){function e(){}return e.GetLength=function(e){var n=0;if(!t.IsNullOrUndefined(e)){var i="";try{i=e.toString()}catch(o){}n=i.length,n=isNaN(n)?0:n}return n},e}();e.stringUtils=n;var i=function(){function e(){}return e.Now=window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,n){var i=null;return 0===e||0===n||t.IsNullOrUndefined(e)||t.IsNullOrUndefined(n)||(i=n-e),i},e}();e.dateTime=i;var o=function(){function e(){}return e.AttachEvent=function(e,n,i){var o=!1;return t.IsNullOrUndefined(e)||(t.IsNullOrUndefined(e.attachEvent)?t.IsNullOrUndefined(e.addEventListener)||(e.addEventListener(n,i,!1),o=!0):(e.attachEvent("on"+n,i),o=!0)),o},e.DetachEvent=function(e,n,i){t.IsNullOrUndefined(e)||(t.IsNullOrUndefined(e.detachEvent)?t.IsNullOrUndefined(e.removeEventListener)||e.removeEventListener(n,i,!1):e.detachEvent("on"+n,i))},e}();e.EventHelper=o;var a=function(){function t(){}return t.ParseDependencyPath=function(t,n,i){var o,a;if(t&&t.length>0){var r=e.UrlHelper.parseUrl(t);o=r.host,null!=r.pathname?("/"!==(i=0===r.pathname.length?"/":r.pathname).charAt(0)&&(i="/"+i),a=e.Telemetry.Common.DataSanitizer.sanitizeString(n?n+" "+i:i)):a=e.Telemetry.Common.DataSanitizer.sanitizeString(t)}else o=i,a=i;return{target:o,name:a}},t}();e.AjaxHelper=a}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}}();e.XHRMonitoringState=t;var n=function(){function n(n){this.completed=!1,this.requestHeadersSize=null,this.ttfb=null,this.responseReceivingDuration=null,this.callbackDuration=null,this.ajaxTotalDuration=null,this.aborted=null,this.pageUrl=null,this.requestUrl=null,this.requestSize=0,this.method=null,this.status=null,this.requestSentTime=null,this.responseStartedTime=null,this.responseFinishedTime=null,this.callbackFinishedTime=null,this.endTime=null,this.originalOnreadystatechage=null,this.xhrMonitoringState=new t,this.clientFailure=0,this.CalculateMetrics=function(){var t=this;t.ajaxTotalDuration=Math.round(1e3*e.dateTime.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3},this.id=n}return n.prototype.getAbsoluteUrl=function(){return this.requestUrl?e.UrlHelper.getAbsoluteUrl(this.requestUrl):null},n.prototype.getPathName=function(){return this.requestUrl?e.Telemetry.Common.DataSanitizer.sanitizeUrl(e.UrlHelper.getCompleteUrl(this.method,this.requestUrl)):null},n}();e.ajaxRecord=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}();e.RequestHeaders=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){}}();e.Domain=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.EventData=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(e.EventData);e.PageViewData=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.RemoteDependencyData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){!function(t){var n=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(e,n){var i=e.length,o=t.sanitizeKey(e);if(o.length!==i){for(var a=0,r=o;n[r]!==undefined;)a++,r=o.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(a);o=r}return o},t.sanitizeKey=function(n){return n&&(n=e.Util.trim(n.toString())).length>t.MAX_NAME_LENGTH&&(n=n.substring(0,t.MAX_NAME_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.NameTooLong,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:n},!0)),n},t.sanitizeString=function(n,i){return void 0===i&&(i=t.MAX_STRING_LENGTH),n&&(i=i||t.MAX_STRING_LENGTH,(n=e.Util.trim(n)).toString().length>i&&(n=n.toString().substring(0,i),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.StringValueTooLong,"string value is too long. It has been truncated to "+i+" characters.",{value:n},!0))),n},t.sanitizeUrl=function(n){return t.sanitizeInput(n,t.MAX_URL_LENGTH,e._InternalMessageId.UrlTooLong)},t.sanitizeMessage=function(n){return n&&n.length>t.MAX_MESSAGE_LENGTH&&(n=n.substring(0,t.MAX_MESSAGE_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.MessageTruncated,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:n},!0)),n},t.sanitizeException=function(n){return n&&n.length>t.MAX_EXCEPTION_LENGTH&&(n=n.substring(0,t.MAX_EXCEPTION_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.ExceptionTruncated,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:n},!0)),n},t.sanitizeProperties=function(e){if(e){var n={};for(var i in e){var o=t.sanitizeString(e[i],t.MAX_PROPERTY_LENGTH);n[i=t.sanitizeKeyAndAddUniqueness(i,n)]=o}e=n}return e},t.sanitizeMeasurements=function(e){if(e){var n={};for(var i in e){var o=e[i];n[i=t.sanitizeKeyAndAddUniqueness(i,n)]=o}e=n}return e},t.sanitizeId=function(n){return n?t.sanitizeInput(n,t.MAX_ID_LENGTH,e._InternalMessageId.IdTooLong).toString():n},t.sanitizeInput=function(t,n,i){return t&&(t=e.Util.trim(t)).length>n&&(t=t.substring(0,n),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},t.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},t.MAX_NAME_LENGTH=150,t.MAX_ID_LENGTH=128,t.MAX_PROPERTY_LENGTH=8192,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}();t.DataSanitizer=n}(t.Common||(t.Common={}))}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a,r,s,l,c,u,g){var p=n.call(this)||this;p.aiDataContract={id:e.FieldType.Required,ver:e.FieldType.Required,name:e.FieldType.Default,resultCode:e.FieldType.Default,duration:e.FieldType.Default,success:e.FieldType.Default,data:e.FieldType.Default,target:e.FieldType.Default,type:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default,kind:e.FieldType.Default,value:e.FieldType.Default,count:e.FieldType.Default,min:e.FieldType.Default,max:e.FieldType.Default,stdDev:e.FieldType.Default,dependencyKind:e.FieldType.Default,dependencySource:e.FieldType.Default,commandName:e.FieldType.Default,dependencyTypeName:e.FieldType.Default},p.id=i,p.duration=e.Util.msToTimeSpan(r),p.success=s,p.resultCode=l+"",p.type="Ajax",p.data=t.Common.DataSanitizer.sanitizeUrl(a);var d=e.AjaxHelper.ParseDependencyPath(o,c,a);return p.target=d.target,p.name=d.name,p.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(u),p.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(g),p}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",i.dataType="RemoteDependencyData",i}(AI.RemoteDependencyData);t.RemoteDependencyData=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){this.currentWindowHost=window.location.host&&window.location.host.toLowerCase(),this.appInsights=e,this.initialized=!1,this.Init()}return n.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},n.prototype.isMonitoredInstance=function(e,i){return this.initialized&&(!0===i||!t.extensions.IsNullOrUndefined(e.ajaxData))&&!0!==e[n.DisabledPropertyName]},n.prototype.supportsMonitoring=function(){var e=!0;(t.extensions.IsNullOrUndefined(XMLHttpRequest)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1);try{" a ".trim()}catch(n){e=!1}return e},n.prototype.instrumentOpen=function(){var i=XMLHttpRequest.prototype.open,o=this;XMLHttpRequest.prototype.open=function(a,r,s){try{!o.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||o.openHandler(this,a,r,s)}catch(l){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(l)})}return i.apply(this,arguments)}},n.prototype.openHandler=function(e,n,i,o){var a="|"+this.appInsights.context.operation.id+"."+t.Util.newId(),r=new t.ajaxRecord(a);r.method=n,r.requestUrl=i,r.xhrMonitoringState.openDone=!0,e.ajaxData=r,this.attachToOnReadyStateChange(e)},n.getFailedAjaxDiagnosticsMessage=function(e){var n="";try{t.extensions.IsNullOrUndefined(e)||t.extensions.IsNullOrUndefined(e.ajaxData)||t.extensions.IsNullOrUndefined(e.ajaxData.requestUrl)||(n+="(url: '"+e.ajaxData.requestUrl+"')")}catch(i){}return n},n.prototype.instrumentSend=function(){var i=XMLHttpRequest.prototype.send,o=this;XMLHttpRequest.prototype.send=function(a){try{o.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&o.sendHandler(this,a)}catch(r){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(r)})}return i.apply(this,arguments)}},n.prototype.sendHandler=function(e,n){if(e.ajaxData.requestSentTime=t.dateTime.Now(),t.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config,e.ajaxData.getAbsoluteUrl(),this.currentWindowHost)&&(e.setRequestHeader(t.RequestHeaders.requestIdHeader,e.ajaxData.id),this.appInsights.context)){var i=this.appInsights.context.appId();i&&e.setRequestHeader(t.RequestHeaders.requestContextHeader,t.RequestHeaders.requestContextAppIdFormat+i)}e.ajaxData.xhrMonitoringState.sendDone=!0},n.prototype.instrumentAbort=function(){var i=XMLHttpRequest.prototype.abort,o=this;XMLHttpRequest.prototype.abort=function(){try{o.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(a){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(a)})}return i.apply(this,arguments)}},n.prototype.attachToOnReadyStateChange=function(i){var o=this;i.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=t.EventHelper.AttachEvent(i,"readystatechange",function(){try{o.isMonitoredInstance(i)&&4===i.readyState&&o.onAjaxComplete(i)}catch(r){var a=e.ApplicationInsights.Util.dump(r);a&&-1!=a.toLowerCase().indexOf("c00c023f")||t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(r)})}})},n.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=t.dateTime.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(e),requestSentTime:e.ajaxData.requestSentTime,responseFinishedTime:e.ajaxData.responseFinishedTime});else{var i=new t.Telemetry.RemoteDependencyData(e.ajaxData.id,e.ajaxData.getAbsoluteUrl(),e.ajaxData.getPathName(),e.ajaxData.ajaxTotalDuration,+e.ajaxData.status>=200&&+e.ajaxData.status<400,+e.ajaxData.status,e.ajaxData.method),o=this.getCorrelationContext(e);o&&(i.target=i.target+" | "+o),this.appInsights.trackDependencyData(i),e.ajaxData=null}},n.prototype.getCorrelationContext=function(i){try{var o=i.getAllResponseHeaders();if(null!==o&&-1!==o.toLowerCase().indexOf(t.RequestHeaders.requestContextHeaderLowerCase)){var a=i.getResponseHeader(t.RequestHeaders.requestContextHeader);return t.CorrelationIdHelper.getCorrelationContext(a)}}catch(r){t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(r)})}},n.instrumentedByAppInsightsName="InstrumentedByAppInsights",n.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",n}();t.AjaxMonitor=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}();e.ArraySendBuffer=t;var n=function(){function t(e){this._bufferFullMessageSent=!1,this._config=e;var n=this.getBuffer(t.BUFFER_KEY),i=this.getBuffer(t.SENT_BUFFER_KEY);this._buffer=n.concat(i),this._buffer.length>t.MAX_BUFFER_SIZE&&(this._buffer.length=t.MAX_BUFFER_SIZE),this.setBuffer(t.SENT_BUFFER_KEY,[]),this.setBuffer(t.BUFFER_KEY,this._buffer)}return t.prototype.enqueue=function(n){this._buffer.length>=t.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(n),this.setBuffer(t.BUFFER_KEY,this._buffer))},t.prototype.count=function(){return this._buffer.length},t.prototype.clear=function(){this._buffer.length=0,this.setBuffer(t.BUFFER_KEY,[]),this.setBuffer(t.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},t.prototype.getItems=function(){return this._buffer.slice(0)},t.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},t.prototype.markAsSent=function(n){this._buffer=this.removePayloadsFromBuffer(n,this._buffer),this.setBuffer(t.BUFFER_KEY,this._buffer);var i=this.getBuffer(t.SENT_BUFFER_KEY);i instanceof Array&&n instanceof Array&&((i=i.concat(n)).length>t.MAX_BUFFER_SIZE&&(e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+i.length,!0),i.length=t.MAX_BUFFER_SIZE),this.setBuffer(t.SENT_BUFFER_KEY,i))},t.prototype.clearSent=function(e){var n=this.getBuffer(t.SENT_BUFFER_KEY);n=this.removePayloadsFromBuffer(e,n),this.setBuffer(t.SENT_BUFFER_KEY,n)},t.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var o=!1;for(var a in e)if(e[a]===t[i]){o=!0;break}o||n.push(t[i])}return n},t.prototype.getBuffer=function(t){try{var n=e.Util.getSessionStorage(t);if(n){var i=JSON.parse(n);if(i)return i}}catch(o){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.FailedToRestoreStorageBuffer," storage key: "+t+", "+e.Util.getExceptionName(o),{exception:e.Util.dump(o)})}return[]},t.prototype.setBuffer=function(t,n){try{var i=JSON.stringify(n);e.Util.setSessionStorage(t,i)}catch(o){e.Util.setSessionStorage(t,JSON.stringify([])),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.FailedToSetStorageBuffer," storage key: "+t+", "+e.Util.getExceptionName(o)+". Buffer cleared",{exception:e.Util.dump(o)})}},t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}();e.SessionStorageSendBuffer=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function t(t){this._XMLHttpRequestSupported=!1,this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._config=t,this._sender=null,this._buffer=e.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new e.SessionStorageSendBuffer(t):new e.ArraySendBuffer(t),!this._config.isBeaconApiDisabled()&&e.Util.IsBeaconApiSupported()?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))}return t.prototype.send=function(t){try{if(this._config.disableTelemetry())return;if(!t)return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(!this._sender)return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.SenderNotInitialized,"Sender was not initialized");var n=e.Serializer.serialize(t),i=this._buffer.getItems(),o=this._buffer.batchPayloads(i);o&&o.length+n.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(n),this._setupTimer()}catch(a){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+e.Util.getExceptionName(a),{exception:e.Util.dump(a)})}},t.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},t.prototype._getSizeInBytes=function(e){var t=0;if(e&&e.length)for(var n=0;n0){var n=this._buffer.getItems();this._sender(n,t)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(i){(!e.Util.getIEVersion()||e.Util.getIEVersion()>9)&&e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+e.Util.getExceptionName(i),{exception:e.Util.dump(i)})}},t.prototype._setRetryTime=function(){var e;if(this._consecutiveErrors<=1)e=10;else{var t=(Math.pow(2,this._consecutiveErrors)-1)/2,n=Math.floor(Math.random()*t*10)+1;e=Math.max(Math.min(n,3600),10)}var i=Date.now()+1e3*e;this._retryAt=i},t.prototype._parseResponse=function(t){try{if(t&&""!==t){var n=JSON.parse(t);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted==n.errors.length)return n}}catch(i){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.InvalidBackendResponse,"Cannot parse the response. "+e.Util.getExceptionName(i),{response:t})}return null},t.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},t.prototype._resendPayload=function(e){if(e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var t=0,n=e;t=300)&&0!==t.status?!this._config.isRetryDisabled()&&this._isRetriable(t.status)?(this._resendPayload(n),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.TransmissionFailed,". Response code "+t.status+". Will retry to send "+n.length+" items.")):this._onError(n,this._formatErrorMessageXhr(t)):206===t.status?(o||(o=this._parseResponse(t.responseText||t.response)),o&&!this._config.isRetryDisabled()?this._onPartialSuccess(n,o):this._onError(n,this._formatErrorMessageXhr(t))):(this._consecutiveErrors=0,this._onSuccess(n,i))}},t.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},t.prototype._onPartialSuccess=function(t,n){for(var i=[],o=[],a=0,r=n.errors.reverse();a0&&this._onSuccess(t,n.itemsAccepted),i.length>0&&this._onError(i,this._formatErrorMessageXhr(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),o.length>0&&(this._resendPayload(o),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.TransmissionFailed,"Partial success. Delivered: "+t.length+", Failed: "+i.length+". Will retry to send "+o.length+" our of "+n.itemsReceived+" items"))},t.prototype._onError=function(t,n,i){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.OnError,"Failed to send telemetry.",{message:n}),this._buffer.clearSent(t)},t.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},t.MaxBeaconPayloadSize=65536,t}();e.Sender=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.MessageData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a){var r=n.call(this)||this;return r.aiDataContract={ver:e.FieldType.Required,message:e.FieldType.Required,severityLevel:e.FieldType.Default,properties:e.FieldType.Default},i=i||e.Util.NotSpecified,r.message=t.Common.DataSanitizer.sanitizeMessage(i),r.properties=t.Common.DataSanitizer.sanitizeProperties(o),a&&(r.severityLevel=a),r}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.Message",i.dataType="MessageData",i}(AI.MessageData);t.Trace=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(t){function n(n,i,o){var a=t.call(this)||this;return a.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Required,properties:e.FieldType.Default,measurements:e.FieldType.Default},a.name=e.Telemetry.Common.DataSanitizer.sanitizeString(n)||e.Util.NotSpecified,a.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(i),a.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o),a}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Event",n.dataType="EventData",n}(AI.EventData);t.Event=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(){return function(){this.hasFullStack=!0,this.parsedStack=[]}}();e.ExceptionDetails=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.ExceptionData=t}(AI||(AI={}));var AI;!function(e){var t=function(){return function(){}}();e.StackFrame=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(t){function n(n,o,a,r){var s=t.call(this)||this;return s.aiDataContract={ver:e.FieldType.Required,exceptions:e.FieldType.Required,severityLevel:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default},s.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(o),s.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(a),s.exceptions=[new i(n)],r&&(s.severityLevel=r),s}return __extends(n,t),n.CreateSimpleException=function(e,t,n,i,o,a){return{exceptions:[{hasFullStack:!0,message:e,stack:o,typeName:t}]}},n.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",n.dataType="ExceptionData",n}(AI.ExceptionData);t.Exception=n;var i=function(n){function i(i){var o=n.call(this)||this;o.aiDataContract={id:e.FieldType.Default,outerId:e.FieldType.Default,typeName:e.FieldType.Required,message:e.FieldType.Required,hasFullStack:e.FieldType.Default,stack:e.FieldType.Default,parsedStack:e.FieldType.Array},o.typeName=t.Common.DataSanitizer.sanitizeString(i.name)||e.Util.NotSpecified,o.message=t.Common.DataSanitizer.sanitizeMessage(i.message)||e.Util.NotSpecified;var a=i.stack;return o.parsedStack=o.parseStack(a),o.stack=t.Common.DataSanitizer.sanitizeException(a),o.hasFullStack=e.Util.isArray(o.parsedStack)&&o.parsedStack.length>0,o}return __extends(i,n),i.prototype.parseStack=function(e){var t=undefined;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,a=0,r=0;r<=n.length;r++){var s=n[r];if(o.regex.test(s)){var l=new o(n[r],i++);a+=l.sizeInBytes,t.push(l)}}if(a>32768)for(var c=0,u=t.length-1,g=0,p=c,d=u;c32768){var f=d-p+1;t.splice(p,f);break}p=c,d=u,c++,u--}}return t},i}(AI.ExceptionDetails),o=function(t){function n(i,o){var a=t.call(this)||this;a.sizeInBytes=0,a.aiDataContract={level:e.FieldType.Required,method:e.FieldType.Required,assembly:e.FieldType.Default,fileName:e.FieldType.Default,line:e.FieldType.Default},a.level=o,a.method="",a.assembly=e.Util.trim(i);var r=i.match(n.regex);return r&&r.length>=5&&(a.method=e.Util.trim(r[2])||a.method,a.fileName=e.Util.trim(r[4]),a.line=parseInt(r[5])||0),a.sizeInBytes+=a.method.length,a.sizeInBytes+=a.fileName.length,a.sizeInBytes+=a.assembly.length,a.sizeInBytes+=n.baseSize,a.sizeInBytes+=a.level.toString().length,a.sizeInBytes+=a.line.toString().length,a}return __extends(n,t),n.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,n.baseSize=58,n}(AI.StackFrame);t._StackFrame=o}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(e.DataPointType||(e.DataPointType={}))}(AI||(AI={}));var AI;!function(e){var t=function(){return function(){this.kind=e.DataPointType.Measurement}}();e.DataPoint=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.MetricData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.aiDataContract={name:e.FieldType.Required,kind:e.FieldType.Default,value:e.FieldType.Required,count:e.FieldType.Default,min:e.FieldType.Default,max:e.FieldType.Default,stdDev:e.FieldType.Default},n}return __extends(n,t),n}(AI.DataPoint);t.DataPoint=n}(t.Common||(t.Common={}))}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){!function(n){var i=function(i){function o(o,a,r,s,l,c){var u=i.call(this)||this;u.aiDataContract={ver:t.FieldType.Required,metrics:t.FieldType.Required,properties:t.FieldType.Default};var g=new e.ApplicationInsights.Telemetry.Common.DataPoint;return g.count=r>0?r:undefined,g.max=isNaN(l)||null===l?undefined:l,g.min=isNaN(s)||null===s?undefined:s,g.name=n.Common.DataSanitizer.sanitizeString(o)||t.Util.NotSpecified,g.value=a,u.metrics=[g],u.properties=t.Telemetry.Common.DataSanitizer.sanitizeProperties(c),u}return __extends(o,i),o.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",o.dataType="MetricData",o}(AI.MetricData);n.Metric=i}(t.Telemetry||(t.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a,r,s,l){var c=n.call(this)||this;return c.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Default,url:e.FieldType.Default,duration:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default,id:e.FieldType.Default},c.id=t.Common.DataSanitizer.sanitizeId(l),c.url=t.Common.DataSanitizer.sanitizeUrl(o),c.name=t.Common.DataSanitizer.sanitizeString(i)||e.Util.NotSpecified,isNaN(a)||(c.duration=e.Util.msToTimeSpan(a)),c.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(r),c.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(s),c}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",i.dataType="PageviewData",i}(AI.PageViewData);t.PageView=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(e.PageViewData);e.PageViewPerfData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(o,a,r,s,l){var c=n.call(this)||this;c.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Default,url:e.FieldType.Default,duration:e.FieldType.Default,perfTotal:e.FieldType.Default,networkConnect:e.FieldType.Default,sentRequest:e.FieldType.Default,receivedResponse:e.FieldType.Default,domProcessing:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default},c.isValid=!1;var u=i.getPerformanceTiming();if(u){var g=i.getDuration(u.navigationStart,u.loadEventEnd),p=i.getDuration(u.navigationStart,u.connectEnd),d=i.getDuration(u.requestStart,u.responseStart),f=i.getDuration(u.responseStart,u.responseEnd),h=i.getDuration(u.responseEnd,u.loadEventEnd);0==g?e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.ErrorPVCalc,"error calculating page view performance.",{total:g,network:p,request:d,response:f,dom:h}):i.shouldCollectDuration(g,p,d,f,h)?g0&&e.navigationStart>0&&e.responseStart>0&&e.requestStart>0&&e.loadEventEnd>0&&e.responseEnd>0&&e.connectEnd>0&&e.domLoading>0},i.getDuration=function(e,t){var n=undefined;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},i.shouldCollectDuration=function(){for(var e=[],t=0;t=i.MAX_DURATION_ALLOWED)return!1;return!0},i.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",i.dataType="PageviewPerformanceData",i.MAX_DURATION_ALLOWED=36e5,i}(AI.PageViewPerfData);t.PageViewPerformance=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){var n=this;this._config=e,this._sender=new t.Sender(e),this.appId=function(){return n._sender._appId},e.appId()&&(this._sender._appId=e.appId()),this.telemetryInitializers=[],"undefined"!=typeof window&&(this._sessionManager=new t.Context._SessionManager(e),this.application=new t.Context.Application,this.device=new t.Context.Device,this.internal=new t.Context.Internal(e),this.location=new t.Context.Location,this.user=new t.Context.User(e),this.operation=new t.Context.Operation,this.session=new t.Context.Session,this.sample=new t.Context.Sample(e.sampleRate())),this._addDefaultTelemetryInitializers()}return n.prototype.addTelemetryInitializer=function(e){this.telemetryInitializers.push(e)},n.prototype.track=function(e){return e?(e.name===t.Telemetry.PageView.envelopeType&&t._InternalLogging.resetInternalMessageCount(),this.session&&"string"!=typeof this.session.id&&this._sessionManager.update(),this._track(e)):t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument",null,!0),e},n.prototype._addDefaultTelemetryInitializers=function(){if(!this._config.isBrowserLinkTrackingEnabled()){var t=["/browserLinkSignalR/","/__browserLink/"];this.addTelemetryInitializer(function(n){if(n.name===e.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType){var i=n.data;if(i&&i.baseData)for(var o=0;o=0)return!1}return!0})}},n.prototype._track=function(e){this.session&&("string"==typeof this.session.id?this._applySessionContext(e,this.session):this._applySessionContext(e,this._sessionManager.automaticSession)),this._applyApplicationContext(e,this.application),this._applyDeviceContext(e,this.device),this._applyInternalContext(e,this.internal),this._applyLocationContext(e,this.location),this._applySampleContext(e,this.sample),this._applyUserContext(e,this.user),this._applyOperationContext(e,this.operation),e.iKey=this._config.instrumentationKey();var n=!1;try{for(var i=this.telemetryInitializers.length,o=0;o6e4&&(clearInterval(g),l||(s.appInsights.sendPageViewInternal(n,i,6e4,o,a),s.appInsights.flush()))}catch(p){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+e.Util.getExceptionName(p),{exception:e.Util.dump(p)})}},100);else e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.")},n}();t.PageViewManager=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(){function t(e){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=e}return t.prototype.trackPreviousPageVisit=function(t,n){try{var i=this.restartPageVisitTimer(t,n);i&&this.pageVisitTimeTrackingHandler(i.pageName,i.pageUrl,i.pageVisitTime)}catch(o){e._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+e.Util.dump(o))}},t.prototype.restartPageVisitTimer=function(t,n){try{var i=this.stopPageVisitTimer();return this.startPageVisitTimer(t,n),i}catch(o){return e._InternalLogging.warnToConsole("Call to restart failed: "+e.Util.dump(o)),null}},t.prototype.startPageVisitTimer=function(t,n){try{if(e.Util.canUseSessionStorage()){if(null!=e.Util.getSessionStorage(this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var o=new i(t,n),a=JSON.stringify(o);e.Util.setSessionStorage(this.prevPageVisitDataKeyName,a)}}catch(r){e._InternalLogging.warnToConsole("Call to start failed: "+e.Util.dump(r))}},t.prototype.stopPageVisitTimer=function(){try{if(e.Util.canUseSessionStorage()){var t=Date.now(),n=e.Util.getSessionStorage(this.prevPageVisitDataKeyName);if(n){var i=JSON.parse(n);return i.pageVisitTime=t-i.pageVisitStartTime,e.Util.removeSessionStorage(this.prevPageVisitDataKeyName),i}return null}return null}catch(o){return e._InternalLogging.warnToConsole("Stop page visit timer failed: "+e.Util.dump(o)),null}},t}();t.PageVisitTimeManager=n;var i=function(){return function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t}}();t.PageVisitData=i}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function t(){this.hashCodeGeneragor=new e.HashCodeScoreGenerator}return t.prototype.isEnabled=function(e,t){return this.hashCodeGeneragor.getHashCodeScore(e)0){var n=t.getNumberOfLostItems()-t.itemsRestoredFromSessionBuffer;t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+n+'"',null),t.appInsights.flush();var i=t.getIssuesReported();++i,e.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,i.toString())}}catch(o){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.FailedToReportDataLoss,"Failed to report data loss: "+e.Util.getExceptionName(o),{exception:e.Util.dump(o)})}finally{try{t.reset()}catch(o){}}},t.enabled=!1,t.itemsRestoredFromSessionBuffer=0,t.LIMIT_PER_SESSION=10,t.ITEMS_QUEUED_KEY="AI_itemsQueued",t.ISSUES_REPORTED_KEY="AI_lossIssuesReported",t}();e.DataLossAnalyzer=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(t){t.queue=t.queue||[];var i=t.config||{};if(i&&!i.instrumentationKey)if((i=t).iKey)e.ApplicationInsights.Version="0.10.0.0",i.instrumentationKey=i.iKey;else{if(!i.applicationInsightsId)throw new Error("Cannot load Application Insights SDK, no instrumentationKey was provided.");e.ApplicationInsights.Version="0.7.2.0",i.instrumentationKey=i.applicationInsightsId}i=n.getDefaultConfig(i),this.snippet=t,this.config=i}return n.prototype.loadAppInsights=function(){var t=new e.ApplicationInsights.AppInsights(this.config);if(this.config.iKey){var n=t.trackPageView;t.trackPageView=function(e,i,o){n.apply(t,[null,e,i,o])}}"function"==typeof this.snippet.logPageView&&(t.logPageView=function(e,n,i){t.trackPageView(null,e,n,i)});return"function"==typeof this.snippet.logEvent&&(t.logEvent=function(e,n,i){t.trackEvent(e,n,i)}),t},n.prototype.emptyQueue=function(){try{if(e.ApplicationInsights.Util.isArray(this.snippet.queue)){for(var n=this.snippet.queue.length,i=0;i0?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=t.Util.stringToBoolOrDefault(e.enableDebug),e.disableExceptionTracking=t.Util.stringToBoolOrDefault(e.disableExceptionTracking),e.disableTelemetry=t.Util.stringToBoolOrDefault(e.disableTelemetry),e.verboseLogging=t.Util.stringToBoolOrDefault(e.verboseLogging),e.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.disableAjaxTracking=t.Util.stringToBoolOrDefault(e.disableAjaxTracking),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=t.Util.stringToBoolOrDefault(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=t.Util.stringToBoolOrDefault(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=t.Util.stringToBoolOrDefault(e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=t.Util.stringToBoolOrDefault(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=t.Util.stringToBoolOrDefault(e.isRetryDisabled),e.isCookieUseDisabled=t.Util.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=t.Util.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=t.Util.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=t.Util.stringToBoolOrDefault(e.enableCorsCorrelation),e},n}();t.Initialization=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){try{if("undefined"!=typeof window&&"undefined"!=typeof JSON){if(window.appInsights===undefined)e.ApplicationInsights.AppInsights.defaultConfig=e.ApplicationInsights.Initialization.getDefaultConfig();else{var n=window.appInsights||{},i=new e.ApplicationInsights.Initialization(n),o=i.loadAppInsights();for(var a in o)n[a]=o[a];i.emptyQueue(),i.pollInteralLogs(o),i.addHousekeepingBeforeUnload(o)}}}catch(r){e.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+r.message)}}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})); //# sourceMappingURL=ai.0.js.map \ No newline at end of file diff --git a/dist/ai.0.js.map b/dist/ai.0.js.map index 576d98d6..5cf75707 100644 --- a/dist/ai.0.js.map +++ b/dist/ai.0.js.map @@ -1 +1 @@ -{"version":3,"sources":["../JavaScript/JavaScriptSDK.Interfaces/IConfig.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Base.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Envelope.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IApplication.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IDevice.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IInternal.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ILocation.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IOperation.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ISample.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IUser.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ISession.ts","../JavaScript/JavaScriptSDK.Interfaces/Telemetry/ISerializable.ts","../JavaScript/JavaScriptSDK.Interfaces/Telemetry/IEnvelope.ts","../JavaScript/JavaScriptSDK.Interfaces/ITelemetryContext.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/SeverityLevel.ts","../JavaScript/JavaScriptSDK.Interfaces/IAppInsights.ts","../JavaScript/JavaScriptSDK/Logging.ts","../JavaScript/JavaScriptSDK/UtilHelpers.ts","../JavaScript/JavaScriptSDK/Util.ts","../JavaScript/JavaScriptSDK/Serializer.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Envelope.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Base.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ContextTagKeys.ts","../JavaScript/JavaScriptSDK/Context/Application.ts","../JavaScript/JavaScriptSDK/Context/Device.ts","../JavaScript/JavaScriptSDK/Context/Internal.ts","../JavaScript/JavaScriptSDK/Context/Location.ts","../JavaScript/JavaScriptSDK/Context/Operation.ts","../JavaScript/JavaScriptSDK/HashCodeScoreGenerator.ts","../JavaScript/JavaScriptSDK/SamplingScoreGenerator.ts","../JavaScript/JavaScriptSDK/Context/Sample.ts","../JavaScript/JavaScriptSDK/Context/Session.ts","../JavaScript/JavaScriptSDK/Context/User.ts","../JavaScript/JavaScriptSDK/ajax/ajaxUtils.ts","../JavaScript/JavaScriptSDK/ajax/ajaxRecord.ts","../JavaScript/JavaScriptSDK/RequestResponseHeaders.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Domain.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/EventData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/PageViewData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/RemoteDependencyData.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/DataSanitizer.ts","../JavaScript/JavaScriptSDK/Telemetry/RemoteDependencyData.ts","../JavaScript/JavaScriptSDK/ajax/ajax.ts","../JavaScript/JavaScriptSDK/SendBuffer.ts","../JavaScript/JavaScriptSDK/Sender.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/MessageData.ts","../JavaScript/JavaScriptSDK/Telemetry/Trace.ts","../JavaScript/JavaScriptSDK/Telemetry/Event.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ExceptionDetails.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ExceptionData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/StackFrame.ts","../JavaScript/JavaScriptSDK/Telemetry/Exception.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/DataPointType.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/DataPoint.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/MetricData.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/DataPoint.ts","../JavaScript/JavaScriptSDK/Telemetry/Metric.ts","../JavaScript/JavaScriptSDK/Telemetry/PageView.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/PageViewPerfData.ts","../JavaScript/JavaScriptSDK/Telemetry/PageViewPerformance.ts","../JavaScript/JavaScriptSDK/TelemetryContext.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Data.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Data.ts","../JavaScript/JavaScriptSDK/Telemetry/PageViewManager.ts","../JavaScript/JavaScriptSDK/Telemetry/PageVisitTimeManager.ts","../JavaScript/JavaScriptSDK/ajax/fetch.ts","../JavaScript/JavaScriptSDK/SplitTest.ts","../JavaScript/JavaScriptSDK/AppInsights.ts","../JavaScript/JavaScriptSDK/DataLossAnalyzer.ts","../JavaScript/JavaScriptSDK/Initialization.ts","../JavaScript/JavaScriptSDK/Init.ts"],"names":["Microsoft","ApplicationInsights","Telemetry","Base","Envelope","this","ver","sampleRate","tags","Context","AI","SeverityLevel","LoggingSeverity","_InternalMessageId","_InternalLogMessage","msgId","msg","isUserAct","properties","messageId","message","AiUserActionablePrefix","AiNonUserActionablePrefix","toString","diagnosticText","sanitizeDiagnosticText","JSON","stringify","text","replace","_InternalLogging","throwInternal","severity","enableDebugExceptions","messageKey","_messageLogged","verboseLogging","warnToConsole","logInternalMessage","console","warn","log","resetInternalMessageCount","_messageCount","clearInternalMessageLoggedTypes","Util","canUseSessionStorage","sessionStorageKeys","getSessionStorageKeys","i","length","indexOf","AIInternalMessagePrefix","removeSessionStorage","setMaxInternalMessageLimit","limit","Error","MAX_INTERNAL_MESSAGE_LIMIT","_areInternalMessagesThrottled","logMessage","getSessionStorage","setSessionStorage","CRITICAL","queue","push","throttleLimitMessage","throttleMessage","MessageLimitPerPVExceeded","UtilHelpers","newId","result","random","Math","charAt","floor","StorageType","disableStorage","_canUseLocalStorage","_canUseSessionStorage","_getLocalStorageObject","canUseLocalStorage","_getVerifiedStorageObject","LocalStorage","storageType","fail","uid","storage","Date","window","localStorage","sessionStorage","setItem","getItem","removeItem","exception","isInternalApplicationInsightsEndpoint","endpointUrl","_internalEndpoints","toLowerCase","undefined","getStorage","name","e","WARNING","BrowserCannotReadLocalStorage","getExceptionName","dump","setStorage","data","BrowserCannotWriteLocalStorage","removeStorage","BrowserFailedRemovalFromLocalStorage","_getSessionStorageObject","SessionStorage","keys","key","BrowserCannotReadSessionStorage","BrowserCannotWriteSessionStorage","BrowserFailedRemovalFromSessionStorage","disableCookies","_canUseCookies","canUseCookies","document","cookie","CannotAccessCookie","setCookie","value","domain","domainAttrib","secureAttrib","location","protocol","stringToBoolOrDefault","str","defaultValue","getCookie","cookieName","cookies","split","trim","substring","deleteCookie","isArray","obj","Object","prototype","call","isError","isDate","toISOStringForIE8","date","toISOString","pad","number","r","String","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","slice","getIEVersion","userAgentStr","myNav","navigator","userAgent","parseInt","msToTimeSpan","totalms","isNaN","ms","round","sec","min","hour","days","isCrossOriginError","url","lineNumber","columnNumber","error","object","objectTypeDump","propertyValueDump","stack","addEventHandler","eventName","callback","verbEventName","addEventListener","IsBeaconApiSupported","sendBeacon","NotSpecified","UrlHelper","parseUrl","htmlAnchorElement","createElement","href","getAbsoluteUrl","a","getPathName","pathname","getCompleteUrl","method","absoluteUrl","toUpperCase","CorrelationIdHelper","canIncludeCorrelationHeader","config","requestUrl","currentHost","disableCorrelationHeaders","requestHost","host","enableCorsCorrelation","excludedDomains","correlationHeaderExcludedDomains","RegExp","test","getCorrelationContext","responseHeader","correlationId","getCorrelationContextValue","RequestHeaders","requestContextTargetKey","correlationIdPrefix","keyValues","keyValue","FieldType","Serializer","serialize","input","output","_serializeObject","source","CannotSerializeObject","CircularReferenceDetected","aiDataContract","_serializeStringMap","_serializeArray","CannotSerializeObjectNonSerializable","field","contract","isRequired","Required","isHidden","Hidden","Array","isPresent","isObject","MissingRequiredFieldSpecification","sources","item","ItemNotInArray","map","expectedType","num","parseFloat","Common","_super","_this","DataSanitizer","sanitizeString","time","iKey","__extends","apply","arguments","ContextTagKeys","applicationVersion","applicationBuild","applicationTypeId","applicationId","applicationLayer","deviceId","deviceIp","deviceLanguage","deviceLocale","deviceModel","deviceFriendlyName","deviceNetwork","deviceNetworkName","deviceOEMName","deviceOS","deviceOSVersion","deviceRoleInstance","deviceRoleName","deviceScreenResolution","deviceType","deviceMachineName","deviceVMName","deviceBrowser","deviceBrowserVersion","locationIp","locationCountry","locationProvince","locationCity","operationId","operationName","operationParentId","operationRootId","operationSyntheticSource","operationCorrelationVector","sessionId","sessionIsFirst","sessionIsNew","userAccountAcquisitionDate","userAccountId","userId","userStoreRegion","userAuthUserId","userAnonymousUserAcquisitionDate","userAuthenticatedUserAcquisitionDate","cloudName","cloudRole","cloudRoleVer","cloudRoleInstance","cloudEnvironment","cloudLocation","cloudDeploymentUnit","internalSdkVersion","internalAgentVersion","internalNodeName","Application","Device","id","type","Internal","sdkVersion","sdkExtension","Version","Location","Operation","HashCodeScoreGenerator","getHashCodeScore","getHashCode","INT_MAX_VALUE","MIN_INPUT_LENGTH","concat","hash","charCodeAt","abs","SamplingScoreGenerator","hashCodeGeneragor","getSamplingScore","envelope","tagKeys","Sample","SampleRateOutOfRange","samplingRate","samplingScoreGenerator","isSampledIn","Session","_SessionManager","sessionExpirationMs","acquisitionSpan","sessionRenewalMs","renewalSpan","automaticSession","update","initializeAutomaticSession","now","dateTime","Now","acquisitionExpired","acquisitionDate","renewalExpired","renewalDate","isFirst","renew","cookieUpdatedTimestamp","cookieUpdateInterval","backup","initializeAutomaticSessionWithData","sessionData","params","acq","renewal","ErrorParsingAISessionCookie","SessionRenewalDateIsZero","BrowserDoesNotSupportLocalStorage","guid","acquisitionExpiry","renewalExpiry","cookieExpiry","setTime","cookieDomnain","cookieDomain","join","toUTCString","User","userCookieName","cookieSeparator","acqStr","accountAcquisitionDate","getTime","newCookie","accountId","authCookie","authUserCookieName","authCookieString","decodeURI","authenticatedId","setAuthenticatedUserContext","authenticatedUserId","storeInCookie","validateUserInput","SetAuthContextFailedAccountName","encodeURI","clearAuthenticatedUserContext","match","extensions","IsNullOrUndefined","stringUtils","GetLength","strObject","res","stringified","ex","performance","timing","navigationStart","GetDuration","start","end","EventHelper","AttachEvent","eventNameWithoutOn","handlerRef","attachEvent","DetachEvent","detachEvent","removeEventListener","AjaxHelper","ParseDependencyPath","pathName","target","parsedUrl","XHRMonitoringState","openDone","setRequestHeaderDone","sendDone","abortDone","onreadystatechangeCallbackAttached","ajaxRecord","completed","requestHeadersSize","ttfb","responseReceivingDuration","callbackDuration","ajaxTotalDuration","aborted","pageUrl","requestSize","status","requestSentTime","responseStartedTime","responseFinishedTime","callbackFinishedTime","endTime","originalOnreadystatechage","xhrMonitoringState","clientFailure","CalculateMetrics","self","sanitizeUrl","requestContextHeader","requestContextAppIdFormat","requestIdHeader","sdkContextHeader","sdkContextHeaderAppIdRequest","requestContextHeaderLowerCase","Domain","EventData","measurements","PageViewData","RemoteDependencyData","success","sanitizeKeyAndAddUniqueness","origLength","sanitizeKey","uniqueField","MAX_NAME_LENGTH","padNumber","NameTooLong","maxLength","MAX_STRING_LENGTH","StringValueTooLong","sanitizeInput","MAX_URL_LENGTH","UrlTooLong","sanitizeMessage","MAX_MESSAGE_LENGTH","MessageTruncated","sanitizeException","MAX_EXCEPTION_LENGTH","ExceptionTruncated","sanitizeProperties","tempProps","prop","MAX_PROPERTY_LENGTH","sanitizeMeasurements","tempMeasurements","measure","sanitizeId","MAX_ID_LENGTH","IdTooLong","_msgId","s","substr","commandName","resultCode","Default","duration","kind","count","max","stdDev","dependencyKind","dependencySource","dependencyTypeName","dependencyFields","envelopeType","dataType","AjaxMonitor","appInsights","currentWindowHost","initialized","Init","supportsMonitoring","instrumentOpen","instrumentSend","instrumentAbort","isMonitoredInstance","xhr","excludeAjaxDataValidation","ajaxData","DisabledPropertyName","XMLHttpRequest","open","send","abort","originalOpen","ajaxMonitorInstance","async","openHandler","FailedMonitorAjaxOpen","ajaxDiagnosticsMessage","getFailedAjaxDiagnosticsMessage","context","operation","attachToOnReadyStateChange","originalSend","content","sendHandler","FailedMonitorAjaxSend","setRequestHeader","appId","originalAbort","FailedMonitorAjaxAbort","readyState","onAjaxComplete","exceptionText","FailedMonitorAjaxRSC","FailedMonitorAjaxDur","dependency","correlationContext","trackDependencyData","responseHeadersString","getAllResponseHeaders","getResponseHeader","FailedMonitorAjaxGetCorrelationHeader","instrumentedByAppInsightsName","ArraySendBuffer","_config","_buffer","enqueue","payload","clear","getItems","batchPayloads","emitLineDelimitedJson","markAsSent","clearSent","SessionStorageSendBuffer","_bufferFullMessageSent","bufferItems","getBuffer","BUFFER_KEY","notDeliveredItems","SENT_BUFFER_KEY","MAX_BUFFER_SIZE","setBuffer","SessionStorageBufferFull","removePayloadsFromBuffer","sentElements","payloads","buffer","remaining","contains","j","bufferJson","parse","FailedToRestoreStorageBuffer","FailedToSetStorageBuffer","Sender","_XMLHttpRequestSupported","_consecutiveErrors","_retryAt","_lastSend","_sender","enableSessionStorageBuffer","isBeaconApiDisabled","_beaconSender","_xhrSender","XDomainRequest","_xdrSender","disableTelemetry","CannotSendEmptyTelemetry","SenderNotInitialized","bufferPayload","batch","maxBatchSizeInBytes","triggerSend","_setupTimer","FailedAddingTelemetryToBuffer","_timeoutHandle","retryInterval","timerValue","maxBatchInterval","setTimeout","_getSizeInBytes","list","size","clearTimeout","TransmissionFailed","_setRetryTime","delayInSeconds","backOffSlot","pow","backOffDelay","retryAfterTimeSpan","_parseResponse","response","itemsReceived","itemsAccepted","errors","InvalidBackendResponse","_isRetriable","statusCode","_resendPayload","_i","payload_1","_formatErrorMessageXhr","responseText","_formatErrorMessageXdr","xdr","isAsync","onreadystatechange","_xhrReadyStateChange","onerror","event","_onError","onload","_xdrOnLoad","hostingProtocol","lastIndexOf","plainTextBatch","Blob","countOfItemsInPayload","_appId","isRetryDisabled","_onPartialSuccess","_onSuccess","results","failed","retry","errors_1","reverse","extracted","splice","index","OnError","MaxBeaconPayloadSize","MessageData","Trace","severityLevel","Event","ExceptionDetails","hasFullStack","parsedStack","ExceptionData","exceptions","StackFrame","Exception","_ExceptionDetails","CreateSimpleException","typeName","assembly","fileName","details","line","outerId","parseStack","frames","level","totalSizeInBytes","frame","_StackFrame","regex","parsedFrame","sizeInBytes","left","right","acceptedLeft","acceptedRight","howMany","matches","baseSize","DataPointType","DataPoint","Measurement","MetricData","metrics","Metric","dataPoint","PageView","durationMs","PageViewPerfData","PageViewPerformance","unused","perfTotal","networkConnect","sentRequest","receivedResponse","domProcessing","isValid","getPerformanceTiming","total","getDuration","loadEventEnd","network","connectEnd","request","requestStart","responseStart","responseEnd","dom","ErrorPVCalc","shouldCollectDuration","ClientPerformanceMathError","InvalidDurationValue","getIsValid","getDurationMs","isPerformanceTimingSupported","isPerformanceTimingDataReady","domainLookupStart","domLoading","durations","botAgentNames","isGoogleBot","i_1","MAX_DURATION_ALLOWED","TelemetryContext","telemetryInitializers","_sessionManager","application","device","internal","user","session","sample","_addDefaultTelemetryInitializers","addTelemetryInitializer","telemetryInitializer","track","_track","TrackArgumentsNotSpecified","isBrowserLinkTrackingEnabled","browserLinkPaths_1","remoteData","baseData","_applySessionContext","_applyApplicationContext","_applyDeviceContext","_applyInternalContext","_applyLocationContext","_applySampleContext","_applyUserContext","_applyOperationContext","instrumentationKey","doNotSendItem","telemetryInitializersCount","TelemetryInitializerFailed","iKeyNoDashes","TelemetrySampledAndNotSent","SampleRate","appContext","build","deviceContext","ip","language","locale","model","oemName","os","osversion","resolution","internalContext","agentVersion","locationContext","operationContext","parentId","rootId","syntheticSource","sampleContext","sessionContext","userContext","agent","storeRegion","Data","baseType","PageViewManager","overridePageViewDuration","pageViewPerformanceSent","trackPageView","title","pageViewSent","customDuration","sendPageViewInternal","flush","handle","setInterval","clearInterval","pageViewPerformance","sendPageViewPerformanceInternal","TrackPVFailedCalc","NavigationTimingNotSupported","PageVisitTimeManager","pageVisitTimeTrackingHandler","prevPageVisitDataKeyName","trackPreviousPageVisit","currentPageName","currentPageUrl","prevPageVisitTimeData","restartPageVisitTimer","pageName","pageVisitTime","prevPageVisitData","stopPageVisitTimer","startPageVisitTimer","currPageVisitData","PageVisitData","currPageVisitDataStr","pageVisitEndTime","pageVisitDataJsonStr","pageVisitStartTime","FetchMonitor","instrumentFetch","Request","fetch","originalFetch","fetchMonitorInstance","init","createAjaxRecord","includeCorrelationHeaders","getFailedFetchDiagnosticsMessage","then","onFetchComplete","catch","reason","onFetchFailed","headers","Headers","set","fetchDiagnosticsMessage","get","SplitTest","isEnabled","percentEnabled","AppInsights","_trackAjaxAttempts","defaults","defaultConfig","enableDebug","configGetters","samplingPercentage","isCookieUseDisabled","isStorageUseDisabled","_pageViewManager","_eventTracking","Timing","action","_pageTracking","_pageVisitTimeManager","trackPageVisitTime","disableAjaxTracking","_ajaxMonitor","disableFetchTracking","_fetchMonitor","pageView","pageViewPerformanceData","pageViewPerformanceEnvelope","startTrackPage","StartTrackFailed","stopTrackPage","stop","autoTrackPageVisitTime","StopTrackFailed","TrackPVFailed","startTrackEvent","StartTrackEventFailed","stopTrackEvent","StopTrackEventFailed","trackEvent","eventTelemetry","TrackEventFailed","trackDependency","command","totalTime","maxAjaxCallsPerView","dependencyData","MaxAjaxPerPVExceeded","trackAjax","trackException","handledAt","exceptionTelemetry","TrackExceptionFailed","trackMetric","average","sampleCount","telemetry","TrackMetricFailed","trackTrace","TrackTraceFailed","PageName","PageUrl","FlushFailed","SetAuthContextFailed","SendCORSException","exceptionData","_onerror","URL","errorString","exceptionDump","ExceptionWhileLoggingError","_name","_events","StartCalledMoreThanOnce","StopCalledWithoutStart","DataLossAnalyzer","reset","ITEMS_QUEUED_KEY","ISSUES_REPORTED_KEY","itemsRestoredFromSessionBuffer","enabled","getIssuesReported","incrementItemsQueued","itemsQueued","getNumberOfLostItems","decrementItemsQueued","countOfItemsSentSuccessfully","reportLostItems","LIMIT_PER_SESSION","lostItems","issuesReported","FailedToReportDataLoss","Initialization","snippet","getDefaultConfig","loadAppInsights","originalTrackPageView","pagePath","emptyQueue","FailedToSendQueuedTelemetry","pollInteralLogs","appInsightsInstance","diagnosticLogInterval","addHousekeepingBeforeUnload","disableFlushOnBeforeUnload","FailedToAddHandlerForOnBeforeUnload","disableExceptionTracking","appInsightsLocal"],"mappings":"4VAAOA,WAAP,SAAOA,GAAUA,EAAAC,sBAAAD,EAAAC,wBAAjB,CAAOD,YAAAA,eCCP,IAAOA,WAAP,SAAOA,IAAU,SAAAE,GAOb,IAAAC,EAAA,WAWA,OAHI,aARJ,GAAaD,EAAAC,KAAIA,EAPJ,CAAAH,EAAAE,YAAAF,EAAAE,eAAjB,CAAOF,YAAAA,eCCP,IAAOA,WAAP,SAAOA,IAA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sourcesContent":["module Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IConfig {\r\n instrumentationKey?: string;\r\n endpointUrl?: string;\r\n emitLineDelimitedJson?: boolean;\r\n accountId?: string;\r\n sessionRenewalMs?: number;\r\n sessionExpirationMs?: number;\r\n maxBatchSizeInBytes?: number;\r\n maxBatchInterval?: number;\r\n enableDebug?: boolean;\r\n disableExceptionTracking?: boolean;\r\n disableTelemetry?: boolean;\r\n verboseLogging?: boolean;\r\n diagnosticLogInterval?: number;\r\n samplingPercentage?: number;\r\n autoTrackPageVisitTime?: boolean;\r\n disableAjaxTracking?: boolean;\r\n disableFetchTracking?: boolean;\r\n overridePageViewDuration?: boolean;\r\n maxAjaxCallsPerView?: number;\r\n disableDataLossAnalysis?: boolean;\r\n disableCorrelationHeaders?: boolean;\r\n correlationHeaderExcludedDomains?: string[];\r\n disableFlushOnBeforeUnload?: boolean;\r\n enableSessionStorageBuffer?: boolean;\r\n isCookieUseDisabled?: boolean;\r\n cookieDomain?: string;\r\n isRetryDisabled?: boolean;\r\n url?: string;\r\n isStorageUseDisabled?: boolean;\r\n isBeaconApiDisabled?: boolean;\r\n sdkExtension?: string;\r\n isBrowserLinkTrackingEnabled?: boolean;\r\n appId?: string;\r\n enableCorsCorrelation?: boolean;\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Data struct to contain only C section with custom fields.\r\n */\r\n export class Base\r\n {\r\n \r\n /**\r\n * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.\r\n */\r\n public baseType: string;\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * System variables for a telemetry item.\r\n */\r\n export class Envelope\r\n {\r\n \r\n /**\r\n * Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Type name of telemetry data item.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z.\r\n */\r\n public time: string;\r\n \r\n /**\r\n * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.\r\n */\r\n public sampleRate: number;\r\n \r\n /**\r\n * Sequence field used to track absolute order of uploaded events.\r\n */\r\n public seq: string;\r\n \r\n /**\r\n * The application's instrumentation key. The key is typically represented as a GUID, but there are cases when it is not a guid. No code should rely on iKey being a GUID. Instrumentation key is case insensitive.\r\n */\r\n public iKey: string;\r\n \r\n /**\r\n * Key/value collection of context properties. See ContextTagKeys for information on available properties.\r\n */\r\n public tags: any;\r\n \r\n /**\r\n * Telemetry data item.\r\n */\r\n public data: Base;\r\n \r\n constructor()\r\n {\r\n this.ver = 1;\r\n this.sampleRate = 100.0;\r\n this.tags = {};\r\n }\r\n }\r\n}\r\n","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IApplication {\r\n /**\r\n * The application version.\r\n */\r\n ver: string;\r\n\r\n /**\r\n * The application build version.\r\n */\r\n build: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IDevice {\r\n /**\r\n * The type for the current device.\r\n */\r\n type: string;\r\n\r\n /**\r\n * A device unique ID.\r\n */\r\n id: string;\r\n\r\n /**\r\n * The device OEM for the current device.\r\n */\r\n oemName: string;\r\n\r\n /**\r\n * The device model for the current device.\r\n */\r\n model: string;\r\n\r\n /**\r\n * The IANA interface type for the internet connected network adapter.\r\n */\r\n network: number;\r\n\r\n /**\r\n * The application screen resolution.\r\n */\r\n resolution: string;\r\n\r\n /**\r\n * The current display language of the operating system.\r\n */\r\n locale: string;\r\n\r\n /**\r\n * The IP address.\r\n */\r\n ip: string;\r\n\r\n /**\r\n * The device language.\r\n */\r\n language: string;\r\n\r\n /**\r\n * The OS name.\r\n */\r\n os: string;\r\n\r\n /**\r\n * The OS version.\r\n */\r\n osversion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IInternal {\r\n /**\r\n * The SDK version used to create this telemetry item.\r\n */\r\n sdkVersion: string;\r\n\r\n /**\r\n * The SDK agent version.\r\n */\r\n agentVersion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ILocation {\r\n /**\r\n * Client IP address for reverse lookup\r\n */\r\n ip: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IOperation {\r\n /**\r\n * Operation id\r\n */\r\n id: string;\r\n\r\n /**\r\n * Operation name\r\n */\r\n name: string;\r\n\r\n /**\r\n * Parent operation id\r\n */\r\n parentId: string;\r\n\r\n /**\r\n * Root operation id\r\n */\r\n rootId: string;\r\n\r\n /**\r\n * Synthetic source of the operation\r\n */\r\n syntheticSource: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISample {\r\n /**\r\n * Sample rate\r\n */\r\n sampleRate: number;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IUser {\r\n /**\r\n * The telemetry configuration.\r\n */\r\n config: any;\r\n\r\n /**\r\n * The user ID.\r\n */\r\n id: string;\r\n\r\n /**\r\n * Authenticated user id\r\n */\r\n authenticatedId: string;\r\n\r\n /**\r\n * The account ID.\r\n */\r\n accountId: string;\r\n\r\n /**\r\n * The account acquisition date.\r\n */\r\n accountAcquisitionDate: string;\r\n\r\n /**\r\n * The user agent string.\r\n */\r\n agent: string;\r\n\r\n /**\r\n * The store region.\r\n */\r\n storeRegion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISession {\r\n /**\r\n * The session ID.\r\n */\r\n id: string;\r\n\r\n /** \r\n * The true if this is the first session \r\n */\r\n isFirst: boolean;\r\n\r\n /**\r\n * The date at which this guid was genereated.\r\n * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.\r\n */\r\n acquisitionDate: number;\r\n\r\n /**\r\n * The date at which this session ID was last reported.\r\n * This value should be updated whenever telemetry is sent using this ID.\r\n * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.\r\n */\r\n renewalDate: number;\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface ISerializable {\r\n /**\r\n * The set of fields for a serializable object. \r\n * This defines the serialization order and a value of true/false\r\n * for each field defines whether the field is required or not.\r\n */\r\n aiDataContract: any;\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IEnvelope extends ISerializable {\r\n ver: number;\r\n name: string;\r\n time: string;\r\n sampleRate: number;\r\n seq: string;\r\n iKey: string;\r\n tags: { [name: string]: any };\r\n data: any;\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface ITelemetryContext {\r\n /**\r\n * The object describing a component tracked by this object.\r\n */\r\n application: Context.IApplication;\r\n\r\n /**\r\n * The object describing a device tracked by this object.\r\n */\r\n device: Context.IDevice;\r\n\r\n /**\r\n * The object describing internal settings.\r\n */\r\n internal: Context.IInternal;\r\n\r\n /**\r\n * The object describing a location tracked by this object.\r\n */\r\n location: Context.ILocation;\r\n\r\n /**\r\n * The object describing a operation tracked by this object.\r\n */\r\n operation: Context.IOperation;\r\n\r\n /**\r\n * The object describing sampling settings.\r\n */\r\n sample: Context.ISample;\r\n\r\n /**\r\n * The object describing a user tracked by this object.\r\n */\r\n user: Context.IUser;\r\n\r\n /**\r\n * The object describing a session tracked by this object.\r\n */\r\n session: Context.ISession;\r\n\r\n /**\r\n * Adds a telemetry initializer to the collection. Telemetry initializers will be called one by one, \r\n * in the order they were added, before the telemetry item is pushed for sending. \r\n * If one of the telemetry initializers returns false or throws an error then the telemetry item will not be sent. \r\n * If it returns true or doesn't return any value the event will be passed to the next telemetry initializer and\r\n * send to the cloud (if not rejected by other initializers). \r\n */\r\n addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void);\r\n\r\n /**\r\n * Tracks telemetry object.\r\n */\r\n track(envelope: Microsoft.ApplicationInsights.IEnvelope);\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Defines the level of severity for the event.\r\n */\r\n export enum SeverityLevel\r\n {\r\n Verbose = 0,\r\n Information = 1,\r\n Warning = 2,\r\n Error = 3,\r\n Critical = 4,\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n\r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IAppInsights {\r\n\r\n /*\r\n * Config object used to initialize AppInsights\r\n */\r\n config: IConfig;\r\n\r\n context: ITelemetryContext;\r\n\r\n /*\r\n * Initialization queue. Contains functions to run when appInsights initializes\r\n */\r\n queue: Array<() => void>;\r\n\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens. \r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n startTrackPage(name?: string);\r\n\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n stopTrackPage(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /**\r\n * Logs that a page or other item was viewed. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.\r\n */\r\n trackPageView(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, duration?: number);\r\n\r\n /**\r\n * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n startTrackEvent(name: string);\r\n\r\n\r\n /** \r\n * Log an extended event that you started timing with {@link startTrackEvent}.\r\n * @param name The string you used to identify this event in startTrackEvent.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n stopTrackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /** \r\n * Log a user action or other occurrence.\r\n * @param name A string to identify this event in the portal.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n trackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /**\r\n * Log a dependency call\r\n * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id.\r\n * @param method represents request verb (GET, POST, etc.)\r\n * @param absoluteUrl absolute url used to make the dependency request\r\n * @param pathName the path part of the absolute url\r\n * @param totalTime total request time\r\n * @param success indicates if the request was sessessful\r\n * @param resultCode response code returned by the dependency request\r\n */\r\n trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number);\r\n\r\n /**\r\n * Log an exception you have caught.\r\n * @param exception An Error from a catch clause, or the string error message.\r\n * @param handledAt Not used\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel);\r\n\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.\r\n * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the \r\n * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.\r\n * @param name A string that identifies the metric.\r\n * @param average Number representing either a single measurement, or the average of several measurements.\r\n * @param sampleCount The number of measurements represented by the average. Defaults to 1.\r\n * @param min The smallest measurement in the sample. Defaults to the average.\r\n * @param max The largest measurement in the sample. Defaults to the average.\r\n */\r\n trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; });\r\n\r\n /**\r\n * Log a diagnostic message. \r\n * @param message A message string \r\n * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n trackTrace(message: string, properties?: { [name: string]: string; }, severityLevel?: AI.SeverityLevel);\r\n\r\n\r\n /**\r\n * Immediately send all queued telemetry.\r\n * @param {boolean} async - If flush should be call asynchronously\r\n */\r\n flush(async?: boolean);\r\n\r\n\r\n /**\r\n * Sets the autheticated user id and the account id in this session.\r\n * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string);\r\n\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n */\r\n clearAuthenticatedUserContext();\r\n\r\n /*\r\n * Downloads and initializes AppInsights. You can override default script download location by specifying url property of `config`.\r\n */\r\n downloadAndSetup?(config: Microsoft.ApplicationInsights.IConfig): void;\r\n\r\n /**\r\n * The custom error handler for Application Insights\r\n * @param {string} message - The error message\r\n * @param {string} url - The url where the error was raised\r\n * @param {number} lineNumber - The line number where the error was raised\r\n * @param {number} columnNumber - The column number for the line where the error was raised\r\n * @param {Error} error - The Error object\r\n */\r\n _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error);\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n\r\n export enum LoggingSeverity {\r\n /**\r\n * Error will be sent as internal telemetry\r\n */\r\n CRITICAL = 0,\r\n\r\n /**\r\n * Error will NOT be sent as internal telemetry, and will only be shown in browser console\r\n */\r\n WARNING = 1\r\n }\r\n\r\n /**\r\n * Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered\r\n */\r\n export enum _InternalMessageId {\r\n // Non user actionable\r\n BrowserDoesNotSupportLocalStorage,\r\n BrowserCannotReadLocalStorage,\r\n BrowserCannotReadSessionStorage,\r\n BrowserCannotWriteLocalStorage,\r\n BrowserCannotWriteSessionStorage,\r\n BrowserFailedRemovalFromLocalStorage,\r\n BrowserFailedRemovalFromSessionStorage,\r\n CannotSendEmptyTelemetry,\r\n ClientPerformanceMathError,\r\n ErrorParsingAISessionCookie,\r\n ErrorPVCalc,\r\n ExceptionWhileLoggingError,\r\n FailedAddingTelemetryToBuffer,\r\n FailedMonitorAjaxAbort,\r\n FailedMonitorAjaxDur,\r\n FailedMonitorAjaxOpen,\r\n FailedMonitorAjaxRSC,\r\n FailedMonitorAjaxSend,\r\n FailedMonitorAjaxGetCorrelationHeader,\r\n FailedToAddHandlerForOnBeforeUnload,\r\n FailedToSendQueuedTelemetry,\r\n FailedToReportDataLoss,\r\n FlushFailed,\r\n MessageLimitPerPVExceeded,\r\n MissingRequiredFieldSpecification,\r\n NavigationTimingNotSupported,\r\n OnError,\r\n SessionRenewalDateIsZero,\r\n SenderNotInitialized,\r\n StartTrackEventFailed,\r\n StopTrackEventFailed,\r\n StartTrackFailed,\r\n StopTrackFailed,\r\n TelemetrySampledAndNotSent,\r\n TrackEventFailed,\r\n TrackExceptionFailed,\r\n TrackMetricFailed,\r\n TrackPVFailed,\r\n TrackPVFailedCalc,\r\n TrackTraceFailed,\r\n TransmissionFailed,\r\n FailedToSetStorageBuffer,\r\n FailedToRestoreStorageBuffer,\r\n InvalidBackendResponse,\r\n FailedToFixDepricatedValues,\r\n InvalidDurationValue,\r\n\r\n // User actionable\r\n CannotSerializeObject,\r\n CannotSerializeObjectNonSerializable,\r\n CircularReferenceDetected,\r\n ClearAuthContextFailed,\r\n ExceptionTruncated,\r\n IllegalCharsInName,\r\n ItemNotInArray,\r\n MaxAjaxPerPVExceeded,\r\n MessageTruncated,\r\n NameTooLong,\r\n SampleRateOutOfRange,\r\n SetAuthContextFailed,\r\n SetAuthContextFailedAccountName,\r\n StringValueTooLong,\r\n StartCalledMoreThanOnce,\r\n StopCalledWithoutStart,\r\n TelemetryInitializerFailed,\r\n TrackArgumentsNotSpecified,\r\n UrlTooLong,\r\n SessionStorageBufferFull,\r\n CannotAccessCookie,\r\n IdTooLong,\r\n }\r\n\r\n export class _InternalLogMessage {\r\n public message: string;\r\n public messageId: _InternalMessageId;\r\n\r\n /**\r\n * For user non actionable traces use AI Internal prefix.\r\n */\r\n private static AiNonUserActionablePrefix = \"AI (Internal): \";\r\n\r\n /**\r\n * Prefix of the traces in portal.\r\n */\r\n private static AiUserActionablePrefix = \"AI: \";\r\n\r\n constructor(msgId: _InternalMessageId, msg: string, isUserAct = false, properties?: Object) {\r\n\r\n this.messageId = msgId;\r\n this.message =\r\n (isUserAct ? _InternalLogMessage.AiUserActionablePrefix : _InternalLogMessage.AiNonUserActionablePrefix) +\r\n _InternalMessageId[msgId].toString();\r\n\r\n var diagnosticText =\r\n (msg ? \" message:\" + _InternalLogMessage.sanitizeDiagnosticText(msg) : \"\") +\r\n (properties ? \" props:\" + _InternalLogMessage.sanitizeDiagnosticText(JSON.stringify(properties)) : \"\");\r\n\r\n this.message += diagnosticText;\r\n }\r\n\r\n private static sanitizeDiagnosticText(text: string) {\r\n return \"\\\"\" + text.replace(/\\\"/g, \"\") + \"\\\"\";\r\n }\r\n }\r\n\r\n export class _InternalLogging {\r\n\r\n /**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */\r\n private static AIInternalMessagePrefix: string = \"AITR_\";\r\n\r\n /**\r\n * When this is true the SDK will throw exceptions to aid in debugging.\r\n */\r\n public static enableDebugExceptions = () => false;\r\n\r\n /**\r\n * When this is true the SDK will log more messages to aid in debugging.\r\n */\r\n public static verboseLogging = () => false;\r\n\r\n /**\r\n * The internal logging queue\r\n */\r\n public static queue: Array<_InternalLogMessage> = [];\r\n\r\n /**\r\n * The maximum number of internal messages allowed to be sent per page view\r\n */\r\n private static MAX_INTERNAL_MESSAGE_LIMIT = 25;\r\n\r\n /**\r\n * Count of internal messages sent\r\n */\r\n private static _messageCount = 0;\r\n\r\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */\r\n private static _messageLogged: { [type: string]: boolean } = {};\r\n\r\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The log message.\r\n */\r\n public static throwInternal(severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct = false) {\r\n let message = new _InternalLogMessage(msgId, msg, isUserAct, properties);\r\n\r\n if (this.enableDebugExceptions()) {\r\n throw message;\r\n } else {\r\n if (typeof (message) !== \"undefined\" && !!message) {\r\n if (typeof (message.message) !== \"undefined\") {\r\n if (isUserAct) {\r\n // check if this message type was already logged to console for this page view and if so, don't log it again\r\n var messageKey = _InternalMessageId[message.messageId];\r\n\r\n if (!this._messageLogged[messageKey] || this.verboseLogging()) {\r\n this.warnToConsole(message.message);\r\n this._messageLogged[messageKey] = true;\r\n }\r\n } else {\r\n // don't log internal AI traces in the console, unless the verbose logging is enabled\r\n if (this.verboseLogging()) {\r\n this.warnToConsole(message.message);\r\n }\r\n }\r\n\r\n this.logInternalMessage(severity, message);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * This will write a warning to the console if possible\r\n * @param message {string} - The warning message\r\n */\r\n public static warnToConsole(message: string) {\r\n if (typeof console !== \"undefined\" && !!console) {\r\n if (typeof console.warn === \"function\") {\r\n console.warn(message);\r\n } else if (typeof console.log === \"function\") {\r\n console.log(message);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Resets the internal message count\r\n */\r\n public static resetInternalMessageCount(): void {\r\n this._messageCount = 0;\r\n this._messageLogged = {};\r\n }\r\n\r\n /**\r\n * Clears the list of records indicating that internal message type was already logged\r\n */\r\n public static clearInternalMessageLoggedTypes(): void {\r\n if (Util.canUseSessionStorage()) {\r\n var sessionStorageKeys = Util.getSessionStorageKeys();\r\n for (var i = 0; i < sessionStorageKeys.length; i++) {\r\n if (sessionStorageKeys[i].indexOf(_InternalLogging.AIInternalMessagePrefix) === 0) {\r\n Util.removeSessionStorage(sessionStorageKeys[i]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets the limit for the number of internal events before they are throttled\r\n * @param limit {number} - The throttle limit to set for internal events\r\n */\r\n public static setMaxInternalMessageLimit(limit: number): void {\r\n if (!limit) {\r\n throw new Error('limit cannot be undefined.');\r\n }\r\n\r\n this.MAX_INTERNAL_MESSAGE_LIMIT = limit;\r\n }\r\n\r\n /**\r\n * Logs a message to the internal queue.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The message to log.\r\n */\r\n private static logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void {\r\n if (this._areInternalMessagesThrottled()) {\r\n return;\r\n }\r\n\r\n // check if this message type was already logged for this session and if so, don't log it again\r\n var logMessage = true;\r\n var messageKey = _InternalLogging.AIInternalMessagePrefix + _InternalMessageId[message.messageId];\r\n\r\n if (Util.canUseSessionStorage()) {\r\n var internalMessageTypeLogRecord = Util.getSessionStorage(messageKey);\r\n if (internalMessageTypeLogRecord) {\r\n logMessage = false;\r\n } else {\r\n Util.setSessionStorage(messageKey, \"1\");\r\n }\r\n } else {\r\n // if the session storage is not available, limit to only one message type per page view\r\n if (this._messageLogged[messageKey]) {\r\n logMessage = false;\r\n } else {\r\n this._messageLogged[messageKey] = true;\r\n }\r\n }\r\n\r\n if (logMessage) {\r\n // Push the event in the internal queue\r\n if (this.verboseLogging() || severity === LoggingSeverity.CRITICAL) {\r\n this.queue.push(message);\r\n this._messageCount++;\r\n }\r\n\r\n // When throttle limit reached, send a special event\r\n if (this._messageCount == this.MAX_INTERNAL_MESSAGE_LIMIT) {\r\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\r\n var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);\r\n\r\n this.queue.push(throttleMessage);\r\n this.warnToConsole(throttleLimitMessage);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Indicates whether the internal events are throttled\r\n */\r\n private static _areInternalMessagesThrottled(): boolean {\r\n return this._messageCount >= this.MAX_INTERNAL_MESSAGE_LIMIT;\r\n }\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n \"use strict\"\r\n\r\n export class UtilHelpers {\r\n\r\n /**\r\n * generate random id string\r\n */\r\n public static newId() {\r\n var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n var result = \"\";\r\n var random = Math.random() * 1073741824; //5 symbols in base64, almost maxint\r\n\r\n while (random > 0) {\r\n var char = base64chars.charAt(random % 64);\r\n result += char;\r\n random = Math.floor(random / 64);\r\n }\r\n return result;\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n /**\r\n * Type of storage to differentiate between local storage and session storage\r\n */\r\n enum StorageType {\r\n LocalStorage,\r\n SessionStorage\r\n }\r\n\r\n export class Util {\r\n private static document: any = typeof document !== \"undefined\" ? document : {};\r\n private static _canUseCookies: boolean = undefined;\r\n private static _canUseLocalStorage: boolean = undefined;\r\n private static _canUseSessionStorage: boolean = undefined;\r\n // listing only non-geo specific locations\r\n private static _internalEndpoints: string[] = [\r\n \"https://dc.services.visualstudio.com/v2/track\",\r\n \"https://breeze.aimon.applicationinsights.io/v2/track\",\r\n \"https://dc-int.services.visualstudio.com/v2/track\"\r\n ]\r\n public static NotSpecified = \"not_specified\";\r\n\r\n /*\r\n * Force the SDK not to use local and session storage\r\n */\r\n public static disableStorage() {\r\n Util._canUseLocalStorage = false;\r\n Util._canUseSessionStorage = false;\r\n }\r\n\r\n /**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n private static _getLocalStorageObject(): Storage {\r\n if (Util.canUseLocalStorage()) {\r\n return Util._getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */\r\n private static _getVerifiedStorageObject(storageType: StorageType): Storage {\r\n var storage: Storage = null;\r\n var fail: boolean;\r\n var uid;\r\n try {\r\n uid = new Date;\r\n storage = storageType === StorageType.LocalStorage ? window.localStorage : window.sessionStorage;\r\n storage.setItem(uid, uid);\r\n fail = storage.getItem(uid) != uid;\r\n storage.removeItem(uid);\r\n if (fail) {\r\n storage = null;\r\n }\r\n } catch (exception) {\r\n storage = null;\r\n }\r\n\r\n return storage;\r\n }\r\n\r\n /**\r\n * Checks if endpoint URL is application insights internal injestion service URL.\r\n *\r\n * @param endpointUrl Endpoint URL to check.\r\n * @returns {boolean} True if if endpoint URL is application insights internal injestion service URL.\r\n */\r\n public static isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean {\r\n return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;\r\n }\r\n\r\n\r\n /**\r\n * Check if the browser supports local storage.\r\n *\r\n * @returns {boolean} True if local storage is supported.\r\n */\r\n public static canUseLocalStorage(): boolean {\r\n if (Util._canUseLocalStorage === undefined) {\r\n Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n\r\n return Util._canUseLocalStorage;\r\n }\r\n\r\n /**\r\n * Get an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n public static getStorage(name: string): string {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotReadLocalStorage,\r\n \"Browser failed read of local storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Set the contents of an object in the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n public static setStorage(name: string, data: string): boolean {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotWriteLocalStorage,\r\n \"Browser failed write to local storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Remove an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n public static removeStorage(name: string): boolean {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserFailedRemovalFromLocalStorage,\r\n \"Browser failed removal of local storage item. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n private static _getSessionStorageObject(): Storage {\r\n if (Util.canUseSessionStorage()) {\r\n return Util._getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Check if the browser supports session storage.\r\n *\r\n * @returns {boolean} True if session storage is supported.\r\n */\r\n public static canUseSessionStorage(): boolean {\r\n if (Util._canUseSessionStorage === undefined) {\r\n Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n\r\n return Util._canUseSessionStorage;\r\n }\r\n\r\n /**\r\n * Gets the list of session storage keys\r\n *\r\n * @returns {string[]} List of session storage keys\r\n */\r\n public static getSessionStorageKeys(): string[] {\r\n var keys = [];\r\n\r\n if (Util.canUseSessionStorage()) {\r\n for (var key in window.sessionStorage) {\r\n keys.push(key);\r\n }\r\n }\r\n return keys;\r\n }\r\n\r\n /**\r\n * Get an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n public static getSessionStorage(name: string): string {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotReadSessionStorage,\r\n \"Browser failed read of session storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Set the contents of an object in the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n public static setSessionStorage(name: string, data: string): boolean {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotWriteSessionStorage,\r\n \"Browser failed write to session storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Remove an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n public static removeSessionStorage(name: string): boolean {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserFailedRemovalFromSessionStorage,\r\n \"Browser failed removal of session storage item. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /*\r\n * Force the SDK not to store and read any data from cookies\r\n */\r\n public static disableCookies() {\r\n Util._canUseCookies = false;\r\n }\r\n\r\n /*\r\n * helper method to tell if document.cookie object is available\r\n */\r\n public static canUseCookies(): any {\r\n if (Util._canUseCookies === undefined) {\r\n Util._canUseCookies = false;\r\n\r\n try {\r\n Util._canUseCookies = Util.document.cookie !== undefined;\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.CannotAccessCookie,\r\n \"Cannot access document.cookie - \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n };\r\n }\r\n\r\n return Util._canUseCookies;\r\n }\r\n\r\n /**\r\n * helper method to set userId and sessionId cookie\r\n */\r\n public static setCookie(name, value, domain?) {\r\n var domainAttrib = \"\";\r\n var secureAttrib = \"\";\r\n\r\n if (domain) {\r\n domainAttrib = \";domain=\" + domain;\r\n }\r\n\r\n if (Util.document.location && Util.document.location.protocol === \"https:\") {\r\n secureAttrib = \";secure\";\r\n }\r\n\r\n if (Util.canUseCookies()) {\r\n Util.document.cookie = name + \"=\" + value + domainAttrib + \";path=/\" + secureAttrib;\r\n }\r\n }\r\n\r\n public static stringToBoolOrDefault(str: any, defaultValue = false): boolean {\r\n if (str === undefined || str === null) {\r\n return defaultValue;\r\n }\r\n\r\n return str.toString().toLowerCase() === \"true\";\r\n }\r\n\r\n /**\r\n * helper method to access userId and sessionId cookie\r\n */\r\n public static getCookie(name) {\r\n if (!Util.canUseCookies()) {\r\n return;\r\n }\r\n\r\n var value = \"\";\r\n if (name && name.length) {\r\n var cookieName = name + \"=\";\r\n var cookies = Util.document.cookie.split(\";\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var cookie = cookies[i];\r\n cookie = Util.trim(cookie);\r\n if (cookie && cookie.indexOf(cookieName) === 0) {\r\n value = cookie.substring(cookieName.length, cookies[i].length);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /**\r\n * Deletes a cookie by setting it's expiration time in the past.\r\n * @param name - The name of the cookie to delete.\r\n */\r\n public static deleteCookie(name: string) {\r\n if (Util.canUseCookies()) {\r\n // Setting the expiration date in the past immediately removes the cookie\r\n Util.document.cookie = name + \"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\r\n }\r\n }\r\n\r\n /**\r\n * helper method to trim strings (IE8 does not implement String.prototype.trim)\r\n */\r\n public static trim(str: any): string {\r\n if (typeof str !== \"string\") return str;\r\n return str.replace(/^\\s+|\\s+$/g, \"\");\r\n }\r\n\r\n /**\r\n * generate random id string\r\n */\r\n public static newId(): string {\r\n return UtilHelpers.newId();\r\n }\r\n\r\n /**\r\n * Check if an object is of type Array\r\n */\r\n public static isArray(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Array]\";\r\n }\r\n\r\n /**\r\n * Check if an object is of type Error\r\n */\r\n public static isError(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Error]\";\r\n }\r\n\r\n /**\r\n * Check if an object is of type Date\r\n */\r\n public static isDate(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Date]\";\r\n }\r\n\r\n /**\r\n * Convert a date to I.S.O. format in IE8\r\n */\r\n public static toISOStringForIE8(date: Date) {\r\n if (Util.isDate(date)) {\r\n if (Date.prototype.toISOString) {\r\n return date.toISOString();\r\n } else {\r\n const pad = function(number) {\r\n var r = String(number);\r\n if (r.length === 1) {\r\n r = \"0\" + r;\r\n }\r\n\r\n return r;\r\n }\r\n\r\n return date.getUTCFullYear()\r\n + \"-\" + pad(date.getUTCMonth() + 1)\r\n + \"-\" + pad(date.getUTCDate())\r\n + \"T\" + pad(date.getUTCHours())\r\n + \":\" + pad(date.getUTCMinutes())\r\n + \":\" + pad(date.getUTCSeconds())\r\n + \".\" + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)\r\n + \"Z\";\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets IE version if we are running on IE, or null otherwise\r\n */\r\n public static getIEVersion(userAgentStr: string = null): number {\r\n var myNav = userAgentStr ? userAgentStr.toLowerCase() : navigator.userAgent.toLowerCase();\r\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : null;\r\n }\r\n\r\n /**\r\n * Convert ms to c# time span format\r\n */\r\n public static msToTimeSpan(totalms: number): string {\r\n if (isNaN(totalms) || totalms < 0) {\r\n totalms = 0;\r\n }\r\n\r\n totalms = Math.round(totalms);\r\n\r\n var ms = \"\" + totalms % 1000;\r\n var sec = \"\" + Math.floor(totalms / 1000) % 60;\r\n var min = \"\" + Math.floor(totalms / (1000 * 60)) % 60;\r\n var hour = \"\" + Math.floor(totalms / (1000 * 60 * 60)) % 24;\r\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\r\n\r\n ms = ms.length === 1 ? \"00\" + ms : ms.length === 2 ? \"0\" + ms : ms;\r\n sec = sec.length < 2 ? \"0\" + sec : sec;\r\n min = min.length < 2 ? \"0\" + min : min;\r\n hour = hour.length < 2 ? \"0\" + hour : hour;\r\n\r\n return (days > 0 ? days + \".\" : \"\") + hour + \":\" + min + \":\" + sec + \".\" + ms;\r\n }\r\n\r\n /**\t\t\r\n * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error\t\t\r\n * happens in a script from other domain (cross origin, CORS).\t\t\r\n */\r\n public static isCrossOriginError(message: string, url: string, lineNumber: number, columnNumber: number, error: Error): boolean {\r\n return (message === \"Script error.\" || message === \"Script error\") && !error;\r\n }\r\n\r\n /**\r\n * Returns string representation of an object suitable for diagnostics logging.\r\n */\r\n public static dump(object: any): string {\r\n var objectTypeDump: string = Object.prototype.toString.call(object);\r\n var propertyValueDump: string = JSON.stringify(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\r\n }\r\n\r\n return objectTypeDump + propertyValueDump;\r\n }\r\n\r\n /**\r\n * Returns the name of object if it's an Error. Otherwise, returns empty string.\r\n */\r\n public static getExceptionName(object: any): string {\r\n var objectTypeDump: string = Object.prototype.toString.call(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n return object.name;\r\n }\r\n return \"\";\r\n }\r\n\r\n /**\r\n * Adds an event handler for the specified event\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event \r\n * @return {boolean} - true if the handler was successfully added\r\n */\r\n public static addEventHandler(eventName: string, callback: any): boolean {\r\n if (!window || typeof eventName !== 'string' || typeof callback !== 'function') {\r\n return false;\r\n }\r\n\r\n // Create verb for the event\r\n var verbEventName = 'on' + eventName;\r\n\r\n // check if addEventListener is available\r\n if (window.addEventListener) {\r\n window.addEventListener(eventName, callback, false);\r\n } else if (window[\"attachEvent\"]) { // For older browsers\r\n window[\"attachEvent\"](verbEventName, callback);\r\n } else { // if all else fails\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Tells if a browser supports a Beacon API\r\n */\r\n public static IsBeaconApiSupported(): boolean {\r\n return ('sendBeacon' in navigator && (navigator).sendBeacon);\r\n }\r\n }\r\n\r\n export class UrlHelper {\r\n private static document: any = typeof document !== \"undefined\" ? document : {};\r\n private static htmlAnchorElement: HTMLAnchorElement;\r\n\r\n public static parseUrl(url): HTMLAnchorElement {\r\n if (!UrlHelper.htmlAnchorElement) {\r\n UrlHelper.htmlAnchorElement = !!UrlHelper.document.createElement ? UrlHelper.document.createElement('a') : {};\r\n }\r\n\r\n UrlHelper.htmlAnchorElement.href = url;\r\n\r\n return UrlHelper.htmlAnchorElement;\r\n }\r\n\r\n public static getAbsoluteUrl(url): string {\r\n var result: string;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.href;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static getPathName(url): string {\r\n var result: string;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.pathname;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static getCompleteUrl(method: string, absoluteUrl: string) {\r\n if (method) {\r\n return method.toUpperCase() + \" \" + absoluteUrl;\r\n } else {\r\n return absoluteUrl;\r\n }\r\n }\r\n }\r\n\r\n export class CorrelationIdHelper {\r\n public static correlationIdPrefix = \"cid-v1:\";\r\n\r\n /**\r\n * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers\r\n */\r\n public static canIncludeCorrelationHeader(config: IConfig, requestUrl: string, currentHost: string) {\r\n if (config && config.disableCorrelationHeaders) {\r\n return false;\r\n }\r\n\r\n if (!requestUrl) {\r\n return false;\r\n }\r\n\r\n let requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();\r\n if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) {\r\n return false;\r\n }\r\n\r\n let excludedDomains = config && config.correlationHeaderExcludedDomains;\r\n if (!excludedDomains || excludedDomains.length == 0) {\r\n return true;\r\n }\r\n\r\n for (let i = 0; i < excludedDomains.length; i++) {\r\n let regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\./g, \"\\.\").replace(/\\*/g, \".*\"));\r\n if (regex.test(requestHost)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Combines target appId and target role name from response header.\r\n */\r\n public static getCorrelationContext(responseHeader: string) {\r\n if (responseHeader) {\r\n const correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, RequestHeaders.requestContextTargetKey);\r\n if (correlationId && correlationId !== CorrelationIdHelper.correlationIdPrefix) {\r\n return correlationId;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets key from correlation response header\r\n */\r\n public static getCorrelationContextValue(responseHeader: string, key: string) {\r\n if (responseHeader) {\r\n const keyValues = responseHeader.split(\",\");\r\n for (let i = 0; i < keyValues.length; ++i) {\r\n const keyValue = keyValues[i].split(\"=\");\r\n if (keyValue.length == 2 && keyValue[0] == key) {\r\n return keyValue[1];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n /**\r\n * Enum is used in aiDataContract to describe how fields are serialized. \r\n * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array\r\n */\r\n export enum FieldType { Default = 0, Required = 1, Array = 2, Hidden = 4 };\r\n\r\n export class Serializer {\r\n\r\n /**\r\n * Serializes the current object to a JSON string.\r\n */\r\n public static serialize(input: ISerializable): string {\r\n var output = Serializer._serializeObject(input, \"root\");\r\n return JSON.stringify(output);\r\n }\r\n\r\n private static _serializeObject(source: ISerializable, name: string): any {\r\n var circularReferenceCheck = \"__aiCircularRefCheck\";\r\n var output = {};\r\n\r\n if (!source) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, \"cannot serialize object because it is null or undefined\", { name: name }, true);\r\n return output;\r\n }\r\n\r\n if (source[circularReferenceCheck]) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CircularReferenceDetected, \"Circular reference detected while serializing object\", { name: name }, true);\r\n return output;\r\n }\r\n\r\n if (!source.aiDataContract) {\r\n // special case for measurements/properties/tags\r\n if (name === \"measurements\") {\r\n output = Serializer._serializeStringMap(source, \"number\", name);\r\n } else if (name === \"properties\") {\r\n output = Serializer._serializeStringMap(source, \"string\", name);\r\n } else if (name === \"tags\") {\r\n output = Serializer._serializeStringMap(source, \"string\", name);\r\n } else if (Util.isArray(source)) {\r\n output = Serializer._serializeArray(source, name);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, \"Attempting to serialize an object which does not implement ISerializable\", { name: name }, true);\r\n\r\n try {\r\n // verify that the object can be stringified\r\n JSON.stringify(source);\r\n output = source;\r\n } catch (e) {\r\n // if serialization fails return an empty string\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, (e && typeof e.toString === 'function') ? e.toString() : \"Error serializing object\", null, true);\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n \r\n source[circularReferenceCheck] = true;\r\n for (var field in source.aiDataContract) {\r\n\r\n var contract = source.aiDataContract[field];\r\n var isRequired = (typeof contract === \"function\") ? (contract() & FieldType.Required) : (contract & FieldType.Required);\r\n var isHidden = (typeof contract === \"function\") ? (contract() & FieldType.Hidden) : (contract & FieldType.Hidden);\r\n var isArray = contract & FieldType.Array;\r\n\r\n var isPresent = source[field] !== undefined;\r\n var isObject = typeof source[field] === \"object\" && source[field] !== null;\r\n\r\n if (isRequired && !isPresent && !isArray) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MissingRequiredFieldSpecification,\r\n \"Missing required field specification. The field is required but not present on source\",\r\n { field: field, name: name });\r\n\r\n // If not in debug mode, continue and hope the error is permissible\r\n continue;\r\n }\r\n\r\n if (isHidden) {\r\n // Don't serialize hidden fields\r\n continue;\r\n }\r\n\r\n var value;\r\n if (isObject) {\r\n if (isArray) {\r\n // special case; resurse on each object in the source array\r\n value = Serializer._serializeArray(source[field], field);\r\n } else {\r\n // recurse on the source object in this field\r\n value = Serializer._serializeObject(source[field], field);\r\n }\r\n } else {\r\n // assign the source field to the output even if undefined or required\r\n value = source[field];\r\n }\r\n\r\n // only emit this field if the value is defined\r\n if (value !== undefined) {\r\n output[field] = value;\r\n }\r\n }\r\n\r\n delete source[circularReferenceCheck];\r\n return output;\r\n }\r\n\r\n private static _serializeArray(sources: Array, name: string): Array {\r\n var output = undefined;\r\n\r\n if (!!sources) {\r\n if (!Util.isArray(sources)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.ItemNotInArray,\r\n \"This field was specified as an array in the contract but the item is not an array.\\r\\n\",\r\n { name: name }, true);\r\n } else {\r\n output = [];\r\n for (var i = 0; i < sources.length; i++) {\r\n var source = sources[i];\r\n var item = Serializer._serializeObject(source, name + \"[\" + i + \"]\");\r\n output.push(item);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n\r\n private static _serializeStringMap(map, expectedType, name) {\r\n var output = undefined;\r\n if (map) {\r\n output = {};\r\n for (var field in map) {\r\n var value = map[field];\r\n if (expectedType === \"string\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n } else if (value === null) {\r\n output[field] = \"null\";\r\n } else if (!value.toString) {\r\n output[field] = \"invalid field: toString() is not defined.\";\r\n }\r\n else {\r\n output[field] = value.toString();\r\n }\r\n }\r\n else if (expectedType === \"number\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n } else if (value === null) {\r\n output[field] = \"null\";\r\n } else {\r\n var num = parseFloat(value);\r\n if (isNaN(num)) {\r\n output[field] = \"NaN\";\r\n }\r\n else {\r\n output[field] = num;\r\n }\r\n }\r\n }\r\n else {\r\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, output[field], null, true);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class Envelope extends Microsoft.Telemetry.Envelope implements IEnvelope {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract;\r\n\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n constructor(data: Microsoft.Telemetry.Base, name: string) {\r\n super();\r\n\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n this.data = data;\r\n this.time = Util.toISOStringForIE8(new Date());\r\n\r\n this.aiDataContract = {\r\n time: FieldType.Required,\r\n iKey: FieldType.Required,\r\n name: FieldType.Required,\r\n sampleRate: () => {\r\n return (this.sampleRate == 100) ? FieldType.Hidden : FieldType.Required;\r\n },\r\n tags: FieldType.Required,\r\n data: FieldType.Required\r\n };\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n\r\n export class Base extends Microsoft.Telemetry.Base implements ISerializable {\r\n \r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {};\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n export class ContextTagKeys\r\n {\r\n \r\n /**\r\n * Application version. Information in the application context fields is always about the application that is sending the telemetry.\r\n */\r\n public applicationVersion: string;\r\n \r\n /**\r\n * Application build.\r\n */\r\n public applicationBuild: string;\r\n \r\n /**\r\n * Application type id.\r\n */\r\n public applicationTypeId: string;\r\n \r\n /**\r\n * Application id.\r\n */\r\n public applicationId: string;\r\n \r\n /**\r\n * Application layer.\r\n */\r\n public applicationLayer: string;\r\n \r\n /**\r\n * Unique client device id. Computer name in most cases.\r\n */\r\n public deviceId: string;\r\n public deviceIp: string;\r\n public deviceLanguage: string;\r\n \r\n /**\r\n * Device locale using - pattern, following RFC 5646. Example 'en-US'.\r\n */\r\n public deviceLocale: string;\r\n \r\n /**\r\n * Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.\r\n */\r\n public deviceModel: string;\r\n public deviceFriendlyName: string;\r\n public deviceNetwork: string;\r\n public deviceNetworkName: string;\r\n \r\n /**\r\n * Client device OEM name taken from the browser.\r\n */\r\n public deviceOEMName: string;\r\n public deviceOS: string;\r\n \r\n /**\r\n * Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'\r\n */\r\n public deviceOSVersion: string;\r\n \r\n /**\r\n * Name of the instance where application is running. Computer name for on-premisis, instance name for Azure.\r\n */\r\n public deviceRoleInstance: string;\r\n \r\n /**\r\n * Name of the role application is part of. Maps directly to the role name in azure.\r\n */\r\n public deviceRoleName: string;\r\n public deviceScreenResolution: string;\r\n \r\n /**\r\n * The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.\r\n */\r\n public deviceType: string;\r\n public deviceMachineName: string;\r\n public deviceVMName: string;\r\n public deviceBrowser: string;\r\n \r\n /**\r\n * The browser name and version as reported by the browser.\r\n */\r\n public deviceBrowserVersion: string;\r\n \r\n /**\r\n * The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationIp: string;\r\n \r\n /**\r\n * The country of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationCountry: string;\r\n \r\n /**\r\n * The province/state of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationProvince: string;\r\n \r\n /**\r\n * The city of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationCity: string;\r\n \r\n /**\r\n * A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.\r\n */\r\n public operationId: string;\r\n \r\n /**\r\n * The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').\r\n */\r\n public operationName: string;\r\n \r\n /**\r\n * The unique identifier of the telemetry item's immediate parent.\r\n */\r\n public operationParentId: string;\r\n public operationRootId: string;\r\n \r\n /**\r\n * Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.\r\n */\r\n public operationSyntheticSource: string;\r\n \r\n /**\r\n * The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.\r\n */\r\n public operationCorrelationVector: string;\r\n \r\n /**\r\n * Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.\r\n */\r\n public sessionId: string;\r\n \r\n /**\r\n * Boolean value indicating whether the session identified by ai.session.id is first for the user or not.\r\n */\r\n public sessionIsFirst: string;\r\n public sessionIsNew: string;\r\n public userAccountAcquisitionDate: string;\r\n \r\n /**\r\n * In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.\r\n */\r\n public userAccountId: string;\r\n \r\n /**\r\n * The browser's user agent string as reported by the browser. This property will be used to extract informaiton regarding the customer's browser but will not be stored. Use custom properties to store the original user agent.\r\n */\r\n public userAgent: string;\r\n \r\n /**\r\n * Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.\r\n */\r\n public userId: string;\r\n \r\n /**\r\n * Store region for UWP applications.\r\n */\r\n public userStoreRegion: string;\r\n \r\n /**\r\n * Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.\r\n */\r\n public userAuthUserId: string;\r\n public userAnonymousUserAcquisitionDate: string;\r\n public userAuthenticatedUserAcquisitionDate: string;\r\n public cloudName: string;\r\n \r\n /**\r\n * Name of the role the application is a part of. Maps directly to the role name in azure.\r\n */\r\n public cloudRole: string;\r\n public cloudRoleVer: string;\r\n \r\n /**\r\n * Name of the instance where the application is running. Computer name for on-premisis, instance name for Azure.\r\n */\r\n public cloudRoleInstance: string;\r\n public cloudEnvironment: string;\r\n public cloudLocation: string;\r\n public cloudDeploymentUnit: string;\r\n \r\n /**\r\n * SDK version. See https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.\r\n */\r\n public internalSdkVersion: string;\r\n \r\n /**\r\n * Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.\r\n */\r\n public internalAgentVersion: string;\r\n \r\n /**\r\n * This is the node name used for billing purposes. Use it to override the standard detection of nodes.\r\n */\r\n public internalNodeName: string;\r\n \r\n constructor()\r\n {\r\n this.applicationVersion = \"ai.application.ver\";\r\n this.applicationBuild = \"ai.application.build\";\r\n this.applicationTypeId = \"ai.application.typeId\";\r\n this.applicationId = \"ai.application.applicationId\";\r\n this.applicationLayer = \"ai.application.layer\";\r\n this.deviceId = \"ai.device.id\";\r\n this.deviceIp = \"ai.device.ip\";\r\n this.deviceLanguage = \"ai.device.language\";\r\n this.deviceLocale = \"ai.device.locale\";\r\n this.deviceModel = \"ai.device.model\";\r\n this.deviceFriendlyName = \"ai.device.friendlyName\";\r\n this.deviceNetwork = \"ai.device.network\";\r\n this.deviceNetworkName = \"ai.device.networkName\";\r\n this.deviceOEMName = \"ai.device.oemName\";\r\n this.deviceOS = \"ai.device.os\";\r\n this.deviceOSVersion = \"ai.device.osVersion\";\r\n this.deviceRoleInstance = \"ai.device.roleInstance\";\r\n this.deviceRoleName = \"ai.device.roleName\";\r\n this.deviceScreenResolution = \"ai.device.screenResolution\";\r\n this.deviceType = \"ai.device.type\";\r\n this.deviceMachineName = \"ai.device.machineName\";\r\n this.deviceVMName = \"ai.device.vmName\";\r\n this.deviceBrowser = \"ai.device.browser\";\r\n this.deviceBrowserVersion = \"ai.device.browserVersion\";\r\n this.locationIp = \"ai.location.ip\";\r\n this.locationCountry = \"ai.location.country\";\r\n this.locationProvince = \"ai.location.province\";\r\n this.locationCity = \"ai.location.city\";\r\n this.operationId = \"ai.operation.id\";\r\n this.operationName = \"ai.operation.name\";\r\n this.operationParentId = \"ai.operation.parentId\";\r\n this.operationRootId = \"ai.operation.rootId\";\r\n this.operationSyntheticSource = \"ai.operation.syntheticSource\";\r\n this.operationCorrelationVector = \"ai.operation.correlationVector\";\r\n this.sessionId = \"ai.session.id\";\r\n this.sessionIsFirst = \"ai.session.isFirst\";\r\n this.sessionIsNew = \"ai.session.isNew\";\r\n this.userAccountAcquisitionDate = \"ai.user.accountAcquisitionDate\";\r\n this.userAccountId = \"ai.user.accountId\";\r\n this.userAgent = \"ai.user.userAgent\";\r\n this.userId = \"ai.user.id\";\r\n this.userStoreRegion = \"ai.user.storeRegion\";\r\n this.userAuthUserId = \"ai.user.authUserId\";\r\n this.userAnonymousUserAcquisitionDate = \"ai.user.anonUserAcquisitionDate\";\r\n this.userAuthenticatedUserAcquisitionDate = \"ai.user.authUserAcquisitionDate\";\r\n this.cloudName = \"ai.cloud.name\";\r\n this.cloudRole = \"ai.cloud.role\";\r\n this.cloudRoleVer = \"ai.cloud.roleVer\";\r\n this.cloudRoleInstance = \"ai.cloud.roleInstance\";\r\n this.cloudEnvironment = \"ai.cloud.environment\";\r\n this.cloudLocation = \"ai.cloud.location\";\r\n this.cloudDeploymentUnit = \"ai.cloud.deploymentUnit\";\r\n this.internalSdkVersion = \"ai.internal.sdkVersion\";\r\n this.internalAgentVersion = \"ai.internal.agentVersion\";\r\n this.internalNodeName = \"ai.internal.nodeName\";\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Application implements IApplication {\r\n /**\r\n * The application version.\r\n */\r\n public ver: string;\r\n\r\n /**\r\n * The application build version.\r\n */\r\n public build: string;\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Device implements IDevice {\r\n\r\n /**\r\n * The type for the current device.\r\n */\r\n public type: string;\r\n\r\n /**\r\n * A device unique ID.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * The device OEM for the current device.\r\n */\r\n public oemName: string;\r\n\r\n /**\r\n * The device model for the current device.\r\n */\r\n public model: string;\r\n\r\n /**\r\n * The IANA interface type for the internet connected network adapter.\r\n */\r\n public network: number;\r\n\r\n /**\r\n * The application screen resolution.\r\n */\r\n public resolution: string;\r\n\r\n /**\r\n * The current display language of the operating system.\r\n */\r\n public locale: string;\r\n \r\n /**\r\n * The IP address.\r\n */\r\n public ip: string;\r\n\r\n /**\r\n * The device language.\r\n */\r\n public language: string;\r\n\r\n /**\r\n * The OS name.\r\n */\r\n public os: string;\r\n\r\n /**\r\n * The OS version.\r\n */\r\n public osversion: string;\r\n\r\n /**\r\n * Constructs a new instance of the Device class\r\n */\r\n constructor() {\r\n // don't attempt to fingerprint browsers\r\n this.id = \"browser\";\r\n\r\n // Device type is a dimension in our data platform\r\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\r\n this.type = \"Browser\";\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Internal implements IInternal {\r\n\r\n /**\r\n * The SDK version used to create this telemetry item.\r\n */\r\n public sdkVersion: string;\r\n\r\n /**\r\n * The SDK agent version.\r\n */\r\n public agentVersion: string;\r\n\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n constructor(config: ITelemetryConfig) {\r\n this.sdkVersion = (config.sdkExtension() ? config.sdkExtension() + \"_\" : \"\") + \"javascript:\" + Version;\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Location implements ILocation {\r\n\r\n /**\r\n * Client IP address for reverse lookup\r\n */\r\n public ip: string;\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Operation implements IOperation {\r\n\r\n public id: string;\r\n public name: string;\r\n public parentId: string;\r\n public rootId: string;\r\n public syntheticSource: string;\r\n\r\n constructor() {\r\n this.id = Util.newId();\r\n if (window && window.location && window.location.pathname) {\r\n this.name = window.location.pathname;\r\n }\r\n }\r\n }\r\n} ","module Microsoft.ApplicationInsights {\r\n export class HashCodeScoreGenerator {\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n public static INT_MAX_VALUE: number = 2147483647;\r\n\r\n // (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\r\n private static MIN_INPUT_LENGTH: number = 8;\r\n\r\n public getHashCodeScore(key: string): number {\r\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\r\n return score * 100;\r\n }\r\n\r\n public getHashCode(input: string): number {\r\n if (input == \"\") { return 0; }\r\n\r\n while (input.length < HashCodeScoreGenerator.MIN_INPUT_LENGTH) {\r\n input = input.concat(input);\r\n }\r\n\r\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\r\n var hash: number = 5381;\r\n\r\n for (var i: number = 0; i < input.length; ++i) {\r\n hash = ((hash << 5) + hash) + input.charCodeAt(i);\r\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\r\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\r\n hash = hash & hash;\r\n }\r\n\r\n return Math.abs(hash);\r\n }\r\n }\r\n} ","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n export class SamplingScoreGenerator {\r\n private hashCodeGeneragor: HashCodeScoreGenerator;\r\n\r\n constructor() {\r\n this.hashCodeGeneragor = new HashCodeScoreGenerator();\r\n }\r\n\r\n public getSamplingScore(envelope: Microsoft.ApplicationInsights.IEnvelope): number {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n var score: number = 0;\r\n if (envelope.tags[tagKeys.userId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.userId]);\r\n } else if (envelope.tags[tagKeys.operationId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.operationId]);\r\n } else {\r\n score = Math.random()\r\n }\r\n\r\n return score;\r\n }\r\n }\r\n} ","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Sample implements ISample {\r\n public sampleRate: number;\r\n private samplingScoreGenerator: SamplingScoreGenerator;\r\n\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n public INT_MAX_VALUE: number = 2147483647;\r\n\r\n constructor(sampleRate: number) {\r\n if (sampleRate > 100 || sampleRate < 0) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SampleRateOutOfRange,\r\n \"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.\",\r\n { samplingRate: sampleRate }, true);\r\n this.sampleRate = 100;\r\n }\r\n\r\n this.sampleRate = sampleRate;\r\n this.samplingScoreGenerator = new SamplingScoreGenerator();\r\n }\r\n\r\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */\r\n public isSampledIn(envelope: Microsoft.ApplicationInsights.IEnvelope): boolean {\r\n if (this.sampleRate == 100) return true;\r\n\r\n var score = this.samplingScoreGenerator.getSamplingScore(envelope);\r\n\r\n return score < this.sampleRate;\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISessionConfig {\r\n sessionRenewalMs: () => number;\r\n sessionExpirationMs: () => number;\r\n cookieDomain: () => string;\r\n }\r\n\r\n export class Session implements ISession {\r\n /**\r\n * The session ID.\r\n */\r\n public id: string;\r\n\r\n /** \r\n * The true if this is the first session \r\n */\r\n public isFirst: boolean;\r\n\r\n /**\r\n * The date at which this guid was genereated.\r\n * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.\r\n */\r\n public acquisitionDate: number;\r\n\r\n /**\r\n * The date at which this session ID was last reported.\r\n * This value should be updated whenever telemetry is sent using this ID.\r\n * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.\r\n */\r\n public renewalDate: number;\r\n }\r\n\r\n export class _SessionManager {\r\n\r\n public static acquisitionSpan = 86400000; // 24 hours in ms\r\n public static renewalSpan = 1800000; // 30 minutes in ms\r\n public static cookieUpdateInterval = 60000 // 1 minute in ms\r\n public automaticSession: Session;\r\n public config: ISessionConfig;\r\n\r\n private cookieUpdatedTimestamp: number;\r\n\r\n constructor(config: ISessionConfig) {\r\n\r\n if (!config) {\r\n config = {};\r\n }\r\n\r\n if (!(typeof config.sessionExpirationMs === \"function\")) {\r\n config.sessionExpirationMs = () => _SessionManager.acquisitionSpan;\r\n }\r\n\r\n if (!(typeof config.sessionRenewalMs === \"function\")) {\r\n config.sessionRenewalMs = () => _SessionManager.renewalSpan;\r\n }\r\n\r\n this.config = config;\r\n\r\n this.automaticSession = new Session();\r\n }\r\n\r\n public update() {\r\n if (!this.automaticSession.id) {\r\n this.initializeAutomaticSession();\r\n }\r\n\r\n var now = dateTime.Now();\r\n\r\n var acquisitionExpired = now - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs();\r\n var renewalExpired = now - this.automaticSession.renewalDate > this.config.sessionRenewalMs();\r\n\r\n // renew if acquisitionSpan or renewalSpan has ellapsed\r\n if (acquisitionExpired || renewalExpired) {\r\n // update automaticSession so session state has correct id \r\n this.automaticSession.isFirst = undefined;\r\n this.renew();\r\n } else {\r\n // do not update the cookie more often than cookieUpdateInterval\r\n if (!this.cookieUpdatedTimestamp || now - this.cookieUpdatedTimestamp > _SessionManager.cookieUpdateInterval) {\r\n this.automaticSession.renewalDate = now;\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\r\n public backup() {\r\n this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n\r\n /**\r\n * Use ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n */\r\n private initializeAutomaticSession() {\r\n var cookie = Util.getCookie('ai_session');\r\n if (cookie && typeof cookie.split === \"function\") {\r\n this.initializeAutomaticSessionWithData(cookie);\r\n } else {\r\n // There's no cookie, but we might have session data in local storage\r\n // This can happen if the session expired or the user actively deleted the cookie\r\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\r\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\r\n var storage = Util.getStorage('ai_session');\r\n if (storage) {\r\n this.initializeAutomaticSessionWithData(storage);\r\n }\r\n }\r\n\r\n if (!this.automaticSession.id) {\r\n this.automaticSession.isFirst = true;\r\n this.renew();\r\n }\r\n }\r\n\r\n /**\r\n * Extract id, aquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param {string} sessionData - The string stored in an ai_session cookie or local storage backup\r\n */\r\n private initializeAutomaticSessionWithData(sessionData: string) {\r\n var params = sessionData.split(\"|\");\r\n\r\n if (params.length > 0) {\r\n this.automaticSession.id = params[0];\r\n }\r\n\r\n try {\r\n if (params.length > 1) {\r\n var acq = +params[1];\r\n this.automaticSession.acquisitionDate = +new Date(acq);\r\n this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0;\r\n }\r\n\r\n if (params.length > 2) {\r\n var renewal = +params[2];\r\n this.automaticSession.renewalDate = +new Date(renewal);\r\n this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0;\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n\r\n _InternalMessageId.ErrorParsingAISessionCookie,\r\n \"Error parsing ai_session cookie, session will be reset: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n\r\n if (this.automaticSession.renewalDate == 0) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SessionRenewalDateIsZero,\r\n \"AI session renewal date is 0, session will be reset.\");\r\n }\r\n }\r\n\r\n private renew() {\r\n var now = dateTime.Now();\r\n\r\n this.automaticSession.id = Util.newId();\r\n this.automaticSession.acquisitionDate = now;\r\n this.automaticSession.renewalDate = now;\r\n\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n\r\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\r\n if (!Util.canUseLocalStorage()) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserDoesNotSupportLocalStorage,\r\n \"Browser does not support local storage. Session durations will be inaccurate.\");\r\n }\r\n }\r\n\r\n private setCookie(guid: string, acq: number, renewal: number) {\r\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\r\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\r\n var acquisitionExpiry = acq + this.config.sessionExpirationMs();\r\n var renewalExpiry = renewal + this.config.sessionRenewalMs();\r\n var cookieExpiry = new Date();\r\n var cookie = [guid, acq, renewal];\r\n\r\n if (acquisitionExpiry < renewalExpiry) {\r\n cookieExpiry.setTime(acquisitionExpiry);\r\n } else {\r\n cookieExpiry.setTime(renewalExpiry);\r\n }\r\n\r\n var cookieDomnain = this.config.cookieDomain ? this.config.cookieDomain() : null;\r\n\r\n Util.setCookie('ai_session', cookie.join('|') + ';expires=' + cookieExpiry.toUTCString(), cookieDomnain);\r\n\r\n this.cookieUpdatedTimestamp = dateTime.Now();\r\n }\r\n\r\n private setStorage(guid: string, acq: number, renewal: number) {\r\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\r\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\r\n // The server will notice this and end the sessions itself, with loss of accurate session duration\r\n Util.setStorage('ai_session', [guid, acq, renewal].join('|'));\r\n }\r\n }\r\n} ","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class User implements IUser {\r\n\r\n static cookieSeparator: string = '|';\r\n static userCookieName: string = 'ai_user';\r\n static authUserCookieName: string = 'ai_authUser';\r\n\r\n /**\r\n * The telemetry configuration.\r\n */\r\n public config: ITelemetryConfig;\r\n\r\n /**\r\n * The user ID.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * Authenticated user id\r\n */\r\n public authenticatedId: string;\r\n\r\n /**\r\n * The account ID.\r\n */\r\n public accountId: string;\r\n\r\n /**\r\n * The account acquisition date.\r\n */\r\n public accountAcquisitionDate: string;\r\n\r\n /**\r\n * The user agent string.\r\n */\r\n public agent: string;\r\n\r\n /**\r\n * The store region.\r\n */\r\n public storeRegion: string;\r\n\r\n /**\r\n * Sets the authenticated user id and the account id in this session.\r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false) {\r\n\r\n // Validate inputs to ensure no cookie control characters.\r\n var isInvalidInput = !this.validateUserInput(authenticatedUserId) || (accountId && !this.validateUserInput(accountId));\r\n if (isInvalidInput) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailedAccountName,\r\n \"Setting auth user context failed. \" +\r\n \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\",\r\n true);\r\n return;\r\n }\r\n\r\n // Create cookie string.\r\n this.authenticatedId = authenticatedUserId;\r\n var authCookie = this.authenticatedId;\r\n if (accountId) {\r\n this.accountId = accountId;\r\n authCookie = [this.authenticatedId, this.accountId].join(User.cookieSeparator);\r\n }\r\n\r\n if (storeInCookie) {\r\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\r\n // Encoding the cookie to handle unexpected unicode characters.\r\n Util.setCookie(User.authUserCookieName, encodeURI(authCookie), this.config.cookieDomain());\r\n }\r\n }\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {} \r\n */\r\n public clearAuthenticatedUserContext() {\r\n this.authenticatedId = null;\r\n this.accountId = null;\r\n Util.deleteCookie(User.authUserCookieName);\r\n }\r\n\r\n constructor(config: ITelemetryConfig) {\r\n\r\n //get userId or create new one if none exists\r\n var cookie = Util.getCookie(User.userCookieName);\r\n if (cookie) {\r\n var params = cookie.split(User.cookieSeparator);\r\n if (params.length > 0) {\r\n this.id = params[0];\r\n }\r\n }\r\n\r\n this.config = config;\r\n\r\n if (!this.id) {\r\n this.id = Util.newId();\r\n var date = new Date();\r\n var acqStr = Util.toISOStringForIE8(date);\r\n this.accountAcquisitionDate = acqStr;\r\n // without expiration, cookies expire at the end of the session\r\n // set it to 365 days from now\r\n // 365 * 24 * 60 * 60 * 1000 = 31536000000 \r\n date.setTime(date.getTime() + 31536000000);\r\n var newCookie = [this.id, acqStr];\r\n var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : undefined;\r\n\r\n Util.setCookie(User.userCookieName, newCookie.join(User.cookieSeparator) + ';expires=' + date.toUTCString(), cookieDomain);\r\n\r\n // If we have an ai_session in local storage this means the user actively removed our cookies.\r\n // We should respect their wishes and clear ourselves from local storage\r\n Util.removeStorage('ai_session');\r\n }\r\n\r\n // We still take the account id from the ctor param for backward compatibility. \r\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\r\n this.accountId = config.accountId ? config.accountId() : undefined;\r\n\r\n // Get the auth user id and account id from the cookie if exists\r\n // Cookie is in the pattern: |\r\n var authCookie = Util.getCookie(User.authUserCookieName);\r\n if (authCookie) {\r\n authCookie = decodeURI(authCookie);\r\n var authCookieString = authCookie.split(User.cookieSeparator);\r\n if (authCookieString[0]) {\r\n this.authenticatedId = authCookieString[0];\r\n }\r\n if (authCookieString.length > 1 && authCookieString[1]) {\r\n this.accountId = authCookieString[1];\r\n }\r\n }\r\n }\r\n\r\n private validateUserInput(id: string): boolean {\r\n // Validate:\r\n // 1. Id is a non-empty string.\r\n // 2. It does not contain special characters for cookies.\r\n if (typeof id !== 'string' ||\r\n !id ||\r\n id.match(/,|;|=| |\\|/)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class extensions {\r\n public static IsNullOrUndefined(obj) {\r\n return typeof (obj) === \"undefined\" || obj === null;\r\n }\r\n }\r\n\r\n export class stringUtils {\r\n public static GetLength(strObject) {\r\n var res = 0;\r\n if (!extensions.IsNullOrUndefined(strObject)) {\r\n var stringified = \"\";\r\n try {\r\n stringified = strObject.toString();\r\n } catch (ex) {\r\n // some troubles with complex object\r\n }\r\n\r\n res = stringified.length;\r\n res = isNaN(res) ? 0 : res;\r\n }\r\n\r\n return res;\r\n }\r\n }\r\n\r\n export class dateTime {\r\n ///Return the number of milliseconds since 1970/01/01 in local timezon\r\n public static Now = (window.performance && window.performance.now && window.performance.timing) ?\r\n function () {\r\n return window.performance.now() + window.performance.timing.navigationStart;\r\n }\r\n :\r\n function () {\r\n return new Date().getTime();\r\n }\r\n\r\n ///Gets duration between two timestamps\r\n public static GetDuration = function (start: number, end: number): number {\r\n var result = null;\r\n if (start !== 0 && end !== 0 && !extensions.IsNullOrUndefined(start) && !extensions.IsNullOrUndefined(end)) {\r\n result = end - start;\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n export class EventHelper {\r\n ///Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n ///Object to which \r\n ///String that specifies any of the standard DHTML Events without \"on\" prefix\r\n ///Pointer that specifies the function to call when event fires\r\n ///True if the function was bound successfully to the event, otherwise false\r\n public static AttachEvent(obj, eventNameWithoutOn, handlerRef) {\r\n var result = false;\r\n if (!extensions.IsNullOrUndefined(obj)) {\r\n if (!extensions.IsNullOrUndefined(obj.attachEvent)) {\r\n // IE before version 9 \r\n obj.attachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n result = true;\r\n }\r\n else {\r\n if (!extensions.IsNullOrUndefined(obj.addEventListener)) {\r\n // all browsers except IE before version 9\r\n obj.addEventListener(eventNameWithoutOn, handlerRef, false);\r\n result = true;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static DetachEvent(obj, eventNameWithoutOn, handlerRef) {\r\n if (!extensions.IsNullOrUndefined(obj)) {\r\n if (!extensions.IsNullOrUndefined(obj.detachEvent)) {\r\n obj.detachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n }\r\n else {\r\n if (!extensions.IsNullOrUndefined(obj.removeEventListener)) {\r\n obj.removeEventListener(eventNameWithoutOn, handlerRef, false);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class AjaxHelper {\r\n public static ParseDependencyPath(absoluteUrl: string, method: string, pathName: string) {\r\n var target, name; \r\n if (absoluteUrl && absoluteUrl.length > 0) {\r\n var parsedUrl: HTMLAnchorElement = UrlHelper.parseUrl(absoluteUrl)\r\n target = parsedUrl.host;\r\n if (parsedUrl.pathname != null) {\r\n var pathName: string = (parsedUrl.pathname.length === 0) ? \"/\" : parsedUrl.pathname;\r\n if (pathName.charAt(0) !== '/') {\r\n pathName = \"/\" + pathName;\r\n }\r\n\r\n name = Telemetry.Common.DataSanitizer.sanitizeString(method ? method + \" \" + pathName : pathName);\r\n } else {\r\n name = Telemetry.Common.DataSanitizer.sanitizeString(absoluteUrl);\r\n }\r\n } else {\r\n target = pathName;\r\n name = pathName;\r\n }\r\n\r\n return {\r\n target: target, \r\n name: name\r\n };\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class XHRMonitoringState {\r\n public openDone: boolean = false;\r\n public setRequestHeaderDone: boolean = false;\r\n public sendDone: boolean = false;\r\n public abortDone: boolean = false;\r\n\r\n //True, if onreadyStateChangeCallback function attached to xhr, otherwise false\r\n public onreadystatechangeCallbackAttached = false;\r\n }\r\n\r\n export class ajaxRecord {\r\n public completed = false;\r\n public requestHeadersSize = null;\r\n public ttfb = null;\r\n public responseReceivingDuration = null;\r\n public callbackDuration = null;\r\n public ajaxTotalDuration = null;\r\n public aborted = null;\r\n public pageUrl = null;\r\n public requestUrl = null;\r\n public requestSize = 0;\r\n public method = null;\r\n\r\n ///Returns the HTTP status code.\r\n public status = null; \r\n \r\n //The timestamp when open method was invoked\r\n public requestSentTime = null;\r\n\r\n //The timestamps when first byte was received\r\n public responseStartedTime = null;\r\n\r\n //The timestamp when last byte was received\r\n public responseFinishedTime = null;\r\n\r\n //The timestamp when onreadystatechange callback in readyState 4 finished\r\n public callbackFinishedTime = null;\r\n \r\n //The timestamp at which ajax was ended\r\n public endTime = null;\r\n\r\n //The original xhr onreadystatechange event\r\n public originalOnreadystatechage = null;\r\n\r\n public xhrMonitoringState: XHRMonitoringState = new XHRMonitoringState();\r\n\r\n //Determines whether or not JavaScript exception occured in xhr.onreadystatechange code. 1 if occured, otherwise 0.\r\n public clientFailure = 0;\r\n\r\n\r\n public id: string;\r\n\r\n constructor(id: string) {\r\n this.id = id;\r\n }\r\n\r\n\r\n public getAbsoluteUrl() {\r\n return this.requestUrl ? UrlHelper.getAbsoluteUrl(this.requestUrl) : null;\r\n }\r\n\r\n public getPathName() {\r\n return this.requestUrl ? Telemetry.Common.DataSanitizer.sanitizeUrl(UrlHelper.getCompleteUrl(this.method, this.requestUrl)): null;\r\n }\r\n\r\n public CalculateMetrics = function () {\r\n var self = this;\r\n // round to 3 decimal points\r\n self.ajaxTotalDuration = Math.round(dateTime.GetDuration(self.requestSentTime, self.responseFinishedTime)*1000)/1000;\r\n }\r\n };\r\n}; \r\n\r\n","module Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class RequestHeaders {\r\n /**\r\n * Request-Context header\r\n */\r\n public static requestContextHeader = \"Request-Context\";\r\n\r\n /**\r\n * Target instrumentation header that is added to the response and retrieved by the\r\n * calling application when processing incoming responses.\r\n */\r\n public static requestContextTargetKey = \"appId\";\r\n\r\n /**\r\n * Request-Context appId format\r\n */\r\n public static requestContextAppIdFormat = \"appId=cid-v1:\";\r\n\r\n /**\r\n * Request-Id header\r\n */\r\n public static requestIdHeader = \"Request-Id\";\r\n\r\n /**\r\n * Sdk-Context header\r\n * If this header passed with appId in content then appId will be returned back by the backend.\r\n */\r\n public static sdkContextHeader = \"Sdk-Context\";\r\n\r\n /**\r\n * String to pass in header for requesting appId back from the backend.\r\n */\r\n public static sdkContextHeaderAppIdRequest = \"appId\";\r\n\r\n public static requestContextHeaderLowerCase = \"request-context\";\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * The abstract common base of all domains.\r\n */\r\n export class Domain\r\n {\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.\r\n */\r\n export class EventData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.\r\n */\r\n export class PageViewData extends AI.EventData\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Request URL with all query string parameters\r\n */\r\n public url: string;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Identifier of a page view instance. Used for correlation between page view and other telemetry items.\r\n */\r\n public id: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.\r\n */\r\n export class RemoteDependencyData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call.\r\n */\r\n public id: string;\r\n \r\n /**\r\n * Result code of a dependency call. Examples are SQL error code and HTTP status code.\r\n */\r\n public resultCode: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Indication of successfull or unsuccessfull call.\r\n */\r\n public success: boolean;\r\n \r\n /**\r\n * Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.\r\n */\r\n public data: string;\r\n \r\n /**\r\n * Target site of a dependency call. Examples are server name, host address.\r\n */\r\n public target: string;\r\n \r\n /**\r\n * Dependency type name. Very low cardinality value for logical grouping of dependencies and interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP.\r\n */\r\n public type: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.success = true;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n\r\n export class DataSanitizer {\r\n\r\n /**\r\n * Max length allowed for custom names.\r\n */\r\n private static MAX_NAME_LENGTH = 150;\r\n\r\n /**\r\n * Max length allowed for Id field in page views.\r\n */\r\n private static MAX_ID_LENGTH = 128;\r\n\r\n /**\r\n * Max length allowed for custom values.\r\n */\r\n private static MAX_PROPERTY_LENGTH = 8192;\r\n\r\n /**\r\n * Max length allowed for names\r\n */\r\n private static MAX_STRING_LENGTH = 1024;\r\n\r\n /**\r\n * Max length allowed for url.\r\n */\r\n private static MAX_URL_LENGTH = 2048;\r\n\r\n /**\r\n * Max length allowed for messages.\r\n */\r\n private static MAX_MESSAGE_LENGTH = 32768;\r\n\r\n /**\r\n * Max length allowed for exceptions.\r\n */\r\n private static MAX_EXCEPTION_LENGTH = 32768;\r\n\r\n public static sanitizeKeyAndAddUniqueness(key, map) {\r\n var origLength = key.length;\r\n var field = DataSanitizer.sanitizeKey(key);\r\n\r\n // validation truncated the length. We need to add uniqueness\r\n if (field.length !== origLength) {\r\n var i = 0;\r\n var uniqueField = field;\r\n while (map[uniqueField] !== undefined) {\r\n i++;\r\n uniqueField = field.substring(0, DataSanitizer.MAX_NAME_LENGTH - 3) + DataSanitizer.padNumber(i);\r\n }\r\n field = uniqueField;\r\n }\r\n return field;\r\n }\r\n\r\n public static sanitizeKey(name) {\r\n if (name) {\r\n // Remove any leading or trailing whitepace\r\n name = Util.trim(name.toString());\r\n\r\n // truncate the string to 150 chars\r\n if (name.length > DataSanitizer.MAX_NAME_LENGTH) {\r\n name = name.substring(0, DataSanitizer.MAX_NAME_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.NameTooLong,\r\n \"name is too long. It has been truncated to \" + DataSanitizer.MAX_NAME_LENGTH + \" characters.\",\r\n { name: name }, true);\r\n }\r\n }\r\n\r\n return name;\r\n }\r\n\r\n public static sanitizeString(value, maxLength: number = DataSanitizer.MAX_STRING_LENGTH) {\r\n if (value) {\r\n maxLength = maxLength ? maxLength: DataSanitizer.MAX_STRING_LENGTH; // in case default parameters dont work\r\n value = Util.trim(value);\r\n if (value.toString().length > maxLength) {\r\n value = value.toString().substring(0, maxLength);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.StringValueTooLong,\r\n \"string value is too long. It has been truncated to \" + maxLength + \" characters.\",\r\n { value: value }, true);\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n public static sanitizeUrl(url) {\r\n return DataSanitizer.sanitizeInput(url, DataSanitizer.MAX_URL_LENGTH, _InternalMessageId.UrlTooLong);\r\n }\r\n\r\n public static sanitizeMessage(message) {\r\n if (message) {\r\n if (message.length > DataSanitizer.MAX_MESSAGE_LENGTH) {\r\n message = message.substring(0, DataSanitizer.MAX_MESSAGE_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated,\r\n \"message is too long, it has been truncated to \" + DataSanitizer.MAX_MESSAGE_LENGTH + \" characters.\",\r\n { message: message },\r\n true);\r\n }\r\n }\r\n\r\n return message;\r\n }\r\n\r\n public static sanitizeException(exception) {\r\n if (exception) {\r\n if (exception.length > DataSanitizer.MAX_EXCEPTION_LENGTH) {\r\n exception = exception.substring(0, DataSanitizer.MAX_EXCEPTION_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, \"exception is too long, it has been truncated to \" + DataSanitizer.MAX_EXCEPTION_LENGTH + \" characters.\",\r\n { exception: exception }, true);\r\n }\r\n }\r\n\r\n return exception;\r\n }\r\n\r\n public static sanitizeProperties(properties) {\r\n if (properties) {\r\n var tempProps = {};\r\n for (var prop in properties) {\r\n var value = DataSanitizer.sanitizeString(properties[prop], DataSanitizer.MAX_PROPERTY_LENGTH);\r\n prop = DataSanitizer.sanitizeKeyAndAddUniqueness(prop, tempProps);\r\n tempProps[prop] = value;\r\n }\r\n properties = tempProps;\r\n }\r\n\r\n return properties;\r\n }\r\n\r\n public static sanitizeMeasurements(measurements) {\r\n if (measurements) {\r\n var tempMeasurements = {};\r\n for (var measure in measurements) {\r\n var value = measurements[measure];\r\n measure = DataSanitizer.sanitizeKeyAndAddUniqueness(measure, tempMeasurements);\r\n tempMeasurements[measure] = value;\r\n }\r\n measurements = tempMeasurements;\r\n }\r\n\r\n return measurements;\r\n }\r\n\r\n public static sanitizeId(id: string): string {\r\n return id ? DataSanitizer.sanitizeInput(id, DataSanitizer.MAX_ID_LENGTH, _InternalMessageId.IdTooLong).toString() : id;\r\n }\r\n\r\n public static sanitizeInput(input: any, maxLength: number, _msgId: _InternalMessageId) {\r\n if (input) {\r\n input = Util.trim(input);\r\n if (input.length > maxLength) {\r\n input = input.substring(0, maxLength);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _msgId,\r\n \"input is too long, it has been truncated to \" + maxLength + \" characters.\",\r\n { data: input },\r\n true);\r\n }\r\n }\r\n\r\n return input;\r\n }\r\n\r\n public static padNumber(num) {\r\n var s = \"00\" + num;\r\n return s.substr(s.length - 3);\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class RemoteDependencyData extends AI.RemoteDependencyData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\r\n public static dataType = \"RemoteDependencyData\";\r\n\r\n public aiDataContract = {\r\n id: FieldType.Required,\r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n resultCode: FieldType.Default,\r\n duration: FieldType.Default,\r\n success: FieldType.Default,\r\n data: FieldType.Default,\r\n target: FieldType.Default,\r\n type: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default,\r\n\r\n kind: FieldType.Default,\r\n value: FieldType.Default,\r\n count: FieldType.Default,\r\n min: FieldType.Default,\r\n max: FieldType.Default,\r\n stdDev: FieldType.Default,\r\n dependencyKind: FieldType.Default,\r\n dependencySource: FieldType.Default,\r\n commandName: FieldType.Default,\r\n dependencyTypeName: FieldType.Default,\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\r\n constructor(id: string, absoluteUrl: string, commandName: string, value: number, success: boolean, resultCode: number, method?: string, properties?: Object, measurements?: Object) {\r\n super();\r\n\r\n this.id = id;\r\n\r\n this.duration = Util.msToTimeSpan(value);\r\n this.success = success;\r\n this.resultCode = resultCode + \"\";\r\n\r\n this.type = \"Ajax\";\r\n this.data = Common.DataSanitizer.sanitizeUrl(commandName);\r\n\r\n var dependencyFields = AjaxHelper.ParseDependencyPath(absoluteUrl, method, commandName);\r\n this.target = dependencyFields.target;\r\n this.name = dependencyFields.name;\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface XMLHttpRequestInstrumented extends XMLHttpRequest {\r\n ajaxData: ajaxRecord;\r\n }\r\n\r\n export class AjaxMonitor {\r\n private appInsights: AppInsights;\r\n private initialized: boolean;\r\n private static instrumentedByAppInsightsName = \"InstrumentedByAppInsights\";\r\n private currentWindowHost;\r\n\r\n constructor(appInsights: Microsoft.ApplicationInsights.AppInsights) {\r\n this.currentWindowHost = window.location.host && window.location.host.toLowerCase();\r\n this.appInsights = appInsights;\r\n this.initialized = false;\r\n this.Init();\r\n }\r\n\r\n ///The main function that needs to be called in order to start Ajax Monitoring\r\n private Init() {\r\n if (this.supportsMonitoring()) {\r\n this.instrumentOpen();\r\n this.instrumentSend();\r\n this.instrumentAbort();\r\n this.initialized = true;\r\n }\r\n }\r\n\r\n\r\n ///Function that returns property name which will identify that monitoring for given instance of XmlHttpRequest is disabled\r\n public static DisabledPropertyName: string = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\n\r\n ///Verifies that particalar instance of XMLHttpRequest needs to be monitored\r\n ///Optional parameter. True if ajaxData must be excluded from verification\r\n ///True if instance needs to be monitored, otherwise false\r\n private isMonitoredInstance(xhr: XMLHttpRequestInstrumented, excludeAjaxDataValidation?: boolean): boolean {\r\n\r\n // checking to see that all interested functions on xhr were instrumented\r\n return this.initialized\r\n\r\n // checking on ajaxData to see that it was not removed in user code\r\n && (excludeAjaxDataValidation === true || !extensions.IsNullOrUndefined(xhr.ajaxData))\r\n\r\n // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\r\n && xhr[AjaxMonitor.DisabledPropertyName] !== true;\r\n\r\n }\r\n\r\n ///Determines whether ajax monitoring can be enabled on this document\r\n ///True if Ajax monitoring is supported on this page, otherwise false\r\n private supportsMonitoring(): boolean {\r\n var result = true;\r\n if (extensions.IsNullOrUndefined(XMLHttpRequest) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort)) {\r\n result = false;\r\n }\r\n\r\n // disable in IE8 or older (https://www.w3schools.com/jsref/jsref_trim_string.asp)\r\n try {\r\n \" a \".trim();\r\n } catch (ex) {\r\n result = false;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private instrumentOpen() {\r\n var originalOpen = XMLHttpRequest.prototype.open;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.open = function (method, url, async) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this, true) &&\r\n (\r\n !(this).ajaxData ||\r\n !(this).ajaxData.xhrMonitoringState.openDone\r\n )) {\r\n ajaxMonitorInstance.openHandler(this, method, url, async);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxOpen,\r\n \"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalOpen.apply(this, arguments);\r\n };\r\n }\r\n\r\n private openHandler(xhr: XMLHttpRequestInstrumented, method, url, async) {\r\n // this format corresponds with activity logic on server-side and is required for the correct correlation\r\n var id = \"|\" + this.appInsights.context.operation.id + \".\" + Util.newId();\r\n\r\n var ajaxData = new ajaxRecord(id);\r\n ajaxData.method = method;\r\n ajaxData.requestUrl = url;\r\n ajaxData.xhrMonitoringState.openDone = true\r\n xhr.ajaxData = ajaxData;\r\n\r\n this.attachToOnReadyStateChange(xhr);\r\n }\r\n\r\n private static getFailedAjaxDiagnosticsMessage(xhr: XMLHttpRequestInstrumented): string {\r\n var result = \"\";\r\n try {\r\n if (!extensions.IsNullOrUndefined(xhr) &&\r\n !extensions.IsNullOrUndefined(xhr.ajaxData) &&\r\n !extensions.IsNullOrUndefined(xhr.ajaxData.requestUrl)) {\r\n result += \"(url: '\" + xhr.ajaxData.requestUrl + \"')\";\r\n }\r\n } catch (e) { }\r\n\r\n return result;\r\n }\r\n\r\n private instrumentSend() {\r\n var originalSend = XMLHttpRequest.prototype.send;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.send = function (content) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !(this).ajaxData.xhrMonitoringState.sendDone) {\r\n ajaxMonitorInstance.sendHandler(this, content);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxSend,\r\n \"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalSend.apply(this, arguments);\r\n };\r\n }\r\n\r\n private sendHandler(xhr: XMLHttpRequestInstrumented, content) {\r\n xhr.ajaxData.requestSentTime = dateTime.Now();\r\n\r\n if (CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, xhr.ajaxData.getAbsoluteUrl(), \r\n this.currentWindowHost)) {\r\n xhr.setRequestHeader(RequestHeaders.requestIdHeader, xhr.ajaxData.id);\r\n if (this.appInsights.context) {\r\n var appId = this.appInsights.context.appId();\r\n if (appId) {\r\n xhr.setRequestHeader(RequestHeaders.requestContextHeader, RequestHeaders.requestContextAppIdFormat + appId);\r\n }\r\n }\r\n }\r\n xhr.ajaxData.xhrMonitoringState.sendDone = true;\r\n }\r\n\r\n private instrumentAbort() {\r\n var originalAbort = XMLHttpRequest.prototype.abort;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.abort = function () {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !(this).ajaxData.xhrMonitoringState.abortDone) {\r\n (this).ajaxData.aborted = 1;\r\n (this).ajaxData.xhrMonitoringState.abortDone = true;\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxAbort,\r\n \"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalAbort.apply(this, arguments);\r\n };\r\n }\r\n\r\n private attachToOnReadyStateChange(xhr: XMLHttpRequestInstrumented) {\r\n var ajaxMonitorInstance = this;\r\n xhr.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached = EventHelper.AttachEvent(xhr, \"readystatechange\", () => {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(xhr)) {\r\n if (xhr.readyState === 4) {\r\n ajaxMonitorInstance.onAjaxComplete(xhr);\r\n }\r\n }\r\n } catch (e) {\r\n var exceptionText = Microsoft.ApplicationInsights.Util.dump(e);\r\n\r\n // ignore messages with c00c023f, as this a known IE9 XHR abort issue\r\n if (!exceptionText || exceptionText.toLowerCase().indexOf(\"c00c023f\") == -1) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxRSC,\r\n \"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n private onAjaxComplete(xhr: XMLHttpRequestInstrumented) {\r\n xhr.ajaxData.responseFinishedTime = dateTime.Now();\r\n xhr.ajaxData.status = xhr.status;\r\n xhr.ajaxData.CalculateMetrics();\r\n \r\n if (xhr.ajaxData.ajaxTotalDuration < 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxDur,\r\n \"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n requestSentTime: xhr.ajaxData.requestSentTime,\r\n responseFinishedTime: xhr.ajaxData.responseFinishedTime\r\n });\r\n }\r\n else {\r\n var dependency = new Telemetry.RemoteDependencyData(\r\n xhr.ajaxData.id, \r\n xhr.ajaxData.getAbsoluteUrl(), \r\n xhr.ajaxData.getPathName(), \r\n xhr.ajaxData.ajaxTotalDuration, \r\n (+(xhr.ajaxData.status)) >= 200 && (+(xhr.ajaxData.status)) < 400, \r\n +xhr.ajaxData.status, \r\n xhr.ajaxData.method); \r\n\r\n // enrich dependency target with correlation context from the server\r\n var correlationContext = this.getCorrelationContext(xhr);\r\n if (correlationContext) {\r\n dependency.target = dependency.target + \" | \" + correlationContext;\r\n }\r\n \r\n this.appInsights.trackDependencyData(dependency);\r\n\r\n xhr.ajaxData = null;\r\n }\r\n }\r\n\r\n private getCorrelationContext(xhr: XMLHttpRequestInstrumented) {\r\n try {\r\n var responseHeadersString = xhr.getAllResponseHeaders();\r\n if (responseHeadersString !== null) {\r\n var index = responseHeadersString.toLowerCase().indexOf(RequestHeaders.requestContextHeaderLowerCase);\r\n if (index !== -1) {\r\n var responseHeader = xhr.getResponseHeader(RequestHeaders.requestContextHeader);\r\n return CorrelationIdHelper.getCorrelationContext(responseHeader);\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n } \r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ISendBuffer {\r\n /**\r\n * Enqueue the payload\r\n */\r\n enqueue: (payload: string) => void;\r\n\r\n /**\r\n * Returns the number of elements in the buffer\r\n */\r\n count: () => number;\r\n\r\n /**\r\n * Clears the buffer\r\n */\r\n clear: () => void;\r\n\r\n /**\r\n * Returns items stored in the buffer\r\n */\r\n getItems: () => string[];\r\n\r\n /**\r\n * Build a batch of all elements in the payload array\r\n */\r\n batchPayloads: (payload: string[]) => string;\r\n\r\n /**\r\n * Moves items to the SENT_BUFFER.\r\n * The buffer holds items which were sent, but we haven't received any response from the backend yet. \r\n */\r\n markAsSent: (payload: string[]) => void;\r\n\r\n /**\r\n * Removes items from the SENT_BUFFER. Should be called on successful response from the backend. \r\n */\r\n clearSent: (payload: string[]) => void;\r\n }\r\n\r\n /*\r\n * An array based send buffer. \r\n */\r\n export class ArraySendBuffer implements ISendBuffer {\r\n private _config: ISenderConfig;\r\n private _buffer: string[];\r\n\r\n constructor(config: ISenderConfig) {\r\n this._config = config;\r\n\r\n this._buffer = [];\r\n }\r\n\r\n public enqueue(payload: string) {\r\n this._buffer.push(payload);\r\n }\r\n\r\n public count(): number {\r\n return this._buffer.length;\r\n }\r\n\r\n public clear() {\r\n this._buffer.length = 0;\r\n }\r\n\r\n public getItems(): string[] {\r\n return this._buffer.slice(0);\r\n }\r\n\r\n public batchPayloads(payload: string[]): string {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n\r\n return batch;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public markAsSent(payload: string[]) {\r\n this.clear();\r\n }\r\n\r\n public clearSent(payload: string[]) {\r\n // not supported\r\n }\r\n }\r\n\r\n /*\r\n * Session storege buffer holds a copy of all unsent items in the browser session storage.\r\n */\r\n export class SessionStorageSendBuffer implements ISendBuffer {\r\n static BUFFER_KEY = \"AI_buffer\";\r\n static SENT_BUFFER_KEY = \"AI_sentBuffer\";\r\n\r\n // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped. \r\n static MAX_BUFFER_SIZE = 2000;\r\n private _bufferFullMessageSent = false;\r\n\r\n // An in-memory copy of the buffer. A copy is saved to the session storage on enqueue() and clear(). \r\n // The buffer is restored in a constructor and contains unsent events from a previous page.\r\n private _buffer: string[];\r\n private _config: ISenderConfig;\r\n\r\n constructor(config: ISenderConfig) {\r\n this._config = config;\r\n\r\n var bufferItems = this.getBuffer(SessionStorageSendBuffer.BUFFER_KEY);\r\n var notDeliveredItems = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n\r\n this._buffer = bufferItems.concat(notDeliveredItems);\r\n\r\n // If the buffer has too many items, drop items from the end.\r\n if (this._buffer.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n this._buffer.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n\r\n // update DataLossAnalyzer with the number of recovered items\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.itemsRestoredFromSessionBuffer = this._buffer.length;\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n\r\n public enqueue(payload: string) {\r\n if (this._buffer.length >= SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // sent internal log only once per page view\r\n if (!this._bufferFullMessageSent) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.SessionStorageBufferFull,\r\n \"Maximum buffer size reached: \" + this._buffer.length,\r\n true);\r\n this._bufferFullMessageSent = true;\r\n }\r\n return;\r\n }\r\n\r\n this._buffer.push(payload);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n\r\n public count(): number {\r\n return this._buffer.length;\r\n }\r\n\r\n public clear() {\r\n this._buffer.length = 0;\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n\r\n this._bufferFullMessageSent = false;\r\n }\r\n\r\n public getItems(): string[] {\r\n return this._buffer.slice(0)\r\n }\r\n\r\n public batchPayloads(payload: string[]): string {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n\r\n return batch;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public markAsSent(payload: string[]) {\r\n this._buffer = this.removePayloadsFromBuffer(payload, this._buffer);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n if (sentElements instanceof Array && payload instanceof Array) {\r\n sentElements = sentElements.concat(payload);\r\n\r\n if (sentElements.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\r\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.SessionStorageBufferFull,\r\n \"Sent buffer reached its maximum size: \" + sentElements.length,\r\n true);\r\n\r\n sentElements.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n }\r\n\r\n public clearSent(payload: string[]) {\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n sentElements = this.removePayloadsFromBuffer(payload, sentElements);\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n\r\n private removePayloadsFromBuffer(payloads: string[], buffer: string[]): string[] {\r\n var remaining: string[] = [];\r\n\r\n for (var i in buffer) {\r\n var contains = false;\r\n for (var j in payloads) {\r\n if (payloads[j] === buffer[i]) {\r\n contains = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!contains) {\r\n remaining.push(buffer[i]);\r\n }\r\n };\r\n\r\n return remaining;\r\n }\r\n\r\n private getBuffer(key: string): string[] {\r\n try {\r\n var bufferJson = Util.getSessionStorage(key);\r\n if (bufferJson) {\r\n var buffer: string[] = JSON.parse(bufferJson);\r\n if (buffer) {\r\n return buffer;\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToRestoreStorageBuffer,\r\n \" storage key: \" + key + \", \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n\r\n return [];\r\n }\r\n\r\n private setBuffer(key: string, buffer: string[]) {\r\n try {\r\n var bufferJson = JSON.stringify(buffer);\r\n Util.setSessionStorage(key, bufferJson);\r\n } catch (e) {\r\n // if there was an error, clear the buffer\r\n // telemetry is stored in the _buffer array so we won't loose any items\r\n Util.setSessionStorage(key, JSON.stringify([]));\r\n\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedToSetStorageBuffer,\r\n \" storage key: \" + key + \", \" + Util.getExceptionName(e) + \". Buffer cleared\",\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\ninterface XDomainRequest extends XMLHttpRequestEventTarget {\r\n responseText: string;\r\n send(payload: string);\r\n open(method: string, url: string);\r\n};\r\n\r\ndeclare var XDomainRequest: {\r\n prototype: XDomainRequest;\r\n new(): XDomainRequest;\r\n};\r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ISenderConfig {\r\n /**\r\n * The url to which payloads will be sent\r\n */\r\n endpointUrl: () => string;\r\n\r\n /**\r\n * The JSON format (normal vs line delimited). True means line delimited JSON.\r\n */\r\n emitLineDelimitedJson: () => boolean;\r\n\r\n /**\r\n * The maximum size of a batch in bytes\r\n */\r\n maxBatchSizeInBytes: () => number;\r\n\r\n /**\r\n * The maximum interval allowed between calls to batchInvoke\r\n */\r\n maxBatchInterval: () => number;\r\n\r\n /**\r\n * The master off switch. Do not send any data if set to TRUE\r\n */\r\n disableTelemetry: () => boolean;\r\n\r\n /**\r\n * Store a copy of a send buffer in the session storage\r\n */\r\n enableSessionStorageBuffer: () => boolean;\r\n\r\n /**\r\n * Is retry handler disabled.\r\n * If enabled, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error) and 503 (service unavailable).\r\n */\r\n isRetryDisabled: () => boolean;\r\n\r\n isBeaconApiDisabled: () => boolean;\r\n }\r\n\r\n export interface IResponseError {\r\n index: number;\r\n statusCode: number;\r\n message: string;\r\n }\r\n\r\n export interface IBackendResponse {\r\n /**\r\n * Number of items received by the backend\r\n */\r\n itemsReceived: number;\r\n\r\n /**\r\n * Number of items succesfuly accepted by the backend\r\n */\r\n itemsAccepted: number;\r\n\r\n /**\r\n * List of errors for items which were not accepted\r\n */\r\n errors: IResponseError[];\r\n\r\n /**\r\n * App id returned by the backend - not necessary returned, but we don't need it with each response.\r\n */\r\n appId?: string;\r\n }\r\n\r\n export class Sender {\r\n /**\r\n * How many times in a row a retryable error condition has occurred.\r\n */\r\n private _consecutiveErrors: number;\r\n\r\n /**\r\n * The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).\r\n */\r\n private _retryAt: number;\r\n\r\n /**\r\n * The time of the last send operation.\r\n */\r\n private _lastSend: number;\r\n\r\n /**\r\n * Handle to the timer for delayed sending of batches of data.\r\n */\r\n private _timeoutHandle: any;\r\n\r\n /**\r\n * A send buffer object\r\n */\r\n public _buffer: ISendBuffer;\r\n\r\n /**\r\n * The configuration for this sender instance\r\n */\r\n public _config: ISenderConfig;\r\n\r\n /**\r\n * AppId of this component parsed from some backend response.\r\n */\r\n public _appId: string;\r\n\r\n /**\r\n * A method which will cause data to be send to the url\r\n */\r\n\r\n public _sender: (payload: string[], isAsync: boolean) => void;\r\n\r\n /**\r\n * Whether XMLHttpRequest object is supported. Older version of IE (8,9) do not support it.\r\n */\r\n public _XMLHttpRequestSupported: boolean = false;\r\n\r\n /**\r\n * The maximum Beacon API payload size.\r\n * WC3 documentation allows browsers to set the limit. Chrome current has a limit of 64kb. \r\n */\r\n public static MaxBeaconPayloadSize = 65536; // 64kb\r\n\r\n /**\r\n * Constructs a new instance of the Sender class\r\n */\r\n constructor(config: ISenderConfig) {\r\n this._consecutiveErrors = 0;\r\n this._retryAt = null;\r\n this._lastSend = 0;\r\n this._config = config;\r\n this._sender = null;\r\n this._buffer = (Util.canUseSessionStorage() && this._config.enableSessionStorageBuffer())\r\n ? new SessionStorageSendBuffer(config) : new ArraySendBuffer(config);\r\n\r\n if (!this._config.isBeaconApiDisabled() && Util.IsBeaconApiSupported()) {\r\n this._sender = this._beaconSender;\r\n } else {\r\n if (typeof XMLHttpRequest != \"undefined\") {\r\n var testXhr = new XMLHttpRequest();\r\n if (\"withCredentials\" in testXhr) {\r\n this._sender = this._xhrSender;\r\n this._XMLHttpRequestSupported = true;\r\n } else if (typeof XDomainRequest !== \"undefined\") {\r\n this._sender = this._xdrSender; //IE 8 and 9\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Add a telemetry item to the send buffer\r\n */\r\n public send(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n try {\r\n // if master off switch is set, don't send any data\r\n if (this._config.disableTelemetry()) {\r\n // Do not send/save data\r\n return;\r\n }\r\n\r\n // validate input\r\n if (!envelope) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSendEmptyTelemetry, \"Cannot send empty telemetry\");\r\n return;\r\n }\r\n\r\n // ensure a sender was constructed\r\n if (!this._sender) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.SenderNotInitialized, \"Sender was not initialized\");\r\n return;\r\n }\r\n\r\n // check if the incoming payload is too large, truncate if necessary\r\n var payload: string = Serializer.serialize(envelope);\r\n\r\n // flush if we would exceed the max-size limit by adding this item\r\n var bufferPayload = this._buffer.getItems();\r\n var batch = this._buffer.batchPayloads(bufferPayload);\r\n\r\n if (batch && (batch.length + payload.length > this._config.maxBatchSizeInBytes())) {\r\n this.triggerSend();\r\n }\r\n\r\n // enqueue the payload\r\n this._buffer.enqueue(payload);\r\n\r\n // ensure an invocation timeout is set\r\n this._setupTimer();\r\n\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.incrementItemsQueued();\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedAddingTelemetryToBuffer,\r\n \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */\r\n private _setupTimer() {\r\n if (!this._timeoutHandle) {\r\n var retryInterval = this._retryAt ? Math.max(0, this._retryAt - Date.now()) : 0;\r\n var timerValue = Math.max(this._config.maxBatchInterval(), retryInterval);\r\n\r\n this._timeoutHandle = setTimeout(() => {\r\n this.triggerSend();\r\n }, timerValue);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the size of the list in bytes.\r\n * @param list {string[]} - The list to get the size in bytes of.\r\n */\r\n private _getSizeInBytes(list: string[]) {\r\n var size = 0;\r\n if (list && list.length) {\r\n for (var i = 0; i < list.length; i++) {\r\n var item = list[i];\r\n if (item && item.length) {\r\n size += item.length;\r\n }\r\n }\r\n }\r\n\r\n return size;\r\n }\r\n\r\n /**\r\n * Immediately send buffered data\r\n * @param async {boolean} - Indicates if the events should be sent asynchronously\r\n */\r\n public triggerSend(async = true) {\r\n try {\r\n // Send data only if disableTelemetry is false\r\n if (!this._config.disableTelemetry()) {\r\n\r\n if (this._buffer.count() > 0) {\r\n var payload = this._buffer.getItems();\r\n\r\n // invoke send\r\n this._sender(payload, async);\r\n }\r\n\r\n // update lastSend time to enable throttling\r\n this._lastSend = +new Date;\r\n } else {\r\n this._buffer.clear();\r\n }\r\n\r\n clearTimeout(this._timeoutHandle);\r\n this._timeoutHandle = null;\r\n this._retryAt = null;\r\n } catch (e) {\r\n /* Ignore this error for IE under v10 */\r\n if (!Util.getIEVersion() || Util.getIEVersion() > 9) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TransmissionFailed,\r\n \"Telemetry transmission failed, some telemetry will be lost: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n }\r\n\r\n /** Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */\r\n private _setRetryTime() {\r\n const SlotDelayInSeconds = 10;\r\n var delayInSeconds: number;\r\n\r\n if (this._consecutiveErrors <= 1) {\r\n delayInSeconds = SlotDelayInSeconds;\r\n } else {\r\n var backOffSlot = (Math.pow(2, this._consecutiveErrors) - 1) / 2;\r\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\r\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\r\n }\r\n\r\n // TODO: Log the backoff time like the C# version does.\r\n var retryAfterTimeSpan = Date.now() + (delayInSeconds * 1000);\r\n\r\n // TODO: Log the retry at time like the C# version does.\r\n this._retryAt = retryAfterTimeSpan;\r\n }\r\n\r\n /**\r\n * Parses the response from the backend. \r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */\r\n private _parseResponse(response: any): IBackendResponse {\r\n try {\r\n if (response && response !== \"\") {\r\n var result = JSON.parse(response);\r\n\r\n if (result && result.itemsReceived && result.itemsReceived >= result.itemsAccepted &&\r\n result.itemsReceived - result.itemsAccepted == result.errors.length) {\r\n return result;\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.InvalidBackendResponse,\r\n \"Cannot parse the response. \" + Util.getExceptionName(e),\r\n {\r\n response: response\r\n });\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */\r\n private _isRetriable(statusCode: number): boolean {\r\n return statusCode == 408 // Timeout\r\n || statusCode == 429 // Too many requests.\r\n || statusCode == 500 // Internal server error.\r\n || statusCode == 503; // Service unavailable.\r\n }\r\n\r\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */\r\n private _resendPayload(payload: string[]) {\r\n if (!payload || payload.length === 0) {\r\n return;\r\n }\r\n\r\n this._buffer.clearSent(payload);\r\n this._consecutiveErrors++;\r\n\r\n for (var item of payload) {\r\n this._buffer.enqueue(item);\r\n }\r\n\r\n // setup timer\r\n this._setRetryTime();\r\n this._setupTimer();\r\n }\r\n\r\n private _formatErrorMessageXhr(xhr: XMLHttpRequest, message?: string): string {\r\n if (xhr) {\r\n return \"XMLHttpRequest,Status:\" + xhr.status + \",Response:\" + xhr.responseText || xhr.response || \"\";\r\n }\r\n\r\n return message;\r\n }\r\n\r\n private _formatErrorMessageXdr(xdr: XDomainRequest, message?: string): string {\r\n if (xdr) {\r\n return \"XDomainRequest,Response:\" + xdr.responseText || \"\";\r\n }\r\n\r\n return message;\r\n }\r\n\r\n /**\r\n * Send XMLHttpRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n */\r\n private _xhrSender(payload: string[], isAsync: boolean) {\r\n var xhr = new XMLHttpRequest();\r\n xhr[AjaxMonitor.DisabledPropertyName] = true;\r\n xhr.open(\"POST\", this._config.endpointUrl(), isAsync);\r\n xhr.setRequestHeader(\"Content-type\", \"application/json\");\r\n\r\n // append Sdk-Context request header only in case of breeze endpoint\r\n if (Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())) {\r\n xhr.setRequestHeader(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);\r\n }\r\n\r\n xhr.onreadystatechange = () => this._xhrReadyStateChange(xhr, payload, payload.length);\r\n xhr.onerror = (event: ErrorEvent) => this._onError(payload, this._formatErrorMessageXhr(xhr), event);\r\n\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xhr.send(batch);\r\n\r\n this._buffer.markAsSent(payload);\r\n }\r\n\r\n /**\r\n * Send XDomainRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n * \r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n private _xdrSender(payload: string[], isAsync: boolean) {\r\n var xdr = new XDomainRequest();\r\n xdr.onload = () => this._xdrOnLoad(xdr, payload);\r\n xdr.onerror = (event: ErrorEvent) => this._onError(payload, this._formatErrorMessageXdr(xdr), event);\r\n\r\n // XDomainRequest requires the same protocol as the hosting page. \r\n // If the protocol doesn't match, we can't send the telemetry :(. \r\n var hostingProtocol = window.location.protocol\r\n if (this._config.endpointUrl().lastIndexOf(hostingProtocol, 0) !== 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \". \" +\r\n \"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\");\r\n\r\n this._buffer.clear();\r\n return;\r\n }\r\n\r\n var endpointUrl = this._config.endpointUrl().replace(/^(https?:)/, \"\");\r\n xdr.open('POST', endpointUrl);\r\n\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xdr.send(batch);\r\n\r\n this._buffer.markAsSent(payload);\r\n }\r\n\r\n /**\r\n * Send Beacon API request\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n private _beaconSender(payload: string[], isAsync: boolean) {\r\n var url = this._config.endpointUrl();\r\n var batch = this._buffer.batchPayloads(payload);\r\n\r\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\r\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\r\n let plainTextBatch = new Blob([batch], { type: 'text/plain;charset=UTF-8' });\r\n \r\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\r\n var queued = navigator.sendBeacon(url, plainTextBatch);\r\n\r\n if (queued) {\r\n this._buffer.markAsSent(payload);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TransmissionFailed, \". \" + \"Failed to send telemetry with Beacon API.\");\r\n }\r\n }\r\n\r\n /**\r\n * xhr state changes\r\n */\r\n public _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number) {\r\n if (xhr.readyState === 4) {\r\n var response: IBackendResponse = null;\r\n if (!this._appId) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n if (response && response.appId) {\r\n this._appId = response.appId;\r\n }\r\n }\r\n \r\n if ((xhr.status < 200 || xhr.status >= 300) && xhr.status !== 0) {\r\n if (!this._config.isRetryDisabled() && this._isRetriable(xhr.status)) {\r\n this._resendPayload(payload);\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \". \" +\r\n \"Response code \" + xhr.status + \". Will retry to send \" + payload.length + \" items.\");\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n } else {\r\n if (xhr.status === 206) {\r\n if (!response) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n }\r\n\r\n if (response && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, response);\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n } else {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, countOfItemsInPayload);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * xdr state changes\r\n */\r\n public _xdrOnLoad(xdr: XDomainRequest, payload: string[]) {\r\n if (xdr && (xdr.responseText + \"\" === \"200\" || xdr.responseText === \"\")) {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, 0);\r\n } else {\r\n var results = this._parseResponse(xdr.responseText);\r\n\r\n if (results && results.itemsReceived && results.itemsReceived > results.itemsAccepted\r\n && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, results);\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXdr(xdr));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * partial success handler\r\n */\r\n public _onPartialSuccess(payload: string[], results: IBackendResponse) {\r\n var failed = [];\r\n var retry = [];\r\n\r\n // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\r\n var errors = results.errors.reverse();\r\n for (var error of errors) {\r\n var extracted = payload.splice(error.index, 1)[0];\r\n if (this._isRetriable(error.statusCode)) {\r\n retry.push(extracted);\r\n } else {\r\n // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\r\n failed.push(extracted);\r\n }\r\n }\r\n\r\n if (payload.length > 0) {\r\n this._onSuccess(payload, results.itemsAccepted);\r\n }\r\n\r\n if (failed.length > 0) {\r\n this._onError(failed, this._formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' ')));\r\n }\r\n\r\n if (retry.length > 0) {\r\n this._resendPayload(retry);\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \"Partial success. \" +\r\n \"Delivered: \" + payload.length + \", Failed: \" + failed.length +\r\n \". Will retry to send \" + retry.length + \" our of \" + results.itemsReceived + \" items\");\r\n }\r\n }\r\n\r\n /**\r\n * error handler\r\n */\r\n public _onError(payload: string[], message: string, event?: ErrorEvent) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.OnError,\r\n \"Failed to send telemetry.\",\r\n { message: message });\r\n\r\n this._buffer.clearSent(payload);\r\n }\r\n\r\n /**\r\n * success handler\r\n */\r\n public _onSuccess(payload: string[], countOfItemsInPayload: number) {\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.decrementItemsQueued(countOfItemsInPayload);\r\n\r\n this._buffer.clearSent(payload);\r\n }\r\n }\r\n\r\n interface linkedListNode {\r\n next: linkedListNode;\r\n payload: string;\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.\r\n */\r\n export class MessageData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Trace message\r\n */\r\n public message: string;\r\n \r\n /**\r\n * Trace severity level.\r\n */\r\n public severityLevel: AI.SeverityLevel;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Trace extends AI.MessageData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\r\n public static dataType = \"MessageData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n message: FieldType.Required,\r\n severityLevel: FieldType.Default,\r\n properties: FieldType.Default\r\n };\r\n\r\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\r\n constructor(message: string, properties?: any, severityLevel?: AI.SeverityLevel) {\r\n super();\r\n message = message || Util.NotSpecified;\r\n this.message = Common.DataSanitizer.sanitizeMessage(message);\r\n this.properties = Common.DataSanitizer.sanitizeProperties(properties);\r\n\r\n if (severityLevel) {\r\n this.severityLevel = severityLevel;\r\n }\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Event extends AI.EventData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\r\n public static dataType = \"EventData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n name: FieldType.Required,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\r\n constructor(name: string, properties?: any, measurements?: any) {\r\n \r\n super();\r\n\r\n this.name = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Exception details of the exception in a chain.\r\n */\r\n export class ExceptionDetails\r\n {\r\n \r\n /**\r\n * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting.\r\n */\r\n public id: number;\r\n \r\n /**\r\n * The value of outerId is a reference to an element in ExceptionDetails that represents the outer exception\r\n */\r\n public outerId: number;\r\n \r\n /**\r\n * Exception type name.\r\n */\r\n public typeName: string;\r\n \r\n /**\r\n * Exception message.\r\n */\r\n public message: string;\r\n \r\n /**\r\n * Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.\r\n */\r\n public hasFullStack: boolean;\r\n \r\n /**\r\n * Text describing the stack. Either stack or parsedStack should have a value.\r\n */\r\n public stack: string;\r\n \r\n /**\r\n * List of stack frames. Either stack or parsedStack should have a value.\r\n */\r\n public parsedStack: StackFrame[];\r\n \r\n constructor()\r\n {\r\n this.hasFullStack = true;\r\n this.parsedStack = [];\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.\r\n */\r\n export class ExceptionData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Exception chain - list of inner exceptions.\r\n */\r\n public exceptions: ExceptionDetails[];\r\n \r\n /**\r\n * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.\r\n */\r\n public severityLevel: AI.SeverityLevel;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.exceptions = [];\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Stack frame information.\r\n */\r\n export class StackFrame\r\n {\r\n \r\n /**\r\n * Level in the call stack. For the long stacks SDK may not report every function in a call stack.\r\n */\r\n public level: number;\r\n \r\n /**\r\n * Method name.\r\n */\r\n public method: string;\r\n \r\n /**\r\n * Name of the assembly (dll, jar, etc.) containing this function.\r\n */\r\n public assembly: string;\r\n \r\n /**\r\n * File name or URL of the method implementation.\r\n */\r\n public fileName: string;\r\n \r\n /**\r\n * Line number of the code implementation.\r\n */\r\n public line: number;\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Exception extends AI.ExceptionData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\r\n public static dataType = \"ExceptionData\";\r\n\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n exceptions: FieldType.Required,\r\n severityLevel: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new isntance of the ExceptionTelemetry object\r\n */\r\n constructor(exception: Error, properties?: any, measurements?: any, severityLevel?: AI.SeverityLevel) {\r\n super();\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n\r\n this.exceptions = [new _ExceptionDetails(exception)];\r\n\r\n if (severityLevel) {\r\n this.severityLevel = severityLevel;\r\n }\r\n }\r\n \r\n\r\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */\r\n public static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string,\r\n details: string, line: number): Telemetry.Exception {\r\n\r\n return {\r\n exceptions: [\r\n {\r\n hasFullStack: true,\r\n message: message,\r\n stack: details,\r\n typeName: typeName\r\n }\r\n ]\r\n };\r\n }\r\n }\r\n\r\n class _ExceptionDetails extends AI.ExceptionDetails implements ISerializable {\r\n\r\n public aiDataContract = {\r\n id: FieldType.Default,\r\n outerId: FieldType.Default,\r\n typeName: FieldType.Required,\r\n message: FieldType.Required,\r\n hasFullStack: FieldType.Default,\r\n stack: FieldType.Default,\r\n parsedStack: FieldType.Array\r\n };\r\n\r\n constructor(exception: Error) {\r\n super();\r\n this.typeName = Common.DataSanitizer.sanitizeString(exception.name) || Util.NotSpecified;\r\n this.message = Common.DataSanitizer.sanitizeMessage(exception.message) || Util.NotSpecified;\r\n var stack = exception[\"stack\"];\r\n this.parsedStack = this.parseStack(stack);\r\n this.stack = Common.DataSanitizer.sanitizeException(stack);\r\n this.hasFullStack = Util.isArray(this.parsedStack) && this.parsedStack.length > 0;\r\n }\r\n\r\n private parseStack(stack): _StackFrame[] {\r\n var parsedStack: _StackFrame[] = undefined;\r\n if (typeof stack === \"string\") {\r\n var frames = stack.split('\\n');\r\n parsedStack = [];\r\n var level = 0;\r\n\r\n var totalSizeInBytes = 0;\r\n for (var i = 0; i <= frames.length; i++) {\r\n var frame = frames[i];\r\n if (_StackFrame.regex.test(frame)) {\r\n var parsedFrame = new _StackFrame(frames[i], level++);\r\n totalSizeInBytes += parsedFrame.sizeInBytes;\r\n parsedStack.push(parsedFrame);\r\n }\r\n }\r\n\r\n // DP Constraint - exception parsed stack must be < 32KB\r\n // remove frames from the middle to meet the threshold\r\n var exceptionParsedStackThreshold = 32 * 1024;\r\n if (totalSizeInBytes > exceptionParsedStackThreshold) {\r\n var left = 0;\r\n var right = parsedStack.length - 1;\r\n var size = 0;\r\n var acceptedLeft = left;\r\n var acceptedRight = right;\r\n\r\n while (left < right) {\r\n // check size\r\n var lSize = parsedStack[left].sizeInBytes;\r\n var rSize = parsedStack[right].sizeInBytes;\r\n size += lSize + rSize;\r\n\r\n if (size > exceptionParsedStackThreshold) {\r\n\r\n // remove extra frames from the middle\r\n var howMany = acceptedRight - acceptedLeft + 1;\r\n parsedStack.splice(acceptedLeft, howMany);\r\n break;\r\n }\r\n\r\n // update pointers\r\n acceptedLeft = left;\r\n acceptedRight = right;\r\n\r\n left++;\r\n right--;\r\n }\r\n }\r\n }\r\n\r\n return parsedStack;\r\n }\r\n }\r\n\r\n export class _StackFrame extends AI.StackFrame implements ISerializable {\r\n \r\n // regex to match stack frames from ie/chrome/ff\r\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\r\n public static regex = /^([\\s]+at)?(.*?)(\\@|\\s\\(|\\s)([^\\(\\@\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\r\n public static baseSize = 58; //'{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\r\n public sizeInBytes = 0;\r\n\r\n public aiDataContract = {\r\n level: FieldType.Required,\r\n method: FieldType.Required,\r\n assembly: FieldType.Default,\r\n fileName: FieldType.Default,\r\n line: FieldType.Default\r\n };\r\n\r\n constructor(frame: string, level: number) {\r\n super();\r\n this.level = level;\r\n this.method = \"\";\r\n this.assembly = Util.trim(frame);\r\n var matches = frame.match(_StackFrame.regex);\r\n if (matches && matches.length >= 5) {\r\n this.method = Util.trim(matches[2]) || this.method;\r\n this.fileName = Util.trim(matches[4]);\r\n this.line = parseInt(matches[5]) || 0;\r\n }\r\n\r\n this.sizeInBytes += this.method.length;\r\n this.sizeInBytes += this.fileName.length;\r\n this.sizeInBytes += this.assembly.length;\r\n\r\n // todo: these might need to be removed depending on how the back-end settles on their size calculation\r\n this.sizeInBytes += _StackFrame.baseSize;\r\n this.sizeInBytes += this.level.toString().length;\r\n this.sizeInBytes += this.line.toString().length;\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Type of the metric data measurement.\r\n */\r\n export enum DataPointType\r\n {\r\n Measurement = 0,\r\n Aggregation = 1,\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Metric data single measurement.\r\n */\r\n export class DataPoint\r\n {\r\n \r\n /**\r\n * Name of the metric.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Metric type. Single measurement or the aggregated value.\r\n */\r\n public kind: AI.DataPointType;\r\n \r\n /**\r\n * Single value for measurement. Sum of individual measurements for the aggregation.\r\n */\r\n public value: number;\r\n \r\n /**\r\n * Metric weight of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public count: number;\r\n \r\n /**\r\n * Minimum value of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public min: number;\r\n \r\n /**\r\n * Maximum value of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public max: number;\r\n \r\n /**\r\n * Standard deviation of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public stdDev: number;\r\n \r\n constructor()\r\n {\r\n this.kind = AI.DataPointType.Measurement;\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.\r\n */\r\n export class MetricData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used.\r\n */\r\n public metrics: DataPoint[];\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.metrics = [];\r\n this.properties = {};\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class DataPoint extends AI.DataPoint implements ISerializable {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {\r\n name: FieldType.Required,\r\n kind: FieldType.Default,\r\n value: FieldType.Required,\r\n count: FieldType.Default,\r\n min: FieldType.Default,\r\n max: FieldType.Default,\r\n stdDev: FieldType.Default\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Metric extends AI.MetricData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\r\n public static dataType = \"MetricData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n metrics: FieldType.Required,\r\n properties: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */\r\n constructor(name: string, value: number, count?: number, min?: number, max?: number, properties?: any) {\r\n super();\r\n\r\n var dataPoint = new Microsoft.ApplicationInsights.Telemetry.Common.DataPoint();\r\n dataPoint.count = count > 0 ? count : undefined;\r\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\r\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\r\n dataPoint.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n dataPoint.value = value;\r\n\r\n this.metrics = [dataPoint];\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class PageView extends AI.PageViewData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\r\n public static dataType = \"PageviewData\";\r\n\r\n public aiDataContract = { \r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n url: FieldType.Default,\r\n duration: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default,\r\n id: FieldType.Default,\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n constructor(name?: string, url?: string, durationMs?: number, properties?: any, measurements?: any, id?: string) {\r\n super();\r\n\r\n this.id = Common.DataSanitizer.sanitizeId(id);\r\n this.url = Common.DataSanitizer.sanitizeUrl(url);\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n if (!isNaN(durationMs)) {\r\n this.duration = Util.msToTimeSpan(durationMs);\r\n }\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.\r\n */\r\n export class PageViewPerfData extends AI.PageViewData\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Request URL with all query string parameters\r\n */\r\n public url: string;\r\n \r\n /**\r\n * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public perfTotal: string;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Network connection time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public networkConnect: string;\r\n \r\n /**\r\n * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public sentRequest: string;\r\n \r\n /**\r\n * Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public receivedResponse: string;\r\n \r\n /**\r\n * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public domProcessing: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class PageViewPerformance extends AI.PageViewPerfData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\r\n public static dataType = \"PageviewPerformanceData\";\r\n\r\n private static MAX_DURATION_ALLOWED = 3600000; // 1h\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n url: FieldType.Default,\r\n duration: FieldType.Default,\r\n perfTotal: FieldType.Default,\r\n networkConnect: FieldType.Default,\r\n sentRequest: FieldType.Default,\r\n receivedResponse: FieldType.Default,\r\n domProcessing: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n };\r\n\r\n /**\r\n * Field indicating whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n private isValid: boolean;\r\n\r\n /**\r\n * Indicates whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n public getIsValid() {\r\n return this.isValid;\r\n }\r\n\r\n private durationMs: number;\r\n\r\n /**\r\n * Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method.\r\n */\r\n public getDurationMs() {\r\n return this.durationMs;\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n constructor(name: string, url: string, unused: number, properties?: any, measurements?: any) {\r\n super();\r\n\r\n this.isValid = false;\r\n\r\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n */\r\n var timing = PageViewPerformance.getPerformanceTiming();\r\n if (timing) {\r\n var total = PageViewPerformance.getDuration(timing.navigationStart, timing.loadEventEnd);\r\n var network = PageViewPerformance.getDuration(timing.navigationStart, timing.connectEnd);\r\n var request = PageViewPerformance.getDuration(timing.requestStart, timing.responseStart);\r\n var response = PageViewPerformance.getDuration(timing.responseStart, timing.responseEnd);\r\n var dom = PageViewPerformance.getDuration(timing.responseEnd, timing.loadEventEnd);\r\n\r\n if (total == 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.ErrorPVCalc,\r\n \"error calculating page view performance.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else if (!PageViewPerformance.shouldCollectDuration(total, network, request, response, dom)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.InvalidDurationValue,\r\n \"Invalid page load duration value. Browser perf data won't be sent.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {\r\n // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\r\n // in this case, don't report client performance from this page\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.ClientPerformanceMathError,\r\n \"client performance math error.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else {\r\n this.durationMs = total;\r\n\r\n // convert to timespans\r\n this.perfTotal = this.duration = Util.msToTimeSpan(total);\r\n this.networkConnect = Util.msToTimeSpan(network);\r\n this.sentRequest = Util.msToTimeSpan(request);\r\n this.receivedResponse = Util.msToTimeSpan(response);\r\n this.domProcessing = Util.msToTimeSpan(dom);\r\n\r\n this.isValid = true;\r\n }\r\n }\r\n\r\n this.url = Common.DataSanitizer.sanitizeUrl(url);\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n\r\n public static getPerformanceTiming(): PerformanceTiming {\r\n if (PageViewPerformance.isPerformanceTimingSupported()) {\r\n return window.performance.timing;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns true is window performance timing API is supported, false otherwise.\r\n */\r\n public static isPerformanceTimingSupported() {\r\n return typeof window != \"undefined\" && window.performance && window.performance.timing;\r\n }\r\n\r\n /**\r\n * As page loads different parts of performance timing numbers get set. When all of them are set we can report it.\r\n * Returns true if ready, false otherwise.\r\n */\r\n public static isPerformanceTimingDataReady() {\r\n var timing = window.performance.timing;\r\n\r\n return timing.domainLookupStart > 0\r\n && timing.navigationStart > 0\r\n && timing.responseStart > 0\r\n && timing.requestStart > 0\r\n && timing.loadEventEnd > 0\r\n && timing.responseEnd > 0\r\n && timing.connectEnd > 0\r\n && timing.domLoading > 0;\r\n }\r\n\r\n public static getDuration(start: any, end: any): number {\r\n var duration = undefined;\r\n if (!(isNaN(start) || isNaN(end))) {\r\n duration = Math.max(end - start, 0);\r\n }\r\n\r\n return duration;\r\n }\r\n\r\n /**\r\n * This method tells if given durations should be excluded from collection.\r\n */\r\n public static shouldCollectDuration(...durations: number[]): boolean {\r\n // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\r\n let botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google'];\r\n let userAgent = navigator.userAgent;\r\n let isGoogleBot = false;\r\n\r\n if (userAgent) {\r\n for(let i =0; i= PageViewPerformance.MAX_DURATION_ALLOWED) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ITelemetryConfig extends ISenderConfig {\r\n instrumentationKey: () => string;\r\n accountId: () => string;\r\n sessionRenewalMs: () => number;\r\n sessionExpirationMs: () => number;\r\n sampleRate: () => number;\r\n cookieDomain: () => string;\r\n sdkExtension: () => string;\r\n isBrowserLinkTrackingEnabled: () => boolean;\r\n appId: () => string;\r\n }\r\n\r\n export class TelemetryContext implements ITelemetryContext {\r\n /**\r\n * The configuration for this telemetry context\r\n */\r\n public _config: ITelemetryConfig;\r\n\r\n /**\r\n * The sender instance for this context\r\n */\r\n public _sender: Sender;\r\n\r\n /**\r\n * The object describing a component tracked by this object.\r\n */\r\n public application: Context.Application;\r\n\r\n /**\r\n * The object describing a device tracked by this object.\r\n */\r\n public device: Context.Device;\r\n\r\n public internal: Context.Internal;\r\n\r\n /**\r\n * The object describing a location tracked by this object.\r\n */\r\n public location: Context.Location;\r\n\r\n /**\r\n * The object describing a operation tracked by this object.\r\n */\r\n public operation: Context.Operation;\r\n\r\n public sample: Context.Sample;\r\n\r\n /**\r\n * The object describing a user tracked by this object.\r\n */\r\n public user: Context.User;\r\n\r\n /**\r\n * The object describing a session tracked by this object.\r\n */\r\n public session: Context.Session;\r\n\r\n /**\r\n * AppId of this component if returned by the backend.\r\n */\r\n public appId: () => string;\r\n\r\n /**\r\n * The array of telemetry initializers to call before sending each telemetry item.\r\n */\r\n private telemetryInitializers: { (envelope: Microsoft.ApplicationInsights.IEnvelope): boolean | void; }[];\r\n\r\n /**\r\n * The session manager that manages session on the base of cookies.\r\n */\r\n public _sessionManager: Microsoft.ApplicationInsights.Context._SessionManager;\r\n\r\n constructor(config: ITelemetryConfig) {\r\n this._config = config;\r\n this._sender = new Sender(config);\r\n this.appId = () => this._sender._appId;\r\n\r\n // use appId set in config instead of getting it from the backend\r\n if (config.appId()) {\r\n this._sender._appId = config.appId();\r\n }\r\n\r\n this.telemetryInitializers = [];\r\n\r\n // window will be undefined in node.js where we do not want to initialize contexts\r\n if (typeof window !== 'undefined') {\r\n this._sessionManager = new ApplicationInsights.Context._SessionManager(config);\r\n this.application = new Context.Application();\r\n this.device = new Context.Device();\r\n this.internal = new Context.Internal(config);\r\n this.location = new Context.Location();\r\n this.user = new Context.User(config);\r\n this.operation = new Context.Operation();\r\n this.session = new Context.Session();\r\n this.sample = new Context.Sample(config.sampleRate());\r\n }\r\n\r\n this._addDefaultTelemetryInitializers();\r\n }\r\n\r\n /**\r\n * Adds telemetry initializer to the collection. Telemetry initializers will be called one by one\r\n * before telemetry item is pushed for sending and in the order they were added.\r\n */\r\n public addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void) {\r\n this.telemetryInitializers.push(telemetryInitializer);\r\n }\r\n\r\n /**\r\n * Use Sender.ts to send telemetry object to the endpoint\r\n */\r\n public track(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n if (!envelope) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackArgumentsNotSpecified,\r\n \"cannot call .track() with a null or undefined argument\", null, true);\r\n } else {\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (envelope.name === Telemetry.PageView.envelopeType) {\r\n _InternalLogging.resetInternalMessageCount();\r\n }\r\n\r\n if (this.session) {\r\n // If customer did not provide custom session id update sessionmanager\r\n if (typeof this.session.id !== \"string\") {\r\n this._sessionManager.update();\r\n }\r\n }\r\n\r\n this._track(envelope);\r\n }\r\n\r\n return envelope;\r\n }\r\n\r\n private _addDefaultTelemetryInitializers() {\r\n if (!this._config.isBrowserLinkTrackingEnabled()) {\r\n const browserLinkPaths = ['/browserLinkSignalR/', '/__browserLink/'];\r\n let dropBrowserLinkRequests = (envelope: Microsoft.ApplicationInsights.IEnvelope) => {\r\n if (envelope.name === Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType) {\r\n let remoteData = envelope.data as Telemetry.Common.Data;\r\n if (remoteData && remoteData.baseData) {\r\n for (let i = 0; i < browserLinkPaths.length; i++) {\r\n if (remoteData.baseData.name.indexOf(browserLinkPaths[i]) >= 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n this.addTelemetryInitializer(dropBrowserLinkRequests)\r\n }\r\n }\r\n\r\n private _track(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n\r\n if (this.session) {\r\n // If customer set id, apply his context; otherwise apply context generated from cookies \r\n if (typeof this.session.id === \"string\") {\r\n this._applySessionContext(envelope, this.session);\r\n } else {\r\n this._applySessionContext(envelope, this._sessionManager.automaticSession);\r\n }\r\n }\r\n\r\n this._applyApplicationContext(envelope, this.application);\r\n this._applyDeviceContext(envelope, this.device);\r\n this._applyInternalContext(envelope, this.internal);\r\n this._applyLocationContext(envelope, this.location);\r\n this._applySampleContext(envelope, this.sample);\r\n this._applyUserContext(envelope, this.user);\r\n this._applyOperationContext(envelope, this.operation);\r\n\r\n envelope.iKey = this._config.instrumentationKey();\r\n\r\n var doNotSendItem = false;\r\n try {\r\n var telemetryInitializersCount = this.telemetryInitializers.length;\r\n for (var i = 0; i < telemetryInitializersCount; ++i) {\r\n var telemetryInitializer = this.telemetryInitializers[i];\r\n if (telemetryInitializer) {\r\n if (telemetryInitializer.apply(null, [envelope]) === false) {\r\n doNotSendItem = true;\r\n break;\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n doNotSendItem = true;\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"One of telemetry initializers failed, telemetry item will not be sent: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) }, true);\r\n }\r\n\r\n if (!doNotSendItem) {\r\n if (envelope.name === Telemetry.Metric.envelopeType ||\r\n this.sample.isSampledIn(envelope)) {\r\n var iKeyNoDashes = this._config.instrumentationKey().replace(/-/g, \"\");\r\n envelope.name = envelope.name.replace(\"{0}\", iKeyNoDashes);\r\n this._sender.send(envelope);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TelemetrySampledAndNotSent,\r\n \"Telemetry is sampled and not sent to the AI service.\", { SampleRate: this.sample.sampleRate }, true);\r\n }\r\n }\r\n\r\n return envelope;\r\n }\r\n\r\n private _applyApplicationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, appContext: Microsoft.ApplicationInsights.Context.Application) {\r\n if (appContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n\r\n if (typeof appContext.ver === \"string\") {\r\n envelope.tags[tagKeys.applicationVersion] = appContext.ver;\r\n }\r\n if (typeof appContext.build === \"string\") {\r\n envelope.tags[tagKeys.applicationBuild] = appContext.build;\r\n }\r\n }\r\n }\r\n\r\n private _applyDeviceContext(envelope: Microsoft.ApplicationInsights.IEnvelope, deviceContext: Microsoft.ApplicationInsights.Context.Device) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n\r\n if (deviceContext) {\r\n if (typeof deviceContext.id === \"string\") {\r\n envelope.tags[tagKeys.deviceId] = deviceContext.id;\r\n }\r\n if (typeof deviceContext.ip === \"string\") {\r\n envelope.tags[tagKeys.deviceIp] = deviceContext.ip;\r\n }\r\n if (typeof deviceContext.language === \"string\") {\r\n envelope.tags[tagKeys.deviceLanguage] = deviceContext.language;\r\n }\r\n if (typeof deviceContext.locale === \"string\") {\r\n envelope.tags[tagKeys.deviceLocale] = deviceContext.locale;\r\n }\r\n if (typeof deviceContext.model === \"string\") {\r\n envelope.tags[tagKeys.deviceModel] = deviceContext.model;\r\n }\r\n if (typeof deviceContext.network !== \"undefined\") {\r\n envelope.tags[tagKeys.deviceNetwork] = deviceContext.network;\r\n }\r\n if (typeof deviceContext.oemName === \"string\") {\r\n envelope.tags[tagKeys.deviceOEMName] = deviceContext.oemName;\r\n }\r\n if (typeof deviceContext.os === \"string\") {\r\n envelope.tags[tagKeys.deviceOS] = deviceContext.os;\r\n }\r\n if (typeof deviceContext.osversion === \"string\") {\r\n envelope.tags[tagKeys.deviceOSVersion] = deviceContext.osversion;\r\n }\r\n if (typeof deviceContext.resolution === \"string\") {\r\n envelope.tags[tagKeys.deviceScreenResolution] = deviceContext.resolution;\r\n }\r\n if (typeof deviceContext.type === \"string\") {\r\n envelope.tags[tagKeys.deviceType] = deviceContext.type;\r\n }\r\n }\r\n }\r\n\r\n private _applyInternalContext(envelope: Microsoft.ApplicationInsights.IEnvelope, internalContext: Microsoft.ApplicationInsights.Context.Internal) {\r\n if (internalContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof internalContext.agentVersion === \"string\") {\r\n envelope.tags[tagKeys.internalAgentVersion] = internalContext.agentVersion;\r\n }\r\n if (typeof internalContext.sdkVersion === \"string\") {\r\n envelope.tags[tagKeys.internalSdkVersion] = internalContext.sdkVersion;\r\n }\r\n }\r\n }\r\n\r\n private _applyLocationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, locationContext: Microsoft.ApplicationInsights.Context.Location) {\r\n if (locationContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof locationContext.ip === \"string\") {\r\n envelope.tags[tagKeys.locationIp] = locationContext.ip;\r\n }\r\n }\r\n }\r\n\r\n private _applyOperationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, operationContext: Microsoft.ApplicationInsights.Context.Operation) {\r\n if (operationContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof operationContext.id === \"string\") {\r\n envelope.tags[tagKeys.operationId] = operationContext.id;\r\n }\r\n if (typeof operationContext.name === \"string\") {\r\n envelope.tags[tagKeys.operationName] = operationContext.name;\r\n }\r\n if (typeof operationContext.parentId === \"string\") {\r\n envelope.tags[tagKeys.operationParentId] = operationContext.parentId;\r\n }\r\n if (typeof operationContext.rootId === \"string\") {\r\n envelope.tags[tagKeys.operationRootId] = operationContext.rootId;\r\n }\r\n if (typeof operationContext.syntheticSource === \"string\") {\r\n envelope.tags[tagKeys.operationSyntheticSource] = operationContext.syntheticSource;\r\n }\r\n }\r\n }\r\n\r\n private _applySampleContext(envelope: Microsoft.ApplicationInsights.IEnvelope, sampleContext: Microsoft.ApplicationInsights.Context.Sample) {\r\n if (sampleContext) {\r\n envelope.sampleRate = sampleContext.sampleRate;\r\n }\r\n }\r\n\r\n private _applySessionContext(envelope: Microsoft.ApplicationInsights.IEnvelope, sessionContext: Microsoft.ApplicationInsights.Context.Session) {\r\n if (sessionContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof sessionContext.id === \"string\") {\r\n envelope.tags[tagKeys.sessionId] = sessionContext.id;\r\n }\r\n if (typeof sessionContext.isFirst !== \"undefined\") {\r\n envelope.tags[tagKeys.sessionIsFirst] = sessionContext.isFirst;\r\n }\r\n }\r\n }\r\n\r\n private _applyUserContext(envelope: Microsoft.ApplicationInsights.IEnvelope, userContext: Microsoft.ApplicationInsights.Context.User) {\r\n if (userContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof userContext.accountId === \"string\") {\r\n envelope.tags[tagKeys.userAccountId] = userContext.accountId;\r\n }\r\n if (typeof userContext.agent === \"string\") {\r\n envelope.tags[tagKeys.userAgent] = userContext.agent;\r\n }\r\n if (typeof userContext.id === \"string\") {\r\n envelope.tags[tagKeys.userId] = userContext.id;\r\n }\r\n if (typeof userContext.authenticatedId === \"string\") {\r\n envelope.tags[tagKeys.userAuthUserId] = userContext.authenticatedId;\r\n }\r\n if (typeof userContext.storeRegion === \"string\") {\r\n envelope.tags[tagKeys.userStoreRegion] = userContext.storeRegion;\r\n }\r\n }\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Data struct to contain both B and C sections.\r\n */\r\n export class Data extends Microsoft.Telemetry.Base\r\n {\r\n \r\n /**\r\n * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.\r\n */\r\n public baseType: string;\r\n \r\n /**\r\n * Container for data item (B section).\r\n */\r\n public baseData: TDomain;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class Data extends Microsoft.Telemetry.Data implements ISerializable {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {\r\n baseType: FieldType.Required,\r\n baseData: FieldType.Required\r\n }\r\n\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n constructor(type: string, data: TDomain) {\r\n super();\r\n\r\n this.baseType = type;\r\n this.baseData = data;\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n /**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */\r\n export class PageViewManager {\r\n private pageViewPerformanceSent: boolean = false;\r\n\r\n private overridePageViewDuration: boolean = false;\r\n\r\n private appInsights: IAppInsightsInternal;\r\n\r\n constructor(\r\n appInsights: IAppInsightsInternal,\r\n overridePageViewDuration: boolean) {\r\n this.overridePageViewDuration = overridePageViewDuration;\r\n this.appInsights = appInsights;\r\n }\r\n\r\n /**\r\n * Currently supported cases:\r\n * 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.\r\n * If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.\r\n * 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.\r\n * 3) overridePageViewDuration = true. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported). \r\n * 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration. \r\n *\r\n * In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.\r\n */\r\n public trackPageView(name?: string, url?: string, properties?: Object, measurements?: Object, duration?: number) {\r\n // ensure we have valid values for the required fields\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n\r\n var pageViewSent = false;\r\n var customDuration = undefined;\r\n\r\n if (Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {\r\n var start = Telemetry.PageViewPerformance.getPerformanceTiming().navigationStart;\r\n customDuration = Telemetry.PageViewPerformance.getDuration(start, +new Date);\r\n\r\n if (!Telemetry.PageViewPerformance.shouldCollectDuration(customDuration)) {\r\n customDuration = undefined;\r\n }\r\n } else {\r\n this.appInsights.sendPageViewInternal(\r\n name,\r\n url,\r\n !isNaN(duration) ? duration : undefined,\r\n properties,\r\n measurements);\r\n this.appInsights.flush();\r\n pageViewSent = true;\r\n }\r\n\r\n if (!pageViewSent && (this.overridePageViewDuration || !isNaN(duration))) {\r\n // 1, 2, 4 cases\r\n this.appInsights.sendPageViewInternal(\r\n name,\r\n url,\r\n !isNaN(duration) ? duration : customDuration,\r\n properties,\r\n measurements);\r\n this.appInsights.flush();\r\n pageViewSent = true;\r\n }\r\n\r\n var maxDurationLimit = 60000;\r\n\r\n if (!Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {\r\n // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.NavigationTimingNotSupported,\r\n \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\r\n return;\r\n }\r\n\r\n var handle = setInterval(() => {\r\n try {\r\n if (Telemetry.PageViewPerformance.isPerformanceTimingDataReady()) {\r\n clearInterval(handle);\r\n var pageViewPerformance = new Telemetry.PageViewPerformance(name, url, null, properties, measurements);\r\n\r\n if (!pageViewPerformance.getIsValid() && !pageViewSent) {\r\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\r\n // That's the best value we can get that makes sense.\r\n this.appInsights.sendPageViewInternal(name, url, customDuration, properties, measurements);\r\n this.appInsights.flush();\r\n } else {\r\n if (!pageViewSent) {\r\n this.appInsights.sendPageViewInternal(name, url, pageViewPerformance.getDurationMs(), properties, measurements);\r\n }\r\n\r\n if (!this.pageViewPerformanceSent) {\r\n this.appInsights.sendPageViewPerformanceInternal(pageViewPerformance);\r\n this.pageViewPerformanceSent = true;\r\n }\r\n this.appInsights.flush();\r\n }\r\n }\r\n else if (Telemetry.PageViewPerformance.getDuration(start, +new Date) > maxDurationLimit) {\r\n clearInterval(handle);\r\n if (!pageViewSent) {\r\n this.appInsights.sendPageViewInternal(name, url, maxDurationLimit, properties, measurements);\r\n this.appInsights.flush();\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackPVFailedCalc,\r\n \"trackPageView failed on page load calculation: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }, 100);\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n /**\r\n * Used to track page visit durations\r\n */\r\n export class PageVisitTimeManager {\r\n\r\n private prevPageVisitDataKeyName: string = \"prevPageVisitData\";\r\n private pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void;\r\n\r\n /**\r\n * Creates a new instance of PageVisitTimeManager\r\n * @param pageVisitTimeTrackingHandler Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)\r\n * @returns {} \r\n */\r\n constructor(pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void) {\r\n this.pageVisitTimeTrackingHandler = pageVisitTimeTrackingHandler;\r\n }\r\n\r\n /**\r\n * Tracks the previous page visit time telemetry (if exists) and starts timing of new page visit time\r\n * @param currentPageName Name of page to begin timing for visit duration\r\n * @param currentPageUrl Url of page to begin timing for visit duration\r\n */\r\n public trackPreviousPageVisit(currentPageName: string, currentPageUrl: string) {\r\n \r\n try {\r\n // Restart timer for new page view\r\n var prevPageVisitTimeData = this.restartPageVisitTimer(currentPageName, currentPageUrl);\r\n \r\n // If there was a page already being timed, track the visit time for it now.\r\n if (prevPageVisitTimeData) {\r\n this.pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);\r\n }\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Auto track page visit time failed, metric will not be collected: \" + Util.dump(e));\r\n }\r\n }\r\n\r\n /**\r\n * Stops timing of current page (if exists) and starts timing for duration of visit to pageName\r\n * @param pageName Name of page to begin timing visit duration\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not. \r\n */\r\n public restartPageVisitTimer(pageName: string, pageUrl: string) {\r\n try {\r\n var prevPageVisitData = this.stopPageVisitTimer();\r\n this.startPageVisitTimer(pageName, pageUrl);\r\n\r\n return prevPageVisitData;\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Call to restart failed: \" + Util.dump(e));\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Starts timing visit duration of pageName\r\n * @param pageName \r\n * @returns {} \r\n */\r\n public startPageVisitTimer(pageName: string, pageUrl: string) {\r\n try {\r\n if (Util.canUseSessionStorage()) {\r\n if (Util.getSessionStorage(this.prevPageVisitDataKeyName) != null) {\r\n throw new Error(\"Cannot call startPageVisit consecutively without first calling stopPageVisit\");\r\n }\r\n\r\n var currPageVisitData = new PageVisitData(pageName, pageUrl);\r\n var currPageVisitDataStr = JSON.stringify(currPageVisitData);\r\n Util.setSessionStorage(this.prevPageVisitDataKeyName, currPageVisitDataStr);\r\n }\r\n } catch (e) {\r\n //TODO: Remove this catch in next phase, since if start is called twice in a row the exception needs to be propagated out\r\n _InternalLogging.warnToConsole(\"Call to start failed: \" + Util.dump(e));\r\n }\r\n }\r\n\r\n /**\r\n * Stops timing of current page, if exists.\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not. \r\n */\r\n public stopPageVisitTimer() {\r\n try {\r\n if (Util.canUseSessionStorage()) {\r\n\r\n // Define end time of page's visit\r\n var pageVisitEndTime = Date.now();\r\n\r\n // Try to retrieve page name and start time from session storage\r\n var pageVisitDataJsonStr = Util.getSessionStorage(this.prevPageVisitDataKeyName);\r\n if (pageVisitDataJsonStr) {\r\n\r\n // if previous page data exists, set end time of visit\r\n var prevPageVisitData: PageVisitData = JSON.parse(pageVisitDataJsonStr);\r\n prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData.pageVisitStartTime;\r\n\r\n // Remove data from storage since we already used it\r\n Util.removeSessionStorage(this.prevPageVisitDataKeyName);\r\n\r\n // Return page visit data\r\n return prevPageVisitData;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n return null;\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Stop page visit timer failed: \" + Util.dump(e));\r\n return null\r\n }\r\n }\r\n }\r\n\r\n export class PageVisitData {\r\n\r\n public pageName: string;\r\n public pageUrl: string;\r\n public pageVisitStartTime: number;\r\n public pageVisitTime: number;\r\n\r\n constructor(pageName, pageUrl) {\r\n this.pageVisitStartTime = Date.now();\r\n this.pageName = pageName;\r\n this.pageUrl = pageUrl;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class FetchMonitor {\r\n private appInsights: AppInsights;\r\n private initialized: boolean;\r\n public static instrumentedByAppInsightsName = \"InstrumentedByAppInsights\";\r\n private currentWindowHost: string;\r\n\r\n constructor(appInsights: Microsoft.ApplicationInsights.AppInsights) {\r\n this.currentWindowHost = window.location.host && window.location.host.toLowerCase();\r\n this.appInsights = appInsights;\r\n this.initialized = false;\r\n this.Init();\r\n }\r\n\r\n private Init(): void {\r\n if (this.supportsMonitoring()) {\r\n this.instrumentFetch();\r\n this.initialized = true;\r\n }\r\n }\r\n\r\n public static DisabledPropertyName: string = \"Microsoft_ApplicationInsights_BypassFetchInstrumentation\";\r\n\r\n private isMonitoredInstance(input: Request | string): boolean {\r\n return this.initialized && input[FetchMonitor.DisabledPropertyName] !== true;\r\n }\r\n\r\n private supportsMonitoring(): boolean {\r\n let result: boolean = true;\r\n\r\n // polyfilled fetch on old browsers (IE) will try to use XMLHttpRequest instead\r\n const fetchPolyfill: string = \"new XMLHttpRequest\";\r\n\r\n if (extensions.IsNullOrUndefined((window as any).Request) ||\r\n extensions.IsNullOrUndefined((window as any).Request.prototype) ||\r\n extensions.IsNullOrUndefined(window.fetch) ||\r\n window.fetch.toString().indexOf(fetchPolyfill) !== -1) {\r\n result = false;\r\n }\r\n return result;\r\n }\r\n\r\n private instrumentFetch(): void {\r\n let originalFetch: (input?: Request | string, init?: RequestInit) => Promise = window.fetch;\r\n let fetchMonitorInstance: FetchMonitor = this;\r\n window.fetch = function fetch(input?: Request | string, init?: RequestInit): Promise {\r\n let ajaxData: ajaxRecord;\r\n if (fetchMonitorInstance.isMonitoredInstance(input)) {\r\n try {\r\n ajaxData = fetchMonitorInstance.createAjaxRecord(input, init);\r\n init = fetchMonitorInstance.includeCorrelationHeaders(ajaxData, input, init);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxOpen,\r\n \"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n return originalFetch(input, init)\r\n .then(response => {\r\n fetchMonitorInstance.onFetchComplete(response, ajaxData);\r\n return response;\r\n })\r\n .catch(reason => {\r\n fetchMonitorInstance.onFetchFailed(input, ajaxData, reason);\r\n throw reason;\r\n });\r\n };\r\n window.fetch[FetchMonitor.instrumentedByAppInsightsName] = true;\r\n }\r\n\r\n private createAjaxRecord(input?: Request | string, init?: RequestInit): ajaxRecord {\r\n // this format corresponds with activity logic on server-side and is required for the correct correlation\r\n let id: string = `|${this.appInsights.context.operation.id}.${Util.newId()}`;\r\n let ajaxData: ajaxRecord = new ajaxRecord(id);\r\n ajaxData.requestSentTime = dateTime.Now();\r\n if (input instanceof Request) {\r\n (input as any).ajaxData = ajaxData;\r\n ajaxData.requestUrl = input ? input.url : \"\";\r\n } else {\r\n ajaxData.requestUrl = input;\r\n }\r\n if (init && init.method) {\r\n ajaxData.method = init.method;\r\n } else if (input && input instanceof Request) {\r\n ajaxData.method = input.method;\r\n } else {\r\n ajaxData.method = \"GET\";\r\n }\r\n return ajaxData;\r\n }\r\n\r\n private includeCorrelationHeaders(ajaxData: ajaxRecord, input?: Request | string, init?: RequestInit) {\r\n if (CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, ajaxData.getAbsoluteUrl(), this.currentWindowHost)) {\r\n if (!init) {\r\n init = {};\r\n }\r\n // init headers override original request headers\r\n // so, if they exist use only them, otherwise use request's because they should have been applied in the first place\r\n // not using original request headers will result in them being lost\r\n init.headers = new Headers(init.headers || (input instanceof Request ? (input.headers || {}) : {}));\r\n init.headers.set(RequestHeaders.requestIdHeader, ajaxData.id);\r\n let appId: string = this.appInsights.context ? this.appInsights.context.appId() : null;\r\n if (appId) {\r\n init.headers.set(RequestHeaders.requestContextHeader, RequestHeaders.requestContextAppIdFormat + appId);\r\n }\r\n }\r\n return init;\r\n }\r\n\r\n private static getFailedFetchDiagnosticsMessage(input: Request | Response | string): string {\r\n let result: string = \"\";\r\n try {\r\n if (!extensions.IsNullOrUndefined(input)) {\r\n if (typeof (input) === \"string\") {\r\n result += `(url: '${input}')`;\r\n } else {\r\n result += `(url: '${input.url}')`;\r\n }\r\n }\r\n // tslint:disable-next-line:no-empty\r\n } catch (e) { }\r\n\r\n return result;\r\n }\r\n\r\n private onFetchComplete(response: Response, ajaxData: ajaxRecord): void {\r\n if (!ajaxData) {\r\n return;\r\n }\r\n try {\r\n ajaxData.responseFinishedTime = dateTime.Now();\r\n ajaxData.CalculateMetrics();\r\n\r\n if (ajaxData.ajaxTotalDuration < 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxDur,\r\n \"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response),\r\n requestSentTime: ajaxData.requestSentTime,\r\n responseFinishedTime: ajaxData.responseFinishedTime\r\n });\r\n } else {\r\n let dependency: Telemetry.RemoteDependencyData = new Telemetry.RemoteDependencyData(\r\n ajaxData.id,\r\n ajaxData.getAbsoluteUrl(),\r\n ajaxData.getPathName(),\r\n ajaxData.ajaxTotalDuration,\r\n response.status >= 200 && response.status < 400,\r\n response.status,\r\n ajaxData.method);\r\n\r\n // enrich dependency target with correlation context from the server\r\n let correlationContext: string = this.getCorrelationContext(response);\r\n if (correlationContext) {\r\n dependency.target = dependency.target + \" | \" + correlationContext;\r\n }\r\n\r\n this.appInsights.trackDependencyData(dependency);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n\r\n private onFetchFailed(input: Request | string, ajaxData: ajaxRecord, reason: any): void {\r\n if (!ajaxData) {\r\n return;\r\n }\r\n try {\r\n ajaxData.responseFinishedTime = dateTime.Now();\r\n ajaxData.CalculateMetrics();\r\n\r\n if (ajaxData.ajaxTotalDuration < 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxDur,\r\n \"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input),\r\n requestSentTime: ajaxData.requestSentTime,\r\n responseFinishedTime: ajaxData.responseFinishedTime\r\n });\r\n } else {\r\n let dependency: Telemetry.RemoteDependencyData = new Telemetry.RemoteDependencyData(\r\n ajaxData.id,\r\n ajaxData.getAbsoluteUrl(),\r\n ajaxData.getPathName(),\r\n ajaxData.ajaxTotalDuration,\r\n false,\r\n 0,\r\n ajaxData.method);\r\n dependency.properties = { error: reason.message };\r\n this.appInsights.trackDependencyData(dependency);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n\r\n private getCorrelationContext(response: Response): string {\r\n try {\r\n let responseHeader: string = response.headers.get(RequestHeaders.requestContextHeader);\r\n return CorrelationIdHelper.getCorrelationContext(responseHeader);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n \r\n // Class allows to perform split testing (aka 'a/b testing' aka 'flights')\r\n // Works similarly to sampling, using the same hashing algorithm under the hood.\r\n // Suggested use:\r\n //\r\n // newShinyFeature.enabled = false;\r\n // if (new SplitTest.isEnabled(, )){\r\n // newShinyFeature.enabled = true;\r\n // }\r\n //\r\n export class SplitTest {\r\n private hashCodeGeneragor: HashCodeScoreGenerator = new HashCodeScoreGenerator();\r\n\r\n public isEnabled(key: string, percentEnabled: number) {\r\n return this.hashCodeGeneragor.getHashCodeScore(key) < percentEnabled;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export var Version = \"1.0.19\";\r\n\r\n /**\r\n * Internal interface to pass appInsights object to subcomponents without coupling \r\n */\r\n export interface IAppInsightsInternal {\r\n sendPageViewInternal(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object);\r\n sendPageViewPerformanceInternal(pageViewPerformance: ApplicationInsights.Telemetry.PageViewPerformance);\r\n flush();\r\n }\r\n\r\n /**\r\n * The main API that sends telemetry to Application Insights.\r\n * Learn more: http://go.microsoft.com/fwlink/?LinkID=401493\r\n */\r\n export class AppInsights implements IAppInsightsInternal, IAppInsights {\r\n\r\n // Counts number of trackAjax invokations.\r\n // By default we only monitor X ajax call per view to avoid too much load.\r\n // Default value is set in config.\r\n // This counter keeps increasing even after the limit is reached.\r\n private _trackAjaxAttempts: number = 0;\r\n\r\n private _eventTracking: Timing;\r\n private _pageTracking: Timing;\r\n private _pageViewManager: Microsoft.ApplicationInsights.Telemetry.PageViewManager;\r\n private _pageVisitTimeManager: Microsoft.ApplicationInsights.Telemetry.PageVisitTimeManager;\r\n private _ajaxMonitor: Microsoft.ApplicationInsights.AjaxMonitor;\r\n private _fetchMonitor: Microsoft.ApplicationInsights.FetchMonitor;\r\n\r\n public config: IConfig;\r\n public context: TelemetryContext;\r\n public queue: (() => void)[];\r\n public static defaultConfig: IConfig;\r\n\r\n constructor(config: IConfig) {\r\n this.config = config || {};\r\n\r\n // load default values if specified\r\n var defaults: IConfig = AppInsights.defaultConfig;\r\n if (defaults !== undefined) {\r\n for (var field in defaults) {\r\n // for each unspecified field, set the default value\r\n if (this.config[field] === undefined) {\r\n this.config[field] = defaults[field];\r\n }\r\n }\r\n }\r\n\r\n _InternalLogging.verboseLogging = () => this.config.verboseLogging;\r\n _InternalLogging.enableDebugExceptions = () => this.config.enableDebug;\r\n var configGetters: ApplicationInsights.ITelemetryConfig = {\r\n instrumentationKey: () => this.config.instrumentationKey,\r\n accountId: () => this.config.accountId,\r\n sessionRenewalMs: () => this.config.sessionRenewalMs,\r\n sessionExpirationMs: () => this.config.sessionExpirationMs,\r\n endpointUrl: () => this.config.endpointUrl,\r\n emitLineDelimitedJson: () => this.config.emitLineDelimitedJson,\r\n maxBatchSizeInBytes: () => {\r\n return (!this.config.isBeaconApiDisabled && Util.IsBeaconApiSupported()) ?\r\n Math.min(this.config.maxBatchSizeInBytes, Sender.MaxBeaconPayloadSize) :\r\n this.config.maxBatchSizeInBytes;\r\n },\r\n maxBatchInterval: () => this.config.maxBatchInterval,\r\n disableTelemetry: () => this.config.disableTelemetry,\r\n sampleRate: () => this.config.samplingPercentage,\r\n cookieDomain: () => this.config.cookieDomain,\r\n enableSessionStorageBuffer: () => {\r\n // Disable Session Storage buffer if telemetry is sent using Beacon API\r\n return ((this.config.isBeaconApiDisabled || !Util.IsBeaconApiSupported()) && this.config.enableSessionStorageBuffer);\r\n },\r\n isRetryDisabled: () => this.config.isRetryDisabled,\r\n isBeaconApiDisabled: () => this.config.isBeaconApiDisabled,\r\n sdkExtension: () => this.config.sdkExtension,\r\n isBrowserLinkTrackingEnabled: () => this.config.isBrowserLinkTrackingEnabled,\r\n appId: () => this.config.appId,\r\n }\r\n\r\n if (this.config.isCookieUseDisabled) {\r\n Util.disableCookies();\r\n }\r\n\r\n if (this.config.isStorageUseDisabled) {\r\n Util.disableStorage();\r\n }\r\n\r\n this.context = new ApplicationInsights.TelemetryContext(configGetters);\r\n\r\n this._pageViewManager = new Microsoft.ApplicationInsights.Telemetry.PageViewManager(this, this.config.overridePageViewDuration);\r\n\r\n // initialize event timing\r\n this._eventTracking = new Timing(\"trackEvent\");\r\n this._eventTracking.action = (name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => {\r\n if (!measurements) {\r\n measurements = { duration: duration };\r\n }\r\n else {\r\n // do not override existing duration value\r\n if (isNaN(measurements[\"duration\"])) {\r\n measurements[\"duration\"] = duration;\r\n }\r\n }\r\n var event = new Telemetry.Event(name, properties, measurements);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Event.dataType, event);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Event.envelopeType);\r\n\r\n this.context.track(envelope);\r\n }\r\n\r\n // initialize page view timing\r\n this._pageTracking = new Timing(\"trackPageView\");\r\n this._pageTracking.action = (name, url, duration, properties, measurements) => {\r\n this.sendPageViewInternal(name, url, duration, properties, measurements);\r\n }\r\n\r\n this._pageVisitTimeManager = new ApplicationInsights.Telemetry.PageVisitTimeManager(\r\n (pageName, pageUrl, pageVisitTime) => this.trackPageVisitTime(pageName, pageUrl, pageVisitTime));\r\n\r\n if (!this.config.disableAjaxTracking) {\r\n this._ajaxMonitor = new Microsoft.ApplicationInsights.AjaxMonitor(this);\r\n }\r\n\r\n if (!this.config.disableFetchTracking) {\r\n this._fetchMonitor = new Microsoft.ApplicationInsights.FetchMonitor(this);\r\n }\r\n }\r\n\r\n public sendPageViewInternal(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) {\r\n var pageView = new Telemetry.PageView(name, url, duration, properties, measurements, this.context.operation.id);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.PageView.dataType, pageView);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.PageView.envelopeType);\r\n\r\n this.context.track(envelope);\r\n\r\n // reset ajaxes counter\r\n this._trackAjaxAttempts = 0;\r\n }\r\n\r\n public sendPageViewPerformanceInternal(pageViewPerformance: ApplicationInsights.Telemetry.PageViewPerformance) {\r\n var pageViewPerformanceData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.PageViewPerformance.dataType, pageViewPerformance);\r\n var pageViewPerformanceEnvelope = new Telemetry.Common.Envelope(pageViewPerformanceData, Telemetry.PageViewPerformance.envelopeType);\r\n this.context.track(pageViewPerformanceEnvelope);\r\n }\r\n\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens. \r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n public startTrackPage(name?: string) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n this._pageTracking.start(name);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StartTrackFailed,\r\n \"startTrackPage failed, page view may not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public stopTrackPage(name?: string, url?: string, properties?: Object, measurements?: Object) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n\r\n this._pageTracking.stop(name, url, properties, measurements);\r\n\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StopTrackFailed,\r\n \"stopTrackPage failed, page view will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Logs that a page or other item was viewed. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.\r\n */\r\n public trackPageView(name?: string, url?: string, properties?: Object, measurements?: Object, duration?: number) {\r\n try {\r\n this._pageViewManager.trackPageView(name, url, properties, measurements, duration);\r\n\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackPVFailed,\r\n \"trackPageView failed, page view will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n public startTrackEvent(name: string) {\r\n try {\r\n this._eventTracking.start(name);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StartTrackEventFailed,\r\n \"startTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /** \r\n * Log an extended event that you started timing with {@link startTrackEvent}.\r\n * @param name The string you used to identify this event in startTrackEvent.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public stopTrackEvent(name: string, properties?: Object, measurements?: Object) {\r\n try {\r\n this._eventTracking.stop(name, undefined, properties, measurements);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StopTrackEventFailed,\r\n \"stopTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /** \r\n * Log a user action or other occurrence.\r\n * @param name A string to identify this event in the portal.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public trackEvent(name: string, properties?: Object, measurements?: Object) {\r\n try {\r\n var eventTelemetry = new Telemetry.Event(name, properties, measurements);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Event.dataType, eventTelemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Event.envelopeType);\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackEventFailed,\r\n \"trackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a dependency call\r\n * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id.\r\n * @param method represents request verb (GET, POST, etc.)\r\n * @param absoluteUrl absolute url used to make the dependency request\r\n * @param command command name \r\n * @param totalTime total request time\r\n * @param success indicates if the request was sessessful\r\n * @param resultCode response code returned by the dependency request\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public trackDependency(id: string, method: string, absoluteUrl: string, command: string, totalTime: number, success: boolean, resultCode: number, properties?: Object, measurements?: Object) {\r\n if (this.config.maxAjaxCallsPerView === -1 ||\r\n this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) {\r\n var dependency = new Telemetry.RemoteDependencyData(id, absoluteUrl, command, totalTime, success, resultCode, method, properties, measurements);\r\n var dependencyData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.RemoteDependencyData.dataType, dependency);\r\n var envelope = new Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType);\r\n this.context.track(envelope);\r\n } else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MaxAjaxPerPVExceeded,\r\n \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\",\r\n true);\r\n }\r\n\r\n ++this._trackAjaxAttempts;\r\n }\r\n\r\n /**\r\n * Logs dependency call\r\n * @param dependencyData dependency data object\r\n */\r\n public trackDependencyData(dependency: Telemetry.RemoteDependencyData) {\r\n if (this.config.maxAjaxCallsPerView === -1 || this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) {\r\n var dependencyData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.RemoteDependencyData.dataType, dependency);\r\n var envelope = new Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType);\r\n this.context.track(envelope);\r\n } else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MaxAjaxPerPVExceeded,\r\n \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\",\r\n true);\r\n }\r\n\r\n ++this._trackAjaxAttempts;\r\n }\r\n\r\n /**\r\n * trackAjax method is obsolete, use trackDependency instead\r\n */\r\n public trackAjax(id: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, method?: string) {\r\n this.trackDependency(id, null, absoluteUrl, pathName, totalTime, success, resultCode);\r\n }\r\n\r\n /**\r\n * Log an exception you have caught.\r\n * @param exception An Error from a catch clause, or the string error message.\r\n * @param handledAt Not used\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n public trackException(exception: Error, handledAt?: string, properties?: Object, measurements?: Object, severityLevel?: AI.SeverityLevel) {\r\n try {\r\n if (!Util.isError(exception)) {\r\n // ensure that we have an error object (user could pass a string/message)\r\n try {\r\n throw new Error(exception);\r\n } catch (error) {\r\n exception = error;\r\n }\r\n }\r\n\r\n var exceptionTelemetry = new Telemetry.Exception(exception, properties, measurements, severityLevel);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Exception.dataType, exceptionTelemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Exception.envelopeType);\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackExceptionFailed,\r\n \"trackException failed, exception will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.\r\n * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the \r\n * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.\r\n * @param name A string that identifies the metric.\r\n * @param average Number representing either a single measurement, or the average of several measurements.\r\n * @param sampleCount The number of measurements represented by the average. Defaults to 1.\r\n * @param min The smallest measurement in the sample. Defaults to the average.\r\n * @param max The largest measurement in the sample. Defaults to the average.\r\n */\r\n public trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: Object) {\r\n try {\r\n var telemetry = new Telemetry.Metric(name, average, sampleCount, min, max, properties);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Metric.dataType, telemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Metric.envelopeType);\r\n\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackMetricFailed,\r\n \"trackMetric failed, metric will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a diagnostic message. \r\n * @param message A message string \r\n * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n public trackTrace(message: string, properties?: Object, severityLevel?: AI.SeverityLevel) {\r\n try {\r\n var telemetry = new Telemetry.Trace(message, properties, severityLevel);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Trace.dataType, telemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Trace.envelopeType);\r\n\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.TrackTraceFailed,\r\n \"trackTrace failed, trace will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a page visit time\r\n * @param pageName Name of page\r\n * @param pageVisitDuration Duration of visit to the page in milleseconds\r\n */\r\n private trackPageVisitTime(pageName: string, pageUrl: string, pageVisitTime: number) {\r\n var properties = { PageName: pageName, PageUrl: pageUrl };\r\n this.trackMetric(\"PageVisitTime\", pageVisitTime, 1, pageVisitTime, pageVisitTime, properties);\r\n }\r\n\r\n /**\r\n * Immediately send all queued telemetry.\r\n * @param {boolean} async - If flush should be call asynchronously\r\n */\r\n public flush(async = true) {\r\n try {\r\n this.context._sender.triggerSend(async);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FlushFailed,\r\n \"flush failed, telemetry will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Sets the authenticated user id and the account id.\r\n * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\r\n * \r\n * By default the method will only set the authUserID and accountId for all events in this page view. To add them to all events within\r\n * the whole session, you should either call this method on every page view or set `storeInCookie = true`. \r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n * @param storeInCookie {boolean} - AuthenticateUserID will be stored in a cookie and added to all events within this session. \r\n */\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false) {\r\n try {\r\n this.context.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailed,\r\n \"Setting auth user context failed. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) },\r\n true);\r\n }\r\n }\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n */\r\n public clearAuthenticatedUserContext() {\r\n try {\r\n this.context.user.clearAuthenticatedUserContext();\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailed,\r\n \"Clearing auth user context failed. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) },\r\n true);\r\n }\r\n }\r\n\r\n /**\r\n * In case of CORS exceptions - construct an exception manually.\r\n * See this for more info: http://stackoverflow.com/questions/5913978/cryptic-script-error-reported-in-javascript-in-chrome-and-firefox\r\n */\r\n private SendCORSException(properties: any) {\r\n var exceptionData = Microsoft.ApplicationInsights.Telemetry.Exception.CreateSimpleException(\r\n \"Script error.\",\r\n \"Error\", \"unknown\", \"unknown\",\r\n \"The browser's same-origin policy prevents us from getting the details of this exception. Consider using 'crossorigin' attribute.\",\r\n 0);\r\n exceptionData.properties = properties;\r\n\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Exception.dataType, exceptionData);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Exception.envelopeType);\r\n this.context.track(envelope);\r\n }\r\n\r\n /**\r\n * The custom error handler for Application Insights\r\n * @param {string} message - The error message\r\n * @param {string} url - The url where the error was raised\r\n * @param {number} lineNumber - The line number where the error was raised\r\n * @param {number} columnNumber - The column number for the line where the error was raised\r\n * @param {Error} error - The Error object\r\n */\r\n public _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error) {\r\n try {\r\n var properties = { url: url ? url : document.URL };\r\n\r\n if (Util.isCrossOriginError(message, url, lineNumber, columnNumber, error)) {\r\n this.SendCORSException(properties);\r\n } else {\r\n if (!Util.isError(error)) {\r\n var stack = \"window.onerror@\" + properties.url + \":\" + lineNumber + \":\" + (columnNumber || 0);\r\n error = new Error(message);\r\n error[\"stack\"] = stack;\r\n }\r\n this.trackException(error, null, properties);\r\n }\r\n } catch (exception) {\r\n var errorString =\r\n error ? (error.name + \", \" + error.message) : \"null\";\r\n\r\n var exceptionDump: string = Util.dump(exception);\r\n\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.ExceptionWhileLoggingError,\r\n \"_onerror threw exception while logging error, error will not be collected: \" + Util.getExceptionName(exception),\r\n { exception: exceptionDump, errorString: errorString });\r\n }\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Used to record timed events and page views.\r\n */\r\n class Timing {\r\n private _name;\r\n private _action: (ITimingDetail, number) => void;\r\n private _events: {\r\n [key: string]: number;\r\n };\r\n\r\n constructor(name: string) {\r\n this._name = name;\r\n this._events = {};\r\n }\r\n\r\n public start(name: string) {\r\n if (typeof this._events[name] !== \"undefined\") {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.StartCalledMoreThanOnce, \"start was called more than once for this event without calling stop.\",\r\n { name: this._name, key: name }, true);\r\n }\r\n\r\n this._events[name] = +new Date;\r\n }\r\n\r\n public stop(name: string, url: string, properties?: Object, measurements?: Object) {\r\n var start = this._events[name];\r\n if (isNaN(start)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.StopCalledWithoutStart, \"stop was called without a corresponding start.\",\r\n { name: this._name, key: name }, true);\r\n } else {\r\n var end = +new Date;\r\n var duration = Telemetry.PageViewPerformance.getDuration(start, end);\r\n this.action(name, url, duration, properties, measurements);\r\n }\r\n\r\n delete this._events[name];\r\n this._events[name] = undefined;\r\n }\r\n\r\n public action: (name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => void;\r\n }\r\n}\r\n","module Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n /* Data loss analyzer is disabled by default.\r\n * Uncomment code in Sender, SendBuffer and unit tests if you want to enable it\r\n */\r\n export class DataLossAnalyzer {\r\n static enabled = false;\r\n static appInsights: Microsoft.ApplicationInsights.AppInsights;\r\n static issuesReportedForThisSession;\r\n static itemsRestoredFromSessionBuffer: number = 0;\r\n static LIMIT_PER_SESSION = 10;\r\n static ITEMS_QUEUED_KEY = \"AI_itemsQueued\";\r\n static ISSUES_REPORTED_KEY = \"AI_lossIssuesReported\";\r\n\r\n static reset() {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, \"0\");\r\n Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, \"0\");\r\n DataLossAnalyzer.itemsRestoredFromSessionBuffer = 0;\r\n }\r\n }\r\n\r\n private static isEnabled(): boolean {\r\n return DataLossAnalyzer.enabled &&\r\n DataLossAnalyzer.appInsights != null &&\r\n DataLossAnalyzer.appInsights.context._sender._XMLHttpRequestSupported &&\r\n Util.canUseSessionStorage()\r\n }\r\n\r\n static getIssuesReported(): number {\r\n var result =\r\n (!DataLossAnalyzer.isEnabled() || isNaN(+Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY))) ?\r\n 0 :\r\n +Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY);\r\n\r\n return result;\r\n }\r\n\r\n static incrementItemsQueued() {\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n var itemsQueued: number = DataLossAnalyzer.getNumberOfLostItems();\r\n ++itemsQueued;\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString());\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n static decrementItemsQueued(countOfItemsSentSuccessfully: number) {\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n var itemsQueued: number = DataLossAnalyzer.getNumberOfLostItems();\r\n itemsQueued -= countOfItemsSentSuccessfully;\r\n if (itemsQueued < 0) itemsQueued = 0;\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString());\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n static getNumberOfLostItems(): number {\r\n var result: number = 0;\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n result = isNaN(+Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY)) ?\r\n 0 :\r\n +Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY);\r\n }\r\n } catch (e) {\r\n result = 0;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n static reportLostItems() {\r\n try {\r\n if (DataLossAnalyzer.isEnabled() &&\r\n DataLossAnalyzer.getIssuesReported() < DataLossAnalyzer.LIMIT_PER_SESSION &&\r\n DataLossAnalyzer.getNumberOfLostItems() > 0) {\r\n\r\n var lostItems = DataLossAnalyzer.getNumberOfLostItems() - DataLossAnalyzer.itemsRestoredFromSessionBuffer;\r\n\r\n DataLossAnalyzer.appInsights.trackTrace(\r\n \"AI (Internal): Internal report DATALOSS:\\\"\" + lostItems + \"\\\"\",\r\n null);\r\n DataLossAnalyzer.appInsights.flush();\r\n\r\n var issuesReported: number = DataLossAnalyzer.getIssuesReported();\r\n ++issuesReported;\r\n Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, issuesReported.toString());\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToReportDataLoss,\r\n \"Failed to report data loss: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n finally {\r\n try {\r\n DataLossAnalyzer.reset();\r\n } catch (e) { }\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface Snippet {\r\n queue: Array<() => void>;\r\n config: IConfig;\r\n }\r\n\r\n export class Initialization {\r\n public snippet: Snippet;\r\n public config: IConfig;\r\n\r\n constructor(snippet: Snippet) {\r\n // initialize the queue and config in case they are undefined\r\n snippet.queue = snippet.queue || [];\r\n var config: IConfig = snippet.config || {};\r\n\r\n // ensure instrumentationKey is specified\r\n if (config && !config.instrumentationKey) {\r\n config = snippet;\r\n\r\n // check for legacy instrumentation key\r\n if (config[\"iKey\"]) {\r\n Microsoft.ApplicationInsights.Version = \"0.10.0.0\";\r\n config.instrumentationKey = config[\"iKey\"];\r\n } else if (config[\"applicationInsightsId\"]) {\r\n Microsoft.ApplicationInsights.Version = \"0.7.2.0\";\r\n config.instrumentationKey = config[\"applicationInsightsId\"];\r\n } else {\r\n throw new Error(\"Cannot load Application Insights SDK, no instrumentationKey was provided.\");\r\n }\r\n }\r\n\r\n // set default values\r\n config = Initialization.getDefaultConfig(config);\r\n\r\n this.snippet = snippet;\r\n this.config = config;\r\n }\r\n\r\n // note: these are split into methods to enable unit tests\r\n public loadAppInsights() {\r\n\r\n // initialize global instance of appInsights\r\n var appInsights = new Microsoft.ApplicationInsights.AppInsights(this.config);\r\n\r\n // implement legacy version of trackPageView for 0.10<\r\n if (this.config[\"iKey\"]) {\r\n var originalTrackPageView = appInsights.trackPageView;\r\n appInsights.trackPageView = (pagePath?: string, properties?: Object, measurements?: Object) => {\r\n originalTrackPageView.apply(appInsights, [null, pagePath, properties, measurements]);\r\n }\r\n }\r\n\r\n // implement legacy pageView interface if it is present in the snippet\r\n var legacyPageView = \"logPageView\";\r\n if (typeof this.snippet[legacyPageView] === \"function\") {\r\n appInsights[legacyPageView] = (pagePath?: string, properties?: Object, measurements?: Object) => {\r\n appInsights.trackPageView(null, pagePath, properties, measurements);\r\n }\r\n }\r\n\r\n // implement legacy event interface if it is present in the snippet\r\n var legacyEvent = \"logEvent\";\r\n if (typeof this.snippet[legacyEvent] === \"function\") {\r\n appInsights[legacyEvent] = (name: string, properties?: Object, measurements?: Object) => {\r\n appInsights.trackEvent(name, properties, measurements);\r\n }\r\n }\r\n\r\n return appInsights;\r\n }\r\n\r\n public emptyQueue() {\r\n\r\n // call functions that were queued before the main script was loaded\r\n try {\r\n if (Microsoft.ApplicationInsights.Util.isArray(this.snippet.queue)) {\r\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\r\n var length = this.snippet.queue.length;\r\n for (var i = 0; i < length; i++) {\r\n var call = this.snippet.queue[i];\r\n call();\r\n }\r\n\r\n this.snippet.queue = undefined;\r\n delete this.snippet.queue;\r\n }\r\n } catch (exception) {\r\n var properties: any = {};\r\n if (exception && typeof exception.toString === \"function\") {\r\n properties.exception = exception.toString();\r\n }\r\n Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedToSendQueuedTelemetry,\r\n \"Failed to send queued telemetry\",\r\n properties);\r\n }\r\n }\r\n\r\n public pollInteralLogs(appInsightsInstance: AppInsights) {\r\n return setInterval(() => {\r\n var queue: Array<_InternalLogMessage> = Microsoft.ApplicationInsights._InternalLogging.queue;\r\n var length = queue.length;\r\n for (var i = 0; i < length; i++) {\r\n appInsightsInstance.trackTrace(queue[i].message);\r\n }\r\n queue.length = 0;\r\n }, this.config.diagnosticLogInterval);\r\n }\r\n\r\n public addHousekeepingBeforeUnload(appInsightsInstance: AppInsights): void {\r\n // Add callback to push events when the user navigates away\r\n\r\n if (!appInsightsInstance.config.disableFlushOnBeforeUnload && ('onbeforeunload' in window)) {\r\n var performHousekeeping = function () {\r\n // Adds the ability to flush all data before the page unloads.\r\n // Note: This approach tries to push an async request with all the pending events onbeforeunload.\r\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\r\n // Telemetry here will help us analyze how effective this approach is.\r\n // Another approach would be to make this call sync with a acceptable timeout to reduce the \r\n // impact on user experience.\r\n appInsightsInstance.context._sender.triggerSend();\r\n\r\n // Back up the current session to local storage\r\n // This lets us close expired sessions after the cookies themselves expire\r\n appInsightsInstance.context._sessionManager.backup();\r\n };\r\n\r\n if (!Microsoft.ApplicationInsights.Util.addEventHandler('beforeunload', performHousekeeping)) {\r\n Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n Microsoft.ApplicationInsights.LoggingSeverity.CRITICAL,\r\n Microsoft.ApplicationInsights._InternalMessageId.FailedToAddHandlerForOnBeforeUnload,\r\n 'Could not add handler for beforeunload');\r\n }\r\n }\r\n }\r\n\r\n public static getDefaultConfig(config?: IConfig): IConfig {\r\n if (!config) {\r\n config = {};\r\n }\r\n\r\n // set default values\r\n config.endpointUrl = config.endpointUrl || \"https://dc.services.visualstudio.com/v2/track\";\r\n config.sessionRenewalMs = 30 * 60 * 1000;\r\n config.sessionExpirationMs = 24 * 60 * 60 * 1000;\r\n config.maxBatchSizeInBytes = config.maxBatchSizeInBytes > 0 ? config.maxBatchSizeInBytes : 102400; // 100kb\r\n config.maxBatchInterval = !isNaN(config.maxBatchInterval) ? config.maxBatchInterval : 15000;\r\n config.enableDebug = Util.stringToBoolOrDefault(config.enableDebug);\r\n config.disableExceptionTracking = Util.stringToBoolOrDefault(config.disableExceptionTracking);\r\n config.disableTelemetry = Util.stringToBoolOrDefault(config.disableTelemetry);\r\n config.verboseLogging = Util.stringToBoolOrDefault(config.verboseLogging);\r\n config.emitLineDelimitedJson = Util.stringToBoolOrDefault(config.emitLineDelimitedJson);\r\n config.diagnosticLogInterval = config.diagnosticLogInterval || 10000;\r\n config.autoTrackPageVisitTime = Util.stringToBoolOrDefault(config.autoTrackPageVisitTime);\r\n\r\n if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) {\r\n config.samplingPercentage = 100;\r\n }\r\n\r\n config.disableAjaxTracking = Util.stringToBoolOrDefault(config.disableAjaxTracking);\r\n config.disableFetchTracking = Util.stringToBoolOrDefault(config.disableFetchTracking, true);\r\n config.maxAjaxCallsPerView = !isNaN(config.maxAjaxCallsPerView) ? config.maxAjaxCallsPerView : 500;\r\n \r\n config.isBeaconApiDisabled = Util.stringToBoolOrDefault(config.isBeaconApiDisabled, true);\r\n config.disableCorrelationHeaders = Util.stringToBoolOrDefault(config.disableCorrelationHeaders);\r\n config.correlationHeaderExcludedDomains = config.correlationHeaderExcludedDomains || [\r\n \"*.blob.core.windows.net\", \r\n \"*.blob.core.chinacloudapi.cn\",\r\n \"*.blob.core.cloudapi.de\",\r\n \"*.blob.core.usgovcloudapi.net\"];\r\n config.disableFlushOnBeforeUnload = Util.stringToBoolOrDefault(config.disableFlushOnBeforeUnload);\r\n config.enableSessionStorageBuffer = Util.stringToBoolOrDefault(config.enableSessionStorageBuffer, true);\r\n config.isRetryDisabled = Util.stringToBoolOrDefault(config.isRetryDisabled);\r\n config.isCookieUseDisabled = Util.stringToBoolOrDefault(config.isCookieUseDisabled);\r\n config.isStorageUseDisabled = Util.stringToBoolOrDefault(config.isStorageUseDisabled);\r\n config.isBrowserLinkTrackingEnabled = Util.stringToBoolOrDefault(config.isBrowserLinkTrackingEnabled);\r\n config.enableCorsCorrelation = Util.stringToBoolOrDefault(config.enableCorsCorrelation);\r\n \r\n return config;\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n try {\r\n // only initialize if we are running in a browser that supports JSON serialization (ie7<, node.js, cordova)\r\n if (typeof window !== \"undefined\" && typeof JSON !== \"undefined\") {\r\n // get snippet or initialize to an empty object\r\n var aiName = \"appInsights\";\r\n \r\n if (window[aiName] === undefined) {\r\n // if no snippet is present, initialize default values\r\n Microsoft.ApplicationInsights.AppInsights.defaultConfig = Microsoft.ApplicationInsights.Initialization.getDefaultConfig();\r\n } else {\r\n // this is the typical case for browser+snippet\r\n var snippet: Microsoft.ApplicationInsights.Snippet = window[aiName] || {};\r\n \r\n // overwrite snippet with full appInsights\r\n var init = new Microsoft.ApplicationInsights.Initialization(snippet);\r\n var appInsightsLocal = init.loadAppInsights();\r\n\r\n // apply full appInsights to the global instance that was initialized in the snippet\r\n for (var field in appInsightsLocal) {\r\n snippet[field] = appInsightsLocal[field];\r\n }\r\n \r\n init.emptyQueue();\r\n \r\n init.pollInteralLogs(appInsightsLocal);\r\n \r\n init.addHousekeepingBeforeUnload(appInsightsLocal);\r\n }\r\n }\r\n } catch (e) {\r\n Microsoft.ApplicationInsights._InternalLogging.warnToConsole('Failed to initialize AppInsights JS SDK: ' + e.message);\r\n }\r\n}\r\n"]} \ No newline at end of file +{"version":3,"sources":["../JavaScript/JavaScriptSDK.Interfaces/IConfig.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Base.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Envelope.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IApplication.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IDevice.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IInternal.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ILocation.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IOperation.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ISample.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IUser.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ISession.ts","../JavaScript/JavaScriptSDK.Interfaces/Telemetry/ISerializable.ts","../JavaScript/JavaScriptSDK.Interfaces/Telemetry/IEnvelope.ts","../JavaScript/JavaScriptSDK.Interfaces/ITelemetryContext.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/SeverityLevel.ts","../JavaScript/JavaScriptSDK.Interfaces/IAppInsights.ts","../JavaScript/JavaScriptSDK/Logging.ts","../JavaScript/JavaScriptSDK/UtilHelpers.ts","../JavaScript/JavaScriptSDK/Util.ts","../JavaScript/JavaScriptSDK/Serializer.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Envelope.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Base.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ContextTagKeys.ts","../JavaScript/JavaScriptSDK/Context/Application.ts","../JavaScript/JavaScriptSDK/Context/Device.ts","../JavaScript/JavaScriptSDK/Context/Internal.ts","../JavaScript/JavaScriptSDK/Context/Location.ts","../JavaScript/JavaScriptSDK/Context/Operation.ts","../JavaScript/JavaScriptSDK/HashCodeScoreGenerator.ts","../JavaScript/JavaScriptSDK/SamplingScoreGenerator.ts","../JavaScript/JavaScriptSDK/Context/Sample.ts","../JavaScript/JavaScriptSDK/Context/Session.ts","../JavaScript/JavaScriptSDK/Context/User.ts","../JavaScript/JavaScriptSDK/ajax/ajaxUtils.ts","../JavaScript/JavaScriptSDK/ajax/ajaxRecord.ts","../JavaScript/JavaScriptSDK/RequestResponseHeaders.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Domain.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/EventData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/PageViewData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/RemoteDependencyData.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/DataSanitizer.ts","../JavaScript/JavaScriptSDK/Telemetry/RemoteDependencyData.ts","../JavaScript/JavaScriptSDK/ajax/ajax.ts","../JavaScript/JavaScriptSDK/SendBuffer.ts","../JavaScript/JavaScriptSDK/Sender.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/MessageData.ts","../JavaScript/JavaScriptSDK/Telemetry/Trace.ts","../JavaScript/JavaScriptSDK/Telemetry/Event.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ExceptionDetails.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ExceptionData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/StackFrame.ts","../JavaScript/JavaScriptSDK/Telemetry/Exception.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/DataPointType.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/DataPoint.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/MetricData.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/DataPoint.ts","../JavaScript/JavaScriptSDK/Telemetry/Metric.ts","../JavaScript/JavaScriptSDK/Telemetry/PageView.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/PageViewPerfData.ts","../JavaScript/JavaScriptSDK/Telemetry/PageViewPerformance.ts","../JavaScript/JavaScriptSDK/TelemetryContext.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Data.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Data.ts","../JavaScript/JavaScriptSDK/Telemetry/PageViewManager.ts","../JavaScript/JavaScriptSDK/Telemetry/PageVisitTimeManager.ts","../JavaScript/JavaScriptSDK/SplitTest.ts","../JavaScript/JavaScriptSDK/AppInsights.ts","../JavaScript/JavaScriptSDK/DataLossAnalyzer.ts","../JavaScript/JavaScriptSDK/Initialization.ts","../JavaScript/JavaScriptSDK/Init.ts"],"names":["Microsoft","ApplicationInsights","Telemetry","Base","Envelope","this","ver","sampleRate","tags","Context","AI","SeverityLevel","LoggingSeverity","_InternalMessageId","_InternalLogMessage","msgId","msg","isUserAct","properties","messageId","message","AiUserActionablePrefix","AiNonUserActionablePrefix","toString","diagnosticText","sanitizeDiagnosticText","JSON","stringify","text","replace","_InternalLogging","throwInternal","severity","enableDebugExceptions","messageKey","_messageLogged","verboseLogging","warnToConsole","logInternalMessage","console","warn","log","resetInternalMessageCount","_messageCount","clearInternalMessageLoggedTypes","Util","canUseSessionStorage","sessionStorageKeys","getSessionStorageKeys","i","length","indexOf","AIInternalMessagePrefix","removeSessionStorage","setMaxInternalMessageLimit","limit","Error","MAX_INTERNAL_MESSAGE_LIMIT","_areInternalMessagesThrottled","logMessage","getSessionStorage","setSessionStorage","CRITICAL","queue","push","throttleLimitMessage","throttleMessage","MessageLimitPerPVExceeded","UtilHelpers","newId","result","random","Math","charAt","floor","StorageType","disableStorage","_canUseLocalStorage","_canUseSessionStorage","_getLocalStorageObject","canUseLocalStorage","_getVerifiedStorageObject","LocalStorage","storageType","fail","uid","storage","Date","window","localStorage","sessionStorage","setItem","getItem","removeItem","exception","isInternalApplicationInsightsEndpoint","endpointUrl","_internalEndpoints","toLowerCase","undefined","getStorage","name","e","WARNING","BrowserCannotReadLocalStorage","getExceptionName","dump","setStorage","data","BrowserCannotWriteLocalStorage","removeStorage","BrowserFailedRemovalFromLocalStorage","_getSessionStorageObject","SessionStorage","keys","key","BrowserCannotReadSessionStorage","BrowserCannotWriteSessionStorage","BrowserFailedRemovalFromSessionStorage","disableCookies","_canUseCookies","canUseCookies","document","cookie","CannotAccessCookie","setCookie","value","domain","domainAttrib","secureAttrib","location","protocol","stringToBoolOrDefault","str","defaultValue","getCookie","cookieName","cookies","split","trim","substring","deleteCookie","isArray","obj","Object","prototype","call","isError","isDate","toISOStringForIE8","date","toISOString","pad","number","r","String","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","slice","getIEVersion","userAgentStr","myNav","navigator","userAgent","parseInt","msToTimeSpan","totalms","isNaN","ms","round","sec","min","hour","days","isCrossOriginError","url","lineNumber","columnNumber","error","object","objectTypeDump","propertyValueDump","stack","addEventHandler","eventName","callback","verbEventName","addEventListener","IsBeaconApiSupported","sendBeacon","NotSpecified","UrlHelper","parseUrl","htmlAnchorElement","createElement","href","getAbsoluteUrl","a","getPathName","pathname","getCompleteUrl","method","absoluteUrl","toUpperCase","CorrelationIdHelper","canIncludeCorrelationHeader","config","requestUrl","currentHost","disableCorrelationHeaders","requestHost","host","enableCorsCorrelation","excludedDomains","correlationHeaderExcludedDomains","RegExp","test","getCorrelationContext","responseHeader","correlationId","getCorrelationContextValue","RequestHeaders","requestContextTargetKey","correlationIdPrefix","keyValues","keyValue","FieldType","Serializer","serialize","input","output","_serializeObject","source","CannotSerializeObject","CircularReferenceDetected","aiDataContract","_serializeStringMap","_serializeArray","CannotSerializeObjectNonSerializable","field","contract","isRequired","Required","isHidden","Hidden","Array","isPresent","isObject","MissingRequiredFieldSpecification","sources","item","ItemNotInArray","map","expectedType","num","parseFloat","Common","_super","_this","DataSanitizer","sanitizeString","time","iKey","__extends","apply","arguments","ContextTagKeys","applicationVersion","applicationBuild","applicationTypeId","applicationId","applicationLayer","deviceId","deviceIp","deviceLanguage","deviceLocale","deviceModel","deviceFriendlyName","deviceNetwork","deviceNetworkName","deviceOEMName","deviceOS","deviceOSVersion","deviceRoleInstance","deviceRoleName","deviceScreenResolution","deviceType","deviceMachineName","deviceVMName","deviceBrowser","deviceBrowserVersion","locationIp","locationCountry","locationProvince","locationCity","operationId","operationName","operationParentId","operationRootId","operationSyntheticSource","operationCorrelationVector","sessionId","sessionIsFirst","sessionIsNew","userAccountAcquisitionDate","userAccountId","userId","userStoreRegion","userAuthUserId","userAnonymousUserAcquisitionDate","userAuthenticatedUserAcquisitionDate","cloudName","cloudRole","cloudRoleVer","cloudRoleInstance","cloudEnvironment","cloudLocation","cloudDeploymentUnit","internalSdkVersion","internalAgentVersion","internalNodeName","Application","Device","id","type","Internal","sdkVersion","sdkExtension","Version","Location","Operation","HashCodeScoreGenerator","getHashCodeScore","getHashCode","INT_MAX_VALUE","MIN_INPUT_LENGTH","concat","hash","charCodeAt","abs","SamplingScoreGenerator","hashCodeGeneragor","getSamplingScore","envelope","tagKeys","Sample","SampleRateOutOfRange","samplingRate","samplingScoreGenerator","isSampledIn","Session","_SessionManager","sessionExpirationMs","acquisitionSpan","sessionRenewalMs","renewalSpan","automaticSession","update","initializeAutomaticSession","now","dateTime","Now","acquisitionExpired","acquisitionDate","renewalExpired","renewalDate","isFirst","renew","cookieUpdatedTimestamp","cookieUpdateInterval","backup","initializeAutomaticSessionWithData","sessionData","params","acq","renewal","ErrorParsingAISessionCookie","SessionRenewalDateIsZero","BrowserDoesNotSupportLocalStorage","guid","acquisitionExpiry","renewalExpiry","cookieExpiry","setTime","cookieDomnain","cookieDomain","join","toUTCString","User","userCookieName","cookieSeparator","acqStr","accountAcquisitionDate","getTime","newCookie","accountId","authCookie","authUserCookieName","authCookieString","decodeURI","authenticatedId","setAuthenticatedUserContext","authenticatedUserId","storeInCookie","validateUserInput","SetAuthContextFailedAccountName","encodeURI","clearAuthenticatedUserContext","match","extensions","IsNullOrUndefined","stringUtils","GetLength","strObject","res","stringified","ex","performance","timing","navigationStart","GetDuration","start","end","EventHelper","AttachEvent","eventNameWithoutOn","handlerRef","attachEvent","DetachEvent","detachEvent","removeEventListener","AjaxHelper","ParseDependencyPath","pathName","target","parsedUrl","XHRMonitoringState","openDone","setRequestHeaderDone","sendDone","abortDone","onreadystatechangeCallbackAttached","ajaxRecord","completed","requestHeadersSize","ttfb","responseReceivingDuration","callbackDuration","ajaxTotalDuration","aborted","pageUrl","requestSize","status","requestSentTime","responseStartedTime","responseFinishedTime","callbackFinishedTime","endTime","originalOnreadystatechage","xhrMonitoringState","clientFailure","CalculateMetrics","self","sanitizeUrl","requestContextHeader","requestContextAppIdFormat","requestIdHeader","sdkContextHeader","sdkContextHeaderAppIdRequest","requestContextHeaderLowerCase","Domain","EventData","measurements","PageViewData","RemoteDependencyData","success","sanitizeKeyAndAddUniqueness","origLength","sanitizeKey","uniqueField","MAX_NAME_LENGTH","padNumber","NameTooLong","maxLength","MAX_STRING_LENGTH","StringValueTooLong","sanitizeInput","MAX_URL_LENGTH","UrlTooLong","sanitizeMessage","MAX_MESSAGE_LENGTH","MessageTruncated","sanitizeException","MAX_EXCEPTION_LENGTH","ExceptionTruncated","sanitizeProperties","tempProps","prop","MAX_PROPERTY_LENGTH","sanitizeMeasurements","tempMeasurements","measure","sanitizeId","MAX_ID_LENGTH","IdTooLong","_msgId","s","substr","commandName","resultCode","Default","duration","kind","count","max","stdDev","dependencyKind","dependencySource","dependencyTypeName","dependencyFields","envelopeType","dataType","AjaxMonitor","appInsights","currentWindowHost","initialized","Init","supportsMonitoring","instrumentOpen","instrumentSend","instrumentAbort","isMonitoredInstance","xhr","excludeAjaxDataValidation","ajaxData","DisabledPropertyName","XMLHttpRequest","open","send","abort","originalOpen","ajaxMonitorInstance","async","openHandler","FailedMonitorAjaxOpen","ajaxDiagnosticsMessage","getFailedAjaxDiagnosticsMessage","context","operation","attachToOnReadyStateChange","originalSend","content","sendHandler","FailedMonitorAjaxSend","setRequestHeader","appId","originalAbort","FailedMonitorAjaxAbort","readyState","onAjaxComplete","exceptionText","FailedMonitorAjaxRSC","FailedMonitorAjaxDur","dependency","correlationContext","trackDependencyData","responseHeadersString","getAllResponseHeaders","getResponseHeader","FailedMonitorAjaxGetCorrelationHeader","instrumentedByAppInsightsName","ArraySendBuffer","_config","_buffer","enqueue","payload","clear","getItems","batchPayloads","emitLineDelimitedJson","markAsSent","clearSent","SessionStorageSendBuffer","_bufferFullMessageSent","bufferItems","getBuffer","BUFFER_KEY","notDeliveredItems","SENT_BUFFER_KEY","MAX_BUFFER_SIZE","setBuffer","SessionStorageBufferFull","removePayloadsFromBuffer","sentElements","payloads","buffer","remaining","contains","j","bufferJson","parse","FailedToRestoreStorageBuffer","FailedToSetStorageBuffer","Sender","_XMLHttpRequestSupported","_consecutiveErrors","_retryAt","_lastSend","_sender","enableSessionStorageBuffer","isBeaconApiDisabled","_beaconSender","_xhrSender","XDomainRequest","_xdrSender","disableTelemetry","CannotSendEmptyTelemetry","SenderNotInitialized","bufferPayload","batch","maxBatchSizeInBytes","triggerSend","_setupTimer","FailedAddingTelemetryToBuffer","_timeoutHandle","retryInterval","timerValue","maxBatchInterval","setTimeout","_getSizeInBytes","list","size","clearTimeout","TransmissionFailed","_setRetryTime","delayInSeconds","backOffSlot","pow","backOffDelay","retryAfterTimeSpan","_parseResponse","response","itemsReceived","itemsAccepted","errors","InvalidBackendResponse","_isRetriable","statusCode","_resendPayload","_i","payload_1","_formatErrorMessageXhr","responseText","_formatErrorMessageXdr","xdr","isAsync","onreadystatechange","_xhrReadyStateChange","onerror","event","_onError","onload","_xdrOnLoad","hostingProtocol","lastIndexOf","plainTextBatch","Blob","countOfItemsInPayload","_appId","isRetryDisabled","_onPartialSuccess","_onSuccess","results","failed","retry","errors_1","reverse","extracted","splice","index","OnError","MaxBeaconPayloadSize","MessageData","Trace","severityLevel","Event","ExceptionDetails","hasFullStack","parsedStack","ExceptionData","exceptions","StackFrame","Exception","_ExceptionDetails","CreateSimpleException","typeName","assembly","fileName","details","line","outerId","parseStack","frames","level","totalSizeInBytes","frame","_StackFrame","regex","parsedFrame","sizeInBytes","left","right","acceptedLeft","acceptedRight","howMany","matches","baseSize","DataPointType","DataPoint","Measurement","MetricData","metrics","Metric","dataPoint","PageView","durationMs","PageViewPerfData","PageViewPerformance","unused","perfTotal","networkConnect","sentRequest","receivedResponse","domProcessing","isValid","getPerformanceTiming","total","getDuration","loadEventEnd","network","connectEnd","request","requestStart","responseStart","responseEnd","dom","ErrorPVCalc","shouldCollectDuration","ClientPerformanceMathError","InvalidDurationValue","getIsValid","getDurationMs","isPerformanceTimingSupported","isPerformanceTimingDataReady","domainLookupStart","domLoading","durations","botAgentNames","isGoogleBot","i_1","MAX_DURATION_ALLOWED","TelemetryContext","telemetryInitializers","_sessionManager","application","device","internal","user","session","sample","_addDefaultTelemetryInitializers","addTelemetryInitializer","telemetryInitializer","track","_track","TrackArgumentsNotSpecified","isBrowserLinkTrackingEnabled","browserLinkPaths_1","remoteData","baseData","_applySessionContext","_applyApplicationContext","_applyDeviceContext","_applyInternalContext","_applyLocationContext","_applySampleContext","_applyUserContext","_applyOperationContext","instrumentationKey","doNotSendItem","telemetryInitializersCount","TelemetryInitializerFailed","iKeyNoDashes","TelemetrySampledAndNotSent","SampleRate","appContext","build","deviceContext","ip","language","locale","model","oemName","os","osversion","resolution","internalContext","agentVersion","locationContext","operationContext","parentId","rootId","syntheticSource","sampleContext","sessionContext","userContext","agent","storeRegion","Data","baseType","PageViewManager","overridePageViewDuration","pageViewPerformanceSent","trackPageView","title","pageViewSent","customDuration","sendPageViewInternal","flush","handle","setInterval","clearInterval","pageViewPerformance","sendPageViewPerformanceInternal","TrackPVFailedCalc","NavigationTimingNotSupported","PageVisitTimeManager","pageVisitTimeTrackingHandler","prevPageVisitDataKeyName","trackPreviousPageVisit","currentPageName","currentPageUrl","prevPageVisitTimeData","restartPageVisitTimer","pageName","pageVisitTime","prevPageVisitData","stopPageVisitTimer","startPageVisitTimer","currPageVisitData","PageVisitData","currPageVisitDataStr","pageVisitEndTime","pageVisitDataJsonStr","pageVisitStartTime","SplitTest","isEnabled","percentEnabled","AppInsights","_trackAjaxAttempts","defaults","defaultConfig","enableDebug","configGetters","samplingPercentage","isCookieUseDisabled","isStorageUseDisabled","_pageViewManager","_eventTracking","Timing","action","_pageTracking","_pageVisitTimeManager","trackPageVisitTime","disableAjaxTracking","_ajaxMonitor","pageView","pageViewPerformanceData","pageViewPerformanceEnvelope","startTrackPage","StartTrackFailed","stopTrackPage","stop","autoTrackPageVisitTime","StopTrackFailed","TrackPVFailed","startTrackEvent","StartTrackEventFailed","stopTrackEvent","StopTrackEventFailed","trackEvent","eventTelemetry","TrackEventFailed","trackDependency","command","totalTime","maxAjaxCallsPerView","dependencyData","MaxAjaxPerPVExceeded","trackAjax","trackException","handledAt","exceptionTelemetry","TrackExceptionFailed","trackMetric","average","sampleCount","telemetry","TrackMetricFailed","trackTrace","TrackTraceFailed","PageName","PageUrl","FlushFailed","SetAuthContextFailed","SendCORSException","exceptionData","_onerror","URL","errorString","exceptionDump","ExceptionWhileLoggingError","_name","_events","StartCalledMoreThanOnce","StopCalledWithoutStart","DataLossAnalyzer","reset","ITEMS_QUEUED_KEY","ISSUES_REPORTED_KEY","itemsRestoredFromSessionBuffer","enabled","getIssuesReported","incrementItemsQueued","itemsQueued","getNumberOfLostItems","decrementItemsQueued","countOfItemsSentSuccessfully","reportLostItems","LIMIT_PER_SESSION","lostItems","issuesReported","FailedToReportDataLoss","Initialization","snippet","getDefaultConfig","loadAppInsights","originalTrackPageView","pagePath","emptyQueue","FailedToSendQueuedTelemetry","pollInteralLogs","appInsightsInstance","diagnosticLogInterval","addHousekeepingBeforeUnload","disableFlushOnBeforeUnload","FailedToAddHandlerForOnBeforeUnload","disableExceptionTracking","init","appInsightsLocal"],"mappings":"4VAAOA,WAAP,SAAOA,GAAUA,EAAAC,sBAAAD,EAAAC,wBAAjB,CAAOD,YAAAA,eCCP,IAAOA,WAAP,SAAOA,IAAU,SAAAE,GAOb,IAAAC,EAAA,WAWA,OAHI,aARJ,GAAaD,EAAAC,KAAIA,EAPJ,CAAAH,EAAAE,YAAAF,EAAAE,eAAjB,CAAOF,YAAAA,eCCP,IAAOA,WAAP,SAAOA,IAAU,SAAAE,GAOb,IAAAE,EAAA,WAiDA,OANI,WAEIC,KAAKC,IAAM,EACXD,KAAKE,WAAa,IAClBF,KAAKG,SA/Cb,GAAaN,EAAAE,SAAQA,EAPR,CAAAJ,EAAAE,YAAAF,EAAAE,eAAjB,CAAOF,YAAAA,eCFP,IAAOA,WAAP,SAAOA,IAAU,SAAAC,GAAoBA,EAAAQ,UAAAR,EAAAQ,YAApB,CAAAT,EAAAC,sBAAAD,EAAAC,yBAAjB,CAAOD,YAAAA,eCAP,IAAOA,WAAP,SAAOA,IAAU,SAAAC,GAAoBA,EAAAQ,UAAAR,EAAAQ,YAApB,CAAAT,EAAAC,sBAAAD,EAAAC,yBAAjB,CAAOD,YAAAA,eCAP,IAAOA,WAAP,SAAOA,IAAU,SAAAC,GAAoBA,EAAAQ,UA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AAA4C,KAAKuF,sBAAsBgF,EAAOM,uBAE1DN,GAEfiuB,EA9KA,GAAap7B,EAAAo7B,eAAcA,EARd,CAAAr7B,EAAAC,sBAAAD,EAAAC,yBAAjB,CAAOD,YAAAA,eCAP,IAAOA,WAAP,SAAOA,IAAU,SAAAC,GAGb,IAEI,GAAsB,oBAAXuF,QAA0C,oBAAT9D,KAAsB,CAI9D,GAAI8D,OAAa,cAAMW,UAEnBnG,EAAUC,oBAAoB+1B,YAAYG,cAAgBn2B,EAAUC,oBAAoBo7B,eAAeE,uBACpG,CAEH,IAAID,EAAiD91B,OAAa,gBAG9D42B,EAAO,IAAIp8B,EAAUC,oBAAoBo7B,eAAeC,GACxDe,EAAmBD,EAAKZ,kBAG5B,IAAK,IAAInsB,KAASgtB,EACdf,EAAQjsB,GAASgtB,EAAiBhtB,GAGtC+sB,EAAKT,aAELS,EAAKP,gBAAgBQ,GAErBD,EAAKJ,4BAA4BK,KAG3C,MAAO/1B,GACLtG,EAAUC,oBAAoB6B,iBAAiBO,cAAc,4CAA8CiE,EAAElF,UAjCpG,CAAApB,EAAAC,sBAAAD,EAAAC,yBAAjB,CAAOD,YAAAA","file":"ai.0.js","sourcesContent":["module Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IConfig {\r\n instrumentationKey?: string;\r\n endpointUrl?: string;\r\n emitLineDelimitedJson?: boolean;\r\n accountId?: string;\r\n sessionRenewalMs?: number;\r\n sessionExpirationMs?: number;\r\n maxBatchSizeInBytes?: number;\r\n maxBatchInterval?: number;\r\n enableDebug?: boolean;\r\n disableExceptionTracking?: boolean;\r\n disableTelemetry?: boolean;\r\n verboseLogging?: boolean;\r\n diagnosticLogInterval?: number;\r\n samplingPercentage?: number;\r\n autoTrackPageVisitTime?: boolean;\r\n disableAjaxTracking?: boolean;\r\n overridePageViewDuration?: boolean;\r\n maxAjaxCallsPerView?: number;\r\n disableDataLossAnalysis?: boolean;\r\n disableCorrelationHeaders?: boolean;\r\n correlationHeaderExcludedDomains?: string[];\r\n disableFlushOnBeforeUnload?: boolean;\r\n enableSessionStorageBuffer?: boolean;\r\n isCookieUseDisabled?: boolean;\r\n cookieDomain?: string;\r\n isRetryDisabled?: boolean;\r\n url?: string;\r\n isStorageUseDisabled?: boolean;\r\n isBeaconApiDisabled?: boolean;\r\n sdkExtension?: string;\r\n isBrowserLinkTrackingEnabled?: boolean;\r\n appId?: string;\r\n enableCorsCorrelation?: boolean;\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Data struct to contain only C section with custom fields.\r\n */\r\n export class Base\r\n {\r\n \r\n /**\r\n * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.\r\n */\r\n public baseType: string;\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * System variables for a telemetry item.\r\n */\r\n export class Envelope\r\n {\r\n \r\n /**\r\n * Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Type name of telemetry data item.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z.\r\n */\r\n public time: string;\r\n \r\n /**\r\n * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.\r\n */\r\n public sampleRate: number;\r\n \r\n /**\r\n * Sequence field used to track absolute order of uploaded events.\r\n */\r\n public seq: string;\r\n \r\n /**\r\n * The application's instrumentation key. The key is typically represented as a GUID, but there are cases when it is not a guid. No code should rely on iKey being a GUID. Instrumentation key is case insensitive.\r\n */\r\n public iKey: string;\r\n \r\n /**\r\n * Key/value collection of context properties. See ContextTagKeys for information on available properties.\r\n */\r\n public tags: any;\r\n \r\n /**\r\n * Telemetry data item.\r\n */\r\n public data: Base;\r\n \r\n constructor()\r\n {\r\n this.ver = 1;\r\n this.sampleRate = 100.0;\r\n this.tags = {};\r\n }\r\n }\r\n}\r\n","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IApplication {\r\n /**\r\n * The application version.\r\n */\r\n ver: string;\r\n\r\n /**\r\n * The application build version.\r\n */\r\n build: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IDevice {\r\n /**\r\n * The type for the current device.\r\n */\r\n type: string;\r\n\r\n /**\r\n * A device unique ID.\r\n */\r\n id: string;\r\n\r\n /**\r\n * The device OEM for the current device.\r\n */\r\n oemName: string;\r\n\r\n /**\r\n * The device model for the current device.\r\n */\r\n model: string;\r\n\r\n /**\r\n * The IANA interface type for the internet connected network adapter.\r\n */\r\n network: number;\r\n\r\n /**\r\n * The application screen resolution.\r\n */\r\n resolution: string;\r\n\r\n /**\r\n * The current display language of the operating system.\r\n */\r\n locale: string;\r\n\r\n /**\r\n * The IP address.\r\n */\r\n ip: string;\r\n\r\n /**\r\n * The device language.\r\n */\r\n language: string;\r\n\r\n /**\r\n * The OS name.\r\n */\r\n os: string;\r\n\r\n /**\r\n * The OS version.\r\n */\r\n osversion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IInternal {\r\n /**\r\n * The SDK version used to create this telemetry item.\r\n */\r\n sdkVersion: string;\r\n\r\n /**\r\n * The SDK agent version.\r\n */\r\n agentVersion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ILocation {\r\n /**\r\n * Client IP address for reverse lookup\r\n */\r\n ip: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IOperation {\r\n /**\r\n * Operation id\r\n */\r\n id: string;\r\n\r\n /**\r\n * Operation name\r\n */\r\n name: string;\r\n\r\n /**\r\n * Parent operation id\r\n */\r\n parentId: string;\r\n\r\n /**\r\n * Root operation id\r\n */\r\n rootId: string;\r\n\r\n /**\r\n * Synthetic source of the operation\r\n */\r\n syntheticSource: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISample {\r\n /**\r\n * Sample rate\r\n */\r\n sampleRate: number;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IUser {\r\n /**\r\n * The telemetry configuration.\r\n */\r\n config: any;\r\n\r\n /**\r\n * The user ID.\r\n */\r\n id: string;\r\n\r\n /**\r\n * Authenticated user id\r\n */\r\n authenticatedId: string;\r\n\r\n /**\r\n * The account ID.\r\n */\r\n accountId: string;\r\n\r\n /**\r\n * The account acquisition date.\r\n */\r\n accountAcquisitionDate: string;\r\n\r\n /**\r\n * The user agent string.\r\n */\r\n agent: string;\r\n\r\n /**\r\n * The store region.\r\n */\r\n storeRegion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISession {\r\n /**\r\n * The session ID.\r\n */\r\n id: string;\r\n\r\n /** \r\n * The true if this is the first session \r\n */\r\n isFirst: boolean;\r\n\r\n /**\r\n * The date at which this guid was genereated.\r\n * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.\r\n */\r\n acquisitionDate: number;\r\n\r\n /**\r\n * The date at which this session ID was last reported.\r\n * This value should be updated whenever telemetry is sent using this ID.\r\n * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.\r\n */\r\n renewalDate: number;\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface ISerializable {\r\n /**\r\n * The set of fields for a serializable object. \r\n * This defines the serialization order and a value of true/false\r\n * for each field defines whether the field is required or not.\r\n */\r\n aiDataContract: any;\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IEnvelope extends ISerializable {\r\n ver: number;\r\n name: string;\r\n time: string;\r\n sampleRate: number;\r\n seq: string;\r\n iKey: string;\r\n tags: { [name: string]: any };\r\n data: any;\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface ITelemetryContext {\r\n /**\r\n * The object describing a component tracked by this object.\r\n */\r\n application: Context.IApplication;\r\n\r\n /**\r\n * The object describing a device tracked by this object.\r\n */\r\n device: Context.IDevice;\r\n\r\n /**\r\n * The object describing internal settings.\r\n */\r\n internal: Context.IInternal;\r\n\r\n /**\r\n * The object describing a location tracked by this object.\r\n */\r\n location: Context.ILocation;\r\n\r\n /**\r\n * The object describing a operation tracked by this object.\r\n */\r\n operation: Context.IOperation;\r\n\r\n /**\r\n * The object describing sampling settings.\r\n */\r\n sample: Context.ISample;\r\n\r\n /**\r\n * The object describing a user tracked by this object.\r\n */\r\n user: Context.IUser;\r\n\r\n /**\r\n * The object describing a session tracked by this object.\r\n */\r\n session: Context.ISession;\r\n\r\n /**\r\n * Adds a telemetry initializer to the collection. Telemetry initializers will be called one by one, \r\n * in the order they were added, before the telemetry item is pushed for sending. \r\n * If one of the telemetry initializers returns false or throws an error then the telemetry item will not be sent. \r\n * If it returns true or doesn't return any value the event will be passed to the next telemetry initializer and\r\n * send to the cloud (if not rejected by other initializers). \r\n */\r\n addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void);\r\n\r\n /**\r\n * Tracks telemetry object.\r\n */\r\n track(envelope: Microsoft.ApplicationInsights.IEnvelope);\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Defines the level of severity for the event.\r\n */\r\n export enum SeverityLevel\r\n {\r\n Verbose = 0,\r\n Information = 1,\r\n Warning = 2,\r\n Error = 3,\r\n Critical = 4,\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n\r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IAppInsights {\r\n\r\n /*\r\n * Config object used to initialize AppInsights\r\n */\r\n config: IConfig;\r\n\r\n context: ITelemetryContext;\r\n\r\n /*\r\n * Initialization queue. Contains functions to run when appInsights initializes\r\n */\r\n queue: Array<() => void>;\r\n\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens. \r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n startTrackPage(name?: string);\r\n\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n stopTrackPage(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /**\r\n * Logs that a page or other item was viewed. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.\r\n */\r\n trackPageView(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, duration?: number);\r\n\r\n /**\r\n * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n startTrackEvent(name: string);\r\n\r\n\r\n /** \r\n * Log an extended event that you started timing with {@link startTrackEvent}.\r\n * @param name The string you used to identify this event in startTrackEvent.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n stopTrackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /** \r\n * Log a user action or other occurrence.\r\n * @param name A string to identify this event in the portal.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n trackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /**\r\n * Log a dependency call\r\n * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id.\r\n * @param method represents request verb (GET, POST, etc.)\r\n * @param absoluteUrl absolute url used to make the dependency request\r\n * @param pathName the path part of the absolute url\r\n * @param totalTime total request time\r\n * @param success indicates if the request was sessessful\r\n * @param resultCode response code returned by the dependency request\r\n */\r\n trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number);\r\n\r\n /**\r\n * Log an exception you have caught.\r\n * @param exception An Error from a catch clause, or the string error message.\r\n * @param handledAt Not used\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel);\r\n\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.\r\n * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the \r\n * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.\r\n * @param name A string that identifies the metric.\r\n * @param average Number representing either a single measurement, or the average of several measurements.\r\n * @param sampleCount The number of measurements represented by the average. Defaults to 1.\r\n * @param min The smallest measurement in the sample. Defaults to the average.\r\n * @param max The largest measurement in the sample. Defaults to the average.\r\n */\r\n trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; });\r\n\r\n /**\r\n * Log a diagnostic message. \r\n * @param message A message string \r\n * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n trackTrace(message: string, properties?: { [name: string]: string; }, severityLevel?: AI.SeverityLevel);\r\n\r\n\r\n /**\r\n * Immediately send all queued telemetry.\r\n * @param {boolean} async - If flush should be call asynchronously\r\n */\r\n flush(async?: boolean);\r\n\r\n\r\n /**\r\n * Sets the autheticated user id and the account id in this session.\r\n * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string);\r\n\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n */\r\n clearAuthenticatedUserContext();\r\n\r\n /*\r\n * Downloads and initializes AppInsights. You can override default script download location by specifying url property of `config`.\r\n */\r\n downloadAndSetup?(config: Microsoft.ApplicationInsights.IConfig): void;\r\n\r\n /**\r\n * The custom error handler for Application Insights\r\n * @param {string} message - The error message\r\n * @param {string} url - The url where the error was raised\r\n * @param {number} lineNumber - The line number where the error was raised\r\n * @param {number} columnNumber - The column number for the line where the error was raised\r\n * @param {Error} error - The Error object\r\n */\r\n _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error);\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n\r\n export enum LoggingSeverity {\r\n /**\r\n * Error will be sent as internal telemetry\r\n */\r\n CRITICAL = 0,\r\n\r\n /**\r\n * Error will NOT be sent as internal telemetry, and will only be shown in browser console\r\n */\r\n WARNING = 1\r\n }\r\n\r\n /**\r\n * Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered\r\n */\r\n export enum _InternalMessageId {\r\n // Non user actionable\r\n BrowserDoesNotSupportLocalStorage,\r\n BrowserCannotReadLocalStorage,\r\n BrowserCannotReadSessionStorage,\r\n BrowserCannotWriteLocalStorage,\r\n BrowserCannotWriteSessionStorage,\r\n BrowserFailedRemovalFromLocalStorage,\r\n BrowserFailedRemovalFromSessionStorage,\r\n CannotSendEmptyTelemetry,\r\n ClientPerformanceMathError,\r\n ErrorParsingAISessionCookie,\r\n ErrorPVCalc,\r\n ExceptionWhileLoggingError,\r\n FailedAddingTelemetryToBuffer,\r\n FailedMonitorAjaxAbort,\r\n FailedMonitorAjaxDur,\r\n FailedMonitorAjaxOpen,\r\n FailedMonitorAjaxRSC,\r\n FailedMonitorAjaxSend,\r\n FailedMonitorAjaxGetCorrelationHeader,\r\n FailedToAddHandlerForOnBeforeUnload,\r\n FailedToSendQueuedTelemetry,\r\n FailedToReportDataLoss,\r\n FlushFailed,\r\n MessageLimitPerPVExceeded,\r\n MissingRequiredFieldSpecification,\r\n NavigationTimingNotSupported,\r\n OnError,\r\n SessionRenewalDateIsZero,\r\n SenderNotInitialized,\r\n StartTrackEventFailed,\r\n StopTrackEventFailed,\r\n StartTrackFailed,\r\n StopTrackFailed,\r\n TelemetrySampledAndNotSent,\r\n TrackEventFailed,\r\n TrackExceptionFailed,\r\n TrackMetricFailed,\r\n TrackPVFailed,\r\n TrackPVFailedCalc,\r\n TrackTraceFailed,\r\n TransmissionFailed,\r\n FailedToSetStorageBuffer,\r\n FailedToRestoreStorageBuffer,\r\n InvalidBackendResponse,\r\n FailedToFixDepricatedValues,\r\n InvalidDurationValue,\r\n\r\n // User actionable\r\n CannotSerializeObject,\r\n CannotSerializeObjectNonSerializable,\r\n CircularReferenceDetected,\r\n ClearAuthContextFailed,\r\n ExceptionTruncated,\r\n IllegalCharsInName,\r\n ItemNotInArray,\r\n MaxAjaxPerPVExceeded,\r\n MessageTruncated,\r\n NameTooLong,\r\n SampleRateOutOfRange,\r\n SetAuthContextFailed,\r\n SetAuthContextFailedAccountName,\r\n StringValueTooLong,\r\n StartCalledMoreThanOnce,\r\n StopCalledWithoutStart,\r\n TelemetryInitializerFailed,\r\n TrackArgumentsNotSpecified,\r\n UrlTooLong,\r\n SessionStorageBufferFull,\r\n CannotAccessCookie,\r\n IdTooLong,\r\n }\r\n\r\n export class _InternalLogMessage {\r\n public message: string;\r\n public messageId: _InternalMessageId;\r\n\r\n /**\r\n * For user non actionable traces use AI Internal prefix.\r\n */\r\n private static AiNonUserActionablePrefix = \"AI (Internal): \";\r\n\r\n /**\r\n * Prefix of the traces in portal.\r\n */\r\n private static AiUserActionablePrefix = \"AI: \";\r\n\r\n constructor(msgId: _InternalMessageId, msg: string, isUserAct = false, properties?: Object) {\r\n\r\n this.messageId = msgId;\r\n this.message =\r\n (isUserAct ? _InternalLogMessage.AiUserActionablePrefix : _InternalLogMessage.AiNonUserActionablePrefix) +\r\n _InternalMessageId[msgId].toString();\r\n\r\n var diagnosticText =\r\n (msg ? \" message:\" + _InternalLogMessage.sanitizeDiagnosticText(msg) : \"\") +\r\n (properties ? \" props:\" + _InternalLogMessage.sanitizeDiagnosticText(JSON.stringify(properties)) : \"\");\r\n\r\n this.message += diagnosticText;\r\n }\r\n\r\n private static sanitizeDiagnosticText(text: string) {\r\n return \"\\\"\" + text.replace(/\\\"/g, \"\") + \"\\\"\";\r\n }\r\n }\r\n\r\n export class _InternalLogging {\r\n\r\n /**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */\r\n private static AIInternalMessagePrefix: string = \"AITR_\";\r\n\r\n /**\r\n * When this is true the SDK will throw exceptions to aid in debugging.\r\n */\r\n public static enableDebugExceptions = () => false;\r\n\r\n /**\r\n * When this is true the SDK will log more messages to aid in debugging.\r\n */\r\n public static verboseLogging = () => false;\r\n\r\n /**\r\n * The internal logging queue\r\n */\r\n public static queue: Array<_InternalLogMessage> = [];\r\n\r\n /**\r\n * The maximum number of internal messages allowed to be sent per page view\r\n */\r\n private static MAX_INTERNAL_MESSAGE_LIMIT = 25;\r\n\r\n /**\r\n * Count of internal messages sent\r\n */\r\n private static _messageCount = 0;\r\n\r\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */\r\n private static _messageLogged: { [type: string]: boolean } = {};\r\n\r\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The log message.\r\n */\r\n public static throwInternal(severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct = false) {\r\n let message = new _InternalLogMessage(msgId, msg, isUserAct, properties);\r\n\r\n if (this.enableDebugExceptions()) {\r\n throw message;\r\n } else {\r\n if (typeof (message) !== \"undefined\" && !!message) {\r\n if (typeof (message.message) !== \"undefined\") {\r\n if (isUserAct) {\r\n // check if this message type was already logged to console for this page view and if so, don't log it again\r\n var messageKey = _InternalMessageId[message.messageId];\r\n\r\n if (!this._messageLogged[messageKey] || this.verboseLogging()) {\r\n this.warnToConsole(message.message);\r\n this._messageLogged[messageKey] = true;\r\n }\r\n } else {\r\n // don't log internal AI traces in the console, unless the verbose logging is enabled\r\n if (this.verboseLogging()) {\r\n this.warnToConsole(message.message);\r\n }\r\n }\r\n\r\n this.logInternalMessage(severity, message);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * This will write a warning to the console if possible\r\n * @param message {string} - The warning message\r\n */\r\n public static warnToConsole(message: string) {\r\n if (typeof console !== \"undefined\" && !!console) {\r\n if (typeof console.warn === \"function\") {\r\n console.warn(message);\r\n } else if (typeof console.log === \"function\") {\r\n console.log(message);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Resets the internal message count\r\n */\r\n public static resetInternalMessageCount(): void {\r\n this._messageCount = 0;\r\n this._messageLogged = {};\r\n }\r\n\r\n /**\r\n * Clears the list of records indicating that internal message type was already logged\r\n */\r\n public static clearInternalMessageLoggedTypes(): void {\r\n if (Util.canUseSessionStorage()) {\r\n var sessionStorageKeys = Util.getSessionStorageKeys();\r\n for (var i = 0; i < sessionStorageKeys.length; i++) {\r\n if (sessionStorageKeys[i].indexOf(_InternalLogging.AIInternalMessagePrefix) === 0) {\r\n Util.removeSessionStorage(sessionStorageKeys[i]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets the limit for the number of internal events before they are throttled\r\n * @param limit {number} - The throttle limit to set for internal events\r\n */\r\n public static setMaxInternalMessageLimit(limit: number): void {\r\n if (!limit) {\r\n throw new Error('limit cannot be undefined.');\r\n }\r\n\r\n this.MAX_INTERNAL_MESSAGE_LIMIT = limit;\r\n }\r\n\r\n /**\r\n * Logs a message to the internal queue.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The message to log.\r\n */\r\n private static logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void {\r\n if (this._areInternalMessagesThrottled()) {\r\n return;\r\n }\r\n\r\n // check if this message type was already logged for this session and if so, don't log it again\r\n var logMessage = true;\r\n var messageKey = _InternalLogging.AIInternalMessagePrefix + _InternalMessageId[message.messageId];\r\n\r\n if (Util.canUseSessionStorage()) {\r\n var internalMessageTypeLogRecord = Util.getSessionStorage(messageKey);\r\n if (internalMessageTypeLogRecord) {\r\n logMessage = false;\r\n } else {\r\n Util.setSessionStorage(messageKey, \"1\");\r\n }\r\n } else {\r\n // if the session storage is not available, limit to only one message type per page view\r\n if (this._messageLogged[messageKey]) {\r\n logMessage = false;\r\n } else {\r\n this._messageLogged[messageKey] = true;\r\n }\r\n }\r\n\r\n if (logMessage) {\r\n // Push the event in the internal queue\r\n if (this.verboseLogging() || severity === LoggingSeverity.CRITICAL) {\r\n this.queue.push(message);\r\n this._messageCount++;\r\n }\r\n\r\n // When throttle limit reached, send a special event\r\n if (this._messageCount == this.MAX_INTERNAL_MESSAGE_LIMIT) {\r\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\r\n var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);\r\n\r\n this.queue.push(throttleMessage);\r\n this.warnToConsole(throttleLimitMessage);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Indicates whether the internal events are throttled\r\n */\r\n private static _areInternalMessagesThrottled(): boolean {\r\n return this._messageCount >= this.MAX_INTERNAL_MESSAGE_LIMIT;\r\n }\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n \"use strict\"\r\n\r\n export class UtilHelpers {\r\n\r\n /**\r\n * generate random id string\r\n */\r\n public static newId() {\r\n var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n var result = \"\";\r\n var random = Math.random() * 1073741824; //5 symbols in base64, almost maxint\r\n\r\n while (random > 0) {\r\n var char = base64chars.charAt(random % 64);\r\n result += char;\r\n random = Math.floor(random / 64);\r\n }\r\n return result;\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n /**\r\n * Type of storage to differentiate between local storage and session storage\r\n */\r\n enum StorageType {\r\n LocalStorage,\r\n SessionStorage\r\n }\r\n\r\n export class Util {\r\n private static document: any = typeof document !== \"undefined\" ? document : {};\r\n private static _canUseCookies: boolean = undefined;\r\n private static _canUseLocalStorage: boolean = undefined;\r\n private static _canUseSessionStorage: boolean = undefined;\r\n // listing only non-geo specific locations\r\n private static _internalEndpoints: string[] = [\r\n \"https://dc.services.visualstudio.com/v2/track\",\r\n \"https://breeze.aimon.applicationinsights.io/v2/track\",\r\n \"https://dc-int.services.visualstudio.com/v2/track\"\r\n ]\r\n public static NotSpecified = \"not_specified\";\r\n\r\n /*\r\n * Force the SDK not to use local and session storage\r\n */\r\n public static disableStorage() {\r\n Util._canUseLocalStorage = false;\r\n Util._canUseSessionStorage = false;\r\n }\r\n\r\n /**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n private static _getLocalStorageObject(): Storage {\r\n if (Util.canUseLocalStorage()) {\r\n return Util._getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */\r\n private static _getVerifiedStorageObject(storageType: StorageType): Storage {\r\n var storage: Storage = null;\r\n var fail: boolean;\r\n var uid;\r\n try {\r\n uid = new Date;\r\n storage = storageType === StorageType.LocalStorage ? window.localStorage : window.sessionStorage;\r\n storage.setItem(uid, uid);\r\n fail = storage.getItem(uid) != uid;\r\n storage.removeItem(uid);\r\n if (fail) {\r\n storage = null;\r\n }\r\n } catch (exception) {\r\n storage = null;\r\n }\r\n\r\n return storage;\r\n }\r\n\r\n /**\r\n * Checks if endpoint URL is application insights internal injestion service URL.\r\n *\r\n * @param endpointUrl Endpoint URL to check.\r\n * @returns {boolean} True if if endpoint URL is application insights internal injestion service URL.\r\n */\r\n public static isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean {\r\n return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;\r\n }\r\n\r\n\r\n /**\r\n * Check if the browser supports local storage.\r\n *\r\n * @returns {boolean} True if local storage is supported.\r\n */\r\n public static canUseLocalStorage(): boolean {\r\n if (Util._canUseLocalStorage === undefined) {\r\n Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n\r\n return Util._canUseLocalStorage;\r\n }\r\n\r\n /**\r\n * Get an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n public static getStorage(name: string): string {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotReadLocalStorage,\r\n \"Browser failed read of local storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Set the contents of an object in the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n public static setStorage(name: string, data: string): boolean {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotWriteLocalStorage,\r\n \"Browser failed write to local storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Remove an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n public static removeStorage(name: string): boolean {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserFailedRemovalFromLocalStorage,\r\n \"Browser failed removal of local storage item. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n private static _getSessionStorageObject(): Storage {\r\n if (Util.canUseSessionStorage()) {\r\n return Util._getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Check if the browser supports session storage.\r\n *\r\n * @returns {boolean} True if session storage is supported.\r\n */\r\n public static canUseSessionStorage(): boolean {\r\n if (Util._canUseSessionStorage === undefined) {\r\n Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n\r\n return Util._canUseSessionStorage;\r\n }\r\n\r\n /**\r\n * Gets the list of session storage keys\r\n *\r\n * @returns {string[]} List of session storage keys\r\n */\r\n public static getSessionStorageKeys(): string[] {\r\n var keys = [];\r\n\r\n if (Util.canUseSessionStorage()) {\r\n for (var key in window.sessionStorage) {\r\n keys.push(key);\r\n }\r\n }\r\n return keys;\r\n }\r\n\r\n /**\r\n * Get an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n public static getSessionStorage(name: string): string {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotReadSessionStorage,\r\n \"Browser failed read of session storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Set the contents of an object in the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n public static setSessionStorage(name: string, data: string): boolean {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotWriteSessionStorage,\r\n \"Browser failed write to session storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Remove an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n public static removeSessionStorage(name: string): boolean {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserFailedRemovalFromSessionStorage,\r\n \"Browser failed removal of session storage item. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /*\r\n * Force the SDK not to store and read any data from cookies\r\n */\r\n public static disableCookies() {\r\n Util._canUseCookies = false;\r\n }\r\n\r\n /*\r\n * helper method to tell if document.cookie object is available\r\n */\r\n public static canUseCookies(): any {\r\n if (Util._canUseCookies === undefined) {\r\n Util._canUseCookies = false;\r\n\r\n try {\r\n Util._canUseCookies = Util.document.cookie !== undefined;\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.CannotAccessCookie,\r\n \"Cannot access document.cookie - \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n };\r\n }\r\n\r\n return Util._canUseCookies;\r\n }\r\n\r\n /**\r\n * helper method to set userId and sessionId cookie\r\n */\r\n public static setCookie(name, value, domain?) {\r\n var domainAttrib = \"\";\r\n var secureAttrib = \"\";\r\n\r\n if (domain) {\r\n domainAttrib = \";domain=\" + domain;\r\n }\r\n\r\n if (Util.document.location && Util.document.location.protocol === \"https:\") {\r\n secureAttrib = \";secure\";\r\n }\r\n\r\n if (Util.canUseCookies()) {\r\n Util.document.cookie = name + \"=\" + value + domainAttrib + \";path=/\" + secureAttrib;\r\n }\r\n }\r\n\r\n public static stringToBoolOrDefault(str: any, defaultValue = false): boolean {\r\n if (str === undefined || str === null) {\r\n return defaultValue;\r\n }\r\n\r\n return str.toString().toLowerCase() === \"true\";\r\n }\r\n\r\n /**\r\n * helper method to access userId and sessionId cookie\r\n */\r\n public static getCookie(name) {\r\n if (!Util.canUseCookies()) {\r\n return;\r\n }\r\n\r\n var value = \"\";\r\n if (name && name.length) {\r\n var cookieName = name + \"=\";\r\n var cookies = Util.document.cookie.split(\";\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var cookie = cookies[i];\r\n cookie = Util.trim(cookie);\r\n if (cookie && cookie.indexOf(cookieName) === 0) {\r\n value = cookie.substring(cookieName.length, cookies[i].length);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /**\r\n * Deletes a cookie by setting it's expiration time in the past.\r\n * @param name - The name of the cookie to delete.\r\n */\r\n public static deleteCookie(name: string) {\r\n if (Util.canUseCookies()) {\r\n // Setting the expiration date in the past immediately removes the cookie\r\n Util.document.cookie = name + \"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\r\n }\r\n }\r\n\r\n /**\r\n * helper method to trim strings (IE8 does not implement String.prototype.trim)\r\n */\r\n public static trim(str: any): string {\r\n if (typeof str !== \"string\") return str;\r\n return str.replace(/^\\s+|\\s+$/g, \"\");\r\n }\r\n\r\n /**\r\n * generate random id string\r\n */\r\n public static newId(): string {\r\n return UtilHelpers.newId();\r\n }\r\n\r\n /**\r\n * Check if an object is of type Array\r\n */\r\n public static isArray(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Array]\";\r\n }\r\n\r\n /**\r\n * Check if an object is of type Error\r\n */\r\n public static isError(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Error]\";\r\n }\r\n\r\n /**\r\n * Check if an object is of type Date\r\n */\r\n public static isDate(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Date]\";\r\n }\r\n\r\n /**\r\n * Convert a date to I.S.O. format in IE8\r\n */\r\n public static toISOStringForIE8(date: Date) {\r\n if (Util.isDate(date)) {\r\n if (Date.prototype.toISOString) {\r\n return date.toISOString();\r\n } else {\r\n const pad = function(number) {\r\n var r = String(number);\r\n if (r.length === 1) {\r\n r = \"0\" + r;\r\n }\r\n\r\n return r;\r\n }\r\n\r\n return date.getUTCFullYear()\r\n + \"-\" + pad(date.getUTCMonth() + 1)\r\n + \"-\" + pad(date.getUTCDate())\r\n + \"T\" + pad(date.getUTCHours())\r\n + \":\" + pad(date.getUTCMinutes())\r\n + \":\" + pad(date.getUTCSeconds())\r\n + \".\" + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)\r\n + \"Z\";\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets IE version if we are running on IE, or null otherwise\r\n */\r\n public static getIEVersion(userAgentStr: string = null): number {\r\n var myNav = userAgentStr ? userAgentStr.toLowerCase() : navigator.userAgent.toLowerCase();\r\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : null;\r\n }\r\n\r\n /**\r\n * Convert ms to c# time span format\r\n */\r\n public static msToTimeSpan(totalms: number): string {\r\n if (isNaN(totalms) || totalms < 0) {\r\n totalms = 0;\r\n }\r\n\r\n totalms = Math.round(totalms);\r\n\r\n var ms = \"\" + totalms % 1000;\r\n var sec = \"\" + Math.floor(totalms / 1000) % 60;\r\n var min = \"\" + Math.floor(totalms / (1000 * 60)) % 60;\r\n var hour = \"\" + Math.floor(totalms / (1000 * 60 * 60)) % 24;\r\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\r\n\r\n ms = ms.length === 1 ? \"00\" + ms : ms.length === 2 ? \"0\" + ms : ms;\r\n sec = sec.length < 2 ? \"0\" + sec : sec;\r\n min = min.length < 2 ? \"0\" + min : min;\r\n hour = hour.length < 2 ? \"0\" + hour : hour;\r\n\r\n return (days > 0 ? days + \".\" : \"\") + hour + \":\" + min + \":\" + sec + \".\" + ms;\r\n }\r\n\r\n /**\t\t\r\n * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error\t\t\r\n * happens in a script from other domain (cross origin, CORS).\t\t\r\n */\r\n public static isCrossOriginError(message: string, url: string, lineNumber: number, columnNumber: number, error: Error): boolean {\r\n return (message === \"Script error.\" || message === \"Script error\") && !error;\r\n }\r\n\r\n /**\r\n * Returns string representation of an object suitable for diagnostics logging.\r\n */\r\n public static dump(object: any): string {\r\n var objectTypeDump: string = Object.prototype.toString.call(object);\r\n var propertyValueDump: string = JSON.stringify(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\r\n }\r\n\r\n return objectTypeDump + propertyValueDump;\r\n }\r\n\r\n /**\r\n * Returns the name of object if it's an Error. Otherwise, returns empty string.\r\n */\r\n public static getExceptionName(object: any): string {\r\n var objectTypeDump: string = Object.prototype.toString.call(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n return object.name;\r\n }\r\n return \"\";\r\n }\r\n\r\n /**\r\n * Adds an event handler for the specified event\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event \r\n * @return {boolean} - true if the handler was successfully added\r\n */\r\n public static addEventHandler(eventName: string, callback: any): boolean {\r\n if (!window || typeof eventName !== 'string' || typeof callback !== 'function') {\r\n return false;\r\n }\r\n\r\n // Create verb for the event\r\n var verbEventName = 'on' + eventName;\r\n\r\n // check if addEventListener is available\r\n if (window.addEventListener) {\r\n window.addEventListener(eventName, callback, false);\r\n } else if (window[\"attachEvent\"]) { // For older browsers\r\n window[\"attachEvent\"](verbEventName, callback);\r\n } else { // if all else fails\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Tells if a browser supports a Beacon API\r\n */\r\n public static IsBeaconApiSupported(): boolean {\r\n return ('sendBeacon' in navigator && (navigator).sendBeacon);\r\n }\r\n }\r\n\r\n export class UrlHelper {\r\n private static document: any = typeof document !== \"undefined\" ? document : {};\r\n private static htmlAnchorElement: HTMLAnchorElement;\r\n\r\n public static parseUrl(url): HTMLAnchorElement {\r\n if (!UrlHelper.htmlAnchorElement) {\r\n UrlHelper.htmlAnchorElement = !!UrlHelper.document.createElement ? UrlHelper.document.createElement('a') : {};\r\n }\r\n\r\n UrlHelper.htmlAnchorElement.href = url;\r\n\r\n return UrlHelper.htmlAnchorElement;\r\n }\r\n\r\n public static getAbsoluteUrl(url): string {\r\n var result: string;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.href;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static getPathName(url): string {\r\n var result: string;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.pathname;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static getCompleteUrl(method: string, absoluteUrl: string) {\r\n if (method) {\r\n return method.toUpperCase() + \" \" + absoluteUrl;\r\n } else {\r\n return absoluteUrl;\r\n }\r\n }\r\n }\r\n\r\n export class CorrelationIdHelper {\r\n public static correlationIdPrefix = \"cid-v1:\";\r\n\r\n /**\r\n * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers\r\n */\r\n public static canIncludeCorrelationHeader(config: IConfig, requestUrl: string, currentHost: string) {\r\n if (config && config.disableCorrelationHeaders) {\r\n return false;\r\n }\r\n\r\n if (!requestUrl) {\r\n return false;\r\n }\r\n\r\n let requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();\r\n if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) {\r\n return false;\r\n }\r\n\r\n let excludedDomains = config && config.correlationHeaderExcludedDomains;\r\n if (!excludedDomains || excludedDomains.length == 0) {\r\n return true;\r\n }\r\n\r\n for (let i = 0; i < excludedDomains.length; i++) {\r\n let regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\./g, \"\\.\").replace(/\\*/g, \".*\"));\r\n if (regex.test(requestHost)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Combines target appId and target role name from response header.\r\n */\r\n public static getCorrelationContext(responseHeader: string) {\r\n if (responseHeader) {\r\n const correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, RequestHeaders.requestContextTargetKey);\r\n if (correlationId && correlationId !== CorrelationIdHelper.correlationIdPrefix) {\r\n return correlationId;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets key from correlation response header\r\n */\r\n public static getCorrelationContextValue(responseHeader: string, key: string) {\r\n if (responseHeader) {\r\n const keyValues = responseHeader.split(\",\");\r\n for (let i = 0; i < keyValues.length; ++i) {\r\n const keyValue = keyValues[i].split(\"=\");\r\n if (keyValue.length == 2 && keyValue[0] == key) {\r\n return keyValue[1];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n /**\r\n * Enum is used in aiDataContract to describe how fields are serialized. \r\n * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array\r\n */\r\n export enum FieldType { Default = 0, Required = 1, Array = 2, Hidden = 4 };\r\n\r\n export class Serializer {\r\n\r\n /**\r\n * Serializes the current object to a JSON string.\r\n */\r\n public static serialize(input: ISerializable): string {\r\n var output = Serializer._serializeObject(input, \"root\");\r\n return JSON.stringify(output);\r\n }\r\n\r\n private static _serializeObject(source: ISerializable, name: string): any {\r\n var circularReferenceCheck = \"__aiCircularRefCheck\";\r\n var output = {};\r\n\r\n if (!source) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, \"cannot serialize object because it is null or undefined\", { name: name }, true);\r\n return output;\r\n }\r\n\r\n if (source[circularReferenceCheck]) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CircularReferenceDetected, \"Circular reference detected while serializing object\", { name: name }, true);\r\n return output;\r\n }\r\n\r\n if (!source.aiDataContract) {\r\n // special case for measurements/properties/tags\r\n if (name === \"measurements\") {\r\n output = Serializer._serializeStringMap(source, \"number\", name);\r\n } else if (name === \"properties\") {\r\n output = Serializer._serializeStringMap(source, \"string\", name);\r\n } else if (name === \"tags\") {\r\n output = Serializer._serializeStringMap(source, \"string\", name);\r\n } else if (Util.isArray(source)) {\r\n output = Serializer._serializeArray(source, name);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, \"Attempting to serialize an object which does not implement ISerializable\", { name: name }, true);\r\n\r\n try {\r\n // verify that the object can be stringified\r\n JSON.stringify(source);\r\n output = source;\r\n } catch (e) {\r\n // if serialization fails return an empty string\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, (e && typeof e.toString === 'function') ? e.toString() : \"Error serializing object\", null, true);\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n \r\n source[circularReferenceCheck] = true;\r\n for (var field in source.aiDataContract) {\r\n\r\n var contract = source.aiDataContract[field];\r\n var isRequired = (typeof contract === \"function\") ? (contract() & FieldType.Required) : (contract & FieldType.Required);\r\n var isHidden = (typeof contract === \"function\") ? (contract() & FieldType.Hidden) : (contract & FieldType.Hidden);\r\n var isArray = contract & FieldType.Array;\r\n\r\n var isPresent = source[field] !== undefined;\r\n var isObject = typeof source[field] === \"object\" && source[field] !== null;\r\n\r\n if (isRequired && !isPresent && !isArray) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MissingRequiredFieldSpecification,\r\n \"Missing required field specification. The field is required but not present on source\",\r\n { field: field, name: name });\r\n\r\n // If not in debug mode, continue and hope the error is permissible\r\n continue;\r\n }\r\n\r\n if (isHidden) {\r\n // Don't serialize hidden fields\r\n continue;\r\n }\r\n\r\n var value;\r\n if (isObject) {\r\n if (isArray) {\r\n // special case; resurse on each object in the source array\r\n value = Serializer._serializeArray(source[field], field);\r\n } else {\r\n // recurse on the source object in this field\r\n value = Serializer._serializeObject(source[field], field);\r\n }\r\n } else {\r\n // assign the source field to the output even if undefined or required\r\n value = source[field];\r\n }\r\n\r\n // only emit this field if the value is defined\r\n if (value !== undefined) {\r\n output[field] = value;\r\n }\r\n }\r\n\r\n delete source[circularReferenceCheck];\r\n return output;\r\n }\r\n\r\n private static _serializeArray(sources: Array, name: string): Array {\r\n var output = undefined;\r\n\r\n if (!!sources) {\r\n if (!Util.isArray(sources)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.ItemNotInArray,\r\n \"This field was specified as an array in the contract but the item is not an array.\\r\\n\",\r\n { name: name }, true);\r\n } else {\r\n output = [];\r\n for (var i = 0; i < sources.length; i++) {\r\n var source = sources[i];\r\n var item = Serializer._serializeObject(source, name + \"[\" + i + \"]\");\r\n output.push(item);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n\r\n private static _serializeStringMap(map, expectedType, name) {\r\n var output = undefined;\r\n if (map) {\r\n output = {};\r\n for (var field in map) {\r\n var value = map[field];\r\n if (expectedType === \"string\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n } else if (value === null) {\r\n output[field] = \"null\";\r\n } else if (!value.toString) {\r\n output[field] = \"invalid field: toString() is not defined.\";\r\n }\r\n else {\r\n output[field] = value.toString();\r\n }\r\n }\r\n else if (expectedType === \"number\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n } else if (value === null) {\r\n output[field] = \"null\";\r\n } else {\r\n var num = parseFloat(value);\r\n if (isNaN(num)) {\r\n output[field] = \"NaN\";\r\n }\r\n else {\r\n output[field] = num;\r\n }\r\n }\r\n }\r\n else {\r\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, output[field], null, true);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class Envelope extends Microsoft.Telemetry.Envelope implements IEnvelope {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract;\r\n\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n constructor(data: Microsoft.Telemetry.Base, name: string) {\r\n super();\r\n\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n this.data = data;\r\n this.time = Util.toISOStringForIE8(new Date());\r\n\r\n this.aiDataContract = {\r\n time: FieldType.Required,\r\n iKey: FieldType.Required,\r\n name: FieldType.Required,\r\n sampleRate: () => {\r\n return (this.sampleRate == 100) ? FieldType.Hidden : FieldType.Required;\r\n },\r\n tags: FieldType.Required,\r\n data: FieldType.Required\r\n };\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n\r\n export class Base extends Microsoft.Telemetry.Base implements ISerializable {\r\n \r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {};\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n export class ContextTagKeys\r\n {\r\n \r\n /**\r\n * Application version. Information in the application context fields is always about the application that is sending the telemetry.\r\n */\r\n public applicationVersion: string;\r\n \r\n /**\r\n * Application build.\r\n */\r\n public applicationBuild: string;\r\n \r\n /**\r\n * Application type id.\r\n */\r\n public applicationTypeId: string;\r\n \r\n /**\r\n * Application id.\r\n */\r\n public applicationId: string;\r\n \r\n /**\r\n * Application layer.\r\n */\r\n public applicationLayer: string;\r\n \r\n /**\r\n * Unique client device id. Computer name in most cases.\r\n */\r\n public deviceId: string;\r\n public deviceIp: string;\r\n public deviceLanguage: string;\r\n \r\n /**\r\n * Device locale using - pattern, following RFC 5646. Example 'en-US'.\r\n */\r\n public deviceLocale: string;\r\n \r\n /**\r\n * Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.\r\n */\r\n public deviceModel: string;\r\n public deviceFriendlyName: string;\r\n public deviceNetwork: string;\r\n public deviceNetworkName: string;\r\n \r\n /**\r\n * Client device OEM name taken from the browser.\r\n */\r\n public deviceOEMName: string;\r\n public deviceOS: string;\r\n \r\n /**\r\n * Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'\r\n */\r\n public deviceOSVersion: string;\r\n \r\n /**\r\n * Name of the instance where application is running. Computer name for on-premisis, instance name for Azure.\r\n */\r\n public deviceRoleInstance: string;\r\n \r\n /**\r\n * Name of the role application is part of. Maps directly to the role name in azure.\r\n */\r\n public deviceRoleName: string;\r\n public deviceScreenResolution: string;\r\n \r\n /**\r\n * The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.\r\n */\r\n public deviceType: string;\r\n public deviceMachineName: string;\r\n public deviceVMName: string;\r\n public deviceBrowser: string;\r\n \r\n /**\r\n * The browser name and version as reported by the browser.\r\n */\r\n public deviceBrowserVersion: string;\r\n \r\n /**\r\n * The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationIp: string;\r\n \r\n /**\r\n * The country of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationCountry: string;\r\n \r\n /**\r\n * The province/state of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationProvince: string;\r\n \r\n /**\r\n * The city of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationCity: string;\r\n \r\n /**\r\n * A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.\r\n */\r\n public operationId: string;\r\n \r\n /**\r\n * The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').\r\n */\r\n public operationName: string;\r\n \r\n /**\r\n * The unique identifier of the telemetry item's immediate parent.\r\n */\r\n public operationParentId: string;\r\n public operationRootId: string;\r\n \r\n /**\r\n * Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.\r\n */\r\n public operationSyntheticSource: string;\r\n \r\n /**\r\n * The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.\r\n */\r\n public operationCorrelationVector: string;\r\n \r\n /**\r\n * Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.\r\n */\r\n public sessionId: string;\r\n \r\n /**\r\n * Boolean value indicating whether the session identified by ai.session.id is first for the user or not.\r\n */\r\n public sessionIsFirst: string;\r\n public sessionIsNew: string;\r\n public userAccountAcquisitionDate: string;\r\n \r\n /**\r\n * In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.\r\n */\r\n public userAccountId: string;\r\n \r\n /**\r\n * The browser's user agent string as reported by the browser. This property will be used to extract informaiton regarding the customer's browser but will not be stored. Use custom properties to store the original user agent.\r\n */\r\n public userAgent: string;\r\n \r\n /**\r\n * Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.\r\n */\r\n public userId: string;\r\n \r\n /**\r\n * Store region for UWP applications.\r\n */\r\n public userStoreRegion: string;\r\n \r\n /**\r\n * Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.\r\n */\r\n public userAuthUserId: string;\r\n public userAnonymousUserAcquisitionDate: string;\r\n public userAuthenticatedUserAcquisitionDate: string;\r\n public cloudName: string;\r\n \r\n /**\r\n * Name of the role the application is a part of. Maps directly to the role name in azure.\r\n */\r\n public cloudRole: string;\r\n public cloudRoleVer: string;\r\n \r\n /**\r\n * Name of the instance where the application is running. Computer name for on-premisis, instance name for Azure.\r\n */\r\n public cloudRoleInstance: string;\r\n public cloudEnvironment: string;\r\n public cloudLocation: string;\r\n public cloudDeploymentUnit: string;\r\n \r\n /**\r\n * SDK version. See https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.\r\n */\r\n public internalSdkVersion: string;\r\n \r\n /**\r\n * Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.\r\n */\r\n public internalAgentVersion: string;\r\n \r\n /**\r\n * This is the node name used for billing purposes. Use it to override the standard detection of nodes.\r\n */\r\n public internalNodeName: string;\r\n \r\n constructor()\r\n {\r\n this.applicationVersion = \"ai.application.ver\";\r\n this.applicationBuild = \"ai.application.build\";\r\n this.applicationTypeId = \"ai.application.typeId\";\r\n this.applicationId = \"ai.application.applicationId\";\r\n this.applicationLayer = \"ai.application.layer\";\r\n this.deviceId = \"ai.device.id\";\r\n this.deviceIp = \"ai.device.ip\";\r\n this.deviceLanguage = \"ai.device.language\";\r\n this.deviceLocale = \"ai.device.locale\";\r\n this.deviceModel = \"ai.device.model\";\r\n this.deviceFriendlyName = \"ai.device.friendlyName\";\r\n this.deviceNetwork = \"ai.device.network\";\r\n this.deviceNetworkName = \"ai.device.networkName\";\r\n this.deviceOEMName = \"ai.device.oemName\";\r\n this.deviceOS = \"ai.device.os\";\r\n this.deviceOSVersion = \"ai.device.osVersion\";\r\n this.deviceRoleInstance = \"ai.device.roleInstance\";\r\n this.deviceRoleName = \"ai.device.roleName\";\r\n this.deviceScreenResolution = \"ai.device.screenResolution\";\r\n this.deviceType = \"ai.device.type\";\r\n this.deviceMachineName = \"ai.device.machineName\";\r\n this.deviceVMName = \"ai.device.vmName\";\r\n this.deviceBrowser = \"ai.device.browser\";\r\n this.deviceBrowserVersion = \"ai.device.browserVersion\";\r\n this.locationIp = \"ai.location.ip\";\r\n this.locationCountry = \"ai.location.country\";\r\n this.locationProvince = \"ai.location.province\";\r\n this.locationCity = \"ai.location.city\";\r\n this.operationId = \"ai.operation.id\";\r\n this.operationName = \"ai.operation.name\";\r\n this.operationParentId = \"ai.operation.parentId\";\r\n this.operationRootId = \"ai.operation.rootId\";\r\n this.operationSyntheticSource = \"ai.operation.syntheticSource\";\r\n this.operationCorrelationVector = \"ai.operation.correlationVector\";\r\n this.sessionId = \"ai.session.id\";\r\n this.sessionIsFirst = \"ai.session.isFirst\";\r\n this.sessionIsNew = \"ai.session.isNew\";\r\n this.userAccountAcquisitionDate = \"ai.user.accountAcquisitionDate\";\r\n this.userAccountId = \"ai.user.accountId\";\r\n this.userAgent = \"ai.user.userAgent\";\r\n this.userId = \"ai.user.id\";\r\n this.userStoreRegion = \"ai.user.storeRegion\";\r\n this.userAuthUserId = \"ai.user.authUserId\";\r\n this.userAnonymousUserAcquisitionDate = \"ai.user.anonUserAcquisitionDate\";\r\n this.userAuthenticatedUserAcquisitionDate = \"ai.user.authUserAcquisitionDate\";\r\n this.cloudName = \"ai.cloud.name\";\r\n this.cloudRole = \"ai.cloud.role\";\r\n this.cloudRoleVer = \"ai.cloud.roleVer\";\r\n this.cloudRoleInstance = \"ai.cloud.roleInstance\";\r\n this.cloudEnvironment = \"ai.cloud.environment\";\r\n this.cloudLocation = \"ai.cloud.location\";\r\n this.cloudDeploymentUnit = \"ai.cloud.deploymentUnit\";\r\n this.internalSdkVersion = \"ai.internal.sdkVersion\";\r\n this.internalAgentVersion = \"ai.internal.agentVersion\";\r\n this.internalNodeName = \"ai.internal.nodeName\";\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Application implements IApplication {\r\n /**\r\n * The application version.\r\n */\r\n public ver: string;\r\n\r\n /**\r\n * The application build version.\r\n */\r\n public build: string;\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Device implements IDevice {\r\n\r\n /**\r\n * The type for the current device.\r\n */\r\n public type: string;\r\n\r\n /**\r\n * A device unique ID.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * The device OEM for the current device.\r\n */\r\n public oemName: string;\r\n\r\n /**\r\n * The device model for the current device.\r\n */\r\n public model: string;\r\n\r\n /**\r\n * The IANA interface type for the internet connected network adapter.\r\n */\r\n public network: number;\r\n\r\n /**\r\n * The application screen resolution.\r\n */\r\n public resolution: string;\r\n\r\n /**\r\n * The current display language of the operating system.\r\n */\r\n public locale: string;\r\n \r\n /**\r\n * The IP address.\r\n */\r\n public ip: string;\r\n\r\n /**\r\n * The device language.\r\n */\r\n public language: string;\r\n\r\n /**\r\n * The OS name.\r\n */\r\n public os: string;\r\n\r\n /**\r\n * The OS version.\r\n */\r\n public osversion: string;\r\n\r\n /**\r\n * Constructs a new instance of the Device class\r\n */\r\n constructor() {\r\n // don't attempt to fingerprint browsers\r\n this.id = \"browser\";\r\n\r\n // Device type is a dimension in our data platform\r\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\r\n this.type = \"Browser\";\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Internal implements IInternal {\r\n\r\n /**\r\n * The SDK version used to create this telemetry item.\r\n */\r\n public sdkVersion: string;\r\n\r\n /**\r\n * The SDK agent version.\r\n */\r\n public agentVersion: string;\r\n\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n constructor(config: ITelemetryConfig) {\r\n this.sdkVersion = (config.sdkExtension() ? config.sdkExtension() + \"_\" : \"\") + \"javascript:\" + Version;\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Location implements ILocation {\r\n\r\n /**\r\n * Client IP address for reverse lookup\r\n */\r\n public ip: string;\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Operation implements IOperation {\r\n\r\n public id: string;\r\n public name: string;\r\n public parentId: string;\r\n public rootId: string;\r\n public syntheticSource: string;\r\n\r\n constructor() {\r\n this.id = Util.newId();\r\n if (window && window.location && window.location.pathname) {\r\n this.name = window.location.pathname;\r\n }\r\n }\r\n }\r\n} ","module Microsoft.ApplicationInsights {\r\n export class HashCodeScoreGenerator {\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n public static INT_MAX_VALUE: number = 2147483647;\r\n\r\n // (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\r\n private static MIN_INPUT_LENGTH: number = 8;\r\n\r\n public getHashCodeScore(key: string): number {\r\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\r\n return score * 100;\r\n }\r\n\r\n public getHashCode(input: string): number {\r\n if (input == \"\") { return 0; }\r\n\r\n while (input.length < HashCodeScoreGenerator.MIN_INPUT_LENGTH) {\r\n input = input.concat(input);\r\n }\r\n\r\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\r\n var hash: number = 5381;\r\n\r\n for (var i: number = 0; i < input.length; ++i) {\r\n hash = ((hash << 5) + hash) + input.charCodeAt(i);\r\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\r\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\r\n hash = hash & hash;\r\n }\r\n\r\n return Math.abs(hash);\r\n }\r\n }\r\n} ","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n export class SamplingScoreGenerator {\r\n private hashCodeGeneragor: HashCodeScoreGenerator;\r\n\r\n constructor() {\r\n this.hashCodeGeneragor = new HashCodeScoreGenerator();\r\n }\r\n\r\n public getSamplingScore(envelope: Microsoft.ApplicationInsights.IEnvelope): number {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n var score: number = 0;\r\n if (envelope.tags[tagKeys.userId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.userId]);\r\n } else if (envelope.tags[tagKeys.operationId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.operationId]);\r\n } else {\r\n score = Math.random()\r\n }\r\n\r\n return score;\r\n }\r\n }\r\n} ","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Sample implements ISample {\r\n public sampleRate: number;\r\n private samplingScoreGenerator: SamplingScoreGenerator;\r\n\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n public INT_MAX_VALUE: number = 2147483647;\r\n\r\n constructor(sampleRate: number) {\r\n if (sampleRate > 100 || sampleRate < 0) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SampleRateOutOfRange,\r\n \"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.\",\r\n { samplingRate: sampleRate }, true);\r\n this.sampleRate = 100;\r\n }\r\n\r\n this.sampleRate = sampleRate;\r\n this.samplingScoreGenerator = new SamplingScoreGenerator();\r\n }\r\n\r\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */\r\n public isSampledIn(envelope: Microsoft.ApplicationInsights.IEnvelope): boolean {\r\n if (this.sampleRate == 100) return true;\r\n\r\n var score = this.samplingScoreGenerator.getSamplingScore(envelope);\r\n\r\n return score < this.sampleRate;\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISessionConfig {\r\n sessionRenewalMs: () => number;\r\n sessionExpirationMs: () => number;\r\n cookieDomain: () => string;\r\n }\r\n\r\n export class Session implements ISession {\r\n /**\r\n * The session ID.\r\n */\r\n public id: string;\r\n\r\n /** \r\n * The true if this is the first session \r\n */\r\n public isFirst: boolean;\r\n\r\n /**\r\n * The date at which this guid was genereated.\r\n * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.\r\n */\r\n public acquisitionDate: number;\r\n\r\n /**\r\n * The date at which this session ID was last reported.\r\n * This value should be updated whenever telemetry is sent using this ID.\r\n * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.\r\n */\r\n public renewalDate: number;\r\n }\r\n\r\n export class _SessionManager {\r\n\r\n public static acquisitionSpan = 86400000; // 24 hours in ms\r\n public static renewalSpan = 1800000; // 30 minutes in ms\r\n public static cookieUpdateInterval = 60000 // 1 minute in ms\r\n public automaticSession: Session;\r\n public config: ISessionConfig;\r\n\r\n private cookieUpdatedTimestamp: number;\r\n\r\n constructor(config: ISessionConfig) {\r\n\r\n if (!config) {\r\n config = {};\r\n }\r\n\r\n if (!(typeof config.sessionExpirationMs === \"function\")) {\r\n config.sessionExpirationMs = () => _SessionManager.acquisitionSpan;\r\n }\r\n\r\n if (!(typeof config.sessionRenewalMs === \"function\")) {\r\n config.sessionRenewalMs = () => _SessionManager.renewalSpan;\r\n }\r\n\r\n this.config = config;\r\n\r\n this.automaticSession = new Session();\r\n }\r\n\r\n public update() {\r\n if (!this.automaticSession.id) {\r\n this.initializeAutomaticSession();\r\n }\r\n\r\n var now = dateTime.Now();\r\n\r\n var acquisitionExpired = now - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs();\r\n var renewalExpired = now - this.automaticSession.renewalDate > this.config.sessionRenewalMs();\r\n\r\n // renew if acquisitionSpan or renewalSpan has ellapsed\r\n if (acquisitionExpired || renewalExpired) {\r\n // update automaticSession so session state has correct id \r\n this.automaticSession.isFirst = undefined;\r\n this.renew();\r\n } else {\r\n // do not update the cookie more often than cookieUpdateInterval\r\n if (!this.cookieUpdatedTimestamp || now - this.cookieUpdatedTimestamp > _SessionManager.cookieUpdateInterval) {\r\n this.automaticSession.renewalDate = now;\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\r\n public backup() {\r\n this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n\r\n /**\r\n * Use ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n */\r\n private initializeAutomaticSession() {\r\n var cookie = Util.getCookie('ai_session');\r\n if (cookie && typeof cookie.split === \"function\") {\r\n this.initializeAutomaticSessionWithData(cookie);\r\n } else {\r\n // There's no cookie, but we might have session data in local storage\r\n // This can happen if the session expired or the user actively deleted the cookie\r\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\r\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\r\n var storage = Util.getStorage('ai_session');\r\n if (storage) {\r\n this.initializeAutomaticSessionWithData(storage);\r\n }\r\n }\r\n\r\n if (!this.automaticSession.id) {\r\n this.automaticSession.isFirst = true;\r\n this.renew();\r\n }\r\n }\r\n\r\n /**\r\n * Extract id, aquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param {string} sessionData - The string stored in an ai_session cookie or local storage backup\r\n */\r\n private initializeAutomaticSessionWithData(sessionData: string) {\r\n var params = sessionData.split(\"|\");\r\n\r\n if (params.length > 0) {\r\n this.automaticSession.id = params[0];\r\n }\r\n\r\n try {\r\n if (params.length > 1) {\r\n var acq = +params[1];\r\n this.automaticSession.acquisitionDate = +new Date(acq);\r\n this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0;\r\n }\r\n\r\n if (params.length > 2) {\r\n var renewal = +params[2];\r\n this.automaticSession.renewalDate = +new Date(renewal);\r\n this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0;\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n\r\n _InternalMessageId.ErrorParsingAISessionCookie,\r\n \"Error parsing ai_session cookie, session will be reset: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n\r\n if (this.automaticSession.renewalDate == 0) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SessionRenewalDateIsZero,\r\n \"AI session renewal date is 0, session will be reset.\");\r\n }\r\n }\r\n\r\n private renew() {\r\n var now = dateTime.Now();\r\n\r\n this.automaticSession.id = Util.newId();\r\n this.automaticSession.acquisitionDate = now;\r\n this.automaticSession.renewalDate = now;\r\n\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n\r\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\r\n if (!Util.canUseLocalStorage()) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserDoesNotSupportLocalStorage,\r\n \"Browser does not support local storage. Session durations will be inaccurate.\");\r\n }\r\n }\r\n\r\n private setCookie(guid: string, acq: number, renewal: number) {\r\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\r\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\r\n var acquisitionExpiry = acq + this.config.sessionExpirationMs();\r\n var renewalExpiry = renewal + this.config.sessionRenewalMs();\r\n var cookieExpiry = new Date();\r\n var cookie = [guid, acq, renewal];\r\n\r\n if (acquisitionExpiry < renewalExpiry) {\r\n cookieExpiry.setTime(acquisitionExpiry);\r\n } else {\r\n cookieExpiry.setTime(renewalExpiry);\r\n }\r\n\r\n var cookieDomnain = this.config.cookieDomain ? this.config.cookieDomain() : null;\r\n\r\n Util.setCookie('ai_session', cookie.join('|') + ';expires=' + cookieExpiry.toUTCString(), cookieDomnain);\r\n\r\n this.cookieUpdatedTimestamp = dateTime.Now();\r\n }\r\n\r\n private setStorage(guid: string, acq: number, renewal: number) {\r\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\r\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\r\n // The server will notice this and end the sessions itself, with loss of accurate session duration\r\n Util.setStorage('ai_session', [guid, acq, renewal].join('|'));\r\n }\r\n }\r\n} ","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class User implements IUser {\r\n\r\n static cookieSeparator: string = '|';\r\n static userCookieName: string = 'ai_user';\r\n static authUserCookieName: string = 'ai_authUser';\r\n\r\n /**\r\n * The telemetry configuration.\r\n */\r\n public config: ITelemetryConfig;\r\n\r\n /**\r\n * The user ID.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * Authenticated user id\r\n */\r\n public authenticatedId: string;\r\n\r\n /**\r\n * The account ID.\r\n */\r\n public accountId: string;\r\n\r\n /**\r\n * The account acquisition date.\r\n */\r\n public accountAcquisitionDate: string;\r\n\r\n /**\r\n * The user agent string.\r\n */\r\n public agent: string;\r\n\r\n /**\r\n * The store region.\r\n */\r\n public storeRegion: string;\r\n\r\n /**\r\n * Sets the authenticated user id and the account id in this session.\r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false) {\r\n\r\n // Validate inputs to ensure no cookie control characters.\r\n var isInvalidInput = !this.validateUserInput(authenticatedUserId) || (accountId && !this.validateUserInput(accountId));\r\n if (isInvalidInput) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailedAccountName,\r\n \"Setting auth user context failed. \" +\r\n \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\",\r\n true);\r\n return;\r\n }\r\n\r\n // Create cookie string.\r\n this.authenticatedId = authenticatedUserId;\r\n var authCookie = this.authenticatedId;\r\n if (accountId) {\r\n this.accountId = accountId;\r\n authCookie = [this.authenticatedId, this.accountId].join(User.cookieSeparator);\r\n }\r\n\r\n if (storeInCookie) {\r\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\r\n // Encoding the cookie to handle unexpected unicode characters.\r\n Util.setCookie(User.authUserCookieName, encodeURI(authCookie), this.config.cookieDomain());\r\n }\r\n }\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {} \r\n */\r\n public clearAuthenticatedUserContext() {\r\n this.authenticatedId = null;\r\n this.accountId = null;\r\n Util.deleteCookie(User.authUserCookieName);\r\n }\r\n\r\n constructor(config: ITelemetryConfig) {\r\n\r\n //get userId or create new one if none exists\r\n var cookie = Util.getCookie(User.userCookieName);\r\n if (cookie) {\r\n var params = cookie.split(User.cookieSeparator);\r\n if (params.length > 0) {\r\n this.id = params[0];\r\n }\r\n }\r\n\r\n this.config = config;\r\n\r\n if (!this.id) {\r\n this.id = Util.newId();\r\n var date = new Date();\r\n var acqStr = Util.toISOStringForIE8(date);\r\n this.accountAcquisitionDate = acqStr;\r\n // without expiration, cookies expire at the end of the session\r\n // set it to 365 days from now\r\n // 365 * 24 * 60 * 60 * 1000 = 31536000000 \r\n date.setTime(date.getTime() + 31536000000);\r\n var newCookie = [this.id, acqStr];\r\n var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : undefined;\r\n\r\n Util.setCookie(User.userCookieName, newCookie.join(User.cookieSeparator) + ';expires=' + date.toUTCString(), cookieDomain);\r\n\r\n // If we have an ai_session in local storage this means the user actively removed our cookies.\r\n // We should respect their wishes and clear ourselves from local storage\r\n Util.removeStorage('ai_session');\r\n }\r\n\r\n // We still take the account id from the ctor param for backward compatibility. \r\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\r\n this.accountId = config.accountId ? config.accountId() : undefined;\r\n\r\n // Get the auth user id and account id from the cookie if exists\r\n // Cookie is in the pattern: |\r\n var authCookie = Util.getCookie(User.authUserCookieName);\r\n if (authCookie) {\r\n authCookie = decodeURI(authCookie);\r\n var authCookieString = authCookie.split(User.cookieSeparator);\r\n if (authCookieString[0]) {\r\n this.authenticatedId = authCookieString[0];\r\n }\r\n if (authCookieString.length > 1 && authCookieString[1]) {\r\n this.accountId = authCookieString[1];\r\n }\r\n }\r\n }\r\n\r\n private validateUserInput(id: string): boolean {\r\n // Validate:\r\n // 1. Id is a non-empty string.\r\n // 2. It does not contain special characters for cookies.\r\n if (typeof id !== 'string' ||\r\n !id ||\r\n id.match(/,|;|=| |\\|/)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class extensions {\r\n public static IsNullOrUndefined(obj) {\r\n return typeof (obj) === \"undefined\" || obj === null;\r\n }\r\n }\r\n\r\n export class stringUtils {\r\n public static GetLength(strObject) {\r\n var res = 0;\r\n if (!extensions.IsNullOrUndefined(strObject)) {\r\n var stringified = \"\";\r\n try {\r\n stringified = strObject.toString();\r\n } catch (ex) {\r\n // some troubles with complex object\r\n }\r\n\r\n res = stringified.length;\r\n res = isNaN(res) ? 0 : res;\r\n }\r\n\r\n return res;\r\n }\r\n }\r\n\r\n export class dateTime {\r\n ///Return the number of milliseconds since 1970/01/01 in local timezon\r\n public static Now = (window.performance && window.performance.now && window.performance.timing) ?\r\n function () {\r\n return window.performance.now() + window.performance.timing.navigationStart;\r\n }\r\n :\r\n function () {\r\n return new Date().getTime();\r\n }\r\n\r\n ///Gets duration between two timestamps\r\n public static GetDuration = function (start: number, end: number): number {\r\n var result = null;\r\n if (start !== 0 && end !== 0 && !extensions.IsNullOrUndefined(start) && !extensions.IsNullOrUndefined(end)) {\r\n result = end - start;\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n export class EventHelper {\r\n ///Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n ///Object to which \r\n ///String that specifies any of the standard DHTML Events without \"on\" prefix\r\n ///Pointer that specifies the function to call when event fires\r\n ///True if the function was bound successfully to the event, otherwise false\r\n public static AttachEvent(obj, eventNameWithoutOn, handlerRef) {\r\n var result = false;\r\n if (!extensions.IsNullOrUndefined(obj)) {\r\n if (!extensions.IsNullOrUndefined(obj.attachEvent)) {\r\n // IE before version 9 \r\n obj.attachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n result = true;\r\n }\r\n else {\r\n if (!extensions.IsNullOrUndefined(obj.addEventListener)) {\r\n // all browsers except IE before version 9\r\n obj.addEventListener(eventNameWithoutOn, handlerRef, false);\r\n result = true;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static DetachEvent(obj, eventNameWithoutOn, handlerRef) {\r\n if (!extensions.IsNullOrUndefined(obj)) {\r\n if (!extensions.IsNullOrUndefined(obj.detachEvent)) {\r\n obj.detachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n }\r\n else {\r\n if (!extensions.IsNullOrUndefined(obj.removeEventListener)) {\r\n obj.removeEventListener(eventNameWithoutOn, handlerRef, false);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class AjaxHelper {\r\n public static ParseDependencyPath(absoluteUrl: string, method: string, pathName: string) {\r\n var target, name; \r\n if (absoluteUrl && absoluteUrl.length > 0) {\r\n var parsedUrl: HTMLAnchorElement = UrlHelper.parseUrl(absoluteUrl)\r\n target = parsedUrl.host;\r\n if (parsedUrl.pathname != null) {\r\n var pathName: string = (parsedUrl.pathname.length === 0) ? \"/\" : parsedUrl.pathname;\r\n if (pathName.charAt(0) !== '/') {\r\n pathName = \"/\" + pathName;\r\n }\r\n\r\n name = Telemetry.Common.DataSanitizer.sanitizeString(method ? method + \" \" + pathName : pathName);\r\n } else {\r\n name = Telemetry.Common.DataSanitizer.sanitizeString(absoluteUrl);\r\n }\r\n } else {\r\n target = pathName;\r\n name = pathName;\r\n }\r\n\r\n return {\r\n target: target, \r\n name: name\r\n };\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class XHRMonitoringState {\r\n public openDone: boolean = false;\r\n public setRequestHeaderDone: boolean = false;\r\n public sendDone: boolean = false;\r\n public abortDone: boolean = false;\r\n\r\n //True, if onreadyStateChangeCallback function attached to xhr, otherwise false\r\n public onreadystatechangeCallbackAttached = false;\r\n }\r\n\r\n export class ajaxRecord {\r\n public completed = false;\r\n public requestHeadersSize = null;\r\n public ttfb = null;\r\n public responseReceivingDuration = null;\r\n public callbackDuration = null;\r\n public ajaxTotalDuration = null;\r\n public aborted = null;\r\n public pageUrl = null;\r\n public requestUrl = null;\r\n public requestSize = 0;\r\n public method = null;\r\n\r\n ///Returns the HTTP status code.\r\n public status = null; \r\n \r\n //The timestamp when open method was invoked\r\n public requestSentTime = null;\r\n\r\n //The timestamps when first byte was received\r\n public responseStartedTime = null;\r\n\r\n //The timestamp when last byte was received\r\n public responseFinishedTime = null;\r\n\r\n //The timestamp when onreadystatechange callback in readyState 4 finished\r\n public callbackFinishedTime = null;\r\n \r\n //The timestamp at which ajax was ended\r\n public endTime = null;\r\n\r\n //The original xhr onreadystatechange event\r\n public originalOnreadystatechage = null;\r\n\r\n public xhrMonitoringState: XHRMonitoringState = new XHRMonitoringState();\r\n\r\n //Determines whether or not JavaScript exception occured in xhr.onreadystatechange code. 1 if occured, otherwise 0.\r\n public clientFailure = 0;\r\n\r\n\r\n public id: string;\r\n\r\n constructor(id: string) {\r\n this.id = id;\r\n }\r\n\r\n\r\n public getAbsoluteUrl() {\r\n return this.requestUrl ? UrlHelper.getAbsoluteUrl(this.requestUrl) : null;\r\n }\r\n\r\n public getPathName() {\r\n return this.requestUrl ? Telemetry.Common.DataSanitizer.sanitizeUrl(UrlHelper.getCompleteUrl(this.method, this.requestUrl)): null;\r\n }\r\n\r\n public CalculateMetrics = function () {\r\n var self = this;\r\n // round to 3 decimal points\r\n self.ajaxTotalDuration = Math.round(dateTime.GetDuration(self.requestSentTime, self.responseFinishedTime)*1000)/1000;\r\n }\r\n };\r\n}; \r\n\r\n","module Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class RequestHeaders {\r\n /**\r\n * Request-Context header\r\n */\r\n public static requestContextHeader = \"Request-Context\";\r\n\r\n /**\r\n * Target instrumentation header that is added to the response and retrieved by the\r\n * calling application when processing incoming responses.\r\n */\r\n public static requestContextTargetKey = \"appId\";\r\n\r\n /**\r\n * Request-Context appId format\r\n */\r\n public static requestContextAppIdFormat = \"appId=cid-v1:\";\r\n\r\n /**\r\n * Request-Id header\r\n */\r\n public static requestIdHeader = \"Request-Id\";\r\n\r\n /**\r\n * Sdk-Context header\r\n * If this header passed with appId in content then appId will be returned back by the backend.\r\n */\r\n public static sdkContextHeader = \"Sdk-Context\";\r\n\r\n /**\r\n * String to pass in header for requesting appId back from the backend.\r\n */\r\n public static sdkContextHeaderAppIdRequest = \"appId\";\r\n\r\n public static requestContextHeaderLowerCase = \"request-context\";\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * The abstract common base of all domains.\r\n */\r\n export class Domain\r\n {\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.\r\n */\r\n export class EventData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.\r\n */\r\n export class PageViewData extends AI.EventData\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Request URL with all query string parameters\r\n */\r\n public url: string;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Identifier of a page view instance. Used for correlation between page view and other telemetry items.\r\n */\r\n public id: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.\r\n */\r\n export class RemoteDependencyData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call.\r\n */\r\n public id: string;\r\n \r\n /**\r\n * Result code of a dependency call. Examples are SQL error code and HTTP status code.\r\n */\r\n public resultCode: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Indication of successfull or unsuccessfull call.\r\n */\r\n public success: boolean;\r\n \r\n /**\r\n * Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.\r\n */\r\n public data: string;\r\n \r\n /**\r\n * Target site of a dependency call. Examples are server name, host address.\r\n */\r\n public target: string;\r\n \r\n /**\r\n * Dependency type name. Very low cardinality value for logical grouping of dependencies and interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP.\r\n */\r\n public type: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.success = true;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n\r\n export class DataSanitizer {\r\n\r\n /**\r\n * Max length allowed for custom names.\r\n */\r\n private static MAX_NAME_LENGTH = 150;\r\n\r\n /**\r\n * Max length allowed for Id field in page views.\r\n */\r\n private static MAX_ID_LENGTH = 128;\r\n\r\n /**\r\n * Max length allowed for custom values.\r\n */\r\n private static MAX_PROPERTY_LENGTH = 8192;\r\n\r\n /**\r\n * Max length allowed for names\r\n */\r\n private static MAX_STRING_LENGTH = 1024;\r\n\r\n /**\r\n * Max length allowed for url.\r\n */\r\n private static MAX_URL_LENGTH = 2048;\r\n\r\n /**\r\n * Max length allowed for messages.\r\n */\r\n private static MAX_MESSAGE_LENGTH = 32768;\r\n\r\n /**\r\n * Max length allowed for exceptions.\r\n */\r\n private static MAX_EXCEPTION_LENGTH = 32768;\r\n\r\n public static sanitizeKeyAndAddUniqueness(key, map) {\r\n var origLength = key.length;\r\n var field = DataSanitizer.sanitizeKey(key);\r\n\r\n // validation truncated the length. We need to add uniqueness\r\n if (field.length !== origLength) {\r\n var i = 0;\r\n var uniqueField = field;\r\n while (map[uniqueField] !== undefined) {\r\n i++;\r\n uniqueField = field.substring(0, DataSanitizer.MAX_NAME_LENGTH - 3) + DataSanitizer.padNumber(i);\r\n }\r\n field = uniqueField;\r\n }\r\n return field;\r\n }\r\n\r\n public static sanitizeKey(name) {\r\n if (name) {\r\n // Remove any leading or trailing whitepace\r\n name = Util.trim(name.toString());\r\n\r\n // truncate the string to 150 chars\r\n if (name.length > DataSanitizer.MAX_NAME_LENGTH) {\r\n name = name.substring(0, DataSanitizer.MAX_NAME_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.NameTooLong,\r\n \"name is too long. It has been truncated to \" + DataSanitizer.MAX_NAME_LENGTH + \" characters.\",\r\n { name: name }, true);\r\n }\r\n }\r\n\r\n return name;\r\n }\r\n\r\n public static sanitizeString(value, maxLength: number = DataSanitizer.MAX_STRING_LENGTH) {\r\n if (value) {\r\n maxLength = maxLength ? maxLength: DataSanitizer.MAX_STRING_LENGTH; // in case default parameters dont work\r\n value = Util.trim(value);\r\n if (value.toString().length > maxLength) {\r\n value = value.toString().substring(0, maxLength);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.StringValueTooLong,\r\n \"string value is too long. It has been truncated to \" + maxLength + \" characters.\",\r\n { value: value }, true);\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n public static sanitizeUrl(url) {\r\n return DataSanitizer.sanitizeInput(url, DataSanitizer.MAX_URL_LENGTH, _InternalMessageId.UrlTooLong);\r\n }\r\n\r\n public static sanitizeMessage(message) {\r\n if (message) {\r\n if (message.length > DataSanitizer.MAX_MESSAGE_LENGTH) {\r\n message = message.substring(0, DataSanitizer.MAX_MESSAGE_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated,\r\n \"message is too long, it has been truncated to \" + DataSanitizer.MAX_MESSAGE_LENGTH + \" characters.\",\r\n { message: message },\r\n true);\r\n }\r\n }\r\n\r\n return message;\r\n }\r\n\r\n public static sanitizeException(exception) {\r\n if (exception) {\r\n if (exception.length > DataSanitizer.MAX_EXCEPTION_LENGTH) {\r\n exception = exception.substring(0, DataSanitizer.MAX_EXCEPTION_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, \"exception is too long, it has been truncated to \" + DataSanitizer.MAX_EXCEPTION_LENGTH + \" characters.\",\r\n { exception: exception }, true);\r\n }\r\n }\r\n\r\n return exception;\r\n }\r\n\r\n public static sanitizeProperties(properties) {\r\n if (properties) {\r\n var tempProps = {};\r\n for (var prop in properties) {\r\n var value = DataSanitizer.sanitizeString(properties[prop], DataSanitizer.MAX_PROPERTY_LENGTH);\r\n prop = DataSanitizer.sanitizeKeyAndAddUniqueness(prop, tempProps);\r\n tempProps[prop] = value;\r\n }\r\n properties = tempProps;\r\n }\r\n\r\n return properties;\r\n }\r\n\r\n public static sanitizeMeasurements(measurements) {\r\n if (measurements) {\r\n var tempMeasurements = {};\r\n for (var measure in measurements) {\r\n var value = measurements[measure];\r\n measure = DataSanitizer.sanitizeKeyAndAddUniqueness(measure, tempMeasurements);\r\n tempMeasurements[measure] = value;\r\n }\r\n measurements = tempMeasurements;\r\n }\r\n\r\n return measurements;\r\n }\r\n\r\n public static sanitizeId(id: string): string {\r\n return id ? DataSanitizer.sanitizeInput(id, DataSanitizer.MAX_ID_LENGTH, _InternalMessageId.IdTooLong).toString() : id;\r\n }\r\n\r\n public static sanitizeInput(input: any, maxLength: number, _msgId: _InternalMessageId) {\r\n if (input) {\r\n input = Util.trim(input);\r\n if (input.length > maxLength) {\r\n input = input.substring(0, maxLength);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _msgId,\r\n \"input is too long, it has been truncated to \" + maxLength + \" characters.\",\r\n { data: input },\r\n true);\r\n }\r\n }\r\n\r\n return input;\r\n }\r\n\r\n public static padNumber(num) {\r\n var s = \"00\" + num;\r\n return s.substr(s.length - 3);\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class RemoteDependencyData extends AI.RemoteDependencyData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\r\n public static dataType = \"RemoteDependencyData\";\r\n\r\n public aiDataContract = {\r\n id: FieldType.Required,\r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n resultCode: FieldType.Default,\r\n duration: FieldType.Default,\r\n success: FieldType.Default,\r\n data: FieldType.Default,\r\n target: FieldType.Default,\r\n type: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default,\r\n\r\n kind: FieldType.Default,\r\n value: FieldType.Default,\r\n count: FieldType.Default,\r\n min: FieldType.Default,\r\n max: FieldType.Default,\r\n stdDev: FieldType.Default,\r\n dependencyKind: FieldType.Default,\r\n dependencySource: FieldType.Default,\r\n commandName: FieldType.Default,\r\n dependencyTypeName: FieldType.Default,\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\r\n constructor(id: string, absoluteUrl: string, commandName: string, value: number, success: boolean, resultCode: number, method?: string, properties?: Object, measurements?: Object) {\r\n super();\r\n\r\n this.id = id;\r\n\r\n this.duration = Util.msToTimeSpan(value);\r\n this.success = success;\r\n this.resultCode = resultCode + \"\";\r\n\r\n this.type = \"Ajax\";\r\n this.data = Common.DataSanitizer.sanitizeUrl(commandName);\r\n\r\n var dependencyFields = AjaxHelper.ParseDependencyPath(absoluteUrl, method, commandName);\r\n this.target = dependencyFields.target;\r\n this.name = dependencyFields.name;\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface XMLHttpRequestInstrumented extends XMLHttpRequest {\r\n ajaxData: ajaxRecord;\r\n }\r\n\r\n export class AjaxMonitor {\r\n private appInsights: AppInsights;\r\n private initialized: boolean;\r\n private static instrumentedByAppInsightsName = \"InstrumentedByAppInsights\";\r\n private currentWindowHost;\r\n\r\n constructor(appInsights: Microsoft.ApplicationInsights.AppInsights) {\r\n this.currentWindowHost = window.location.host && window.location.host.toLowerCase();\r\n this.appInsights = appInsights;\r\n this.initialized = false;\r\n this.Init();\r\n }\r\n\r\n ///The main function that needs to be called in order to start Ajax Monitoring\r\n private Init() {\r\n if (this.supportsMonitoring()) {\r\n this.instrumentOpen();\r\n this.instrumentSend();\r\n this.instrumentAbort();\r\n this.initialized = true;\r\n }\r\n }\r\n\r\n\r\n ///Function that returns property name which will identify that monitoring for given instance of XmlHttpRequest is disabled\r\n public static DisabledPropertyName: string = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\n\r\n ///Verifies that particalar instance of XMLHttpRequest needs to be monitored\r\n ///Optional parameter. True if ajaxData must be excluded from verification\r\n ///True if instance needs to be monitored, otherwise false\r\n private isMonitoredInstance(xhr: XMLHttpRequestInstrumented, excludeAjaxDataValidation?: boolean): boolean {\r\n\r\n // checking to see that all interested functions on xhr were instrumented\r\n return this.initialized\r\n\r\n // checking on ajaxData to see that it was not removed in user code\r\n && (excludeAjaxDataValidation === true || !extensions.IsNullOrUndefined(xhr.ajaxData))\r\n\r\n // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\r\n && xhr[AjaxMonitor.DisabledPropertyName] !== true;\r\n\r\n }\r\n\r\n ///Determines whether ajax monitoring can be enabled on this document\r\n ///True if Ajax monitoring is supported on this page, otherwise false\r\n private supportsMonitoring(): boolean {\r\n var result = true;\r\n if (extensions.IsNullOrUndefined(XMLHttpRequest) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort)) {\r\n result = false;\r\n }\r\n\r\n // disable in IE8 or older (https://www.w3schools.com/jsref/jsref_trim_string.asp)\r\n try {\r\n \" a \".trim();\r\n } catch (ex) {\r\n result = false;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private instrumentOpen() {\r\n var originalOpen = XMLHttpRequest.prototype.open;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.open = function (method, url, async) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this, true) &&\r\n (\r\n !(this).ajaxData ||\r\n !(this).ajaxData.xhrMonitoringState.openDone\r\n )) {\r\n ajaxMonitorInstance.openHandler(this, method, url, async);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxOpen,\r\n \"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalOpen.apply(this, arguments);\r\n };\r\n }\r\n\r\n private openHandler(xhr: XMLHttpRequestInstrumented, method, url, async) {\r\n // this format corresponds with activity logic on server-side and is required for the correct correlation\r\n var id = \"|\" + this.appInsights.context.operation.id + \".\" + Util.newId();\r\n\r\n var ajaxData = new ajaxRecord(id);\r\n ajaxData.method = method;\r\n ajaxData.requestUrl = url;\r\n ajaxData.xhrMonitoringState.openDone = true\r\n xhr.ajaxData = ajaxData;\r\n\r\n this.attachToOnReadyStateChange(xhr);\r\n }\r\n\r\n private static getFailedAjaxDiagnosticsMessage(xhr: XMLHttpRequestInstrumented): string {\r\n var result = \"\";\r\n try {\r\n if (!extensions.IsNullOrUndefined(xhr) &&\r\n !extensions.IsNullOrUndefined(xhr.ajaxData) &&\r\n !extensions.IsNullOrUndefined(xhr.ajaxData.requestUrl)) {\r\n result += \"(url: '\" + xhr.ajaxData.requestUrl + \"')\";\r\n }\r\n } catch (e) { }\r\n\r\n return result;\r\n }\r\n\r\n private instrumentSend() {\r\n var originalSend = XMLHttpRequest.prototype.send;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.send = function (content) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !(this).ajaxData.xhrMonitoringState.sendDone) {\r\n ajaxMonitorInstance.sendHandler(this, content);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxSend,\r\n \"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalSend.apply(this, arguments);\r\n };\r\n }\r\n\r\n private sendHandler(xhr: XMLHttpRequestInstrumented, content) {\r\n xhr.ajaxData.requestSentTime = dateTime.Now();\r\n\r\n if (CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, xhr.ajaxData.getAbsoluteUrl(), \r\n this.currentWindowHost)) {\r\n xhr.setRequestHeader(RequestHeaders.requestIdHeader, xhr.ajaxData.id);\r\n if (this.appInsights.context) {\r\n var appId = this.appInsights.context.appId();\r\n if (appId) {\r\n xhr.setRequestHeader(RequestHeaders.requestContextHeader, RequestHeaders.requestContextAppIdFormat + appId);\r\n }\r\n }\r\n }\r\n xhr.ajaxData.xhrMonitoringState.sendDone = true;\r\n }\r\n\r\n private instrumentAbort() {\r\n var originalAbort = XMLHttpRequest.prototype.abort;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.abort = function () {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !(this).ajaxData.xhrMonitoringState.abortDone) {\r\n (this).ajaxData.aborted = 1;\r\n (this).ajaxData.xhrMonitoringState.abortDone = true;\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxAbort,\r\n \"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalAbort.apply(this, arguments);\r\n };\r\n }\r\n\r\n private attachToOnReadyStateChange(xhr: XMLHttpRequestInstrumented) {\r\n var ajaxMonitorInstance = this;\r\n xhr.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached = EventHelper.AttachEvent(xhr, \"readystatechange\", () => {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(xhr)) {\r\n if (xhr.readyState === 4) {\r\n ajaxMonitorInstance.onAjaxComplete(xhr);\r\n }\r\n }\r\n } catch (e) {\r\n var exceptionText = Microsoft.ApplicationInsights.Util.dump(e);\r\n\r\n // ignore messages with c00c023f, as this a known IE9 XHR abort issue\r\n if (!exceptionText || exceptionText.toLowerCase().indexOf(\"c00c023f\") == -1) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxRSC,\r\n \"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n private onAjaxComplete(xhr: XMLHttpRequestInstrumented) {\r\n xhr.ajaxData.responseFinishedTime = dateTime.Now();\r\n xhr.ajaxData.status = xhr.status;\r\n xhr.ajaxData.CalculateMetrics();\r\n \r\n if (xhr.ajaxData.ajaxTotalDuration < 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxDur,\r\n \"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n requestSentTime: xhr.ajaxData.requestSentTime,\r\n responseFinishedTime: xhr.ajaxData.responseFinishedTime\r\n });\r\n }\r\n else {\r\n var dependency = new Telemetry.RemoteDependencyData(\r\n xhr.ajaxData.id, \r\n xhr.ajaxData.getAbsoluteUrl(), \r\n xhr.ajaxData.getPathName(), \r\n xhr.ajaxData.ajaxTotalDuration, \r\n (+(xhr.ajaxData.status)) >= 200 && (+(xhr.ajaxData.status)) < 400, \r\n +xhr.ajaxData.status, \r\n xhr.ajaxData.method); \r\n\r\n // enrich dependency target with correlation context from the server\r\n var correlationContext = this.getCorrelationContext(xhr);\r\n if (correlationContext) {\r\n dependency.target = dependency.target + \" | \" + correlationContext;\r\n }\r\n \r\n this.appInsights.trackDependencyData(dependency);\r\n\r\n xhr.ajaxData = null;\r\n }\r\n }\r\n\r\n private getCorrelationContext(xhr: XMLHttpRequestInstrumented) {\r\n try {\r\n var responseHeadersString = xhr.getAllResponseHeaders();\r\n if (responseHeadersString !== null) {\r\n var index = responseHeadersString.toLowerCase().indexOf(RequestHeaders.requestContextHeaderLowerCase);\r\n if (index !== -1) {\r\n var responseHeader = xhr.getResponseHeader(RequestHeaders.requestContextHeader);\r\n return CorrelationIdHelper.getCorrelationContext(responseHeader);\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n } \r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ISendBuffer {\r\n /**\r\n * Enqueue the payload\r\n */\r\n enqueue: (payload: string) => void;\r\n\r\n /**\r\n * Returns the number of elements in the buffer\r\n */\r\n count: () => number;\r\n\r\n /**\r\n * Clears the buffer\r\n */\r\n clear: () => void;\r\n\r\n /**\r\n * Returns items stored in the buffer\r\n */\r\n getItems: () => string[];\r\n\r\n /**\r\n * Build a batch of all elements in the payload array\r\n */\r\n batchPayloads: (payload: string[]) => string;\r\n\r\n /**\r\n * Moves items to the SENT_BUFFER.\r\n * The buffer holds items which were sent, but we haven't received any response from the backend yet. \r\n */\r\n markAsSent: (payload: string[]) => void;\r\n\r\n /**\r\n * Removes items from the SENT_BUFFER. Should be called on successful response from the backend. \r\n */\r\n clearSent: (payload: string[]) => void;\r\n }\r\n\r\n /*\r\n * An array based send buffer. \r\n */\r\n export class ArraySendBuffer implements ISendBuffer {\r\n private _config: ISenderConfig;\r\n private _buffer: string[];\r\n\r\n constructor(config: ISenderConfig) {\r\n this._config = config;\r\n\r\n this._buffer = [];\r\n }\r\n\r\n public enqueue(payload: string) {\r\n this._buffer.push(payload);\r\n }\r\n\r\n public count(): number {\r\n return this._buffer.length;\r\n }\r\n\r\n public clear() {\r\n this._buffer.length = 0;\r\n }\r\n\r\n public getItems(): string[] {\r\n return this._buffer.slice(0);\r\n }\r\n\r\n public batchPayloads(payload: string[]): string {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n\r\n return batch;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public markAsSent(payload: string[]) {\r\n this.clear();\r\n }\r\n\r\n public clearSent(payload: string[]) {\r\n // not supported\r\n }\r\n }\r\n\r\n /*\r\n * Session storege buffer holds a copy of all unsent items in the browser session storage.\r\n */\r\n export class SessionStorageSendBuffer implements ISendBuffer {\r\n static BUFFER_KEY = \"AI_buffer\";\r\n static SENT_BUFFER_KEY = \"AI_sentBuffer\";\r\n\r\n // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped. \r\n static MAX_BUFFER_SIZE = 2000;\r\n private _bufferFullMessageSent = false;\r\n\r\n // An in-memory copy of the buffer. A copy is saved to the session storage on enqueue() and clear(). \r\n // The buffer is restored in a constructor and contains unsent events from a previous page.\r\n private _buffer: string[];\r\n private _config: ISenderConfig;\r\n\r\n constructor(config: ISenderConfig) {\r\n this._config = config;\r\n\r\n var bufferItems = this.getBuffer(SessionStorageSendBuffer.BUFFER_KEY);\r\n var notDeliveredItems = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n\r\n this._buffer = bufferItems.concat(notDeliveredItems);\r\n\r\n // If the buffer has too many items, drop items from the end.\r\n if (this._buffer.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n this._buffer.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n\r\n // update DataLossAnalyzer with the number of recovered items\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.itemsRestoredFromSessionBuffer = this._buffer.length;\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n\r\n public enqueue(payload: string) {\r\n if (this._buffer.length >= SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // sent internal log only once per page view\r\n if (!this._bufferFullMessageSent) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.SessionStorageBufferFull,\r\n \"Maximum buffer size reached: \" + this._buffer.length,\r\n true);\r\n this._bufferFullMessageSent = true;\r\n }\r\n return;\r\n }\r\n\r\n this._buffer.push(payload);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n\r\n public count(): number {\r\n return this._buffer.length;\r\n }\r\n\r\n public clear() {\r\n this._buffer.length = 0;\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n\r\n this._bufferFullMessageSent = false;\r\n }\r\n\r\n public getItems(): string[] {\r\n return this._buffer.slice(0)\r\n }\r\n\r\n public batchPayloads(payload: string[]): string {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n\r\n return batch;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public markAsSent(payload: string[]) {\r\n this._buffer = this.removePayloadsFromBuffer(payload, this._buffer);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n if (sentElements instanceof Array && payload instanceof Array) {\r\n sentElements = sentElements.concat(payload);\r\n\r\n if (sentElements.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\r\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.SessionStorageBufferFull,\r\n \"Sent buffer reached its maximum size: \" + sentElements.length,\r\n true);\r\n\r\n sentElements.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n }\r\n\r\n public clearSent(payload: string[]) {\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n sentElements = this.removePayloadsFromBuffer(payload, sentElements);\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n\r\n private removePayloadsFromBuffer(payloads: string[], buffer: string[]): string[] {\r\n var remaining: string[] = [];\r\n\r\n for (var i in buffer) {\r\n var contains = false;\r\n for (var j in payloads) {\r\n if (payloads[j] === buffer[i]) {\r\n contains = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!contains) {\r\n remaining.push(buffer[i]);\r\n }\r\n };\r\n\r\n return remaining;\r\n }\r\n\r\n private getBuffer(key: string): string[] {\r\n try {\r\n var bufferJson = Util.getSessionStorage(key);\r\n if (bufferJson) {\r\n var buffer: string[] = JSON.parse(bufferJson);\r\n if (buffer) {\r\n return buffer;\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToRestoreStorageBuffer,\r\n \" storage key: \" + key + \", \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n\r\n return [];\r\n }\r\n\r\n private setBuffer(key: string, buffer: string[]) {\r\n try {\r\n var bufferJson = JSON.stringify(buffer);\r\n Util.setSessionStorage(key, bufferJson);\r\n } catch (e) {\r\n // if there was an error, clear the buffer\r\n // telemetry is stored in the _buffer array so we won't loose any items\r\n Util.setSessionStorage(key, JSON.stringify([]));\r\n\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedToSetStorageBuffer,\r\n \" storage key: \" + key + \", \" + Util.getExceptionName(e) + \". Buffer cleared\",\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\ninterface XDomainRequest extends XMLHttpRequestEventTarget {\r\n responseText: string;\r\n send(payload: string);\r\n open(method: string, url: string);\r\n};\r\n\r\ndeclare var XDomainRequest: {\r\n prototype: XDomainRequest;\r\n new(): XDomainRequest;\r\n};\r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ISenderConfig {\r\n /**\r\n * The url to which payloads will be sent\r\n */\r\n endpointUrl: () => string;\r\n\r\n /**\r\n * The JSON format (normal vs line delimited). True means line delimited JSON.\r\n */\r\n emitLineDelimitedJson: () => boolean;\r\n\r\n /**\r\n * The maximum size of a batch in bytes\r\n */\r\n maxBatchSizeInBytes: () => number;\r\n\r\n /**\r\n * The maximum interval allowed between calls to batchInvoke\r\n */\r\n maxBatchInterval: () => number;\r\n\r\n /**\r\n * The master off switch. Do not send any data if set to TRUE\r\n */\r\n disableTelemetry: () => boolean;\r\n\r\n /**\r\n * Store a copy of a send buffer in the session storage\r\n */\r\n enableSessionStorageBuffer: () => boolean;\r\n\r\n /**\r\n * Is retry handler disabled.\r\n * If enabled, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error) and 503 (service unavailable).\r\n */\r\n isRetryDisabled: () => boolean;\r\n\r\n isBeaconApiDisabled: () => boolean;\r\n }\r\n\r\n export interface IResponseError {\r\n index: number;\r\n statusCode: number;\r\n message: string;\r\n }\r\n\r\n export interface IBackendResponse {\r\n /**\r\n * Number of items received by the backend\r\n */\r\n itemsReceived: number;\r\n\r\n /**\r\n * Number of items succesfuly accepted by the backend\r\n */\r\n itemsAccepted: number;\r\n\r\n /**\r\n * List of errors for items which were not accepted\r\n */\r\n errors: IResponseError[];\r\n\r\n /**\r\n * App id returned by the backend - not necessary returned, but we don't need it with each response.\r\n */\r\n appId?: string;\r\n }\r\n\r\n export class Sender {\r\n /**\r\n * How many times in a row a retryable error condition has occurred.\r\n */\r\n private _consecutiveErrors: number;\r\n\r\n /**\r\n * The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).\r\n */\r\n private _retryAt: number;\r\n\r\n /**\r\n * The time of the last send operation.\r\n */\r\n private _lastSend: number;\r\n\r\n /**\r\n * Handle to the timer for delayed sending of batches of data.\r\n */\r\n private _timeoutHandle: any;\r\n\r\n /**\r\n * A send buffer object\r\n */\r\n public _buffer: ISendBuffer;\r\n\r\n /**\r\n * The configuration for this sender instance\r\n */\r\n public _config: ISenderConfig;\r\n\r\n /**\r\n * AppId of this component parsed from some backend response.\r\n */\r\n public _appId: string;\r\n\r\n /**\r\n * A method which will cause data to be send to the url\r\n */\r\n\r\n public _sender: (payload: string[], isAsync: boolean) => void;\r\n\r\n /**\r\n * Whether XMLHttpRequest object is supported. Older version of IE (8,9) do not support it.\r\n */\r\n public _XMLHttpRequestSupported: boolean = false;\r\n\r\n /**\r\n * The maximum Beacon API payload size.\r\n * WC3 documentation allows browsers to set the limit. Chrome current has a limit of 64kb. \r\n */\r\n public static MaxBeaconPayloadSize = 65536; // 64kb\r\n\r\n /**\r\n * Constructs a new instance of the Sender class\r\n */\r\n constructor(config: ISenderConfig) {\r\n this._consecutiveErrors = 0;\r\n this._retryAt = null;\r\n this._lastSend = 0;\r\n this._config = config;\r\n this._sender = null;\r\n this._buffer = (Util.canUseSessionStorage() && this._config.enableSessionStorageBuffer())\r\n ? new SessionStorageSendBuffer(config) : new ArraySendBuffer(config);\r\n\r\n if (!this._config.isBeaconApiDisabled() && Util.IsBeaconApiSupported()) {\r\n this._sender = this._beaconSender;\r\n } else {\r\n if (typeof XMLHttpRequest != \"undefined\") {\r\n var testXhr = new XMLHttpRequest();\r\n if (\"withCredentials\" in testXhr) {\r\n this._sender = this._xhrSender;\r\n this._XMLHttpRequestSupported = true;\r\n } else if (typeof XDomainRequest !== \"undefined\") {\r\n this._sender = this._xdrSender; //IE 8 and 9\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Add a telemetry item to the send buffer\r\n */\r\n public send(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n try {\r\n // if master off switch is set, don't send any data\r\n if (this._config.disableTelemetry()) {\r\n // Do not send/save data\r\n return;\r\n }\r\n\r\n // validate input\r\n if (!envelope) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSendEmptyTelemetry, \"Cannot send empty telemetry\");\r\n return;\r\n }\r\n\r\n // ensure a sender was constructed\r\n if (!this._sender) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.SenderNotInitialized, \"Sender was not initialized\");\r\n return;\r\n }\r\n\r\n // check if the incoming payload is too large, truncate if necessary\r\n var payload: string = Serializer.serialize(envelope);\r\n\r\n // flush if we would exceed the max-size limit by adding this item\r\n var bufferPayload = this._buffer.getItems();\r\n var batch = this._buffer.batchPayloads(bufferPayload);\r\n\r\n if (batch && (batch.length + payload.length > this._config.maxBatchSizeInBytes())) {\r\n this.triggerSend();\r\n }\r\n\r\n // enqueue the payload\r\n this._buffer.enqueue(payload);\r\n\r\n // ensure an invocation timeout is set\r\n this._setupTimer();\r\n\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.incrementItemsQueued();\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedAddingTelemetryToBuffer,\r\n \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */\r\n private _setupTimer() {\r\n if (!this._timeoutHandle) {\r\n var retryInterval = this._retryAt ? Math.max(0, this._retryAt - Date.now()) : 0;\r\n var timerValue = Math.max(this._config.maxBatchInterval(), retryInterval);\r\n\r\n this._timeoutHandle = setTimeout(() => {\r\n this.triggerSend();\r\n }, timerValue);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the size of the list in bytes.\r\n * @param list {string[]} - The list to get the size in bytes of.\r\n */\r\n private _getSizeInBytes(list: string[]) {\r\n var size = 0;\r\n if (list && list.length) {\r\n for (var i = 0; i < list.length; i++) {\r\n var item = list[i];\r\n if (item && item.length) {\r\n size += item.length;\r\n }\r\n }\r\n }\r\n\r\n return size;\r\n }\r\n\r\n /**\r\n * Immediately send buffered data\r\n * @param async {boolean} - Indicates if the events should be sent asynchronously\r\n */\r\n public triggerSend(async = true) {\r\n try {\r\n // Send data only if disableTelemetry is false\r\n if (!this._config.disableTelemetry()) {\r\n\r\n if (this._buffer.count() > 0) {\r\n var payload = this._buffer.getItems();\r\n\r\n // invoke send\r\n this._sender(payload, async);\r\n }\r\n\r\n // update lastSend time to enable throttling\r\n this._lastSend = +new Date;\r\n } else {\r\n this._buffer.clear();\r\n }\r\n\r\n clearTimeout(this._timeoutHandle);\r\n this._timeoutHandle = null;\r\n this._retryAt = null;\r\n } catch (e) {\r\n /* Ignore this error for IE under v10 */\r\n if (!Util.getIEVersion() || Util.getIEVersion() > 9) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TransmissionFailed,\r\n \"Telemetry transmission failed, some telemetry will be lost: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n }\r\n\r\n /** Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */\r\n private _setRetryTime() {\r\n const SlotDelayInSeconds = 10;\r\n var delayInSeconds: number;\r\n\r\n if (this._consecutiveErrors <= 1) {\r\n delayInSeconds = SlotDelayInSeconds;\r\n } else {\r\n var backOffSlot = (Math.pow(2, this._consecutiveErrors) - 1) / 2;\r\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\r\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\r\n }\r\n\r\n // TODO: Log the backoff time like the C# version does.\r\n var retryAfterTimeSpan = Date.now() + (delayInSeconds * 1000);\r\n\r\n // TODO: Log the retry at time like the C# version does.\r\n this._retryAt = retryAfterTimeSpan;\r\n }\r\n\r\n /**\r\n * Parses the response from the backend. \r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */\r\n private _parseResponse(response: any): IBackendResponse {\r\n try {\r\n if (response && response !== \"\") {\r\n var result = JSON.parse(response);\r\n\r\n if (result && result.itemsReceived && result.itemsReceived >= result.itemsAccepted &&\r\n result.itemsReceived - result.itemsAccepted == result.errors.length) {\r\n return result;\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.InvalidBackendResponse,\r\n \"Cannot parse the response. \" + Util.getExceptionName(e),\r\n {\r\n response: response\r\n });\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */\r\n private _isRetriable(statusCode: number): boolean {\r\n return statusCode == 408 // Timeout\r\n || statusCode == 429 // Too many requests.\r\n || statusCode == 500 // Internal server error.\r\n || statusCode == 503; // Service unavailable.\r\n }\r\n\r\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */\r\n private _resendPayload(payload: string[]) {\r\n if (!payload || payload.length === 0) {\r\n return;\r\n }\r\n\r\n this._buffer.clearSent(payload);\r\n this._consecutiveErrors++;\r\n\r\n for (var item of payload) {\r\n this._buffer.enqueue(item);\r\n }\r\n\r\n // setup timer\r\n this._setRetryTime();\r\n this._setupTimer();\r\n }\r\n\r\n private _formatErrorMessageXhr(xhr: XMLHttpRequest, message?: string): string {\r\n if (xhr) {\r\n return \"XMLHttpRequest,Status:\" + xhr.status + \",Response:\" + xhr.responseText || xhr.response || \"\";\r\n }\r\n\r\n return message;\r\n }\r\n\r\n private _formatErrorMessageXdr(xdr: XDomainRequest, message?: string): string {\r\n if (xdr) {\r\n return \"XDomainRequest,Response:\" + xdr.responseText || \"\";\r\n }\r\n\r\n return message;\r\n }\r\n\r\n /**\r\n * Send XMLHttpRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n */\r\n private _xhrSender(payload: string[], isAsync: boolean) {\r\n var xhr = new XMLHttpRequest();\r\n xhr[AjaxMonitor.DisabledPropertyName] = true;\r\n xhr.open(\"POST\", this._config.endpointUrl(), isAsync);\r\n xhr.setRequestHeader(\"Content-type\", \"application/json\");\r\n\r\n // append Sdk-Context request header only in case of breeze endpoint\r\n if (Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())) {\r\n xhr.setRequestHeader(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);\r\n }\r\n\r\n xhr.onreadystatechange = () => this._xhrReadyStateChange(xhr, payload, payload.length);\r\n xhr.onerror = (event: ErrorEvent) => this._onError(payload, this._formatErrorMessageXhr(xhr), event);\r\n\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xhr.send(batch);\r\n\r\n this._buffer.markAsSent(payload);\r\n }\r\n\r\n /**\r\n * Send XDomainRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n * \r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n private _xdrSender(payload: string[], isAsync: boolean) {\r\n var xdr = new XDomainRequest();\r\n xdr.onload = () => this._xdrOnLoad(xdr, payload);\r\n xdr.onerror = (event: ErrorEvent) => this._onError(payload, this._formatErrorMessageXdr(xdr), event);\r\n\r\n // XDomainRequest requires the same protocol as the hosting page. \r\n // If the protocol doesn't match, we can't send the telemetry :(. \r\n var hostingProtocol = window.location.protocol\r\n if (this._config.endpointUrl().lastIndexOf(hostingProtocol, 0) !== 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \". \" +\r\n \"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\");\r\n\r\n this._buffer.clear();\r\n return;\r\n }\r\n\r\n var endpointUrl = this._config.endpointUrl().replace(/^(https?:)/, \"\");\r\n xdr.open('POST', endpointUrl);\r\n\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xdr.send(batch);\r\n\r\n this._buffer.markAsSent(payload);\r\n }\r\n\r\n /**\r\n * Send Beacon API request\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n private _beaconSender(payload: string[], isAsync: boolean) {\r\n var url = this._config.endpointUrl();\r\n var batch = this._buffer.batchPayloads(payload);\r\n\r\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\r\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\r\n let plainTextBatch = new Blob([batch], { type: 'text/plain;charset=UTF-8' });\r\n \r\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\r\n var queued = navigator.sendBeacon(url, plainTextBatch);\r\n\r\n if (queued) {\r\n this._buffer.markAsSent(payload);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TransmissionFailed, \". \" + \"Failed to send telemetry with Beacon API.\");\r\n }\r\n }\r\n\r\n /**\r\n * xhr state changes\r\n */\r\n public _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number) {\r\n if (xhr.readyState === 4) {\r\n var response: IBackendResponse = null;\r\n if (!this._appId) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n if (response && response.appId) {\r\n this._appId = response.appId;\r\n }\r\n }\r\n \r\n if ((xhr.status < 200 || xhr.status >= 300) && xhr.status !== 0) {\r\n if (!this._config.isRetryDisabled() && this._isRetriable(xhr.status)) {\r\n this._resendPayload(payload);\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \". \" +\r\n \"Response code \" + xhr.status + \". Will retry to send \" + payload.length + \" items.\");\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n } else {\r\n if (xhr.status === 206) {\r\n if (!response) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n }\r\n\r\n if (response && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, response);\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n } else {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, countOfItemsInPayload);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * xdr state changes\r\n */\r\n public _xdrOnLoad(xdr: XDomainRequest, payload: string[]) {\r\n if (xdr && (xdr.responseText + \"\" === \"200\" || xdr.responseText === \"\")) {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, 0);\r\n } else {\r\n var results = this._parseResponse(xdr.responseText);\r\n\r\n if (results && results.itemsReceived && results.itemsReceived > results.itemsAccepted\r\n && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, results);\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXdr(xdr));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * partial success handler\r\n */\r\n public _onPartialSuccess(payload: string[], results: IBackendResponse) {\r\n var failed = [];\r\n var retry = [];\r\n\r\n // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\r\n var errors = results.errors.reverse();\r\n for (var error of errors) {\r\n var extracted = payload.splice(error.index, 1)[0];\r\n if (this._isRetriable(error.statusCode)) {\r\n retry.push(extracted);\r\n } else {\r\n // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\r\n failed.push(extracted);\r\n }\r\n }\r\n\r\n if (payload.length > 0) {\r\n this._onSuccess(payload, results.itemsAccepted);\r\n }\r\n\r\n if (failed.length > 0) {\r\n this._onError(failed, this._formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' ')));\r\n }\r\n\r\n if (retry.length > 0) {\r\n this._resendPayload(retry);\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \"Partial success. \" +\r\n \"Delivered: \" + payload.length + \", Failed: \" + failed.length +\r\n \". Will retry to send \" + retry.length + \" our of \" + results.itemsReceived + \" items\");\r\n }\r\n }\r\n\r\n /**\r\n * error handler\r\n */\r\n public _onError(payload: string[], message: string, event?: ErrorEvent) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.OnError,\r\n \"Failed to send telemetry.\",\r\n { message: message });\r\n\r\n this._buffer.clearSent(payload);\r\n }\r\n\r\n /**\r\n * success handler\r\n */\r\n public _onSuccess(payload: string[], countOfItemsInPayload: number) {\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.decrementItemsQueued(countOfItemsInPayload);\r\n\r\n this._buffer.clearSent(payload);\r\n }\r\n }\r\n\r\n interface linkedListNode {\r\n next: linkedListNode;\r\n payload: string;\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.\r\n */\r\n export class MessageData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Trace message\r\n */\r\n public message: string;\r\n \r\n /**\r\n * Trace severity level.\r\n */\r\n public severityLevel: AI.SeverityLevel;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Trace extends AI.MessageData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\r\n public static dataType = \"MessageData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n message: FieldType.Required,\r\n severityLevel: FieldType.Default,\r\n properties: FieldType.Default\r\n };\r\n\r\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\r\n constructor(message: string, properties?: any, severityLevel?: AI.SeverityLevel) {\r\n super();\r\n message = message || Util.NotSpecified;\r\n this.message = Common.DataSanitizer.sanitizeMessage(message);\r\n this.properties = Common.DataSanitizer.sanitizeProperties(properties);\r\n\r\n if (severityLevel) {\r\n this.severityLevel = severityLevel;\r\n }\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Event extends AI.EventData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\r\n public static dataType = \"EventData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n name: FieldType.Required,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\r\n constructor(name: string, properties?: any, measurements?: any) {\r\n \r\n super();\r\n\r\n this.name = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Exception details of the exception in a chain.\r\n */\r\n export class ExceptionDetails\r\n {\r\n \r\n /**\r\n * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting.\r\n */\r\n public id: number;\r\n \r\n /**\r\n * The value of outerId is a reference to an element in ExceptionDetails that represents the outer exception\r\n */\r\n public outerId: number;\r\n \r\n /**\r\n * Exception type name.\r\n */\r\n public typeName: string;\r\n \r\n /**\r\n * Exception message.\r\n */\r\n public message: string;\r\n \r\n /**\r\n * Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.\r\n */\r\n public hasFullStack: boolean;\r\n \r\n /**\r\n * Text describing the stack. Either stack or parsedStack should have a value.\r\n */\r\n public stack: string;\r\n \r\n /**\r\n * List of stack frames. Either stack or parsedStack should have a value.\r\n */\r\n public parsedStack: StackFrame[];\r\n \r\n constructor()\r\n {\r\n this.hasFullStack = true;\r\n this.parsedStack = [];\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.\r\n */\r\n export class ExceptionData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Exception chain - list of inner exceptions.\r\n */\r\n public exceptions: ExceptionDetails[];\r\n \r\n /**\r\n * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.\r\n */\r\n public severityLevel: AI.SeverityLevel;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.exceptions = [];\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Stack frame information.\r\n */\r\n export class StackFrame\r\n {\r\n \r\n /**\r\n * Level in the call stack. For the long stacks SDK may not report every function in a call stack.\r\n */\r\n public level: number;\r\n \r\n /**\r\n * Method name.\r\n */\r\n public method: string;\r\n \r\n /**\r\n * Name of the assembly (dll, jar, etc.) containing this function.\r\n */\r\n public assembly: string;\r\n \r\n /**\r\n * File name or URL of the method implementation.\r\n */\r\n public fileName: string;\r\n \r\n /**\r\n * Line number of the code implementation.\r\n */\r\n public line: number;\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Exception extends AI.ExceptionData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\r\n public static dataType = \"ExceptionData\";\r\n\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n exceptions: FieldType.Required,\r\n severityLevel: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new isntance of the ExceptionTelemetry object\r\n */\r\n constructor(exception: Error, properties?: any, measurements?: any, severityLevel?: AI.SeverityLevel) {\r\n super();\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n\r\n this.exceptions = [new _ExceptionDetails(exception)];\r\n\r\n if (severityLevel) {\r\n this.severityLevel = severityLevel;\r\n }\r\n }\r\n \r\n\r\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */\r\n public static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string,\r\n details: string, line: number): Telemetry.Exception {\r\n\r\n return {\r\n exceptions: [\r\n {\r\n hasFullStack: true,\r\n message: message,\r\n stack: details,\r\n typeName: typeName\r\n }\r\n ]\r\n };\r\n }\r\n }\r\n\r\n class _ExceptionDetails extends AI.ExceptionDetails implements ISerializable {\r\n\r\n public aiDataContract = {\r\n id: FieldType.Default,\r\n outerId: FieldType.Default,\r\n typeName: FieldType.Required,\r\n message: FieldType.Required,\r\n hasFullStack: FieldType.Default,\r\n stack: FieldType.Default,\r\n parsedStack: FieldType.Array\r\n };\r\n\r\n constructor(exception: Error) {\r\n super();\r\n this.typeName = Common.DataSanitizer.sanitizeString(exception.name) || Util.NotSpecified;\r\n this.message = Common.DataSanitizer.sanitizeMessage(exception.message) || Util.NotSpecified;\r\n var stack = exception[\"stack\"];\r\n this.parsedStack = this.parseStack(stack);\r\n this.stack = Common.DataSanitizer.sanitizeException(stack);\r\n this.hasFullStack = Util.isArray(this.parsedStack) && this.parsedStack.length > 0;\r\n }\r\n\r\n private parseStack(stack): _StackFrame[] {\r\n var parsedStack: _StackFrame[] = undefined;\r\n if (typeof stack === \"string\") {\r\n var frames = stack.split('\\n');\r\n parsedStack = [];\r\n var level = 0;\r\n\r\n var totalSizeInBytes = 0;\r\n for (var i = 0; i <= frames.length; i++) {\r\n var frame = frames[i];\r\n if (_StackFrame.regex.test(frame)) {\r\n var parsedFrame = new _StackFrame(frames[i], level++);\r\n totalSizeInBytes += parsedFrame.sizeInBytes;\r\n parsedStack.push(parsedFrame);\r\n }\r\n }\r\n\r\n // DP Constraint - exception parsed stack must be < 32KB\r\n // remove frames from the middle to meet the threshold\r\n var exceptionParsedStackThreshold = 32 * 1024;\r\n if (totalSizeInBytes > exceptionParsedStackThreshold) {\r\n var left = 0;\r\n var right = parsedStack.length - 1;\r\n var size = 0;\r\n var acceptedLeft = left;\r\n var acceptedRight = right;\r\n\r\n while (left < right) {\r\n // check size\r\n var lSize = parsedStack[left].sizeInBytes;\r\n var rSize = parsedStack[right].sizeInBytes;\r\n size += lSize + rSize;\r\n\r\n if (size > exceptionParsedStackThreshold) {\r\n\r\n // remove extra frames from the middle\r\n var howMany = acceptedRight - acceptedLeft + 1;\r\n parsedStack.splice(acceptedLeft, howMany);\r\n break;\r\n }\r\n\r\n // update pointers\r\n acceptedLeft = left;\r\n acceptedRight = right;\r\n\r\n left++;\r\n right--;\r\n }\r\n }\r\n }\r\n\r\n return parsedStack;\r\n }\r\n }\r\n\r\n export class _StackFrame extends AI.StackFrame implements ISerializable {\r\n \r\n // regex to match stack frames from ie/chrome/ff\r\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\r\n public static regex = /^([\\s]+at)?(.*?)(\\@|\\s\\(|\\s)([^\\(\\@\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\r\n public static baseSize = 58; //'{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\r\n public sizeInBytes = 0;\r\n\r\n public aiDataContract = {\r\n level: FieldType.Required,\r\n method: FieldType.Required,\r\n assembly: FieldType.Default,\r\n fileName: FieldType.Default,\r\n line: FieldType.Default\r\n };\r\n\r\n constructor(frame: string, level: number) {\r\n super();\r\n this.level = level;\r\n this.method = \"\";\r\n this.assembly = Util.trim(frame);\r\n var matches = frame.match(_StackFrame.regex);\r\n if (matches && matches.length >= 5) {\r\n this.method = Util.trim(matches[2]) || this.method;\r\n this.fileName = Util.trim(matches[4]);\r\n this.line = parseInt(matches[5]) || 0;\r\n }\r\n\r\n this.sizeInBytes += this.method.length;\r\n this.sizeInBytes += this.fileName.length;\r\n this.sizeInBytes += this.assembly.length;\r\n\r\n // todo: these might need to be removed depending on how the back-end settles on their size calculation\r\n this.sizeInBytes += _StackFrame.baseSize;\r\n this.sizeInBytes += this.level.toString().length;\r\n this.sizeInBytes += this.line.toString().length;\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Type of the metric data measurement.\r\n */\r\n export enum DataPointType\r\n {\r\n Measurement = 0,\r\n Aggregation = 1,\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Metric data single measurement.\r\n */\r\n export class DataPoint\r\n {\r\n \r\n /**\r\n * Name of the metric.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Metric type. Single measurement or the aggregated value.\r\n */\r\n public kind: AI.DataPointType;\r\n \r\n /**\r\n * Single value for measurement. Sum of individual measurements for the aggregation.\r\n */\r\n public value: number;\r\n \r\n /**\r\n * Metric weight of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public count: number;\r\n \r\n /**\r\n * Minimum value of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public min: number;\r\n \r\n /**\r\n * Maximum value of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public max: number;\r\n \r\n /**\r\n * Standard deviation of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public stdDev: number;\r\n \r\n constructor()\r\n {\r\n this.kind = AI.DataPointType.Measurement;\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.\r\n */\r\n export class MetricData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used.\r\n */\r\n public metrics: DataPoint[];\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.metrics = [];\r\n this.properties = {};\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class DataPoint extends AI.DataPoint implements ISerializable {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {\r\n name: FieldType.Required,\r\n kind: FieldType.Default,\r\n value: FieldType.Required,\r\n count: FieldType.Default,\r\n min: FieldType.Default,\r\n max: FieldType.Default,\r\n stdDev: FieldType.Default\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Metric extends AI.MetricData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\r\n public static dataType = \"MetricData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n metrics: FieldType.Required,\r\n properties: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */\r\n constructor(name: string, value: number, count?: number, min?: number, max?: number, properties?: any) {\r\n super();\r\n\r\n var dataPoint = new Microsoft.ApplicationInsights.Telemetry.Common.DataPoint();\r\n dataPoint.count = count > 0 ? count : undefined;\r\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\r\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\r\n dataPoint.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n dataPoint.value = value;\r\n\r\n this.metrics = [dataPoint];\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class PageView extends AI.PageViewData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\r\n public static dataType = \"PageviewData\";\r\n\r\n public aiDataContract = { \r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n url: FieldType.Default,\r\n duration: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default,\r\n id: FieldType.Default,\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n constructor(name?: string, url?: string, durationMs?: number, properties?: any, measurements?: any, id?: string) {\r\n super();\r\n\r\n this.id = Common.DataSanitizer.sanitizeId(id);\r\n this.url = Common.DataSanitizer.sanitizeUrl(url);\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n if (!isNaN(durationMs)) {\r\n this.duration = Util.msToTimeSpan(durationMs);\r\n }\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.\r\n */\r\n export class PageViewPerfData extends AI.PageViewData\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Request URL with all query string parameters\r\n */\r\n public url: string;\r\n \r\n /**\r\n * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public perfTotal: string;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Network connection time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public networkConnect: string;\r\n \r\n /**\r\n * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public sentRequest: string;\r\n \r\n /**\r\n * Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public receivedResponse: string;\r\n \r\n /**\r\n * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public domProcessing: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class PageViewPerformance extends AI.PageViewPerfData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\r\n public static dataType = \"PageviewPerformanceData\";\r\n\r\n private static MAX_DURATION_ALLOWED = 3600000; // 1h\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n url: FieldType.Default,\r\n duration: FieldType.Default,\r\n perfTotal: FieldType.Default,\r\n networkConnect: FieldType.Default,\r\n sentRequest: FieldType.Default,\r\n receivedResponse: FieldType.Default,\r\n domProcessing: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n };\r\n\r\n /**\r\n * Field indicating whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n private isValid: boolean;\r\n\r\n /**\r\n * Indicates whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n public getIsValid() {\r\n return this.isValid;\r\n }\r\n\r\n private durationMs: number;\r\n\r\n /**\r\n * Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method.\r\n */\r\n public getDurationMs() {\r\n return this.durationMs;\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n constructor(name: string, url: string, unused: number, properties?: any, measurements?: any) {\r\n super();\r\n\r\n this.isValid = false;\r\n\r\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n */\r\n var timing = PageViewPerformance.getPerformanceTiming();\r\n if (timing) {\r\n var total = PageViewPerformance.getDuration(timing.navigationStart, timing.loadEventEnd);\r\n var network = PageViewPerformance.getDuration(timing.navigationStart, timing.connectEnd);\r\n var request = PageViewPerformance.getDuration(timing.requestStart, timing.responseStart);\r\n var response = PageViewPerformance.getDuration(timing.responseStart, timing.responseEnd);\r\n var dom = PageViewPerformance.getDuration(timing.responseEnd, timing.loadEventEnd);\r\n\r\n if (total == 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.ErrorPVCalc,\r\n \"error calculating page view performance.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else if (!PageViewPerformance.shouldCollectDuration(total, network, request, response, dom)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.InvalidDurationValue,\r\n \"Invalid page load duration value. Browser perf data won't be sent.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {\r\n // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\r\n // in this case, don't report client performance from this page\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.ClientPerformanceMathError,\r\n \"client performance math error.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else {\r\n this.durationMs = total;\r\n\r\n // convert to timespans\r\n this.perfTotal = this.duration = Util.msToTimeSpan(total);\r\n this.networkConnect = Util.msToTimeSpan(network);\r\n this.sentRequest = Util.msToTimeSpan(request);\r\n this.receivedResponse = Util.msToTimeSpan(response);\r\n this.domProcessing = Util.msToTimeSpan(dom);\r\n\r\n this.isValid = true;\r\n }\r\n }\r\n\r\n this.url = Common.DataSanitizer.sanitizeUrl(url);\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n\r\n public static getPerformanceTiming(): PerformanceTiming {\r\n if (PageViewPerformance.isPerformanceTimingSupported()) {\r\n return window.performance.timing;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns true is window performance timing API is supported, false otherwise.\r\n */\r\n public static isPerformanceTimingSupported() {\r\n return typeof window != \"undefined\" && window.performance && window.performance.timing;\r\n }\r\n\r\n /**\r\n * As page loads different parts of performance timing numbers get set. When all of them are set we can report it.\r\n * Returns true if ready, false otherwise.\r\n */\r\n public static isPerformanceTimingDataReady() {\r\n var timing = window.performance.timing;\r\n\r\n return timing.domainLookupStart > 0\r\n && timing.navigationStart > 0\r\n && timing.responseStart > 0\r\n && timing.requestStart > 0\r\n && timing.loadEventEnd > 0\r\n && timing.responseEnd > 0\r\n && timing.connectEnd > 0\r\n && timing.domLoading > 0;\r\n }\r\n\r\n public static getDuration(start: any, end: any): number {\r\n var duration = undefined;\r\n if (!(isNaN(start) || isNaN(end))) {\r\n duration = Math.max(end - start, 0);\r\n }\r\n\r\n return duration;\r\n }\r\n\r\n /**\r\n * This method tells if given durations should be excluded from collection.\r\n */\r\n public static shouldCollectDuration(...durations: number[]): boolean {\r\n // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\r\n let botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google'];\r\n let userAgent = navigator.userAgent;\r\n let isGoogleBot = false;\r\n\r\n if (userAgent) {\r\n for(let i =0; i= PageViewPerformance.MAX_DURATION_ALLOWED) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ITelemetryConfig extends ISenderConfig {\r\n instrumentationKey: () => string;\r\n accountId: () => string;\r\n sessionRenewalMs: () => number;\r\n sessionExpirationMs: () => number;\r\n sampleRate: () => number;\r\n cookieDomain: () => string;\r\n sdkExtension: () => string;\r\n isBrowserLinkTrackingEnabled: () => boolean;\r\n appId: () => string;\r\n }\r\n\r\n export class TelemetryContext implements ITelemetryContext {\r\n /**\r\n * The configuration for this telemetry context\r\n */\r\n public _config: ITelemetryConfig;\r\n\r\n /**\r\n * The sender instance for this context\r\n */\r\n public _sender: Sender;\r\n\r\n /**\r\n * The object describing a component tracked by this object.\r\n */\r\n public application: Context.Application;\r\n\r\n /**\r\n * The object describing a device tracked by this object.\r\n */\r\n public device: Context.Device;\r\n\r\n public internal: Context.Internal;\r\n\r\n /**\r\n * The object describing a location tracked by this object.\r\n */\r\n public location: Context.Location;\r\n\r\n /**\r\n * The object describing a operation tracked by this object.\r\n */\r\n public operation: Context.Operation;\r\n\r\n public sample: Context.Sample;\r\n\r\n /**\r\n * The object describing a user tracked by this object.\r\n */\r\n public user: Context.User;\r\n\r\n /**\r\n * The object describing a session tracked by this object.\r\n */\r\n public session: Context.Session;\r\n\r\n /**\r\n * AppId of this component if returned by the backend.\r\n */\r\n public appId: () => string;\r\n\r\n /**\r\n * The array of telemetry initializers to call before sending each telemetry item.\r\n */\r\n private telemetryInitializers: { (envelope: Microsoft.ApplicationInsights.IEnvelope): boolean | void; }[];\r\n\r\n /**\r\n * The session manager that manages session on the base of cookies.\r\n */\r\n public _sessionManager: Microsoft.ApplicationInsights.Context._SessionManager;\r\n\r\n constructor(config: ITelemetryConfig) {\r\n this._config = config;\r\n this._sender = new Sender(config);\r\n this.appId = () => this._sender._appId;\r\n\r\n // use appId set in config instead of getting it from the backend\r\n if (config.appId()) {\r\n this._sender._appId = config.appId();\r\n }\r\n\r\n this.telemetryInitializers = [];\r\n\r\n // window will be undefined in node.js where we do not want to initialize contexts\r\n if (typeof window !== 'undefined') {\r\n this._sessionManager = new ApplicationInsights.Context._SessionManager(config);\r\n this.application = new Context.Application();\r\n this.device = new Context.Device();\r\n this.internal = new Context.Internal(config);\r\n this.location = new Context.Location();\r\n this.user = new Context.User(config);\r\n this.operation = new Context.Operation();\r\n this.session = new Context.Session();\r\n this.sample = new Context.Sample(config.sampleRate());\r\n }\r\n\r\n this._addDefaultTelemetryInitializers();\r\n }\r\n\r\n /**\r\n * Adds telemetry initializer to the collection. Telemetry initializers will be called one by one\r\n * before telemetry item is pushed for sending and in the order they were added.\r\n */\r\n public addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void) {\r\n this.telemetryInitializers.push(telemetryInitializer);\r\n }\r\n\r\n /**\r\n * Use Sender.ts to send telemetry object to the endpoint\r\n */\r\n public track(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n if (!envelope) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackArgumentsNotSpecified,\r\n \"cannot call .track() with a null or undefined argument\", null, true);\r\n } else {\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (envelope.name === Telemetry.PageView.envelopeType) {\r\n _InternalLogging.resetInternalMessageCount();\r\n }\r\n\r\n if (this.session) {\r\n // If customer did not provide custom session id update sessionmanager\r\n if (typeof this.session.id !== \"string\") {\r\n this._sessionManager.update();\r\n }\r\n }\r\n\r\n this._track(envelope);\r\n }\r\n\r\n return envelope;\r\n }\r\n\r\n private _addDefaultTelemetryInitializers() {\r\n if (!this._config.isBrowserLinkTrackingEnabled()) {\r\n const browserLinkPaths = ['/browserLinkSignalR/', '/__browserLink/'];\r\n let dropBrowserLinkRequests = (envelope: Microsoft.ApplicationInsights.IEnvelope) => {\r\n if (envelope.name === Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType) {\r\n let remoteData = envelope.data as Telemetry.Common.Data;\r\n if (remoteData && remoteData.baseData) {\r\n for (let i = 0; i < browserLinkPaths.length; i++) {\r\n if (remoteData.baseData.name.indexOf(browserLinkPaths[i]) >= 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n this.addTelemetryInitializer(dropBrowserLinkRequests)\r\n }\r\n }\r\n\r\n private _track(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n\r\n if (this.session) {\r\n // If customer set id, apply his context; otherwise apply context generated from cookies \r\n if (typeof this.session.id === \"string\") {\r\n this._applySessionContext(envelope, this.session);\r\n } else {\r\n this._applySessionContext(envelope, this._sessionManager.automaticSession);\r\n }\r\n }\r\n\r\n this._applyApplicationContext(envelope, this.application);\r\n this._applyDeviceContext(envelope, this.device);\r\n this._applyInternalContext(envelope, this.internal);\r\n this._applyLocationContext(envelope, this.location);\r\n this._applySampleContext(envelope, this.sample);\r\n this._applyUserContext(envelope, this.user);\r\n this._applyOperationContext(envelope, this.operation);\r\n\r\n envelope.iKey = this._config.instrumentationKey();\r\n\r\n var doNotSendItem = false;\r\n try {\r\n var telemetryInitializersCount = this.telemetryInitializers.length;\r\n for (var i = 0; i < telemetryInitializersCount; ++i) {\r\n var telemetryInitializer = this.telemetryInitializers[i];\r\n if (telemetryInitializer) {\r\n if (telemetryInitializer.apply(null, [envelope]) === false) {\r\n doNotSendItem = true;\r\n break;\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n doNotSendItem = true;\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"One of telemetry initializers failed, telemetry item will not be sent: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) }, true);\r\n }\r\n\r\n if (!doNotSendItem) {\r\n if (envelope.name === Telemetry.Metric.envelopeType ||\r\n this.sample.isSampledIn(envelope)) {\r\n var iKeyNoDashes = this._config.instrumentationKey().replace(/-/g, \"\");\r\n envelope.name = envelope.name.replace(\"{0}\", iKeyNoDashes);\r\n this._sender.send(envelope);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TelemetrySampledAndNotSent,\r\n \"Telemetry is sampled and not sent to the AI service.\", { SampleRate: this.sample.sampleRate }, true);\r\n }\r\n }\r\n\r\n return envelope;\r\n }\r\n\r\n private _applyApplicationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, appContext: Microsoft.ApplicationInsights.Context.Application) {\r\n if (appContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n\r\n if (typeof appContext.ver === \"string\") {\r\n envelope.tags[tagKeys.applicationVersion] = appContext.ver;\r\n }\r\n if (typeof appContext.build === \"string\") {\r\n envelope.tags[tagKeys.applicationBuild] = appContext.build;\r\n }\r\n }\r\n }\r\n\r\n private _applyDeviceContext(envelope: Microsoft.ApplicationInsights.IEnvelope, deviceContext: Microsoft.ApplicationInsights.Context.Device) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n\r\n if (deviceContext) {\r\n if (typeof deviceContext.id === \"string\") {\r\n envelope.tags[tagKeys.deviceId] = deviceContext.id;\r\n }\r\n if (typeof deviceContext.ip === \"string\") {\r\n envelope.tags[tagKeys.deviceIp] = deviceContext.ip;\r\n }\r\n if (typeof deviceContext.language === \"string\") {\r\n envelope.tags[tagKeys.deviceLanguage] = deviceContext.language;\r\n }\r\n if (typeof deviceContext.locale === \"string\") {\r\n envelope.tags[tagKeys.deviceLocale] = deviceContext.locale;\r\n }\r\n if (typeof deviceContext.model === \"string\") {\r\n envelope.tags[tagKeys.deviceModel] = deviceContext.model;\r\n }\r\n if (typeof deviceContext.network !== \"undefined\") {\r\n envelope.tags[tagKeys.deviceNetwork] = deviceContext.network;\r\n }\r\n if (typeof deviceContext.oemName === \"string\") {\r\n envelope.tags[tagKeys.deviceOEMName] = deviceContext.oemName;\r\n }\r\n if (typeof deviceContext.os === \"string\") {\r\n envelope.tags[tagKeys.deviceOS] = deviceContext.os;\r\n }\r\n if (typeof deviceContext.osversion === \"string\") {\r\n envelope.tags[tagKeys.deviceOSVersion] = deviceContext.osversion;\r\n }\r\n if (typeof deviceContext.resolution === \"string\") {\r\n envelope.tags[tagKeys.deviceScreenResolution] = deviceContext.resolution;\r\n }\r\n if (typeof deviceContext.type === \"string\") {\r\n envelope.tags[tagKeys.deviceType] = deviceContext.type;\r\n }\r\n }\r\n }\r\n\r\n private _applyInternalContext(envelope: Microsoft.ApplicationInsights.IEnvelope, internalContext: Microsoft.ApplicationInsights.Context.Internal) {\r\n if (internalContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof internalContext.agentVersion === \"string\") {\r\n envelope.tags[tagKeys.internalAgentVersion] = internalContext.agentVersion;\r\n }\r\n if (typeof internalContext.sdkVersion === \"string\") {\r\n envelope.tags[tagKeys.internalSdkVersion] = internalContext.sdkVersion;\r\n }\r\n }\r\n }\r\n\r\n private _applyLocationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, locationContext: Microsoft.ApplicationInsights.Context.Location) {\r\n if (locationContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof locationContext.ip === \"string\") {\r\n envelope.tags[tagKeys.locationIp] = locationContext.ip;\r\n }\r\n }\r\n }\r\n\r\n private _applyOperationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, operationContext: Microsoft.ApplicationInsights.Context.Operation) {\r\n if (operationContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof operationContext.id === \"string\") {\r\n envelope.tags[tagKeys.operationId] = operationContext.id;\r\n }\r\n if (typeof operationContext.name === \"string\") {\r\n envelope.tags[tagKeys.operationName] = operationContext.name;\r\n }\r\n if (typeof operationContext.parentId === \"string\") {\r\n envelope.tags[tagKeys.operationParentId] = operationContext.parentId;\r\n }\r\n if (typeof operationContext.rootId === \"string\") {\r\n envelope.tags[tagKeys.operationRootId] = operationContext.rootId;\r\n }\r\n if (typeof operationContext.syntheticSource === \"string\") {\r\n envelope.tags[tagKeys.operationSyntheticSource] = operationContext.syntheticSource;\r\n }\r\n }\r\n }\r\n\r\n private _applySampleContext(envelope: Microsoft.ApplicationInsights.IEnvelope, sampleContext: Microsoft.ApplicationInsights.Context.Sample) {\r\n if (sampleContext) {\r\n envelope.sampleRate = sampleContext.sampleRate;\r\n }\r\n }\r\n\r\n private _applySessionContext(envelope: Microsoft.ApplicationInsights.IEnvelope, sessionContext: Microsoft.ApplicationInsights.Context.Session) {\r\n if (sessionContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof sessionContext.id === \"string\") {\r\n envelope.tags[tagKeys.sessionId] = sessionContext.id;\r\n }\r\n if (typeof sessionContext.isFirst !== \"undefined\") {\r\n envelope.tags[tagKeys.sessionIsFirst] = sessionContext.isFirst;\r\n }\r\n }\r\n }\r\n\r\n private _applyUserContext(envelope: Microsoft.ApplicationInsights.IEnvelope, userContext: Microsoft.ApplicationInsights.Context.User) {\r\n if (userContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof userContext.accountId === \"string\") {\r\n envelope.tags[tagKeys.userAccountId] = userContext.accountId;\r\n }\r\n if (typeof userContext.agent === \"string\") {\r\n envelope.tags[tagKeys.userAgent] = userContext.agent;\r\n }\r\n if (typeof userContext.id === \"string\") {\r\n envelope.tags[tagKeys.userId] = userContext.id;\r\n }\r\n if (typeof userContext.authenticatedId === \"string\") {\r\n envelope.tags[tagKeys.userAuthUserId] = userContext.authenticatedId;\r\n }\r\n if (typeof userContext.storeRegion === \"string\") {\r\n envelope.tags[tagKeys.userStoreRegion] = userContext.storeRegion;\r\n }\r\n }\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Data struct to contain both B and C sections.\r\n */\r\n export class Data extends Microsoft.Telemetry.Base\r\n {\r\n \r\n /**\r\n * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.\r\n */\r\n public baseType: string;\r\n \r\n /**\r\n * Container for data item (B section).\r\n */\r\n public baseData: TDomain;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class Data extends Microsoft.Telemetry.Data implements ISerializable {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {\r\n baseType: FieldType.Required,\r\n baseData: FieldType.Required\r\n }\r\n\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n constructor(type: string, data: TDomain) {\r\n super();\r\n\r\n this.baseType = type;\r\n this.baseData = data;\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n /**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */\r\n export class PageViewManager {\r\n private pageViewPerformanceSent: boolean = false;\r\n\r\n private overridePageViewDuration: boolean = false;\r\n\r\n private appInsights: IAppInsightsInternal;\r\n\r\n constructor(\r\n appInsights: IAppInsightsInternal,\r\n overridePageViewDuration: boolean) {\r\n this.overridePageViewDuration = overridePageViewDuration;\r\n this.appInsights = appInsights;\r\n }\r\n\r\n /**\r\n * Currently supported cases:\r\n * 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.\r\n * If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.\r\n * 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.\r\n * 3) overridePageViewDuration = true. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported). \r\n * 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration. \r\n *\r\n * In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.\r\n */\r\n public trackPageView(name?: string, url?: string, properties?: Object, measurements?: Object, duration?: number) {\r\n // ensure we have valid values for the required fields\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n\r\n var pageViewSent = false;\r\n var customDuration = undefined;\r\n\r\n if (Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {\r\n var start = Telemetry.PageViewPerformance.getPerformanceTiming().navigationStart;\r\n customDuration = Telemetry.PageViewPerformance.getDuration(start, +new Date);\r\n\r\n if (!Telemetry.PageViewPerformance.shouldCollectDuration(customDuration)) {\r\n customDuration = undefined;\r\n }\r\n } else {\r\n this.appInsights.sendPageViewInternal(\r\n name,\r\n url,\r\n !isNaN(duration) ? duration : undefined,\r\n properties,\r\n measurements);\r\n this.appInsights.flush();\r\n pageViewSent = true;\r\n }\r\n\r\n if (!pageViewSent && (this.overridePageViewDuration || !isNaN(duration))) {\r\n // 1, 2, 4 cases\r\n this.appInsights.sendPageViewInternal(\r\n name,\r\n url,\r\n !isNaN(duration) ? duration : customDuration,\r\n properties,\r\n measurements);\r\n this.appInsights.flush();\r\n pageViewSent = true;\r\n }\r\n\r\n var maxDurationLimit = 60000;\r\n\r\n if (!Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {\r\n // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.NavigationTimingNotSupported,\r\n \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\r\n return;\r\n }\r\n\r\n var handle = setInterval(() => {\r\n try {\r\n if (Telemetry.PageViewPerformance.isPerformanceTimingDataReady()) {\r\n clearInterval(handle);\r\n var pageViewPerformance = new Telemetry.PageViewPerformance(name, url, null, properties, measurements);\r\n\r\n if (!pageViewPerformance.getIsValid() && !pageViewSent) {\r\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\r\n // That's the best value we can get that makes sense.\r\n this.appInsights.sendPageViewInternal(name, url, customDuration, properties, measurements);\r\n this.appInsights.flush();\r\n } else {\r\n if (!pageViewSent) {\r\n this.appInsights.sendPageViewInternal(name, url, pageViewPerformance.getDurationMs(), properties, measurements);\r\n }\r\n\r\n if (!this.pageViewPerformanceSent) {\r\n this.appInsights.sendPageViewPerformanceInternal(pageViewPerformance);\r\n this.pageViewPerformanceSent = true;\r\n }\r\n this.appInsights.flush();\r\n }\r\n }\r\n else if (Telemetry.PageViewPerformance.getDuration(start, +new Date) > maxDurationLimit) {\r\n clearInterval(handle);\r\n if (!pageViewSent) {\r\n this.appInsights.sendPageViewInternal(name, url, maxDurationLimit, properties, measurements);\r\n this.appInsights.flush();\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackPVFailedCalc,\r\n \"trackPageView failed on page load calculation: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }, 100);\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n /**\r\n * Used to track page visit durations\r\n */\r\n export class PageVisitTimeManager {\r\n\r\n private prevPageVisitDataKeyName: string = \"prevPageVisitData\";\r\n private pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void;\r\n\r\n /**\r\n * Creates a new instance of PageVisitTimeManager\r\n * @param pageVisitTimeTrackingHandler Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)\r\n * @returns {} \r\n */\r\n constructor(pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void) {\r\n this.pageVisitTimeTrackingHandler = pageVisitTimeTrackingHandler;\r\n }\r\n\r\n /**\r\n * Tracks the previous page visit time telemetry (if exists) and starts timing of new page visit time\r\n * @param currentPageName Name of page to begin timing for visit duration\r\n * @param currentPageUrl Url of page to begin timing for visit duration\r\n */\r\n public trackPreviousPageVisit(currentPageName: string, currentPageUrl: string) {\r\n \r\n try {\r\n // Restart timer for new page view\r\n var prevPageVisitTimeData = this.restartPageVisitTimer(currentPageName, currentPageUrl);\r\n \r\n // If there was a page already being timed, track the visit time for it now.\r\n if (prevPageVisitTimeData) {\r\n this.pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);\r\n }\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Auto track page visit time failed, metric will not be collected: \" + Util.dump(e));\r\n }\r\n }\r\n\r\n /**\r\n * Stops timing of current page (if exists) and starts timing for duration of visit to pageName\r\n * @param pageName Name of page to begin timing visit duration\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not. \r\n */\r\n public restartPageVisitTimer(pageName: string, pageUrl: string) {\r\n try {\r\n var prevPageVisitData = this.stopPageVisitTimer();\r\n this.startPageVisitTimer(pageName, pageUrl);\r\n\r\n return prevPageVisitData;\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Call to restart failed: \" + Util.dump(e));\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Starts timing visit duration of pageName\r\n * @param pageName \r\n * @returns {} \r\n */\r\n public startPageVisitTimer(pageName: string, pageUrl: string) {\r\n try {\r\n if (Util.canUseSessionStorage()) {\r\n if (Util.getSessionStorage(this.prevPageVisitDataKeyName) != null) {\r\n throw new Error(\"Cannot call startPageVisit consecutively without first calling stopPageVisit\");\r\n }\r\n\r\n var currPageVisitData = new PageVisitData(pageName, pageUrl);\r\n var currPageVisitDataStr = JSON.stringify(currPageVisitData);\r\n Util.setSessionStorage(this.prevPageVisitDataKeyName, currPageVisitDataStr);\r\n }\r\n } catch (e) {\r\n //TODO: Remove this catch in next phase, since if start is called twice in a row the exception needs to be propagated out\r\n _InternalLogging.warnToConsole(\"Call to start failed: \" + Util.dump(e));\r\n }\r\n }\r\n\r\n /**\r\n * Stops timing of current page, if exists.\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not. \r\n */\r\n public stopPageVisitTimer() {\r\n try {\r\n if (Util.canUseSessionStorage()) {\r\n\r\n // Define end time of page's visit\r\n var pageVisitEndTime = Date.now();\r\n\r\n // Try to retrieve page name and start time from session storage\r\n var pageVisitDataJsonStr = Util.getSessionStorage(this.prevPageVisitDataKeyName);\r\n if (pageVisitDataJsonStr) {\r\n\r\n // if previous page data exists, set end time of visit\r\n var prevPageVisitData: PageVisitData = JSON.parse(pageVisitDataJsonStr);\r\n prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData.pageVisitStartTime;\r\n\r\n // Remove data from storage since we already used it\r\n Util.removeSessionStorage(this.prevPageVisitDataKeyName);\r\n\r\n // Return page visit data\r\n return prevPageVisitData;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n return null;\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Stop page visit timer failed: \" + Util.dump(e));\r\n return null\r\n }\r\n }\r\n }\r\n\r\n export class PageVisitData {\r\n\r\n public pageName: string;\r\n public pageUrl: string;\r\n public pageVisitStartTime: number;\r\n public pageVisitTime: number;\r\n\r\n constructor(pageName, pageUrl) {\r\n this.pageVisitStartTime = Date.now();\r\n this.pageName = pageName;\r\n this.pageUrl = pageUrl;\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n \r\n // Class allows to perform split testing (aka 'a/b testing' aka 'flights')\r\n // Works similarly to sampling, using the same hashing algorithm under the hood.\r\n // Suggested use:\r\n //\r\n // newShinyFeature.enabled = false;\r\n // if (new SplitTest.isEnabled(, )){\r\n // newShinyFeature.enabled = true;\r\n // }\r\n //\r\n export class SplitTest {\r\n private hashCodeGeneragor: HashCodeScoreGenerator = new HashCodeScoreGenerator();\r\n\r\n public isEnabled(key: string, percentEnabled: number) {\r\n return this.hashCodeGeneragor.getHashCodeScore(key) < percentEnabled;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export var Version = \"1.0.20\";\r\n\r\n /**\r\n * Internal interface to pass appInsights object to subcomponents without coupling \r\n */\r\n export interface IAppInsightsInternal {\r\n sendPageViewInternal(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object);\r\n sendPageViewPerformanceInternal(pageViewPerformance: ApplicationInsights.Telemetry.PageViewPerformance);\r\n flush();\r\n }\r\n\r\n /**\r\n * The main API that sends telemetry to Application Insights.\r\n * Learn more: http://go.microsoft.com/fwlink/?LinkID=401493\r\n */\r\n export class AppInsights implements IAppInsightsInternal, IAppInsights {\r\n\r\n // Counts number of trackAjax invokations.\r\n // By default we only monitor X ajax call per view to avoid too much load.\r\n // Default value is set in config.\r\n // This counter keeps increasing even after the limit is reached.\r\n private _trackAjaxAttempts: number = 0;\r\n\r\n private _eventTracking: Timing;\r\n private _pageTracking: Timing;\r\n private _pageViewManager: Microsoft.ApplicationInsights.Telemetry.PageViewManager;\r\n private _pageVisitTimeManager: Microsoft.ApplicationInsights.Telemetry.PageVisitTimeManager;\r\n private _ajaxMonitor: Microsoft.ApplicationInsights.AjaxMonitor;\r\n\r\n public config: IConfig;\r\n public context: TelemetryContext;\r\n public queue: (() => void)[];\r\n public static defaultConfig: IConfig;\r\n\r\n constructor(config: IConfig) {\r\n this.config = config || {};\r\n\r\n // load default values if specified\r\n var defaults: IConfig = AppInsights.defaultConfig;\r\n if (defaults !== undefined) {\r\n for (var field in defaults) {\r\n // for each unspecified field, set the default value\r\n if (this.config[field] === undefined) {\r\n this.config[field] = defaults[field];\r\n }\r\n }\r\n }\r\n\r\n _InternalLogging.verboseLogging = () => this.config.verboseLogging;\r\n _InternalLogging.enableDebugExceptions = () => this.config.enableDebug;\r\n var configGetters: ApplicationInsights.ITelemetryConfig = {\r\n instrumentationKey: () => this.config.instrumentationKey,\r\n accountId: () => this.config.accountId,\r\n sessionRenewalMs: () => this.config.sessionRenewalMs,\r\n sessionExpirationMs: () => this.config.sessionExpirationMs,\r\n endpointUrl: () => this.config.endpointUrl,\r\n emitLineDelimitedJson: () => this.config.emitLineDelimitedJson,\r\n maxBatchSizeInBytes: () => {\r\n return (!this.config.isBeaconApiDisabled && Util.IsBeaconApiSupported()) ?\r\n Math.min(this.config.maxBatchSizeInBytes, Sender.MaxBeaconPayloadSize) :\r\n this.config.maxBatchSizeInBytes;\r\n },\r\n maxBatchInterval: () => this.config.maxBatchInterval,\r\n disableTelemetry: () => this.config.disableTelemetry,\r\n sampleRate: () => this.config.samplingPercentage,\r\n cookieDomain: () => this.config.cookieDomain,\r\n enableSessionStorageBuffer: () => {\r\n // Disable Session Storage buffer if telemetry is sent using Beacon API\r\n return ((this.config.isBeaconApiDisabled || !Util.IsBeaconApiSupported()) && this.config.enableSessionStorageBuffer);\r\n },\r\n isRetryDisabled: () => this.config.isRetryDisabled,\r\n isBeaconApiDisabled: () => this.config.isBeaconApiDisabled,\r\n sdkExtension: () => this.config.sdkExtension,\r\n isBrowserLinkTrackingEnabled: () => this.config.isBrowserLinkTrackingEnabled,\r\n appId: () => this.config.appId,\r\n }\r\n\r\n if (this.config.isCookieUseDisabled) {\r\n Util.disableCookies();\r\n }\r\n\r\n if (this.config.isStorageUseDisabled) {\r\n Util.disableStorage();\r\n }\r\n\r\n this.context = new ApplicationInsights.TelemetryContext(configGetters);\r\n\r\n this._pageViewManager = new Microsoft.ApplicationInsights.Telemetry.PageViewManager(this, this.config.overridePageViewDuration);\r\n\r\n // initialize event timing\r\n this._eventTracking = new Timing(\"trackEvent\");\r\n this._eventTracking.action = (name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => {\r\n if (!measurements) {\r\n measurements = { duration: duration };\r\n }\r\n else {\r\n // do not override existing duration value\r\n if (isNaN(measurements[\"duration\"])) {\r\n measurements[\"duration\"] = duration;\r\n }\r\n }\r\n var event = new Telemetry.Event(name, properties, measurements);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Event.dataType, event);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Event.envelopeType);\r\n\r\n this.context.track(envelope);\r\n }\r\n\r\n // initialize page view timing\r\n this._pageTracking = new Timing(\"trackPageView\");\r\n this._pageTracking.action = (name, url, duration, properties, measurements) => {\r\n this.sendPageViewInternal(name, url, duration, properties, measurements);\r\n }\r\n\r\n this._pageVisitTimeManager = new ApplicationInsights.Telemetry.PageVisitTimeManager(\r\n (pageName, pageUrl, pageVisitTime) => this.trackPageVisitTime(pageName, pageUrl, pageVisitTime));\r\n\r\n if (!this.config.disableAjaxTracking) {\r\n this._ajaxMonitor = new Microsoft.ApplicationInsights.AjaxMonitor(this);\r\n }\r\n }\r\n\r\n public sendPageViewInternal(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) {\r\n var pageView = new Telemetry.PageView(name, url, duration, properties, measurements, this.context.operation.id);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.PageView.dataType, pageView);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.PageView.envelopeType);\r\n\r\n this.context.track(envelope);\r\n\r\n // reset ajaxes counter\r\n this._trackAjaxAttempts = 0;\r\n }\r\n\r\n public sendPageViewPerformanceInternal(pageViewPerformance: ApplicationInsights.Telemetry.PageViewPerformance) {\r\n var pageViewPerformanceData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.PageViewPerformance.dataType, pageViewPerformance);\r\n var pageViewPerformanceEnvelope = new Telemetry.Common.Envelope(pageViewPerformanceData, Telemetry.PageViewPerformance.envelopeType);\r\n this.context.track(pageViewPerformanceEnvelope);\r\n }\r\n\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens. \r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n public startTrackPage(name?: string) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n this._pageTracking.start(name);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StartTrackFailed,\r\n \"startTrackPage failed, page view may not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public stopTrackPage(name?: string, url?: string, properties?: Object, measurements?: Object) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n\r\n this._pageTracking.stop(name, url, properties, measurements);\r\n\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StopTrackFailed,\r\n \"stopTrackPage failed, page view will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Logs that a page or other item was viewed. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.\r\n */\r\n public trackPageView(name?: string, url?: string, properties?: Object, measurements?: Object, duration?: number) {\r\n try {\r\n this._pageViewManager.trackPageView(name, url, properties, measurements, duration);\r\n\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackPVFailed,\r\n \"trackPageView failed, page view will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n public startTrackEvent(name: string) {\r\n try {\r\n this._eventTracking.start(name);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StartTrackEventFailed,\r\n \"startTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /** \r\n * Log an extended event that you started timing with {@link startTrackEvent}.\r\n * @param name The string you used to identify this event in startTrackEvent.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public stopTrackEvent(name: string, properties?: Object, measurements?: Object) {\r\n try {\r\n this._eventTracking.stop(name, undefined, properties, measurements);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StopTrackEventFailed,\r\n \"stopTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /** \r\n * Log a user action or other occurrence.\r\n * @param name A string to identify this event in the portal.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public trackEvent(name: string, properties?: Object, measurements?: Object) {\r\n try {\r\n var eventTelemetry = new Telemetry.Event(name, properties, measurements);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Event.dataType, eventTelemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Event.envelopeType);\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackEventFailed,\r\n \"trackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a dependency call\r\n * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id.\r\n * @param method represents request verb (GET, POST, etc.)\r\n * @param absoluteUrl absolute url used to make the dependency request\r\n * @param command command name \r\n * @param totalTime total request time\r\n * @param success indicates if the request was sessessful\r\n * @param resultCode response code returned by the dependency request\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public trackDependency(id: string, method: string, absoluteUrl: string, command: string, totalTime: number, success: boolean, resultCode: number, properties?: Object, measurements?: Object) {\r\n if (this.config.maxAjaxCallsPerView === -1 ||\r\n this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) {\r\n var dependency = new Telemetry.RemoteDependencyData(id, absoluteUrl, command, totalTime, success, resultCode, method, properties, measurements);\r\n var dependencyData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.RemoteDependencyData.dataType, dependency);\r\n var envelope = new Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType);\r\n this.context.track(envelope);\r\n } else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MaxAjaxPerPVExceeded,\r\n \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\",\r\n true);\r\n }\r\n\r\n ++this._trackAjaxAttempts;\r\n }\r\n\r\n /**\r\n * Logs dependency call\r\n * @param dependencyData dependency data object\r\n */\r\n public trackDependencyData(dependency: Telemetry.RemoteDependencyData) {\r\n if (this.config.maxAjaxCallsPerView === -1 || this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) {\r\n var dependencyData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.RemoteDependencyData.dataType, dependency);\r\n var envelope = new Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType);\r\n this.context.track(envelope);\r\n } else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MaxAjaxPerPVExceeded,\r\n \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\",\r\n true);\r\n }\r\n\r\n ++this._trackAjaxAttempts;\r\n }\r\n\r\n /**\r\n * trackAjax method is obsolete, use trackDependency instead\r\n */\r\n public trackAjax(id: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, method?: string) {\r\n this.trackDependency(id, null, absoluteUrl, pathName, totalTime, success, resultCode);\r\n }\r\n\r\n /**\r\n * Log an exception you have caught.\r\n * @param exception An Error from a catch clause, or the string error message.\r\n * @param handledAt Not used\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n public trackException(exception: Error, handledAt?: string, properties?: Object, measurements?: Object, severityLevel?: AI.SeverityLevel) {\r\n try {\r\n if (!Util.isError(exception)) {\r\n // ensure that we have an error object (user could pass a string/message)\r\n try {\r\n throw new Error(exception);\r\n } catch (error) {\r\n exception = error;\r\n }\r\n }\r\n\r\n var exceptionTelemetry = new Telemetry.Exception(exception, properties, measurements, severityLevel);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Exception.dataType, exceptionTelemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Exception.envelopeType);\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackExceptionFailed,\r\n \"trackException failed, exception will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.\r\n * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the \r\n * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.\r\n * @param name A string that identifies the metric.\r\n * @param average Number representing either a single measurement, or the average of several measurements.\r\n * @param sampleCount The number of measurements represented by the average. Defaults to 1.\r\n * @param min The smallest measurement in the sample. Defaults to the average.\r\n * @param max The largest measurement in the sample. Defaults to the average.\r\n */\r\n public trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: Object) {\r\n try {\r\n var telemetry = new Telemetry.Metric(name, average, sampleCount, min, max, properties);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Metric.dataType, telemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Metric.envelopeType);\r\n\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackMetricFailed,\r\n \"trackMetric failed, metric will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a diagnostic message. \r\n * @param message A message string \r\n * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n public trackTrace(message: string, properties?: Object, severityLevel?: AI.SeverityLevel) {\r\n try {\r\n var telemetry = new Telemetry.Trace(message, properties, severityLevel);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Trace.dataType, telemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Trace.envelopeType);\r\n\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.TrackTraceFailed,\r\n \"trackTrace failed, trace will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a page visit time\r\n * @param pageName Name of page\r\n * @param pageVisitDuration Duration of visit to the page in milleseconds\r\n */\r\n private trackPageVisitTime(pageName: string, pageUrl: string, pageVisitTime: number) {\r\n var properties = { PageName: pageName, PageUrl: pageUrl };\r\n this.trackMetric(\"PageVisitTime\", pageVisitTime, 1, pageVisitTime, pageVisitTime, properties);\r\n }\r\n\r\n /**\r\n * Immediately send all queued telemetry.\r\n * @param {boolean} async - If flush should be call asynchronously\r\n */\r\n public flush(async = true) {\r\n try {\r\n this.context._sender.triggerSend(async);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FlushFailed,\r\n \"flush failed, telemetry will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Sets the authenticated user id and the account id.\r\n * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\r\n * \r\n * By default the method will only set the authUserID and accountId for all events in this page view. To add them to all events within\r\n * the whole session, you should either call this method on every page view or set `storeInCookie = true`. \r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n * @param storeInCookie {boolean} - AuthenticateUserID will be stored in a cookie and added to all events within this session. \r\n */\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false) {\r\n try {\r\n this.context.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailed,\r\n \"Setting auth user context failed. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) },\r\n true);\r\n }\r\n }\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n */\r\n public clearAuthenticatedUserContext() {\r\n try {\r\n this.context.user.clearAuthenticatedUserContext();\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailed,\r\n \"Clearing auth user context failed. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) },\r\n true);\r\n }\r\n }\r\n\r\n /**\r\n * In case of CORS exceptions - construct an exception manually.\r\n * See this for more info: http://stackoverflow.com/questions/5913978/cryptic-script-error-reported-in-javascript-in-chrome-and-firefox\r\n */\r\n private SendCORSException(properties: any) {\r\n var exceptionData = Microsoft.ApplicationInsights.Telemetry.Exception.CreateSimpleException(\r\n \"Script error.\",\r\n \"Error\", \"unknown\", \"unknown\",\r\n \"The browser's same-origin policy prevents us from getting the details of this exception. Consider using 'crossorigin' attribute.\",\r\n 0);\r\n exceptionData.properties = properties;\r\n\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Exception.dataType, exceptionData);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Exception.envelopeType);\r\n this.context.track(envelope);\r\n }\r\n\r\n /**\r\n * The custom error handler for Application Insights\r\n * @param {string} message - The error message\r\n * @param {string} url - The url where the error was raised\r\n * @param {number} lineNumber - The line number where the error was raised\r\n * @param {number} columnNumber - The column number for the line where the error was raised\r\n * @param {Error} error - The Error object\r\n */\r\n public _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error) {\r\n try {\r\n var properties = { url: url ? url : document.URL };\r\n\r\n if (Util.isCrossOriginError(message, url, lineNumber, columnNumber, error)) {\r\n this.SendCORSException(properties);\r\n } else {\r\n if (!Util.isError(error)) {\r\n var stack = \"window.onerror@\" + properties.url + \":\" + lineNumber + \":\" + (columnNumber || 0);\r\n error = new Error(message);\r\n error[\"stack\"] = stack;\r\n }\r\n this.trackException(error, null, properties);\r\n }\r\n } catch (exception) {\r\n var errorString =\r\n error ? (error.name + \", \" + error.message) : \"null\";\r\n\r\n var exceptionDump: string = Util.dump(exception);\r\n\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.ExceptionWhileLoggingError,\r\n \"_onerror threw exception while logging error, error will not be collected: \" + Util.getExceptionName(exception),\r\n { exception: exceptionDump, errorString: errorString });\r\n }\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Used to record timed events and page views.\r\n */\r\n class Timing {\r\n private _name;\r\n private _action: (ITimingDetail, number) => void;\r\n private _events: {\r\n [key: string]: number;\r\n };\r\n\r\n constructor(name: string) {\r\n this._name = name;\r\n this._events = {};\r\n }\r\n\r\n public start(name: string) {\r\n if (typeof this._events[name] !== \"undefined\") {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.StartCalledMoreThanOnce, \"start was called more than once for this event without calling stop.\",\r\n { name: this._name, key: name }, true);\r\n }\r\n\r\n this._events[name] = +new Date;\r\n }\r\n\r\n public stop(name: string, url: string, properties?: Object, measurements?: Object) {\r\n var start = this._events[name];\r\n if (isNaN(start)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.StopCalledWithoutStart, \"stop was called without a corresponding start.\",\r\n { name: this._name, key: name }, true);\r\n } else {\r\n var end = +new Date;\r\n var duration = Telemetry.PageViewPerformance.getDuration(start, end);\r\n this.action(name, url, duration, properties, measurements);\r\n }\r\n\r\n delete this._events[name];\r\n this._events[name] = undefined;\r\n }\r\n\r\n public action: (name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => void;\r\n }\r\n}\r\n","module Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n /* Data loss analyzer is disabled by default.\r\n * Uncomment code in Sender, SendBuffer and unit tests if you want to enable it\r\n */\r\n export class DataLossAnalyzer {\r\n static enabled = false;\r\n static appInsights: Microsoft.ApplicationInsights.AppInsights;\r\n static issuesReportedForThisSession;\r\n static itemsRestoredFromSessionBuffer: number = 0;\r\n static LIMIT_PER_SESSION = 10;\r\n static ITEMS_QUEUED_KEY = \"AI_itemsQueued\";\r\n static ISSUES_REPORTED_KEY = \"AI_lossIssuesReported\";\r\n\r\n static reset() {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, \"0\");\r\n Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, \"0\");\r\n DataLossAnalyzer.itemsRestoredFromSessionBuffer = 0;\r\n }\r\n }\r\n\r\n private static isEnabled(): boolean {\r\n return DataLossAnalyzer.enabled &&\r\n DataLossAnalyzer.appInsights != null &&\r\n DataLossAnalyzer.appInsights.context._sender._XMLHttpRequestSupported &&\r\n Util.canUseSessionStorage()\r\n }\r\n\r\n static getIssuesReported(): number {\r\n var result =\r\n (!DataLossAnalyzer.isEnabled() || isNaN(+Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY))) ?\r\n 0 :\r\n +Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY);\r\n\r\n return result;\r\n }\r\n\r\n static incrementItemsQueued() {\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n var itemsQueued: number = DataLossAnalyzer.getNumberOfLostItems();\r\n ++itemsQueued;\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString());\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n static decrementItemsQueued(countOfItemsSentSuccessfully: number) {\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n var itemsQueued: number = DataLossAnalyzer.getNumberOfLostItems();\r\n itemsQueued -= countOfItemsSentSuccessfully;\r\n if (itemsQueued < 0) itemsQueued = 0;\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString());\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n static getNumberOfLostItems(): number {\r\n var result: number = 0;\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n result = isNaN(+Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY)) ?\r\n 0 :\r\n +Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY);\r\n }\r\n } catch (e) {\r\n result = 0;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n static reportLostItems() {\r\n try {\r\n if (DataLossAnalyzer.isEnabled() &&\r\n DataLossAnalyzer.getIssuesReported() < DataLossAnalyzer.LIMIT_PER_SESSION &&\r\n DataLossAnalyzer.getNumberOfLostItems() > 0) {\r\n\r\n var lostItems = DataLossAnalyzer.getNumberOfLostItems() - DataLossAnalyzer.itemsRestoredFromSessionBuffer;\r\n\r\n DataLossAnalyzer.appInsights.trackTrace(\r\n \"AI (Internal): Internal report DATALOSS:\\\"\" + lostItems + \"\\\"\",\r\n null);\r\n DataLossAnalyzer.appInsights.flush();\r\n\r\n var issuesReported: number = DataLossAnalyzer.getIssuesReported();\r\n ++issuesReported;\r\n Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, issuesReported.toString());\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToReportDataLoss,\r\n \"Failed to report data loss: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n finally {\r\n try {\r\n DataLossAnalyzer.reset();\r\n } catch (e) { }\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface Snippet {\r\n queue: Array<() => void>;\r\n config: IConfig;\r\n }\r\n\r\n export class Initialization {\r\n public snippet: Snippet;\r\n public config: IConfig;\r\n\r\n constructor(snippet: Snippet) {\r\n // initialize the queue and config in case they are undefined\r\n snippet.queue = snippet.queue || [];\r\n var config: IConfig = snippet.config || {};\r\n\r\n // ensure instrumentationKey is specified\r\n if (config && !config.instrumentationKey) {\r\n config = snippet;\r\n\r\n // check for legacy instrumentation key\r\n if (config[\"iKey\"]) {\r\n Microsoft.ApplicationInsights.Version = \"0.10.0.0\";\r\n config.instrumentationKey = config[\"iKey\"];\r\n } else if (config[\"applicationInsightsId\"]) {\r\n Microsoft.ApplicationInsights.Version = \"0.7.2.0\";\r\n config.instrumentationKey = config[\"applicationInsightsId\"];\r\n } else {\r\n throw new Error(\"Cannot load Application Insights SDK, no instrumentationKey was provided.\");\r\n }\r\n }\r\n\r\n // set default values\r\n config = Initialization.getDefaultConfig(config);\r\n\r\n this.snippet = snippet;\r\n this.config = config;\r\n }\r\n\r\n // note: these are split into methods to enable unit tests\r\n public loadAppInsights() {\r\n\r\n // initialize global instance of appInsights\r\n var appInsights = new Microsoft.ApplicationInsights.AppInsights(this.config);\r\n\r\n // implement legacy version of trackPageView for 0.10<\r\n if (this.config[\"iKey\"]) {\r\n var originalTrackPageView = appInsights.trackPageView;\r\n appInsights.trackPageView = (pagePath?: string, properties?: Object, measurements?: Object) => {\r\n originalTrackPageView.apply(appInsights, [null, pagePath, properties, measurements]);\r\n }\r\n }\r\n\r\n // implement legacy pageView interface if it is present in the snippet\r\n var legacyPageView = \"logPageView\";\r\n if (typeof this.snippet[legacyPageView] === \"function\") {\r\n appInsights[legacyPageView] = (pagePath?: string, properties?: Object, measurements?: Object) => {\r\n appInsights.trackPageView(null, pagePath, properties, measurements);\r\n }\r\n }\r\n\r\n // implement legacy event interface if it is present in the snippet\r\n var legacyEvent = \"logEvent\";\r\n if (typeof this.snippet[legacyEvent] === \"function\") {\r\n appInsights[legacyEvent] = (name: string, properties?: Object, measurements?: Object) => {\r\n appInsights.trackEvent(name, properties, measurements);\r\n }\r\n }\r\n\r\n return appInsights;\r\n }\r\n\r\n public emptyQueue() {\r\n\r\n // call functions that were queued before the main script was loaded\r\n try {\r\n if (Microsoft.ApplicationInsights.Util.isArray(this.snippet.queue)) {\r\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\r\n var length = this.snippet.queue.length;\r\n for (var i = 0; i < length; i++) {\r\n var call = this.snippet.queue[i];\r\n call();\r\n }\r\n\r\n this.snippet.queue = undefined;\r\n delete this.snippet.queue;\r\n }\r\n } catch (exception) {\r\n var properties: any = {};\r\n if (exception && typeof exception.toString === \"function\") {\r\n properties.exception = exception.toString();\r\n }\r\n Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedToSendQueuedTelemetry,\r\n \"Failed to send queued telemetry\",\r\n properties);\r\n }\r\n }\r\n\r\n public pollInteralLogs(appInsightsInstance: AppInsights) {\r\n return setInterval(() => {\r\n var queue: Array<_InternalLogMessage> = Microsoft.ApplicationInsights._InternalLogging.queue;\r\n var length = queue.length;\r\n for (var i = 0; i < length; i++) {\r\n appInsightsInstance.trackTrace(queue[i].message);\r\n }\r\n queue.length = 0;\r\n }, this.config.diagnosticLogInterval);\r\n }\r\n\r\n public addHousekeepingBeforeUnload(appInsightsInstance: AppInsights): void {\r\n // Add callback to push events when the user navigates away\r\n\r\n if (!appInsightsInstance.config.disableFlushOnBeforeUnload && ('onbeforeunload' in window)) {\r\n var performHousekeeping = function () {\r\n // Adds the ability to flush all data before the page unloads.\r\n // Note: This approach tries to push an async request with all the pending events onbeforeunload.\r\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\r\n // Telemetry here will help us analyze how effective this approach is.\r\n // Another approach would be to make this call sync with a acceptable timeout to reduce the \r\n // impact on user experience.\r\n appInsightsInstance.context._sender.triggerSend();\r\n\r\n // Back up the current session to local storage\r\n // This lets us close expired sessions after the cookies themselves expire\r\n appInsightsInstance.context._sessionManager.backup();\r\n };\r\n\r\n if (!Microsoft.ApplicationInsights.Util.addEventHandler('beforeunload', performHousekeeping)) {\r\n Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n Microsoft.ApplicationInsights.LoggingSeverity.CRITICAL,\r\n Microsoft.ApplicationInsights._InternalMessageId.FailedToAddHandlerForOnBeforeUnload,\r\n 'Could not add handler for beforeunload');\r\n }\r\n }\r\n }\r\n\r\n public static getDefaultConfig(config?: IConfig): IConfig {\r\n if (!config) {\r\n config = {};\r\n }\r\n\r\n // set default values\r\n config.endpointUrl = config.endpointUrl || \"https://dc.services.visualstudio.com/v2/track\";\r\n config.sessionRenewalMs = 30 * 60 * 1000;\r\n config.sessionExpirationMs = 24 * 60 * 60 * 1000;\r\n config.maxBatchSizeInBytes = config.maxBatchSizeInBytes > 0 ? config.maxBatchSizeInBytes : 102400; // 100kb\r\n config.maxBatchInterval = !isNaN(config.maxBatchInterval) ? config.maxBatchInterval : 15000;\r\n config.enableDebug = Util.stringToBoolOrDefault(config.enableDebug);\r\n config.disableExceptionTracking = Util.stringToBoolOrDefault(config.disableExceptionTracking);\r\n config.disableTelemetry = Util.stringToBoolOrDefault(config.disableTelemetry);\r\n config.verboseLogging = Util.stringToBoolOrDefault(config.verboseLogging);\r\n config.emitLineDelimitedJson = Util.stringToBoolOrDefault(config.emitLineDelimitedJson);\r\n config.diagnosticLogInterval = config.diagnosticLogInterval || 10000;\r\n config.autoTrackPageVisitTime = Util.stringToBoolOrDefault(config.autoTrackPageVisitTime);\r\n\r\n if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) {\r\n config.samplingPercentage = 100;\r\n }\r\n\r\n config.disableAjaxTracking = Util.stringToBoolOrDefault(config.disableAjaxTracking);\r\n config.maxAjaxCallsPerView = !isNaN(config.maxAjaxCallsPerView) ? config.maxAjaxCallsPerView : 500;\r\n \r\n config.isBeaconApiDisabled = Util.stringToBoolOrDefault(config.isBeaconApiDisabled, true);\r\n config.disableCorrelationHeaders = Util.stringToBoolOrDefault(config.disableCorrelationHeaders);\r\n config.correlationHeaderExcludedDomains = config.correlationHeaderExcludedDomains || [\r\n \"*.blob.core.windows.net\", \r\n \"*.blob.core.chinacloudapi.cn\",\r\n \"*.blob.core.cloudapi.de\",\r\n \"*.blob.core.usgovcloudapi.net\"];\r\n config.disableFlushOnBeforeUnload = Util.stringToBoolOrDefault(config.disableFlushOnBeforeUnload);\r\n config.enableSessionStorageBuffer = Util.stringToBoolOrDefault(config.enableSessionStorageBuffer, true);\r\n config.isRetryDisabled = Util.stringToBoolOrDefault(config.isRetryDisabled);\r\n config.isCookieUseDisabled = Util.stringToBoolOrDefault(config.isCookieUseDisabled);\r\n config.isStorageUseDisabled = Util.stringToBoolOrDefault(config.isStorageUseDisabled);\r\n config.isBrowserLinkTrackingEnabled = Util.stringToBoolOrDefault(config.isBrowserLinkTrackingEnabled);\r\n config.enableCorsCorrelation = Util.stringToBoolOrDefault(config.enableCorsCorrelation);\r\n \r\n return config;\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n try {\r\n // only initialize if we are running in a browser that supports JSON serialization (ie7<, node.js, cordova)\r\n if (typeof window !== \"undefined\" && typeof JSON !== \"undefined\") {\r\n // get snippet or initialize to an empty object\r\n var aiName = \"appInsights\";\r\n \r\n if (window[aiName] === undefined) {\r\n // if no snippet is present, initialize default values\r\n Microsoft.ApplicationInsights.AppInsights.defaultConfig = Microsoft.ApplicationInsights.Initialization.getDefaultConfig();\r\n } else {\r\n // this is the typical case for browser+snippet\r\n var snippet: Microsoft.ApplicationInsights.Snippet = window[aiName] || {};\r\n \r\n // overwrite snippet with full appInsights\r\n var init = new Microsoft.ApplicationInsights.Initialization(snippet);\r\n var appInsightsLocal = init.loadAppInsights();\r\n\r\n // apply full appInsights to the global instance that was initialized in the snippet\r\n for (var field in appInsightsLocal) {\r\n snippet[field] = appInsightsLocal[field];\r\n }\r\n \r\n init.emptyQueue();\r\n \r\n init.pollInteralLogs(appInsightsLocal);\r\n \r\n init.addHousekeepingBeforeUnload(appInsightsLocal);\r\n }\r\n }\r\n } catch (e) {\r\n Microsoft.ApplicationInsights._InternalLogging.warnToConsole('Failed to initialize AppInsights JS SDK: ' + e.message);\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/dist/ai.1.0.20.js b/dist/ai.1.0.20.js new file mode 100644 index 00000000..d28857aa --- /dev/null +++ b/dist/ai.1.0.20.js @@ -0,0 +1,5200 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +var Microsoft; +(function (Microsoft) { + var Telemetry; + (function (Telemetry) { + "use strict"; + /** + * Data struct to contain only C section with custom fields. + */ + var Base = /** @class */ (function () { + function Base() { + } + return Base; + }()); + Telemetry.Base = Base; + })(Telemetry = Microsoft.Telemetry || (Microsoft.Telemetry = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +/// +var Microsoft; +(function (Microsoft) { + var Telemetry; + (function (Telemetry) { + "use strict"; + /** + * System variables for a telemetry item. + */ + var Envelope = /** @class */ (function () { + function Envelope() { + this.ver = 1; + this.sampleRate = 100.0; + this.tags = {}; + } + return Envelope; + }()); + Telemetry.Envelope = Envelope; + })(Telemetry = Microsoft.Telemetry || (Microsoft.Telemetry = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(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) { + "use strict"; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +var AI; +(function (AI) { + "use strict"; + /** + * Defines the level of severity for the event. + */ + var SeverityLevel; + (function (SeverityLevel) { + SeverityLevel[SeverityLevel["Verbose"] = 0] = "Verbose"; + SeverityLevel[SeverityLevel["Information"] = 1] = "Information"; + SeverityLevel[SeverityLevel["Warning"] = 2] = "Warning"; + SeverityLevel[SeverityLevel["Error"] = 3] = "Error"; + SeverityLevel[SeverityLevel["Critical"] = 4] = "Critical"; + })(SeverityLevel = AI.SeverityLevel || (AI.SeverityLevel = {})); +})(AI || (AI = {})); +/// +/// +/// +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) { + var LoggingSeverity; + (function (LoggingSeverity) { + /** + * Error will be sent as internal telemetry + */ + LoggingSeverity[LoggingSeverity["CRITICAL"] = 0] = "CRITICAL"; + /** + * Error will NOT be sent as internal telemetry, and will only be shown in browser console + */ + LoggingSeverity[LoggingSeverity["WARNING"] = 1] = "WARNING"; + })(LoggingSeverity = ApplicationInsights.LoggingSeverity || (ApplicationInsights.LoggingSeverity = {})); + /** + * Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered + */ + var _InternalMessageId; + (function (_InternalMessageId) { + // Non user actionable + _InternalMessageId[_InternalMessageId["BrowserDoesNotSupportLocalStorage"] = 0] = "BrowserDoesNotSupportLocalStorage"; + _InternalMessageId[_InternalMessageId["BrowserCannotReadLocalStorage"] = 1] = "BrowserCannotReadLocalStorage"; + _InternalMessageId[_InternalMessageId["BrowserCannotReadSessionStorage"] = 2] = "BrowserCannotReadSessionStorage"; + _InternalMessageId[_InternalMessageId["BrowserCannotWriteLocalStorage"] = 3] = "BrowserCannotWriteLocalStorage"; + _InternalMessageId[_InternalMessageId["BrowserCannotWriteSessionStorage"] = 4] = "BrowserCannotWriteSessionStorage"; + _InternalMessageId[_InternalMessageId["BrowserFailedRemovalFromLocalStorage"] = 5] = "BrowserFailedRemovalFromLocalStorage"; + _InternalMessageId[_InternalMessageId["BrowserFailedRemovalFromSessionStorage"] = 6] = "BrowserFailedRemovalFromSessionStorage"; + _InternalMessageId[_InternalMessageId["CannotSendEmptyTelemetry"] = 7] = "CannotSendEmptyTelemetry"; + _InternalMessageId[_InternalMessageId["ClientPerformanceMathError"] = 8] = "ClientPerformanceMathError"; + _InternalMessageId[_InternalMessageId["ErrorParsingAISessionCookie"] = 9] = "ErrorParsingAISessionCookie"; + _InternalMessageId[_InternalMessageId["ErrorPVCalc"] = 10] = "ErrorPVCalc"; + _InternalMessageId[_InternalMessageId["ExceptionWhileLoggingError"] = 11] = "ExceptionWhileLoggingError"; + _InternalMessageId[_InternalMessageId["FailedAddingTelemetryToBuffer"] = 12] = "FailedAddingTelemetryToBuffer"; + _InternalMessageId[_InternalMessageId["FailedMonitorAjaxAbort"] = 13] = "FailedMonitorAjaxAbort"; + _InternalMessageId[_InternalMessageId["FailedMonitorAjaxDur"] = 14] = "FailedMonitorAjaxDur"; + _InternalMessageId[_InternalMessageId["FailedMonitorAjaxOpen"] = 15] = "FailedMonitorAjaxOpen"; + _InternalMessageId[_InternalMessageId["FailedMonitorAjaxRSC"] = 16] = "FailedMonitorAjaxRSC"; + _InternalMessageId[_InternalMessageId["FailedMonitorAjaxSend"] = 17] = "FailedMonitorAjaxSend"; + _InternalMessageId[_InternalMessageId["FailedMonitorAjaxGetCorrelationHeader"] = 18] = "FailedMonitorAjaxGetCorrelationHeader"; + _InternalMessageId[_InternalMessageId["FailedToAddHandlerForOnBeforeUnload"] = 19] = "FailedToAddHandlerForOnBeforeUnload"; + _InternalMessageId[_InternalMessageId["FailedToSendQueuedTelemetry"] = 20] = "FailedToSendQueuedTelemetry"; + _InternalMessageId[_InternalMessageId["FailedToReportDataLoss"] = 21] = "FailedToReportDataLoss"; + _InternalMessageId[_InternalMessageId["FlushFailed"] = 22] = "FlushFailed"; + _InternalMessageId[_InternalMessageId["MessageLimitPerPVExceeded"] = 23] = "MessageLimitPerPVExceeded"; + _InternalMessageId[_InternalMessageId["MissingRequiredFieldSpecification"] = 24] = "MissingRequiredFieldSpecification"; + _InternalMessageId[_InternalMessageId["NavigationTimingNotSupported"] = 25] = "NavigationTimingNotSupported"; + _InternalMessageId[_InternalMessageId["OnError"] = 26] = "OnError"; + _InternalMessageId[_InternalMessageId["SessionRenewalDateIsZero"] = 27] = "SessionRenewalDateIsZero"; + _InternalMessageId[_InternalMessageId["SenderNotInitialized"] = 28] = "SenderNotInitialized"; + _InternalMessageId[_InternalMessageId["StartTrackEventFailed"] = 29] = "StartTrackEventFailed"; + _InternalMessageId[_InternalMessageId["StopTrackEventFailed"] = 30] = "StopTrackEventFailed"; + _InternalMessageId[_InternalMessageId["StartTrackFailed"] = 31] = "StartTrackFailed"; + _InternalMessageId[_InternalMessageId["StopTrackFailed"] = 32] = "StopTrackFailed"; + _InternalMessageId[_InternalMessageId["TelemetrySampledAndNotSent"] = 33] = "TelemetrySampledAndNotSent"; + _InternalMessageId[_InternalMessageId["TrackEventFailed"] = 34] = "TrackEventFailed"; + _InternalMessageId[_InternalMessageId["TrackExceptionFailed"] = 35] = "TrackExceptionFailed"; + _InternalMessageId[_InternalMessageId["TrackMetricFailed"] = 36] = "TrackMetricFailed"; + _InternalMessageId[_InternalMessageId["TrackPVFailed"] = 37] = "TrackPVFailed"; + _InternalMessageId[_InternalMessageId["TrackPVFailedCalc"] = 38] = "TrackPVFailedCalc"; + _InternalMessageId[_InternalMessageId["TrackTraceFailed"] = 39] = "TrackTraceFailed"; + _InternalMessageId[_InternalMessageId["TransmissionFailed"] = 40] = "TransmissionFailed"; + _InternalMessageId[_InternalMessageId["FailedToSetStorageBuffer"] = 41] = "FailedToSetStorageBuffer"; + _InternalMessageId[_InternalMessageId["FailedToRestoreStorageBuffer"] = 42] = "FailedToRestoreStorageBuffer"; + _InternalMessageId[_InternalMessageId["InvalidBackendResponse"] = 43] = "InvalidBackendResponse"; + _InternalMessageId[_InternalMessageId["FailedToFixDepricatedValues"] = 44] = "FailedToFixDepricatedValues"; + _InternalMessageId[_InternalMessageId["InvalidDurationValue"] = 45] = "InvalidDurationValue"; + // User actionable + _InternalMessageId[_InternalMessageId["CannotSerializeObject"] = 46] = "CannotSerializeObject"; + _InternalMessageId[_InternalMessageId["CannotSerializeObjectNonSerializable"] = 47] = "CannotSerializeObjectNonSerializable"; + _InternalMessageId[_InternalMessageId["CircularReferenceDetected"] = 48] = "CircularReferenceDetected"; + _InternalMessageId[_InternalMessageId["ClearAuthContextFailed"] = 49] = "ClearAuthContextFailed"; + _InternalMessageId[_InternalMessageId["ExceptionTruncated"] = 50] = "ExceptionTruncated"; + _InternalMessageId[_InternalMessageId["IllegalCharsInName"] = 51] = "IllegalCharsInName"; + _InternalMessageId[_InternalMessageId["ItemNotInArray"] = 52] = "ItemNotInArray"; + _InternalMessageId[_InternalMessageId["MaxAjaxPerPVExceeded"] = 53] = "MaxAjaxPerPVExceeded"; + _InternalMessageId[_InternalMessageId["MessageTruncated"] = 54] = "MessageTruncated"; + _InternalMessageId[_InternalMessageId["NameTooLong"] = 55] = "NameTooLong"; + _InternalMessageId[_InternalMessageId["SampleRateOutOfRange"] = 56] = "SampleRateOutOfRange"; + _InternalMessageId[_InternalMessageId["SetAuthContextFailed"] = 57] = "SetAuthContextFailed"; + _InternalMessageId[_InternalMessageId["SetAuthContextFailedAccountName"] = 58] = "SetAuthContextFailedAccountName"; + _InternalMessageId[_InternalMessageId["StringValueTooLong"] = 59] = "StringValueTooLong"; + _InternalMessageId[_InternalMessageId["StartCalledMoreThanOnce"] = 60] = "StartCalledMoreThanOnce"; + _InternalMessageId[_InternalMessageId["StopCalledWithoutStart"] = 61] = "StopCalledWithoutStart"; + _InternalMessageId[_InternalMessageId["TelemetryInitializerFailed"] = 62] = "TelemetryInitializerFailed"; + _InternalMessageId[_InternalMessageId["TrackArgumentsNotSpecified"] = 63] = "TrackArgumentsNotSpecified"; + _InternalMessageId[_InternalMessageId["UrlTooLong"] = 64] = "UrlTooLong"; + _InternalMessageId[_InternalMessageId["SessionStorageBufferFull"] = 65] = "SessionStorageBufferFull"; + _InternalMessageId[_InternalMessageId["CannotAccessCookie"] = 66] = "CannotAccessCookie"; + _InternalMessageId[_InternalMessageId["IdTooLong"] = 67] = "IdTooLong"; + })(_InternalMessageId = ApplicationInsights._InternalMessageId || (ApplicationInsights._InternalMessageId = {})); + var _InternalLogMessage = /** @class */ (function () { + function _InternalLogMessage(msgId, msg, isUserAct, properties) { + if (isUserAct === void 0) { isUserAct = false; } + this.messageId = msgId; + this.message = + (isUserAct ? _InternalLogMessage.AiUserActionablePrefix : _InternalLogMessage.AiNonUserActionablePrefix) + + _InternalMessageId[msgId].toString(); + var diagnosticText = (msg ? " message:" + _InternalLogMessage.sanitizeDiagnosticText(msg) : "") + + (properties ? " props:" + _InternalLogMessage.sanitizeDiagnosticText(JSON.stringify(properties)) : ""); + this.message += diagnosticText; + } + _InternalLogMessage.sanitizeDiagnosticText = function (text) { + return "\"" + text.replace(/\"/g, "") + "\""; + }; + /** + * For user non actionable traces use AI Internal prefix. + */ + _InternalLogMessage.AiNonUserActionablePrefix = "AI (Internal): "; + /** + * Prefix of the traces in portal. + */ + _InternalLogMessage.AiUserActionablePrefix = "AI: "; + return _InternalLogMessage; + }()); + ApplicationInsights._InternalLogMessage = _InternalLogMessage; + var _InternalLogging = /** @class */ (function () { + function _InternalLogging() { + } + /** + * This method will throw exceptions in debug mode or attempt to log the error as a console warning. + * @param severity {LoggingSeverity} - The severity of the log message + * @param message {_InternalLogMessage} - The log message. + */ + _InternalLogging.throwInternal = function (severity, msgId, msg, properties, isUserAct) { + if (isUserAct === void 0) { isUserAct = false; } + var message = new _InternalLogMessage(msgId, msg, isUserAct, properties); + if (this.enableDebugExceptions()) { + throw message; + } + else { + if (typeof (message) !== "undefined" && !!message) { + if (typeof (message.message) !== "undefined") { + if (isUserAct) { + // check if this message type was already logged to console for this page view and if so, don't log it again + var messageKey = _InternalMessageId[message.messageId]; + if (!this._messageLogged[messageKey] || this.verboseLogging()) { + this.warnToConsole(message.message); + this._messageLogged[messageKey] = true; + } + } + else { + // don't log internal AI traces in the console, unless the verbose logging is enabled + if (this.verboseLogging()) { + this.warnToConsole(message.message); + } + } + this.logInternalMessage(severity, message); + } + } + } + }; + /** + * This will write a warning to the console if possible + * @param message {string} - The warning message + */ + _InternalLogging.warnToConsole = function (message) { + if (typeof console !== "undefined" && !!console) { + if (typeof console.warn === "function") { + console.warn(message); + } + else if (typeof console.log === "function") { + console.log(message); + } + } + }; + /** + * Resets the internal message count + */ + _InternalLogging.resetInternalMessageCount = function () { + this._messageCount = 0; + this._messageLogged = {}; + }; + /** + * Clears the list of records indicating that internal message type was already logged + */ + _InternalLogging.clearInternalMessageLoggedTypes = function () { + if (ApplicationInsights.Util.canUseSessionStorage()) { + var sessionStorageKeys = ApplicationInsights.Util.getSessionStorageKeys(); + for (var i = 0; i < sessionStorageKeys.length; i++) { + if (sessionStorageKeys[i].indexOf(_InternalLogging.AIInternalMessagePrefix) === 0) { + ApplicationInsights.Util.removeSessionStorage(sessionStorageKeys[i]); + } + } + } + }; + /** + * Sets the limit for the number of internal events before they are throttled + * @param limit {number} - The throttle limit to set for internal events + */ + _InternalLogging.setMaxInternalMessageLimit = function (limit) { + if (!limit) { + throw new Error('limit cannot be undefined.'); + } + this.MAX_INTERNAL_MESSAGE_LIMIT = limit; + }; + /** + * Logs a message to the internal queue. + * @param severity {LoggingSeverity} - The severity of the log message + * @param message {_InternalLogMessage} - The message to log. + */ + _InternalLogging.logInternalMessage = function (severity, message) { + if (this._areInternalMessagesThrottled()) { + return; + } + // check if this message type was already logged for this session and if so, don't log it again + var logMessage = true; + var messageKey = _InternalLogging.AIInternalMessagePrefix + _InternalMessageId[message.messageId]; + if (ApplicationInsights.Util.canUseSessionStorage()) { + var internalMessageTypeLogRecord = ApplicationInsights.Util.getSessionStorage(messageKey); + if (internalMessageTypeLogRecord) { + logMessage = false; + } + else { + ApplicationInsights.Util.setSessionStorage(messageKey, "1"); + } + } + else { + // if the session storage is not available, limit to only one message type per page view + if (this._messageLogged[messageKey]) { + logMessage = false; + } + else { + this._messageLogged[messageKey] = true; + } + } + if (logMessage) { + // Push the event in the internal queue + if (this.verboseLogging() || severity === LoggingSeverity.CRITICAL) { + this.queue.push(message); + this._messageCount++; + } + // When throttle limit reached, send a special event + if (this._messageCount == this.MAX_INTERNAL_MESSAGE_LIMIT) { + var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app."; + var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false); + this.queue.push(throttleMessage); + this.warnToConsole(throttleLimitMessage); + } + } + }; + /** + * Indicates whether the internal events are throttled + */ + _InternalLogging._areInternalMessagesThrottled = function () { + return this._messageCount >= this.MAX_INTERNAL_MESSAGE_LIMIT; + }; + /** + * Session storage key for the prefix for the key indicating message type already logged + */ + _InternalLogging.AIInternalMessagePrefix = "AITR_"; + /** + * When this is true the SDK will throw exceptions to aid in debugging. + */ + _InternalLogging.enableDebugExceptions = function () { return false; }; + /** + * When this is true the SDK will log more messages to aid in debugging. + */ + _InternalLogging.verboseLogging = function () { return false; }; + /** + * The internal logging queue + */ + _InternalLogging.queue = []; + /** + * The maximum number of internal messages allowed to be sent per page view + */ + _InternalLogging.MAX_INTERNAL_MESSAGE_LIMIT = 25; + /** + * Count of internal messages sent + */ + _InternalLogging._messageCount = 0; + /** + * Holds information about what message types were already logged to console or sent to server. + */ + _InternalLogging._messageLogged = {}; + return _InternalLogging; + }()); + ApplicationInsights._InternalLogging = _InternalLogging; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + var UtilHelpers = /** @class */ (function () { + function UtilHelpers() { + } + /** + * generate random id string + */ + UtilHelpers.newId = function () { + var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var result = ""; + var random = Math.random() * 1073741824; //5 symbols in base64, almost maxint + while (random > 0) { + var char = base64chars.charAt(random % 64); + result += char; + random = Math.floor(random / 64); + } + return result; + }; + return UtilHelpers; + }()); + ApplicationInsights.UtilHelpers = UtilHelpers; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + /** + * Type of storage to differentiate between local storage and session storage + */ + var StorageType; + (function (StorageType) { + StorageType[StorageType["LocalStorage"] = 0] = "LocalStorage"; + StorageType[StorageType["SessionStorage"] = 1] = "SessionStorage"; + })(StorageType || (StorageType = {})); + var Util = /** @class */ (function () { + function Util() { + } + /* + * Force the SDK not to use local and session storage + */ + Util.disableStorage = function () { + Util._canUseLocalStorage = false; + Util._canUseSessionStorage = false; + }; + /** + * Gets the localStorage object if available + * @return {Storage} - Returns the storage object if available else returns null + */ + Util._getLocalStorageObject = function () { + if (Util.canUseLocalStorage()) { + return Util._getVerifiedStorageObject(StorageType.LocalStorage); + } + return null; + }; + /** + * Tests storage object (localStorage or sessionStorage) to verify that it is usable + * More details here: https://mathiasbynens.be/notes/localstorage-pattern + * @param storageType Type of storage + * @return {Storage} Returns storage object verified that it is usable + */ + Util._getVerifiedStorageObject = function (storageType) { + var storage = null; + var fail; + var uid; + try { + uid = new Date; + storage = storageType === StorageType.LocalStorage ? window.localStorage : window.sessionStorage; + storage.setItem(uid, uid); + fail = storage.getItem(uid) != uid; + storage.removeItem(uid); + if (fail) { + storage = null; + } + } + catch (exception) { + storage = null; + } + return storage; + }; + /** + * Checks if endpoint URL is application insights internal injestion service URL. + * + * @param endpointUrl Endpoint URL to check. + * @returns {boolean} True if if endpoint URL is application insights internal injestion service URL. + */ + Util.isInternalApplicationInsightsEndpoint = function (endpointUrl) { + return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1; + }; + /** + * Check if the browser supports local storage. + * + * @returns {boolean} True if local storage is supported. + */ + Util.canUseLocalStorage = function () { + if (Util._canUseLocalStorage === undefined) { + Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(StorageType.LocalStorage); + } + return Util._canUseLocalStorage; + }; + /** + * Get an object from the browser's local storage + * + * @param {string} name - the name of the object to get from storage + * @returns {string} The contents of the storage object with the given name. Null if storage is not supported. + */ + Util.getStorage = function (name) { + var storage = Util._getLocalStorageObject(); + if (storage !== null) { + try { + return storage.getItem(name); + } + catch (e) { + Util._canUseLocalStorage = false; + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + Util.getExceptionName(e), { exception: Util.dump(e) }); + } + } + return null; + }; + /** + * Set the contents of an object in the browser's local storage + * + * @param {string} name - the name of the object to set in storage + * @param {string} data - the contents of the object to set in storage + * @returns {boolean} True if the storage object could be written. + */ + Util.setStorage = function (name, data) { + var storage = Util._getLocalStorageObject(); + if (storage !== null) { + try { + storage.setItem(name, data); + return true; + } + catch (e) { + Util._canUseLocalStorage = false; + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + Util.getExceptionName(e), { exception: Util.dump(e) }); + } + } + return false; + }; + /** + * Remove an object from the browser's local storage + * + * @param {string} name - the name of the object to remove from storage + * @returns {boolean} True if the storage object could be removed. + */ + Util.removeStorage = function (name) { + var storage = Util._getLocalStorageObject(); + if (storage !== null) { + try { + storage.removeItem(name); + return true; + } + catch (e) { + Util._canUseLocalStorage = false; + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + Util.getExceptionName(e), { exception: Util.dump(e) }); + } + } + return false; + }; + /** + * Gets the sessionStorage object if available + * @return {Storage} - Returns the storage object if available else returns null + */ + Util._getSessionStorageObject = function () { + if (Util.canUseSessionStorage()) { + return Util._getVerifiedStorageObject(StorageType.SessionStorage); + } + return null; + }; + /** + * Check if the browser supports session storage. + * + * @returns {boolean} True if session storage is supported. + */ + Util.canUseSessionStorage = function () { + if (Util._canUseSessionStorage === undefined) { + Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(StorageType.SessionStorage); + } + return Util._canUseSessionStorage; + }; + /** + * Gets the list of session storage keys + * + * @returns {string[]} List of session storage keys + */ + Util.getSessionStorageKeys = function () { + var keys = []; + if (Util.canUseSessionStorage()) { + for (var key in window.sessionStorage) { + keys.push(key); + } + } + return keys; + }; + /** + * Get an object from the browser's session storage + * + * @param {string} name - the name of the object to get from storage + * @returns {string} The contents of the storage object with the given name. Null if storage is not supported. + */ + Util.getSessionStorage = function (name) { + var storage = Util._getSessionStorageObject(); + if (storage !== null) { + try { + return storage.getItem(name); + } + catch (e) { + Util._canUseSessionStorage = false; + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + Util.getExceptionName(e), { exception: Util.dump(e) }); + } + } + return null; + }; + /** + * Set the contents of an object in the browser's session storage + * + * @param {string} name - the name of the object to set in storage + * @param {string} data - the contents of the object to set in storage + * @returns {boolean} True if the storage object could be written. + */ + Util.setSessionStorage = function (name, data) { + var storage = Util._getSessionStorageObject(); + if (storage !== null) { + try { + storage.setItem(name, data); + return true; + } + catch (e) { + Util._canUseSessionStorage = false; + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + Util.getExceptionName(e), { exception: Util.dump(e) }); + } + } + return false; + }; + /** + * Remove an object from the browser's session storage + * + * @param {string} name - the name of the object to remove from storage + * @returns {boolean} True if the storage object could be removed. + */ + Util.removeSessionStorage = function (name) { + var storage = Util._getSessionStorageObject(); + if (storage !== null) { + try { + storage.removeItem(name); + return true; + } + catch (e) { + Util._canUseSessionStorage = false; + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + Util.getExceptionName(e), { exception: Util.dump(e) }); + } + } + return false; + }; + /* + * Force the SDK not to store and read any data from cookies + */ + Util.disableCookies = function () { + Util._canUseCookies = false; + }; + /* + * helper method to tell if document.cookie object is available + */ + Util.canUseCookies = function () { + if (Util._canUseCookies === undefined) { + Util._canUseCookies = false; + try { + Util._canUseCookies = Util.document.cookie !== undefined; + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.CannotAccessCookie, "Cannot access document.cookie - " + Util.getExceptionName(e), { exception: Util.dump(e) }); + } + ; + } + return Util._canUseCookies; + }; + /** + * helper method to set userId and sessionId cookie + */ + Util.setCookie = function (name, value, domain) { + var domainAttrib = ""; + var secureAttrib = ""; + if (domain) { + domainAttrib = ";domain=" + domain; + } + if (Util.document.location && Util.document.location.protocol === "https:") { + secureAttrib = ";secure"; + } + if (Util.canUseCookies()) { + Util.document.cookie = name + "=" + value + domainAttrib + ";path=/" + secureAttrib; + } + }; + Util.stringToBoolOrDefault = function (str, defaultValue) { + if (defaultValue === void 0) { defaultValue = false; } + if (str === undefined || str === null) { + return defaultValue; + } + return str.toString().toLowerCase() === "true"; + }; + /** + * helper method to access userId and sessionId cookie + */ + Util.getCookie = function (name) { + if (!Util.canUseCookies()) { + return; + } + var value = ""; + if (name && name.length) { + var cookieName = name + "="; + var cookies = Util.document.cookie.split(";"); + for (var i = 0; i < cookies.length; i++) { + var cookie = cookies[i]; + cookie = Util.trim(cookie); + if (cookie && cookie.indexOf(cookieName) === 0) { + value = cookie.substring(cookieName.length, cookies[i].length); + break; + } + } + } + return value; + }; + /** + * Deletes a cookie by setting it's expiration time in the past. + * @param name - The name of the cookie to delete. + */ + Util.deleteCookie = function (name) { + if (Util.canUseCookies()) { + // Setting the expiration date in the past immediately removes the cookie + Util.document.cookie = name + "=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;"; + } + }; + /** + * helper method to trim strings (IE8 does not implement String.prototype.trim) + */ + Util.trim = function (str) { + if (typeof str !== "string") + return str; + return str.replace(/^\s+|\s+$/g, ""); + }; + /** + * generate random id string + */ + Util.newId = function () { + return ApplicationInsights.UtilHelpers.newId(); + }; + /** + * Check if an object is of type Array + */ + Util.isArray = function (obj) { + return Object.prototype.toString.call(obj) === "[object Array]"; + }; + /** + * Check if an object is of type Error + */ + Util.isError = function (obj) { + return Object.prototype.toString.call(obj) === "[object Error]"; + }; + /** + * Check if an object is of type Date + */ + Util.isDate = function (obj) { + return Object.prototype.toString.call(obj) === "[object Date]"; + }; + /** + * Convert a date to I.S.O. format in IE8 + */ + Util.toISOStringForIE8 = function (date) { + if (Util.isDate(date)) { + if (Date.prototype.toISOString) { + return date.toISOString(); + } + else { + var pad = function (number) { + var r = String(number); + if (r.length === 1) { + r = "0" + r; + } + return r; + }; + return date.getUTCFullYear() + + "-" + pad(date.getUTCMonth() + 1) + + "-" + pad(date.getUTCDate()) + + "T" + pad(date.getUTCHours()) + + ":" + pad(date.getUTCMinutes()) + + ":" + pad(date.getUTCSeconds()) + + "." + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5) + + "Z"; + } + } + }; + /** + * Gets IE version if we are running on IE, or null otherwise + */ + Util.getIEVersion = function (userAgentStr) { + if (userAgentStr === void 0) { userAgentStr = null; } + var myNav = userAgentStr ? userAgentStr.toLowerCase() : navigator.userAgent.toLowerCase(); + return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : null; + }; + /** + * Convert ms to c# time span format + */ + Util.msToTimeSpan = function (totalms) { + if (isNaN(totalms) || totalms < 0) { + totalms = 0; + } + totalms = Math.round(totalms); + var ms = "" + totalms % 1000; + var sec = "" + Math.floor(totalms / 1000) % 60; + var min = "" + Math.floor(totalms / (1000 * 60)) % 60; + var hour = "" + Math.floor(totalms / (1000 * 60 * 60)) % 24; + var days = Math.floor(totalms / (1000 * 60 * 60 * 24)); + ms = ms.length === 1 ? "00" + ms : ms.length === 2 ? "0" + ms : ms; + sec = sec.length < 2 ? "0" + sec : sec; + min = min.length < 2 ? "0" + min : min; + hour = hour.length < 2 ? "0" + hour : hour; + return (days > 0 ? days + "." : "") + hour + ":" + min + ":" + sec + "." + ms; + }; + /** + * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error + * happens in a script from other domain (cross origin, CORS). + */ + Util.isCrossOriginError = function (message, url, lineNumber, columnNumber, error) { + return (message === "Script error." || message === "Script error") && !error; + }; + /** + * Returns string representation of an object suitable for diagnostics logging. + */ + Util.dump = function (object) { + var objectTypeDump = Object.prototype.toString.call(object); + var propertyValueDump = JSON.stringify(object); + if (objectTypeDump === "[object Error]") { + propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'"; + } + return objectTypeDump + propertyValueDump; + }; + /** + * Returns the name of object if it's an Error. Otherwise, returns empty string. + */ + Util.getExceptionName = function (object) { + var objectTypeDump = Object.prototype.toString.call(object); + if (objectTypeDump === "[object Error]") { + return object.name; + } + return ""; + }; + /** + * Adds an event handler for the specified event + * @param eventName {string} - The name of the event + * @param callback {any} - The callback function that needs to be executed for the given event + * @return {boolean} - true if the handler was successfully added + */ + Util.addEventHandler = function (eventName, callback) { + if (!window || typeof eventName !== 'string' || typeof callback !== 'function') { + return false; + } + // Create verb for the event + var verbEventName = 'on' + eventName; + // check if addEventListener is available + if (window.addEventListener) { + window.addEventListener(eventName, callback, false); + } + else if (window["attachEvent"]) { + window["attachEvent"](verbEventName, callback); + } + else { + return false; + } + return true; + }; + /** + * Tells if a browser supports a Beacon API + */ + Util.IsBeaconApiSupported = function () { + return ('sendBeacon' in navigator && navigator.sendBeacon); + }; + Util.document = typeof document !== "undefined" ? document : {}; + Util._canUseCookies = undefined; + Util._canUseLocalStorage = undefined; + Util._canUseSessionStorage = undefined; + // listing only non-geo specific locations + Util._internalEndpoints = [ + "https://dc.services.visualstudio.com/v2/track", + "https://breeze.aimon.applicationinsights.io/v2/track", + "https://dc-int.services.visualstudio.com/v2/track" + ]; + Util.NotSpecified = "not_specified"; + return Util; + }()); + ApplicationInsights.Util = Util; + var UrlHelper = /** @class */ (function () { + function UrlHelper() { + } + UrlHelper.parseUrl = function (url) { + if (!UrlHelper.htmlAnchorElement) { + UrlHelper.htmlAnchorElement = !!UrlHelper.document.createElement ? UrlHelper.document.createElement('a') : {}; + } + UrlHelper.htmlAnchorElement.href = url; + return UrlHelper.htmlAnchorElement; + }; + UrlHelper.getAbsoluteUrl = function (url) { + var result; + var a = UrlHelper.parseUrl(url); + if (a) { + result = a.href; + } + return result; + }; + UrlHelper.getPathName = function (url) { + var result; + var a = UrlHelper.parseUrl(url); + if (a) { + result = a.pathname; + } + return result; + }; + UrlHelper.getCompleteUrl = function (method, absoluteUrl) { + if (method) { + return method.toUpperCase() + " " + absoluteUrl; + } + else { + return absoluteUrl; + } + }; + UrlHelper.document = typeof document !== "undefined" ? document : {}; + return UrlHelper; + }()); + ApplicationInsights.UrlHelper = UrlHelper; + var CorrelationIdHelper = /** @class */ (function () { + function CorrelationIdHelper() { + } + /** + * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers + */ + CorrelationIdHelper.canIncludeCorrelationHeader = function (config, requestUrl, currentHost) { + if (config && config.disableCorrelationHeaders) { + return false; + } + if (!requestUrl) { + return false; + } + var requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase(); + if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) { + return false; + } + var excludedDomains = config && config.correlationHeaderExcludedDomains; + if (!excludedDomains || excludedDomains.length == 0) { + return true; + } + for (var i = 0; i < excludedDomains.length; i++) { + var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\./g, "\.").replace(/\*/g, ".*")); + if (regex.test(requestHost)) { + return false; + } + } + return true; + }; + /** + * Combines target appId and target role name from response header. + */ + CorrelationIdHelper.getCorrelationContext = function (responseHeader) { + if (responseHeader) { + var correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, ApplicationInsights.RequestHeaders.requestContextTargetKey); + if (correlationId && correlationId !== CorrelationIdHelper.correlationIdPrefix) { + return correlationId; + } + } + }; + /** + * Gets key from correlation response header + */ + CorrelationIdHelper.getCorrelationContextValue = function (responseHeader, key) { + if (responseHeader) { + var keyValues = responseHeader.split(","); + for (var i = 0; i < keyValues.length; ++i) { + var keyValue = keyValues[i].split("="); + if (keyValue.length == 2 && keyValue[0] == key) { + return keyValue[1]; + } + } + } + }; + CorrelationIdHelper.correlationIdPrefix = "cid-v1:"; + return CorrelationIdHelper; + }()); + ApplicationInsights.CorrelationIdHelper = CorrelationIdHelper; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + /** + * Enum is used in aiDataContract to describe how fields are serialized. + * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array + */ + var FieldType; + (function (FieldType) { + FieldType[FieldType["Default"] = 0] = "Default"; + FieldType[FieldType["Required"] = 1] = "Required"; + FieldType[FieldType["Array"] = 2] = "Array"; + FieldType[FieldType["Hidden"] = 4] = "Hidden"; + })(FieldType = ApplicationInsights.FieldType || (ApplicationInsights.FieldType = {})); + ; + var Serializer = /** @class */ (function () { + function Serializer() { + } + /** + * Serializes the current object to a JSON string. + */ + Serializer.serialize = function (input) { + var output = Serializer._serializeObject(input, "root"); + return JSON.stringify(output); + }; + Serializer._serializeObject = function (source, name) { + var circularReferenceCheck = "__aiCircularRefCheck"; + var output = {}; + if (!source) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.CannotSerializeObject, "cannot serialize object because it is null or undefined", { name: name }, true); + return output; + } + if (source[circularReferenceCheck]) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.CircularReferenceDetected, "Circular reference detected while serializing object", { name: name }, true); + return output; + } + if (!source.aiDataContract) { + // special case for measurements/properties/tags + if (name === "measurements") { + output = Serializer._serializeStringMap(source, "number", name); + } + else if (name === "properties") { + output = Serializer._serializeStringMap(source, "string", name); + } + else if (name === "tags") { + output = Serializer._serializeStringMap(source, "string", name); + } + else if (ApplicationInsights.Util.isArray(source)) { + output = Serializer._serializeArray(source, name); + } + else { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.CannotSerializeObjectNonSerializable, "Attempting to serialize an object which does not implement ISerializable", { name: name }, true); + try { + // verify that the object can be stringified + JSON.stringify(source); + output = source; + } + catch (e) { + // if serialization fails return an empty string + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.CannotSerializeObject, (e && typeof e.toString === 'function') ? e.toString() : "Error serializing object", null, true); + } + } + return output; + } + source[circularReferenceCheck] = true; + for (var field in source.aiDataContract) { + var contract = source.aiDataContract[field]; + var isRequired = (typeof contract === "function") ? (contract() & FieldType.Required) : (contract & FieldType.Required); + var isHidden = (typeof contract === "function") ? (contract() & FieldType.Hidden) : (contract & FieldType.Hidden); + var isArray = contract & FieldType.Array; + var isPresent = source[field] !== undefined; + var isObject = typeof source[field] === "object" && source[field] !== null; + if (isRequired && !isPresent && !isArray) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.MissingRequiredFieldSpecification, "Missing required field specification. The field is required but not present on source", { field: field, name: name }); + // If not in debug mode, continue and hope the error is permissible + continue; + } + if (isHidden) { + // Don't serialize hidden fields + continue; + } + var value; + if (isObject) { + if (isArray) { + // special case; resurse on each object in the source array + value = Serializer._serializeArray(source[field], field); + } + else { + // recurse on the source object in this field + value = Serializer._serializeObject(source[field], field); + } + } + else { + // assign the source field to the output even if undefined or required + value = source[field]; + } + // only emit this field if the value is defined + if (value !== undefined) { + output[field] = value; + } + } + delete source[circularReferenceCheck]; + return output; + }; + Serializer._serializeArray = function (sources, name) { + var output = undefined; + if (!!sources) { + if (!ApplicationInsights.Util.isArray(sources)) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.ItemNotInArray, "This field was specified as an array in the contract but the item is not an array.\r\n", { name: name }, true); + } + else { + output = []; + for (var i = 0; i < sources.length; i++) { + var source = sources[i]; + var item = Serializer._serializeObject(source, name + "[" + i + "]"); + output.push(item); + } + } + } + return output; + }; + Serializer._serializeStringMap = function (map, expectedType, name) { + var output = undefined; + if (map) { + output = {}; + for (var field in map) { + var value = map[field]; + if (expectedType === "string") { + if (value === undefined) { + output[field] = "undefined"; + } + else if (value === null) { + output[field] = "null"; + } + else if (!value.toString) { + output[field] = "invalid field: toString() is not defined."; + } + else { + output[field] = value.toString(); + } + } + else if (expectedType === "number") { + if (value === undefined) { + output[field] = "undefined"; + } + else if (value === null) { + output[field] = "null"; + } + else { + var num = parseFloat(value); + if (isNaN(num)) { + output[field] = "NaN"; + } + else { + output[field] = num; + } + } + } + else { + output[field] = "invalid field: " + name + " is of unknown type."; + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, output[field], null, true); + } + } + } + return output; + }; + return Serializer; + }()); + ApplicationInsights.Serializer = Serializer; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + var Common; + (function (Common) { + "use strict"; + var Envelope = /** @class */ (function (_super) { + __extends(Envelope, _super); + /** + * Constructs a new instance of telemetry data. + */ + function Envelope(data, name) { + var _this = _super.call(this) || this; + _this.name = Common.DataSanitizer.sanitizeString(name) || ApplicationInsights.Util.NotSpecified; + _this.data = data; + _this.time = ApplicationInsights.Util.toISOStringForIE8(new Date()); + _this.aiDataContract = { + time: ApplicationInsights.FieldType.Required, + iKey: ApplicationInsights.FieldType.Required, + name: ApplicationInsights.FieldType.Required, + sampleRate: function () { + return (_this.sampleRate == 100) ? ApplicationInsights.FieldType.Hidden : ApplicationInsights.FieldType.Required; + }, + tags: ApplicationInsights.FieldType.Required, + data: ApplicationInsights.FieldType.Required + }; + return _this; + } + return 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; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + var Common; + (function (Common) { + "use strict"; + var Base = /** @class */ (function (_super) { + __extends(Base, _super); + function Base() { + var _this = _super !== null && _super.apply(this, arguments) || this; + /** + * The data contract for serializing this object. + */ + _this.aiDataContract = {}; + return _this; + } + return Base; + }(Microsoft.Telemetry.Base)); + Common.Base = Base; + })(Common = Telemetry.Common || (Telemetry.Common = {})); + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +var AI; +(function (AI) { + "use strict"; + var ContextTagKeys = /** @class */ (function () { + function ContextTagKeys() { + this.applicationVersion = "ai.application.ver"; + this.applicationBuild = "ai.application.build"; + this.applicationTypeId = "ai.application.typeId"; + this.applicationId = "ai.application.applicationId"; + this.applicationLayer = "ai.application.layer"; + this.deviceId = "ai.device.id"; + this.deviceIp = "ai.device.ip"; + this.deviceLanguage = "ai.device.language"; + this.deviceLocale = "ai.device.locale"; + this.deviceModel = "ai.device.model"; + this.deviceFriendlyName = "ai.device.friendlyName"; + this.deviceNetwork = "ai.device.network"; + this.deviceNetworkName = "ai.device.networkName"; + this.deviceOEMName = "ai.device.oemName"; + this.deviceOS = "ai.device.os"; + this.deviceOSVersion = "ai.device.osVersion"; + this.deviceRoleInstance = "ai.device.roleInstance"; + this.deviceRoleName = "ai.device.roleName"; + this.deviceScreenResolution = "ai.device.screenResolution"; + this.deviceType = "ai.device.type"; + this.deviceMachineName = "ai.device.machineName"; + this.deviceVMName = "ai.device.vmName"; + this.deviceBrowser = "ai.device.browser"; + this.deviceBrowserVersion = "ai.device.browserVersion"; + this.locationIp = "ai.location.ip"; + this.locationCountry = "ai.location.country"; + this.locationProvince = "ai.location.province"; + this.locationCity = "ai.location.city"; + this.operationId = "ai.operation.id"; + this.operationName = "ai.operation.name"; + this.operationParentId = "ai.operation.parentId"; + this.operationRootId = "ai.operation.rootId"; + this.operationSyntheticSource = "ai.operation.syntheticSource"; + this.operationCorrelationVector = "ai.operation.correlationVector"; + this.sessionId = "ai.session.id"; + this.sessionIsFirst = "ai.session.isFirst"; + this.sessionIsNew = "ai.session.isNew"; + this.userAccountAcquisitionDate = "ai.user.accountAcquisitionDate"; + this.userAccountId = "ai.user.accountId"; + this.userAgent = "ai.user.userAgent"; + this.userId = "ai.user.id"; + this.userStoreRegion = "ai.user.storeRegion"; + this.userAuthUserId = "ai.user.authUserId"; + this.userAnonymousUserAcquisitionDate = "ai.user.anonUserAcquisitionDate"; + this.userAuthenticatedUserAcquisitionDate = "ai.user.authUserAcquisitionDate"; + this.cloudName = "ai.cloud.name"; + this.cloudRole = "ai.cloud.role"; + this.cloudRoleVer = "ai.cloud.roleVer"; + this.cloudRoleInstance = "ai.cloud.roleInstance"; + this.cloudEnvironment = "ai.cloud.environment"; + this.cloudLocation = "ai.cloud.location"; + this.cloudDeploymentUnit = "ai.cloud.deploymentUnit"; + this.internalSdkVersion = "ai.internal.sdkVersion"; + this.internalAgentVersion = "ai.internal.agentVersion"; + this.internalNodeName = "ai.internal.nodeName"; + } + return ContextTagKeys; + }()); + AI.ContextTagKeys = ContextTagKeys; +})(AI || (AI = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + var Application = /** @class */ (function () { + function Application() { + } + return Application; + }()); + Context.Application = Application; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + var Device = /** @class */ (function () { + /** + * Constructs a new instance of the Device class + */ + function Device() { + // don't attempt to fingerprint browsers + this.id = "browser"; + // Device type is a dimension in our data platform + // Setting it to 'Browser' allows to separate client and server dependencies/exceptions + this.type = "Browser"; + } + return Device; + }()); + Context.Device = Device; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + var Internal = /** @class */ (function () { + /** + * Constructs a new instance of the internal telemetry data class. + */ + function Internal(config) { + this.sdkVersion = (config.sdkExtension() ? config.sdkExtension() + "_" : "") + "javascript:" + ApplicationInsights.Version; + } + return Internal; + }()); + Context.Internal = Internal; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + var Location = /** @class */ (function () { + function Location() { + } + return Location; + }()); + Context.Location = Location; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + var Operation = /** @class */ (function () { + function Operation() { + this.id = ApplicationInsights.Util.newId(); + if (window && window.location && window.location.pathname) { + this.name = window.location.pathname; + } + } + return Operation; + }()); + Context.Operation = Operation; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var HashCodeScoreGenerator = /** @class */ (function () { + function HashCodeScoreGenerator() { + } + HashCodeScoreGenerator.prototype.getHashCodeScore = function (key) { + var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE; + return score * 100; + }; + HashCodeScoreGenerator.prototype.getHashCode = function (input) { + if (input == "") { + return 0; + } + while (input.length < HashCodeScoreGenerator.MIN_INPUT_LENGTH) { + input = input.concat(input); + } + // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function + var hash = 5381; + for (var i = 0; i < input.length; ++i) { + hash = ((hash << 5) + hash) + input.charCodeAt(i); + // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type) + // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is. + hash = hash & hash; + } + return Math.abs(hash); + }; + // We're using 32 bit math, hence max value is (2^31 - 1) + HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647; + // (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution + 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) { + var SamplingScoreGenerator = /** @class */ (function () { + function SamplingScoreGenerator() { + this.hashCodeGeneragor = new ApplicationInsights.HashCodeScoreGenerator(); + } + SamplingScoreGenerator.prototype.getSamplingScore = function (envelope) { + var tagKeys = new AI.ContextTagKeys(); + var score = 0; + if (envelope.tags[tagKeys.userId]) { + score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.userId]); + } + else if (envelope.tags[tagKeys.operationId]) { + score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.operationId]); + } + else { + score = Math.random(); + } + return score; + }; + return SamplingScoreGenerator; + }()); + ApplicationInsights.SamplingScoreGenerator = SamplingScoreGenerator; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + var Sample = /** @class */ (function () { + function Sample(sampleRate) { + // We're using 32 bit math, hence max value is (2^31 - 1) + this.INT_MAX_VALUE = 2147483647; + if (sampleRate > 100 || sampleRate < 0) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.SampleRateOutOfRange, "Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.", { samplingRate: sampleRate }, true); + this.sampleRate = 100; + } + this.sampleRate = sampleRate; + this.samplingScoreGenerator = new ApplicationInsights.SamplingScoreGenerator(); + } + /** + * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped). + */ + Sample.prototype.isSampledIn = function (envelope) { + if (this.sampleRate == 100) + return true; + var score = this.samplingScoreGenerator.getSamplingScore(envelope); + return score < this.sampleRate; + }; + return Sample; + }()); + Context.Sample = Sample; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + var Session = /** @class */ (function () { + function Session() { + } + return Session; + }()); + Context.Session = Session; + var _SessionManager = /** @class */ (function () { + function _SessionManager(config) { + if (!config) { + config = {}; + } + if (!(typeof config.sessionExpirationMs === "function")) { + config.sessionExpirationMs = function () { return _SessionManager.acquisitionSpan; }; + } + if (!(typeof config.sessionRenewalMs === "function")) { + config.sessionRenewalMs = function () { return _SessionManager.renewalSpan; }; + } + this.config = config; + this.automaticSession = new Session(); + } + _SessionManager.prototype.update = function () { + if (!this.automaticSession.id) { + this.initializeAutomaticSession(); + } + var now = ApplicationInsights.dateTime.Now(); + var acquisitionExpired = now - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs(); + var renewalExpired = now - this.automaticSession.renewalDate > this.config.sessionRenewalMs(); + // renew if acquisitionSpan or renewalSpan has ellapsed + if (acquisitionExpired || renewalExpired) { + // update automaticSession so session state has correct id + this.automaticSession.isFirst = undefined; + this.renew(); + } + else { + // do not update the cookie more often than cookieUpdateInterval + if (!this.cookieUpdatedTimestamp || now - this.cookieUpdatedTimestamp > _SessionManager.cookieUpdateInterval) { + this.automaticSession.renewalDate = now; + this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate); + } + } + }; + /** + * Record the current state of the automatic session and store it in our cookie string format + * into the browser's local storage. This is used to restore the session data when the cookie + * expires. + */ + _SessionManager.prototype.backup = function () { + this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate); + }; + /** + * Use ai_session cookie data or local storage data (when the cookie is unavailable) to + * initialize the automatic session. + */ + _SessionManager.prototype.initializeAutomaticSession = function () { + var cookie = ApplicationInsights.Util.getCookie('ai_session'); + if (cookie && typeof cookie.split === "function") { + this.initializeAutomaticSessionWithData(cookie); + } + else { + // There's no cookie, but we might have session data in local storage + // This can happen if the session expired or the user actively deleted the cookie + // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively. + // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed. + var storage = ApplicationInsights.Util.getStorage('ai_session'); + if (storage) { + this.initializeAutomaticSessionWithData(storage); + } + } + if (!this.automaticSession.id) { + this.automaticSession.isFirst = true; + this.renew(); + } + }; + /** + * Extract id, aquisitionDate, and renewalDate from an ai_session payload string and + * use this data to initialize automaticSession. + * + * @param {string} sessionData - The string stored in an ai_session cookie or local storage backup + */ + _SessionManager.prototype.initializeAutomaticSessionWithData = function (sessionData) { + var params = sessionData.split("|"); + if (params.length > 0) { + this.automaticSession.id = params[0]; + } + try { + if (params.length > 1) { + var acq = +params[1]; + this.automaticSession.acquisitionDate = +new Date(acq); + this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0; + } + if (params.length > 2) { + var renewal = +params[2]; + this.automaticSession.renewalDate = +new Date(renewal); + this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0; + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.ErrorParsingAISessionCookie, "Error parsing ai_session cookie, session will be reset: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + if (this.automaticSession.renewalDate == 0) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.SessionRenewalDateIsZero, "AI session renewal date is 0, session will be reset."); + } + }; + _SessionManager.prototype.renew = function () { + var now = ApplicationInsights.dateTime.Now(); + this.automaticSession.id = ApplicationInsights.Util.newId(); + this.automaticSession.acquisitionDate = now; + this.automaticSession.renewalDate = now; + this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate); + // If this browser does not support local storage, fire an internal log to keep track of it at this point + if (!ApplicationInsights.Util.canUseLocalStorage()) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.BrowserDoesNotSupportLocalStorage, "Browser does not support local storage. Session durations will be inaccurate."); + } + }; + _SessionManager.prototype.setCookie = function (guid, acq, renewal) { + // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner + // Expiring the cookie will cause the session to expire even if the user isn't on the page + var acquisitionExpiry = acq + this.config.sessionExpirationMs(); + var renewalExpiry = renewal + this.config.sessionRenewalMs(); + var cookieExpiry = new Date(); + var cookie = [guid, acq, renewal]; + if (acquisitionExpiry < renewalExpiry) { + cookieExpiry.setTime(acquisitionExpiry); + } + else { + cookieExpiry.setTime(renewalExpiry); + } + var cookieDomnain = this.config.cookieDomain ? this.config.cookieDomain() : null; + ApplicationInsights.Util.setCookie('ai_session', cookie.join('|') + ';expires=' + cookieExpiry.toUTCString(), cookieDomnain); + this.cookieUpdatedTimestamp = ApplicationInsights.dateTime.Now(); + }; + _SessionManager.prototype.setStorage = function (guid, acq, renewal) { + // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires + // Browsers that don't support local storage won't be able to end sessions cleanly from the client + // The server will notice this and end the sessions itself, with loss of accurate session duration + ApplicationInsights.Util.setStorage('ai_session', [guid, acq, renewal].join('|')); + }; + _SessionManager.acquisitionSpan = 86400000; // 24 hours in ms + _SessionManager.renewalSpan = 1800000; // 30 minutes in ms + _SessionManager.cookieUpdateInterval = 60000; // 1 minute in ms + return _SessionManager; + }()); + Context._SessionManager = _SessionManager; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Context; + (function (Context) { + "use strict"; + var User = /** @class */ (function () { + function User(config) { + //get userId or create new one if none exists + var cookie = ApplicationInsights.Util.getCookie(User.userCookieName); + if (cookie) { + var params = cookie.split(User.cookieSeparator); + if (params.length > 0) { + this.id = params[0]; + } + } + this.config = config; + if (!this.id) { + this.id = ApplicationInsights.Util.newId(); + var date = new Date(); + var acqStr = ApplicationInsights.Util.toISOStringForIE8(date); + this.accountAcquisitionDate = acqStr; + // without expiration, cookies expire at the end of the session + // set it to 365 days from now + // 365 * 24 * 60 * 60 * 1000 = 31536000000 + date.setTime(date.getTime() + 31536000000); + var newCookie = [this.id, acqStr]; + var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : undefined; + ApplicationInsights.Util.setCookie(User.userCookieName, newCookie.join(User.cookieSeparator) + ';expires=' + date.toUTCString(), cookieDomain); + // If we have an ai_session in local storage this means the user actively removed our cookies. + // We should respect their wishes and clear ourselves from local storage + ApplicationInsights.Util.removeStorage('ai_session'); + } + // We still take the account id from the ctor param for backward compatibility. + // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it. + this.accountId = config.accountId ? config.accountId() : undefined; + // Get the auth user id and account id from the cookie if exists + // Cookie is in the pattern: | + var authCookie = ApplicationInsights.Util.getCookie(User.authUserCookieName); + if (authCookie) { + authCookie = decodeURI(authCookie); + var authCookieString = authCookie.split(User.cookieSeparator); + if (authCookieString[0]) { + this.authenticatedId = authCookieString[0]; + } + if (authCookieString.length > 1 && authCookieString[1]) { + this.accountId = authCookieString[1]; + } + } + } + /** + * Sets the authenticated user id and the account id in this session. + * + * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service. + * @param accountId {string} - An optional string to represent the account associated with the authenticated user. + */ + User.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) { + if (storeInCookie === void 0) { storeInCookie = false; } + // Validate inputs to ensure no cookie control characters. + var isInvalidInput = !this.validateUserInput(authenticatedUserId) || (accountId && !this.validateUserInput(accountId)); + if (isInvalidInput) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.SetAuthContextFailedAccountName, "Setting auth user context failed. " + + "User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.", true); + return; + } + // Create cookie string. + this.authenticatedId = authenticatedUserId; + var authCookie = this.authenticatedId; + if (accountId) { + this.accountId = accountId; + authCookie = [this.authenticatedId, this.accountId].join(User.cookieSeparator); + } + if (storeInCookie) { + // Set the cookie. No expiration date because this is a session cookie (expires when browser closed). + // Encoding the cookie to handle unexpected unicode characters. + ApplicationInsights.Util.setCookie(User.authUserCookieName, encodeURI(authCookie), this.config.cookieDomain()); + } + }; + /** + * Clears the authenticated user id and the account id from the user context. + * @returns {} + */ + User.prototype.clearAuthenticatedUserContext = function () { + this.authenticatedId = null; + this.accountId = null; + ApplicationInsights.Util.deleteCookie(User.authUserCookieName); + }; + User.prototype.validateUserInput = function (id) { + // Validate: + // 1. Id is a non-empty string. + // 2. It does not contain special characters for cookies. + if (typeof id !== 'string' || + !id || + id.match(/,|;|=| |\|/)) { + return false; + } + return true; + }; + User.cookieSeparator = '|'; + User.userCookieName = 'ai_user'; + User.authUserCookieName = 'ai_authUser'; + return User; + }()); + Context.User = User; + })(Context = ApplicationInsights.Context || (ApplicationInsights.Context = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + var extensions = /** @class */ (function () { + function extensions() { + } + extensions.IsNullOrUndefined = function (obj) { + return typeof (obj) === "undefined" || obj === null; + }; + return extensions; + }()); + ApplicationInsights.extensions = extensions; + var stringUtils = /** @class */ (function () { + function stringUtils() { + } + stringUtils.GetLength = function (strObject) { + var res = 0; + if (!extensions.IsNullOrUndefined(strObject)) { + var stringified = ""; + try { + stringified = strObject.toString(); + } + catch (ex) { + // some troubles with complex object + } + res = stringified.length; + res = isNaN(res) ? 0 : res; + } + return res; + }; + return stringUtils; + }()); + ApplicationInsights.stringUtils = stringUtils; + var dateTime = /** @class */ (function () { + function dateTime() { + } + ///Return the number of milliseconds since 1970/01/01 in local timezon + dateTime.Now = (window.performance && window.performance.now && window.performance.timing) ? + function () { + return window.performance.now() + window.performance.timing.navigationStart; + } + : + function () { + return new Date().getTime(); + }; + ///Gets duration between two timestamps + dateTime.GetDuration = function (start, end) { + var result = null; + if (start !== 0 && end !== 0 && !extensions.IsNullOrUndefined(start) && !extensions.IsNullOrUndefined(end)) { + result = end - start; + } + return result; + }; + return dateTime; + }()); + ApplicationInsights.dateTime = dateTime; + var EventHelper = /** @class */ (function () { + function EventHelper() { + } + ///Binds the specified function to an event, so that the function gets called whenever the event fires on the object + ///Object to which + ///String that specifies any of the standard DHTML Events without "on" prefix + ///Pointer that specifies the function to call when event fires + ///True if the function was bound successfully to the event, otherwise false + EventHelper.AttachEvent = function (obj, eventNameWithoutOn, handlerRef) { + var result = false; + if (!extensions.IsNullOrUndefined(obj)) { + if (!extensions.IsNullOrUndefined(obj.attachEvent)) { + // IE before version 9 + obj.attachEvent("on" + eventNameWithoutOn, handlerRef); + result = true; + } + else { + if (!extensions.IsNullOrUndefined(obj.addEventListener)) { + // all browsers except IE before version 9 + obj.addEventListener(eventNameWithoutOn, handlerRef, false); + result = true; + } + } + } + return result; + }; + EventHelper.DetachEvent = function (obj, eventNameWithoutOn, handlerRef) { + if (!extensions.IsNullOrUndefined(obj)) { + if (!extensions.IsNullOrUndefined(obj.detachEvent)) { + obj.detachEvent("on" + eventNameWithoutOn, handlerRef); + } + else { + if (!extensions.IsNullOrUndefined(obj.removeEventListener)) { + obj.removeEventListener(eventNameWithoutOn, handlerRef, false); + } + } + } + }; + return EventHelper; + }()); + ApplicationInsights.EventHelper = EventHelper; + var AjaxHelper = /** @class */ (function () { + function AjaxHelper() { + } + AjaxHelper.ParseDependencyPath = function (absoluteUrl, method, pathName) { + var target, name; + if (absoluteUrl && absoluteUrl.length > 0) { + var parsedUrl = ApplicationInsights.UrlHelper.parseUrl(absoluteUrl); + target = parsedUrl.host; + if (parsedUrl.pathname != null) { + var pathName = (parsedUrl.pathname.length === 0) ? "/" : parsedUrl.pathname; + if (pathName.charAt(0) !== '/') { + pathName = "/" + pathName; + } + name = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeString(method ? method + " " + pathName : pathName); + } + else { + name = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeString(absoluteUrl); + } + } + else { + target = pathName; + name = pathName; + } + return { + target: target, + name: name + }; + }; + return AjaxHelper; + }()); + ApplicationInsights.AjaxHelper = AjaxHelper; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + var XHRMonitoringState = /** @class */ (function () { + function XHRMonitoringState() { + this.openDone = false; + this.setRequestHeaderDone = false; + this.sendDone = false; + this.abortDone = false; + //True, if onreadyStateChangeCallback function attached to xhr, otherwise false + this.onreadystatechangeCallbackAttached = false; + } + return XHRMonitoringState; + }()); + ApplicationInsights.XHRMonitoringState = XHRMonitoringState; + var ajaxRecord = /** @class */ (function () { + function ajaxRecord(id) { + this.completed = false; + 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; + ///Returns the HTTP status code. + this.status = null; + //The timestamp when open method was invoked + this.requestSentTime = null; + //The timestamps when first byte was received + this.responseStartedTime = null; + //The timestamp when last byte was received + this.responseFinishedTime = null; + //The timestamp when onreadystatechange callback in readyState 4 finished + this.callbackFinishedTime = null; + //The timestamp at which ajax was ended + this.endTime = null; + //The original xhr onreadystatechange event + this.originalOnreadystatechage = null; + this.xhrMonitoringState = new XHRMonitoringState(); + //Determines whether or not JavaScript exception occured in xhr.onreadystatechange code. 1 if occured, otherwise 0. + this.clientFailure = 0; + this.CalculateMetrics = function () { + var self = this; + // round to 3 decimal points + self.ajaxTotalDuration = Math.round(ApplicationInsights.dateTime.GetDuration(self.requestSentTime, self.responseFinishedTime) * 1000) / 1000; + }; + this.id = id; + } + ajaxRecord.prototype.getAbsoluteUrl = function () { + return this.requestUrl ? ApplicationInsights.UrlHelper.getAbsoluteUrl(this.requestUrl) : null; + }; + ajaxRecord.prototype.getPathName = function () { + return this.requestUrl ? ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeUrl(ApplicationInsights.UrlHelper.getCompleteUrl(this.method, this.requestUrl)) : null; + }; + return ajaxRecord; + }()); + ApplicationInsights.ajaxRecord = ajaxRecord; + ; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +; +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + var RequestHeaders = /** @class */ (function () { + function RequestHeaders() { + } + /** + * Request-Context header + */ + RequestHeaders.requestContextHeader = "Request-Context"; + /** + * Target instrumentation header that is added to the response and retrieved by the + * calling application when processing incoming responses. + */ + RequestHeaders.requestContextTargetKey = "appId"; + /** + * Request-Context appId format + */ + RequestHeaders.requestContextAppIdFormat = "appId=cid-v1:"; + /** + * Request-Id header + */ + RequestHeaders.requestIdHeader = "Request-Id"; + /** + * Sdk-Context header + * If this header passed with appId in content then appId will be returned back by the backend. + */ + RequestHeaders.sdkContextHeader = "Sdk-Context"; + /** + * String to pass in header for requesting appId back from the backend. + */ + RequestHeaders.sdkContextHeaderAppIdRequest = "appId"; + RequestHeaders.requestContextHeaderLowerCase = "request-context"; + return RequestHeaders; + }()); + ApplicationInsights.RequestHeaders = RequestHeaders; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +var Microsoft; +(function (Microsoft) { + var Telemetry; + (function (Telemetry) { + "use strict"; + /** + * The abstract common base of all domains. + */ + var Domain = /** @class */ (function () { + function Domain() { + } + return Domain; + }()); + Telemetry.Domain = Domain; + })(Telemetry = Microsoft.Telemetry || (Microsoft.Telemetry = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +/// +var AI; +(function (AI) { + "use strict"; + /** + * Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name. + */ + var EventData = /** @class */ (function (_super) { + __extends(EventData, _super); + function EventData() { + var _this = _super.call(this) || this; + _this.ver = 2; + _this.properties = {}; + _this.measurements = {}; + return _this; + } + return EventData; + }(Microsoft.Telemetry.Domain)); + AI.EventData = EventData; +})(AI || (AI = {})); +// THIS FILE WAS AUTOGENERATED +/// +var AI; +(function (AI) { + "use strict"; + /** + * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView. + */ + var PageViewData = /** @class */ (function (_super) { + __extends(PageViewData, _super); + function PageViewData() { + var _this = _super.call(this) || this; + _this.ver = 2; + _this.properties = {}; + _this.measurements = {}; + return _this; + } + return PageViewData; + }(AI.EventData)); + AI.PageViewData = PageViewData; +})(AI || (AI = {})); +// THIS FILE WAS AUTOGENERATED +/// +var AI; +(function (AI) { + "use strict"; + /** + * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint. + */ + var RemoteDependencyData = /** @class */ (function (_super) { + __extends(RemoteDependencyData, _super); + function RemoteDependencyData() { + var _this = _super.call(this) || this; + _this.ver = 2; + _this.success = true; + _this.properties = {}; + _this.measurements = {}; + return _this; + } + return RemoteDependencyData; + }(Microsoft.Telemetry.Domain)); + AI.RemoteDependencyData = RemoteDependencyData; +})(AI || (AI = {})); +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + var Common; + (function (Common) { + "use strict"; + var DataSanitizer = /** @class */ (function () { + function DataSanitizer() { + } + DataSanitizer.sanitizeKeyAndAddUniqueness = function (key, map) { + var origLength = key.length; + var field = DataSanitizer.sanitizeKey(key); + // validation truncated the length. We need to add uniqueness + if (field.length !== origLength) { + var i = 0; + var uniqueField = field; + while (map[uniqueField] !== undefined) { + i++; + uniqueField = field.substring(0, DataSanitizer.MAX_NAME_LENGTH - 3) + DataSanitizer.padNumber(i); + } + field = uniqueField; + } + return field; + }; + DataSanitizer.sanitizeKey = function (name) { + if (name) { + // Remove any leading or trailing whitepace + name = ApplicationInsights.Util.trim(name.toString()); + // truncate the string to 150 chars + if (name.length > DataSanitizer.MAX_NAME_LENGTH) { + name = name.substring(0, DataSanitizer.MAX_NAME_LENGTH); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + DataSanitizer.MAX_NAME_LENGTH + " characters.", { name: name }, true); + } + } + return name; + }; + DataSanitizer.sanitizeString = function (value, maxLength) { + if (maxLength === void 0) { maxLength = DataSanitizer.MAX_STRING_LENGTH; } + if (value) { + maxLength = maxLength ? maxLength : DataSanitizer.MAX_STRING_LENGTH; // in case default parameters dont work + value = ApplicationInsights.Util.trim(value); + if (value.toString().length > maxLength) { + value = value.toString().substring(0, maxLength); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true); + } + } + return value; + }; + DataSanitizer.sanitizeUrl = function (url) { + return DataSanitizer.sanitizeInput(url, DataSanitizer.MAX_URL_LENGTH, ApplicationInsights._InternalMessageId.UrlTooLong); + }; + DataSanitizer.sanitizeMessage = function (message) { + if (message) { + if (message.length > DataSanitizer.MAX_MESSAGE_LENGTH) { + message = message.substring(0, DataSanitizer.MAX_MESSAGE_LENGTH); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + DataSanitizer.MAX_MESSAGE_LENGTH + " characters.", { message: message }, true); + } + } + return message; + }; + DataSanitizer.sanitizeException = function (exception) { + if (exception) { + if (exception.length > DataSanitizer.MAX_EXCEPTION_LENGTH) { + exception = exception.substring(0, DataSanitizer.MAX_EXCEPTION_LENGTH); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + DataSanitizer.MAX_EXCEPTION_LENGTH + " characters.", { exception: exception }, true); + } + } + return exception; + }; + DataSanitizer.sanitizeProperties = function (properties) { + if (properties) { + var tempProps = {}; + for (var prop in properties) { + var value = DataSanitizer.sanitizeString(properties[prop], DataSanitizer.MAX_PROPERTY_LENGTH); + prop = DataSanitizer.sanitizeKeyAndAddUniqueness(prop, tempProps); + tempProps[prop] = value; + } + properties = tempProps; + } + return properties; + }; + DataSanitizer.sanitizeMeasurements = function (measurements) { + if (measurements) { + var tempMeasurements = {}; + for (var measure in measurements) { + var value = measurements[measure]; + measure = DataSanitizer.sanitizeKeyAndAddUniqueness(measure, tempMeasurements); + tempMeasurements[measure] = value; + } + measurements = tempMeasurements; + } + return measurements; + }; + DataSanitizer.sanitizeId = function (id) { + return id ? DataSanitizer.sanitizeInput(id, DataSanitizer.MAX_ID_LENGTH, ApplicationInsights._InternalMessageId.IdTooLong).toString() : id; + }; + DataSanitizer.sanitizeInput = function (input, maxLength, _msgId) { + if (input) { + input = ApplicationInsights.Util.trim(input); + if (input.length > maxLength) { + input = input.substring(0, maxLength); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true); + } + } + return input; + }; + DataSanitizer.padNumber = function (num) { + var s = "00" + num; + return s.substr(s.length - 3); + }; + /** + * Max length allowed for custom names. + */ + DataSanitizer.MAX_NAME_LENGTH = 150; + /** + * Max length allowed for Id field in page views. + */ + DataSanitizer.MAX_ID_LENGTH = 128; + /** + * Max length allowed for custom values. + */ + DataSanitizer.MAX_PROPERTY_LENGTH = 8192; + /** + * Max length allowed for names + */ + DataSanitizer.MAX_STRING_LENGTH = 1024; + /** + * Max length allowed for url. + */ + DataSanitizer.MAX_URL_LENGTH = 2048; + /** + * Max length allowed for messages. + */ + DataSanitizer.MAX_MESSAGE_LENGTH = 32768; + /** + * Max length allowed for exceptions. + */ + 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; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + var RemoteDependencyData = /** @class */ (function (_super) { + __extends(RemoteDependencyData, _super); + /** + * Constructs a new instance of the RemoteDependencyData object + */ + function RemoteDependencyData(id, absoluteUrl, commandName, value, success, resultCode, method, properties, measurements) { + var _this = _super.call(this) || this; + _this.aiDataContract = { + id: ApplicationInsights.FieldType.Required, + ver: ApplicationInsights.FieldType.Required, + name: ApplicationInsights.FieldType.Default, + resultCode: ApplicationInsights.FieldType.Default, + duration: ApplicationInsights.FieldType.Default, + success: ApplicationInsights.FieldType.Default, + data: ApplicationInsights.FieldType.Default, + target: ApplicationInsights.FieldType.Default, + type: ApplicationInsights.FieldType.Default, + properties: ApplicationInsights.FieldType.Default, + measurements: ApplicationInsights.FieldType.Default, + kind: ApplicationInsights.FieldType.Default, + value: ApplicationInsights.FieldType.Default, + count: ApplicationInsights.FieldType.Default, + min: ApplicationInsights.FieldType.Default, + max: ApplicationInsights.FieldType.Default, + stdDev: ApplicationInsights.FieldType.Default, + dependencyKind: ApplicationInsights.FieldType.Default, + dependencySource: ApplicationInsights.FieldType.Default, + commandName: ApplicationInsights.FieldType.Default, + dependencyTypeName: ApplicationInsights.FieldType.Default, + }; + _this.id = id; + _this.duration = ApplicationInsights.Util.msToTimeSpan(value); + _this.success = success; + _this.resultCode = resultCode + ""; + _this.type = "Ajax"; + _this.data = Telemetry.Common.DataSanitizer.sanitizeUrl(commandName); + var dependencyFields = ApplicationInsights.AjaxHelper.ParseDependencyPath(absoluteUrl, method, commandName); + _this.target = dependencyFields.target; + _this.name = dependencyFields.name; + _this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties); + _this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements); + return _this; + } + RemoteDependencyData.envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency"; + RemoteDependencyData.dataType = "RemoteDependencyData"; + return RemoteDependencyData; + }(AI.RemoteDependencyData)); + Telemetry.RemoteDependencyData = RemoteDependencyData; + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + var AjaxMonitor = /** @class */ (function () { + function AjaxMonitor(appInsights) { + this.currentWindowHost = window.location.host && window.location.host.toLowerCase(); + this.appInsights = appInsights; + this.initialized = false; + this.Init(); + } + ///The main function that needs to be called in order to start Ajax Monitoring + AjaxMonitor.prototype.Init = function () { + if (this.supportsMonitoring()) { + this.instrumentOpen(); + this.instrumentSend(); + this.instrumentAbort(); + this.initialized = true; + } + }; + ///Verifies that particalar instance of XMLHttpRequest needs to be monitored + ///Optional parameter. True if ajaxData must be excluded from verification + ///True if instance needs to be monitored, otherwise false + AjaxMonitor.prototype.isMonitoredInstance = function (xhr, excludeAjaxDataValidation) { + // checking to see that all interested functions on xhr were instrumented + return this.initialized + // checking on ajaxData to see that it was not removed in user code + && (excludeAjaxDataValidation === true || !ApplicationInsights.extensions.IsNullOrUndefined(xhr.ajaxData)) + // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector + && xhr[AjaxMonitor.DisabledPropertyName] !== true; + }; + ///Determines whether ajax monitoring can be enabled on this document + ///True if Ajax monitoring is supported on this page, otherwise false + AjaxMonitor.prototype.supportsMonitoring = function () { + var result = true; + if (ApplicationInsights.extensions.IsNullOrUndefined(XMLHttpRequest) || + ApplicationInsights.extensions.IsNullOrUndefined(XMLHttpRequest.prototype) || + ApplicationInsights.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open) || + ApplicationInsights.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send) || + ApplicationInsights.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort)) { + result = false; + } + // disable in IE8 or older (https://www.w3schools.com/jsref/jsref_trim_string.asp) + try { + " a ".trim(); + } + catch (ex) { + result = false; + } + return result; + }; + AjaxMonitor.prototype.instrumentOpen = function () { + var originalOpen = XMLHttpRequest.prototype.open; + var ajaxMonitorInstance = this; + XMLHttpRequest.prototype.open = function (method, url, async) { + try { + if (ajaxMonitorInstance.isMonitoredInstance(this, true) && + (!this.ajaxData || + !this.ajaxData.xhrMonitoringState.openDone)) { + ajaxMonitorInstance.openHandler(this, method, url, async); + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.FailedMonitorAjaxOpen, "Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.", { + ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this), + exception: Microsoft.ApplicationInsights.Util.dump(e) + }); + } + return originalOpen.apply(this, arguments); + }; + }; + AjaxMonitor.prototype.openHandler = function (xhr, method, url, async) { + // this format corresponds with activity logic on server-side and is required for the correct correlation + var id = "|" + this.appInsights.context.operation.id + "." + ApplicationInsights.Util.newId(); + var ajaxData = new ApplicationInsights.ajaxRecord(id); + ajaxData.method = method; + ajaxData.requestUrl = url; + ajaxData.xhrMonitoringState.openDone = true; + xhr.ajaxData = ajaxData; + this.attachToOnReadyStateChange(xhr); + }; + AjaxMonitor.getFailedAjaxDiagnosticsMessage = function (xhr) { + var result = ""; + try { + if (!ApplicationInsights.extensions.IsNullOrUndefined(xhr) && + !ApplicationInsights.extensions.IsNullOrUndefined(xhr.ajaxData) && + !ApplicationInsights.extensions.IsNullOrUndefined(xhr.ajaxData.requestUrl)) { + result += "(url: '" + xhr.ajaxData.requestUrl + "')"; + } + } + catch (e) { } + return result; + }; + AjaxMonitor.prototype.instrumentSend = function () { + var originalSend = XMLHttpRequest.prototype.send; + var ajaxMonitorInstance = this; + XMLHttpRequest.prototype.send = function (content) { + try { + if (ajaxMonitorInstance.isMonitoredInstance(this) && !this.ajaxData.xhrMonitoringState.sendDone) { + ajaxMonitorInstance.sendHandler(this, content); + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.FailedMonitorAjaxSend, "Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.", { + ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this), + exception: Microsoft.ApplicationInsights.Util.dump(e) + }); + } + return originalSend.apply(this, arguments); + }; + }; + AjaxMonitor.prototype.sendHandler = function (xhr, content) { + xhr.ajaxData.requestSentTime = ApplicationInsights.dateTime.Now(); + if (ApplicationInsights.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, xhr.ajaxData.getAbsoluteUrl(), this.currentWindowHost)) { + xhr.setRequestHeader(ApplicationInsights.RequestHeaders.requestIdHeader, xhr.ajaxData.id); + if (this.appInsights.context) { + var appId = this.appInsights.context.appId(); + if (appId) { + xhr.setRequestHeader(ApplicationInsights.RequestHeaders.requestContextHeader, ApplicationInsights.RequestHeaders.requestContextAppIdFormat + appId); + } + } + } + xhr.ajaxData.xhrMonitoringState.sendDone = true; + }; + AjaxMonitor.prototype.instrumentAbort = function () { + var originalAbort = XMLHttpRequest.prototype.abort; + var ajaxMonitorInstance = this; + XMLHttpRequest.prototype.abort = function () { + try { + if (ajaxMonitorInstance.isMonitoredInstance(this) && !this.ajaxData.xhrMonitoringState.abortDone) { + this.ajaxData.aborted = 1; + this.ajaxData.xhrMonitoringState.abortDone = true; + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.FailedMonitorAjaxAbort, "Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.", { + ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this), + exception: Microsoft.ApplicationInsights.Util.dump(e) + }); + } + return originalAbort.apply(this, arguments); + }; + }; + AjaxMonitor.prototype.attachToOnReadyStateChange = function (xhr) { + var ajaxMonitorInstance = this; + xhr.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached = ApplicationInsights.EventHelper.AttachEvent(xhr, "readystatechange", function () { + try { + if (ajaxMonitorInstance.isMonitoredInstance(xhr)) { + if (xhr.readyState === 4) { + ajaxMonitorInstance.onAjaxComplete(xhr); + } + } + } + catch (e) { + var exceptionText = Microsoft.ApplicationInsights.Util.dump(e); + // ignore messages with c00c023f, as this a known IE9 XHR abort issue + if (!exceptionText || exceptionText.toLowerCase().indexOf("c00c023f") == -1) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.FailedMonitorAjaxRSC, "Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.", { + ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr), + exception: Microsoft.ApplicationInsights.Util.dump(e) + }); + } + } + }); + }; + AjaxMonitor.prototype.onAjaxComplete = function (xhr) { + xhr.ajaxData.responseFinishedTime = ApplicationInsights.dateTime.Now(); + xhr.ajaxData.status = xhr.status; + xhr.ajaxData.CalculateMetrics(); + if (xhr.ajaxData.ajaxTotalDuration < 0) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedMonitorAjaxDur, "Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.", { + ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr), + requestSentTime: xhr.ajaxData.requestSentTime, + responseFinishedTime: xhr.ajaxData.responseFinishedTime + }); + } + else { + var dependency = new ApplicationInsights.Telemetry.RemoteDependencyData(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); + // enrich dependency target with correlation context from the server + var correlationContext = this.getCorrelationContext(xhr); + if (correlationContext) { + dependency.target = dependency.target + " | " + correlationContext; + } + this.appInsights.trackDependencyData(dependency); + xhr.ajaxData = null; + } + }; + AjaxMonitor.prototype.getCorrelationContext = function (xhr) { + try { + var responseHeadersString = xhr.getAllResponseHeaders(); + if (responseHeadersString !== null) { + var index = responseHeadersString.toLowerCase().indexOf(ApplicationInsights.RequestHeaders.requestContextHeaderLowerCase); + if (index !== -1) { + var responseHeader = xhr.getResponseHeader(ApplicationInsights.RequestHeaders.requestContextHeader); + return ApplicationInsights.CorrelationIdHelper.getCorrelationContext(responseHeader); + } + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, "Failed to get Request-Context correlation header as it may be not included in the response or not accessible.", { + ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr), + exception: Microsoft.ApplicationInsights.Util.dump(e) + }); + } + }; + AjaxMonitor.instrumentedByAppInsightsName = "InstrumentedByAppInsights"; + ///Function that returns property name which will identify that monitoring for given instance of XmlHttpRequest is disabled + AjaxMonitor.DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation"; + return AjaxMonitor; + }()); + ApplicationInsights.AjaxMonitor = AjaxMonitor; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + /* + * An array based send buffer. + */ + var ArraySendBuffer = /** @class */ (function () { + function ArraySendBuffer(config) { + this._config = config; + this._buffer = []; + } + ArraySendBuffer.prototype.enqueue = function (payload) { + this._buffer.push(payload); + }; + ArraySendBuffer.prototype.count = function () { + return this._buffer.length; + }; + ArraySendBuffer.prototype.clear = function () { + this._buffer.length = 0; + }; + ArraySendBuffer.prototype.getItems = function () { + return this._buffer.slice(0); + }; + ArraySendBuffer.prototype.batchPayloads = function (payload) { + if (payload && payload.length > 0) { + var batch = this._config.emitLineDelimitedJson() ? + payload.join("\n") : + "[" + payload.join(",") + "]"; + return batch; + } + return null; + }; + ArraySendBuffer.prototype.markAsSent = function (payload) { + this.clear(); + }; + ArraySendBuffer.prototype.clearSent = function (payload) { + // not supported + }; + return ArraySendBuffer; + }()); + ApplicationInsights.ArraySendBuffer = ArraySendBuffer; + /* + * Session storege buffer holds a copy of all unsent items in the browser session storage. + */ + var SessionStorageSendBuffer = /** @class */ (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); + this._buffer = bufferItems.concat(notDeliveredItems); + // If the buffer has too many items, drop items from the end. + if (this._buffer.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) { + this._buffer.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE; + } + // update DataLossAnalyzer with the number of recovered items + // Uncomment if you want to use DataLossanalyzer + // DataLossAnalyzer.itemsRestoredFromSessionBuffer = this._buffer.length; + this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []); + this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer); + } + SessionStorageSendBuffer.prototype.enqueue = function (payload) { + if (this._buffer.length >= SessionStorageSendBuffer.MAX_BUFFER_SIZE) { + // sent internal log only once per page view + if (!this._bufferFullMessageSent) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.SessionStorageBufferFull, "Maximum buffer size reached: " + this._buffer.length, true); + this._bufferFullMessageSent = true; + } + return; + } + this._buffer.push(payload); + this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer); + }; + SessionStorageSendBuffer.prototype.count = function () { + return this._buffer.length; + }; + SessionStorageSendBuffer.prototype.clear = function () { + 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); + }; + SessionStorageSendBuffer.prototype.batchPayloads = function (payload) { + if (payload && payload.length > 0) { + var batch = this._config.emitLineDelimitedJson() ? + payload.join("\n") : + "[" + payload.join(",") + "]"; + return batch; + } + return null; + }; + SessionStorageSendBuffer.prototype.markAsSent = function (payload) { + this._buffer = this.removePayloadsFromBuffer(payload, this._buffer); + this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer); + var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY); + if (sentElements instanceof Array && payload instanceof Array) { + sentElements = sentElements.concat(payload); + if (sentElements.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) { + // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements + // until we receive a response from the backend and the buffer has free space again (see clearSent method) + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.SessionStorageBufferFull, "Sent buffer reached its maximum size: " + sentElements.length, true); + sentElements.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE; + } + this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements); + } + }; + SessionStorageSendBuffer.prototype.clearSent = function (payload) { + var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY); + sentElements = this.removePayloadsFromBuffer(payload, sentElements); + this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements); + }; + SessionStorageSendBuffer.prototype.removePayloadsFromBuffer = function (payloads, buffer) { + var remaining = []; + for (var i in buffer) { + var contains = false; + for (var j in payloads) { + if (payloads[j] === buffer[i]) { + contains = true; + break; + } + } + if (!contains) { + remaining.push(buffer[i]); + } + } + ; + return remaining; + }; + SessionStorageSendBuffer.prototype.getBuffer = function (key) { + try { + var bufferJson = ApplicationInsights.Util.getSessionStorage(key); + if (bufferJson) { + var buffer = JSON.parse(bufferJson); + if (buffer) { + return buffer; + } + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.FailedToRestoreStorageBuffer, " storage key: " + key + ", " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + return []; + }; + SessionStorageSendBuffer.prototype.setBuffer = function (key, buffer) { + try { + var bufferJson = JSON.stringify(buffer); + ApplicationInsights.Util.setSessionStorage(key, bufferJson); + } + catch (e) { + // if there was an error, clear the buffer + // telemetry is stored in the _buffer array so we won't loose any items + ApplicationInsights.Util.setSessionStorage(key, JSON.stringify([])); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedToSetStorageBuffer, " storage key: " + key + ", " + ApplicationInsights.Util.getExceptionName(e) + ". Buffer cleared", { exception: ApplicationInsights.Util.dump(e) }); + } + }; + SessionStorageSendBuffer.BUFFER_KEY = "AI_buffer"; + SessionStorageSendBuffer.SENT_BUFFER_KEY = "AI_sentBuffer"; + // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped. + SessionStorageSendBuffer.MAX_BUFFER_SIZE = 2000; + return SessionStorageSendBuffer; + }()); + ApplicationInsights.SessionStorageSendBuffer = SessionStorageSendBuffer; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +; +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + var Sender = /** @class */ (function () { + /** + * Constructs a new instance of the Sender class + */ + function Sender(config) { + /** + * Whether XMLHttpRequest object is supported. Older version of IE (8,9) do not support it. + */ + this._XMLHttpRequestSupported = false; + this._consecutiveErrors = 0; + this._retryAt = null; + this._lastSend = 0; + this._config = config; + this._sender = null; + this._buffer = (ApplicationInsights.Util.canUseSessionStorage() && this._config.enableSessionStorageBuffer()) + ? new ApplicationInsights.SessionStorageSendBuffer(config) : new ApplicationInsights.ArraySendBuffer(config); + if (!this._config.isBeaconApiDisabled() && ApplicationInsights.Util.IsBeaconApiSupported()) { + this._sender = this._beaconSender; + } + else { + if (typeof XMLHttpRequest != "undefined") { + var testXhr = new XMLHttpRequest(); + if ("withCredentials" in testXhr) { + this._sender = this._xhrSender; + this._XMLHttpRequestSupported = true; + } + else if (typeof XDomainRequest !== "undefined") { + this._sender = this._xdrSender; //IE 8 and 9 + } + } + } + } + /** + * Add a telemetry item to the send buffer + */ + Sender.prototype.send = function (envelope) { + try { + // if master off switch is set, don't send any data + if (this._config.disableTelemetry()) { + // Do not send/save data + return; + } + // validate input + if (!envelope) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.CannotSendEmptyTelemetry, "Cannot send empty telemetry"); + return; + } + // ensure a sender was constructed + if (!this._sender) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.SenderNotInitialized, "Sender was not initialized"); + return; + } + // check if the incoming payload is too large, truncate if necessary + var payload = ApplicationInsights.Serializer.serialize(envelope); + // flush if we would exceed the max-size limit by adding this item + var bufferPayload = this._buffer.getItems(); + var batch = this._buffer.batchPayloads(bufferPayload); + if (batch && (batch.length + payload.length > this._config.maxBatchSizeInBytes())) { + this.triggerSend(); + } + // enqueue the payload + this._buffer.enqueue(payload); + // ensure an invocation timeout is set + this._setupTimer(); + // Uncomment if you want to use DataLossanalyzer + // DataLossAnalyzer.incrementItemsQueued(); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedAddingTelemetryToBuffer, "Failed adding telemetry to the sender's buffer, some telemetry will be lost: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Sets up the timer which triggers actually sending the data. + */ + Sender.prototype._setupTimer = function () { + var _this = this; + if (!this._timeoutHandle) { + var retryInterval = this._retryAt ? Math.max(0, this._retryAt - Date.now()) : 0; + var timerValue = Math.max(this._config.maxBatchInterval(), retryInterval); + this._timeoutHandle = setTimeout(function () { + _this.triggerSend(); + }, timerValue); + } + }; + /** + * Gets the size of the list in bytes. + * @param list {string[]} - The list to get the size in bytes of. + */ + Sender.prototype._getSizeInBytes = function (list) { + var size = 0; + if (list && list.length) { + for (var i = 0; i < list.length; i++) { + var item = list[i]; + if (item && item.length) { + size += item.length; + } + } + } + return size; + }; + /** + * Immediately send buffered data + * @param async {boolean} - Indicates if the events should be sent asynchronously + */ + Sender.prototype.triggerSend = function (async) { + if (async === void 0) { async = true; } + try { + // Send data only if disableTelemetry is false + if (!this._config.disableTelemetry()) { + if (this._buffer.count() > 0) { + var payload = this._buffer.getItems(); + // invoke send + this._sender(payload, async); + } + // update lastSend time to enable throttling + this._lastSend = +new Date; + } + else { + this._buffer.clear(); + } + clearTimeout(this._timeoutHandle); + this._timeoutHandle = null; + this._retryAt = null; + } + catch (e) { + /* Ignore this error for IE under v10 */ + if (!ApplicationInsights.Util.getIEVersion() || ApplicationInsights.Util.getIEVersion() > 9) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TransmissionFailed, "Telemetry transmission failed, some telemetry will be lost: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + } + }; + /** Calculates the time to wait before retrying in case of an error based on + * http://en.wikipedia.org/wiki/Exponential_backoff + */ + Sender.prototype._setRetryTime = function () { + var SlotDelayInSeconds = 10; + var delayInSeconds; + if (this._consecutiveErrors <= 1) { + delayInSeconds = SlotDelayInSeconds; + } + else { + var backOffSlot = (Math.pow(2, this._consecutiveErrors) - 1) / 2; + var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1; + delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds); + } + // TODO: Log the backoff time like the C# version does. + var retryAfterTimeSpan = Date.now() + (delayInSeconds * 1000); + // TODO: Log the retry at time like the C# version does. + this._retryAt = retryAfterTimeSpan; + }; + /** + * Parses the response from the backend. + * @param response - XMLHttpRequest or XDomainRequest response + */ + Sender.prototype._parseResponse = function (response) { + try { + if (response && response !== "") { + var result = JSON.parse(response); + if (result && result.itemsReceived && result.itemsReceived >= result.itemsAccepted && + result.itemsReceived - result.itemsAccepted == result.errors.length) { + return result; + } + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.InvalidBackendResponse, "Cannot parse the response. " + ApplicationInsights.Util.getExceptionName(e), { + response: response + }); + } + return null; + }; + /** + * Checks if the SDK should resend the payload after receiving this status code from the backend. + * @param statusCode + */ + Sender.prototype._isRetriable = function (statusCode) { + return statusCode == 408 // Timeout + || statusCode == 429 // Too many requests. + || statusCode == 500 // Internal server error. + || statusCode == 503; // Service unavailable. + }; + /** + * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff). + * @param payload + */ + Sender.prototype._resendPayload = function (payload) { + if (!payload || payload.length === 0) { + return; + } + this._buffer.clearSent(payload); + this._consecutiveErrors++; + for (var _i = 0, payload_1 = payload; _i < payload_1.length; _i++) { + var item = payload_1[_i]; + this._buffer.enqueue(item); + } + // setup timer + this._setRetryTime(); + this._setupTimer(); + }; + Sender.prototype._formatErrorMessageXhr = function (xhr, message) { + if (xhr) { + return "XMLHttpRequest,Status:" + xhr.status + ",Response:" + xhr.responseText || xhr.response || ""; + } + return message; + }; + Sender.prototype._formatErrorMessageXdr = function (xdr, message) { + if (xdr) { + return "XDomainRequest,Response:" + xdr.responseText || ""; + } + return message; + }; + /** + * Send XMLHttpRequest + * @param payload {string} - The data payload to be sent. + * @param isAsync {boolean} - Indicates if the request should be sent asynchronously + */ + Sender.prototype._xhrSender = function (payload, isAsync) { + var _this = this; + var xhr = new XMLHttpRequest(); + xhr[ApplicationInsights.AjaxMonitor.DisabledPropertyName] = true; + xhr.open("POST", this._config.endpointUrl(), isAsync); + xhr.setRequestHeader("Content-type", "application/json"); + // append Sdk-Context request header only in case of breeze endpoint + if (ApplicationInsights.Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())) { + xhr.setRequestHeader(ApplicationInsights.RequestHeaders.sdkContextHeader, ApplicationInsights.RequestHeaders.sdkContextHeaderAppIdRequest); + } + xhr.onreadystatechange = function () { return _this._xhrReadyStateChange(xhr, payload, payload.length); }; + xhr.onerror = function (event) { return _this._onError(payload, _this._formatErrorMessageXhr(xhr), event); }; + // compose an array of payloads + var batch = this._buffer.batchPayloads(payload); + xhr.send(batch); + this._buffer.markAsSent(payload); + }; + /** + * Send XDomainRequest + * @param payload {string} - The data payload to be sent. + * @param isAsync {boolean} - Indicates if the request should be sent asynchronously + * + * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added + * to maintain consistency with the xhrSender's contract + * Note: XDomainRequest does not support custom headers and we are not able to get + * appId from the backend for the correct correlation. + */ + Sender.prototype._xdrSender = function (payload, isAsync) { + var _this = this; + var xdr = new XDomainRequest(); + xdr.onload = function () { return _this._xdrOnLoad(xdr, payload); }; + xdr.onerror = function (event) { return _this._onError(payload, _this._formatErrorMessageXdr(xdr), event); }; + // XDomainRequest requires the same protocol as the hosting page. + // If the protocol doesn't match, we can't send the telemetry :(. + var hostingProtocol = window.location.protocol; + if (this._config.endpointUrl().lastIndexOf(hostingProtocol, 0) !== 0) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.TransmissionFailed, ". " + + "Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."); + this._buffer.clear(); + return; + } + var endpointUrl = this._config.endpointUrl().replace(/^(https?:)/, ""); + xdr.open('POST', endpointUrl); + // compose an array of payloads + var batch = this._buffer.batchPayloads(payload); + xdr.send(batch); + this._buffer.markAsSent(payload); + }; + /** + * Send Beacon API request + * @param payload {string} - The data payload to be sent. + * @param isAsync {boolean} - not used + * Note: Beacon API does not support custom headers and we are not able to get + * appId from the backend for the correct correlation. + */ + Sender.prototype._beaconSender = function (payload, isAsync) { + var url = this._config.endpointUrl(); + var batch = this._buffer.batchPayloads(payload); + // Chrome only allows CORS-safelisted values for the sendBeacon data argument + // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283 + var plainTextBatch = new Blob([batch], { type: 'text/plain;charset=UTF-8' }); + // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false. + var queued = navigator.sendBeacon(url, plainTextBatch); + if (queued) { + this._buffer.markAsSent(payload); + } + else { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TransmissionFailed, ". " + "Failed to send telemetry with Beacon API."); + } + }; + /** + * xhr state changes + */ + Sender.prototype._xhrReadyStateChange = function (xhr, payload, countOfItemsInPayload) { + if (xhr.readyState === 4) { + var response = null; + if (!this._appId) { + response = this._parseResponse(xhr.responseText || xhr.response); + if (response && response.appId) { + this._appId = response.appId; + } + } + if ((xhr.status < 200 || xhr.status >= 300) && xhr.status !== 0) { + if (!this._config.isRetryDisabled() && this._isRetriable(xhr.status)) { + this._resendPayload(payload); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.TransmissionFailed, ". " + + "Response code " + xhr.status + ". Will retry to send " + payload.length + " items."); + } + else { + this._onError(payload, this._formatErrorMessageXhr(xhr)); + } + } + else { + if (xhr.status === 206) { + if (!response) { + response = this._parseResponse(xhr.responseText || xhr.response); + } + if (response && !this._config.isRetryDisabled()) { + this._onPartialSuccess(payload, response); + } + else { + this._onError(payload, this._formatErrorMessageXhr(xhr)); + } + } + else { + this._consecutiveErrors = 0; + this._onSuccess(payload, countOfItemsInPayload); + } + } + } + }; + /** + * xdr state changes + */ + Sender.prototype._xdrOnLoad = function (xdr, payload) { + if (xdr && (xdr.responseText + "" === "200" || xdr.responseText === "")) { + this._consecutiveErrors = 0; + this._onSuccess(payload, 0); + } + else { + var results = this._parseResponse(xdr.responseText); + if (results && results.itemsReceived && results.itemsReceived > results.itemsAccepted + && !this._config.isRetryDisabled()) { + this._onPartialSuccess(payload, results); + } + else { + this._onError(payload, this._formatErrorMessageXdr(xdr)); + } + } + }; + /** + * partial success handler + */ + Sender.prototype._onPartialSuccess = function (payload, results) { + var failed = []; + var retry = []; + // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item. + var errors = results.errors.reverse(); + for (var _i = 0, errors_1 = errors; _i < errors_1.length; _i++) { + var error = errors_1[_i]; + var extracted = payload.splice(error.index, 1)[0]; + if (this._isRetriable(error.statusCode)) { + retry.push(extracted); + } + else { + // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache). + failed.push(extracted); + } + } + if (payload.length > 0) { + this._onSuccess(payload, results.itemsAccepted); + } + if (failed.length > 0) { + this._onError(failed, this._formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' '))); + } + if (retry.length > 0) { + this._resendPayload(retry); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.TransmissionFailed, "Partial success. " + + "Delivered: " + payload.length + ", Failed: " + failed.length + + ". Will retry to send " + retry.length + " our of " + results.itemsReceived + " items"); + } + }; + /** + * error handler + */ + Sender.prototype._onError = function (payload, message, event) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.OnError, "Failed to send telemetry.", { message: message }); + this._buffer.clearSent(payload); + }; + /** + * success handler + */ + Sender.prototype._onSuccess = function (payload, countOfItemsInPayload) { + // Uncomment if you want to use DataLossanalyzer + // DataLossAnalyzer.decrementItemsQueued(countOfItemsInPayload); + this._buffer.clearSent(payload); + }; + /** + * The maximum Beacon API payload size. + * WC3 documentation allows browsers to set the limit. Chrome current has a limit of 64kb. + */ + Sender.MaxBeaconPayloadSize = 65536; // 64kb + return Sender; + }()); + ApplicationInsights.Sender = Sender; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +/// +/// +var AI; +(function (AI) { + "use strict"; + /** + * Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements. + */ + var MessageData = /** @class */ (function (_super) { + __extends(MessageData, _super); + function MessageData() { + var _this = _super.call(this) || this; + _this.ver = 2; + _this.properties = {}; + return _this; + } + return MessageData; + }(Microsoft.Telemetry.Domain)); + AI.MessageData = MessageData; +})(AI || (AI = {})); +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + var Trace = /** @class */ (function (_super) { + __extends(Trace, _super); + /** + * Constructs a new instance of the TraceTelemetry object + */ + function Trace(message, properties, severityLevel) { + var _this = _super.call(this) || this; + _this.aiDataContract = { + ver: ApplicationInsights.FieldType.Required, + message: ApplicationInsights.FieldType.Required, + severityLevel: ApplicationInsights.FieldType.Default, + properties: ApplicationInsights.FieldType.Default + }; + message = message || ApplicationInsights.Util.NotSpecified; + _this.message = Telemetry.Common.DataSanitizer.sanitizeMessage(message); + _this.properties = Telemetry.Common.DataSanitizer.sanitizeProperties(properties); + if (severityLevel) { + _this.severityLevel = severityLevel; + } + return _this; + } + Trace.envelopeType = "Microsoft.ApplicationInsights.{0}.Message"; + Trace.dataType = "MessageData"; + return Trace; + }(AI.MessageData)); + Telemetry.Trace = Trace; + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + var Event = /** @class */ (function (_super) { + __extends(Event, _super); + /** + * Constructs a new instance of the EventTelemetry object + */ + function Event(name, properties, measurements) { + var _this = _super.call(this) || this; + _this.aiDataContract = { + ver: ApplicationInsights.FieldType.Required, + name: ApplicationInsights.FieldType.Required, + properties: ApplicationInsights.FieldType.Default, + measurements: ApplicationInsights.FieldType.Default + }; + _this.name = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeString(name) || ApplicationInsights.Util.NotSpecified; + _this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties); + _this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements); + return _this; + } + Event.envelopeType = "Microsoft.ApplicationInsights.{0}.Event"; + Event.dataType = "EventData"; + return Event; + }(AI.EventData)); + Telemetry.Event = Event; + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +var AI; +(function (AI) { + "use strict"; + /** + * Exception details of the exception in a chain. + */ + var ExceptionDetails = /** @class */ (function () { + function ExceptionDetails() { + this.hasFullStack = true; + this.parsedStack = []; + } + return ExceptionDetails; + }()); + AI.ExceptionDetails = ExceptionDetails; +})(AI || (AI = {})); +// THIS FILE WAS AUTOGENERATED +/// +/// +/// +var AI; +(function (AI) { + "use strict"; + /** + * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application. + */ + var ExceptionData = /** @class */ (function (_super) { + __extends(ExceptionData, _super); + function ExceptionData() { + var _this = _super.call(this) || this; + _this.ver = 2; + _this.exceptions = []; + _this.properties = {}; + _this.measurements = {}; + return _this; + } + return ExceptionData; + }(Microsoft.Telemetry.Domain)); + AI.ExceptionData = ExceptionData; +})(AI || (AI = {})); +// THIS FILE WAS AUTOGENERATED +var AI; +(function (AI) { + "use strict"; + /** + * Stack frame information. + */ + var StackFrame = /** @class */ (function () { + function StackFrame() { + } + return StackFrame; + }()); + AI.StackFrame = StackFrame; +})(AI || (AI = {})); +/// +/// +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + var Exception = /** @class */ (function (_super) { + __extends(Exception, _super); + /** + * Constructs a new isntance of the ExceptionTelemetry object + */ + function Exception(exception, properties, measurements, severityLevel) { + var _this = _super.call(this) || this; + _this.aiDataContract = { + ver: ApplicationInsights.FieldType.Required, + exceptions: ApplicationInsights.FieldType.Required, + severityLevel: ApplicationInsights.FieldType.Default, + properties: ApplicationInsights.FieldType.Default, + measurements: ApplicationInsights.FieldType.Default + }; + _this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties); + _this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements); + _this.exceptions = [new _ExceptionDetails(exception)]; + if (severityLevel) { + _this.severityLevel = severityLevel; + } + return _this; + } + /** + * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception. + */ + Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line) { + return { + exceptions: [ + { + hasFullStack: true, + message: message, + stack: details, + typeName: typeName + } + ] + }; + }; + Exception.envelopeType = "Microsoft.ApplicationInsights.{0}.Exception"; + Exception.dataType = "ExceptionData"; + return Exception; + }(AI.ExceptionData)); + Telemetry.Exception = Exception; + var _ExceptionDetails = /** @class */ (function (_super) { + __extends(_ExceptionDetails, _super); + function _ExceptionDetails(exception) { + var _this = _super.call(this) || this; + _this.aiDataContract = { + id: ApplicationInsights.FieldType.Default, + outerId: ApplicationInsights.FieldType.Default, + typeName: ApplicationInsights.FieldType.Required, + message: ApplicationInsights.FieldType.Required, + hasFullStack: ApplicationInsights.FieldType.Default, + stack: ApplicationInsights.FieldType.Default, + parsedStack: ApplicationInsights.FieldType.Array + }; + _this.typeName = Telemetry.Common.DataSanitizer.sanitizeString(exception.name) || ApplicationInsights.Util.NotSpecified; + _this.message = Telemetry.Common.DataSanitizer.sanitizeMessage(exception.message) || ApplicationInsights.Util.NotSpecified; + var stack = exception["stack"]; + _this.parsedStack = _this.parseStack(stack); + _this.stack = Telemetry.Common.DataSanitizer.sanitizeException(stack); + _this.hasFullStack = ApplicationInsights.Util.isArray(_this.parsedStack) && _this.parsedStack.length > 0; + return _this; + } + _ExceptionDetails.prototype.parseStack = function (stack) { + var parsedStack = undefined; + if (typeof stack === "string") { + var frames = stack.split('\n'); + parsedStack = []; + var level = 0; + var totalSizeInBytes = 0; + for (var i = 0; i <= frames.length; i++) { + var frame = frames[i]; + if (_StackFrame.regex.test(frame)) { + var parsedFrame = new _StackFrame(frames[i], level++); + totalSizeInBytes += parsedFrame.sizeInBytes; + parsedStack.push(parsedFrame); + } + } + // DP Constraint - exception parsed stack must be < 32KB + // remove frames from the middle to meet the threshold + var exceptionParsedStackThreshold = 32 * 1024; + if (totalSizeInBytes > exceptionParsedStackThreshold) { + var left = 0; + var right = parsedStack.length - 1; + var size = 0; + var acceptedLeft = left; + var acceptedRight = right; + while (left < right) { + // check size + var lSize = parsedStack[left].sizeInBytes; + var rSize = parsedStack[right].sizeInBytes; + size += lSize + rSize; + if (size > exceptionParsedStackThreshold) { + // remove extra frames from the middle + var howMany = acceptedRight - acceptedLeft + 1; + parsedStack.splice(acceptedLeft, howMany); + break; + } + // update pointers + acceptedLeft = left; + acceptedRight = right; + left++; + right--; + } + } + } + return parsedStack; + }; + return _ExceptionDetails; + }(AI.ExceptionDetails)); + var _StackFrame = /** @class */ (function (_super) { + __extends(_StackFrame, _super); + function _StackFrame(frame, level) { + var _this = _super.call(this) || this; + _this.sizeInBytes = 0; + _this.aiDataContract = { + level: ApplicationInsights.FieldType.Required, + method: ApplicationInsights.FieldType.Required, + assembly: ApplicationInsights.FieldType.Default, + fileName: ApplicationInsights.FieldType.Default, + line: ApplicationInsights.FieldType.Default + }; + _this.level = level; + _this.method = ""; + _this.assembly = ApplicationInsights.Util.trim(frame); + var matches = frame.match(_StackFrame.regex); + if (matches && matches.length >= 5) { + _this.method = ApplicationInsights.Util.trim(matches[2]) || _this.method; + _this.fileName = ApplicationInsights.Util.trim(matches[4]); + _this.line = parseInt(matches[5]) || 0; + } + _this.sizeInBytes += _this.method.length; + _this.sizeInBytes += _this.fileName.length; + _this.sizeInBytes += _this.assembly.length; + // todo: these might need to be removed depending on how the back-end settles on their size calculation + _this.sizeInBytes += _StackFrame.baseSize; + _this.sizeInBytes += _this.level.toString().length; + _this.sizeInBytes += _this.line.toString().length; + return _this; + } + // regex to match stack frames from ie/chrome/ff + // methodName=$2, fileName=$4, lineNo=$5, column=$6 + _StackFrame.regex = /^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/; + _StackFrame.baseSize = 58; //'{"method":"","level":,"assembly":"","fileName":"","line":}'.length + return _StackFrame; + }(AI.StackFrame)); + Telemetry._StackFrame = _StackFrame; + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +var AI; +(function (AI) { + "use strict"; + /** + * Type of the metric data measurement. + */ + var DataPointType; + (function (DataPointType) { + DataPointType[DataPointType["Measurement"] = 0] = "Measurement"; + DataPointType[DataPointType["Aggregation"] = 1] = "Aggregation"; + })(DataPointType = AI.DataPointType || (AI.DataPointType = {})); +})(AI || (AI = {})); +// THIS FILE WAS AUTOGENERATED +/// +var AI; +(function (AI) { + "use strict"; + /** + * Metric data single measurement. + */ + var DataPoint = /** @class */ (function () { + function DataPoint() { + this.kind = AI.DataPointType.Measurement; + } + return DataPoint; + }()); + AI.DataPoint = DataPoint; +})(AI || (AI = {})); +// THIS FILE WAS AUTOGENERATED +/// +/// +var AI; +(function (AI) { + "use strict"; + /** + * An instance of the Metric item is a list of measurements (single data points) and/or aggregations. + */ + var MetricData = /** @class */ (function (_super) { + __extends(MetricData, _super); + function MetricData() { + var _this = _super.call(this) || this; + _this.ver = 2; + _this.metrics = []; + _this.properties = {}; + return _this; + } + return MetricData; + }(Microsoft.Telemetry.Domain)); + AI.MetricData = MetricData; +})(AI || (AI = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + var Common; + (function (Common) { + "use strict"; + var DataPoint = /** @class */ (function (_super) { + __extends(DataPoint, _super); + function DataPoint() { + var _this = _super !== null && _super.apply(this, arguments) || this; + /** + * The data contract for serializing this object. + */ + _this.aiDataContract = { + name: ApplicationInsights.FieldType.Required, + kind: ApplicationInsights.FieldType.Default, + value: ApplicationInsights.FieldType.Required, + count: ApplicationInsights.FieldType.Default, + min: ApplicationInsights.FieldType.Default, + max: ApplicationInsights.FieldType.Default, + stdDev: ApplicationInsights.FieldType.Default + }; + return _this; + } + return 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; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + var Metric = /** @class */ (function (_super) { + __extends(Metric, _super); + /** + * Constructs a new instance of the MetricTelemetry object + */ + function Metric(name, value, count, min, max, properties) { + var _this = _super.call(this) || this; + _this.aiDataContract = { + ver: ApplicationInsights.FieldType.Required, + metrics: ApplicationInsights.FieldType.Required, + properties: ApplicationInsights.FieldType.Default + }; + var dataPoint = new Microsoft.ApplicationInsights.Telemetry.Common.DataPoint(); + dataPoint.count = count > 0 ? count : undefined; + dataPoint.max = isNaN(max) || max === null ? undefined : max; + dataPoint.min = isNaN(min) || min === null ? undefined : min; + dataPoint.name = Telemetry.Common.DataSanitizer.sanitizeString(name) || ApplicationInsights.Util.NotSpecified; + dataPoint.value = value; + _this.metrics = [dataPoint]; + _this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties); + return _this; + } + Metric.envelopeType = "Microsoft.ApplicationInsights.{0}.Metric"; + Metric.dataType = "MetricData"; + return Metric; + }(AI.MetricData)); + Telemetry.Metric = Metric; + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + var PageView = /** @class */ (function (_super) { + __extends(PageView, _super); + /** + * Constructs a new instance of the PageEventTelemetry object + */ + function PageView(name, url, durationMs, properties, measurements, id) { + var _this = _super.call(this) || this; + _this.aiDataContract = { + ver: ApplicationInsights.FieldType.Required, + name: ApplicationInsights.FieldType.Default, + url: ApplicationInsights.FieldType.Default, + duration: ApplicationInsights.FieldType.Default, + properties: ApplicationInsights.FieldType.Default, + measurements: ApplicationInsights.FieldType.Default, + id: ApplicationInsights.FieldType.Default, + }; + _this.id = Telemetry.Common.DataSanitizer.sanitizeId(id); + _this.url = Telemetry.Common.DataSanitizer.sanitizeUrl(url); + _this.name = Telemetry.Common.DataSanitizer.sanitizeString(name) || ApplicationInsights.Util.NotSpecified; + if (!isNaN(durationMs)) { + _this.duration = ApplicationInsights.Util.msToTimeSpan(durationMs); + } + _this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties); + _this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements); + return _this; + } + PageView.envelopeType = "Microsoft.ApplicationInsights.{0}.Pageview"; + PageView.dataType = "PageviewData"; + return PageView; + }(AI.PageViewData)); + Telemetry.PageView = PageView; + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +/// +var AI; +(function (AI) { + "use strict"; + /** + * An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request. + */ + var PageViewPerfData = /** @class */ (function (_super) { + __extends(PageViewPerfData, _super); + function PageViewPerfData() { + var _this = _super.call(this) || this; + _this.ver = 2; + _this.properties = {}; + _this.measurements = {}; + return _this; + } + return PageViewPerfData; + }(AI.PageViewData)); + AI.PageViewPerfData = PageViewPerfData; +})(AI || (AI = {})); +/// +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + var PageViewPerformance = /** @class */ (function (_super) { + __extends(PageViewPerformance, _super); + /** + * Constructs a new instance of the PageEventTelemetry object + */ + function PageViewPerformance(name, url, unused, properties, measurements) { + var _this = _super.call(this) || this; + _this.aiDataContract = { + ver: ApplicationInsights.FieldType.Required, + name: ApplicationInsights.FieldType.Default, + url: ApplicationInsights.FieldType.Default, + duration: ApplicationInsights.FieldType.Default, + perfTotal: ApplicationInsights.FieldType.Default, + networkConnect: ApplicationInsights.FieldType.Default, + sentRequest: ApplicationInsights.FieldType.Default, + receivedResponse: ApplicationInsights.FieldType.Default, + domProcessing: ApplicationInsights.FieldType.Default, + properties: ApplicationInsights.FieldType.Default, + measurements: ApplicationInsights.FieldType.Default + }; + _this.isValid = false; + /* + * http://www.w3.org/TR/navigation-timing/#processing-model + * |-navigationStart + * | |-connectEnd + * | ||-requestStart + * | || |-responseStart + * | || | |-responseEnd + * | || | | + * | || | | |-loadEventEnd + * |---network---||---request---|---response---|---dom---| + * |--------------------------total----------------------| + */ + var timing = PageViewPerformance.getPerformanceTiming(); + if (timing) { + var total = PageViewPerformance.getDuration(timing.navigationStart, timing.loadEventEnd); + var network = PageViewPerformance.getDuration(timing.navigationStart, timing.connectEnd); + var request = PageViewPerformance.getDuration(timing.requestStart, timing.responseStart); + var response = PageViewPerformance.getDuration(timing.responseStart, timing.responseEnd); + var dom = PageViewPerformance.getDuration(timing.responseEnd, timing.loadEventEnd); + if (total == 0) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.ErrorPVCalc, "error calculating page view performance.", { total: total, network: network, request: request, response: response, dom: dom }); + } + else if (!PageViewPerformance.shouldCollectDuration(total, network, request, response, dom)) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.InvalidDurationValue, "Invalid page load duration value. Browser perf data won't be sent.", { total: total, network: network, request: request, response: response, dom: dom }); + } + else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) { + // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT + // in this case, don't report client performance from this page + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.ClientPerformanceMathError, "client performance math error.", { total: total, network: network, request: request, response: response, dom: dom }); + } + else { + _this.durationMs = total; + // convert to timespans + _this.perfTotal = _this.duration = ApplicationInsights.Util.msToTimeSpan(total); + _this.networkConnect = ApplicationInsights.Util.msToTimeSpan(network); + _this.sentRequest = ApplicationInsights.Util.msToTimeSpan(request); + _this.receivedResponse = ApplicationInsights.Util.msToTimeSpan(response); + _this.domProcessing = ApplicationInsights.Util.msToTimeSpan(dom); + _this.isValid = true; + } + } + _this.url = Telemetry.Common.DataSanitizer.sanitizeUrl(url); + _this.name = Telemetry.Common.DataSanitizer.sanitizeString(name) || ApplicationInsights.Util.NotSpecified; + _this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties); + _this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements); + return _this; + } + /** + * Indicates whether this instance of PageViewPerformance is valid and should be sent + */ + PageViewPerformance.prototype.getIsValid = function () { + return this.isValid; + }; + /** + * Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method. + */ + PageViewPerformance.prototype.getDurationMs = function () { + return this.durationMs; + }; + PageViewPerformance.getPerformanceTiming = function () { + if (PageViewPerformance.isPerformanceTimingSupported()) { + return window.performance.timing; + } + return null; + }; + /** + * Returns true is window performance timing API is supported, false otherwise. + */ + PageViewPerformance.isPerformanceTimingSupported = function () { + return typeof window != "undefined" && window.performance && window.performance.timing; + }; + /** + * As page loads different parts of performance timing numbers get set. When all of them are set we can report it. + * Returns true if ready, false otherwise. + */ + PageViewPerformance.isPerformanceTimingDataReady = function () { + var timing = window.performance.timing; + return timing.domainLookupStart > 0 + && timing.navigationStart > 0 + && timing.responseStart > 0 + && timing.requestStart > 0 + && timing.loadEventEnd > 0 + && timing.responseEnd > 0 + && timing.connectEnd > 0 + && timing.domLoading > 0; + }; + PageViewPerformance.getDuration = function (start, end) { + var duration = undefined; + if (!(isNaN(start) || isNaN(end))) { + duration = Math.max(end - start, 0); + } + return duration; + }; + /** + * This method tells if given durations should be excluded from collection. + */ + PageViewPerformance.shouldCollectDuration = function () { + var durations = []; + for (var _i = 0; _i < arguments.length; _i++) { + durations[_i] = arguments[_i]; + } + // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en + var botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google']; + var userAgent = navigator.userAgent; + var isGoogleBot = false; + if (userAgent) { + for (var i_1 = 0; i_1 < botAgentNames.length; i_1++) { + isGoogleBot = isGoogleBot || userAgent.toLowerCase().indexOf(botAgentNames[i_1]) !== -1; + } + } + if (isGoogleBot) { + // Don't report durations for GoogleBot, it is returning invalid values in performance.timing API. + return false; + } + else { + // for other page views, don't report if it's outside of a reasonable range + for (var i = 0; i < durations.length; i++) { + if (durations[i] >= PageViewPerformance.MAX_DURATION_ALLOWED) { + return false; + } + } + } + return true; + }; + PageViewPerformance.envelopeType = "Microsoft.ApplicationInsights.{0}.PageviewPerformance"; + PageViewPerformance.dataType = "PageviewPerformanceData"; + PageViewPerformance.MAX_DURATION_ALLOWED = 3600000; // 1h + return PageViewPerformance; + }(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"; + var TelemetryContext = /** @class */ (function () { + function TelemetryContext(config) { + var _this = this; + this._config = config; + this._sender = new ApplicationInsights.Sender(config); + this.appId = function () { return _this._sender._appId; }; + // use appId set in config instead of getting it from the backend + if (config.appId()) { + this._sender._appId = config.appId(); + } + this.telemetryInitializers = []; + // window will be undefined in node.js where we do not want to initialize contexts + if (typeof window !== 'undefined') { + this._sessionManager = new ApplicationInsights.Context._SessionManager(config); + this.application = new ApplicationInsights.Context.Application(); + this.device = new ApplicationInsights.Context.Device(); + this.internal = new ApplicationInsights.Context.Internal(config); + this.location = new ApplicationInsights.Context.Location(); + this.user = new ApplicationInsights.Context.User(config); + this.operation = new ApplicationInsights.Context.Operation(); + this.session = new ApplicationInsights.Context.Session(); + this.sample = new ApplicationInsights.Context.Sample(config.sampleRate()); + } + this._addDefaultTelemetryInitializers(); + } + /** + * Adds telemetry initializer to the collection. Telemetry initializers will be called one by one + * before telemetry item is pushed for sending and in the order they were added. + */ + TelemetryContext.prototype.addTelemetryInitializer = function (telemetryInitializer) { + this.telemetryInitializers.push(telemetryInitializer); + }; + /** + * Use Sender.ts to send telemetry object to the endpoint + */ + TelemetryContext.prototype.track = function (envelope) { + if (!envelope) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TrackArgumentsNotSpecified, "cannot call .track() with a null or undefined argument", null, true); + } + else { + // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page. + if (envelope.name === ApplicationInsights.Telemetry.PageView.envelopeType) { + ApplicationInsights._InternalLogging.resetInternalMessageCount(); + } + if (this.session) { + // If customer did not provide custom session id update sessionmanager + if (typeof this.session.id !== "string") { + this._sessionManager.update(); + } + } + this._track(envelope); + } + return envelope; + }; + TelemetryContext.prototype._addDefaultTelemetryInitializers = function () { + if (!this._config.isBrowserLinkTrackingEnabled()) { + var browserLinkPaths_1 = ['/browserLinkSignalR/', '/__browserLink/']; + var dropBrowserLinkRequests = function (envelope) { + if (envelope.name === Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType) { + var remoteData = envelope.data; + if (remoteData && remoteData.baseData) { + for (var i = 0; i < browserLinkPaths_1.length; i++) { + if (remoteData.baseData.name.indexOf(browserLinkPaths_1[i]) >= 0) { + return false; + } + } + } + } + return true; + }; + this.addTelemetryInitializer(dropBrowserLinkRequests); + } + }; + TelemetryContext.prototype._track = function (envelope) { + if (this.session) { + // If customer set id, apply his context; otherwise apply context generated from cookies + if (typeof this.session.id === "string") { + this._applySessionContext(envelope, this.session); + } + else { + this._applySessionContext(envelope, this._sessionManager.automaticSession); + } + } + this._applyApplicationContext(envelope, this.application); + this._applyDeviceContext(envelope, this.device); + this._applyInternalContext(envelope, this.internal); + this._applyLocationContext(envelope, this.location); + this._applySampleContext(envelope, this.sample); + this._applyUserContext(envelope, this.user); + this._applyOperationContext(envelope, this.operation); + envelope.iKey = this._config.instrumentationKey(); + var doNotSendItem = false; + try { + var telemetryInitializersCount = this.telemetryInitializers.length; + for (var i = 0; i < telemetryInitializersCount; ++i) { + var telemetryInitializer = this.telemetryInitializers[i]; + if (telemetryInitializer) { + if (telemetryInitializer.apply(null, [envelope]) === false) { + doNotSendItem = true; + break; + } + } + } + } + catch (e) { + doNotSendItem = true; + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TelemetryInitializerFailed, "One of telemetry initializers failed, telemetry item will not be sent: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }, true); + } + if (!doNotSendItem) { + if (envelope.name === ApplicationInsights.Telemetry.Metric.envelopeType || + this.sample.isSampledIn(envelope)) { + var iKeyNoDashes = this._config.instrumentationKey().replace(/-/g, ""); + envelope.name = envelope.name.replace("{0}", iKeyNoDashes); + this._sender.send(envelope); + } + else { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.TelemetrySampledAndNotSent, "Telemetry is sampled and not sent to the AI service.", { SampleRate: this.sample.sampleRate }, true); + } + } + return envelope; + }; + TelemetryContext.prototype._applyApplicationContext = function (envelope, appContext) { + if (appContext) { + var tagKeys = new AI.ContextTagKeys(); + if (typeof appContext.ver === "string") { + envelope.tags[tagKeys.applicationVersion] = appContext.ver; + } + if (typeof appContext.build === "string") { + envelope.tags[tagKeys.applicationBuild] = appContext.build; + } + } + }; + TelemetryContext.prototype._applyDeviceContext = function (envelope, deviceContext) { + var tagKeys = new AI.ContextTagKeys(); + if (deviceContext) { + if (typeof deviceContext.id === "string") { + envelope.tags[tagKeys.deviceId] = deviceContext.id; + } + if (typeof deviceContext.ip === "string") { + envelope.tags[tagKeys.deviceIp] = deviceContext.ip; + } + if (typeof deviceContext.language === "string") { + envelope.tags[tagKeys.deviceLanguage] = deviceContext.language; + } + if (typeof deviceContext.locale === "string") { + envelope.tags[tagKeys.deviceLocale] = deviceContext.locale; + } + if (typeof deviceContext.model === "string") { + envelope.tags[tagKeys.deviceModel] = deviceContext.model; + } + if (typeof deviceContext.network !== "undefined") { + envelope.tags[tagKeys.deviceNetwork] = deviceContext.network; + } + if (typeof deviceContext.oemName === "string") { + envelope.tags[tagKeys.deviceOEMName] = deviceContext.oemName; + } + if (typeof deviceContext.os === "string") { + envelope.tags[tagKeys.deviceOS] = deviceContext.os; + } + if (typeof deviceContext.osversion === "string") { + envelope.tags[tagKeys.deviceOSVersion] = deviceContext.osversion; + } + if (typeof deviceContext.resolution === "string") { + envelope.tags[tagKeys.deviceScreenResolution] = deviceContext.resolution; + } + if (typeof deviceContext.type === "string") { + envelope.tags[tagKeys.deviceType] = deviceContext.type; + } + } + }; + TelemetryContext.prototype._applyInternalContext = function (envelope, internalContext) { + if (internalContext) { + var tagKeys = new AI.ContextTagKeys(); + if (typeof internalContext.agentVersion === "string") { + envelope.tags[tagKeys.internalAgentVersion] = internalContext.agentVersion; + } + if (typeof internalContext.sdkVersion === "string") { + envelope.tags[tagKeys.internalSdkVersion] = internalContext.sdkVersion; + } + } + }; + TelemetryContext.prototype._applyLocationContext = function (envelope, locationContext) { + if (locationContext) { + var tagKeys = new AI.ContextTagKeys(); + if (typeof locationContext.ip === "string") { + envelope.tags[tagKeys.locationIp] = locationContext.ip; + } + } + }; + TelemetryContext.prototype._applyOperationContext = function (envelope, operationContext) { + if (operationContext) { + var tagKeys = new AI.ContextTagKeys(); + if (typeof operationContext.id === "string") { + envelope.tags[tagKeys.operationId] = operationContext.id; + } + if (typeof operationContext.name === "string") { + envelope.tags[tagKeys.operationName] = operationContext.name; + } + if (typeof operationContext.parentId === "string") { + envelope.tags[tagKeys.operationParentId] = operationContext.parentId; + } + if (typeof operationContext.rootId === "string") { + envelope.tags[tagKeys.operationRootId] = operationContext.rootId; + } + if (typeof operationContext.syntheticSource === "string") { + envelope.tags[tagKeys.operationSyntheticSource] = operationContext.syntheticSource; + } + } + }; + TelemetryContext.prototype._applySampleContext = function (envelope, sampleContext) { + if (sampleContext) { + envelope.sampleRate = sampleContext.sampleRate; + } + }; + TelemetryContext.prototype._applySessionContext = function (envelope, sessionContext) { + if (sessionContext) { + var tagKeys = new AI.ContextTagKeys(); + if (typeof sessionContext.id === "string") { + envelope.tags[tagKeys.sessionId] = sessionContext.id; + } + if (typeof sessionContext.isFirst !== "undefined") { + envelope.tags[tagKeys.sessionIsFirst] = sessionContext.isFirst; + } + } + }; + TelemetryContext.prototype._applyUserContext = function (envelope, userContext) { + if (userContext) { + var tagKeys = new AI.ContextTagKeys(); + if (typeof userContext.accountId === "string") { + envelope.tags[tagKeys.userAccountId] = userContext.accountId; + } + if (typeof userContext.agent === "string") { + envelope.tags[tagKeys.userAgent] = userContext.agent; + } + if (typeof userContext.id === "string") { + envelope.tags[tagKeys.userId] = userContext.id; + } + if (typeof userContext.authenticatedId === "string") { + envelope.tags[tagKeys.userAuthUserId] = userContext.authenticatedId; + } + if (typeof userContext.storeRegion === "string") { + envelope.tags[tagKeys.userStoreRegion] = userContext.storeRegion; + } + } + }; + return TelemetryContext; + }()); + ApplicationInsights.TelemetryContext = TelemetryContext; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +// THIS FILE WAS AUTOGENERATED +/// +var Microsoft; +(function (Microsoft) { + var Telemetry; + (function (Telemetry) { + "use strict"; + /** + * Data struct to contain both B and C sections. + */ + var Data = /** @class */ (function (_super) { + __extends(Data, _super); + function Data() { + return _super.call(this) || this; + } + return Data; + }(Microsoft.Telemetry.Base)); + Telemetry.Data = Data; + })(Telemetry = Microsoft.Telemetry || (Microsoft.Telemetry = {})); +})(Microsoft || (Microsoft = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + var Common; + (function (Common) { + "use strict"; + var Data = /** @class */ (function (_super) { + __extends(Data, _super); + /** + * Constructs a new instance of telemetry data. + */ + function Data(type, data) { + var _this = _super.call(this) || this; + /** + * The data contract for serializing this object. + */ + _this.aiDataContract = { + baseType: ApplicationInsights.FieldType.Required, + baseData: ApplicationInsights.FieldType.Required + }; + _this.baseType = type; + _this.baseData = data; + return _this; + } + return 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; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + /** + * Class encapsulates sending page views and page view performance telemetry. + */ + var PageViewManager = /** @class */ (function () { + function PageViewManager(appInsights, overridePageViewDuration) { + this.pageViewPerformanceSent = false; + this.overridePageViewDuration = false; + this.overridePageViewDuration = overridePageViewDuration; + this.appInsights = appInsights; + } + /** + * Currently supported cases: + * 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available. + * If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent. + * 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away. + * 3) overridePageViewDuration = true. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported). + * 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration. + * + * In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported. + */ + PageViewManager.prototype.trackPageView = function (name, url, properties, measurements, duration) { + var _this = this; + // ensure we have valid values for the required fields + if (typeof name !== "string") { + name = window.document && window.document.title || ""; + } + if (typeof url !== "string") { + url = window.location && window.location.href || ""; + } + var pageViewSent = false; + var customDuration = undefined; + if (Telemetry.PageViewPerformance.isPerformanceTimingSupported()) { + var start = Telemetry.PageViewPerformance.getPerformanceTiming().navigationStart; + customDuration = Telemetry.PageViewPerformance.getDuration(start, +new Date); + if (!Telemetry.PageViewPerformance.shouldCollectDuration(customDuration)) { + customDuration = undefined; + } + } + else { + this.appInsights.sendPageViewInternal(name, url, !isNaN(duration) ? duration : undefined, properties, measurements); + this.appInsights.flush(); + pageViewSent = true; + } + if (!pageViewSent && (this.overridePageViewDuration || !isNaN(duration))) { + // 1, 2, 4 cases + this.appInsights.sendPageViewInternal(name, url, !isNaN(duration) ? duration : customDuration, properties, measurements); + this.appInsights.flush(); + pageViewSent = true; + } + var maxDurationLimit = 60000; + if (!Telemetry.PageViewPerformance.isPerformanceTimingSupported()) { + // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing) + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.NavigationTimingNotSupported, "trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info."); + return; + } + var handle = setInterval(function () { + try { + if (Telemetry.PageViewPerformance.isPerformanceTimingDataReady()) { + clearInterval(handle); + var pageViewPerformance = new Telemetry.PageViewPerformance(name, url, null, properties, measurements); + if (!pageViewPerformance.getIsValid() && !pageViewSent) { + // If navigation timing gives invalid numbers, then go back to "override page view duration" mode. + // That's the best value we can get that makes sense. + _this.appInsights.sendPageViewInternal(name, url, customDuration, properties, measurements); + _this.appInsights.flush(); + } + else { + if (!pageViewSent) { + _this.appInsights.sendPageViewInternal(name, url, pageViewPerformance.getDurationMs(), properties, measurements); + } + if (!_this.pageViewPerformanceSent) { + _this.appInsights.sendPageViewPerformanceInternal(pageViewPerformance); + _this.pageViewPerformanceSent = true; + } + _this.appInsights.flush(); + } + } + else if (Telemetry.PageViewPerformance.getDuration(start, +new Date) > maxDurationLimit) { + clearInterval(handle); + if (!pageViewSent) { + _this.appInsights.sendPageViewInternal(name, url, maxDurationLimit, properties, measurements); + _this.appInsights.flush(); + } + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TrackPVFailedCalc, "trackPageView failed on page load calculation: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }, 100); + }; + return PageViewManager; + }()); + Telemetry.PageViewManager = PageViewManager; + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + var Telemetry; + (function (Telemetry) { + "use strict"; + /** + * Used to track page visit durations + */ + var PageVisitTimeManager = /** @class */ (function () { + /** + * Creates a new instance of PageVisitTimeManager + * @param pageVisitTimeTrackingHandler Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called) + * @returns {} + */ + function PageVisitTimeManager(pageVisitTimeTrackingHandler) { + this.prevPageVisitDataKeyName = "prevPageVisitData"; + this.pageVisitTimeTrackingHandler = pageVisitTimeTrackingHandler; + } + /** + * Tracks the previous page visit time telemetry (if exists) and starts timing of new page visit time + * @param currentPageName Name of page to begin timing for visit duration + * @param currentPageUrl Url of page to begin timing for visit duration + */ + PageVisitTimeManager.prototype.trackPreviousPageVisit = function (currentPageName, currentPageUrl) { + try { + // Restart timer for new page view + var prevPageVisitTimeData = this.restartPageVisitTimer(currentPageName, currentPageUrl); + // If there was a page already being timed, track the visit time for it now. + if (prevPageVisitTimeData) { + this.pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime); + } + } + catch (e) { + ApplicationInsights._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: " + ApplicationInsights.Util.dump(e)); + } + }; + /** + * Stops timing of current page (if exists) and starts timing for duration of visit to pageName + * @param pageName Name of page to begin timing visit duration + * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not. + */ + PageVisitTimeManager.prototype.restartPageVisitTimer = function (pageName, pageUrl) { + try { + var prevPageVisitData = this.stopPageVisitTimer(); + this.startPageVisitTimer(pageName, pageUrl); + return prevPageVisitData; + } + catch (e) { + ApplicationInsights._InternalLogging.warnToConsole("Call to restart failed: " + ApplicationInsights.Util.dump(e)); + return null; + } + }; + /** + * Starts timing visit duration of pageName + * @param pageName + * @returns {} + */ + PageVisitTimeManager.prototype.startPageVisitTimer = function (pageName, pageUrl) { + try { + if (ApplicationInsights.Util.canUseSessionStorage()) { + if (ApplicationInsights.Util.getSessionStorage(this.prevPageVisitDataKeyName) != null) { + throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit"); + } + var currPageVisitData = new PageVisitData(pageName, pageUrl); + var currPageVisitDataStr = JSON.stringify(currPageVisitData); + ApplicationInsights.Util.setSessionStorage(this.prevPageVisitDataKeyName, currPageVisitDataStr); + } + } + catch (e) { + //TODO: Remove this catch in next phase, since if start is called twice in a row the exception needs to be propagated out + ApplicationInsights._InternalLogging.warnToConsole("Call to start failed: " + ApplicationInsights.Util.dump(e)); + } + }; + /** + * Stops timing of current page, if exists. + * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not. + */ + PageVisitTimeManager.prototype.stopPageVisitTimer = function () { + try { + if (ApplicationInsights.Util.canUseSessionStorage()) { + // Define end time of page's visit + var pageVisitEndTime = Date.now(); + // Try to retrieve page name and start time from session storage + var pageVisitDataJsonStr = ApplicationInsights.Util.getSessionStorage(this.prevPageVisitDataKeyName); + if (pageVisitDataJsonStr) { + // if previous page data exists, set end time of visit + var prevPageVisitData = JSON.parse(pageVisitDataJsonStr); + prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData.pageVisitStartTime; + // Remove data from storage since we already used it + ApplicationInsights.Util.removeSessionStorage(this.prevPageVisitDataKeyName); + // Return page visit data + return prevPageVisitData; + } + else { + return null; + } + } + return null; + } + catch (e) { + ApplicationInsights._InternalLogging.warnToConsole("Stop page visit timer failed: " + ApplicationInsights.Util.dump(e)); + return null; + } + }; + return PageVisitTimeManager; + }()); + Telemetry.PageVisitTimeManager = PageVisitTimeManager; + var PageVisitData = /** @class */ (function () { + function PageVisitData(pageName, pageUrl) { + this.pageVisitStartTime = Date.now(); + this.pageName = pageName; + this.pageUrl = pageUrl; + } + return PageVisitData; + }()); + Telemetry.PageVisitData = PageVisitData; + })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + // Class allows to perform split testing (aka 'a/b testing' aka 'flights') + // Works similarly to sampling, using the same hashing algorithm under the hood. + // Suggested use: + // + // newShinyFeature.enabled = false; + // if (new SplitTest.isEnabled(, )){ + // newShinyFeature.enabled = true; + // } + // + var SplitTest = /** @class */ (function () { + function SplitTest() { + this.hashCodeGeneragor = new ApplicationInsights.HashCodeScoreGenerator(); + } + SplitTest.prototype.isEnabled = function (key, percentEnabled) { + return this.hashCodeGeneragor.getHashCodeScore(key) < percentEnabled; + }; + return SplitTest; + }()); + ApplicationInsights.SplitTest = SplitTest; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +/// +/// +/// +/// +/// +/// +/// +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + ApplicationInsights.Version = "1.0.20"; + /** + * The main API that sends telemetry to Application Insights. + * Learn more: http://go.microsoft.com/fwlink/?LinkID=401493 + */ + var AppInsights = /** @class */ (function () { + function AppInsights(config) { + var _this = this; + // Counts number of trackAjax invokations. + // By default we only monitor X ajax call per view to avoid too much load. + // Default value is set in config. + // This counter keeps increasing even after the limit is reached. + this._trackAjaxAttempts = 0; + this.config = config || {}; + // load default values if specified + var defaults = AppInsights.defaultConfig; + if (defaults !== undefined) { + for (var field in defaults) { + // for each unspecified field, set the default value + if (this.config[field] === undefined) { + this.config[field] = defaults[field]; + } + } + } + ApplicationInsights._InternalLogging.verboseLogging = function () { return _this.config.verboseLogging; }; + ApplicationInsights._InternalLogging.enableDebugExceptions = function () { return _this.config.enableDebug; }; + var configGetters = { + instrumentationKey: function () { return _this.config.instrumentationKey; }, + accountId: function () { return _this.config.accountId; }, + sessionRenewalMs: function () { return _this.config.sessionRenewalMs; }, + sessionExpirationMs: function () { return _this.config.sessionExpirationMs; }, + endpointUrl: function () { return _this.config.endpointUrl; }, + emitLineDelimitedJson: function () { return _this.config.emitLineDelimitedJson; }, + maxBatchSizeInBytes: function () { + return (!_this.config.isBeaconApiDisabled && ApplicationInsights.Util.IsBeaconApiSupported()) ? + Math.min(_this.config.maxBatchSizeInBytes, ApplicationInsights.Sender.MaxBeaconPayloadSize) : + _this.config.maxBatchSizeInBytes; + }, + maxBatchInterval: function () { return _this.config.maxBatchInterval; }, + disableTelemetry: function () { return _this.config.disableTelemetry; }, + sampleRate: function () { return _this.config.samplingPercentage; }, + cookieDomain: function () { return _this.config.cookieDomain; }, + enableSessionStorageBuffer: function () { + // Disable Session Storage buffer if telemetry is sent using Beacon API + return ((_this.config.isBeaconApiDisabled || !ApplicationInsights.Util.IsBeaconApiSupported()) && _this.config.enableSessionStorageBuffer); + }, + isRetryDisabled: function () { return _this.config.isRetryDisabled; }, + isBeaconApiDisabled: function () { return _this.config.isBeaconApiDisabled; }, + sdkExtension: function () { return _this.config.sdkExtension; }, + isBrowserLinkTrackingEnabled: function () { return _this.config.isBrowserLinkTrackingEnabled; }, + appId: function () { return _this.config.appId; }, + }; + if (this.config.isCookieUseDisabled) { + ApplicationInsights.Util.disableCookies(); + } + if (this.config.isStorageUseDisabled) { + ApplicationInsights.Util.disableStorage(); + } + this.context = new ApplicationInsights.TelemetryContext(configGetters); + this._pageViewManager = new Microsoft.ApplicationInsights.Telemetry.PageViewManager(this, this.config.overridePageViewDuration); + // initialize event timing + this._eventTracking = new Timing("trackEvent"); + this._eventTracking.action = function (name, url, duration, properties, measurements) { + if (!measurements) { + measurements = { duration: duration }; + } + else { + // do not override existing duration value + if (isNaN(measurements["duration"])) { + measurements["duration"] = duration; + } + } + var event = new ApplicationInsights.Telemetry.Event(name, properties, measurements); + var data = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.Event.dataType, event); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(data, ApplicationInsights.Telemetry.Event.envelopeType); + _this.context.track(envelope); + }; + // initialize page view timing + this._pageTracking = new Timing("trackPageView"); + this._pageTracking.action = function (name, url, duration, properties, measurements) { + _this.sendPageViewInternal(name, url, duration, properties, measurements); + }; + this._pageVisitTimeManager = new ApplicationInsights.Telemetry.PageVisitTimeManager(function (pageName, pageUrl, pageVisitTime) { return _this.trackPageVisitTime(pageName, pageUrl, pageVisitTime); }); + if (!this.config.disableAjaxTracking) { + this._ajaxMonitor = new Microsoft.ApplicationInsights.AjaxMonitor(this); + } + } + AppInsights.prototype.sendPageViewInternal = function (name, url, duration, properties, measurements) { + var pageView = new ApplicationInsights.Telemetry.PageView(name, url, duration, properties, measurements, this.context.operation.id); + var data = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.PageView.dataType, pageView); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(data, ApplicationInsights.Telemetry.PageView.envelopeType); + this.context.track(envelope); + // reset ajaxes counter + this._trackAjaxAttempts = 0; + }; + AppInsights.prototype.sendPageViewPerformanceInternal = function (pageViewPerformance) { + var pageViewPerformanceData = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.PageViewPerformance.dataType, pageViewPerformance); + var pageViewPerformanceEnvelope = new ApplicationInsights.Telemetry.Common.Envelope(pageViewPerformanceData, ApplicationInsights.Telemetry.PageViewPerformance.envelopeType); + this.context.track(pageViewPerformanceEnvelope); + }; + /** + * Starts timing how long the user views a page or other item. Call this when the page opens. + * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes. + * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title. + */ + AppInsights.prototype.startTrackPage = function (name) { + try { + if (typeof name !== "string") { + name = window.document && window.document.title || ""; + } + this._pageTracking.start(name); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.StartTrackFailed, "startTrackPage failed, page view may not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. + * @param name The string you used as the name in startTrackPage. Defaults to the document title. + * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. + * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. + */ + AppInsights.prototype.stopTrackPage = function (name, url, properties, measurements) { + try { + if (typeof name !== "string") { + name = window.document && window.document.title || ""; + } + if (typeof url !== "string") { + url = window.location && window.location.href || ""; + } + this._pageTracking.stop(name, url, properties, measurements); + if (this.config.autoTrackPageVisitTime) { + this._pageVisitTimeManager.trackPreviousPageVisit(name, url); + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.StopTrackFailed, "stopTrackPage failed, page view will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Logs that a page or other item was viewed. + * @param name The string you used as the name in startTrackPage. Defaults to the document title. + * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. + * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. + * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally. + */ + AppInsights.prototype.trackPageView = function (name, url, properties, measurements, duration) { + try { + this._pageViewManager.trackPageView(name, url, properties, measurements, duration); + if (this.config.autoTrackPageVisitTime) { + this._pageVisitTimeManager.trackPreviousPageVisit(name, url); + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TrackPVFailed, "trackPageView failed, page view will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends. + * @param name A string that identifies this event uniquely within the document. + */ + AppInsights.prototype.startTrackEvent = function (name) { + try { + this._eventTracking.start(name); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.StartTrackEventFailed, "startTrackEvent failed, event will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Log an extended event that you started timing with {@link startTrackEvent}. + * @param name The string you used to identify this event in startTrackEvent. + * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. + */ + AppInsights.prototype.stopTrackEvent = function (name, properties, measurements) { + try { + this._eventTracking.stop(name, undefined, properties, measurements); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.StopTrackEventFailed, "stopTrackEvent failed, event will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Log a user action or other occurrence. + * @param name A string to identify this event in the portal. + * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. + */ + AppInsights.prototype.trackEvent = function (name, properties, measurements) { + try { + var eventTelemetry = new ApplicationInsights.Telemetry.Event(name, properties, measurements); + var data = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.Event.dataType, eventTelemetry); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(data, ApplicationInsights.Telemetry.Event.envelopeType); + this.context.track(envelope); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TrackEventFailed, "trackEvent failed, event will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Log a dependency call + * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id. + * @param method represents request verb (GET, POST, etc.) + * @param absoluteUrl absolute url used to make the dependency request + * @param command command name + * @param totalTime total request time + * @param success indicates if the request was sessessful + * @param resultCode response code returned by the dependency request + * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. + */ + AppInsights.prototype.trackDependency = function (id, method, absoluteUrl, command, totalTime, success, resultCode, properties, measurements) { + if (this.config.maxAjaxCallsPerView === -1 || + this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) { + var dependency = new ApplicationInsights.Telemetry.RemoteDependencyData(id, absoluteUrl, command, totalTime, success, resultCode, method, properties, measurements); + var dependencyData = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.RemoteDependencyData.dataType, dependency); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType); + this.context.track(envelope); + } + else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.MaxAjaxPerPVExceeded, "Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.", true); + } + ++this._trackAjaxAttempts; + }; + /** + * Logs dependency call + * @param dependencyData dependency data object + */ + AppInsights.prototype.trackDependencyData = function (dependency) { + if (this.config.maxAjaxCallsPerView === -1 || this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) { + var dependencyData = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.RemoteDependencyData.dataType, dependency); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType); + this.context.track(envelope); + } + else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.MaxAjaxPerPVExceeded, "Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.", true); + } + ++this._trackAjaxAttempts; + }; + /** + * trackAjax method is obsolete, use trackDependency instead + */ + AppInsights.prototype.trackAjax = function (id, absoluteUrl, pathName, totalTime, success, resultCode, method) { + this.trackDependency(id, null, absoluteUrl, pathName, totalTime, success, resultCode); + }; + /** + * Log an exception you have caught. + * @param exception An Error from a catch clause, or the string error message. + * @param handledAt Not used + * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. + * @param severityLevel AI.SeverityLevel - severity level + */ + AppInsights.prototype.trackException = function (exception, handledAt, properties, measurements, severityLevel) { + try { + if (!ApplicationInsights.Util.isError(exception)) { + // ensure that we have an error object (user could pass a string/message) + try { + throw new Error(exception); + } + catch (error) { + exception = error; + } + } + var exceptionTelemetry = new ApplicationInsights.Telemetry.Exception(exception, properties, measurements, severityLevel); + var data = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.Exception.dataType, exceptionTelemetry); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(data, ApplicationInsights.Telemetry.Exception.envelopeType); + this.context.track(envelope); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TrackExceptionFailed, "trackException failed, exception will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators. + * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the + * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals. + * @param name A string that identifies the metric. + * @param average Number representing either a single measurement, or the average of several measurements. + * @param sampleCount The number of measurements represented by the average. Defaults to 1. + * @param min The smallest measurement in the sample. Defaults to the average. + * @param max The largest measurement in the sample. Defaults to the average. + */ + AppInsights.prototype.trackMetric = function (name, average, sampleCount, min, max, properties) { + try { + var telemetry = new ApplicationInsights.Telemetry.Metric(name, average, sampleCount, min, max, properties); + var data = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.Metric.dataType, telemetry); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(data, ApplicationInsights.Telemetry.Metric.envelopeType); + this.context.track(envelope); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.TrackMetricFailed, "trackMetric failed, metric will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Log a diagnostic message. + * @param message A message string + * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty. + * @param severityLevel AI.SeverityLevel - severity level + */ + AppInsights.prototype.trackTrace = function (message, properties, severityLevel) { + try { + var telemetry = new ApplicationInsights.Telemetry.Trace(message, properties, severityLevel); + var data = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.Trace.dataType, telemetry); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(data, ApplicationInsights.Telemetry.Trace.envelopeType); + this.context.track(envelope); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.TrackTraceFailed, "trackTrace failed, trace will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Log a page visit time + * @param pageName Name of page + * @param pageVisitDuration Duration of visit to the page in milleseconds + */ + AppInsights.prototype.trackPageVisitTime = function (pageName, pageUrl, pageVisitTime) { + var properties = { PageName: pageName, PageUrl: pageUrl }; + this.trackMetric("PageVisitTime", pageVisitTime, 1, pageVisitTime, pageVisitTime, properties); + }; + /** + * Immediately send all queued telemetry. + * @param {boolean} async - If flush should be call asynchronously + */ + AppInsights.prototype.flush = function (async) { + if (async === void 0) { async = true; } + try { + this.context._sender.triggerSend(async); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.FlushFailed, "flush failed, telemetry will not be collected: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + }; + /** + * Sets the authenticated user id and the account id. + * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars. + * + * By default the method will only set the authUserID and accountId for all events in this page view. To add them to all events within + * the whole session, you should either call this method on every page view or set `storeInCookie = true`. + * + * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service. + * @param accountId {string} - An optional string to represent the account associated with the authenticated user. + * @param storeInCookie {boolean} - AuthenticateUserID will be stored in a cookie and added to all events within this session. + */ + AppInsights.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) { + if (storeInCookie === void 0) { storeInCookie = false; } + try { + this.context.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.SetAuthContextFailed, "Setting auth user context failed. " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }, true); + } + }; + /** + * Clears the authenticated user id and the account id from the user context. + */ + AppInsights.prototype.clearAuthenticatedUserContext = function () { + try { + this.context.user.clearAuthenticatedUserContext(); + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.SetAuthContextFailed, "Clearing auth user context failed. " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }, true); + } + }; + /** + * In case of CORS exceptions - construct an exception manually. + * See this for more info: http://stackoverflow.com/questions/5913978/cryptic-script-error-reported-in-javascript-in-chrome-and-firefox + */ + AppInsights.prototype.SendCORSException = function (properties) { + var exceptionData = Microsoft.ApplicationInsights.Telemetry.Exception.CreateSimpleException("Script error.", "Error", "unknown", "unknown", "The browser's same-origin policy prevents us from getting the details of this exception. Consider using 'crossorigin' attribute.", 0); + exceptionData.properties = properties; + var data = new ApplicationInsights.Telemetry.Common.Data(ApplicationInsights.Telemetry.Exception.dataType, exceptionData); + var envelope = new ApplicationInsights.Telemetry.Common.Envelope(data, ApplicationInsights.Telemetry.Exception.envelopeType); + this.context.track(envelope); + }; + /** + * The custom error handler for Application Insights + * @param {string} message - The error message + * @param {string} url - The url where the error was raised + * @param {number} lineNumber - The line number where the error was raised + * @param {number} columnNumber - The column number for the line where the error was raised + * @param {Error} error - The Error object + */ + AppInsights.prototype._onerror = function (message, url, lineNumber, columnNumber, error) { + try { + var properties = { url: url ? url : document.URL }; + if (ApplicationInsights.Util.isCrossOriginError(message, url, lineNumber, columnNumber, error)) { + this.SendCORSException(properties); + } + else { + if (!ApplicationInsights.Util.isError(error)) { + var stack = "window.onerror@" + properties.url + ":" + lineNumber + ":" + (columnNumber || 0); + error = new Error(message); + error["stack"] = stack; + } + this.trackException(error, null, properties); + } + } + catch (exception) { + var errorString = error ? (error.name + ", " + error.message) : "null"; + var exceptionDump = ApplicationInsights.Util.dump(exception); + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.ExceptionWhileLoggingError, "_onerror threw exception while logging error, error will not be collected: " + ApplicationInsights.Util.getExceptionName(exception), { exception: exceptionDump, errorString: errorString }); + } + }; + return AppInsights; + }()); + ApplicationInsights.AppInsights = AppInsights; + /** + * Used to record timed events and page views. + */ + var Timing = /** @class */ (function () { + function Timing(name) { + this._name = name; + this._events = {}; + } + Timing.prototype.start = function (name) { + if (typeof this._events[name] !== "undefined") { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.StartCalledMoreThanOnce, "start was called more than once for this event without calling stop.", { name: this._name, key: name }, true); + } + this._events[name] = +new Date; + }; + Timing.prototype.stop = function (name, url, properties, measurements) { + var start = this._events[name]; + if (isNaN(start)) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.StopCalledWithoutStart, "stop was called without a corresponding start.", { name: this._name, key: name }, true); + } + else { + var end = +new Date; + var duration = ApplicationInsights.Telemetry.PageViewPerformance.getDuration(start, end); + this.action(name, url, duration, properties, measurements); + } + delete this._events[name]; + this._events[name] = undefined; + }; + return Timing; + }()); + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + /* Data loss analyzer is disabled by default. + * Uncomment code in Sender, SendBuffer and unit tests if you want to enable it + */ + var DataLossAnalyzer = /** @class */ (function () { + function DataLossAnalyzer() { + } + 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; + } + }; + DataLossAnalyzer.isEnabled = function () { + return DataLossAnalyzer.enabled && + DataLossAnalyzer.appInsights != null && + DataLossAnalyzer.appInsights.context._sender._XMLHttpRequestSupported && + ApplicationInsights.Util.canUseSessionStorage(); + }; + DataLossAnalyzer.getIssuesReported = function () { + var result = (!DataLossAnalyzer.isEnabled() || isNaN(+ApplicationInsights.Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY))) ? + 0 : + +ApplicationInsights.Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY); + return result; + }; + DataLossAnalyzer.incrementItemsQueued = function () { + try { + if (DataLossAnalyzer.isEnabled()) { + var itemsQueued = DataLossAnalyzer.getNumberOfLostItems(); + ++itemsQueued; + ApplicationInsights.Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString()); + } + } + catch (e) { } + }; + DataLossAnalyzer.decrementItemsQueued = function (countOfItemsSentSuccessfully) { + try { + if (DataLossAnalyzer.isEnabled()) { + var itemsQueued = DataLossAnalyzer.getNumberOfLostItems(); + itemsQueued -= countOfItemsSentSuccessfully; + if (itemsQueued < 0) + itemsQueued = 0; + ApplicationInsights.Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString()); + } + } + catch (e) { } + }; + DataLossAnalyzer.getNumberOfLostItems = function () { + var result = 0; + try { + if (DataLossAnalyzer.isEnabled()) { + result = isNaN(+ApplicationInsights.Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY)) ? + 0 : + +ApplicationInsights.Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY); + } + } + catch (e) { + result = 0; + } + return result; + }; + DataLossAnalyzer.reportLostItems = function () { + try { + if (DataLossAnalyzer.isEnabled() && + DataLossAnalyzer.getIssuesReported() < DataLossAnalyzer.LIMIT_PER_SESSION && + DataLossAnalyzer.getNumberOfLostItems() > 0) { + var lostItems = DataLossAnalyzer.getNumberOfLostItems() - DataLossAnalyzer.itemsRestoredFromSessionBuffer; + DataLossAnalyzer.appInsights.trackTrace("AI (Internal): Internal report DATALOSS:\"" + lostItems + "\"", null); + DataLossAnalyzer.appInsights.flush(); + var issuesReported = DataLossAnalyzer.getIssuesReported(); + ++issuesReported; + ApplicationInsights.Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, issuesReported.toString()); + } + } + catch (e) { + ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.FailedToReportDataLoss, "Failed to report data loss: " + ApplicationInsights.Util.getExceptionName(e), { exception: ApplicationInsights.Util.dump(e) }); + } + finally { + try { + DataLossAnalyzer.reset(); + } + catch (e) { } + } + }; + DataLossAnalyzer.enabled = false; + DataLossAnalyzer.itemsRestoredFromSessionBuffer = 0; + DataLossAnalyzer.LIMIT_PER_SESSION = 10; + 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; + (function (ApplicationInsights) { + "use strict"; + var Initialization = /** @class */ (function () { + function Initialization(snippet) { + // initialize the queue and config in case they are undefined + snippet.queue = snippet.queue || []; + var config = snippet.config || {}; + // ensure instrumentationKey is specified + if (config && !config.instrumentationKey) { + config = snippet; + // check for legacy instrumentation key + if (config["iKey"]) { + Microsoft.ApplicationInsights.Version = "0.10.0.0"; + config.instrumentationKey = config["iKey"]; + } + else if (config["applicationInsightsId"]) { + Microsoft.ApplicationInsights.Version = "0.7.2.0"; + config.instrumentationKey = config["applicationInsightsId"]; + } + else { + throw new Error("Cannot load Application Insights SDK, no instrumentationKey was provided."); + } + } + // set default values + config = Initialization.getDefaultConfig(config); + this.snippet = snippet; + this.config = config; + } + // note: these are split into methods to enable unit tests + Initialization.prototype.loadAppInsights = function () { + // initialize global instance of appInsights + var appInsights = new Microsoft.ApplicationInsights.AppInsights(this.config); + // implement legacy version of trackPageView for 0.10< + if (this.config["iKey"]) { + var originalTrackPageView = appInsights.trackPageView; + appInsights.trackPageView = function (pagePath, properties, measurements) { + originalTrackPageView.apply(appInsights, [null, pagePath, properties, measurements]); + }; + } + // implement legacy pageView interface if it is present in the snippet + var legacyPageView = "logPageView"; + if (typeof this.snippet[legacyPageView] === "function") { + appInsights[legacyPageView] = function (pagePath, properties, measurements) { + appInsights.trackPageView(null, pagePath, properties, measurements); + }; + } + // implement legacy event interface if it is present in the snippet + var legacyEvent = "logEvent"; + if (typeof this.snippet[legacyEvent] === "function") { + appInsights[legacyEvent] = function (name, properties, measurements) { + appInsights.trackEvent(name, properties, measurements); + }; + } + return appInsights; + }; + Initialization.prototype.emptyQueue = function () { + // call functions that were queued before the main script was loaded + try { + if (Microsoft.ApplicationInsights.Util.isArray(this.snippet.queue)) { + // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden. + var length = this.snippet.queue.length; + for (var i = 0; i < length; i++) { + var call = this.snippet.queue[i]; + call(); + } + this.snippet.queue = undefined; + delete this.snippet.queue; + } + } + catch (exception) { + var properties = {}; + if (exception && typeof exception.toString === "function") { + properties.exception = exception.toString(); + } + Microsoft.ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedToSendQueuedTelemetry, "Failed to send queued telemetry", properties); + } + }; + Initialization.prototype.pollInteralLogs = function (appInsightsInstance) { + return setInterval(function () { + var queue = Microsoft.ApplicationInsights._InternalLogging.queue; + var length = queue.length; + for (var i = 0; i < length; i++) { + appInsightsInstance.trackTrace(queue[i].message); + } + queue.length = 0; + }, 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 () { + // Adds the ability to flush all data before the page unloads. + // Note: This approach tries to push an async request with all the pending events onbeforeunload. + // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate. + // Telemetry here will help us analyze how effective this approach is. + // Another approach would be to make this call sync with a acceptable timeout to reduce the + // impact on user experience. + appInsightsInstance.context._sender.triggerSend(); + // Back up the current session to local storage + // This lets us close expired sessions after the cookies themselves expire + appInsightsInstance.context._sessionManager.backup(); + }; + if (!Microsoft.ApplicationInsights.Util.addEventHandler('beforeunload', performHousekeeping)) { + Microsoft.ApplicationInsights._InternalLogging.throwInternal(Microsoft.ApplicationInsights.LoggingSeverity.CRITICAL, Microsoft.ApplicationInsights._InternalMessageId.FailedToAddHandlerForOnBeforeUnload, 'Could not add handler for beforeunload'); + } + } + }; + Initialization.getDefaultConfig = function (config) { + if (!config) { + config = {}; + } + // set default values + config.endpointUrl = config.endpointUrl || "https://dc.services.visualstudio.com/v2/track"; + config.sessionRenewalMs = 30 * 60 * 1000; + config.sessionExpirationMs = 24 * 60 * 60 * 1000; + config.maxBatchSizeInBytes = config.maxBatchSizeInBytes > 0 ? config.maxBatchSizeInBytes : 102400; // 100kb + config.maxBatchInterval = !isNaN(config.maxBatchInterval) ? config.maxBatchInterval : 15000; + config.enableDebug = ApplicationInsights.Util.stringToBoolOrDefault(config.enableDebug); + config.disableExceptionTracking = ApplicationInsights.Util.stringToBoolOrDefault(config.disableExceptionTracking); + config.disableTelemetry = ApplicationInsights.Util.stringToBoolOrDefault(config.disableTelemetry); + config.verboseLogging = ApplicationInsights.Util.stringToBoolOrDefault(config.verboseLogging); + config.emitLineDelimitedJson = ApplicationInsights.Util.stringToBoolOrDefault(config.emitLineDelimitedJson); + config.diagnosticLogInterval = config.diagnosticLogInterval || 10000; + config.autoTrackPageVisitTime = ApplicationInsights.Util.stringToBoolOrDefault(config.autoTrackPageVisitTime); + if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) { + config.samplingPercentage = 100; + } + config.disableAjaxTracking = ApplicationInsights.Util.stringToBoolOrDefault(config.disableAjaxTracking); + config.maxAjaxCallsPerView = !isNaN(config.maxAjaxCallsPerView) ? config.maxAjaxCallsPerView : 500; + config.isBeaconApiDisabled = ApplicationInsights.Util.stringToBoolOrDefault(config.isBeaconApiDisabled, true); + config.disableCorrelationHeaders = ApplicationInsights.Util.stringToBoolOrDefault(config.disableCorrelationHeaders); + config.correlationHeaderExcludedDomains = config.correlationHeaderExcludedDomains || [ + "*.blob.core.windows.net", + "*.blob.core.chinacloudapi.cn", + "*.blob.core.cloudapi.de", + "*.blob.core.usgovcloudapi.net" + ]; + config.disableFlushOnBeforeUnload = ApplicationInsights.Util.stringToBoolOrDefault(config.disableFlushOnBeforeUnload); + config.enableSessionStorageBuffer = ApplicationInsights.Util.stringToBoolOrDefault(config.enableSessionStorageBuffer, true); + config.isRetryDisabled = ApplicationInsights.Util.stringToBoolOrDefault(config.isRetryDisabled); + config.isCookieUseDisabled = ApplicationInsights.Util.stringToBoolOrDefault(config.isCookieUseDisabled); + config.isStorageUseDisabled = ApplicationInsights.Util.stringToBoolOrDefault(config.isStorageUseDisabled); + config.isBrowserLinkTrackingEnabled = ApplicationInsights.Util.stringToBoolOrDefault(config.isBrowserLinkTrackingEnabled); + config.enableCorsCorrelation = ApplicationInsights.Util.stringToBoolOrDefault(config.enableCorsCorrelation); + return config; + }; + return Initialization; + }()); + ApplicationInsights.Initialization = Initialization; + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +/// +var Microsoft; +(function (Microsoft) { + var ApplicationInsights; + (function (ApplicationInsights) { + "use strict"; + try { + // only initialize if we are running in a browser that supports JSON serialization (ie7<, node.js, cordova) + if (typeof window !== "undefined" && typeof JSON !== "undefined") { + // get snippet or initialize to an empty object + var aiName = "appInsights"; + if (window[aiName] === undefined) { + // if no snippet is present, initialize default values + Microsoft.ApplicationInsights.AppInsights.defaultConfig = Microsoft.ApplicationInsights.Initialization.getDefaultConfig(); + } + else { + // this is the typical case for browser+snippet + var snippet = window[aiName] || {}; + // overwrite snippet with full appInsights + var init = new Microsoft.ApplicationInsights.Initialization(snippet); + var appInsightsLocal = init.loadAppInsights(); + // apply full appInsights to the global instance that was initialized in the snippet + for (var field in appInsightsLocal) { + snippet[field] = appInsightsLocal[field]; + } + init.emptyQueue(); + init.pollInteralLogs(appInsightsLocal); + init.addHousekeepingBeforeUnload(appInsightsLocal); + } + } + } + catch (e) { + Microsoft.ApplicationInsights._InternalLogging.warnToConsole('Failed to initialize AppInsights JS SDK: ' + e.message); + } + })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); +})(Microsoft || (Microsoft = {})); +//# sourceMappingURL=ai.js.map \ No newline at end of file diff --git a/dist/ai.1.0.20.min.js b/dist/ai.1.0.20.min.js new file mode 100644 index 00000000..dd22520c --- /dev/null +++ b/dist/ai.1.0.20.min.js @@ -0,0 +1,2 @@ +"use strict";var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){}}();e.Base=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){this.ver=1,this.sampleRate=100,this.tags={}}}();e.Envelope=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){e.Context||(e.Context={})}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var AI;!function(e){!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(e.SeverityLevel||(e.SeverityLevel={}))}(AI||(AI={}));var Microsoft;!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t;!function(e){e[e.CRITICAL=0]="CRITICAL",e[e.WARNING=1]="WARNING"}(t=e.LoggingSeverity||(e.LoggingSeverity={}));var n;!function(e){e[e.BrowserDoesNotSupportLocalStorage=0]="BrowserDoesNotSupportLocalStorage",e[e.BrowserCannotReadLocalStorage=1]="BrowserCannotReadLocalStorage",e[e.BrowserCannotReadSessionStorage=2]="BrowserCannotReadSessionStorage",e[e.BrowserCannotWriteLocalStorage=3]="BrowserCannotWriteLocalStorage",e[e.BrowserCannotWriteSessionStorage=4]="BrowserCannotWriteSessionStorage",e[e.BrowserFailedRemovalFromLocalStorage=5]="BrowserFailedRemovalFromLocalStorage",e[e.BrowserFailedRemovalFromSessionStorage=6]="BrowserFailedRemovalFromSessionStorage",e[e.CannotSendEmptyTelemetry=7]="CannotSendEmptyTelemetry",e[e.ClientPerformanceMathError=8]="ClientPerformanceMathError",e[e.ErrorParsingAISessionCookie=9]="ErrorParsingAISessionCookie",e[e.ErrorPVCalc=10]="ErrorPVCalc",e[e.ExceptionWhileLoggingError=11]="ExceptionWhileLoggingError",e[e.FailedAddingTelemetryToBuffer=12]="FailedAddingTelemetryToBuffer",e[e.FailedMonitorAjaxAbort=13]="FailedMonitorAjaxAbort",e[e.FailedMonitorAjaxDur=14]="FailedMonitorAjaxDur",e[e.FailedMonitorAjaxOpen=15]="FailedMonitorAjaxOpen",e[e.FailedMonitorAjaxRSC=16]="FailedMonitorAjaxRSC",e[e.FailedMonitorAjaxSend=17]="FailedMonitorAjaxSend",e[e.FailedMonitorAjaxGetCorrelationHeader=18]="FailedMonitorAjaxGetCorrelationHeader",e[e.FailedToAddHandlerForOnBeforeUnload=19]="FailedToAddHandlerForOnBeforeUnload",e[e.FailedToSendQueuedTelemetry=20]="FailedToSendQueuedTelemetry",e[e.FailedToReportDataLoss=21]="FailedToReportDataLoss",e[e.FlushFailed=22]="FlushFailed",e[e.MessageLimitPerPVExceeded=23]="MessageLimitPerPVExceeded",e[e.MissingRequiredFieldSpecification=24]="MissingRequiredFieldSpecification",e[e.NavigationTimingNotSupported=25]="NavigationTimingNotSupported",e[e.OnError=26]="OnError",e[e.SessionRenewalDateIsZero=27]="SessionRenewalDateIsZero",e[e.SenderNotInitialized=28]="SenderNotInitialized",e[e.StartTrackEventFailed=29]="StartTrackEventFailed",e[e.StopTrackEventFailed=30]="StopTrackEventFailed",e[e.StartTrackFailed=31]="StartTrackFailed",e[e.StopTrackFailed=32]="StopTrackFailed",e[e.TelemetrySampledAndNotSent=33]="TelemetrySampledAndNotSent",e[e.TrackEventFailed=34]="TrackEventFailed",e[e.TrackExceptionFailed=35]="TrackExceptionFailed",e[e.TrackMetricFailed=36]="TrackMetricFailed",e[e.TrackPVFailed=37]="TrackPVFailed",e[e.TrackPVFailedCalc=38]="TrackPVFailedCalc",e[e.TrackTraceFailed=39]="TrackTraceFailed",e[e.TransmissionFailed=40]="TransmissionFailed",e[e.FailedToSetStorageBuffer=41]="FailedToSetStorageBuffer",e[e.FailedToRestoreStorageBuffer=42]="FailedToRestoreStorageBuffer",e[e.InvalidBackendResponse=43]="InvalidBackendResponse",e[e.FailedToFixDepricatedValues=44]="FailedToFixDepricatedValues",e[e.InvalidDurationValue=45]="InvalidDurationValue",e[e.CannotSerializeObject=46]="CannotSerializeObject",e[e.CannotSerializeObjectNonSerializable=47]="CannotSerializeObjectNonSerializable",e[e.CircularReferenceDetected=48]="CircularReferenceDetected",e[e.ClearAuthContextFailed=49]="ClearAuthContextFailed",e[e.ExceptionTruncated=50]="ExceptionTruncated",e[e.IllegalCharsInName=51]="IllegalCharsInName",e[e.ItemNotInArray=52]="ItemNotInArray",e[e.MaxAjaxPerPVExceeded=53]="MaxAjaxPerPVExceeded",e[e.MessageTruncated=54]="MessageTruncated",e[e.NameTooLong=55]="NameTooLong",e[e.SampleRateOutOfRange=56]="SampleRateOutOfRange",e[e.SetAuthContextFailed=57]="SetAuthContextFailed",e[e.SetAuthContextFailedAccountName=58]="SetAuthContextFailedAccountName",e[e.StringValueTooLong=59]="StringValueTooLong",e[e.StartCalledMoreThanOnce=60]="StartCalledMoreThanOnce",e[e.StopCalledWithoutStart=61]="StopCalledWithoutStart",e[e.TelemetryInitializerFailed=62]="TelemetryInitializerFailed",e[e.TrackArgumentsNotSpecified=63]="TrackArgumentsNotSpecified",e[e.UrlTooLong=64]="UrlTooLong",e[e.SessionStorageBufferFull=65]="SessionStorageBufferFull",e[e.CannotAccessCookie=66]="CannotAccessCookie",e[e.IdTooLong=67]="IdTooLong"}(n=e._InternalMessageId||(e._InternalMessageId={}));var i=function(){function e(t,i,o,a){void 0===o&&(o=!1),this.messageId=t,this.message=(o?e.AiUserActionablePrefix:e.AiNonUserActionablePrefix)+n[t].toString();var r=(i?" message:"+e.sanitizeDiagnosticText(i):"")+(a?" props:"+e.sanitizeDiagnosticText(JSON.stringify(a)):"");this.message+=r}return e.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},e.AiNonUserActionablePrefix="AI (Internal): ",e.AiUserActionablePrefix="AI: ",e}();e._InternalLogMessage=i;var o=function(){function o(){}return o.throwInternal=function(e,t,o,a,r){void 0===r&&(r=!1);var s=new i(t,o,r,a);if(this.enableDebugExceptions())throw s;if(void 0!==s&&s&&"undefined"!=typeof s.message){if(r){var l=n[s.messageId];this._messageLogged[l]&&!this.verboseLogging()||(this.warnToConsole(s.message),this._messageLogged[l]=!0)}else this.verboseLogging()&&this.warnToConsole(s.message);this.logInternalMessage(e,s)}},o.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},o.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},o.clearInternalMessageLoggedTypes=function(){if(e.Util.canUseSessionStorage())for(var t=e.Util.getSessionStorageKeys(),n=0;n=this.MAX_INTERNAL_MESSAGE_LIMIT},o.AIInternalMessagePrefix="AITR_",o.enableDebugExceptions=function(){return!1},o.verboseLogging=function(){return!1},o.queue=[],o.MAX_INTERNAL_MESSAGE_LIMIT=25,o._messageCount=0,o._messageLogged={},o}();e._InternalLogging=o}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.newId=function(){for(var e="",t=1073741824*Math.random();t>0;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},e}();e.UtilHelpers=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t;!function(e){e[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage"}(t||(t={}));var n=function(){function n(){}return n.disableStorage=function(){n._canUseLocalStorage=!1,n._canUseSessionStorage=!1},n._getLocalStorageObject=function(){return n.canUseLocalStorage()?n._getVerifiedStorageObject(t.LocalStorage):null},n._getVerifiedStorageObject=function(e){var n,i,o=null;try{i=new Date,(o=e===t.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),n=o.getItem(i)!=i,o.removeItem(i),n&&(o=null)}catch(a){o=null}return o},n.isInternalApplicationInsightsEndpoint=function(e){return-1!==n._internalEndpoints.indexOf(e.toLowerCase())},n.canUseLocalStorage=function(){return n._canUseLocalStorage===undefined&&(n._canUseLocalStorage=!!n._getVerifiedStorageObject(t.LocalStorage)),n._canUseLocalStorage},n.getStorage=function(t){var i=n._getLocalStorageObject();if(null!==i)try{return i.getItem(t)}catch(o){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+n.getExceptionName(o),{exception:n.dump(o)})}return null},n.setStorage=function(t,i){var o=n._getLocalStorageObject();if(null!==o)try{return o.setItem(t,i),!0}catch(a){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+n.getExceptionName(a),{exception:n.dump(a)})}return!1},n.removeStorage=function(t){var i=n._getLocalStorageObject();if(null!==i)try{return i.removeItem(t),!0}catch(o){n._canUseLocalStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+n.getExceptionName(o),{exception:n.dump(o)})}return!1},n._getSessionStorageObject=function(){return n.canUseSessionStorage()?n._getVerifiedStorageObject(t.SessionStorage):null},n.canUseSessionStorage=function(){return n._canUseSessionStorage===undefined&&(n._canUseSessionStorage=!!n._getVerifiedStorageObject(t.SessionStorage)),n._canUseSessionStorage},n.getSessionStorageKeys=function(){var e=[];if(n.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},n.getSessionStorage=function(t){var i=n._getSessionStorageObject();if(null!==i)try{return i.getItem(t)}catch(o){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+n.getExceptionName(o),{exception:n.dump(o)})}return null},n.setSessionStorage=function(t,i){var o=n._getSessionStorageObject();if(null!==o)try{return o.setItem(t,i),!0}catch(a){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+n.getExceptionName(a),{exception:n.dump(a)})}return!1},n.removeSessionStorage=function(t){var i=n._getSessionStorageObject();if(null!==i)try{return i.removeItem(t),!0}catch(o){n._canUseSessionStorage=!1,e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+n.getExceptionName(o),{exception:n.dump(o)})}return!1},n.disableCookies=function(){n._canUseCookies=!1},n.canUseCookies=function(){if(n._canUseCookies===undefined){n._canUseCookies=!1;try{n._canUseCookies=n.document.cookie!==undefined}catch(t){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.CannotAccessCookie,"Cannot access document.cookie - "+n.getExceptionName(t),{exception:n.dump(t)})}}return n._canUseCookies},n.setCookie=function(e,t,i){var o="",a="";i&&(o=";domain="+i),n.document.location&&"https:"===n.document.location.protocol&&(a=";secure"),n.canUseCookies()&&(n.document.cookie=e+"="+t+o+";path=/"+a)},n.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},n.getCookie=function(e){if(n.canUseCookies()){var t="";if(e&&e.length)for(var i=e+"=",o=n.document.cookie.split(";"),a=0;a0?a+".":"")+o+":"+i+":"+n+"."+t},n.isCrossOriginError=function(e,t,n,i,o){return("Script error."===e||"Script error"===e)&&!o},n.dump=function(e){var t=Object.prototype.toString.call(e),n=JSON.stringify(e);return"[object Error]"===t&&(n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+n},n.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},n.addEventHandler=function(e,t){if(!window||"string"!=typeof e||"function"!=typeof t)return!1;var n="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(n,t)}return!0},n.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},n.document="undefined"!=typeof document?document:{},n._canUseCookies=undefined,n._canUseLocalStorage=undefined,n._canUseSessionStorage=undefined,n._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],n.NotSpecified="not_specified",n}();e.Util=n;var i=function(){function e(){}return e.parseUrl=function(t){return e.htmlAnchorElement||(e.htmlAnchorElement=e.document.createElement?e.document.createElement("a"):{}),e.htmlAnchorElement.href=t,e.htmlAnchorElement},e.getAbsoluteUrl=function(t){var n,i=e.parseUrl(t);return i&&(n=i.href),n},e.getPathName=function(t){var n,i=e.parseUrl(t);return i&&(n=i.pathname),n},e.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},e.document="undefined"!=typeof document?document:{},e}();e.UrlHelper=i;var o=function(){function t(){}return t.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var o=i.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||o===n))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var r=0;r100||t<0)&&(e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new e.SamplingScoreGenerator}return t.prototype.isSampledIn=function(e){return 100==this.sampleRate||this.samplingScoreGenerator.getSamplingScore(e)this.config.sessionExpirationMs(),o=n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();i||o?(this.automaticSession.isFirst=undefined,this.renew()):(!this.cookieUpdatedTimestamp||n-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=n,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},t.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},t.prototype.initializeAutomaticSession=function(){var t=e.Util.getCookie("ai_session");if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var n=e.Util.getStorage("ai_session");n&&this.initializeAutomaticSessionWithData(n)}this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},t.prototype.initializeAutomaticSessionWithData=function(t){var n=t.split("|");n.length>0&&(this.automaticSession.id=n[0]);try{if(n.length>1){var i=+n[1];this.automaticSession.acquisitionDate=+new Date(i),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0}if(n.length>2){var o=+n[2];this.automaticSession.renewalDate=+new Date(o),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0}}catch(a){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+e.Util.getExceptionName(a),{exception:e.Util.dump(a)})}0==this.automaticSession.renewalDate&&e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=e.dateTime.Now();this.automaticSession.id=e.Util.newId(),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),e.Util.canUseLocalStorage()||e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,n,i){var o=n+this.config.sessionExpirationMs(),a=i+this.config.sessionRenewalMs(),r=new Date,s=[t,n,i];o0&&(this.id=o[0])}if(this.config=n,!this.id){this.id=e.Util.newId();var a=new Date,r=e.Util.toISOStringForIE8(a);this.accountAcquisitionDate=r,a.setTime(a.getTime()+31536e6);var s=[this.id,r],l=this.config.cookieDomain?this.config.cookieDomain():undefined;e.Util.setCookie(t.userCookieName,s.join(t.cookieSeparator)+";expires="+a.toUTCString(),l),e.Util.removeStorage("ai_session")}this.accountId=n.accountId?n.accountId():undefined;var c=e.Util.getCookie(t.authUserCookieName);if(c){var u=(c=decodeURI(c)).split(t.cookieSeparator);u[0]&&(this.authenticatedId=u[0]),u.length>1&&u[1]&&(this.accountId=u[1])}}return t.prototype.setAuthenticatedUserContext=function(n,i,o){if(void 0===o&&(o=!1),!this.validateUserInput(n)||i&&!this.validateUserInput(i))e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=n;var a=this.authenticatedId;i&&(this.accountId=i,a=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),o&&e.Util.setCookie(t.authUserCookieName,encodeURI(a),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,e.Util.deleteCookie(t.authUserCookieName)},t.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}();t.User=n}(e.Context||(e.Context={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.IsNullOrUndefined=function(e){return void 0===e||null===e},e}();e.extensions=t;var n=function(){function e(){}return e.GetLength=function(e){var n=0;if(!t.IsNullOrUndefined(e)){var i="";try{i=e.toString()}catch(o){}n=i.length,n=isNaN(n)?0:n}return n},e}();e.stringUtils=n;var i=function(){function e(){}return e.Now=window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,n){var i=null;return 0===e||0===n||t.IsNullOrUndefined(e)||t.IsNullOrUndefined(n)||(i=n-e),i},e}();e.dateTime=i;var o=function(){function e(){}return e.AttachEvent=function(e,n,i){var o=!1;return t.IsNullOrUndefined(e)||(t.IsNullOrUndefined(e.attachEvent)?t.IsNullOrUndefined(e.addEventListener)||(e.addEventListener(n,i,!1),o=!0):(e.attachEvent("on"+n,i),o=!0)),o},e.DetachEvent=function(e,n,i){t.IsNullOrUndefined(e)||(t.IsNullOrUndefined(e.detachEvent)?t.IsNullOrUndefined(e.removeEventListener)||e.removeEventListener(n,i,!1):e.detachEvent("on"+n,i))},e}();e.EventHelper=o;var a=function(){function t(){}return t.ParseDependencyPath=function(t,n,i){var o,a;if(t&&t.length>0){var r=e.UrlHelper.parseUrl(t);o=r.host,null!=r.pathname?("/"!==(i=0===r.pathname.length?"/":r.pathname).charAt(0)&&(i="/"+i),a=e.Telemetry.Common.DataSanitizer.sanitizeString(n?n+" "+i:i)):a=e.Telemetry.Common.DataSanitizer.sanitizeString(t)}else o=i,a=i;return{target:o,name:a}},t}();e.AjaxHelper=a}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}}();e.XHRMonitoringState=t;var n=function(){function n(n){this.completed=!1,this.requestHeadersSize=null,this.ttfb=null,this.responseReceivingDuration=null,this.callbackDuration=null,this.ajaxTotalDuration=null,this.aborted=null,this.pageUrl=null,this.requestUrl=null,this.requestSize=0,this.method=null,this.status=null,this.requestSentTime=null,this.responseStartedTime=null,this.responseFinishedTime=null,this.callbackFinishedTime=null,this.endTime=null,this.originalOnreadystatechage=null,this.xhrMonitoringState=new t,this.clientFailure=0,this.CalculateMetrics=function(){var t=this;t.ajaxTotalDuration=Math.round(1e3*e.dateTime.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3},this.id=n}return n.prototype.getAbsoluteUrl=function(){return this.requestUrl?e.UrlHelper.getAbsoluteUrl(this.requestUrl):null},n.prototype.getPathName=function(){return this.requestUrl?e.Telemetry.Common.DataSanitizer.sanitizeUrl(e.UrlHelper.getCompleteUrl(this.method,this.requestUrl)):null},n}();e.ajaxRecord=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}();e.RequestHeaders=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){return function(){}}();e.Domain=t}(e.Telemetry||(e.Telemetry={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.EventData=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(e.EventData);e.PageViewData=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.RemoteDependencyData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){!function(t){var n=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(e,n){var i=e.length,o=t.sanitizeKey(e);if(o.length!==i){for(var a=0,r=o;n[r]!==undefined;)a++,r=o.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(a);o=r}return o},t.sanitizeKey=function(n){return n&&(n=e.Util.trim(n.toString())).length>t.MAX_NAME_LENGTH&&(n=n.substring(0,t.MAX_NAME_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.NameTooLong,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:n},!0)),n},t.sanitizeString=function(n,i){return void 0===i&&(i=t.MAX_STRING_LENGTH),n&&(i=i||t.MAX_STRING_LENGTH,(n=e.Util.trim(n)).toString().length>i&&(n=n.toString().substring(0,i),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.StringValueTooLong,"string value is too long. It has been truncated to "+i+" characters.",{value:n},!0))),n},t.sanitizeUrl=function(n){return t.sanitizeInput(n,t.MAX_URL_LENGTH,e._InternalMessageId.UrlTooLong)},t.sanitizeMessage=function(n){return n&&n.length>t.MAX_MESSAGE_LENGTH&&(n=n.substring(0,t.MAX_MESSAGE_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.MessageTruncated,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:n},!0)),n},t.sanitizeException=function(n){return n&&n.length>t.MAX_EXCEPTION_LENGTH&&(n=n.substring(0,t.MAX_EXCEPTION_LENGTH),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.ExceptionTruncated,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:n},!0)),n},t.sanitizeProperties=function(e){if(e){var n={};for(var i in e){var o=t.sanitizeString(e[i],t.MAX_PROPERTY_LENGTH);n[i=t.sanitizeKeyAndAddUniqueness(i,n)]=o}e=n}return e},t.sanitizeMeasurements=function(e){if(e){var n={};for(var i in e){var o=e[i];n[i=t.sanitizeKeyAndAddUniqueness(i,n)]=o}e=n}return e},t.sanitizeId=function(n){return n?t.sanitizeInput(n,t.MAX_ID_LENGTH,e._InternalMessageId.IdTooLong).toString():n},t.sanitizeInput=function(t,n,i){return t&&(t=e.Util.trim(t)).length>n&&(t=t.substring(0,n),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},t.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},t.MAX_NAME_LENGTH=150,t.MAX_ID_LENGTH=128,t.MAX_PROPERTY_LENGTH=8192,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}();t.DataSanitizer=n}(t.Common||(t.Common={}))}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a,r,s,l,c,u,g){var p=n.call(this)||this;p.aiDataContract={id:e.FieldType.Required,ver:e.FieldType.Required,name:e.FieldType.Default,resultCode:e.FieldType.Default,duration:e.FieldType.Default,success:e.FieldType.Default,data:e.FieldType.Default,target:e.FieldType.Default,type:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default,kind:e.FieldType.Default,value:e.FieldType.Default,count:e.FieldType.Default,min:e.FieldType.Default,max:e.FieldType.Default,stdDev:e.FieldType.Default,dependencyKind:e.FieldType.Default,dependencySource:e.FieldType.Default,commandName:e.FieldType.Default,dependencyTypeName:e.FieldType.Default},p.id=i,p.duration=e.Util.msToTimeSpan(r),p.success=s,p.resultCode=l+"",p.type="Ajax",p.data=t.Common.DataSanitizer.sanitizeUrl(a);var d=e.AjaxHelper.ParseDependencyPath(o,c,a);return p.target=d.target,p.name=d.name,p.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(u),p.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(g),p}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",i.dataType="RemoteDependencyData",i}(AI.RemoteDependencyData);t.RemoteDependencyData=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){this.currentWindowHost=window.location.host&&window.location.host.toLowerCase(),this.appInsights=e,this.initialized=!1,this.Init()}return n.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},n.prototype.isMonitoredInstance=function(e,i){return this.initialized&&(!0===i||!t.extensions.IsNullOrUndefined(e.ajaxData))&&!0!==e[n.DisabledPropertyName]},n.prototype.supportsMonitoring=function(){var e=!0;(t.extensions.IsNullOrUndefined(XMLHttpRequest)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send)||t.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1);try{" a ".trim()}catch(n){e=!1}return e},n.prototype.instrumentOpen=function(){var i=XMLHttpRequest.prototype.open,o=this;XMLHttpRequest.prototype.open=function(a,r,s){try{!o.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||o.openHandler(this,a,r,s)}catch(l){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(l)})}return i.apply(this,arguments)}},n.prototype.openHandler=function(e,n,i,o){var a="|"+this.appInsights.context.operation.id+"."+t.Util.newId(),r=new t.ajaxRecord(a);r.method=n,r.requestUrl=i,r.xhrMonitoringState.openDone=!0,e.ajaxData=r,this.attachToOnReadyStateChange(e)},n.getFailedAjaxDiagnosticsMessage=function(e){var n="";try{t.extensions.IsNullOrUndefined(e)||t.extensions.IsNullOrUndefined(e.ajaxData)||t.extensions.IsNullOrUndefined(e.ajaxData.requestUrl)||(n+="(url: '"+e.ajaxData.requestUrl+"')")}catch(i){}return n},n.prototype.instrumentSend=function(){var i=XMLHttpRequest.prototype.send,o=this;XMLHttpRequest.prototype.send=function(a){try{o.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&o.sendHandler(this,a)}catch(r){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(r)})}return i.apply(this,arguments)}},n.prototype.sendHandler=function(e,n){if(e.ajaxData.requestSentTime=t.dateTime.Now(),t.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config,e.ajaxData.getAbsoluteUrl(),this.currentWindowHost)&&(e.setRequestHeader(t.RequestHeaders.requestIdHeader,e.ajaxData.id),this.appInsights.context)){var i=this.appInsights.context.appId();i&&e.setRequestHeader(t.RequestHeaders.requestContextHeader,t.RequestHeaders.requestContextAppIdFormat+i)}e.ajaxData.xhrMonitoringState.sendDone=!0},n.prototype.instrumentAbort=function(){var i=XMLHttpRequest.prototype.abort,o=this;XMLHttpRequest.prototype.abort=function(){try{o.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(a){t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(this),exception:e.ApplicationInsights.Util.dump(a)})}return i.apply(this,arguments)}},n.prototype.attachToOnReadyStateChange=function(i){var o=this;i.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=t.EventHelper.AttachEvent(i,"readystatechange",function(){try{o.isMonitoredInstance(i)&&4===i.readyState&&o.onAjaxComplete(i)}catch(r){var a=e.ApplicationInsights.Util.dump(r);a&&-1!=a.toLowerCase().indexOf("c00c023f")||t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(r)})}})},n.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=t.dateTime.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(e),requestSentTime:e.ajaxData.requestSentTime,responseFinishedTime:e.ajaxData.responseFinishedTime});else{var i=new t.Telemetry.RemoteDependencyData(e.ajaxData.id,e.ajaxData.getAbsoluteUrl(),e.ajaxData.getPathName(),e.ajaxData.ajaxTotalDuration,+e.ajaxData.status>=200&&+e.ajaxData.status<400,+e.ajaxData.status,e.ajaxData.method),o=this.getCorrelationContext(e);o&&(i.target=i.target+" | "+o),this.appInsights.trackDependencyData(i),e.ajaxData=null}},n.prototype.getCorrelationContext=function(i){try{var o=i.getAllResponseHeaders();if(null!==o&&-1!==o.toLowerCase().indexOf(t.RequestHeaders.requestContextHeaderLowerCase)){var a=i.getResponseHeader(t.RequestHeaders.requestContextHeader);return t.CorrelationIdHelper.getCorrelationContext(a)}}catch(r){t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:n.getFailedAjaxDiagnosticsMessage(i),exception:e.ApplicationInsights.Util.dump(r)})}},n.instrumentedByAppInsightsName="InstrumentedByAppInsights",n.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",n}();t.AjaxMonitor=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}();e.ArraySendBuffer=t;var n=function(){function t(e){this._bufferFullMessageSent=!1,this._config=e;var n=this.getBuffer(t.BUFFER_KEY),i=this.getBuffer(t.SENT_BUFFER_KEY);this._buffer=n.concat(i),this._buffer.length>t.MAX_BUFFER_SIZE&&(this._buffer.length=t.MAX_BUFFER_SIZE),this.setBuffer(t.SENT_BUFFER_KEY,[]),this.setBuffer(t.BUFFER_KEY,this._buffer)}return t.prototype.enqueue=function(n){this._buffer.length>=t.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(n),this.setBuffer(t.BUFFER_KEY,this._buffer))},t.prototype.count=function(){return this._buffer.length},t.prototype.clear=function(){this._buffer.length=0,this.setBuffer(t.BUFFER_KEY,[]),this.setBuffer(t.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},t.prototype.getItems=function(){return this._buffer.slice(0)},t.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},t.prototype.markAsSent=function(n){this._buffer=this.removePayloadsFromBuffer(n,this._buffer),this.setBuffer(t.BUFFER_KEY,this._buffer);var i=this.getBuffer(t.SENT_BUFFER_KEY);i instanceof Array&&n instanceof Array&&((i=i.concat(n)).length>t.MAX_BUFFER_SIZE&&(e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+i.length,!0),i.length=t.MAX_BUFFER_SIZE),this.setBuffer(t.SENT_BUFFER_KEY,i))},t.prototype.clearSent=function(e){var n=this.getBuffer(t.SENT_BUFFER_KEY);n=this.removePayloadsFromBuffer(e,n),this.setBuffer(t.SENT_BUFFER_KEY,n)},t.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var o=!1;for(var a in e)if(e[a]===t[i]){o=!0;break}o||n.push(t[i])}return n},t.prototype.getBuffer=function(t){try{var n=e.Util.getSessionStorage(t);if(n){var i=JSON.parse(n);if(i)return i}}catch(o){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.FailedToRestoreStorageBuffer," storage key: "+t+", "+e.Util.getExceptionName(o),{exception:e.Util.dump(o)})}return[]},t.prototype.setBuffer=function(t,n){try{var i=JSON.stringify(n);e.Util.setSessionStorage(t,i)}catch(o){e.Util.setSessionStorage(t,JSON.stringify([])),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.FailedToSetStorageBuffer," storage key: "+t+", "+e.Util.getExceptionName(o)+". Buffer cleared",{exception:e.Util.dump(o)})}},t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}();e.SessionStorageSendBuffer=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function t(t){this._XMLHttpRequestSupported=!1,this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._config=t,this._sender=null,this._buffer=e.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new e.SessionStorageSendBuffer(t):new e.ArraySendBuffer(t),!this._config.isBeaconApiDisabled()&&e.Util.IsBeaconApiSupported()?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))}return t.prototype.send=function(t){try{if(this._config.disableTelemetry())return;if(!t)return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(!this._sender)return void e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.SenderNotInitialized,"Sender was not initialized");var n=e.Serializer.serialize(t),i=this._buffer.getItems(),o=this._buffer.batchPayloads(i);o&&o.length+n.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(n),this._setupTimer()}catch(a){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+e.Util.getExceptionName(a),{exception:e.Util.dump(a)})}},t.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},t.prototype._getSizeInBytes=function(e){var t=0;if(e&&e.length)for(var n=0;n0){var n=this._buffer.getItems();this._sender(n,t)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(i){(!e.Util.getIEVersion()||e.Util.getIEVersion()>9)&&e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+e.Util.getExceptionName(i),{exception:e.Util.dump(i)})}},t.prototype._setRetryTime=function(){var e;if(this._consecutiveErrors<=1)e=10;else{var t=(Math.pow(2,this._consecutiveErrors)-1)/2,n=Math.floor(Math.random()*t*10)+1;e=Math.max(Math.min(n,3600),10)}var i=Date.now()+1e3*e;this._retryAt=i},t.prototype._parseResponse=function(t){try{if(t&&""!==t){var n=JSON.parse(t);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted==n.errors.length)return n}}catch(i){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.InvalidBackendResponse,"Cannot parse the response. "+e.Util.getExceptionName(i),{response:t})}return null},t.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},t.prototype._resendPayload=function(e){if(e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var t=0,n=e;t=300)&&0!==t.status?!this._config.isRetryDisabled()&&this._isRetriable(t.status)?(this._resendPayload(n),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.TransmissionFailed,". Response code "+t.status+". Will retry to send "+n.length+" items.")):this._onError(n,this._formatErrorMessageXhr(t)):206===t.status?(o||(o=this._parseResponse(t.responseText||t.response)),o&&!this._config.isRetryDisabled()?this._onPartialSuccess(n,o):this._onError(n,this._formatErrorMessageXhr(t))):(this._consecutiveErrors=0,this._onSuccess(n,i))}},t.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},t.prototype._onPartialSuccess=function(t,n){for(var i=[],o=[],a=0,r=n.errors.reverse();a0&&this._onSuccess(t,n.itemsAccepted),i.length>0&&this._onError(i,this._formatErrorMessageXhr(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),o.length>0&&(this._resendPayload(o),e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.TransmissionFailed,"Partial success. Delivered: "+t.length+", Failed: "+i.length+". Will retry to send "+o.length+" our of "+n.itemsReceived+" items"))},t.prototype._onError=function(t,n,i){e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.OnError,"Failed to send telemetry.",{message:n}),this._buffer.clearSent(t)},t.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},t.MaxBeaconPayloadSize=65536,t}();e.Sender=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.MessageData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a){var r=n.call(this)||this;return r.aiDataContract={ver:e.FieldType.Required,message:e.FieldType.Required,severityLevel:e.FieldType.Default,properties:e.FieldType.Default},i=i||e.Util.NotSpecified,r.message=t.Common.DataSanitizer.sanitizeMessage(i),r.properties=t.Common.DataSanitizer.sanitizeProperties(o),a&&(r.severityLevel=a),r}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.Message",i.dataType="MessageData",i}(AI.MessageData);t.Trace=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(t){function n(n,i,o){var a=t.call(this)||this;return a.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Required,properties:e.FieldType.Default,measurements:e.FieldType.Default},a.name=e.Telemetry.Common.DataSanitizer.sanitizeString(n)||e.Util.NotSpecified,a.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(i),a.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o),a}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Event",n.dataType="EventData",n}(AI.EventData);t.Event=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(){return function(){this.hasFullStack=!0,this.parsedStack=[]}}();e.ExceptionDetails=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.ExceptionData=t}(AI||(AI={}));var AI;!function(e){var t=function(){return function(){}}();e.StackFrame=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(t){function n(n,o,a,r){var s=t.call(this)||this;return s.aiDataContract={ver:e.FieldType.Required,exceptions:e.FieldType.Required,severityLevel:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default},s.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(o),s.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(a),s.exceptions=[new i(n)],r&&(s.severityLevel=r),s}return __extends(n,t),n.CreateSimpleException=function(e,t,n,i,o,a){return{exceptions:[{hasFullStack:!0,message:e,stack:o,typeName:t}]}},n.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",n.dataType="ExceptionData",n}(AI.ExceptionData);t.Exception=n;var i=function(n){function i(i){var o=n.call(this)||this;o.aiDataContract={id:e.FieldType.Default,outerId:e.FieldType.Default,typeName:e.FieldType.Required,message:e.FieldType.Required,hasFullStack:e.FieldType.Default,stack:e.FieldType.Default,parsedStack:e.FieldType.Array},o.typeName=t.Common.DataSanitizer.sanitizeString(i.name)||e.Util.NotSpecified,o.message=t.Common.DataSanitizer.sanitizeMessage(i.message)||e.Util.NotSpecified;var a=i.stack;return o.parsedStack=o.parseStack(a),o.stack=t.Common.DataSanitizer.sanitizeException(a),o.hasFullStack=e.Util.isArray(o.parsedStack)&&o.parsedStack.length>0,o}return __extends(i,n),i.prototype.parseStack=function(e){var t=undefined;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,a=0,r=0;r<=n.length;r++){var s=n[r];if(o.regex.test(s)){var l=new o(n[r],i++);a+=l.sizeInBytes,t.push(l)}}if(a>32768)for(var c=0,u=t.length-1,g=0,p=c,d=u;c32768){var f=d-p+1;t.splice(p,f);break}p=c,d=u,c++,u--}}return t},i}(AI.ExceptionDetails),o=function(t){function n(i,o){var a=t.call(this)||this;a.sizeInBytes=0,a.aiDataContract={level:e.FieldType.Required,method:e.FieldType.Required,assembly:e.FieldType.Default,fileName:e.FieldType.Default,line:e.FieldType.Default},a.level=o,a.method="",a.assembly=e.Util.trim(i);var r=i.match(n.regex);return r&&r.length>=5&&(a.method=e.Util.trim(r[2])||a.method,a.fileName=e.Util.trim(r[4]),a.line=parseInt(r[5])||0),a.sizeInBytes+=a.method.length,a.sizeInBytes+=a.fileName.length,a.sizeInBytes+=a.assembly.length,a.sizeInBytes+=n.baseSize,a.sizeInBytes+=a.level.toString().length,a.sizeInBytes+=a.line.toString().length,a}return __extends(n,t),n.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,n.baseSize=58,n}(AI.StackFrame);t._StackFrame=o}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(e.DataPointType||(e.DataPointType={}))}(AI||(AI={}));var AI;!function(e){var t=function(){return function(){this.kind=e.DataPointType.Measurement}}();e.DataPoint=t}(AI||(AI={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return __extends(t,e),t}(Microsoft.Telemetry.Domain);e.MetricData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.aiDataContract={name:e.FieldType.Required,kind:e.FieldType.Default,value:e.FieldType.Required,count:e.FieldType.Default,min:e.FieldType.Default,max:e.FieldType.Default,stdDev:e.FieldType.Default},n}return __extends(n,t),n}(AI.DataPoint);t.DataPoint=n}(t.Common||(t.Common={}))}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){!function(n){var i=function(i){function o(o,a,r,s,l,c){var u=i.call(this)||this;u.aiDataContract={ver:t.FieldType.Required,metrics:t.FieldType.Required,properties:t.FieldType.Default};var g=new e.ApplicationInsights.Telemetry.Common.DataPoint;return g.count=r>0?r:undefined,g.max=isNaN(l)||null===l?undefined:l,g.min=isNaN(s)||null===s?undefined:s,g.name=n.Common.DataSanitizer.sanitizeString(o)||t.Util.NotSpecified,g.value=a,u.metrics=[g],u.properties=t.Telemetry.Common.DataSanitizer.sanitizeProperties(c),u}return __extends(o,i),o.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",o.dataType="MetricData",o}(AI.MetricData);n.Metric=i}(t.Telemetry||(t.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(i,o,a,r,s,l){var c=n.call(this)||this;return c.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Default,url:e.FieldType.Default,duration:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default,id:e.FieldType.Default},c.id=t.Common.DataSanitizer.sanitizeId(l),c.url=t.Common.DataSanitizer.sanitizeUrl(o),c.name=t.Common.DataSanitizer.sanitizeString(i)||e.Util.NotSpecified,isNaN(a)||(c.duration=e.Util.msToTimeSpan(a)),c.properties=e.Telemetry.Common.DataSanitizer.sanitizeProperties(r),c.measurements=e.Telemetry.Common.DataSanitizer.sanitizeMeasurements(s),c}return __extends(i,n),i.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",i.dataType="PageviewData",i}(AI.PageViewData);t.PageView=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var AI;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return __extends(t,e),t}(e.PageViewData);e.PageViewPerfData=t}(AI||(AI={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(n){function i(o,a,r,s,l){var c=n.call(this)||this;c.aiDataContract={ver:e.FieldType.Required,name:e.FieldType.Default,url:e.FieldType.Default,duration:e.FieldType.Default,perfTotal:e.FieldType.Default,networkConnect:e.FieldType.Default,sentRequest:e.FieldType.Default,receivedResponse:e.FieldType.Default,domProcessing:e.FieldType.Default,properties:e.FieldType.Default,measurements:e.FieldType.Default},c.isValid=!1;var u=i.getPerformanceTiming();if(u){var g=i.getDuration(u.navigationStart,u.loadEventEnd),p=i.getDuration(u.navigationStart,u.connectEnd),d=i.getDuration(u.requestStart,u.responseStart),f=i.getDuration(u.responseStart,u.responseEnd),h=i.getDuration(u.responseEnd,u.loadEventEnd);0==g?e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.ErrorPVCalc,"error calculating page view performance.",{total:g,network:p,request:d,response:f,dom:h}):i.shouldCollectDuration(g,p,d,f,h)?g0&&e.navigationStart>0&&e.responseStart>0&&e.requestStart>0&&e.loadEventEnd>0&&e.responseEnd>0&&e.connectEnd>0&&e.domLoading>0},i.getDuration=function(e,t){var n=undefined;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},i.shouldCollectDuration=function(){for(var e=[],t=0;t=i.MAX_DURATION_ALLOWED)return!1;return!0},i.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",i.dataType="PageviewPerformanceData",i.MAX_DURATION_ALLOWED=36e5,i}(AI.PageViewPerfData);t.PageViewPerformance=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(e){var n=this;this._config=e,this._sender=new t.Sender(e),this.appId=function(){return n._sender._appId},e.appId()&&(this._sender._appId=e.appId()),this.telemetryInitializers=[],"undefined"!=typeof window&&(this._sessionManager=new t.Context._SessionManager(e),this.application=new t.Context.Application,this.device=new t.Context.Device,this.internal=new t.Context.Internal(e),this.location=new t.Context.Location,this.user=new t.Context.User(e),this.operation=new t.Context.Operation,this.session=new t.Context.Session,this.sample=new t.Context.Sample(e.sampleRate())),this._addDefaultTelemetryInitializers()}return n.prototype.addTelemetryInitializer=function(e){this.telemetryInitializers.push(e)},n.prototype.track=function(e){return e?(e.name===t.Telemetry.PageView.envelopeType&&t._InternalLogging.resetInternalMessageCount(),this.session&&"string"!=typeof this.session.id&&this._sessionManager.update(),this._track(e)):t._InternalLogging.throwInternal(t.LoggingSeverity.CRITICAL,t._InternalMessageId.TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument",null,!0),e},n.prototype._addDefaultTelemetryInitializers=function(){if(!this._config.isBrowserLinkTrackingEnabled()){var t=["/browserLinkSignalR/","/__browserLink/"];this.addTelemetryInitializer(function(n){if(n.name===e.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType){var i=n.data;if(i&&i.baseData)for(var o=0;o=0)return!1}return!0})}},n.prototype._track=function(e){this.session&&("string"==typeof this.session.id?this._applySessionContext(e,this.session):this._applySessionContext(e,this._sessionManager.automaticSession)),this._applyApplicationContext(e,this.application),this._applyDeviceContext(e,this.device),this._applyInternalContext(e,this.internal),this._applyLocationContext(e,this.location),this._applySampleContext(e,this.sample),this._applyUserContext(e,this.user),this._applyOperationContext(e,this.operation),e.iKey=this._config.instrumentationKey();var n=!1;try{for(var i=this.telemetryInitializers.length,o=0;o6e4&&(clearInterval(g),l||(s.appInsights.sendPageViewInternal(n,i,6e4,o,a),s.appInsights.flush()))}catch(p){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+e.Util.getExceptionName(p),{exception:e.Util.dump(p)})}},100);else e._InternalLogging.throwInternal(e.LoggingSeverity.WARNING,e._InternalMessageId.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.")},n}();t.PageViewManager=n}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){!function(t){var n=function(){function t(e){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=e}return t.prototype.trackPreviousPageVisit=function(t,n){try{var i=this.restartPageVisitTimer(t,n);i&&this.pageVisitTimeTrackingHandler(i.pageName,i.pageUrl,i.pageVisitTime)}catch(o){e._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+e.Util.dump(o))}},t.prototype.restartPageVisitTimer=function(t,n){try{var i=this.stopPageVisitTimer();return this.startPageVisitTimer(t,n),i}catch(o){return e._InternalLogging.warnToConsole("Call to restart failed: "+e.Util.dump(o)),null}},t.prototype.startPageVisitTimer=function(t,n){try{if(e.Util.canUseSessionStorage()){if(null!=e.Util.getSessionStorage(this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var o=new i(t,n),a=JSON.stringify(o);e.Util.setSessionStorage(this.prevPageVisitDataKeyName,a)}}catch(r){e._InternalLogging.warnToConsole("Call to start failed: "+e.Util.dump(r))}},t.prototype.stopPageVisitTimer=function(){try{if(e.Util.canUseSessionStorage()){var t=Date.now(),n=e.Util.getSessionStorage(this.prevPageVisitDataKeyName);if(n){var i=JSON.parse(n);return i.pageVisitTime=t-i.pageVisitStartTime,e.Util.removeSessionStorage(this.prevPageVisitDataKeyName),i}return null}return null}catch(o){return e._InternalLogging.warnToConsole("Stop page visit timer failed: "+e.Util.dump(o)),null}},t}();t.PageVisitTimeManager=n;var i=function(){return function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t}}();t.PageVisitData=i}(e.Telemetry||(e.Telemetry={}))}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(e){var t=function(){function t(){this.hashCodeGeneragor=new e.HashCodeScoreGenerator}return t.prototype.isEnabled=function(e,t){return this.hashCodeGeneragor.getHashCodeScore(e)0){var n=t.getNumberOfLostItems()-t.itemsRestoredFromSessionBuffer;t.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+n+'"',null),t.appInsights.flush();var i=t.getIssuesReported();++i,e.Util.setSessionStorage(t.ISSUES_REPORTED_KEY,i.toString())}}catch(o){e._InternalLogging.throwInternal(e.LoggingSeverity.CRITICAL,e._InternalMessageId.FailedToReportDataLoss,"Failed to report data loss: "+e.Util.getExceptionName(o),{exception:e.Util.dump(o)})}finally{try{t.reset()}catch(o){}}},t.enabled=!1,t.itemsRestoredFromSessionBuffer=0,t.LIMIT_PER_SESSION=10,t.ITEMS_QUEUED_KEY="AI_itemsQueued",t.ISSUES_REPORTED_KEY="AI_lossIssuesReported",t}();e.DataLossAnalyzer=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){var n=function(){function n(t){t.queue=t.queue||[];var i=t.config||{};if(i&&!i.instrumentationKey)if((i=t).iKey)e.ApplicationInsights.Version="0.10.0.0",i.instrumentationKey=i.iKey;else{if(!i.applicationInsightsId)throw new Error("Cannot load Application Insights SDK, no instrumentationKey was provided.");e.ApplicationInsights.Version="0.7.2.0",i.instrumentationKey=i.applicationInsightsId}i=n.getDefaultConfig(i),this.snippet=t,this.config=i}return n.prototype.loadAppInsights=function(){var t=new e.ApplicationInsights.AppInsights(this.config);if(this.config.iKey){var n=t.trackPageView;t.trackPageView=function(e,i,o){n.apply(t,[null,e,i,o])}}"function"==typeof this.snippet.logPageView&&(t.logPageView=function(e,n,i){t.trackPageView(null,e,n,i)});return"function"==typeof this.snippet.logEvent&&(t.logEvent=function(e,n,i){t.trackEvent(e,n,i)}),t},n.prototype.emptyQueue=function(){try{if(e.ApplicationInsights.Util.isArray(this.snippet.queue)){for(var n=this.snippet.queue.length,i=0;i0?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=t.Util.stringToBoolOrDefault(e.enableDebug),e.disableExceptionTracking=t.Util.stringToBoolOrDefault(e.disableExceptionTracking),e.disableTelemetry=t.Util.stringToBoolOrDefault(e.disableTelemetry),e.verboseLogging=t.Util.stringToBoolOrDefault(e.verboseLogging),e.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.disableAjaxTracking=t.Util.stringToBoolOrDefault(e.disableAjaxTracking),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=t.Util.stringToBoolOrDefault(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=t.Util.stringToBoolOrDefault(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=t.Util.stringToBoolOrDefault(e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=t.Util.stringToBoolOrDefault(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=t.Util.stringToBoolOrDefault(e.isRetryDisabled),e.isCookieUseDisabled=t.Util.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=t.Util.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=t.Util.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=t.Util.stringToBoolOrDefault(e.enableCorsCorrelation),e},n}();t.Initialization=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){!function(t){try{if("undefined"!=typeof window&&"undefined"!=typeof JSON){if(window.appInsights===undefined)e.ApplicationInsights.AppInsights.defaultConfig=e.ApplicationInsights.Initialization.getDefaultConfig();else{var n=window.appInsights||{},i=new e.ApplicationInsights.Initialization(n),o=i.loadAppInsights();for(var a in o)n[a]=o[a];i.emptyQueue(),i.pollInteralLogs(o),i.addHousekeepingBeforeUnload(o)}}}catch(r){e.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+r.message)}}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})); +//# sourceMappingURL=ai.0.js.map \ No newline at end of file diff --git a/dist/ai.js b/dist/ai.js index d36156f7..d28857aa 100644 --- a/dist/ai.js +++ b/dist/ai.js @@ -4425,208 +4425,6 @@ var Microsoft; })(Telemetry = ApplicationInsights.Telemetry || (ApplicationInsights.Telemetry = {})); })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); })(Microsoft || (Microsoft = {})); -/// -/// -/// -/// -/// -/// -/// -var Microsoft; -(function (Microsoft) { - var ApplicationInsights; - (function (ApplicationInsights) { - "use strict"; - var FetchMonitor = /** @class */ (function () { - function FetchMonitor(appInsights) { - this.currentWindowHost = window.location.host && window.location.host.toLowerCase(); - this.appInsights = appInsights; - this.initialized = false; - this.Init(); - } - FetchMonitor.prototype.Init = function () { - if (this.supportsMonitoring()) { - this.instrumentFetch(); - this.initialized = true; - } - }; - FetchMonitor.prototype.isMonitoredInstance = function (input) { - return this.initialized && input[FetchMonitor.DisabledPropertyName] !== true; - }; - FetchMonitor.prototype.supportsMonitoring = function () { - var result = true; - // polyfilled fetch on old browsers (IE) will try to use XMLHttpRequest instead - var fetchPolyfill = "new XMLHttpRequest"; - if (ApplicationInsights.extensions.IsNullOrUndefined(window.Request) || - ApplicationInsights.extensions.IsNullOrUndefined(window.Request.prototype) || - ApplicationInsights.extensions.IsNullOrUndefined(window.fetch) || - window.fetch.toString().indexOf(fetchPolyfill) !== -1) { - result = false; - } - return result; - }; - FetchMonitor.prototype.instrumentFetch = function () { - var originalFetch = window.fetch; - var fetchMonitorInstance = this; - window.fetch = function fetch(input, init) { - var ajaxData; - if (fetchMonitorInstance.isMonitoredInstance(input)) { - try { - ajaxData = fetchMonitorInstance.createAjaxRecord(input, init); - init = fetchMonitorInstance.includeCorrelationHeaders(ajaxData, input, init); - } - catch (e) { - ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.CRITICAL, ApplicationInsights._InternalMessageId.FailedMonitorAjaxOpen, "Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.", { - ajaxDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input), - exception: Microsoft.ApplicationInsights.Util.dump(e) - }); - } - } - return originalFetch(input, init) - .then(function (response) { - fetchMonitorInstance.onFetchComplete(response, ajaxData); - return response; - }) - .catch(function (reason) { - fetchMonitorInstance.onFetchFailed(input, ajaxData, reason); - throw reason; - }); - }; - window.fetch[FetchMonitor.instrumentedByAppInsightsName] = true; - }; - FetchMonitor.prototype.createAjaxRecord = function (input, init) { - // this format corresponds with activity logic on server-side and is required for the correct correlation - var id = "|" + this.appInsights.context.operation.id + "." + ApplicationInsights.Util.newId(); - var ajaxData = new ApplicationInsights.ajaxRecord(id); - ajaxData.requestSentTime = ApplicationInsights.dateTime.Now(); - if (input instanceof Request) { - input.ajaxData = ajaxData; - ajaxData.requestUrl = input ? input.url : ""; - } - else { - ajaxData.requestUrl = input; - } - if (init && init.method) { - ajaxData.method = init.method; - } - else if (input && input instanceof Request) { - ajaxData.method = input.method; - } - else { - ajaxData.method = "GET"; - } - return ajaxData; - }; - FetchMonitor.prototype.includeCorrelationHeaders = function (ajaxData, input, init) { - if (ApplicationInsights.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, ajaxData.getAbsoluteUrl(), this.currentWindowHost)) { - if (!init) { - init = {}; - } - // init headers override original request headers - // so, if they exist use only them, otherwise use request's because they should have been applied in the first place - // not using original request headers will result in them being lost - init.headers = new Headers(init.headers || (input instanceof Request ? (input.headers || {}) : {})); - init.headers.set(ApplicationInsights.RequestHeaders.requestIdHeader, ajaxData.id); - var appId = this.appInsights.context ? this.appInsights.context.appId() : null; - if (appId) { - init.headers.set(ApplicationInsights.RequestHeaders.requestContextHeader, ApplicationInsights.RequestHeaders.requestContextAppIdFormat + appId); - } - } - return init; - }; - FetchMonitor.getFailedFetchDiagnosticsMessage = function (input) { - var result = ""; - try { - if (!ApplicationInsights.extensions.IsNullOrUndefined(input)) { - if (typeof (input) === "string") { - result += "(url: '" + input + "')"; - } - else { - result += "(url: '" + input.url + "')"; - } - } - // tslint:disable-next-line:no-empty - } - catch (e) { } - return result; - }; - FetchMonitor.prototype.onFetchComplete = function (response, ajaxData) { - if (!ajaxData) { - return; - } - try { - ajaxData.responseFinishedTime = ApplicationInsights.dateTime.Now(); - ajaxData.CalculateMetrics(); - if (ajaxData.ajaxTotalDuration < 0) { - ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedMonitorAjaxDur, "Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.", { - fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response), - requestSentTime: ajaxData.requestSentTime, - responseFinishedTime: ajaxData.responseFinishedTime - }); - } - else { - var dependency = new ApplicationInsights.Telemetry.RemoteDependencyData(ajaxData.id, ajaxData.getAbsoluteUrl(), ajaxData.getPathName(), ajaxData.ajaxTotalDuration, response.status >= 200 && response.status < 400, response.status, ajaxData.method); - // enrich dependency target with correlation context from the server - var correlationContext = this.getCorrelationContext(response); - if (correlationContext) { - dependency.target = dependency.target + " | " + correlationContext; - } - this.appInsights.trackDependencyData(dependency); - } - } - catch (e) { - ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, "Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.", { - fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response), - exception: Microsoft.ApplicationInsights.Util.dump(e) - }); - } - }; - FetchMonitor.prototype.onFetchFailed = function (input, ajaxData, reason) { - if (!ajaxData) { - return; - } - try { - ajaxData.responseFinishedTime = ApplicationInsights.dateTime.Now(); - ajaxData.CalculateMetrics(); - if (ajaxData.ajaxTotalDuration < 0) { - ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedMonitorAjaxDur, "Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.", { - fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input), - requestSentTime: ajaxData.requestSentTime, - responseFinishedTime: ajaxData.responseFinishedTime - }); - } - else { - var dependency = new ApplicationInsights.Telemetry.RemoteDependencyData(ajaxData.id, ajaxData.getAbsoluteUrl(), ajaxData.getPathName(), ajaxData.ajaxTotalDuration, false, 0, ajaxData.method); - dependency.properties = { error: reason.message }; - this.appInsights.trackDependencyData(dependency); - } - } - catch (e) { - ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, "Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.", { - fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input), - exception: Microsoft.ApplicationInsights.Util.dump(e) - }); - } - }; - FetchMonitor.prototype.getCorrelationContext = function (response) { - try { - var responseHeader = response.headers.get(ApplicationInsights.RequestHeaders.requestContextHeader); - return ApplicationInsights.CorrelationIdHelper.getCorrelationContext(responseHeader); - } - catch (e) { - ApplicationInsights._InternalLogging.throwInternal(ApplicationInsights.LoggingSeverity.WARNING, ApplicationInsights._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, "Failed to get Request-Context correlation header as it may be not included in the response or not accessible.", { - fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response), - exception: Microsoft.ApplicationInsights.Util.dump(e) - }); - } - }; - FetchMonitor.instrumentedByAppInsightsName = "InstrumentedByAppInsights"; - FetchMonitor.DisabledPropertyName = "Microsoft_ApplicationInsights_BypassFetchInstrumentation"; - return FetchMonitor; - }()); - ApplicationInsights.FetchMonitor = FetchMonitor; - })(ApplicationInsights = Microsoft.ApplicationInsights || (Microsoft.ApplicationInsights = {})); -})(Microsoft || (Microsoft = {})); /// var Microsoft; (function (Microsoft) { @@ -4661,7 +4459,6 @@ var Microsoft; /// /// /// -/// /// /// var Microsoft; @@ -4669,7 +4466,7 @@ var Microsoft; var ApplicationInsights; (function (ApplicationInsights) { "use strict"; - ApplicationInsights.Version = "1.0.19"; + ApplicationInsights.Version = "1.0.20"; /** * The main API that sends telemetry to Application Insights. * Learn more: http://go.microsoft.com/fwlink/?LinkID=401493 @@ -4755,9 +4552,6 @@ var Microsoft; if (!this.config.disableAjaxTracking) { this._ajaxMonitor = new Microsoft.ApplicationInsights.AjaxMonitor(this); } - if (!this.config.disableFetchTracking) { - this._fetchMonitor = new Microsoft.ApplicationInsights.FetchMonitor(this); - } } AppInsights.prototype.sendPageViewInternal = function (name, url, duration, properties, measurements) { var pageView = new ApplicationInsights.Telemetry.PageView(name, url, duration, properties, measurements, this.context.operation.id); @@ -5344,7 +5138,6 @@ var Microsoft; config.samplingPercentage = 100; } config.disableAjaxTracking = ApplicationInsights.Util.stringToBoolOrDefault(config.disableAjaxTracking); - config.disableFetchTracking = ApplicationInsights.Util.stringToBoolOrDefault(config.disableFetchTracking, true); config.maxAjaxCallsPerView = !isNaN(config.maxAjaxCallsPerView) ? config.maxAjaxCallsPerView : 500; config.isBeaconApiDisabled = ApplicationInsights.Util.stringToBoolOrDefault(config.isBeaconApiDisabled, true); config.disableCorrelationHeaders = ApplicationInsights.Util.stringToBoolOrDefault(config.disableCorrelationHeaders); diff --git a/dist/ai.js.map b/dist/ai.js.map index 0c3b23db..0f0c79f3 100644 --- a/dist/ai.js.map +++ b/dist/ai.js.map @@ -1 +1 @@ -{"version":3,"file":"ai.js","sourceRoot":"","sources":["../JavaScript/JavaScriptSDK.Interfaces/IConfig.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Base.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Envelope.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IApplication.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IDevice.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IInternal.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ILocation.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IOperation.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ISample.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IUser.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ISession.ts","../JavaScript/JavaScriptSDK.Interfaces/Telemetry/ISerializable.ts","../JavaScript/JavaScriptSDK.Interfaces/Telemetry/IEnvelope.ts","../JavaScript/JavaScriptSDK.Interfaces/ITelemetryContext.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/SeverityLevel.ts","../JavaScript/JavaScriptSDK.Interfaces/IAppInsights.ts","../JavaScript/JavaScriptSDK/Logging.ts","../JavaScript/JavaScriptSDK/UtilHelpers.ts","../JavaScript/JavaScriptSDK/Util.ts","../JavaScript/JavaScriptSDK/Serializer.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Envelope.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Base.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ContextTagKeys.ts","../JavaScript/JavaScriptSDK/Context/Application.ts","../JavaScript/JavaScriptSDK/Context/Device.ts","../JavaScript/JavaScriptSDK/Context/Internal.ts","../JavaScript/JavaScriptSDK/Context/Location.ts","../JavaScript/JavaScriptSDK/Context/Operation.ts","../JavaScript/JavaScriptSDK/HashCodeScoreGenerator.ts","../JavaScript/JavaScriptSDK/SamplingScoreGenerator.ts","../JavaScript/JavaScriptSDK/Context/Sample.ts","../JavaScript/JavaScriptSDK/Context/Session.ts","../JavaScript/JavaScriptSDK/Context/User.ts","../JavaScript/JavaScriptSDK/ajax/ajaxUtils.ts","../JavaScript/JavaScriptSDK/ajax/ajaxRecord.ts","../JavaScript/JavaScriptSDK/RequestResponseHeaders.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Domain.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/EventData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/PageViewData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/RemoteDependencyData.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/DataSanitizer.ts","../JavaScript/JavaScriptSDK/Telemetry/RemoteDependencyData.ts","../JavaScript/JavaScriptSDK/ajax/ajax.ts","../JavaScript/JavaScriptSDK/SendBuffer.ts","../JavaScript/JavaScriptSDK/Sender.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/MessageData.ts","../JavaScript/JavaScriptSDK/Telemetry/Trace.ts","../JavaScript/JavaScriptSDK/Telemetry/Event.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ExceptionDetails.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ExceptionData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/StackFrame.ts","../JavaScript/JavaScriptSDK/Telemetry/Exception.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/DataPointType.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/DataPoint.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/MetricData.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/DataPoint.ts","../JavaScript/JavaScriptSDK/Telemetry/Metric.ts","../JavaScript/JavaScriptSDK/Telemetry/PageView.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/PageViewPerfData.ts","../JavaScript/JavaScriptSDK/Telemetry/PageViewPerformance.ts","../JavaScript/JavaScriptSDK/TelemetryContext.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Data.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Data.ts","../JavaScript/JavaScriptSDK/Telemetry/PageViewManager.ts","../JavaScript/JavaScriptSDK/Telemetry/PageVisitTimeManager.ts","../JavaScript/JavaScriptSDK/ajax/fetch.ts","../JavaScript/JavaScriptSDK/SplitTest.ts","../JavaScript/JavaScriptSDK/AppInsights.ts","../JavaScript/JavaScriptSDK/DataLossAnalyzer.ts","../JavaScript/JavaScriptSDK/Initialization.ts","../JavaScript/JavaScriptSDK/Init.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,IAAO,SAAS,CAwCf;AAxCD,WAAO,SAAS;IAAC,IAAA,mBAAmB,CAwCnC;IAxCgB,WAAA,mBAAmB;QAEhC,YAAY,CAAC;IAsCjB,CAAC,EAxCgB,mBAAmB,GAAnB,6BAAmB,KAAnB,6BAAmB,QAwCnC;AAAD,CAAC,EAxCM,SAAS,KAAT,SAAS,QAwCf;ACxCD,8BAA8B;AAC9B,IAAO,SAAS,CAmBf;AAnBD,WAAO,SAAS;IAAC,IAAA,SAAS,CAmBzB;IAnBgB,WAAA,SAAS;QAE1B,YAAY,CAAC;QAET;;WAEG;QACH;YAQI;YAEA,CAAC;YACL,WAAC;QAAD,CAAC,AAXD,IAWC;QAXY,cAAI,OAWhB,CAAA;IACL,CAAC,EAnBgB,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAmBzB;AAAD,CAAC,EAnBM,SAAS,KAAT,SAAS,QAmBf;ACpBD,8BAA8B;AAC9B,gCAAgC;AAChC,IAAO,SAAS,CAyDf;AAzDD,WAAO,SAAS;IAAC,IAAA,SAAS,CAyDzB;IAzDgB,WAAA,SAAS;QAE1B,YAAY,CAAC;QAET;;WAEG;QACH;YA2CI;gBAEI,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;gBACb,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;gBACxB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;YACnB,CAAC;YACL,eA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\n \"use strict\";\r\n\r\n export interface IConfig {\r\n instrumentationKey?: string;\r\n endpointUrl?: string;\r\n emitLineDelimitedJson?: boolean;\r\n accountId?: string;\r\n sessionRenewalMs?: number;\r\n sessionExpirationMs?: number;\r\n maxBatchSizeInBytes?: number;\r\n maxBatchInterval?: number;\r\n enableDebug?: boolean;\r\n disableExceptionTracking?: boolean;\r\n disableTelemetry?: boolean;\r\n verboseLogging?: boolean;\r\n diagnosticLogInterval?: number;\r\n samplingPercentage?: number;\r\n autoTrackPageVisitTime?: boolean;\r\n disableAjaxTracking?: boolean;\r\n disableFetchTracking?: boolean;\r\n overridePageViewDuration?: boolean;\r\n maxAjaxCallsPerView?: number;\r\n disableDataLossAnalysis?: boolean;\r\n disableCorrelationHeaders?: boolean;\r\n correlationHeaderExcludedDomains?: string[];\r\n disableFlushOnBeforeUnload?: boolean;\r\n enableSessionStorageBuffer?: boolean;\r\n isCookieUseDisabled?: boolean;\r\n cookieDomain?: string;\r\n isRetryDisabled?: boolean;\r\n url?: string;\r\n isStorageUseDisabled?: boolean;\r\n isBeaconApiDisabled?: boolean;\r\n sdkExtension?: string;\r\n isBrowserLinkTrackingEnabled?: boolean;\r\n appId?: string;\r\n enableCorsCorrelation?: boolean;\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Data struct to contain only C section with custom fields.\r\n */\r\n export class Base\r\n {\r\n \r\n /**\r\n * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.\r\n */\r\n public baseType: string;\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * System variables for a telemetry item.\r\n */\r\n export class Envelope\r\n {\r\n \r\n /**\r\n * Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Type name of telemetry data item.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z.\r\n */\r\n public time: string;\r\n \r\n /**\r\n * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.\r\n */\r\n public sampleRate: number;\r\n \r\n /**\r\n * Sequence field used to track absolute order of uploaded events.\r\n */\r\n public seq: string;\r\n \r\n /**\r\n * The application's instrumentation key. The key is typically represented as a GUID, but there are cases when it is not a guid. No code should rely on iKey being a GUID. Instrumentation key is case insensitive.\r\n */\r\n public iKey: string;\r\n \r\n /**\r\n * Key/value collection of context properties. See ContextTagKeys for information on available properties.\r\n */\r\n public tags: any;\r\n \r\n /**\r\n * Telemetry data item.\r\n */\r\n public data: Base;\r\n \r\n constructor()\r\n {\r\n this.ver = 1;\r\n this.sampleRate = 100.0;\r\n this.tags = {};\r\n }\r\n }\r\n}\r\n","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IApplication {\r\n /**\r\n * The application version.\r\n */\r\n ver: string;\r\n\r\n /**\r\n * The application build version.\r\n */\r\n build: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IDevice {\r\n /**\r\n * The type for the current device.\r\n */\r\n type: string;\r\n\r\n /**\r\n * A device unique ID.\r\n */\r\n id: string;\r\n\r\n /**\r\n * The device OEM for the current device.\r\n */\r\n oemName: string;\r\n\r\n /**\r\n * The device model for the current device.\r\n */\r\n model: string;\r\n\r\n /**\r\n * The IANA interface type for the internet connected network adapter.\r\n */\r\n network: number;\r\n\r\n /**\r\n * The application screen resolution.\r\n */\r\n resolution: string;\r\n\r\n /**\r\n * The current display language of the operating system.\r\n */\r\n locale: string;\r\n\r\n /**\r\n * The IP address.\r\n */\r\n ip: string;\r\n\r\n /**\r\n * The device language.\r\n */\r\n language: string;\r\n\r\n /**\r\n * The OS name.\r\n */\r\n os: string;\r\n\r\n /**\r\n * The OS version.\r\n */\r\n osversion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IInternal {\r\n /**\r\n * The SDK version used to create this telemetry item.\r\n */\r\n sdkVersion: string;\r\n\r\n /**\r\n * The SDK agent version.\r\n */\r\n agentVersion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ILocation {\r\n /**\r\n * Client IP address for reverse lookup\r\n */\r\n ip: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IOperation {\r\n /**\r\n * Operation id\r\n */\r\n id: string;\r\n\r\n /**\r\n * Operation name\r\n */\r\n name: string;\r\n\r\n /**\r\n * Parent operation id\r\n */\r\n parentId: string;\r\n\r\n /**\r\n * Root operation id\r\n */\r\n rootId: string;\r\n\r\n /**\r\n * Synthetic source of the operation\r\n */\r\n syntheticSource: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISample {\r\n /**\r\n * Sample rate\r\n */\r\n sampleRate: number;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IUser {\r\n /**\r\n * The telemetry configuration.\r\n */\r\n config: any;\r\n\r\n /**\r\n * The user ID.\r\n */\r\n id: string;\r\n\r\n /**\r\n * Authenticated user id\r\n */\r\n authenticatedId: string;\r\n\r\n /**\r\n * The account ID.\r\n */\r\n accountId: string;\r\n\r\n /**\r\n * The account acquisition date.\r\n */\r\n accountAcquisitionDate: string;\r\n\r\n /**\r\n * The user agent string.\r\n */\r\n agent: string;\r\n\r\n /**\r\n * The store region.\r\n */\r\n storeRegion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISession {\r\n /**\r\n * The session ID.\r\n */\r\n id: string;\r\n\r\n /** \r\n * The true if this is the first session \r\n */\r\n isFirst: boolean;\r\n\r\n /**\r\n * The date at which this guid was genereated.\r\n * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.\r\n */\r\n acquisitionDate: number;\r\n\r\n /**\r\n * The date at which this session ID was last reported.\r\n * This value should be updated whenever telemetry is sent using this ID.\r\n * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.\r\n */\r\n renewalDate: number;\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface ISerializable {\r\n /**\r\n * The set of fields for a serializable object. \r\n * This defines the serialization order and a value of true/false\r\n * for each field defines whether the field is required or not.\r\n */\r\n aiDataContract: any;\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IEnvelope extends ISerializable {\r\n ver: number;\r\n name: string;\r\n time: string;\r\n sampleRate: number;\r\n seq: string;\r\n iKey: string;\r\n tags: { [name: string]: any };\r\n data: any;\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface ITelemetryContext {\r\n /**\r\n * The object describing a component tracked by this object.\r\n */\r\n application: Context.IApplication;\r\n\r\n /**\r\n * The object describing a device tracked by this object.\r\n */\r\n device: Context.IDevice;\r\n\r\n /**\r\n * The object describing internal settings.\r\n */\r\n internal: Context.IInternal;\r\n\r\n /**\r\n * The object describing a location tracked by this object.\r\n */\r\n location: Context.ILocation;\r\n\r\n /**\r\n * The object describing a operation tracked by this object.\r\n */\r\n operation: Context.IOperation;\r\n\r\n /**\r\n * The object describing sampling settings.\r\n */\r\n sample: Context.ISample;\r\n\r\n /**\r\n * The object describing a user tracked by this object.\r\n */\r\n user: Context.IUser;\r\n\r\n /**\r\n * The object describing a session tracked by this object.\r\n */\r\n session: Context.ISession;\r\n\r\n /**\r\n * Adds a telemetry initializer to the collection. Telemetry initializers will be called one by one, \r\n * in the order they were added, before the telemetry item is pushed for sending. \r\n * If one of the telemetry initializers returns false or throws an error then the telemetry item will not be sent. \r\n * If it returns true or doesn't return any value the event will be passed to the next telemetry initializer and\r\n * send to the cloud (if not rejected by other initializers). \r\n */\r\n addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void);\r\n\r\n /**\r\n * Tracks telemetry object.\r\n */\r\n track(envelope: Microsoft.ApplicationInsights.IEnvelope);\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Defines the level of severity for the event.\r\n */\r\n export enum SeverityLevel\r\n {\r\n Verbose = 0,\r\n Information = 1,\r\n Warning = 2,\r\n Error = 3,\r\n Critical = 4,\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n\r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IAppInsights {\r\n\r\n /*\r\n * Config object used to initialize AppInsights\r\n */\r\n config: IConfig;\r\n\r\n context: ITelemetryContext;\r\n\r\n /*\r\n * Initialization queue. Contains functions to run when appInsights initializes\r\n */\r\n queue: Array<() => void>;\r\n\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens. \r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n startTrackPage(name?: string);\r\n\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n stopTrackPage(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /**\r\n * Logs that a page or other item was viewed. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.\r\n */\r\n trackPageView(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, duration?: number);\r\n\r\n /**\r\n * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n startTrackEvent(name: string);\r\n\r\n\r\n /** \r\n * Log an extended event that you started timing with {@link startTrackEvent}.\r\n * @param name The string you used to identify this event in startTrackEvent.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n stopTrackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /** \r\n * Log a user action or other occurrence.\r\n * @param name A string to identify this event in the portal.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n trackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /**\r\n * Log a dependency call\r\n * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id.\r\n * @param method represents request verb (GET, POST, etc.)\r\n * @param absoluteUrl absolute url used to make the dependency request\r\n * @param pathName the path part of the absolute url\r\n * @param totalTime total request time\r\n * @param success indicates if the request was sessessful\r\n * @param resultCode response code returned by the dependency request\r\n */\r\n trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number);\r\n\r\n /**\r\n * Log an exception you have caught.\r\n * @param exception An Error from a catch clause, or the string error message.\r\n * @param handledAt Not used\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel);\r\n\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.\r\n * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the \r\n * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.\r\n * @param name A string that identifies the metric.\r\n * @param average Number representing either a single measurement, or the average of several measurements.\r\n * @param sampleCount The number of measurements represented by the average. Defaults to 1.\r\n * @param min The smallest measurement in the sample. Defaults to the average.\r\n * @param max The largest measurement in the sample. Defaults to the average.\r\n */\r\n trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; });\r\n\r\n /**\r\n * Log a diagnostic message. \r\n * @param message A message string \r\n * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n trackTrace(message: string, properties?: { [name: string]: string; }, severityLevel?: AI.SeverityLevel);\r\n\r\n\r\n /**\r\n * Immediately send all queued telemetry.\r\n * @param {boolean} async - If flush should be call asynchronously\r\n */\r\n flush(async?: boolean);\r\n\r\n\r\n /**\r\n * Sets the autheticated user id and the account id in this session.\r\n * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string);\r\n\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n */\r\n clearAuthenticatedUserContext();\r\n\r\n /*\r\n * Downloads and initializes AppInsights. You can override default script download location by specifying url property of `config`.\r\n */\r\n downloadAndSetup?(config: Microsoft.ApplicationInsights.IConfig): void;\r\n\r\n /**\r\n * The custom error handler for Application Insights\r\n * @param {string} message - The error message\r\n * @param {string} url - The url where the error was raised\r\n * @param {number} lineNumber - The line number where the error was raised\r\n * @param {number} columnNumber - The column number for the line where the error was raised\r\n * @param {Error} error - The Error object\r\n */\r\n _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error);\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n\r\n export enum LoggingSeverity {\r\n /**\r\n * Error will be sent as internal telemetry\r\n */\r\n CRITICAL = 0,\r\n\r\n /**\r\n * Error will NOT be sent as internal telemetry, and will only be shown in browser console\r\n */\r\n WARNING = 1\r\n }\r\n\r\n /**\r\n * Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered\r\n */\r\n export enum _InternalMessageId {\r\n // Non user actionable\r\n BrowserDoesNotSupportLocalStorage,\r\n BrowserCannotReadLocalStorage,\r\n BrowserCannotReadSessionStorage,\r\n BrowserCannotWriteLocalStorage,\r\n BrowserCannotWriteSessionStorage,\r\n BrowserFailedRemovalFromLocalStorage,\r\n BrowserFailedRemovalFromSessionStorage,\r\n CannotSendEmptyTelemetry,\r\n ClientPerformanceMathError,\r\n ErrorParsingAISessionCookie,\r\n ErrorPVCalc,\r\n ExceptionWhileLoggingError,\r\n FailedAddingTelemetryToBuffer,\r\n FailedMonitorAjaxAbort,\r\n FailedMonitorAjaxDur,\r\n FailedMonitorAjaxOpen,\r\n FailedMonitorAjaxRSC,\r\n FailedMonitorAjaxSend,\r\n FailedMonitorAjaxGetCorrelationHeader,\r\n FailedToAddHandlerForOnBeforeUnload,\r\n FailedToSendQueuedTelemetry,\r\n FailedToReportDataLoss,\r\n FlushFailed,\r\n MessageLimitPerPVExceeded,\r\n MissingRequiredFieldSpecification,\r\n NavigationTimingNotSupported,\r\n OnError,\r\n SessionRenewalDateIsZero,\r\n SenderNotInitialized,\r\n StartTrackEventFailed,\r\n StopTrackEventFailed,\r\n StartTrackFailed,\r\n StopTrackFailed,\r\n TelemetrySampledAndNotSent,\r\n TrackEventFailed,\r\n TrackExceptionFailed,\r\n TrackMetricFailed,\r\n TrackPVFailed,\r\n TrackPVFailedCalc,\r\n TrackTraceFailed,\r\n TransmissionFailed,\r\n FailedToSetStorageBuffer,\r\n FailedToRestoreStorageBuffer,\r\n InvalidBackendResponse,\r\n FailedToFixDepricatedValues,\r\n InvalidDurationValue,\r\n\r\n // User actionable\r\n CannotSerializeObject,\r\n CannotSerializeObjectNonSerializable,\r\n CircularReferenceDetected,\r\n ClearAuthContextFailed,\r\n ExceptionTruncated,\r\n IllegalCharsInName,\r\n ItemNotInArray,\r\n MaxAjaxPerPVExceeded,\r\n MessageTruncated,\r\n NameTooLong,\r\n SampleRateOutOfRange,\r\n SetAuthContextFailed,\r\n SetAuthContextFailedAccountName,\r\n StringValueTooLong,\r\n StartCalledMoreThanOnce,\r\n StopCalledWithoutStart,\r\n TelemetryInitializerFailed,\r\n TrackArgumentsNotSpecified,\r\n UrlTooLong,\r\n SessionStorageBufferFull,\r\n CannotAccessCookie,\r\n IdTooLong,\r\n }\r\n\r\n export class _InternalLogMessage {\r\n public message: string;\r\n public messageId: _InternalMessageId;\r\n\r\n /**\r\n * For user non actionable traces use AI Internal prefix.\r\n */\r\n private static AiNonUserActionablePrefix = \"AI (Internal): \";\r\n\r\n /**\r\n * Prefix of the traces in portal.\r\n */\r\n private static AiUserActionablePrefix = \"AI: \";\r\n\r\n constructor(msgId: _InternalMessageId, msg: string, isUserAct = false, properties?: Object) {\r\n\r\n this.messageId = msgId;\r\n this.message =\r\n (isUserAct ? _InternalLogMessage.AiUserActionablePrefix : _InternalLogMessage.AiNonUserActionablePrefix) +\r\n _InternalMessageId[msgId].toString();\r\n\r\n var diagnosticText =\r\n (msg ? \" message:\" + _InternalLogMessage.sanitizeDiagnosticText(msg) : \"\") +\r\n (properties ? \" props:\" + _InternalLogMessage.sanitizeDiagnosticText(JSON.stringify(properties)) : \"\");\r\n\r\n this.message += diagnosticText;\r\n }\r\n\r\n private static sanitizeDiagnosticText(text: string) {\r\n return \"\\\"\" + text.replace(/\\\"/g, \"\") + \"\\\"\";\r\n }\r\n }\r\n\r\n export class _InternalLogging {\r\n\r\n /**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */\r\n private static AIInternalMessagePrefix: string = \"AITR_\";\r\n\r\n /**\r\n * When this is true the SDK will throw exceptions to aid in debugging.\r\n */\r\n public static enableDebugExceptions = () => false;\r\n\r\n /**\r\n * When this is true the SDK will log more messages to aid in debugging.\r\n */\r\n public static verboseLogging = () => false;\r\n\r\n /**\r\n * The internal logging queue\r\n */\r\n public static queue: Array<_InternalLogMessage> = [];\r\n\r\n /**\r\n * The maximum number of internal messages allowed to be sent per page view\r\n */\r\n private static MAX_INTERNAL_MESSAGE_LIMIT = 25;\r\n\r\n /**\r\n * Count of internal messages sent\r\n */\r\n private static _messageCount = 0;\r\n\r\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */\r\n private static _messageLogged: { [type: string]: boolean } = {};\r\n\r\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The log message.\r\n */\r\n public static throwInternal(severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct = false) {\r\n let message = new _InternalLogMessage(msgId, msg, isUserAct, properties);\r\n\r\n if (this.enableDebugExceptions()) {\r\n throw message;\r\n } else {\r\n if (typeof (message) !== \"undefined\" && !!message) {\r\n if (typeof (message.message) !== \"undefined\") {\r\n if (isUserAct) {\r\n // check if this message type was already logged to console for this page view and if so, don't log it again\r\n var messageKey = _InternalMessageId[message.messageId];\r\n\r\n if (!this._messageLogged[messageKey] || this.verboseLogging()) {\r\n this.warnToConsole(message.message);\r\n this._messageLogged[messageKey] = true;\r\n }\r\n } else {\r\n // don't log internal AI traces in the console, unless the verbose logging is enabled\r\n if (this.verboseLogging()) {\r\n this.warnToConsole(message.message);\r\n }\r\n }\r\n\r\n this.logInternalMessage(severity, message);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * This will write a warning to the console if possible\r\n * @param message {string} - The warning message\r\n */\r\n public static warnToConsole(message: string) {\r\n if (typeof console !== \"undefined\" && !!console) {\r\n if (typeof console.warn === \"function\") {\r\n console.warn(message);\r\n } else if (typeof console.log === \"function\") {\r\n console.log(message);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Resets the internal message count\r\n */\r\n public static resetInternalMessageCount(): void {\r\n this._messageCount = 0;\r\n this._messageLogged = {};\r\n }\r\n\r\n /**\r\n * Clears the list of records indicating that internal message type was already logged\r\n */\r\n public static clearInternalMessageLoggedTypes(): void {\r\n if (Util.canUseSessionStorage()) {\r\n var sessionStorageKeys = Util.getSessionStorageKeys();\r\n for (var i = 0; i < sessionStorageKeys.length; i++) {\r\n if (sessionStorageKeys[i].indexOf(_InternalLogging.AIInternalMessagePrefix) === 0) {\r\n Util.removeSessionStorage(sessionStorageKeys[i]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets the limit for the number of internal events before they are throttled\r\n * @param limit {number} - The throttle limit to set for internal events\r\n */\r\n public static setMaxInternalMessageLimit(limit: number): void {\r\n if (!limit) {\r\n throw new Error('limit cannot be undefined.');\r\n }\r\n\r\n this.MAX_INTERNAL_MESSAGE_LIMIT = limit;\r\n }\r\n\r\n /**\r\n * Logs a message to the internal queue.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The message to log.\r\n */\r\n private static logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void {\r\n if (this._areInternalMessagesThrottled()) {\r\n return;\r\n }\r\n\r\n // check if this message type was already logged for this session and if so, don't log it again\r\n var logMessage = true;\r\n var messageKey = _InternalLogging.AIInternalMessagePrefix + _InternalMessageId[message.messageId];\r\n\r\n if (Util.canUseSessionStorage()) {\r\n var internalMessageTypeLogRecord = Util.getSessionStorage(messageKey);\r\n if (internalMessageTypeLogRecord) {\r\n logMessage = false;\r\n } else {\r\n Util.setSessionStorage(messageKey, \"1\");\r\n }\r\n } else {\r\n // if the session storage is not available, limit to only one message type per page view\r\n if (this._messageLogged[messageKey]) {\r\n logMessage = false;\r\n } else {\r\n this._messageLogged[messageKey] = true;\r\n }\r\n }\r\n\r\n if (logMessage) {\r\n // Push the event in the internal queue\r\n if (this.verboseLogging() || severity === LoggingSeverity.CRITICAL) {\r\n this.queue.push(message);\r\n this._messageCount++;\r\n }\r\n\r\n // When throttle limit reached, send a special event\r\n if (this._messageCount == this.MAX_INTERNAL_MESSAGE_LIMIT) {\r\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\r\n var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);\r\n\r\n this.queue.push(throttleMessage);\r\n this.warnToConsole(throttleLimitMessage);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Indicates whether the internal events are throttled\r\n */\r\n private static _areInternalMessagesThrottled(): boolean {\r\n return this._messageCount >= this.MAX_INTERNAL_MESSAGE_LIMIT;\r\n }\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n \"use strict\"\r\n\r\n export class UtilHelpers {\r\n\r\n /**\r\n * generate random id string\r\n */\r\n public static newId() {\r\n var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n var result = \"\";\r\n var random = Math.random() * 1073741824; //5 symbols in base64, almost maxint\r\n\r\n while (random > 0) {\r\n var char = base64chars.charAt(random % 64);\r\n result += char;\r\n random = Math.floor(random / 64);\r\n }\r\n return result;\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n /**\r\n * Type of storage to differentiate between local storage and session storage\r\n */\r\n enum StorageType {\r\n LocalStorage,\r\n SessionStorage\r\n }\r\n\r\n export class Util {\r\n private static document: any = typeof document !== \"undefined\" ? document : {};\r\n private static _canUseCookies: boolean = undefined;\r\n private static _canUseLocalStorage: boolean = undefined;\r\n private static _canUseSessionStorage: boolean = undefined;\r\n // listing only non-geo specific locations\r\n private static _internalEndpoints: string[] = [\r\n \"https://dc.services.visualstudio.com/v2/track\",\r\n \"https://breeze.aimon.applicationinsights.io/v2/track\",\r\n \"https://dc-int.services.visualstudio.com/v2/track\"\r\n ]\r\n public static NotSpecified = \"not_specified\";\r\n\r\n /*\r\n * Force the SDK not to use local and session storage\r\n */\r\n public static disableStorage() {\r\n Util._canUseLocalStorage = false;\r\n Util._canUseSessionStorage = false;\r\n }\r\n\r\n /**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n private static _getLocalStorageObject(): Storage {\r\n if (Util.canUseLocalStorage()) {\r\n return Util._getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */\r\n private static _getVerifiedStorageObject(storageType: StorageType): Storage {\r\n var storage: Storage = null;\r\n var fail: boolean;\r\n var uid;\r\n try {\r\n uid = new Date;\r\n storage = storageType === StorageType.LocalStorage ? window.localStorage : window.sessionStorage;\r\n storage.setItem(uid, uid);\r\n fail = storage.getItem(uid) != uid;\r\n storage.removeItem(uid);\r\n if (fail) {\r\n storage = null;\r\n }\r\n } catch (exception) {\r\n storage = null;\r\n }\r\n\r\n return storage;\r\n }\r\n\r\n /**\r\n * Checks if endpoint URL is application insights internal injestion service URL.\r\n *\r\n * @param endpointUrl Endpoint URL to check.\r\n * @returns {boolean} True if if endpoint URL is application insights internal injestion service URL.\r\n */\r\n public static isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean {\r\n return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;\r\n }\r\n\r\n\r\n /**\r\n * Check if the browser supports local storage.\r\n *\r\n * @returns {boolean} True if local storage is supported.\r\n */\r\n public static canUseLocalStorage(): boolean {\r\n if (Util._canUseLocalStorage === undefined) {\r\n Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n\r\n return Util._canUseLocalStorage;\r\n }\r\n\r\n /**\r\n * Get an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n public static getStorage(name: string): string {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotReadLocalStorage,\r\n \"Browser failed read of local storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Set the contents of an object in the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n public static setStorage(name: string, data: string): boolean {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotWriteLocalStorage,\r\n \"Browser failed write to local storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Remove an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n public static removeStorage(name: string): boolean {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserFailedRemovalFromLocalStorage,\r\n \"Browser failed removal of local storage item. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n private static _getSessionStorageObject(): Storage {\r\n if (Util.canUseSessionStorage()) {\r\n return Util._getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Check if the browser supports session storage.\r\n *\r\n * @returns {boolean} True if session storage is supported.\r\n */\r\n public static canUseSessionStorage(): boolean {\r\n if (Util._canUseSessionStorage === undefined) {\r\n Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n\r\n return Util._canUseSessionStorage;\r\n }\r\n\r\n /**\r\n * Gets the list of session storage keys\r\n *\r\n * @returns {string[]} List of session storage keys\r\n */\r\n public static getSessionStorageKeys(): string[] {\r\n var keys = [];\r\n\r\n if (Util.canUseSessionStorage()) {\r\n for (var key in window.sessionStorage) {\r\n keys.push(key);\r\n }\r\n }\r\n return keys;\r\n }\r\n\r\n /**\r\n * Get an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n public static getSessionStorage(name: string): string {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotReadSessionStorage,\r\n \"Browser failed read of session storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Set the contents of an object in the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n public static setSessionStorage(name: string, data: string): boolean {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotWriteSessionStorage,\r\n \"Browser failed write to session storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Remove an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n public static removeSessionStorage(name: string): boolean {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserFailedRemovalFromSessionStorage,\r\n \"Browser failed removal of session storage item. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /*\r\n * Force the SDK not to store and read any data from cookies\r\n */\r\n public static disableCookies() {\r\n Util._canUseCookies = false;\r\n }\r\n\r\n /*\r\n * helper method to tell if document.cookie object is available\r\n */\r\n public static canUseCookies(): any {\r\n if (Util._canUseCookies === undefined) {\r\n Util._canUseCookies = false;\r\n\r\n try {\r\n Util._canUseCookies = Util.document.cookie !== undefined;\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.CannotAccessCookie,\r\n \"Cannot access document.cookie - \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n };\r\n }\r\n\r\n return Util._canUseCookies;\r\n }\r\n\r\n /**\r\n * helper method to set userId and sessionId cookie\r\n */\r\n public static setCookie(name, value, domain?) {\r\n var domainAttrib = \"\";\r\n var secureAttrib = \"\";\r\n\r\n if (domain) {\r\n domainAttrib = \";domain=\" + domain;\r\n }\r\n\r\n if (Util.document.location && Util.document.location.protocol === \"https:\") {\r\n secureAttrib = \";secure\";\r\n }\r\n\r\n if (Util.canUseCookies()) {\r\n Util.document.cookie = name + \"=\" + value + domainAttrib + \";path=/\" + secureAttrib;\r\n }\r\n }\r\n\r\n public static stringToBoolOrDefault(str: any, defaultValue = false): boolean {\r\n if (str === undefined || str === null) {\r\n return defaultValue;\r\n }\r\n\r\n return str.toString().toLowerCase() === \"true\";\r\n }\r\n\r\n /**\r\n * helper method to access userId and sessionId cookie\r\n */\r\n public static getCookie(name) {\r\n if (!Util.canUseCookies()) {\r\n return;\r\n }\r\n\r\n var value = \"\";\r\n if (name && name.length) {\r\n var cookieName = name + \"=\";\r\n var cookies = Util.document.cookie.split(\";\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var cookie = cookies[i];\r\n cookie = Util.trim(cookie);\r\n if (cookie && cookie.indexOf(cookieName) === 0) {\r\n value = cookie.substring(cookieName.length, cookies[i].length);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /**\r\n * Deletes a cookie by setting it's expiration time in the past.\r\n * @param name - The name of the cookie to delete.\r\n */\r\n public static deleteCookie(name: string) {\r\n if (Util.canUseCookies()) {\r\n // Setting the expiration date in the past immediately removes the cookie\r\n Util.document.cookie = name + \"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\r\n }\r\n }\r\n\r\n /**\r\n * helper method to trim strings (IE8 does not implement String.prototype.trim)\r\n */\r\n public static trim(str: any): string {\r\n if (typeof str !== \"string\") return str;\r\n return str.replace(/^\\s+|\\s+$/g, \"\");\r\n }\r\n\r\n /**\r\n * generate random id string\r\n */\r\n public static newId(): string {\r\n return UtilHelpers.newId();\r\n }\r\n\r\n /**\r\n * Check if an object is of type Array\r\n */\r\n public static isArray(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Array]\";\r\n }\r\n\r\n /**\r\n * Check if an object is of type Error\r\n */\r\n public static isError(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Error]\";\r\n }\r\n\r\n /**\r\n * Check if an object is of type Date\r\n */\r\n public static isDate(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Date]\";\r\n }\r\n\r\n /**\r\n * Convert a date to I.S.O. format in IE8\r\n */\r\n public static toISOStringForIE8(date: Date) {\r\n if (Util.isDate(date)) {\r\n if (Date.prototype.toISOString) {\r\n return date.toISOString();\r\n } else {\r\n const pad = function(number) {\r\n var r = String(number);\r\n if (r.length === 1) {\r\n r = \"0\" + r;\r\n }\r\n\r\n return r;\r\n }\r\n\r\n return date.getUTCFullYear()\r\n + \"-\" + pad(date.getUTCMonth() + 1)\r\n + \"-\" + pad(date.getUTCDate())\r\n + \"T\" + pad(date.getUTCHours())\r\n + \":\" + pad(date.getUTCMinutes())\r\n + \":\" + pad(date.getUTCSeconds())\r\n + \".\" + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)\r\n + \"Z\";\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets IE version if we are running on IE, or null otherwise\r\n */\r\n public static getIEVersion(userAgentStr: string = null): number {\r\n var myNav = userAgentStr ? userAgentStr.toLowerCase() : navigator.userAgent.toLowerCase();\r\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : null;\r\n }\r\n\r\n /**\r\n * Convert ms to c# time span format\r\n */\r\n public static msToTimeSpan(totalms: number): string {\r\n if (isNaN(totalms) || totalms < 0) {\r\n totalms = 0;\r\n }\r\n\r\n totalms = Math.round(totalms);\r\n\r\n var ms = \"\" + totalms % 1000;\r\n var sec = \"\" + Math.floor(totalms / 1000) % 60;\r\n var min = \"\" + Math.floor(totalms / (1000 * 60)) % 60;\r\n var hour = \"\" + Math.floor(totalms / (1000 * 60 * 60)) % 24;\r\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\r\n\r\n ms = ms.length === 1 ? \"00\" + ms : ms.length === 2 ? \"0\" + ms : ms;\r\n sec = sec.length < 2 ? \"0\" + sec : sec;\r\n min = min.length < 2 ? \"0\" + min : min;\r\n hour = hour.length < 2 ? \"0\" + hour : hour;\r\n\r\n return (days > 0 ? days + \".\" : \"\") + hour + \":\" + min + \":\" + sec + \".\" + ms;\r\n }\r\n\r\n /**\t\t\r\n * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error\t\t\r\n * happens in a script from other domain (cross origin, CORS).\t\t\r\n */\r\n public static isCrossOriginError(message: string, url: string, lineNumber: number, columnNumber: number, error: Error): boolean {\r\n return (message === \"Script error.\" || message === \"Script error\") && !error;\r\n }\r\n\r\n /**\r\n * Returns string representation of an object suitable for diagnostics logging.\r\n */\r\n public static dump(object: any): string {\r\n var objectTypeDump: string = Object.prototype.toString.call(object);\r\n var propertyValueDump: string = JSON.stringify(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\r\n }\r\n\r\n return objectTypeDump + propertyValueDump;\r\n }\r\n\r\n /**\r\n * Returns the name of object if it's an Error. Otherwise, returns empty string.\r\n */\r\n public static getExceptionName(object: any): string {\r\n var objectTypeDump: string = Object.prototype.toString.call(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n return object.name;\r\n }\r\n return \"\";\r\n }\r\n\r\n /**\r\n * Adds an event handler for the specified event\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event \r\n * @return {boolean} - true if the handler was successfully added\r\n */\r\n public static addEventHandler(eventName: string, callback: any): boolean {\r\n if (!window || typeof eventName !== 'string' || typeof callback !== 'function') {\r\n return false;\r\n }\r\n\r\n // Create verb for the event\r\n var verbEventName = 'on' + eventName;\r\n\r\n // check if addEventListener is available\r\n if (window.addEventListener) {\r\n window.addEventListener(eventName, callback, false);\r\n } else if (window[\"attachEvent\"]) { // For older browsers\r\n window[\"attachEvent\"](verbEventName, callback);\r\n } else { // if all else fails\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Tells if a browser supports a Beacon API\r\n */\r\n public static IsBeaconApiSupported(): boolean {\r\n return ('sendBeacon' in navigator && (navigator).sendBeacon);\r\n }\r\n }\r\n\r\n export class UrlHelper {\r\n private static document: any = typeof document !== \"undefined\" ? document : {};\r\n private static htmlAnchorElement: HTMLAnchorElement;\r\n\r\n public static parseUrl(url): HTMLAnchorElement {\r\n if (!UrlHelper.htmlAnchorElement) {\r\n UrlHelper.htmlAnchorElement = !!UrlHelper.document.createElement ? UrlHelper.document.createElement('a') : {};\r\n }\r\n\r\n UrlHelper.htmlAnchorElement.href = url;\r\n\r\n return UrlHelper.htmlAnchorElement;\r\n }\r\n\r\n public static getAbsoluteUrl(url): string {\r\n var result: string;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.href;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static getPathName(url): string {\r\n var result: string;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.pathname;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static getCompleteUrl(method: string, absoluteUrl: string) {\r\n if (method) {\r\n return method.toUpperCase() + \" \" + absoluteUrl;\r\n } else {\r\n return absoluteUrl;\r\n }\r\n }\r\n }\r\n\r\n export class CorrelationIdHelper {\r\n public static correlationIdPrefix = \"cid-v1:\";\r\n\r\n /**\r\n * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers\r\n */\r\n public static canIncludeCorrelationHeader(config: IConfig, requestUrl: string, currentHost: string) {\r\n if (config && config.disableCorrelationHeaders) {\r\n return false;\r\n }\r\n\r\n if (!requestUrl) {\r\n return false;\r\n }\r\n\r\n let requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();\r\n if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) {\r\n return false;\r\n }\r\n\r\n let excludedDomains = config && config.correlationHeaderExcludedDomains;\r\n if (!excludedDomains || excludedDomains.length == 0) {\r\n return true;\r\n }\r\n\r\n for (let i = 0; i < excludedDomains.length; i++) {\r\n let regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\./g, \"\\.\").replace(/\\*/g, \".*\"));\r\n if (regex.test(requestHost)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Combines target appId and target role name from response header.\r\n */\r\n public static getCorrelationContext(responseHeader: string) {\r\n if (responseHeader) {\r\n const correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, RequestHeaders.requestContextTargetKey);\r\n if (correlationId && correlationId !== CorrelationIdHelper.correlationIdPrefix) {\r\n return correlationId;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets key from correlation response header\r\n */\r\n public static getCorrelationContextValue(responseHeader: string, key: string) {\r\n if (responseHeader) {\r\n const keyValues = responseHeader.split(\",\");\r\n for (let i = 0; i < keyValues.length; ++i) {\r\n const keyValue = keyValues[i].split(\"=\");\r\n if (keyValue.length == 2 && keyValue[0] == key) {\r\n return keyValue[1];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n /**\r\n * Enum is used in aiDataContract to describe how fields are serialized. \r\n * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array\r\n */\r\n export enum FieldType { Default = 0, Required = 1, Array = 2, Hidden = 4 };\r\n\r\n export class Serializer {\r\n\r\n /**\r\n * Serializes the current object to a JSON string.\r\n */\r\n public static serialize(input: ISerializable): string {\r\n var output = Serializer._serializeObject(input, \"root\");\r\n return JSON.stringify(output);\r\n }\r\n\r\n private static _serializeObject(source: ISerializable, name: string): any {\r\n var circularReferenceCheck = \"__aiCircularRefCheck\";\r\n var output = {};\r\n\r\n if (!source) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, \"cannot serialize object because it is null or undefined\", { name: name }, true);\r\n return output;\r\n }\r\n\r\n if (source[circularReferenceCheck]) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CircularReferenceDetected, \"Circular reference detected while serializing object\", { name: name }, true);\r\n return output;\r\n }\r\n\r\n if (!source.aiDataContract) {\r\n // special case for measurements/properties/tags\r\n if (name === \"measurements\") {\r\n output = Serializer._serializeStringMap(source, \"number\", name);\r\n } else if (name === \"properties\") {\r\n output = Serializer._serializeStringMap(source, \"string\", name);\r\n } else if (name === \"tags\") {\r\n output = Serializer._serializeStringMap(source, \"string\", name);\r\n } else if (Util.isArray(source)) {\r\n output = Serializer._serializeArray(source, name);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, \"Attempting to serialize an object which does not implement ISerializable\", { name: name }, true);\r\n\r\n try {\r\n // verify that the object can be stringified\r\n JSON.stringify(source);\r\n output = source;\r\n } catch (e) {\r\n // if serialization fails return an empty string\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, (e && typeof e.toString === 'function') ? e.toString() : \"Error serializing object\", null, true);\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n \r\n source[circularReferenceCheck] = true;\r\n for (var field in source.aiDataContract) {\r\n\r\n var contract = source.aiDataContract[field];\r\n var isRequired = (typeof contract === \"function\") ? (contract() & FieldType.Required) : (contract & FieldType.Required);\r\n var isHidden = (typeof contract === \"function\") ? (contract() & FieldType.Hidden) : (contract & FieldType.Hidden);\r\n var isArray = contract & FieldType.Array;\r\n\r\n var isPresent = source[field] !== undefined;\r\n var isObject = typeof source[field] === \"object\" && source[field] !== null;\r\n\r\n if (isRequired && !isPresent && !isArray) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MissingRequiredFieldSpecification,\r\n \"Missing required field specification. The field is required but not present on source\",\r\n { field: field, name: name });\r\n\r\n // If not in debug mode, continue and hope the error is permissible\r\n continue;\r\n }\r\n\r\n if (isHidden) {\r\n // Don't serialize hidden fields\r\n continue;\r\n }\r\n\r\n var value;\r\n if (isObject) {\r\n if (isArray) {\r\n // special case; resurse on each object in the source array\r\n value = Serializer._serializeArray(source[field], field);\r\n } else {\r\n // recurse on the source object in this field\r\n value = Serializer._serializeObject(source[field], field);\r\n }\r\n } else {\r\n // assign the source field to the output even if undefined or required\r\n value = source[field];\r\n }\r\n\r\n // only emit this field if the value is defined\r\n if (value !== undefined) {\r\n output[field] = value;\r\n }\r\n }\r\n\r\n delete source[circularReferenceCheck];\r\n return output;\r\n }\r\n\r\n private static _serializeArray(sources: Array, name: string): Array {\r\n var output = undefined;\r\n\r\n if (!!sources) {\r\n if (!Util.isArray(sources)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.ItemNotInArray,\r\n \"This field was specified as an array in the contract but the item is not an array.\\r\\n\",\r\n { name: name }, true);\r\n } else {\r\n output = [];\r\n for (var i = 0; i < sources.length; i++) {\r\n var source = sources[i];\r\n var item = Serializer._serializeObject(source, name + \"[\" + i + \"]\");\r\n output.push(item);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n\r\n private static _serializeStringMap(map, expectedType, name) {\r\n var output = undefined;\r\n if (map) {\r\n output = {};\r\n for (var field in map) {\r\n var value = map[field];\r\n if (expectedType === \"string\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n } else if (value === null) {\r\n output[field] = \"null\";\r\n } else if (!value.toString) {\r\n output[field] = \"invalid field: toString() is not defined.\";\r\n }\r\n else {\r\n output[field] = value.toString();\r\n }\r\n }\r\n else if (expectedType === \"number\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n } else if (value === null) {\r\n output[field] = \"null\";\r\n } else {\r\n var num = parseFloat(value);\r\n if (isNaN(num)) {\r\n output[field] = \"NaN\";\r\n }\r\n else {\r\n output[field] = num;\r\n }\r\n }\r\n }\r\n else {\r\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, output[field], null, true);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class Envelope extends Microsoft.Telemetry.Envelope implements IEnvelope {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract;\r\n\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n constructor(data: Microsoft.Telemetry.Base, name: string) {\r\n super();\r\n\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n this.data = data;\r\n this.time = Util.toISOStringForIE8(new Date());\r\n\r\n this.aiDataContract = {\r\n time: FieldType.Required,\r\n iKey: FieldType.Required,\r\n name: FieldType.Required,\r\n sampleRate: () => {\r\n return (this.sampleRate == 100) ? FieldType.Hidden : FieldType.Required;\r\n },\r\n tags: FieldType.Required,\r\n data: FieldType.Required\r\n };\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n\r\n export class Base extends Microsoft.Telemetry.Base implements ISerializable {\r\n \r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {};\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n export class ContextTagKeys\r\n {\r\n \r\n /**\r\n * Application version. Information in the application context fields is always about the application that is sending the telemetry.\r\n */\r\n public applicationVersion: string;\r\n \r\n /**\r\n * Application build.\r\n */\r\n public applicationBuild: string;\r\n \r\n /**\r\n * Application type id.\r\n */\r\n public applicationTypeId: string;\r\n \r\n /**\r\n * Application id.\r\n */\r\n public applicationId: string;\r\n \r\n /**\r\n * Application layer.\r\n */\r\n public applicationLayer: string;\r\n \r\n /**\r\n * Unique client device id. Computer name in most cases.\r\n */\r\n public deviceId: string;\r\n public deviceIp: string;\r\n public deviceLanguage: string;\r\n \r\n /**\r\n * Device locale using - pattern, following RFC 5646. Example 'en-US'.\r\n */\r\n public deviceLocale: string;\r\n \r\n /**\r\n * Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.\r\n */\r\n public deviceModel: string;\r\n public deviceFriendlyName: string;\r\n public deviceNetwork: string;\r\n public deviceNetworkName: string;\r\n \r\n /**\r\n * Client device OEM name taken from the browser.\r\n */\r\n public deviceOEMName: string;\r\n public deviceOS: string;\r\n \r\n /**\r\n * Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'\r\n */\r\n public deviceOSVersion: string;\r\n \r\n /**\r\n * Name of the instance where application is running. Computer name for on-premisis, instance name for Azure.\r\n */\r\n public deviceRoleInstance: string;\r\n \r\n /**\r\n * Name of the role application is part of. Maps directly to the role name in azure.\r\n */\r\n public deviceRoleName: string;\r\n public deviceScreenResolution: string;\r\n \r\n /**\r\n * The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.\r\n */\r\n public deviceType: string;\r\n public deviceMachineName: string;\r\n public deviceVMName: string;\r\n public deviceBrowser: string;\r\n \r\n /**\r\n * The browser name and version as reported by the browser.\r\n */\r\n public deviceBrowserVersion: string;\r\n \r\n /**\r\n * The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationIp: string;\r\n \r\n /**\r\n * The country of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationCountry: string;\r\n \r\n /**\r\n * The province/state of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationProvince: string;\r\n \r\n /**\r\n * The city of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationCity: string;\r\n \r\n /**\r\n * A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.\r\n */\r\n public operationId: string;\r\n \r\n /**\r\n * The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').\r\n */\r\n public operationName: string;\r\n \r\n /**\r\n * The unique identifier of the telemetry item's immediate parent.\r\n */\r\n public operationParentId: string;\r\n public operationRootId: string;\r\n \r\n /**\r\n * Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.\r\n */\r\n public operationSyntheticSource: string;\r\n \r\n /**\r\n * The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.\r\n */\r\n public operationCorrelationVector: string;\r\n \r\n /**\r\n * Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.\r\n */\r\n public sessionId: string;\r\n \r\n /**\r\n * Boolean value indicating whether the session identified by ai.session.id is first for the user or not.\r\n */\r\n public sessionIsFirst: string;\r\n public sessionIsNew: string;\r\n public userAccountAcquisitionDate: string;\r\n \r\n /**\r\n * In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.\r\n */\r\n public userAccountId: string;\r\n \r\n /**\r\n * The browser's user agent string as reported by the browser. This property will be used to extract informaiton regarding the customer's browser but will not be stored. Use custom properties to store the original user agent.\r\n */\r\n public userAgent: string;\r\n \r\n /**\r\n * Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.\r\n */\r\n public userId: string;\r\n \r\n /**\r\n * Store region for UWP applications.\r\n */\r\n public userStoreRegion: string;\r\n \r\n /**\r\n * Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.\r\n */\r\n public userAuthUserId: string;\r\n public userAnonymousUserAcquisitionDate: string;\r\n public userAuthenticatedUserAcquisitionDate: string;\r\n public cloudName: string;\r\n \r\n /**\r\n * Name of the role the application is a part of. Maps directly to the role name in azure.\r\n */\r\n public cloudRole: string;\r\n public cloudRoleVer: string;\r\n \r\n /**\r\n * Name of the instance where the application is running. Computer name for on-premisis, instance name for Azure.\r\n */\r\n public cloudRoleInstance: string;\r\n public cloudEnvironment: string;\r\n public cloudLocation: string;\r\n public cloudDeploymentUnit: string;\r\n \r\n /**\r\n * SDK version. See https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.\r\n */\r\n public internalSdkVersion: string;\r\n \r\n /**\r\n * Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.\r\n */\r\n public internalAgentVersion: string;\r\n \r\n /**\r\n * This is the node name used for billing purposes. Use it to override the standard detection of nodes.\r\n */\r\n public internalNodeName: string;\r\n \r\n constructor()\r\n {\r\n this.applicationVersion = \"ai.application.ver\";\r\n this.applicationBuild = \"ai.application.build\";\r\n this.applicationTypeId = \"ai.application.typeId\";\r\n this.applicationId = \"ai.application.applicationId\";\r\n this.applicationLayer = \"ai.application.layer\";\r\n this.deviceId = \"ai.device.id\";\r\n this.deviceIp = \"ai.device.ip\";\r\n this.deviceLanguage = \"ai.device.language\";\r\n this.deviceLocale = \"ai.device.locale\";\r\n this.deviceModel = \"ai.device.model\";\r\n this.deviceFriendlyName = \"ai.device.friendlyName\";\r\n this.deviceNetwork = \"ai.device.network\";\r\n this.deviceNetworkName = \"ai.device.networkName\";\r\n this.deviceOEMName = \"ai.device.oemName\";\r\n this.deviceOS = \"ai.device.os\";\r\n this.deviceOSVersion = \"ai.device.osVersion\";\r\n this.deviceRoleInstance = \"ai.device.roleInstance\";\r\n this.deviceRoleName = \"ai.device.roleName\";\r\n this.deviceScreenResolution = \"ai.device.screenResolution\";\r\n this.deviceType = \"ai.device.type\";\r\n this.deviceMachineName = \"ai.device.machineName\";\r\n this.deviceVMName = \"ai.device.vmName\";\r\n this.deviceBrowser = \"ai.device.browser\";\r\n this.deviceBrowserVersion = \"ai.device.browserVersion\";\r\n this.locationIp = \"ai.location.ip\";\r\n this.locationCountry = \"ai.location.country\";\r\n this.locationProvince = \"ai.location.province\";\r\n this.locationCity = \"ai.location.city\";\r\n this.operationId = \"ai.operation.id\";\r\n this.operationName = \"ai.operation.name\";\r\n this.operationParentId = \"ai.operation.parentId\";\r\n this.operationRootId = \"ai.operation.rootId\";\r\n this.operationSyntheticSource = \"ai.operation.syntheticSource\";\r\n this.operationCorrelationVector = \"ai.operation.correlationVector\";\r\n this.sessionId = \"ai.session.id\";\r\n this.sessionIsFirst = \"ai.session.isFirst\";\r\n this.sessionIsNew = \"ai.session.isNew\";\r\n this.userAccountAcquisitionDate = \"ai.user.accountAcquisitionDate\";\r\n this.userAccountId = \"ai.user.accountId\";\r\n this.userAgent = \"ai.user.userAgent\";\r\n this.userId = \"ai.user.id\";\r\n this.userStoreRegion = \"ai.user.storeRegion\";\r\n this.userAuthUserId = \"ai.user.authUserId\";\r\n this.userAnonymousUserAcquisitionDate = \"ai.user.anonUserAcquisitionDate\";\r\n this.userAuthenticatedUserAcquisitionDate = \"ai.user.authUserAcquisitionDate\";\r\n this.cloudName = \"ai.cloud.name\";\r\n this.cloudRole = \"ai.cloud.role\";\r\n this.cloudRoleVer = \"ai.cloud.roleVer\";\r\n this.cloudRoleInstance = \"ai.cloud.roleInstance\";\r\n this.cloudEnvironment = \"ai.cloud.environment\";\r\n this.cloudLocation = \"ai.cloud.location\";\r\n this.cloudDeploymentUnit = \"ai.cloud.deploymentUnit\";\r\n this.internalSdkVersion = \"ai.internal.sdkVersion\";\r\n this.internalAgentVersion = \"ai.internal.agentVersion\";\r\n this.internalNodeName = \"ai.internal.nodeName\";\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Application implements IApplication {\r\n /**\r\n * The application version.\r\n */\r\n public ver: string;\r\n\r\n /**\r\n * The application build version.\r\n */\r\n public build: string;\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Device implements IDevice {\r\n\r\n /**\r\n * The type for the current device.\r\n */\r\n public type: string;\r\n\r\n /**\r\n * A device unique ID.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * The device OEM for the current device.\r\n */\r\n public oemName: string;\r\n\r\n /**\r\n * The device model for the current device.\r\n */\r\n public model: string;\r\n\r\n /**\r\n * The IANA interface type for the internet connected network adapter.\r\n */\r\n public network: number;\r\n\r\n /**\r\n * The application screen resolution.\r\n */\r\n public resolution: string;\r\n\r\n /**\r\n * The current display language of the operating system.\r\n */\r\n public locale: string;\r\n \r\n /**\r\n * The IP address.\r\n */\r\n public ip: string;\r\n\r\n /**\r\n * The device language.\r\n */\r\n public language: string;\r\n\r\n /**\r\n * The OS name.\r\n */\r\n public os: string;\r\n\r\n /**\r\n * The OS version.\r\n */\r\n public osversion: string;\r\n\r\n /**\r\n * Constructs a new instance of the Device class\r\n */\r\n constructor() {\r\n // don't attempt to fingerprint browsers\r\n this.id = \"browser\";\r\n\r\n // Device type is a dimension in our data platform\r\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\r\n this.type = \"Browser\";\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Internal implements IInternal {\r\n\r\n /**\r\n * The SDK version used to create this telemetry item.\r\n */\r\n public sdkVersion: string;\r\n\r\n /**\r\n * The SDK agent version.\r\n */\r\n public agentVersion: string;\r\n\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n constructor(config: ITelemetryConfig) {\r\n this.sdkVersion = (config.sdkExtension() ? config.sdkExtension() + \"_\" : \"\") + \"javascript:\" + Version;\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Location implements ILocation {\r\n\r\n /**\r\n * Client IP address for reverse lookup\r\n */\r\n public ip: string;\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Operation implements IOperation {\r\n\r\n public id: string;\r\n public name: string;\r\n public parentId: string;\r\n public rootId: string;\r\n public syntheticSource: string;\r\n\r\n constructor() {\r\n this.id = Util.newId();\r\n if (window && window.location && window.location.pathname) {\r\n this.name = window.location.pathname;\r\n }\r\n }\r\n }\r\n} ","module Microsoft.ApplicationInsights {\r\n export class HashCodeScoreGenerator {\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n public static INT_MAX_VALUE: number = 2147483647;\r\n\r\n // (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\r\n private static MIN_INPUT_LENGTH: number = 8;\r\n\r\n public getHashCodeScore(key: string): number {\r\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\r\n return score * 100;\r\n }\r\n\r\n public getHashCode(input: string): number {\r\n if (input == \"\") { return 0; }\r\n\r\n while (input.length < HashCodeScoreGenerator.MIN_INPUT_LENGTH) {\r\n input = input.concat(input);\r\n }\r\n\r\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\r\n var hash: number = 5381;\r\n\r\n for (var i: number = 0; i < input.length; ++i) {\r\n hash = ((hash << 5) + hash) + input.charCodeAt(i);\r\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\r\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\r\n hash = hash & hash;\r\n }\r\n\r\n return Math.abs(hash);\r\n }\r\n }\r\n} ","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n export class SamplingScoreGenerator {\r\n private hashCodeGeneragor: HashCodeScoreGenerator;\r\n\r\n constructor() {\r\n this.hashCodeGeneragor = new HashCodeScoreGenerator();\r\n }\r\n\r\n public getSamplingScore(envelope: Microsoft.ApplicationInsights.IEnvelope): number {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n var score: number = 0;\r\n if (envelope.tags[tagKeys.userId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.userId]);\r\n } else if (envelope.tags[tagKeys.operationId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.operationId]);\r\n } else {\r\n score = Math.random()\r\n }\r\n\r\n return score;\r\n }\r\n }\r\n} ","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Sample implements ISample {\r\n public sampleRate: number;\r\n private samplingScoreGenerator: SamplingScoreGenerator;\r\n\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n public INT_MAX_VALUE: number = 2147483647;\r\n\r\n constructor(sampleRate: number) {\r\n if (sampleRate > 100 || sampleRate < 0) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SampleRateOutOfRange,\r\n \"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.\",\r\n { samplingRate: sampleRate }, true);\r\n this.sampleRate = 100;\r\n }\r\n\r\n this.sampleRate = sampleRate;\r\n this.samplingScoreGenerator = new SamplingScoreGenerator();\r\n }\r\n\r\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */\r\n public isSampledIn(envelope: Microsoft.ApplicationInsights.IEnvelope): boolean {\r\n if (this.sampleRate == 100) return true;\r\n\r\n var score = this.samplingScoreGenerator.getSamplingScore(envelope);\r\n\r\n return score < this.sampleRate;\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISessionConfig {\r\n sessionRenewalMs: () => number;\r\n sessionExpirationMs: () => number;\r\n cookieDomain: () => string;\r\n }\r\n\r\n export class Session implements ISession {\r\n /**\r\n * The session ID.\r\n */\r\n public id: string;\r\n\r\n /** \r\n * The true if this is the first session \r\n */\r\n public isFirst: boolean;\r\n\r\n /**\r\n * The date at which this guid was genereated.\r\n * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.\r\n */\r\n public acquisitionDate: number;\r\n\r\n /**\r\n * The date at which this session ID was last reported.\r\n * This value should be updated whenever telemetry is sent using this ID.\r\n * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.\r\n */\r\n public renewalDate: number;\r\n }\r\n\r\n export class _SessionManager {\r\n\r\n public static acquisitionSpan = 86400000; // 24 hours in ms\r\n public static renewalSpan = 1800000; // 30 minutes in ms\r\n public static cookieUpdateInterval = 60000 // 1 minute in ms\r\n public automaticSession: Session;\r\n public config: ISessionConfig;\r\n\r\n private cookieUpdatedTimestamp: number;\r\n\r\n constructor(config: ISessionConfig) {\r\n\r\n if (!config) {\r\n config = {};\r\n }\r\n\r\n if (!(typeof config.sessionExpirationMs === \"function\")) {\r\n config.sessionExpirationMs = () => _SessionManager.acquisitionSpan;\r\n }\r\n\r\n if (!(typeof config.sessionRenewalMs === \"function\")) {\r\n config.sessionRenewalMs = () => _SessionManager.renewalSpan;\r\n }\r\n\r\n this.config = config;\r\n\r\n this.automaticSession = new Session();\r\n }\r\n\r\n public update() {\r\n if (!this.automaticSession.id) {\r\n this.initializeAutomaticSession();\r\n }\r\n\r\n var now = dateTime.Now();\r\n\r\n var acquisitionExpired = now - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs();\r\n var renewalExpired = now - this.automaticSession.renewalDate > this.config.sessionRenewalMs();\r\n\r\n // renew if acquisitionSpan or renewalSpan has ellapsed\r\n if (acquisitionExpired || renewalExpired) {\r\n // update automaticSession so session state has correct id \r\n this.automaticSession.isFirst = undefined;\r\n this.renew();\r\n } else {\r\n // do not update the cookie more often than cookieUpdateInterval\r\n if (!this.cookieUpdatedTimestamp || now - this.cookieUpdatedTimestamp > _SessionManager.cookieUpdateInterval) {\r\n this.automaticSession.renewalDate = now;\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\r\n public backup() {\r\n this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n\r\n /**\r\n * Use ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n */\r\n private initializeAutomaticSession() {\r\n var cookie = Util.getCookie('ai_session');\r\n if (cookie && typeof cookie.split === \"function\") {\r\n this.initializeAutomaticSessionWithData(cookie);\r\n } else {\r\n // There's no cookie, but we might have session data in local storage\r\n // This can happen if the session expired or the user actively deleted the cookie\r\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\r\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\r\n var storage = Util.getStorage('ai_session');\r\n if (storage) {\r\n this.initializeAutomaticSessionWithData(storage);\r\n }\r\n }\r\n\r\n if (!this.automaticSession.id) {\r\n this.automaticSession.isFirst = true;\r\n this.renew();\r\n }\r\n }\r\n\r\n /**\r\n * Extract id, aquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param {string} sessionData - The string stored in an ai_session cookie or local storage backup\r\n */\r\n private initializeAutomaticSessionWithData(sessionData: string) {\r\n var params = sessionData.split(\"|\");\r\n\r\n if (params.length > 0) {\r\n this.automaticSession.id = params[0];\r\n }\r\n\r\n try {\r\n if (params.length > 1) {\r\n var acq = +params[1];\r\n this.automaticSession.acquisitionDate = +new Date(acq);\r\n this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0;\r\n }\r\n\r\n if (params.length > 2) {\r\n var renewal = +params[2];\r\n this.automaticSession.renewalDate = +new Date(renewal);\r\n this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0;\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n\r\n _InternalMessageId.ErrorParsingAISessionCookie,\r\n \"Error parsing ai_session cookie, session will be reset: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n\r\n if (this.automaticSession.renewalDate == 0) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SessionRenewalDateIsZero,\r\n \"AI session renewal date is 0, session will be reset.\");\r\n }\r\n }\r\n\r\n private renew() {\r\n var now = dateTime.Now();\r\n\r\n this.automaticSession.id = Util.newId();\r\n this.automaticSession.acquisitionDate = now;\r\n this.automaticSession.renewalDate = now;\r\n\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n\r\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\r\n if (!Util.canUseLocalStorage()) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserDoesNotSupportLocalStorage,\r\n \"Browser does not support local storage. Session durations will be inaccurate.\");\r\n }\r\n }\r\n\r\n private setCookie(guid: string, acq: number, renewal: number) {\r\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\r\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\r\n var acquisitionExpiry = acq + this.config.sessionExpirationMs();\r\n var renewalExpiry = renewal + this.config.sessionRenewalMs();\r\n var cookieExpiry = new Date();\r\n var cookie = [guid, acq, renewal];\r\n\r\n if (acquisitionExpiry < renewalExpiry) {\r\n cookieExpiry.setTime(acquisitionExpiry);\r\n } else {\r\n cookieExpiry.setTime(renewalExpiry);\r\n }\r\n\r\n var cookieDomnain = this.config.cookieDomain ? this.config.cookieDomain() : null;\r\n\r\n Util.setCookie('ai_session', cookie.join('|') + ';expires=' + cookieExpiry.toUTCString(), cookieDomnain);\r\n\r\n this.cookieUpdatedTimestamp = dateTime.Now();\r\n }\r\n\r\n private setStorage(guid: string, acq: number, renewal: number) {\r\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\r\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\r\n // The server will notice this and end the sessions itself, with loss of accurate session duration\r\n Util.setStorage('ai_session', [guid, acq, renewal].join('|'));\r\n }\r\n }\r\n} ","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class User implements IUser {\r\n\r\n static cookieSeparator: string = '|';\r\n static userCookieName: string = 'ai_user';\r\n static authUserCookieName: string = 'ai_authUser';\r\n\r\n /**\r\n * The telemetry configuration.\r\n */\r\n public config: ITelemetryConfig;\r\n\r\n /**\r\n * The user ID.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * Authenticated user id\r\n */\r\n public authenticatedId: string;\r\n\r\n /**\r\n * The account ID.\r\n */\r\n public accountId: string;\r\n\r\n /**\r\n * The account acquisition date.\r\n */\r\n public accountAcquisitionDate: string;\r\n\r\n /**\r\n * The user agent string.\r\n */\r\n public agent: string;\r\n\r\n /**\r\n * The store region.\r\n */\r\n public storeRegion: string;\r\n\r\n /**\r\n * Sets the authenticated user id and the account id in this session.\r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false) {\r\n\r\n // Validate inputs to ensure no cookie control characters.\r\n var isInvalidInput = !this.validateUserInput(authenticatedUserId) || (accountId && !this.validateUserInput(accountId));\r\n if (isInvalidInput) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailedAccountName,\r\n \"Setting auth user context failed. \" +\r\n \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\",\r\n true);\r\n return;\r\n }\r\n\r\n // Create cookie string.\r\n this.authenticatedId = authenticatedUserId;\r\n var authCookie = this.authenticatedId;\r\n if (accountId) {\r\n this.accountId = accountId;\r\n authCookie = [this.authenticatedId, this.accountId].join(User.cookieSeparator);\r\n }\r\n\r\n if (storeInCookie) {\r\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\r\n // Encoding the cookie to handle unexpected unicode characters.\r\n Util.setCookie(User.authUserCookieName, encodeURI(authCookie), this.config.cookieDomain());\r\n }\r\n }\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {} \r\n */\r\n public clearAuthenticatedUserContext() {\r\n this.authenticatedId = null;\r\n this.accountId = null;\r\n Util.deleteCookie(User.authUserCookieName);\r\n }\r\n\r\n constructor(config: ITelemetryConfig) {\r\n\r\n //get userId or create new one if none exists\r\n var cookie = Util.getCookie(User.userCookieName);\r\n if (cookie) {\r\n var params = cookie.split(User.cookieSeparator);\r\n if (params.length > 0) {\r\n this.id = params[0];\r\n }\r\n }\r\n\r\n this.config = config;\r\n\r\n if (!this.id) {\r\n this.id = Util.newId();\r\n var date = new Date();\r\n var acqStr = Util.toISOStringForIE8(date);\r\n this.accountAcquisitionDate = acqStr;\r\n // without expiration, cookies expire at the end of the session\r\n // set it to 365 days from now\r\n // 365 * 24 * 60 * 60 * 1000 = 31536000000 \r\n date.setTime(date.getTime() + 31536000000);\r\n var newCookie = [this.id, acqStr];\r\n var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : undefined;\r\n\r\n Util.setCookie(User.userCookieName, newCookie.join(User.cookieSeparator) + ';expires=' + date.toUTCString(), cookieDomain);\r\n\r\n // If we have an ai_session in local storage this means the user actively removed our cookies.\r\n // We should respect their wishes and clear ourselves from local storage\r\n Util.removeStorage('ai_session');\r\n }\r\n\r\n // We still take the account id from the ctor param for backward compatibility. \r\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\r\n this.accountId = config.accountId ? config.accountId() : undefined;\r\n\r\n // Get the auth user id and account id from the cookie if exists\r\n // Cookie is in the pattern: |\r\n var authCookie = Util.getCookie(User.authUserCookieName);\r\n if (authCookie) {\r\n authCookie = decodeURI(authCookie);\r\n var authCookieString = authCookie.split(User.cookieSeparator);\r\n if (authCookieString[0]) {\r\n this.authenticatedId = authCookieString[0];\r\n }\r\n if (authCookieString.length > 1 && authCookieString[1]) {\r\n this.accountId = authCookieString[1];\r\n }\r\n }\r\n }\r\n\r\n private validateUserInput(id: string): boolean {\r\n // Validate:\r\n // 1. Id is a non-empty string.\r\n // 2. It does not contain special characters for cookies.\r\n if (typeof id !== 'string' ||\r\n !id ||\r\n id.match(/,|;|=| |\\|/)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class extensions {\r\n public static IsNullOrUndefined(obj) {\r\n return typeof (obj) === \"undefined\" || obj === null;\r\n }\r\n }\r\n\r\n export class stringUtils {\r\n public static GetLength(strObject) {\r\n var res = 0;\r\n if (!extensions.IsNullOrUndefined(strObject)) {\r\n var stringified = \"\";\r\n try {\r\n stringified = strObject.toString();\r\n } catch (ex) {\r\n // some troubles with complex object\r\n }\r\n\r\n res = stringified.length;\r\n res = isNaN(res) ? 0 : res;\r\n }\r\n\r\n return res;\r\n }\r\n }\r\n\r\n export class dateTime {\r\n ///Return the number of milliseconds since 1970/01/01 in local timezon\r\n public static Now = (window.performance && window.performance.now && window.performance.timing) ?\r\n function () {\r\n return window.performance.now() + window.performance.timing.navigationStart;\r\n }\r\n :\r\n function () {\r\n return new Date().getTime();\r\n }\r\n\r\n ///Gets duration between two timestamps\r\n public static GetDuration = function (start: number, end: number): number {\r\n var result = null;\r\n if (start !== 0 && end !== 0 && !extensions.IsNullOrUndefined(start) && !extensions.IsNullOrUndefined(end)) {\r\n result = end - start;\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n export class EventHelper {\r\n ///Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n ///Object to which \r\n ///String that specifies any of the standard DHTML Events without \"on\" prefix\r\n ///Pointer that specifies the function to call when event fires\r\n ///True if the function was bound successfully to the event, otherwise false\r\n public static AttachEvent(obj, eventNameWithoutOn, handlerRef) {\r\n var result = false;\r\n if (!extensions.IsNullOrUndefined(obj)) {\r\n if (!extensions.IsNullOrUndefined(obj.attachEvent)) {\r\n // IE before version 9 \r\n obj.attachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n result = true;\r\n }\r\n else {\r\n if (!extensions.IsNullOrUndefined(obj.addEventListener)) {\r\n // all browsers except IE before version 9\r\n obj.addEventListener(eventNameWithoutOn, handlerRef, false);\r\n result = true;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static DetachEvent(obj, eventNameWithoutOn, handlerRef) {\r\n if (!extensions.IsNullOrUndefined(obj)) {\r\n if (!extensions.IsNullOrUndefined(obj.detachEvent)) {\r\n obj.detachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n }\r\n else {\r\n if (!extensions.IsNullOrUndefined(obj.removeEventListener)) {\r\n obj.removeEventListener(eventNameWithoutOn, handlerRef, false);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class AjaxHelper {\r\n public static ParseDependencyPath(absoluteUrl: string, method: string, pathName: string) {\r\n var target, name; \r\n if (absoluteUrl && absoluteUrl.length > 0) {\r\n var parsedUrl: HTMLAnchorElement = UrlHelper.parseUrl(absoluteUrl)\r\n target = parsedUrl.host;\r\n if (parsedUrl.pathname != null) {\r\n var pathName: string = (parsedUrl.pathname.length === 0) ? \"/\" : parsedUrl.pathname;\r\n if (pathName.charAt(0) !== '/') {\r\n pathName = \"/\" + pathName;\r\n }\r\n\r\n name = Telemetry.Common.DataSanitizer.sanitizeString(method ? method + \" \" + pathName : pathName);\r\n } else {\r\n name = Telemetry.Common.DataSanitizer.sanitizeString(absoluteUrl);\r\n }\r\n } else {\r\n target = pathName;\r\n name = pathName;\r\n }\r\n\r\n return {\r\n target: target, \r\n name: name\r\n };\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class XHRMonitoringState {\r\n public openDone: boolean = false;\r\n public setRequestHeaderDone: boolean = false;\r\n public sendDone: boolean = false;\r\n public abortDone: boolean = false;\r\n\r\n //True, if onreadyStateChangeCallback function attached to xhr, otherwise false\r\n public onreadystatechangeCallbackAttached = false;\r\n }\r\n\r\n export class ajaxRecord {\r\n public completed = false;\r\n public requestHeadersSize = null;\r\n public ttfb = null;\r\n public responseReceivingDuration = null;\r\n public callbackDuration = null;\r\n public ajaxTotalDuration = null;\r\n public aborted = null;\r\n public pageUrl = null;\r\n public requestUrl = null;\r\n public requestSize = 0;\r\n public method = null;\r\n\r\n ///Returns the HTTP status code.\r\n public status = null; \r\n \r\n //The timestamp when open method was invoked\r\n public requestSentTime = null;\r\n\r\n //The timestamps when first byte was received\r\n public responseStartedTime = null;\r\n\r\n //The timestamp when last byte was received\r\n public responseFinishedTime = null;\r\n\r\n //The timestamp when onreadystatechange callback in readyState 4 finished\r\n public callbackFinishedTime = null;\r\n \r\n //The timestamp at which ajax was ended\r\n public endTime = null;\r\n\r\n //The original xhr onreadystatechange event\r\n public originalOnreadystatechage = null;\r\n\r\n public xhrMonitoringState: XHRMonitoringState = new XHRMonitoringState();\r\n\r\n //Determines whether or not JavaScript exception occured in xhr.onreadystatechange code. 1 if occured, otherwise 0.\r\n public clientFailure = 0;\r\n\r\n\r\n public id: string;\r\n\r\n constructor(id: string) {\r\n this.id = id;\r\n }\r\n\r\n\r\n public getAbsoluteUrl() {\r\n return this.requestUrl ? UrlHelper.getAbsoluteUrl(this.requestUrl) : null;\r\n }\r\n\r\n public getPathName() {\r\n return this.requestUrl ? Telemetry.Common.DataSanitizer.sanitizeUrl(UrlHelper.getCompleteUrl(this.method, this.requestUrl)): null;\r\n }\r\n\r\n public CalculateMetrics = function () {\r\n var self = this;\r\n // round to 3 decimal points\r\n self.ajaxTotalDuration = Math.round(dateTime.GetDuration(self.requestSentTime, self.responseFinishedTime)*1000)/1000;\r\n }\r\n };\r\n}; \r\n\r\n","module Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class RequestHeaders {\r\n /**\r\n * Request-Context header\r\n */\r\n public static requestContextHeader = \"Request-Context\";\r\n\r\n /**\r\n * Target instrumentation header that is added to the response and retrieved by the\r\n * calling application when processing incoming responses.\r\n */\r\n public static requestContextTargetKey = \"appId\";\r\n\r\n /**\r\n * Request-Context appId format\r\n */\r\n public static requestContextAppIdFormat = \"appId=cid-v1:\";\r\n\r\n /**\r\n * Request-Id header\r\n */\r\n public static requestIdHeader = \"Request-Id\";\r\n\r\n /**\r\n * Sdk-Context header\r\n * If this header passed with appId in content then appId will be returned back by the backend.\r\n */\r\n public static sdkContextHeader = \"Sdk-Context\";\r\n\r\n /**\r\n * String to pass in header for requesting appId back from the backend.\r\n */\r\n public static sdkContextHeaderAppIdRequest = \"appId\";\r\n\r\n public static requestContextHeaderLowerCase = \"request-context\";\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * The abstract common base of all domains.\r\n */\r\n export class Domain\r\n {\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.\r\n */\r\n export class EventData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.\r\n */\r\n export class PageViewData extends AI.EventData\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Request URL with all query string parameters\r\n */\r\n public url: string;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Identifier of a page view instance. Used for correlation between page view and other telemetry items.\r\n */\r\n public id: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.\r\n */\r\n export class RemoteDependencyData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call.\r\n */\r\n public id: string;\r\n \r\n /**\r\n * Result code of a dependency call. Examples are SQL error code and HTTP status code.\r\n */\r\n public resultCode: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Indication of successfull or unsuccessfull call.\r\n */\r\n public success: boolean;\r\n \r\n /**\r\n * Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.\r\n */\r\n public data: string;\r\n \r\n /**\r\n * Target site of a dependency call. Examples are server name, host address.\r\n */\r\n public target: string;\r\n \r\n /**\r\n * Dependency type name. Very low cardinality value for logical grouping of dependencies and interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP.\r\n */\r\n public type: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.success = true;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n\r\n export class DataSanitizer {\r\n\r\n /**\r\n * Max length allowed for custom names.\r\n */\r\n private static MAX_NAME_LENGTH = 150;\r\n\r\n /**\r\n * Max length allowed for Id field in page views.\r\n */\r\n private static MAX_ID_LENGTH = 128;\r\n\r\n /**\r\n * Max length allowed for custom values.\r\n */\r\n private static MAX_PROPERTY_LENGTH = 8192;\r\n\r\n /**\r\n * Max length allowed for names\r\n */\r\n private static MAX_STRING_LENGTH = 1024;\r\n\r\n /**\r\n * Max length allowed for url.\r\n */\r\n private static MAX_URL_LENGTH = 2048;\r\n\r\n /**\r\n * Max length allowed for messages.\r\n */\r\n private static MAX_MESSAGE_LENGTH = 32768;\r\n\r\n /**\r\n * Max length allowed for exceptions.\r\n */\r\n private static MAX_EXCEPTION_LENGTH = 32768;\r\n\r\n public static sanitizeKeyAndAddUniqueness(key, map) {\r\n var origLength = key.length;\r\n var field = DataSanitizer.sanitizeKey(key);\r\n\r\n // validation truncated the length. We need to add uniqueness\r\n if (field.length !== origLength) {\r\n var i = 0;\r\n var uniqueField = field;\r\n while (map[uniqueField] !== undefined) {\r\n i++;\r\n uniqueField = field.substring(0, DataSanitizer.MAX_NAME_LENGTH - 3) + DataSanitizer.padNumber(i);\r\n }\r\n field = uniqueField;\r\n }\r\n return field;\r\n }\r\n\r\n public static sanitizeKey(name) {\r\n if (name) {\r\n // Remove any leading or trailing whitepace\r\n name = Util.trim(name.toString());\r\n\r\n // truncate the string to 150 chars\r\n if (name.length > DataSanitizer.MAX_NAME_LENGTH) {\r\n name = name.substring(0, DataSanitizer.MAX_NAME_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.NameTooLong,\r\n \"name is too long. It has been truncated to \" + DataSanitizer.MAX_NAME_LENGTH + \" characters.\",\r\n { name: name }, true);\r\n }\r\n }\r\n\r\n return name;\r\n }\r\n\r\n public static sanitizeString(value, maxLength: number = DataSanitizer.MAX_STRING_LENGTH) {\r\n if (value) {\r\n maxLength = maxLength ? maxLength: DataSanitizer.MAX_STRING_LENGTH; // in case default parameters dont work\r\n value = Util.trim(value);\r\n if (value.toString().length > maxLength) {\r\n value = value.toString().substring(0, maxLength);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.StringValueTooLong,\r\n \"string value is too long. It has been truncated to \" + maxLength + \" characters.\",\r\n { value: value }, true);\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n public static sanitizeUrl(url) {\r\n return DataSanitizer.sanitizeInput(url, DataSanitizer.MAX_URL_LENGTH, _InternalMessageId.UrlTooLong);\r\n }\r\n\r\n public static sanitizeMessage(message) {\r\n if (message) {\r\n if (message.length > DataSanitizer.MAX_MESSAGE_LENGTH) {\r\n message = message.substring(0, DataSanitizer.MAX_MESSAGE_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated,\r\n \"message is too long, it has been truncated to \" + DataSanitizer.MAX_MESSAGE_LENGTH + \" characters.\",\r\n { message: message },\r\n true);\r\n }\r\n }\r\n\r\n return message;\r\n }\r\n\r\n public static sanitizeException(exception) {\r\n if (exception) {\r\n if (exception.length > DataSanitizer.MAX_EXCEPTION_LENGTH) {\r\n exception = exception.substring(0, DataSanitizer.MAX_EXCEPTION_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, \"exception is too long, it has been truncated to \" + DataSanitizer.MAX_EXCEPTION_LENGTH + \" characters.\",\r\n { exception: exception }, true);\r\n }\r\n }\r\n\r\n return exception;\r\n }\r\n\r\n public static sanitizeProperties(properties) {\r\n if (properties) {\r\n var tempProps = {};\r\n for (var prop in properties) {\r\n var value = DataSanitizer.sanitizeString(properties[prop], DataSanitizer.MAX_PROPERTY_LENGTH);\r\n prop = DataSanitizer.sanitizeKeyAndAddUniqueness(prop, tempProps);\r\n tempProps[prop] = value;\r\n }\r\n properties = tempProps;\r\n }\r\n\r\n return properties;\r\n }\r\n\r\n public static sanitizeMeasurements(measurements) {\r\n if (measurements) {\r\n var tempMeasurements = {};\r\n for (var measure in measurements) {\r\n var value = measurements[measure];\r\n measure = DataSanitizer.sanitizeKeyAndAddUniqueness(measure, tempMeasurements);\r\n tempMeasurements[measure] = value;\r\n }\r\n measurements = tempMeasurements;\r\n }\r\n\r\n return measurements;\r\n }\r\n\r\n public static sanitizeId(id: string): string {\r\n return id ? DataSanitizer.sanitizeInput(id, DataSanitizer.MAX_ID_LENGTH, _InternalMessageId.IdTooLong).toString() : id;\r\n }\r\n\r\n public static sanitizeInput(input: any, maxLength: number, _msgId: _InternalMessageId) {\r\n if (input) {\r\n input = Util.trim(input);\r\n if (input.length > maxLength) {\r\n input = input.substring(0, maxLength);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _msgId,\r\n \"input is too long, it has been truncated to \" + maxLength + \" characters.\",\r\n { data: input },\r\n true);\r\n }\r\n }\r\n\r\n return input;\r\n }\r\n\r\n public static padNumber(num) {\r\n var s = \"00\" + num;\r\n return s.substr(s.length - 3);\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class RemoteDependencyData extends AI.RemoteDependencyData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\r\n public static dataType = \"RemoteDependencyData\";\r\n\r\n public aiDataContract = {\r\n id: FieldType.Required,\r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n resultCode: FieldType.Default,\r\n duration: FieldType.Default,\r\n success: FieldType.Default,\r\n data: FieldType.Default,\r\n target: FieldType.Default,\r\n type: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default,\r\n\r\n kind: FieldType.Default,\r\n value: FieldType.Default,\r\n count: FieldType.Default,\r\n min: FieldType.Default,\r\n max: FieldType.Default,\r\n stdDev: FieldType.Default,\r\n dependencyKind: FieldType.Default,\r\n dependencySource: FieldType.Default,\r\n commandName: FieldType.Default,\r\n dependencyTypeName: FieldType.Default,\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\r\n constructor(id: string, absoluteUrl: string, commandName: string, value: number, success: boolean, resultCode: number, method?: string, properties?: Object, measurements?: Object) {\r\n super();\r\n\r\n this.id = id;\r\n\r\n this.duration = Util.msToTimeSpan(value);\r\n this.success = success;\r\n this.resultCode = resultCode + \"\";\r\n\r\n this.type = \"Ajax\";\r\n this.data = Common.DataSanitizer.sanitizeUrl(commandName);\r\n\r\n var dependencyFields = AjaxHelper.ParseDependencyPath(absoluteUrl, method, commandName);\r\n this.target = dependencyFields.target;\r\n this.name = dependencyFields.name;\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface XMLHttpRequestInstrumented extends XMLHttpRequest {\r\n ajaxData: ajaxRecord;\r\n }\r\n\r\n export class AjaxMonitor {\r\n private appInsights: AppInsights;\r\n private initialized: boolean;\r\n private static instrumentedByAppInsightsName = \"InstrumentedByAppInsights\";\r\n private currentWindowHost;\r\n\r\n constructor(appInsights: Microsoft.ApplicationInsights.AppInsights) {\r\n this.currentWindowHost = window.location.host && window.location.host.toLowerCase();\r\n this.appInsights = appInsights;\r\n this.initialized = false;\r\n this.Init();\r\n }\r\n\r\n ///The main function that needs to be called in order to start Ajax Monitoring\r\n private Init() {\r\n if (this.supportsMonitoring()) {\r\n this.instrumentOpen();\r\n this.instrumentSend();\r\n this.instrumentAbort();\r\n this.initialized = true;\r\n }\r\n }\r\n\r\n\r\n ///Function that returns property name which will identify that monitoring for given instance of XmlHttpRequest is disabled\r\n public static DisabledPropertyName: string = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\n\r\n ///Verifies that particalar instance of XMLHttpRequest needs to be monitored\r\n ///Optional parameter. True if ajaxData must be excluded from verification\r\n ///True if instance needs to be monitored, otherwise false\r\n private isMonitoredInstance(xhr: XMLHttpRequestInstrumented, excludeAjaxDataValidation?: boolean): boolean {\r\n\r\n // checking to see that all interested functions on xhr were instrumented\r\n return this.initialized\r\n\r\n // checking on ajaxData to see that it was not removed in user code\r\n && (excludeAjaxDataValidation === true || !extensions.IsNullOrUndefined(xhr.ajaxData))\r\n\r\n // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\r\n && xhr[AjaxMonitor.DisabledPropertyName] !== true;\r\n\r\n }\r\n\r\n ///Determines whether ajax monitoring can be enabled on this document\r\n ///True if Ajax monitoring is supported on this page, otherwise false\r\n private supportsMonitoring(): boolean {\r\n var result = true;\r\n if (extensions.IsNullOrUndefined(XMLHttpRequest) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort)) {\r\n result = false;\r\n }\r\n\r\n // disable in IE8 or older (https://www.w3schools.com/jsref/jsref_trim_string.asp)\r\n try {\r\n \" a \".trim();\r\n } catch (ex) {\r\n result = false;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private instrumentOpen() {\r\n var originalOpen = XMLHttpRequest.prototype.open;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.open = function (method, url, async) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this, true) &&\r\n (\r\n !(this).ajaxData ||\r\n !(this).ajaxData.xhrMonitoringState.openDone\r\n )) {\r\n ajaxMonitorInstance.openHandler(this, method, url, async);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxOpen,\r\n \"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalOpen.apply(this, arguments);\r\n };\r\n }\r\n\r\n private openHandler(xhr: XMLHttpRequestInstrumented, method, url, async) {\r\n // this format corresponds with activity logic on server-side and is required for the correct correlation\r\n var id = \"|\" + this.appInsights.context.operation.id + \".\" + Util.newId();\r\n\r\n var ajaxData = new ajaxRecord(id);\r\n ajaxData.method = method;\r\n ajaxData.requestUrl = url;\r\n ajaxData.xhrMonitoringState.openDone = true\r\n xhr.ajaxData = ajaxData;\r\n\r\n this.attachToOnReadyStateChange(xhr);\r\n }\r\n\r\n private static getFailedAjaxDiagnosticsMessage(xhr: XMLHttpRequestInstrumented): string {\r\n var result = \"\";\r\n try {\r\n if (!extensions.IsNullOrUndefined(xhr) &&\r\n !extensions.IsNullOrUndefined(xhr.ajaxData) &&\r\n !extensions.IsNullOrUndefined(xhr.ajaxData.requestUrl)) {\r\n result += \"(url: '\" + xhr.ajaxData.requestUrl + \"')\";\r\n }\r\n } catch (e) { }\r\n\r\n return result;\r\n }\r\n\r\n private instrumentSend() {\r\n var originalSend = XMLHttpRequest.prototype.send;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.send = function (content) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !(this).ajaxData.xhrMonitoringState.sendDone) {\r\n ajaxMonitorInstance.sendHandler(this, content);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxSend,\r\n \"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalSend.apply(this, arguments);\r\n };\r\n }\r\n\r\n private sendHandler(xhr: XMLHttpRequestInstrumented, content) {\r\n xhr.ajaxData.requestSentTime = dateTime.Now();\r\n\r\n if (CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, xhr.ajaxData.getAbsoluteUrl(), \r\n this.currentWindowHost)) {\r\n xhr.setRequestHeader(RequestHeaders.requestIdHeader, xhr.ajaxData.id);\r\n if (this.appInsights.context) {\r\n var appId = this.appInsights.context.appId();\r\n if (appId) {\r\n xhr.setRequestHeader(RequestHeaders.requestContextHeader, RequestHeaders.requestContextAppIdFormat + appId);\r\n }\r\n }\r\n }\r\n xhr.ajaxData.xhrMonitoringState.sendDone = true;\r\n }\r\n\r\n private instrumentAbort() {\r\n var originalAbort = XMLHttpRequest.prototype.abort;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.abort = function () {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !(this).ajaxData.xhrMonitoringState.abortDone) {\r\n (this).ajaxData.aborted = 1;\r\n (this).ajaxData.xhrMonitoringState.abortDone = true;\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxAbort,\r\n \"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalAbort.apply(this, arguments);\r\n };\r\n }\r\n\r\n private attachToOnReadyStateChange(xhr: XMLHttpRequestInstrumented) {\r\n var ajaxMonitorInstance = this;\r\n xhr.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached = EventHelper.AttachEvent(xhr, \"readystatechange\", () => {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(xhr)) {\r\n if (xhr.readyState === 4) {\r\n ajaxMonitorInstance.onAjaxComplete(xhr);\r\n }\r\n }\r\n } catch (e) {\r\n var exceptionText = Microsoft.ApplicationInsights.Util.dump(e);\r\n\r\n // ignore messages with c00c023f, as this a known IE9 XHR abort issue\r\n if (!exceptionText || exceptionText.toLowerCase().indexOf(\"c00c023f\") == -1) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxRSC,\r\n \"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n private onAjaxComplete(xhr: XMLHttpRequestInstrumented) {\r\n xhr.ajaxData.responseFinishedTime = dateTime.Now();\r\n xhr.ajaxData.status = xhr.status;\r\n xhr.ajaxData.CalculateMetrics();\r\n \r\n if (xhr.ajaxData.ajaxTotalDuration < 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxDur,\r\n \"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n requestSentTime: xhr.ajaxData.requestSentTime,\r\n responseFinishedTime: xhr.ajaxData.responseFinishedTime\r\n });\r\n }\r\n else {\r\n var dependency = new Telemetry.RemoteDependencyData(\r\n xhr.ajaxData.id, \r\n xhr.ajaxData.getAbsoluteUrl(), \r\n xhr.ajaxData.getPathName(), \r\n xhr.ajaxData.ajaxTotalDuration, \r\n (+(xhr.ajaxData.status)) >= 200 && (+(xhr.ajaxData.status)) < 400, \r\n +xhr.ajaxData.status, \r\n xhr.ajaxData.method); \r\n\r\n // enrich dependency target with correlation context from the server\r\n var correlationContext = this.getCorrelationContext(xhr);\r\n if (correlationContext) {\r\n dependency.target = dependency.target + \" | \" + correlationContext;\r\n }\r\n \r\n this.appInsights.trackDependencyData(dependency);\r\n\r\n xhr.ajaxData = null;\r\n }\r\n }\r\n\r\n private getCorrelationContext(xhr: XMLHttpRequestInstrumented) {\r\n try {\r\n var responseHeadersString = xhr.getAllResponseHeaders();\r\n if (responseHeadersString !== null) {\r\n var index = responseHeadersString.toLowerCase().indexOf(RequestHeaders.requestContextHeaderLowerCase);\r\n if (index !== -1) {\r\n var responseHeader = xhr.getResponseHeader(RequestHeaders.requestContextHeader);\r\n return CorrelationIdHelper.getCorrelationContext(responseHeader);\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n } \r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ISendBuffer {\r\n /**\r\n * Enqueue the payload\r\n */\r\n enqueue: (payload: string) => void;\r\n\r\n /**\r\n * Returns the number of elements in the buffer\r\n */\r\n count: () => number;\r\n\r\n /**\r\n * Clears the buffer\r\n */\r\n clear: () => void;\r\n\r\n /**\r\n * Returns items stored in the buffer\r\n */\r\n getItems: () => string[];\r\n\r\n /**\r\n * Build a batch of all elements in the payload array\r\n */\r\n batchPayloads: (payload: string[]) => string;\r\n\r\n /**\r\n * Moves items to the SENT_BUFFER.\r\n * The buffer holds items which were sent, but we haven't received any response from the backend yet. \r\n */\r\n markAsSent: (payload: string[]) => void;\r\n\r\n /**\r\n * Removes items from the SENT_BUFFER. Should be called on successful response from the backend. \r\n */\r\n clearSent: (payload: string[]) => void;\r\n }\r\n\r\n /*\r\n * An array based send buffer. \r\n */\r\n export class ArraySendBuffer implements ISendBuffer {\r\n private _config: ISenderConfig;\r\n private _buffer: string[];\r\n\r\n constructor(config: ISenderConfig) {\r\n this._config = config;\r\n\r\n this._buffer = [];\r\n }\r\n\r\n public enqueue(payload: string) {\r\n this._buffer.push(payload);\r\n }\r\n\r\n public count(): number {\r\n return this._buffer.length;\r\n }\r\n\r\n public clear() {\r\n this._buffer.length = 0;\r\n }\r\n\r\n public getItems(): string[] {\r\n return this._buffer.slice(0);\r\n }\r\n\r\n public batchPayloads(payload: string[]): string {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n\r\n return batch;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public markAsSent(payload: string[]) {\r\n this.clear();\r\n }\r\n\r\n public clearSent(payload: string[]) {\r\n // not supported\r\n }\r\n }\r\n\r\n /*\r\n * Session storege buffer holds a copy of all unsent items in the browser session storage.\r\n */\r\n export class SessionStorageSendBuffer implements ISendBuffer {\r\n static BUFFER_KEY = \"AI_buffer\";\r\n static SENT_BUFFER_KEY = \"AI_sentBuffer\";\r\n\r\n // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped. \r\n static MAX_BUFFER_SIZE = 2000;\r\n private _bufferFullMessageSent = false;\r\n\r\n // An in-memory copy of the buffer. A copy is saved to the session storage on enqueue() and clear(). \r\n // The buffer is restored in a constructor and contains unsent events from a previous page.\r\n private _buffer: string[];\r\n private _config: ISenderConfig;\r\n\r\n constructor(config: ISenderConfig) {\r\n this._config = config;\r\n\r\n var bufferItems = this.getBuffer(SessionStorageSendBuffer.BUFFER_KEY);\r\n var notDeliveredItems = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n\r\n this._buffer = bufferItems.concat(notDeliveredItems);\r\n\r\n // If the buffer has too many items, drop items from the end.\r\n if (this._buffer.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n this._buffer.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n\r\n // update DataLossAnalyzer with the number of recovered items\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.itemsRestoredFromSessionBuffer = this._buffer.length;\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n\r\n public enqueue(payload: string) {\r\n if (this._buffer.length >= SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // sent internal log only once per page view\r\n if (!this._bufferFullMessageSent) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.SessionStorageBufferFull,\r\n \"Maximum buffer size reached: \" + this._buffer.length,\r\n true);\r\n this._bufferFullMessageSent = true;\r\n }\r\n return;\r\n }\r\n\r\n this._buffer.push(payload);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n\r\n public count(): number {\r\n return this._buffer.length;\r\n }\r\n\r\n public clear() {\r\n this._buffer.length = 0;\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n\r\n this._bufferFullMessageSent = false;\r\n }\r\n\r\n public getItems(): string[] {\r\n return this._buffer.slice(0)\r\n }\r\n\r\n public batchPayloads(payload: string[]): string {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n\r\n return batch;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public markAsSent(payload: string[]) {\r\n this._buffer = this.removePayloadsFromBuffer(payload, this._buffer);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n if (sentElements instanceof Array && payload instanceof Array) {\r\n sentElements = sentElements.concat(payload);\r\n\r\n if (sentElements.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\r\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.SessionStorageBufferFull,\r\n \"Sent buffer reached its maximum size: \" + sentElements.length,\r\n true);\r\n\r\n sentElements.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n }\r\n\r\n public clearSent(payload: string[]) {\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n sentElements = this.removePayloadsFromBuffer(payload, sentElements);\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n\r\n private removePayloadsFromBuffer(payloads: string[], buffer: string[]): string[] {\r\n var remaining: string[] = [];\r\n\r\n for (var i in buffer) {\r\n var contains = false;\r\n for (var j in payloads) {\r\n if (payloads[j] === buffer[i]) {\r\n contains = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!contains) {\r\n remaining.push(buffer[i]);\r\n }\r\n };\r\n\r\n return remaining;\r\n }\r\n\r\n private getBuffer(key: string): string[] {\r\n try {\r\n var bufferJson = Util.getSessionStorage(key);\r\n if (bufferJson) {\r\n var buffer: string[] = JSON.parse(bufferJson);\r\n if (buffer) {\r\n return buffer;\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToRestoreStorageBuffer,\r\n \" storage key: \" + key + \", \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n\r\n return [];\r\n }\r\n\r\n private setBuffer(key: string, buffer: string[]) {\r\n try {\r\n var bufferJson = JSON.stringify(buffer);\r\n Util.setSessionStorage(key, bufferJson);\r\n } catch (e) {\r\n // if there was an error, clear the buffer\r\n // telemetry is stored in the _buffer array so we won't loose any items\r\n Util.setSessionStorage(key, JSON.stringify([]));\r\n\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedToSetStorageBuffer,\r\n \" storage key: \" + key + \", \" + Util.getExceptionName(e) + \". Buffer cleared\",\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\ninterface XDomainRequest extends XMLHttpRequestEventTarget {\r\n responseText: string;\r\n send(payload: string);\r\n open(method: string, url: string);\r\n};\r\n\r\ndeclare var XDomainRequest: {\r\n prototype: XDomainRequest;\r\n new(): XDomainRequest;\r\n};\r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ISenderConfig {\r\n /**\r\n * The url to which payloads will be sent\r\n */\r\n endpointUrl: () => string;\r\n\r\n /**\r\n * The JSON format (normal vs line delimited). True means line delimited JSON.\r\n */\r\n emitLineDelimitedJson: () => boolean;\r\n\r\n /**\r\n * The maximum size of a batch in bytes\r\n */\r\n maxBatchSizeInBytes: () => number;\r\n\r\n /**\r\n * The maximum interval allowed between calls to batchInvoke\r\n */\r\n maxBatchInterval: () => number;\r\n\r\n /**\r\n * The master off switch. Do not send any data if set to TRUE\r\n */\r\n disableTelemetry: () => boolean;\r\n\r\n /**\r\n * Store a copy of a send buffer in the session storage\r\n */\r\n enableSessionStorageBuffer: () => boolean;\r\n\r\n /**\r\n * Is retry handler disabled.\r\n * If enabled, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error) and 503 (service unavailable).\r\n */\r\n isRetryDisabled: () => boolean;\r\n\r\n isBeaconApiDisabled: () => boolean;\r\n }\r\n\r\n export interface IResponseError {\r\n index: number;\r\n statusCode: number;\r\n message: string;\r\n }\r\n\r\n export interface IBackendResponse {\r\n /**\r\n * Number of items received by the backend\r\n */\r\n itemsReceived: number;\r\n\r\n /**\r\n * Number of items succesfuly accepted by the backend\r\n */\r\n itemsAccepted: number;\r\n\r\n /**\r\n * List of errors for items which were not accepted\r\n */\r\n errors: IResponseError[];\r\n\r\n /**\r\n * App id returned by the backend - not necessary returned, but we don't need it with each response.\r\n */\r\n appId?: string;\r\n }\r\n\r\n export class Sender {\r\n /**\r\n * How many times in a row a retryable error condition has occurred.\r\n */\r\n private _consecutiveErrors: number;\r\n\r\n /**\r\n * The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).\r\n */\r\n private _retryAt: number;\r\n\r\n /**\r\n * The time of the last send operation.\r\n */\r\n private _lastSend: number;\r\n\r\n /**\r\n * Handle to the timer for delayed sending of batches of data.\r\n */\r\n private _timeoutHandle: any;\r\n\r\n /**\r\n * A send buffer object\r\n */\r\n public _buffer: ISendBuffer;\r\n\r\n /**\r\n * The configuration for this sender instance\r\n */\r\n public _config: ISenderConfig;\r\n\r\n /**\r\n * AppId of this component parsed from some backend response.\r\n */\r\n public _appId: string;\r\n\r\n /**\r\n * A method which will cause data to be send to the url\r\n */\r\n\r\n public _sender: (payload: string[], isAsync: boolean) => void;\r\n\r\n /**\r\n * Whether XMLHttpRequest object is supported. Older version of IE (8,9) do not support it.\r\n */\r\n public _XMLHttpRequestSupported: boolean = false;\r\n\r\n /**\r\n * The maximum Beacon API payload size.\r\n * WC3 documentation allows browsers to set the limit. Chrome current has a limit of 64kb. \r\n */\r\n public static MaxBeaconPayloadSize = 65536; // 64kb\r\n\r\n /**\r\n * Constructs a new instance of the Sender class\r\n */\r\n constructor(config: ISenderConfig) {\r\n this._consecutiveErrors = 0;\r\n this._retryAt = null;\r\n this._lastSend = 0;\r\n this._config = config;\r\n this._sender = null;\r\n this._buffer = (Util.canUseSessionStorage() && this._config.enableSessionStorageBuffer())\r\n ? new SessionStorageSendBuffer(config) : new ArraySendBuffer(config);\r\n\r\n if (!this._config.isBeaconApiDisabled() && Util.IsBeaconApiSupported()) {\r\n this._sender = this._beaconSender;\r\n } else {\r\n if (typeof XMLHttpRequest != \"undefined\") {\r\n var testXhr = new XMLHttpRequest();\r\n if (\"withCredentials\" in testXhr) {\r\n this._sender = this._xhrSender;\r\n this._XMLHttpRequestSupported = true;\r\n } else if (typeof XDomainRequest !== \"undefined\") {\r\n this._sender = this._xdrSender; //IE 8 and 9\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Add a telemetry item to the send buffer\r\n */\r\n public send(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n try {\r\n // if master off switch is set, don't send any data\r\n if (this._config.disableTelemetry()) {\r\n // Do not send/save data\r\n return;\r\n }\r\n\r\n // validate input\r\n if (!envelope) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSendEmptyTelemetry, \"Cannot send empty telemetry\");\r\n return;\r\n }\r\n\r\n // ensure a sender was constructed\r\n if (!this._sender) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.SenderNotInitialized, \"Sender was not initialized\");\r\n return;\r\n }\r\n\r\n // check if the incoming payload is too large, truncate if necessary\r\n var payload: string = Serializer.serialize(envelope);\r\n\r\n // flush if we would exceed the max-size limit by adding this item\r\n var bufferPayload = this._buffer.getItems();\r\n var batch = this._buffer.batchPayloads(bufferPayload);\r\n\r\n if (batch && (batch.length + payload.length > this._config.maxBatchSizeInBytes())) {\r\n this.triggerSend();\r\n }\r\n\r\n // enqueue the payload\r\n this._buffer.enqueue(payload);\r\n\r\n // ensure an invocation timeout is set\r\n this._setupTimer();\r\n\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.incrementItemsQueued();\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedAddingTelemetryToBuffer,\r\n \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */\r\n private _setupTimer() {\r\n if (!this._timeoutHandle) {\r\n var retryInterval = this._retryAt ? Math.max(0, this._retryAt - Date.now()) : 0;\r\n var timerValue = Math.max(this._config.maxBatchInterval(), retryInterval);\r\n\r\n this._timeoutHandle = setTimeout(() => {\r\n this.triggerSend();\r\n }, timerValue);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the size of the list in bytes.\r\n * @param list {string[]} - The list to get the size in bytes of.\r\n */\r\n private _getSizeInBytes(list: string[]) {\r\n var size = 0;\r\n if (list && list.length) {\r\n for (var i = 0; i < list.length; i++) {\r\n var item = list[i];\r\n if (item && item.length) {\r\n size += item.length;\r\n }\r\n }\r\n }\r\n\r\n return size;\r\n }\r\n\r\n /**\r\n * Immediately send buffered data\r\n * @param async {boolean} - Indicates if the events should be sent asynchronously\r\n */\r\n public triggerSend(async = true) {\r\n try {\r\n // Send data only if disableTelemetry is false\r\n if (!this._config.disableTelemetry()) {\r\n\r\n if (this._buffer.count() > 0) {\r\n var payload = this._buffer.getItems();\r\n\r\n // invoke send\r\n this._sender(payload, async);\r\n }\r\n\r\n // update lastSend time to enable throttling\r\n this._lastSend = +new Date;\r\n } else {\r\n this._buffer.clear();\r\n }\r\n\r\n clearTimeout(this._timeoutHandle);\r\n this._timeoutHandle = null;\r\n this._retryAt = null;\r\n } catch (e) {\r\n /* Ignore this error for IE under v10 */\r\n if (!Util.getIEVersion() || Util.getIEVersion() > 9) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TransmissionFailed,\r\n \"Telemetry transmission failed, some telemetry will be lost: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n }\r\n\r\n /** Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */\r\n private _setRetryTime() {\r\n const SlotDelayInSeconds = 10;\r\n var delayInSeconds: number;\r\n\r\n if (this._consecutiveErrors <= 1) {\r\n delayInSeconds = SlotDelayInSeconds;\r\n } else {\r\n var backOffSlot = (Math.pow(2, this._consecutiveErrors) - 1) / 2;\r\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\r\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\r\n }\r\n\r\n // TODO: Log the backoff time like the C# version does.\r\n var retryAfterTimeSpan = Date.now() + (delayInSeconds * 1000);\r\n\r\n // TODO: Log the retry at time like the C# version does.\r\n this._retryAt = retryAfterTimeSpan;\r\n }\r\n\r\n /**\r\n * Parses the response from the backend. \r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */\r\n private _parseResponse(response: any): IBackendResponse {\r\n try {\r\n if (response && response !== \"\") {\r\n var result = JSON.parse(response);\r\n\r\n if (result && result.itemsReceived && result.itemsReceived >= result.itemsAccepted &&\r\n result.itemsReceived - result.itemsAccepted == result.errors.length) {\r\n return result;\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.InvalidBackendResponse,\r\n \"Cannot parse the response. \" + Util.getExceptionName(e),\r\n {\r\n response: response\r\n });\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */\r\n private _isRetriable(statusCode: number): boolean {\r\n return statusCode == 408 // Timeout\r\n || statusCode == 429 // Too many requests.\r\n || statusCode == 500 // Internal server error.\r\n || statusCode == 503; // Service unavailable.\r\n }\r\n\r\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */\r\n private _resendPayload(payload: string[]) {\r\n if (!payload || payload.length === 0) {\r\n return;\r\n }\r\n\r\n this._buffer.clearSent(payload);\r\n this._consecutiveErrors++;\r\n\r\n for (var item of payload) {\r\n this._buffer.enqueue(item);\r\n }\r\n\r\n // setup timer\r\n this._setRetryTime();\r\n this._setupTimer();\r\n }\r\n\r\n private _formatErrorMessageXhr(xhr: XMLHttpRequest, message?: string): string {\r\n if (xhr) {\r\n return \"XMLHttpRequest,Status:\" + xhr.status + \",Response:\" + xhr.responseText || xhr.response || \"\";\r\n }\r\n\r\n return message;\r\n }\r\n\r\n private _formatErrorMessageXdr(xdr: XDomainRequest, message?: string): string {\r\n if (xdr) {\r\n return \"XDomainRequest,Response:\" + xdr.responseText || \"\";\r\n }\r\n\r\n return message;\r\n }\r\n\r\n /**\r\n * Send XMLHttpRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n */\r\n private _xhrSender(payload: string[], isAsync: boolean) {\r\n var xhr = new XMLHttpRequest();\r\n xhr[AjaxMonitor.DisabledPropertyName] = true;\r\n xhr.open(\"POST\", this._config.endpointUrl(), isAsync);\r\n xhr.setRequestHeader(\"Content-type\", \"application/json\");\r\n\r\n // append Sdk-Context request header only in case of breeze endpoint\r\n if (Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())) {\r\n xhr.setRequestHeader(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);\r\n }\r\n\r\n xhr.onreadystatechange = () => this._xhrReadyStateChange(xhr, payload, payload.length);\r\n xhr.onerror = (event: ErrorEvent) => this._onError(payload, this._formatErrorMessageXhr(xhr), event);\r\n\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xhr.send(batch);\r\n\r\n this._buffer.markAsSent(payload);\r\n }\r\n\r\n /**\r\n * Send XDomainRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n * \r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n private _xdrSender(payload: string[], isAsync: boolean) {\r\n var xdr = new XDomainRequest();\r\n xdr.onload = () => this._xdrOnLoad(xdr, payload);\r\n xdr.onerror = (event: ErrorEvent) => this._onError(payload, this._formatErrorMessageXdr(xdr), event);\r\n\r\n // XDomainRequest requires the same protocol as the hosting page. \r\n // If the protocol doesn't match, we can't send the telemetry :(. \r\n var hostingProtocol = window.location.protocol\r\n if (this._config.endpointUrl().lastIndexOf(hostingProtocol, 0) !== 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \". \" +\r\n \"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\");\r\n\r\n this._buffer.clear();\r\n return;\r\n }\r\n\r\n var endpointUrl = this._config.endpointUrl().replace(/^(https?:)/, \"\");\r\n xdr.open('POST', endpointUrl);\r\n\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xdr.send(batch);\r\n\r\n this._buffer.markAsSent(payload);\r\n }\r\n\r\n /**\r\n * Send Beacon API request\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n private _beaconSender(payload: string[], isAsync: boolean) {\r\n var url = this._config.endpointUrl();\r\n var batch = this._buffer.batchPayloads(payload);\r\n\r\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\r\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\r\n let plainTextBatch = new Blob([batch], { type: 'text/plain;charset=UTF-8' });\r\n \r\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\r\n var queued = navigator.sendBeacon(url, plainTextBatch);\r\n\r\n if (queued) {\r\n this._buffer.markAsSent(payload);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TransmissionFailed, \". \" + \"Failed to send telemetry with Beacon API.\");\r\n }\r\n }\r\n\r\n /**\r\n * xhr state changes\r\n */\r\n public _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number) {\r\n if (xhr.readyState === 4) {\r\n var response: IBackendResponse = null;\r\n if (!this._appId) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n if (response && response.appId) {\r\n this._appId = response.appId;\r\n }\r\n }\r\n \r\n if ((xhr.status < 200 || xhr.status >= 300) && xhr.status !== 0) {\r\n if (!this._config.isRetryDisabled() && this._isRetriable(xhr.status)) {\r\n this._resendPayload(payload);\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \". \" +\r\n \"Response code \" + xhr.status + \". Will retry to send \" + payload.length + \" items.\");\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n } else {\r\n if (xhr.status === 206) {\r\n if (!response) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n }\r\n\r\n if (response && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, response);\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n } else {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, countOfItemsInPayload);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * xdr state changes\r\n */\r\n public _xdrOnLoad(xdr: XDomainRequest, payload: string[]) {\r\n if (xdr && (xdr.responseText + \"\" === \"200\" || xdr.responseText === \"\")) {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, 0);\r\n } else {\r\n var results = this._parseResponse(xdr.responseText);\r\n\r\n if (results && results.itemsReceived && results.itemsReceived > results.itemsAccepted\r\n && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, results);\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXdr(xdr));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * partial success handler\r\n */\r\n public _onPartialSuccess(payload: string[], results: IBackendResponse) {\r\n var failed = [];\r\n var retry = [];\r\n\r\n // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\r\n var errors = results.errors.reverse();\r\n for (var error of errors) {\r\n var extracted = payload.splice(error.index, 1)[0];\r\n if (this._isRetriable(error.statusCode)) {\r\n retry.push(extracted);\r\n } else {\r\n // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\r\n failed.push(extracted);\r\n }\r\n }\r\n\r\n if (payload.length > 0) {\r\n this._onSuccess(payload, results.itemsAccepted);\r\n }\r\n\r\n if (failed.length > 0) {\r\n this._onError(failed, this._formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' ')));\r\n }\r\n\r\n if (retry.length > 0) {\r\n this._resendPayload(retry);\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \"Partial success. \" +\r\n \"Delivered: \" + payload.length + \", Failed: \" + failed.length +\r\n \". Will retry to send \" + retry.length + \" our of \" + results.itemsReceived + \" items\");\r\n }\r\n }\r\n\r\n /**\r\n * error handler\r\n */\r\n public _onError(payload: string[], message: string, event?: ErrorEvent) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.OnError,\r\n \"Failed to send telemetry.\",\r\n { message: message });\r\n\r\n this._buffer.clearSent(payload);\r\n }\r\n\r\n /**\r\n * success handler\r\n */\r\n public _onSuccess(payload: string[], countOfItemsInPayload: number) {\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.decrementItemsQueued(countOfItemsInPayload);\r\n\r\n this._buffer.clearSent(payload);\r\n }\r\n }\r\n\r\n interface linkedListNode {\r\n next: linkedListNode;\r\n payload: string;\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.\r\n */\r\n export class MessageData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Trace message\r\n */\r\n public message: string;\r\n \r\n /**\r\n * Trace severity level.\r\n */\r\n public severityLevel: AI.SeverityLevel;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Trace extends AI.MessageData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\r\n public static dataType = \"MessageData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n message: FieldType.Required,\r\n severityLevel: FieldType.Default,\r\n properties: FieldType.Default\r\n };\r\n\r\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\r\n constructor(message: string, properties?: any, severityLevel?: AI.SeverityLevel) {\r\n super();\r\n message = message || Util.NotSpecified;\r\n this.message = Common.DataSanitizer.sanitizeMessage(message);\r\n this.properties = Common.DataSanitizer.sanitizeProperties(properties);\r\n\r\n if (severityLevel) {\r\n this.severityLevel = severityLevel;\r\n }\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Event extends AI.EventData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\r\n public static dataType = \"EventData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n name: FieldType.Required,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\r\n constructor(name: string, properties?: any, measurements?: any) {\r\n \r\n super();\r\n\r\n this.name = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Exception details of the exception in a chain.\r\n */\r\n export class ExceptionDetails\r\n {\r\n \r\n /**\r\n * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting.\r\n */\r\n public id: number;\r\n \r\n /**\r\n * The value of outerId is a reference to an element in ExceptionDetails that represents the outer exception\r\n */\r\n public outerId: number;\r\n \r\n /**\r\n * Exception type name.\r\n */\r\n public typeName: string;\r\n \r\n /**\r\n * Exception message.\r\n */\r\n public message: string;\r\n \r\n /**\r\n * Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.\r\n */\r\n public hasFullStack: boolean;\r\n \r\n /**\r\n * Text describing the stack. Either stack or parsedStack should have a value.\r\n */\r\n public stack: string;\r\n \r\n /**\r\n * List of stack frames. Either stack or parsedStack should have a value.\r\n */\r\n public parsedStack: StackFrame[];\r\n \r\n constructor()\r\n {\r\n this.hasFullStack = true;\r\n this.parsedStack = [];\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.\r\n */\r\n export class ExceptionData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Exception chain - list of inner exceptions.\r\n */\r\n public exceptions: ExceptionDetails[];\r\n \r\n /**\r\n * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.\r\n */\r\n public severityLevel: AI.SeverityLevel;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.exceptions = [];\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Stack frame information.\r\n */\r\n export class StackFrame\r\n {\r\n \r\n /**\r\n * Level in the call stack. For the long stacks SDK may not report every function in a call stack.\r\n */\r\n public level: number;\r\n \r\n /**\r\n * Method name.\r\n */\r\n public method: string;\r\n \r\n /**\r\n * Name of the assembly (dll, jar, etc.) containing this function.\r\n */\r\n public assembly: string;\r\n \r\n /**\r\n * File name or URL of the method implementation.\r\n */\r\n public fileName: string;\r\n \r\n /**\r\n * Line number of the code implementation.\r\n */\r\n public line: number;\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Exception extends AI.ExceptionData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\r\n public static dataType = \"ExceptionData\";\r\n\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n exceptions: FieldType.Required,\r\n severityLevel: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new isntance of the ExceptionTelemetry object\r\n */\r\n constructor(exception: Error, properties?: any, measurements?: any, severityLevel?: AI.SeverityLevel) {\r\n super();\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n\r\n this.exceptions = [new _ExceptionDetails(exception)];\r\n\r\n if (severityLevel) {\r\n this.severityLevel = severityLevel;\r\n }\r\n }\r\n \r\n\r\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */\r\n public static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string,\r\n details: string, line: number): Telemetry.Exception {\r\n\r\n return {\r\n exceptions: [\r\n {\r\n hasFullStack: true,\r\n message: message,\r\n stack: details,\r\n typeName: typeName\r\n }\r\n ]\r\n };\r\n }\r\n }\r\n\r\n class _ExceptionDetails extends AI.ExceptionDetails implements ISerializable {\r\n\r\n public aiDataContract = {\r\n id: FieldType.Default,\r\n outerId: FieldType.Default,\r\n typeName: FieldType.Required,\r\n message: FieldType.Required,\r\n hasFullStack: FieldType.Default,\r\n stack: FieldType.Default,\r\n parsedStack: FieldType.Array\r\n };\r\n\r\n constructor(exception: Error) {\r\n super();\r\n this.typeName = Common.DataSanitizer.sanitizeString(exception.name) || Util.NotSpecified;\r\n this.message = Common.DataSanitizer.sanitizeMessage(exception.message) || Util.NotSpecified;\r\n var stack = exception[\"stack\"];\r\n this.parsedStack = this.parseStack(stack);\r\n this.stack = Common.DataSanitizer.sanitizeException(stack);\r\n this.hasFullStack = Util.isArray(this.parsedStack) && this.parsedStack.length > 0;\r\n }\r\n\r\n private parseStack(stack): _StackFrame[] {\r\n var parsedStack: _StackFrame[] = undefined;\r\n if (typeof stack === \"string\") {\r\n var frames = stack.split('\\n');\r\n parsedStack = [];\r\n var level = 0;\r\n\r\n var totalSizeInBytes = 0;\r\n for (var i = 0; i <= frames.length; i++) {\r\n var frame = frames[i];\r\n if (_StackFrame.regex.test(frame)) {\r\n var parsedFrame = new _StackFrame(frames[i], level++);\r\n totalSizeInBytes += parsedFrame.sizeInBytes;\r\n parsedStack.push(parsedFrame);\r\n }\r\n }\r\n\r\n // DP Constraint - exception parsed stack must be < 32KB\r\n // remove frames from the middle to meet the threshold\r\n var exceptionParsedStackThreshold = 32 * 1024;\r\n if (totalSizeInBytes > exceptionParsedStackThreshold) {\r\n var left = 0;\r\n var right = parsedStack.length - 1;\r\n var size = 0;\r\n var acceptedLeft = left;\r\n var acceptedRight = right;\r\n\r\n while (left < right) {\r\n // check size\r\n var lSize = parsedStack[left].sizeInBytes;\r\n var rSize = parsedStack[right].sizeInBytes;\r\n size += lSize + rSize;\r\n\r\n if (size > exceptionParsedStackThreshold) {\r\n\r\n // remove extra frames from the middle\r\n var howMany = acceptedRight - acceptedLeft + 1;\r\n parsedStack.splice(acceptedLeft, howMany);\r\n break;\r\n }\r\n\r\n // update pointers\r\n acceptedLeft = left;\r\n acceptedRight = right;\r\n\r\n left++;\r\n right--;\r\n }\r\n }\r\n }\r\n\r\n return parsedStack;\r\n }\r\n }\r\n\r\n export class _StackFrame extends AI.StackFrame implements ISerializable {\r\n \r\n // regex to match stack frames from ie/chrome/ff\r\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\r\n public static regex = /^([\\s]+at)?(.*?)(\\@|\\s\\(|\\s)([^\\(\\@\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\r\n public static baseSize = 58; //'{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\r\n public sizeInBytes = 0;\r\n\r\n public aiDataContract = {\r\n level: FieldType.Required,\r\n method: FieldType.Required,\r\n assembly: FieldType.Default,\r\n fileName: FieldType.Default,\r\n line: FieldType.Default\r\n };\r\n\r\n constructor(frame: string, level: number) {\r\n super();\r\n this.level = level;\r\n this.method = \"\";\r\n this.assembly = Util.trim(frame);\r\n var matches = frame.match(_StackFrame.regex);\r\n if (matches && matches.length >= 5) {\r\n this.method = Util.trim(matches[2]) || this.method;\r\n this.fileName = Util.trim(matches[4]);\r\n this.line = parseInt(matches[5]) || 0;\r\n }\r\n\r\n this.sizeInBytes += this.method.length;\r\n this.sizeInBytes += this.fileName.length;\r\n this.sizeInBytes += this.assembly.length;\r\n\r\n // todo: these might need to be removed depending on how the back-end settles on their size calculation\r\n this.sizeInBytes += _StackFrame.baseSize;\r\n this.sizeInBytes += this.level.toString().length;\r\n this.sizeInBytes += this.line.toString().length;\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Type of the metric data measurement.\r\n */\r\n export enum DataPointType\r\n {\r\n Measurement = 0,\r\n Aggregation = 1,\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Metric data single measurement.\r\n */\r\n export class DataPoint\r\n {\r\n \r\n /**\r\n * Name of the metric.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Metric type. Single measurement or the aggregated value.\r\n */\r\n public kind: AI.DataPointType;\r\n \r\n /**\r\n * Single value for measurement. Sum of individual measurements for the aggregation.\r\n */\r\n public value: number;\r\n \r\n /**\r\n * Metric weight of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public count: number;\r\n \r\n /**\r\n * Minimum value of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public min: number;\r\n \r\n /**\r\n * Maximum value of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public max: number;\r\n \r\n /**\r\n * Standard deviation of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public stdDev: number;\r\n \r\n constructor()\r\n {\r\n this.kind = AI.DataPointType.Measurement;\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.\r\n */\r\n export class MetricData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used.\r\n */\r\n public metrics: DataPoint[];\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.metrics = [];\r\n this.properties = {};\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class DataPoint extends AI.DataPoint implements ISerializable {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {\r\n name: FieldType.Required,\r\n kind: FieldType.Default,\r\n value: FieldType.Required,\r\n count: FieldType.Default,\r\n min: FieldType.Default,\r\n max: FieldType.Default,\r\n stdDev: FieldType.Default\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Metric extends AI.MetricData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\r\n public static dataType = \"MetricData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n metrics: FieldType.Required,\r\n properties: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */\r\n constructor(name: string, value: number, count?: number, min?: number, max?: number, properties?: any) {\r\n super();\r\n\r\n var dataPoint = new Microsoft.ApplicationInsights.Telemetry.Common.DataPoint();\r\n dataPoint.count = count > 0 ? count : undefined;\r\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\r\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\r\n dataPoint.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n dataPoint.value = value;\r\n\r\n this.metrics = [dataPoint];\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class PageView extends AI.PageViewData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\r\n public static dataType = \"PageviewData\";\r\n\r\n public aiDataContract = { \r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n url: FieldType.Default,\r\n duration: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default,\r\n id: FieldType.Default,\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n constructor(name?: string, url?: string, durationMs?: number, properties?: any, measurements?: any, id?: string) {\r\n super();\r\n\r\n this.id = Common.DataSanitizer.sanitizeId(id);\r\n this.url = Common.DataSanitizer.sanitizeUrl(url);\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n if (!isNaN(durationMs)) {\r\n this.duration = Util.msToTimeSpan(durationMs);\r\n }\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.\r\n */\r\n export class PageViewPerfData extends AI.PageViewData\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Request URL with all query string parameters\r\n */\r\n public url: string;\r\n \r\n /**\r\n * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public perfTotal: string;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Network connection time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public networkConnect: string;\r\n \r\n /**\r\n * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public sentRequest: string;\r\n \r\n /**\r\n * Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public receivedResponse: string;\r\n \r\n /**\r\n * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public domProcessing: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class PageViewPerformance extends AI.PageViewPerfData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\r\n public static dataType = \"PageviewPerformanceData\";\r\n\r\n private static MAX_DURATION_ALLOWED = 3600000; // 1h\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n url: FieldType.Default,\r\n duration: FieldType.Default,\r\n perfTotal: FieldType.Default,\r\n networkConnect: FieldType.Default,\r\n sentRequest: FieldType.Default,\r\n receivedResponse: FieldType.Default,\r\n domProcessing: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n };\r\n\r\n /**\r\n * Field indicating whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n private isValid: boolean;\r\n\r\n /**\r\n * Indicates whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n public getIsValid() {\r\n return this.isValid;\r\n }\r\n\r\n private durationMs: number;\r\n\r\n /**\r\n * Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method.\r\n */\r\n public getDurationMs() {\r\n return this.durationMs;\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n constructor(name: string, url: string, unused: number, properties?: any, measurements?: any) {\r\n super();\r\n\r\n this.isValid = false;\r\n\r\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n */\r\n var timing = PageViewPerformance.getPerformanceTiming();\r\n if (timing) {\r\n var total = PageViewPerformance.getDuration(timing.navigationStart, timing.loadEventEnd);\r\n var network = PageViewPerformance.getDuration(timing.navigationStart, timing.connectEnd);\r\n var request = PageViewPerformance.getDuration(timing.requestStart, timing.responseStart);\r\n var response = PageViewPerformance.getDuration(timing.responseStart, timing.responseEnd);\r\n var dom = PageViewPerformance.getDuration(timing.responseEnd, timing.loadEventEnd);\r\n\r\n if (total == 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.ErrorPVCalc,\r\n \"error calculating page view performance.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else if (!PageViewPerformance.shouldCollectDuration(total, network, request, response, dom)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.InvalidDurationValue,\r\n \"Invalid page load duration value. Browser perf data won't be sent.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {\r\n // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\r\n // in this case, don't report client performance from this page\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.ClientPerformanceMathError,\r\n \"client performance math error.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else {\r\n this.durationMs = total;\r\n\r\n // convert to timespans\r\n this.perfTotal = this.duration = Util.msToTimeSpan(total);\r\n this.networkConnect = Util.msToTimeSpan(network);\r\n this.sentRequest = Util.msToTimeSpan(request);\r\n this.receivedResponse = Util.msToTimeSpan(response);\r\n this.domProcessing = Util.msToTimeSpan(dom);\r\n\r\n this.isValid = true;\r\n }\r\n }\r\n\r\n this.url = Common.DataSanitizer.sanitizeUrl(url);\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n\r\n public static getPerformanceTiming(): PerformanceTiming {\r\n if (PageViewPerformance.isPerformanceTimingSupported()) {\r\n return window.performance.timing;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns true is window performance timing API is supported, false otherwise.\r\n */\r\n public static isPerformanceTimingSupported() {\r\n return typeof window != \"undefined\" && window.performance && window.performance.timing;\r\n }\r\n\r\n /**\r\n * As page loads different parts of performance timing numbers get set. When all of them are set we can report it.\r\n * Returns true if ready, false otherwise.\r\n */\r\n public static isPerformanceTimingDataReady() {\r\n var timing = window.performance.timing;\r\n\r\n return timing.domainLookupStart > 0\r\n && timing.navigationStart > 0\r\n && timing.responseStart > 0\r\n && timing.requestStart > 0\r\n && timing.loadEventEnd > 0\r\n && timing.responseEnd > 0\r\n && timing.connectEnd > 0\r\n && timing.domLoading > 0;\r\n }\r\n\r\n public static getDuration(start: any, end: any): number {\r\n var duration = undefined;\r\n if (!(isNaN(start) || isNaN(end))) {\r\n duration = Math.max(end - start, 0);\r\n }\r\n\r\n return duration;\r\n }\r\n\r\n /**\r\n * This method tells if given durations should be excluded from collection.\r\n */\r\n public static shouldCollectDuration(...durations: number[]): boolean {\r\n // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\r\n let botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google'];\r\n let userAgent = navigator.userAgent;\r\n let isGoogleBot = false;\r\n\r\n if (userAgent) {\r\n for(let i =0; i= PageViewPerformance.MAX_DURATION_ALLOWED) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ITelemetryConfig extends ISenderConfig {\r\n instrumentationKey: () => string;\r\n accountId: () => string;\r\n sessionRenewalMs: () => number;\r\n sessionExpirationMs: () => number;\r\n sampleRate: () => number;\r\n cookieDomain: () => string;\r\n sdkExtension: () => string;\r\n isBrowserLinkTrackingEnabled: () => boolean;\r\n appId: () => string;\r\n }\r\n\r\n export class TelemetryContext implements ITelemetryContext {\r\n /**\r\n * The configuration for this telemetry context\r\n */\r\n public _config: ITelemetryConfig;\r\n\r\n /**\r\n * The sender instance for this context\r\n */\r\n public _sender: Sender;\r\n\r\n /**\r\n * The object describing a component tracked by this object.\r\n */\r\n public application: Context.Application;\r\n\r\n /**\r\n * The object describing a device tracked by this object.\r\n */\r\n public device: Context.Device;\r\n\r\n public internal: Context.Internal;\r\n\r\n /**\r\n * The object describing a location tracked by this object.\r\n */\r\n public location: Context.Location;\r\n\r\n /**\r\n * The object describing a operation tracked by this object.\r\n */\r\n public operation: Context.Operation;\r\n\r\n public sample: Context.Sample;\r\n\r\n /**\r\n * The object describing a user tracked by this object.\r\n */\r\n public user: Context.User;\r\n\r\n /**\r\n * The object describing a session tracked by this object.\r\n */\r\n public session: Context.Session;\r\n\r\n /**\r\n * AppId of this component if returned by the backend.\r\n */\r\n public appId: () => string;\r\n\r\n /**\r\n * The array of telemetry initializers to call before sending each telemetry item.\r\n */\r\n private telemetryInitializers: { (envelope: Microsoft.ApplicationInsights.IEnvelope): boolean | void; }[];\r\n\r\n /**\r\n * The session manager that manages session on the base of cookies.\r\n */\r\n public _sessionManager: Microsoft.ApplicationInsights.Context._SessionManager;\r\n\r\n constructor(config: ITelemetryConfig) {\r\n this._config = config;\r\n this._sender = new Sender(config);\r\n this.appId = () => this._sender._appId;\r\n\r\n // use appId set in config instead of getting it from the backend\r\n if (config.appId()) {\r\n this._sender._appId = config.appId();\r\n }\r\n\r\n this.telemetryInitializers = [];\r\n\r\n // window will be undefined in node.js where we do not want to initialize contexts\r\n if (typeof window !== 'undefined') {\r\n this._sessionManager = new ApplicationInsights.Context._SessionManager(config);\r\n this.application = new Context.Application();\r\n this.device = new Context.Device();\r\n this.internal = new Context.Internal(config);\r\n this.location = new Context.Location();\r\n this.user = new Context.User(config);\r\n this.operation = new Context.Operation();\r\n this.session = new Context.Session();\r\n this.sample = new Context.Sample(config.sampleRate());\r\n }\r\n\r\n this._addDefaultTelemetryInitializers();\r\n }\r\n\r\n /**\r\n * Adds telemetry initializer to the collection. Telemetry initializers will be called one by one\r\n * before telemetry item is pushed for sending and in the order they were added.\r\n */\r\n public addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void) {\r\n this.telemetryInitializers.push(telemetryInitializer);\r\n }\r\n\r\n /**\r\n * Use Sender.ts to send telemetry object to the endpoint\r\n */\r\n public track(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n if (!envelope) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackArgumentsNotSpecified,\r\n \"cannot call .track() with a null or undefined argument\", null, true);\r\n } else {\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (envelope.name === Telemetry.PageView.envelopeType) {\r\n _InternalLogging.resetInternalMessageCount();\r\n }\r\n\r\n if (this.session) {\r\n // If customer did not provide custom session id update sessionmanager\r\n if (typeof this.session.id !== \"string\") {\r\n this._sessionManager.update();\r\n }\r\n }\r\n\r\n this._track(envelope);\r\n }\r\n\r\n return envelope;\r\n }\r\n\r\n private _addDefaultTelemetryInitializers() {\r\n if (!this._config.isBrowserLinkTrackingEnabled()) {\r\n const browserLinkPaths = ['/browserLinkSignalR/', '/__browserLink/'];\r\n let dropBrowserLinkRequests = (envelope: Microsoft.ApplicationInsights.IEnvelope) => {\r\n if (envelope.name === Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType) {\r\n let remoteData = envelope.data as Telemetry.Common.Data;\r\n if (remoteData && remoteData.baseData) {\r\n for (let i = 0; i < browserLinkPaths.length; i++) {\r\n if (remoteData.baseData.name.indexOf(browserLinkPaths[i]) >= 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n this.addTelemetryInitializer(dropBrowserLinkRequests)\r\n }\r\n }\r\n\r\n private _track(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n\r\n if (this.session) {\r\n // If customer set id, apply his context; otherwise apply context generated from cookies \r\n if (typeof this.session.id === \"string\") {\r\n this._applySessionContext(envelope, this.session);\r\n } else {\r\n this._applySessionContext(envelope, this._sessionManager.automaticSession);\r\n }\r\n }\r\n\r\n this._applyApplicationContext(envelope, this.application);\r\n this._applyDeviceContext(envelope, this.device);\r\n this._applyInternalContext(envelope, this.internal);\r\n this._applyLocationContext(envelope, this.location);\r\n this._applySampleContext(envelope, this.sample);\r\n this._applyUserContext(envelope, this.user);\r\n this._applyOperationContext(envelope, this.operation);\r\n\r\n envelope.iKey = this._config.instrumentationKey();\r\n\r\n var doNotSendItem = false;\r\n try {\r\n var telemetryInitializersCount = this.telemetryInitializers.length;\r\n for (var i = 0; i < telemetryInitializersCount; ++i) {\r\n var telemetryInitializer = this.telemetryInitializers[i];\r\n if (telemetryInitializer) {\r\n if (telemetryInitializer.apply(null, [envelope]) === false) {\r\n doNotSendItem = true;\r\n break;\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n doNotSendItem = true;\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"One of telemetry initializers failed, telemetry item will not be sent: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) }, true);\r\n }\r\n\r\n if (!doNotSendItem) {\r\n if (envelope.name === Telemetry.Metric.envelopeType ||\r\n this.sample.isSampledIn(envelope)) {\r\n var iKeyNoDashes = this._config.instrumentationKey().replace(/-/g, \"\");\r\n envelope.name = envelope.name.replace(\"{0}\", iKeyNoDashes);\r\n this._sender.send(envelope);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TelemetrySampledAndNotSent,\r\n \"Telemetry is sampled and not sent to the AI service.\", { SampleRate: this.sample.sampleRate }, true);\r\n }\r\n }\r\n\r\n return envelope;\r\n }\r\n\r\n private _applyApplicationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, appContext: Microsoft.ApplicationInsights.Context.Application) {\r\n if (appContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n\r\n if (typeof appContext.ver === \"string\") {\r\n envelope.tags[tagKeys.applicationVersion] = appContext.ver;\r\n }\r\n if (typeof appContext.build === \"string\") {\r\n envelope.tags[tagKeys.applicationBuild] = appContext.build;\r\n }\r\n }\r\n }\r\n\r\n private _applyDeviceContext(envelope: Microsoft.ApplicationInsights.IEnvelope, deviceContext: Microsoft.ApplicationInsights.Context.Device) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n\r\n if (deviceContext) {\r\n if (typeof deviceContext.id === \"string\") {\r\n envelope.tags[tagKeys.deviceId] = deviceContext.id;\r\n }\r\n if (typeof deviceContext.ip === \"string\") {\r\n envelope.tags[tagKeys.deviceIp] = deviceContext.ip;\r\n }\r\n if (typeof deviceContext.language === \"string\") {\r\n envelope.tags[tagKeys.deviceLanguage] = deviceContext.language;\r\n }\r\n if (typeof deviceContext.locale === \"string\") {\r\n envelope.tags[tagKeys.deviceLocale] = deviceContext.locale;\r\n }\r\n if (typeof deviceContext.model === \"string\") {\r\n envelope.tags[tagKeys.deviceModel] = deviceContext.model;\r\n }\r\n if (typeof deviceContext.network !== \"undefined\") {\r\n envelope.tags[tagKeys.deviceNetwork] = deviceContext.network;\r\n }\r\n if (typeof deviceContext.oemName === \"string\") {\r\n envelope.tags[tagKeys.deviceOEMName] = deviceContext.oemName;\r\n }\r\n if (typeof deviceContext.os === \"string\") {\r\n envelope.tags[tagKeys.deviceOS] = deviceContext.os;\r\n }\r\n if (typeof deviceContext.osversion === \"string\") {\r\n envelope.tags[tagKeys.deviceOSVersion] = deviceContext.osversion;\r\n }\r\n if (typeof deviceContext.resolution === \"string\") {\r\n envelope.tags[tagKeys.deviceScreenResolution] = deviceContext.resolution;\r\n }\r\n if (typeof deviceContext.type === \"string\") {\r\n envelope.tags[tagKeys.deviceType] = deviceContext.type;\r\n }\r\n }\r\n }\r\n\r\n private _applyInternalContext(envelope: Microsoft.ApplicationInsights.IEnvelope, internalContext: Microsoft.ApplicationInsights.Context.Internal) {\r\n if (internalContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof internalContext.agentVersion === \"string\") {\r\n envelope.tags[tagKeys.internalAgentVersion] = internalContext.agentVersion;\r\n }\r\n if (typeof internalContext.sdkVersion === \"string\") {\r\n envelope.tags[tagKeys.internalSdkVersion] = internalContext.sdkVersion;\r\n }\r\n }\r\n }\r\n\r\n private _applyLocationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, locationContext: Microsoft.ApplicationInsights.Context.Location) {\r\n if (locationContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof locationContext.ip === \"string\") {\r\n envelope.tags[tagKeys.locationIp] = locationContext.ip;\r\n }\r\n }\r\n }\r\n\r\n private _applyOperationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, operationContext: Microsoft.ApplicationInsights.Context.Operation) {\r\n if (operationContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof operationContext.id === \"string\") {\r\n envelope.tags[tagKeys.operationId] = operationContext.id;\r\n }\r\n if (typeof operationContext.name === \"string\") {\r\n envelope.tags[tagKeys.operationName] = operationContext.name;\r\n }\r\n if (typeof operationContext.parentId === \"string\") {\r\n envelope.tags[tagKeys.operationParentId] = operationContext.parentId;\r\n }\r\n if (typeof operationContext.rootId === \"string\") {\r\n envelope.tags[tagKeys.operationRootId] = operationContext.rootId;\r\n }\r\n if (typeof operationContext.syntheticSource === \"string\") {\r\n envelope.tags[tagKeys.operationSyntheticSource] = operationContext.syntheticSource;\r\n }\r\n }\r\n }\r\n\r\n private _applySampleContext(envelope: Microsoft.ApplicationInsights.IEnvelope, sampleContext: Microsoft.ApplicationInsights.Context.Sample) {\r\n if (sampleContext) {\r\n envelope.sampleRate = sampleContext.sampleRate;\r\n }\r\n }\r\n\r\n private _applySessionContext(envelope: Microsoft.ApplicationInsights.IEnvelope, sessionContext: Microsoft.ApplicationInsights.Context.Session) {\r\n if (sessionContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof sessionContext.id === \"string\") {\r\n envelope.tags[tagKeys.sessionId] = sessionContext.id;\r\n }\r\n if (typeof sessionContext.isFirst !== \"undefined\") {\r\n envelope.tags[tagKeys.sessionIsFirst] = sessionContext.isFirst;\r\n }\r\n }\r\n }\r\n\r\n private _applyUserContext(envelope: Microsoft.ApplicationInsights.IEnvelope, userContext: Microsoft.ApplicationInsights.Context.User) {\r\n if (userContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof userContext.accountId === \"string\") {\r\n envelope.tags[tagKeys.userAccountId] = userContext.accountId;\r\n }\r\n if (typeof userContext.agent === \"string\") {\r\n envelope.tags[tagKeys.userAgent] = userContext.agent;\r\n }\r\n if (typeof userContext.id === \"string\") {\r\n envelope.tags[tagKeys.userId] = userContext.id;\r\n }\r\n if (typeof userContext.authenticatedId === \"string\") {\r\n envelope.tags[tagKeys.userAuthUserId] = userContext.authenticatedId;\r\n }\r\n if (typeof userContext.storeRegion === \"string\") {\r\n envelope.tags[tagKeys.userStoreRegion] = userContext.storeRegion;\r\n }\r\n }\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Data struct to contain both B and C sections.\r\n */\r\n export class Data extends Microsoft.Telemetry.Base\r\n {\r\n \r\n /**\r\n * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.\r\n */\r\n public baseType: string;\r\n \r\n /**\r\n * Container for data item (B section).\r\n */\r\n public baseData: TDomain;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class Data extends Microsoft.Telemetry.Data implements ISerializable {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {\r\n baseType: FieldType.Required,\r\n baseData: FieldType.Required\r\n }\r\n\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n constructor(type: string, data: TDomain) {\r\n super();\r\n\r\n this.baseType = type;\r\n this.baseData = data;\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n /**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */\r\n export class PageViewManager {\r\n private pageViewPerformanceSent: boolean = false;\r\n\r\n private overridePageViewDuration: boolean = false;\r\n\r\n private appInsights: IAppInsightsInternal;\r\n\r\n constructor(\r\n appInsights: IAppInsightsInternal,\r\n overridePageViewDuration: boolean) {\r\n this.overridePageViewDuration = overridePageViewDuration;\r\n this.appInsights = appInsights;\r\n }\r\n\r\n /**\r\n * Currently supported cases:\r\n * 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.\r\n * If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.\r\n * 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.\r\n * 3) overridePageViewDuration = true. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported). \r\n * 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration. \r\n *\r\n * In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.\r\n */\r\n public trackPageView(name?: string, url?: string, properties?: Object, measurements?: Object, duration?: number) {\r\n // ensure we have valid values for the required fields\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n\r\n var pageViewSent = false;\r\n var customDuration = undefined;\r\n\r\n if (Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {\r\n var start = Telemetry.PageViewPerformance.getPerformanceTiming().navigationStart;\r\n customDuration = Telemetry.PageViewPerformance.getDuration(start, +new Date);\r\n\r\n if (!Telemetry.PageViewPerformance.shouldCollectDuration(customDuration)) {\r\n customDuration = undefined;\r\n }\r\n } else {\r\n this.appInsights.sendPageViewInternal(\r\n name,\r\n url,\r\n !isNaN(duration) ? duration : undefined,\r\n properties,\r\n measurements);\r\n this.appInsights.flush();\r\n pageViewSent = true;\r\n }\r\n\r\n if (!pageViewSent && (this.overridePageViewDuration || !isNaN(duration))) {\r\n // 1, 2, 4 cases\r\n this.appInsights.sendPageViewInternal(\r\n name,\r\n url,\r\n !isNaN(duration) ? duration : customDuration,\r\n properties,\r\n measurements);\r\n this.appInsights.flush();\r\n pageViewSent = true;\r\n }\r\n\r\n var maxDurationLimit = 60000;\r\n\r\n if (!Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {\r\n // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.NavigationTimingNotSupported,\r\n \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\r\n return;\r\n }\r\n\r\n var handle = setInterval(() => {\r\n try {\r\n if (Telemetry.PageViewPerformance.isPerformanceTimingDataReady()) {\r\n clearInterval(handle);\r\n var pageViewPerformance = new Telemetry.PageViewPerformance(name, url, null, properties, measurements);\r\n\r\n if (!pageViewPerformance.getIsValid() && !pageViewSent) {\r\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\r\n // That's the best value we can get that makes sense.\r\n this.appInsights.sendPageViewInternal(name, url, customDuration, properties, measurements);\r\n this.appInsights.flush();\r\n } else {\r\n if (!pageViewSent) {\r\n this.appInsights.sendPageViewInternal(name, url, pageViewPerformance.getDurationMs(), properties, measurements);\r\n }\r\n\r\n if (!this.pageViewPerformanceSent) {\r\n this.appInsights.sendPageViewPerformanceInternal(pageViewPerformance);\r\n this.pageViewPerformanceSent = true;\r\n }\r\n this.appInsights.flush();\r\n }\r\n }\r\n else if (Telemetry.PageViewPerformance.getDuration(start, +new Date) > maxDurationLimit) {\r\n clearInterval(handle);\r\n if (!pageViewSent) {\r\n this.appInsights.sendPageViewInternal(name, url, maxDurationLimit, properties, measurements);\r\n this.appInsights.flush();\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackPVFailedCalc,\r\n \"trackPageView failed on page load calculation: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }, 100);\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n /**\r\n * Used to track page visit durations\r\n */\r\n export class PageVisitTimeManager {\r\n\r\n private prevPageVisitDataKeyName: string = \"prevPageVisitData\";\r\n private pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void;\r\n\r\n /**\r\n * Creates a new instance of PageVisitTimeManager\r\n * @param pageVisitTimeTrackingHandler Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)\r\n * @returns {} \r\n */\r\n constructor(pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void) {\r\n this.pageVisitTimeTrackingHandler = pageVisitTimeTrackingHandler;\r\n }\r\n\r\n /**\r\n * Tracks the previous page visit time telemetry (if exists) and starts timing of new page visit time\r\n * @param currentPageName Name of page to begin timing for visit duration\r\n * @param currentPageUrl Url of page to begin timing for visit duration\r\n */\r\n public trackPreviousPageVisit(currentPageName: string, currentPageUrl: string) {\r\n \r\n try {\r\n // Restart timer for new page view\r\n var prevPageVisitTimeData = this.restartPageVisitTimer(currentPageName, currentPageUrl);\r\n \r\n // If there was a page already being timed, track the visit time for it now.\r\n if (prevPageVisitTimeData) {\r\n this.pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);\r\n }\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Auto track page visit time failed, metric will not be collected: \" + Util.dump(e));\r\n }\r\n }\r\n\r\n /**\r\n * Stops timing of current page (if exists) and starts timing for duration of visit to pageName\r\n * @param pageName Name of page to begin timing visit duration\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not. \r\n */\r\n public restartPageVisitTimer(pageName: string, pageUrl: string) {\r\n try {\r\n var prevPageVisitData = this.stopPageVisitTimer();\r\n this.startPageVisitTimer(pageName, pageUrl);\r\n\r\n return prevPageVisitData;\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Call to restart failed: \" + Util.dump(e));\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Starts timing visit duration of pageName\r\n * @param pageName \r\n * @returns {} \r\n */\r\n public startPageVisitTimer(pageName: string, pageUrl: string) {\r\n try {\r\n if (Util.canUseSessionStorage()) {\r\n if (Util.getSessionStorage(this.prevPageVisitDataKeyName) != null) {\r\n throw new Error(\"Cannot call startPageVisit consecutively without first calling stopPageVisit\");\r\n }\r\n\r\n var currPageVisitData = new PageVisitData(pageName, pageUrl);\r\n var currPageVisitDataStr = JSON.stringify(currPageVisitData);\r\n Util.setSessionStorage(this.prevPageVisitDataKeyName, currPageVisitDataStr);\r\n }\r\n } catch (e) {\r\n //TODO: Remove this catch in next phase, since if start is called twice in a row the exception needs to be propagated out\r\n _InternalLogging.warnToConsole(\"Call to start failed: \" + Util.dump(e));\r\n }\r\n }\r\n\r\n /**\r\n * Stops timing of current page, if exists.\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not. \r\n */\r\n public stopPageVisitTimer() {\r\n try {\r\n if (Util.canUseSessionStorage()) {\r\n\r\n // Define end time of page's visit\r\n var pageVisitEndTime = Date.now();\r\n\r\n // Try to retrieve page name and start time from session storage\r\n var pageVisitDataJsonStr = Util.getSessionStorage(this.prevPageVisitDataKeyName);\r\n if (pageVisitDataJsonStr) {\r\n\r\n // if previous page data exists, set end time of visit\r\n var prevPageVisitData: PageVisitData = JSON.parse(pageVisitDataJsonStr);\r\n prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData.pageVisitStartTime;\r\n\r\n // Remove data from storage since we already used it\r\n Util.removeSessionStorage(this.prevPageVisitDataKeyName);\r\n\r\n // Return page visit data\r\n return prevPageVisitData;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n return null;\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Stop page visit timer failed: \" + Util.dump(e));\r\n return null\r\n }\r\n }\r\n }\r\n\r\n export class PageVisitData {\r\n\r\n public pageName: string;\r\n public pageUrl: string;\r\n public pageVisitStartTime: number;\r\n public pageVisitTime: number;\r\n\r\n constructor(pageName, pageUrl) {\r\n this.pageVisitStartTime = Date.now();\r\n this.pageName = pageName;\r\n this.pageUrl = pageUrl;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class FetchMonitor {\r\n private appInsights: AppInsights;\r\n private initialized: boolean;\r\n public static instrumentedByAppInsightsName = \"InstrumentedByAppInsights\";\r\n private currentWindowHost: string;\r\n\r\n constructor(appInsights: Microsoft.ApplicationInsights.AppInsights) {\r\n this.currentWindowHost = window.location.host && window.location.host.toLowerCase();\r\n this.appInsights = appInsights;\r\n this.initialized = false;\r\n this.Init();\r\n }\r\n\r\n private Init(): void {\r\n if (this.supportsMonitoring()) {\r\n this.instrumentFetch();\r\n this.initialized = true;\r\n }\r\n }\r\n\r\n public static DisabledPropertyName: string = \"Microsoft_ApplicationInsights_BypassFetchInstrumentation\";\r\n\r\n private isMonitoredInstance(input: Request | string): boolean {\r\n return this.initialized && input[FetchMonitor.DisabledPropertyName] !== true;\r\n }\r\n\r\n private supportsMonitoring(): boolean {\r\n let result: boolean = true;\r\n\r\n // polyfilled fetch on old browsers (IE) will try to use XMLHttpRequest instead\r\n const fetchPolyfill: string = \"new XMLHttpRequest\";\r\n\r\n if (extensions.IsNullOrUndefined((window as any).Request) ||\r\n extensions.IsNullOrUndefined((window as any).Request.prototype) ||\r\n extensions.IsNullOrUndefined(window.fetch) ||\r\n window.fetch.toString().indexOf(fetchPolyfill) !== -1) {\r\n result = false;\r\n }\r\n return result;\r\n }\r\n\r\n private instrumentFetch(): void {\r\n let originalFetch: (input?: Request | string, init?: RequestInit) => Promise = window.fetch;\r\n let fetchMonitorInstance: FetchMonitor = this;\r\n window.fetch = function fetch(input?: Request | string, init?: RequestInit): Promise {\r\n let ajaxData: ajaxRecord;\r\n if (fetchMonitorInstance.isMonitoredInstance(input)) {\r\n try {\r\n ajaxData = fetchMonitorInstance.createAjaxRecord(input, init);\r\n init = fetchMonitorInstance.includeCorrelationHeaders(ajaxData, input, init);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxOpen,\r\n \"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n return originalFetch(input, init)\r\n .then(response => {\r\n fetchMonitorInstance.onFetchComplete(response, ajaxData);\r\n return response;\r\n })\r\n .catch(reason => {\r\n fetchMonitorInstance.onFetchFailed(input, ajaxData, reason);\r\n throw reason;\r\n });\r\n };\r\n window.fetch[FetchMonitor.instrumentedByAppInsightsName] = true;\r\n }\r\n\r\n private createAjaxRecord(input?: Request | string, init?: RequestInit): ajaxRecord {\r\n // this format corresponds with activity logic on server-side and is required for the correct correlation\r\n let id: string = `|${this.appInsights.context.operation.id}.${Util.newId()}`;\r\n let ajaxData: ajaxRecord = new ajaxRecord(id);\r\n ajaxData.requestSentTime = dateTime.Now();\r\n if (input instanceof Request) {\r\n (input as any).ajaxData = ajaxData;\r\n ajaxData.requestUrl = input ? input.url : \"\";\r\n } else {\r\n ajaxData.requestUrl = input;\r\n }\r\n if (init && init.method) {\r\n ajaxData.method = init.method;\r\n } else if (input && input instanceof Request) {\r\n ajaxData.method = input.method;\r\n } else {\r\n ajaxData.method = \"GET\";\r\n }\r\n return ajaxData;\r\n }\r\n\r\n private includeCorrelationHeaders(ajaxData: ajaxRecord, input?: Request | string, init?: RequestInit) {\r\n if (CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, ajaxData.getAbsoluteUrl(), this.currentWindowHost)) {\r\n if (!init) {\r\n init = {};\r\n }\r\n // init headers override original request headers\r\n // so, if they exist use only them, otherwise use request's because they should have been applied in the first place\r\n // not using original request headers will result in them being lost\r\n init.headers = new Headers(init.headers || (input instanceof Request ? (input.headers || {}) : {}));\r\n init.headers.set(RequestHeaders.requestIdHeader, ajaxData.id);\r\n let appId: string = this.appInsights.context ? this.appInsights.context.appId() : null;\r\n if (appId) {\r\n init.headers.set(RequestHeaders.requestContextHeader, RequestHeaders.requestContextAppIdFormat + appId);\r\n }\r\n }\r\n return init;\r\n }\r\n\r\n private static getFailedFetchDiagnosticsMessage(input: Request | Response | string): string {\r\n let result: string = \"\";\r\n try {\r\n if (!extensions.IsNullOrUndefined(input)) {\r\n if (typeof (input) === \"string\") {\r\n result += `(url: '${input}')`;\r\n } else {\r\n result += `(url: '${input.url}')`;\r\n }\r\n }\r\n // tslint:disable-next-line:no-empty\r\n } catch (e) { }\r\n\r\n return result;\r\n }\r\n\r\n private onFetchComplete(response: Response, ajaxData: ajaxRecord): void {\r\n if (!ajaxData) {\r\n return;\r\n }\r\n try {\r\n ajaxData.responseFinishedTime = dateTime.Now();\r\n ajaxData.CalculateMetrics();\r\n\r\n if (ajaxData.ajaxTotalDuration < 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxDur,\r\n \"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response),\r\n requestSentTime: ajaxData.requestSentTime,\r\n responseFinishedTime: ajaxData.responseFinishedTime\r\n });\r\n } else {\r\n let dependency: Telemetry.RemoteDependencyData = new Telemetry.RemoteDependencyData(\r\n ajaxData.id,\r\n ajaxData.getAbsoluteUrl(),\r\n ajaxData.getPathName(),\r\n ajaxData.ajaxTotalDuration,\r\n response.status >= 200 && response.status < 400,\r\n response.status,\r\n ajaxData.method);\r\n\r\n // enrich dependency target with correlation context from the server\r\n let correlationContext: string = this.getCorrelationContext(response);\r\n if (correlationContext) {\r\n dependency.target = dependency.target + \" | \" + correlationContext;\r\n }\r\n\r\n this.appInsights.trackDependencyData(dependency);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n\r\n private onFetchFailed(input: Request | string, ajaxData: ajaxRecord, reason: any): void {\r\n if (!ajaxData) {\r\n return;\r\n }\r\n try {\r\n ajaxData.responseFinishedTime = dateTime.Now();\r\n ajaxData.CalculateMetrics();\r\n\r\n if (ajaxData.ajaxTotalDuration < 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxDur,\r\n \"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input),\r\n requestSentTime: ajaxData.requestSentTime,\r\n responseFinishedTime: ajaxData.responseFinishedTime\r\n });\r\n } else {\r\n let dependency: Telemetry.RemoteDependencyData = new Telemetry.RemoteDependencyData(\r\n ajaxData.id,\r\n ajaxData.getAbsoluteUrl(),\r\n ajaxData.getPathName(),\r\n ajaxData.ajaxTotalDuration,\r\n false,\r\n 0,\r\n ajaxData.method);\r\n dependency.properties = { error: reason.message };\r\n this.appInsights.trackDependencyData(dependency);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(input),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n\r\n private getCorrelationContext(response: Response): string {\r\n try {\r\n let responseHeader: string = response.headers.get(RequestHeaders.requestContextHeader);\r\n return CorrelationIdHelper.getCorrelationContext(responseHeader);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\",\r\n {\r\n fetchDiagnosticsMessage: FetchMonitor.getFailedFetchDiagnosticsMessage(response),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n \r\n // Class allows to perform split testing (aka 'a/b testing' aka 'flights')\r\n // Works similarly to sampling, using the same hashing algorithm under the hood.\r\n // Suggested use:\r\n //\r\n // newShinyFeature.enabled = false;\r\n // if (new SplitTest.isEnabled(, )){\r\n // newShinyFeature.enabled = true;\r\n // }\r\n //\r\n export class SplitTest {\r\n private hashCodeGeneragor: HashCodeScoreGenerator = new HashCodeScoreGenerator();\r\n\r\n public isEnabled(key: string, percentEnabled: number) {\r\n return this.hashCodeGeneragor.getHashCodeScore(key) < percentEnabled;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export var Version = \"1.0.19\";\r\n\r\n /**\r\n * Internal interface to pass appInsights object to subcomponents without coupling \r\n */\r\n export interface IAppInsightsInternal {\r\n sendPageViewInternal(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object);\r\n sendPageViewPerformanceInternal(pageViewPerformance: ApplicationInsights.Telemetry.PageViewPerformance);\r\n flush();\r\n }\r\n\r\n /**\r\n * The main API that sends telemetry to Application Insights.\r\n * Learn more: http://go.microsoft.com/fwlink/?LinkID=401493\r\n */\r\n export class AppInsights implements IAppInsightsInternal, IAppInsights {\r\n\r\n // Counts number of trackAjax invokations.\r\n // By default we only monitor X ajax call per view to avoid too much load.\r\n // Default value is set in config.\r\n // This counter keeps increasing even after the limit is reached.\r\n private _trackAjaxAttempts: number = 0;\r\n\r\n private _eventTracking: Timing;\r\n private _pageTracking: Timing;\r\n private _pageViewManager: Microsoft.ApplicationInsights.Telemetry.PageViewManager;\r\n private _pageVisitTimeManager: Microsoft.ApplicationInsights.Telemetry.PageVisitTimeManager;\r\n private _ajaxMonitor: Microsoft.ApplicationInsights.AjaxMonitor;\r\n private _fetchMonitor: Microsoft.ApplicationInsights.FetchMonitor;\r\n\r\n public config: IConfig;\r\n public context: TelemetryContext;\r\n public queue: (() => void)[];\r\n public static defaultConfig: IConfig;\r\n\r\n constructor(config: IConfig) {\r\n this.config = config || {};\r\n\r\n // load default values if specified\r\n var defaults: IConfig = AppInsights.defaultConfig;\r\n if (defaults !== undefined) {\r\n for (var field in defaults) {\r\n // for each unspecified field, set the default value\r\n if (this.config[field] === undefined) {\r\n this.config[field] = defaults[field];\r\n }\r\n }\r\n }\r\n\r\n _InternalLogging.verboseLogging = () => this.config.verboseLogging;\r\n _InternalLogging.enableDebugExceptions = () => this.config.enableDebug;\r\n var configGetters: ApplicationInsights.ITelemetryConfig = {\r\n instrumentationKey: () => this.config.instrumentationKey,\r\n accountId: () => this.config.accountId,\r\n sessionRenewalMs: () => this.config.sessionRenewalMs,\r\n sessionExpirationMs: () => this.config.sessionExpirationMs,\r\n endpointUrl: () => this.config.endpointUrl,\r\n emitLineDelimitedJson: () => this.config.emitLineDelimitedJson,\r\n maxBatchSizeInBytes: () => {\r\n return (!this.config.isBeaconApiDisabled && Util.IsBeaconApiSupported()) ?\r\n Math.min(this.config.maxBatchSizeInBytes, Sender.MaxBeaconPayloadSize) :\r\n this.config.maxBatchSizeInBytes;\r\n },\r\n maxBatchInterval: () => this.config.maxBatchInterval,\r\n disableTelemetry: () => this.config.disableTelemetry,\r\n sampleRate: () => this.config.samplingPercentage,\r\n cookieDomain: () => this.config.cookieDomain,\r\n enableSessionStorageBuffer: () => {\r\n // Disable Session Storage buffer if telemetry is sent using Beacon API\r\n return ((this.config.isBeaconApiDisabled || !Util.IsBeaconApiSupported()) && this.config.enableSessionStorageBuffer);\r\n },\r\n isRetryDisabled: () => this.config.isRetryDisabled,\r\n isBeaconApiDisabled: () => this.config.isBeaconApiDisabled,\r\n sdkExtension: () => this.config.sdkExtension,\r\n isBrowserLinkTrackingEnabled: () => this.config.isBrowserLinkTrackingEnabled,\r\n appId: () => this.config.appId,\r\n }\r\n\r\n if (this.config.isCookieUseDisabled) {\r\n Util.disableCookies();\r\n }\r\n\r\n if (this.config.isStorageUseDisabled) {\r\n Util.disableStorage();\r\n }\r\n\r\n this.context = new ApplicationInsights.TelemetryContext(configGetters);\r\n\r\n this._pageViewManager = new Microsoft.ApplicationInsights.Telemetry.PageViewManager(this, this.config.overridePageViewDuration);\r\n\r\n // initialize event timing\r\n this._eventTracking = new Timing(\"trackEvent\");\r\n this._eventTracking.action = (name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => {\r\n if (!measurements) {\r\n measurements = { duration: duration };\r\n }\r\n else {\r\n // do not override existing duration value\r\n if (isNaN(measurements[\"duration\"])) {\r\n measurements[\"duration\"] = duration;\r\n }\r\n }\r\n var event = new Telemetry.Event(name, properties, measurements);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Event.dataType, event);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Event.envelopeType);\r\n\r\n this.context.track(envelope);\r\n }\r\n\r\n // initialize page view timing\r\n this._pageTracking = new Timing(\"trackPageView\");\r\n this._pageTracking.action = (name, url, duration, properties, measurements) => {\r\n this.sendPageViewInternal(name, url, duration, properties, measurements);\r\n }\r\n\r\n this._pageVisitTimeManager = new ApplicationInsights.Telemetry.PageVisitTimeManager(\r\n (pageName, pageUrl, pageVisitTime) => this.trackPageVisitTime(pageName, pageUrl, pageVisitTime));\r\n\r\n if (!this.config.disableAjaxTracking) {\r\n this._ajaxMonitor = new Microsoft.ApplicationInsights.AjaxMonitor(this);\r\n }\r\n\r\n if (!this.config.disableFetchTracking) {\r\n this._fetchMonitor = new Microsoft.ApplicationInsights.FetchMonitor(this);\r\n }\r\n }\r\n\r\n public sendPageViewInternal(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) {\r\n var pageView = new Telemetry.PageView(name, url, duration, properties, measurements, this.context.operation.id);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.PageView.dataType, pageView);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.PageView.envelopeType);\r\n\r\n this.context.track(envelope);\r\n\r\n // reset ajaxes counter\r\n this._trackAjaxAttempts = 0;\r\n }\r\n\r\n public sendPageViewPerformanceInternal(pageViewPerformance: ApplicationInsights.Telemetry.PageViewPerformance) {\r\n var pageViewPerformanceData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.PageViewPerformance.dataType, pageViewPerformance);\r\n var pageViewPerformanceEnvelope = new Telemetry.Common.Envelope(pageViewPerformanceData, Telemetry.PageViewPerformance.envelopeType);\r\n this.context.track(pageViewPerformanceEnvelope);\r\n }\r\n\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens. \r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n public startTrackPage(name?: string) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n this._pageTracking.start(name);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StartTrackFailed,\r\n \"startTrackPage failed, page view may not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public stopTrackPage(name?: string, url?: string, properties?: Object, measurements?: Object) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n\r\n this._pageTracking.stop(name, url, properties, measurements);\r\n\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StopTrackFailed,\r\n \"stopTrackPage failed, page view will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Logs that a page or other item was viewed. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.\r\n */\r\n public trackPageView(name?: string, url?: string, properties?: Object, measurements?: Object, duration?: number) {\r\n try {\r\n this._pageViewManager.trackPageView(name, url, properties, measurements, duration);\r\n\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackPVFailed,\r\n \"trackPageView failed, page view will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n public startTrackEvent(name: string) {\r\n try {\r\n this._eventTracking.start(name);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StartTrackEventFailed,\r\n \"startTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /** \r\n * Log an extended event that you started timing with {@link startTrackEvent}.\r\n * @param name The string you used to identify this event in startTrackEvent.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public stopTrackEvent(name: string, properties?: Object, measurements?: Object) {\r\n try {\r\n this._eventTracking.stop(name, undefined, properties, measurements);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StopTrackEventFailed,\r\n \"stopTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /** \r\n * Log a user action or other occurrence.\r\n * @param name A string to identify this event in the portal.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public trackEvent(name: string, properties?: Object, measurements?: Object) {\r\n try {\r\n var eventTelemetry = new Telemetry.Event(name, properties, measurements);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Event.dataType, eventTelemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Event.envelopeType);\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackEventFailed,\r\n \"trackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a dependency call\r\n * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id.\r\n * @param method represents request verb (GET, POST, etc.)\r\n * @param absoluteUrl absolute url used to make the dependency request\r\n * @param command command name \r\n * @param totalTime total request time\r\n * @param success indicates if the request was sessessful\r\n * @param resultCode response code returned by the dependency request\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public trackDependency(id: string, method: string, absoluteUrl: string, command: string, totalTime: number, success: boolean, resultCode: number, properties?: Object, measurements?: Object) {\r\n if (this.config.maxAjaxCallsPerView === -1 ||\r\n this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) {\r\n var dependency = new Telemetry.RemoteDependencyData(id, absoluteUrl, command, totalTime, success, resultCode, method, properties, measurements);\r\n var dependencyData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.RemoteDependencyData.dataType, dependency);\r\n var envelope = new Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType);\r\n this.context.track(envelope);\r\n } else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MaxAjaxPerPVExceeded,\r\n \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\",\r\n true);\r\n }\r\n\r\n ++this._trackAjaxAttempts;\r\n }\r\n\r\n /**\r\n * Logs dependency call\r\n * @param dependencyData dependency data object\r\n */\r\n public trackDependencyData(dependency: Telemetry.RemoteDependencyData) {\r\n if (this.config.maxAjaxCallsPerView === -1 || this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) {\r\n var dependencyData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.RemoteDependencyData.dataType, dependency);\r\n var envelope = new Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType);\r\n this.context.track(envelope);\r\n } else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MaxAjaxPerPVExceeded,\r\n \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\",\r\n true);\r\n }\r\n\r\n ++this._trackAjaxAttempts;\r\n }\r\n\r\n /**\r\n * trackAjax method is obsolete, use trackDependency instead\r\n */\r\n public trackAjax(id: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, method?: string) {\r\n this.trackDependency(id, null, absoluteUrl, pathName, totalTime, success, resultCode);\r\n }\r\n\r\n /**\r\n * Log an exception you have caught.\r\n * @param exception An Error from a catch clause, or the string error message.\r\n * @param handledAt Not used\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n public trackException(exception: Error, handledAt?: string, properties?: Object, measurements?: Object, severityLevel?: AI.SeverityLevel) {\r\n try {\r\n if (!Util.isError(exception)) {\r\n // ensure that we have an error object (user could pass a string/message)\r\n try {\r\n throw new Error(exception);\r\n } catch (error) {\r\n exception = error;\r\n }\r\n }\r\n\r\n var exceptionTelemetry = new Telemetry.Exception(exception, properties, measurements, severityLevel);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Exception.dataType, exceptionTelemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Exception.envelopeType);\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackExceptionFailed,\r\n \"trackException failed, exception will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.\r\n * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the \r\n * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.\r\n * @param name A string that identifies the metric.\r\n * @param average Number representing either a single measurement, or the average of several measurements.\r\n * @param sampleCount The number of measurements represented by the average. Defaults to 1.\r\n * @param min The smallest measurement in the sample. Defaults to the average.\r\n * @param max The largest measurement in the sample. Defaults to the average.\r\n */\r\n public trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: Object) {\r\n try {\r\n var telemetry = new Telemetry.Metric(name, average, sampleCount, min, max, properties);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Metric.dataType, telemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Metric.envelopeType);\r\n\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackMetricFailed,\r\n \"trackMetric failed, metric will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a diagnostic message. \r\n * @param message A message string \r\n * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n public trackTrace(message: string, properties?: Object, severityLevel?: AI.SeverityLevel) {\r\n try {\r\n var telemetry = new Telemetry.Trace(message, properties, severityLevel);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Trace.dataType, telemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Trace.envelopeType);\r\n\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.TrackTraceFailed,\r\n \"trackTrace failed, trace will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a page visit time\r\n * @param pageName Name of page\r\n * @param pageVisitDuration Duration of visit to the page in milleseconds\r\n */\r\n private trackPageVisitTime(pageName: string, pageUrl: string, pageVisitTime: number) {\r\n var properties = { PageName: pageName, PageUrl: pageUrl };\r\n this.trackMetric(\"PageVisitTime\", pageVisitTime, 1, pageVisitTime, pageVisitTime, properties);\r\n }\r\n\r\n /**\r\n * Immediately send all queued telemetry.\r\n * @param {boolean} async - If flush should be call asynchronously\r\n */\r\n public flush(async = true) {\r\n try {\r\n this.context._sender.triggerSend(async);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FlushFailed,\r\n \"flush failed, telemetry will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Sets the authenticated user id and the account id.\r\n * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\r\n * \r\n * By default the method will only set the authUserID and accountId for all events in this page view. To add them to all events within\r\n * the whole session, you should either call this method on every page view or set `storeInCookie = true`. \r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n * @param storeInCookie {boolean} - AuthenticateUserID will be stored in a cookie and added to all events within this session. \r\n */\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false) {\r\n try {\r\n this.context.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailed,\r\n \"Setting auth user context failed. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) },\r\n true);\r\n }\r\n }\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n */\r\n public clearAuthenticatedUserContext() {\r\n try {\r\n this.context.user.clearAuthenticatedUserContext();\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailed,\r\n \"Clearing auth user context failed. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) },\r\n true);\r\n }\r\n }\r\n\r\n /**\r\n * In case of CORS exceptions - construct an exception manually.\r\n * See this for more info: http://stackoverflow.com/questions/5913978/cryptic-script-error-reported-in-javascript-in-chrome-and-firefox\r\n */\r\n private SendCORSException(properties: any) {\r\n var exceptionData = Microsoft.ApplicationInsights.Telemetry.Exception.CreateSimpleException(\r\n \"Script error.\",\r\n \"Error\", \"unknown\", \"unknown\",\r\n \"The browser's same-origin policy prevents us from getting the details of this exception. Consider using 'crossorigin' attribute.\",\r\n 0);\r\n exceptionData.properties = properties;\r\n\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Exception.dataType, exceptionData);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Exception.envelopeType);\r\n this.context.track(envelope);\r\n }\r\n\r\n /**\r\n * The custom error handler for Application Insights\r\n * @param {string} message - The error message\r\n * @param {string} url - The url where the error was raised\r\n * @param {number} lineNumber - The line number where the error was raised\r\n * @param {number} columnNumber - The column number for the line where the error was raised\r\n * @param {Error} error - The Error object\r\n */\r\n public _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error) {\r\n try {\r\n var properties = { url: url ? url : document.URL };\r\n\r\n if (Util.isCrossOriginError(message, url, lineNumber, columnNumber, error)) {\r\n this.SendCORSException(properties);\r\n } else {\r\n if (!Util.isError(error)) {\r\n var stack = \"window.onerror@\" + properties.url + \":\" + lineNumber + \":\" + (columnNumber || 0);\r\n error = new Error(message);\r\n error[\"stack\"] = stack;\r\n }\r\n this.trackException(error, null, properties);\r\n }\r\n } catch (exception) {\r\n var errorString =\r\n error ? (error.name + \", \" + error.message) : \"null\";\r\n\r\n var exceptionDump: string = Util.dump(exception);\r\n\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.ExceptionWhileLoggingError,\r\n \"_onerror threw exception while logging error, error will not be collected: \" + Util.getExceptionName(exception),\r\n { exception: exceptionDump, errorString: errorString });\r\n }\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Used to record timed events and page views.\r\n */\r\n class Timing {\r\n private _name;\r\n private _action: (ITimingDetail, number) => void;\r\n private _events: {\r\n [key: string]: number;\r\n };\r\n\r\n constructor(name: string) {\r\n this._name = name;\r\n this._events = {};\r\n }\r\n\r\n public start(name: string) {\r\n if (typeof this._events[name] !== \"undefined\") {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.StartCalledMoreThanOnce, \"start was called more than once for this event without calling stop.\",\r\n { name: this._name, key: name }, true);\r\n }\r\n\r\n this._events[name] = +new Date;\r\n }\r\n\r\n public stop(name: string, url: string, properties?: Object, measurements?: Object) {\r\n var start = this._events[name];\r\n if (isNaN(start)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.StopCalledWithoutStart, \"stop was called without a corresponding start.\",\r\n { name: this._name, key: name }, true);\r\n } else {\r\n var end = +new Date;\r\n var duration = Telemetry.PageViewPerformance.getDuration(start, end);\r\n this.action(name, url, duration, properties, measurements);\r\n }\r\n\r\n delete this._events[name];\r\n this._events[name] = undefined;\r\n }\r\n\r\n public action: (name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => void;\r\n }\r\n}\r\n","module Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n /* Data loss analyzer is disabled by default.\r\n * Uncomment code in Sender, SendBuffer and unit tests if you want to enable it\r\n */\r\n export class DataLossAnalyzer {\r\n static enabled = false;\r\n static appInsights: Microsoft.ApplicationInsights.AppInsights;\r\n static issuesReportedForThisSession;\r\n static itemsRestoredFromSessionBuffer: number = 0;\r\n static LIMIT_PER_SESSION = 10;\r\n static ITEMS_QUEUED_KEY = \"AI_itemsQueued\";\r\n static ISSUES_REPORTED_KEY = \"AI_lossIssuesReported\";\r\n\r\n static reset() {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, \"0\");\r\n Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, \"0\");\r\n DataLossAnalyzer.itemsRestoredFromSessionBuffer = 0;\r\n }\r\n }\r\n\r\n private static isEnabled(): boolean {\r\n return DataLossAnalyzer.enabled &&\r\n DataLossAnalyzer.appInsights != null &&\r\n DataLossAnalyzer.appInsights.context._sender._XMLHttpRequestSupported &&\r\n Util.canUseSessionStorage()\r\n }\r\n\r\n static getIssuesReported(): number {\r\n var result =\r\n (!DataLossAnalyzer.isEnabled() || isNaN(+Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY))) ?\r\n 0 :\r\n +Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY);\r\n\r\n return result;\r\n }\r\n\r\n static incrementItemsQueued() {\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n var itemsQueued: number = DataLossAnalyzer.getNumberOfLostItems();\r\n ++itemsQueued;\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString());\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n static decrementItemsQueued(countOfItemsSentSuccessfully: number) {\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n var itemsQueued: number = DataLossAnalyzer.getNumberOfLostItems();\r\n itemsQueued -= countOfItemsSentSuccessfully;\r\n if (itemsQueued < 0) itemsQueued = 0;\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString());\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n static getNumberOfLostItems(): number {\r\n var result: number = 0;\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n result = isNaN(+Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY)) ?\r\n 0 :\r\n +Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY);\r\n }\r\n } catch (e) {\r\n result = 0;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n static reportLostItems() {\r\n try {\r\n if (DataLossAnalyzer.isEnabled() &&\r\n DataLossAnalyzer.getIssuesReported() < DataLossAnalyzer.LIMIT_PER_SESSION &&\r\n DataLossAnalyzer.getNumberOfLostItems() > 0) {\r\n\r\n var lostItems = DataLossAnalyzer.getNumberOfLostItems() - DataLossAnalyzer.itemsRestoredFromSessionBuffer;\r\n\r\n DataLossAnalyzer.appInsights.trackTrace(\r\n \"AI (Internal): Internal report DATALOSS:\\\"\" + lostItems + \"\\\"\",\r\n null);\r\n DataLossAnalyzer.appInsights.flush();\r\n\r\n var issuesReported: number = DataLossAnalyzer.getIssuesReported();\r\n ++issuesReported;\r\n Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, issuesReported.toString());\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToReportDataLoss,\r\n \"Failed to report data loss: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n finally {\r\n try {\r\n DataLossAnalyzer.reset();\r\n } catch (e) { }\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface Snippet {\r\n queue: Array<() => void>;\r\n config: IConfig;\r\n }\r\n\r\n export class Initialization {\r\n public snippet: Snippet;\r\n public config: IConfig;\r\n\r\n constructor(snippet: Snippet) {\r\n // initialize the queue and config in case they are undefined\r\n snippet.queue = snippet.queue || [];\r\n var config: IConfig = snippet.config || {};\r\n\r\n // ensure instrumentationKey is specified\r\n if (config && !config.instrumentationKey) {\r\n config = snippet;\r\n\r\n // check for legacy instrumentation key\r\n if (config[\"iKey\"]) {\r\n Microsoft.ApplicationInsights.Version = \"0.10.0.0\";\r\n config.instrumentationKey = config[\"iKey\"];\r\n } else if (config[\"applicationInsightsId\"]) {\r\n Microsoft.ApplicationInsights.Version = \"0.7.2.0\";\r\n config.instrumentationKey = config[\"applicationInsightsId\"];\r\n } else {\r\n throw new Error(\"Cannot load Application Insights SDK, no instrumentationKey was provided.\");\r\n }\r\n }\r\n\r\n // set default values\r\n config = Initialization.getDefaultConfig(config);\r\n\r\n this.snippet = snippet;\r\n this.config = config;\r\n }\r\n\r\n // note: these are split into methods to enable unit tests\r\n public loadAppInsights() {\r\n\r\n // initialize global instance of appInsights\r\n var appInsights = new Microsoft.ApplicationInsights.AppInsights(this.config);\r\n\r\n // implement legacy version of trackPageView for 0.10<\r\n if (this.config[\"iKey\"]) {\r\n var originalTrackPageView = appInsights.trackPageView;\r\n appInsights.trackPageView = (pagePath?: string, properties?: Object, measurements?: Object) => {\r\n originalTrackPageView.apply(appInsights, [null, pagePath, properties, measurements]);\r\n }\r\n }\r\n\r\n // implement legacy pageView interface if it is present in the snippet\r\n var legacyPageView = \"logPageView\";\r\n if (typeof this.snippet[legacyPageView] === \"function\") {\r\n appInsights[legacyPageView] = (pagePath?: string, properties?: Object, measurements?: Object) => {\r\n appInsights.trackPageView(null, pagePath, properties, measurements);\r\n }\r\n }\r\n\r\n // implement legacy event interface if it is present in the snippet\r\n var legacyEvent = \"logEvent\";\r\n if (typeof this.snippet[legacyEvent] === \"function\") {\r\n appInsights[legacyEvent] = (name: string, properties?: Object, measurements?: Object) => {\r\n appInsights.trackEvent(name, properties, measurements);\r\n }\r\n }\r\n\r\n return appInsights;\r\n }\r\n\r\n public emptyQueue() {\r\n\r\n // call functions that were queued before the main script was loaded\r\n try {\r\n if (Microsoft.ApplicationInsights.Util.isArray(this.snippet.queue)) {\r\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\r\n var length = this.snippet.queue.length;\r\n for (var i = 0; i < length; i++) {\r\n var call = this.snippet.queue[i];\r\n call();\r\n }\r\n\r\n this.snippet.queue = undefined;\r\n delete this.snippet.queue;\r\n }\r\n } catch (exception) {\r\n var properties: any = {};\r\n if (exception && typeof exception.toString === \"function\") {\r\n properties.exception = exception.toString();\r\n }\r\n Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedToSendQueuedTelemetry,\r\n \"Failed to send queued telemetry\",\r\n properties);\r\n }\r\n }\r\n\r\n public pollInteralLogs(appInsightsInstance: AppInsights) {\r\n return setInterval(() => {\r\n var queue: Array<_InternalLogMessage> = Microsoft.ApplicationInsights._InternalLogging.queue;\r\n var length = queue.length;\r\n for (var i = 0; i < length; i++) {\r\n appInsightsInstance.trackTrace(queue[i].message);\r\n }\r\n queue.length = 0;\r\n }, this.config.diagnosticLogInterval);\r\n }\r\n\r\n public addHousekeepingBeforeUnload(appInsightsInstance: AppInsights): void {\r\n // Add callback to push events when the user navigates away\r\n\r\n if (!appInsightsInstance.config.disableFlushOnBeforeUnload && ('onbeforeunload' in window)) {\r\n var performHousekeeping = function () {\r\n // Adds the ability to flush all data before the page unloads.\r\n // Note: This approach tries to push an async request with all the pending events onbeforeunload.\r\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\r\n // Telemetry here will help us analyze how effective this approach is.\r\n // Another approach would be to make this call sync with a acceptable timeout to reduce the \r\n // impact on user experience.\r\n appInsightsInstance.context._sender.triggerSend();\r\n\r\n // Back up the current session to local storage\r\n // This lets us close expired sessions after the cookies themselves expire\r\n appInsightsInstance.context._sessionManager.backup();\r\n };\r\n\r\n if (!Microsoft.ApplicationInsights.Util.addEventHandler('beforeunload', performHousekeeping)) {\r\n Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n Microsoft.ApplicationInsights.LoggingSeverity.CRITICAL,\r\n Microsoft.ApplicationInsights._InternalMessageId.FailedToAddHandlerForOnBeforeUnload,\r\n 'Could not add handler for beforeunload');\r\n }\r\n }\r\n }\r\n\r\n public static getDefaultConfig(config?: IConfig): IConfig {\r\n if (!config) {\r\n config = {};\r\n }\r\n\r\n // set default values\r\n config.endpointUrl = config.endpointUrl || \"https://dc.services.visualstudio.com/v2/track\";\r\n config.sessionRenewalMs = 30 * 60 * 1000;\r\n config.sessionExpirationMs = 24 * 60 * 60 * 1000;\r\n config.maxBatchSizeInBytes = config.maxBatchSizeInBytes > 0 ? config.maxBatchSizeInBytes : 102400; // 100kb\r\n config.maxBatchInterval = !isNaN(config.maxBatchInterval) ? config.maxBatchInterval : 15000;\r\n config.enableDebug = Util.stringToBoolOrDefault(config.enableDebug);\r\n config.disableExceptionTracking = Util.stringToBoolOrDefault(config.disableExceptionTracking);\r\n config.disableTelemetry = Util.stringToBoolOrDefault(config.disableTelemetry);\r\n config.verboseLogging = Util.stringToBoolOrDefault(config.verboseLogging);\r\n config.emitLineDelimitedJson = Util.stringToBoolOrDefault(config.emitLineDelimitedJson);\r\n config.diagnosticLogInterval = config.diagnosticLogInterval || 10000;\r\n config.autoTrackPageVisitTime = Util.stringToBoolOrDefault(config.autoTrackPageVisitTime);\r\n\r\n if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) {\r\n config.samplingPercentage = 100;\r\n }\r\n\r\n config.disableAjaxTracking = Util.stringToBoolOrDefault(config.disableAjaxTracking);\r\n config.disableFetchTracking = Util.stringToBoolOrDefault(config.disableFetchTracking, true);\r\n config.maxAjaxCallsPerView = !isNaN(config.maxAjaxCallsPerView) ? config.maxAjaxCallsPerView : 500;\r\n \r\n config.isBeaconApiDisabled = Util.stringToBoolOrDefault(config.isBeaconApiDisabled, true);\r\n config.disableCorrelationHeaders = Util.stringToBoolOrDefault(config.disableCorrelationHeaders);\r\n config.correlationHeaderExcludedDomains = config.correlationHeaderExcludedDomains || [\r\n \"*.blob.core.windows.net\", \r\n \"*.blob.core.chinacloudapi.cn\",\r\n \"*.blob.core.cloudapi.de\",\r\n \"*.blob.core.usgovcloudapi.net\"];\r\n config.disableFlushOnBeforeUnload = Util.stringToBoolOrDefault(config.disableFlushOnBeforeUnload);\r\n config.enableSessionStorageBuffer = Util.stringToBoolOrDefault(config.enableSessionStorageBuffer, true);\r\n config.isRetryDisabled = Util.stringToBoolOrDefault(config.isRetryDisabled);\r\n config.isCookieUseDisabled = Util.stringToBoolOrDefault(config.isCookieUseDisabled);\r\n config.isStorageUseDisabled = Util.stringToBoolOrDefault(config.isStorageUseDisabled);\r\n config.isBrowserLinkTrackingEnabled = Util.stringToBoolOrDefault(config.isBrowserLinkTrackingEnabled);\r\n config.enableCorsCorrelation = Util.stringToBoolOrDefault(config.enableCorsCorrelation);\r\n \r\n return config;\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n try {\r\n // only initialize if we are running in a browser that supports JSON serialization (ie7<, node.js, cordova)\r\n if (typeof window !== \"undefined\" && typeof JSON !== \"undefined\") {\r\n // get snippet or initialize to an empty object\r\n var aiName = \"appInsights\";\r\n \r\n if (window[aiName] === undefined) {\r\n // if no snippet is present, initialize default values\r\n Microsoft.ApplicationInsights.AppInsights.defaultConfig = Microsoft.ApplicationInsights.Initialization.getDefaultConfig();\r\n } else {\r\n // this is the typical case for browser+snippet\r\n var snippet: Microsoft.ApplicationInsights.Snippet = window[aiName] || {};\r\n \r\n // overwrite snippet with full appInsights\r\n var init = new Microsoft.ApplicationInsights.Initialization(snippet);\r\n var appInsightsLocal = init.loadAppInsights();\r\n\r\n // apply full appInsights to the global instance that was initialized in the snippet\r\n for (var field in appInsightsLocal) {\r\n snippet[field] = appInsightsLocal[field];\r\n }\r\n \r\n init.emptyQueue();\r\n \r\n init.pollInteralLogs(appInsightsLocal);\r\n \r\n init.addHousekeepingBeforeUnload(appInsightsLocal);\r\n }\r\n }\r\n } catch (e) {\r\n Microsoft.ApplicationInsights._InternalLogging.warnToConsole('Failed to initialize AppInsights JS SDK: ' + e.message);\r\n }\r\n}\r\n"]} \ No newline at end of file +{"version":3,"file":"ai.js","sourceRoot":"","sources":["../JavaScript/JavaScriptSDK.Interfaces/IConfig.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Base.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Envelope.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IApplication.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IDevice.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IInternal.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ILocation.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IOperation.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ISample.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/IUser.ts","../JavaScript/JavaScriptSDK.Interfaces/Context/ISession.ts","../JavaScript/JavaScriptSDK.Interfaces/Telemetry/ISerializable.ts","../JavaScript/JavaScriptSDK.Interfaces/Telemetry/IEnvelope.ts","../JavaScript/JavaScriptSDK.Interfaces/ITelemetryContext.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/SeverityLevel.ts","../JavaScript/JavaScriptSDK.Interfaces/IAppInsights.ts","../JavaScript/JavaScriptSDK/Logging.ts","../JavaScript/JavaScriptSDK/UtilHelpers.ts","../JavaScript/JavaScriptSDK/Util.ts","../JavaScript/JavaScriptSDK/Serializer.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Envelope.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Base.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ContextTagKeys.ts","../JavaScript/JavaScriptSDK/Context/Application.ts","../JavaScript/JavaScriptSDK/Context/Device.ts","../JavaScript/JavaScriptSDK/Context/Internal.ts","../JavaScript/JavaScriptSDK/Context/Location.ts","../JavaScript/JavaScriptSDK/Context/Operation.ts","../JavaScript/JavaScriptSDK/HashCodeScoreGenerator.ts","../JavaScript/JavaScriptSDK/SamplingScoreGenerator.ts","../JavaScript/JavaScriptSDK/Context/Sample.ts","../JavaScript/JavaScriptSDK/Context/Session.ts","../JavaScript/JavaScriptSDK/Context/User.ts","../JavaScript/JavaScriptSDK/ajax/ajaxUtils.ts","../JavaScript/JavaScriptSDK/ajax/ajaxRecord.ts","../JavaScript/JavaScriptSDK/RequestResponseHeaders.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Domain.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/EventData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/PageViewData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/RemoteDependencyData.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/DataSanitizer.ts","../JavaScript/JavaScriptSDK/Telemetry/RemoteDependencyData.ts","../JavaScript/JavaScriptSDK/ajax/ajax.ts","../JavaScript/JavaScriptSDK/SendBuffer.ts","../JavaScript/JavaScriptSDK/Sender.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/MessageData.ts","../JavaScript/JavaScriptSDK/Telemetry/Trace.ts","../JavaScript/JavaScriptSDK/Telemetry/Event.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ExceptionDetails.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/ExceptionData.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/StackFrame.ts","../JavaScript/JavaScriptSDK/Telemetry/Exception.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/DataPointType.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/DataPoint.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/MetricData.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/DataPoint.ts","../JavaScript/JavaScriptSDK/Telemetry/Metric.ts","../JavaScript/JavaScriptSDK/Telemetry/PageView.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/PageViewPerfData.ts","../JavaScript/JavaScriptSDK/Telemetry/PageViewPerformance.ts","../JavaScript/JavaScriptSDK/TelemetryContext.ts","../JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/Data.ts","../JavaScript/JavaScriptSDK/Telemetry/Common/Data.ts","../JavaScript/JavaScriptSDK/Telemetry/PageViewManager.ts","../JavaScript/JavaScriptSDK/Telemetry/PageVisitTimeManager.ts","../JavaScript/JavaScriptSDK/SplitTest.ts","../JavaScript/JavaScriptSDK/AppInsights.ts","../JavaScript/JavaScriptSDK/DataLossAnalyzer.ts","../JavaScript/JavaScriptSDK/Initialization.ts","../JavaScript/JavaScriptSDK/Init.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,IAAO,SAAS,CAuCf;AAvCD,WAAO,SAAS;IAAC,IAAA,mBAAmB,CAuCnC;IAvCgB,WAAA,mBAAmB;QAEhC,YAAY,CAAC;IAqCjB,CAAC,EAvCgB,mBAAmB,GAAnB,6BAAmB,KAAnB,6BAAmB,QAuCnC;AAAD,CAAC,EAvCM,SAAS,KAAT,SAAS,QAuCf;ACvCD,8BAA8B;AAC9B,IAA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AAC,mBAAmB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;oBACrE,IAAI,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;oBAE9C,oFAAoF;oBACpF,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,gBAAgB,CAAC,CAAC,CAAC;wBACjC,OAAO,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,UAAU,EAAE,CAAC;oBAElB,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;oBAEvC,IAAI,CAAC,2BAA2B,CAAC,gBAAgB,CAAC,CAAC;gBACvD,CAAC;YACL,CAAC;QACL,CAAC;QAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACT,SAAS,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,aAAa,CAAC,2CAA2C,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;QAC1H,CAAC;IACL,CAAC,EAnCgB,mBAAmB,GAAnB,6BAAmB,KAAnB,6BAAmB,QAmCnC;AAAD,CAAC,EAnCM,SAAS,KAAT,SAAS,QAmCf","sourcesContent":["module Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IConfig {\r\n instrumentationKey?: string;\r\n endpointUrl?: string;\r\n emitLineDelimitedJson?: boolean;\r\n accountId?: string;\r\n sessionRenewalMs?: number;\r\n sessionExpirationMs?: number;\r\n maxBatchSizeInBytes?: number;\r\n maxBatchInterval?: number;\r\n enableDebug?: boolean;\r\n disableExceptionTracking?: boolean;\r\n disableTelemetry?: boolean;\r\n verboseLogging?: boolean;\r\n diagnosticLogInterval?: number;\r\n samplingPercentage?: number;\r\n autoTrackPageVisitTime?: boolean;\r\n disableAjaxTracking?: boolean;\r\n overridePageViewDuration?: boolean;\r\n maxAjaxCallsPerView?: number;\r\n disableDataLossAnalysis?: boolean;\r\n disableCorrelationHeaders?: boolean;\r\n correlationHeaderExcludedDomains?: string[];\r\n disableFlushOnBeforeUnload?: boolean;\r\n enableSessionStorageBuffer?: boolean;\r\n isCookieUseDisabled?: boolean;\r\n cookieDomain?: string;\r\n isRetryDisabled?: boolean;\r\n url?: string;\r\n isStorageUseDisabled?: boolean;\r\n isBeaconApiDisabled?: boolean;\r\n sdkExtension?: string;\r\n isBrowserLinkTrackingEnabled?: boolean;\r\n appId?: string;\r\n enableCorsCorrelation?: boolean;\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Data struct to contain only C section with custom fields.\r\n */\r\n export class Base\r\n {\r\n \r\n /**\r\n * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.\r\n */\r\n public baseType: string;\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * System variables for a telemetry item.\r\n */\r\n export class Envelope\r\n {\r\n \r\n /**\r\n * Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Type name of telemetry data item.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z.\r\n */\r\n public time: string;\r\n \r\n /**\r\n * Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.\r\n */\r\n public sampleRate: number;\r\n \r\n /**\r\n * Sequence field used to track absolute order of uploaded events.\r\n */\r\n public seq: string;\r\n \r\n /**\r\n * The application's instrumentation key. The key is typically represented as a GUID, but there are cases when it is not a guid. No code should rely on iKey being a GUID. Instrumentation key is case insensitive.\r\n */\r\n public iKey: string;\r\n \r\n /**\r\n * Key/value collection of context properties. See ContextTagKeys for information on available properties.\r\n */\r\n public tags: any;\r\n \r\n /**\r\n * Telemetry data item.\r\n */\r\n public data: Base;\r\n \r\n constructor()\r\n {\r\n this.ver = 1;\r\n this.sampleRate = 100.0;\r\n this.tags = {};\r\n }\r\n }\r\n}\r\n","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IApplication {\r\n /**\r\n * The application version.\r\n */\r\n ver: string;\r\n\r\n /**\r\n * The application build version.\r\n */\r\n build: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IDevice {\r\n /**\r\n * The type for the current device.\r\n */\r\n type: string;\r\n\r\n /**\r\n * A device unique ID.\r\n */\r\n id: string;\r\n\r\n /**\r\n * The device OEM for the current device.\r\n */\r\n oemName: string;\r\n\r\n /**\r\n * The device model for the current device.\r\n */\r\n model: string;\r\n\r\n /**\r\n * The IANA interface type for the internet connected network adapter.\r\n */\r\n network: number;\r\n\r\n /**\r\n * The application screen resolution.\r\n */\r\n resolution: string;\r\n\r\n /**\r\n * The current display language of the operating system.\r\n */\r\n locale: string;\r\n\r\n /**\r\n * The IP address.\r\n */\r\n ip: string;\r\n\r\n /**\r\n * The device language.\r\n */\r\n language: string;\r\n\r\n /**\r\n * The OS name.\r\n */\r\n os: string;\r\n\r\n /**\r\n * The OS version.\r\n */\r\n osversion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IInternal {\r\n /**\r\n * The SDK version used to create this telemetry item.\r\n */\r\n sdkVersion: string;\r\n\r\n /**\r\n * The SDK agent version.\r\n */\r\n agentVersion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ILocation {\r\n /**\r\n * Client IP address for reverse lookup\r\n */\r\n ip: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IOperation {\r\n /**\r\n * Operation id\r\n */\r\n id: string;\r\n\r\n /**\r\n * Operation name\r\n */\r\n name: string;\r\n\r\n /**\r\n * Parent operation id\r\n */\r\n parentId: string;\r\n\r\n /**\r\n * Root operation id\r\n */\r\n rootId: string;\r\n\r\n /**\r\n * Synthetic source of the operation\r\n */\r\n syntheticSource: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISample {\r\n /**\r\n * Sample rate\r\n */\r\n sampleRate: number;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface IUser {\r\n /**\r\n * The telemetry configuration.\r\n */\r\n config: any;\r\n\r\n /**\r\n * The user ID.\r\n */\r\n id: string;\r\n\r\n /**\r\n * Authenticated user id\r\n */\r\n authenticatedId: string;\r\n\r\n /**\r\n * The account ID.\r\n */\r\n accountId: string;\r\n\r\n /**\r\n * The account acquisition date.\r\n */\r\n accountAcquisitionDate: string;\r\n\r\n /**\r\n * The user agent string.\r\n */\r\n agent: string;\r\n\r\n /**\r\n * The store region.\r\n */\r\n storeRegion: string;\r\n }\r\n}","module Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISession {\r\n /**\r\n * The session ID.\r\n */\r\n id: string;\r\n\r\n /** \r\n * The true if this is the first session \r\n */\r\n isFirst: boolean;\r\n\r\n /**\r\n * The date at which this guid was genereated.\r\n * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.\r\n */\r\n acquisitionDate: number;\r\n\r\n /**\r\n * The date at which this session ID was last reported.\r\n * This value should be updated whenever telemetry is sent using this ID.\r\n * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.\r\n */\r\n renewalDate: number;\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface ISerializable {\r\n /**\r\n * The set of fields for a serializable object. \r\n * This defines the serialization order and a value of true/false\r\n * for each field defines whether the field is required or not.\r\n */\r\n aiDataContract: any;\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IEnvelope extends ISerializable {\r\n ver: number;\r\n name: string;\r\n time: string;\r\n sampleRate: number;\r\n seq: string;\r\n iKey: string;\r\n tags: { [name: string]: any };\r\n data: any;\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface ITelemetryContext {\r\n /**\r\n * The object describing a component tracked by this object.\r\n */\r\n application: Context.IApplication;\r\n\r\n /**\r\n * The object describing a device tracked by this object.\r\n */\r\n device: Context.IDevice;\r\n\r\n /**\r\n * The object describing internal settings.\r\n */\r\n internal: Context.IInternal;\r\n\r\n /**\r\n * The object describing a location tracked by this object.\r\n */\r\n location: Context.ILocation;\r\n\r\n /**\r\n * The object describing a operation tracked by this object.\r\n */\r\n operation: Context.IOperation;\r\n\r\n /**\r\n * The object describing sampling settings.\r\n */\r\n sample: Context.ISample;\r\n\r\n /**\r\n * The object describing a user tracked by this object.\r\n */\r\n user: Context.IUser;\r\n\r\n /**\r\n * The object describing a session tracked by this object.\r\n */\r\n session: Context.ISession;\r\n\r\n /**\r\n * Adds a telemetry initializer to the collection. Telemetry initializers will be called one by one, \r\n * in the order they were added, before the telemetry item is pushed for sending. \r\n * If one of the telemetry initializers returns false or throws an error then the telemetry item will not be sent. \r\n * If it returns true or doesn't return any value the event will be passed to the next telemetry initializer and\r\n * send to the cloud (if not rejected by other initializers). \r\n */\r\n addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void);\r\n\r\n /**\r\n * Tracks telemetry object.\r\n */\r\n track(envelope: Microsoft.ApplicationInsights.IEnvelope);\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Defines the level of severity for the event.\r\n */\r\n export enum SeverityLevel\r\n {\r\n Verbose = 0,\r\n Information = 1,\r\n Warning = 2,\r\n Error = 3,\r\n Critical = 4,\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n\r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export interface IAppInsights {\r\n\r\n /*\r\n * Config object used to initialize AppInsights\r\n */\r\n config: IConfig;\r\n\r\n context: ITelemetryContext;\r\n\r\n /*\r\n * Initialization queue. Contains functions to run when appInsights initializes\r\n */\r\n queue: Array<() => void>;\r\n\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens. \r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n startTrackPage(name?: string);\r\n\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n stopTrackPage(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /**\r\n * Logs that a page or other item was viewed. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.\r\n */\r\n trackPageView(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, duration?: number);\r\n\r\n /**\r\n * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n startTrackEvent(name: string);\r\n\r\n\r\n /** \r\n * Log an extended event that you started timing with {@link startTrackEvent}.\r\n * @param name The string you used to identify this event in startTrackEvent.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n stopTrackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /** \r\n * Log a user action or other occurrence.\r\n * @param name A string to identify this event in the portal.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n trackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; });\r\n\r\n /**\r\n * Log a dependency call\r\n * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id.\r\n * @param method represents request verb (GET, POST, etc.)\r\n * @param absoluteUrl absolute url used to make the dependency request\r\n * @param pathName the path part of the absolute url\r\n * @param totalTime total request time\r\n * @param success indicates if the request was sessessful\r\n * @param resultCode response code returned by the dependency request\r\n */\r\n trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number);\r\n\r\n /**\r\n * Log an exception you have caught.\r\n * @param exception An Error from a catch clause, or the string error message.\r\n * @param handledAt Not used\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel);\r\n\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.\r\n * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the \r\n * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.\r\n * @param name A string that identifies the metric.\r\n * @param average Number representing either a single measurement, or the average of several measurements.\r\n * @param sampleCount The number of measurements represented by the average. Defaults to 1.\r\n * @param min The smallest measurement in the sample. Defaults to the average.\r\n * @param max The largest measurement in the sample. Defaults to the average.\r\n */\r\n trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; });\r\n\r\n /**\r\n * Log a diagnostic message. \r\n * @param message A message string \r\n * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n trackTrace(message: string, properties?: { [name: string]: string; }, severityLevel?: AI.SeverityLevel);\r\n\r\n\r\n /**\r\n * Immediately send all queued telemetry.\r\n * @param {boolean} async - If flush should be call asynchronously\r\n */\r\n flush(async?: boolean);\r\n\r\n\r\n /**\r\n * Sets the autheticated user id and the account id in this session.\r\n * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string);\r\n\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n */\r\n clearAuthenticatedUserContext();\r\n\r\n /*\r\n * Downloads and initializes AppInsights. You can override default script download location by specifying url property of `config`.\r\n */\r\n downloadAndSetup?(config: Microsoft.ApplicationInsights.IConfig): void;\r\n\r\n /**\r\n * The custom error handler for Application Insights\r\n * @param {string} message - The error message\r\n * @param {string} url - The url where the error was raised\r\n * @param {number} lineNumber - The line number where the error was raised\r\n * @param {number} columnNumber - The column number for the line where the error was raised\r\n * @param {Error} error - The Error object\r\n */\r\n _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error);\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n\r\n export enum LoggingSeverity {\r\n /**\r\n * Error will be sent as internal telemetry\r\n */\r\n CRITICAL = 0,\r\n\r\n /**\r\n * Error will NOT be sent as internal telemetry, and will only be shown in browser console\r\n */\r\n WARNING = 1\r\n }\r\n\r\n /**\r\n * Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered\r\n */\r\n export enum _InternalMessageId {\r\n // Non user actionable\r\n BrowserDoesNotSupportLocalStorage,\r\n BrowserCannotReadLocalStorage,\r\n BrowserCannotReadSessionStorage,\r\n BrowserCannotWriteLocalStorage,\r\n BrowserCannotWriteSessionStorage,\r\n BrowserFailedRemovalFromLocalStorage,\r\n BrowserFailedRemovalFromSessionStorage,\r\n CannotSendEmptyTelemetry,\r\n ClientPerformanceMathError,\r\n ErrorParsingAISessionCookie,\r\n ErrorPVCalc,\r\n ExceptionWhileLoggingError,\r\n FailedAddingTelemetryToBuffer,\r\n FailedMonitorAjaxAbort,\r\n FailedMonitorAjaxDur,\r\n FailedMonitorAjaxOpen,\r\n FailedMonitorAjaxRSC,\r\n FailedMonitorAjaxSend,\r\n FailedMonitorAjaxGetCorrelationHeader,\r\n FailedToAddHandlerForOnBeforeUnload,\r\n FailedToSendQueuedTelemetry,\r\n FailedToReportDataLoss,\r\n FlushFailed,\r\n MessageLimitPerPVExceeded,\r\n MissingRequiredFieldSpecification,\r\n NavigationTimingNotSupported,\r\n OnError,\r\n SessionRenewalDateIsZero,\r\n SenderNotInitialized,\r\n StartTrackEventFailed,\r\n StopTrackEventFailed,\r\n StartTrackFailed,\r\n StopTrackFailed,\r\n TelemetrySampledAndNotSent,\r\n TrackEventFailed,\r\n TrackExceptionFailed,\r\n TrackMetricFailed,\r\n TrackPVFailed,\r\n TrackPVFailedCalc,\r\n TrackTraceFailed,\r\n TransmissionFailed,\r\n FailedToSetStorageBuffer,\r\n FailedToRestoreStorageBuffer,\r\n InvalidBackendResponse,\r\n FailedToFixDepricatedValues,\r\n InvalidDurationValue,\r\n\r\n // User actionable\r\n CannotSerializeObject,\r\n CannotSerializeObjectNonSerializable,\r\n CircularReferenceDetected,\r\n ClearAuthContextFailed,\r\n ExceptionTruncated,\r\n IllegalCharsInName,\r\n ItemNotInArray,\r\n MaxAjaxPerPVExceeded,\r\n MessageTruncated,\r\n NameTooLong,\r\n SampleRateOutOfRange,\r\n SetAuthContextFailed,\r\n SetAuthContextFailedAccountName,\r\n StringValueTooLong,\r\n StartCalledMoreThanOnce,\r\n StopCalledWithoutStart,\r\n TelemetryInitializerFailed,\r\n TrackArgumentsNotSpecified,\r\n UrlTooLong,\r\n SessionStorageBufferFull,\r\n CannotAccessCookie,\r\n IdTooLong,\r\n }\r\n\r\n export class _InternalLogMessage {\r\n public message: string;\r\n public messageId: _InternalMessageId;\r\n\r\n /**\r\n * For user non actionable traces use AI Internal prefix.\r\n */\r\n private static AiNonUserActionablePrefix = \"AI (Internal): \";\r\n\r\n /**\r\n * Prefix of the traces in portal.\r\n */\r\n private static AiUserActionablePrefix = \"AI: \";\r\n\r\n constructor(msgId: _InternalMessageId, msg: string, isUserAct = false, properties?: Object) {\r\n\r\n this.messageId = msgId;\r\n this.message =\r\n (isUserAct ? _InternalLogMessage.AiUserActionablePrefix : _InternalLogMessage.AiNonUserActionablePrefix) +\r\n _InternalMessageId[msgId].toString();\r\n\r\n var diagnosticText =\r\n (msg ? \" message:\" + _InternalLogMessage.sanitizeDiagnosticText(msg) : \"\") +\r\n (properties ? \" props:\" + _InternalLogMessage.sanitizeDiagnosticText(JSON.stringify(properties)) : \"\");\r\n\r\n this.message += diagnosticText;\r\n }\r\n\r\n private static sanitizeDiagnosticText(text: string) {\r\n return \"\\\"\" + text.replace(/\\\"/g, \"\") + \"\\\"\";\r\n }\r\n }\r\n\r\n export class _InternalLogging {\r\n\r\n /**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */\r\n private static AIInternalMessagePrefix: string = \"AITR_\";\r\n\r\n /**\r\n * When this is true the SDK will throw exceptions to aid in debugging.\r\n */\r\n public static enableDebugExceptions = () => false;\r\n\r\n /**\r\n * When this is true the SDK will log more messages to aid in debugging.\r\n */\r\n public static verboseLogging = () => false;\r\n\r\n /**\r\n * The internal logging queue\r\n */\r\n public static queue: Array<_InternalLogMessage> = [];\r\n\r\n /**\r\n * The maximum number of internal messages allowed to be sent per page view\r\n */\r\n private static MAX_INTERNAL_MESSAGE_LIMIT = 25;\r\n\r\n /**\r\n * Count of internal messages sent\r\n */\r\n private static _messageCount = 0;\r\n\r\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */\r\n private static _messageLogged: { [type: string]: boolean } = {};\r\n\r\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The log message.\r\n */\r\n public static throwInternal(severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct = false) {\r\n let message = new _InternalLogMessage(msgId, msg, isUserAct, properties);\r\n\r\n if (this.enableDebugExceptions()) {\r\n throw message;\r\n } else {\r\n if (typeof (message) !== \"undefined\" && !!message) {\r\n if (typeof (message.message) !== \"undefined\") {\r\n if (isUserAct) {\r\n // check if this message type was already logged to console for this page view and if so, don't log it again\r\n var messageKey = _InternalMessageId[message.messageId];\r\n\r\n if (!this._messageLogged[messageKey] || this.verboseLogging()) {\r\n this.warnToConsole(message.message);\r\n this._messageLogged[messageKey] = true;\r\n }\r\n } else {\r\n // don't log internal AI traces in the console, unless the verbose logging is enabled\r\n if (this.verboseLogging()) {\r\n this.warnToConsole(message.message);\r\n }\r\n }\r\n\r\n this.logInternalMessage(severity, message);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * This will write a warning to the console if possible\r\n * @param message {string} - The warning message\r\n */\r\n public static warnToConsole(message: string) {\r\n if (typeof console !== \"undefined\" && !!console) {\r\n if (typeof console.warn === \"function\") {\r\n console.warn(message);\r\n } else if (typeof console.log === \"function\") {\r\n console.log(message);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Resets the internal message count\r\n */\r\n public static resetInternalMessageCount(): void {\r\n this._messageCount = 0;\r\n this._messageLogged = {};\r\n }\r\n\r\n /**\r\n * Clears the list of records indicating that internal message type was already logged\r\n */\r\n public static clearInternalMessageLoggedTypes(): void {\r\n if (Util.canUseSessionStorage()) {\r\n var sessionStorageKeys = Util.getSessionStorageKeys();\r\n for (var i = 0; i < sessionStorageKeys.length; i++) {\r\n if (sessionStorageKeys[i].indexOf(_InternalLogging.AIInternalMessagePrefix) === 0) {\r\n Util.removeSessionStorage(sessionStorageKeys[i]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Sets the limit for the number of internal events before they are throttled\r\n * @param limit {number} - The throttle limit to set for internal events\r\n */\r\n public static setMaxInternalMessageLimit(limit: number): void {\r\n if (!limit) {\r\n throw new Error('limit cannot be undefined.');\r\n }\r\n\r\n this.MAX_INTERNAL_MESSAGE_LIMIT = limit;\r\n }\r\n\r\n /**\r\n * Logs a message to the internal queue.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The message to log.\r\n */\r\n private static logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void {\r\n if (this._areInternalMessagesThrottled()) {\r\n return;\r\n }\r\n\r\n // check if this message type was already logged for this session and if so, don't log it again\r\n var logMessage = true;\r\n var messageKey = _InternalLogging.AIInternalMessagePrefix + _InternalMessageId[message.messageId];\r\n\r\n if (Util.canUseSessionStorage()) {\r\n var internalMessageTypeLogRecord = Util.getSessionStorage(messageKey);\r\n if (internalMessageTypeLogRecord) {\r\n logMessage = false;\r\n } else {\r\n Util.setSessionStorage(messageKey, \"1\");\r\n }\r\n } else {\r\n // if the session storage is not available, limit to only one message type per page view\r\n if (this._messageLogged[messageKey]) {\r\n logMessage = false;\r\n } else {\r\n this._messageLogged[messageKey] = true;\r\n }\r\n }\r\n\r\n if (logMessage) {\r\n // Push the event in the internal queue\r\n if (this.verboseLogging() || severity === LoggingSeverity.CRITICAL) {\r\n this.queue.push(message);\r\n this._messageCount++;\r\n }\r\n\r\n // When throttle limit reached, send a special event\r\n if (this._messageCount == this.MAX_INTERNAL_MESSAGE_LIMIT) {\r\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\r\n var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);\r\n\r\n this.queue.push(throttleMessage);\r\n this.warnToConsole(throttleLimitMessage);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Indicates whether the internal events are throttled\r\n */\r\n private static _areInternalMessagesThrottled(): boolean {\r\n return this._messageCount >= this.MAX_INTERNAL_MESSAGE_LIMIT;\r\n }\r\n }\r\n}","module Microsoft.ApplicationInsights {\r\n \"use strict\"\r\n\r\n export class UtilHelpers {\r\n\r\n /**\r\n * generate random id string\r\n */\r\n public static newId() {\r\n var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n var result = \"\";\r\n var random = Math.random() * 1073741824; //5 symbols in base64, almost maxint\r\n\r\n while (random > 0) {\r\n var char = base64chars.charAt(random % 64);\r\n result += char;\r\n random = Math.floor(random / 64);\r\n }\r\n return result;\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n /**\r\n * Type of storage to differentiate between local storage and session storage\r\n */\r\n enum StorageType {\r\n LocalStorage,\r\n SessionStorage\r\n }\r\n\r\n export class Util {\r\n private static document: any = typeof document !== \"undefined\" ? document : {};\r\n private static _canUseCookies: boolean = undefined;\r\n private static _canUseLocalStorage: boolean = undefined;\r\n private static _canUseSessionStorage: boolean = undefined;\r\n // listing only non-geo specific locations\r\n private static _internalEndpoints: string[] = [\r\n \"https://dc.services.visualstudio.com/v2/track\",\r\n \"https://breeze.aimon.applicationinsights.io/v2/track\",\r\n \"https://dc-int.services.visualstudio.com/v2/track\"\r\n ]\r\n public static NotSpecified = \"not_specified\";\r\n\r\n /*\r\n * Force the SDK not to use local and session storage\r\n */\r\n public static disableStorage() {\r\n Util._canUseLocalStorage = false;\r\n Util._canUseSessionStorage = false;\r\n }\r\n\r\n /**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n private static _getLocalStorageObject(): Storage {\r\n if (Util.canUseLocalStorage()) {\r\n return Util._getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */\r\n private static _getVerifiedStorageObject(storageType: StorageType): Storage {\r\n var storage: Storage = null;\r\n var fail: boolean;\r\n var uid;\r\n try {\r\n uid = new Date;\r\n storage = storageType === StorageType.LocalStorage ? window.localStorage : window.sessionStorage;\r\n storage.setItem(uid, uid);\r\n fail = storage.getItem(uid) != uid;\r\n storage.removeItem(uid);\r\n if (fail) {\r\n storage = null;\r\n }\r\n } catch (exception) {\r\n storage = null;\r\n }\r\n\r\n return storage;\r\n }\r\n\r\n /**\r\n * Checks if endpoint URL is application insights internal injestion service URL.\r\n *\r\n * @param endpointUrl Endpoint URL to check.\r\n * @returns {boolean} True if if endpoint URL is application insights internal injestion service URL.\r\n */\r\n public static isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean {\r\n return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;\r\n }\r\n\r\n\r\n /**\r\n * Check if the browser supports local storage.\r\n *\r\n * @returns {boolean} True if local storage is supported.\r\n */\r\n public static canUseLocalStorage(): boolean {\r\n if (Util._canUseLocalStorage === undefined) {\r\n Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n\r\n return Util._canUseLocalStorage;\r\n }\r\n\r\n /**\r\n * Get an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n public static getStorage(name: string): string {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotReadLocalStorage,\r\n \"Browser failed read of local storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Set the contents of an object in the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n public static setStorage(name: string, data: string): boolean {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotWriteLocalStorage,\r\n \"Browser failed write to local storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Remove an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n public static removeStorage(name: string): boolean {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n } catch (e) {\r\n Util._canUseLocalStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserFailedRemovalFromLocalStorage,\r\n \"Browser failed removal of local storage item. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n private static _getSessionStorageObject(): Storage {\r\n if (Util.canUseSessionStorage()) {\r\n return Util._getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Check if the browser supports session storage.\r\n *\r\n * @returns {boolean} True if session storage is supported.\r\n */\r\n public static canUseSessionStorage(): boolean {\r\n if (Util._canUseSessionStorage === undefined) {\r\n Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n\r\n return Util._canUseSessionStorage;\r\n }\r\n\r\n /**\r\n * Gets the list of session storage keys\r\n *\r\n * @returns {string[]} List of session storage keys\r\n */\r\n public static getSessionStorageKeys(): string[] {\r\n var keys = [];\r\n\r\n if (Util.canUseSessionStorage()) {\r\n for (var key in window.sessionStorage) {\r\n keys.push(key);\r\n }\r\n }\r\n return keys;\r\n }\r\n\r\n /**\r\n * Get an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n public static getSessionStorage(name: string): string {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotReadSessionStorage,\r\n \"Browser failed read of session storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Set the contents of an object in the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n public static setSessionStorage(name: string, data: string): boolean {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserCannotWriteSessionStorage,\r\n \"Browser failed write to session storage. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Remove an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n public static removeSessionStorage(name: string): boolean {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n } catch (e) {\r\n Util._canUseSessionStorage = false;\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserFailedRemovalFromSessionStorage,\r\n \"Browser failed removal of session storage item. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /*\r\n * Force the SDK not to store and read any data from cookies\r\n */\r\n public static disableCookies() {\r\n Util._canUseCookies = false;\r\n }\r\n\r\n /*\r\n * helper method to tell if document.cookie object is available\r\n */\r\n public static canUseCookies(): any {\r\n if (Util._canUseCookies === undefined) {\r\n Util._canUseCookies = false;\r\n\r\n try {\r\n Util._canUseCookies = Util.document.cookie !== undefined;\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.CannotAccessCookie,\r\n \"Cannot access document.cookie - \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n };\r\n }\r\n\r\n return Util._canUseCookies;\r\n }\r\n\r\n /**\r\n * helper method to set userId and sessionId cookie\r\n */\r\n public static setCookie(name, value, domain?) {\r\n var domainAttrib = \"\";\r\n var secureAttrib = \"\";\r\n\r\n if (domain) {\r\n domainAttrib = \";domain=\" + domain;\r\n }\r\n\r\n if (Util.document.location && Util.document.location.protocol === \"https:\") {\r\n secureAttrib = \";secure\";\r\n }\r\n\r\n if (Util.canUseCookies()) {\r\n Util.document.cookie = name + \"=\" + value + domainAttrib + \";path=/\" + secureAttrib;\r\n }\r\n }\r\n\r\n public static stringToBoolOrDefault(str: any, defaultValue = false): boolean {\r\n if (str === undefined || str === null) {\r\n return defaultValue;\r\n }\r\n\r\n return str.toString().toLowerCase() === \"true\";\r\n }\r\n\r\n /**\r\n * helper method to access userId and sessionId cookie\r\n */\r\n public static getCookie(name) {\r\n if (!Util.canUseCookies()) {\r\n return;\r\n }\r\n\r\n var value = \"\";\r\n if (name && name.length) {\r\n var cookieName = name + \"=\";\r\n var cookies = Util.document.cookie.split(\";\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var cookie = cookies[i];\r\n cookie = Util.trim(cookie);\r\n if (cookie && cookie.indexOf(cookieName) === 0) {\r\n value = cookie.substring(cookieName.length, cookies[i].length);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /**\r\n * Deletes a cookie by setting it's expiration time in the past.\r\n * @param name - The name of the cookie to delete.\r\n */\r\n public static deleteCookie(name: string) {\r\n if (Util.canUseCookies()) {\r\n // Setting the expiration date in the past immediately removes the cookie\r\n Util.document.cookie = name + \"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\r\n }\r\n }\r\n\r\n /**\r\n * helper method to trim strings (IE8 does not implement String.prototype.trim)\r\n */\r\n public static trim(str: any): string {\r\n if (typeof str !== \"string\") return str;\r\n return str.replace(/^\\s+|\\s+$/g, \"\");\r\n }\r\n\r\n /**\r\n * generate random id string\r\n */\r\n public static newId(): string {\r\n return UtilHelpers.newId();\r\n }\r\n\r\n /**\r\n * Check if an object is of type Array\r\n */\r\n public static isArray(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Array]\";\r\n }\r\n\r\n /**\r\n * Check if an object is of type Error\r\n */\r\n public static isError(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Error]\";\r\n }\r\n\r\n /**\r\n * Check if an object is of type Date\r\n */\r\n public static isDate(obj: any): boolean {\r\n return Object.prototype.toString.call(obj) === \"[object Date]\";\r\n }\r\n\r\n /**\r\n * Convert a date to I.S.O. format in IE8\r\n */\r\n public static toISOStringForIE8(date: Date) {\r\n if (Util.isDate(date)) {\r\n if (Date.prototype.toISOString) {\r\n return date.toISOString();\r\n } else {\r\n const pad = function(number) {\r\n var r = String(number);\r\n if (r.length === 1) {\r\n r = \"0\" + r;\r\n }\r\n\r\n return r;\r\n }\r\n\r\n return date.getUTCFullYear()\r\n + \"-\" + pad(date.getUTCMonth() + 1)\r\n + \"-\" + pad(date.getUTCDate())\r\n + \"T\" + pad(date.getUTCHours())\r\n + \":\" + pad(date.getUTCMinutes())\r\n + \":\" + pad(date.getUTCSeconds())\r\n + \".\" + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)\r\n + \"Z\";\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets IE version if we are running on IE, or null otherwise\r\n */\r\n public static getIEVersion(userAgentStr: string = null): number {\r\n var myNav = userAgentStr ? userAgentStr.toLowerCase() : navigator.userAgent.toLowerCase();\r\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : null;\r\n }\r\n\r\n /**\r\n * Convert ms to c# time span format\r\n */\r\n public static msToTimeSpan(totalms: number): string {\r\n if (isNaN(totalms) || totalms < 0) {\r\n totalms = 0;\r\n }\r\n\r\n totalms = Math.round(totalms);\r\n\r\n var ms = \"\" + totalms % 1000;\r\n var sec = \"\" + Math.floor(totalms / 1000) % 60;\r\n var min = \"\" + Math.floor(totalms / (1000 * 60)) % 60;\r\n var hour = \"\" + Math.floor(totalms / (1000 * 60 * 60)) % 24;\r\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\r\n\r\n ms = ms.length === 1 ? \"00\" + ms : ms.length === 2 ? \"0\" + ms : ms;\r\n sec = sec.length < 2 ? \"0\" + sec : sec;\r\n min = min.length < 2 ? \"0\" + min : min;\r\n hour = hour.length < 2 ? \"0\" + hour : hour;\r\n\r\n return (days > 0 ? days + \".\" : \"\") + hour + \":\" + min + \":\" + sec + \".\" + ms;\r\n }\r\n\r\n /**\t\t\r\n * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error\t\t\r\n * happens in a script from other domain (cross origin, CORS).\t\t\r\n */\r\n public static isCrossOriginError(message: string, url: string, lineNumber: number, columnNumber: number, error: Error): boolean {\r\n return (message === \"Script error.\" || message === \"Script error\") && !error;\r\n }\r\n\r\n /**\r\n * Returns string representation of an object suitable for diagnostics logging.\r\n */\r\n public static dump(object: any): string {\r\n var objectTypeDump: string = Object.prototype.toString.call(object);\r\n var propertyValueDump: string = JSON.stringify(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\r\n }\r\n\r\n return objectTypeDump + propertyValueDump;\r\n }\r\n\r\n /**\r\n * Returns the name of object if it's an Error. Otherwise, returns empty string.\r\n */\r\n public static getExceptionName(object: any): string {\r\n var objectTypeDump: string = Object.prototype.toString.call(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n return object.name;\r\n }\r\n return \"\";\r\n }\r\n\r\n /**\r\n * Adds an event handler for the specified event\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event \r\n * @return {boolean} - true if the handler was successfully added\r\n */\r\n public static addEventHandler(eventName: string, callback: any): boolean {\r\n if (!window || typeof eventName !== 'string' || typeof callback !== 'function') {\r\n return false;\r\n }\r\n\r\n // Create verb for the event\r\n var verbEventName = 'on' + eventName;\r\n\r\n // check if addEventListener is available\r\n if (window.addEventListener) {\r\n window.addEventListener(eventName, callback, false);\r\n } else if (window[\"attachEvent\"]) { // For older browsers\r\n window[\"attachEvent\"](verbEventName, callback);\r\n } else { // if all else fails\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Tells if a browser supports a Beacon API\r\n */\r\n public static IsBeaconApiSupported(): boolean {\r\n return ('sendBeacon' in navigator && (navigator).sendBeacon);\r\n }\r\n }\r\n\r\n export class UrlHelper {\r\n private static document: any = typeof document !== \"undefined\" ? document : {};\r\n private static htmlAnchorElement: HTMLAnchorElement;\r\n\r\n public static parseUrl(url): HTMLAnchorElement {\r\n if (!UrlHelper.htmlAnchorElement) {\r\n UrlHelper.htmlAnchorElement = !!UrlHelper.document.createElement ? UrlHelper.document.createElement('a') : {};\r\n }\r\n\r\n UrlHelper.htmlAnchorElement.href = url;\r\n\r\n return UrlHelper.htmlAnchorElement;\r\n }\r\n\r\n public static getAbsoluteUrl(url): string {\r\n var result: string;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.href;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static getPathName(url): string {\r\n var result: string;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.pathname;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static getCompleteUrl(method: string, absoluteUrl: string) {\r\n if (method) {\r\n return method.toUpperCase() + \" \" + absoluteUrl;\r\n } else {\r\n return absoluteUrl;\r\n }\r\n }\r\n }\r\n\r\n export class CorrelationIdHelper {\r\n public static correlationIdPrefix = \"cid-v1:\";\r\n\r\n /**\r\n * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers\r\n */\r\n public static canIncludeCorrelationHeader(config: IConfig, requestUrl: string, currentHost: string) {\r\n if (config && config.disableCorrelationHeaders) {\r\n return false;\r\n }\r\n\r\n if (!requestUrl) {\r\n return false;\r\n }\r\n\r\n let requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();\r\n if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) {\r\n return false;\r\n }\r\n\r\n let excludedDomains = config && config.correlationHeaderExcludedDomains;\r\n if (!excludedDomains || excludedDomains.length == 0) {\r\n return true;\r\n }\r\n\r\n for (let i = 0; i < excludedDomains.length; i++) {\r\n let regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\./g, \"\\.\").replace(/\\*/g, \".*\"));\r\n if (regex.test(requestHost)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Combines target appId and target role name from response header.\r\n */\r\n public static getCorrelationContext(responseHeader: string) {\r\n if (responseHeader) {\r\n const correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, RequestHeaders.requestContextTargetKey);\r\n if (correlationId && correlationId !== CorrelationIdHelper.correlationIdPrefix) {\r\n return correlationId;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets key from correlation response header\r\n */\r\n public static getCorrelationContextValue(responseHeader: string, key: string) {\r\n if (responseHeader) {\r\n const keyValues = responseHeader.split(\",\");\r\n for (let i = 0; i < keyValues.length; ++i) {\r\n const keyValue = keyValues[i].split(\"=\");\r\n if (keyValue.length == 2 && keyValue[0] == key) {\r\n return keyValue[1];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n /**\r\n * Enum is used in aiDataContract to describe how fields are serialized. \r\n * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array\r\n */\r\n export enum FieldType { Default = 0, Required = 1, Array = 2, Hidden = 4 };\r\n\r\n export class Serializer {\r\n\r\n /**\r\n * Serializes the current object to a JSON string.\r\n */\r\n public static serialize(input: ISerializable): string {\r\n var output = Serializer._serializeObject(input, \"root\");\r\n return JSON.stringify(output);\r\n }\r\n\r\n private static _serializeObject(source: ISerializable, name: string): any {\r\n var circularReferenceCheck = \"__aiCircularRefCheck\";\r\n var output = {};\r\n\r\n if (!source) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, \"cannot serialize object because it is null or undefined\", { name: name }, true);\r\n return output;\r\n }\r\n\r\n if (source[circularReferenceCheck]) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CircularReferenceDetected, \"Circular reference detected while serializing object\", { name: name }, true);\r\n return output;\r\n }\r\n\r\n if (!source.aiDataContract) {\r\n // special case for measurements/properties/tags\r\n if (name === \"measurements\") {\r\n output = Serializer._serializeStringMap(source, \"number\", name);\r\n } else if (name === \"properties\") {\r\n output = Serializer._serializeStringMap(source, \"string\", name);\r\n } else if (name === \"tags\") {\r\n output = Serializer._serializeStringMap(source, \"string\", name);\r\n } else if (Util.isArray(source)) {\r\n output = Serializer._serializeArray(source, name);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, \"Attempting to serialize an object which does not implement ISerializable\", { name: name }, true);\r\n\r\n try {\r\n // verify that the object can be stringified\r\n JSON.stringify(source);\r\n output = source;\r\n } catch (e) {\r\n // if serialization fails return an empty string\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSerializeObject, (e && typeof e.toString === 'function') ? e.toString() : \"Error serializing object\", null, true);\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n \r\n source[circularReferenceCheck] = true;\r\n for (var field in source.aiDataContract) {\r\n\r\n var contract = source.aiDataContract[field];\r\n var isRequired = (typeof contract === \"function\") ? (contract() & FieldType.Required) : (contract & FieldType.Required);\r\n var isHidden = (typeof contract === \"function\") ? (contract() & FieldType.Hidden) : (contract & FieldType.Hidden);\r\n var isArray = contract & FieldType.Array;\r\n\r\n var isPresent = source[field] !== undefined;\r\n var isObject = typeof source[field] === \"object\" && source[field] !== null;\r\n\r\n if (isRequired && !isPresent && !isArray) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MissingRequiredFieldSpecification,\r\n \"Missing required field specification. The field is required but not present on source\",\r\n { field: field, name: name });\r\n\r\n // If not in debug mode, continue and hope the error is permissible\r\n continue;\r\n }\r\n\r\n if (isHidden) {\r\n // Don't serialize hidden fields\r\n continue;\r\n }\r\n\r\n var value;\r\n if (isObject) {\r\n if (isArray) {\r\n // special case; resurse on each object in the source array\r\n value = Serializer._serializeArray(source[field], field);\r\n } else {\r\n // recurse on the source object in this field\r\n value = Serializer._serializeObject(source[field], field);\r\n }\r\n } else {\r\n // assign the source field to the output even if undefined or required\r\n value = source[field];\r\n }\r\n\r\n // only emit this field if the value is defined\r\n if (value !== undefined) {\r\n output[field] = value;\r\n }\r\n }\r\n\r\n delete source[circularReferenceCheck];\r\n return output;\r\n }\r\n\r\n private static _serializeArray(sources: Array, name: string): Array {\r\n var output = undefined;\r\n\r\n if (!!sources) {\r\n if (!Util.isArray(sources)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.ItemNotInArray,\r\n \"This field was specified as an array in the contract but the item is not an array.\\r\\n\",\r\n { name: name }, true);\r\n } else {\r\n output = [];\r\n for (var i = 0; i < sources.length; i++) {\r\n var source = sources[i];\r\n var item = Serializer._serializeObject(source, name + \"[\" + i + \"]\");\r\n output.push(item);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n\r\n private static _serializeStringMap(map, expectedType, name) {\r\n var output = undefined;\r\n if (map) {\r\n output = {};\r\n for (var field in map) {\r\n var value = map[field];\r\n if (expectedType === \"string\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n } else if (value === null) {\r\n output[field] = \"null\";\r\n } else if (!value.toString) {\r\n output[field] = \"invalid field: toString() is not defined.\";\r\n }\r\n else {\r\n output[field] = value.toString();\r\n }\r\n }\r\n else if (expectedType === \"number\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n } else if (value === null) {\r\n output[field] = \"null\";\r\n } else {\r\n var num = parseFloat(value);\r\n if (isNaN(num)) {\r\n output[field] = \"NaN\";\r\n }\r\n else {\r\n output[field] = num;\r\n }\r\n }\r\n }\r\n else {\r\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, output[field], null, true);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class Envelope extends Microsoft.Telemetry.Envelope implements IEnvelope {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract;\r\n\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n constructor(data: Microsoft.Telemetry.Base, name: string) {\r\n super();\r\n\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n this.data = data;\r\n this.time = Util.toISOStringForIE8(new Date());\r\n\r\n this.aiDataContract = {\r\n time: FieldType.Required,\r\n iKey: FieldType.Required,\r\n name: FieldType.Required,\r\n sampleRate: () => {\r\n return (this.sampleRate == 100) ? FieldType.Hidden : FieldType.Required;\r\n },\r\n tags: FieldType.Required,\r\n data: FieldType.Required\r\n };\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n\r\n export class Base extends Microsoft.Telemetry.Base implements ISerializable {\r\n \r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {};\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n export class ContextTagKeys\r\n {\r\n \r\n /**\r\n * Application version. Information in the application context fields is always about the application that is sending the telemetry.\r\n */\r\n public applicationVersion: string;\r\n \r\n /**\r\n * Application build.\r\n */\r\n public applicationBuild: string;\r\n \r\n /**\r\n * Application type id.\r\n */\r\n public applicationTypeId: string;\r\n \r\n /**\r\n * Application id.\r\n */\r\n public applicationId: string;\r\n \r\n /**\r\n * Application layer.\r\n */\r\n public applicationLayer: string;\r\n \r\n /**\r\n * Unique client device id. Computer name in most cases.\r\n */\r\n public deviceId: string;\r\n public deviceIp: string;\r\n public deviceLanguage: string;\r\n \r\n /**\r\n * Device locale using - pattern, following RFC 5646. Example 'en-US'.\r\n */\r\n public deviceLocale: string;\r\n \r\n /**\r\n * Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.\r\n */\r\n public deviceModel: string;\r\n public deviceFriendlyName: string;\r\n public deviceNetwork: string;\r\n public deviceNetworkName: string;\r\n \r\n /**\r\n * Client device OEM name taken from the browser.\r\n */\r\n public deviceOEMName: string;\r\n public deviceOS: string;\r\n \r\n /**\r\n * Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'\r\n */\r\n public deviceOSVersion: string;\r\n \r\n /**\r\n * Name of the instance where application is running. Computer name for on-premisis, instance name for Azure.\r\n */\r\n public deviceRoleInstance: string;\r\n \r\n /**\r\n * Name of the role application is part of. Maps directly to the role name in azure.\r\n */\r\n public deviceRoleName: string;\r\n public deviceScreenResolution: string;\r\n \r\n /**\r\n * The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.\r\n */\r\n public deviceType: string;\r\n public deviceMachineName: string;\r\n public deviceVMName: string;\r\n public deviceBrowser: string;\r\n \r\n /**\r\n * The browser name and version as reported by the browser.\r\n */\r\n public deviceBrowserVersion: string;\r\n \r\n /**\r\n * The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationIp: string;\r\n \r\n /**\r\n * The country of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationCountry: string;\r\n \r\n /**\r\n * The province/state of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationProvince: string;\r\n \r\n /**\r\n * The city of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.\r\n */\r\n public locationCity: string;\r\n \r\n /**\r\n * A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.\r\n */\r\n public operationId: string;\r\n \r\n /**\r\n * The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').\r\n */\r\n public operationName: string;\r\n \r\n /**\r\n * The unique identifier of the telemetry item's immediate parent.\r\n */\r\n public operationParentId: string;\r\n public operationRootId: string;\r\n \r\n /**\r\n * Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.\r\n */\r\n public operationSyntheticSource: string;\r\n \r\n /**\r\n * The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.\r\n */\r\n public operationCorrelationVector: string;\r\n \r\n /**\r\n * Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.\r\n */\r\n public sessionId: string;\r\n \r\n /**\r\n * Boolean value indicating whether the session identified by ai.session.id is first for the user or not.\r\n */\r\n public sessionIsFirst: string;\r\n public sessionIsNew: string;\r\n public userAccountAcquisitionDate: string;\r\n \r\n /**\r\n * In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.\r\n */\r\n public userAccountId: string;\r\n \r\n /**\r\n * The browser's user agent string as reported by the browser. This property will be used to extract informaiton regarding the customer's browser but will not be stored. Use custom properties to store the original user agent.\r\n */\r\n public userAgent: string;\r\n \r\n /**\r\n * Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.\r\n */\r\n public userId: string;\r\n \r\n /**\r\n * Store region for UWP applications.\r\n */\r\n public userStoreRegion: string;\r\n \r\n /**\r\n * Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.\r\n */\r\n public userAuthUserId: string;\r\n public userAnonymousUserAcquisitionDate: string;\r\n public userAuthenticatedUserAcquisitionDate: string;\r\n public cloudName: string;\r\n \r\n /**\r\n * Name of the role the application is a part of. Maps directly to the role name in azure.\r\n */\r\n public cloudRole: string;\r\n public cloudRoleVer: string;\r\n \r\n /**\r\n * Name of the instance where the application is running. Computer name for on-premisis, instance name for Azure.\r\n */\r\n public cloudRoleInstance: string;\r\n public cloudEnvironment: string;\r\n public cloudLocation: string;\r\n public cloudDeploymentUnit: string;\r\n \r\n /**\r\n * SDK version. See https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.\r\n */\r\n public internalSdkVersion: string;\r\n \r\n /**\r\n * Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.\r\n */\r\n public internalAgentVersion: string;\r\n \r\n /**\r\n * This is the node name used for billing purposes. Use it to override the standard detection of nodes.\r\n */\r\n public internalNodeName: string;\r\n \r\n constructor()\r\n {\r\n this.applicationVersion = \"ai.application.ver\";\r\n this.applicationBuild = \"ai.application.build\";\r\n this.applicationTypeId = \"ai.application.typeId\";\r\n this.applicationId = \"ai.application.applicationId\";\r\n this.applicationLayer = \"ai.application.layer\";\r\n this.deviceId = \"ai.device.id\";\r\n this.deviceIp = \"ai.device.ip\";\r\n this.deviceLanguage = \"ai.device.language\";\r\n this.deviceLocale = \"ai.device.locale\";\r\n this.deviceModel = \"ai.device.model\";\r\n this.deviceFriendlyName = \"ai.device.friendlyName\";\r\n this.deviceNetwork = \"ai.device.network\";\r\n this.deviceNetworkName = \"ai.device.networkName\";\r\n this.deviceOEMName = \"ai.device.oemName\";\r\n this.deviceOS = \"ai.device.os\";\r\n this.deviceOSVersion = \"ai.device.osVersion\";\r\n this.deviceRoleInstance = \"ai.device.roleInstance\";\r\n this.deviceRoleName = \"ai.device.roleName\";\r\n this.deviceScreenResolution = \"ai.device.screenResolution\";\r\n this.deviceType = \"ai.device.type\";\r\n this.deviceMachineName = \"ai.device.machineName\";\r\n this.deviceVMName = \"ai.device.vmName\";\r\n this.deviceBrowser = \"ai.device.browser\";\r\n this.deviceBrowserVersion = \"ai.device.browserVersion\";\r\n this.locationIp = \"ai.location.ip\";\r\n this.locationCountry = \"ai.location.country\";\r\n this.locationProvince = \"ai.location.province\";\r\n this.locationCity = \"ai.location.city\";\r\n this.operationId = \"ai.operation.id\";\r\n this.operationName = \"ai.operation.name\";\r\n this.operationParentId = \"ai.operation.parentId\";\r\n this.operationRootId = \"ai.operation.rootId\";\r\n this.operationSyntheticSource = \"ai.operation.syntheticSource\";\r\n this.operationCorrelationVector = \"ai.operation.correlationVector\";\r\n this.sessionId = \"ai.session.id\";\r\n this.sessionIsFirst = \"ai.session.isFirst\";\r\n this.sessionIsNew = \"ai.session.isNew\";\r\n this.userAccountAcquisitionDate = \"ai.user.accountAcquisitionDate\";\r\n this.userAccountId = \"ai.user.accountId\";\r\n this.userAgent = \"ai.user.userAgent\";\r\n this.userId = \"ai.user.id\";\r\n this.userStoreRegion = \"ai.user.storeRegion\";\r\n this.userAuthUserId = \"ai.user.authUserId\";\r\n this.userAnonymousUserAcquisitionDate = \"ai.user.anonUserAcquisitionDate\";\r\n this.userAuthenticatedUserAcquisitionDate = \"ai.user.authUserAcquisitionDate\";\r\n this.cloudName = \"ai.cloud.name\";\r\n this.cloudRole = \"ai.cloud.role\";\r\n this.cloudRoleVer = \"ai.cloud.roleVer\";\r\n this.cloudRoleInstance = \"ai.cloud.roleInstance\";\r\n this.cloudEnvironment = \"ai.cloud.environment\";\r\n this.cloudLocation = \"ai.cloud.location\";\r\n this.cloudDeploymentUnit = \"ai.cloud.deploymentUnit\";\r\n this.internalSdkVersion = \"ai.internal.sdkVersion\";\r\n this.internalAgentVersion = \"ai.internal.agentVersion\";\r\n this.internalNodeName = \"ai.internal.nodeName\";\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Application implements IApplication {\r\n /**\r\n * The application version.\r\n */\r\n public ver: string;\r\n\r\n /**\r\n * The application build version.\r\n */\r\n public build: string;\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Device implements IDevice {\r\n\r\n /**\r\n * The type for the current device.\r\n */\r\n public type: string;\r\n\r\n /**\r\n * A device unique ID.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * The device OEM for the current device.\r\n */\r\n public oemName: string;\r\n\r\n /**\r\n * The device model for the current device.\r\n */\r\n public model: string;\r\n\r\n /**\r\n * The IANA interface type for the internet connected network adapter.\r\n */\r\n public network: number;\r\n\r\n /**\r\n * The application screen resolution.\r\n */\r\n public resolution: string;\r\n\r\n /**\r\n * The current display language of the operating system.\r\n */\r\n public locale: string;\r\n \r\n /**\r\n * The IP address.\r\n */\r\n public ip: string;\r\n\r\n /**\r\n * The device language.\r\n */\r\n public language: string;\r\n\r\n /**\r\n * The OS name.\r\n */\r\n public os: string;\r\n\r\n /**\r\n * The OS version.\r\n */\r\n public osversion: string;\r\n\r\n /**\r\n * Constructs a new instance of the Device class\r\n */\r\n constructor() {\r\n // don't attempt to fingerprint browsers\r\n this.id = \"browser\";\r\n\r\n // Device type is a dimension in our data platform\r\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\r\n this.type = \"Browser\";\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Internal implements IInternal {\r\n\r\n /**\r\n * The SDK version used to create this telemetry item.\r\n */\r\n public sdkVersion: string;\r\n\r\n /**\r\n * The SDK agent version.\r\n */\r\n public agentVersion: string;\r\n\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n constructor(config: ITelemetryConfig) {\r\n this.sdkVersion = (config.sdkExtension() ? config.sdkExtension() + \"_\" : \"\") + \"javascript:\" + Version;\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Location implements ILocation {\r\n\r\n /**\r\n * Client IP address for reverse lookup\r\n */\r\n public ip: string;\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Operation implements IOperation {\r\n\r\n public id: string;\r\n public name: string;\r\n public parentId: string;\r\n public rootId: string;\r\n public syntheticSource: string;\r\n\r\n constructor() {\r\n this.id = Util.newId();\r\n if (window && window.location && window.location.pathname) {\r\n this.name = window.location.pathname;\r\n }\r\n }\r\n }\r\n} ","module Microsoft.ApplicationInsights {\r\n export class HashCodeScoreGenerator {\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n public static INT_MAX_VALUE: number = 2147483647;\r\n\r\n // (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\r\n private static MIN_INPUT_LENGTH: number = 8;\r\n\r\n public getHashCodeScore(key: string): number {\r\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\r\n return score * 100;\r\n }\r\n\r\n public getHashCode(input: string): number {\r\n if (input == \"\") { return 0; }\r\n\r\n while (input.length < HashCodeScoreGenerator.MIN_INPUT_LENGTH) {\r\n input = input.concat(input);\r\n }\r\n\r\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\r\n var hash: number = 5381;\r\n\r\n for (var i: number = 0; i < input.length; ++i) {\r\n hash = ((hash << 5) + hash) + input.charCodeAt(i);\r\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\r\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\r\n hash = hash & hash;\r\n }\r\n\r\n return Math.abs(hash);\r\n }\r\n }\r\n} ","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n export class SamplingScoreGenerator {\r\n private hashCodeGeneragor: HashCodeScoreGenerator;\r\n\r\n constructor() {\r\n this.hashCodeGeneragor = new HashCodeScoreGenerator();\r\n }\r\n\r\n public getSamplingScore(envelope: Microsoft.ApplicationInsights.IEnvelope): number {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n var score: number = 0;\r\n if (envelope.tags[tagKeys.userId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.userId]);\r\n } else if (envelope.tags[tagKeys.operationId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.operationId]);\r\n } else {\r\n score = Math.random()\r\n }\r\n\r\n return score;\r\n }\r\n }\r\n} ","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class Sample implements ISample {\r\n public sampleRate: number;\r\n private samplingScoreGenerator: SamplingScoreGenerator;\r\n\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n public INT_MAX_VALUE: number = 2147483647;\r\n\r\n constructor(sampleRate: number) {\r\n if (sampleRate > 100 || sampleRate < 0) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SampleRateOutOfRange,\r\n \"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.\",\r\n { samplingRate: sampleRate }, true);\r\n this.sampleRate = 100;\r\n }\r\n\r\n this.sampleRate = sampleRate;\r\n this.samplingScoreGenerator = new SamplingScoreGenerator();\r\n }\r\n\r\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */\r\n public isSampledIn(envelope: Microsoft.ApplicationInsights.IEnvelope): boolean {\r\n if (this.sampleRate == 100) return true;\r\n\r\n var score = this.samplingScoreGenerator.getSamplingScore(envelope);\r\n\r\n return score < this.sampleRate;\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export interface ISessionConfig {\r\n sessionRenewalMs: () => number;\r\n sessionExpirationMs: () => number;\r\n cookieDomain: () => string;\r\n }\r\n\r\n export class Session implements ISession {\r\n /**\r\n * The session ID.\r\n */\r\n public id: string;\r\n\r\n /** \r\n * The true if this is the first session \r\n */\r\n public isFirst: boolean;\r\n\r\n /**\r\n * The date at which this guid was genereated.\r\n * Per the spec the ID will be regenerated if more than acquisitionSpan milliseconds ellapse from this time.\r\n */\r\n public acquisitionDate: number;\r\n\r\n /**\r\n * The date at which this session ID was last reported.\r\n * This value should be updated whenever telemetry is sent using this ID.\r\n * Per the spec the ID will be regenerated if more than renewalSpan milliseconds elapse from this time with no activity.\r\n */\r\n public renewalDate: number;\r\n }\r\n\r\n export class _SessionManager {\r\n\r\n public static acquisitionSpan = 86400000; // 24 hours in ms\r\n public static renewalSpan = 1800000; // 30 minutes in ms\r\n public static cookieUpdateInterval = 60000 // 1 minute in ms\r\n public automaticSession: Session;\r\n public config: ISessionConfig;\r\n\r\n private cookieUpdatedTimestamp: number;\r\n\r\n constructor(config: ISessionConfig) {\r\n\r\n if (!config) {\r\n config = {};\r\n }\r\n\r\n if (!(typeof config.sessionExpirationMs === \"function\")) {\r\n config.sessionExpirationMs = () => _SessionManager.acquisitionSpan;\r\n }\r\n\r\n if (!(typeof config.sessionRenewalMs === \"function\")) {\r\n config.sessionRenewalMs = () => _SessionManager.renewalSpan;\r\n }\r\n\r\n this.config = config;\r\n\r\n this.automaticSession = new Session();\r\n }\r\n\r\n public update() {\r\n if (!this.automaticSession.id) {\r\n this.initializeAutomaticSession();\r\n }\r\n\r\n var now = dateTime.Now();\r\n\r\n var acquisitionExpired = now - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs();\r\n var renewalExpired = now - this.automaticSession.renewalDate > this.config.sessionRenewalMs();\r\n\r\n // renew if acquisitionSpan or renewalSpan has ellapsed\r\n if (acquisitionExpired || renewalExpired) {\r\n // update automaticSession so session state has correct id \r\n this.automaticSession.isFirst = undefined;\r\n this.renew();\r\n } else {\r\n // do not update the cookie more often than cookieUpdateInterval\r\n if (!this.cookieUpdatedTimestamp || now - this.cookieUpdatedTimestamp > _SessionManager.cookieUpdateInterval) {\r\n this.automaticSession.renewalDate = now;\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\r\n public backup() {\r\n this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n\r\n /**\r\n * Use ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n */\r\n private initializeAutomaticSession() {\r\n var cookie = Util.getCookie('ai_session');\r\n if (cookie && typeof cookie.split === \"function\") {\r\n this.initializeAutomaticSessionWithData(cookie);\r\n } else {\r\n // There's no cookie, but we might have session data in local storage\r\n // This can happen if the session expired or the user actively deleted the cookie\r\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\r\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\r\n var storage = Util.getStorage('ai_session');\r\n if (storage) {\r\n this.initializeAutomaticSessionWithData(storage);\r\n }\r\n }\r\n\r\n if (!this.automaticSession.id) {\r\n this.automaticSession.isFirst = true;\r\n this.renew();\r\n }\r\n }\r\n\r\n /**\r\n * Extract id, aquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param {string} sessionData - The string stored in an ai_session cookie or local storage backup\r\n */\r\n private initializeAutomaticSessionWithData(sessionData: string) {\r\n var params = sessionData.split(\"|\");\r\n\r\n if (params.length > 0) {\r\n this.automaticSession.id = params[0];\r\n }\r\n\r\n try {\r\n if (params.length > 1) {\r\n var acq = +params[1];\r\n this.automaticSession.acquisitionDate = +new Date(acq);\r\n this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0;\r\n }\r\n\r\n if (params.length > 2) {\r\n var renewal = +params[2];\r\n this.automaticSession.renewalDate = +new Date(renewal);\r\n this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0;\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n\r\n _InternalMessageId.ErrorParsingAISessionCookie,\r\n \"Error parsing ai_session cookie, session will be reset: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n\r\n if (this.automaticSession.renewalDate == 0) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SessionRenewalDateIsZero,\r\n \"AI session renewal date is 0, session will be reset.\");\r\n }\r\n }\r\n\r\n private renew() {\r\n var now = dateTime.Now();\r\n\r\n this.automaticSession.id = Util.newId();\r\n this.automaticSession.acquisitionDate = now;\r\n this.automaticSession.renewalDate = now;\r\n\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n\r\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\r\n if (!Util.canUseLocalStorage()) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.BrowserDoesNotSupportLocalStorage,\r\n \"Browser does not support local storage. Session durations will be inaccurate.\");\r\n }\r\n }\r\n\r\n private setCookie(guid: string, acq: number, renewal: number) {\r\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\r\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\r\n var acquisitionExpiry = acq + this.config.sessionExpirationMs();\r\n var renewalExpiry = renewal + this.config.sessionRenewalMs();\r\n var cookieExpiry = new Date();\r\n var cookie = [guid, acq, renewal];\r\n\r\n if (acquisitionExpiry < renewalExpiry) {\r\n cookieExpiry.setTime(acquisitionExpiry);\r\n } else {\r\n cookieExpiry.setTime(renewalExpiry);\r\n }\r\n\r\n var cookieDomnain = this.config.cookieDomain ? this.config.cookieDomain() : null;\r\n\r\n Util.setCookie('ai_session', cookie.join('|') + ';expires=' + cookieExpiry.toUTCString(), cookieDomnain);\r\n\r\n this.cookieUpdatedTimestamp = dateTime.Now();\r\n }\r\n\r\n private setStorage(guid: string, acq: number, renewal: number) {\r\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\r\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\r\n // The server will notice this and end the sessions itself, with loss of accurate session duration\r\n Util.setStorage('ai_session', [guid, acq, renewal].join('|'));\r\n }\r\n }\r\n} ","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Context {\r\n\r\n \"use strict\";\r\n\r\n export class User implements IUser {\r\n\r\n static cookieSeparator: string = '|';\r\n static userCookieName: string = 'ai_user';\r\n static authUserCookieName: string = 'ai_authUser';\r\n\r\n /**\r\n * The telemetry configuration.\r\n */\r\n public config: ITelemetryConfig;\r\n\r\n /**\r\n * The user ID.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * Authenticated user id\r\n */\r\n public authenticatedId: string;\r\n\r\n /**\r\n * The account ID.\r\n */\r\n public accountId: string;\r\n\r\n /**\r\n * The account acquisition date.\r\n */\r\n public accountAcquisitionDate: string;\r\n\r\n /**\r\n * The user agent string.\r\n */\r\n public agent: string;\r\n\r\n /**\r\n * The store region.\r\n */\r\n public storeRegion: string;\r\n\r\n /**\r\n * Sets the authenticated user id and the account id in this session.\r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false) {\r\n\r\n // Validate inputs to ensure no cookie control characters.\r\n var isInvalidInput = !this.validateUserInput(authenticatedUserId) || (accountId && !this.validateUserInput(accountId));\r\n if (isInvalidInput) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailedAccountName,\r\n \"Setting auth user context failed. \" +\r\n \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\",\r\n true);\r\n return;\r\n }\r\n\r\n // Create cookie string.\r\n this.authenticatedId = authenticatedUserId;\r\n var authCookie = this.authenticatedId;\r\n if (accountId) {\r\n this.accountId = accountId;\r\n authCookie = [this.authenticatedId, this.accountId].join(User.cookieSeparator);\r\n }\r\n\r\n if (storeInCookie) {\r\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\r\n // Encoding the cookie to handle unexpected unicode characters.\r\n Util.setCookie(User.authUserCookieName, encodeURI(authCookie), this.config.cookieDomain());\r\n }\r\n }\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {} \r\n */\r\n public clearAuthenticatedUserContext() {\r\n this.authenticatedId = null;\r\n this.accountId = null;\r\n Util.deleteCookie(User.authUserCookieName);\r\n }\r\n\r\n constructor(config: ITelemetryConfig) {\r\n\r\n //get userId or create new one if none exists\r\n var cookie = Util.getCookie(User.userCookieName);\r\n if (cookie) {\r\n var params = cookie.split(User.cookieSeparator);\r\n if (params.length > 0) {\r\n this.id = params[0];\r\n }\r\n }\r\n\r\n this.config = config;\r\n\r\n if (!this.id) {\r\n this.id = Util.newId();\r\n var date = new Date();\r\n var acqStr = Util.toISOStringForIE8(date);\r\n this.accountAcquisitionDate = acqStr;\r\n // without expiration, cookies expire at the end of the session\r\n // set it to 365 days from now\r\n // 365 * 24 * 60 * 60 * 1000 = 31536000000 \r\n date.setTime(date.getTime() + 31536000000);\r\n var newCookie = [this.id, acqStr];\r\n var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : undefined;\r\n\r\n Util.setCookie(User.userCookieName, newCookie.join(User.cookieSeparator) + ';expires=' + date.toUTCString(), cookieDomain);\r\n\r\n // If we have an ai_session in local storage this means the user actively removed our cookies.\r\n // We should respect their wishes and clear ourselves from local storage\r\n Util.removeStorage('ai_session');\r\n }\r\n\r\n // We still take the account id from the ctor param for backward compatibility. \r\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\r\n this.accountId = config.accountId ? config.accountId() : undefined;\r\n\r\n // Get the auth user id and account id from the cookie if exists\r\n // Cookie is in the pattern: |\r\n var authCookie = Util.getCookie(User.authUserCookieName);\r\n if (authCookie) {\r\n authCookie = decodeURI(authCookie);\r\n var authCookieString = authCookie.split(User.cookieSeparator);\r\n if (authCookieString[0]) {\r\n this.authenticatedId = authCookieString[0];\r\n }\r\n if (authCookieString.length > 1 && authCookieString[1]) {\r\n this.accountId = authCookieString[1];\r\n }\r\n }\r\n }\r\n\r\n private validateUserInput(id: string): boolean {\r\n // Validate:\r\n // 1. Id is a non-empty string.\r\n // 2. It does not contain special characters for cookies.\r\n if (typeof id !== 'string' ||\r\n !id ||\r\n id.match(/,|;|=| |\\|/)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class extensions {\r\n public static IsNullOrUndefined(obj) {\r\n return typeof (obj) === \"undefined\" || obj === null;\r\n }\r\n }\r\n\r\n export class stringUtils {\r\n public static GetLength(strObject) {\r\n var res = 0;\r\n if (!extensions.IsNullOrUndefined(strObject)) {\r\n var stringified = \"\";\r\n try {\r\n stringified = strObject.toString();\r\n } catch (ex) {\r\n // some troubles with complex object\r\n }\r\n\r\n res = stringified.length;\r\n res = isNaN(res) ? 0 : res;\r\n }\r\n\r\n return res;\r\n }\r\n }\r\n\r\n export class dateTime {\r\n ///Return the number of milliseconds since 1970/01/01 in local timezon\r\n public static Now = (window.performance && window.performance.now && window.performance.timing) ?\r\n function () {\r\n return window.performance.now() + window.performance.timing.navigationStart;\r\n }\r\n :\r\n function () {\r\n return new Date().getTime();\r\n }\r\n\r\n ///Gets duration between two timestamps\r\n public static GetDuration = function (start: number, end: number): number {\r\n var result = null;\r\n if (start !== 0 && end !== 0 && !extensions.IsNullOrUndefined(start) && !extensions.IsNullOrUndefined(end)) {\r\n result = end - start;\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n export class EventHelper {\r\n ///Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n ///Object to which \r\n ///String that specifies any of the standard DHTML Events without \"on\" prefix\r\n ///Pointer that specifies the function to call when event fires\r\n ///True if the function was bound successfully to the event, otherwise false\r\n public static AttachEvent(obj, eventNameWithoutOn, handlerRef) {\r\n var result = false;\r\n if (!extensions.IsNullOrUndefined(obj)) {\r\n if (!extensions.IsNullOrUndefined(obj.attachEvent)) {\r\n // IE before version 9 \r\n obj.attachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n result = true;\r\n }\r\n else {\r\n if (!extensions.IsNullOrUndefined(obj.addEventListener)) {\r\n // all browsers except IE before version 9\r\n obj.addEventListener(eventNameWithoutOn, handlerRef, false);\r\n result = true;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static DetachEvent(obj, eventNameWithoutOn, handlerRef) {\r\n if (!extensions.IsNullOrUndefined(obj)) {\r\n if (!extensions.IsNullOrUndefined(obj.detachEvent)) {\r\n obj.detachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n }\r\n else {\r\n if (!extensions.IsNullOrUndefined(obj.removeEventListener)) {\r\n obj.removeEventListener(eventNameWithoutOn, handlerRef, false);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class AjaxHelper {\r\n public static ParseDependencyPath(absoluteUrl: string, method: string, pathName: string) {\r\n var target, name; \r\n if (absoluteUrl && absoluteUrl.length > 0) {\r\n var parsedUrl: HTMLAnchorElement = UrlHelper.parseUrl(absoluteUrl)\r\n target = parsedUrl.host;\r\n if (parsedUrl.pathname != null) {\r\n var pathName: string = (parsedUrl.pathname.length === 0) ? \"/\" : parsedUrl.pathname;\r\n if (pathName.charAt(0) !== '/') {\r\n pathName = \"/\" + pathName;\r\n }\r\n\r\n name = Telemetry.Common.DataSanitizer.sanitizeString(method ? method + \" \" + pathName : pathName);\r\n } else {\r\n name = Telemetry.Common.DataSanitizer.sanitizeString(absoluteUrl);\r\n }\r\n } else {\r\n target = pathName;\r\n name = pathName;\r\n }\r\n\r\n return {\r\n target: target, \r\n name: name\r\n };\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class XHRMonitoringState {\r\n public openDone: boolean = false;\r\n public setRequestHeaderDone: boolean = false;\r\n public sendDone: boolean = false;\r\n public abortDone: boolean = false;\r\n\r\n //True, if onreadyStateChangeCallback function attached to xhr, otherwise false\r\n public onreadystatechangeCallbackAttached = false;\r\n }\r\n\r\n export class ajaxRecord {\r\n public completed = false;\r\n public requestHeadersSize = null;\r\n public ttfb = null;\r\n public responseReceivingDuration = null;\r\n public callbackDuration = null;\r\n public ajaxTotalDuration = null;\r\n public aborted = null;\r\n public pageUrl = null;\r\n public requestUrl = null;\r\n public requestSize = 0;\r\n public method = null;\r\n\r\n ///Returns the HTTP status code.\r\n public status = null; \r\n \r\n //The timestamp when open method was invoked\r\n public requestSentTime = null;\r\n\r\n //The timestamps when first byte was received\r\n public responseStartedTime = null;\r\n\r\n //The timestamp when last byte was received\r\n public responseFinishedTime = null;\r\n\r\n //The timestamp when onreadystatechange callback in readyState 4 finished\r\n public callbackFinishedTime = null;\r\n \r\n //The timestamp at which ajax was ended\r\n public endTime = null;\r\n\r\n //The original xhr onreadystatechange event\r\n public originalOnreadystatechage = null;\r\n\r\n public xhrMonitoringState: XHRMonitoringState = new XHRMonitoringState();\r\n\r\n //Determines whether or not JavaScript exception occured in xhr.onreadystatechange code. 1 if occured, otherwise 0.\r\n public clientFailure = 0;\r\n\r\n\r\n public id: string;\r\n\r\n constructor(id: string) {\r\n this.id = id;\r\n }\r\n\r\n\r\n public getAbsoluteUrl() {\r\n return this.requestUrl ? UrlHelper.getAbsoluteUrl(this.requestUrl) : null;\r\n }\r\n\r\n public getPathName() {\r\n return this.requestUrl ? Telemetry.Common.DataSanitizer.sanitizeUrl(UrlHelper.getCompleteUrl(this.method, this.requestUrl)): null;\r\n }\r\n\r\n public CalculateMetrics = function () {\r\n var self = this;\r\n // round to 3 decimal points\r\n self.ajaxTotalDuration = Math.round(dateTime.GetDuration(self.requestSentTime, self.responseFinishedTime)*1000)/1000;\r\n }\r\n };\r\n}; \r\n\r\n","module Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export class RequestHeaders {\r\n /**\r\n * Request-Context header\r\n */\r\n public static requestContextHeader = \"Request-Context\";\r\n\r\n /**\r\n * Target instrumentation header that is added to the response and retrieved by the\r\n * calling application when processing incoming responses.\r\n */\r\n public static requestContextTargetKey = \"appId\";\r\n\r\n /**\r\n * Request-Context appId format\r\n */\r\n public static requestContextAppIdFormat = \"appId=cid-v1:\";\r\n\r\n /**\r\n * Request-Id header\r\n */\r\n public static requestIdHeader = \"Request-Id\";\r\n\r\n /**\r\n * Sdk-Context header\r\n * If this header passed with appId in content then appId will be returned back by the backend.\r\n */\r\n public static sdkContextHeader = \"Sdk-Context\";\r\n\r\n /**\r\n * String to pass in header for requesting appId back from the backend.\r\n */\r\n public static sdkContextHeaderAppIdRequest = \"appId\";\r\n\r\n public static requestContextHeaderLowerCase = \"request-context\";\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * The abstract common base of all domains.\r\n */\r\n export class Domain\r\n {\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.\r\n */\r\n export class EventData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.\r\n */\r\n export class PageViewData extends AI.EventData\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Request URL with all query string parameters\r\n */\r\n public url: string;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Identifier of a page view instance. Used for correlation between page view and other telemetry items.\r\n */\r\n public id: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.\r\n */\r\n export class RemoteDependencyData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call.\r\n */\r\n public id: string;\r\n \r\n /**\r\n * Result code of a dependency call. Examples are SQL error code and HTTP status code.\r\n */\r\n public resultCode: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Indication of successfull or unsuccessfull call.\r\n */\r\n public success: boolean;\r\n \r\n /**\r\n * Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.\r\n */\r\n public data: string;\r\n \r\n /**\r\n * Target site of a dependency call. Examples are server name, host address.\r\n */\r\n public target: string;\r\n \r\n /**\r\n * Dependency type name. Very low cardinality value for logical grouping of dependencies and interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP.\r\n */\r\n public type: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.success = true;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n\r\n export class DataSanitizer {\r\n\r\n /**\r\n * Max length allowed for custom names.\r\n */\r\n private static MAX_NAME_LENGTH = 150;\r\n\r\n /**\r\n * Max length allowed for Id field in page views.\r\n */\r\n private static MAX_ID_LENGTH = 128;\r\n\r\n /**\r\n * Max length allowed for custom values.\r\n */\r\n private static MAX_PROPERTY_LENGTH = 8192;\r\n\r\n /**\r\n * Max length allowed for names\r\n */\r\n private static MAX_STRING_LENGTH = 1024;\r\n\r\n /**\r\n * Max length allowed for url.\r\n */\r\n private static MAX_URL_LENGTH = 2048;\r\n\r\n /**\r\n * Max length allowed for messages.\r\n */\r\n private static MAX_MESSAGE_LENGTH = 32768;\r\n\r\n /**\r\n * Max length allowed for exceptions.\r\n */\r\n private static MAX_EXCEPTION_LENGTH = 32768;\r\n\r\n public static sanitizeKeyAndAddUniqueness(key, map) {\r\n var origLength = key.length;\r\n var field = DataSanitizer.sanitizeKey(key);\r\n\r\n // validation truncated the length. We need to add uniqueness\r\n if (field.length !== origLength) {\r\n var i = 0;\r\n var uniqueField = field;\r\n while (map[uniqueField] !== undefined) {\r\n i++;\r\n uniqueField = field.substring(0, DataSanitizer.MAX_NAME_LENGTH - 3) + DataSanitizer.padNumber(i);\r\n }\r\n field = uniqueField;\r\n }\r\n return field;\r\n }\r\n\r\n public static sanitizeKey(name) {\r\n if (name) {\r\n // Remove any leading or trailing whitepace\r\n name = Util.trim(name.toString());\r\n\r\n // truncate the string to 150 chars\r\n if (name.length > DataSanitizer.MAX_NAME_LENGTH) {\r\n name = name.substring(0, DataSanitizer.MAX_NAME_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.NameTooLong,\r\n \"name is too long. It has been truncated to \" + DataSanitizer.MAX_NAME_LENGTH + \" characters.\",\r\n { name: name }, true);\r\n }\r\n }\r\n\r\n return name;\r\n }\r\n\r\n public static sanitizeString(value, maxLength: number = DataSanitizer.MAX_STRING_LENGTH) {\r\n if (value) {\r\n maxLength = maxLength ? maxLength: DataSanitizer.MAX_STRING_LENGTH; // in case default parameters dont work\r\n value = Util.trim(value);\r\n if (value.toString().length > maxLength) {\r\n value = value.toString().substring(0, maxLength);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.StringValueTooLong,\r\n \"string value is too long. It has been truncated to \" + maxLength + \" characters.\",\r\n { value: value }, true);\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n public static sanitizeUrl(url) {\r\n return DataSanitizer.sanitizeInput(url, DataSanitizer.MAX_URL_LENGTH, _InternalMessageId.UrlTooLong);\r\n }\r\n\r\n public static sanitizeMessage(message) {\r\n if (message) {\r\n if (message.length > DataSanitizer.MAX_MESSAGE_LENGTH) {\r\n message = message.substring(0, DataSanitizer.MAX_MESSAGE_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated,\r\n \"message is too long, it has been truncated to \" + DataSanitizer.MAX_MESSAGE_LENGTH + \" characters.\",\r\n { message: message },\r\n true);\r\n }\r\n }\r\n\r\n return message;\r\n }\r\n\r\n public static sanitizeException(exception) {\r\n if (exception) {\r\n if (exception.length > DataSanitizer.MAX_EXCEPTION_LENGTH) {\r\n exception = exception.substring(0, DataSanitizer.MAX_EXCEPTION_LENGTH);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, \"exception is too long, it has been truncated to \" + DataSanitizer.MAX_EXCEPTION_LENGTH + \" characters.\",\r\n { exception: exception }, true);\r\n }\r\n }\r\n\r\n return exception;\r\n }\r\n\r\n public static sanitizeProperties(properties) {\r\n if (properties) {\r\n var tempProps = {};\r\n for (var prop in properties) {\r\n var value = DataSanitizer.sanitizeString(properties[prop], DataSanitizer.MAX_PROPERTY_LENGTH);\r\n prop = DataSanitizer.sanitizeKeyAndAddUniqueness(prop, tempProps);\r\n tempProps[prop] = value;\r\n }\r\n properties = tempProps;\r\n }\r\n\r\n return properties;\r\n }\r\n\r\n public static sanitizeMeasurements(measurements) {\r\n if (measurements) {\r\n var tempMeasurements = {};\r\n for (var measure in measurements) {\r\n var value = measurements[measure];\r\n measure = DataSanitizer.sanitizeKeyAndAddUniqueness(measure, tempMeasurements);\r\n tempMeasurements[measure] = value;\r\n }\r\n measurements = tempMeasurements;\r\n }\r\n\r\n return measurements;\r\n }\r\n\r\n public static sanitizeId(id: string): string {\r\n return id ? DataSanitizer.sanitizeInput(id, DataSanitizer.MAX_ID_LENGTH, _InternalMessageId.IdTooLong).toString() : id;\r\n }\r\n\r\n public static sanitizeInput(input: any, maxLength: number, _msgId: _InternalMessageId) {\r\n if (input) {\r\n input = Util.trim(input);\r\n if (input.length > maxLength) {\r\n input = input.substring(0, maxLength);\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _msgId,\r\n \"input is too long, it has been truncated to \" + maxLength + \" characters.\",\r\n { data: input },\r\n true);\r\n }\r\n }\r\n\r\n return input;\r\n }\r\n\r\n public static padNumber(num) {\r\n var s = \"00\" + num;\r\n return s.substr(s.length - 3);\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class RemoteDependencyData extends AI.RemoteDependencyData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\r\n public static dataType = \"RemoteDependencyData\";\r\n\r\n public aiDataContract = {\r\n id: FieldType.Required,\r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n resultCode: FieldType.Default,\r\n duration: FieldType.Default,\r\n success: FieldType.Default,\r\n data: FieldType.Default,\r\n target: FieldType.Default,\r\n type: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default,\r\n\r\n kind: FieldType.Default,\r\n value: FieldType.Default,\r\n count: FieldType.Default,\r\n min: FieldType.Default,\r\n max: FieldType.Default,\r\n stdDev: FieldType.Default,\r\n dependencyKind: FieldType.Default,\r\n dependencySource: FieldType.Default,\r\n commandName: FieldType.Default,\r\n dependencyTypeName: FieldType.Default,\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\r\n constructor(id: string, absoluteUrl: string, commandName: string, value: number, success: boolean, resultCode: number, method?: string, properties?: Object, measurements?: Object) {\r\n super();\r\n\r\n this.id = id;\r\n\r\n this.duration = Util.msToTimeSpan(value);\r\n this.success = success;\r\n this.resultCode = resultCode + \"\";\r\n\r\n this.type = \"Ajax\";\r\n this.data = Common.DataSanitizer.sanitizeUrl(commandName);\r\n\r\n var dependencyFields = AjaxHelper.ParseDependencyPath(absoluteUrl, method, commandName);\r\n this.target = dependencyFields.target;\r\n this.name = dependencyFields.name;\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface XMLHttpRequestInstrumented extends XMLHttpRequest {\r\n ajaxData: ajaxRecord;\r\n }\r\n\r\n export class AjaxMonitor {\r\n private appInsights: AppInsights;\r\n private initialized: boolean;\r\n private static instrumentedByAppInsightsName = \"InstrumentedByAppInsights\";\r\n private currentWindowHost;\r\n\r\n constructor(appInsights: Microsoft.ApplicationInsights.AppInsights) {\r\n this.currentWindowHost = window.location.host && window.location.host.toLowerCase();\r\n this.appInsights = appInsights;\r\n this.initialized = false;\r\n this.Init();\r\n }\r\n\r\n ///The main function that needs to be called in order to start Ajax Monitoring\r\n private Init() {\r\n if (this.supportsMonitoring()) {\r\n this.instrumentOpen();\r\n this.instrumentSend();\r\n this.instrumentAbort();\r\n this.initialized = true;\r\n }\r\n }\r\n\r\n\r\n ///Function that returns property name which will identify that monitoring for given instance of XmlHttpRequest is disabled\r\n public static DisabledPropertyName: string = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\n\r\n ///Verifies that particalar instance of XMLHttpRequest needs to be monitored\r\n ///Optional parameter. True if ajaxData must be excluded from verification\r\n ///True if instance needs to be monitored, otherwise false\r\n private isMonitoredInstance(xhr: XMLHttpRequestInstrumented, excludeAjaxDataValidation?: boolean): boolean {\r\n\r\n // checking to see that all interested functions on xhr were instrumented\r\n return this.initialized\r\n\r\n // checking on ajaxData to see that it was not removed in user code\r\n && (excludeAjaxDataValidation === true || !extensions.IsNullOrUndefined(xhr.ajaxData))\r\n\r\n // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\r\n && xhr[AjaxMonitor.DisabledPropertyName] !== true;\r\n\r\n }\r\n\r\n ///Determines whether ajax monitoring can be enabled on this document\r\n ///True if Ajax monitoring is supported on this page, otherwise false\r\n private supportsMonitoring(): boolean {\r\n var result = true;\r\n if (extensions.IsNullOrUndefined(XMLHttpRequest) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send) ||\r\n extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort)) {\r\n result = false;\r\n }\r\n\r\n // disable in IE8 or older (https://www.w3schools.com/jsref/jsref_trim_string.asp)\r\n try {\r\n \" a \".trim();\r\n } catch (ex) {\r\n result = false;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private instrumentOpen() {\r\n var originalOpen = XMLHttpRequest.prototype.open;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.open = function (method, url, async) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this, true) &&\r\n (\r\n !(this).ajaxData ||\r\n !(this).ajaxData.xhrMonitoringState.openDone\r\n )) {\r\n ajaxMonitorInstance.openHandler(this, method, url, async);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxOpen,\r\n \"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalOpen.apply(this, arguments);\r\n };\r\n }\r\n\r\n private openHandler(xhr: XMLHttpRequestInstrumented, method, url, async) {\r\n // this format corresponds with activity logic on server-side and is required for the correct correlation\r\n var id = \"|\" + this.appInsights.context.operation.id + \".\" + Util.newId();\r\n\r\n var ajaxData = new ajaxRecord(id);\r\n ajaxData.method = method;\r\n ajaxData.requestUrl = url;\r\n ajaxData.xhrMonitoringState.openDone = true\r\n xhr.ajaxData = ajaxData;\r\n\r\n this.attachToOnReadyStateChange(xhr);\r\n }\r\n\r\n private static getFailedAjaxDiagnosticsMessage(xhr: XMLHttpRequestInstrumented): string {\r\n var result = \"\";\r\n try {\r\n if (!extensions.IsNullOrUndefined(xhr) &&\r\n !extensions.IsNullOrUndefined(xhr.ajaxData) &&\r\n !extensions.IsNullOrUndefined(xhr.ajaxData.requestUrl)) {\r\n result += \"(url: '\" + xhr.ajaxData.requestUrl + \"')\";\r\n }\r\n } catch (e) { }\r\n\r\n return result;\r\n }\r\n\r\n private instrumentSend() {\r\n var originalSend = XMLHttpRequest.prototype.send;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.send = function (content) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !(this).ajaxData.xhrMonitoringState.sendDone) {\r\n ajaxMonitorInstance.sendHandler(this, content);\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxSend,\r\n \"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalSend.apply(this, arguments);\r\n };\r\n }\r\n\r\n private sendHandler(xhr: XMLHttpRequestInstrumented, content) {\r\n xhr.ajaxData.requestSentTime = dateTime.Now();\r\n\r\n if (CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config, xhr.ajaxData.getAbsoluteUrl(), \r\n this.currentWindowHost)) {\r\n xhr.setRequestHeader(RequestHeaders.requestIdHeader, xhr.ajaxData.id);\r\n if (this.appInsights.context) {\r\n var appId = this.appInsights.context.appId();\r\n if (appId) {\r\n xhr.setRequestHeader(RequestHeaders.requestContextHeader, RequestHeaders.requestContextAppIdFormat + appId);\r\n }\r\n }\r\n }\r\n xhr.ajaxData.xhrMonitoringState.sendDone = true;\r\n }\r\n\r\n private instrumentAbort() {\r\n var originalAbort = XMLHttpRequest.prototype.abort;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.abort = function () {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !(this).ajaxData.xhrMonitoringState.abortDone) {\r\n (this).ajaxData.aborted = 1;\r\n (this).ajaxData.xhrMonitoringState.abortDone = true;\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxAbort,\r\n \"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n\r\n return originalAbort.apply(this, arguments);\r\n };\r\n }\r\n\r\n private attachToOnReadyStateChange(xhr: XMLHttpRequestInstrumented) {\r\n var ajaxMonitorInstance = this;\r\n xhr.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached = EventHelper.AttachEvent(xhr, \"readystatechange\", () => {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(xhr)) {\r\n if (xhr.readyState === 4) {\r\n ajaxMonitorInstance.onAjaxComplete(xhr);\r\n }\r\n }\r\n } catch (e) {\r\n var exceptionText = Microsoft.ApplicationInsights.Util.dump(e);\r\n\r\n // ignore messages with c00c023f, as this a known IE9 XHR abort issue\r\n if (!exceptionText || exceptionText.toLowerCase().indexOf(\"c00c023f\") == -1) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedMonitorAjaxRSC,\r\n \"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n private onAjaxComplete(xhr: XMLHttpRequestInstrumented) {\r\n xhr.ajaxData.responseFinishedTime = dateTime.Now();\r\n xhr.ajaxData.status = xhr.status;\r\n xhr.ajaxData.CalculateMetrics();\r\n \r\n if (xhr.ajaxData.ajaxTotalDuration < 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxDur,\r\n \"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n requestSentTime: xhr.ajaxData.requestSentTime,\r\n responseFinishedTime: xhr.ajaxData.responseFinishedTime\r\n });\r\n }\r\n else {\r\n var dependency = new Telemetry.RemoteDependencyData(\r\n xhr.ajaxData.id, \r\n xhr.ajaxData.getAbsoluteUrl(), \r\n xhr.ajaxData.getPathName(), \r\n xhr.ajaxData.ajaxTotalDuration, \r\n (+(xhr.ajaxData.status)) >= 200 && (+(xhr.ajaxData.status)) < 400, \r\n +xhr.ajaxData.status, \r\n xhr.ajaxData.method); \r\n\r\n // enrich dependency target with correlation context from the server\r\n var correlationContext = this.getCorrelationContext(xhr);\r\n if (correlationContext) {\r\n dependency.target = dependency.target + \" | \" + correlationContext;\r\n }\r\n \r\n this.appInsights.trackDependencyData(dependency);\r\n\r\n xhr.ajaxData = null;\r\n }\r\n }\r\n\r\n private getCorrelationContext(xhr: XMLHttpRequestInstrumented) {\r\n try {\r\n var responseHeadersString = xhr.getAllResponseHeaders();\r\n if (responseHeadersString !== null) {\r\n var index = responseHeadersString.toLowerCase().indexOf(RequestHeaders.requestContextHeaderLowerCase);\r\n if (index !== -1) {\r\n var responseHeader = xhr.getResponseHeader(RequestHeaders.requestContextHeader);\r\n return CorrelationIdHelper.getCorrelationContext(responseHeader);\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,\r\n \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\",\r\n {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: Microsoft.ApplicationInsights.Util.dump(e)\r\n });\r\n } \r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ISendBuffer {\r\n /**\r\n * Enqueue the payload\r\n */\r\n enqueue: (payload: string) => void;\r\n\r\n /**\r\n * Returns the number of elements in the buffer\r\n */\r\n count: () => number;\r\n\r\n /**\r\n * Clears the buffer\r\n */\r\n clear: () => void;\r\n\r\n /**\r\n * Returns items stored in the buffer\r\n */\r\n getItems: () => string[];\r\n\r\n /**\r\n * Build a batch of all elements in the payload array\r\n */\r\n batchPayloads: (payload: string[]) => string;\r\n\r\n /**\r\n * Moves items to the SENT_BUFFER.\r\n * The buffer holds items which were sent, but we haven't received any response from the backend yet. \r\n */\r\n markAsSent: (payload: string[]) => void;\r\n\r\n /**\r\n * Removes items from the SENT_BUFFER. Should be called on successful response from the backend. \r\n */\r\n clearSent: (payload: string[]) => void;\r\n }\r\n\r\n /*\r\n * An array based send buffer. \r\n */\r\n export class ArraySendBuffer implements ISendBuffer {\r\n private _config: ISenderConfig;\r\n private _buffer: string[];\r\n\r\n constructor(config: ISenderConfig) {\r\n this._config = config;\r\n\r\n this._buffer = [];\r\n }\r\n\r\n public enqueue(payload: string) {\r\n this._buffer.push(payload);\r\n }\r\n\r\n public count(): number {\r\n return this._buffer.length;\r\n }\r\n\r\n public clear() {\r\n this._buffer.length = 0;\r\n }\r\n\r\n public getItems(): string[] {\r\n return this._buffer.slice(0);\r\n }\r\n\r\n public batchPayloads(payload: string[]): string {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n\r\n return batch;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public markAsSent(payload: string[]) {\r\n this.clear();\r\n }\r\n\r\n public clearSent(payload: string[]) {\r\n // not supported\r\n }\r\n }\r\n\r\n /*\r\n * Session storege buffer holds a copy of all unsent items in the browser session storage.\r\n */\r\n export class SessionStorageSendBuffer implements ISendBuffer {\r\n static BUFFER_KEY = \"AI_buffer\";\r\n static SENT_BUFFER_KEY = \"AI_sentBuffer\";\r\n\r\n // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped. \r\n static MAX_BUFFER_SIZE = 2000;\r\n private _bufferFullMessageSent = false;\r\n\r\n // An in-memory copy of the buffer. A copy is saved to the session storage on enqueue() and clear(). \r\n // The buffer is restored in a constructor and contains unsent events from a previous page.\r\n private _buffer: string[];\r\n private _config: ISenderConfig;\r\n\r\n constructor(config: ISenderConfig) {\r\n this._config = config;\r\n\r\n var bufferItems = this.getBuffer(SessionStorageSendBuffer.BUFFER_KEY);\r\n var notDeliveredItems = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n\r\n this._buffer = bufferItems.concat(notDeliveredItems);\r\n\r\n // If the buffer has too many items, drop items from the end.\r\n if (this._buffer.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n this._buffer.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n\r\n // update DataLossAnalyzer with the number of recovered items\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.itemsRestoredFromSessionBuffer = this._buffer.length;\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n\r\n public enqueue(payload: string) {\r\n if (this._buffer.length >= SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // sent internal log only once per page view\r\n if (!this._bufferFullMessageSent) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.SessionStorageBufferFull,\r\n \"Maximum buffer size reached: \" + this._buffer.length,\r\n true);\r\n this._bufferFullMessageSent = true;\r\n }\r\n return;\r\n }\r\n\r\n this._buffer.push(payload);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n\r\n public count(): number {\r\n return this._buffer.length;\r\n }\r\n\r\n public clear() {\r\n this._buffer.length = 0;\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n\r\n this._bufferFullMessageSent = false;\r\n }\r\n\r\n public getItems(): string[] {\r\n return this._buffer.slice(0)\r\n }\r\n\r\n public batchPayloads(payload: string[]): string {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n\r\n return batch;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public markAsSent(payload: string[]) {\r\n this._buffer = this.removePayloadsFromBuffer(payload, this._buffer);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n if (sentElements instanceof Array && payload instanceof Array) {\r\n sentElements = sentElements.concat(payload);\r\n\r\n if (sentElements.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\r\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.SessionStorageBufferFull,\r\n \"Sent buffer reached its maximum size: \" + sentElements.length,\r\n true);\r\n\r\n sentElements.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n }\r\n\r\n public clearSent(payload: string[]) {\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n sentElements = this.removePayloadsFromBuffer(payload, sentElements);\r\n\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n\r\n private removePayloadsFromBuffer(payloads: string[], buffer: string[]): string[] {\r\n var remaining: string[] = [];\r\n\r\n for (var i in buffer) {\r\n var contains = false;\r\n for (var j in payloads) {\r\n if (payloads[j] === buffer[i]) {\r\n contains = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!contains) {\r\n remaining.push(buffer[i]);\r\n }\r\n };\r\n\r\n return remaining;\r\n }\r\n\r\n private getBuffer(key: string): string[] {\r\n try {\r\n var bufferJson = Util.getSessionStorage(key);\r\n if (bufferJson) {\r\n var buffer: string[] = JSON.parse(bufferJson);\r\n if (buffer) {\r\n return buffer;\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToRestoreStorageBuffer,\r\n \" storage key: \" + key + \", \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n\r\n return [];\r\n }\r\n\r\n private setBuffer(key: string, buffer: string[]) {\r\n try {\r\n var bufferJson = JSON.stringify(buffer);\r\n Util.setSessionStorage(key, bufferJson);\r\n } catch (e) {\r\n // if there was an error, clear the buffer\r\n // telemetry is stored in the _buffer array so we won't loose any items\r\n Util.setSessionStorage(key, JSON.stringify([]));\r\n\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedToSetStorageBuffer,\r\n \" storage key: \" + key + \", \" + Util.getExceptionName(e) + \". Buffer cleared\",\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\ninterface XDomainRequest extends XMLHttpRequestEventTarget {\r\n responseText: string;\r\n send(payload: string);\r\n open(method: string, url: string);\r\n};\r\n\r\ndeclare var XDomainRequest: {\r\n prototype: XDomainRequest;\r\n new(): XDomainRequest;\r\n};\r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ISenderConfig {\r\n /**\r\n * The url to which payloads will be sent\r\n */\r\n endpointUrl: () => string;\r\n\r\n /**\r\n * The JSON format (normal vs line delimited). True means line delimited JSON.\r\n */\r\n emitLineDelimitedJson: () => boolean;\r\n\r\n /**\r\n * The maximum size of a batch in bytes\r\n */\r\n maxBatchSizeInBytes: () => number;\r\n\r\n /**\r\n * The maximum interval allowed between calls to batchInvoke\r\n */\r\n maxBatchInterval: () => number;\r\n\r\n /**\r\n * The master off switch. Do not send any data if set to TRUE\r\n */\r\n disableTelemetry: () => boolean;\r\n\r\n /**\r\n * Store a copy of a send buffer in the session storage\r\n */\r\n enableSessionStorageBuffer: () => boolean;\r\n\r\n /**\r\n * Is retry handler disabled.\r\n * If enabled, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error) and 503 (service unavailable).\r\n */\r\n isRetryDisabled: () => boolean;\r\n\r\n isBeaconApiDisabled: () => boolean;\r\n }\r\n\r\n export interface IResponseError {\r\n index: number;\r\n statusCode: number;\r\n message: string;\r\n }\r\n\r\n export interface IBackendResponse {\r\n /**\r\n * Number of items received by the backend\r\n */\r\n itemsReceived: number;\r\n\r\n /**\r\n * Number of items succesfuly accepted by the backend\r\n */\r\n itemsAccepted: number;\r\n\r\n /**\r\n * List of errors for items which were not accepted\r\n */\r\n errors: IResponseError[];\r\n\r\n /**\r\n * App id returned by the backend - not necessary returned, but we don't need it with each response.\r\n */\r\n appId?: string;\r\n }\r\n\r\n export class Sender {\r\n /**\r\n * How many times in a row a retryable error condition has occurred.\r\n */\r\n private _consecutiveErrors: number;\r\n\r\n /**\r\n * The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).\r\n */\r\n private _retryAt: number;\r\n\r\n /**\r\n * The time of the last send operation.\r\n */\r\n private _lastSend: number;\r\n\r\n /**\r\n * Handle to the timer for delayed sending of batches of data.\r\n */\r\n private _timeoutHandle: any;\r\n\r\n /**\r\n * A send buffer object\r\n */\r\n public _buffer: ISendBuffer;\r\n\r\n /**\r\n * The configuration for this sender instance\r\n */\r\n public _config: ISenderConfig;\r\n\r\n /**\r\n * AppId of this component parsed from some backend response.\r\n */\r\n public _appId: string;\r\n\r\n /**\r\n * A method which will cause data to be send to the url\r\n */\r\n\r\n public _sender: (payload: string[], isAsync: boolean) => void;\r\n\r\n /**\r\n * Whether XMLHttpRequest object is supported. Older version of IE (8,9) do not support it.\r\n */\r\n public _XMLHttpRequestSupported: boolean = false;\r\n\r\n /**\r\n * The maximum Beacon API payload size.\r\n * WC3 documentation allows browsers to set the limit. Chrome current has a limit of 64kb. \r\n */\r\n public static MaxBeaconPayloadSize = 65536; // 64kb\r\n\r\n /**\r\n * Constructs a new instance of the Sender class\r\n */\r\n constructor(config: ISenderConfig) {\r\n this._consecutiveErrors = 0;\r\n this._retryAt = null;\r\n this._lastSend = 0;\r\n this._config = config;\r\n this._sender = null;\r\n this._buffer = (Util.canUseSessionStorage() && this._config.enableSessionStorageBuffer())\r\n ? new SessionStorageSendBuffer(config) : new ArraySendBuffer(config);\r\n\r\n if (!this._config.isBeaconApiDisabled() && Util.IsBeaconApiSupported()) {\r\n this._sender = this._beaconSender;\r\n } else {\r\n if (typeof XMLHttpRequest != \"undefined\") {\r\n var testXhr = new XMLHttpRequest();\r\n if (\"withCredentials\" in testXhr) {\r\n this._sender = this._xhrSender;\r\n this._XMLHttpRequestSupported = true;\r\n } else if (typeof XDomainRequest !== \"undefined\") {\r\n this._sender = this._xdrSender; //IE 8 and 9\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Add a telemetry item to the send buffer\r\n */\r\n public send(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n try {\r\n // if master off switch is set, don't send any data\r\n if (this._config.disableTelemetry()) {\r\n // Do not send/save data\r\n return;\r\n }\r\n\r\n // validate input\r\n if (!envelope) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.CannotSendEmptyTelemetry, \"Cannot send empty telemetry\");\r\n return;\r\n }\r\n\r\n // ensure a sender was constructed\r\n if (!this._sender) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.SenderNotInitialized, \"Sender was not initialized\");\r\n return;\r\n }\r\n\r\n // check if the incoming payload is too large, truncate if necessary\r\n var payload: string = Serializer.serialize(envelope);\r\n\r\n // flush if we would exceed the max-size limit by adding this item\r\n var bufferPayload = this._buffer.getItems();\r\n var batch = this._buffer.batchPayloads(bufferPayload);\r\n\r\n if (batch && (batch.length + payload.length > this._config.maxBatchSizeInBytes())) {\r\n this.triggerSend();\r\n }\r\n\r\n // enqueue the payload\r\n this._buffer.enqueue(payload);\r\n\r\n // ensure an invocation timeout is set\r\n this._setupTimer();\r\n\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.incrementItemsQueued();\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedAddingTelemetryToBuffer,\r\n \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */\r\n private _setupTimer() {\r\n if (!this._timeoutHandle) {\r\n var retryInterval = this._retryAt ? Math.max(0, this._retryAt - Date.now()) : 0;\r\n var timerValue = Math.max(this._config.maxBatchInterval(), retryInterval);\r\n\r\n this._timeoutHandle = setTimeout(() => {\r\n this.triggerSend();\r\n }, timerValue);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the size of the list in bytes.\r\n * @param list {string[]} - The list to get the size in bytes of.\r\n */\r\n private _getSizeInBytes(list: string[]) {\r\n var size = 0;\r\n if (list && list.length) {\r\n for (var i = 0; i < list.length; i++) {\r\n var item = list[i];\r\n if (item && item.length) {\r\n size += item.length;\r\n }\r\n }\r\n }\r\n\r\n return size;\r\n }\r\n\r\n /**\r\n * Immediately send buffered data\r\n * @param async {boolean} - Indicates if the events should be sent asynchronously\r\n */\r\n public triggerSend(async = true) {\r\n try {\r\n // Send data only if disableTelemetry is false\r\n if (!this._config.disableTelemetry()) {\r\n\r\n if (this._buffer.count() > 0) {\r\n var payload = this._buffer.getItems();\r\n\r\n // invoke send\r\n this._sender(payload, async);\r\n }\r\n\r\n // update lastSend time to enable throttling\r\n this._lastSend = +new Date;\r\n } else {\r\n this._buffer.clear();\r\n }\r\n\r\n clearTimeout(this._timeoutHandle);\r\n this._timeoutHandle = null;\r\n this._retryAt = null;\r\n } catch (e) {\r\n /* Ignore this error for IE under v10 */\r\n if (!Util.getIEVersion() || Util.getIEVersion() > 9) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TransmissionFailed,\r\n \"Telemetry transmission failed, some telemetry will be lost: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n }\r\n\r\n /** Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */\r\n private _setRetryTime() {\r\n const SlotDelayInSeconds = 10;\r\n var delayInSeconds: number;\r\n\r\n if (this._consecutiveErrors <= 1) {\r\n delayInSeconds = SlotDelayInSeconds;\r\n } else {\r\n var backOffSlot = (Math.pow(2, this._consecutiveErrors) - 1) / 2;\r\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\r\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\r\n }\r\n\r\n // TODO: Log the backoff time like the C# version does.\r\n var retryAfterTimeSpan = Date.now() + (delayInSeconds * 1000);\r\n\r\n // TODO: Log the retry at time like the C# version does.\r\n this._retryAt = retryAfterTimeSpan;\r\n }\r\n\r\n /**\r\n * Parses the response from the backend. \r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */\r\n private _parseResponse(response: any): IBackendResponse {\r\n try {\r\n if (response && response !== \"\") {\r\n var result = JSON.parse(response);\r\n\r\n if (result && result.itemsReceived && result.itemsReceived >= result.itemsAccepted &&\r\n result.itemsReceived - result.itemsAccepted == result.errors.length) {\r\n return result;\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.InvalidBackendResponse,\r\n \"Cannot parse the response. \" + Util.getExceptionName(e),\r\n {\r\n response: response\r\n });\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */\r\n private _isRetriable(statusCode: number): boolean {\r\n return statusCode == 408 // Timeout\r\n || statusCode == 429 // Too many requests.\r\n || statusCode == 500 // Internal server error.\r\n || statusCode == 503; // Service unavailable.\r\n }\r\n\r\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */\r\n private _resendPayload(payload: string[]) {\r\n if (!payload || payload.length === 0) {\r\n return;\r\n }\r\n\r\n this._buffer.clearSent(payload);\r\n this._consecutiveErrors++;\r\n\r\n for (var item of payload) {\r\n this._buffer.enqueue(item);\r\n }\r\n\r\n // setup timer\r\n this._setRetryTime();\r\n this._setupTimer();\r\n }\r\n\r\n private _formatErrorMessageXhr(xhr: XMLHttpRequest, message?: string): string {\r\n if (xhr) {\r\n return \"XMLHttpRequest,Status:\" + xhr.status + \",Response:\" + xhr.responseText || xhr.response || \"\";\r\n }\r\n\r\n return message;\r\n }\r\n\r\n private _formatErrorMessageXdr(xdr: XDomainRequest, message?: string): string {\r\n if (xdr) {\r\n return \"XDomainRequest,Response:\" + xdr.responseText || \"\";\r\n }\r\n\r\n return message;\r\n }\r\n\r\n /**\r\n * Send XMLHttpRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n */\r\n private _xhrSender(payload: string[], isAsync: boolean) {\r\n var xhr = new XMLHttpRequest();\r\n xhr[AjaxMonitor.DisabledPropertyName] = true;\r\n xhr.open(\"POST\", this._config.endpointUrl(), isAsync);\r\n xhr.setRequestHeader(\"Content-type\", \"application/json\");\r\n\r\n // append Sdk-Context request header only in case of breeze endpoint\r\n if (Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())) {\r\n xhr.setRequestHeader(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);\r\n }\r\n\r\n xhr.onreadystatechange = () => this._xhrReadyStateChange(xhr, payload, payload.length);\r\n xhr.onerror = (event: ErrorEvent) => this._onError(payload, this._formatErrorMessageXhr(xhr), event);\r\n\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xhr.send(batch);\r\n\r\n this._buffer.markAsSent(payload);\r\n }\r\n\r\n /**\r\n * Send XDomainRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n * \r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n private _xdrSender(payload: string[], isAsync: boolean) {\r\n var xdr = new XDomainRequest();\r\n xdr.onload = () => this._xdrOnLoad(xdr, payload);\r\n xdr.onerror = (event: ErrorEvent) => this._onError(payload, this._formatErrorMessageXdr(xdr), event);\r\n\r\n // XDomainRequest requires the same protocol as the hosting page. \r\n // If the protocol doesn't match, we can't send the telemetry :(. \r\n var hostingProtocol = window.location.protocol\r\n if (this._config.endpointUrl().lastIndexOf(hostingProtocol, 0) !== 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \". \" +\r\n \"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\");\r\n\r\n this._buffer.clear();\r\n return;\r\n }\r\n\r\n var endpointUrl = this._config.endpointUrl().replace(/^(https?:)/, \"\");\r\n xdr.open('POST', endpointUrl);\r\n\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xdr.send(batch);\r\n\r\n this._buffer.markAsSent(payload);\r\n }\r\n\r\n /**\r\n * Send Beacon API request\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n private _beaconSender(payload: string[], isAsync: boolean) {\r\n var url = this._config.endpointUrl();\r\n var batch = this._buffer.batchPayloads(payload);\r\n\r\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\r\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\r\n let plainTextBatch = new Blob([batch], { type: 'text/plain;charset=UTF-8' });\r\n \r\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\r\n var queued = navigator.sendBeacon(url, plainTextBatch);\r\n\r\n if (queued) {\r\n this._buffer.markAsSent(payload);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TransmissionFailed, \". \" + \"Failed to send telemetry with Beacon API.\");\r\n }\r\n }\r\n\r\n /**\r\n * xhr state changes\r\n */\r\n public _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number) {\r\n if (xhr.readyState === 4) {\r\n var response: IBackendResponse = null;\r\n if (!this._appId) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n if (response && response.appId) {\r\n this._appId = response.appId;\r\n }\r\n }\r\n \r\n if ((xhr.status < 200 || xhr.status >= 300) && xhr.status !== 0) {\r\n if (!this._config.isRetryDisabled() && this._isRetriable(xhr.status)) {\r\n this._resendPayload(payload);\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \". \" +\r\n \"Response code \" + xhr.status + \". Will retry to send \" + payload.length + \" items.\");\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n } else {\r\n if (xhr.status === 206) {\r\n if (!response) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n }\r\n\r\n if (response && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, response);\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n } else {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, countOfItemsInPayload);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * xdr state changes\r\n */\r\n public _xdrOnLoad(xdr: XDomainRequest, payload: string[]) {\r\n if (xdr && (xdr.responseText + \"\" === \"200\" || xdr.responseText === \"\")) {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, 0);\r\n } else {\r\n var results = this._parseResponse(xdr.responseText);\r\n\r\n if (results && results.itemsReceived && results.itemsReceived > results.itemsAccepted\r\n && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, results);\r\n } else {\r\n this._onError(payload, this._formatErrorMessageXdr(xdr));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * partial success handler\r\n */\r\n public _onPartialSuccess(payload: string[], results: IBackendResponse) {\r\n var failed = [];\r\n var retry = [];\r\n\r\n // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\r\n var errors = results.errors.reverse();\r\n for (var error of errors) {\r\n var extracted = payload.splice(error.index, 1)[0];\r\n if (this._isRetriable(error.statusCode)) {\r\n retry.push(extracted);\r\n } else {\r\n // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\r\n failed.push(extracted);\r\n }\r\n }\r\n\r\n if (payload.length > 0) {\r\n this._onSuccess(payload, results.itemsAccepted);\r\n }\r\n\r\n if (failed.length > 0) {\r\n this._onError(failed, this._formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' ')));\r\n }\r\n\r\n if (retry.length > 0) {\r\n this._resendPayload(retry);\r\n\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.TransmissionFailed, \"Partial success. \" +\r\n \"Delivered: \" + payload.length + \", Failed: \" + failed.length +\r\n \". Will retry to send \" + retry.length + \" our of \" + results.itemsReceived + \" items\");\r\n }\r\n }\r\n\r\n /**\r\n * error handler\r\n */\r\n public _onError(payload: string[], message: string, event?: ErrorEvent) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.OnError,\r\n \"Failed to send telemetry.\",\r\n { message: message });\r\n\r\n this._buffer.clearSent(payload);\r\n }\r\n\r\n /**\r\n * success handler\r\n */\r\n public _onSuccess(payload: string[], countOfItemsInPayload: number) {\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.decrementItemsQueued(countOfItemsInPayload);\r\n\r\n this._buffer.clearSent(payload);\r\n }\r\n }\r\n\r\n interface linkedListNode {\r\n next: linkedListNode;\r\n payload: string;\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.\r\n */\r\n export class MessageData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Trace message\r\n */\r\n public message: string;\r\n \r\n /**\r\n * Trace severity level.\r\n */\r\n public severityLevel: AI.SeverityLevel;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Trace extends AI.MessageData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\r\n public static dataType = \"MessageData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n message: FieldType.Required,\r\n severityLevel: FieldType.Default,\r\n properties: FieldType.Default\r\n };\r\n\r\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\r\n constructor(message: string, properties?: any, severityLevel?: AI.SeverityLevel) {\r\n super();\r\n message = message || Util.NotSpecified;\r\n this.message = Common.DataSanitizer.sanitizeMessage(message);\r\n this.properties = Common.DataSanitizer.sanitizeProperties(properties);\r\n\r\n if (severityLevel) {\r\n this.severityLevel = severityLevel;\r\n }\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Event extends AI.EventData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\r\n public static dataType = \"EventData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n name: FieldType.Required,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\r\n constructor(name: string, properties?: any, measurements?: any) {\r\n \r\n super();\r\n\r\n this.name = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Exception details of the exception in a chain.\r\n */\r\n export class ExceptionDetails\r\n {\r\n \r\n /**\r\n * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting.\r\n */\r\n public id: number;\r\n \r\n /**\r\n * The value of outerId is a reference to an element in ExceptionDetails that represents the outer exception\r\n */\r\n public outerId: number;\r\n \r\n /**\r\n * Exception type name.\r\n */\r\n public typeName: string;\r\n \r\n /**\r\n * Exception message.\r\n */\r\n public message: string;\r\n \r\n /**\r\n * Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.\r\n */\r\n public hasFullStack: boolean;\r\n \r\n /**\r\n * Text describing the stack. Either stack or parsedStack should have a value.\r\n */\r\n public stack: string;\r\n \r\n /**\r\n * List of stack frames. Either stack or parsedStack should have a value.\r\n */\r\n public parsedStack: StackFrame[];\r\n \r\n constructor()\r\n {\r\n this.hasFullStack = true;\r\n this.parsedStack = [];\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.\r\n */\r\n export class ExceptionData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Exception chain - list of inner exceptions.\r\n */\r\n public exceptions: ExceptionDetails[];\r\n \r\n /**\r\n * Severity level. Mostly used to indicate exception severity level when it is reported by logging library.\r\n */\r\n public severityLevel: AI.SeverityLevel;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.exceptions = [];\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Stack frame information.\r\n */\r\n export class StackFrame\r\n {\r\n \r\n /**\r\n * Level in the call stack. For the long stacks SDK may not report every function in a call stack.\r\n */\r\n public level: number;\r\n \r\n /**\r\n * Method name.\r\n */\r\n public method: string;\r\n \r\n /**\r\n * Name of the assembly (dll, jar, etc.) containing this function.\r\n */\r\n public assembly: string;\r\n \r\n /**\r\n * File name or URL of the method implementation.\r\n */\r\n public fileName: string;\r\n \r\n /**\r\n * Line number of the code implementation.\r\n */\r\n public line: number;\r\n \r\n constructor()\r\n {\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Exception extends AI.ExceptionData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\r\n public static dataType = \"ExceptionData\";\r\n\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n exceptions: FieldType.Required,\r\n severityLevel: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new isntance of the ExceptionTelemetry object\r\n */\r\n constructor(exception: Error, properties?: any, measurements?: any, severityLevel?: AI.SeverityLevel) {\r\n super();\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n\r\n this.exceptions = [new _ExceptionDetails(exception)];\r\n\r\n if (severityLevel) {\r\n this.severityLevel = severityLevel;\r\n }\r\n }\r\n \r\n\r\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */\r\n public static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string,\r\n details: string, line: number): Telemetry.Exception {\r\n\r\n return {\r\n exceptions: [\r\n {\r\n hasFullStack: true,\r\n message: message,\r\n stack: details,\r\n typeName: typeName\r\n }\r\n ]\r\n };\r\n }\r\n }\r\n\r\n class _ExceptionDetails extends AI.ExceptionDetails implements ISerializable {\r\n\r\n public aiDataContract = {\r\n id: FieldType.Default,\r\n outerId: FieldType.Default,\r\n typeName: FieldType.Required,\r\n message: FieldType.Required,\r\n hasFullStack: FieldType.Default,\r\n stack: FieldType.Default,\r\n parsedStack: FieldType.Array\r\n };\r\n\r\n constructor(exception: Error) {\r\n super();\r\n this.typeName = Common.DataSanitizer.sanitizeString(exception.name) || Util.NotSpecified;\r\n this.message = Common.DataSanitizer.sanitizeMessage(exception.message) || Util.NotSpecified;\r\n var stack = exception[\"stack\"];\r\n this.parsedStack = this.parseStack(stack);\r\n this.stack = Common.DataSanitizer.sanitizeException(stack);\r\n this.hasFullStack = Util.isArray(this.parsedStack) && this.parsedStack.length > 0;\r\n }\r\n\r\n private parseStack(stack): _StackFrame[] {\r\n var parsedStack: _StackFrame[] = undefined;\r\n if (typeof stack === \"string\") {\r\n var frames = stack.split('\\n');\r\n parsedStack = [];\r\n var level = 0;\r\n\r\n var totalSizeInBytes = 0;\r\n for (var i = 0; i <= frames.length; i++) {\r\n var frame = frames[i];\r\n if (_StackFrame.regex.test(frame)) {\r\n var parsedFrame = new _StackFrame(frames[i], level++);\r\n totalSizeInBytes += parsedFrame.sizeInBytes;\r\n parsedStack.push(parsedFrame);\r\n }\r\n }\r\n\r\n // DP Constraint - exception parsed stack must be < 32KB\r\n // remove frames from the middle to meet the threshold\r\n var exceptionParsedStackThreshold = 32 * 1024;\r\n if (totalSizeInBytes > exceptionParsedStackThreshold) {\r\n var left = 0;\r\n var right = parsedStack.length - 1;\r\n var size = 0;\r\n var acceptedLeft = left;\r\n var acceptedRight = right;\r\n\r\n while (left < right) {\r\n // check size\r\n var lSize = parsedStack[left].sizeInBytes;\r\n var rSize = parsedStack[right].sizeInBytes;\r\n size += lSize + rSize;\r\n\r\n if (size > exceptionParsedStackThreshold) {\r\n\r\n // remove extra frames from the middle\r\n var howMany = acceptedRight - acceptedLeft + 1;\r\n parsedStack.splice(acceptedLeft, howMany);\r\n break;\r\n }\r\n\r\n // update pointers\r\n acceptedLeft = left;\r\n acceptedRight = right;\r\n\r\n left++;\r\n right--;\r\n }\r\n }\r\n }\r\n\r\n return parsedStack;\r\n }\r\n }\r\n\r\n export class _StackFrame extends AI.StackFrame implements ISerializable {\r\n \r\n // regex to match stack frames from ie/chrome/ff\r\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\r\n public static regex = /^([\\s]+at)?(.*?)(\\@|\\s\\(|\\s)([^\\(\\@\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\r\n public static baseSize = 58; //'{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\r\n public sizeInBytes = 0;\r\n\r\n public aiDataContract = {\r\n level: FieldType.Required,\r\n method: FieldType.Required,\r\n assembly: FieldType.Default,\r\n fileName: FieldType.Default,\r\n line: FieldType.Default\r\n };\r\n\r\n constructor(frame: string, level: number) {\r\n super();\r\n this.level = level;\r\n this.method = \"\";\r\n this.assembly = Util.trim(frame);\r\n var matches = frame.match(_StackFrame.regex);\r\n if (matches && matches.length >= 5) {\r\n this.method = Util.trim(matches[2]) || this.method;\r\n this.fileName = Util.trim(matches[4]);\r\n this.line = parseInt(matches[5]) || 0;\r\n }\r\n\r\n this.sizeInBytes += this.method.length;\r\n this.sizeInBytes += this.fileName.length;\r\n this.sizeInBytes += this.assembly.length;\r\n\r\n // todo: these might need to be removed depending on how the back-end settles on their size calculation\r\n this.sizeInBytes += _StackFrame.baseSize;\r\n this.sizeInBytes += this.level.toString().length;\r\n this.sizeInBytes += this.line.toString().length;\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Type of the metric data measurement.\r\n */\r\n export enum DataPointType\r\n {\r\n Measurement = 0,\r\n Aggregation = 1,\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Metric data single measurement.\r\n */\r\n export class DataPoint\r\n {\r\n \r\n /**\r\n * Name of the metric.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Metric type. Single measurement or the aggregated value.\r\n */\r\n public kind: AI.DataPointType;\r\n \r\n /**\r\n * Single value for measurement. Sum of individual measurements for the aggregation.\r\n */\r\n public value: number;\r\n \r\n /**\r\n * Metric weight of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public count: number;\r\n \r\n /**\r\n * Minimum value of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public min: number;\r\n \r\n /**\r\n * Maximum value of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public max: number;\r\n \r\n /**\r\n * Standard deviation of the aggregated metric. Should not be set for a measurement.\r\n */\r\n public stdDev: number;\r\n \r\n constructor()\r\n {\r\n this.kind = AI.DataPointType.Measurement;\r\n }\r\n }\r\n}\r\n","// THIS FILE WAS AUTOGENERATED\r\n/// \r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.\r\n */\r\n export class MetricData extends Microsoft.Telemetry.Domain\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used.\r\n */\r\n public metrics: DataPoint[];\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.metrics = [];\r\n this.properties = {};\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class DataPoint extends AI.DataPoint implements ISerializable {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {\r\n name: FieldType.Required,\r\n kind: FieldType.Default,\r\n value: FieldType.Required,\r\n count: FieldType.Default,\r\n min: FieldType.Default,\r\n max: FieldType.Default,\r\n stdDev: FieldType.Default\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class Metric extends AI.MetricData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\r\n public static dataType = \"MetricData\";\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n metrics: FieldType.Required,\r\n properties: FieldType.Default\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */\r\n constructor(name: string, value: number, count?: number, min?: number, max?: number, properties?: any) {\r\n super();\r\n\r\n var dataPoint = new Microsoft.ApplicationInsights.Telemetry.Common.DataPoint();\r\n dataPoint.count = count > 0 ? count : undefined;\r\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\r\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\r\n dataPoint.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n dataPoint.value = value;\r\n\r\n this.metrics = [dataPoint];\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class PageView extends AI.PageViewData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\r\n public static dataType = \"PageviewData\";\r\n\r\n public aiDataContract = { \r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n url: FieldType.Default,\r\n duration: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default,\r\n id: FieldType.Default,\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n constructor(name?: string, url?: string, durationMs?: number, properties?: any, measurements?: any, id?: string) {\r\n super();\r\n\r\n this.id = Common.DataSanitizer.sanitizeId(id);\r\n this.url = Common.DataSanitizer.sanitizeUrl(url);\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n if (!isNaN(durationMs)) {\r\n this.duration = Util.msToTimeSpan(durationMs);\r\n }\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule AI\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.\r\n */\r\n export class PageViewPerfData extends AI.PageViewData\r\n {\r\n \r\n /**\r\n * Schema version\r\n */\r\n public ver: number;\r\n \r\n /**\r\n * Request URL with all query string parameters\r\n */\r\n public url: string;\r\n \r\n /**\r\n * Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public perfTotal: string;\r\n \r\n /**\r\n * Event name. Keep it low cardinality to allow proper grouping and useful metrics.\r\n */\r\n public name: string;\r\n \r\n /**\r\n * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days.\r\n */\r\n public duration: string;\r\n \r\n /**\r\n * Network connection time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public networkConnect: string;\r\n \r\n /**\r\n * Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public sentRequest: string;\r\n \r\n /**\r\n * Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public receivedResponse: string;\r\n \r\n /**\r\n * DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff\r\n */\r\n public domProcessing: string;\r\n \r\n /**\r\n * Collection of custom properties.\r\n */\r\n public properties: any;\r\n \r\n /**\r\n * Collection of custom measurements.\r\n */\r\n public measurements: any;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n this.ver = 2;\r\n this.properties = {};\r\n this.measurements = {};\r\n }\r\n }\r\n}\r\n","/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n export class PageViewPerformance extends AI.PageViewPerfData implements ISerializable {\r\n\r\n public static envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\r\n public static dataType = \"PageviewPerformanceData\";\r\n\r\n private static MAX_DURATION_ALLOWED = 3600000; // 1h\r\n\r\n public aiDataContract = {\r\n ver: FieldType.Required,\r\n name: FieldType.Default,\r\n url: FieldType.Default,\r\n duration: FieldType.Default,\r\n perfTotal: FieldType.Default,\r\n networkConnect: FieldType.Default,\r\n sentRequest: FieldType.Default,\r\n receivedResponse: FieldType.Default,\r\n domProcessing: FieldType.Default,\r\n properties: FieldType.Default,\r\n measurements: FieldType.Default\r\n };\r\n\r\n /**\r\n * Field indicating whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n private isValid: boolean;\r\n\r\n /**\r\n * Indicates whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n public getIsValid() {\r\n return this.isValid;\r\n }\r\n\r\n private durationMs: number;\r\n\r\n /**\r\n * Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method.\r\n */\r\n public getDurationMs() {\r\n return this.durationMs;\r\n }\r\n\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n constructor(name: string, url: string, unused: number, properties?: any, measurements?: any) {\r\n super();\r\n\r\n this.isValid = false;\r\n\r\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n */\r\n var timing = PageViewPerformance.getPerformanceTiming();\r\n if (timing) {\r\n var total = PageViewPerformance.getDuration(timing.navigationStart, timing.loadEventEnd);\r\n var network = PageViewPerformance.getDuration(timing.navigationStart, timing.connectEnd);\r\n var request = PageViewPerformance.getDuration(timing.requestStart, timing.responseStart);\r\n var response = PageViewPerformance.getDuration(timing.responseStart, timing.responseEnd);\r\n var dom = PageViewPerformance.getDuration(timing.responseEnd, timing.loadEventEnd);\r\n\r\n if (total == 0) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.ErrorPVCalc,\r\n \"error calculating page view performance.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else if (!PageViewPerformance.shouldCollectDuration(total, network, request, response, dom)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.InvalidDurationValue,\r\n \"Invalid page load duration value. Browser perf data won't be sent.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {\r\n // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\r\n // in this case, don't report client performance from this page\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.ClientPerformanceMathError,\r\n \"client performance math error.\",\r\n { total: total, network: network, request: request, response: response, dom: dom });\r\n\r\n } else {\r\n this.durationMs = total;\r\n\r\n // convert to timespans\r\n this.perfTotal = this.duration = Util.msToTimeSpan(total);\r\n this.networkConnect = Util.msToTimeSpan(network);\r\n this.sentRequest = Util.msToTimeSpan(request);\r\n this.receivedResponse = Util.msToTimeSpan(response);\r\n this.domProcessing = Util.msToTimeSpan(dom);\r\n\r\n this.isValid = true;\r\n }\r\n }\r\n\r\n this.url = Common.DataSanitizer.sanitizeUrl(url);\r\n this.name = Common.DataSanitizer.sanitizeString(name) || Util.NotSpecified;\r\n\r\n this.properties = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeProperties(properties);\r\n this.measurements = ApplicationInsights.Telemetry.Common.DataSanitizer.sanitizeMeasurements(measurements);\r\n }\r\n\r\n public static getPerformanceTiming(): PerformanceTiming {\r\n if (PageViewPerformance.isPerformanceTimingSupported()) {\r\n return window.performance.timing;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns true is window performance timing API is supported, false otherwise.\r\n */\r\n public static isPerformanceTimingSupported() {\r\n return typeof window != \"undefined\" && window.performance && window.performance.timing;\r\n }\r\n\r\n /**\r\n * As page loads different parts of performance timing numbers get set. When all of them are set we can report it.\r\n * Returns true if ready, false otherwise.\r\n */\r\n public static isPerformanceTimingDataReady() {\r\n var timing = window.performance.timing;\r\n\r\n return timing.domainLookupStart > 0\r\n && timing.navigationStart > 0\r\n && timing.responseStart > 0\r\n && timing.requestStart > 0\r\n && timing.loadEventEnd > 0\r\n && timing.responseEnd > 0\r\n && timing.connectEnd > 0\r\n && timing.domLoading > 0;\r\n }\r\n\r\n public static getDuration(start: any, end: any): number {\r\n var duration = undefined;\r\n if (!(isNaN(start) || isNaN(end))) {\r\n duration = Math.max(end - start, 0);\r\n }\r\n\r\n return duration;\r\n }\r\n\r\n /**\r\n * This method tells if given durations should be excluded from collection.\r\n */\r\n public static shouldCollectDuration(...durations: number[]): boolean {\r\n // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\r\n let botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google'];\r\n let userAgent = navigator.userAgent;\r\n let isGoogleBot = false;\r\n\r\n if (userAgent) {\r\n for(let i =0; i= PageViewPerformance.MAX_DURATION_ALLOWED) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface ITelemetryConfig extends ISenderConfig {\r\n instrumentationKey: () => string;\r\n accountId: () => string;\r\n sessionRenewalMs: () => number;\r\n sessionExpirationMs: () => number;\r\n sampleRate: () => number;\r\n cookieDomain: () => string;\r\n sdkExtension: () => string;\r\n isBrowserLinkTrackingEnabled: () => boolean;\r\n appId: () => string;\r\n }\r\n\r\n export class TelemetryContext implements ITelemetryContext {\r\n /**\r\n * The configuration for this telemetry context\r\n */\r\n public _config: ITelemetryConfig;\r\n\r\n /**\r\n * The sender instance for this context\r\n */\r\n public _sender: Sender;\r\n\r\n /**\r\n * The object describing a component tracked by this object.\r\n */\r\n public application: Context.Application;\r\n\r\n /**\r\n * The object describing a device tracked by this object.\r\n */\r\n public device: Context.Device;\r\n\r\n public internal: Context.Internal;\r\n\r\n /**\r\n * The object describing a location tracked by this object.\r\n */\r\n public location: Context.Location;\r\n\r\n /**\r\n * The object describing a operation tracked by this object.\r\n */\r\n public operation: Context.Operation;\r\n\r\n public sample: Context.Sample;\r\n\r\n /**\r\n * The object describing a user tracked by this object.\r\n */\r\n public user: Context.User;\r\n\r\n /**\r\n * The object describing a session tracked by this object.\r\n */\r\n public session: Context.Session;\r\n\r\n /**\r\n * AppId of this component if returned by the backend.\r\n */\r\n public appId: () => string;\r\n\r\n /**\r\n * The array of telemetry initializers to call before sending each telemetry item.\r\n */\r\n private telemetryInitializers: { (envelope: Microsoft.ApplicationInsights.IEnvelope): boolean | void; }[];\r\n\r\n /**\r\n * The session manager that manages session on the base of cookies.\r\n */\r\n public _sessionManager: Microsoft.ApplicationInsights.Context._SessionManager;\r\n\r\n constructor(config: ITelemetryConfig) {\r\n this._config = config;\r\n this._sender = new Sender(config);\r\n this.appId = () => this._sender._appId;\r\n\r\n // use appId set in config instead of getting it from the backend\r\n if (config.appId()) {\r\n this._sender._appId = config.appId();\r\n }\r\n\r\n this.telemetryInitializers = [];\r\n\r\n // window will be undefined in node.js where we do not want to initialize contexts\r\n if (typeof window !== 'undefined') {\r\n this._sessionManager = new ApplicationInsights.Context._SessionManager(config);\r\n this.application = new Context.Application();\r\n this.device = new Context.Device();\r\n this.internal = new Context.Internal(config);\r\n this.location = new Context.Location();\r\n this.user = new Context.User(config);\r\n this.operation = new Context.Operation();\r\n this.session = new Context.Session();\r\n this.sample = new Context.Sample(config.sampleRate());\r\n }\r\n\r\n this._addDefaultTelemetryInitializers();\r\n }\r\n\r\n /**\r\n * Adds telemetry initializer to the collection. Telemetry initializers will be called one by one\r\n * before telemetry item is pushed for sending and in the order they were added.\r\n */\r\n public addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean | void) {\r\n this.telemetryInitializers.push(telemetryInitializer);\r\n }\r\n\r\n /**\r\n * Use Sender.ts to send telemetry object to the endpoint\r\n */\r\n public track(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n if (!envelope) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackArgumentsNotSpecified,\r\n \"cannot call .track() with a null or undefined argument\", null, true);\r\n } else {\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (envelope.name === Telemetry.PageView.envelopeType) {\r\n _InternalLogging.resetInternalMessageCount();\r\n }\r\n\r\n if (this.session) {\r\n // If customer did not provide custom session id update sessionmanager\r\n if (typeof this.session.id !== \"string\") {\r\n this._sessionManager.update();\r\n }\r\n }\r\n\r\n this._track(envelope);\r\n }\r\n\r\n return envelope;\r\n }\r\n\r\n private _addDefaultTelemetryInitializers() {\r\n if (!this._config.isBrowserLinkTrackingEnabled()) {\r\n const browserLinkPaths = ['/browserLinkSignalR/', '/__browserLink/'];\r\n let dropBrowserLinkRequests = (envelope: Microsoft.ApplicationInsights.IEnvelope) => {\r\n if (envelope.name === Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType) {\r\n let remoteData = envelope.data as Telemetry.Common.Data;\r\n if (remoteData && remoteData.baseData) {\r\n for (let i = 0; i < browserLinkPaths.length; i++) {\r\n if (remoteData.baseData.name.indexOf(browserLinkPaths[i]) >= 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n this.addTelemetryInitializer(dropBrowserLinkRequests)\r\n }\r\n }\r\n\r\n private _track(envelope: Microsoft.ApplicationInsights.IEnvelope) {\r\n\r\n if (this.session) {\r\n // If customer set id, apply his context; otherwise apply context generated from cookies \r\n if (typeof this.session.id === \"string\") {\r\n this._applySessionContext(envelope, this.session);\r\n } else {\r\n this._applySessionContext(envelope, this._sessionManager.automaticSession);\r\n }\r\n }\r\n\r\n this._applyApplicationContext(envelope, this.application);\r\n this._applyDeviceContext(envelope, this.device);\r\n this._applyInternalContext(envelope, this.internal);\r\n this._applyLocationContext(envelope, this.location);\r\n this._applySampleContext(envelope, this.sample);\r\n this._applyUserContext(envelope, this.user);\r\n this._applyOperationContext(envelope, this.operation);\r\n\r\n envelope.iKey = this._config.instrumentationKey();\r\n\r\n var doNotSendItem = false;\r\n try {\r\n var telemetryInitializersCount = this.telemetryInitializers.length;\r\n for (var i = 0; i < telemetryInitializersCount; ++i) {\r\n var telemetryInitializer = this.telemetryInitializers[i];\r\n if (telemetryInitializer) {\r\n if (telemetryInitializer.apply(null, [envelope]) === false) {\r\n doNotSendItem = true;\r\n break;\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n doNotSendItem = true;\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryInitializerFailed, \"One of telemetry initializers failed, telemetry item will not be sent: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) }, true);\r\n }\r\n\r\n if (!doNotSendItem) {\r\n if (envelope.name === Telemetry.Metric.envelopeType ||\r\n this.sample.isSampledIn(envelope)) {\r\n var iKeyNoDashes = this._config.instrumentationKey().replace(/-/g, \"\");\r\n envelope.name = envelope.name.replace(\"{0}\", iKeyNoDashes);\r\n this._sender.send(envelope);\r\n } else {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TelemetrySampledAndNotSent,\r\n \"Telemetry is sampled and not sent to the AI service.\", { SampleRate: this.sample.sampleRate }, true);\r\n }\r\n }\r\n\r\n return envelope;\r\n }\r\n\r\n private _applyApplicationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, appContext: Microsoft.ApplicationInsights.Context.Application) {\r\n if (appContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n\r\n if (typeof appContext.ver === \"string\") {\r\n envelope.tags[tagKeys.applicationVersion] = appContext.ver;\r\n }\r\n if (typeof appContext.build === \"string\") {\r\n envelope.tags[tagKeys.applicationBuild] = appContext.build;\r\n }\r\n }\r\n }\r\n\r\n private _applyDeviceContext(envelope: Microsoft.ApplicationInsights.IEnvelope, deviceContext: Microsoft.ApplicationInsights.Context.Device) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n\r\n if (deviceContext) {\r\n if (typeof deviceContext.id === \"string\") {\r\n envelope.tags[tagKeys.deviceId] = deviceContext.id;\r\n }\r\n if (typeof deviceContext.ip === \"string\") {\r\n envelope.tags[tagKeys.deviceIp] = deviceContext.ip;\r\n }\r\n if (typeof deviceContext.language === \"string\") {\r\n envelope.tags[tagKeys.deviceLanguage] = deviceContext.language;\r\n }\r\n if (typeof deviceContext.locale === \"string\") {\r\n envelope.tags[tagKeys.deviceLocale] = deviceContext.locale;\r\n }\r\n if (typeof deviceContext.model === \"string\") {\r\n envelope.tags[tagKeys.deviceModel] = deviceContext.model;\r\n }\r\n if (typeof deviceContext.network !== \"undefined\") {\r\n envelope.tags[tagKeys.deviceNetwork] = deviceContext.network;\r\n }\r\n if (typeof deviceContext.oemName === \"string\") {\r\n envelope.tags[tagKeys.deviceOEMName] = deviceContext.oemName;\r\n }\r\n if (typeof deviceContext.os === \"string\") {\r\n envelope.tags[tagKeys.deviceOS] = deviceContext.os;\r\n }\r\n if (typeof deviceContext.osversion === \"string\") {\r\n envelope.tags[tagKeys.deviceOSVersion] = deviceContext.osversion;\r\n }\r\n if (typeof deviceContext.resolution === \"string\") {\r\n envelope.tags[tagKeys.deviceScreenResolution] = deviceContext.resolution;\r\n }\r\n if (typeof deviceContext.type === \"string\") {\r\n envelope.tags[tagKeys.deviceType] = deviceContext.type;\r\n }\r\n }\r\n }\r\n\r\n private _applyInternalContext(envelope: Microsoft.ApplicationInsights.IEnvelope, internalContext: Microsoft.ApplicationInsights.Context.Internal) {\r\n if (internalContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof internalContext.agentVersion === \"string\") {\r\n envelope.tags[tagKeys.internalAgentVersion] = internalContext.agentVersion;\r\n }\r\n if (typeof internalContext.sdkVersion === \"string\") {\r\n envelope.tags[tagKeys.internalSdkVersion] = internalContext.sdkVersion;\r\n }\r\n }\r\n }\r\n\r\n private _applyLocationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, locationContext: Microsoft.ApplicationInsights.Context.Location) {\r\n if (locationContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof locationContext.ip === \"string\") {\r\n envelope.tags[tagKeys.locationIp] = locationContext.ip;\r\n }\r\n }\r\n }\r\n\r\n private _applyOperationContext(envelope: Microsoft.ApplicationInsights.IEnvelope, operationContext: Microsoft.ApplicationInsights.Context.Operation) {\r\n if (operationContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof operationContext.id === \"string\") {\r\n envelope.tags[tagKeys.operationId] = operationContext.id;\r\n }\r\n if (typeof operationContext.name === \"string\") {\r\n envelope.tags[tagKeys.operationName] = operationContext.name;\r\n }\r\n if (typeof operationContext.parentId === \"string\") {\r\n envelope.tags[tagKeys.operationParentId] = operationContext.parentId;\r\n }\r\n if (typeof operationContext.rootId === \"string\") {\r\n envelope.tags[tagKeys.operationRootId] = operationContext.rootId;\r\n }\r\n if (typeof operationContext.syntheticSource === \"string\") {\r\n envelope.tags[tagKeys.operationSyntheticSource] = operationContext.syntheticSource;\r\n }\r\n }\r\n }\r\n\r\n private _applySampleContext(envelope: Microsoft.ApplicationInsights.IEnvelope, sampleContext: Microsoft.ApplicationInsights.Context.Sample) {\r\n if (sampleContext) {\r\n envelope.sampleRate = sampleContext.sampleRate;\r\n }\r\n }\r\n\r\n private _applySessionContext(envelope: Microsoft.ApplicationInsights.IEnvelope, sessionContext: Microsoft.ApplicationInsights.Context.Session) {\r\n if (sessionContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof sessionContext.id === \"string\") {\r\n envelope.tags[tagKeys.sessionId] = sessionContext.id;\r\n }\r\n if (typeof sessionContext.isFirst !== \"undefined\") {\r\n envelope.tags[tagKeys.sessionIsFirst] = sessionContext.isFirst;\r\n }\r\n }\r\n }\r\n\r\n private _applyUserContext(envelope: Microsoft.ApplicationInsights.IEnvelope, userContext: Microsoft.ApplicationInsights.Context.User) {\r\n if (userContext) {\r\n var tagKeys: AI.ContextTagKeys = new AI.ContextTagKeys();\r\n if (typeof userContext.accountId === \"string\") {\r\n envelope.tags[tagKeys.userAccountId] = userContext.accountId;\r\n }\r\n if (typeof userContext.agent === \"string\") {\r\n envelope.tags[tagKeys.userAgent] = userContext.agent;\r\n }\r\n if (typeof userContext.id === \"string\") {\r\n envelope.tags[tagKeys.userId] = userContext.id;\r\n }\r\n if (typeof userContext.authenticatedId === \"string\") {\r\n envelope.tags[tagKeys.userAuthUserId] = userContext.authenticatedId;\r\n }\r\n if (typeof userContext.storeRegion === \"string\") {\r\n envelope.tags[tagKeys.userStoreRegion] = userContext.storeRegion;\r\n }\r\n }\r\n }\r\n }\r\n}","// THIS FILE WAS AUTOGENERATED\r\n/// \r\nmodule Microsoft.Telemetry\r\n{\r\n\"use strict\";\r\n \r\n /**\r\n * Data struct to contain both B and C sections.\r\n */\r\n export class Data extends Microsoft.Telemetry.Base\r\n {\r\n \r\n /**\r\n * Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.\r\n */\r\n public baseType: string;\r\n \r\n /**\r\n * Container for data item (B section).\r\n */\r\n public baseData: TDomain;\r\n \r\n constructor()\r\n {\r\n super();\r\n \r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry.Common {\r\n \"use strict\";\r\n export class Data extends Microsoft.Telemetry.Data implements ISerializable {\r\n\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n public aiDataContract = {\r\n baseType: FieldType.Required,\r\n baseData: FieldType.Required\r\n }\r\n\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n constructor(type: string, data: TDomain) {\r\n super();\r\n\r\n this.baseType = type;\r\n this.baseData = data;\r\n }\r\n }\r\n}","/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n /**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */\r\n export class PageViewManager {\r\n private pageViewPerformanceSent: boolean = false;\r\n\r\n private overridePageViewDuration: boolean = false;\r\n\r\n private appInsights: IAppInsightsInternal;\r\n\r\n constructor(\r\n appInsights: IAppInsightsInternal,\r\n overridePageViewDuration: boolean) {\r\n this.overridePageViewDuration = overridePageViewDuration;\r\n this.appInsights = appInsights;\r\n }\r\n\r\n /**\r\n * Currently supported cases:\r\n * 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.\r\n * If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.\r\n * 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.\r\n * 3) overridePageViewDuration = true. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported). \r\n * 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration. \r\n *\r\n * In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.\r\n */\r\n public trackPageView(name?: string, url?: string, properties?: Object, measurements?: Object, duration?: number) {\r\n // ensure we have valid values for the required fields\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n\r\n var pageViewSent = false;\r\n var customDuration = undefined;\r\n\r\n if (Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {\r\n var start = Telemetry.PageViewPerformance.getPerformanceTiming().navigationStart;\r\n customDuration = Telemetry.PageViewPerformance.getDuration(start, +new Date);\r\n\r\n if (!Telemetry.PageViewPerformance.shouldCollectDuration(customDuration)) {\r\n customDuration = undefined;\r\n }\r\n } else {\r\n this.appInsights.sendPageViewInternal(\r\n name,\r\n url,\r\n !isNaN(duration) ? duration : undefined,\r\n properties,\r\n measurements);\r\n this.appInsights.flush();\r\n pageViewSent = true;\r\n }\r\n\r\n if (!pageViewSent && (this.overridePageViewDuration || !isNaN(duration))) {\r\n // 1, 2, 4 cases\r\n this.appInsights.sendPageViewInternal(\r\n name,\r\n url,\r\n !isNaN(duration) ? duration : customDuration,\r\n properties,\r\n measurements);\r\n this.appInsights.flush();\r\n pageViewSent = true;\r\n }\r\n\r\n var maxDurationLimit = 60000;\r\n\r\n if (!Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {\r\n // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.NavigationTimingNotSupported,\r\n \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\r\n return;\r\n }\r\n\r\n var handle = setInterval(() => {\r\n try {\r\n if (Telemetry.PageViewPerformance.isPerformanceTimingDataReady()) {\r\n clearInterval(handle);\r\n var pageViewPerformance = new Telemetry.PageViewPerformance(name, url, null, properties, measurements);\r\n\r\n if (!pageViewPerformance.getIsValid() && !pageViewSent) {\r\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\r\n // That's the best value we can get that makes sense.\r\n this.appInsights.sendPageViewInternal(name, url, customDuration, properties, measurements);\r\n this.appInsights.flush();\r\n } else {\r\n if (!pageViewSent) {\r\n this.appInsights.sendPageViewInternal(name, url, pageViewPerformance.getDurationMs(), properties, measurements);\r\n }\r\n\r\n if (!this.pageViewPerformanceSent) {\r\n this.appInsights.sendPageViewPerformanceInternal(pageViewPerformance);\r\n this.pageViewPerformanceSent = true;\r\n }\r\n this.appInsights.flush();\r\n }\r\n }\r\n else if (Telemetry.PageViewPerformance.getDuration(start, +new Date) > maxDurationLimit) {\r\n clearInterval(handle);\r\n if (!pageViewSent) {\r\n this.appInsights.sendPageViewInternal(name, url, maxDurationLimit, properties, measurements);\r\n this.appInsights.flush();\r\n }\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackPVFailedCalc,\r\n \"trackPageView failed on page load calculation: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }, 100);\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights.Telemetry {\r\n \"use strict\";\r\n\r\n /**\r\n * Used to track page visit durations\r\n */\r\n export class PageVisitTimeManager {\r\n\r\n private prevPageVisitDataKeyName: string = \"prevPageVisitData\";\r\n private pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void;\r\n\r\n /**\r\n * Creates a new instance of PageVisitTimeManager\r\n * @param pageVisitTimeTrackingHandler Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)\r\n * @returns {} \r\n */\r\n constructor(pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void) {\r\n this.pageVisitTimeTrackingHandler = pageVisitTimeTrackingHandler;\r\n }\r\n\r\n /**\r\n * Tracks the previous page visit time telemetry (if exists) and starts timing of new page visit time\r\n * @param currentPageName Name of page to begin timing for visit duration\r\n * @param currentPageUrl Url of page to begin timing for visit duration\r\n */\r\n public trackPreviousPageVisit(currentPageName: string, currentPageUrl: string) {\r\n \r\n try {\r\n // Restart timer for new page view\r\n var prevPageVisitTimeData = this.restartPageVisitTimer(currentPageName, currentPageUrl);\r\n \r\n // If there was a page already being timed, track the visit time for it now.\r\n if (prevPageVisitTimeData) {\r\n this.pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);\r\n }\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Auto track page visit time failed, metric will not be collected: \" + Util.dump(e));\r\n }\r\n }\r\n\r\n /**\r\n * Stops timing of current page (if exists) and starts timing for duration of visit to pageName\r\n * @param pageName Name of page to begin timing visit duration\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not. \r\n */\r\n public restartPageVisitTimer(pageName: string, pageUrl: string) {\r\n try {\r\n var prevPageVisitData = this.stopPageVisitTimer();\r\n this.startPageVisitTimer(pageName, pageUrl);\r\n\r\n return prevPageVisitData;\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Call to restart failed: \" + Util.dump(e));\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Starts timing visit duration of pageName\r\n * @param pageName \r\n * @returns {} \r\n */\r\n public startPageVisitTimer(pageName: string, pageUrl: string) {\r\n try {\r\n if (Util.canUseSessionStorage()) {\r\n if (Util.getSessionStorage(this.prevPageVisitDataKeyName) != null) {\r\n throw new Error(\"Cannot call startPageVisit consecutively without first calling stopPageVisit\");\r\n }\r\n\r\n var currPageVisitData = new PageVisitData(pageName, pageUrl);\r\n var currPageVisitDataStr = JSON.stringify(currPageVisitData);\r\n Util.setSessionStorage(this.prevPageVisitDataKeyName, currPageVisitDataStr);\r\n }\r\n } catch (e) {\r\n //TODO: Remove this catch in next phase, since if start is called twice in a row the exception needs to be propagated out\r\n _InternalLogging.warnToConsole(\"Call to start failed: \" + Util.dump(e));\r\n }\r\n }\r\n\r\n /**\r\n * Stops timing of current page, if exists.\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not. \r\n */\r\n public stopPageVisitTimer() {\r\n try {\r\n if (Util.canUseSessionStorage()) {\r\n\r\n // Define end time of page's visit\r\n var pageVisitEndTime = Date.now();\r\n\r\n // Try to retrieve page name and start time from session storage\r\n var pageVisitDataJsonStr = Util.getSessionStorage(this.prevPageVisitDataKeyName);\r\n if (pageVisitDataJsonStr) {\r\n\r\n // if previous page data exists, set end time of visit\r\n var prevPageVisitData: PageVisitData = JSON.parse(pageVisitDataJsonStr);\r\n prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData.pageVisitStartTime;\r\n\r\n // Remove data from storage since we already used it\r\n Util.removeSessionStorage(this.prevPageVisitDataKeyName);\r\n\r\n // Return page visit data\r\n return prevPageVisitData;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n return null;\r\n } catch (e) {\r\n _InternalLogging.warnToConsole(\"Stop page visit timer failed: \" + Util.dump(e));\r\n return null\r\n }\r\n }\r\n }\r\n\r\n export class PageVisitData {\r\n\r\n public pageName: string;\r\n public pageUrl: string;\r\n public pageVisitStartTime: number;\r\n public pageVisitTime: number;\r\n\r\n constructor(pageName, pageUrl) {\r\n this.pageVisitStartTime = Date.now();\r\n this.pageName = pageName;\r\n this.pageUrl = pageUrl;\r\n }\r\n }\r\n}","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n \r\n // Class allows to perform split testing (aka 'a/b testing' aka 'flights')\r\n // Works similarly to sampling, using the same hashing algorithm under the hood.\r\n // Suggested use:\r\n //\r\n // newShinyFeature.enabled = false;\r\n // if (new SplitTest.isEnabled(, )){\r\n // newShinyFeature.enabled = true;\r\n // }\r\n //\r\n export class SplitTest {\r\n private hashCodeGeneragor: HashCodeScoreGenerator = new HashCodeScoreGenerator();\r\n\r\n public isEnabled(key: string, percentEnabled: number) {\r\n return this.hashCodeGeneragor.getHashCodeScore(key) < percentEnabled;\r\n }\r\n }\r\n}","/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n\r\n \"use strict\";\r\n\r\n export var Version = \"1.0.20\";\r\n\r\n /**\r\n * Internal interface to pass appInsights object to subcomponents without coupling \r\n */\r\n export interface IAppInsightsInternal {\r\n sendPageViewInternal(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object);\r\n sendPageViewPerformanceInternal(pageViewPerformance: ApplicationInsights.Telemetry.PageViewPerformance);\r\n flush();\r\n }\r\n\r\n /**\r\n * The main API that sends telemetry to Application Insights.\r\n * Learn more: http://go.microsoft.com/fwlink/?LinkID=401493\r\n */\r\n export class AppInsights implements IAppInsightsInternal, IAppInsights {\r\n\r\n // Counts number of trackAjax invokations.\r\n // By default we only monitor X ajax call per view to avoid too much load.\r\n // Default value is set in config.\r\n // This counter keeps increasing even after the limit is reached.\r\n private _trackAjaxAttempts: number = 0;\r\n\r\n private _eventTracking: Timing;\r\n private _pageTracking: Timing;\r\n private _pageViewManager: Microsoft.ApplicationInsights.Telemetry.PageViewManager;\r\n private _pageVisitTimeManager: Microsoft.ApplicationInsights.Telemetry.PageVisitTimeManager;\r\n private _ajaxMonitor: Microsoft.ApplicationInsights.AjaxMonitor;\r\n\r\n public config: IConfig;\r\n public context: TelemetryContext;\r\n public queue: (() => void)[];\r\n public static defaultConfig: IConfig;\r\n\r\n constructor(config: IConfig) {\r\n this.config = config || {};\r\n\r\n // load default values if specified\r\n var defaults: IConfig = AppInsights.defaultConfig;\r\n if (defaults !== undefined) {\r\n for (var field in defaults) {\r\n // for each unspecified field, set the default value\r\n if (this.config[field] === undefined) {\r\n this.config[field] = defaults[field];\r\n }\r\n }\r\n }\r\n\r\n _InternalLogging.verboseLogging = () => this.config.verboseLogging;\r\n _InternalLogging.enableDebugExceptions = () => this.config.enableDebug;\r\n var configGetters: ApplicationInsights.ITelemetryConfig = {\r\n instrumentationKey: () => this.config.instrumentationKey,\r\n accountId: () => this.config.accountId,\r\n sessionRenewalMs: () => this.config.sessionRenewalMs,\r\n sessionExpirationMs: () => this.config.sessionExpirationMs,\r\n endpointUrl: () => this.config.endpointUrl,\r\n emitLineDelimitedJson: () => this.config.emitLineDelimitedJson,\r\n maxBatchSizeInBytes: () => {\r\n return (!this.config.isBeaconApiDisabled && Util.IsBeaconApiSupported()) ?\r\n Math.min(this.config.maxBatchSizeInBytes, Sender.MaxBeaconPayloadSize) :\r\n this.config.maxBatchSizeInBytes;\r\n },\r\n maxBatchInterval: () => this.config.maxBatchInterval,\r\n disableTelemetry: () => this.config.disableTelemetry,\r\n sampleRate: () => this.config.samplingPercentage,\r\n cookieDomain: () => this.config.cookieDomain,\r\n enableSessionStorageBuffer: () => {\r\n // Disable Session Storage buffer if telemetry is sent using Beacon API\r\n return ((this.config.isBeaconApiDisabled || !Util.IsBeaconApiSupported()) && this.config.enableSessionStorageBuffer);\r\n },\r\n isRetryDisabled: () => this.config.isRetryDisabled,\r\n isBeaconApiDisabled: () => this.config.isBeaconApiDisabled,\r\n sdkExtension: () => this.config.sdkExtension,\r\n isBrowserLinkTrackingEnabled: () => this.config.isBrowserLinkTrackingEnabled,\r\n appId: () => this.config.appId,\r\n }\r\n\r\n if (this.config.isCookieUseDisabled) {\r\n Util.disableCookies();\r\n }\r\n\r\n if (this.config.isStorageUseDisabled) {\r\n Util.disableStorage();\r\n }\r\n\r\n this.context = new ApplicationInsights.TelemetryContext(configGetters);\r\n\r\n this._pageViewManager = new Microsoft.ApplicationInsights.Telemetry.PageViewManager(this, this.config.overridePageViewDuration);\r\n\r\n // initialize event timing\r\n this._eventTracking = new Timing(\"trackEvent\");\r\n this._eventTracking.action = (name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => {\r\n if (!measurements) {\r\n measurements = { duration: duration };\r\n }\r\n else {\r\n // do not override existing duration value\r\n if (isNaN(measurements[\"duration\"])) {\r\n measurements[\"duration\"] = duration;\r\n }\r\n }\r\n var event = new Telemetry.Event(name, properties, measurements);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Event.dataType, event);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Event.envelopeType);\r\n\r\n this.context.track(envelope);\r\n }\r\n\r\n // initialize page view timing\r\n this._pageTracking = new Timing(\"trackPageView\");\r\n this._pageTracking.action = (name, url, duration, properties, measurements) => {\r\n this.sendPageViewInternal(name, url, duration, properties, measurements);\r\n }\r\n\r\n this._pageVisitTimeManager = new ApplicationInsights.Telemetry.PageVisitTimeManager(\r\n (pageName, pageUrl, pageVisitTime) => this.trackPageVisitTime(pageName, pageUrl, pageVisitTime));\r\n\r\n if (!this.config.disableAjaxTracking) {\r\n this._ajaxMonitor = new Microsoft.ApplicationInsights.AjaxMonitor(this);\r\n }\r\n }\r\n\r\n public sendPageViewInternal(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) {\r\n var pageView = new Telemetry.PageView(name, url, duration, properties, measurements, this.context.operation.id);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.PageView.dataType, pageView);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.PageView.envelopeType);\r\n\r\n this.context.track(envelope);\r\n\r\n // reset ajaxes counter\r\n this._trackAjaxAttempts = 0;\r\n }\r\n\r\n public sendPageViewPerformanceInternal(pageViewPerformance: ApplicationInsights.Telemetry.PageViewPerformance) {\r\n var pageViewPerformanceData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.PageViewPerformance.dataType, pageViewPerformance);\r\n var pageViewPerformanceEnvelope = new Telemetry.Common.Envelope(pageViewPerformanceData, Telemetry.PageViewPerformance.envelopeType);\r\n this.context.track(pageViewPerformanceEnvelope);\r\n }\r\n\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens. \r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n public startTrackPage(name?: string) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n this._pageTracking.start(name);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StartTrackFailed,\r\n \"startTrackPage failed, page view may not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public stopTrackPage(name?: string, url?: string, properties?: Object, measurements?: Object) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n\r\n this._pageTracking.stop(name, url, properties, measurements);\r\n\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StopTrackFailed,\r\n \"stopTrackPage failed, page view will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Logs that a page or other item was viewed. \r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally.\r\n */\r\n public trackPageView(name?: string, url?: string, properties?: Object, measurements?: Object, duration?: number) {\r\n try {\r\n this._pageViewManager.trackPageView(name, url, properties, measurements, duration);\r\n\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackPVFailed,\r\n \"trackPageView failed, page view will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n public startTrackEvent(name: string) {\r\n try {\r\n this._eventTracking.start(name);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StartTrackEventFailed,\r\n \"startTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /** \r\n * Log an extended event that you started timing with {@link startTrackEvent}.\r\n * @param name The string you used to identify this event in startTrackEvent.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public stopTrackEvent(name: string, properties?: Object, measurements?: Object) {\r\n try {\r\n this._eventTracking.stop(name, undefined, properties, measurements);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.StopTrackEventFailed,\r\n \"stopTrackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /** \r\n * Log a user action or other occurrence.\r\n * @param name A string to identify this event in the portal.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public trackEvent(name: string, properties?: Object, measurements?: Object) {\r\n try {\r\n var eventTelemetry = new Telemetry.Event(name, properties, measurements);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Event.dataType, eventTelemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Event.envelopeType);\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackEventFailed,\r\n \"trackEvent failed, event will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a dependency call\r\n * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id.\r\n * @param method represents request verb (GET, POST, etc.)\r\n * @param absoluteUrl absolute url used to make the dependency request\r\n * @param command command name \r\n * @param totalTime total request time\r\n * @param success indicates if the request was sessessful\r\n * @param resultCode response code returned by the dependency request\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n public trackDependency(id: string, method: string, absoluteUrl: string, command: string, totalTime: number, success: boolean, resultCode: number, properties?: Object, measurements?: Object) {\r\n if (this.config.maxAjaxCallsPerView === -1 ||\r\n this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) {\r\n var dependency = new Telemetry.RemoteDependencyData(id, absoluteUrl, command, totalTime, success, resultCode, method, properties, measurements);\r\n var dependencyData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.RemoteDependencyData.dataType, dependency);\r\n var envelope = new Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType);\r\n this.context.track(envelope);\r\n } else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MaxAjaxPerPVExceeded,\r\n \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\",\r\n true);\r\n }\r\n\r\n ++this._trackAjaxAttempts;\r\n }\r\n\r\n /**\r\n * Logs dependency call\r\n * @param dependencyData dependency data object\r\n */\r\n public trackDependencyData(dependency: Telemetry.RemoteDependencyData) {\r\n if (this.config.maxAjaxCallsPerView === -1 || this._trackAjaxAttempts < this.config.maxAjaxCallsPerView) {\r\n var dependencyData = new ApplicationInsights.Telemetry.Common.Data(\r\n Telemetry.RemoteDependencyData.dataType, dependency);\r\n var envelope = new Telemetry.Common.Envelope(dependencyData, ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType);\r\n this.context.track(envelope);\r\n } else if (this._trackAjaxAttempts === this.config.maxAjaxCallsPerView) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.MaxAjaxPerPVExceeded,\r\n \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\",\r\n true);\r\n }\r\n\r\n ++this._trackAjaxAttempts;\r\n }\r\n\r\n /**\r\n * trackAjax method is obsolete, use trackDependency instead\r\n */\r\n public trackAjax(id: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, method?: string) {\r\n this.trackDependency(id, null, absoluteUrl, pathName, totalTime, success, resultCode);\r\n }\r\n\r\n /**\r\n * Log an exception you have caught.\r\n * @param exception An Error from a catch clause, or the string error message.\r\n * @param handledAt Not used\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n public trackException(exception: Error, handledAt?: string, properties?: Object, measurements?: Object, severityLevel?: AI.SeverityLevel) {\r\n try {\r\n if (!Util.isError(exception)) {\r\n // ensure that we have an error object (user could pass a string/message)\r\n try {\r\n throw new Error(exception);\r\n } catch (error) {\r\n exception = error;\r\n }\r\n }\r\n\r\n var exceptionTelemetry = new Telemetry.Exception(exception, properties, measurements, severityLevel);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Exception.dataType, exceptionTelemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Exception.envelopeType);\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackExceptionFailed,\r\n \"trackException failed, exception will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.\r\n * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the \r\n * telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.\r\n * @param name A string that identifies the metric.\r\n * @param average Number representing either a single measurement, or the average of several measurements.\r\n * @param sampleCount The number of measurements represented by the average. Defaults to 1.\r\n * @param min The smallest measurement in the sample. Defaults to the average.\r\n * @param max The largest measurement in the sample. Defaults to the average.\r\n */\r\n public trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: Object) {\r\n try {\r\n var telemetry = new Telemetry.Metric(name, average, sampleCount, min, max, properties);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Metric.dataType, telemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Metric.envelopeType);\r\n\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.TrackMetricFailed,\r\n \"trackMetric failed, metric will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a diagnostic message. \r\n * @param message A message string \r\n * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty.\r\n * @param severityLevel AI.SeverityLevel - severity level\r\n */\r\n public trackTrace(message: string, properties?: Object, severityLevel?: AI.SeverityLevel) {\r\n try {\r\n var telemetry = new Telemetry.Trace(message, properties, severityLevel);\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Trace.dataType, telemetry);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Trace.envelopeType);\r\n\r\n this.context.track(envelope);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.TrackTraceFailed,\r\n \"trackTrace failed, trace will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Log a page visit time\r\n * @param pageName Name of page\r\n * @param pageVisitDuration Duration of visit to the page in milleseconds\r\n */\r\n private trackPageVisitTime(pageName: string, pageUrl: string, pageVisitTime: number) {\r\n var properties = { PageName: pageName, PageUrl: pageUrl };\r\n this.trackMetric(\"PageVisitTime\", pageVisitTime, 1, pageVisitTime, pageVisitTime, properties);\r\n }\r\n\r\n /**\r\n * Immediately send all queued telemetry.\r\n * @param {boolean} async - If flush should be call asynchronously\r\n */\r\n public flush(async = true) {\r\n try {\r\n this.context._sender.triggerSend(async);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FlushFailed,\r\n \"flush failed, telemetry will not be collected: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n }\r\n\r\n /**\r\n * Sets the authenticated user id and the account id.\r\n * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\r\n * \r\n * By default the method will only set the authUserID and accountId for all events in this page view. To add them to all events within\r\n * the whole session, you should either call this method on every page view or set `storeInCookie = true`. \r\n * \r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n * @param storeInCookie {boolean} - AuthenticateUserID will be stored in a cookie and added to all events within this session. \r\n */\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false) {\r\n try {\r\n this.context.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie);\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailed,\r\n \"Setting auth user context failed. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) },\r\n true);\r\n }\r\n }\r\n\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n */\r\n public clearAuthenticatedUserContext() {\r\n try {\r\n this.context.user.clearAuthenticatedUserContext();\r\n } catch (e) {\r\n _InternalLogging.throwInternal(LoggingSeverity.WARNING,\r\n _InternalMessageId.SetAuthContextFailed,\r\n \"Clearing auth user context failed. \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) },\r\n true);\r\n }\r\n }\r\n\r\n /**\r\n * In case of CORS exceptions - construct an exception manually.\r\n * See this for more info: http://stackoverflow.com/questions/5913978/cryptic-script-error-reported-in-javascript-in-chrome-and-firefox\r\n */\r\n private SendCORSException(properties: any) {\r\n var exceptionData = Microsoft.ApplicationInsights.Telemetry.Exception.CreateSimpleException(\r\n \"Script error.\",\r\n \"Error\", \"unknown\", \"unknown\",\r\n \"The browser's same-origin policy prevents us from getting the details of this exception. Consider using 'crossorigin' attribute.\",\r\n 0);\r\n exceptionData.properties = properties;\r\n\r\n var data = new ApplicationInsights.Telemetry.Common.Data(Telemetry.Exception.dataType, exceptionData);\r\n var envelope = new Telemetry.Common.Envelope(data, Telemetry.Exception.envelopeType);\r\n this.context.track(envelope);\r\n }\r\n\r\n /**\r\n * The custom error handler for Application Insights\r\n * @param {string} message - The error message\r\n * @param {string} url - The url where the error was raised\r\n * @param {number} lineNumber - The line number where the error was raised\r\n * @param {number} columnNumber - The column number for the line where the error was raised\r\n * @param {Error} error - The Error object\r\n */\r\n public _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error) {\r\n try {\r\n var properties = { url: url ? url : document.URL };\r\n\r\n if (Util.isCrossOriginError(message, url, lineNumber, columnNumber, error)) {\r\n this.SendCORSException(properties);\r\n } else {\r\n if (!Util.isError(error)) {\r\n var stack = \"window.onerror@\" + properties.url + \":\" + lineNumber + \":\" + (columnNumber || 0);\r\n error = new Error(message);\r\n error[\"stack\"] = stack;\r\n }\r\n this.trackException(error, null, properties);\r\n }\r\n } catch (exception) {\r\n var errorString =\r\n error ? (error.name + \", \" + error.message) : \"null\";\r\n\r\n var exceptionDump: string = Util.dump(exception);\r\n\r\n _InternalLogging.throwInternal(LoggingSeverity.CRITICAL,\r\n _InternalMessageId.ExceptionWhileLoggingError,\r\n \"_onerror threw exception while logging error, error will not be collected: \" + Util.getExceptionName(exception),\r\n { exception: exceptionDump, errorString: errorString });\r\n }\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Used to record timed events and page views.\r\n */\r\n class Timing {\r\n private _name;\r\n private _action: (ITimingDetail, number) => void;\r\n private _events: {\r\n [key: string]: number;\r\n };\r\n\r\n constructor(name: string) {\r\n this._name = name;\r\n this._events = {};\r\n }\r\n\r\n public start(name: string) {\r\n if (typeof this._events[name] !== \"undefined\") {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.StartCalledMoreThanOnce, \"start was called more than once for this event without calling stop.\",\r\n { name: this._name, key: name }, true);\r\n }\r\n\r\n this._events[name] = +new Date;\r\n }\r\n\r\n public stop(name: string, url: string, properties?: Object, measurements?: Object) {\r\n var start = this._events[name];\r\n if (isNaN(start)) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING, _InternalMessageId.StopCalledWithoutStart, \"stop was called without a corresponding start.\",\r\n { name: this._name, key: name }, true);\r\n } else {\r\n var end = +new Date;\r\n var duration = Telemetry.PageViewPerformance.getDuration(start, end);\r\n this.action(name, url, duration, properties, measurements);\r\n }\r\n\r\n delete this._events[name];\r\n this._events[name] = undefined;\r\n }\r\n\r\n public action: (name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => void;\r\n }\r\n}\r\n","module Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n /* Data loss analyzer is disabled by default.\r\n * Uncomment code in Sender, SendBuffer and unit tests if you want to enable it\r\n */\r\n export class DataLossAnalyzer {\r\n static enabled = false;\r\n static appInsights: Microsoft.ApplicationInsights.AppInsights;\r\n static issuesReportedForThisSession;\r\n static itemsRestoredFromSessionBuffer: number = 0;\r\n static LIMIT_PER_SESSION = 10;\r\n static ITEMS_QUEUED_KEY = \"AI_itemsQueued\";\r\n static ISSUES_REPORTED_KEY = \"AI_lossIssuesReported\";\r\n\r\n static reset() {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, \"0\");\r\n Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, \"0\");\r\n DataLossAnalyzer.itemsRestoredFromSessionBuffer = 0;\r\n }\r\n }\r\n\r\n private static isEnabled(): boolean {\r\n return DataLossAnalyzer.enabled &&\r\n DataLossAnalyzer.appInsights != null &&\r\n DataLossAnalyzer.appInsights.context._sender._XMLHttpRequestSupported &&\r\n Util.canUseSessionStorage()\r\n }\r\n\r\n static getIssuesReported(): number {\r\n var result =\r\n (!DataLossAnalyzer.isEnabled() || isNaN(+Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY))) ?\r\n 0 :\r\n +Util.getSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY);\r\n\r\n return result;\r\n }\r\n\r\n static incrementItemsQueued() {\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n var itemsQueued: number = DataLossAnalyzer.getNumberOfLostItems();\r\n ++itemsQueued;\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString());\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n static decrementItemsQueued(countOfItemsSentSuccessfully: number) {\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n var itemsQueued: number = DataLossAnalyzer.getNumberOfLostItems();\r\n itemsQueued -= countOfItemsSentSuccessfully;\r\n if (itemsQueued < 0) itemsQueued = 0;\r\n Util.setSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY, itemsQueued.toString());\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n static getNumberOfLostItems(): number {\r\n var result: number = 0;\r\n try {\r\n if (DataLossAnalyzer.isEnabled()) {\r\n result = isNaN(+Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY)) ?\r\n 0 :\r\n +Util.getSessionStorage(DataLossAnalyzer.ITEMS_QUEUED_KEY);\r\n }\r\n } catch (e) {\r\n result = 0;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n static reportLostItems() {\r\n try {\r\n if (DataLossAnalyzer.isEnabled() &&\r\n DataLossAnalyzer.getIssuesReported() < DataLossAnalyzer.LIMIT_PER_SESSION &&\r\n DataLossAnalyzer.getNumberOfLostItems() > 0) {\r\n\r\n var lostItems = DataLossAnalyzer.getNumberOfLostItems() - DataLossAnalyzer.itemsRestoredFromSessionBuffer;\r\n\r\n DataLossAnalyzer.appInsights.trackTrace(\r\n \"AI (Internal): Internal report DATALOSS:\\\"\" + lostItems + \"\\\"\",\r\n null);\r\n DataLossAnalyzer.appInsights.flush();\r\n\r\n var issuesReported: number = DataLossAnalyzer.getIssuesReported();\r\n ++issuesReported;\r\n Util.setSessionStorage(DataLossAnalyzer.ISSUES_REPORTED_KEY, issuesReported.toString());\r\n }\r\n } catch (e) {\r\n _InternalLogging.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToReportDataLoss,\r\n \"Failed to report data loss: \" + Util.getExceptionName(e),\r\n { exception: Util.dump(e) });\r\n }\r\n finally {\r\n try {\r\n DataLossAnalyzer.reset();\r\n } catch (e) { }\r\n }\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n export interface Snippet {\r\n queue: Array<() => void>;\r\n config: IConfig;\r\n }\r\n\r\n export class Initialization {\r\n public snippet: Snippet;\r\n public config: IConfig;\r\n\r\n constructor(snippet: Snippet) {\r\n // initialize the queue and config in case they are undefined\r\n snippet.queue = snippet.queue || [];\r\n var config: IConfig = snippet.config || {};\r\n\r\n // ensure instrumentationKey is specified\r\n if (config && !config.instrumentationKey) {\r\n config = snippet;\r\n\r\n // check for legacy instrumentation key\r\n if (config[\"iKey\"]) {\r\n Microsoft.ApplicationInsights.Version = \"0.10.0.0\";\r\n config.instrumentationKey = config[\"iKey\"];\r\n } else if (config[\"applicationInsightsId\"]) {\r\n Microsoft.ApplicationInsights.Version = \"0.7.2.0\";\r\n config.instrumentationKey = config[\"applicationInsightsId\"];\r\n } else {\r\n throw new Error(\"Cannot load Application Insights SDK, no instrumentationKey was provided.\");\r\n }\r\n }\r\n\r\n // set default values\r\n config = Initialization.getDefaultConfig(config);\r\n\r\n this.snippet = snippet;\r\n this.config = config;\r\n }\r\n\r\n // note: these are split into methods to enable unit tests\r\n public loadAppInsights() {\r\n\r\n // initialize global instance of appInsights\r\n var appInsights = new Microsoft.ApplicationInsights.AppInsights(this.config);\r\n\r\n // implement legacy version of trackPageView for 0.10<\r\n if (this.config[\"iKey\"]) {\r\n var originalTrackPageView = appInsights.trackPageView;\r\n appInsights.trackPageView = (pagePath?: string, properties?: Object, measurements?: Object) => {\r\n originalTrackPageView.apply(appInsights, [null, pagePath, properties, measurements]);\r\n }\r\n }\r\n\r\n // implement legacy pageView interface if it is present in the snippet\r\n var legacyPageView = \"logPageView\";\r\n if (typeof this.snippet[legacyPageView] === \"function\") {\r\n appInsights[legacyPageView] = (pagePath?: string, properties?: Object, measurements?: Object) => {\r\n appInsights.trackPageView(null, pagePath, properties, measurements);\r\n }\r\n }\r\n\r\n // implement legacy event interface if it is present in the snippet\r\n var legacyEvent = \"logEvent\";\r\n if (typeof this.snippet[legacyEvent] === \"function\") {\r\n appInsights[legacyEvent] = (name: string, properties?: Object, measurements?: Object) => {\r\n appInsights.trackEvent(name, properties, measurements);\r\n }\r\n }\r\n\r\n return appInsights;\r\n }\r\n\r\n public emptyQueue() {\r\n\r\n // call functions that were queued before the main script was loaded\r\n try {\r\n if (Microsoft.ApplicationInsights.Util.isArray(this.snippet.queue)) {\r\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\r\n var length = this.snippet.queue.length;\r\n for (var i = 0; i < length; i++) {\r\n var call = this.snippet.queue[i];\r\n call();\r\n }\r\n\r\n this.snippet.queue = undefined;\r\n delete this.snippet.queue;\r\n }\r\n } catch (exception) {\r\n var properties: any = {};\r\n if (exception && typeof exception.toString === \"function\") {\r\n properties.exception = exception.toString();\r\n }\r\n Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n LoggingSeverity.WARNING,\r\n _InternalMessageId.FailedToSendQueuedTelemetry,\r\n \"Failed to send queued telemetry\",\r\n properties);\r\n }\r\n }\r\n\r\n public pollInteralLogs(appInsightsInstance: AppInsights) {\r\n return setInterval(() => {\r\n var queue: Array<_InternalLogMessage> = Microsoft.ApplicationInsights._InternalLogging.queue;\r\n var length = queue.length;\r\n for (var i = 0; i < length; i++) {\r\n appInsightsInstance.trackTrace(queue[i].message);\r\n }\r\n queue.length = 0;\r\n }, this.config.diagnosticLogInterval);\r\n }\r\n\r\n public addHousekeepingBeforeUnload(appInsightsInstance: AppInsights): void {\r\n // Add callback to push events when the user navigates away\r\n\r\n if (!appInsightsInstance.config.disableFlushOnBeforeUnload && ('onbeforeunload' in window)) {\r\n var performHousekeeping = function () {\r\n // Adds the ability to flush all data before the page unloads.\r\n // Note: This approach tries to push an async request with all the pending events onbeforeunload.\r\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\r\n // Telemetry here will help us analyze how effective this approach is.\r\n // Another approach would be to make this call sync with a acceptable timeout to reduce the \r\n // impact on user experience.\r\n appInsightsInstance.context._sender.triggerSend();\r\n\r\n // Back up the current session to local storage\r\n // This lets us close expired sessions after the cookies themselves expire\r\n appInsightsInstance.context._sessionManager.backup();\r\n };\r\n\r\n if (!Microsoft.ApplicationInsights.Util.addEventHandler('beforeunload', performHousekeeping)) {\r\n Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n Microsoft.ApplicationInsights.LoggingSeverity.CRITICAL,\r\n Microsoft.ApplicationInsights._InternalMessageId.FailedToAddHandlerForOnBeforeUnload,\r\n 'Could not add handler for beforeunload');\r\n }\r\n }\r\n }\r\n\r\n public static getDefaultConfig(config?: IConfig): IConfig {\r\n if (!config) {\r\n config = {};\r\n }\r\n\r\n // set default values\r\n config.endpointUrl = config.endpointUrl || \"https://dc.services.visualstudio.com/v2/track\";\r\n config.sessionRenewalMs = 30 * 60 * 1000;\r\n config.sessionExpirationMs = 24 * 60 * 60 * 1000;\r\n config.maxBatchSizeInBytes = config.maxBatchSizeInBytes > 0 ? config.maxBatchSizeInBytes : 102400; // 100kb\r\n config.maxBatchInterval = !isNaN(config.maxBatchInterval) ? config.maxBatchInterval : 15000;\r\n config.enableDebug = Util.stringToBoolOrDefault(config.enableDebug);\r\n config.disableExceptionTracking = Util.stringToBoolOrDefault(config.disableExceptionTracking);\r\n config.disableTelemetry = Util.stringToBoolOrDefault(config.disableTelemetry);\r\n config.verboseLogging = Util.stringToBoolOrDefault(config.verboseLogging);\r\n config.emitLineDelimitedJson = Util.stringToBoolOrDefault(config.emitLineDelimitedJson);\r\n config.diagnosticLogInterval = config.diagnosticLogInterval || 10000;\r\n config.autoTrackPageVisitTime = Util.stringToBoolOrDefault(config.autoTrackPageVisitTime);\r\n\r\n if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) {\r\n config.samplingPercentage = 100;\r\n }\r\n\r\n config.disableAjaxTracking = Util.stringToBoolOrDefault(config.disableAjaxTracking);\r\n config.maxAjaxCallsPerView = !isNaN(config.maxAjaxCallsPerView) ? config.maxAjaxCallsPerView : 500;\r\n \r\n config.isBeaconApiDisabled = Util.stringToBoolOrDefault(config.isBeaconApiDisabled, true);\r\n config.disableCorrelationHeaders = Util.stringToBoolOrDefault(config.disableCorrelationHeaders);\r\n config.correlationHeaderExcludedDomains = config.correlationHeaderExcludedDomains || [\r\n \"*.blob.core.windows.net\", \r\n \"*.blob.core.chinacloudapi.cn\",\r\n \"*.blob.core.cloudapi.de\",\r\n \"*.blob.core.usgovcloudapi.net\"];\r\n config.disableFlushOnBeforeUnload = Util.stringToBoolOrDefault(config.disableFlushOnBeforeUnload);\r\n config.enableSessionStorageBuffer = Util.stringToBoolOrDefault(config.enableSessionStorageBuffer, true);\r\n config.isRetryDisabled = Util.stringToBoolOrDefault(config.isRetryDisabled);\r\n config.isCookieUseDisabled = Util.stringToBoolOrDefault(config.isCookieUseDisabled);\r\n config.isStorageUseDisabled = Util.stringToBoolOrDefault(config.isStorageUseDisabled);\r\n config.isBrowserLinkTrackingEnabled = Util.stringToBoolOrDefault(config.isBrowserLinkTrackingEnabled);\r\n config.enableCorsCorrelation = Util.stringToBoolOrDefault(config.enableCorsCorrelation);\r\n \r\n return config;\r\n }\r\n }\r\n}\r\n","/// \r\n\r\nmodule Microsoft.ApplicationInsights {\r\n \"use strict\";\r\n\r\n try {\r\n // only initialize if we are running in a browser that supports JSON serialization (ie7<, node.js, cordova)\r\n if (typeof window !== \"undefined\" && typeof JSON !== \"undefined\") {\r\n // get snippet or initialize to an empty object\r\n var aiName = \"appInsights\";\r\n \r\n if (window[aiName] === undefined) {\r\n // if no snippet is present, initialize default values\r\n Microsoft.ApplicationInsights.AppInsights.defaultConfig = Microsoft.ApplicationInsights.Initialization.getDefaultConfig();\r\n } else {\r\n // this is the typical case for browser+snippet\r\n var snippet: Microsoft.ApplicationInsights.Snippet = window[aiName] || {};\r\n \r\n // overwrite snippet with full appInsights\r\n var init = new Microsoft.ApplicationInsights.Initialization(snippet);\r\n var appInsightsLocal = init.loadAppInsights();\r\n\r\n // apply full appInsights to the global instance that was initialized in the snippet\r\n for (var field in appInsightsLocal) {\r\n snippet[field] = appInsightsLocal[field];\r\n }\r\n \r\n init.emptyQueue();\r\n \r\n init.pollInteralLogs(appInsightsLocal);\r\n \r\n init.addHousekeepingBeforeUnload(appInsightsLocal);\r\n }\r\n }\r\n } catch (e) {\r\n Microsoft.ApplicationInsights._InternalLogging.warnToConsole('Failed to initialize AppInsights JS SDK: ' + e.message);\r\n }\r\n}\r\n"]} \ No newline at end of file