@microsoft/applicationinsights-analytics-js
Advanced tools
Comparing version 2.1.0 to 2.1.1
/*! | ||
* Application Insights JavaScript SDK - Web Analytics, 2.1.0 | ||
* Application Insights JavaScript SDK - Web Analytics, 2.1.1 | ||
* 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,f,a,o=function(){return(o=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=f||(f={}))[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden";var g=(s.isNullOrUndefined=function(e){return null==e},s.disableCookies=function(){s._canUseCookies=!1},s.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)})},s);function s(){}var u,c,l=/[xy]/g;(c=u||(u={}))[c.CRITICAL=1]="CRITICAL",c[c.WARNING=2]="WARNING";var p=1,d=2,h=3,m=4,v=5,w=6,y=8,S=10,_=11,I=25,T=29,N=30,E=31,k=32,x=35,D=36,P=37,b=38,A=39,C=45,M=49,R=52,L=56,U=57,V=61,O=62,z=63,G=64,q=66,j=68,B=69;H.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(H.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),H.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 H(){this.identifier="ChannelControllerPlugin",this.priority=500}var X=(W.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=W.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,W.MAX_NAME_LENGTH-3)+W.padNumber(a);i=o}return i},W.sanitizeKey=function(e,t){var n;return t&&(t=W.trim(t.toString())).length>W.MAX_NAME_LENGTH&&(n=t.substring(0,W.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,U,"name is too long. It has been truncated to "+W.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},W.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=W.MAX_STRING_LENGTH),t&&(n=n||W.MAX_STRING_LENGTH,(t=W.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,V,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},W.sanitizeUrl=function(e,t){return W.sanitizeInput(e,t,W.MAX_URL_LENGTH,q)},W.sanitizeMessage=function(e,t){var n;return t&&t.length>W.MAX_MESSAGE_LENGTH&&(n=t.substring(0,W.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,L,"message is too long, it has been truncated to "+W.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},W.sanitizeException=function(e,t){var n;return t&&t.length>W.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,W.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,R,"exception is too long, it has been truncated to "+W.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},W.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(u.WARNING,M,"custom property is not valid",{exception:e},!0)}i=W.sanitizeString(t,i,W.MAX_PROPERTY_LENGTH),n[r=W.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},W.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=W.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},W.sanitizeId=function(e,t){return t?W.sanitizeInput(e,t,W.MAX_ID_LENGTH,B).toString():t},W.sanitizeInput=function(e,t,n,r){var i;return t&&(t=W.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(u.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},W.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},W.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},W.MAX_NAME_LENGTH=150,W.MAX_ID_LENGTH=128,W.MAX_PROPERTY_LENGTH=8192,W.MAX_STRING_LENGTH=1024,W.MAX_URL_LENGTH=2048,W.MAX_MESSAGE_LENGTH=32768,W.MAX_EXCEPTION_LENGTH=32768,W);function W(){}var K=(F.disableStorage=function(){F._canUseLocalStorage=!1,F._canUseSessionStorage=!1},F._getLocalStorageObject=function(){return F.canUseLocalStorage()?F._getVerifiedStorageObject(i.LocalStorage):null},F._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},F.isInternalApplicationInsightsEndpoint=function(e){return-1!==F._internalEndpoints.indexOf(e.toLowerCase())},F.canUseLocalStorage=function(){return void 0===F._canUseLocalStorage&&(F._canUseLocalStorage=!!F._getVerifiedStorageObject(i.LocalStorage)),F._canUseLocalStorage},F.getStorage=function(t,e){var n=F._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,p,"Browser failed read of local storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return null},F.setStorage=function(t,e,n){var r=F._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,h,"Browser failed write to local storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.removeStorage=function(t,e){var n=F._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,v,"Browser failed removal of local storage item. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F._getSessionStorageObject=function(){return F.canUseSessionStorage()?F._getVerifiedStorageObject(i.SessionStorage):null},F.canUseSessionStorage=function(){return void 0===F._canUseSessionStorage&&(F._canUseSessionStorage=!!F._getVerifiedStorageObject(i.SessionStorage)),F._canUseSessionStorage},F.getSessionStorageKeys=function(){var e=[];if(F.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},F.getSessionStorage=function(t,e){var n=F._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,d,"Browser failed read of session storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return null},F.setSessionStorage=function(t,e,n){var r=F._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,m,"Browser failed write to session storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.removeSessionStorage=function(t,e){var n=F._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,w,"Browser failed removal of session storage item. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.disableCookies=function(){g.disableCookies()},F.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==F.document.cookie}catch(e){t.throwInternal(u.WARNING,j,"Cannot access document.cookie - "+F.getExceptionName(e),{exception:F.dump(e)})}}return g._canUseCookies},F.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),F.document.location&&"https:"===F.document.location.protocol&&(a=";secure"),F.canUseCookies(e)&&(F.document.cookie=t+"="+n+i+";path=/"+a)},F.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},F.getCookie=function(e,t){if(F.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=F.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=F.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},F.deleteCookie=function(e,t){F.canUseCookies(e)&&(F.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},F.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},F.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},F.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},F.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},F.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},F.toISOStringForIE8=function(e){if(F.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"}},F.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},F.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},F.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},F.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},F.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},F.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},F.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},F.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},F.document="undefined"!=typeof document?document:{},F._canUseLocalStorage=void 0,F._canUseSessionStorage=void 0,F._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],F.NotSpecified="not_specified",F);function F(){}var J=(Q.parseUrl=function(e){return Q.htmlAnchorElement||(Q.htmlAnchorElement=Q.document.createElement?Q.document.createElement("a"):{host:Q.parseHost(e)}),Q.htmlAnchorElement.href=e,Q.htmlAnchorElement},Q.getAbsoluteUrl=function(e){var t,n=Q.parseUrl(e);return n&&(t=n.href),t},Q.getPathName=function(e){var t,n=Q.parseUrl(e);return n&&(t=n.pathname),t},Q.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Q.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},Q.document="undefined"!=typeof document?document:{},Q);function Q(){}var Y=($.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=J.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=X.sanitizeString(e,n?n+" "+c:c)}else a=X.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},$);function $(){}var Z=(ee.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()},ee.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n},ee);function ee(){}var te,ne=(t(re,te=function(){}),re);function re(){return te.call(this)||this}var ie;t(ae,ie=function(){this.ver=1,this.sampleRate=100,this.tags={}});function ae(e,t,n){var r=ie.call(this)||this;return r.name=X.sanitizeString(e,n)||K.NotSpecified,r.data=t,r.time=K.toISOStringForIE8(new Date),r.aiDataContract={time:f.Required,iKey:f.Required,name:f.Required,sampleRate:function(){return 100==r.sampleRate?f.Hidden:f.Required},tags:f.Required,data:f.Required},r}function oe(){}var se,ce=(t(le,se=oe),le);function le(){var e=se.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ue,pe=(t(ge,ue=ce),ge.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ge.dataType="EventData",ge);function ge(e,t,n,r){var i=ue.call(this)||this;return i.aiDataContract={ver:f.Required,name:f.Required,properties:f.Default,measurements:f.Default},i.name=X.sanitizeString(e,t)||K.NotSpecified,i.properties=X.sanitizeProperties(e,n),i.measurements=X.sanitizeMeasurements(e,r),i}function fe(){}var de,he=(t(me,de=oe),me);function me(){var e=de.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function ve(){this.hasFullStack=!0,this.parsedStack=[]}var we,ye=(t(Se,we=he),Se.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ie.CreateFromInterface(t,e)});return new Se(t,o({},e,{exceptions:n}))},Se.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,c=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:c}},Se.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Se.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Se.dataType="ExceptionData",Se);function Se(e,t,n,r,i,a){var o=we.call(this)||this;return o.aiDataContract={ver:f.Required,exceptions:f.Required,severityLevel:f.Default,properties:f.Default,measurements:f.Default},t instanceof Error?(o.exceptions=[new Ie(e,t)],o.properties=X.sanitizeProperties(e,n),o.measurements=X.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 _e,Ie=(t(Te,_e=ve),Te.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}},Te.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return Ee.CreateFromInterface(e)})||t.parsedStack;return new Te(e,o({},t,{parsedStack:n}))},Te.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(Ee.regex.test(o)){var s=new Ee(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,p=c,g=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var f=g-p+1;t.splice(p,f);break}p=c,g=l,c++,l--}}return t},Te);function Te(e,t){var n=_e.call(this)||this;if(n.aiDataContract={id:f.Default,outerId:f.Default,typeName:f.Required,message:f.Required,hasFullStack:f.Default,stack:f.Default,parsedStack:f.Array},t instanceof Error){n.typeName=X.sanitizeString(e,t.name)||K.NotSpecified,n.message=X.sanitizeMessage(e,t.message)||K.NotSpecified;var r=t.stack;n.parsedStack=Te.parseStack(r),n.stack=X.sanitizeException(e,r),n.hasFullStack=K.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 Ne,Ee=(t(ke,Ne=fe),ke.CreateFromInterface=function(e){return new ke(e,null)},ke.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},ke.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,ke.baseSize=58,ke);function ke(e,t){var n=Ne.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:f.Required,method:f.Required,assembly:f.Default,fileName:f.Default,line:f.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=K.trim(r),n.fileName="",n.line=0;var i=r.match(ke.regex);i&&5<=i.length&&(n.method=K.trim(i[2])||n.method,n.fileName=K.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+=ke.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var xe,De,Pe,be=(t(Ae,xe=oe),Ae);function Ae(){var e=xe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Pe=De||(De={}))[Pe.Measurement=0]="Measurement",Pe[Pe.Aggregation=1]="Aggregation";var Ce,Me=(t(Re,Ce=function(){this.kind=De.Measurement}),Re);function Re(){var e=null!==Ce&&Ce.apply(this,arguments)||this;return e.aiDataContract={name:f.Required,kind:f.Default,value:f.Required,count:f.Default,min:f.Default,max:f.Default,stdDev:f.Default},e}var Le,Ue=(t(Ve,Le=be),Ve.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ve.dataType="MetricData",Ve);function Ve(e,t,n,r,i,a,o){var s=Le.call(this)||this;s.aiDataContract={ver:f.Required,metrics:f.Required,properties:f.Default};var c=new Me;return c.count=0<r?r:void 0,c.max=isNaN(a)||null===a?void 0:a,c.min=isNaN(i)||null===i?void 0:i,c.name=X.sanitizeString(e,t)||K.NotSpecified,c.value=n,s.metrics=[c],s.properties=X.sanitizeProperties(e,o),s}var Oe,ze=(t(Ge,Oe=ce),Ge);function Ge(){var e=Oe.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var qe,je=(t(Be,qe=ze),Be.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Be.dataType="PageviewData",Be);function Be(e,t,n,r,i,a,o){var s=qe.call(this)||this;return s.aiDataContract={ver:f.Required,name:f.Default,url:f.Default,duration:f.Default,properties:f.Default,measurements:f.Default,id:f.Default},s.id=X.sanitizeId(e,o),s.url=X.sanitizeUrl(e,n),s.name=X.sanitizeString(e,t)||K.NotSpecified,isNaN(r)||(s.duration=K.msToTimeSpan(r)),s.properties=X.sanitizeProperties(e,i),s.measurements=X.sanitizeMeasurements(e,a),s}var He,Xe=(t(We,He=oe),We);function We(){var e=He.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Ke,Fe=(t(Je,Ke=Xe),Je.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Je.dataType="RemoteDependencyData",Je);function Je(e,t,n,r,i,a,o,s,c,l,u){void 0===c&&(c="Ajax");var p=Ke.call(this)||this;p.aiDataContract={id:f.Required,ver:f.Required,name:f.Default,resultCode:f.Default,duration:f.Default,success:f.Default,data:f.Default,target:f.Default,type:f.Default,properties:f.Default,measurements:f.Default,kind:f.Default,value:f.Default,count:f.Default,min:f.Default,max:f.Default,stdDev:f.Default,dependencyKind:f.Default,dependencySource:f.Default,commandName:f.Default,dependencyTypeName:f.Default},p.id=t,p.duration=K.msToTimeSpan(i),p.success=a,p.resultCode=o+"",p.type=X.sanitizeString(e,c);var g=Y.ParseDependencyPath(e,n,s,r);return p.data=X.sanitizeUrl(e,r)||g.data,p.target=X.sanitizeString(e,g.target),p.name=X.sanitizeString(e,g.name),p.properties=X.sanitizeProperties(e,l),p.measurements=X.sanitizeMeasurements(e,u),p}var Qe,Ye=(t($e,Qe=oe),$e);function $e(){var e=Qe.call(this)||this;return e.ver=2,e.properties={},e}var Ze,et=(t(tt,Ze=Ye),tt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",tt.dataType="MessageData",tt);function tt(e,t,n,r){var i=Ze.call(this)||this;return i.aiDataContract={ver:f.Required,message:f.Required,severityLevel:f.Default,properties:f.Default},t=t||K.NotSpecified,i.message=X.sanitizeMessage(e,t),i.properties=X.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var nt,rt=(t(it,nt=ze),it);function it(){var e=nt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var at,ot=(t(st,at=rt),st.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",st.dataType="PageviewPerformanceData",st);function st(e,t,n,r,i,a,o){var s=at.call(this)||this;return s.aiDataContract={ver:f.Required,name:f.Default,url:f.Default,duration:f.Default,perfTotal:f.Default,networkConnect:f.Default,sentRequest:f.Default,receivedResponse:f.Default,domProcessing:f.Default,properties:f.Default,measurements:f.Default},s.url=X.sanitizeUrl(e,n),s.name=X.sanitizeString(e,t)||K.NotSpecified,s.properties=X.sanitizeProperties(e,i),s.measurements=X.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 ct,lt,ut;t(pt,ct=ne);function pt(e,t){var n=ct.call(this)||this;return n.aiDataContract={baseType:f.Required,baseData:f.Required},n.baseType=e,n.baseData=t,n}(ut=lt||(lt={}))[ut.Verbose=0]="Verbose",ut[ut.Information=1]="Information",ut[ut.Warning=2]="Warning",ut[ut.Error=3]="Error",ut[ut.Critical=4]="Critical";var gt=(ft.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},ft);function ft(){}var dt=(ht.create=function(e,t,n,r,i,a){if(n=X.sanitizeString(r,n)||K.NotSpecified,g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||g.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:(new Date).toISOString(),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!g.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},ht);function ht(){}var mt=(vt.prototype.trackPageView=function(t,n){var r=this,i=t.name;!g.isNullOrUndefined(i)&&"string"==typeof i||(t.name=window.document&&window.document.title||"");var a=t.uri;if(!g.isNullOrUndefined(a)&&"string"==typeof a||(t.uri=window.location&&window.location.href||""),!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(u.WARNING,I,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,s=void 0,c=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=Z.GetDuration(c,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=void 0);var e=void 0;g.isNullOrUndefined(n)||g.isNullOrUndefined(n.duration)||(e=n.duration),!this.overridePageViewDuration&&isNaN(e)||(isNaN(e)&&(n||(n={}),n.duration=s),this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),o=!0),n||(n={});var l=setInterval(function(){try{if(r._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(l);var e={name:i,uri:a};r._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||o?(o||(n.duration=e.durationMs,r.appInsights.sendPageViewInternal(t,n)),r.pageViewPerformanceSent||(r.appInsights.sendPageViewPerformanceInternal(e,n),r.pageViewPerformanceSent=!0),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(n.duration=s,r.appInsights.sendPageViewInternal(t,n),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else 6e4<Z.GetDuration(c,+new Date)&&(clearInterval(l),o||(n.duration=6e4,r.appInsights.sendPageViewInternal(t,n),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){r._logger.throwInternal(u.CRITICAL,b,"trackPageView failed on page load calculation: "+K.getExceptionName(e),{exception:K.dump(e)})}},100)},vt);function vt(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var wt=(yt.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(e){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+K.dump(e))}},yt.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(e){return this._logger.warnToConsole("Call to restart failed: "+K.dump(e)),null}},yt.prototype.startPageVisitTimer=function(e,t){try{if(K.canUseSessionStorage()){if(null!=K.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new St(e,t),r=JSON.stringify(n);K.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+K.dump(e))}},yt.prototype.stopPageVisitTimer=function(){try{if(K.canUseSessionStorage()){var e=Date.now(),t=K.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,K.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+K.dump(e)),null}},yt);function yt(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var St=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},_t=(It.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceTiming();if(t){var n=Z.GetDuration(t.navigationStart,t.loadEventEnd),r=Z.GetDuration(t.navigationStart,t.connectEnd),i=Z.GetDuration(t.requestStart,t.responseStart),a=Z.GetDuration(t.responseStart,t.responseEnd),o=Z.GetDuration(t.responseEnd,t.loadEventEnd);0==n?this._logger.throwInternal(u.WARNING,S,"error calculating page view performance.",{total:n,network:r,request:i,response:a,dom:o}):this.shouldCollectDuration(n,r,i,a,o)?n<Math.floor(r)+Math.floor(i)+Math.floor(a)+Math.floor(o)?this._logger.throwInternal(u.WARNING,y,"client performance math error.",{total:n,network:r,request:i,response:a,dom:o}):(e.durationMs=n,e.perfTotal=e.duration=K.msToTimeSpan(n),e.networkConnect=K.msToTimeSpan(r),e.sentRequest=K.msToTimeSpan(i),e.receivedResponse=K.msToTimeSpan(a),e.domProcessing=K.msToTimeSpan(o),e.isValid=!0):this._logger.throwInternal(u.WARNING,C,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:r,request:i,response:a,dom:o})}},It.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},It.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},It.prototype.isPerformanceTimingDataReady=function(){var e=window.performance.timing;return 0<e.domainLookupStart&&0<e.navigationStart&&0<e.responseStart&&0<e.requestStart&&0<e.loadEventEnd&&0<e.responseEnd&&0<e.connectEnd&&0<e.domLoading},It.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=navigator.userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(var o=0;o<e.length;o++)if(e[o]>=this.MAX_DURATION_ALLOWED)return!1;return!0},It);function It(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Tt="duration",Nt=(Et.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=K.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=K.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=K.stringToBoolOrDefault(e.overridePageViewDuration),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=K.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=K.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=K.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=K.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Et.prototype.processTelemetry=function(e){for(var t=!1,n=this._telemetryInitializers.length,r=0;r<n;++r){var i=this._telemetryInitializers[r];if(i)try{if(!1===i.apply(null,[e])){t=!0;break}}catch(e){this._logger.throwInternal(u.CRITICAL,G,"One of telemetry initializers failed, telemetry item will not be sent: "+K.getExceptionName(e),{exception:K.dump(e)},!0)}}t||g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},Et.prototype.setNextPlugin=function(e){this._nextPlugin=e},Et.prototype.trackEvent=function(e,t){try{var n=dt.create(e,pe.dataType,pe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,A,"trackTrace failed, trace will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,T,"startTrackEvent failed, event will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(u.CRITICAL,N,"stopTrackEvent failed, event will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackTrace=function(e,t){try{var n=dt.create(e,et.dataType,et.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,A,"trackTrace failed, trace will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackMetric=function(e,t){try{var n=dt.create(e,Ue.dataType,Ue.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.CRITICAL,D,"trackMetric failed, metric will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,o({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackPageView failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.sendPageViewInternal=function(e,t,n){"undefined"!=typeof document&&(e.refUri=e.refUri||document.referrer);var r=dt.create(e,je.dataType,je.envelopeType,this._logger,t,n);this.core.track(r),this._trackAjaxAttempts=0},Et.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=dt.create(e,ot.dataType,ot.envelopeType,this._logger,t,n);this.core.track(r)},Et.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackPageViewPerformance failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,E,"startTrackPage failed, page view may not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.stopTrackPage=function(e,t,n,r){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,k,"stopTrackPage failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.sendExceptionInternal=function(e,t,n){var r=new ye(this._logger,e.exception||new Error(K.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=dt.create(r,ye.dataType,ye.envelopeType,this._logger,t,n);this.core.track(i)},Et.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,x,"trackException failed, exception will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(K.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!K.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({exception:t.error,severityLevel:lt.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(u.CRITICAL,_,"_onError threw exception while logging error, error will not be collected: "+K.getExceptionName(e),{exception:K.dump(e),errorString:r})}},Et.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Et.prototype._initialize=function(e,t,n){var o=this;if(!this._isInitialized){if(g.isNullOrUndefined(t))throw Error("Error initializing");this.core=t,this._logger=t.logger,this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};var r=Et.getDefaultConfig();if(void 0!==r){for(var i in r)this.config[i]=gt.getConfig(e,i,this.identifier,r[i]);if(this._globalconfig)for(var i in r)void 0===this._globalconfig[i]&&(this._globalconfig[i]=r[i])}this.config.isCookieUseDisabled&&K.disableCookies(),this.config.isStorageUseDisabled&&K.disableStorage();var a={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new _t(this.core),this._pageViewManager=new mt(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new wt(this._logger,function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new kt(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,r){r||(r={}),r[Tt]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new kt(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){g.isNullOrUndefined(r)&&(r={}),r[Tt]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var s,c,l=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var u=window.onerror;window.onerror=function(e,t,n,r,i){var a=u&&u(e,t,n,r,i);return!0!==a&&l._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&"object"==typeof history&&"function"==typeof history.pushState&&"function"==typeof history.replaceState&&"object"==typeof window){var p=this;n.forEach(function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),history.pushState=(c=history.pushState,function(){var e=c.apply(this,arguments);return window.dispatchEvent(new Event(p.config.namePrefix+"pushState")),window.dispatchEvent(new Event(p.config.namePrefix+"locationchange")),e}),history.replaceState=(s=history.replaceState,function(){var e=s.apply(this,arguments);return window.dispatchEvent(new Event(p.config.namePrefix+"replaceState")),window.dispatchEvent(new Event(p.config.namePrefix+"locationchange")),e}),window.addEventListener(p.config.namePrefix+"popstate",function(){window.dispatchEvent(new Event(p.config.namePrefix+"locationchange"))}),window.addEventListener(p.config.namePrefix+"locationchange",function(){p._properties&&p._properties.context&&p._properties.context.telemetryTrace&&(p._properties.context.telemetryTrace.traceID=K.newId(),p._properties.context.telemetryTrace.name=window.location.pathname),p.trackPageView({properties:{duration:0}})})}this._isInitialized=!0}},Et.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Et.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===Fe.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Et.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Et.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=dt.create(t,ye.dataType,ye.envelopeType,this._logger,{url:e});this.core.track(n)},Et.Version="2.1.0",Et);function Et(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}var kt=(xt.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(u.WARNING,O,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},xt.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(u.WARNING,z,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=Z.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=void 0},xt);function xt(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Nt,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,f,a,o=function(){return(o=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=f||(f={}))[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden";var g=(s.isNullOrUndefined=function(e){return null==e},s.disableCookies=function(){s._canUseCookies=!1},s.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)})},s);function s(){}var u,c,l=/[xy]/g;(c=u||(u={}))[c.CRITICAL=1]="CRITICAL",c[c.WARNING=2]="WARNING";var p=1,d=2,h=3,m=4,v=5,w=6,y=8,S=10,_=11,I=25,T=29,N=30,E=31,k=32,x=35,D=36,P=37,b=38,A=39,C=45,M=49,R=52,U=56,L=57,V=61,O=62,z=63,G=64,q=66,j=68,B=69;H.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(H.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),H.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 H(){this.identifier="ChannelControllerPlugin",this.priority=500}var X=(W.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=W.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,W.MAX_NAME_LENGTH-3)+W.padNumber(a);i=o}return i},W.sanitizeKey=function(e,t){var n;return t&&(t=W.trim(t.toString())).length>W.MAX_NAME_LENGTH&&(n=t.substring(0,W.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,L,"name is too long. It has been truncated to "+W.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},W.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=W.MAX_STRING_LENGTH),t&&(n=n||W.MAX_STRING_LENGTH,(t=W.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,V,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},W.sanitizeUrl=function(e,t){return W.sanitizeInput(e,t,W.MAX_URL_LENGTH,q)},W.sanitizeMessage=function(e,t){var n;return t&&t.length>W.MAX_MESSAGE_LENGTH&&(n=t.substring(0,W.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,U,"message is too long, it has been truncated to "+W.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},W.sanitizeException=function(e,t){var n;return t&&t.length>W.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,W.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,R,"exception is too long, it has been truncated to "+W.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},W.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(u.WARNING,M,"custom property is not valid",{exception:e},!0)}i=W.sanitizeString(t,i,W.MAX_PROPERTY_LENGTH),n[r=W.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},W.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=W.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},W.sanitizeId=function(e,t){return t?W.sanitizeInput(e,t,W.MAX_ID_LENGTH,B).toString():t},W.sanitizeInput=function(e,t,n,r){var i;return t&&(t=W.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(u.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},W.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},W.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},W.MAX_NAME_LENGTH=150,W.MAX_ID_LENGTH=128,W.MAX_PROPERTY_LENGTH=8192,W.MAX_STRING_LENGTH=1024,W.MAX_URL_LENGTH=2048,W.MAX_MESSAGE_LENGTH=32768,W.MAX_EXCEPTION_LENGTH=32768,W);function W(){}var K=(F.disableStorage=function(){F._canUseLocalStorage=!1,F._canUseSessionStorage=!1},F._getLocalStorageObject=function(){return F.canUseLocalStorage()?F._getVerifiedStorageObject(i.LocalStorage):null},F._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},F.isInternalApplicationInsightsEndpoint=function(e){return-1!==F._internalEndpoints.indexOf(e.toLowerCase())},F.canUseLocalStorage=function(){return void 0===F._canUseLocalStorage&&(F._canUseLocalStorage=!!F._getVerifiedStorageObject(i.LocalStorage)),F._canUseLocalStorage},F.getStorage=function(t,e){var n=F._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,p,"Browser failed read of local storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return null},F.setStorage=function(t,e,n){var r=F._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,h,"Browser failed write to local storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.removeStorage=function(t,e){var n=F._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,v,"Browser failed removal of local storage item. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F._getSessionStorageObject=function(){return F.canUseSessionStorage()?F._getVerifiedStorageObject(i.SessionStorage):null},F.canUseSessionStorage=function(){return void 0===F._canUseSessionStorage&&(F._canUseSessionStorage=!!F._getVerifiedStorageObject(i.SessionStorage)),F._canUseSessionStorage},F.getSessionStorageKeys=function(){var e=[];if(F.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},F.getSessionStorage=function(t,e){var n=F._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,d,"Browser failed read of session storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return null},F.setSessionStorage=function(t,e,n){var r=F._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,m,"Browser failed write to session storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.removeSessionStorage=function(t,e){var n=F._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,w,"Browser failed removal of session storage item. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.disableCookies=function(){g.disableCookies()},F.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==F.document.cookie}catch(e){t.throwInternal(u.WARNING,j,"Cannot access document.cookie - "+F.getExceptionName(e),{exception:F.dump(e)})}}return g._canUseCookies},F.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),F.document.location&&"https:"===F.document.location.protocol&&(a=";secure"),F.canUseCookies(e)&&(F.document.cookie=t+"="+n+i+";path=/"+a)},F.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},F.getCookie=function(e,t){if(F.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=F.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=F.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},F.deleteCookie=function(e,t){F.canUseCookies(e)&&(F.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},F.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},F.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},F.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},F.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},F.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},F.toISOStringForIE8=function(e){if(F.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"}},F.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},F.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},F.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},F.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},F.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},F.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},F.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},F.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},F.document="undefined"!=typeof document?document:{},F._canUseLocalStorage=void 0,F._canUseSessionStorage=void 0,F._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],F.NotSpecified="not_specified",F);function F(){}var J=(Q.parseUrl=function(e){return Q.htmlAnchorElement||(Q.htmlAnchorElement=Q.document.createElement?Q.document.createElement("a"):{host:Q.parseHost(e)}),Q.htmlAnchorElement.href=e,Q.htmlAnchorElement},Q.getAbsoluteUrl=function(e){var t,n=Q.parseUrl(e);return n&&(t=n.href),t},Q.getPathName=function(e){var t,n=Q.parseUrl(e);return n&&(t=n.pathname),t},Q.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Q.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},Q.document="undefined"!=typeof document?document:{},Q);function Q(){}var Y=($.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=J.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=X.sanitizeString(e,n?n+" "+c:c)}else a=X.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},$);function $(){}var Z=(ee.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()},ee.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n},ee);function ee(){}var te,ne=(t(re,te=function(){}),re);function re(){return te.call(this)||this}var ie;t(ae,ie=function(){this.ver=1,this.sampleRate=100,this.tags={}});function ae(e,t,n){var r=ie.call(this)||this;return r.name=X.sanitizeString(e,n)||K.NotSpecified,r.data=t,r.time=K.toISOStringForIE8(new Date),r.aiDataContract={time:f.Required,iKey:f.Required,name:f.Required,sampleRate:function(){return 100==r.sampleRate?f.Hidden:f.Required},tags:f.Required,data:f.Required},r}function oe(){}var se,ce=(t(le,se=oe),le);function le(){var e=se.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ue,pe=(t(ge,ue=ce),ge.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ge.dataType="EventData",ge);function ge(e,t,n,r){var i=ue.call(this)||this;return i.aiDataContract={ver:f.Required,name:f.Required,properties:f.Default,measurements:f.Default},i.name=X.sanitizeString(e,t)||K.NotSpecified,i.properties=X.sanitizeProperties(e,n),i.measurements=X.sanitizeMeasurements(e,r),i}function fe(){}var de,he=(t(me,de=oe),me);function me(){var e=de.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function ve(){this.hasFullStack=!0,this.parsedStack=[]}var we,ye=(t(Se,we=he),Se.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ie.CreateFromInterface(t,e)});return new Se(t,o({},e,{exceptions:n}))},Se.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,c=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:c}},Se.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Se.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Se.dataType="ExceptionData",Se);function Se(e,t,n,r,i,a){var o=we.call(this)||this;return o.aiDataContract={ver:f.Required,exceptions:f.Required,severityLevel:f.Default,properties:f.Default,measurements:f.Default},t instanceof Error?(o.exceptions=[new Ie(e,t)],o.properties=X.sanitizeProperties(e,n),o.measurements=X.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 _e,Ie=(t(Te,_e=ve),Te.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}},Te.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return Ee.CreateFromInterface(e)})||t.parsedStack;return new Te(e,o({},t,{parsedStack:n}))},Te.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(Ee.regex.test(o)){var s=new Ee(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,p=c,g=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var f=g-p+1;t.splice(p,f);break}p=c,g=l,c++,l--}}return t},Te);function Te(e,t){var n=_e.call(this)||this;if(n.aiDataContract={id:f.Default,outerId:f.Default,typeName:f.Required,message:f.Required,hasFullStack:f.Default,stack:f.Default,parsedStack:f.Array},t instanceof Error){n.typeName=X.sanitizeString(e,t.name)||K.NotSpecified,n.message=X.sanitizeMessage(e,t.message)||K.NotSpecified;var r=t.stack;n.parsedStack=Te.parseStack(r),n.stack=X.sanitizeException(e,r),n.hasFullStack=K.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 Ne,Ee=(t(ke,Ne=fe),ke.CreateFromInterface=function(e){return new ke(e,null)},ke.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},ke.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,ke.baseSize=58,ke);function ke(e,t){var n=Ne.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:f.Required,method:f.Required,assembly:f.Default,fileName:f.Default,line:f.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=K.trim(r),n.fileName="",n.line=0;var i=r.match(ke.regex);i&&5<=i.length&&(n.method=K.trim(i[2])||n.method,n.fileName=K.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+=ke.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var xe,De,Pe,be=(t(Ae,xe=oe),Ae);function Ae(){var e=xe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Pe=De||(De={}))[Pe.Measurement=0]="Measurement",Pe[Pe.Aggregation=1]="Aggregation";var Ce,Me=(t(Re,Ce=function(){this.kind=De.Measurement}),Re);function Re(){var e=null!==Ce&&Ce.apply(this,arguments)||this;return e.aiDataContract={name:f.Required,kind:f.Default,value:f.Required,count:f.Default,min:f.Default,max:f.Default,stdDev:f.Default},e}var Ue,Le=(t(Ve,Ue=be),Ve.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ve.dataType="MetricData",Ve);function Ve(e,t,n,r,i,a,o){var s=Ue.call(this)||this;s.aiDataContract={ver:f.Required,metrics:f.Required,properties:f.Default};var c=new Me;return c.count=0<r?r:void 0,c.max=isNaN(a)||null===a?void 0:a,c.min=isNaN(i)||null===i?void 0:i,c.name=X.sanitizeString(e,t)||K.NotSpecified,c.value=n,s.metrics=[c],s.properties=X.sanitizeProperties(e,o),s}var Oe,ze=(t(Ge,Oe=ce),Ge);function Ge(){var e=Oe.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var qe,je=(t(Be,qe=ze),Be.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Be.dataType="PageviewData",Be);function Be(e,t,n,r,i,a,o){var s=qe.call(this)||this;return s.aiDataContract={ver:f.Required,name:f.Default,url:f.Default,duration:f.Default,properties:f.Default,measurements:f.Default,id:f.Default},s.id=X.sanitizeId(e,o),s.url=X.sanitizeUrl(e,n),s.name=X.sanitizeString(e,t)||K.NotSpecified,isNaN(r)||(s.duration=K.msToTimeSpan(r)),s.properties=X.sanitizeProperties(e,i),s.measurements=X.sanitizeMeasurements(e,a),s}var He,Xe=(t(We,He=oe),We);function We(){var e=He.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Ke,Fe=(t(Je,Ke=Xe),Je.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Je.dataType="RemoteDependencyData",Je);function Je(e,t,n,r,i,a,o,s,c,l,u){void 0===c&&(c="Ajax");var p=Ke.call(this)||this;p.aiDataContract={id:f.Required,ver:f.Required,name:f.Default,resultCode:f.Default,duration:f.Default,success:f.Default,data:f.Default,target:f.Default,type:f.Default,properties:f.Default,measurements:f.Default,kind:f.Default,value:f.Default,count:f.Default,min:f.Default,max:f.Default,stdDev:f.Default,dependencyKind:f.Default,dependencySource:f.Default,commandName:f.Default,dependencyTypeName:f.Default},p.id=t,p.duration=K.msToTimeSpan(i),p.success=a,p.resultCode=o+"",p.type=X.sanitizeString(e,c);var g=Y.ParseDependencyPath(e,n,s,r);return p.data=X.sanitizeUrl(e,r)||g.data,p.target=X.sanitizeString(e,g.target),p.name=X.sanitizeString(e,g.name),p.properties=X.sanitizeProperties(e,l),p.measurements=X.sanitizeMeasurements(e,u),p}var Qe,Ye=(t($e,Qe=oe),$e);function $e(){var e=Qe.call(this)||this;return e.ver=2,e.properties={},e}var Ze,et=(t(tt,Ze=Ye),tt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",tt.dataType="MessageData",tt);function tt(e,t,n,r){var i=Ze.call(this)||this;return i.aiDataContract={ver:f.Required,message:f.Required,severityLevel:f.Default,properties:f.Default},t=t||K.NotSpecified,i.message=X.sanitizeMessage(e,t),i.properties=X.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var nt,rt=(t(it,nt=ze),it);function it(){var e=nt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var at,ot=(t(st,at=rt),st.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",st.dataType="PageviewPerformanceData",st);function st(e,t,n,r,i,a,o){var s=at.call(this)||this;return s.aiDataContract={ver:f.Required,name:f.Default,url:f.Default,duration:f.Default,perfTotal:f.Default,networkConnect:f.Default,sentRequest:f.Default,receivedResponse:f.Default,domProcessing:f.Default,properties:f.Default,measurements:f.Default},s.url=X.sanitizeUrl(e,n),s.name=X.sanitizeString(e,t)||K.NotSpecified,s.properties=X.sanitizeProperties(e,i),s.measurements=X.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 ct,lt,ut;t(pt,ct=ne);function pt(e,t){var n=ct.call(this)||this;return n.aiDataContract={baseType:f.Required,baseData:f.Required},n.baseType=e,n.baseData=t,n}(ut=lt||(lt={}))[ut.Verbose=0]="Verbose",ut[ut.Information=1]="Information",ut[ut.Warning=2]="Warning",ut[ut.Error=3]="Error",ut[ut.Critical=4]="Critical";var gt=(ft.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},ft);function ft(){}var dt=(ht.create=function(e,t,n,r,i,a){if(n=X.sanitizeString(r,n)||K.NotSpecified,g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||g.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:(new Date).toISOString(),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!g.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},ht);function ht(){}var mt=(vt.prototype.trackPageView=function(t,n){var r=this,i=t.name;!g.isNullOrUndefined(i)&&"string"==typeof i||(t.name=window.document&&window.document.title||"");var a=t.uri;if(!g.isNullOrUndefined(a)&&"string"==typeof a||(t.uri=window.location&&window.location.href||""),!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(u.WARNING,I,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,s=void 0,c=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=Z.GetDuration(c,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=void 0);var e=void 0;g.isNullOrUndefined(n)||g.isNullOrUndefined(n.duration)||(e=n.duration),!this.overridePageViewDuration&&isNaN(e)||(isNaN(e)&&(n||(n={}),n.duration=s),this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),o=!0),n||(n={});var l=setInterval(function(){try{if(r._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(l);var e={name:i,uri:a};r._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||o?(o||(n.duration=e.durationMs,r.appInsights.sendPageViewInternal(t,n)),r.pageViewPerformanceSent||(r.appInsights.sendPageViewPerformanceInternal(e,n),r.pageViewPerformanceSent=!0),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(n.duration=s,r.appInsights.sendPageViewInternal(t,n),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else 6e4<Z.GetDuration(c,+new Date)&&(clearInterval(l),o||(n.duration=6e4,r.appInsights.sendPageViewInternal(t,n),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){r._logger.throwInternal(u.CRITICAL,b,"trackPageView failed on page load calculation: "+K.getExceptionName(e),{exception:K.dump(e)})}},100)},vt);function vt(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var wt=(yt.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(e){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+K.dump(e))}},yt.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(e){return this._logger.warnToConsole("Call to restart failed: "+K.dump(e)),null}},yt.prototype.startPageVisitTimer=function(e,t){try{if(K.canUseSessionStorage()){if(null!=K.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new St(e,t),r=JSON.stringify(n);K.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+K.dump(e))}},yt.prototype.stopPageVisitTimer=function(){try{if(K.canUseSessionStorage()){var e=Date.now(),t=K.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,K.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+K.dump(e)),null}},yt);function yt(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var St=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},_t=(It.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceTiming();if(t){var n=Z.GetDuration(t.navigationStart,t.loadEventEnd),r=Z.GetDuration(t.navigationStart,t.connectEnd),i=Z.GetDuration(t.requestStart,t.responseStart),a=Z.GetDuration(t.responseStart,t.responseEnd),o=Z.GetDuration(t.responseEnd,t.loadEventEnd);0==n?this._logger.throwInternal(u.WARNING,S,"error calculating page view performance.",{total:n,network:r,request:i,response:a,dom:o}):this.shouldCollectDuration(n,r,i,a,o)?n<Math.floor(r)+Math.floor(i)+Math.floor(a)+Math.floor(o)?this._logger.throwInternal(u.WARNING,y,"client performance math error.",{total:n,network:r,request:i,response:a,dom:o}):(e.durationMs=n,e.perfTotal=e.duration=K.msToTimeSpan(n),e.networkConnect=K.msToTimeSpan(r),e.sentRequest=K.msToTimeSpan(i),e.receivedResponse=K.msToTimeSpan(a),e.domProcessing=K.msToTimeSpan(o),e.isValid=!0):this._logger.throwInternal(u.WARNING,C,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:r,request:i,response:a,dom:o})}},It.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},It.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},It.prototype.isPerformanceTimingDataReady=function(){var e=window.performance.timing;return 0<e.domainLookupStart&&0<e.navigationStart&&0<e.responseStart&&0<e.requestStart&&0<e.loadEventEnd&&0<e.responseEnd&&0<e.connectEnd&&0<e.domLoading},It.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=navigator.userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(var o=0;o<e.length;o++)if(e[o]>=this.MAX_DURATION_ALLOWED)return!1;return!0},It);function It(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Tt="duration",Nt=(Et.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=K.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=K.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=K.stringToBoolOrDefault(e.overridePageViewDuration),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=K.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=K.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=K.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=K.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Et.prototype.processTelemetry=function(e){for(var t=!1,n=this._telemetryInitializers.length,r=0;r<n;++r){var i=this._telemetryInitializers[r];if(i)try{if(!1===i.apply(null,[e])){t=!0;break}}catch(e){this._logger.throwInternal(u.CRITICAL,G,"One of telemetry initializers failed, telemetry item will not be sent: "+K.getExceptionName(e),{exception:K.dump(e)},!0)}}t||g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},Et.prototype.setNextPlugin=function(e){this._nextPlugin=e},Et.prototype.trackEvent=function(e,t){try{var n=dt.create(e,pe.dataType,pe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,A,"trackTrace failed, trace will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,T,"startTrackEvent failed, event will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(u.CRITICAL,N,"stopTrackEvent failed, event will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackTrace=function(e,t){try{var n=dt.create(e,et.dataType,et.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,A,"trackTrace failed, trace will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackMetric=function(e,t){try{var n=dt.create(e,Le.dataType,Le.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.CRITICAL,D,"trackMetric failed, metric will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,o({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackPageView failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.sendPageViewInternal=function(e,t,n){"undefined"!=typeof document&&(e.refUri=void 0===e.refUri?document.referrer:e.refUri);var r=dt.create(e,je.dataType,je.envelopeType,this._logger,t,n);this.core.track(r),this._trackAjaxAttempts=0},Et.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=dt.create(e,ot.dataType,ot.envelopeType,this._logger,t,n);this.core.track(r)},Et.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackPageViewPerformance failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,E,"startTrackPage failed, page view may not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.stopTrackPage=function(e,t,n,r){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,k,"stopTrackPage failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.sendExceptionInternal=function(e,t,n){var r=new ye(this._logger,e.exception||new Error(K.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=dt.create(r,ye.dataType,ye.envelopeType,this._logger,t,n);this.core.track(i)},Et.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,x,"trackException failed, exception will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(K.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!K.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({exception:t.error,severityLevel:lt.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(u.CRITICAL,_,"_onError threw exception while logging error, error will not be collected: "+K.getExceptionName(e),{exception:K.dump(e),errorString:r})}},Et.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Et.prototype._initialize=function(e,t,n){var o=this;if(!this._isInitialized){if(g.isNullOrUndefined(t))throw Error("Error initializing");this.core=t,this._logger=t.logger,this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};var r=Et.getDefaultConfig();if(void 0!==r){for(var i in r)this.config[i]=gt.getConfig(e,i,this.identifier,r[i]);if(this._globalconfig)for(var i in r)void 0===this._globalconfig[i]&&(this._globalconfig[i]=r[i])}this.config.isCookieUseDisabled&&K.disableCookies(),this.config.isStorageUseDisabled&&K.disableStorage();var a={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new _t(this.core),this._pageViewManager=new mt(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new wt(this._logger,function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new kt(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,r){r||(r={}),r[Tt]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new kt(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){g.isNullOrUndefined(r)&&(r={}),r[Tt]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var s,c,l=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var u=window.onerror;window.onerror=function(e,t,n,r,i){var a=u&&u(e,t,n,r,i);return!0!==a&&l._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&"object"==typeof history&&"function"==typeof history.pushState&&"function"==typeof history.replaceState&&"object"==typeof window){var p=this;n.forEach(function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),history.pushState=(c=history.pushState,function(){var e=c.apply(this,arguments);return window.dispatchEvent(new Event(p.config.namePrefix+"pushState")),window.dispatchEvent(new Event(p.config.namePrefix+"locationchange")),e}),history.replaceState=(s=history.replaceState,function(){var e=s.apply(this,arguments);return window.dispatchEvent(new Event(p.config.namePrefix+"replaceState")),window.dispatchEvent(new Event(p.config.namePrefix+"locationchange")),e}),window.addEventListener(p.config.namePrefix+"popstate",function(){window.dispatchEvent(new Event(p.config.namePrefix+"locationchange"))}),window.addEventListener(p.config.namePrefix+"locationchange",function(){p._properties&&p._properties.context&&p._properties.context.telemetryTrace&&(p._properties.context.telemetryTrace.traceID=K.newId(),p._properties.context.telemetryTrace.name=window.location.pathname),setTimeout(function(){p.trackPageView({refUri:null,properties:{duration:0}})},p.autoRoutePVDelay)})}this._isInitialized=!0}},Et.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Et.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===Fe.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Et.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Et.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=dt.create(t,ye.dataType,ye.envelopeType,this._logger,{url:e});this.core.track(n)},Et.Version="2.1.1",Et);function Et(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this.autoRoutePVDelay=500,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}var kt=(xt.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(u.WARNING,O,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},xt.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(u.WARNING,z,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=Z.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=void 0},xt);function xt(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Nt,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map |
@@ -17,2 +17,3 @@ /** | ||
this.priority = 180; // take from reserved priority range 100- 200 | ||
this.autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place | ||
this._isInitialized = false; | ||
@@ -168,3 +169,3 @@ // Counts number of trackAjax invokations. | ||
if (typeof document !== "undefined") { | ||
pageView.refUri = pageView.refUri || document.referrer; | ||
pageView.refUri = pageView.refUri === undefined ? document.referrer : pageView.refUri; | ||
} | ||
@@ -438,3 +439,6 @@ var telemetryItem = TelemetryItemCreator.create(pageView, PageView.dataType, PageView.envelopeType, this._logger, properties, systemProperties); | ||
} | ||
_self_1.trackPageView({ properties: { duration: 0 } }); // SPA route change loading durations are undefined, so send 0 | ||
setTimeout(function () { | ||
// todo: override start time so that it is not affected by autoRoutePVDelay | ||
_self_1.trackPageView({ refUri: null, properties: { duration: 0 } }); // SPA route change loading durations are undefined, so send 0 | ||
}, _self_1.autoRoutePVDelay); | ||
}); | ||
@@ -492,3 +496,3 @@ } | ||
}; | ||
ApplicationInsights.Version = "2.1.0"; // Not currently used anywhere | ||
ApplicationInsights.Version = "2.1.1"; // Not currently used anywhere | ||
return ApplicationInsights; | ||
@@ -495,0 +499,0 @@ }()); |
/*! | ||
* Application Insights JavaScript SDK - Web Analytics, 2.1.0 | ||
* Application Insights JavaScript SDK - Web Analytics, 2.1.1 | ||
* 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,f,a,o=function(){return(o=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=f||(f={}))[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden";var g=(s.isNullOrUndefined=function(e){return null==e},s.disableCookies=function(){s._canUseCookies=!1},s.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)})},s);function s(){}var u,c,l=/[xy]/g;(c=u||(u={}))[c.CRITICAL=1]="CRITICAL",c[c.WARNING=2]="WARNING";var p=1,d=2,h=3,m=4,v=5,w=6,y=8,S=10,_=11,I=25,T=29,N=30,E=31,k=32,x=35,D=36,P=37,b=38,A=39,C=45,M=49,R=52,L=56,U=57,V=61,O=62,z=63,G=64,q=66,j=68,B=69;H.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(H.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),H.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 H(){this.identifier="ChannelControllerPlugin",this.priority=500}var X=(W.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=W.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,W.MAX_NAME_LENGTH-3)+W.padNumber(a);i=o}return i},W.sanitizeKey=function(e,t){var n;return t&&(t=W.trim(t.toString())).length>W.MAX_NAME_LENGTH&&(n=t.substring(0,W.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,U,"name is too long. It has been truncated to "+W.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},W.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=W.MAX_STRING_LENGTH),t&&(n=n||W.MAX_STRING_LENGTH,(t=W.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,V,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},W.sanitizeUrl=function(e,t){return W.sanitizeInput(e,t,W.MAX_URL_LENGTH,q)},W.sanitizeMessage=function(e,t){var n;return t&&t.length>W.MAX_MESSAGE_LENGTH&&(n=t.substring(0,W.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,L,"message is too long, it has been truncated to "+W.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},W.sanitizeException=function(e,t){var n;return t&&t.length>W.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,W.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,R,"exception is too long, it has been truncated to "+W.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},W.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(u.WARNING,M,"custom property is not valid",{exception:e},!0)}i=W.sanitizeString(t,i,W.MAX_PROPERTY_LENGTH),n[r=W.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},W.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=W.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},W.sanitizeId=function(e,t){return t?W.sanitizeInput(e,t,W.MAX_ID_LENGTH,B).toString():t},W.sanitizeInput=function(e,t,n,r){var i;return t&&(t=W.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(u.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},W.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},W.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},W.MAX_NAME_LENGTH=150,W.MAX_ID_LENGTH=128,W.MAX_PROPERTY_LENGTH=8192,W.MAX_STRING_LENGTH=1024,W.MAX_URL_LENGTH=2048,W.MAX_MESSAGE_LENGTH=32768,W.MAX_EXCEPTION_LENGTH=32768,W);function W(){}var K=(F.disableStorage=function(){F._canUseLocalStorage=!1,F._canUseSessionStorage=!1},F._getLocalStorageObject=function(){return F.canUseLocalStorage()?F._getVerifiedStorageObject(i.LocalStorage):null},F._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},F.isInternalApplicationInsightsEndpoint=function(e){return-1!==F._internalEndpoints.indexOf(e.toLowerCase())},F.canUseLocalStorage=function(){return void 0===F._canUseLocalStorage&&(F._canUseLocalStorage=!!F._getVerifiedStorageObject(i.LocalStorage)),F._canUseLocalStorage},F.getStorage=function(t,e){var n=F._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,p,"Browser failed read of local storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return null},F.setStorage=function(t,e,n){var r=F._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,h,"Browser failed write to local storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.removeStorage=function(t,e){var n=F._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,v,"Browser failed removal of local storage item. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F._getSessionStorageObject=function(){return F.canUseSessionStorage()?F._getVerifiedStorageObject(i.SessionStorage):null},F.canUseSessionStorage=function(){return void 0===F._canUseSessionStorage&&(F._canUseSessionStorage=!!F._getVerifiedStorageObject(i.SessionStorage)),F._canUseSessionStorage},F.getSessionStorageKeys=function(){var e=[];if(F.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},F.getSessionStorage=function(t,e){var n=F._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,d,"Browser failed read of session storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return null},F.setSessionStorage=function(t,e,n){var r=F._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,m,"Browser failed write to session storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.removeSessionStorage=function(t,e){var n=F._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,w,"Browser failed removal of session storage item. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.disableCookies=function(){g.disableCookies()},F.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==F.document.cookie}catch(e){t.throwInternal(u.WARNING,j,"Cannot access document.cookie - "+F.getExceptionName(e),{exception:F.dump(e)})}}return g._canUseCookies},F.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),F.document.location&&"https:"===F.document.location.protocol&&(a=";secure"),F.canUseCookies(e)&&(F.document.cookie=t+"="+n+i+";path=/"+a)},F.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},F.getCookie=function(e,t){if(F.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=F.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=F.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},F.deleteCookie=function(e,t){F.canUseCookies(e)&&(F.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},F.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},F.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},F.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},F.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},F.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},F.toISOStringForIE8=function(e){if(F.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"}},F.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},F.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},F.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},F.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},F.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},F.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},F.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},F.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},F.document="undefined"!=typeof document?document:{},F._canUseLocalStorage=void 0,F._canUseSessionStorage=void 0,F._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],F.NotSpecified="not_specified",F);function F(){}var J=(Q.parseUrl=function(e){return Q.htmlAnchorElement||(Q.htmlAnchorElement=Q.document.createElement?Q.document.createElement("a"):{host:Q.parseHost(e)}),Q.htmlAnchorElement.href=e,Q.htmlAnchorElement},Q.getAbsoluteUrl=function(e){var t,n=Q.parseUrl(e);return n&&(t=n.href),t},Q.getPathName=function(e){var t,n=Q.parseUrl(e);return n&&(t=n.pathname),t},Q.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Q.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},Q.document="undefined"!=typeof document?document:{},Q);function Q(){}var Y=($.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=J.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=X.sanitizeString(e,n?n+" "+c:c)}else a=X.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},$);function $(){}var Z=(ee.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()},ee.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n},ee);function ee(){}var te,ne=(t(re,te=function(){}),re);function re(){return te.call(this)||this}var ie;t(ae,ie=function(){this.ver=1,this.sampleRate=100,this.tags={}});function ae(e,t,n){var r=ie.call(this)||this;return r.name=X.sanitizeString(e,n)||K.NotSpecified,r.data=t,r.time=K.toISOStringForIE8(new Date),r.aiDataContract={time:f.Required,iKey:f.Required,name:f.Required,sampleRate:function(){return 100==r.sampleRate?f.Hidden:f.Required},tags:f.Required,data:f.Required},r}function oe(){}var se,ce=(t(le,se=oe),le);function le(){var e=se.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ue,pe=(t(ge,ue=ce),ge.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ge.dataType="EventData",ge);function ge(e,t,n,r){var i=ue.call(this)||this;return i.aiDataContract={ver:f.Required,name:f.Required,properties:f.Default,measurements:f.Default},i.name=X.sanitizeString(e,t)||K.NotSpecified,i.properties=X.sanitizeProperties(e,n),i.measurements=X.sanitizeMeasurements(e,r),i}function fe(){}var de,he=(t(me,de=oe),me);function me(){var e=de.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function ve(){this.hasFullStack=!0,this.parsedStack=[]}var we,ye=(t(Se,we=he),Se.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ie.CreateFromInterface(t,e)});return new Se(t,o({},e,{exceptions:n}))},Se.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,c=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:c}},Se.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Se.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Se.dataType="ExceptionData",Se);function Se(e,t,n,r,i,a){var o=we.call(this)||this;return o.aiDataContract={ver:f.Required,exceptions:f.Required,severityLevel:f.Default,properties:f.Default,measurements:f.Default},t instanceof Error?(o.exceptions=[new Ie(e,t)],o.properties=X.sanitizeProperties(e,n),o.measurements=X.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 _e,Ie=(t(Te,_e=ve),Te.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}},Te.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return Ee.CreateFromInterface(e)})||t.parsedStack;return new Te(e,o({},t,{parsedStack:n}))},Te.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(Ee.regex.test(o)){var s=new Ee(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,p=c,g=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var f=g-p+1;t.splice(p,f);break}p=c,g=l,c++,l--}}return t},Te);function Te(e,t){var n=_e.call(this)||this;if(n.aiDataContract={id:f.Default,outerId:f.Default,typeName:f.Required,message:f.Required,hasFullStack:f.Default,stack:f.Default,parsedStack:f.Array},t instanceof Error){n.typeName=X.sanitizeString(e,t.name)||K.NotSpecified,n.message=X.sanitizeMessage(e,t.message)||K.NotSpecified;var r=t.stack;n.parsedStack=Te.parseStack(r),n.stack=X.sanitizeException(e,r),n.hasFullStack=K.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 Ne,Ee=(t(ke,Ne=fe),ke.CreateFromInterface=function(e){return new ke(e,null)},ke.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},ke.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,ke.baseSize=58,ke);function ke(e,t){var n=Ne.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:f.Required,method:f.Required,assembly:f.Default,fileName:f.Default,line:f.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=K.trim(r),n.fileName="",n.line=0;var i=r.match(ke.regex);i&&5<=i.length&&(n.method=K.trim(i[2])||n.method,n.fileName=K.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+=ke.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var xe,De,Pe,be=(t(Ae,xe=oe),Ae);function Ae(){var e=xe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Pe=De||(De={}))[Pe.Measurement=0]="Measurement",Pe[Pe.Aggregation=1]="Aggregation";var Ce,Me=(t(Re,Ce=function(){this.kind=De.Measurement}),Re);function Re(){var e=null!==Ce&&Ce.apply(this,arguments)||this;return e.aiDataContract={name:f.Required,kind:f.Default,value:f.Required,count:f.Default,min:f.Default,max:f.Default,stdDev:f.Default},e}var Le,Ue=(t(Ve,Le=be),Ve.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ve.dataType="MetricData",Ve);function Ve(e,t,n,r,i,a,o){var s=Le.call(this)||this;s.aiDataContract={ver:f.Required,metrics:f.Required,properties:f.Default};var c=new Me;return c.count=0<r?r:void 0,c.max=isNaN(a)||null===a?void 0:a,c.min=isNaN(i)||null===i?void 0:i,c.name=X.sanitizeString(e,t)||K.NotSpecified,c.value=n,s.metrics=[c],s.properties=X.sanitizeProperties(e,o),s}var Oe,ze=(t(Ge,Oe=ce),Ge);function Ge(){var e=Oe.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var qe,je=(t(Be,qe=ze),Be.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Be.dataType="PageviewData",Be);function Be(e,t,n,r,i,a,o){var s=qe.call(this)||this;return s.aiDataContract={ver:f.Required,name:f.Default,url:f.Default,duration:f.Default,properties:f.Default,measurements:f.Default,id:f.Default},s.id=X.sanitizeId(e,o),s.url=X.sanitizeUrl(e,n),s.name=X.sanitizeString(e,t)||K.NotSpecified,isNaN(r)||(s.duration=K.msToTimeSpan(r)),s.properties=X.sanitizeProperties(e,i),s.measurements=X.sanitizeMeasurements(e,a),s}var He,Xe=(t(We,He=oe),We);function We(){var e=He.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Ke,Fe=(t(Je,Ke=Xe),Je.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Je.dataType="RemoteDependencyData",Je);function Je(e,t,n,r,i,a,o,s,c,l,u){void 0===c&&(c="Ajax");var p=Ke.call(this)||this;p.aiDataContract={id:f.Required,ver:f.Required,name:f.Default,resultCode:f.Default,duration:f.Default,success:f.Default,data:f.Default,target:f.Default,type:f.Default,properties:f.Default,measurements:f.Default,kind:f.Default,value:f.Default,count:f.Default,min:f.Default,max:f.Default,stdDev:f.Default,dependencyKind:f.Default,dependencySource:f.Default,commandName:f.Default,dependencyTypeName:f.Default},p.id=t,p.duration=K.msToTimeSpan(i),p.success=a,p.resultCode=o+"",p.type=X.sanitizeString(e,c);var g=Y.ParseDependencyPath(e,n,s,r);return p.data=X.sanitizeUrl(e,r)||g.data,p.target=X.sanitizeString(e,g.target),p.name=X.sanitizeString(e,g.name),p.properties=X.sanitizeProperties(e,l),p.measurements=X.sanitizeMeasurements(e,u),p}var Qe,Ye=(t($e,Qe=oe),$e);function $e(){var e=Qe.call(this)||this;return e.ver=2,e.properties={},e}var Ze,et=(t(tt,Ze=Ye),tt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",tt.dataType="MessageData",tt);function tt(e,t,n,r){var i=Ze.call(this)||this;return i.aiDataContract={ver:f.Required,message:f.Required,severityLevel:f.Default,properties:f.Default},t=t||K.NotSpecified,i.message=X.sanitizeMessage(e,t),i.properties=X.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var nt,rt=(t(it,nt=ze),it);function it(){var e=nt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var at,ot=(t(st,at=rt),st.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",st.dataType="PageviewPerformanceData",st);function st(e,t,n,r,i,a,o){var s=at.call(this)||this;return s.aiDataContract={ver:f.Required,name:f.Default,url:f.Default,duration:f.Default,perfTotal:f.Default,networkConnect:f.Default,sentRequest:f.Default,receivedResponse:f.Default,domProcessing:f.Default,properties:f.Default,measurements:f.Default},s.url=X.sanitizeUrl(e,n),s.name=X.sanitizeString(e,t)||K.NotSpecified,s.properties=X.sanitizeProperties(e,i),s.measurements=X.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 ct,lt,ut;t(pt,ct=ne);function pt(e,t){var n=ct.call(this)||this;return n.aiDataContract={baseType:f.Required,baseData:f.Required},n.baseType=e,n.baseData=t,n}(ut=lt||(lt={}))[ut.Verbose=0]="Verbose",ut[ut.Information=1]="Information",ut[ut.Warning=2]="Warning",ut[ut.Error=3]="Error",ut[ut.Critical=4]="Critical";var gt=(ft.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},ft);function ft(){}var dt=(ht.create=function(e,t,n,r,i,a){if(n=X.sanitizeString(r,n)||K.NotSpecified,g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||g.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:(new Date).toISOString(),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!g.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},ht);function ht(){}var mt=(vt.prototype.trackPageView=function(t,n){var r=this,i=t.name;!g.isNullOrUndefined(i)&&"string"==typeof i||(t.name=window.document&&window.document.title||"");var a=t.uri;if(!g.isNullOrUndefined(a)&&"string"==typeof a||(t.uri=window.location&&window.location.href||""),!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(u.WARNING,I,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,s=void 0,c=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=Z.GetDuration(c,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=void 0);var e=void 0;g.isNullOrUndefined(n)||g.isNullOrUndefined(n.duration)||(e=n.duration),!this.overridePageViewDuration&&isNaN(e)||(isNaN(e)&&(n||(n={}),n.duration=s),this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),o=!0),n||(n={});var l=setInterval(function(){try{if(r._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(l);var e={name:i,uri:a};r._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||o?(o||(n.duration=e.durationMs,r.appInsights.sendPageViewInternal(t,n)),r.pageViewPerformanceSent||(r.appInsights.sendPageViewPerformanceInternal(e,n),r.pageViewPerformanceSent=!0),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(n.duration=s,r.appInsights.sendPageViewInternal(t,n),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else 6e4<Z.GetDuration(c,+new Date)&&(clearInterval(l),o||(n.duration=6e4,r.appInsights.sendPageViewInternal(t,n),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){r._logger.throwInternal(u.CRITICAL,b,"trackPageView failed on page load calculation: "+K.getExceptionName(e),{exception:K.dump(e)})}},100)},vt);function vt(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var wt=(yt.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(e){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+K.dump(e))}},yt.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(e){return this._logger.warnToConsole("Call to restart failed: "+K.dump(e)),null}},yt.prototype.startPageVisitTimer=function(e,t){try{if(K.canUseSessionStorage()){if(null!=K.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new St(e,t),r=JSON.stringify(n);K.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+K.dump(e))}},yt.prototype.stopPageVisitTimer=function(){try{if(K.canUseSessionStorage()){var e=Date.now(),t=K.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,K.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+K.dump(e)),null}},yt);function yt(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var St=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},_t=(It.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceTiming();if(t){var n=Z.GetDuration(t.navigationStart,t.loadEventEnd),r=Z.GetDuration(t.navigationStart,t.connectEnd),i=Z.GetDuration(t.requestStart,t.responseStart),a=Z.GetDuration(t.responseStart,t.responseEnd),o=Z.GetDuration(t.responseEnd,t.loadEventEnd);0==n?this._logger.throwInternal(u.WARNING,S,"error calculating page view performance.",{total:n,network:r,request:i,response:a,dom:o}):this.shouldCollectDuration(n,r,i,a,o)?n<Math.floor(r)+Math.floor(i)+Math.floor(a)+Math.floor(o)?this._logger.throwInternal(u.WARNING,y,"client performance math error.",{total:n,network:r,request:i,response:a,dom:o}):(e.durationMs=n,e.perfTotal=e.duration=K.msToTimeSpan(n),e.networkConnect=K.msToTimeSpan(r),e.sentRequest=K.msToTimeSpan(i),e.receivedResponse=K.msToTimeSpan(a),e.domProcessing=K.msToTimeSpan(o),e.isValid=!0):this._logger.throwInternal(u.WARNING,C,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:r,request:i,response:a,dom:o})}},It.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},It.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},It.prototype.isPerformanceTimingDataReady=function(){var e=window.performance.timing;return 0<e.domainLookupStart&&0<e.navigationStart&&0<e.responseStart&&0<e.requestStart&&0<e.loadEventEnd&&0<e.responseEnd&&0<e.connectEnd&&0<e.domLoading},It.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=navigator.userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(var o=0;o<e.length;o++)if(e[o]>=this.MAX_DURATION_ALLOWED)return!1;return!0},It);function It(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Tt="duration",Nt=(Et.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=K.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=K.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=K.stringToBoolOrDefault(e.overridePageViewDuration),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=K.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=K.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=K.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=K.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Et.prototype.processTelemetry=function(e){for(var t=!1,n=this._telemetryInitializers.length,r=0;r<n;++r){var i=this._telemetryInitializers[r];if(i)try{if(!1===i.apply(null,[e])){t=!0;break}}catch(e){this._logger.throwInternal(u.CRITICAL,G,"One of telemetry initializers failed, telemetry item will not be sent: "+K.getExceptionName(e),{exception:K.dump(e)},!0)}}t||g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},Et.prototype.setNextPlugin=function(e){this._nextPlugin=e},Et.prototype.trackEvent=function(e,t){try{var n=dt.create(e,pe.dataType,pe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,A,"trackTrace failed, trace will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,T,"startTrackEvent failed, event will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(u.CRITICAL,N,"stopTrackEvent failed, event will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackTrace=function(e,t){try{var n=dt.create(e,et.dataType,et.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,A,"trackTrace failed, trace will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackMetric=function(e,t){try{var n=dt.create(e,Ue.dataType,Ue.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.CRITICAL,D,"trackMetric failed, metric will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,o({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackPageView failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.sendPageViewInternal=function(e,t,n){"undefined"!=typeof document&&(e.refUri=e.refUri||document.referrer);var r=dt.create(e,je.dataType,je.envelopeType,this._logger,t,n);this.core.track(r),this._trackAjaxAttempts=0},Et.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=dt.create(e,ot.dataType,ot.envelopeType,this._logger,t,n);this.core.track(r)},Et.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackPageViewPerformance failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,E,"startTrackPage failed, page view may not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.stopTrackPage=function(e,t,n,r){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,k,"stopTrackPage failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.sendExceptionInternal=function(e,t,n){var r=new ye(this._logger,e.exception||new Error(K.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=dt.create(r,ye.dataType,ye.envelopeType,this._logger,t,n);this.core.track(i)},Et.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,x,"trackException failed, exception will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(K.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!K.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({exception:t.error,severityLevel:lt.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(u.CRITICAL,_,"_onError threw exception while logging error, error will not be collected: "+K.getExceptionName(e),{exception:K.dump(e),errorString:r})}},Et.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Et.prototype._initialize=function(e,t,n){var o=this;if(!this._isInitialized){if(g.isNullOrUndefined(t))throw Error("Error initializing");this.core=t,this._logger=t.logger,this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};var r=Et.getDefaultConfig();if(void 0!==r){for(var i in r)this.config[i]=gt.getConfig(e,i,this.identifier,r[i]);if(this._globalconfig)for(var i in r)void 0===this._globalconfig[i]&&(this._globalconfig[i]=r[i])}this.config.isCookieUseDisabled&&K.disableCookies(),this.config.isStorageUseDisabled&&K.disableStorage();var a={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new _t(this.core),this._pageViewManager=new mt(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new wt(this._logger,function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new kt(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,r){r||(r={}),r[Tt]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new kt(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){g.isNullOrUndefined(r)&&(r={}),r[Tt]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var s,c,l=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var u=window.onerror;window.onerror=function(e,t,n,r,i){var a=u&&u(e,t,n,r,i);return!0!==a&&l._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&"object"==typeof history&&"function"==typeof history.pushState&&"function"==typeof history.replaceState&&"object"==typeof window){var p=this;n.forEach(function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),history.pushState=(c=history.pushState,function(){var e=c.apply(this,arguments);return window.dispatchEvent(new Event(p.config.namePrefix+"pushState")),window.dispatchEvent(new Event(p.config.namePrefix+"locationchange")),e}),history.replaceState=(s=history.replaceState,function(){var e=s.apply(this,arguments);return window.dispatchEvent(new Event(p.config.namePrefix+"replaceState")),window.dispatchEvent(new Event(p.config.namePrefix+"locationchange")),e}),window.addEventListener(p.config.namePrefix+"popstate",function(){window.dispatchEvent(new Event(p.config.namePrefix+"locationchange"))}),window.addEventListener(p.config.namePrefix+"locationchange",function(){p._properties&&p._properties.context&&p._properties.context.telemetryTrace&&(p._properties.context.telemetryTrace.traceID=K.newId(),p._properties.context.telemetryTrace.name=window.location.pathname),p.trackPageView({properties:{duration:0}})})}this._isInitialized=!0}},Et.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Et.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===Fe.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Et.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Et.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=dt.create(t,ye.dataType,ye.envelopeType,this._logger,{url:e});this.core.track(n)},Et.Version="2.1.0",Et);function Et(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}var kt=(xt.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(u.WARNING,O,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},xt.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(u.WARNING,z,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=Z.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=void 0},xt);function xt(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Nt,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,f,a,o=function(){return(o=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=f||(f={}))[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden";var g=(s.isNullOrUndefined=function(e){return null==e},s.disableCookies=function(){s._canUseCookies=!1},s.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)})},s);function s(){}var u,c,l=/[xy]/g;(c=u||(u={}))[c.CRITICAL=1]="CRITICAL",c[c.WARNING=2]="WARNING";var p=1,d=2,h=3,m=4,v=5,w=6,y=8,S=10,_=11,I=25,T=29,N=30,E=31,k=32,x=35,D=36,P=37,b=38,A=39,C=45,M=49,R=52,U=56,L=57,V=61,O=62,z=63,G=64,q=66,j=68,B=69;H.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(H.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),H.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 H(){this.identifier="ChannelControllerPlugin",this.priority=500}var X=(W.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=W.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,W.MAX_NAME_LENGTH-3)+W.padNumber(a);i=o}return i},W.sanitizeKey=function(e,t){var n;return t&&(t=W.trim(t.toString())).length>W.MAX_NAME_LENGTH&&(n=t.substring(0,W.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,L,"name is too long. It has been truncated to "+W.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},W.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=W.MAX_STRING_LENGTH),t&&(n=n||W.MAX_STRING_LENGTH,(t=W.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,V,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},W.sanitizeUrl=function(e,t){return W.sanitizeInput(e,t,W.MAX_URL_LENGTH,q)},W.sanitizeMessage=function(e,t){var n;return t&&t.length>W.MAX_MESSAGE_LENGTH&&(n=t.substring(0,W.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,U,"message is too long, it has been truncated to "+W.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},W.sanitizeException=function(e,t){var n;return t&&t.length>W.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,W.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,R,"exception is too long, it has been truncated to "+W.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},W.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(u.WARNING,M,"custom property is not valid",{exception:e},!0)}i=W.sanitizeString(t,i,W.MAX_PROPERTY_LENGTH),n[r=W.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},W.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=W.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},W.sanitizeId=function(e,t){return t?W.sanitizeInput(e,t,W.MAX_ID_LENGTH,B).toString():t},W.sanitizeInput=function(e,t,n,r){var i;return t&&(t=W.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(u.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},W.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},W.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},W.MAX_NAME_LENGTH=150,W.MAX_ID_LENGTH=128,W.MAX_PROPERTY_LENGTH=8192,W.MAX_STRING_LENGTH=1024,W.MAX_URL_LENGTH=2048,W.MAX_MESSAGE_LENGTH=32768,W.MAX_EXCEPTION_LENGTH=32768,W);function W(){}var K=(F.disableStorage=function(){F._canUseLocalStorage=!1,F._canUseSessionStorage=!1},F._getLocalStorageObject=function(){return F.canUseLocalStorage()?F._getVerifiedStorageObject(i.LocalStorage):null},F._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},F.isInternalApplicationInsightsEndpoint=function(e){return-1!==F._internalEndpoints.indexOf(e.toLowerCase())},F.canUseLocalStorage=function(){return void 0===F._canUseLocalStorage&&(F._canUseLocalStorage=!!F._getVerifiedStorageObject(i.LocalStorage)),F._canUseLocalStorage},F.getStorage=function(t,e){var n=F._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,p,"Browser failed read of local storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return null},F.setStorage=function(t,e,n){var r=F._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,h,"Browser failed write to local storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.removeStorage=function(t,e){var n=F._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){F._canUseLocalStorage=!1,t.throwInternal(u.WARNING,v,"Browser failed removal of local storage item. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F._getSessionStorageObject=function(){return F.canUseSessionStorage()?F._getVerifiedStorageObject(i.SessionStorage):null},F.canUseSessionStorage=function(){return void 0===F._canUseSessionStorage&&(F._canUseSessionStorage=!!F._getVerifiedStorageObject(i.SessionStorage)),F._canUseSessionStorage},F.getSessionStorageKeys=function(){var e=[];if(F.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},F.getSessionStorage=function(t,e){var n=F._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,d,"Browser failed read of session storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return null},F.setSessionStorage=function(t,e,n){var r=F._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,m,"Browser failed write to session storage. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.removeSessionStorage=function(t,e){var n=F._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){F._canUseSessionStorage=!1,t.throwInternal(u.WARNING,w,"Browser failed removal of session storage item. "+F.getExceptionName(e),{exception:F.dump(e)})}return!1},F.disableCookies=function(){g.disableCookies()},F.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==F.document.cookie}catch(e){t.throwInternal(u.WARNING,j,"Cannot access document.cookie - "+F.getExceptionName(e),{exception:F.dump(e)})}}return g._canUseCookies},F.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),F.document.location&&"https:"===F.document.location.protocol&&(a=";secure"),F.canUseCookies(e)&&(F.document.cookie=t+"="+n+i+";path=/"+a)},F.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},F.getCookie=function(e,t){if(F.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=F.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=F.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},F.deleteCookie=function(e,t){F.canUseCookies(e)&&(F.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},F.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},F.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},F.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},F.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},F.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},F.toISOStringForIE8=function(e){if(F.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"}},F.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},F.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},F.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},F.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},F.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},F.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},F.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},F.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},F.document="undefined"!=typeof document?document:{},F._canUseLocalStorage=void 0,F._canUseSessionStorage=void 0,F._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],F.NotSpecified="not_specified",F);function F(){}var J=(Q.parseUrl=function(e){return Q.htmlAnchorElement||(Q.htmlAnchorElement=Q.document.createElement?Q.document.createElement("a"):{host:Q.parseHost(e)}),Q.htmlAnchorElement.href=e,Q.htmlAnchorElement},Q.getAbsoluteUrl=function(e){var t,n=Q.parseUrl(e);return n&&(t=n.href),t},Q.getPathName=function(e){var t,n=Q.parseUrl(e);return n&&(t=n.pathname),t},Q.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Q.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},Q.document="undefined"!=typeof document?document:{},Q);function Q(){}var Y=($.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=J.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=X.sanitizeString(e,n?n+" "+c:c)}else a=X.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},$);function $(){}var Z=(ee.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()},ee.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n},ee);function ee(){}var te,ne=(t(re,te=function(){}),re);function re(){return te.call(this)||this}var ie;t(ae,ie=function(){this.ver=1,this.sampleRate=100,this.tags={}});function ae(e,t,n){var r=ie.call(this)||this;return r.name=X.sanitizeString(e,n)||K.NotSpecified,r.data=t,r.time=K.toISOStringForIE8(new Date),r.aiDataContract={time:f.Required,iKey:f.Required,name:f.Required,sampleRate:function(){return 100==r.sampleRate?f.Hidden:f.Required},tags:f.Required,data:f.Required},r}function oe(){}var se,ce=(t(le,se=oe),le);function le(){var e=se.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ue,pe=(t(ge,ue=ce),ge.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ge.dataType="EventData",ge);function ge(e,t,n,r){var i=ue.call(this)||this;return i.aiDataContract={ver:f.Required,name:f.Required,properties:f.Default,measurements:f.Default},i.name=X.sanitizeString(e,t)||K.NotSpecified,i.properties=X.sanitizeProperties(e,n),i.measurements=X.sanitizeMeasurements(e,r),i}function fe(){}var de,he=(t(me,de=oe),me);function me(){var e=de.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function ve(){this.hasFullStack=!0,this.parsedStack=[]}var we,ye=(t(Se,we=he),Se.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ie.CreateFromInterface(t,e)});return new Se(t,o({},e,{exceptions:n}))},Se.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,c=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:c}},Se.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Se.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Se.dataType="ExceptionData",Se);function Se(e,t,n,r,i,a){var o=we.call(this)||this;return o.aiDataContract={ver:f.Required,exceptions:f.Required,severityLevel:f.Default,properties:f.Default,measurements:f.Default},t instanceof Error?(o.exceptions=[new Ie(e,t)],o.properties=X.sanitizeProperties(e,n),o.measurements=X.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 _e,Ie=(t(Te,_e=ve),Te.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}},Te.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return Ee.CreateFromInterface(e)})||t.parsedStack;return new Te(e,o({},t,{parsedStack:n}))},Te.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(Ee.regex.test(o)){var s=new Ee(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,p=c,g=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var f=g-p+1;t.splice(p,f);break}p=c,g=l,c++,l--}}return t},Te);function Te(e,t){var n=_e.call(this)||this;if(n.aiDataContract={id:f.Default,outerId:f.Default,typeName:f.Required,message:f.Required,hasFullStack:f.Default,stack:f.Default,parsedStack:f.Array},t instanceof Error){n.typeName=X.sanitizeString(e,t.name)||K.NotSpecified,n.message=X.sanitizeMessage(e,t.message)||K.NotSpecified;var r=t.stack;n.parsedStack=Te.parseStack(r),n.stack=X.sanitizeException(e,r),n.hasFullStack=K.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 Ne,Ee=(t(ke,Ne=fe),ke.CreateFromInterface=function(e){return new ke(e,null)},ke.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},ke.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,ke.baseSize=58,ke);function ke(e,t){var n=Ne.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:f.Required,method:f.Required,assembly:f.Default,fileName:f.Default,line:f.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=K.trim(r),n.fileName="",n.line=0;var i=r.match(ke.regex);i&&5<=i.length&&(n.method=K.trim(i[2])||n.method,n.fileName=K.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+=ke.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var xe,De,Pe,be=(t(Ae,xe=oe),Ae);function Ae(){var e=xe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Pe=De||(De={}))[Pe.Measurement=0]="Measurement",Pe[Pe.Aggregation=1]="Aggregation";var Ce,Me=(t(Re,Ce=function(){this.kind=De.Measurement}),Re);function Re(){var e=null!==Ce&&Ce.apply(this,arguments)||this;return e.aiDataContract={name:f.Required,kind:f.Default,value:f.Required,count:f.Default,min:f.Default,max:f.Default,stdDev:f.Default},e}var Ue,Le=(t(Ve,Ue=be),Ve.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ve.dataType="MetricData",Ve);function Ve(e,t,n,r,i,a,o){var s=Ue.call(this)||this;s.aiDataContract={ver:f.Required,metrics:f.Required,properties:f.Default};var c=new Me;return c.count=0<r?r:void 0,c.max=isNaN(a)||null===a?void 0:a,c.min=isNaN(i)||null===i?void 0:i,c.name=X.sanitizeString(e,t)||K.NotSpecified,c.value=n,s.metrics=[c],s.properties=X.sanitizeProperties(e,o),s}var Oe,ze=(t(Ge,Oe=ce),Ge);function Ge(){var e=Oe.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var qe,je=(t(Be,qe=ze),Be.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Be.dataType="PageviewData",Be);function Be(e,t,n,r,i,a,o){var s=qe.call(this)||this;return s.aiDataContract={ver:f.Required,name:f.Default,url:f.Default,duration:f.Default,properties:f.Default,measurements:f.Default,id:f.Default},s.id=X.sanitizeId(e,o),s.url=X.sanitizeUrl(e,n),s.name=X.sanitizeString(e,t)||K.NotSpecified,isNaN(r)||(s.duration=K.msToTimeSpan(r)),s.properties=X.sanitizeProperties(e,i),s.measurements=X.sanitizeMeasurements(e,a),s}var He,Xe=(t(We,He=oe),We);function We(){var e=He.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Ke,Fe=(t(Je,Ke=Xe),Je.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Je.dataType="RemoteDependencyData",Je);function Je(e,t,n,r,i,a,o,s,c,l,u){void 0===c&&(c="Ajax");var p=Ke.call(this)||this;p.aiDataContract={id:f.Required,ver:f.Required,name:f.Default,resultCode:f.Default,duration:f.Default,success:f.Default,data:f.Default,target:f.Default,type:f.Default,properties:f.Default,measurements:f.Default,kind:f.Default,value:f.Default,count:f.Default,min:f.Default,max:f.Default,stdDev:f.Default,dependencyKind:f.Default,dependencySource:f.Default,commandName:f.Default,dependencyTypeName:f.Default},p.id=t,p.duration=K.msToTimeSpan(i),p.success=a,p.resultCode=o+"",p.type=X.sanitizeString(e,c);var g=Y.ParseDependencyPath(e,n,s,r);return p.data=X.sanitizeUrl(e,r)||g.data,p.target=X.sanitizeString(e,g.target),p.name=X.sanitizeString(e,g.name),p.properties=X.sanitizeProperties(e,l),p.measurements=X.sanitizeMeasurements(e,u),p}var Qe,Ye=(t($e,Qe=oe),$e);function $e(){var e=Qe.call(this)||this;return e.ver=2,e.properties={},e}var Ze,et=(t(tt,Ze=Ye),tt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",tt.dataType="MessageData",tt);function tt(e,t,n,r){var i=Ze.call(this)||this;return i.aiDataContract={ver:f.Required,message:f.Required,severityLevel:f.Default,properties:f.Default},t=t||K.NotSpecified,i.message=X.sanitizeMessage(e,t),i.properties=X.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var nt,rt=(t(it,nt=ze),it);function it(){var e=nt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var at,ot=(t(st,at=rt),st.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",st.dataType="PageviewPerformanceData",st);function st(e,t,n,r,i,a,o){var s=at.call(this)||this;return s.aiDataContract={ver:f.Required,name:f.Default,url:f.Default,duration:f.Default,perfTotal:f.Default,networkConnect:f.Default,sentRequest:f.Default,receivedResponse:f.Default,domProcessing:f.Default,properties:f.Default,measurements:f.Default},s.url=X.sanitizeUrl(e,n),s.name=X.sanitizeString(e,t)||K.NotSpecified,s.properties=X.sanitizeProperties(e,i),s.measurements=X.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 ct,lt,ut;t(pt,ct=ne);function pt(e,t){var n=ct.call(this)||this;return n.aiDataContract={baseType:f.Required,baseData:f.Required},n.baseType=e,n.baseData=t,n}(ut=lt||(lt={}))[ut.Verbose=0]="Verbose",ut[ut.Information=1]="Information",ut[ut.Warning=2]="Warning",ut[ut.Error=3]="Error",ut[ut.Critical=4]="Critical";var gt=(ft.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},ft);function ft(){}var dt=(ht.create=function(e,t,n,r,i,a){if(n=X.sanitizeString(r,n)||K.NotSpecified,g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||g.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:(new Date).toISOString(),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!g.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},ht);function ht(){}var mt=(vt.prototype.trackPageView=function(t,n){var r=this,i=t.name;!g.isNullOrUndefined(i)&&"string"==typeof i||(t.name=window.document&&window.document.title||"");var a=t.uri;if(!g.isNullOrUndefined(a)&&"string"==typeof a||(t.uri=window.location&&window.location.href||""),!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(u.WARNING,I,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,s=void 0,c=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=Z.GetDuration(c,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=void 0);var e=void 0;g.isNullOrUndefined(n)||g.isNullOrUndefined(n.duration)||(e=n.duration),!this.overridePageViewDuration&&isNaN(e)||(isNaN(e)&&(n||(n={}),n.duration=s),this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),o=!0),n||(n={});var l=setInterval(function(){try{if(r._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(l);var e={name:i,uri:a};r._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||o?(o||(n.duration=e.durationMs,r.appInsights.sendPageViewInternal(t,n)),r.pageViewPerformanceSent||(r.appInsights.sendPageViewPerformanceInternal(e,n),r.pageViewPerformanceSent=!0),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(n.duration=s,r.appInsights.sendPageViewInternal(t,n),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else 6e4<Z.GetDuration(c,+new Date)&&(clearInterval(l),o||(n.duration=6e4,r.appInsights.sendPageViewInternal(t,n),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){r._logger.throwInternal(u.CRITICAL,b,"trackPageView failed on page load calculation: "+K.getExceptionName(e),{exception:K.dump(e)})}},100)},vt);function vt(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var wt=(yt.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(e){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+K.dump(e))}},yt.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(e){return this._logger.warnToConsole("Call to restart failed: "+K.dump(e)),null}},yt.prototype.startPageVisitTimer=function(e,t){try{if(K.canUseSessionStorage()){if(null!=K.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new St(e,t),r=JSON.stringify(n);K.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+K.dump(e))}},yt.prototype.stopPageVisitTimer=function(){try{if(K.canUseSessionStorage()){var e=Date.now(),t=K.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,K.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+K.dump(e)),null}},yt);function yt(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var St=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},_t=(It.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceTiming();if(t){var n=Z.GetDuration(t.navigationStart,t.loadEventEnd),r=Z.GetDuration(t.navigationStart,t.connectEnd),i=Z.GetDuration(t.requestStart,t.responseStart),a=Z.GetDuration(t.responseStart,t.responseEnd),o=Z.GetDuration(t.responseEnd,t.loadEventEnd);0==n?this._logger.throwInternal(u.WARNING,S,"error calculating page view performance.",{total:n,network:r,request:i,response:a,dom:o}):this.shouldCollectDuration(n,r,i,a,o)?n<Math.floor(r)+Math.floor(i)+Math.floor(a)+Math.floor(o)?this._logger.throwInternal(u.WARNING,y,"client performance math error.",{total:n,network:r,request:i,response:a,dom:o}):(e.durationMs=n,e.perfTotal=e.duration=K.msToTimeSpan(n),e.networkConnect=K.msToTimeSpan(r),e.sentRequest=K.msToTimeSpan(i),e.receivedResponse=K.msToTimeSpan(a),e.domProcessing=K.msToTimeSpan(o),e.isValid=!0):this._logger.throwInternal(u.WARNING,C,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:r,request:i,response:a,dom:o})}},It.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},It.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},It.prototype.isPerformanceTimingDataReady=function(){var e=window.performance.timing;return 0<e.domainLookupStart&&0<e.navigationStart&&0<e.responseStart&&0<e.requestStart&&0<e.loadEventEnd&&0<e.responseEnd&&0<e.connectEnd&&0<e.domLoading},It.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=navigator.userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(var o=0;o<e.length;o++)if(e[o]>=this.MAX_DURATION_ALLOWED)return!1;return!0},It);function It(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Tt="duration",Nt=(Et.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=K.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=K.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=K.stringToBoolOrDefault(e.overridePageViewDuration),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=K.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=K.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=K.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=K.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Et.prototype.processTelemetry=function(e){for(var t=!1,n=this._telemetryInitializers.length,r=0;r<n;++r){var i=this._telemetryInitializers[r];if(i)try{if(!1===i.apply(null,[e])){t=!0;break}}catch(e){this._logger.throwInternal(u.CRITICAL,G,"One of telemetry initializers failed, telemetry item will not be sent: "+K.getExceptionName(e),{exception:K.dump(e)},!0)}}t||g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},Et.prototype.setNextPlugin=function(e){this._nextPlugin=e},Et.prototype.trackEvent=function(e,t){try{var n=dt.create(e,pe.dataType,pe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,A,"trackTrace failed, trace will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,T,"startTrackEvent failed, event will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(u.CRITICAL,N,"stopTrackEvent failed, event will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackTrace=function(e,t){try{var n=dt.create(e,et.dataType,et.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,A,"trackTrace failed, trace will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackMetric=function(e,t){try{var n=dt.create(e,Le.dataType,Le.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.CRITICAL,D,"trackMetric failed, metric will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,o({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackPageView failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.sendPageViewInternal=function(e,t,n){"undefined"!=typeof document&&(e.refUri=void 0===e.refUri?document.referrer:e.refUri);var r=dt.create(e,je.dataType,je.envelopeType,this._logger,t,n);this.core.track(r),this._trackAjaxAttempts=0},Et.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=dt.create(e,ot.dataType,ot.envelopeType,this._logger,t,n);this.core.track(r)},Et.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackPageViewPerformance failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,E,"startTrackPage failed, page view may not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.stopTrackPage=function(e,t,n,r){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,k,"stopTrackPage failed, page view will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype.sendExceptionInternal=function(e,t,n){var r=new ye(this._logger,e.exception||new Error(K.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=dt.create(r,ye.dataType,ye.envelopeType,this._logger,t,n);this.core.track(i)},Et.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,x,"trackException failed, exception will not be collected: "+K.getExceptionName(e),{exception:K.dump(e)})}},Et.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(K.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!K.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({exception:t.error,severityLevel:lt.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(u.CRITICAL,_,"_onError threw exception while logging error, error will not be collected: "+K.getExceptionName(e),{exception:K.dump(e),errorString:r})}},Et.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Et.prototype._initialize=function(e,t,n){var o=this;if(!this._isInitialized){if(g.isNullOrUndefined(t))throw Error("Error initializing");this.core=t,this._logger=t.logger,this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};var r=Et.getDefaultConfig();if(void 0!==r){for(var i in r)this.config[i]=gt.getConfig(e,i,this.identifier,r[i]);if(this._globalconfig)for(var i in r)void 0===this._globalconfig[i]&&(this._globalconfig[i]=r[i])}this.config.isCookieUseDisabled&&K.disableCookies(),this.config.isStorageUseDisabled&&K.disableStorage();var a={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new _t(this.core),this._pageViewManager=new mt(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new wt(this._logger,function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new kt(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,r){r||(r={}),r[Tt]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new kt(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){g.isNullOrUndefined(r)&&(r={}),r[Tt]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var s,c,l=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var u=window.onerror;window.onerror=function(e,t,n,r,i){var a=u&&u(e,t,n,r,i);return!0!==a&&l._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&"object"==typeof history&&"function"==typeof history.pushState&&"function"==typeof history.replaceState&&"object"==typeof window){var p=this;n.forEach(function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),history.pushState=(c=history.pushState,function(){var e=c.apply(this,arguments);return window.dispatchEvent(new Event(p.config.namePrefix+"pushState")),window.dispatchEvent(new Event(p.config.namePrefix+"locationchange")),e}),history.replaceState=(s=history.replaceState,function(){var e=s.apply(this,arguments);return window.dispatchEvent(new Event(p.config.namePrefix+"replaceState")),window.dispatchEvent(new Event(p.config.namePrefix+"locationchange")),e}),window.addEventListener(p.config.namePrefix+"popstate",function(){window.dispatchEvent(new Event(p.config.namePrefix+"locationchange"))}),window.addEventListener(p.config.namePrefix+"locationchange",function(){p._properties&&p._properties.context&&p._properties.context.telemetryTrace&&(p._properties.context.telemetryTrace.traceID=K.newId(),p._properties.context.telemetryTrace.name=window.location.pathname),setTimeout(function(){p.trackPageView({refUri:null,properties:{duration:0}})},p.autoRoutePVDelay)})}this._isInitialized=!0}},Et.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Et.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===Fe.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Et.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Et.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=dt.create(t,ye.dataType,ye.envelopeType,this._logger,{url:e});this.core.track(n)},Et.Version="2.1.1",Et);function Et(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this.autoRoutePVDelay=500,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}var kt=(xt.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(u.WARNING,O,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},xt.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(u.WARNING,z,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=Z.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=void 0},xt);function xt(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Nt,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map |
{ | ||
"name": "@microsoft/applicationinsights-analytics-js", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Microsoft Application Insights Javascript SDK apis", | ||
@@ -20,3 +20,3 @@ "main": "dist/applicationinsights-analytics-js.js", | ||
"devDependencies": { | ||
"@microsoft/applicationinsights-properties-js": "2.1.0", | ||
"@microsoft/applicationinsights-properties-js": "2.1.1", | ||
"typescript": "2.5.3", | ||
@@ -33,4 +33,4 @@ "rollup-plugin-node-resolve": "^3.4.0", | ||
"dependencies": { | ||
"@microsoft/applicationinsights-core-js": "2.1.0", | ||
"@microsoft/applicationinsights-common": "2.1.0", | ||
"@microsoft/applicationinsights-core-js": "2.1.1", | ||
"@microsoft/applicationinsights-common": "2.1.1", | ||
"tslib": "^1.9.3" | ||
@@ -37,0 +37,0 @@ }, |
@@ -34,3 +34,3 @@ /** | ||
export class ApplicationInsights implements IAppInsights, ITelemetryPlugin, IAppInsightsInternal { | ||
public static Version = "2.1.0"; // Not currently used anywhere | ||
public static Version = "2.1.1"; // Not currently used anywhere | ||
public initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[]) => void; | ||
@@ -42,2 +42,3 @@ public identifier: string = "ApplicationInsightsAnalytics"; // do not change name or priority | ||
public queue: (() => void)[]; | ||
public autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place | ||
@@ -257,3 +258,3 @@ private _isInitialized: boolean = false; | ||
if (typeof document !== "undefined") { | ||
pageView.refUri = pageView.refUri || document.referrer; | ||
pageView.refUri = pageView.refUri === undefined ? document.referrer : pageView.refUri; | ||
} | ||
@@ -613,3 +614,6 @@ | ||
} | ||
_self.trackPageView({ properties: { duration: 0 } }); // SPA route change loading durations are undefined, so send 0 | ||
setTimeout(() => { | ||
// todo: override start time so that it is not affected by autoRoutePVDelay | ||
_self.trackPageView({ refUri: null, properties: { duration: 0 } }); // SPA route change loading durations are undefined, so send 0 | ||
}, _self.autoRoutePVDelay); | ||
}); | ||
@@ -616,0 +620,0 @@ } |
@@ -18,2 +18,3 @@ /** | ||
queue: (() => void)[]; | ||
autoRoutePVDelay: number; | ||
private _isInitialized; | ||
@@ -20,0 +21,0 @@ private _globalconfig; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1438424
7782
+ Added@microsoft/applicationinsights-common@2.1.1(transitive)
+ Added@microsoft/applicationinsights-core-js@2.1.1(transitive)
- Removed@microsoft/applicationinsights-common@2.1.0(transitive)
- Removed@microsoft/applicationinsights-core-js@2.1.0(transitive)