@microsoft/applicationinsights-analytics-js
Advanced tools
Comparing version 2.2.1 to 2.2.2
/*! | ||
* Application Insights JavaScript SDK - Web Analytics, 2.2.1 | ||
* Application Insights JavaScript SDK - Web Analytics, 2.2.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i,n,d,a,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=i=i||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(a=d=d||{})[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var g=(l.isNullOrUndefined=function(e){return null==e},l.disableCookies=function(){l._canUseCookies=!1},l.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(f,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},l);function l(){}var u,p,f=/[xy]/g;(p=u=u||{})[p.CRITICAL=1]="CRITICAL",p[p.WARNING=2]="WARNING";var h=1,m=2,v=3,w=4,y=5,S=6,_=8,I=10,T=11,N=25,E=29,k=30,D=31,x=32,P=35,b=36,A=37,C=38,M=39,R=45,U=49,L=52,V=56,O=57,z=61,G=62,q=63,j=64,B=66,W=68,H=69;X.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(X.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),X.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){e=e.sort(function(e,t){return e.priority-t.priority});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);if(e.forEach(function(e){e.priority<500&&(o=e.identifier),e.initialize(n,r,i)}),o)throw Error("Channel has invalid priority"+o);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}),t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);e.forEach(function(e){return e.initialize(n,r,i)}),this.channelQueue.push(e)}};function X(){this.identifier="ChannelControllerPlugin",this.priority=500}var K=(F.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=F.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,F.MAX_NAME_LENGTH-3)+F.padNumber(a);i=o}return i},F.sanitizeKey=function(e,t){var n;return t&&(t=F.trim(t.toString())).length>F.MAX_NAME_LENGTH&&(n=t.substring(0,F.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,O,"name is too long. It has been truncated to "+F.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},F.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=F.MAX_STRING_LENGTH),t&&(n=n||F.MAX_STRING_LENGTH,(t=F.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,z,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},F.sanitizeUrl=function(e,t){return F.sanitizeInput(e,t,F.MAX_URL_LENGTH,B)},F.sanitizeMessage=function(e,t){var n;return t&&t.length>F.MAX_MESSAGE_LENGTH&&(n=t.substring(0,F.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,V,"message is too long, it has been truncated to "+F.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},F.sanitizeException=function(e,t){var n;return t&&t.length>F.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,F.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,L,"exception is too long, it has been truncated to "+F.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},F.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,U,"custom property is not valid",{exception:e},!0)}i=F.sanitizeString(t,i,F.MAX_PROPERTY_LENGTH),n[r=F.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},F.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=F.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},F.sanitizeId=function(e,t){return t?F.sanitizeInput(e,t,F.MAX_ID_LENGTH,H).toString():t},F.sanitizeInput=function(e,t,n,r){var i;return t&&(t=F.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},F.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},F.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},F.MAX_NAME_LENGTH=150,F.MAX_ID_LENGTH=128,F.MAX_PROPERTY_LENGTH=8192,F.MAX_STRING_LENGTH=1024,F.MAX_URL_LENGTH=2048,F.MAX_MESSAGE_LENGTH=32768,F.MAX_EXCEPTION_LENGTH=32768,F);function F(){}var J=(Q.createDomEvent=function(e){var t=null;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},Q.disableStorage=function(){Q._canUseLocalStorage=!1,Q._canUseSessionStorage=!1},Q._getLocalStorageObject=function(){return Q.canUseLocalStorage()?Q._getVerifiedStorageObject(i.LocalStorage):null},Q._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},Q.isInternalApplicationInsightsEndpoint=function(e){return-1!==Q._internalEndpoints.indexOf(e.toLowerCase())},Q.canUseLocalStorage=function(){return void 0===Q._canUseLocalStorage&&(Q._canUseLocalStorage=!!Q._getVerifiedStorageObject(i.LocalStorage)),Q._canUseLocalStorage},Q.getStorage=function(t,e){var n=Q._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,h,"Browser failed read of local storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return null},Q.setStorage=function(t,e,n){var r=Q._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,v,"Browser failed write to local storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.removeStorage=function(t,e){var n=Q._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,y,"Browser failed removal of local storage item. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q._getSessionStorageObject=function(){return Q.canUseSessionStorage()?Q._getVerifiedStorageObject(i.SessionStorage):null},Q.canUseSessionStorage=function(){return void 0===Q._canUseSessionStorage&&(Q._canUseSessionStorage=!!Q._getVerifiedStorageObject(i.SessionStorage)),Q._canUseSessionStorage},Q.getSessionStorageKeys=function(){var e=[];if(Q.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},Q.getSessionStorage=function(t,e){var n=Q._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,m,"Browser failed read of session storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return null},Q.setSessionStorage=function(t,e,n){var r=Q._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,w,"Browser failed write to session storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.removeSessionStorage=function(t,e){var n=Q._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,S,"Browser failed removal of session storage item. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.disableCookies=function(){g.disableCookies()},Q.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==Q.document.cookie}catch(e){t.throwInternal(u.WARNING,W,"Cannot access document.cookie - "+Q.getExceptionName(e),{exception:Q.dump(e)})}}return g._canUseCookies},Q.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),Q.document.location&&"https:"===Q.document.location.protocol&&(a=";secure"),Q.canUseCookies(e)&&(Q.document.cookie=t+"="+n+i+";path=/"+a)},Q.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},Q.getCookie=function(e,t){if(Q.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=Q.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=Q.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},Q.deleteCookie=function(e,t){Q.canUseCookies(e)&&(Q.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Q.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},Q.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},Q.random32=function(){return 4294967296*Math.random()|0},Q.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=Q.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},Q.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},Q.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},Q.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},Q.toISOStringForIE8=function(e){if(Q.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"}},Q.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},Q.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},Q.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},Q.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},Q.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},Q.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},Q.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},Q.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},Q.document="undefined"!=typeof document?document:{},Q._canUseLocalStorage=void 0,Q._canUseSessionStorage=void 0,Q._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Q.NotSpecified="not_specified",Q);function Q(){}var Y=($.parseUrl=function(e){return $.htmlAnchorElement||($.htmlAnchorElement=$.document.createElement?$.document.createElement("a"):{host:$.parseHost(e)}),$.htmlAnchorElement.href=e,$.htmlAnchorElement},$.getAbsoluteUrl=function(e){var t,n=$.parseUrl(e);return n&&(t=n.href),t},$.getPathName=function(e){var t,n=$.parseUrl(e);return n&&(t=n.pathname),t},$.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},$.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},$.document="undefined"!=typeof document?document:{},$);function $(){}var Z=(ee.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=Y.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=K.sanitizeString(e,n?n+" "+c:c)}else a=K.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},ee);function ee(){}var te=(ne.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()},ne.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n},ne);function ne(){}var re,ie=(t(ae,re=function(){}),ae);function ae(){return re.call(this)||this}var oe;t(se,oe=function(){this.ver=1,this.sampleRate=100,this.tags={}});function se(e,t,n){var r=oe.call(this)||this;return r.name=K.sanitizeString(e,n)||J.NotSpecified,r.data=t,r.time=J.toISOStringForIE8(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100==r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}function ce(){}var le,ue=(t(pe,le=ce),pe);function pe(){var e=le.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ge,fe=(t(de,ge=ue),de.envelopeType="Microsoft.ApplicationInsights.{0}.Event",de.dataType="EventData",de);function de(e,t,n,r){var i=ge.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=K.sanitizeString(e,t)||J.NotSpecified,i.properties=K.sanitizeProperties(e,n),i.measurements=K.sanitizeMeasurements(e,r),i}function he(){}var me,ve=(t(we,me=ce),we);function we(){var e=me.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function ye(){this.hasFullStack=!0,this.parsedStack=[]}var Se,_e=(t(Ie,Se=ve),Ie.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ne.CreateFromInterface(t,e)});return new Ie(t,c({},e,{exceptions:n}))},Ie.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}},Ie.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Ie.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Ie.dataType="ExceptionData",Ie);function Ie(e,t,n,r,i,a){var o=Se.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ne(e,t)],o.properties=K.sanitizeProperties(e,n),o.measurements=K.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 Te,Ne=(t(Ee,Te=ye),Ee.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}},Ee.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return De.CreateFromInterface(e)})||t.parsedStack;return new Ee(e,c({},t,{parsedStack:n}))},Ee.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(De.regex.test(o)){var s=new De(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},Ee);function Ee(e,t){var n=Te.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=K.sanitizeString(e,t.name)||J.NotSpecified,n.message=K.sanitizeMessage(e,t.message)||J.NotSpecified;var r=t.stack;n.parsedStack=Ee.parseStack(r),n.stack=K.sanitizeException(e,r),n.hasFullStack=J.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 ke,De=(t(xe,ke=he),xe.CreateFromInterface=function(e){return new xe(e,null)},xe.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},xe.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,xe.baseSize=58,xe);function xe(e,t){var n=ke.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=J.trim(r),n.fileName="",n.line=0;var i=r.match(xe.regex);i&&5<=i.length&&(n.method=J.trim(i[2])||n.method,n.fileName=J.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+=xe.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Pe,be,Ae,Ce=(t(Me,Pe=ce),Me);function Me(){var e=Pe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Ae=be=be||{})[Ae.Measurement=0]="Measurement",Ae[Ae.Aggregation=1]="Aggregation";var Re,Ue=(t(Le,Re=function(){this.kind=be.Measurement}),Le);function Le(){var e=null!==Re&&Re.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Ve,Oe=(t(ze,Ve=Ce),ze.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",ze.dataType="MetricData",ze);function ze(e,t,n,r,i,a,o){var s=Ve.call(this)||this;s.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var c=new Ue;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=K.sanitizeString(e,t)||J.NotSpecified,c.value=n,s.metrics=[c],s.properties=K.sanitizeProperties(e,o),s}var Ge,qe=(t(je,Ge=ue),je);function je(){var e=Ge.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Be,We=(t(He,Be=qe),He.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",He.dataType="PageviewData",He);function He(e,t,n,r,i,a,o){var s=Be.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=K.sanitizeId(e,o),s.url=K.sanitizeUrl(e,n),s.name=K.sanitizeString(e,t)||J.NotSpecified,isNaN(r)||(s.duration=J.msToTimeSpan(r)),s.properties=K.sanitizeProperties(e,i),s.measurements=K.sanitizeMeasurements(e,a),s}var Xe,Ke=(t(Fe,Xe=ce),Fe);function Fe(){var e=Xe.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Je,Qe=(t(Ye,Je=Ke),Ye.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ye.dataType="RemoteDependencyData",Ye);function Ye(e,t,n,r,i,a,o,s,c,l,u,p){void 0===c&&(c="Ajax");var g=Je.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=J.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=K.sanitizeString(e,c);var f=Z.ParseDependencyPath(e,n,s,r);return g.data=K.sanitizeUrl(e,r)||f.data,g.target=K.sanitizeString(e,f.target),l&&(g.target=g.target+"| "+l),g.name=K.sanitizeString(e,f.name),g.properties=K.sanitizeProperties(e,u),g.measurements=K.sanitizeMeasurements(e,p),g}var $e,Ze=(t(et,$e=ce),et);function et(){var e=$e.call(this)||this;return e.ver=2,e.properties={},e}var tt,nt=(t(rt,tt=Ze),rt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",rt.dataType="MessageData",rt);function rt(e,t,n,r){var i=tt.call(this)||this;return i.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||J.NotSpecified,i.message=K.sanitizeMessage(e,t),i.properties=K.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var it,at=(t(ot,it=qe),ot);function ot(){var e=it.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var st,ct=(t(lt,st=at),lt.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",lt.dataType="PageviewPerformanceData",lt);function lt(e,t,n,r,i,a,o){var s=st.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=K.sanitizeUrl(e,n),s.name=K.sanitizeString(e,t)||J.NotSpecified,s.properties=K.sanitizeProperties(e,i),s.measurements=K.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 ut,pt,gt;t(ft,ut=ie);function ft(e,t){var n=ut.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(gt=pt=pt||{})[gt.Verbose=0]="Verbose",gt[gt.Information=1]="Information",gt[gt.Warning=2]="Warning",gt[gt.Error=3]="Error",gt[gt.Critical=4]="Critical";var dt=(ht.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},ht);function ht(){}var mt=(vt.create=function(e,t,n,r,i,a){if(n=K.sanitizeString(r,n)||J.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},vt);function vt(){}var wt=(yt.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,N,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,s=void 0,c=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=te.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||{}).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<te.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,C,"trackPageView failed on page load calculation: "+J.getExceptionName(e),{exception:J.dump(e)})}},100)},yt);function yt(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 St=(_t.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: "+J.dump(e))}},_t.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: "+J.dump(e)),null}},_t.prototype.startPageVisitTimer=function(e,t){try{if(J.canUseSessionStorage()){if(null!=J.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new It(e,t),r=JSON.stringify(n);J.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+J.dump(e))}},_t.prototype.stopPageVisitTimer=function(){try{if(J.canUseSessionStorage()){var e=Date.now(),t=J.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,J.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+J.dump(e)),null}},_t);function _t(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var It=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},Tt=(Nt.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceTiming();if(t){var n=te.GetDuration(t.navigationStart,t.loadEventEnd),r=te.GetDuration(t.navigationStart,t.connectEnd),i=te.GetDuration(t.requestStart,t.responseStart),a=te.GetDuration(t.responseStart,t.responseEnd),o=te.GetDuration(t.responseEnd,t.loadEventEnd);0==n?this._logger.throwInternal(u.WARNING,I,"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,_,"client performance math error.",{total:n,network:r,request:i,response:a,dom:o}):(e.durationMs=n,e.perfTotal=e.duration=J.msToTimeSpan(n),e.networkConnect=J.msToTimeSpan(r),e.sentRequest=J.msToTimeSpan(i),e.receivedResponse=J.msToTimeSpan(a),e.domProcessing=J.msToTimeSpan(o),e.isValid=!0):this._logger.throwInternal(u.WARNING,R,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:r,request:i,response:a,dom:o})}},Nt.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},Nt.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},Nt.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},Nt.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},Nt);function Nt(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Et="duration",kt=(Dt.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=J.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=J.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=J.stringToBoolOrDefault(e.overridePageViewDuration),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=J.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=J.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=J.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=J.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Dt.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,j,"One of telemetry initializers failed, telemetry item will not be sent: "+J.getExceptionName(e),{exception:J.dump(e)},!0)}}t||g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},Dt.prototype.setNextPlugin=function(e){this._nextPlugin=e},Dt.prototype.trackEvent=function(e,t){try{var n=mt.create(e,fe.dataType,fe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,M,"trackTrace failed, trace will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,E,"startTrackEvent failed, event will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(u.CRITICAL,k,"stopTrackEvent failed, event will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackTrace=function(e,t){try{var n=mt.create(e,nt.dataType,nt.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,M,"trackTrace failed, trace will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackMetric=function(e,t){try{var n=mt.create(e,Oe.dataType,Oe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.CRITICAL,b,"trackMetric failed, metric will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(e){this._logger.throwInternal(u.CRITICAL,A,"trackPageView failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.sendPageViewInternal=function(e,t,n){"undefined"!=typeof document&&(e.refUri=void 0===e.refUri?document.referrer:e.refUri);var r=mt.create(e,We.dataType,We.envelopeType,this._logger,t,n);this.core.track(r),this._trackAjaxAttempts=0},Dt.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=mt.create(e,ct.dataType,ct.envelopeType,this._logger,t,n);this.core.track(r)},Dt.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,A,"trackPageViewPerformance failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.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,D,"startTrackPage failed, page view may not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.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,x,"stopTrackPage failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.sendExceptionInternal=function(e,t,n){var r=new _e(this._logger,e.exception||new Error(J.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=mt.create(r,_e.dataType,_e.envelopeType,this._logger,t,n);this.core.track(i)},Dt.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackException failed, exception will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(J.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!J.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:pt.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(u.CRITICAL,T,"_onError threw exception while logging error, error will not be collected: "+J.getExceptionName(e),{exception:J.dump(e),errorString:r})}},Dt.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Dt.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=Dt.getDefaultConfig();if(void 0!==r){for(var i in r)this.config[i]=dt.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&&J.disableCookies(),this.config.isStorageUseDisabled&&J.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 Tt(this.core),this._pageViewManager=new wt(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new St(this._logger,function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new xt(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Et]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new xt(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){g.isNullOrUndefined(r)&&(r={}),r[Et]=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&&"undefined"!=typeof Event){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(J.createDomEvent(p.config.namePrefix+"pushState")),window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"locationchange")),e}),history.replaceState=(s=history.replaceState,function(){var e=s.apply(this,arguments);return window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"replaceState")),window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"locationchange")),e}),window.addEventListener(p.config.namePrefix+"popstate",function(){window.dispatchEvent(J.createDomEvent(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=J.generateW3CId(),p._properties.context.telemetryTrace.name=window.location&&window.location.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=window.location&&window.location.href||"",setTimeout(function(e){p.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),p.autoRoutePVDelay)})}this._isInitialized=!0}},Dt.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)},Dt.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===Qe.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})}},Dt.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Dt.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=mt.create(t,_e.dataType,_e.envelopeType,this._logger,{url:e});this.core.track(n)},Dt.Version="2.2.1",Dt);function Dt(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this.autoRoutePVDelay=500,this._isInitialized=!1,this._trackAjaxAttempts=0,this._prevUri="object"==typeof window&&window.location&&window.location.href||"",this.initialize=this._initialize.bind(this)}var xt=(Pt.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(u.WARNING,G,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Pt.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(u.WARNING,q,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=te.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=void 0},Pt);function Pt(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=kt,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i,n,d,a,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=i=i||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(a=d=d||{})[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var g=(l.isNullOrUndefined=function(e){return null==e},l.disableCookies=function(){l._canUseCookies=!1},l.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(f,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},l);function l(){}var u,p,f=/[xy]/g;(p=u=u||{})[p.CRITICAL=1]="CRITICAL",p[p.WARNING=2]="WARNING";var h=1,m=2,v=3,w=4,y=5,S=6,_=8,I=10,T=11,N=25,E=29,k=30,D=31,x=32,P=35,b=36,A=37,C=38,M=39,R=45,U=49,L=52,V=56,O=57,z=61,G=62,q=63,j=64,B=66,W=68,H=69;X.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(X.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),X.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){e=e.sort(function(e,t){return e.priority-t.priority});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);if(e.forEach(function(e){e.priority<500&&(o=e.identifier),e.initialize(n,r,i)}),o)throw Error("Channel has invalid priority"+o);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}),t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);e.forEach(function(e){return e.initialize(n,r,i)}),this.channelQueue.push(e)}};function X(){this.identifier="ChannelControllerPlugin",this.priority=500}var K=(F.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=F.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,F.MAX_NAME_LENGTH-3)+F.padNumber(a);i=o}return i},F.sanitizeKey=function(e,t){var n;return t&&(t=F.trim(t.toString())).length>F.MAX_NAME_LENGTH&&(n=t.substring(0,F.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,O,"name is too long. It has been truncated to "+F.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},F.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=F.MAX_STRING_LENGTH),t&&(n=n||F.MAX_STRING_LENGTH,(t=F.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,z,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},F.sanitizeUrl=function(e,t){return F.sanitizeInput(e,t,F.MAX_URL_LENGTH,B)},F.sanitizeMessage=function(e,t){var n;return t&&t.length>F.MAX_MESSAGE_LENGTH&&(n=t.substring(0,F.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,V,"message is too long, it has been truncated to "+F.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},F.sanitizeException=function(e,t){var n;return t&&t.length>F.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,F.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,L,"exception is too long, it has been truncated to "+F.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},F.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,U,"custom property is not valid",{exception:e},!0)}i=F.sanitizeString(t,i,F.MAX_PROPERTY_LENGTH),n[r=F.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},F.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=F.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},F.sanitizeId=function(e,t){return t?F.sanitizeInput(e,t,F.MAX_ID_LENGTH,H).toString():t},F.sanitizeInput=function(e,t,n,r){var i;return t&&(t=F.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},F.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},F.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},F.MAX_NAME_LENGTH=150,F.MAX_ID_LENGTH=128,F.MAX_PROPERTY_LENGTH=8192,F.MAX_STRING_LENGTH=1024,F.MAX_URL_LENGTH=2048,F.MAX_MESSAGE_LENGTH=32768,F.MAX_EXCEPTION_LENGTH=32768,F);function F(){}var J=(Q.createDomEvent=function(e){var t=null;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},Q.disableStorage=function(){Q._canUseLocalStorage=!1,Q._canUseSessionStorage=!1},Q._getLocalStorageObject=function(){return Q.canUseLocalStorage()?Q._getVerifiedStorageObject(i.LocalStorage):null},Q._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},Q.isInternalApplicationInsightsEndpoint=function(e){return-1!==Q._internalEndpoints.indexOf(e.toLowerCase())},Q.canUseLocalStorage=function(){return void 0===Q._canUseLocalStorage&&(Q._canUseLocalStorage=!!Q._getVerifiedStorageObject(i.LocalStorage)),Q._canUseLocalStorage},Q.getStorage=function(t,e){var n=Q._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,h,"Browser failed read of local storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return null},Q.setStorage=function(t,e,n){var r=Q._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,v,"Browser failed write to local storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.removeStorage=function(t,e){var n=Q._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,y,"Browser failed removal of local storage item. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q._getSessionStorageObject=function(){return Q.canUseSessionStorage()?Q._getVerifiedStorageObject(i.SessionStorage):null},Q.canUseSessionStorage=function(){return void 0===Q._canUseSessionStorage&&(Q._canUseSessionStorage=!!Q._getVerifiedStorageObject(i.SessionStorage)),Q._canUseSessionStorage},Q.getSessionStorageKeys=function(){var e=[];if(Q.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},Q.getSessionStorage=function(t,e){var n=Q._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,m,"Browser failed read of session storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return null},Q.setSessionStorage=function(t,e,n){var r=Q._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,w,"Browser failed write to session storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.removeSessionStorage=function(t,e){var n=Q._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,S,"Browser failed removal of session storage item. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.disableCookies=function(){g.disableCookies()},Q.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==Q.document.cookie}catch(e){t.throwInternal(u.WARNING,W,"Cannot access document.cookie - "+Q.getExceptionName(e),{exception:Q.dump(e)})}}return g._canUseCookies},Q.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),Q.document.location&&"https:"===Q.document.location.protocol&&(a=";secure"),Q.canUseCookies(e)&&(Q.document.cookie=t+"="+n+i+";path=/"+a)},Q.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},Q.getCookie=function(e,t){if(Q.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=Q.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=Q.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},Q.deleteCookie=function(e,t){Q.canUseCookies(e)&&(Q.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Q.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},Q.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},Q.random32=function(){return 4294967296*Math.random()|0},Q.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=Q.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},Q.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},Q.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},Q.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},Q.toISOStringForIE8=function(e){if(Q.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"}},Q.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},Q.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},Q.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},Q.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},Q.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},Q.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},Q.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},Q.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},Q.document="undefined"!=typeof document?document:{},Q._canUseLocalStorage=void 0,Q._canUseSessionStorage=void 0,Q._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Q.NotSpecified="not_specified",Q);function Q(){}var Y=($.parseUrl=function(e){return $.htmlAnchorElement||($.htmlAnchorElement=$.document.createElement?$.document.createElement("a"):{host:$.parseHost(e)}),$.htmlAnchorElement.href=e,$.htmlAnchorElement},$.getAbsoluteUrl=function(e){var t,n=$.parseUrl(e);return n&&(t=n.href),t},$.getPathName=function(e){var t,n=$.parseUrl(e);return n&&(t=n.pathname),t},$.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},$.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},$.document="undefined"!=typeof document?document:{},$);function $(){}var Z=(ee.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=Y.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=K.sanitizeString(e,n?n+" "+c:c)}else a=K.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},ee);function ee(){}var te=(ne.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()},ne.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n},ne);function ne(){}var re,ie=(t(ae,re=function(){}),ae);function ae(){return re.call(this)||this}var oe;t(se,oe=function(){this.ver=1,this.sampleRate=100,this.tags={}});function se(e,t,n){var r=oe.call(this)||this;return r.name=K.sanitizeString(e,n)||J.NotSpecified,r.data=t,r.time=J.toISOStringForIE8(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100==r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}function ce(){}var le,ue=(t(pe,le=ce),pe);function pe(){var e=le.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ge,fe=(t(de,ge=ue),de.envelopeType="Microsoft.ApplicationInsights.{0}.Event",de.dataType="EventData",de);function de(e,t,n,r){var i=ge.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=K.sanitizeString(e,t)||J.NotSpecified,i.properties=K.sanitizeProperties(e,n),i.measurements=K.sanitizeMeasurements(e,r),i}function he(){}var me,ve=(t(we,me=ce),we);function we(){var e=me.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function ye(){this.hasFullStack=!0,this.parsedStack=[]}var Se,_e=(t(Ie,Se=ve),Ie.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ne.CreateFromInterface(t,e)});return new Ie(t,c({},e,{exceptions:n}))},Ie.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}},Ie.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Ie.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Ie.dataType="ExceptionData",Ie);function Ie(e,t,n,r,i,a){var o=Se.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ne(e,t)],o.properties=K.sanitizeProperties(e,n),o.measurements=K.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 Te,Ne=(t(Ee,Te=ye),Ee.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}},Ee.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return De.CreateFromInterface(e)})||t.parsedStack;return new Ee(e,c({},t,{parsedStack:n}))},Ee.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(De.regex.test(o)){var s=new De(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},Ee);function Ee(e,t){var n=Te.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=K.sanitizeString(e,t.name)||J.NotSpecified,n.message=K.sanitizeMessage(e,t.message)||J.NotSpecified;var r=t.stack;n.parsedStack=Ee.parseStack(r),n.stack=K.sanitizeException(e,r),n.hasFullStack=J.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 ke,De=(t(xe,ke=he),xe.CreateFromInterface=function(e){return new xe(e,null)},xe.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},xe.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,xe.baseSize=58,xe);function xe(e,t){var n=ke.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=J.trim(r),n.fileName="",n.line=0;var i=r.match(xe.regex);i&&5<=i.length&&(n.method=J.trim(i[2])||n.method,n.fileName=J.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+=xe.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Pe,be,Ae,Ce=(t(Me,Pe=ce),Me);function Me(){var e=Pe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Ae=be=be||{})[Ae.Measurement=0]="Measurement",Ae[Ae.Aggregation=1]="Aggregation";var Re,Ue=(t(Le,Re=function(){this.kind=be.Measurement}),Le);function Le(){var e=null!==Re&&Re.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Ve,Oe=(t(ze,Ve=Ce),ze.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",ze.dataType="MetricData",ze);function ze(e,t,n,r,i,a,o){var s=Ve.call(this)||this;s.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var c=new Ue;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=K.sanitizeString(e,t)||J.NotSpecified,c.value=n,s.metrics=[c],s.properties=K.sanitizeProperties(e,o),s}var Ge,qe=(t(je,Ge=ue),je);function je(){var e=Ge.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Be,We=(t(He,Be=qe),He.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",He.dataType="PageviewData",He);function He(e,t,n,r,i,a,o){var s=Be.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=K.sanitizeId(e,o),s.url=K.sanitizeUrl(e,n),s.name=K.sanitizeString(e,t)||J.NotSpecified,isNaN(r)||(s.duration=J.msToTimeSpan(r)),s.properties=K.sanitizeProperties(e,i),s.measurements=K.sanitizeMeasurements(e,a),s}var Xe,Ke=(t(Fe,Xe=ce),Fe);function Fe(){var e=Xe.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Je,Qe=(t(Ye,Je=Ke),Ye.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ye.dataType="RemoteDependencyData",Ye);function Ye(e,t,n,r,i,a,o,s,c,l,u,p){void 0===c&&(c="Ajax");var g=Je.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=J.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=K.sanitizeString(e,c);var f=Z.ParseDependencyPath(e,n,s,r);return g.data=K.sanitizeUrl(e,r)||f.data,g.target=K.sanitizeString(e,f.target),l&&(g.target=g.target+" | "+l),g.name=K.sanitizeString(e,f.name),g.properties=K.sanitizeProperties(e,u),g.measurements=K.sanitizeMeasurements(e,p),g}var $e,Ze=(t(et,$e=ce),et);function et(){var e=$e.call(this)||this;return e.ver=2,e.properties={},e}var tt,nt=(t(rt,tt=Ze),rt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",rt.dataType="MessageData",rt);function rt(e,t,n,r){var i=tt.call(this)||this;return i.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||J.NotSpecified,i.message=K.sanitizeMessage(e,t),i.properties=K.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var it,at=(t(ot,it=qe),ot);function ot(){var e=it.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var st,ct=(t(lt,st=at),lt.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",lt.dataType="PageviewPerformanceData",lt);function lt(e,t,n,r,i,a,o){var s=st.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=K.sanitizeUrl(e,n),s.name=K.sanitizeString(e,t)||J.NotSpecified,s.properties=K.sanitizeProperties(e,i),s.measurements=K.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 ut,pt,gt;t(ft,ut=ie);function ft(e,t){var n=ut.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(gt=pt=pt||{})[gt.Verbose=0]="Verbose",gt[gt.Information=1]="Information",gt[gt.Warning=2]="Warning",gt[gt.Error=3]="Error",gt[gt.Critical=4]="Critical";var dt=(ht.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},ht);function ht(){}var mt=(vt.create=function(e,t,n,r,i,a){if(n=K.sanitizeString(r,n)||J.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},vt);function vt(){}var wt=(yt.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,N,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,s=void 0,c=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=te.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||{}).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<te.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,C,"trackPageView failed on page load calculation: "+J.getExceptionName(e),{exception:J.dump(e)})}},100)},yt);function yt(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 St=(_t.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: "+J.dump(e))}},_t.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: "+J.dump(e)),null}},_t.prototype.startPageVisitTimer=function(e,t){try{if(J.canUseSessionStorage()){if(null!=J.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new It(e,t),r=JSON.stringify(n);J.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+J.dump(e))}},_t.prototype.stopPageVisitTimer=function(){try{if(J.canUseSessionStorage()){var e=Date.now(),t=J.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,J.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+J.dump(e)),null}},_t);function _t(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var It=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},Tt=(Nt.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceTiming();if(t){var n=te.GetDuration(t.navigationStart,t.loadEventEnd),r=te.GetDuration(t.navigationStart,t.connectEnd),i=te.GetDuration(t.requestStart,t.responseStart),a=te.GetDuration(t.responseStart,t.responseEnd),o=te.GetDuration(t.responseEnd,t.loadEventEnd);0==n?this._logger.throwInternal(u.WARNING,I,"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,_,"client performance math error.",{total:n,network:r,request:i,response:a,dom:o}):(e.durationMs=n,e.perfTotal=e.duration=J.msToTimeSpan(n),e.networkConnect=J.msToTimeSpan(r),e.sentRequest=J.msToTimeSpan(i),e.receivedResponse=J.msToTimeSpan(a),e.domProcessing=J.msToTimeSpan(o),e.isValid=!0):this._logger.throwInternal(u.WARNING,R,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:r,request:i,response:a,dom:o})}},Nt.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},Nt.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},Nt.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},Nt.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},Nt);function Nt(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Et="duration",kt=(Dt.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=J.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=J.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=J.stringToBoolOrDefault(e.overridePageViewDuration),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=J.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=J.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=J.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=J.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Dt.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,j,"One of telemetry initializers failed, telemetry item will not be sent: "+J.getExceptionName(e),{exception:J.dump(e)},!0)}}t||g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},Dt.prototype.setNextPlugin=function(e){this._nextPlugin=e},Dt.prototype.trackEvent=function(e,t){try{var n=mt.create(e,fe.dataType,fe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,M,"trackTrace failed, trace will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,E,"startTrackEvent failed, event will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(u.CRITICAL,k,"stopTrackEvent failed, event will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackTrace=function(e,t){try{var n=mt.create(e,nt.dataType,nt.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,M,"trackTrace failed, trace will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackMetric=function(e,t){try{var n=mt.create(e,Oe.dataType,Oe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.CRITICAL,b,"trackMetric failed, metric will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(e){this._logger.throwInternal(u.CRITICAL,A,"trackPageView failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.sendPageViewInternal=function(e,t,n){"undefined"!=typeof document&&(e.refUri=void 0===e.refUri?document.referrer:e.refUri);var r=mt.create(e,We.dataType,We.envelopeType,this._logger,t,n);this.core.track(r),this._trackAjaxAttempts=0},Dt.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=mt.create(e,ct.dataType,ct.envelopeType,this._logger,t,n);this.core.track(r)},Dt.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,A,"trackPageViewPerformance failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.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,D,"startTrackPage failed, page view may not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.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,x,"stopTrackPage failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.sendExceptionInternal=function(e,t,n){var r=new _e(this._logger,e.exception||new Error(J.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=mt.create(r,_e.dataType,_e.envelopeType,this._logger,t,n);this.core.track(i)},Dt.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackException failed, exception will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(J.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!J.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:pt.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(u.CRITICAL,T,"_onError threw exception while logging error, error will not be collected: "+J.getExceptionName(e),{exception:J.dump(e),errorString:r})}},Dt.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Dt.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=Dt.getDefaultConfig();if(void 0!==r){for(var i in r)this.config[i]=dt.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&&J.disableCookies(),this.config.isStorageUseDisabled&&J.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 Tt(this.core),this._pageViewManager=new wt(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new St(this._logger,function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new xt(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Et]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new xt(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){g.isNullOrUndefined(r)&&(r={}),r[Et]=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&&"undefined"!=typeof Event){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(J.createDomEvent(p.config.namePrefix+"pushState")),window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"locationchange")),e}),history.replaceState=(s=history.replaceState,function(){var e=s.apply(this,arguments);return window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"replaceState")),window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"locationchange")),e}),window.addEventListener(p.config.namePrefix+"popstate",function(){window.dispatchEvent(J.createDomEvent(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=J.generateW3CId(),p._properties.context.telemetryTrace.name=window.location&&window.location.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=window.location&&window.location.href||"",setTimeout(function(e){p.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),p.autoRoutePVDelay)})}this._isInitialized=!0}},Dt.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)},Dt.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===Qe.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})}},Dt.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Dt.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=mt.create(t,_e.dataType,_e.envelopeType,this._logger,{url:e});this.core.track(n)},Dt.Version="2.2.2",Dt);function Dt(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this.autoRoutePVDelay=500,this._isInitialized=!1,this._trackAjaxAttempts=0,this._prevUri="object"==typeof window&&window.location&&window.location.href||"",this.initialize=this._initialize.bind(this)}var xt=(Pt.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(u.WARNING,G,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Pt.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(u.WARNING,q,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=te.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=void 0},Pt);function Pt(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=kt,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map |
@@ -503,3 +503,3 @@ /** | ||
}; | ||
ApplicationInsights.Version = "2.2.1"; // Not currently used anywhere | ||
ApplicationInsights.Version = "2.2.2"; // Not currently used anywhere | ||
return ApplicationInsights; | ||
@@ -506,0 +506,0 @@ }()); |
/*! | ||
* Application Insights JavaScript SDK - Web Analytics, 2.2.1 | ||
* Application Insights JavaScript SDK - Web Analytics, 2.2.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i,n,d,a,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=i=i||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(a=d=d||{})[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var g=(l.isNullOrUndefined=function(e){return null==e},l.disableCookies=function(){l._canUseCookies=!1},l.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(f,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},l);function l(){}var u,p,f=/[xy]/g;(p=u=u||{})[p.CRITICAL=1]="CRITICAL",p[p.WARNING=2]="WARNING";var h=1,m=2,v=3,w=4,y=5,S=6,_=8,I=10,T=11,N=25,E=29,k=30,D=31,x=32,P=35,b=36,A=37,C=38,M=39,R=45,U=49,L=52,V=56,O=57,z=61,G=62,q=63,j=64,B=66,W=68,H=69;X.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(X.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),X.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){e=e.sort(function(e,t){return e.priority-t.priority});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);if(e.forEach(function(e){e.priority<500&&(o=e.identifier),e.initialize(n,r,i)}),o)throw Error("Channel has invalid priority"+o);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}),t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);e.forEach(function(e){return e.initialize(n,r,i)}),this.channelQueue.push(e)}};function X(){this.identifier="ChannelControllerPlugin",this.priority=500}var K=(F.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=F.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,F.MAX_NAME_LENGTH-3)+F.padNumber(a);i=o}return i},F.sanitizeKey=function(e,t){var n;return t&&(t=F.trim(t.toString())).length>F.MAX_NAME_LENGTH&&(n=t.substring(0,F.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,O,"name is too long. It has been truncated to "+F.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},F.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=F.MAX_STRING_LENGTH),t&&(n=n||F.MAX_STRING_LENGTH,(t=F.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,z,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},F.sanitizeUrl=function(e,t){return F.sanitizeInput(e,t,F.MAX_URL_LENGTH,B)},F.sanitizeMessage=function(e,t){var n;return t&&t.length>F.MAX_MESSAGE_LENGTH&&(n=t.substring(0,F.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,V,"message is too long, it has been truncated to "+F.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},F.sanitizeException=function(e,t){var n;return t&&t.length>F.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,F.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,L,"exception is too long, it has been truncated to "+F.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},F.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,U,"custom property is not valid",{exception:e},!0)}i=F.sanitizeString(t,i,F.MAX_PROPERTY_LENGTH),n[r=F.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},F.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=F.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},F.sanitizeId=function(e,t){return t?F.sanitizeInput(e,t,F.MAX_ID_LENGTH,H).toString():t},F.sanitizeInput=function(e,t,n,r){var i;return t&&(t=F.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},F.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},F.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},F.MAX_NAME_LENGTH=150,F.MAX_ID_LENGTH=128,F.MAX_PROPERTY_LENGTH=8192,F.MAX_STRING_LENGTH=1024,F.MAX_URL_LENGTH=2048,F.MAX_MESSAGE_LENGTH=32768,F.MAX_EXCEPTION_LENGTH=32768,F);function F(){}var J=(Q.createDomEvent=function(e){var t=null;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},Q.disableStorage=function(){Q._canUseLocalStorage=!1,Q._canUseSessionStorage=!1},Q._getLocalStorageObject=function(){return Q.canUseLocalStorage()?Q._getVerifiedStorageObject(i.LocalStorage):null},Q._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},Q.isInternalApplicationInsightsEndpoint=function(e){return-1!==Q._internalEndpoints.indexOf(e.toLowerCase())},Q.canUseLocalStorage=function(){return void 0===Q._canUseLocalStorage&&(Q._canUseLocalStorage=!!Q._getVerifiedStorageObject(i.LocalStorage)),Q._canUseLocalStorage},Q.getStorage=function(t,e){var n=Q._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,h,"Browser failed read of local storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return null},Q.setStorage=function(t,e,n){var r=Q._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,v,"Browser failed write to local storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.removeStorage=function(t,e){var n=Q._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,y,"Browser failed removal of local storage item. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q._getSessionStorageObject=function(){return Q.canUseSessionStorage()?Q._getVerifiedStorageObject(i.SessionStorage):null},Q.canUseSessionStorage=function(){return void 0===Q._canUseSessionStorage&&(Q._canUseSessionStorage=!!Q._getVerifiedStorageObject(i.SessionStorage)),Q._canUseSessionStorage},Q.getSessionStorageKeys=function(){var e=[];if(Q.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},Q.getSessionStorage=function(t,e){var n=Q._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,m,"Browser failed read of session storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return null},Q.setSessionStorage=function(t,e,n){var r=Q._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,w,"Browser failed write to session storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.removeSessionStorage=function(t,e){var n=Q._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,S,"Browser failed removal of session storage item. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.disableCookies=function(){g.disableCookies()},Q.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==Q.document.cookie}catch(e){t.throwInternal(u.WARNING,W,"Cannot access document.cookie - "+Q.getExceptionName(e),{exception:Q.dump(e)})}}return g._canUseCookies},Q.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),Q.document.location&&"https:"===Q.document.location.protocol&&(a=";secure"),Q.canUseCookies(e)&&(Q.document.cookie=t+"="+n+i+";path=/"+a)},Q.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},Q.getCookie=function(e,t){if(Q.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=Q.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=Q.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},Q.deleteCookie=function(e,t){Q.canUseCookies(e)&&(Q.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Q.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},Q.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},Q.random32=function(){return 4294967296*Math.random()|0},Q.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=Q.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},Q.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},Q.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},Q.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},Q.toISOStringForIE8=function(e){if(Q.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"}},Q.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},Q.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},Q.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},Q.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},Q.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},Q.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},Q.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},Q.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},Q.document="undefined"!=typeof document?document:{},Q._canUseLocalStorage=void 0,Q._canUseSessionStorage=void 0,Q._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Q.NotSpecified="not_specified",Q);function Q(){}var Y=($.parseUrl=function(e){return $.htmlAnchorElement||($.htmlAnchorElement=$.document.createElement?$.document.createElement("a"):{host:$.parseHost(e)}),$.htmlAnchorElement.href=e,$.htmlAnchorElement},$.getAbsoluteUrl=function(e){var t,n=$.parseUrl(e);return n&&(t=n.href),t},$.getPathName=function(e){var t,n=$.parseUrl(e);return n&&(t=n.pathname),t},$.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},$.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},$.document="undefined"!=typeof document?document:{},$);function $(){}var Z=(ee.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=Y.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=K.sanitizeString(e,n?n+" "+c:c)}else a=K.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},ee);function ee(){}var te=(ne.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()},ne.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n},ne);function ne(){}var re,ie=(t(ae,re=function(){}),ae);function ae(){return re.call(this)||this}var oe;t(se,oe=function(){this.ver=1,this.sampleRate=100,this.tags={}});function se(e,t,n){var r=oe.call(this)||this;return r.name=K.sanitizeString(e,n)||J.NotSpecified,r.data=t,r.time=J.toISOStringForIE8(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100==r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}function ce(){}var le,ue=(t(pe,le=ce),pe);function pe(){var e=le.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ge,fe=(t(de,ge=ue),de.envelopeType="Microsoft.ApplicationInsights.{0}.Event",de.dataType="EventData",de);function de(e,t,n,r){var i=ge.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=K.sanitizeString(e,t)||J.NotSpecified,i.properties=K.sanitizeProperties(e,n),i.measurements=K.sanitizeMeasurements(e,r),i}function he(){}var me,ve=(t(we,me=ce),we);function we(){var e=me.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function ye(){this.hasFullStack=!0,this.parsedStack=[]}var Se,_e=(t(Ie,Se=ve),Ie.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ne.CreateFromInterface(t,e)});return new Ie(t,c({},e,{exceptions:n}))},Ie.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}},Ie.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Ie.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Ie.dataType="ExceptionData",Ie);function Ie(e,t,n,r,i,a){var o=Se.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ne(e,t)],o.properties=K.sanitizeProperties(e,n),o.measurements=K.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 Te,Ne=(t(Ee,Te=ye),Ee.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}},Ee.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return De.CreateFromInterface(e)})||t.parsedStack;return new Ee(e,c({},t,{parsedStack:n}))},Ee.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(De.regex.test(o)){var s=new De(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},Ee);function Ee(e,t){var n=Te.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=K.sanitizeString(e,t.name)||J.NotSpecified,n.message=K.sanitizeMessage(e,t.message)||J.NotSpecified;var r=t.stack;n.parsedStack=Ee.parseStack(r),n.stack=K.sanitizeException(e,r),n.hasFullStack=J.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 ke,De=(t(xe,ke=he),xe.CreateFromInterface=function(e){return new xe(e,null)},xe.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},xe.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,xe.baseSize=58,xe);function xe(e,t){var n=ke.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=J.trim(r),n.fileName="",n.line=0;var i=r.match(xe.regex);i&&5<=i.length&&(n.method=J.trim(i[2])||n.method,n.fileName=J.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+=xe.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Pe,be,Ae,Ce=(t(Me,Pe=ce),Me);function Me(){var e=Pe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Ae=be=be||{})[Ae.Measurement=0]="Measurement",Ae[Ae.Aggregation=1]="Aggregation";var Re,Ue=(t(Le,Re=function(){this.kind=be.Measurement}),Le);function Le(){var e=null!==Re&&Re.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Ve,Oe=(t(ze,Ve=Ce),ze.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",ze.dataType="MetricData",ze);function ze(e,t,n,r,i,a,o){var s=Ve.call(this)||this;s.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var c=new Ue;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=K.sanitizeString(e,t)||J.NotSpecified,c.value=n,s.metrics=[c],s.properties=K.sanitizeProperties(e,o),s}var Ge,qe=(t(je,Ge=ue),je);function je(){var e=Ge.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Be,We=(t(He,Be=qe),He.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",He.dataType="PageviewData",He);function He(e,t,n,r,i,a,o){var s=Be.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=K.sanitizeId(e,o),s.url=K.sanitizeUrl(e,n),s.name=K.sanitizeString(e,t)||J.NotSpecified,isNaN(r)||(s.duration=J.msToTimeSpan(r)),s.properties=K.sanitizeProperties(e,i),s.measurements=K.sanitizeMeasurements(e,a),s}var Xe,Ke=(t(Fe,Xe=ce),Fe);function Fe(){var e=Xe.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Je,Qe=(t(Ye,Je=Ke),Ye.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ye.dataType="RemoteDependencyData",Ye);function Ye(e,t,n,r,i,a,o,s,c,l,u,p){void 0===c&&(c="Ajax");var g=Je.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=J.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=K.sanitizeString(e,c);var f=Z.ParseDependencyPath(e,n,s,r);return g.data=K.sanitizeUrl(e,r)||f.data,g.target=K.sanitizeString(e,f.target),l&&(g.target=g.target+"| "+l),g.name=K.sanitizeString(e,f.name),g.properties=K.sanitizeProperties(e,u),g.measurements=K.sanitizeMeasurements(e,p),g}var $e,Ze=(t(et,$e=ce),et);function et(){var e=$e.call(this)||this;return e.ver=2,e.properties={},e}var tt,nt=(t(rt,tt=Ze),rt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",rt.dataType="MessageData",rt);function rt(e,t,n,r){var i=tt.call(this)||this;return i.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||J.NotSpecified,i.message=K.sanitizeMessage(e,t),i.properties=K.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var it,at=(t(ot,it=qe),ot);function ot(){var e=it.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var st,ct=(t(lt,st=at),lt.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",lt.dataType="PageviewPerformanceData",lt);function lt(e,t,n,r,i,a,o){var s=st.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=K.sanitizeUrl(e,n),s.name=K.sanitizeString(e,t)||J.NotSpecified,s.properties=K.sanitizeProperties(e,i),s.measurements=K.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 ut,pt,gt;t(ft,ut=ie);function ft(e,t){var n=ut.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(gt=pt=pt||{})[gt.Verbose=0]="Verbose",gt[gt.Information=1]="Information",gt[gt.Warning=2]="Warning",gt[gt.Error=3]="Error",gt[gt.Critical=4]="Critical";var dt=(ht.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},ht);function ht(){}var mt=(vt.create=function(e,t,n,r,i,a){if(n=K.sanitizeString(r,n)||J.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},vt);function vt(){}var wt=(yt.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,N,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,s=void 0,c=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=te.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||{}).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<te.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,C,"trackPageView failed on page load calculation: "+J.getExceptionName(e),{exception:J.dump(e)})}},100)},yt);function yt(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 St=(_t.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: "+J.dump(e))}},_t.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: "+J.dump(e)),null}},_t.prototype.startPageVisitTimer=function(e,t){try{if(J.canUseSessionStorage()){if(null!=J.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new It(e,t),r=JSON.stringify(n);J.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+J.dump(e))}},_t.prototype.stopPageVisitTimer=function(){try{if(J.canUseSessionStorage()){var e=Date.now(),t=J.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,J.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+J.dump(e)),null}},_t);function _t(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var It=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},Tt=(Nt.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceTiming();if(t){var n=te.GetDuration(t.navigationStart,t.loadEventEnd),r=te.GetDuration(t.navigationStart,t.connectEnd),i=te.GetDuration(t.requestStart,t.responseStart),a=te.GetDuration(t.responseStart,t.responseEnd),o=te.GetDuration(t.responseEnd,t.loadEventEnd);0==n?this._logger.throwInternal(u.WARNING,I,"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,_,"client performance math error.",{total:n,network:r,request:i,response:a,dom:o}):(e.durationMs=n,e.perfTotal=e.duration=J.msToTimeSpan(n),e.networkConnect=J.msToTimeSpan(r),e.sentRequest=J.msToTimeSpan(i),e.receivedResponse=J.msToTimeSpan(a),e.domProcessing=J.msToTimeSpan(o),e.isValid=!0):this._logger.throwInternal(u.WARNING,R,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:r,request:i,response:a,dom:o})}},Nt.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},Nt.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},Nt.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},Nt.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},Nt);function Nt(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Et="duration",kt=(Dt.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=J.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=J.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=J.stringToBoolOrDefault(e.overridePageViewDuration),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=J.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=J.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=J.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=J.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Dt.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,j,"One of telemetry initializers failed, telemetry item will not be sent: "+J.getExceptionName(e),{exception:J.dump(e)},!0)}}t||g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},Dt.prototype.setNextPlugin=function(e){this._nextPlugin=e},Dt.prototype.trackEvent=function(e,t){try{var n=mt.create(e,fe.dataType,fe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,M,"trackTrace failed, trace will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,E,"startTrackEvent failed, event will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(u.CRITICAL,k,"stopTrackEvent failed, event will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackTrace=function(e,t){try{var n=mt.create(e,nt.dataType,nt.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,M,"trackTrace failed, trace will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackMetric=function(e,t){try{var n=mt.create(e,Oe.dataType,Oe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.CRITICAL,b,"trackMetric failed, metric will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(e){this._logger.throwInternal(u.CRITICAL,A,"trackPageView failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.sendPageViewInternal=function(e,t,n){"undefined"!=typeof document&&(e.refUri=void 0===e.refUri?document.referrer:e.refUri);var r=mt.create(e,We.dataType,We.envelopeType,this._logger,t,n);this.core.track(r),this._trackAjaxAttempts=0},Dt.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=mt.create(e,ct.dataType,ct.envelopeType,this._logger,t,n);this.core.track(r)},Dt.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,A,"trackPageViewPerformance failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.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,D,"startTrackPage failed, page view may not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.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,x,"stopTrackPage failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.sendExceptionInternal=function(e,t,n){var r=new _e(this._logger,e.exception||new Error(J.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=mt.create(r,_e.dataType,_e.envelopeType,this._logger,t,n);this.core.track(i)},Dt.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackException failed, exception will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(J.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!J.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:pt.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(u.CRITICAL,T,"_onError threw exception while logging error, error will not be collected: "+J.getExceptionName(e),{exception:J.dump(e),errorString:r})}},Dt.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Dt.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=Dt.getDefaultConfig();if(void 0!==r){for(var i in r)this.config[i]=dt.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&&J.disableCookies(),this.config.isStorageUseDisabled&&J.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 Tt(this.core),this._pageViewManager=new wt(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new St(this._logger,function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new xt(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Et]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new xt(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){g.isNullOrUndefined(r)&&(r={}),r[Et]=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&&"undefined"!=typeof Event){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(J.createDomEvent(p.config.namePrefix+"pushState")),window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"locationchange")),e}),history.replaceState=(s=history.replaceState,function(){var e=s.apply(this,arguments);return window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"replaceState")),window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"locationchange")),e}),window.addEventListener(p.config.namePrefix+"popstate",function(){window.dispatchEvent(J.createDomEvent(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=J.generateW3CId(),p._properties.context.telemetryTrace.name=window.location&&window.location.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=window.location&&window.location.href||"",setTimeout(function(e){p.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),p.autoRoutePVDelay)})}this._isInitialized=!0}},Dt.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)},Dt.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===Qe.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})}},Dt.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Dt.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=mt.create(t,_e.dataType,_e.envelopeType,this._logger,{url:e});this.core.track(n)},Dt.Version="2.2.1",Dt);function Dt(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this.autoRoutePVDelay=500,this._isInitialized=!1,this._trackAjaxAttempts=0,this._prevUri="object"==typeof window&&window.location&&window.location.href||"",this.initialize=this._initialize.bind(this)}var xt=(Pt.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(u.WARNING,G,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Pt.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(u.WARNING,q,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=te.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=void 0},Pt);function Pt(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=kt,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i,n,d,a,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=i=i||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(a=d=d||{})[a.Default=0]="Default",a[a.Required=1]="Required",a[a.Array=2]="Array",a[a.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var g=(l.isNullOrUndefined=function(e){return null==e},l.disableCookies=function(){l._canUseCookies=!1},l.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(f,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},l);function l(){}var u,p,f=/[xy]/g;(p=u=u||{})[p.CRITICAL=1]="CRITICAL",p[p.WARNING=2]="WARNING";var h=1,m=2,v=3,w=4,y=5,S=6,_=8,I=10,T=11,N=25,E=29,k=30,D=31,x=32,P=35,b=36,A=37,C=38,M=39,R=45,U=49,L=52,V=56,O=57,z=61,G=62,q=63,j=64,B=66,W=68,H=69;X.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(X.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),X.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){e=e.sort(function(e,t){return e.priority-t.priority});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);if(e.forEach(function(e){e.priority<500&&(o=e.identifier),e.initialize(n,r,i)}),o)throw Error("Channel has invalid priority"+o);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}),t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);e.forEach(function(e){return e.initialize(n,r,i)}),this.channelQueue.push(e)}};function X(){this.identifier="ChannelControllerPlugin",this.priority=500}var K=(F.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=F.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;void 0!==n[o];)a++,o=i.substring(0,F.MAX_NAME_LENGTH-3)+F.padNumber(a);i=o}return i},F.sanitizeKey=function(e,t){var n;return t&&(t=F.trim(t.toString())).length>F.MAX_NAME_LENGTH&&(n=t.substring(0,F.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,O,"name is too long. It has been truncated to "+F.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},F.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=F.MAX_STRING_LENGTH),t&&(n=n||F.MAX_STRING_LENGTH,(t=F.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,z,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},F.sanitizeUrl=function(e,t){return F.sanitizeInput(e,t,F.MAX_URL_LENGTH,B)},F.sanitizeMessage=function(e,t){var n;return t&&t.length>F.MAX_MESSAGE_LENGTH&&(n=t.substring(0,F.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,V,"message is too long, it has been truncated to "+F.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},F.sanitizeException=function(e,t){var n;return t&&t.length>F.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,F.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,L,"exception is too long, it has been truncated to "+F.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},F.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,U,"custom property is not valid",{exception:e},!0)}i=F.sanitizeString(t,i,F.MAX_PROPERTY_LENGTH),n[r=F.sanitizeKeyAndAddUniqueness(t,r,n)]=i}e=n}return e},F.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=F.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},F.sanitizeId=function(e,t){return t?F.sanitizeInput(e,t,F.MAX_ID_LENGTH,H).toString():t},F.sanitizeInput=function(e,t,n,r){var i;return t&&(t=F.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},F.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},F.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},F.MAX_NAME_LENGTH=150,F.MAX_ID_LENGTH=128,F.MAX_PROPERTY_LENGTH=8192,F.MAX_STRING_LENGTH=1024,F.MAX_URL_LENGTH=2048,F.MAX_MESSAGE_LENGTH=32768,F.MAX_EXCEPTION_LENGTH=32768,F);function F(){}var J=(Q.createDomEvent=function(e){var t=null;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},Q.disableStorage=function(){Q._canUseLocalStorage=!1,Q._canUseSessionStorage=!1},Q._getLocalStorageObject=function(){return Q.canUseLocalStorage()?Q._getVerifiedStorageObject(i.LocalStorage):null},Q._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},Q.isInternalApplicationInsightsEndpoint=function(e){return-1!==Q._internalEndpoints.indexOf(e.toLowerCase())},Q.canUseLocalStorage=function(){return void 0===Q._canUseLocalStorage&&(Q._canUseLocalStorage=!!Q._getVerifiedStorageObject(i.LocalStorage)),Q._canUseLocalStorage},Q.getStorage=function(t,e){var n=Q._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,h,"Browser failed read of local storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return null},Q.setStorage=function(t,e,n){var r=Q._getLocalStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,v,"Browser failed write to local storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.removeStorage=function(t,e){var n=Q._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){Q._canUseLocalStorage=!1,t.throwInternal(u.WARNING,y,"Browser failed removal of local storage item. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q._getSessionStorageObject=function(){return Q.canUseSessionStorage()?Q._getVerifiedStorageObject(i.SessionStorage):null},Q.canUseSessionStorage=function(){return void 0===Q._canUseSessionStorage&&(Q._canUseSessionStorage=!!Q._getVerifiedStorageObject(i.SessionStorage)),Q._canUseSessionStorage},Q.getSessionStorageKeys=function(){var e=[];if(Q.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},Q.getSessionStorage=function(t,e){var n=Q._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,m,"Browser failed read of session storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return null},Q.setSessionStorage=function(t,e,n){var r=Q._getSessionStorageObject();if(null!==r)try{return r.setItem(e,n),!0}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,w,"Browser failed write to session storage. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.removeSessionStorage=function(t,e){var n=Q._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){Q._canUseSessionStorage=!1,t.throwInternal(u.WARNING,S,"Browser failed removal of session storage item. "+Q.getExceptionName(e),{exception:Q.dump(e)})}return!1},Q.disableCookies=function(){g.disableCookies()},Q.canUseCookies=function(t){if(void 0===g._canUseCookies){g._canUseCookies=!1;try{g._canUseCookies=void 0!==Q.document.cookie}catch(e){t.throwInternal(u.WARNING,W,"Cannot access document.cookie - "+Q.getExceptionName(e),{exception:Q.dump(e)})}}return g._canUseCookies},Q.setCookie=function(e,t,n,r){var i="",a="";r&&(i=";domain="+r),Q.document.location&&"https:"===Q.document.location.protocol&&(a=";secure"),Q.canUseCookies(e)&&(Q.document.cookie=t+"="+n+i+";path=/"+a)},Q.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},Q.getCookie=function(e,t){if(Q.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=Q.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=Q.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},Q.deleteCookie=function(e,t){Q.canUseCookies(e)&&(Q.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Q.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},Q.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},Q.random32=function(){return 4294967296*Math.random()|0},Q.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=Q.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},Q.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},Q.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},Q.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},Q.toISOStringForIE8=function(e){if(Q.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"}},Q.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},Q.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},Q.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},Q.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},Q.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},Q.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},Q.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},Q.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},Q.document="undefined"!=typeof document?document:{},Q._canUseLocalStorage=void 0,Q._canUseSessionStorage=void 0,Q._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Q.NotSpecified="not_specified",Q);function Q(){}var Y=($.parseUrl=function(e){return $.htmlAnchorElement||($.htmlAnchorElement=$.document.createElement?$.document.createElement("a"):{host:$.parseHost(e)}),$.htmlAnchorElement.href=e,$.htmlAnchorElement},$.getAbsoluteUrl=function(e){var t,n=$.parseUrl(e);return n&&(t=n.href),t},$.getPathName=function(e){var t,n=$.parseUrl(e);return n&&(t=n.pathname),t},$.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},$.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},$.document="undefined"!=typeof document?document:{},$);function $(){}var Z=(ee.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=Y.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=K.sanitizeString(e,n?n+" "+c:c)}else a=K.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},ee);function ee(){}var te=(ne.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()},ne.GetDuration=function(e,t){var n=null;return 0===e||0===t||g.isNullOrUndefined(e)||g.isNullOrUndefined(t)||(n=t-e),n},ne);function ne(){}var re,ie=(t(ae,re=function(){}),ae);function ae(){return re.call(this)||this}var oe;t(se,oe=function(){this.ver=1,this.sampleRate=100,this.tags={}});function se(e,t,n){var r=oe.call(this)||this;return r.name=K.sanitizeString(e,n)||J.NotSpecified,r.data=t,r.time=J.toISOStringForIE8(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100==r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}function ce(){}var le,ue=(t(pe,le=ce),pe);function pe(){var e=le.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ge,fe=(t(de,ge=ue),de.envelopeType="Microsoft.ApplicationInsights.{0}.Event",de.dataType="EventData",de);function de(e,t,n,r){var i=ge.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=K.sanitizeString(e,t)||J.NotSpecified,i.properties=K.sanitizeProperties(e,n),i.measurements=K.sanitizeMeasurements(e,r),i}function he(){}var me,ve=(t(we,me=ce),we);function we(){var e=me.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}function ye(){this.hasFullStack=!0,this.parsedStack=[]}var Se,_e=(t(Ie,Se=ve),Ie.CreateFromInterface=function(t,e){var n=e.exceptions&&e.exceptions.map(function(e){return Ne.CreateFromInterface(t,e)});return new Ie(t,c({},e,{exceptions:n}))},Ie.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}},Ie.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Ie.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Ie.dataType="ExceptionData",Ie);function Ie(e,t,n,r,i,a){var o=Se.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ne(e,t)],o.properties=K.sanitizeProperties(e,n),o.measurements=K.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 Te,Ne=(t(Ee,Te=ye),Ee.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}},Ee.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&t.parsedStack.map(function(e){return De.CreateFromInterface(e)})||t.parsedStack;return new Ee(e,c({},t,{parsedStack:n}))},Ee.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(De.regex.test(o)){var s=new De(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},Ee);function Ee(e,t){var n=Te.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=K.sanitizeString(e,t.name)||J.NotSpecified,n.message=K.sanitizeMessage(e,t.message)||J.NotSpecified;var r=t.stack;n.parsedStack=Ee.parseStack(r),n.stack=K.sanitizeException(e,r),n.hasFullStack=J.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 ke,De=(t(xe,ke=he),xe.CreateFromInterface=function(e){return new xe(e,null)},xe.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},xe.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,xe.baseSize=58,xe);function xe(e,t){var n=ke.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=J.trim(r),n.fileName="",n.line=0;var i=r.match(xe.regex);i&&5<=i.length&&(n.method=J.trim(i[2])||n.method,n.fileName=J.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+=xe.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Pe,be,Ae,Ce=(t(Me,Pe=ce),Me);function Me(){var e=Pe.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}(Ae=be=be||{})[Ae.Measurement=0]="Measurement",Ae[Ae.Aggregation=1]="Aggregation";var Re,Ue=(t(Le,Re=function(){this.kind=be.Measurement}),Le);function Le(){var e=null!==Re&&Re.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Ve,Oe=(t(ze,Ve=Ce),ze.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",ze.dataType="MetricData",ze);function ze(e,t,n,r,i,a,o){var s=Ve.call(this)||this;s.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var c=new Ue;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=K.sanitizeString(e,t)||J.NotSpecified,c.value=n,s.metrics=[c],s.properties=K.sanitizeProperties(e,o),s}var Ge,qe=(t(je,Ge=ue),je);function je(){var e=Ge.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Be,We=(t(He,Be=qe),He.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",He.dataType="PageviewData",He);function He(e,t,n,r,i,a,o){var s=Be.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=K.sanitizeId(e,o),s.url=K.sanitizeUrl(e,n),s.name=K.sanitizeString(e,t)||J.NotSpecified,isNaN(r)||(s.duration=J.msToTimeSpan(r)),s.properties=K.sanitizeProperties(e,i),s.measurements=K.sanitizeMeasurements(e,a),s}var Xe,Ke=(t(Fe,Xe=ce),Fe);function Fe(){var e=Xe.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Je,Qe=(t(Ye,Je=Ke),Ye.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ye.dataType="RemoteDependencyData",Ye);function Ye(e,t,n,r,i,a,o,s,c,l,u,p){void 0===c&&(c="Ajax");var g=Je.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=J.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=K.sanitizeString(e,c);var f=Z.ParseDependencyPath(e,n,s,r);return g.data=K.sanitizeUrl(e,r)||f.data,g.target=K.sanitizeString(e,f.target),l&&(g.target=g.target+" | "+l),g.name=K.sanitizeString(e,f.name),g.properties=K.sanitizeProperties(e,u),g.measurements=K.sanitizeMeasurements(e,p),g}var $e,Ze=(t(et,$e=ce),et);function et(){var e=$e.call(this)||this;return e.ver=2,e.properties={},e}var tt,nt=(t(rt,tt=Ze),rt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",rt.dataType="MessageData",rt);function rt(e,t,n,r){var i=tt.call(this)||this;return i.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||J.NotSpecified,i.message=K.sanitizeMessage(e,t),i.properties=K.sanitizeProperties(e,r),n&&(i.severityLevel=n),i}var it,at=(t(ot,it=qe),ot);function ot(){var e=it.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var st,ct=(t(lt,st=at),lt.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",lt.dataType="PageviewPerformanceData",lt);function lt(e,t,n,r,i,a,o){var s=st.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=K.sanitizeUrl(e,n),s.name=K.sanitizeString(e,t)||J.NotSpecified,s.properties=K.sanitizeProperties(e,i),s.measurements=K.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 ut,pt,gt;t(ft,ut=ie);function ft(e,t){var n=ut.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(gt=pt=pt||{})[gt.Verbose=0]="Verbose",gt[gt.Information=1]="Information",gt[gt.Warning=2]="Warning",gt[gt.Error=3]="Error",gt[gt.Critical=4]="Critical";var dt=(ht.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},ht);function ht(){}var mt=(vt.create=function(e,t,n,r,i,a){if(n=K.sanitizeString(r,n)||J.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},vt);function vt(){}var wt=(yt.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,N,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var o=!1,s=void 0,c=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=te.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||{}).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<te.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,C,"trackPageView failed on page load calculation: "+J.getExceptionName(e),{exception:J.dump(e)})}},100)},yt);function yt(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 St=(_t.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: "+J.dump(e))}},_t.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: "+J.dump(e)),null}},_t.prototype.startPageVisitTimer=function(e,t){try{if(J.canUseSessionStorage()){if(null!=J.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new It(e,t),r=JSON.stringify(n);J.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+J.dump(e))}},_t.prototype.stopPageVisitTimer=function(){try{if(J.canUseSessionStorage()){var e=Date.now(),t=J.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,J.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+J.dump(e)),null}},_t);function _t(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var It=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},Tt=(Nt.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceTiming();if(t){var n=te.GetDuration(t.navigationStart,t.loadEventEnd),r=te.GetDuration(t.navigationStart,t.connectEnd),i=te.GetDuration(t.requestStart,t.responseStart),a=te.GetDuration(t.responseStart,t.responseEnd),o=te.GetDuration(t.responseEnd,t.loadEventEnd);0==n?this._logger.throwInternal(u.WARNING,I,"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,_,"client performance math error.",{total:n,network:r,request:i,response:a,dom:o}):(e.durationMs=n,e.perfTotal=e.duration=J.msToTimeSpan(n),e.networkConnect=J.msToTimeSpan(r),e.sentRequest=J.msToTimeSpan(i),e.receivedResponse=J.msToTimeSpan(a),e.domProcessing=J.msToTimeSpan(o),e.isValid=!0):this._logger.throwInternal(u.WARNING,R,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:r,request:i,response:a,dom:o})}},Nt.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?window.performance.timing:null},Nt.prototype.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},Nt.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},Nt.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},Nt);function Nt(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Et="duration",kt=(Dt.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=J.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=J.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=J.stringToBoolOrDefault(e.overridePageViewDuration),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=J.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=J.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=J.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=J.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Dt.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,j,"One of telemetry initializers failed, telemetry item will not be sent: "+J.getExceptionName(e),{exception:J.dump(e)},!0)}}t||g.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},Dt.prototype.setNextPlugin=function(e){this._nextPlugin=e},Dt.prototype.trackEvent=function(e,t){try{var n=mt.create(e,fe.dataType,fe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,M,"trackTrace failed, trace will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(u.CRITICAL,E,"startTrackEvent failed, event will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(u.CRITICAL,k,"stopTrackEvent failed, event will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackTrace=function(e,t){try{var n=mt.create(e,nt.dataType,nt.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.WARNING,M,"trackTrace failed, trace will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackMetric=function(e,t){try{var n=mt.create(e,Oe.dataType,Oe.envelopeType,this._logger,t);this.core.track(n)}catch(e){this._logger.throwInternal(u.CRITICAL,b,"trackMetric failed, metric will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(e){this._logger.throwInternal(u.CRITICAL,A,"trackPageView failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.sendPageViewInternal=function(e,t,n){"undefined"!=typeof document&&(e.refUri=void 0===e.refUri?document.referrer:e.refUri);var r=mt.create(e,We.dataType,We.envelopeType,this._logger,t,n);this.core.track(r),this._trackAjaxAttempts=0},Dt.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=mt.create(e,ct.dataType,ct.envelopeType,this._logger,t,n);this.core.track(r)},Dt.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,A,"trackPageViewPerformance failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.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,D,"startTrackPage failed, page view may not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.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,x,"stopTrackPage failed, page view will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype.sendExceptionInternal=function(e,t,n){var r=new _e(this._logger,e.exception||new Error(J.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=mt.create(r,_e.dataType,_e.envelopeType,this._logger,t,n);this.core.track(i)},Dt.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this._logger.throwInternal(u.CRITICAL,P,"trackException failed, exception will not be collected: "+J.getExceptionName(e),{exception:J.dump(e)})}},Dt.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(J.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!J.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:pt.Error},e)}}catch(e){var r=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(u.CRITICAL,T,"_onError threw exception while logging error, error will not be collected: "+J.getExceptionName(e),{exception:J.dump(e),errorString:r})}},Dt.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Dt.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=Dt.getDefaultConfig();if(void 0!==r){for(var i in r)this.config[i]=dt.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&&J.disableCookies(),this.config.isStorageUseDisabled&&J.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 Tt(this.core),this._pageViewManager=new wt(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new St(this._logger,function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new xt(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Et]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new xt(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){g.isNullOrUndefined(r)&&(r={}),r[Et]=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&&"undefined"!=typeof Event){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(J.createDomEvent(p.config.namePrefix+"pushState")),window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"locationchange")),e}),history.replaceState=(s=history.replaceState,function(){var e=s.apply(this,arguments);return window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"replaceState")),window.dispatchEvent(J.createDomEvent(p.config.namePrefix+"locationchange")),e}),window.addEventListener(p.config.namePrefix+"popstate",function(){window.dispatchEvent(J.createDomEvent(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=J.generateW3CId(),p._properties.context.telemetryTrace.name=window.location&&window.location.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=window.location&&window.location.href||"",setTimeout(function(e){p.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),p.autoRoutePVDelay)})}this._isInitialized=!0}},Dt.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)},Dt.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===Qe.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})}},Dt.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Dt.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=mt.create(t,_e.dataType,_e.envelopeType,this._logger,{url:e});this.core.track(n)},Dt.Version="2.2.2",Dt);function Dt(){this.identifier="ApplicationInsightsAnalytics",this.priority=180,this.autoRoutePVDelay=500,this._isInitialized=!1,this._trackAjaxAttempts=0,this._prevUri="object"==typeof window&&window.location&&window.location.href||"",this.initialize=this._initialize.bind(this)}var xt=(Pt.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(u.WARNING,G,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Pt.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(u.WARNING,q,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=te.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=void 0},Pt);function Pt(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=kt,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map |
{ | ||
"name": "@microsoft/applicationinsights-analytics-js", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Microsoft Application Insights Javascript SDK apis", | ||
@@ -20,3 +20,3 @@ "main": "dist/applicationinsights-analytics-js.js", | ||
"devDependencies": { | ||
"@microsoft/applicationinsights-properties-js": "2.2.1", | ||
"@microsoft/applicationinsights-properties-js": "2.2.2", | ||
"typescript": "2.5.3", | ||
@@ -33,4 +33,4 @@ "rollup-plugin-node-resolve": "^3.4.0", | ||
"dependencies": { | ||
"@microsoft/applicationinsights-core-js": "2.2.1", | ||
"@microsoft/applicationinsights-common": "2.2.1", | ||
"@microsoft/applicationinsights-core-js": "2.2.2", | ||
"@microsoft/applicationinsights-common": "2.2.2", | ||
"tslib": "^1.9.3" | ||
@@ -37,0 +37,0 @@ }, |
@@ -34,3 +34,3 @@ /** | ||
export class ApplicationInsights implements IAppInsights, ITelemetryPlugin, IAppInsightsInternal { | ||
public static Version = "2.2.1"; // Not currently used anywhere | ||
public static Version = "2.2.2"; // Not currently used anywhere | ||
public initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[]) => void; | ||
@@ -37,0 +37,0 @@ public identifier: string = "ApplicationInsightsAnalytics"; // do not change name or priority |
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
1473907
+ Added@microsoft/applicationinsights-common@2.2.2(transitive)
+ Added@microsoft/applicationinsights-core-js@2.2.2(transitive)
- Removed@microsoft/applicationinsights-common@2.2.1(transitive)
- Removed@microsoft/applicationinsights-core-js@2.2.1(transitive)