Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@microsoft/applicationinsights-channel-js

Package Overview
Dependencies
Maintainers
5
Versions
577
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/applicationinsights-channel-js - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

4

browser/applicationinsights-channel-js.min.js
/*!
* Application Insights JavaScript SDK - Channel, 2.1.1
* Application Insights JavaScript SDK - Channel, 2.2.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=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])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i,n,d,a,p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=i||(i={}))[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(a=d||(d={}))[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden";var g=(o.isNullOrUndefined=function(e){return null==e},o.disableCookies=function(){o._canUseCookies=!1},o.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(l,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},o);function o(){}var m,s,l=/[xy]/g;(s=m||(m={}))[s.CRITICAL=1]="CRITICAL",s[s.WARNING=2]="WARNING";var u=1,c=2,f=3,h=4,v=5,y=6,_=7,I=12,S=22,b=23,w=24,N=26,x=28,E=33,C=40,A=41,T=42,D=43,R=46,L=47,M=48,U=49,O=50,P=52,k=54,z=56,B=57,G=58,F=61,q=64,H=66,X=67,j=68,V=69,W=70,K=(Y.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},Y.dataType="MessageData",Y.AiNonUserActionablePrefix="AI (Internal): ",Y.AiUserActionablePrefix="AI: ",Y);function Y(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?Y.AiUserActionablePrefix:Y.AiNonUserActionablePrefix)+e;var i=(t?" message:"+Y.sanitizeDiagnosticText(t):"")+(r?" props:"+Y.sanitizeDiagnosticText(JSON.stringify(r)):"");this.message+=i}var J=(Z.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new K(t,n,i,r);if(this.enableDebugExceptions())throw a;if(void 0!==a&&a&&void 0!==a.message){if(i){var o=+a.messageId;(!this._messageLogged[o]||this.consoleLoggingLevel()>=m.WARNING)&&(this.warnToConsole(a.message),this._messageLogged[o]=!0)}else this.consoleLoggingLevel()>=m.WARNING&&this.warnToConsole(a.message);this.logInternalMessage(e,a)}},Z.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},Z.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Z.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,r=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[r]?n=!1:this._messageLogged[r]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var i="Internal events throttle limit per PageView reached for this app.",a=new K(b,i,!1);this.queue.push(a),this.warnToConsole(i)}}},Z.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Z);function Z(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},g.isNullOrUndefined(e)||(g.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),g.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),g.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),g.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}Q.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(Q.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),Q.prototype.initialize=function(n,r,i){var a=this;if(n.isCookieUseDisabled&&g.disableCookies(),this.channelQueue=new Array,n.channels){var o=void 0;n.channels.forEach(function(e){if(e&&0<e.length){if((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){e.priority<500&&(o=e.identifier),e.initialize(n,r,i)}),o)throw Error("Channel has invalid priority"+o);for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);a.channelQueue.push(e)}})}for(var e=new Array,t=0;t<i.length;t++){var s=i[t];500<s.priority&&e.push(s)}if(0<e.length){for((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,r,i)}),t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}};function Q(){this.identifier="ChannelControllerPlugin",this.priority=500}var $=(ee.requestContextHeader="Request-Context",ee.requestContextTargetKey="appId",ee.requestContextAppIdFormat="appId=cid-v1:",ee.requestIdHeader="Request-Id",ee.sdkContextHeader="Sdk-Context",ee.sdkContextHeaderAppIdRequest="appId",ee.requestContextHeaderLowerCase="request-context",ee);function ee(){}var te=(ne.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ne.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,ne.MAX_NAME_LENGTH-3)+ne.padNumber(a);i=o}return i},ne.sanitizeKey=function(e,t){var n;return t&&(t=ne.trim(t.toString())).length>ne.MAX_NAME_LENGTH&&(n=t.substring(0,ne.MAX_NAME_LENGTH),e.throwInternal(m.WARNING,B,"name is too long. It has been truncated to "+ne.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ne.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ne.MAX_STRING_LENGTH),t&&(n=n||ne.MAX_STRING_LENGTH,(t=ne.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(m.WARNING,F,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ne.sanitizeUrl=function(e,t){return ne.sanitizeInput(e,t,ne.MAX_URL_LENGTH,H)},ne.sanitizeMessage=function(e,t){var n;return t&&t.length>ne.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ne.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,z,"message is too long, it has been truncated to "+ne.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ne.sanitizeException=function(e,t){var n;return t&&t.length>ne.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ne.MAX_EXCEPTION_LENGTH),e.throwInternal(m.WARNING,P,"exception is too long, it has been truncated to "+ne.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ne.sanitizeProperties=function(t,e){if(e){var n={};for(var r in e){var i=e[r];if("object"==typeof i&&"undefined"!=typeof JSON)try{i=JSON.stringify(i)}catch(e){t.throwInternal(m.WARNING,U,"custom property is not valid",{exception:e},!0)}i=ne.sanitizeString(t,i,ne.MAX_PROPERTY_LENGTH),n[r=ne.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},ne.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ne.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ne.sanitizeId=function(e,t){return t?ne.sanitizeInput(e,t,ne.MAX_ID_LENGTH,V).toString():t},ne.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ne.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(m.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ne.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ne.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},ne.MAX_NAME_LENGTH=150,ne.MAX_ID_LENGTH=128,ne.MAX_PROPERTY_LENGTH=8192,ne.MAX_STRING_LENGTH=1024,ne.MAX_URL_LENGTH=2048,ne.MAX_MESSAGE_LENGTH=32768,ne.MAX_EXCEPTION_LENGTH=32768,ne);function ne(){}var re=(ie.disableStorage=function(){ie._canUseLocalStorage=!1,ie._canUseSessionStorage=!1},ie._getLocalStorageObject=function(){return ie.canUseLocalStorage()?ie._getVerifiedStorageObject(i.LocalStorage):null},ie._getVerifiedStorageObject=function(e){var t,n,r=null;try{if("undefined"==typeof window)return null;n=new Date,(r=e===i.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=r.getItem(n)!=n,r.removeItem(n),t&&(r=null)}catch(e){r=null}return r},ie.isInternalApplicationInsightsEndpoint=function(e){return-1!==ie._internalEndpoints.indexOf(e.toLowerCase())},ie.canUseLocalStorage=function(){return void 0===ie._canUseLocalStorage&&(ie._canUseLocalStorage=!!ie._getVerifiedStorageObject(i.LocalStorage)),ie._canUseLocalStorage},ie.getStorage=function(t,e){var n=ie._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){ie._canUseLocalStorage=!1,t.throwInternal(m.WARNING,u,"Browser failed read of local storage. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return null},ie.setStorage=function(t,e,n){var r=ie._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){ie._canUseLocalStorage=!1,t.throwInternal(m.WARNING,f,"Browser failed write to local storage. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return!1},ie.removeStorage=function(t,e){var n=ie._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){ie._canUseLocalStorage=!1,t.throwInternal(m.WARNING,v,"Browser failed removal of local storage item. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return!1},ie._getSessionStorageObject=function(){return ie.canUseSessionStorage()?ie._getVerifiedStorageObject(i.SessionStorage):null},ie.canUseSessionStorage=function(){return void 0===ie._canUseSessionStorage&&(ie._canUseSessionStorage=!!ie._getVerifiedStorageObject(i.SessionStorage)),ie._canUseSessionStorage},ie.getSessionStorageKeys=function(){var e=[];if(ie.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},ie.getSessionStorage=function(t,e){var n=ie._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){ie._canUseSessionStorage=!1,t.throwInternal(m.WARNING,c,"Browser failed read of session storage. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return null},ie.setSessionStorage=function(t,e,n){var r=ie._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){ie._canUseSessionStorage=!1,t.throwInternal(m.WARNING,h,"Browser failed write to session storage. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return!1},ie.removeSessionStorage=function(t,e){var n=ie._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){ie._canUseSessionStorage=!1,t.throwInternal(m.WARNING,y,"Browser failed removal of session storage item. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return!1},ie.disableCookies=function(){g.disableCookies()},ie.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==ie.document.cookie}catch(e){t.throwInternal(m.WARNING,j,"Cannot access document.cookie - "+ie.getExceptionName(e),{exception:ie.dump(e)})}}return g._canUseCookies},ie.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),ie.document.location&&"https:"===ie.document.location.protocol&&(a=";secure"),ie.canUseCookies(e)&&(ie.document.cookie=t+"="+n+i+";path=/"+a)},ie.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},ie.getCookie=function(e,t){if(ie.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=ie.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=ie.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},ie.deleteCookie=function(e,t){ie.canUseCookies(e)&&(ie.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},ie.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},ie.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},ie.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},ie.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},ie.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},ie.toISOStringForIE8=function(e){if(ie.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},ie.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},ie.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},ie.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},ie.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},ie.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},ie.addEventHandler=function(e,t){if("undefined"==typeof window||!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},ie.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},ie.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},ie.document="undefined"!=typeof document?document:{},ie._canUseLocalStorage=void 0,ie._canUseSessionStorage=void 0,ie._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],ie.NotSpecified="not_specified",ie);function ie(){}var ae=(oe.parseUrl=function(e){return oe.htmlAnchorElement||(oe.htmlAnchorElement=oe.document.createElement?oe.document.createElement("a"):{host:oe.parseHost(e)}),oe.htmlAnchorElement.href=e,oe.htmlAnchorElement},oe.getAbsoluteUrl=function(e){var t,n=oe.parseUrl(e);return n&&(t=n.href),t},oe.getPathName=function(e){var t,n=oe.parseUrl(e);return n&&(t=n.pathname),t},oe.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},oe.parseHost=function(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=t&&2<t.length&&"string"==typeof t[2]&&0<t[2].length?t[2]:null},oe.document="undefined"!=typeof document?document:{},oe);function oe(){}var se=(le.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=ae.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var l=0===s.pathname.length?"/":s.pathname;"/"!==l.charAt(0)&&(l="/"+l),o=s.pathname,a=te.sanitizeString(e,n?n+" "+l:l)}else a=te.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},le);function le(){}ue.Now="undefined"==typeof window?function(){return(new Date).getTime()}:window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},ue.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n};function ue(){}var ce,pe="ProcessLegacy",fe="http.method",de=(t(he,ce=function(){}),he);function he(){return ce.call(this)||this}var ge,me=(t(ve,ge=function(){this.ver=1,this.sampleRate=100,this.tags={}}),ve);function ve(e,t,n){var r=ge.call(this)||this;return r.name=te.sanitizeString(e,n)||re.NotSpecified,r.data=t,r.time=re.toISOStringForIE8(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100==r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}function ye(){}var _e,Ie=(t(Se,_e=ye),Se);function Se(){var e=_e.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var be,we=(t(Ne,be=Ie),Ne.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Ne.dataType="EventData",Ne);function Ne(e,t,n,r){var i=be.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=te.sanitizeString(e,t)||re.NotSpecified,i.properties=te.sanitizeProperties(e,n),i.measurements=te.sanitizeMeasurements(e,r),i}function xe(){}var Ee,Ce=(t(Ae,Ee=ye),Ae);function Ae(){var e=Ee.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function Te(){this.hasFullStack=!0,this.parsedStack=[]}var De,Re=(t(Le,De=Ce),Le.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ue.CreateFromInterface(t,e)});return new Le(t,p({},e,{exceptions:n}))},Le.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.ver,o=e.problemGroup,s=e.id,l=e.isManual;return{ver:a,exceptions:t instanceof Array&&t.map(function(e){return e.toInterface()})||void 0,severityLevel:i,properties:n,measurements:r,problemGroup:o,id:s,isManual:l}},Le.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Le.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Le.dataType="ExceptionData",Le);function Le(e,t,n,r,i,a){var o=De.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ue(e,t)],o.properties=te.sanitizeProperties(e,n),o.measurements=te.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),g.isNullOrUndefined(t.ver)||(o.ver=t.ver),g.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Me,Ue=(t(Oe,Me=Te),Oe.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&this.parsedStack.map(function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||void 0}},Oe.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return ke.CreateFromInterface(e)})||t.parsedStack;return new Oe(e,p({},t,{parsedStack:n}))},Oe.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(ke.regex.test(o)){var s=new ke(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var l=0,u=t.length-1,c=0,p=l,f=u;l<u;){if(32768<(c+=t[l].sizeInBytes+t[u].sizeInBytes)){var d=f-p+1;t.splice(p,d);break}p=l,f=u,l++,u--}}return t},Oe);function Oe(e,t){var n=Me.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=te.sanitizeString(e,t.name)||re.NotSpecified,n.message=te.sanitizeMessage(e,t.message)||re.NotSpecified;var r=t.stack;n.parsedStack=Oe.parseStack(r),n.stack=te.sanitizeException(e,r),n.hasFullStack=re.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var Pe,ke=(t(ze,Pe=xe),ze.CreateFromInterface=function(e){return new ze(e,null)},ze.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},ze.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,ze.baseSize=58,ze);function ze(e,t){var n=Pe.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=re.trim(r),n.fileName="",n.line=0;var i=r.match(ze.regex);i&&5<=i.length&&(n.method=re.trim(i[2])||n.method,n.fileName=re.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=ze.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Be,Ge,Fe,qe=(t(He,Be=ye),He);function He(){var e=Be.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Fe=Ge||(Ge={}))[Fe.Measurement=0]="Measurement",Fe[Fe.Aggregation=1]="Aggregation";var Xe,je=(t(Ve,Xe=function(){this.kind=Ge.Measurement}),Ve);function Ve(){var e=null!==Xe&&Xe.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var We,Ke=(t(Ye,We=qe),Ye.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ye.dataType="MetricData",Ye);function Ye(e,t,n,r,i,a,o){var s=We.call(this)||this;s.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new je;return l.count=0<r?r:void 0,l.max=isNaN(a)||null===a?void 0:a,l.min=isNaN(i)||null===i?void 0:i,l.name=te.sanitizeString(e,t)||re.NotSpecified,l.value=n,s.metrics=[l],s.properties=te.sanitizeProperties(e,o),s}var Je,Ze=(t(Qe,Je=Ie),Qe);function Qe(){var e=Je.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var $e,et=(t(tt,$e=Ze),tt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",tt.dataType="PageviewData",tt);function tt(e,t,n,r,i,a,o){var s=$e.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=te.sanitizeId(e,o),s.url=te.sanitizeUrl(e,n),s.name=te.sanitizeString(e,t)||re.NotSpecified,isNaN(r)||(s.duration=re.msToTimeSpan(r)),s.properties=te.sanitizeProperties(e,i),s.measurements=te.sanitizeMeasurements(e,a),s}var nt,rt=(t(it,nt=ye),it);function it(){var e=nt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var at,ot=(t(st,at=rt),st.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",st.dataType="RemoteDependencyData",st);function st(e,t,n,r,i,a,o,s,l,u,c){void 0===l&&(l="Ajax");var p=at.call(this)||this;p.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},p.id=t,p.duration=re.msToTimeSpan(i),p.success=a,p.resultCode=o+"",p.type=te.sanitizeString(e,l);var f=se.ParseDependencyPath(e,n,s,r);return p.data=te.sanitizeUrl(e,r)||f.data,p.target=te.sanitizeString(e,f.target),p.name=te.sanitizeString(e,f.name),p.properties=te.sanitizeProperties(e,u),p.measurements=te.sanitizeMeasurements(e,c),p}var lt,ut=(t(ct,lt=ye),ct);function ct(){var e=lt.call(this)||this;return e.ver=2,e.properties={},e}var pt,ft=(t(dt,pt=ut),dt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",dt.dataType="MessageData",dt);function dt(e,t,n,r){var i=pt.call(this)||this;return i.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||re.NotSpecified,i.message=te.sanitizeMessage(e,t),i.properties=te.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var ht,gt=(t(mt,ht=Ze),mt);function mt(){var e=ht.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var vt,yt=(t(_t,vt=gt),_t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",_t.dataType="PageviewPerformanceData",_t);function _t(e,t,n,r,i,a,o){var s=vt.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=te.sanitizeUrl(e,n),s.name=te.sanitizeString(e,t)||re.NotSpecified,s.properties=te.sanitizeProperties(e,i),s.measurements=te.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var It,St,bt,wt=(t(Nt,It=de),Nt);function Nt(e,t){var n=It.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(bt=St||(St={}))[bt.Verbose=0]="Verbose",bt[bt.Information=1]="Information",bt[bt.Warning=2]="Warning",bt[bt.Error=3]="Error",bt[bt.Critical=4]="Critical";var xt=(Et.getConfig=function(e,t,n,r){var i;return void 0===r&&(r=!1),i=n&&e.extensionConfig&&e.extensionConfig[n]&&!g.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],g.isNullOrUndefined(i)?r:i},Et);function Et(){}var Ct=function(){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.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},At=new Ct,Tt=(Dt.prototype.enqueue=function(e){this._buffer.push(e)},Dt.prototype.count=function(){return this._buffer.length},Dt.prototype.clear=function(){this._buffer.length=0},Dt.prototype.getItems=function(){return this._buffer.slice(0)},Dt.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},Dt.prototype.markAsSent=function(e){this.clear()},Dt.prototype.clearSent=function(e){},Dt);function Dt(e){this._config=e,this._buffer=[]}var Rt=(Lt.prototype.enqueue=function(e){this._buffer.length>=Lt.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(m.WARNING,X,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(Lt.BUFFER_KEY,this._buffer))},Lt.prototype.count=function(){return this._buffer.length},Lt.prototype.clear=function(){this._buffer.length=0,this.setBuffer(Lt.BUFFER_KEY,[]),this.setBuffer(Lt.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},Lt.prototype.getItems=function(){return this._buffer.slice(0)},Lt.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},Lt.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(Lt.BUFFER_KEY,this._buffer);var t=this.getBuffer(Lt.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>Lt.MAX_BUFFER_SIZE&&(this._logger.throwInternal(m.CRITICAL,X,"Sent buffer reached its maximum size: "+t.length,!0),t.length=Lt.MAX_BUFFER_SIZE),this.setBuffer(Lt.SENT_BUFFER_KEY,t))},Lt.prototype.clearSent=function(e){var t=this.getBuffer(Lt.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(Lt.SENT_BUFFER_KEY,t)},Lt.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var r in t){var i=!1;for(var a in e)if(e[a]===t[r]){i=!0;break}i||n.push(t[r])}return n},Lt.prototype.getBuffer=function(e){var t=e;try{t=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+t:t;var n=re.getSessionStorage(this._logger,t);if(n){var r=JSON.parse(n);if(r)return r}}catch(e){this._logger.throwInternal(m.CRITICAL,T," storage key: "+t+", "+re.getExceptionName(e),{exception:re.dump(e)})}return[]},Lt.prototype.setBuffer=function(e,t){var n=e;try{n=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+n:n;var r=JSON.stringify(t);re.setSessionStorage(this._logger,n,r)}catch(e){re.setSessionStorage(this._logger,n,JSON.stringify([])),this._logger.throwInternal(m.WARNING,A," storage key: "+n+", "+re.getExceptionName(e)+". Buffer cleared",{exception:re.dump(e)})}},Lt.BUFFER_KEY="AI_buffer",Lt.SENT_BUFFER_KEY="AI_sentBuffer",Lt.MAX_BUFFER_SIZE=2e3,Lt);function Lt(e,t){this._bufferFullMessageSent=!1,this._logger=e,this._config=t;var n=this.getBuffer(Lt.BUFFER_KEY),r=this.getBuffer(Lt.SENT_BUFFER_KEY);this._buffer=n.concat(r),this._buffer.length>Lt.MAX_BUFFER_SIZE&&(this._buffer.length=Lt.MAX_BUFFER_SIZE),this.setBuffer(Lt.SENT_BUFFER_KEY,[]),this.setBuffer(Lt.BUFFER_KEY,this._buffer)}var Mt=(Ut.extractProperties=function(e){var t=null;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"number"!=typeof r&&(t||(t={}),t[n]=r)}return t},Ut.extractPropsAndMeasurements=function(e,t,n){if(!g.isNullOrUndefined(e))for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];"number"==typeof i?n[r]=i:t[r]="string"==typeof i?i:JSON.stringify(i)}},Ut.createEnvelope=function(e,t,n,r){var i=new me(e,r,t);i.iKey=n.iKey;var a=n.iKey.replace(/-/g,"");return i.name=i.name.replace("{0}",a),Ut.extractPartAExtensions(n,i),n.tags||(n.tags=[]),i},Ut.extractPartAExtensions=function(n,e){if(e.tags||(e.tags={}),n.ext||(n.ext={}),n.tags||(n.tags=[]),n.ext.user){n.ext.user.authId&&(e.tags[At.userAuthUserId]=n.ext.user.authId);var t=n.ext.user.id||n.ext.user.localId;t&&(e.tags[At.userId]=t)}if(n.ext.app&&n.ext.app.sesId&&(e.tags[At.sessionId]=n.ext.app.sesId),n.ext.device&&((n.ext.device.id||n.ext.device.localId)&&(e.tags[At.deviceId]=n.ext.device.id||n.ext.device.localId),n.ext.device.deviceClass&&(e.tags[At.deviceType]=n.ext.device.deviceClass),n.ext.device.ip&&(e.tags[At.deviceIp]=n.ext.device.ip)),n.ext.web){var r=n.ext.web;r.browserLang&&(e.tags[At.deviceLanguage]=r.browserLang),r.browserVer&&(e.tags[At.deviceBrowserVersion]=r.browserVer),r.browser&&(e.tags[At.deviceBrowser]=r.browser),e.data=e.data||{},e.data.baseData=e.data.baseData||{},e.data.baseData.properties=e.data.baseData.properties||{},r.domain&&(e.data.baseData.properties.domain=r.domain),r.isManual&&(e.data.baseData.properties.isManual=r.isManual.toString()),r.screenRes&&(e.data.baseData.properties.screenRes=r.screenRes),r.userConsent&&(e.data.baseData.properties.userConsent=r.userConsent.toString())}n.ext.device&&n.ext.device.model&&(e.tags[At.deviceModel]=n.ext.device.model),n.ext.os&&n.ext.os.name&&(e.tags[At.deviceOS]=n.ext.os.name),n.ext.device&&n.ext.device.deviceType&&(e.tags[At.deviceType]=n.ext.device.deviceType),n.ext.trace&&(n.ext.trace.parentID&&(e.tags[At.operationParentId]=n.ext.trace.parentID),n.ext.trace.name&&(e.tags[At.operationName]=n.ext.trace.name),n.ext.trace.traceID&&(e.tags[At.operationId]=n.ext.trace.traceID));for(var i={},a=function(e){var t=n.tags[e];Object.keys(t).forEach(function(e){i[e]=t[e]}),n.tags.splice(e,1)},o=n.tags.length-1;0<=o;o--)a(o);for(var s in n.tags)i[s]=n.tags[s];e.tags=p({},e.tags,i),e.tags[At.internalSdkVersion]||(e.tags[At.internalSdkVersion]="javascript:"+Ut.Version)},Ut.Version="2.1.1",Ut);function Ut(){}var Ot,Pt=(t(kt,Ot=Mt),kt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData.measurements||{},r=t.baseData.properties||{};Mt.extractPropsAndMeasurements(t.data,r,n);var i=t.baseData;if(g.isNullOrUndefined(i))return e.warnToConsole("Invalid input for dependency data"),null;var a=i.id,o=i.target,s=i.name,l=i.duration,u=i.success,c=i.responseCode,p=i.type,f=i.properties&&i.properties[fe]?i.properties[fe]:"GET",d=new ot(e,a,o,s,l,u,c,f,p,r,n),h=new wt(ot.dataType,d);return Mt.createEnvelope(e,ot.envelopeType,t,h)},kt.DependencyEnvelopeCreator=new kt,kt);function kt(){return null!==Ot&&Ot.apply(this,arguments)||this}var zt,Bt=(t(Gt,zt=Mt),Gt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n={},r={};t.baseType!==we.dataType&&(n.baseTypeSource=t.baseType),t.baseType===we.dataType?(n=t.baseData.properties||{},r=t.baseData.measurements||{}):t.baseData&&Mt.extractPropsAndMeasurements(t.baseData,n,r),Mt.extractPropsAndMeasurements(t.data,n,r);var i=t.baseData.name,a=new we(e,i,n,r),o=new wt(we.dataType,a);return Mt.createEnvelope(e,we.envelopeType,t,o)},Gt.EventEnvelopeCreator=new Gt,Gt);function Gt(){return null!==zt&&zt.apply(this,arguments)||this}var Ft,qt=(t(Ht,Ft=Mt),Ht.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData,r=Re.CreateFromInterface(e,n),i=new wt(Re.dataType,r);return Mt.createEnvelope(e,Re.envelopeType,t,i)},Ht.ExceptionEnvelopeCreator=new Ht,Ht);function Ht(){return null!==Ft&&Ft.apply(this,arguments)||this}var Xt,jt=(t(Vt,Xt=Mt),Vt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties||{},r=Mt.extractProperties(t.data);r=p({},n,r);var i=t.baseData.name,a=t.baseData.average,o=t.baseData.sampleCount,s=t.baseData.min,l=t.baseData.max,u=new Ke(e,i,a,o,s,l,r),c=new wt(Ke.dataType,u);return Mt.createEnvelope(e,Ke.envelopeType,t,c)},Vt.MetricEnvelopeCreator=new Vt,Vt);function Vt(){return null!==Xt&&Xt.apply(this,arguments)||this}var Wt,Kt=(t(Yt,Wt=Mt),Yt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=void 0;g.isNullOrUndefined(t.baseData)||g.isNullOrUndefined(t.baseData.properties)||g.isNullOrUndefined(t.baseData.properties.duration)?g.isNullOrUndefined(t.data)||g.isNullOrUndefined(t.data.duration)||(n=t.data.duration,delete t.data.duration):(n=t.baseData.properties.duration,delete t.baseData.properties.duration);var r,i=t.baseData;t.ext&&t.ext.trace&&t.ext.trace.traceID&&(r=t.ext.trace.traceID);var a=i.id||r,o=i.name,s=i.uri,l=i.properties||{},u=i.measurements||{};if(g.isNullOrUndefined(i.refUri)||(l.refUri=i.refUri),g.isNullOrUndefined(i.pageType)||(l.pageType=i.pageType),g.isNullOrUndefined(i.isLoggedIn)||(l.isLoggedIn=i.isLoggedIn.toString()),!g.isNullOrUndefined(i.properties)){var c=i.properties;for(var p in c)c.hasOwnProperty(p)&&(l[p]=c[p])}var f=new et(e,o,s,n,l,u,a),d=new wt(et.dataType,f);return Mt.createEnvelope(e,et.envelopeType,t,d)},Yt.PageViewEnvelopeCreator=new Yt,Yt);function Yt(){return null!==Wt&&Wt.apply(this,arguments)||this}var Jt,Zt=(t(Qt,Jt=Mt),Qt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData,r=n.name,i=n.uri||n.url,a=n.properties,o=n.measurements,s=new yt(e,r,i,void 0,a,o,n),l=new wt(yt.dataType,s);return Mt.createEnvelope(e,yt.envelopeType,t,l)},Qt.PageViewPerformanceEnvelopeCreator=new Qt,Qt);function Qt(){return null!==Jt&&Jt.apply(this,arguments)||this}var $t,en=(t(tn,$t=Mt),tn.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,r=t.baseData.severityLevel,i=Mt.extractProperties(t.data),a=p({},i,t.baseData.properties),o=new ft(e,n,r,a),s=new wt(ft.dataType,o);return Mt.createEnvelope(e,ft.envelopeType,t,s)},tn.TraceEnvelopeCreator=new tn,tn);function tn(){return null!==$t&&$t.apply(this,arguments)||this}var nn=(rn.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},rn.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",r={};if(!e)return this._logger.throwInternal(m.CRITICAL,M,"cannot serialize object because it is null or undefined",{name:t},!0),r;if(e[n])return this._logger.throwInternal(m.WARNING,O,"Circular reference detected while serializing object",{name:t},!0),r;if(!e.aiDataContract){if("measurements"===t)r=this._serializeStringMap(e,"number",t);else if("properties"===t)r=this._serializeStringMap(e,"string",t);else if("tags"===t)r=this._serializeStringMap(e,"string",t);else if(re.isArray(e))r=this._serializeArray(e,t);else{this._logger.throwInternal(m.WARNING,U,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),r=e}catch(e){this._logger.throwInternal(m.CRITICAL,M,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return r}for(var i in e[n]=!0,e.aiDataContract){var a,o=e.aiDataContract[i],s="function"==typeof o?o()&d.Required:o&d.Required,l="function"==typeof o?o()&d.Hidden:o&d.Hidden,u=o&d.Array,c=void 0!==e[i],p="object"==typeof e[i]&&null!==e[i];!s||c||u?l||void 0!==(a=p?u?this._serializeArray(e[i],i):this._serializeObject(e[i],i):e[i])&&(r[i]=a):this._logger.throwInternal(m.CRITICAL,w,"Missing required field specification. The field is required but not present on source",{field:i,name:t})}return delete e[n],r},rn.prototype._serializeArray=function(e,t){var n=void 0;if(e)if(re.isArray(e)){n=[];for(var r=0;r<e.length;r++){var i=e[r],a=this._serializeObject(i,t+"["+r+"]");n.push(a)}}else this._logger.throwInternal(m.CRITICAL,k,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},rn.prototype._serializeStringMap=function(e,t,n){var r=void 0;if(e)for(var i in r={},e){var a=e[i];if("string"===t)void 0===a?r[i]="undefined":null===a?r[i]="null":a.toString?r[i]=a.toString():r[i]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===a)r[i]="undefined";else if(null===a)r[i]="null";else{var o=parseFloat(a);isNaN(o)?r[i]="NaN":r[i]=o}else r[i]="invalid field: "+n+" is of unknown type.",this._logger.throwInternal(m.CRITICAL,r[i],null,!0)}return r},rn);function rn(e){this._logger=e}function an(){this._onlineStatus=!0;try{"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}catch(e){this.isListening=!1}}var on=(an.prototype._setOnline=function(){this._onlineStatus=!0},an.prototype._setOffline=function(){this._onlineStatus=!1},an.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!(navigator&&!g.isNullOrUndefined(navigator.onLine))||navigator.onLine},an.prototype.isOffline=function(){return!this.isOnline()},an.Offline=new an,an).Offline,sn=(ln.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/ln.INT_MAX_VALUE*100},ln.prototype.getHashCode=function(e){if(""==e)return 0;for(;e.length<ln.MIN_INPUT_LENGTH;)e=e.concat(e);for(var t=5381,n=0;n<e.length;++n)t=(t<<5)+t+e.charCodeAt(n),t&=t;return Math.abs(t)},ln.INT_MAX_VALUE=2147483647,ln.MIN_INPUT_LENGTH=8,ln);function ln(){}var un=(cn.prototype.getSamplingScore=function(e){return e.tags&&e.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.userId]):e.ext&&e.ext.user&&e.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()},cn);function cn(){this.hashCodeGeneragor=new sn,this.keys=new Ct}var pn=(fn.prototype.isSampledIn=function(e){var t=this.sampleRate;return null==t||100<=t||e.baseType===Ke.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},fn);function fn(e,t){this.INT_MAX_VALUE=2147483647,g.isNullOrUndefined(t)?this._logger=new J:this._logger=t,(100<e||e<0)&&(this._logger.throwInternal(m.WARNING,G,"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:e},!0),this.sampleRate=100),this.sampleRate=e,this.samplingScoreGenerator=new un}var dn=(hn.prototype.pause=function(){throw new Error("Method not implemented.")},hn.prototype.resume=function(){throw new Error("Method not implemented.")},hn.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(m.CRITICAL,S,"flush failed, telemetry will not be collected: "+re.getExceptionName(e),{exception:re.dump(e)})}},hn.prototype.teardown=function(){throw new Error("Method not implemented.")},hn.prototype.initialize=function(t,e,n){var r=this;this._logger=e.logger,this._serializer=new nn(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var i=hn._getDefaultAppInsightsChannelConfig();function a(e){o._config[e]=function(){return xt.getConfig(t,e,r.identifier,i[e]())}}this._config=hn._getEmptyAppInsightsChannelConfig();var o=this;for(var s in i)a(s);this._buffer=this._config.enableSessionStorageBuffer&&re.canUseSessionStorage()?new Rt(this._logger,this._config):new Tt(this._config),this._sample=new pn(this._config.samplingPercentage(),this._logger),!this._config.isBeaconApiDisabled()&&re.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))},hn.prototype.processTelemetry=function(e){var t=this;try{if(this._config.disableTelemetry())return;if(!e)return void this._logger.throwInternal(m.CRITICAL,_,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void this._logger.throwInternal(m.CRITICAL,W,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!this._sender)return void this._logger.throwInternal(m.CRITICAL,x,"Sender was not initialized");if(!this._isSampledIn(e))return void this._logger.throwInternal(m.WARNING,E,"Telemetry item was sampled out and not sent",{SampleRate:this._sample.sampleRate});e.tags=e.tags||{},e.tags.sampleRate=this._sample.sampleRate;var n=hn.constructEnvelope(e,this._config.instrumentationKey(),this._logger);if(!n)return void this._logger.throwInternal(m.CRITICAL,L,"Unable to create an AppInsights envelope");var r=!1;if(e.tags&&e.tags[pe]&&(e.tags[pe].forEach(function(e){try{e&&!1===e(n)&&(r=!0,t._logger.warnToConsole("Telemetry processor check returns false"))}catch(e){t._logger.throwInternal(m.CRITICAL,q,"One of telemetry initializers failed, telemetry item will not be sent: "+re.getExceptionName(e),{exception:re.dump(e)},!0)}}),delete e.tags[pe]),r)return;var i=this._serializer.serialize(n),a=this._buffer.getItems(),o=this._buffer.batchPayloads(a);o&&o.length+i.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(i),this._setupTimer()}catch(e){this._logger.throwInternal(m.WARNING,I,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+re.getExceptionName(e),{exception:re.dump(e)})}g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},hn.prototype.setNextPlugin=function(e){this._nextPlugin=e},hn.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var r=null;this._appId||(r=this._parseResponse(e.responseText||e.response))&&r.appId&&(this._appId=r.appId),(e.status<200||300<=e.status)&&0!==e.status?!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(m.WARNING,C,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e)):on.isOffline()?this._config.isRetryDisabled()||(this._resendPayload(t,10),this._logger.throwInternal(m.WARNING,C,". Offline - Response Code: "+e.status+". Offline status: "+on.isOffline()+". Will retry to send "+t.length+" items.")):206===e.status?(r||(r=this._parseResponse(e.responseText||e.response)),r&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,r):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},hn.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!re.getIEVersion()||9<re.getIEVersion())&&this._logger.throwInternal(m.CRITICAL,C,"Telemetry transmission failed, some telemetry will be lost: "+re.getExceptionName(e),{exception:re.dump(e)})}},hn.prototype._onError=function(e,t,n){this._logger.throwInternal(m.WARNING,N,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},hn.prototype._onPartialSuccess=function(e,t){for(var n=[],r=[],i=0,a=t.errors.reverse();i<a.length;i++){var o=a[i],s=e.splice(o.index,1)[0];this._isRetriable(o.statusCode)?r.push(s):n.push(s)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<r.length&&(this._resendPayload(r),this._logger.throwInternal(m.WARNING,C,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+r.length+" our of "+t.itemsReceived+" items"))},hn.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},hn.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)},hn.constructEnvelope=function(e,t,n){var r;switch((r=t===e.iKey||g.isNullOrUndefined(t)?e:p({},e,{iKey:t})).baseType){case we.dataType:return Bt.EventEnvelopeCreator.Create(n,r);case ft.dataType:return en.TraceEnvelopeCreator.Create(n,r);case et.dataType:return Kt.PageViewEnvelopeCreator.Create(n,r);case yt.dataType:return Zt.PageViewPerformanceEnvelopeCreator.Create(n,r);case Re.dataType:return qt.ExceptionEnvelopeCreator.Create(n,r);case Ke.dataType:return jt.MetricEnvelopeCreator.Create(n,r);case ot.dataType:return Pt.DependencyEnvelopeCreator.Create(n,r);default:return Bt.EventEnvelopeCreator.Create(n,r)}},hn._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},hn._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},hn.prototype._isSampledIn=function(e){return this._sample.isSampledIn(e)},hn.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),r=this._buffer.batchPayloads(e),i=new Blob([r],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,i)?(this._buffer.markAsSent(e),this._onSuccess(e,e.length)):(this._xhrSender(e,!0),this._logger.throwInternal(m.WARNING,C,". Failed to send telemetry with Beacon API, retried with xhrSender."))},hn.prototype._xhrSender=function(t,e){var n=this,r=new XMLHttpRequest;r.Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,r.open("POST",this._config.endpointUrl(),e),r.setRequestHeader("Content-type","application/json"),re.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&r.setRequestHeader($.sdkContextHeader,$.sdkContextHeaderAppIdRequest),r.onreadystatechange=function(){return n._xhrReadyStateChange(r,t,t.length)},r.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(r),e)};var i=this._buffer.batchPayloads(t);r.send(i),this._buffer.markAsSent(t)},hn.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(m.CRITICAL,D,"Cannot parse the response. "+re.getExceptionName(e),{response:t})}return null},hn.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,r=e;n<r.length;n++){var i=r[n];this._buffer.enqueue(i)}this._setRetryTime(t),this._setupTimer()}},hn.prototype._setRetryTime=function(e){var t;if(this._consecutiveErrors<=1)t=10;else{var n=(Math.pow(2,this._consecutiveErrors)-1)/2,r=Math.floor(Math.random()*n*10)+1;r*=e,t=Math.max(Math.min(r,3600),10)}var i=Date.now()+1e3*t;this._retryAt=i},hn.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)}},hn.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},hn.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},hn.prototype._xdrSender=function(t,e){var n=this,r=new XDomainRequest;r.onload=function(){return n._xdrOnLoad(r,t)},r.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(r),e)};var i=window.location&&window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(i,0))return this._logger.throwInternal(m.WARNING,C,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var a=this._config.endpointUrl().replace(/^(https?:)/,"");r.open("POST",a);var o=this._buffer.batchPayloads(t);r.send(o),this._buffer.markAsSent(t)},hn.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},hn);function hn(){this.priority=1001,this.identifier="AppInsightsChannelPlugin",this._XMLHttpRequestSupported=!1}e.Sender=dn,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=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])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i,n,d,a,s,o,p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=i=i||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(a=d=d||{})[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden",(o=s=s||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var g=(l.isNullOrUndefined=function(e){return null==e},l.disableCookies=function(){l._canUseCookies=!1},l.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(c,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},l);function l(){}var m,u,c=/[xy]/g;(u=m=m||{})[u.CRITICAL=1]="CRITICAL",u[u.WARNING=2]="WARNING";var f=1,h=2,v=3,y=4,_=5,I=6,S=7,b=12,w=22,N=23,x=24,E=26,C=28,A=33,T=40,D=41,R=42,L=43,M=46,U=47,O=48,P=49,k=50,z=52,B=54,G=56,F=57,q=58,H=61,X=64,j=66,W=67,V=68,K=69,Y=70,J=(Z.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},Z.dataType="MessageData",Z.AiNonUserActionablePrefix="AI (Internal): ",Z.AiUserActionablePrefix="AI: ",Z);function Z(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?Z.AiUserActionablePrefix:Z.AiNonUserActionablePrefix)+e;var i=(t?" message:"+Z.sanitizeDiagnosticText(t):"")+(r?" props:"+Z.sanitizeDiagnosticText(JSON.stringify(r)):"");this.message+=i}var Q=($.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new J(t,n,i,r);if(this.enableDebugExceptions())throw a;if(void 0!==a&&a&&void 0!==a.message){if(i){var s=+a.messageId;(!this._messageLogged[s]||this.consoleLoggingLevel()>=m.WARNING)&&(this.warnToConsole(a.message),this._messageLogged[s]=!0)}else this.consoleLoggingLevel()>=m.WARNING&&this.warnToConsole(a.message);this.logInternalMessage(e,a)}},$.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},$.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},$.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,r=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[r]?n=!1:this._messageLogged[r]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var i="Internal events throttle limit per PageView reached for this app.",a=new J(N,i,!1);this.queue.push(a),this.warnToConsole(i)}}},$.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},$);function $(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},g.isNullOrUndefined(e)||(g.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),g.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),g.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),g.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}ee.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(ee.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),ee.prototype.initialize=function(n,r,i){var a=this;if(n.isCookieUseDisabled&&g.disableCookies(),this.channelQueue=new Array,n.channels){var s=void 0;n.channels.forEach(function(e){if(e&&0<e.length){e=e.sort(function(e,t){return e.priority-t.priority});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);if(e.forEach(function(e){e.priority<500&&(s=e.identifier),e.initialize(n,r,i)}),s)throw Error("Channel has invalid priority"+s);a.channelQueue.push(e)}})}for(var e=new Array,t=0;t<i.length;t++){var o=i[t];500<o.priority&&e.push(o)}if(0<e.length){for((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,r,i)}),t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}};function ee(){this.identifier="ChannelControllerPlugin",this.priority=500}var te=(ne.requestContextHeader="Request-Context",ne.requestContextTargetKey="appId",ne.requestContextAppIdFormat="appId=cid-v1:",ne.requestIdHeader="Request-Id",ne.traceParentHeader="traceparent",ne.sdkContextHeader="Sdk-Context",ne.sdkContextHeaderAppIdRequest="appId",ne.requestContextHeaderLowerCase="request-context",ne);function ne(){}var re=(ie.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ie.sanitizeKey(e,t);if(i.length!==r){for(var a=0,s=i;void 0!==n[s];)a++,s=i.substring(0,ie.MAX_NAME_LENGTH-3)+ie.padNumber(a);i=s}return i},ie.sanitizeKey=function(e,t){var n;return t&&(t=ie.trim(t.toString())).length>ie.MAX_NAME_LENGTH&&(n=t.substring(0,ie.MAX_NAME_LENGTH),e.throwInternal(m.WARNING,F,"name is too long. It has been truncated to "+ie.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ie.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ie.MAX_STRING_LENGTH),t&&(n=n||ie.MAX_STRING_LENGTH,(t=ie.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(m.WARNING,H,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ie.sanitizeUrl=function(e,t){return ie.sanitizeInput(e,t,ie.MAX_URL_LENGTH,j)},ie.sanitizeMessage=function(e,t){var n;return t&&t.length>ie.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ie.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,G,"message is too long, it has been truncated to "+ie.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ie.sanitizeException=function(e,t){var n;return t&&t.length>ie.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ie.MAX_EXCEPTION_LENGTH),e.throwInternal(m.WARNING,z,"exception is too long, it has been truncated to "+ie.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ie.sanitizeProperties=function(t,e){if(e){var n={};for(var r in e){var i=e[r];if("object"==typeof i&&"undefined"!=typeof JSON)try{i=JSON.stringify(i)}catch(e){t.throwInternal(m.WARNING,P,"custom property is not valid",{exception:e},!0)}i=ie.sanitizeString(t,i,ie.MAX_PROPERTY_LENGTH),n[r=ie.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},ie.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ie.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ie.sanitizeId=function(e,t){return t?ie.sanitizeInput(e,t,ie.MAX_ID_LENGTH,K).toString():t},ie.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ie.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(m.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ie.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ie.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},ie.MAX_NAME_LENGTH=150,ie.MAX_ID_LENGTH=128,ie.MAX_PROPERTY_LENGTH=8192,ie.MAX_STRING_LENGTH=1024,ie.MAX_URL_LENGTH=2048,ie.MAX_MESSAGE_LENGTH=32768,ie.MAX_EXCEPTION_LENGTH=32768,ie);function ie(){}var ae=(se.createDomEvent=function(e){var t=null;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},se.disableStorage=function(){se._canUseLocalStorage=!1,se._canUseSessionStorage=!1},se._getLocalStorageObject=function(){return se.canUseLocalStorage()?se._getVerifiedStorageObject(i.LocalStorage):null},se._getVerifiedStorageObject=function(e){var t,n,r=null;try{if("undefined"==typeof window)return null;n=new Date,(r=e===i.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=r.getItem(n)!=n,r.removeItem(n),t&&(r=null)}catch(e){r=null}return r},se.isInternalApplicationInsightsEndpoint=function(e){return-1!==se._internalEndpoints.indexOf(e.toLowerCase())},se.canUseLocalStorage=function(){return void 0===se._canUseLocalStorage&&(se._canUseLocalStorage=!!se._getVerifiedStorageObject(i.LocalStorage)),se._canUseLocalStorage},se.getStorage=function(t,e){var n=se._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){se._canUseLocalStorage=!1,t.throwInternal(m.WARNING,f,"Browser failed read of local storage. "+se.getExceptionName(e),{exception:se.dump(e)})}return null},se.setStorage=function(t,e,n){var r=se._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){se._canUseLocalStorage=!1,t.throwInternal(m.WARNING,v,"Browser failed write to local storage. "+se.getExceptionName(e),{exception:se.dump(e)})}return!1},se.removeStorage=function(t,e){var n=se._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){se._canUseLocalStorage=!1,t.throwInternal(m.WARNING,_,"Browser failed removal of local storage item. "+se.getExceptionName(e),{exception:se.dump(e)})}return!1},se._getSessionStorageObject=function(){return se.canUseSessionStorage()?se._getVerifiedStorageObject(i.SessionStorage):null},se.canUseSessionStorage=function(){return void 0===se._canUseSessionStorage&&(se._canUseSessionStorage=!!se._getVerifiedStorageObject(i.SessionStorage)),se._canUseSessionStorage},se.getSessionStorageKeys=function(){var e=[];if(se.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},se.getSessionStorage=function(t,e){var n=se._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){se._canUseSessionStorage=!1,t.throwInternal(m.WARNING,h,"Browser failed read of session storage. "+se.getExceptionName(e),{exception:se.dump(e)})}return null},se.setSessionStorage=function(t,e,n){var r=se._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){se._canUseSessionStorage=!1,t.throwInternal(m.WARNING,y,"Browser failed write to session storage. "+se.getExceptionName(e),{exception:se.dump(e)})}return!1},se.removeSessionStorage=function(t,e){var n=se._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){se._canUseSessionStorage=!1,t.throwInternal(m.WARNING,I,"Browser failed removal of session storage item. "+se.getExceptionName(e),{exception:se.dump(e)})}return!1},se.disableCookies=function(){g.disableCookies()},se.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==se.document.cookie}catch(e){t.throwInternal(m.WARNING,V,"Cannot access document.cookie - "+se.getExceptionName(e),{exception:se.dump(e)})}}return g._canUseCookies},se.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),se.document.location&&"https:"===se.document.location.protocol&&(a=";secure"),se.canUseCookies(e)&&(se.document.cookie=t+"="+n+i+";path=/"+a)},se.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},se.getCookie=function(e,t){if(se.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=se.document.cookie.split(";"),a=0;a<i.length;a++){var s=i[a];if((s=se.trim(s))&&0===s.indexOf(r)){n=s.substring(r.length,i[a].length);break}}return n}},se.deleteCookie=function(e,t){se.canUseCookies(e)&&(se.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},se.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},se.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},se.random32=function(){return 4294967296*Math.random()|0},se.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=se.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},se.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},se.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},se.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},se.toISOStringForIE8=function(e){if(se.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},se.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},se.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},se.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},se.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},se.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},se.addEventHandler=function(e,t){if("undefined"==typeof window||!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},se.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},se.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},se.document="undefined"!=typeof document?document:{},se._canUseLocalStorage=void 0,se._canUseSessionStorage=void 0,se._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],se.NotSpecified="not_specified",se);function se(){}var oe=(le.parseUrl=function(e){return le.htmlAnchorElement||(le.htmlAnchorElement=le.document.createElement?le.document.createElement("a"):{host:le.parseHost(e)}),le.htmlAnchorElement.href=e,le.htmlAnchorElement},le.getAbsoluteUrl=function(e){var t,n=le.parseUrl(e);return n&&(t=n.href),t},le.getPathName=function(e){var t,n=le.parseUrl(e);return n&&(t=n.pathname),t},le.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},le.parseHost=function(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=t&&2<t.length&&"string"==typeof t[2]&&0<t[2].length?t[2]:null},le.document="undefined"!=typeof document?document:{},le);function le(){}var ue=(ce.ParseDependencyPath=function(e,t,n,r){var i,a=r,s=r;if(t&&0<t.length){var o=oe.parseUrl(t);if(i=o.host,!a)if(null!=o.pathname){var l=0===o.pathname.length?"/":o.pathname;"/"!==l.charAt(0)&&(l="/"+l),s=o.pathname,a=re.sanitizeString(e,n?n+" "+l:l)}else a=re.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:s}},ce);function ce(){}pe.Now="undefined"==typeof window?function(){return(new Date).getTime()}:window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},pe.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n};function pe(){}var fe,de="ProcessLegacy",he="http.method",ge=(t(me,fe=function(){}),me);function me(){return fe.call(this)||this}var ve,ye=(t(_e,ve=function(){this.ver=1,this.sampleRate=100,this.tags={}}),_e);function _e(e,t,n){var r=ve.call(this)||this;return r.name=re.sanitizeString(e,n)||ae.NotSpecified,r.data=t,r.time=ae.toISOStringForIE8(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100==r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}function Ie(){}var Se,be=(t(we,Se=Ie),we);function we(){var e=Se.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ne,xe=(t(Ee,Ne=be),Ee.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Ee.dataType="EventData",Ee);function Ee(e,t,n,r){var i=Ne.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=re.sanitizeString(e,t)||ae.NotSpecified,i.properties=re.sanitizeProperties(e,n),i.measurements=re.sanitizeMeasurements(e,r),i}function Ce(){}var Ae,Te=(t(De,Ae=Ie),De);function De(){var e=Ae.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function Re(){this.hasFullStack=!0,this.parsedStack=[]}var Le,Me=(t(Ue,Le=Te),Ue.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Pe.CreateFromInterface(t,e)});return new Ue(t,p({},e,{exceptions:n}))},Ue.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.ver,s=e.problemGroup,o=e.id,l=e.isManual;return{ver:a,exceptions:t instanceof Array&&t.map(function(e){return e.toInterface()})||void 0,severityLevel:i,properties:n,measurements:r,problemGroup:s,id:o,isManual:l}},Ue.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Ue.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Ue.dataType="ExceptionData",Ue);function Ue(e,t,n,r,i,a){var s=Le.call(this)||this;return s.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(s.exceptions=[new Pe(e,t)],s.properties=re.sanitizeProperties(e,n),s.measurements=re.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)):(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),g.isNullOrUndefined(t.ver)||(s.ver=t.ver),g.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)),s}var Oe,Pe=(t(ke,Oe=Re),ke.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&this.parsedStack.map(function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||void 0}},ke.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return Be.CreateFromInterface(e)})||t.parsedStack;return new ke(e,p({},t,{parsedStack:n}))},ke.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var s=n[a];if(Be.regex.test(s)){var o=new Be(n[a],r++);i+=o.sizeInBytes,t.push(o)}}if(32768<i)for(var l=0,u=t.length-1,c=0,p=l,f=u;l<u;){if(32768<(c+=t[l].sizeInBytes+t[u].sizeInBytes)){var d=f-p+1;t.splice(p,d);break}p=l,f=u,l++,u--}}return t},ke);function ke(e,t){var n=Oe.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=re.sanitizeString(e,t.name)||ae.NotSpecified,n.message=re.sanitizeMessage(e,t.message)||ae.NotSpecified;var r=t.stack;n.parsedStack=ke.parseStack(r),n.stack=re.sanitizeException(e,r),n.hasFullStack=ae.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var ze,Be=(t(Ge,ze=Ce),Ge.CreateFromInterface=function(e){return new Ge(e,null)},Ge.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Ge.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Ge.baseSize=58,Ge);function Ge(e,t){var n=ze.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=ae.trim(r),n.fileName="",n.line=0;var i=r.match(Ge.regex);i&&5<=i.length&&(n.method=ae.trim(i[2])||n.method,n.fileName=ae.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=Ge.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Fe,qe,He,Xe=(t(je,Fe=Ie),je);function je(){var e=Fe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(He=qe=qe||{})[He.Measurement=0]="Measurement",He[He.Aggregation=1]="Aggregation";var We,Ve=(t(Ke,We=function(){this.kind=qe.Measurement}),Ke);function Ke(){var e=null!==We&&We.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Ye,Je=(t(Ze,Ye=Xe),Ze.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ze.dataType="MetricData",Ze);function Ze(e,t,n,r,i,a,s){var o=Ye.call(this)||this;o.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new Ve;return l.count=0<r?r:void 0,l.max=isNaN(a)||null===a?void 0:a,l.min=isNaN(i)||null===i?void 0:i,l.name=re.sanitizeString(e,t)||ae.NotSpecified,l.value=n,o.metrics=[l],o.properties=re.sanitizeProperties(e,s),o}var Qe,$e=(t(et,Qe=be),et);function et(){var e=Qe.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var tt,nt=(t(rt,tt=$e),rt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",rt.dataType="PageviewData",rt);function rt(e,t,n,r,i,a,s){var o=tt.call(this)||this;return o.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},o.id=re.sanitizeId(e,s),o.url=re.sanitizeUrl(e,n),o.name=re.sanitizeString(e,t)||ae.NotSpecified,isNaN(r)||(o.duration=ae.msToTimeSpan(r)),o.properties=re.sanitizeProperties(e,i),o.measurements=re.sanitizeMeasurements(e,a),o}var it,at=(t(st,it=Ie),st);function st(){var e=it.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var ot,lt=(t(ut,ot=at),ut.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",ut.dataType="RemoteDependencyData",ut);function ut(e,t,n,r,i,a,s,o,l,u,c){void 0===l&&(l="Ajax");var p=ot.call(this)||this;p.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},p.id=t,p.duration=ae.msToTimeSpan(i),p.success=a,p.resultCode=s+"",p.type=re.sanitizeString(e,l);var f=ue.ParseDependencyPath(e,n,o,r);return p.data=re.sanitizeUrl(e,r)||f.data,p.target=re.sanitizeString(e,f.target),p.name=re.sanitizeString(e,f.name),p.properties=re.sanitizeProperties(e,u),p.measurements=re.sanitizeMeasurements(e,c),p}var ct,pt=(t(ft,ct=Ie),ft);function ft(){var e=ct.call(this)||this;return e.ver=2,e.properties={},e}var dt,ht=(t(gt,dt=pt),gt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",gt.dataType="MessageData",gt);function gt(e,t,n,r){var i=dt.call(this)||this;return i.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||ae.NotSpecified,i.message=re.sanitizeMessage(e,t),i.properties=re.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var mt,vt=(t(yt,mt=$e),yt);function yt(){var e=mt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var _t,It=(t(St,_t=vt),St.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",St.dataType="PageviewPerformanceData",St);function St(e,t,n,r,i,a,s){var o=_t.call(this)||this;return o.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},o.url=re.sanitizeUrl(e,n),o.name=re.sanitizeString(e,t)||ae.NotSpecified,o.properties=re.sanitizeProperties(e,i),o.measurements=re.sanitizeMeasurements(e,a),s&&(o.domProcessing=s.domProcessing,o.duration=s.duration,o.networkConnect=s.networkConnect,o.perfTotal=s.perfTotal,o.receivedResponse=s.receivedResponse,o.sentRequest=s.sentRequest),o}var bt,wt,Nt,xt=(t(Et,bt=ge),Et);function Et(e,t){var n=bt.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(Nt=wt=wt||{})[Nt.Verbose=0]="Verbose",Nt[Nt.Information=1]="Information",Nt[Nt.Warning=2]="Warning",Nt[Nt.Error=3]="Error",Nt[Nt.Critical=4]="Critical";var Ct=(At.getConfig=function(e,t,n,r){var i;return void 0===r&&(r=!1),i=n&&e.extensionConfig&&e.extensionConfig[n]&&!g.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],g.isNullOrUndefined(i)?r:i},At);function At(){}var Tt=function(){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.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},Dt=new Tt,Rt=(Lt.prototype.enqueue=function(e){this._buffer.push(e)},Lt.prototype.count=function(){return this._buffer.length},Lt.prototype.clear=function(){this._buffer.length=0},Lt.prototype.getItems=function(){return this._buffer.slice(0)},Lt.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},Lt.prototype.markAsSent=function(e){this.clear()},Lt.prototype.clearSent=function(e){},Lt);function Lt(e){this._config=e,this._buffer=[]}var Mt=(Ut.prototype.enqueue=function(e){this._buffer.length>=Ut.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(m.WARNING,W,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(Ut.BUFFER_KEY,this._buffer))},Ut.prototype.count=function(){return this._buffer.length},Ut.prototype.clear=function(){this._buffer.length=0,this.setBuffer(Ut.BUFFER_KEY,[]),this.setBuffer(Ut.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},Ut.prototype.getItems=function(){return this._buffer.slice(0)},Ut.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},Ut.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(Ut.BUFFER_KEY,this._buffer);var t=this.getBuffer(Ut.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>Ut.MAX_BUFFER_SIZE&&(this._logger.throwInternal(m.CRITICAL,W,"Sent buffer reached its maximum size: "+t.length,!0),t.length=Ut.MAX_BUFFER_SIZE),this.setBuffer(Ut.SENT_BUFFER_KEY,t))},Ut.prototype.clearSent=function(e){var t=this.getBuffer(Ut.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(Ut.SENT_BUFFER_KEY,t)},Ut.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var r in t){var i=!1;for(var a in e)if(e[a]===t[r]){i=!0;break}i||n.push(t[r])}return n},Ut.prototype.getBuffer=function(e){var t=e;try{t=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+t:t;var n=ae.getSessionStorage(this._logger,t);if(n){var r=JSON.parse(n);if(r)return r}}catch(e){this._logger.throwInternal(m.CRITICAL,R," storage key: "+t+", "+ae.getExceptionName(e),{exception:ae.dump(e)})}return[]},Ut.prototype.setBuffer=function(e,t){var n=e;try{n=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+n:n;var r=JSON.stringify(t);ae.setSessionStorage(this._logger,n,r)}catch(e){ae.setSessionStorage(this._logger,n,JSON.stringify([])),this._logger.throwInternal(m.WARNING,D," storage key: "+n+", "+ae.getExceptionName(e)+". Buffer cleared",{exception:ae.dump(e)})}},Ut.BUFFER_KEY="AI_buffer",Ut.SENT_BUFFER_KEY="AI_sentBuffer",Ut.MAX_BUFFER_SIZE=2e3,Ut);function Ut(e,t){this._bufferFullMessageSent=!1,this._logger=e,this._config=t;var n=this.getBuffer(Ut.BUFFER_KEY),r=this.getBuffer(Ut.SENT_BUFFER_KEY);this._buffer=n.concat(r),this._buffer.length>Ut.MAX_BUFFER_SIZE&&(this._buffer.length=Ut.MAX_BUFFER_SIZE),this.setBuffer(Ut.SENT_BUFFER_KEY,[]),this.setBuffer(Ut.BUFFER_KEY,this._buffer)}var Ot=(Pt.extractProperties=function(e){var t=null;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"number"!=typeof r&&((t=t||{})[n]=r)}return t},Pt.extractPropsAndMeasurements=function(e,t,n){if(!g.isNullOrUndefined(e))for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];"number"==typeof i?n[r]=i:t[r]="string"==typeof i?i:JSON.stringify(i)}},Pt.createEnvelope=function(e,t,n,r){var i=new ye(e,r,t);i.iKey=n.iKey;var a=n.iKey.replace(/-/g,"");return i.name=i.name.replace("{0}",a),Pt.extractPartAExtensions(n,i),n.tags||(n.tags=[]),i},Pt.extractPartAExtensions=function(n,e){if(e.tags||(e.tags={}),n.ext||(n.ext={}),n.tags||(n.tags=[]),n.ext.user){n.ext.user.authId&&(e.tags[Dt.userAuthUserId]=n.ext.user.authId);var t=n.ext.user.id||n.ext.user.localId;t&&(e.tags[Dt.userId]=t)}if(n.ext.app&&n.ext.app.sesId&&(e.tags[Dt.sessionId]=n.ext.app.sesId),n.ext.device&&((n.ext.device.id||n.ext.device.localId)&&(e.tags[Dt.deviceId]=n.ext.device.id||n.ext.device.localId),n.ext.device.deviceClass&&(e.tags[Dt.deviceType]=n.ext.device.deviceClass),n.ext.device.ip&&(e.tags[Dt.deviceIp]=n.ext.device.ip)),n.ext.web){var r=n.ext.web;r.browserLang&&(e.tags[Dt.deviceLanguage]=r.browserLang),r.browserVer&&(e.tags[Dt.deviceBrowserVersion]=r.browserVer),r.browser&&(e.tags[Dt.deviceBrowser]=r.browser),e.data=e.data||{},e.data.baseData=e.data.baseData||{},e.data.baseData.properties=e.data.baseData.properties||{},r.domain&&(e.data.baseData.properties.domain=r.domain),r.isManual&&(e.data.baseData.properties.isManual=r.isManual.toString()),r.screenRes&&(e.data.baseData.properties.screenRes=r.screenRes),r.userConsent&&(e.data.baseData.properties.userConsent=r.userConsent.toString())}n.ext.device&&n.ext.device.model&&(e.tags[Dt.deviceModel]=n.ext.device.model),n.ext.os&&n.ext.os.name&&(e.tags[Dt.deviceOS]=n.ext.os.name),n.ext.device&&n.ext.device.deviceType&&(e.tags[Dt.deviceType]=n.ext.device.deviceType),n.ext.trace&&(n.ext.trace.parentID&&(e.tags[Dt.operationParentId]=n.ext.trace.parentID),n.ext.trace.name&&(e.tags[Dt.operationName]=n.ext.trace.name),n.ext.trace.traceID&&(e.tags[Dt.operationId]=n.ext.trace.traceID));for(var i={},a=function(e){var t=n.tags[e];Object.keys(t).forEach(function(e){i[e]=t[e]}),n.tags.splice(e,1)},s=n.tags.length-1;0<=s;s--)a(s);for(var o in n.tags)i[o]=n.tags[o];e.tags=p({},e.tags,i),e.tags[Dt.internalSdkVersion]||(e.tags[Dt.internalSdkVersion]="javascript:"+Pt.Version)},Pt.Version="2.2.0",Pt);function Pt(){}var kt,zt=(t(Bt,kt=Ot),Bt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData.measurements||{},r=t.baseData.properties||{};Ot.extractPropsAndMeasurements(t.data,r,n);var i=t.baseData;if(g.isNullOrUndefined(i))return e.warnToConsole("Invalid input for dependency data"),null;var a=i.id,s=i.target,o=i.name,l=i.duration,u=i.success,c=i.responseCode,p=i.type,f=i.properties&&i.properties[he]?i.properties[he]:"GET",d=new lt(e,a,s,o,l,u,c,f,p,r,n),h=new xt(lt.dataType,d);return Ot.createEnvelope(e,lt.envelopeType,t,h)},Bt.DependencyEnvelopeCreator=new Bt,Bt);function Bt(){return null!==kt&&kt.apply(this,arguments)||this}var Gt,Ft=(t(qt,Gt=Ot),qt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n={},r={};t.baseType!==xe.dataType&&(n.baseTypeSource=t.baseType),t.baseType===xe.dataType?(n=t.baseData.properties||{},r=t.baseData.measurements||{}):t.baseData&&Ot.extractPropsAndMeasurements(t.baseData,n,r),Ot.extractPropsAndMeasurements(t.data,n,r);var i=t.baseData.name,a=new xe(e,i,n,r),s=new xt(xe.dataType,a);return Ot.createEnvelope(e,xe.envelopeType,t,s)},qt.EventEnvelopeCreator=new qt,qt);function qt(){return null!==Gt&&Gt.apply(this,arguments)||this}var Ht,Xt=(t(jt,Ht=Ot),jt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData,r=Me.CreateFromInterface(e,n),i=new xt(Me.dataType,r);return Ot.createEnvelope(e,Me.envelopeType,t,i)},jt.ExceptionEnvelopeCreator=new jt,jt);function jt(){return null!==Ht&&Ht.apply(this,arguments)||this}var Wt,Vt=(t(Kt,Wt=Ot),Kt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties||{},r=Ot.extractProperties(t.data);r=p({},n,r);var i=t.baseData.name,a=t.baseData.average,s=t.baseData.sampleCount,o=t.baseData.min,l=t.baseData.max,u=new Je(e,i,a,s,o,l,r),c=new xt(Je.dataType,u);return Ot.createEnvelope(e,Je.envelopeType,t,c)},Kt.MetricEnvelopeCreator=new Kt,Kt);function Kt(){return null!==Wt&&Wt.apply(this,arguments)||this}var Yt,Jt=(t(Zt,Yt=Ot),Zt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=void 0;g.isNullOrUndefined(t.baseData)||g.isNullOrUndefined(t.baseData.properties)||g.isNullOrUndefined(t.baseData.properties.duration)?g.isNullOrUndefined(t.data)||g.isNullOrUndefined(t.data.duration)||(n=t.data.duration,delete t.data.duration):(n=t.baseData.properties.duration,delete t.baseData.properties.duration);var r,i=t.baseData;t.ext&&t.ext.trace&&t.ext.trace.traceID&&(r=t.ext.trace.traceID);var a=i.id||r,s=i.name,o=i.uri,l=i.properties||{},u=i.measurements||{};if(g.isNullOrUndefined(i.refUri)||(l.refUri=i.refUri),g.isNullOrUndefined(i.pageType)||(l.pageType=i.pageType),g.isNullOrUndefined(i.isLoggedIn)||(l.isLoggedIn=i.isLoggedIn.toString()),!g.isNullOrUndefined(i.properties)){var c=i.properties;for(var p in c)c.hasOwnProperty(p)&&(l[p]=c[p])}Ot.extractPropsAndMeasurements(t.data,l,u);var f=new nt(e,s,o,n,l,u,a),d=new xt(nt.dataType,f);return Ot.createEnvelope(e,nt.envelopeType,t,d)},Zt.PageViewEnvelopeCreator=new Zt,Zt);function Zt(){return null!==Yt&&Yt.apply(this,arguments)||this}var Qt,$t=(t(en,Qt=Ot),en.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData,r=n.name,i=n.uri||n.url,a=n.properties||{},s=n.measurements||{};Ot.extractPropsAndMeasurements(t.data,a,s);var o=new It(e,r,i,void 0,a,s,n),l=new xt(It.dataType,o);return Ot.createEnvelope(e,It.envelopeType,t,l)},en.PageViewPerformanceEnvelopeCreator=new en,en);function en(){return null!==Qt&&Qt.apply(this,arguments)||this}var tn,nn=(t(rn,tn=Ot),rn.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,r=t.baseData.severityLevel,i=Ot.extractProperties(t.data),a=p({},i,t.baseData.properties),s=new ht(e,n,r,a),o=new xt(ht.dataType,s);return Ot.createEnvelope(e,ht.envelopeType,t,o)},rn.TraceEnvelopeCreator=new rn,rn);function rn(){return null!==tn&&tn.apply(this,arguments)||this}var an=(sn.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},sn.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",r={};if(!e)return this._logger.throwInternal(m.CRITICAL,O,"cannot serialize object because it is null or undefined",{name:t},!0),r;if(e[n])return this._logger.throwInternal(m.WARNING,k,"Circular reference detected while serializing object",{name:t},!0),r;if(!e.aiDataContract){if("measurements"===t)r=this._serializeStringMap(e,"number",t);else if("properties"===t)r=this._serializeStringMap(e,"string",t);else if("tags"===t)r=this._serializeStringMap(e,"string",t);else if(ae.isArray(e))r=this._serializeArray(e,t);else{this._logger.throwInternal(m.WARNING,P,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),r=e}catch(e){this._logger.throwInternal(m.CRITICAL,O,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return r}for(var i in e[n]=!0,e.aiDataContract){var a,s=e.aiDataContract[i],o="function"==typeof s?s()&d.Required:s&d.Required,l="function"==typeof s?s()&d.Hidden:s&d.Hidden,u=s&d.Array,c=void 0!==e[i],p="object"==typeof e[i]&&null!==e[i];!o||c||u?l||void 0!==(a=p?u?this._serializeArray(e[i],i):this._serializeObject(e[i],i):e[i])&&(r[i]=a):this._logger.throwInternal(m.CRITICAL,x,"Missing required field specification. The field is required but not present on source",{field:i,name:t})}return delete e[n],r},sn.prototype._serializeArray=function(e,t){var n=void 0;if(e)if(ae.isArray(e)){n=[];for(var r=0;r<e.length;r++){var i=e[r],a=this._serializeObject(i,t+"["+r+"]");n.push(a)}}else this._logger.throwInternal(m.CRITICAL,B,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},sn.prototype._serializeStringMap=function(e,t,n){var r=void 0;if(e)for(var i in r={},e){var a=e[i];if("string"===t)void 0===a?r[i]="undefined":null===a?r[i]="null":a.toString?r[i]=a.toString():r[i]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===a)r[i]="undefined";else if(null===a)r[i]="null";else{var s=parseFloat(a);isNaN(s)?r[i]="NaN":r[i]=s}else r[i]="invalid field: "+n+" is of unknown type.",this._logger.throwInternal(m.CRITICAL,r[i],null,!0)}return r},sn);function sn(e){this._logger=e}function on(){this._onlineStatus=!0;try{"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}catch(e){this.isListening=!1}}var ln=(on.prototype._setOnline=function(){this._onlineStatus=!0},on.prototype._setOffline=function(){this._onlineStatus=!1},on.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!(navigator&&!g.isNullOrUndefined(navigator.onLine))||navigator.onLine},on.prototype.isOffline=function(){return!this.isOnline()},on.Offline=new on,on).Offline,un=(cn.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/cn.INT_MAX_VALUE*100},cn.prototype.getHashCode=function(e){if(""==e)return 0;for(;e.length<cn.MIN_INPUT_LENGTH;)e=e.concat(e);for(var t=5381,n=0;n<e.length;++n)t=(t<<5)+t+e.charCodeAt(n),t&=t;return Math.abs(t)},cn.INT_MAX_VALUE=2147483647,cn.MIN_INPUT_LENGTH=8,cn);function cn(){}var pn=(fn.prototype.getSamplingScore=function(e){return e.tags&&e.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.userId]):e.ext&&e.ext.user&&e.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()},fn);function fn(){this.hashCodeGeneragor=new un,this.keys=new Tt}var dn=(hn.prototype.isSampledIn=function(e){var t=this.sampleRate;return null==t||100<=t||e.baseType===Je.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},hn);function hn(e,t){this.INT_MAX_VALUE=2147483647,g.isNullOrUndefined(t)?this._logger=new Q:this._logger=t,(100<e||e<0)&&(this._logger.throwInternal(m.WARNING,q,"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:e},!0),this.sampleRate=100),this.sampleRate=e,this.samplingScoreGenerator=new pn}var gn=(mn.prototype.pause=function(){throw new Error("Method not implemented.")},mn.prototype.resume=function(){throw new Error("Method not implemented.")},mn.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(m.CRITICAL,w,"flush failed, telemetry will not be collected: "+ae.getExceptionName(e),{exception:ae.dump(e)})}},mn.prototype.teardown=function(){throw new Error("Method not implemented.")},mn.prototype.initialize=function(t,e,n){var r=this;this._logger=e.logger,this._serializer=new an(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var i=mn._getDefaultAppInsightsChannelConfig();function a(e){s._config[e]=function(){return Ct.getConfig(t,e,r.identifier,i[e]())}}this._config=mn._getEmptyAppInsightsChannelConfig();var s=this;for(var o in i)a(o);this._buffer=this._config.enableSessionStorageBuffer&&ae.canUseSessionStorage()?new Mt(this._logger,this._config):new Rt(this._config),this._sample=new dn(this._config.samplingPercentage(),this._logger),!this._config.isBeaconApiDisabled()&&ae.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))},mn.prototype.processTelemetry=function(e){var t=this;try{if(this._config.disableTelemetry())return;if(!e)return void this._logger.throwInternal(m.CRITICAL,S,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void this._logger.throwInternal(m.CRITICAL,Y,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!this._sender)return void this._logger.throwInternal(m.CRITICAL,C,"Sender was not initialized");if(!this._isSampledIn(e))return void this._logger.throwInternal(m.WARNING,A,"Telemetry item was sampled out and not sent",{SampleRate:this._sample.sampleRate});e.tags=e.tags||{},e.tags.sampleRate=this._sample.sampleRate;var n=mn.constructEnvelope(e,this._config.instrumentationKey(),this._logger);if(!n)return void this._logger.throwInternal(m.CRITICAL,U,"Unable to create an AppInsights envelope");var r=!1;if(e.tags&&e.tags[de]&&(e.tags[de].forEach(function(e){try{e&&!1===e(n)&&(r=!0,t._logger.warnToConsole("Telemetry processor check returns false"))}catch(e){t._logger.throwInternal(m.CRITICAL,X,"One of telemetry initializers failed, telemetry item will not be sent: "+ae.getExceptionName(e),{exception:ae.dump(e)},!0)}}),delete e.tags[de]),r)return;var i=this._serializer.serialize(n),a=this._buffer.getItems(),s=this._buffer.batchPayloads(a);s&&s.length+i.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(i),this._setupTimer()}catch(e){this._logger.throwInternal(m.WARNING,b,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+ae.getExceptionName(e),{exception:ae.dump(e)})}g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},mn.prototype.setNextPlugin=function(e){this._nextPlugin=e},mn.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var r=null;this._appId||(r=this._parseResponse(e.responseText||e.response))&&r.appId&&(this._appId=r.appId),(e.status<200||300<=e.status)&&0!==e.status?!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(m.WARNING,T,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e)):ln.isOffline()?this._config.isRetryDisabled()||(this._resendPayload(t,10),this._logger.throwInternal(m.WARNING,T,". Offline - Response Code: "+e.status+". Offline status: "+ln.isOffline()+". Will retry to send "+t.length+" items.")):206===e.status?(r=r||this._parseResponse(e.responseText||e.response))&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,r):this._onError(t,this._formatErrorMessageXhr(e)):(this._consecutiveErrors=0,this._onSuccess(t,n))}},mn.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!ae.getIEVersion()||9<ae.getIEVersion())&&this._logger.throwInternal(m.CRITICAL,T,"Telemetry transmission failed, some telemetry will be lost: "+ae.getExceptionName(e),{exception:ae.dump(e)})}},mn.prototype._onError=function(e,t,n){this._logger.throwInternal(m.WARNING,E,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},mn.prototype._onPartialSuccess=function(e,t){for(var n=[],r=[],i=0,a=t.errors.reverse();i<a.length;i++){var s=a[i],o=e.splice(s.index,1)[0];this._isRetriable(s.statusCode)?r.push(o):n.push(o)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<r.length&&(this._resendPayload(r),this._logger.throwInternal(m.WARNING,T,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+r.length+" our of "+t.itemsReceived+" items"))},mn.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},mn.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)},mn.constructEnvelope=function(e,t,n){var r;switch((r=t===e.iKey||g.isNullOrUndefined(t)?e:p({},e,{iKey:t})).baseType){case xe.dataType:return Ft.EventEnvelopeCreator.Create(n,r);case ht.dataType:return nn.TraceEnvelopeCreator.Create(n,r);case nt.dataType:return Jt.PageViewEnvelopeCreator.Create(n,r);case It.dataType:return $t.PageViewPerformanceEnvelopeCreator.Create(n,r);case Me.dataType:return Xt.ExceptionEnvelopeCreator.Create(n,r);case Je.dataType:return Vt.MetricEnvelopeCreator.Create(n,r);case lt.dataType:return zt.DependencyEnvelopeCreator.Create(n,r);default:return Ft.EventEnvelopeCreator.Create(n,r)}},mn._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},mn._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},mn.prototype._isSampledIn=function(e){return this._sample.isSampledIn(e)},mn.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),r=this._buffer.batchPayloads(e),i=new Blob([r],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,i)?(this._buffer.markAsSent(e),this._onSuccess(e,e.length)):(this._xhrSender(e,!0),this._logger.throwInternal(m.WARNING,T,". Failed to send telemetry with Beacon API, retried with xhrSender."))},mn.prototype._xhrSender=function(t,e){var n=this,r=new XMLHttpRequest;r.Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,r.open("POST",this._config.endpointUrl(),e),r.setRequestHeader("Content-type","application/json"),ae.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&r.setRequestHeader(te.sdkContextHeader,te.sdkContextHeaderAppIdRequest),r.onreadystatechange=function(){return n._xhrReadyStateChange(r,t,t.length)},r.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(r),e)};var i=this._buffer.batchPayloads(t);r.send(i),this._buffer.markAsSent(t)},mn.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(m.CRITICAL,L,"Cannot parse the response. "+ae.getExceptionName(e),{response:t})}return null},mn.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,r=e;n<r.length;n++){var i=r[n];this._buffer.enqueue(i)}this._setRetryTime(t),this._setupTimer()}},mn.prototype._setRetryTime=function(e){var t;if(this._consecutiveErrors<=1)t=10;else{var n=(Math.pow(2,this._consecutiveErrors)-1)/2,r=Math.floor(Math.random()*n*10)+1;r*=e,t=Math.max(Math.min(r,3600),10)}var i=Date.now()+1e3*t;this._retryAt=i},mn.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)}},mn.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},mn.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},mn.prototype._xdrSender=function(t,e){var n=this,r=new XDomainRequest;r.onload=function(){return n._xdrOnLoad(r,t)},r.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(r),e)};var i=window.location&&window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(i,0))return this._logger.throwInternal(m.WARNING,T,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var a=this._config.endpointUrl().replace(/^(https?:)/,"");r.open("POST",a);var s=this._buffer.batchPayloads(t);r.send(s),this._buffer.markAsSent(t)},mn.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},mn);function mn(){this.priority=1001,this.identifier="AppInsightsChannelPlugin",this._XMLHttpRequestSupported=!1}e.Sender=gn,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-channel-js.min.js.map

@@ -186,3 +186,3 @@ import * as tslib_1 from "tslib";

};
EnvelopeCreator.Version = "2.1.1";
EnvelopeCreator.Version = "2.2.0";
return EnvelopeCreator;

@@ -360,2 +360,3 @@ }());

}
EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, properties, measurements);
var baseData = new PageView(logger, name, url, duration, properties, measurements, id);

@@ -382,4 +383,5 @@ var data = new Data(PageView.dataType, baseData);

var url = bd.uri || bd.url;
var properties = bd.properties;
var measurements = bd.measurements;
var properties = bd.properties || {};
var measurements = bd.measurements || {};
EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, properties, measurements);
var baseData = new PageViewPerformance(logger, name, url, undefined, properties, measurements, bd);

@@ -386,0 +388,0 @@ var data = new Data(PageViewPerformance.dataType, baseData);

/*!
* Application Insights JavaScript SDK - Channel, 2.1.1
* Application Insights JavaScript SDK - Channel, 2.2.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=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])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i,n,d,a,p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=i||(i={}))[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(a=d||(d={}))[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden";var g=(o.isNullOrUndefined=function(e){return null==e},o.disableCookies=function(){o._canUseCookies=!1},o.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(l,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},o);function o(){}var m,s,l=/[xy]/g;(s=m||(m={}))[s.CRITICAL=1]="CRITICAL",s[s.WARNING=2]="WARNING";var u=1,c=2,f=3,h=4,v=5,y=6,_=7,I=12,S=22,b=23,w=24,N=26,x=28,E=33,C=40,A=41,T=42,D=43,R=46,L=47,M=48,U=49,O=50,P=52,k=54,z=56,B=57,G=58,F=61,q=64,H=66,X=67,j=68,V=69,W=70,K=(Y.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},Y.dataType="MessageData",Y.AiNonUserActionablePrefix="AI (Internal): ",Y.AiUserActionablePrefix="AI: ",Y);function Y(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?Y.AiUserActionablePrefix:Y.AiNonUserActionablePrefix)+e;var i=(t?" message:"+Y.sanitizeDiagnosticText(t):"")+(r?" props:"+Y.sanitizeDiagnosticText(JSON.stringify(r)):"");this.message+=i}var J=(Z.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new K(t,n,i,r);if(this.enableDebugExceptions())throw a;if(void 0!==a&&a&&void 0!==a.message){if(i){var o=+a.messageId;(!this._messageLogged[o]||this.consoleLoggingLevel()>=m.WARNING)&&(this.warnToConsole(a.message),this._messageLogged[o]=!0)}else this.consoleLoggingLevel()>=m.WARNING&&this.warnToConsole(a.message);this.logInternalMessage(e,a)}},Z.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},Z.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Z.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,r=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[r]?n=!1:this._messageLogged[r]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var i="Internal events throttle limit per PageView reached for this app.",a=new K(b,i,!1);this.queue.push(a),this.warnToConsole(i)}}},Z.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Z);function Z(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},g.isNullOrUndefined(e)||(g.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),g.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),g.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),g.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}Q.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(Q.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),Q.prototype.initialize=function(n,r,i){var a=this;if(n.isCookieUseDisabled&&g.disableCookies(),this.channelQueue=new Array,n.channels){var o=void 0;n.channels.forEach(function(e){if(e&&0<e.length){if((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){e.priority<500&&(o=e.identifier),e.initialize(n,r,i)}),o)throw Error("Channel has invalid priority"+o);for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);a.channelQueue.push(e)}})}for(var e=new Array,t=0;t<i.length;t++){var s=i[t];500<s.priority&&e.push(s)}if(0<e.length){for((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,r,i)}),t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}};function Q(){this.identifier="ChannelControllerPlugin",this.priority=500}var $=(ee.requestContextHeader="Request-Context",ee.requestContextTargetKey="appId",ee.requestContextAppIdFormat="appId=cid-v1:",ee.requestIdHeader="Request-Id",ee.sdkContextHeader="Sdk-Context",ee.sdkContextHeaderAppIdRequest="appId",ee.requestContextHeaderLowerCase="request-context",ee);function ee(){}var te=(ne.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ne.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,ne.MAX_NAME_LENGTH-3)+ne.padNumber(a);i=o}return i},ne.sanitizeKey=function(e,t){var n;return t&&(t=ne.trim(t.toString())).length>ne.MAX_NAME_LENGTH&&(n=t.substring(0,ne.MAX_NAME_LENGTH),e.throwInternal(m.WARNING,B,"name is too long. It has been truncated to "+ne.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ne.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ne.MAX_STRING_LENGTH),t&&(n=n||ne.MAX_STRING_LENGTH,(t=ne.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(m.WARNING,F,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ne.sanitizeUrl=function(e,t){return ne.sanitizeInput(e,t,ne.MAX_URL_LENGTH,H)},ne.sanitizeMessage=function(e,t){var n;return t&&t.length>ne.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ne.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,z,"message is too long, it has been truncated to "+ne.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ne.sanitizeException=function(e,t){var n;return t&&t.length>ne.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ne.MAX_EXCEPTION_LENGTH),e.throwInternal(m.WARNING,P,"exception is too long, it has been truncated to "+ne.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ne.sanitizeProperties=function(t,e){if(e){var n={};for(var r in e){var i=e[r];if("object"==typeof i&&"undefined"!=typeof JSON)try{i=JSON.stringify(i)}catch(e){t.throwInternal(m.WARNING,U,"custom property is not valid",{exception:e},!0)}i=ne.sanitizeString(t,i,ne.MAX_PROPERTY_LENGTH),n[r=ne.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},ne.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ne.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ne.sanitizeId=function(e,t){return t?ne.sanitizeInput(e,t,ne.MAX_ID_LENGTH,V).toString():t},ne.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ne.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(m.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ne.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ne.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},ne.MAX_NAME_LENGTH=150,ne.MAX_ID_LENGTH=128,ne.MAX_PROPERTY_LENGTH=8192,ne.MAX_STRING_LENGTH=1024,ne.MAX_URL_LENGTH=2048,ne.MAX_MESSAGE_LENGTH=32768,ne.MAX_EXCEPTION_LENGTH=32768,ne);function ne(){}var re=(ie.disableStorage=function(){ie._canUseLocalStorage=!1,ie._canUseSessionStorage=!1},ie._getLocalStorageObject=function(){return ie.canUseLocalStorage()?ie._getVerifiedStorageObject(i.LocalStorage):null},ie._getVerifiedStorageObject=function(e){var t,n,r=null;try{if("undefined"==typeof window)return null;n=new Date,(r=e===i.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=r.getItem(n)!=n,r.removeItem(n),t&&(r=null)}catch(e){r=null}return r},ie.isInternalApplicationInsightsEndpoint=function(e){return-1!==ie._internalEndpoints.indexOf(e.toLowerCase())},ie.canUseLocalStorage=function(){return void 0===ie._canUseLocalStorage&&(ie._canUseLocalStorage=!!ie._getVerifiedStorageObject(i.LocalStorage)),ie._canUseLocalStorage},ie.getStorage=function(t,e){var n=ie._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){ie._canUseLocalStorage=!1,t.throwInternal(m.WARNING,u,"Browser failed read of local storage. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return null},ie.setStorage=function(t,e,n){var r=ie._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){ie._canUseLocalStorage=!1,t.throwInternal(m.WARNING,f,"Browser failed write to local storage. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return!1},ie.removeStorage=function(t,e){var n=ie._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){ie._canUseLocalStorage=!1,t.throwInternal(m.WARNING,v,"Browser failed removal of local storage item. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return!1},ie._getSessionStorageObject=function(){return ie.canUseSessionStorage()?ie._getVerifiedStorageObject(i.SessionStorage):null},ie.canUseSessionStorage=function(){return void 0===ie._canUseSessionStorage&&(ie._canUseSessionStorage=!!ie._getVerifiedStorageObject(i.SessionStorage)),ie._canUseSessionStorage},ie.getSessionStorageKeys=function(){var e=[];if(ie.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},ie.getSessionStorage=function(t,e){var n=ie._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){ie._canUseSessionStorage=!1,t.throwInternal(m.WARNING,c,"Browser failed read of session storage. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return null},ie.setSessionStorage=function(t,e,n){var r=ie._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){ie._canUseSessionStorage=!1,t.throwInternal(m.WARNING,h,"Browser failed write to session storage. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return!1},ie.removeSessionStorage=function(t,e){var n=ie._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){ie._canUseSessionStorage=!1,t.throwInternal(m.WARNING,y,"Browser failed removal of session storage item. "+ie.getExceptionName(e),{exception:ie.dump(e)})}return!1},ie.disableCookies=function(){g.disableCookies()},ie.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==ie.document.cookie}catch(e){t.throwInternal(m.WARNING,j,"Cannot access document.cookie - "+ie.getExceptionName(e),{exception:ie.dump(e)})}}return g._canUseCookies},ie.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),ie.document.location&&"https:"===ie.document.location.protocol&&(a=";secure"),ie.canUseCookies(e)&&(ie.document.cookie=t+"="+n+i+";path=/"+a)},ie.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},ie.getCookie=function(e,t){if(ie.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=ie.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=ie.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},ie.deleteCookie=function(e,t){ie.canUseCookies(e)&&(ie.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},ie.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},ie.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},ie.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},ie.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},ie.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},ie.toISOStringForIE8=function(e){if(ie.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},ie.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},ie.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},ie.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},ie.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},ie.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},ie.addEventHandler=function(e,t){if("undefined"==typeof window||!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},ie.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},ie.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},ie.document="undefined"!=typeof document?document:{},ie._canUseLocalStorage=void 0,ie._canUseSessionStorage=void 0,ie._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],ie.NotSpecified="not_specified",ie);function ie(){}var ae=(oe.parseUrl=function(e){return oe.htmlAnchorElement||(oe.htmlAnchorElement=oe.document.createElement?oe.document.createElement("a"):{host:oe.parseHost(e)}),oe.htmlAnchorElement.href=e,oe.htmlAnchorElement},oe.getAbsoluteUrl=function(e){var t,n=oe.parseUrl(e);return n&&(t=n.href),t},oe.getPathName=function(e){var t,n=oe.parseUrl(e);return n&&(t=n.pathname),t},oe.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},oe.parseHost=function(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=t&&2<t.length&&"string"==typeof t[2]&&0<t[2].length?t[2]:null},oe.document="undefined"!=typeof document?document:{},oe);function oe(){}var se=(le.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=ae.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var l=0===s.pathname.length?"/":s.pathname;"/"!==l.charAt(0)&&(l="/"+l),o=s.pathname,a=te.sanitizeString(e,n?n+" "+l:l)}else a=te.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},le);function le(){}ue.Now="undefined"==typeof window?function(){return(new Date).getTime()}:window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},ue.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n};function ue(){}var ce,pe="ProcessLegacy",fe="http.method",de=(t(he,ce=function(){}),he);function he(){return ce.call(this)||this}var ge,me=(t(ve,ge=function(){this.ver=1,this.sampleRate=100,this.tags={}}),ve);function ve(e,t,n){var r=ge.call(this)||this;return r.name=te.sanitizeString(e,n)||re.NotSpecified,r.data=t,r.time=re.toISOStringForIE8(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100==r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}function ye(){}var _e,Ie=(t(Se,_e=ye),Se);function Se(){var e=_e.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var be,we=(t(Ne,be=Ie),Ne.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Ne.dataType="EventData",Ne);function Ne(e,t,n,r){var i=be.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=te.sanitizeString(e,t)||re.NotSpecified,i.properties=te.sanitizeProperties(e,n),i.measurements=te.sanitizeMeasurements(e,r),i}function xe(){}var Ee,Ce=(t(Ae,Ee=ye),Ae);function Ae(){var e=Ee.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function Te(){this.hasFullStack=!0,this.parsedStack=[]}var De,Re=(t(Le,De=Ce),Le.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ue.CreateFromInterface(t,e)});return new Le(t,p({},e,{exceptions:n}))},Le.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.ver,o=e.problemGroup,s=e.id,l=e.isManual;return{ver:a,exceptions:t instanceof Array&&t.map(function(e){return e.toInterface()})||void 0,severityLevel:i,properties:n,measurements:r,problemGroup:o,id:s,isManual:l}},Le.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Le.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Le.dataType="ExceptionData",Le);function Le(e,t,n,r,i,a){var o=De.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ue(e,t)],o.properties=te.sanitizeProperties(e,n),o.measurements=te.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),g.isNullOrUndefined(t.ver)||(o.ver=t.ver),g.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Me,Ue=(t(Oe,Me=Te),Oe.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&this.parsedStack.map(function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||void 0}},Oe.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return ke.CreateFromInterface(e)})||t.parsedStack;return new Oe(e,p({},t,{parsedStack:n}))},Oe.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(ke.regex.test(o)){var s=new ke(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var l=0,u=t.length-1,c=0,p=l,f=u;l<u;){if(32768<(c+=t[l].sizeInBytes+t[u].sizeInBytes)){var d=f-p+1;t.splice(p,d);break}p=l,f=u,l++,u--}}return t},Oe);function Oe(e,t){var n=Me.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=te.sanitizeString(e,t.name)||re.NotSpecified,n.message=te.sanitizeMessage(e,t.message)||re.NotSpecified;var r=t.stack;n.parsedStack=Oe.parseStack(r),n.stack=te.sanitizeException(e,r),n.hasFullStack=re.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var Pe,ke=(t(ze,Pe=xe),ze.CreateFromInterface=function(e){return new ze(e,null)},ze.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},ze.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,ze.baseSize=58,ze);function ze(e,t){var n=Pe.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=re.trim(r),n.fileName="",n.line=0;var i=r.match(ze.regex);i&&5<=i.length&&(n.method=re.trim(i[2])||n.method,n.fileName=re.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=ze.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Be,Ge,Fe,qe=(t(He,Be=ye),He);function He(){var e=Be.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Fe=Ge||(Ge={}))[Fe.Measurement=0]="Measurement",Fe[Fe.Aggregation=1]="Aggregation";var Xe,je=(t(Ve,Xe=function(){this.kind=Ge.Measurement}),Ve);function Ve(){var e=null!==Xe&&Xe.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var We,Ke=(t(Ye,We=qe),Ye.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ye.dataType="MetricData",Ye);function Ye(e,t,n,r,i,a,o){var s=We.call(this)||this;s.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new je;return l.count=0<r?r:void 0,l.max=isNaN(a)||null===a?void 0:a,l.min=isNaN(i)||null===i?void 0:i,l.name=te.sanitizeString(e,t)||re.NotSpecified,l.value=n,s.metrics=[l],s.properties=te.sanitizeProperties(e,o),s}var Je,Ze=(t(Qe,Je=Ie),Qe);function Qe(){var e=Je.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var $e,et=(t(tt,$e=Ze),tt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",tt.dataType="PageviewData",tt);function tt(e,t,n,r,i,a,o){var s=$e.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=te.sanitizeId(e,o),s.url=te.sanitizeUrl(e,n),s.name=te.sanitizeString(e,t)||re.NotSpecified,isNaN(r)||(s.duration=re.msToTimeSpan(r)),s.properties=te.sanitizeProperties(e,i),s.measurements=te.sanitizeMeasurements(e,a),s}var nt,rt=(t(it,nt=ye),it);function it(){var e=nt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var at,ot=(t(st,at=rt),st.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",st.dataType="RemoteDependencyData",st);function st(e,t,n,r,i,a,o,s,l,u,c){void 0===l&&(l="Ajax");var p=at.call(this)||this;p.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},p.id=t,p.duration=re.msToTimeSpan(i),p.success=a,p.resultCode=o+"",p.type=te.sanitizeString(e,l);var f=se.ParseDependencyPath(e,n,s,r);return p.data=te.sanitizeUrl(e,r)||f.data,p.target=te.sanitizeString(e,f.target),p.name=te.sanitizeString(e,f.name),p.properties=te.sanitizeProperties(e,u),p.measurements=te.sanitizeMeasurements(e,c),p}var lt,ut=(t(ct,lt=ye),ct);function ct(){var e=lt.call(this)||this;return e.ver=2,e.properties={},e}var pt,ft=(t(dt,pt=ut),dt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",dt.dataType="MessageData",dt);function dt(e,t,n,r){var i=pt.call(this)||this;return i.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||re.NotSpecified,i.message=te.sanitizeMessage(e,t),i.properties=te.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var ht,gt=(t(mt,ht=Ze),mt);function mt(){var e=ht.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var vt,yt=(t(_t,vt=gt),_t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",_t.dataType="PageviewPerformanceData",_t);function _t(e,t,n,r,i,a,o){var s=vt.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=te.sanitizeUrl(e,n),s.name=te.sanitizeString(e,t)||re.NotSpecified,s.properties=te.sanitizeProperties(e,i),s.measurements=te.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var It,St,bt,wt=(t(Nt,It=de),Nt);function Nt(e,t){var n=It.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(bt=St||(St={}))[bt.Verbose=0]="Verbose",bt[bt.Information=1]="Information",bt[bt.Warning=2]="Warning",bt[bt.Error=3]="Error",bt[bt.Critical=4]="Critical";var xt=(Et.getConfig=function(e,t,n,r){var i;return void 0===r&&(r=!1),i=n&&e.extensionConfig&&e.extensionConfig[n]&&!g.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],g.isNullOrUndefined(i)?r:i},Et);function Et(){}var Ct=function(){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.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},At=new Ct,Tt=(Dt.prototype.enqueue=function(e){this._buffer.push(e)},Dt.prototype.count=function(){return this._buffer.length},Dt.prototype.clear=function(){this._buffer.length=0},Dt.prototype.getItems=function(){return this._buffer.slice(0)},Dt.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},Dt.prototype.markAsSent=function(e){this.clear()},Dt.prototype.clearSent=function(e){},Dt);function Dt(e){this._config=e,this._buffer=[]}var Rt=(Lt.prototype.enqueue=function(e){this._buffer.length>=Lt.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(m.WARNING,X,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(Lt.BUFFER_KEY,this._buffer))},Lt.prototype.count=function(){return this._buffer.length},Lt.prototype.clear=function(){this._buffer.length=0,this.setBuffer(Lt.BUFFER_KEY,[]),this.setBuffer(Lt.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},Lt.prototype.getItems=function(){return this._buffer.slice(0)},Lt.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},Lt.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(Lt.BUFFER_KEY,this._buffer);var t=this.getBuffer(Lt.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>Lt.MAX_BUFFER_SIZE&&(this._logger.throwInternal(m.CRITICAL,X,"Sent buffer reached its maximum size: "+t.length,!0),t.length=Lt.MAX_BUFFER_SIZE),this.setBuffer(Lt.SENT_BUFFER_KEY,t))},Lt.prototype.clearSent=function(e){var t=this.getBuffer(Lt.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(Lt.SENT_BUFFER_KEY,t)},Lt.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var r in t){var i=!1;for(var a in e)if(e[a]===t[r]){i=!0;break}i||n.push(t[r])}return n},Lt.prototype.getBuffer=function(e){var t=e;try{t=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+t:t;var n=re.getSessionStorage(this._logger,t);if(n){var r=JSON.parse(n);if(r)return r}}catch(e){this._logger.throwInternal(m.CRITICAL,T," storage key: "+t+", "+re.getExceptionName(e),{exception:re.dump(e)})}return[]},Lt.prototype.setBuffer=function(e,t){var n=e;try{n=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+n:n;var r=JSON.stringify(t);re.setSessionStorage(this._logger,n,r)}catch(e){re.setSessionStorage(this._logger,n,JSON.stringify([])),this._logger.throwInternal(m.WARNING,A," storage key: "+n+", "+re.getExceptionName(e)+". Buffer cleared",{exception:re.dump(e)})}},Lt.BUFFER_KEY="AI_buffer",Lt.SENT_BUFFER_KEY="AI_sentBuffer",Lt.MAX_BUFFER_SIZE=2e3,Lt);function Lt(e,t){this._bufferFullMessageSent=!1,this._logger=e,this._config=t;var n=this.getBuffer(Lt.BUFFER_KEY),r=this.getBuffer(Lt.SENT_BUFFER_KEY);this._buffer=n.concat(r),this._buffer.length>Lt.MAX_BUFFER_SIZE&&(this._buffer.length=Lt.MAX_BUFFER_SIZE),this.setBuffer(Lt.SENT_BUFFER_KEY,[]),this.setBuffer(Lt.BUFFER_KEY,this._buffer)}var Mt=(Ut.extractProperties=function(e){var t=null;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"number"!=typeof r&&(t||(t={}),t[n]=r)}return t},Ut.extractPropsAndMeasurements=function(e,t,n){if(!g.isNullOrUndefined(e))for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];"number"==typeof i?n[r]=i:t[r]="string"==typeof i?i:JSON.stringify(i)}},Ut.createEnvelope=function(e,t,n,r){var i=new me(e,r,t);i.iKey=n.iKey;var a=n.iKey.replace(/-/g,"");return i.name=i.name.replace("{0}",a),Ut.extractPartAExtensions(n,i),n.tags||(n.tags=[]),i},Ut.extractPartAExtensions=function(n,e){if(e.tags||(e.tags={}),n.ext||(n.ext={}),n.tags||(n.tags=[]),n.ext.user){n.ext.user.authId&&(e.tags[At.userAuthUserId]=n.ext.user.authId);var t=n.ext.user.id||n.ext.user.localId;t&&(e.tags[At.userId]=t)}if(n.ext.app&&n.ext.app.sesId&&(e.tags[At.sessionId]=n.ext.app.sesId),n.ext.device&&((n.ext.device.id||n.ext.device.localId)&&(e.tags[At.deviceId]=n.ext.device.id||n.ext.device.localId),n.ext.device.deviceClass&&(e.tags[At.deviceType]=n.ext.device.deviceClass),n.ext.device.ip&&(e.tags[At.deviceIp]=n.ext.device.ip)),n.ext.web){var r=n.ext.web;r.browserLang&&(e.tags[At.deviceLanguage]=r.browserLang),r.browserVer&&(e.tags[At.deviceBrowserVersion]=r.browserVer),r.browser&&(e.tags[At.deviceBrowser]=r.browser),e.data=e.data||{},e.data.baseData=e.data.baseData||{},e.data.baseData.properties=e.data.baseData.properties||{},r.domain&&(e.data.baseData.properties.domain=r.domain),r.isManual&&(e.data.baseData.properties.isManual=r.isManual.toString()),r.screenRes&&(e.data.baseData.properties.screenRes=r.screenRes),r.userConsent&&(e.data.baseData.properties.userConsent=r.userConsent.toString())}n.ext.device&&n.ext.device.model&&(e.tags[At.deviceModel]=n.ext.device.model),n.ext.os&&n.ext.os.name&&(e.tags[At.deviceOS]=n.ext.os.name),n.ext.device&&n.ext.device.deviceType&&(e.tags[At.deviceType]=n.ext.device.deviceType),n.ext.trace&&(n.ext.trace.parentID&&(e.tags[At.operationParentId]=n.ext.trace.parentID),n.ext.trace.name&&(e.tags[At.operationName]=n.ext.trace.name),n.ext.trace.traceID&&(e.tags[At.operationId]=n.ext.trace.traceID));for(var i={},a=function(e){var t=n.tags[e];Object.keys(t).forEach(function(e){i[e]=t[e]}),n.tags.splice(e,1)},o=n.tags.length-1;0<=o;o--)a(o);for(var s in n.tags)i[s]=n.tags[s];e.tags=p({},e.tags,i),e.tags[At.internalSdkVersion]||(e.tags[At.internalSdkVersion]="javascript:"+Ut.Version)},Ut.Version="2.1.1",Ut);function Ut(){}var Ot,Pt=(t(kt,Ot=Mt),kt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData.measurements||{},r=t.baseData.properties||{};Mt.extractPropsAndMeasurements(t.data,r,n);var i=t.baseData;if(g.isNullOrUndefined(i))return e.warnToConsole("Invalid input for dependency data"),null;var a=i.id,o=i.target,s=i.name,l=i.duration,u=i.success,c=i.responseCode,p=i.type,f=i.properties&&i.properties[fe]?i.properties[fe]:"GET",d=new ot(e,a,o,s,l,u,c,f,p,r,n),h=new wt(ot.dataType,d);return Mt.createEnvelope(e,ot.envelopeType,t,h)},kt.DependencyEnvelopeCreator=new kt,kt);function kt(){return null!==Ot&&Ot.apply(this,arguments)||this}var zt,Bt=(t(Gt,zt=Mt),Gt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n={},r={};t.baseType!==we.dataType&&(n.baseTypeSource=t.baseType),t.baseType===we.dataType?(n=t.baseData.properties||{},r=t.baseData.measurements||{}):t.baseData&&Mt.extractPropsAndMeasurements(t.baseData,n,r),Mt.extractPropsAndMeasurements(t.data,n,r);var i=t.baseData.name,a=new we(e,i,n,r),o=new wt(we.dataType,a);return Mt.createEnvelope(e,we.envelopeType,t,o)},Gt.EventEnvelopeCreator=new Gt,Gt);function Gt(){return null!==zt&&zt.apply(this,arguments)||this}var Ft,qt=(t(Ht,Ft=Mt),Ht.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData,r=Re.CreateFromInterface(e,n),i=new wt(Re.dataType,r);return Mt.createEnvelope(e,Re.envelopeType,t,i)},Ht.ExceptionEnvelopeCreator=new Ht,Ht);function Ht(){return null!==Ft&&Ft.apply(this,arguments)||this}var Xt,jt=(t(Vt,Xt=Mt),Vt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties||{},r=Mt.extractProperties(t.data);r=p({},n,r);var i=t.baseData.name,a=t.baseData.average,o=t.baseData.sampleCount,s=t.baseData.min,l=t.baseData.max,u=new Ke(e,i,a,o,s,l,r),c=new wt(Ke.dataType,u);return Mt.createEnvelope(e,Ke.envelopeType,t,c)},Vt.MetricEnvelopeCreator=new Vt,Vt);function Vt(){return null!==Xt&&Xt.apply(this,arguments)||this}var Wt,Kt=(t(Yt,Wt=Mt),Yt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=void 0;g.isNullOrUndefined(t.baseData)||g.isNullOrUndefined(t.baseData.properties)||g.isNullOrUndefined(t.baseData.properties.duration)?g.isNullOrUndefined(t.data)||g.isNullOrUndefined(t.data.duration)||(n=t.data.duration,delete t.data.duration):(n=t.baseData.properties.duration,delete t.baseData.properties.duration);var r,i=t.baseData;t.ext&&t.ext.trace&&t.ext.trace.traceID&&(r=t.ext.trace.traceID);var a=i.id||r,o=i.name,s=i.uri,l=i.properties||{},u=i.measurements||{};if(g.isNullOrUndefined(i.refUri)||(l.refUri=i.refUri),g.isNullOrUndefined(i.pageType)||(l.pageType=i.pageType),g.isNullOrUndefined(i.isLoggedIn)||(l.isLoggedIn=i.isLoggedIn.toString()),!g.isNullOrUndefined(i.properties)){var c=i.properties;for(var p in c)c.hasOwnProperty(p)&&(l[p]=c[p])}var f=new et(e,o,s,n,l,u,a),d=new wt(et.dataType,f);return Mt.createEnvelope(e,et.envelopeType,t,d)},Yt.PageViewEnvelopeCreator=new Yt,Yt);function Yt(){return null!==Wt&&Wt.apply(this,arguments)||this}var Jt,Zt=(t(Qt,Jt=Mt),Qt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData,r=n.name,i=n.uri||n.url,a=n.properties,o=n.measurements,s=new yt(e,r,i,void 0,a,o,n),l=new wt(yt.dataType,s);return Mt.createEnvelope(e,yt.envelopeType,t,l)},Qt.PageViewPerformanceEnvelopeCreator=new Qt,Qt);function Qt(){return null!==Jt&&Jt.apply(this,arguments)||this}var $t,en=(t(tn,$t=Mt),tn.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,R,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,r=t.baseData.severityLevel,i=Mt.extractProperties(t.data),a=p({},i,t.baseData.properties),o=new ft(e,n,r,a),s=new wt(ft.dataType,o);return Mt.createEnvelope(e,ft.envelopeType,t,s)},tn.TraceEnvelopeCreator=new tn,tn);function tn(){return null!==$t&&$t.apply(this,arguments)||this}var nn=(rn.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},rn.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",r={};if(!e)return this._logger.throwInternal(m.CRITICAL,M,"cannot serialize object because it is null or undefined",{name:t},!0),r;if(e[n])return this._logger.throwInternal(m.WARNING,O,"Circular reference detected while serializing object",{name:t},!0),r;if(!e.aiDataContract){if("measurements"===t)r=this._serializeStringMap(e,"number",t);else if("properties"===t)r=this._serializeStringMap(e,"string",t);else if("tags"===t)r=this._serializeStringMap(e,"string",t);else if(re.isArray(e))r=this._serializeArray(e,t);else{this._logger.throwInternal(m.WARNING,U,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),r=e}catch(e){this._logger.throwInternal(m.CRITICAL,M,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return r}for(var i in e[n]=!0,e.aiDataContract){var a,o=e.aiDataContract[i],s="function"==typeof o?o()&d.Required:o&d.Required,l="function"==typeof o?o()&d.Hidden:o&d.Hidden,u=o&d.Array,c=void 0!==e[i],p="object"==typeof e[i]&&null!==e[i];!s||c||u?l||void 0!==(a=p?u?this._serializeArray(e[i],i):this._serializeObject(e[i],i):e[i])&&(r[i]=a):this._logger.throwInternal(m.CRITICAL,w,"Missing required field specification. The field is required but not present on source",{field:i,name:t})}return delete e[n],r},rn.prototype._serializeArray=function(e,t){var n=void 0;if(e)if(re.isArray(e)){n=[];for(var r=0;r<e.length;r++){var i=e[r],a=this._serializeObject(i,t+"["+r+"]");n.push(a)}}else this._logger.throwInternal(m.CRITICAL,k,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},rn.prototype._serializeStringMap=function(e,t,n){var r=void 0;if(e)for(var i in r={},e){var a=e[i];if("string"===t)void 0===a?r[i]="undefined":null===a?r[i]="null":a.toString?r[i]=a.toString():r[i]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===a)r[i]="undefined";else if(null===a)r[i]="null";else{var o=parseFloat(a);isNaN(o)?r[i]="NaN":r[i]=o}else r[i]="invalid field: "+n+" is of unknown type.",this._logger.throwInternal(m.CRITICAL,r[i],null,!0)}return r},rn);function rn(e){this._logger=e}function an(){this._onlineStatus=!0;try{"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}catch(e){this.isListening=!1}}var on=(an.prototype._setOnline=function(){this._onlineStatus=!0},an.prototype._setOffline=function(){this._onlineStatus=!1},an.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!(navigator&&!g.isNullOrUndefined(navigator.onLine))||navigator.onLine},an.prototype.isOffline=function(){return!this.isOnline()},an.Offline=new an,an).Offline,sn=(ln.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/ln.INT_MAX_VALUE*100},ln.prototype.getHashCode=function(e){if(""==e)return 0;for(;e.length<ln.MIN_INPUT_LENGTH;)e=e.concat(e);for(var t=5381,n=0;n<e.length;++n)t=(t<<5)+t+e.charCodeAt(n),t&=t;return Math.abs(t)},ln.INT_MAX_VALUE=2147483647,ln.MIN_INPUT_LENGTH=8,ln);function ln(){}var un=(cn.prototype.getSamplingScore=function(e){return e.tags&&e.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.userId]):e.ext&&e.ext.user&&e.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()},cn);function cn(){this.hashCodeGeneragor=new sn,this.keys=new Ct}var pn=(fn.prototype.isSampledIn=function(e){var t=this.sampleRate;return null==t||100<=t||e.baseType===Ke.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},fn);function fn(e,t){this.INT_MAX_VALUE=2147483647,g.isNullOrUndefined(t)?this._logger=new J:this._logger=t,(100<e||e<0)&&(this._logger.throwInternal(m.WARNING,G,"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:e},!0),this.sampleRate=100),this.sampleRate=e,this.samplingScoreGenerator=new un}var dn=(hn.prototype.pause=function(){throw new Error("Method not implemented.")},hn.prototype.resume=function(){throw new Error("Method not implemented.")},hn.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(m.CRITICAL,S,"flush failed, telemetry will not be collected: "+re.getExceptionName(e),{exception:re.dump(e)})}},hn.prototype.teardown=function(){throw new Error("Method not implemented.")},hn.prototype.initialize=function(t,e,n){var r=this;this._logger=e.logger,this._serializer=new nn(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var i=hn._getDefaultAppInsightsChannelConfig();function a(e){o._config[e]=function(){return xt.getConfig(t,e,r.identifier,i[e]())}}this._config=hn._getEmptyAppInsightsChannelConfig();var o=this;for(var s in i)a(s);this._buffer=this._config.enableSessionStorageBuffer&&re.canUseSessionStorage()?new Rt(this._logger,this._config):new Tt(this._config),this._sample=new pn(this._config.samplingPercentage(),this._logger),!this._config.isBeaconApiDisabled()&&re.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))},hn.prototype.processTelemetry=function(e){var t=this;try{if(this._config.disableTelemetry())return;if(!e)return void this._logger.throwInternal(m.CRITICAL,_,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void this._logger.throwInternal(m.CRITICAL,W,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!this._sender)return void this._logger.throwInternal(m.CRITICAL,x,"Sender was not initialized");if(!this._isSampledIn(e))return void this._logger.throwInternal(m.WARNING,E,"Telemetry item was sampled out and not sent",{SampleRate:this._sample.sampleRate});e.tags=e.tags||{},e.tags.sampleRate=this._sample.sampleRate;var n=hn.constructEnvelope(e,this._config.instrumentationKey(),this._logger);if(!n)return void this._logger.throwInternal(m.CRITICAL,L,"Unable to create an AppInsights envelope");var r=!1;if(e.tags&&e.tags[pe]&&(e.tags[pe].forEach(function(e){try{e&&!1===e(n)&&(r=!0,t._logger.warnToConsole("Telemetry processor check returns false"))}catch(e){t._logger.throwInternal(m.CRITICAL,q,"One of telemetry initializers failed, telemetry item will not be sent: "+re.getExceptionName(e),{exception:re.dump(e)},!0)}}),delete e.tags[pe]),r)return;var i=this._serializer.serialize(n),a=this._buffer.getItems(),o=this._buffer.batchPayloads(a);o&&o.length+i.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(i),this._setupTimer()}catch(e){this._logger.throwInternal(m.WARNING,I,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+re.getExceptionName(e),{exception:re.dump(e)})}g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},hn.prototype.setNextPlugin=function(e){this._nextPlugin=e},hn.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var r=null;this._appId||(r=this._parseResponse(e.responseText||e.response))&&r.appId&&(this._appId=r.appId),(e.status<200||300<=e.status)&&0!==e.status?!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(m.WARNING,C,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e)):on.isOffline()?this._config.isRetryDisabled()||(this._resendPayload(t,10),this._logger.throwInternal(m.WARNING,C,". Offline - Response Code: "+e.status+". Offline status: "+on.isOffline()+". Will retry to send "+t.length+" items.")):206===e.status?(r||(r=this._parseResponse(e.responseText||e.response)),r&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,r):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},hn.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!re.getIEVersion()||9<re.getIEVersion())&&this._logger.throwInternal(m.CRITICAL,C,"Telemetry transmission failed, some telemetry will be lost: "+re.getExceptionName(e),{exception:re.dump(e)})}},hn.prototype._onError=function(e,t,n){this._logger.throwInternal(m.WARNING,N,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},hn.prototype._onPartialSuccess=function(e,t){for(var n=[],r=[],i=0,a=t.errors.reverse();i<a.length;i++){var o=a[i],s=e.splice(o.index,1)[0];this._isRetriable(o.statusCode)?r.push(s):n.push(s)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<r.length&&(this._resendPayload(r),this._logger.throwInternal(m.WARNING,C,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+r.length+" our of "+t.itemsReceived+" items"))},hn.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},hn.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)},hn.constructEnvelope=function(e,t,n){var r;switch((r=t===e.iKey||g.isNullOrUndefined(t)?e:p({},e,{iKey:t})).baseType){case we.dataType:return Bt.EventEnvelopeCreator.Create(n,r);case ft.dataType:return en.TraceEnvelopeCreator.Create(n,r);case et.dataType:return Kt.PageViewEnvelopeCreator.Create(n,r);case yt.dataType:return Zt.PageViewPerformanceEnvelopeCreator.Create(n,r);case Re.dataType:return qt.ExceptionEnvelopeCreator.Create(n,r);case Ke.dataType:return jt.MetricEnvelopeCreator.Create(n,r);case ot.dataType:return Pt.DependencyEnvelopeCreator.Create(n,r);default:return Bt.EventEnvelopeCreator.Create(n,r)}},hn._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},hn._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},hn.prototype._isSampledIn=function(e){return this._sample.isSampledIn(e)},hn.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),r=this._buffer.batchPayloads(e),i=new Blob([r],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,i)?(this._buffer.markAsSent(e),this._onSuccess(e,e.length)):(this._xhrSender(e,!0),this._logger.throwInternal(m.WARNING,C,". Failed to send telemetry with Beacon API, retried with xhrSender."))},hn.prototype._xhrSender=function(t,e){var n=this,r=new XMLHttpRequest;r.Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,r.open("POST",this._config.endpointUrl(),e),r.setRequestHeader("Content-type","application/json"),re.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&r.setRequestHeader($.sdkContextHeader,$.sdkContextHeaderAppIdRequest),r.onreadystatechange=function(){return n._xhrReadyStateChange(r,t,t.length)},r.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(r),e)};var i=this._buffer.batchPayloads(t);r.send(i),this._buffer.markAsSent(t)},hn.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(m.CRITICAL,D,"Cannot parse the response. "+re.getExceptionName(e),{response:t})}return null},hn.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,r=e;n<r.length;n++){var i=r[n];this._buffer.enqueue(i)}this._setRetryTime(t),this._setupTimer()}},hn.prototype._setRetryTime=function(e){var t;if(this._consecutiveErrors<=1)t=10;else{var n=(Math.pow(2,this._consecutiveErrors)-1)/2,r=Math.floor(Math.random()*n*10)+1;r*=e,t=Math.max(Math.min(r,3600),10)}var i=Date.now()+1e3*t;this._retryAt=i},hn.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)}},hn.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},hn.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},hn.prototype._xdrSender=function(t,e){var n=this,r=new XDomainRequest;r.onload=function(){return n._xdrOnLoad(r,t)},r.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(r),e)};var i=window.location&&window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(i,0))return this._logger.throwInternal(m.WARNING,C,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var a=this._config.endpointUrl().replace(/^(https?:)/,"");r.open("POST",a);var o=this._buffer.batchPayloads(t);r.send(o),this._buffer.markAsSent(t)},hn.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},hn);function hn(){this.priority=1001,this.identifier="AppInsightsChannelPlugin",this._XMLHttpRequestSupported=!1}e.Sender=dn,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=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])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i,n,d,a,s,o,p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=i=i||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(a=d=d||{})[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden",(o=s=s||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var g=(l.isNullOrUndefined=function(e){return null==e},l.disableCookies=function(){l._canUseCookies=!1},l.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(c,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},l);function l(){}var m,u,c=/[xy]/g;(u=m=m||{})[u.CRITICAL=1]="CRITICAL",u[u.WARNING=2]="WARNING";var f=1,h=2,v=3,y=4,_=5,I=6,S=7,b=12,w=22,N=23,x=24,E=26,C=28,A=33,T=40,D=41,R=42,L=43,M=46,U=47,O=48,P=49,k=50,z=52,B=54,G=56,F=57,q=58,H=61,X=64,j=66,W=67,V=68,K=69,Y=70,J=(Z.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},Z.dataType="MessageData",Z.AiNonUserActionablePrefix="AI (Internal): ",Z.AiUserActionablePrefix="AI: ",Z);function Z(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?Z.AiUserActionablePrefix:Z.AiNonUserActionablePrefix)+e;var i=(t?" message:"+Z.sanitizeDiagnosticText(t):"")+(r?" props:"+Z.sanitizeDiagnosticText(JSON.stringify(r)):"");this.message+=i}var Q=($.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new J(t,n,i,r);if(this.enableDebugExceptions())throw a;if(void 0!==a&&a&&void 0!==a.message){if(i){var s=+a.messageId;(!this._messageLogged[s]||this.consoleLoggingLevel()>=m.WARNING)&&(this.warnToConsole(a.message),this._messageLogged[s]=!0)}else this.consoleLoggingLevel()>=m.WARNING&&this.warnToConsole(a.message);this.logInternalMessage(e,a)}},$.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},$.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},$.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,r=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[r]?n=!1:this._messageLogged[r]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var i="Internal events throttle limit per PageView reached for this app.",a=new J(N,i,!1);this.queue.push(a),this.warnToConsole(i)}}},$.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},$);function $(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},g.isNullOrUndefined(e)||(g.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),g.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),g.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),g.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}ee.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(ee.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),ee.prototype.initialize=function(n,r,i){var a=this;if(n.isCookieUseDisabled&&g.disableCookies(),this.channelQueue=new Array,n.channels){var s=void 0;n.channels.forEach(function(e){if(e&&0<e.length){e=e.sort(function(e,t){return e.priority-t.priority});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);if(e.forEach(function(e){e.priority<500&&(s=e.identifier),e.initialize(n,r,i)}),s)throw Error("Channel has invalid priority"+s);a.channelQueue.push(e)}})}for(var e=new Array,t=0;t<i.length;t++){var o=i[t];500<o.priority&&e.push(o)}if(0<e.length){for((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,r,i)}),t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}};function ee(){this.identifier="ChannelControllerPlugin",this.priority=500}var te=(ne.requestContextHeader="Request-Context",ne.requestContextTargetKey="appId",ne.requestContextAppIdFormat="appId=cid-v1:",ne.requestIdHeader="Request-Id",ne.traceParentHeader="traceparent",ne.sdkContextHeader="Sdk-Context",ne.sdkContextHeaderAppIdRequest="appId",ne.requestContextHeaderLowerCase="request-context",ne);function ne(){}var re=(ie.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ie.sanitizeKey(e,t);if(i.length!==r){for(var a=0,s=i;void 0!==n[s];)a++,s=i.substring(0,ie.MAX_NAME_LENGTH-3)+ie.padNumber(a);i=s}return i},ie.sanitizeKey=function(e,t){var n;return t&&(t=ie.trim(t.toString())).length>ie.MAX_NAME_LENGTH&&(n=t.substring(0,ie.MAX_NAME_LENGTH),e.throwInternal(m.WARNING,F,"name is too long. It has been truncated to "+ie.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ie.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ie.MAX_STRING_LENGTH),t&&(n=n||ie.MAX_STRING_LENGTH,(t=ie.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(m.WARNING,H,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ie.sanitizeUrl=function(e,t){return ie.sanitizeInput(e,t,ie.MAX_URL_LENGTH,j)},ie.sanitizeMessage=function(e,t){var n;return t&&t.length>ie.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ie.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,G,"message is too long, it has been truncated to "+ie.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ie.sanitizeException=function(e,t){var n;return t&&t.length>ie.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ie.MAX_EXCEPTION_LENGTH),e.throwInternal(m.WARNING,z,"exception is too long, it has been truncated to "+ie.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ie.sanitizeProperties=function(t,e){if(e){var n={};for(var r in e){var i=e[r];if("object"==typeof i&&"undefined"!=typeof JSON)try{i=JSON.stringify(i)}catch(e){t.throwInternal(m.WARNING,P,"custom property is not valid",{exception:e},!0)}i=ie.sanitizeString(t,i,ie.MAX_PROPERTY_LENGTH),n[r=ie.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},ie.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ie.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ie.sanitizeId=function(e,t){return t?ie.sanitizeInput(e,t,ie.MAX_ID_LENGTH,K).toString():t},ie.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ie.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(m.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ie.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ie.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},ie.MAX_NAME_LENGTH=150,ie.MAX_ID_LENGTH=128,ie.MAX_PROPERTY_LENGTH=8192,ie.MAX_STRING_LENGTH=1024,ie.MAX_URL_LENGTH=2048,ie.MAX_MESSAGE_LENGTH=32768,ie.MAX_EXCEPTION_LENGTH=32768,ie);function ie(){}var ae=(se.createDomEvent=function(e){var t=null;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},se.disableStorage=function(){se._canUseLocalStorage=!1,se._canUseSessionStorage=!1},se._getLocalStorageObject=function(){return se.canUseLocalStorage()?se._getVerifiedStorageObject(i.LocalStorage):null},se._getVerifiedStorageObject=function(e){var t,n,r=null;try{if("undefined"==typeof window)return null;n=new Date,(r=e===i.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=r.getItem(n)!=n,r.removeItem(n),t&&(r=null)}catch(e){r=null}return r},se.isInternalApplicationInsightsEndpoint=function(e){return-1!==se._internalEndpoints.indexOf(e.toLowerCase())},se.canUseLocalStorage=function(){return void 0===se._canUseLocalStorage&&(se._canUseLocalStorage=!!se._getVerifiedStorageObject(i.LocalStorage)),se._canUseLocalStorage},se.getStorage=function(t,e){var n=se._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){se._canUseLocalStorage=!1,t.throwInternal(m.WARNING,f,"Browser failed read of local storage. "+se.getExceptionName(e),{exception:se.dump(e)})}return null},se.setStorage=function(t,e,n){var r=se._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){se._canUseLocalStorage=!1,t.throwInternal(m.WARNING,v,"Browser failed write to local storage. "+se.getExceptionName(e),{exception:se.dump(e)})}return!1},se.removeStorage=function(t,e){var n=se._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){se._canUseLocalStorage=!1,t.throwInternal(m.WARNING,_,"Browser failed removal of local storage item. "+se.getExceptionName(e),{exception:se.dump(e)})}return!1},se._getSessionStorageObject=function(){return se.canUseSessionStorage()?se._getVerifiedStorageObject(i.SessionStorage):null},se.canUseSessionStorage=function(){return void 0===se._canUseSessionStorage&&(se._canUseSessionStorage=!!se._getVerifiedStorageObject(i.SessionStorage)),se._canUseSessionStorage},se.getSessionStorageKeys=function(){var e=[];if(se.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},se.getSessionStorage=function(t,e){var n=se._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){se._canUseSessionStorage=!1,t.throwInternal(m.WARNING,h,"Browser failed read of session storage. "+se.getExceptionName(e),{exception:se.dump(e)})}return null},se.setSessionStorage=function(t,e,n){var r=se._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){se._canUseSessionStorage=!1,t.throwInternal(m.WARNING,y,"Browser failed write to session storage. "+se.getExceptionName(e),{exception:se.dump(e)})}return!1},se.removeSessionStorage=function(t,e){var n=se._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){se._canUseSessionStorage=!1,t.throwInternal(m.WARNING,I,"Browser failed removal of session storage item. "+se.getExceptionName(e),{exception:se.dump(e)})}return!1},se.disableCookies=function(){g.disableCookies()},se.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==se.document.cookie}catch(e){t.throwInternal(m.WARNING,V,"Cannot access document.cookie - "+se.getExceptionName(e),{exception:se.dump(e)})}}return g._canUseCookies},se.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),se.document.location&&"https:"===se.document.location.protocol&&(a=";secure"),se.canUseCookies(e)&&(se.document.cookie=t+"="+n+i+";path=/"+a)},se.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},se.getCookie=function(e,t){if(se.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=se.document.cookie.split(";"),a=0;a<i.length;a++){var s=i[a];if((s=se.trim(s))&&0===s.indexOf(r)){n=s.substring(r.length,i[a].length);break}}return n}},se.deleteCookie=function(e,t){se.canUseCookies(e)&&(se.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},se.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},se.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},se.random32=function(){return 4294967296*Math.random()|0},se.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=se.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},se.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},se.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},se.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},se.toISOStringForIE8=function(e){if(se.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},se.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},se.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},se.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},se.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},se.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},se.addEventHandler=function(e,t){if("undefined"==typeof window||!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},se.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},se.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},se.document="undefined"!=typeof document?document:{},se._canUseLocalStorage=void 0,se._canUseSessionStorage=void 0,se._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],se.NotSpecified="not_specified",se);function se(){}var oe=(le.parseUrl=function(e){return le.htmlAnchorElement||(le.htmlAnchorElement=le.document.createElement?le.document.createElement("a"):{host:le.parseHost(e)}),le.htmlAnchorElement.href=e,le.htmlAnchorElement},le.getAbsoluteUrl=function(e){var t,n=le.parseUrl(e);return n&&(t=n.href),t},le.getPathName=function(e){var t,n=le.parseUrl(e);return n&&(t=n.pathname),t},le.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},le.parseHost=function(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=t&&2<t.length&&"string"==typeof t[2]&&0<t[2].length?t[2]:null},le.document="undefined"!=typeof document?document:{},le);function le(){}var ue=(ce.ParseDependencyPath=function(e,t,n,r){var i,a=r,s=r;if(t&&0<t.length){var o=oe.parseUrl(t);if(i=o.host,!a)if(null!=o.pathname){var l=0===o.pathname.length?"/":o.pathname;"/"!==l.charAt(0)&&(l="/"+l),s=o.pathname,a=re.sanitizeString(e,n?n+" "+l:l)}else a=re.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:s}},ce);function ce(){}pe.Now="undefined"==typeof window?function(){return(new Date).getTime()}:window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},pe.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n};function pe(){}var fe,de="ProcessLegacy",he="http.method",ge=(t(me,fe=function(){}),me);function me(){return fe.call(this)||this}var ve,ye=(t(_e,ve=function(){this.ver=1,this.sampleRate=100,this.tags={}}),_e);function _e(e,t,n){var r=ve.call(this)||this;return r.name=re.sanitizeString(e,n)||ae.NotSpecified,r.data=t,r.time=ae.toISOStringForIE8(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100==r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}function Ie(){}var Se,be=(t(we,Se=Ie),we);function we(){var e=Se.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ne,xe=(t(Ee,Ne=be),Ee.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Ee.dataType="EventData",Ee);function Ee(e,t,n,r){var i=Ne.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=re.sanitizeString(e,t)||ae.NotSpecified,i.properties=re.sanitizeProperties(e,n),i.measurements=re.sanitizeMeasurements(e,r),i}function Ce(){}var Ae,Te=(t(De,Ae=Ie),De);function De(){var e=Ae.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function Re(){this.hasFullStack=!0,this.parsedStack=[]}var Le,Me=(t(Ue,Le=Te),Ue.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Pe.CreateFromInterface(t,e)});return new Ue(t,p({},e,{exceptions:n}))},Ue.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.ver,s=e.problemGroup,o=e.id,l=e.isManual;return{ver:a,exceptions:t instanceof Array&&t.map(function(e){return e.toInterface()})||void 0,severityLevel:i,properties:n,measurements:r,problemGroup:s,id:o,isManual:l}},Ue.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Ue.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Ue.dataType="ExceptionData",Ue);function Ue(e,t,n,r,i,a){var s=Le.call(this)||this;return s.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(s.exceptions=[new Pe(e,t)],s.properties=re.sanitizeProperties(e,n),s.measurements=re.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)):(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),g.isNullOrUndefined(t.ver)||(s.ver=t.ver),g.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)),s}var Oe,Pe=(t(ke,Oe=Re),ke.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&this.parsedStack.map(function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||void 0}},ke.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return Be.CreateFromInterface(e)})||t.parsedStack;return new ke(e,p({},t,{parsedStack:n}))},ke.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var s=n[a];if(Be.regex.test(s)){var o=new Be(n[a],r++);i+=o.sizeInBytes,t.push(o)}}if(32768<i)for(var l=0,u=t.length-1,c=0,p=l,f=u;l<u;){if(32768<(c+=t[l].sizeInBytes+t[u].sizeInBytes)){var d=f-p+1;t.splice(p,d);break}p=l,f=u,l++,u--}}return t},ke);function ke(e,t){var n=Oe.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=re.sanitizeString(e,t.name)||ae.NotSpecified,n.message=re.sanitizeMessage(e,t.message)||ae.NotSpecified;var r=t.stack;n.parsedStack=ke.parseStack(r),n.stack=re.sanitizeException(e,r),n.hasFullStack=ae.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var ze,Be=(t(Ge,ze=Ce),Ge.CreateFromInterface=function(e){return new Ge(e,null)},Ge.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Ge.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Ge.baseSize=58,Ge);function Ge(e,t){var n=ze.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=ae.trim(r),n.fileName="",n.line=0;var i=r.match(Ge.regex);i&&5<=i.length&&(n.method=ae.trim(i[2])||n.method,n.fileName=ae.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=Ge.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Fe,qe,He,Xe=(t(je,Fe=Ie),je);function je(){var e=Fe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(He=qe=qe||{})[He.Measurement=0]="Measurement",He[He.Aggregation=1]="Aggregation";var We,Ve=(t(Ke,We=function(){this.kind=qe.Measurement}),Ke);function Ke(){var e=null!==We&&We.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Ye,Je=(t(Ze,Ye=Xe),Ze.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ze.dataType="MetricData",Ze);function Ze(e,t,n,r,i,a,s){var o=Ye.call(this)||this;o.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new Ve;return l.count=0<r?r:void 0,l.max=isNaN(a)||null===a?void 0:a,l.min=isNaN(i)||null===i?void 0:i,l.name=re.sanitizeString(e,t)||ae.NotSpecified,l.value=n,o.metrics=[l],o.properties=re.sanitizeProperties(e,s),o}var Qe,$e=(t(et,Qe=be),et);function et(){var e=Qe.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var tt,nt=(t(rt,tt=$e),rt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",rt.dataType="PageviewData",rt);function rt(e,t,n,r,i,a,s){var o=tt.call(this)||this;return o.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},o.id=re.sanitizeId(e,s),o.url=re.sanitizeUrl(e,n),o.name=re.sanitizeString(e,t)||ae.NotSpecified,isNaN(r)||(o.duration=ae.msToTimeSpan(r)),o.properties=re.sanitizeProperties(e,i),o.measurements=re.sanitizeMeasurements(e,a),o}var it,at=(t(st,it=Ie),st);function st(){var e=it.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var ot,lt=(t(ut,ot=at),ut.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",ut.dataType="RemoteDependencyData",ut);function ut(e,t,n,r,i,a,s,o,l,u,c){void 0===l&&(l="Ajax");var p=ot.call(this)||this;p.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},p.id=t,p.duration=ae.msToTimeSpan(i),p.success=a,p.resultCode=s+"",p.type=re.sanitizeString(e,l);var f=ue.ParseDependencyPath(e,n,o,r);return p.data=re.sanitizeUrl(e,r)||f.data,p.target=re.sanitizeString(e,f.target),p.name=re.sanitizeString(e,f.name),p.properties=re.sanitizeProperties(e,u),p.measurements=re.sanitizeMeasurements(e,c),p}var ct,pt=(t(ft,ct=Ie),ft);function ft(){var e=ct.call(this)||this;return e.ver=2,e.properties={},e}var dt,ht=(t(gt,dt=pt),gt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",gt.dataType="MessageData",gt);function gt(e,t,n,r){var i=dt.call(this)||this;return i.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||ae.NotSpecified,i.message=re.sanitizeMessage(e,t),i.properties=re.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var mt,vt=(t(yt,mt=$e),yt);function yt(){var e=mt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var _t,It=(t(St,_t=vt),St.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",St.dataType="PageviewPerformanceData",St);function St(e,t,n,r,i,a,s){var o=_t.call(this)||this;return o.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},o.url=re.sanitizeUrl(e,n),o.name=re.sanitizeString(e,t)||ae.NotSpecified,o.properties=re.sanitizeProperties(e,i),o.measurements=re.sanitizeMeasurements(e,a),s&&(o.domProcessing=s.domProcessing,o.duration=s.duration,o.networkConnect=s.networkConnect,o.perfTotal=s.perfTotal,o.receivedResponse=s.receivedResponse,o.sentRequest=s.sentRequest),o}var bt,wt,Nt,xt=(t(Et,bt=ge),Et);function Et(e,t){var n=bt.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(Nt=wt=wt||{})[Nt.Verbose=0]="Verbose",Nt[Nt.Information=1]="Information",Nt[Nt.Warning=2]="Warning",Nt[Nt.Error=3]="Error",Nt[Nt.Critical=4]="Critical";var Ct=(At.getConfig=function(e,t,n,r){var i;return void 0===r&&(r=!1),i=n&&e.extensionConfig&&e.extensionConfig[n]&&!g.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],g.isNullOrUndefined(i)?r:i},At);function At(){}var Tt=function(){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.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},Dt=new Tt,Rt=(Lt.prototype.enqueue=function(e){this._buffer.push(e)},Lt.prototype.count=function(){return this._buffer.length},Lt.prototype.clear=function(){this._buffer.length=0},Lt.prototype.getItems=function(){return this._buffer.slice(0)},Lt.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},Lt.prototype.markAsSent=function(e){this.clear()},Lt.prototype.clearSent=function(e){},Lt);function Lt(e){this._config=e,this._buffer=[]}var Mt=(Ut.prototype.enqueue=function(e){this._buffer.length>=Ut.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(m.WARNING,W,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(Ut.BUFFER_KEY,this._buffer))},Ut.prototype.count=function(){return this._buffer.length},Ut.prototype.clear=function(){this._buffer.length=0,this.setBuffer(Ut.BUFFER_KEY,[]),this.setBuffer(Ut.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},Ut.prototype.getItems=function(){return this._buffer.slice(0)},Ut.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},Ut.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(Ut.BUFFER_KEY,this._buffer);var t=this.getBuffer(Ut.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>Ut.MAX_BUFFER_SIZE&&(this._logger.throwInternal(m.CRITICAL,W,"Sent buffer reached its maximum size: "+t.length,!0),t.length=Ut.MAX_BUFFER_SIZE),this.setBuffer(Ut.SENT_BUFFER_KEY,t))},Ut.prototype.clearSent=function(e){var t=this.getBuffer(Ut.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(Ut.SENT_BUFFER_KEY,t)},Ut.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var r in t){var i=!1;for(var a in e)if(e[a]===t[r]){i=!0;break}i||n.push(t[r])}return n},Ut.prototype.getBuffer=function(e){var t=e;try{t=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+t:t;var n=ae.getSessionStorage(this._logger,t);if(n){var r=JSON.parse(n);if(r)return r}}catch(e){this._logger.throwInternal(m.CRITICAL,R," storage key: "+t+", "+ae.getExceptionName(e),{exception:ae.dump(e)})}return[]},Ut.prototype.setBuffer=function(e,t){var n=e;try{n=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+n:n;var r=JSON.stringify(t);ae.setSessionStorage(this._logger,n,r)}catch(e){ae.setSessionStorage(this._logger,n,JSON.stringify([])),this._logger.throwInternal(m.WARNING,D," storage key: "+n+", "+ae.getExceptionName(e)+". Buffer cleared",{exception:ae.dump(e)})}},Ut.BUFFER_KEY="AI_buffer",Ut.SENT_BUFFER_KEY="AI_sentBuffer",Ut.MAX_BUFFER_SIZE=2e3,Ut);function Ut(e,t){this._bufferFullMessageSent=!1,this._logger=e,this._config=t;var n=this.getBuffer(Ut.BUFFER_KEY),r=this.getBuffer(Ut.SENT_BUFFER_KEY);this._buffer=n.concat(r),this._buffer.length>Ut.MAX_BUFFER_SIZE&&(this._buffer.length=Ut.MAX_BUFFER_SIZE),this.setBuffer(Ut.SENT_BUFFER_KEY,[]),this.setBuffer(Ut.BUFFER_KEY,this._buffer)}var Ot=(Pt.extractProperties=function(e){var t=null;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"number"!=typeof r&&((t=t||{})[n]=r)}return t},Pt.extractPropsAndMeasurements=function(e,t,n){if(!g.isNullOrUndefined(e))for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];"number"==typeof i?n[r]=i:t[r]="string"==typeof i?i:JSON.stringify(i)}},Pt.createEnvelope=function(e,t,n,r){var i=new ye(e,r,t);i.iKey=n.iKey;var a=n.iKey.replace(/-/g,"");return i.name=i.name.replace("{0}",a),Pt.extractPartAExtensions(n,i),n.tags||(n.tags=[]),i},Pt.extractPartAExtensions=function(n,e){if(e.tags||(e.tags={}),n.ext||(n.ext={}),n.tags||(n.tags=[]),n.ext.user){n.ext.user.authId&&(e.tags[Dt.userAuthUserId]=n.ext.user.authId);var t=n.ext.user.id||n.ext.user.localId;t&&(e.tags[Dt.userId]=t)}if(n.ext.app&&n.ext.app.sesId&&(e.tags[Dt.sessionId]=n.ext.app.sesId),n.ext.device&&((n.ext.device.id||n.ext.device.localId)&&(e.tags[Dt.deviceId]=n.ext.device.id||n.ext.device.localId),n.ext.device.deviceClass&&(e.tags[Dt.deviceType]=n.ext.device.deviceClass),n.ext.device.ip&&(e.tags[Dt.deviceIp]=n.ext.device.ip)),n.ext.web){var r=n.ext.web;r.browserLang&&(e.tags[Dt.deviceLanguage]=r.browserLang),r.browserVer&&(e.tags[Dt.deviceBrowserVersion]=r.browserVer),r.browser&&(e.tags[Dt.deviceBrowser]=r.browser),e.data=e.data||{},e.data.baseData=e.data.baseData||{},e.data.baseData.properties=e.data.baseData.properties||{},r.domain&&(e.data.baseData.properties.domain=r.domain),r.isManual&&(e.data.baseData.properties.isManual=r.isManual.toString()),r.screenRes&&(e.data.baseData.properties.screenRes=r.screenRes),r.userConsent&&(e.data.baseData.properties.userConsent=r.userConsent.toString())}n.ext.device&&n.ext.device.model&&(e.tags[Dt.deviceModel]=n.ext.device.model),n.ext.os&&n.ext.os.name&&(e.tags[Dt.deviceOS]=n.ext.os.name),n.ext.device&&n.ext.device.deviceType&&(e.tags[Dt.deviceType]=n.ext.device.deviceType),n.ext.trace&&(n.ext.trace.parentID&&(e.tags[Dt.operationParentId]=n.ext.trace.parentID),n.ext.trace.name&&(e.tags[Dt.operationName]=n.ext.trace.name),n.ext.trace.traceID&&(e.tags[Dt.operationId]=n.ext.trace.traceID));for(var i={},a=function(e){var t=n.tags[e];Object.keys(t).forEach(function(e){i[e]=t[e]}),n.tags.splice(e,1)},s=n.tags.length-1;0<=s;s--)a(s);for(var o in n.tags)i[o]=n.tags[o];e.tags=p({},e.tags,i),e.tags[Dt.internalSdkVersion]||(e.tags[Dt.internalSdkVersion]="javascript:"+Pt.Version)},Pt.Version="2.2.0",Pt);function Pt(){}var kt,zt=(t(Bt,kt=Ot),Bt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData.measurements||{},r=t.baseData.properties||{};Ot.extractPropsAndMeasurements(t.data,r,n);var i=t.baseData;if(g.isNullOrUndefined(i))return e.warnToConsole("Invalid input for dependency data"),null;var a=i.id,s=i.target,o=i.name,l=i.duration,u=i.success,c=i.responseCode,p=i.type,f=i.properties&&i.properties[he]?i.properties[he]:"GET",d=new lt(e,a,s,o,l,u,c,f,p,r,n),h=new xt(lt.dataType,d);return Ot.createEnvelope(e,lt.envelopeType,t,h)},Bt.DependencyEnvelopeCreator=new Bt,Bt);function Bt(){return null!==kt&&kt.apply(this,arguments)||this}var Gt,Ft=(t(qt,Gt=Ot),qt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n={},r={};t.baseType!==xe.dataType&&(n.baseTypeSource=t.baseType),t.baseType===xe.dataType?(n=t.baseData.properties||{},r=t.baseData.measurements||{}):t.baseData&&Ot.extractPropsAndMeasurements(t.baseData,n,r),Ot.extractPropsAndMeasurements(t.data,n,r);var i=t.baseData.name,a=new xe(e,i,n,r),s=new xt(xe.dataType,a);return Ot.createEnvelope(e,xe.envelopeType,t,s)},qt.EventEnvelopeCreator=new qt,qt);function qt(){return null!==Gt&&Gt.apply(this,arguments)||this}var Ht,Xt=(t(jt,Ht=Ot),jt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData,r=Me.CreateFromInterface(e,n),i=new xt(Me.dataType,r);return Ot.createEnvelope(e,Me.envelopeType,t,i)},jt.ExceptionEnvelopeCreator=new jt,jt);function jt(){return null!==Ht&&Ht.apply(this,arguments)||this}var Wt,Vt=(t(Kt,Wt=Ot),Kt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties||{},r=Ot.extractProperties(t.data);r=p({},n,r);var i=t.baseData.name,a=t.baseData.average,s=t.baseData.sampleCount,o=t.baseData.min,l=t.baseData.max,u=new Je(e,i,a,s,o,l,r),c=new xt(Je.dataType,u);return Ot.createEnvelope(e,Je.envelopeType,t,c)},Kt.MetricEnvelopeCreator=new Kt,Kt);function Kt(){return null!==Wt&&Wt.apply(this,arguments)||this}var Yt,Jt=(t(Zt,Yt=Ot),Zt.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=void 0;g.isNullOrUndefined(t.baseData)||g.isNullOrUndefined(t.baseData.properties)||g.isNullOrUndefined(t.baseData.properties.duration)?g.isNullOrUndefined(t.data)||g.isNullOrUndefined(t.data.duration)||(n=t.data.duration,delete t.data.duration):(n=t.baseData.properties.duration,delete t.baseData.properties.duration);var r,i=t.baseData;t.ext&&t.ext.trace&&t.ext.trace.traceID&&(r=t.ext.trace.traceID);var a=i.id||r,s=i.name,o=i.uri,l=i.properties||{},u=i.measurements||{};if(g.isNullOrUndefined(i.refUri)||(l.refUri=i.refUri),g.isNullOrUndefined(i.pageType)||(l.pageType=i.pageType),g.isNullOrUndefined(i.isLoggedIn)||(l.isLoggedIn=i.isLoggedIn.toString()),!g.isNullOrUndefined(i.properties)){var c=i.properties;for(var p in c)c.hasOwnProperty(p)&&(l[p]=c[p])}Ot.extractPropsAndMeasurements(t.data,l,u);var f=new nt(e,s,o,n,l,u,a),d=new xt(nt.dataType,f);return Ot.createEnvelope(e,nt.envelopeType,t,d)},Zt.PageViewEnvelopeCreator=new Zt,Zt);function Zt(){return null!==Yt&&Yt.apply(this,arguments)||this}var Qt,$t=(t(en,Qt=Ot),en.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData,r=n.name,i=n.uri||n.url,a=n.properties||{},s=n.measurements||{};Ot.extractPropsAndMeasurements(t.data,a,s);var o=new It(e,r,i,void 0,a,s,n),l=new xt(It.dataType,o);return Ot.createEnvelope(e,It.envelopeType,t,l)},en.PageViewPerformanceEnvelopeCreator=new en,en);function en(){return null!==Qt&&Qt.apply(this,arguments)||this}var tn,nn=(t(rn,tn=Ot),rn.prototype.Create=function(e,t){this._logger=e,g.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(m.CRITICAL,M,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,r=t.baseData.severityLevel,i=Ot.extractProperties(t.data),a=p({},i,t.baseData.properties),s=new ht(e,n,r,a),o=new xt(ht.dataType,s);return Ot.createEnvelope(e,ht.envelopeType,t,o)},rn.TraceEnvelopeCreator=new rn,rn);function rn(){return null!==tn&&tn.apply(this,arguments)||this}var an=(sn.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},sn.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",r={};if(!e)return this._logger.throwInternal(m.CRITICAL,O,"cannot serialize object because it is null or undefined",{name:t},!0),r;if(e[n])return this._logger.throwInternal(m.WARNING,k,"Circular reference detected while serializing object",{name:t},!0),r;if(!e.aiDataContract){if("measurements"===t)r=this._serializeStringMap(e,"number",t);else if("properties"===t)r=this._serializeStringMap(e,"string",t);else if("tags"===t)r=this._serializeStringMap(e,"string",t);else if(ae.isArray(e))r=this._serializeArray(e,t);else{this._logger.throwInternal(m.WARNING,P,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),r=e}catch(e){this._logger.throwInternal(m.CRITICAL,O,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return r}for(var i in e[n]=!0,e.aiDataContract){var a,s=e.aiDataContract[i],o="function"==typeof s?s()&d.Required:s&d.Required,l="function"==typeof s?s()&d.Hidden:s&d.Hidden,u=s&d.Array,c=void 0!==e[i],p="object"==typeof e[i]&&null!==e[i];!o||c||u?l||void 0!==(a=p?u?this._serializeArray(e[i],i):this._serializeObject(e[i],i):e[i])&&(r[i]=a):this._logger.throwInternal(m.CRITICAL,x,"Missing required field specification. The field is required but not present on source",{field:i,name:t})}return delete e[n],r},sn.prototype._serializeArray=function(e,t){var n=void 0;if(e)if(ae.isArray(e)){n=[];for(var r=0;r<e.length;r++){var i=e[r],a=this._serializeObject(i,t+"["+r+"]");n.push(a)}}else this._logger.throwInternal(m.CRITICAL,B,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},sn.prototype._serializeStringMap=function(e,t,n){var r=void 0;if(e)for(var i in r={},e){var a=e[i];if("string"===t)void 0===a?r[i]="undefined":null===a?r[i]="null":a.toString?r[i]=a.toString():r[i]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===a)r[i]="undefined";else if(null===a)r[i]="null";else{var s=parseFloat(a);isNaN(s)?r[i]="NaN":r[i]=s}else r[i]="invalid field: "+n+" is of unknown type.",this._logger.throwInternal(m.CRITICAL,r[i],null,!0)}return r},sn);function sn(e){this._logger=e}function on(){this._onlineStatus=!0;try{"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}catch(e){this.isListening=!1}}var ln=(on.prototype._setOnline=function(){this._onlineStatus=!0},on.prototype._setOffline=function(){this._onlineStatus=!1},on.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!(navigator&&!g.isNullOrUndefined(navigator.onLine))||navigator.onLine},on.prototype.isOffline=function(){return!this.isOnline()},on.Offline=new on,on).Offline,un=(cn.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/cn.INT_MAX_VALUE*100},cn.prototype.getHashCode=function(e){if(""==e)return 0;for(;e.length<cn.MIN_INPUT_LENGTH;)e=e.concat(e);for(var t=5381,n=0;n<e.length;++n)t=(t<<5)+t+e.charCodeAt(n),t&=t;return Math.abs(t)},cn.INT_MAX_VALUE=2147483647,cn.MIN_INPUT_LENGTH=8,cn);function cn(){}var pn=(fn.prototype.getSamplingScore=function(e){return e.tags&&e.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.userId]):e.ext&&e.ext.user&&e.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()},fn);function fn(){this.hashCodeGeneragor=new un,this.keys=new Tt}var dn=(hn.prototype.isSampledIn=function(e){var t=this.sampleRate;return null==t||100<=t||e.baseType===Je.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},hn);function hn(e,t){this.INT_MAX_VALUE=2147483647,g.isNullOrUndefined(t)?this._logger=new Q:this._logger=t,(100<e||e<0)&&(this._logger.throwInternal(m.WARNING,q,"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:e},!0),this.sampleRate=100),this.sampleRate=e,this.samplingScoreGenerator=new pn}var gn=(mn.prototype.pause=function(){throw new Error("Method not implemented.")},mn.prototype.resume=function(){throw new Error("Method not implemented.")},mn.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(m.CRITICAL,w,"flush failed, telemetry will not be collected: "+ae.getExceptionName(e),{exception:ae.dump(e)})}},mn.prototype.teardown=function(){throw new Error("Method not implemented.")},mn.prototype.initialize=function(t,e,n){var r=this;this._logger=e.logger,this._serializer=new an(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var i=mn._getDefaultAppInsightsChannelConfig();function a(e){s._config[e]=function(){return Ct.getConfig(t,e,r.identifier,i[e]())}}this._config=mn._getEmptyAppInsightsChannelConfig();var s=this;for(var o in i)a(o);this._buffer=this._config.enableSessionStorageBuffer&&ae.canUseSessionStorage()?new Mt(this._logger,this._config):new Rt(this._config),this._sample=new dn(this._config.samplingPercentage(),this._logger),!this._config.isBeaconApiDisabled()&&ae.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))},mn.prototype.processTelemetry=function(e){var t=this;try{if(this._config.disableTelemetry())return;if(!e)return void this._logger.throwInternal(m.CRITICAL,S,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void this._logger.throwInternal(m.CRITICAL,Y,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!this._sender)return void this._logger.throwInternal(m.CRITICAL,C,"Sender was not initialized");if(!this._isSampledIn(e))return void this._logger.throwInternal(m.WARNING,A,"Telemetry item was sampled out and not sent",{SampleRate:this._sample.sampleRate});e.tags=e.tags||{},e.tags.sampleRate=this._sample.sampleRate;var n=mn.constructEnvelope(e,this._config.instrumentationKey(),this._logger);if(!n)return void this._logger.throwInternal(m.CRITICAL,U,"Unable to create an AppInsights envelope");var r=!1;if(e.tags&&e.tags[de]&&(e.tags[de].forEach(function(e){try{e&&!1===e(n)&&(r=!0,t._logger.warnToConsole("Telemetry processor check returns false"))}catch(e){t._logger.throwInternal(m.CRITICAL,X,"One of telemetry initializers failed, telemetry item will not be sent: "+ae.getExceptionName(e),{exception:ae.dump(e)},!0)}}),delete e.tags[de]),r)return;var i=this._serializer.serialize(n),a=this._buffer.getItems(),s=this._buffer.batchPayloads(a);s&&s.length+i.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(i),this._setupTimer()}catch(e){this._logger.throwInternal(m.WARNING,b,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+ae.getExceptionName(e),{exception:ae.dump(e)})}g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},mn.prototype.setNextPlugin=function(e){this._nextPlugin=e},mn.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var r=null;this._appId||(r=this._parseResponse(e.responseText||e.response))&&r.appId&&(this._appId=r.appId),(e.status<200||300<=e.status)&&0!==e.status?!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(m.WARNING,T,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e)):ln.isOffline()?this._config.isRetryDisabled()||(this._resendPayload(t,10),this._logger.throwInternal(m.WARNING,T,". Offline - Response Code: "+e.status+". Offline status: "+ln.isOffline()+". Will retry to send "+t.length+" items.")):206===e.status?(r=r||this._parseResponse(e.responseText||e.response))&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,r):this._onError(t,this._formatErrorMessageXhr(e)):(this._consecutiveErrors=0,this._onSuccess(t,n))}},mn.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!ae.getIEVersion()||9<ae.getIEVersion())&&this._logger.throwInternal(m.CRITICAL,T,"Telemetry transmission failed, some telemetry will be lost: "+ae.getExceptionName(e),{exception:ae.dump(e)})}},mn.prototype._onError=function(e,t,n){this._logger.throwInternal(m.WARNING,E,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},mn.prototype._onPartialSuccess=function(e,t){for(var n=[],r=[],i=0,a=t.errors.reverse();i<a.length;i++){var s=a[i],o=e.splice(s.index,1)[0];this._isRetriable(s.statusCode)?r.push(o):n.push(o)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<r.length&&(this._resendPayload(r),this._logger.throwInternal(m.WARNING,T,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+r.length+" our of "+t.itemsReceived+" items"))},mn.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},mn.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)},mn.constructEnvelope=function(e,t,n){var r;switch((r=t===e.iKey||g.isNullOrUndefined(t)?e:p({},e,{iKey:t})).baseType){case xe.dataType:return Ft.EventEnvelopeCreator.Create(n,r);case ht.dataType:return nn.TraceEnvelopeCreator.Create(n,r);case nt.dataType:return Jt.PageViewEnvelopeCreator.Create(n,r);case It.dataType:return $t.PageViewPerformanceEnvelopeCreator.Create(n,r);case Me.dataType:return Xt.ExceptionEnvelopeCreator.Create(n,r);case Je.dataType:return Vt.MetricEnvelopeCreator.Create(n,r);case lt.dataType:return zt.DependencyEnvelopeCreator.Create(n,r);default:return Ft.EventEnvelopeCreator.Create(n,r)}},mn._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},mn._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},mn.prototype._isSampledIn=function(e){return this._sample.isSampledIn(e)},mn.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),r=this._buffer.batchPayloads(e),i=new Blob([r],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,i)?(this._buffer.markAsSent(e),this._onSuccess(e,e.length)):(this._xhrSender(e,!0),this._logger.throwInternal(m.WARNING,T,". Failed to send telemetry with Beacon API, retried with xhrSender."))},mn.prototype._xhrSender=function(t,e){var n=this,r=new XMLHttpRequest;r.Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,r.open("POST",this._config.endpointUrl(),e),r.setRequestHeader("Content-type","application/json"),ae.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&r.setRequestHeader(te.sdkContextHeader,te.sdkContextHeaderAppIdRequest),r.onreadystatechange=function(){return n._xhrReadyStateChange(r,t,t.length)},r.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(r),e)};var i=this._buffer.batchPayloads(t);r.send(i),this._buffer.markAsSent(t)},mn.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(m.CRITICAL,L,"Cannot parse the response. "+ae.getExceptionName(e),{response:t})}return null},mn.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,r=e;n<r.length;n++){var i=r[n];this._buffer.enqueue(i)}this._setRetryTime(t),this._setupTimer()}},mn.prototype._setRetryTime=function(e){var t;if(this._consecutiveErrors<=1)t=10;else{var n=(Math.pow(2,this._consecutiveErrors)-1)/2,r=Math.floor(Math.random()*n*10)+1;r*=e,t=Math.max(Math.min(r,3600),10)}var i=Date.now()+1e3*t;this._retryAt=i},mn.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)}},mn.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},mn.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},mn.prototype._xdrSender=function(t,e){var n=this,r=new XDomainRequest;r.onload=function(){return n._xdrOnLoad(r,t)},r.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(r),e)};var i=window.location&&window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(i,0))return this._logger.throwInternal(m.WARNING,T,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var a=this._config.endpointUrl().replace(/^(https?:)/,"");r.open("POST",a);var s=this._buffer.batchPayloads(t);r.send(s),this._buffer.markAsSent(t)},mn.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},mn);function mn(){this.priority=1001,this.identifier="AppInsightsChannelPlugin",this._XMLHttpRequestSupported=!1}e.Sender=gn,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-channel-js.min.js.map
{
"name": "@microsoft/applicationinsights-channel-js",
"version": "2.1.1",
"version": "2.2.0",
"description": "Microsoft Application Insights JavaScript SDK Channel",

@@ -31,4 +31,4 @@ "main": "dist/applicationinsights-channel-js.js",

"dependencies": {
"@microsoft/applicationinsights-core-js": "2.1.1",
"@microsoft/applicationinsights-common": "2.1.1",
"@microsoft/applicationinsights-core-js": "2.2.0",
"@microsoft/applicationinsights-common": "2.2.0",
"tslib": "^1.9.3"

@@ -35,0 +35,0 @@ },

@@ -21,3 +21,3 @@ import {

export abstract class EnvelopeCreator {
public static Version = "2.1.1";
public static Version = "2.2.0";
protected _logger: IDiagnosticLogger;

@@ -406,2 +406,3 @@

EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, properties, measurements);
let baseData = new PageView(logger, name, url, duration, properties, measurements, id);

@@ -427,4 +428,5 @@ let data = new Data<PageView>(PageView.dataType, baseData);

let url = bd.uri || (bd as any).url;
let properties = bd.properties;
let measurements = bd.measurements;
let properties = bd.properties || {};
let measurements = bd.measurements || {};
EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, properties, measurements);
let baseData = new PageViewPerformance(logger, name, url, undefined, properties, measurements, bd);

@@ -431,0 +433,0 @@ let data = new Data<PageViewPerformance>(PageViewPerformance.dataType, baseData);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc