Socket
Socket
Sign inDemoInstall

@microsoft/applicationinsights-web-basic

Package Overview
Dependencies
Maintainers
5
Versions
564
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/applicationinsights-web-basic - npm Package Compare versions

Comparing version 1.0.0-beta.12 to 1.0.0-beta.14

browser/aib.1.0.0-beta.14.js

4

browser/aib.1.min.js
/*!
* Application Insights JavaScript Web SDK - Basic, 1.0.0-beta.12
* Application Insights JavaScript Web SDK - Basic, 1.0.0-beta.14
* 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={})}(this,function(e){"use strict";var g,t,n=2,h=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(i,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),i=/[xy]/g,c=function(){function e(){this.listeners=[]}return e.prototype.addNotificationListener=function(e){this.listeners.push(e)},e.prototype.removeNotificationListener=function(e){for(var t=this.listeners.indexOf(e);-1<t;)this.listeners.splice(t,1),t=this.listeners.indexOf(e)},e.prototype.eventsSent=function(t){for(var n=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},e.prototype.eventsDiscarded=function(t,n){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(t,n)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},e}();(t=g||(g={}))[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING";var r=1,o=2,a=3,u=4,l=5,f=6,s=7,m=8,v=10,d=12,p=22,y=23,_=24,I=26,S=28,w=40,E=41,b=42,N=43,x=45,T=46,A=47,C=48,D=49,R=50,L=52,M=54,U=56,O=57,P=61,V=66,z=67,k=68,q=69,B=function(){function o(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?o.AiUserActionablePrefix:o.AiNonUserActionablePrefix)+e;var r=(t?" message:"+o.sanitizeDiagnosticText(t):"")+(i?" props:"+o.sanitizeDiagnosticText(JSON.stringify(i)):"");this.message+=r}return o.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},o.dataType="MessageData",o.AiNonUserActionablePrefix="AI (Internal): ",o.AiUserActionablePrefix="AI: ",o}(),F=function(){function e(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},h.isNullOrUndefined(e)||(h.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),h.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),h.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),h.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}return e.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1);var o=new B(t,n,r,i);if(this.enableDebugExceptions())throw o;if(void 0!==o&&o&&void 0!==o.message){if(r){var a=+o.messageId;(!this._messageLogged[a]||this.consoleLoggingLevel()>=g.WARNING)&&(this.warnToConsole(o.message),this._messageLogged[a]=!0)}else this.consoleLoggingLevel()>=g.WARNING&&this.warnToConsole(o.message);this.logInternalMessage(e,o)}},e.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},e.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},e.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,i=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[i]?n=!1:this._messageLogged[i]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var r="Internal events throttle limit per PageView reached for this app.",o=new B(y,r,!1);this.queue.push(o),this.warnToConsole(r)}}},e.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},e}(),G=function(){function e(){this._isInitialized=!1,this._extensions=new Array,this._channelController=new X}return e.prototype.initialize=function(e,t){var n=this;if(this._isInitialized)throw Error("Core should not be initialized more than once");if(!e||h.isNullOrUndefined(e.instrumentationKey))throw Error("Please provide instrumentation key");if(this.config=e,this._notificationManager=new c,this.config.extensions=h.isNullOrUndefined(this.config.extensions)?[]:this.config.extensions,this.config.extensionConfig=h.isNullOrUndefined(this.config.extensionConfig)?{}:this.config.extensionConfig,this.config.extensionConfig.NotificationManager=this._notificationManager,this.logger=new F(e),t.forEach(function(e){if(h.isNullOrUndefined(e.initialize))throw Error(H)}),0<this.config.extensions.length){var i=!0;if(this.config.extensions.forEach(function(e){h.isNullOrUndefined(e)&&(i=!1)}),!i)throw Error(H)}(o=this._extensions).push.apply(o,[this._channelController].concat(t,this.config.extensions)),this._extensions=this._extensions.sort(function(e,t){var n=e,i=t,r=typeof n.processTelemetry,o=typeof i.processTelemetry;return"function"===r&&"function"===o?n.priority-i.priority:"function"===r&&"function"!==o?1:"function"!==r&&"function"===o?-1:void 0});var r={};this._extensions.forEach(function(e){var t=e;t&&t.priority&&(h.isNullOrUndefined(r[t.priority])?r[t.priority]=t.identifier:n.logger.warnToConsole("Two extensions have same priority"+r[t.priority]+", "+t.identifier))});for(var o,a=-1,s=0;s<this._extensions.length-1;s++){var u=this._extensions[s];if(!u||"function"==typeof u.processTelemetry){if(u.priority===j){a=s+1;break}this._extensions[s].setNextPlugin(this._extensions[s+1])}}if(this._channelController.initialize(this.config,this,this._extensions),this._extensions.forEach(function(e){e&&e.priority<j&&e.initialize(n.config,n,n._extensions)}),a<this._extensions.length&&this._extensions.splice(a),0===this.getTransmissionControls().length)throw new Error("No channels available");this._isInitialized=!0},e.prototype.getTransmissionControls=function(){return this._channelController.ChannelControls},e.prototype.track=function(e){if(null===e)throw this._notifiyInvalidEvent(e),Error("Invalid telemetry item");if(e.baseData&&!e.baseType)throw this._notifiyInvalidEvent(e),Error("Provide data.baseType for data.baseData");e.baseType||(e.baseType="EventData"),e.instrumentationKey||(e.instrumentationKey=this.config.instrumentationKey),e.timestamp||(e.timestamp=new Date),this._validateTelmetryItem(e);for(var t=0;t<this._extensions.length;){if(this._extensions[t].processTelemetry){this._extensions[t].processTelemetry(e);break}t++}},e.prototype.addNotificationListener=function(e){this._notificationManager.addNotificationListener(e)},e.prototype.removeNotificationListener=function(e){this._notificationManager.removeNotificationListener(e)},e.prototype.pollInternalLogs=function(){var n=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var e=n.logger.queue;e.forEach(function(e){var t={name:"InternalMessageId: "+e.messageId,instrumentationKey:n.config.instrumentationKey,timestamp:new Date,baseType:B.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},e.prototype._validateTelmetryItem=function(e){if(h.isNullOrUndefined(e.name))throw this._notifiyInvalidEvent(e),Error("telemetry name required");if(h.isNullOrUndefined(e.timestamp))throw this._notifiyInvalidEvent(e),Error("telemetry timestamp required");if(h.isNullOrUndefined(e.instrumentationKey))throw this._notifiyInvalidEvent(e),Error("telemetry instrumentationKey required")},e.prototype._notifiyInvalidEvent=function(e){this._notificationManager.eventsDiscarded([e],n)},e}(),X=function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=j}return e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,r){var o=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);o.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<r.length;t++){var a=r[t];a.priority>j&&e.push(a)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}},e}(),H="Extensions must provide callback to initialize",j=200,K=function(e,t){return(K=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 W(e,t){function n(){this.constructor=e}K(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Y,J,Z,Q,$=function(){return($=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};(J=Y||(Y={}))[J.LocalStorage=0]="LocalStorage",J[J.SessionStorage=1]="SessionStorage",(Q=Z||(Z={}))[Q.Default=0]="Default",Q[Q.Required=1]="Required",Q[Q.Array=2]="Array",Q[Q.Hidden=4]="Hidden";var ee,te,ne=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),ie=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=s.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(o);r=a}return r},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(g.WARNING,O,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(g.WARNING,P,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,V)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(g.WARNING,U,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(g.WARNING,L,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,q).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(g.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),re=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(Y.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;n=new Date,(i=e===Y.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=i.getItem(n)!=n,i.removeItem(n),t&&(i=null)}catch(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(Y.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,r,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,a,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,l,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(Y.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(Y.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,o,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,u,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,f,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(g.WARNING,k,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",o="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(o=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+o)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=s.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=s.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.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"}},s.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},s.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i,(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},s.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},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.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},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),oe=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},i.getAbsoluteUrl=function(e){var t,n=i.parseUrl(e);return n&&(t=n.href),t},i.getPathName=function(e){var t,n=i.parseUrl(e);return n&&(t=n.pathname),t},i.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},i.document="undefined"!=typeof document?document:{},i}(),ae=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,o;if(t&&0<t.length){var a=oe.parseUrl(t);if(r=a.host,null!=a.pathname)"/"!==(i=0===a.pathname.length?"/":a.pathname).charAt(0)&&(i="/"+i),o=ie.sanitizeString(e,n?n+" "+i:i);else o=ie.sanitizeString(e,t)}else o=r=i;return{target:r,name:o}},e}(),se=(function(){function e(){}e.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()},e.GetDuration=function(e,t){var n=null;return 0===e||0===t||h.isNullOrUndefined(e)||h.isNullOrUndefined(t)||(n=t-e),n}}(),"sampleRate"),ue="ProcessLegacy",ce=function(e){function t(){return e.call(this)||this}return W(t,e),t}(function(){}),le=function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=ie.sanitizeString(e,n)||re.NotSpecified,i.data=t,i.time=re.toISOStringForIE8(new Date),i.aiDataContract={time:Z.Required,iKey:Z.Required,name:Z.Required,sampleRate:function(){return 100==i.sampleRate?Z.Hidden:Z.Required},tags:Z.Required,data:Z.Required},i}return W(e,r),e}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),fe=function(){},de=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return W(e,t),e}(fe),pe=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:Z.Required,name:Z.Required,properties:Z.Default,measurements:Z.Default},r.name=ie.sanitizeString(e,t)||re.NotSpecified,r.properties=ie.sanitizeProperties(e,n),r.measurements=ie.sanitizeMeasurements(e,i),r}return W(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(de),he=function(){},ge=function(){this.hasFullStack=!0,this.parsedStack=[]},me=function(a){function e(e,t,n,i,r){var o=a.call(this)||this;return o.aiDataContract={ver:Z.Required,exceptions:Z.Required,severityLevel:Z.Default,properties:Z.Default,measurements:Z.Default},o.properties=ie.sanitizeProperties(e,n),o.measurements=ie.sanitizeMeasurements(e,i),o.exceptions=[new ve(e,t)],r&&(o.severityLevel=r),o}return W(e,a),e.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return W(e,t),e}(fe)),ve=function(r){function e(e,t){var n=r.call(this)||this;n.aiDataContract={id:Z.Default,outerId:Z.Default,typeName:Z.Required,message:Z.Required,hasFullStack:Z.Default,stack:Z.Default,parsedStack:Z.Array},n.typeName=ie.sanitizeString(e,t.name)||re.NotSpecified,n.message=ie.sanitizeMessage(e,t.message)||re.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=ie.sanitizeException(e,i),n.hasFullStack=re.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return W(e,r),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(ye.regex.test(a)){var s=new ye(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var u=0,c=t.length-1,l=0,f=u,d=c;u<c;){if(32768<(l+=t[u].sizeInBytes+t[c].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=u,d=c,u++,c--}}return t},e}(ge),ye=function(r){function o(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:Z.Required,method:Z.Required,assembly:Z.Default,fileName:Z.Default,line:Z.Default},n.level=t,n.method="<no_method>",n.assembly=re.trim(e);var i=e.match(o.regex);return i&&5<=i.length&&(n.method=re.trim(i[2])||n.method,n.fileName=re.trim(i[4]),n.line=parseInt(i[5])||0),n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=o.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return W(o,r),o.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}(he),_e=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return W(e,t),e}(fe);(te=ee||(ee={}))[te.Measurement=0]="Measurement",te[te.Aggregation=1]="Aggregation";var Ie,Se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:Z.Required,kind:Z.Default,value:Z.Required,count:Z.Default,min:Z.Default,max:Z.Default,stdDev:Z.Default},e}return W(e,t),e}(function(){this.kind=ee.Measurement}),we=function(c){function e(e,t,n,i,r,o,a){var s=c.call(this)||this;s.aiDataContract={ver:Z.Required,metrics:Z.Required,properties:Z.Default};var u=new Se;return u.count=0<i?i:void 0,u.max=isNaN(o)||null===o?void 0:o,u.min=isNaN(r)||null===r?void 0:r,u.name=ie.sanitizeString(e,t)||re.NotSpecified,u.value=n,s.metrics=[u],s.properties=ie.sanitizeProperties(e,a),s}return W(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(_e),Ee=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return W(e,t),e}(de),be=function(u){function e(e,t,n,i,r,o,a){var s=u.call(this)||this;return s.aiDataContract={ver:Z.Required,name:Z.Default,url:Z.Default,duration:Z.Default,properties:Z.Default,measurements:Z.Default,id:Z.Default},s.id=ie.sanitizeId(e,a),s.url=ie.sanitizeUrl(e,n),s.name=ie.sanitizeString(e,t)||re.NotSpecified,isNaN(i)||(s.duration=re.msToTimeSpan(i)),s.properties=ie.sanitizeProperties(e,r),s.measurements=ie.sanitizeMeasurements(e,o),s}return W(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Ee),Ne=function(d){function e(e,t,n,i,r,o,a,s,u,c){var l=d.call(this)||this;l.aiDataContract={id:Z.Required,ver:Z.Required,name:Z.Default,resultCode:Z.Default,duration:Z.Default,success:Z.Default,data:Z.Default,target:Z.Default,type:Z.Default,properties:Z.Default,measurements:Z.Default,kind:Z.Default,value:Z.Default,count:Z.Default,min:Z.Default,max:Z.Default,stdDev:Z.Default,dependencyKind:Z.Default,dependencySource:Z.Default,commandName:Z.Default,dependencyTypeName:Z.Default},l.id=t,l.duration=re.msToTimeSpan(r),l.success=o,l.resultCode=a+"",l.type="Ajax",l.data=ie.sanitizeUrl(e,i);var f=ae.ParseDependencyPath(e,n,s,i);return l.target=f.target,l.name=f.name,l.properties=ie.sanitizeProperties(e,u),l.measurements=ie.sanitizeMeasurements(e,c),l}return W(e,d),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return W(e,t),e}(fe)),xe=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:Z.Required,message:Z.Required,severityLevel:Z.Default,properties:Z.Default},t=t||re.NotSpecified,r.message=ie.sanitizeMessage(e,t),r.properties=ie.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return W(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return W(e,t),e}(fe)),Te=function(p){function h(e,t,n,i,r,o){var a=p.call(this)||this;a.aiDataContract={ver:Z.Required,name:Z.Default,url:Z.Default,duration:Z.Default,perfTotal:Z.Default,networkConnect:Z.Default,sentRequest:Z.Default,receivedResponse:Z.Default,domProcessing:Z.Default,properties:Z.Default,measurements:Z.Default},a.isValid=!1;var s=h.getPerformanceTiming();if(s){var u=h.getDuration(s.navigationStart,s.loadEventEnd),c=h.getDuration(s.navigationStart,s.connectEnd),l=h.getDuration(s.requestStart,s.responseStart),f=h.getDuration(s.responseStart,s.responseEnd),d=h.getDuration(s.responseEnd,s.loadEventEnd);0==u?e.throwInternal(g.WARNING,v,"error calculating page view performance.",{total:u,network:c,request:l,response:f,dom:d}):h.shouldCollectDuration(u,c,l,f,d)?u<Math.floor(c)+Math.floor(l)+Math.floor(f)+Math.floor(d)?e.throwInternal(g.WARNING,m,"client performance math error.",{total:u,network:c,request:l,response:f,dom:d}):(a.durationMs=u,a.perfTotal=a.duration=re.msToTimeSpan(u),a.networkConnect=re.msToTimeSpan(c),a.sentRequest=re.msToTimeSpan(l),a.receivedResponse=re.msToTimeSpan(f),a.domProcessing=re.msToTimeSpan(d),a.isValid=!0):e.throwInternal(g.WARNING,x,"Invalid page load duration value. Browser perf data won't be sent.",{total:u,network:c,request:l,response:f,dom:d})}return a.url=ie.sanitizeUrl(e,n),a.name=ie.sanitizeString(e,t)||re.NotSpecified,a.properties=ie.sanitizeProperties(e,r),a.measurements=ie.sanitizeMeasurements(e,o),a}return W(h,p),h.prototype.getIsValid=function(){return this.isValid},h.prototype.getDurationMs=function(){return this.durationMs},h.getPerformanceTiming=function(){return h.isPerformanceTimingSupported()?window.performance.timing:null},h.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},h.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},h.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},h.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],i=navigator.userAgent,r=!1;if(i)for(var o=0;o<n.length;o++)r=r||-1!==i.toLowerCase().indexOf(n[o]);if(r)return!1;for(var a=0;a<e.length;a++)if(e[a]>=h.MAX_DURATION_ALLOWED)return!1;return!0},h.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",h.dataType="PageviewPerformanceData",h.MAX_DURATION_ALLOWED=36e5,h}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return W(e,t),e}(Ee)),Ae=function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:Z.Required,baseData:Z.Required},n.baseType=e,n.baseData=t,n}return W(e,i),e}(ce);(Ie=e.SeverityLevel||(e.SeverityLevel={}))[Ie.Verbose=0]="Verbose",Ie[Ie.Information=1]="Information",Ie[Ie.Warning=2]="Warning",Ie[Ie.Error=3]="Error",Ie[Ie.Critical=4]="Critical";var Ce=function(){function e(){}return e.getConfig=function(e,t,n,i){var r;return void 0===i&&(i=!1),r=n&&e.extensionConfig&&e.extensionConfig[n]&&!h.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],h.isNullOrUndefined(r)?i:r},e}(),De=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},Re=function(){function e(){}return e.domain="domain",e.browser="web.browser",e.browserVer="web.browserVer",e.browserLang="web.browserLang",e.userConsent="web.userConsent",e.isManual="web.isManual",e.screenRes="web.screenRes",e}(),Le=function(){function e(){}return e.localId="device.localId",e.model="device.model",e.deviceType="device.class",e}(),Me=function(){function e(){}return e.sessionId="app.sesId",e}(),Ue=function(){function e(){}return e.id="user.id",e.authId="authId",e.localId="localId",e}(),Oe=function(){function e(){}return e.clientIp="ingest.clientIp",e}(),Pe=function(){function e(){}return e.deviceOS="os.name",e}(),Ve=function(){function e(){}return e.sessionIsFirst="ai.session.isFirst",e.sessionIsNew="ai.session.isNew",e.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",e.userStoreRegion="ai.user.storeRegion",e.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",e.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",e.cloudName="ai.cloud.name",e.cloudRole="ai.cloud.role",e.cloudRoleVer="ai.cloud.roleVer",e.cloudRoleInstance="ai.cloud.roleInstance",e.cloudEnvironment="ai.cloud.environment",e.cloudLocation="ai.cloud.location",e.cloudDeploymentUnit="ai.cloud.deploymentUnit",e.internalNodeName="ai.internal.nodeName",e.internalSdkVersion="ai.internal.sdkVersion",e.internalAgentVersion="ai.internal.agentVersion",e.deviceOEMName="ai.device.oemName",e.deviceNetwork="ai.device.network",e.applicationVersion="ai.application.ver",e.applicationBuild="ai.application.build",e.deviceLocale="ai.device.locale",e.deviceOSVersion="ai.device.osVersion",e.locationIp="ai.location.ip",e.operationId="ai.operation.id",e.operationParentId="ai.operation.parentId",e.operationRootId="ai.operation.rootId",e.operationSyntheticSource="ai.operation.syntheticSource",e}(),ze=new De,ke=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}(),qe=function(){function r(e,t){this._bufferFullMessageSent=!1,this._logger=e,this._config=t;var n=this.getBuffer(r.BUFFER_KEY),i=this.getBuffer(r.SENT_BUFFER_KEY);this._buffer=n.concat(i),this._buffer.length>r.MAX_BUFFER_SIZE&&(this._buffer.length=r.MAX_BUFFER_SIZE),this.setBuffer(r.SENT_BUFFER_KEY,[]),this.setBuffer(r.BUFFER_KEY,this._buffer)}return r.prototype.enqueue=function(e){this._buffer.length>=r.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(g.WARNING,z,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(r.BUFFER_KEY,this._buffer))},r.prototype.count=function(){return this._buffer.length},r.prototype.clear=function(){this._buffer.length=0,this.setBuffer(r.BUFFER_KEY,[]),this.setBuffer(r.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},r.prototype.getItems=function(){return this._buffer.slice(0)},r.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},r.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(r.BUFFER_KEY,this._buffer);var t=this.getBuffer(r.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>r.MAX_BUFFER_SIZE&&(this._logger.throwInternal(g.CRITICAL,z,"Sent buffer reached its maximum size: "+t.length,!0),t.length=r.MAX_BUFFER_SIZE),this.setBuffer(r.SENT_BUFFER_KEY,t))},r.prototype.clearSent=function(e){var t=this.getBuffer(r.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(r.SENT_BUFFER_KEY,t)},r.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var r=!1;for(var o in e)if(e[o]===t[i]){r=!0;break}r||n.push(t[i])}return n},r.prototype.getBuffer=function(t){try{var e=re.getSessionStorage(this._logger,t);if(e){var n=JSON.parse(e);if(n)return n}}catch(e){this._logger.throwInternal(g.CRITICAL,b," storage key: "+t+", "+re.getExceptionName(e),{exception:re.dump(e)})}return[]},r.prototype.setBuffer=function(t,e){try{var n=JSON.stringify(e);re.setSessionStorage(this._logger,t,n)}catch(e){re.setSessionStorage(this._logger,t,JSON.stringify([])),this._logger.throwInternal(g.WARNING,E," storage key: "+t+", "+re.getExceptionName(e)+". Buffer cleared",{exception:re.dump(e)})}},r.BUFFER_KEY="AI_buffer",r.SENT_BUFFER_KEY="AI_sentBuffer",r.MAX_BUFFER_SIZE=2e3,r}(),Be=["ai.application.ver","ai.application.build","ai.application.typeId","ai.application.applicationId","ai.application.layer","ai.device.id","ai.device.ip","ai.device.language","ai.device.locale","ai.device.model","ai.device.friendlyName","ai.device.network","ai.device.networkName","ai.device.oemName","ai.device.os","ai.device.osVersion","ai.device.roleInstance","ai.device.roleName","ai.device.screenResolution","ai.device.type","ai.device.machineName","ai.device.vmName","ai.device.browser","ai.device.browserVersion","ai.location.ip","ai.location.country","ai.location.province","ai.location.city","ai.operation.id","ai.operation.name","ai.operation.parentId","ai.operation.rootId","ai.operation.syntheticSource","ai.operation.correlationVector","ai.session.id","ai.session.isFirst","ai.session.isNew","ai.user.accountAcquisitionDate","ai.user.accountId","ai.user.userAgent","ai.user.id","ai.user.storeRegion","ai.user.authUserId","ai.user.anonUserAcquisitionDate","ai.user.authUserAcquisitionDate","ai.cloud.name","ai.cloud.role","ai.cloud.roleVer","ai.cloud.roleInstance","ai.cloud.environment","ai.cloud.location","ai.cloud.deploymentUnit","ai.internal.sdkVersion","ai.internal.agentVersion","ai.internal.nodeName"],Fe=function(){function a(){}return a.extractProperties=function(e){var t=null;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];"number"!=typeof i&&(t||(t={}),t[n]=i)}return t},a.extractPropsAndMeasurements=function(e,t,n){if(!h.isNullOrUndefined(e))for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];"number"==typeof r?n[i]=r:t[i]=r}},a.createEnvelope=function(e,t,n,i){var r=new le(e,i,t);r.iKey=n.instrumentationKey;var o=n.instrumentationKey.replace(/-/g,"");return r.name=r.name.replace("{0}",o),a.extractPartAExtensions(n,r),n.tags||(n.tags=[]),r},a.extractPartAExtensions=function(e,n){var i=[];n.tags||(n.tags=[]),e.ctx||(e.ctx={}),e.tags||(e.tags=[]),e.tags[Ve.applicationVersion]&&(n.tags[ze.applicationVersion]=e.tags[Ve.applicationVersion],i.push(Ve.applicationVersion)),e.tags[Ve.applicationBuild]&&(n.tags[ze.applicationBuild]=e.tags[Ve.applicationBuild],i.push(Ve.applicationBuild)),e.ctx[Ue.authId]&&(n.tags[ze.userAuthUserId]=e.ctx[Ue.authId],i.push(Ue.authId)),e.ctx[Ue.localId]&&(n.tags[ze.userId]=e.ctx[Ue.localId],i.push(Ue.localId)),e.ctx[Me.sessionId]&&(n.tags[ze.sessionId]=e.ctx[Me.sessionId]),e.tags[ze.sessionIsFirst]&&(n.tags[ze.sessionIsFirst]=e.tags[ze.sessionIsFirst],i.push(ze.sessionIsFirst)),e.ctx[Le.localId]&&(n.tags[ze.deviceId]=e.ctx[Le.localId]),e.ctx[Oe.clientIp]&&(n.tags[ze.deviceIp]=e.ctx[Oe.clientIp],i.push(Oe.clientIp)),e.ctx[Re.browserLang]&&(n.tags[ze.deviceLanguage]=e.ctx[Re.browserLang]),e.tags[Ve.deviceLocale]&&(n.tags[ze.deviceLocale]=e.tags[Ve.deviceLocale],i.push(Ve.deviceLocale)),e.ctx[Le.model]&&(n.tags[ze.deviceModel]=e.ctx[Le.model]),e.ctx[Ve.deviceNetwork]&&(n.tags[ze.deviceNetwork]=e.ctx[Ve.deviceNetwork]),e.ctx[Ve.deviceOEMName]&&(n.tags[ze.deviceOEMName]=e.ctx[Ve.deviceOEMName]),e.tags[Ve.deviceOSVersion]&&(n.tags[ze.deviceOSVersion]=e.tags[Ve.deviceOSVersion],i.push(Ve.deviceOSVersion)),e.ctx[Pe.deviceOS]&&(n.tags[ze.deviceOS]=e.ctx[Pe.deviceOS]),e.ctx[Ve.deviceNetwork]&&(n.tags[ze.deviceNetwork]=e.ctx[Ve.deviceNetwork]),e.ctx[Le.deviceType]&&(n.tags[ze.deviceType]=e.ctx[Le.deviceType]),e.tags[Ve.deviceOSVersion]&&(n.tags[ze.deviceOSVersion]=e.tags[Ve.deviceOSVersion],i.push(Ve.deviceOSVersion)),e.tags[Re.screenRes]&&(n.tags[ze.deviceScreenResolution]=e.tags[Re.screenRes],i.push(Re.screenRes)),e.tags[se]&&(n.tags.sampleRate=e.tags[se],i.push(se)),e.tags[ze.locationIp]&&(n.tags[ze.locationIp]=e.tags[ze.locationIp],i.push(ze.locationIp)),e.tags[ze.internalSdkVersion]&&(n.tags[ze.internalSdkVersion]=e.tags[ze.internalSdkVersion],i.push(ze.internalSdkVersion)),e.tags[ze.internalAgentVersion]&&(n.tags[ze.internalAgentVersion]=e.tags[ze.internalAgentVersion],i.push(ze.internalAgentVersion)),e.tags[ze.operationRootId]&&(n.tags[ze.operationRootId]=e.tags[ze.operationRootId],i.push(ze.operationRootId)),e.tags[ze.operationSyntheticSource]&&(n.tags[ze.operationSyntheticSource]=e.tags[ze.operationSyntheticSource],i.push(ze.operationSyntheticSource)),e.tags[ze.operationParentId]&&(n.tags[ze.operationParentId]=e.tags[ze.operationParentId],i.push(ze.operationParentId)),e.tags[ze.operationName]&&(n.tags[ze.operationName]=e.tags[ze.operationName],i.push(ze.operationName)),e.tags[ze.operationId]&&(n.tags[ze.operationId]=e.tags[ze.operationId],i.push(ze.operationId)),e.tags.forEach(function(e){for(var t in e)e.hasOwnProperty(t)&&i.indexOf(e)<0&&0<=Be.indexOf(t)&&(n.tags[t]=e[t])})},a}(),Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n={},i={};Fe.extractPropsAndMeasurements(t.data,i,n);var r=t.baseData;if(h.isNullOrUndefined(r))return e.warnToConsole("Invalid input for dependency data"),null;var o=r.id,a=r.absoluteUrl,s=r.type,u=r.duration,c=r.success,l=r.responseCode,f=r.properties?r.properties["http.method"]:"GET",d=new Ne(e,o,a,s,u,c,l,f,i,n),p=new Ae(Ne.dataType,d);return Fe.createEnvelope(e,Ne.envelopeType,t,p)},t.DependencyEnvelopeCreator=new t,t}(Fe),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n={},i={};t.baseType!==pe.dataType&&Fe.extractPropsAndMeasurements(t.baseData,n,i),Fe.extractPropsAndMeasurements(t.data,n,i);var r=t.baseData.name,o=new pe(e,r,n,i),a=new Ae(pe.dataType,o);return Fe.createEnvelope(e,pe.envelopeType,t,a)},t.EventEnvelopeCreator=new t,t}(Fe),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties,i=t.baseData.measurements,r=t.baseData.error,o=t.baseData.severityLevel,a=new me(e,r,n,i,o),s=new Ae(me.dataType,a);return Fe.createEnvelope(e,me.envelopeType,t,s)},t.ExceptionEnvelopeCreator=new t,t}(Fe),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=Fe.extractProperties(t.data),i=t.baseData.name,r=t.baseData.average,o=t.baseData.sampleCount,a=t.baseData.min,s=t.baseData.max,u=new we(e,i,r,o,a,s,n),c=new Ae(we.dataType,u);return Fe.createEnvelope(e,we.envelopeType,t,c)},t.MetricEnvelopeCreator=new t,t}(Fe),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=void 0;h.isNullOrUndefined(t.baseData)||h.isNullOrUndefined(t.baseData.measurements)||(n=t.baseData.measurements.duration,delete t.baseData.measurements.duration);var i=t.baseData,r=i.name,o=i.uri,a=i.properties||{},s=i.measurements||{};if(h.isNullOrUndefined(i.refUri)||(a.refUri=i.refUri),h.isNullOrUndefined(i.pageType)||(a.pageType=i.pageType),h.isNullOrUndefined(i.isLoggedIn)||(a.isLoggedIn=i.isLoggedIn.toString()),!h.isNullOrUndefined(i.properties)){var u=i.properties;for(var c in u)u.hasOwnProperty(c)&&(a[c]=u[c])}var l=new be(e,r,o,n,a,s),f=new Ae(be.dataType,l);return Fe.createEnvelope(e,be.envelopeType,t,f)},t.PageViewEnvelopeCreator=new t,t}(Fe),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData,i=n.name,r=n.url,o=n.properties,a=n.measurements,s=new Te(e,i,r,void 0,o,a),u=new Ae(Te.dataType,s);return Fe.createEnvelope(e,Te.envelopeType,t,u)},t.PageViewPerformanceEnvelopeCreator=new t,t}(Fe),Ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,i=t.baseData.severityLevel,r=Fe.extractProperties(t.data),o=new xe(e,n,i,r),a=new Ae(xe.dataType,o);return Fe.createEnvelope(e,xe.envelopeType,t,a)},t.TraceEnvelopeCreator=new t,t}(Fe),Je=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.EventValidator=new e,e}(),Ze=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.TraceValidator=new e,e}(),Qe=function(){function e(){}return e.prototype.Validate=function(e){return!0},e._validateExceptions=function(e){return!0},e.ExceptionValidator=new e,e}(),$e=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.MetricValidator=new e,e}(),et=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewPerformanceValidator=new e,e}(),tt=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewValidator=new e,e}(),nt=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.RemoteDepdencyValidator=new e,e}(),it=function(){function e(e){this._logger=e}return e.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},e.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",i={};if(!e)return this._logger.throwInternal(g.CRITICAL,C,"cannot serialize object because it is null or undefined",{name:t},!0),i;if(e[n])return this._logger.throwInternal(g.WARNING,R,"Circular reference detected while serializing object",{name:t},!0),i;if(!e.aiDataContract){if("measurements"===t)i=this._serializeStringMap(e,"number",t);else if("properties"===t)i=this._serializeStringMap(e,"string",t);else if("tags"===t)i=this._serializeStringMap(e,"string",t);else if(re.isArray(e))i=this._serializeArray(e,t);else{this._logger.throwInternal(g.WARNING,D,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),i=e}catch(e){this._logger.throwInternal(g.CRITICAL,C,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return i}for(var r in e[n]=!0,e.aiDataContract){var o,a=e.aiDataContract[r],s="function"==typeof a?a()&Z.Required:a&Z.Required,u="function"==typeof a?a()&Z.Hidden:a&Z.Hidden,c=a&Z.Array,l=void 0!==e[r],f="object"==typeof e[r]&&null!==e[r];if(!s||l||c){if(!u)void 0!==(o=f?c?this._serializeArray(e[r],r):this._serializeObject(e[r],r):e[r])&&(i[r]=o)}else this._logger.throwInternal(g.CRITICAL,_,"Missing required field specification. The field is required but not present on source",{field:r,name:t})}return delete e[n],i},e.prototype._serializeArray=function(e,t){var n=void 0;if(e)if(re.isArray(e)){n=[];for(var i=0;i<e.length;i++){var r=e[i],o=this._serializeObject(r,t+"["+i+"]");n.push(o)}}else this._logger.throwInternal(g.CRITICAL,M,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},e.prototype._serializeStringMap=function(e,t,n){var i=void 0;if(e)for(var r in i={},e){var o=e[r];if("string"===t)void 0===o?i[r]="undefined":null===o?i[r]="null":o.toString?i[r]=o.toString():i[r]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===o)i[r]="undefined";else if(null===o)i[r]="null";else{var a=parseFloat(o);isNaN(a)?i[r]="NaN":i[r]=a}else i[r]="invalid field: "+n+" is of unknown type.",this._logger.throwInternal(g.CRITICAL,i[r],null,!0)}return i},e}(),rt=function(){function e(){this._onlineStatus=!0,"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}return e.prototype._setOnline=function(){this._onlineStatus=!0},e.prototype._setOffline=function(){this._onlineStatus=!1},e.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!navigator||navigator.onLine},e.prototype.isOffline=function(){return!this.isOnline()},e.Offline=new e,e}().Offline,ot=function(){function u(){this.priority=201,this._XMLHttpRequestSupported=!1,this.identifier="AppInsightsChannelPlugin"}return u.prototype.pause=function(){throw new Error("Method not implemented.")},u.prototype.resume=function(){throw new Error("Method not implemented.")},u.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(g.CRITICAL,p,"flush failed, telemetry will not be collected: "+re.getExceptionName(e),{exception:re.dump(e)})}},u.prototype.teardown=function(){throw new Error("Method not implemented.")},u.prototype.initialize=function(t,e,n){var i=this;this._logger=e.logger,this._serializer=new it(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var r=u._getDefaultAppInsightsChannelConfig();this._config=u._getEmptyAppInsightsChannelConfig();var o=function(e){a._config[e]=function(){return Ce.getConfig(t,e,i.identifier,r[e]())}},a=this;for(var s in r)o(s);(this._buffer=re.canUseSessionStorage()&&this._config.enableSessionStorageBuffer?new qe(this._logger,this._config):new ke(this._config),!this._config.isBeaconApiDisabled()&&re.IsBeaconApiSupported())?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))},u.prototype.processTelemetry=function(e){var t=this;try{if(this._config.disableTelemetry())return;if(!e)return void this._logger.throwInternal(g.CRITICAL,s,"Cannot send empty telemetry");if(!this._sender)return void this._logger.throwInternal(g.CRITICAL,S,"Sender was not initialized");if(!u._validate(e))return void this._logger.throwInternal(g.CRITICAL,T,"Invalid telemetry envelope");var n=u.constructEnvelope(e,this._config.instrumentationKey(),this._logger);if(!n)return void this._logger.throwInternal(g.CRITICAL,A,"Unable to create an AppInsights envelope");e.tags[ue]&&(e.tags[ue].forEach(function(e){!1!==e(n)||t._logger.warnToConsole("Telemetry processor check returns false")}),delete e.tags[ue]);var i=this._serializer.serialize(n),r=this._buffer.getItems(),o=this._buffer.batchPayloads(r);o&&o.length+i.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(i),this._setupTimer()}catch(e){this._logger.throwInternal(g.WARNING,d,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+re.getExceptionName(e),{exception:re.dump(e)})}h.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},u.prototype.setNextPlugin=function(e){this._nextPlugin=e},u.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var i=null;if(this._appId||(i=this._parseResponse(e.responseText||e.response))&&i.appId&&(this._appId=i.appId),(e.status<200||300<=e.status)&&0!==e.status)!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(g.WARNING,w,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e));else if(rt.isOffline()){if(!this._config.isRetryDisabled()){this._resendPayload(t,10),this._logger.throwInternal(g.WARNING,w,". Offline - Response Code: "+e.status+". Offline status: "+rt.isOffline()+". Will retry to send "+t.length+" items.")}}else 206===e.status?(i||(i=this._parseResponse(e.responseText||e.response)),i&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},u.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!re.getIEVersion()||9<re.getIEVersion())&&this._logger.throwInternal(g.CRITICAL,w,"Telemetry transmission failed, some telemetry will be lost: "+re.getExceptionName(e),{exception:re.dump(e)})}},u.prototype._onError=function(e,t,n){this._logger.throwInternal(g.WARNING,I,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},u.prototype._onPartialSuccess=function(e,t){for(var n=[],i=[],r=0,o=t.errors.reverse();r<o.length;r++){var a=o[r],s=e.splice(a.index,1)[0];this._isRetriable(a.statusCode)?i.push(s):n.push(s)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<i.length&&(this._resendPayload(i),this._logger.throwInternal(g.WARNING,w,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+i.length+" our of "+t.itemsReceived+" items"))},u.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},u.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},u.constructEnvelope=function(e,t,n){var i;switch((i=t===e.instrumentationKey||h.isNullOrUndefined(t)?e:$({},e,{instrumentationKey:t})).baseType){case pe.dataType:return Xe.EventEnvelopeCreator.Create(n,i);case xe.dataType:return Ye.TraceEnvelopeCreator.Create(n,i);case be.dataType:return Ke.PageViewEnvelopeCreator.Create(n,i);case Te.dataType:return We.PageViewPerformanceEnvelopeCreator.Create(n,i);case me.dataType:return He.ExceptionEnvelopeCreator.Create(n,i);case we.dataType:return je.MetricEnvelopeCreator.Create(n,i);case Ne.dataType:return Ge.DependencyEnvelopeCreator.Create(n,i);default:return Xe.EventEnvelopeCreator.Create(n,i)}},u._getDefaultAppInsightsChannelConfig=function(){var e={endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},instrumentationKey:function(){}};return e},u._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,instrumentationKey:void 0}},u._validate=function(e){switch(e.baseType){case pe.dataType:return Je.EventValidator.Validate(e);case xe.dataType:return Ze.TraceValidator.Validate(e);case me.dataType:return Qe.ExceptionValidator.Validate(e);case we.dataType:return $e.MetricValidator.Validate(e);case be.dataType:return tt.PageViewValidator.Validate(e);case Te.dataType:return et.PageViewPerformanceValidator.Validate(e);case Ne.dataType:return nt.RemoteDepdencyValidator.Validate(e);default:return Je.EventValidator.Validate(e)}},u.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),i=this._buffer.batchPayloads(e),r=new Blob([i],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,r)?this._buffer.markAsSent(e):this._logger.throwInternal(g.CRITICAL,w,". Failed to send telemetry with Beacon API.")},u.prototype._xhrSender=function(t,e){var n=this,i=new XMLHttpRequest;i.Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,i.open("POST",this._config.endpointUrl(),e),i.setRequestHeader("Content-type","application/json"),re.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&i.setRequestHeader(ne.sdkContextHeader,ne.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return n._xhrReadyStateChange(i,t,t.length)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(i),e)};var r=this._buffer.batchPayloads(t);i.send(r),this._buffer.markAsSent(t)},u.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(g.CRITICAL,N,"Cannot parse the response. "+re.getExceptionName(e),{response:t})}return null},u.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,i=e;n<i.length;n++){var r=i[n];this._buffer.enqueue(r)}this._setRetryTime(t),this._setupTimer()}},u.prototype._setRetryTime=function(e){var t;if(this._consecutiveErrors<=1)t=10;else{var n=(Math.pow(2,this._consecutiveErrors)-1)/2,i=Math.floor(Math.random()*n*10)+1;i*=e,t=Math.max(Math.min(i,3600),10)}var r=Date.now()+1e3*t;this._retryAt=r},u.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},u.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},u.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},u.prototype._xdrSender=function(t,e){var n=this,i=new XDomainRequest;i.onload=function(){return n._xdrOnLoad(i,t)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(i),e)};var r=window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(r,0))return this._logger.throwInternal(g.WARNING,w,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var o=this._config.endpointUrl().replace(/^(https?:)/,"");i.open("POST",o);var a=this._buffer.batchPayloads(t);i.send(a),this._buffer.markAsSent(t)},u.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},u}(),at=function(){function e(e){if(h.isNullOrUndefined(e)||h.isNullOrUndefined(e.instrumentationKey))throw new Error("Invalid input configuration");this.config=e,this.getSKUDefaults(),this.initialize()}return e.prototype.initialize=function(){this.core=new G;var e=[],t=new ot;e.push(t),this.core.initialize(this.config,e),t.initialize(this.config,this.core,e),this.pollInternalLogs()},e.prototype.track=function(e){this.core.track(e)},e.prototype.flush=function(t){void 0===t&&(t=!0),this.core.getTransmissionControls().forEach(function(e){e.forEach(function(e){t?e.flush():e.triggerSend(t)})})},e.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},e.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4},e}();e.ApplicationInsights=at,e.AppInsightsCore=G,e.CoreUtils=h,e.Event=pe,e.Exception=me,e.Metric=we,e.PageView=be,e.PageViewPerformance=Te,e.RemoteDependencyData=Ne,e.Trace=xe,e.Sender=ot,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={})}(this,function(e){"use strict";var g,t,n=2,h=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(i,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),i=/[xy]/g,u=function(){function e(){this.listeners=[]}return e.prototype.addNotificationListener=function(e){this.listeners.push(e)},e.prototype.removeNotificationListener=function(e){for(var t=this.listeners.indexOf(e);-1<t;)this.listeners.splice(t,1),t=this.listeners.indexOf(e)},e.prototype.eventsSent=function(t){for(var n=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},e.prototype.eventsDiscarded=function(t,n){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(t,n)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},e}();(t=g||(g={}))[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING";var r=1,o=2,a=3,c=4,l=5,f=6,s=7,m=8,v=10,d=12,p=22,y=23,_=24,I=26,S=28,w=40,E=41,N=42,b=43,x=45,T=46,A=47,C=48,D=49,R=50,L=52,M=54,U=56,O=57,P=61,V=64,z=66,k=67,q=68,B=69,F=function(){function o(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?o.AiUserActionablePrefix:o.AiNonUserActionablePrefix)+e;var r=(t?" message:"+o.sanitizeDiagnosticText(t):"")+(i?" props:"+o.sanitizeDiagnosticText(JSON.stringify(i)):"");this.message+=r}return o.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},o.dataType="MessageData",o.AiNonUserActionablePrefix="AI (Internal): ",o.AiUserActionablePrefix="AI: ",o}(),G=function(){function e(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},h.isNullOrUndefined(e)||(h.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),h.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),h.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),h.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}return e.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1);var o=new F(t,n,r,i);if(this.enableDebugExceptions())throw o;if(void 0!==o&&o&&void 0!==o.message){if(r){var a=+o.messageId;(!this._messageLogged[a]||this.consoleLoggingLevel()>=g.WARNING)&&(this.warnToConsole(o.message),this._messageLogged[a]=!0)}else this.consoleLoggingLevel()>=g.WARNING&&this.warnToConsole(o.message);this.logInternalMessage(e,o)}},e.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},e.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},e.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,i=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[i]?n=!1:this._messageLogged[i]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var r="Internal events throttle limit per PageView reached for this app.",o=new F(y,r,!1);this.queue.push(o),this.warnToConsole(r)}}},e.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},e}(),X=function(){function e(){this._isInitialized=!1,this._extensions=new Array,this._channelController=new H}return e.prototype.initialize=function(e,t){var n=this;if(this._isInitialized)throw Error("Core should not be initialized more than once");if(!e||h.isNullOrUndefined(e.instrumentationKey))throw Error("Please provide instrumentation key");if(this.config=e,this._notificationManager=new u,this.config.extensions=h.isNullOrUndefined(this.config.extensions)?[]:this.config.extensions,this.config.extensionConfig=h.isNullOrUndefined(this.config.extensionConfig)?{}:this.config.extensionConfig,this.config.extensionConfig.NotificationManager=this._notificationManager,this.logger=new G(e),t.forEach(function(e){if(h.isNullOrUndefined(e.initialize))throw Error(j)}),0<this.config.extensions.length){var i=!0;if(this.config.extensions.forEach(function(e){h.isNullOrUndefined(e)&&(i=!1)}),!i)throw Error(j)}(o=this._extensions).push.apply(o,[this._channelController].concat(t,this.config.extensions)),this._extensions=this._extensions.sort(function(e,t){var n=e,i=t,r=typeof n.processTelemetry,o=typeof i.processTelemetry;return"function"===r&&"function"===o?n.priority-i.priority:"function"===r&&"function"!==o?1:"function"!==r&&"function"===o?-1:void 0});var r={};this._extensions.forEach(function(e){var t=e;t&&t.priority&&(h.isNullOrUndefined(r[t.priority])?r[t.priority]=t.identifier:n.logger.warnToConsole("Two extensions have same priority"+r[t.priority]+", "+t.identifier))});for(var o,a=-1,s=0;s<this._extensions.length-1;s++){var c=this._extensions[s];if(!c||"function"==typeof c.processTelemetry){if(c.priority===K){a=s+1;break}this._extensions[s].setNextPlugin(this._extensions[s+1])}}if(this._channelController.initialize(this.config,this,this._extensions),this._extensions.forEach(function(e){e&&e.priority<K&&e.initialize(n.config,n,n._extensions)}),a<this._extensions.length&&this._extensions.splice(a),0===this.getTransmissionControls().length)throw new Error("No channels available");this._isInitialized=!0},e.prototype.getTransmissionControls=function(){return this._channelController.ChannelControls},e.prototype.track=function(e){if(null===e)throw this._notifiyInvalidEvent(e),Error("Invalid telemetry item");if(e.baseData&&!e.baseType)throw this._notifiyInvalidEvent(e),Error("Provide data.baseType for data.baseData");e.baseType||(e.baseType="EventData"),e.iKey||(e.iKey=this.config.instrumentationKey),e.time||(e.time=(new Date).toISOString()),h.isNullOrUndefined(e.ver)&&(e.ver="4.0"),this._validateTelmetryItem(e);for(var t=0;t<this._extensions.length;){if(this._extensions[t].processTelemetry){this._extensions[t].processTelemetry(e);break}t++}},e.prototype.addNotificationListener=function(e){this._notificationManager.addNotificationListener(e)},e.prototype.removeNotificationListener=function(e){this._notificationManager.removeNotificationListener(e)},e.prototype.pollInternalLogs=function(){var n=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var e=n.logger.queue;e.forEach(function(e){var t={name:"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:(new Date).toISOString(),baseType:F.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},e.prototype._validateTelmetryItem=function(e){if(h.isNullOrUndefined(e.name))throw this._notifiyInvalidEvent(e),Error("telemetry name required");if(h.isNullOrUndefined(e.time))throw this._notifiyInvalidEvent(e),Error("telemetry timestamp required");if(h.isNullOrUndefined(e.iKey))throw this._notifiyInvalidEvent(e),Error("telemetry instrumentationKey required")},e.prototype._notifiyInvalidEvent=function(e){this._notificationManager.eventsDiscarded([e],n)},e}(),H=function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=K}return e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,r){var o=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);o.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<r.length;t++){var a=r[t];a.priority>K&&e.push(a)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}},e}(),j="Extensions must provide callback to initialize",K=200,W=function(e,t){return(W=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 Y(e,t){function n(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var J,Z,Q,$,ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};(Z=J||(J={}))[Z.LocalStorage=0]="LocalStorage",Z[Z.SessionStorage=1]="SessionStorage",($=Q||(Q={}))[$.Default=0]="Default",$[$.Required=1]="Required",$[$.Array=2]="Array",$[$.Hidden=4]="Hidden";var te,ne,ie=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),re=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=s.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(o);r=a}return r},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(g.WARNING,O,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(g.WARNING,P,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,z)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(g.WARNING,U,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(g.WARNING,L,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,B).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(g.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),oe=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(J.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;n=new Date,(i=e===J.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=i.getItem(n)!=n,i.removeItem(n),t&&(i=null)}catch(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(J.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,r,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,a,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,l,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(J.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(J.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,o,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,c,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,f,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(g.WARNING,q,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",o="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(o=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+o)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=s.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=s.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.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"}},s.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},s.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i,(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},s.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},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.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},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),ae=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},i.getAbsoluteUrl=function(e){var t,n=i.parseUrl(e);return n&&(t=n.href),t},i.getPathName=function(e){var t,n=i.parseUrl(e);return n&&(t=n.pathname),t},i.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},i.document="undefined"!=typeof document?document:{},i}(),se=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,o;if(t&&0<t.length){var a=ae.parseUrl(t);if(r=a.host,null!=a.pathname)"/"!==(i=0===a.pathname.length?"/":a.pathname).charAt(0)&&(i="/"+i),o=re.sanitizeString(e,n?n+" "+i:i);else o=re.sanitizeString(e,t)}else o=r=i;return{target:r,name:o}},e}(),ce=(function(){function e(){}e.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()},e.GetDuration=function(e,t){var n=null;return 0===e||0===t||h.isNullOrUndefined(e)||h.isNullOrUndefined(t)||(n=t-e),n}}(),"sampleRate"),ue="ProcessLegacy",le=function(e){function t(){return e.call(this)||this}return Y(t,e),t}(function(){}),fe=function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=re.sanitizeString(e,n)||oe.NotSpecified,i.data=t,i.time=oe.toISOStringForIE8(new Date),i.aiDataContract={time:Q.Required,iKey:Q.Required,name:Q.Required,sampleRate:function(){return 100==i.sampleRate?Q.Hidden:Q.Required},tags:Q.Required,data:Q.Required},i}return Y(e,r),e}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),de=function(){},pe=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return Y(e,t),e}(de),he=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:Q.Required,name:Q.Required,properties:Q.Default,measurements:Q.Default},r.name=re.sanitizeString(e,t)||oe.NotSpecified,r.properties=re.sanitizeProperties(e,n),r.measurements=re.sanitizeMeasurements(e,i),r}return Y(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(pe),ge=function(){},me=function(){this.hasFullStack=!0,this.parsedStack=[]},ve=function(a){function e(e,t,n,i,r){var o=a.call(this)||this;return o.aiDataContract={ver:Q.Required,exceptions:Q.Required,severityLevel:Q.Default,properties:Q.Default,measurements:Q.Default},o.properties=re.sanitizeProperties(e,n),o.measurements=re.sanitizeMeasurements(e,i),o.exceptions=[new ye(e,t)],r&&(o.severityLevel=r),o}return Y(e,a),e.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return Y(e,t),e}(de)),ye=function(r){function e(e,t){var n=r.call(this)||this;n.aiDataContract={id:Q.Default,outerId:Q.Default,typeName:Q.Required,message:Q.Required,hasFullStack:Q.Default,stack:Q.Default,parsedStack:Q.Array},n.typeName=re.sanitizeString(e,t.name)||oe.NotSpecified,n.message=re.sanitizeMessage(e,t.message)||oe.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=re.sanitizeException(e,i),n.hasFullStack=oe.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return Y(e,r),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(_e.regex.test(a)){var s=new _e(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,f=c,d=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=c,d=u,c++,u--}}return t},e}(me),_e=function(r){function o(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:Q.Required,method:Q.Required,assembly:Q.Default,fileName:Q.Default,line:Q.Default},n.level=t,n.method="<no_method>",n.assembly=oe.trim(e);var i=e.match(o.regex);return i&&5<=i.length&&(n.method=oe.trim(i[2])||n.method,n.fileName=oe.trim(i[4]),n.line=parseInt(i[5])||0),n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=o.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return Y(o,r),o.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}(ge),Ie=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return Y(e,t),e}(de);(ne=te||(te={}))[ne.Measurement=0]="Measurement",ne[ne.Aggregation=1]="Aggregation";var Se,we=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:Q.Required,kind:Q.Default,value:Q.Required,count:Q.Default,min:Q.Default,max:Q.Default,stdDev:Q.Default},e}return Y(e,t),e}(function(){this.kind=te.Measurement}),Ee=function(u){function e(e,t,n,i,r,o,a){var s=u.call(this)||this;s.aiDataContract={ver:Q.Required,metrics:Q.Required,properties:Q.Default};var c=new we;return c.count=0<i?i:void 0,c.max=isNaN(o)||null===o?void 0:o,c.min=isNaN(r)||null===r?void 0:r,c.name=re.sanitizeString(e,t)||oe.NotSpecified,c.value=n,s.metrics=[c],s.properties=re.sanitizeProperties(e,a),s}return Y(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(Ie),Ne=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return Y(e,t),e}(pe),be=function(c){function e(e,t,n,i,r,o,a){var s=c.call(this)||this;return s.aiDataContract={ver:Q.Required,name:Q.Default,url:Q.Default,duration:Q.Default,properties:Q.Default,measurements:Q.Default,id:Q.Default},s.id=re.sanitizeId(e,a),s.url=re.sanitizeUrl(e,n),s.name=re.sanitizeString(e,t)||oe.NotSpecified,isNaN(i)||(s.duration=oe.msToTimeSpan(i)),s.properties=re.sanitizeProperties(e,r),s.measurements=re.sanitizeMeasurements(e,o),s}return Y(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Ne),xe=function(d){function e(e,t,n,i,r,o,a,s,c,u){var l=d.call(this)||this;l.aiDataContract={id:Q.Required,ver:Q.Required,name:Q.Default,resultCode:Q.Default,duration:Q.Default,success:Q.Default,data:Q.Default,target:Q.Default,type:Q.Default,properties:Q.Default,measurements:Q.Default,kind:Q.Default,value:Q.Default,count:Q.Default,min:Q.Default,max:Q.Default,stdDev:Q.Default,dependencyKind:Q.Default,dependencySource:Q.Default,commandName:Q.Default,dependencyTypeName:Q.Default},l.id=t,l.duration=oe.msToTimeSpan(r),l.success=o,l.resultCode=a+"",l.type="Ajax",l.data=re.sanitizeUrl(e,i);var f=se.ParseDependencyPath(e,n,s,i);return l.target=f.target,l.name=f.name,l.properties=re.sanitizeProperties(e,c),l.measurements=re.sanitizeMeasurements(e,u),l}return Y(e,d),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return Y(e,t),e}(de)),Te=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:Q.Required,message:Q.Required,severityLevel:Q.Default,properties:Q.Default},t=t||oe.NotSpecified,r.message=re.sanitizeMessage(e,t),r.properties=re.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return Y(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return Y(e,t),e}(de)),Ae=function(p){function h(e,t,n,i,r,o){var a=p.call(this)||this;a.aiDataContract={ver:Q.Required,name:Q.Default,url:Q.Default,duration:Q.Default,perfTotal:Q.Default,networkConnect:Q.Default,sentRequest:Q.Default,receivedResponse:Q.Default,domProcessing:Q.Default,properties:Q.Default,measurements:Q.Default},a.isValid=!1;var s=h.getPerformanceTiming();if(s){var c=h.getDuration(s.navigationStart,s.loadEventEnd),u=h.getDuration(s.navigationStart,s.connectEnd),l=h.getDuration(s.requestStart,s.responseStart),f=h.getDuration(s.responseStart,s.responseEnd),d=h.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(g.WARNING,v,"error calculating page view performance.",{total:c,network:u,request:l,response:f,dom:d}):h.shouldCollectDuration(c,u,l,f,d)?c<Math.floor(u)+Math.floor(l)+Math.floor(f)+Math.floor(d)?e.throwInternal(g.WARNING,m,"client performance math error.",{total:c,network:u,request:l,response:f,dom:d}):(a.durationMs=c,a.perfTotal=a.duration=oe.msToTimeSpan(c),a.networkConnect=oe.msToTimeSpan(u),a.sentRequest=oe.msToTimeSpan(l),a.receivedResponse=oe.msToTimeSpan(f),a.domProcessing=oe.msToTimeSpan(d),a.isValid=!0):e.throwInternal(g.WARNING,x,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:f,dom:d})}return a.url=re.sanitizeUrl(e,n),a.name=re.sanitizeString(e,t)||oe.NotSpecified,a.properties=re.sanitizeProperties(e,r),a.measurements=re.sanitizeMeasurements(e,o),a}return Y(h,p),h.prototype.getIsValid=function(){return this.isValid},h.prototype.getDurationMs=function(){return this.durationMs},h.getPerformanceTiming=function(){return h.isPerformanceTimingSupported()?window.performance.timing:null},h.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},h.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},h.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},h.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],i=navigator.userAgent,r=!1;if(i)for(var o=0;o<n.length;o++)r=r||-1!==i.toLowerCase().indexOf(n[o]);if(r)return!1;for(var a=0;a<e.length;a++)if(e[a]>=h.MAX_DURATION_ALLOWED)return!1;return!0},h.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",h.dataType="PageviewPerformanceData",h.MAX_DURATION_ALLOWED=36e5,h}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return Y(e,t),e}(Ne)),Ce=function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:Q.Required,baseData:Q.Required},n.baseType=e,n.baseData=t,n}return Y(e,i),e}(le);(Se=e.SeverityLevel||(e.SeverityLevel={}))[Se.Verbose=0]="Verbose",Se[Se.Information=1]="Information",Se[Se.Warning=2]="Warning",Se[Se.Error=3]="Error",Se[Se.Critical=4]="Critical";var De=function(){function e(){}return e.getConfig=function(e,t,n,i){var r;return void 0===i&&(i=!1),r=n&&e.extensionConfig&&e.extensionConfig[n]&&!h.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],h.isNullOrUndefined(r)?i:r},e}(),Re=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},Le=function(){function e(){}return e.domain="domain",e.browser="web.browser",e.browserVer="web.browserVer",e.browserLang="web.browserLang",e.userConsent="web.userConsent",e.isManual="web.isManual",e.screenRes="web.screenRes",e}(),Me=function(){function e(){}return e.localId="device.localId",e.model="device.model",e.deviceType="device.class",e}(),Ue=function(){function e(){}return e.sessionId="app.sesId",e}(),Oe=function(){function e(){}return e.id="user.id",e.authId="authId",e.localId="localId",e}(),Pe=function(){function e(){}return e.clientIp="ingest.clientIp",e}(),Ve=function(){function e(){}return e.deviceOS="os.name",e}(),ze=function(){function e(){}return e.sessionIsFirst="ai.session.isFirst",e.sessionIsNew="ai.session.isNew",e.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",e.userStoreRegion="ai.user.storeRegion",e.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",e.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",e.cloudName="ai.cloud.name",e.cloudRole="ai.cloud.role",e.cloudRoleVer="ai.cloud.roleVer",e.cloudRoleInstance="ai.cloud.roleInstance",e.cloudEnvironment="ai.cloud.environment",e.cloudLocation="ai.cloud.location",e.cloudDeploymentUnit="ai.cloud.deploymentUnit",e.internalNodeName="ai.internal.nodeName",e.internalSdkVersion="ai.internal.sdkVersion",e.internalAgentVersion="ai.internal.agentVersion",e.deviceOEMName="ai.device.oemName",e.deviceNetwork="ai.device.network",e.applicationVersion="ai.application.ver",e.applicationBuild="ai.application.build",e.deviceLocale="ai.device.locale",e.deviceOSVersion="ai.device.osVersion",e.locationIp="ai.location.ip",e.operationId="ai.operation.id",e.operationParentId="ai.operation.parentId",e.operationRootId="ai.operation.rootId",e.operationSyntheticSource="ai.operation.syntheticSource",e}(),ke=new Re,qe=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}(),Be=function(){function r(e,t){this._bufferFullMessageSent=!1,this._logger=e,this._config=t;var n=this.getBuffer(r.BUFFER_KEY),i=this.getBuffer(r.SENT_BUFFER_KEY);this._buffer=n.concat(i),this._buffer.length>r.MAX_BUFFER_SIZE&&(this._buffer.length=r.MAX_BUFFER_SIZE),this.setBuffer(r.SENT_BUFFER_KEY,[]),this.setBuffer(r.BUFFER_KEY,this._buffer)}return r.prototype.enqueue=function(e){this._buffer.length>=r.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(g.WARNING,k,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(r.BUFFER_KEY,this._buffer))},r.prototype.count=function(){return this._buffer.length},r.prototype.clear=function(){this._buffer.length=0,this.setBuffer(r.BUFFER_KEY,[]),this.setBuffer(r.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},r.prototype.getItems=function(){return this._buffer.slice(0)},r.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},r.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(r.BUFFER_KEY,this._buffer);var t=this.getBuffer(r.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>r.MAX_BUFFER_SIZE&&(this._logger.throwInternal(g.CRITICAL,k,"Sent buffer reached its maximum size: "+t.length,!0),t.length=r.MAX_BUFFER_SIZE),this.setBuffer(r.SENT_BUFFER_KEY,t))},r.prototype.clearSent=function(e){var t=this.getBuffer(r.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(r.SENT_BUFFER_KEY,t)},r.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var r=!1;for(var o in e)if(e[o]===t[i]){r=!0;break}r||n.push(t[i])}return n},r.prototype.getBuffer=function(t){try{var e=oe.getSessionStorage(this._logger,t);if(e){var n=JSON.parse(e);if(n)return n}}catch(e){this._logger.throwInternal(g.CRITICAL,N," storage key: "+t+", "+oe.getExceptionName(e),{exception:oe.dump(e)})}return[]},r.prototype.setBuffer=function(t,e){try{var n=JSON.stringify(e);oe.setSessionStorage(this._logger,t,n)}catch(e){oe.setSessionStorage(this._logger,t,JSON.stringify([])),this._logger.throwInternal(g.WARNING,E," storage key: "+t+", "+oe.getExceptionName(e)+". Buffer cleared",{exception:oe.dump(e)})}},r.BUFFER_KEY="AI_buffer",r.SENT_BUFFER_KEY="AI_sentBuffer",r.MAX_BUFFER_SIZE=2e3,r}(),Fe=["ai.application.ver","ai.application.build","ai.application.typeId","ai.application.applicationId","ai.application.layer","ai.device.id","ai.device.ip","ai.device.language","ai.device.locale","ai.device.model","ai.device.friendlyName","ai.device.network","ai.device.networkName","ai.device.oemName","ai.device.os","ai.device.osVersion","ai.device.roleInstance","ai.device.roleName","ai.device.screenResolution","ai.device.type","ai.device.machineName","ai.device.vmName","ai.device.browser","ai.device.browserVersion","ai.location.ip","ai.location.country","ai.location.province","ai.location.city","ai.operation.id","ai.operation.name","ai.operation.parentId","ai.operation.rootId","ai.operation.syntheticSource","ai.operation.correlationVector","ai.session.id","ai.session.isFirst","ai.session.isNew","ai.user.accountAcquisitionDate","ai.user.accountId","ai.user.userAgent","ai.user.id","ai.user.storeRegion","ai.user.authUserId","ai.user.anonUserAcquisitionDate","ai.user.authUserAcquisitionDate","ai.cloud.name","ai.cloud.role","ai.cloud.roleVer","ai.cloud.roleInstance","ai.cloud.environment","ai.cloud.location","ai.cloud.deploymentUnit","ai.internal.sdkVersion","ai.internal.agentVersion","ai.internal.nodeName"],Ge=function(){function a(){}return a.extractProperties=function(e){var t=null;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];"number"!=typeof i&&(t||(t={}),t[n]=i)}return t},a.extractPropsAndMeasurements=function(e,t,n){if(!h.isNullOrUndefined(e))for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];"number"==typeof r?n[i]=r:t[i]=r}},a.createEnvelope=function(e,t,n,i){var r=new fe(e,i,t);r.iKey=n.iKey;var o=n.iKey.replace(/-/g,"");return r.name=r.name.replace("{0}",o),a.extractPartAExtensions(n,r),n.tags||(n.tags=[]),r},a.extractPartAExtensions=function(e,n){var i=[];n.tags||(n.tags=[]),e.ctx||(e.ctx={}),e.tags||(e.tags=[]),e.tags[ze.applicationVersion]&&(n.tags[ke.applicationVersion]=e.tags[ze.applicationVersion],i.push(ze.applicationVersion)),e.tags[ze.applicationBuild]&&(n.tags[ke.applicationBuild]=e.tags[ze.applicationBuild],i.push(ze.applicationBuild)),e.ctx[Oe.authId]&&(n.tags[ke.userAuthUserId]=e.ctx[Oe.authId],i.push(Oe.authId)),e.ctx[Oe.localId]&&(n.tags[ke.userId]=e.ctx[Oe.localId],i.push(Oe.localId)),e.ctx[Ue.sessionId]&&(n.tags[ke.sessionId]=e.ctx[Ue.sessionId]),e.tags[ke.sessionIsFirst]&&(n.tags[ke.sessionIsFirst]=e.tags[ke.sessionIsFirst],i.push(ke.sessionIsFirst)),e.ctx[Me.localId]&&(n.tags[ke.deviceId]=e.ctx[Me.localId]),e.ctx[Pe.clientIp]&&(n.tags[ke.deviceIp]=e.ctx[Pe.clientIp],i.push(Pe.clientIp)),e.ctx[Le.browserLang]&&(n.tags[ke.deviceLanguage]=e.ctx[Le.browserLang]),e.tags[ze.deviceLocale]&&(n.tags[ke.deviceLocale]=e.tags[ze.deviceLocale],i.push(ze.deviceLocale)),e.ctx[Me.model]&&(n.tags[ke.deviceModel]=e.ctx[Me.model]),e.ctx[ze.deviceNetwork]&&(n.tags[ke.deviceNetwork]=e.ctx[ze.deviceNetwork]),e.ctx[ze.deviceOEMName]&&(n.tags[ke.deviceOEMName]=e.ctx[ze.deviceOEMName]),e.tags[ze.deviceOSVersion]&&(n.tags[ke.deviceOSVersion]=e.tags[ze.deviceOSVersion],i.push(ze.deviceOSVersion)),e.ctx[Ve.deviceOS]&&(n.tags[ke.deviceOS]=e.ctx[Ve.deviceOS]),e.ctx[ze.deviceNetwork]&&(n.tags[ke.deviceNetwork]=e.ctx[ze.deviceNetwork]),e.ctx[Me.deviceType]&&(n.tags[ke.deviceType]=e.ctx[Me.deviceType]),e.tags[ze.deviceOSVersion]&&(n.tags[ke.deviceOSVersion]=e.tags[ze.deviceOSVersion],i.push(ze.deviceOSVersion)),e.tags[Le.screenRes]&&(n.tags[ke.deviceScreenResolution]=e.tags[Le.screenRes],i.push(Le.screenRes)),e.tags[ce]&&(n.tags.sampleRate=e.tags[ce],i.push(ce)),e.tags[ke.locationIp]&&(n.tags[ke.locationIp]=e.tags[ke.locationIp],i.push(ke.locationIp)),e.tags[ke.internalSdkVersion]&&(n.tags[ke.internalSdkVersion]=e.tags[ke.internalSdkVersion],i.push(ke.internalSdkVersion)),e.tags[ke.internalAgentVersion]&&(n.tags[ke.internalAgentVersion]=e.tags[ke.internalAgentVersion],i.push(ke.internalAgentVersion)),e.tags[ke.operationRootId]&&(n.tags[ke.operationRootId]=e.tags[ke.operationRootId],i.push(ke.operationRootId)),e.tags[ke.operationSyntheticSource]&&(n.tags[ke.operationSyntheticSource]=e.tags[ke.operationSyntheticSource],i.push(ke.operationSyntheticSource)),e.tags[ke.operationParentId]&&(n.tags[ke.operationParentId]=e.tags[ke.operationParentId],i.push(ke.operationParentId)),e.tags[ke.operationName]&&(n.tags[ke.operationName]=e.tags[ke.operationName],i.push(ke.operationName)),e.tags[ke.operationId]&&(n.tags[ke.operationId]=e.tags[ke.operationId],i.push(ke.operationId)),e.tags.forEach(function(e){for(var t in e)e.hasOwnProperty(t)&&i.indexOf(e)<0&&0<=Fe.indexOf(t)&&(n.tags[t]=e[t])})},a}(),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n={},i={};Ge.extractPropsAndMeasurements(t.data,i,n);var r=t.baseData;if(h.isNullOrUndefined(r))return e.warnToConsole("Invalid input for dependency data"),null;var o=r.id,a=r.target,s=r.type,c=r.duration,u=r.success,l=r.responseCode,f=r.properties?r.properties["http.method"]:"GET",d=new xe(e,o,a,s,c,u,l,f,i,n),p=new Ce(xe.dataType,d);return Ge.createEnvelope(e,xe.envelopeType,t,p)},t.DependencyEnvelopeCreator=new t,t}(Ge),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n={},i={};t.baseType!==he.dataType&&Ge.extractPropsAndMeasurements(t.baseData,n,i),Ge.extractPropsAndMeasurements(t.data,n,i);var r=t.baseData.name,o=new he(e,r,n,i),a=new Ce(he.dataType,o);return Ge.createEnvelope(e,he.envelopeType,t,a)},t.EventEnvelopeCreator=new t,t}(Ge),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties,i=t.baseData.measurements,r=t.baseData.error,o=t.baseData.severityLevel,a=new ve(e,r,n,i,o),s=new Ce(ve.dataType,a);return Ge.createEnvelope(e,ve.envelopeType,t,s)},t.ExceptionEnvelopeCreator=new t,t}(Ge),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=Ge.extractProperties(t.data),i=t.baseData.name,r=t.baseData.average,o=t.baseData.sampleCount,a=t.baseData.min,s=t.baseData.max,c=new Ee(e,i,r,o,a,s,n),u=new Ce(Ee.dataType,c);return Ge.createEnvelope(e,Ee.envelopeType,t,u)},t.MetricEnvelopeCreator=new t,t}(Ge),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=void 0;h.isNullOrUndefined(t.baseData)||h.isNullOrUndefined(t.baseData.measurements)||(n=t.baseData.measurements.duration,delete t.baseData.measurements.duration);var i=t.baseData,r=i.name,o=i.uri,a=i.properties||{},s=i.measurements||{};if(h.isNullOrUndefined(i.refUri)||(a.refUri=i.refUri),h.isNullOrUndefined(i.pageType)||(a.pageType=i.pageType),h.isNullOrUndefined(i.isLoggedIn)||(a.isLoggedIn=i.isLoggedIn.toString()),!h.isNullOrUndefined(i.properties)){var c=i.properties;for(var u in c)c.hasOwnProperty(u)&&(a[u]=c[u])}var l=new be(e,r,o,n,a,s),f=new Ce(be.dataType,l);return Ge.createEnvelope(e,be.envelopeType,t,f)},t.PageViewEnvelopeCreator=new t,t}(Ge),Ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData,i=n.name,r=n.url,o=n.properties,a=n.measurements,s=new Ae(e,i,r,void 0,o,a),c=new Ce(Ae.dataType,s);return Ge.createEnvelope(e,Ae.envelopeType,t,c)},t.PageViewPerformanceEnvelopeCreator=new t,t}(Ge),Je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,i=t.baseData.severityLevel,r=Ge.extractProperties(t.data),o=new Te(e,n,i,r),a=new Ce(Te.dataType,o);return Ge.createEnvelope(e,Te.envelopeType,t,a)},t.TraceEnvelopeCreator=new t,t}(Ge),Ze=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.EventValidator=new e,e}(),Qe=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.TraceValidator=new e,e}(),$e=function(){function e(){}return e.prototype.Validate=function(e){return!0},e._validateExceptions=function(e){return!0},e.ExceptionValidator=new e,e}(),et=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.MetricValidator=new e,e}(),tt=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewPerformanceValidator=new e,e}(),nt=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewValidator=new e,e}(),it=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.RemoteDepdencyValidator=new e,e}(),rt=function(){function e(e){this._logger=e}return e.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},e.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",i={};if(!e)return this._logger.throwInternal(g.CRITICAL,C,"cannot serialize object because it is null or undefined",{name:t},!0),i;if(e[n])return this._logger.throwInternal(g.WARNING,R,"Circular reference detected while serializing object",{name:t},!0),i;if(!e.aiDataContract){if("measurements"===t)i=this._serializeStringMap(e,"number",t);else if("properties"===t)i=this._serializeStringMap(e,"string",t);else if("tags"===t)i=this._serializeStringMap(e,"string",t);else if(oe.isArray(e))i=this._serializeArray(e,t);else{this._logger.throwInternal(g.WARNING,D,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),i=e}catch(e){this._logger.throwInternal(g.CRITICAL,C,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return i}for(var r in e[n]=!0,e.aiDataContract){var o,a=e.aiDataContract[r],s="function"==typeof a?a()&Q.Required:a&Q.Required,c="function"==typeof a?a()&Q.Hidden:a&Q.Hidden,u=a&Q.Array,l=void 0!==e[r],f="object"==typeof e[r]&&null!==e[r];if(!s||l||u){if(!c)void 0!==(o=f?u?this._serializeArray(e[r],r):this._serializeObject(e[r],r):e[r])&&(i[r]=o)}else this._logger.throwInternal(g.CRITICAL,_,"Missing required field specification. The field is required but not present on source",{field:r,name:t})}return delete e[n],i},e.prototype._serializeArray=function(e,t){var n=void 0;if(e)if(oe.isArray(e)){n=[];for(var i=0;i<e.length;i++){var r=e[i],o=this._serializeObject(r,t+"["+i+"]");n.push(o)}}else this._logger.throwInternal(g.CRITICAL,M,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},e.prototype._serializeStringMap=function(e,t,n){var i=void 0;if(e)for(var r in i={},e){var o=e[r];if("string"===t)void 0===o?i[r]="undefined":null===o?i[r]="null":o.toString?i[r]=o.toString():i[r]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===o)i[r]="undefined";else if(null===o)i[r]="null";else{var a=parseFloat(o);isNaN(a)?i[r]="NaN":i[r]=a}else i[r]="invalid field: "+n+" is of unknown type.",this._logger.throwInternal(g.CRITICAL,i[r],null,!0)}return i},e}(),ot=function(){function e(){this._onlineStatus=!0;try{"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}catch(e){this.isListening=!1}}return e.prototype._setOnline=function(){this._onlineStatus=!0},e.prototype._setOffline=function(){this._onlineStatus=!1},e.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!navigator||navigator.onLine},e.prototype.isOffline=function(){return!this.isOnline()},e.Offline=new e,e}().Offline,at=function(){function c(){this.priority=201,this._XMLHttpRequestSupported=!1,this.identifier="AppInsightsChannelPlugin"}return c.prototype.pause=function(){throw new Error("Method not implemented.")},c.prototype.resume=function(){throw new Error("Method not implemented.")},c.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(g.CRITICAL,p,"flush failed, telemetry will not be collected: "+oe.getExceptionName(e),{exception:oe.dump(e)})}},c.prototype.teardown=function(){throw new Error("Method not implemented.")},c.prototype.initialize=function(t,e,n){var i=this;this._logger=e.logger,this._serializer=new rt(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var r=c._getDefaultAppInsightsChannelConfig();this._config=c._getEmptyAppInsightsChannelConfig();var o=function(e){a._config[e]=function(){return De.getConfig(t,e,i.identifier,r[e]())}},a=this;for(var s in r)o(s);(this._buffer=this._config.enableSessionStorageBuffer&&oe.canUseSessionStorage()?new Be(this._logger,this._config):new qe(this._config),!this._config.isBeaconApiDisabled()&&oe.IsBeaconApiSupported())?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))},c.prototype.processTelemetry=function(e){var t=this;try{if(this._config.disableTelemetry())return;if(!e)return void this._logger.throwInternal(g.CRITICAL,s,"Cannot send empty telemetry");if(!this._sender)return void this._logger.throwInternal(g.CRITICAL,S,"Sender was not initialized");if(!c._validate(e))return void this._logger.throwInternal(g.CRITICAL,T,"Invalid telemetry envelope");var n=c.constructEnvelope(e,this._config.instrumentationKey(),this._logger);if(!n)return void this._logger.throwInternal(g.CRITICAL,A,"Unable to create an AppInsights envelope");var i=!1;if(e.tags&&e.tags[ue]&&(e.tags[ue].forEach(function(e){try{e&&!1===e(n)&&(i=!0,t._logger.warnToConsole("Telemetry processor check returns false"))}catch(e){t._logger.throwInternal(g.CRITICAL,V,"One of telemetry initializers failed, telemetry item will not be sent: "+oe.getExceptionName(e),{exception:oe.dump(e)},!0)}}),delete e.tags[ue]),i)return;var r=this._serializer.serialize(n),o=this._buffer.getItems(),a=this._buffer.batchPayloads(o);a&&a.length+r.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(r),this._setupTimer()}catch(e){this._logger.throwInternal(g.WARNING,d,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+oe.getExceptionName(e),{exception:oe.dump(e)})}h.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},c.prototype.setNextPlugin=function(e){this._nextPlugin=e},c.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var i=null;if(this._appId||(i=this._parseResponse(e.responseText||e.response))&&i.appId&&(this._appId=i.appId),(e.status<200||300<=e.status)&&0!==e.status)!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(g.WARNING,w,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e));else if(ot.isOffline()){if(!this._config.isRetryDisabled()){this._resendPayload(t,10),this._logger.throwInternal(g.WARNING,w,". Offline - Response Code: "+e.status+". Offline status: "+ot.isOffline()+". Will retry to send "+t.length+" items.")}}else 206===e.status?(i||(i=this._parseResponse(e.responseText||e.response)),i&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},c.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!oe.getIEVersion()||9<oe.getIEVersion())&&this._logger.throwInternal(g.CRITICAL,w,"Telemetry transmission failed, some telemetry will be lost: "+oe.getExceptionName(e),{exception:oe.dump(e)})}},c.prototype._onError=function(e,t,n){this._logger.throwInternal(g.WARNING,I,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},c.prototype._onPartialSuccess=function(e,t){for(var n=[],i=[],r=0,o=t.errors.reverse();r<o.length;r++){var a=o[r],s=e.splice(a.index,1)[0];this._isRetriable(a.statusCode)?i.push(s):n.push(s)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<i.length&&(this._resendPayload(i),this._logger.throwInternal(g.WARNING,w,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+i.length+" our of "+t.itemsReceived+" items"))},c.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},c.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},c.constructEnvelope=function(e,t,n){var i;switch((i=t===e.iKey||h.isNullOrUndefined(t)?e:ee({},e,{iKey:t})).baseType){case he.dataType:return He.EventEnvelopeCreator.Create(n,i);case Te.dataType:return Je.TraceEnvelopeCreator.Create(n,i);case be.dataType:return We.PageViewEnvelopeCreator.Create(n,i);case Ae.dataType:return Ye.PageViewPerformanceEnvelopeCreator.Create(n,i);case ve.dataType:return je.ExceptionEnvelopeCreator.Create(n,i);case Ee.dataType:return Ke.MetricEnvelopeCreator.Create(n,i);case xe.dataType:return Xe.DependencyEnvelopeCreator.Create(n,i);default:return He.EventEnvelopeCreator.Create(n,i)}},c._getDefaultAppInsightsChannelConfig=function(){var e={endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},instrumentationKey:function(){}};return e},c._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,instrumentationKey:void 0}},c._validate=function(e){switch(e.baseType){case he.dataType:return Ze.EventValidator.Validate(e);case Te.dataType:return Qe.TraceValidator.Validate(e);case ve.dataType:return $e.ExceptionValidator.Validate(e);case Ee.dataType:return et.MetricValidator.Validate(e);case be.dataType:return nt.PageViewValidator.Validate(e);case Ae.dataType:return tt.PageViewPerformanceValidator.Validate(e);case xe.dataType:return it.RemoteDepdencyValidator.Validate(e);default:return Ze.EventValidator.Validate(e)}},c.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),i=this._buffer.batchPayloads(e),r=new Blob([i],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,r)?this._buffer.markAsSent(e):this._logger.throwInternal(g.CRITICAL,w,". Failed to send telemetry with Beacon API.")},c.prototype._xhrSender=function(t,e){var n=this,i=new XMLHttpRequest;i.Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,i.open("POST",this._config.endpointUrl(),e),i.setRequestHeader("Content-type","application/json"),oe.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&i.setRequestHeader(ie.sdkContextHeader,ie.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return n._xhrReadyStateChange(i,t,t.length)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(i),e)};var r=this._buffer.batchPayloads(t);i.send(r),this._buffer.markAsSent(t)},c.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(g.CRITICAL,b,"Cannot parse the response. "+oe.getExceptionName(e),{response:t})}return null},c.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,i=e;n<i.length;n++){var r=i[n];this._buffer.enqueue(r)}this._setRetryTime(t),this._setupTimer()}},c.prototype._setRetryTime=function(e){var t;if(this._consecutiveErrors<=1)t=10;else{var n=(Math.pow(2,this._consecutiveErrors)-1)/2,i=Math.floor(Math.random()*n*10)+1;i*=e,t=Math.max(Math.min(i,3600),10)}var r=Date.now()+1e3*t;this._retryAt=r},c.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},c.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},c.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},c.prototype._xdrSender=function(t,e){var n=this,i=new XDomainRequest;i.onload=function(){return n._xdrOnLoad(i,t)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(i),e)};var r=window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(r,0))return this._logger.throwInternal(g.WARNING,w,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var o=this._config.endpointUrl().replace(/^(https?:)/,"");i.open("POST",o);var a=this._buffer.batchPayloads(t);i.send(a),this._buffer.markAsSent(t)},c.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},c}(),st=function(){function e(e){if(h.isNullOrUndefined(e)||h.isNullOrUndefined(e.instrumentationKey))throw new Error("Invalid input configuration");this.config=e,this.getSKUDefaults(),this.initialize()}return e.prototype.initialize=function(){this.core=new X;var e=[],t=new at;e.push(t),this.core.initialize(this.config,e),t.initialize(this.config,this.core,e),this.pollInternalLogs()},e.prototype.track=function(e){this.core.track(e)},e.prototype.flush=function(t){void 0===t&&(t=!0),this.core.getTransmissionControls().forEach(function(e){e.forEach(function(e){t?e.flush():e.triggerSend(t)})})},e.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},e.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4},e}();e.ApplicationInsights=st,e.AppInsightsCore=X,e.CoreUtils=h,e.Event=he,e.Exception=ve,e.Metric=Ee,e.PageView=be,e.PageViewPerformance=Ae,e.RemoteDependencyData=xe,e.Trace=Te,e.Sender=at,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=aib.1.min.js.map
/*!
* Application Insights JavaScript Web SDK - Basic, 1.0.0-beta.12
* Application Insights JavaScript Web SDK - Basic, 1.0.0-beta.14
* 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={})}(this,function(e){"use strict";var g,t,n=2,h=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(i,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),i=/[xy]/g,c=function(){function e(){this.listeners=[]}return e.prototype.addNotificationListener=function(e){this.listeners.push(e)},e.prototype.removeNotificationListener=function(e){for(var t=this.listeners.indexOf(e);-1<t;)this.listeners.splice(t,1),t=this.listeners.indexOf(e)},e.prototype.eventsSent=function(t){for(var n=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},e.prototype.eventsDiscarded=function(t,n){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(t,n)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},e}();(t=g||(g={}))[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING";var r=1,o=2,a=3,u=4,l=5,f=6,s=7,m=8,v=10,d=12,p=22,y=23,_=24,I=26,S=28,w=40,E=41,b=42,N=43,x=45,T=46,A=47,C=48,D=49,R=50,L=52,M=54,U=56,O=57,P=61,V=66,z=67,k=68,q=69,B=function(){function o(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?o.AiUserActionablePrefix:o.AiNonUserActionablePrefix)+e;var r=(t?" message:"+o.sanitizeDiagnosticText(t):"")+(i?" props:"+o.sanitizeDiagnosticText(JSON.stringify(i)):"");this.message+=r}return o.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},o.dataType="MessageData",o.AiNonUserActionablePrefix="AI (Internal): ",o.AiUserActionablePrefix="AI: ",o}(),F=function(){function e(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},h.isNullOrUndefined(e)||(h.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),h.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),h.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),h.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}return e.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1);var o=new B(t,n,r,i);if(this.enableDebugExceptions())throw o;if(void 0!==o&&o&&void 0!==o.message){if(r){var a=+o.messageId;(!this._messageLogged[a]||this.consoleLoggingLevel()>=g.WARNING)&&(this.warnToConsole(o.message),this._messageLogged[a]=!0)}else this.consoleLoggingLevel()>=g.WARNING&&this.warnToConsole(o.message);this.logInternalMessage(e,o)}},e.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},e.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},e.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,i=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[i]?n=!1:this._messageLogged[i]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var r="Internal events throttle limit per PageView reached for this app.",o=new B(y,r,!1);this.queue.push(o),this.warnToConsole(r)}}},e.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},e}(),G=function(){function e(){this._isInitialized=!1,this._extensions=new Array,this._channelController=new X}return e.prototype.initialize=function(e,t){var n=this;if(this._isInitialized)throw Error("Core should not be initialized more than once");if(!e||h.isNullOrUndefined(e.instrumentationKey))throw Error("Please provide instrumentation key");if(this.config=e,this._notificationManager=new c,this.config.extensions=h.isNullOrUndefined(this.config.extensions)?[]:this.config.extensions,this.config.extensionConfig=h.isNullOrUndefined(this.config.extensionConfig)?{}:this.config.extensionConfig,this.config.extensionConfig.NotificationManager=this._notificationManager,this.logger=new F(e),t.forEach(function(e){if(h.isNullOrUndefined(e.initialize))throw Error(H)}),0<this.config.extensions.length){var i=!0;if(this.config.extensions.forEach(function(e){h.isNullOrUndefined(e)&&(i=!1)}),!i)throw Error(H)}(o=this._extensions).push.apply(o,[this._channelController].concat(t,this.config.extensions)),this._extensions=this._extensions.sort(function(e,t){var n=e,i=t,r=typeof n.processTelemetry,o=typeof i.processTelemetry;return"function"===r&&"function"===o?n.priority-i.priority:"function"===r&&"function"!==o?1:"function"!==r&&"function"===o?-1:void 0});var r={};this._extensions.forEach(function(e){var t=e;t&&t.priority&&(h.isNullOrUndefined(r[t.priority])?r[t.priority]=t.identifier:n.logger.warnToConsole("Two extensions have same priority"+r[t.priority]+", "+t.identifier))});for(var o,a=-1,s=0;s<this._extensions.length-1;s++){var u=this._extensions[s];if(!u||"function"==typeof u.processTelemetry){if(u.priority===j){a=s+1;break}this._extensions[s].setNextPlugin(this._extensions[s+1])}}if(this._channelController.initialize(this.config,this,this._extensions),this._extensions.forEach(function(e){e&&e.priority<j&&e.initialize(n.config,n,n._extensions)}),a<this._extensions.length&&this._extensions.splice(a),0===this.getTransmissionControls().length)throw new Error("No channels available");this._isInitialized=!0},e.prototype.getTransmissionControls=function(){return this._channelController.ChannelControls},e.prototype.track=function(e){if(null===e)throw this._notifiyInvalidEvent(e),Error("Invalid telemetry item");if(e.baseData&&!e.baseType)throw this._notifiyInvalidEvent(e),Error("Provide data.baseType for data.baseData");e.baseType||(e.baseType="EventData"),e.instrumentationKey||(e.instrumentationKey=this.config.instrumentationKey),e.timestamp||(e.timestamp=new Date),this._validateTelmetryItem(e);for(var t=0;t<this._extensions.length;){if(this._extensions[t].processTelemetry){this._extensions[t].processTelemetry(e);break}t++}},e.prototype.addNotificationListener=function(e){this._notificationManager.addNotificationListener(e)},e.prototype.removeNotificationListener=function(e){this._notificationManager.removeNotificationListener(e)},e.prototype.pollInternalLogs=function(){var n=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var e=n.logger.queue;e.forEach(function(e){var t={name:"InternalMessageId: "+e.messageId,instrumentationKey:n.config.instrumentationKey,timestamp:new Date,baseType:B.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},e.prototype._validateTelmetryItem=function(e){if(h.isNullOrUndefined(e.name))throw this._notifiyInvalidEvent(e),Error("telemetry name required");if(h.isNullOrUndefined(e.timestamp))throw this._notifiyInvalidEvent(e),Error("telemetry timestamp required");if(h.isNullOrUndefined(e.instrumentationKey))throw this._notifiyInvalidEvent(e),Error("telemetry instrumentationKey required")},e.prototype._notifiyInvalidEvent=function(e){this._notificationManager.eventsDiscarded([e],n)},e}(),X=function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=j}return e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,r){var o=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);o.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<r.length;t++){var a=r[t];a.priority>j&&e.push(a)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}},e}(),H="Extensions must provide callback to initialize",j=200,K=function(e,t){return(K=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 W(e,t){function n(){this.constructor=e}K(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Y,J,Z,Q,$=function(){return($=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};(J=Y||(Y={}))[J.LocalStorage=0]="LocalStorage",J[J.SessionStorage=1]="SessionStorage",(Q=Z||(Z={}))[Q.Default=0]="Default",Q[Q.Required=1]="Required",Q[Q.Array=2]="Array",Q[Q.Hidden=4]="Hidden";var ee,te,ne=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),ie=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=s.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(o);r=a}return r},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(g.WARNING,O,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(g.WARNING,P,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,V)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(g.WARNING,U,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(g.WARNING,L,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,q).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(g.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),re=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(Y.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;n=new Date,(i=e===Y.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=i.getItem(n)!=n,i.removeItem(n),t&&(i=null)}catch(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(Y.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,r,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,a,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,l,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(Y.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(Y.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,o,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,u,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,f,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(g.WARNING,k,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",o="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(o=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+o)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=s.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=s.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.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"}},s.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},s.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i,(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},s.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},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.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},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),oe=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},i.getAbsoluteUrl=function(e){var t,n=i.parseUrl(e);return n&&(t=n.href),t},i.getPathName=function(e){var t,n=i.parseUrl(e);return n&&(t=n.pathname),t},i.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},i.document="undefined"!=typeof document?document:{},i}(),ae=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,o;if(t&&0<t.length){var a=oe.parseUrl(t);if(r=a.host,null!=a.pathname)"/"!==(i=0===a.pathname.length?"/":a.pathname).charAt(0)&&(i="/"+i),o=ie.sanitizeString(e,n?n+" "+i:i);else o=ie.sanitizeString(e,t)}else o=r=i;return{target:r,name:o}},e}(),se=(function(){function e(){}e.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()},e.GetDuration=function(e,t){var n=null;return 0===e||0===t||h.isNullOrUndefined(e)||h.isNullOrUndefined(t)||(n=t-e),n}}(),"sampleRate"),ue="ProcessLegacy",ce=function(e){function t(){return e.call(this)||this}return W(t,e),t}(function(){}),le=function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=ie.sanitizeString(e,n)||re.NotSpecified,i.data=t,i.time=re.toISOStringForIE8(new Date),i.aiDataContract={time:Z.Required,iKey:Z.Required,name:Z.Required,sampleRate:function(){return 100==i.sampleRate?Z.Hidden:Z.Required},tags:Z.Required,data:Z.Required},i}return W(e,r),e}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),fe=function(){},de=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return W(e,t),e}(fe),pe=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:Z.Required,name:Z.Required,properties:Z.Default,measurements:Z.Default},r.name=ie.sanitizeString(e,t)||re.NotSpecified,r.properties=ie.sanitizeProperties(e,n),r.measurements=ie.sanitizeMeasurements(e,i),r}return W(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(de),he=function(){},ge=function(){this.hasFullStack=!0,this.parsedStack=[]},me=function(a){function e(e,t,n,i,r){var o=a.call(this)||this;return o.aiDataContract={ver:Z.Required,exceptions:Z.Required,severityLevel:Z.Default,properties:Z.Default,measurements:Z.Default},o.properties=ie.sanitizeProperties(e,n),o.measurements=ie.sanitizeMeasurements(e,i),o.exceptions=[new ve(e,t)],r&&(o.severityLevel=r),o}return W(e,a),e.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return W(e,t),e}(fe)),ve=function(r){function e(e,t){var n=r.call(this)||this;n.aiDataContract={id:Z.Default,outerId:Z.Default,typeName:Z.Required,message:Z.Required,hasFullStack:Z.Default,stack:Z.Default,parsedStack:Z.Array},n.typeName=ie.sanitizeString(e,t.name)||re.NotSpecified,n.message=ie.sanitizeMessage(e,t.message)||re.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=ie.sanitizeException(e,i),n.hasFullStack=re.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return W(e,r),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(ye.regex.test(a)){var s=new ye(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var u=0,c=t.length-1,l=0,f=u,d=c;u<c;){if(32768<(l+=t[u].sizeInBytes+t[c].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=u,d=c,u++,c--}}return t},e}(ge),ye=function(r){function o(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:Z.Required,method:Z.Required,assembly:Z.Default,fileName:Z.Default,line:Z.Default},n.level=t,n.method="<no_method>",n.assembly=re.trim(e);var i=e.match(o.regex);return i&&5<=i.length&&(n.method=re.trim(i[2])||n.method,n.fileName=re.trim(i[4]),n.line=parseInt(i[5])||0),n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=o.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return W(o,r),o.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}(he),_e=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return W(e,t),e}(fe);(te=ee||(ee={}))[te.Measurement=0]="Measurement",te[te.Aggregation=1]="Aggregation";var Ie,Se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:Z.Required,kind:Z.Default,value:Z.Required,count:Z.Default,min:Z.Default,max:Z.Default,stdDev:Z.Default},e}return W(e,t),e}(function(){this.kind=ee.Measurement}),we=function(c){function e(e,t,n,i,r,o,a){var s=c.call(this)||this;s.aiDataContract={ver:Z.Required,metrics:Z.Required,properties:Z.Default};var u=new Se;return u.count=0<i?i:void 0,u.max=isNaN(o)||null===o?void 0:o,u.min=isNaN(r)||null===r?void 0:r,u.name=ie.sanitizeString(e,t)||re.NotSpecified,u.value=n,s.metrics=[u],s.properties=ie.sanitizeProperties(e,a),s}return W(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(_e),Ee=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return W(e,t),e}(de),be=function(u){function e(e,t,n,i,r,o,a){var s=u.call(this)||this;return s.aiDataContract={ver:Z.Required,name:Z.Default,url:Z.Default,duration:Z.Default,properties:Z.Default,measurements:Z.Default,id:Z.Default},s.id=ie.sanitizeId(e,a),s.url=ie.sanitizeUrl(e,n),s.name=ie.sanitizeString(e,t)||re.NotSpecified,isNaN(i)||(s.duration=re.msToTimeSpan(i)),s.properties=ie.sanitizeProperties(e,r),s.measurements=ie.sanitizeMeasurements(e,o),s}return W(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Ee),Ne=function(d){function e(e,t,n,i,r,o,a,s,u,c){var l=d.call(this)||this;l.aiDataContract={id:Z.Required,ver:Z.Required,name:Z.Default,resultCode:Z.Default,duration:Z.Default,success:Z.Default,data:Z.Default,target:Z.Default,type:Z.Default,properties:Z.Default,measurements:Z.Default,kind:Z.Default,value:Z.Default,count:Z.Default,min:Z.Default,max:Z.Default,stdDev:Z.Default,dependencyKind:Z.Default,dependencySource:Z.Default,commandName:Z.Default,dependencyTypeName:Z.Default},l.id=t,l.duration=re.msToTimeSpan(r),l.success=o,l.resultCode=a+"",l.type="Ajax",l.data=ie.sanitizeUrl(e,i);var f=ae.ParseDependencyPath(e,n,s,i);return l.target=f.target,l.name=f.name,l.properties=ie.sanitizeProperties(e,u),l.measurements=ie.sanitizeMeasurements(e,c),l}return W(e,d),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return W(e,t),e}(fe)),xe=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:Z.Required,message:Z.Required,severityLevel:Z.Default,properties:Z.Default},t=t||re.NotSpecified,r.message=ie.sanitizeMessage(e,t),r.properties=ie.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return W(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return W(e,t),e}(fe)),Te=function(p){function h(e,t,n,i,r,o){var a=p.call(this)||this;a.aiDataContract={ver:Z.Required,name:Z.Default,url:Z.Default,duration:Z.Default,perfTotal:Z.Default,networkConnect:Z.Default,sentRequest:Z.Default,receivedResponse:Z.Default,domProcessing:Z.Default,properties:Z.Default,measurements:Z.Default},a.isValid=!1;var s=h.getPerformanceTiming();if(s){var u=h.getDuration(s.navigationStart,s.loadEventEnd),c=h.getDuration(s.navigationStart,s.connectEnd),l=h.getDuration(s.requestStart,s.responseStart),f=h.getDuration(s.responseStart,s.responseEnd),d=h.getDuration(s.responseEnd,s.loadEventEnd);0==u?e.throwInternal(g.WARNING,v,"error calculating page view performance.",{total:u,network:c,request:l,response:f,dom:d}):h.shouldCollectDuration(u,c,l,f,d)?u<Math.floor(c)+Math.floor(l)+Math.floor(f)+Math.floor(d)?e.throwInternal(g.WARNING,m,"client performance math error.",{total:u,network:c,request:l,response:f,dom:d}):(a.durationMs=u,a.perfTotal=a.duration=re.msToTimeSpan(u),a.networkConnect=re.msToTimeSpan(c),a.sentRequest=re.msToTimeSpan(l),a.receivedResponse=re.msToTimeSpan(f),a.domProcessing=re.msToTimeSpan(d),a.isValid=!0):e.throwInternal(g.WARNING,x,"Invalid page load duration value. Browser perf data won't be sent.",{total:u,network:c,request:l,response:f,dom:d})}return a.url=ie.sanitizeUrl(e,n),a.name=ie.sanitizeString(e,t)||re.NotSpecified,a.properties=ie.sanitizeProperties(e,r),a.measurements=ie.sanitizeMeasurements(e,o),a}return W(h,p),h.prototype.getIsValid=function(){return this.isValid},h.prototype.getDurationMs=function(){return this.durationMs},h.getPerformanceTiming=function(){return h.isPerformanceTimingSupported()?window.performance.timing:null},h.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},h.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},h.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},h.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],i=navigator.userAgent,r=!1;if(i)for(var o=0;o<n.length;o++)r=r||-1!==i.toLowerCase().indexOf(n[o]);if(r)return!1;for(var a=0;a<e.length;a++)if(e[a]>=h.MAX_DURATION_ALLOWED)return!1;return!0},h.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",h.dataType="PageviewPerformanceData",h.MAX_DURATION_ALLOWED=36e5,h}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return W(e,t),e}(Ee)),Ae=function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:Z.Required,baseData:Z.Required},n.baseType=e,n.baseData=t,n}return W(e,i),e}(ce);(Ie=e.SeverityLevel||(e.SeverityLevel={}))[Ie.Verbose=0]="Verbose",Ie[Ie.Information=1]="Information",Ie[Ie.Warning=2]="Warning",Ie[Ie.Error=3]="Error",Ie[Ie.Critical=4]="Critical";var Ce=function(){function e(){}return e.getConfig=function(e,t,n,i){var r;return void 0===i&&(i=!1),r=n&&e.extensionConfig&&e.extensionConfig[n]&&!h.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],h.isNullOrUndefined(r)?i:r},e}(),De=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},Re=function(){function e(){}return e.domain="domain",e.browser="web.browser",e.browserVer="web.browserVer",e.browserLang="web.browserLang",e.userConsent="web.userConsent",e.isManual="web.isManual",e.screenRes="web.screenRes",e}(),Le=function(){function e(){}return e.localId="device.localId",e.model="device.model",e.deviceType="device.class",e}(),Me=function(){function e(){}return e.sessionId="app.sesId",e}(),Ue=function(){function e(){}return e.id="user.id",e.authId="authId",e.localId="localId",e}(),Oe=function(){function e(){}return e.clientIp="ingest.clientIp",e}(),Pe=function(){function e(){}return e.deviceOS="os.name",e}(),Ve=function(){function e(){}return e.sessionIsFirst="ai.session.isFirst",e.sessionIsNew="ai.session.isNew",e.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",e.userStoreRegion="ai.user.storeRegion",e.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",e.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",e.cloudName="ai.cloud.name",e.cloudRole="ai.cloud.role",e.cloudRoleVer="ai.cloud.roleVer",e.cloudRoleInstance="ai.cloud.roleInstance",e.cloudEnvironment="ai.cloud.environment",e.cloudLocation="ai.cloud.location",e.cloudDeploymentUnit="ai.cloud.deploymentUnit",e.internalNodeName="ai.internal.nodeName",e.internalSdkVersion="ai.internal.sdkVersion",e.internalAgentVersion="ai.internal.agentVersion",e.deviceOEMName="ai.device.oemName",e.deviceNetwork="ai.device.network",e.applicationVersion="ai.application.ver",e.applicationBuild="ai.application.build",e.deviceLocale="ai.device.locale",e.deviceOSVersion="ai.device.osVersion",e.locationIp="ai.location.ip",e.operationId="ai.operation.id",e.operationParentId="ai.operation.parentId",e.operationRootId="ai.operation.rootId",e.operationSyntheticSource="ai.operation.syntheticSource",e}(),ze=new De,ke=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}(),qe=function(){function r(e,t){this._bufferFullMessageSent=!1,this._logger=e,this._config=t;var n=this.getBuffer(r.BUFFER_KEY),i=this.getBuffer(r.SENT_BUFFER_KEY);this._buffer=n.concat(i),this._buffer.length>r.MAX_BUFFER_SIZE&&(this._buffer.length=r.MAX_BUFFER_SIZE),this.setBuffer(r.SENT_BUFFER_KEY,[]),this.setBuffer(r.BUFFER_KEY,this._buffer)}return r.prototype.enqueue=function(e){this._buffer.length>=r.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(g.WARNING,z,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(r.BUFFER_KEY,this._buffer))},r.prototype.count=function(){return this._buffer.length},r.prototype.clear=function(){this._buffer.length=0,this.setBuffer(r.BUFFER_KEY,[]),this.setBuffer(r.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},r.prototype.getItems=function(){return this._buffer.slice(0)},r.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},r.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(r.BUFFER_KEY,this._buffer);var t=this.getBuffer(r.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>r.MAX_BUFFER_SIZE&&(this._logger.throwInternal(g.CRITICAL,z,"Sent buffer reached its maximum size: "+t.length,!0),t.length=r.MAX_BUFFER_SIZE),this.setBuffer(r.SENT_BUFFER_KEY,t))},r.prototype.clearSent=function(e){var t=this.getBuffer(r.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(r.SENT_BUFFER_KEY,t)},r.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var r=!1;for(var o in e)if(e[o]===t[i]){r=!0;break}r||n.push(t[i])}return n},r.prototype.getBuffer=function(t){try{var e=re.getSessionStorage(this._logger,t);if(e){var n=JSON.parse(e);if(n)return n}}catch(e){this._logger.throwInternal(g.CRITICAL,b," storage key: "+t+", "+re.getExceptionName(e),{exception:re.dump(e)})}return[]},r.prototype.setBuffer=function(t,e){try{var n=JSON.stringify(e);re.setSessionStorage(this._logger,t,n)}catch(e){re.setSessionStorage(this._logger,t,JSON.stringify([])),this._logger.throwInternal(g.WARNING,E," storage key: "+t+", "+re.getExceptionName(e)+". Buffer cleared",{exception:re.dump(e)})}},r.BUFFER_KEY="AI_buffer",r.SENT_BUFFER_KEY="AI_sentBuffer",r.MAX_BUFFER_SIZE=2e3,r}(),Be=["ai.application.ver","ai.application.build","ai.application.typeId","ai.application.applicationId","ai.application.layer","ai.device.id","ai.device.ip","ai.device.language","ai.device.locale","ai.device.model","ai.device.friendlyName","ai.device.network","ai.device.networkName","ai.device.oemName","ai.device.os","ai.device.osVersion","ai.device.roleInstance","ai.device.roleName","ai.device.screenResolution","ai.device.type","ai.device.machineName","ai.device.vmName","ai.device.browser","ai.device.browserVersion","ai.location.ip","ai.location.country","ai.location.province","ai.location.city","ai.operation.id","ai.operation.name","ai.operation.parentId","ai.operation.rootId","ai.operation.syntheticSource","ai.operation.correlationVector","ai.session.id","ai.session.isFirst","ai.session.isNew","ai.user.accountAcquisitionDate","ai.user.accountId","ai.user.userAgent","ai.user.id","ai.user.storeRegion","ai.user.authUserId","ai.user.anonUserAcquisitionDate","ai.user.authUserAcquisitionDate","ai.cloud.name","ai.cloud.role","ai.cloud.roleVer","ai.cloud.roleInstance","ai.cloud.environment","ai.cloud.location","ai.cloud.deploymentUnit","ai.internal.sdkVersion","ai.internal.agentVersion","ai.internal.nodeName"],Fe=function(){function a(){}return a.extractProperties=function(e){var t=null;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];"number"!=typeof i&&(t||(t={}),t[n]=i)}return t},a.extractPropsAndMeasurements=function(e,t,n){if(!h.isNullOrUndefined(e))for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];"number"==typeof r?n[i]=r:t[i]=r}},a.createEnvelope=function(e,t,n,i){var r=new le(e,i,t);r.iKey=n.instrumentationKey;var o=n.instrumentationKey.replace(/-/g,"");return r.name=r.name.replace("{0}",o),a.extractPartAExtensions(n,r),n.tags||(n.tags=[]),r},a.extractPartAExtensions=function(e,n){var i=[];n.tags||(n.tags=[]),e.ctx||(e.ctx={}),e.tags||(e.tags=[]),e.tags[Ve.applicationVersion]&&(n.tags[ze.applicationVersion]=e.tags[Ve.applicationVersion],i.push(Ve.applicationVersion)),e.tags[Ve.applicationBuild]&&(n.tags[ze.applicationBuild]=e.tags[Ve.applicationBuild],i.push(Ve.applicationBuild)),e.ctx[Ue.authId]&&(n.tags[ze.userAuthUserId]=e.ctx[Ue.authId],i.push(Ue.authId)),e.ctx[Ue.localId]&&(n.tags[ze.userId]=e.ctx[Ue.localId],i.push(Ue.localId)),e.ctx[Me.sessionId]&&(n.tags[ze.sessionId]=e.ctx[Me.sessionId]),e.tags[ze.sessionIsFirst]&&(n.tags[ze.sessionIsFirst]=e.tags[ze.sessionIsFirst],i.push(ze.sessionIsFirst)),e.ctx[Le.localId]&&(n.tags[ze.deviceId]=e.ctx[Le.localId]),e.ctx[Oe.clientIp]&&(n.tags[ze.deviceIp]=e.ctx[Oe.clientIp],i.push(Oe.clientIp)),e.ctx[Re.browserLang]&&(n.tags[ze.deviceLanguage]=e.ctx[Re.browserLang]),e.tags[Ve.deviceLocale]&&(n.tags[ze.deviceLocale]=e.tags[Ve.deviceLocale],i.push(Ve.deviceLocale)),e.ctx[Le.model]&&(n.tags[ze.deviceModel]=e.ctx[Le.model]),e.ctx[Ve.deviceNetwork]&&(n.tags[ze.deviceNetwork]=e.ctx[Ve.deviceNetwork]),e.ctx[Ve.deviceOEMName]&&(n.tags[ze.deviceOEMName]=e.ctx[Ve.deviceOEMName]),e.tags[Ve.deviceOSVersion]&&(n.tags[ze.deviceOSVersion]=e.tags[Ve.deviceOSVersion],i.push(Ve.deviceOSVersion)),e.ctx[Pe.deviceOS]&&(n.tags[ze.deviceOS]=e.ctx[Pe.deviceOS]),e.ctx[Ve.deviceNetwork]&&(n.tags[ze.deviceNetwork]=e.ctx[Ve.deviceNetwork]),e.ctx[Le.deviceType]&&(n.tags[ze.deviceType]=e.ctx[Le.deviceType]),e.tags[Ve.deviceOSVersion]&&(n.tags[ze.deviceOSVersion]=e.tags[Ve.deviceOSVersion],i.push(Ve.deviceOSVersion)),e.tags[Re.screenRes]&&(n.tags[ze.deviceScreenResolution]=e.tags[Re.screenRes],i.push(Re.screenRes)),e.tags[se]&&(n.tags.sampleRate=e.tags[se],i.push(se)),e.tags[ze.locationIp]&&(n.tags[ze.locationIp]=e.tags[ze.locationIp],i.push(ze.locationIp)),e.tags[ze.internalSdkVersion]&&(n.tags[ze.internalSdkVersion]=e.tags[ze.internalSdkVersion],i.push(ze.internalSdkVersion)),e.tags[ze.internalAgentVersion]&&(n.tags[ze.internalAgentVersion]=e.tags[ze.internalAgentVersion],i.push(ze.internalAgentVersion)),e.tags[ze.operationRootId]&&(n.tags[ze.operationRootId]=e.tags[ze.operationRootId],i.push(ze.operationRootId)),e.tags[ze.operationSyntheticSource]&&(n.tags[ze.operationSyntheticSource]=e.tags[ze.operationSyntheticSource],i.push(ze.operationSyntheticSource)),e.tags[ze.operationParentId]&&(n.tags[ze.operationParentId]=e.tags[ze.operationParentId],i.push(ze.operationParentId)),e.tags[ze.operationName]&&(n.tags[ze.operationName]=e.tags[ze.operationName],i.push(ze.operationName)),e.tags[ze.operationId]&&(n.tags[ze.operationId]=e.tags[ze.operationId],i.push(ze.operationId)),e.tags.forEach(function(e){for(var t in e)e.hasOwnProperty(t)&&i.indexOf(e)<0&&0<=Be.indexOf(t)&&(n.tags[t]=e[t])})},a}(),Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n={},i={};Fe.extractPropsAndMeasurements(t.data,i,n);var r=t.baseData;if(h.isNullOrUndefined(r))return e.warnToConsole("Invalid input for dependency data"),null;var o=r.id,a=r.absoluteUrl,s=r.type,u=r.duration,c=r.success,l=r.responseCode,f=r.properties?r.properties["http.method"]:"GET",d=new Ne(e,o,a,s,u,c,l,f,i,n),p=new Ae(Ne.dataType,d);return Fe.createEnvelope(e,Ne.envelopeType,t,p)},t.DependencyEnvelopeCreator=new t,t}(Fe),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n={},i={};t.baseType!==pe.dataType&&Fe.extractPropsAndMeasurements(t.baseData,n,i),Fe.extractPropsAndMeasurements(t.data,n,i);var r=t.baseData.name,o=new pe(e,r,n,i),a=new Ae(pe.dataType,o);return Fe.createEnvelope(e,pe.envelopeType,t,a)},t.EventEnvelopeCreator=new t,t}(Fe),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties,i=t.baseData.measurements,r=t.baseData.error,o=t.baseData.severityLevel,a=new me(e,r,n,i,o),s=new Ae(me.dataType,a);return Fe.createEnvelope(e,me.envelopeType,t,s)},t.ExceptionEnvelopeCreator=new t,t}(Fe),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=Fe.extractProperties(t.data),i=t.baseData.name,r=t.baseData.average,o=t.baseData.sampleCount,a=t.baseData.min,s=t.baseData.max,u=new we(e,i,r,o,a,s,n),c=new Ae(we.dataType,u);return Fe.createEnvelope(e,we.envelopeType,t,c)},t.MetricEnvelopeCreator=new t,t}(Fe),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=void 0;h.isNullOrUndefined(t.baseData)||h.isNullOrUndefined(t.baseData.measurements)||(n=t.baseData.measurements.duration,delete t.baseData.measurements.duration);var i=t.baseData,r=i.name,o=i.uri,a=i.properties||{},s=i.measurements||{};if(h.isNullOrUndefined(i.refUri)||(a.refUri=i.refUri),h.isNullOrUndefined(i.pageType)||(a.pageType=i.pageType),h.isNullOrUndefined(i.isLoggedIn)||(a.isLoggedIn=i.isLoggedIn.toString()),!h.isNullOrUndefined(i.properties)){var u=i.properties;for(var c in u)u.hasOwnProperty(c)&&(a[c]=u[c])}var l=new be(e,r,o,n,a,s),f=new Ae(be.dataType,l);return Fe.createEnvelope(e,be.envelopeType,t,f)},t.PageViewEnvelopeCreator=new t,t}(Fe),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData,i=n.name,r=n.url,o=n.properties,a=n.measurements,s=new Te(e,i,r,void 0,o,a),u=new Ae(Te.dataType,s);return Fe.createEnvelope(e,Te.envelopeType,t,u)},t.PageViewPerformanceEnvelopeCreator=new t,t}(Fe),Ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,i=t.baseData.severityLevel,r=Fe.extractProperties(t.data),o=new xe(e,n,i,r),a=new Ae(xe.dataType,o);return Fe.createEnvelope(e,xe.envelopeType,t,a)},t.TraceEnvelopeCreator=new t,t}(Fe),Je=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.EventValidator=new e,e}(),Ze=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.TraceValidator=new e,e}(),Qe=function(){function e(){}return e.prototype.Validate=function(e){return!0},e._validateExceptions=function(e){return!0},e.ExceptionValidator=new e,e}(),$e=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.MetricValidator=new e,e}(),et=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewPerformanceValidator=new e,e}(),tt=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewValidator=new e,e}(),nt=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.RemoteDepdencyValidator=new e,e}(),it=function(){function e(e){this._logger=e}return e.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},e.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",i={};if(!e)return this._logger.throwInternal(g.CRITICAL,C,"cannot serialize object because it is null or undefined",{name:t},!0),i;if(e[n])return this._logger.throwInternal(g.WARNING,R,"Circular reference detected while serializing object",{name:t},!0),i;if(!e.aiDataContract){if("measurements"===t)i=this._serializeStringMap(e,"number",t);else if("properties"===t)i=this._serializeStringMap(e,"string",t);else if("tags"===t)i=this._serializeStringMap(e,"string",t);else if(re.isArray(e))i=this._serializeArray(e,t);else{this._logger.throwInternal(g.WARNING,D,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),i=e}catch(e){this._logger.throwInternal(g.CRITICAL,C,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return i}for(var r in e[n]=!0,e.aiDataContract){var o,a=e.aiDataContract[r],s="function"==typeof a?a()&Z.Required:a&Z.Required,u="function"==typeof a?a()&Z.Hidden:a&Z.Hidden,c=a&Z.Array,l=void 0!==e[r],f="object"==typeof e[r]&&null!==e[r];if(!s||l||c){if(!u)void 0!==(o=f?c?this._serializeArray(e[r],r):this._serializeObject(e[r],r):e[r])&&(i[r]=o)}else this._logger.throwInternal(g.CRITICAL,_,"Missing required field specification. The field is required but not present on source",{field:r,name:t})}return delete e[n],i},e.prototype._serializeArray=function(e,t){var n=void 0;if(e)if(re.isArray(e)){n=[];for(var i=0;i<e.length;i++){var r=e[i],o=this._serializeObject(r,t+"["+i+"]");n.push(o)}}else this._logger.throwInternal(g.CRITICAL,M,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},e.prototype._serializeStringMap=function(e,t,n){var i=void 0;if(e)for(var r in i={},e){var o=e[r];if("string"===t)void 0===o?i[r]="undefined":null===o?i[r]="null":o.toString?i[r]=o.toString():i[r]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===o)i[r]="undefined";else if(null===o)i[r]="null";else{var a=parseFloat(o);isNaN(a)?i[r]="NaN":i[r]=a}else i[r]="invalid field: "+n+" is of unknown type.",this._logger.throwInternal(g.CRITICAL,i[r],null,!0)}return i},e}(),rt=function(){function e(){this._onlineStatus=!0,"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}return e.prototype._setOnline=function(){this._onlineStatus=!0},e.prototype._setOffline=function(){this._onlineStatus=!1},e.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!navigator||navigator.onLine},e.prototype.isOffline=function(){return!this.isOnline()},e.Offline=new e,e}().Offline,ot=function(){function u(){this.priority=201,this._XMLHttpRequestSupported=!1,this.identifier="AppInsightsChannelPlugin"}return u.prototype.pause=function(){throw new Error("Method not implemented.")},u.prototype.resume=function(){throw new Error("Method not implemented.")},u.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(g.CRITICAL,p,"flush failed, telemetry will not be collected: "+re.getExceptionName(e),{exception:re.dump(e)})}},u.prototype.teardown=function(){throw new Error("Method not implemented.")},u.prototype.initialize=function(t,e,n){var i=this;this._logger=e.logger,this._serializer=new it(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var r=u._getDefaultAppInsightsChannelConfig();this._config=u._getEmptyAppInsightsChannelConfig();var o=function(e){a._config[e]=function(){return Ce.getConfig(t,e,i.identifier,r[e]())}},a=this;for(var s in r)o(s);(this._buffer=re.canUseSessionStorage()&&this._config.enableSessionStorageBuffer?new qe(this._logger,this._config):new ke(this._config),!this._config.isBeaconApiDisabled()&&re.IsBeaconApiSupported())?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))},u.prototype.processTelemetry=function(e){var t=this;try{if(this._config.disableTelemetry())return;if(!e)return void this._logger.throwInternal(g.CRITICAL,s,"Cannot send empty telemetry");if(!this._sender)return void this._logger.throwInternal(g.CRITICAL,S,"Sender was not initialized");if(!u._validate(e))return void this._logger.throwInternal(g.CRITICAL,T,"Invalid telemetry envelope");var n=u.constructEnvelope(e,this._config.instrumentationKey(),this._logger);if(!n)return void this._logger.throwInternal(g.CRITICAL,A,"Unable to create an AppInsights envelope");e.tags[ue]&&(e.tags[ue].forEach(function(e){!1!==e(n)||t._logger.warnToConsole("Telemetry processor check returns false")}),delete e.tags[ue]);var i=this._serializer.serialize(n),r=this._buffer.getItems(),o=this._buffer.batchPayloads(r);o&&o.length+i.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(i),this._setupTimer()}catch(e){this._logger.throwInternal(g.WARNING,d,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+re.getExceptionName(e),{exception:re.dump(e)})}h.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},u.prototype.setNextPlugin=function(e){this._nextPlugin=e},u.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var i=null;if(this._appId||(i=this._parseResponse(e.responseText||e.response))&&i.appId&&(this._appId=i.appId),(e.status<200||300<=e.status)&&0!==e.status)!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(g.WARNING,w,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e));else if(rt.isOffline()){if(!this._config.isRetryDisabled()){this._resendPayload(t,10),this._logger.throwInternal(g.WARNING,w,". Offline - Response Code: "+e.status+". Offline status: "+rt.isOffline()+". Will retry to send "+t.length+" items.")}}else 206===e.status?(i||(i=this._parseResponse(e.responseText||e.response)),i&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},u.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!re.getIEVersion()||9<re.getIEVersion())&&this._logger.throwInternal(g.CRITICAL,w,"Telemetry transmission failed, some telemetry will be lost: "+re.getExceptionName(e),{exception:re.dump(e)})}},u.prototype._onError=function(e,t,n){this._logger.throwInternal(g.WARNING,I,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},u.prototype._onPartialSuccess=function(e,t){for(var n=[],i=[],r=0,o=t.errors.reverse();r<o.length;r++){var a=o[r],s=e.splice(a.index,1)[0];this._isRetriable(a.statusCode)?i.push(s):n.push(s)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<i.length&&(this._resendPayload(i),this._logger.throwInternal(g.WARNING,w,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+i.length+" our of "+t.itemsReceived+" items"))},u.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},u.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},u.constructEnvelope=function(e,t,n){var i;switch((i=t===e.instrumentationKey||h.isNullOrUndefined(t)?e:$({},e,{instrumentationKey:t})).baseType){case pe.dataType:return Xe.EventEnvelopeCreator.Create(n,i);case xe.dataType:return Ye.TraceEnvelopeCreator.Create(n,i);case be.dataType:return Ke.PageViewEnvelopeCreator.Create(n,i);case Te.dataType:return We.PageViewPerformanceEnvelopeCreator.Create(n,i);case me.dataType:return He.ExceptionEnvelopeCreator.Create(n,i);case we.dataType:return je.MetricEnvelopeCreator.Create(n,i);case Ne.dataType:return Ge.DependencyEnvelopeCreator.Create(n,i);default:return Xe.EventEnvelopeCreator.Create(n,i)}},u._getDefaultAppInsightsChannelConfig=function(){var e={endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},instrumentationKey:function(){}};return e},u._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,instrumentationKey:void 0}},u._validate=function(e){switch(e.baseType){case pe.dataType:return Je.EventValidator.Validate(e);case xe.dataType:return Ze.TraceValidator.Validate(e);case me.dataType:return Qe.ExceptionValidator.Validate(e);case we.dataType:return $e.MetricValidator.Validate(e);case be.dataType:return tt.PageViewValidator.Validate(e);case Te.dataType:return et.PageViewPerformanceValidator.Validate(e);case Ne.dataType:return nt.RemoteDepdencyValidator.Validate(e);default:return Je.EventValidator.Validate(e)}},u.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),i=this._buffer.batchPayloads(e),r=new Blob([i],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,r)?this._buffer.markAsSent(e):this._logger.throwInternal(g.CRITICAL,w,". Failed to send telemetry with Beacon API.")},u.prototype._xhrSender=function(t,e){var n=this,i=new XMLHttpRequest;i.Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,i.open("POST",this._config.endpointUrl(),e),i.setRequestHeader("Content-type","application/json"),re.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&i.setRequestHeader(ne.sdkContextHeader,ne.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return n._xhrReadyStateChange(i,t,t.length)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(i),e)};var r=this._buffer.batchPayloads(t);i.send(r),this._buffer.markAsSent(t)},u.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(g.CRITICAL,N,"Cannot parse the response. "+re.getExceptionName(e),{response:t})}return null},u.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,i=e;n<i.length;n++){var r=i[n];this._buffer.enqueue(r)}this._setRetryTime(t),this._setupTimer()}},u.prototype._setRetryTime=function(e){var t;if(this._consecutiveErrors<=1)t=10;else{var n=(Math.pow(2,this._consecutiveErrors)-1)/2,i=Math.floor(Math.random()*n*10)+1;i*=e,t=Math.max(Math.min(i,3600),10)}var r=Date.now()+1e3*t;this._retryAt=r},u.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},u.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},u.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},u.prototype._xdrSender=function(t,e){var n=this,i=new XDomainRequest;i.onload=function(){return n._xdrOnLoad(i,t)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(i),e)};var r=window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(r,0))return this._logger.throwInternal(g.WARNING,w,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var o=this._config.endpointUrl().replace(/^(https?:)/,"");i.open("POST",o);var a=this._buffer.batchPayloads(t);i.send(a),this._buffer.markAsSent(t)},u.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},u}(),at=function(){function e(e){if(h.isNullOrUndefined(e)||h.isNullOrUndefined(e.instrumentationKey))throw new Error("Invalid input configuration");this.config=e,this.getSKUDefaults(),this.initialize()}return e.prototype.initialize=function(){this.core=new G;var e=[],t=new ot;e.push(t),this.core.initialize(this.config,e),t.initialize(this.config,this.core,e),this.pollInternalLogs()},e.prototype.track=function(e){this.core.track(e)},e.prototype.flush=function(t){void 0===t&&(t=!0),this.core.getTransmissionControls().forEach(function(e){e.forEach(function(e){t?e.flush():e.triggerSend(t)})})},e.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},e.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4},e}();e.ApplicationInsights=at,e.AppInsightsCore=G,e.CoreUtils=h,e.Event=pe,e.Exception=me,e.Metric=we,e.PageView=be,e.PageViewPerformance=Te,e.RemoteDependencyData=Ne,e.Trace=xe,e.Sender=ot,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={})}(this,function(e){"use strict";var g,t,n=2,h=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(i,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),i=/[xy]/g,u=function(){function e(){this.listeners=[]}return e.prototype.addNotificationListener=function(e){this.listeners.push(e)},e.prototype.removeNotificationListener=function(e){for(var t=this.listeners.indexOf(e);-1<t;)this.listeners.splice(t,1),t=this.listeners.indexOf(e)},e.prototype.eventsSent=function(t){for(var n=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},e.prototype.eventsDiscarded=function(t,n){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(t,n)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},e}();(t=g||(g={}))[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING";var r=1,o=2,a=3,c=4,l=5,f=6,s=7,m=8,v=10,d=12,p=22,y=23,_=24,I=26,S=28,w=40,E=41,N=42,b=43,x=45,T=46,A=47,C=48,D=49,R=50,L=52,M=54,U=56,O=57,P=61,V=64,z=66,k=67,q=68,B=69,F=function(){function o(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?o.AiUserActionablePrefix:o.AiNonUserActionablePrefix)+e;var r=(t?" message:"+o.sanitizeDiagnosticText(t):"")+(i?" props:"+o.sanitizeDiagnosticText(JSON.stringify(i)):"");this.message+=r}return o.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},o.dataType="MessageData",o.AiNonUserActionablePrefix="AI (Internal): ",o.AiUserActionablePrefix="AI: ",o}(),G=function(){function e(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},h.isNullOrUndefined(e)||(h.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),h.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),h.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),h.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}return e.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1);var o=new F(t,n,r,i);if(this.enableDebugExceptions())throw o;if(void 0!==o&&o&&void 0!==o.message){if(r){var a=+o.messageId;(!this._messageLogged[a]||this.consoleLoggingLevel()>=g.WARNING)&&(this.warnToConsole(o.message),this._messageLogged[a]=!0)}else this.consoleLoggingLevel()>=g.WARNING&&this.warnToConsole(o.message);this.logInternalMessage(e,o)}},e.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},e.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},e.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,i=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[i]?n=!1:this._messageLogged[i]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var r="Internal events throttle limit per PageView reached for this app.",o=new F(y,r,!1);this.queue.push(o),this.warnToConsole(r)}}},e.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},e}(),X=function(){function e(){this._isInitialized=!1,this._extensions=new Array,this._channelController=new H}return e.prototype.initialize=function(e,t){var n=this;if(this._isInitialized)throw Error("Core should not be initialized more than once");if(!e||h.isNullOrUndefined(e.instrumentationKey))throw Error("Please provide instrumentation key");if(this.config=e,this._notificationManager=new u,this.config.extensions=h.isNullOrUndefined(this.config.extensions)?[]:this.config.extensions,this.config.extensionConfig=h.isNullOrUndefined(this.config.extensionConfig)?{}:this.config.extensionConfig,this.config.extensionConfig.NotificationManager=this._notificationManager,this.logger=new G(e),t.forEach(function(e){if(h.isNullOrUndefined(e.initialize))throw Error(j)}),0<this.config.extensions.length){var i=!0;if(this.config.extensions.forEach(function(e){h.isNullOrUndefined(e)&&(i=!1)}),!i)throw Error(j)}(o=this._extensions).push.apply(o,[this._channelController].concat(t,this.config.extensions)),this._extensions=this._extensions.sort(function(e,t){var n=e,i=t,r=typeof n.processTelemetry,o=typeof i.processTelemetry;return"function"===r&&"function"===o?n.priority-i.priority:"function"===r&&"function"!==o?1:"function"!==r&&"function"===o?-1:void 0});var r={};this._extensions.forEach(function(e){var t=e;t&&t.priority&&(h.isNullOrUndefined(r[t.priority])?r[t.priority]=t.identifier:n.logger.warnToConsole("Two extensions have same priority"+r[t.priority]+", "+t.identifier))});for(var o,a=-1,s=0;s<this._extensions.length-1;s++){var c=this._extensions[s];if(!c||"function"==typeof c.processTelemetry){if(c.priority===K){a=s+1;break}this._extensions[s].setNextPlugin(this._extensions[s+1])}}if(this._channelController.initialize(this.config,this,this._extensions),this._extensions.forEach(function(e){e&&e.priority<K&&e.initialize(n.config,n,n._extensions)}),a<this._extensions.length&&this._extensions.splice(a),0===this.getTransmissionControls().length)throw new Error("No channels available");this._isInitialized=!0},e.prototype.getTransmissionControls=function(){return this._channelController.ChannelControls},e.prototype.track=function(e){if(null===e)throw this._notifiyInvalidEvent(e),Error("Invalid telemetry item");if(e.baseData&&!e.baseType)throw this._notifiyInvalidEvent(e),Error("Provide data.baseType for data.baseData");e.baseType||(e.baseType="EventData"),e.iKey||(e.iKey=this.config.instrumentationKey),e.time||(e.time=(new Date).toISOString()),h.isNullOrUndefined(e.ver)&&(e.ver="4.0"),this._validateTelmetryItem(e);for(var t=0;t<this._extensions.length;){if(this._extensions[t].processTelemetry){this._extensions[t].processTelemetry(e);break}t++}},e.prototype.addNotificationListener=function(e){this._notificationManager.addNotificationListener(e)},e.prototype.removeNotificationListener=function(e){this._notificationManager.removeNotificationListener(e)},e.prototype.pollInternalLogs=function(){var n=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var e=n.logger.queue;e.forEach(function(e){var t={name:"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:(new Date).toISOString(),baseType:F.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},e.prototype._validateTelmetryItem=function(e){if(h.isNullOrUndefined(e.name))throw this._notifiyInvalidEvent(e),Error("telemetry name required");if(h.isNullOrUndefined(e.time))throw this._notifiyInvalidEvent(e),Error("telemetry timestamp required");if(h.isNullOrUndefined(e.iKey))throw this._notifiyInvalidEvent(e),Error("telemetry instrumentationKey required")},e.prototype._notifiyInvalidEvent=function(e){this._notificationManager.eventsDiscarded([e],n)},e}(),H=function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=K}return e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,r){var o=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);o.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<r.length;t++){var a=r[t];a.priority>K&&e.push(a)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}},e}(),j="Extensions must provide callback to initialize",K=200,W=function(e,t){return(W=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 Y(e,t){function n(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var J,Z,Q,$,ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};(Z=J||(J={}))[Z.LocalStorage=0]="LocalStorage",Z[Z.SessionStorage=1]="SessionStorage",($=Q||(Q={}))[$.Default=0]="Default",$[$.Required=1]="Required",$[$.Array=2]="Array",$[$.Hidden=4]="Hidden";var te,ne,ie=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),re=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=s.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(o);r=a}return r},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(g.WARNING,O,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(g.WARNING,P,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,z)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(g.WARNING,U,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(g.WARNING,L,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,B).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(g.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),oe=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(J.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;n=new Date,(i=e===J.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=i.getItem(n)!=n,i.removeItem(n),t&&(i=null)}catch(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(J.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,r,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,a,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(g.WARNING,l,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(J.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(J.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,o,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,c,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(g.WARNING,f,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(g.WARNING,q,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",o="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(o=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+o)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=s.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=s.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.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"}},s.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},s.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i,(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},s.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},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.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},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),ae=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},i.getAbsoluteUrl=function(e){var t,n=i.parseUrl(e);return n&&(t=n.href),t},i.getPathName=function(e){var t,n=i.parseUrl(e);return n&&(t=n.pathname),t},i.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},i.document="undefined"!=typeof document?document:{},i}(),se=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,o;if(t&&0<t.length){var a=ae.parseUrl(t);if(r=a.host,null!=a.pathname)"/"!==(i=0===a.pathname.length?"/":a.pathname).charAt(0)&&(i="/"+i),o=re.sanitizeString(e,n?n+" "+i:i);else o=re.sanitizeString(e,t)}else o=r=i;return{target:r,name:o}},e}(),ce=(function(){function e(){}e.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()},e.GetDuration=function(e,t){var n=null;return 0===e||0===t||h.isNullOrUndefined(e)||h.isNullOrUndefined(t)||(n=t-e),n}}(),"sampleRate"),ue="ProcessLegacy",le=function(e){function t(){return e.call(this)||this}return Y(t,e),t}(function(){}),fe=function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=re.sanitizeString(e,n)||oe.NotSpecified,i.data=t,i.time=oe.toISOStringForIE8(new Date),i.aiDataContract={time:Q.Required,iKey:Q.Required,name:Q.Required,sampleRate:function(){return 100==i.sampleRate?Q.Hidden:Q.Required},tags:Q.Required,data:Q.Required},i}return Y(e,r),e}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),de=function(){},pe=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return Y(e,t),e}(de),he=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:Q.Required,name:Q.Required,properties:Q.Default,measurements:Q.Default},r.name=re.sanitizeString(e,t)||oe.NotSpecified,r.properties=re.sanitizeProperties(e,n),r.measurements=re.sanitizeMeasurements(e,i),r}return Y(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(pe),ge=function(){},me=function(){this.hasFullStack=!0,this.parsedStack=[]},ve=function(a){function e(e,t,n,i,r){var o=a.call(this)||this;return o.aiDataContract={ver:Q.Required,exceptions:Q.Required,severityLevel:Q.Default,properties:Q.Default,measurements:Q.Default},o.properties=re.sanitizeProperties(e,n),o.measurements=re.sanitizeMeasurements(e,i),o.exceptions=[new ye(e,t)],r&&(o.severityLevel=r),o}return Y(e,a),e.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return Y(e,t),e}(de)),ye=function(r){function e(e,t){var n=r.call(this)||this;n.aiDataContract={id:Q.Default,outerId:Q.Default,typeName:Q.Required,message:Q.Required,hasFullStack:Q.Default,stack:Q.Default,parsedStack:Q.Array},n.typeName=re.sanitizeString(e,t.name)||oe.NotSpecified,n.message=re.sanitizeMessage(e,t.message)||oe.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=re.sanitizeException(e,i),n.hasFullStack=oe.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return Y(e,r),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(_e.regex.test(a)){var s=new _e(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,f=c,d=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=c,d=u,c++,u--}}return t},e}(me),_e=function(r){function o(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:Q.Required,method:Q.Required,assembly:Q.Default,fileName:Q.Default,line:Q.Default},n.level=t,n.method="<no_method>",n.assembly=oe.trim(e);var i=e.match(o.regex);return i&&5<=i.length&&(n.method=oe.trim(i[2])||n.method,n.fileName=oe.trim(i[4]),n.line=parseInt(i[5])||0),n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=o.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return Y(o,r),o.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}(ge),Ie=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return Y(e,t),e}(de);(ne=te||(te={}))[ne.Measurement=0]="Measurement",ne[ne.Aggregation=1]="Aggregation";var Se,we=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:Q.Required,kind:Q.Default,value:Q.Required,count:Q.Default,min:Q.Default,max:Q.Default,stdDev:Q.Default},e}return Y(e,t),e}(function(){this.kind=te.Measurement}),Ee=function(u){function e(e,t,n,i,r,o,a){var s=u.call(this)||this;s.aiDataContract={ver:Q.Required,metrics:Q.Required,properties:Q.Default};var c=new we;return c.count=0<i?i:void 0,c.max=isNaN(o)||null===o?void 0:o,c.min=isNaN(r)||null===r?void 0:r,c.name=re.sanitizeString(e,t)||oe.NotSpecified,c.value=n,s.metrics=[c],s.properties=re.sanitizeProperties(e,a),s}return Y(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(Ie),Ne=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return Y(e,t),e}(pe),be=function(c){function e(e,t,n,i,r,o,a){var s=c.call(this)||this;return s.aiDataContract={ver:Q.Required,name:Q.Default,url:Q.Default,duration:Q.Default,properties:Q.Default,measurements:Q.Default,id:Q.Default},s.id=re.sanitizeId(e,a),s.url=re.sanitizeUrl(e,n),s.name=re.sanitizeString(e,t)||oe.NotSpecified,isNaN(i)||(s.duration=oe.msToTimeSpan(i)),s.properties=re.sanitizeProperties(e,r),s.measurements=re.sanitizeMeasurements(e,o),s}return Y(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Ne),xe=function(d){function e(e,t,n,i,r,o,a,s,c,u){var l=d.call(this)||this;l.aiDataContract={id:Q.Required,ver:Q.Required,name:Q.Default,resultCode:Q.Default,duration:Q.Default,success:Q.Default,data:Q.Default,target:Q.Default,type:Q.Default,properties:Q.Default,measurements:Q.Default,kind:Q.Default,value:Q.Default,count:Q.Default,min:Q.Default,max:Q.Default,stdDev:Q.Default,dependencyKind:Q.Default,dependencySource:Q.Default,commandName:Q.Default,dependencyTypeName:Q.Default},l.id=t,l.duration=oe.msToTimeSpan(r),l.success=o,l.resultCode=a+"",l.type="Ajax",l.data=re.sanitizeUrl(e,i);var f=se.ParseDependencyPath(e,n,s,i);return l.target=f.target,l.name=f.name,l.properties=re.sanitizeProperties(e,c),l.measurements=re.sanitizeMeasurements(e,u),l}return Y(e,d),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return Y(e,t),e}(de)),Te=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:Q.Required,message:Q.Required,severityLevel:Q.Default,properties:Q.Default},t=t||oe.NotSpecified,r.message=re.sanitizeMessage(e,t),r.properties=re.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return Y(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return Y(e,t),e}(de)),Ae=function(p){function h(e,t,n,i,r,o){var a=p.call(this)||this;a.aiDataContract={ver:Q.Required,name:Q.Default,url:Q.Default,duration:Q.Default,perfTotal:Q.Default,networkConnect:Q.Default,sentRequest:Q.Default,receivedResponse:Q.Default,domProcessing:Q.Default,properties:Q.Default,measurements:Q.Default},a.isValid=!1;var s=h.getPerformanceTiming();if(s){var c=h.getDuration(s.navigationStart,s.loadEventEnd),u=h.getDuration(s.navigationStart,s.connectEnd),l=h.getDuration(s.requestStart,s.responseStart),f=h.getDuration(s.responseStart,s.responseEnd),d=h.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(g.WARNING,v,"error calculating page view performance.",{total:c,network:u,request:l,response:f,dom:d}):h.shouldCollectDuration(c,u,l,f,d)?c<Math.floor(u)+Math.floor(l)+Math.floor(f)+Math.floor(d)?e.throwInternal(g.WARNING,m,"client performance math error.",{total:c,network:u,request:l,response:f,dom:d}):(a.durationMs=c,a.perfTotal=a.duration=oe.msToTimeSpan(c),a.networkConnect=oe.msToTimeSpan(u),a.sentRequest=oe.msToTimeSpan(l),a.receivedResponse=oe.msToTimeSpan(f),a.domProcessing=oe.msToTimeSpan(d),a.isValid=!0):e.throwInternal(g.WARNING,x,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:f,dom:d})}return a.url=re.sanitizeUrl(e,n),a.name=re.sanitizeString(e,t)||oe.NotSpecified,a.properties=re.sanitizeProperties(e,r),a.measurements=re.sanitizeMeasurements(e,o),a}return Y(h,p),h.prototype.getIsValid=function(){return this.isValid},h.prototype.getDurationMs=function(){return this.durationMs},h.getPerformanceTiming=function(){return h.isPerformanceTimingSupported()?window.performance.timing:null},h.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},h.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},h.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},h.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],i=navigator.userAgent,r=!1;if(i)for(var o=0;o<n.length;o++)r=r||-1!==i.toLowerCase().indexOf(n[o]);if(r)return!1;for(var a=0;a<e.length;a++)if(e[a]>=h.MAX_DURATION_ALLOWED)return!1;return!0},h.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",h.dataType="PageviewPerformanceData",h.MAX_DURATION_ALLOWED=36e5,h}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return Y(e,t),e}(Ne)),Ce=function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:Q.Required,baseData:Q.Required},n.baseType=e,n.baseData=t,n}return Y(e,i),e}(le);(Se=e.SeverityLevel||(e.SeverityLevel={}))[Se.Verbose=0]="Verbose",Se[Se.Information=1]="Information",Se[Se.Warning=2]="Warning",Se[Se.Error=3]="Error",Se[Se.Critical=4]="Critical";var De=function(){function e(){}return e.getConfig=function(e,t,n,i){var r;return void 0===i&&(i=!1),r=n&&e.extensionConfig&&e.extensionConfig[n]&&!h.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],h.isNullOrUndefined(r)?i:r},e}(),Re=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},Le=function(){function e(){}return e.domain="domain",e.browser="web.browser",e.browserVer="web.browserVer",e.browserLang="web.browserLang",e.userConsent="web.userConsent",e.isManual="web.isManual",e.screenRes="web.screenRes",e}(),Me=function(){function e(){}return e.localId="device.localId",e.model="device.model",e.deviceType="device.class",e}(),Ue=function(){function e(){}return e.sessionId="app.sesId",e}(),Oe=function(){function e(){}return e.id="user.id",e.authId="authId",e.localId="localId",e}(),Pe=function(){function e(){}return e.clientIp="ingest.clientIp",e}(),Ve=function(){function e(){}return e.deviceOS="os.name",e}(),ze=function(){function e(){}return e.sessionIsFirst="ai.session.isFirst",e.sessionIsNew="ai.session.isNew",e.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",e.userStoreRegion="ai.user.storeRegion",e.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",e.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",e.cloudName="ai.cloud.name",e.cloudRole="ai.cloud.role",e.cloudRoleVer="ai.cloud.roleVer",e.cloudRoleInstance="ai.cloud.roleInstance",e.cloudEnvironment="ai.cloud.environment",e.cloudLocation="ai.cloud.location",e.cloudDeploymentUnit="ai.cloud.deploymentUnit",e.internalNodeName="ai.internal.nodeName",e.internalSdkVersion="ai.internal.sdkVersion",e.internalAgentVersion="ai.internal.agentVersion",e.deviceOEMName="ai.device.oemName",e.deviceNetwork="ai.device.network",e.applicationVersion="ai.application.ver",e.applicationBuild="ai.application.build",e.deviceLocale="ai.device.locale",e.deviceOSVersion="ai.device.osVersion",e.locationIp="ai.location.ip",e.operationId="ai.operation.id",e.operationParentId="ai.operation.parentId",e.operationRootId="ai.operation.rootId",e.operationSyntheticSource="ai.operation.syntheticSource",e}(),ke=new Re,qe=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}(),Be=function(){function r(e,t){this._bufferFullMessageSent=!1,this._logger=e,this._config=t;var n=this.getBuffer(r.BUFFER_KEY),i=this.getBuffer(r.SENT_BUFFER_KEY);this._buffer=n.concat(i),this._buffer.length>r.MAX_BUFFER_SIZE&&(this._buffer.length=r.MAX_BUFFER_SIZE),this.setBuffer(r.SENT_BUFFER_KEY,[]),this.setBuffer(r.BUFFER_KEY,this._buffer)}return r.prototype.enqueue=function(e){this._buffer.length>=r.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(g.WARNING,k,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(r.BUFFER_KEY,this._buffer))},r.prototype.count=function(){return this._buffer.length},r.prototype.clear=function(){this._buffer.length=0,this.setBuffer(r.BUFFER_KEY,[]),this.setBuffer(r.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},r.prototype.getItems=function(){return this._buffer.slice(0)},r.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},r.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(r.BUFFER_KEY,this._buffer);var t=this.getBuffer(r.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>r.MAX_BUFFER_SIZE&&(this._logger.throwInternal(g.CRITICAL,k,"Sent buffer reached its maximum size: "+t.length,!0),t.length=r.MAX_BUFFER_SIZE),this.setBuffer(r.SENT_BUFFER_KEY,t))},r.prototype.clearSent=function(e){var t=this.getBuffer(r.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(r.SENT_BUFFER_KEY,t)},r.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var r=!1;for(var o in e)if(e[o]===t[i]){r=!0;break}r||n.push(t[i])}return n},r.prototype.getBuffer=function(t){try{var e=oe.getSessionStorage(this._logger,t);if(e){var n=JSON.parse(e);if(n)return n}}catch(e){this._logger.throwInternal(g.CRITICAL,N," storage key: "+t+", "+oe.getExceptionName(e),{exception:oe.dump(e)})}return[]},r.prototype.setBuffer=function(t,e){try{var n=JSON.stringify(e);oe.setSessionStorage(this._logger,t,n)}catch(e){oe.setSessionStorage(this._logger,t,JSON.stringify([])),this._logger.throwInternal(g.WARNING,E," storage key: "+t+", "+oe.getExceptionName(e)+". Buffer cleared",{exception:oe.dump(e)})}},r.BUFFER_KEY="AI_buffer",r.SENT_BUFFER_KEY="AI_sentBuffer",r.MAX_BUFFER_SIZE=2e3,r}(),Fe=["ai.application.ver","ai.application.build","ai.application.typeId","ai.application.applicationId","ai.application.layer","ai.device.id","ai.device.ip","ai.device.language","ai.device.locale","ai.device.model","ai.device.friendlyName","ai.device.network","ai.device.networkName","ai.device.oemName","ai.device.os","ai.device.osVersion","ai.device.roleInstance","ai.device.roleName","ai.device.screenResolution","ai.device.type","ai.device.machineName","ai.device.vmName","ai.device.browser","ai.device.browserVersion","ai.location.ip","ai.location.country","ai.location.province","ai.location.city","ai.operation.id","ai.operation.name","ai.operation.parentId","ai.operation.rootId","ai.operation.syntheticSource","ai.operation.correlationVector","ai.session.id","ai.session.isFirst","ai.session.isNew","ai.user.accountAcquisitionDate","ai.user.accountId","ai.user.userAgent","ai.user.id","ai.user.storeRegion","ai.user.authUserId","ai.user.anonUserAcquisitionDate","ai.user.authUserAcquisitionDate","ai.cloud.name","ai.cloud.role","ai.cloud.roleVer","ai.cloud.roleInstance","ai.cloud.environment","ai.cloud.location","ai.cloud.deploymentUnit","ai.internal.sdkVersion","ai.internal.agentVersion","ai.internal.nodeName"],Ge=function(){function a(){}return a.extractProperties=function(e){var t=null;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];"number"!=typeof i&&(t||(t={}),t[n]=i)}return t},a.extractPropsAndMeasurements=function(e,t,n){if(!h.isNullOrUndefined(e))for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];"number"==typeof r?n[i]=r:t[i]=r}},a.createEnvelope=function(e,t,n,i){var r=new fe(e,i,t);r.iKey=n.iKey;var o=n.iKey.replace(/-/g,"");return r.name=r.name.replace("{0}",o),a.extractPartAExtensions(n,r),n.tags||(n.tags=[]),r},a.extractPartAExtensions=function(e,n){var i=[];n.tags||(n.tags=[]),e.ctx||(e.ctx={}),e.tags||(e.tags=[]),e.tags[ze.applicationVersion]&&(n.tags[ke.applicationVersion]=e.tags[ze.applicationVersion],i.push(ze.applicationVersion)),e.tags[ze.applicationBuild]&&(n.tags[ke.applicationBuild]=e.tags[ze.applicationBuild],i.push(ze.applicationBuild)),e.ctx[Oe.authId]&&(n.tags[ke.userAuthUserId]=e.ctx[Oe.authId],i.push(Oe.authId)),e.ctx[Oe.localId]&&(n.tags[ke.userId]=e.ctx[Oe.localId],i.push(Oe.localId)),e.ctx[Ue.sessionId]&&(n.tags[ke.sessionId]=e.ctx[Ue.sessionId]),e.tags[ke.sessionIsFirst]&&(n.tags[ke.sessionIsFirst]=e.tags[ke.sessionIsFirst],i.push(ke.sessionIsFirst)),e.ctx[Me.localId]&&(n.tags[ke.deviceId]=e.ctx[Me.localId]),e.ctx[Pe.clientIp]&&(n.tags[ke.deviceIp]=e.ctx[Pe.clientIp],i.push(Pe.clientIp)),e.ctx[Le.browserLang]&&(n.tags[ke.deviceLanguage]=e.ctx[Le.browserLang]),e.tags[ze.deviceLocale]&&(n.tags[ke.deviceLocale]=e.tags[ze.deviceLocale],i.push(ze.deviceLocale)),e.ctx[Me.model]&&(n.tags[ke.deviceModel]=e.ctx[Me.model]),e.ctx[ze.deviceNetwork]&&(n.tags[ke.deviceNetwork]=e.ctx[ze.deviceNetwork]),e.ctx[ze.deviceOEMName]&&(n.tags[ke.deviceOEMName]=e.ctx[ze.deviceOEMName]),e.tags[ze.deviceOSVersion]&&(n.tags[ke.deviceOSVersion]=e.tags[ze.deviceOSVersion],i.push(ze.deviceOSVersion)),e.ctx[Ve.deviceOS]&&(n.tags[ke.deviceOS]=e.ctx[Ve.deviceOS]),e.ctx[ze.deviceNetwork]&&(n.tags[ke.deviceNetwork]=e.ctx[ze.deviceNetwork]),e.ctx[Me.deviceType]&&(n.tags[ke.deviceType]=e.ctx[Me.deviceType]),e.tags[ze.deviceOSVersion]&&(n.tags[ke.deviceOSVersion]=e.tags[ze.deviceOSVersion],i.push(ze.deviceOSVersion)),e.tags[Le.screenRes]&&(n.tags[ke.deviceScreenResolution]=e.tags[Le.screenRes],i.push(Le.screenRes)),e.tags[ce]&&(n.tags.sampleRate=e.tags[ce],i.push(ce)),e.tags[ke.locationIp]&&(n.tags[ke.locationIp]=e.tags[ke.locationIp],i.push(ke.locationIp)),e.tags[ke.internalSdkVersion]&&(n.tags[ke.internalSdkVersion]=e.tags[ke.internalSdkVersion],i.push(ke.internalSdkVersion)),e.tags[ke.internalAgentVersion]&&(n.tags[ke.internalAgentVersion]=e.tags[ke.internalAgentVersion],i.push(ke.internalAgentVersion)),e.tags[ke.operationRootId]&&(n.tags[ke.operationRootId]=e.tags[ke.operationRootId],i.push(ke.operationRootId)),e.tags[ke.operationSyntheticSource]&&(n.tags[ke.operationSyntheticSource]=e.tags[ke.operationSyntheticSource],i.push(ke.operationSyntheticSource)),e.tags[ke.operationParentId]&&(n.tags[ke.operationParentId]=e.tags[ke.operationParentId],i.push(ke.operationParentId)),e.tags[ke.operationName]&&(n.tags[ke.operationName]=e.tags[ke.operationName],i.push(ke.operationName)),e.tags[ke.operationId]&&(n.tags[ke.operationId]=e.tags[ke.operationId],i.push(ke.operationId)),e.tags.forEach(function(e){for(var t in e)e.hasOwnProperty(t)&&i.indexOf(e)<0&&0<=Fe.indexOf(t)&&(n.tags[t]=e[t])})},a}(),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n={},i={};Ge.extractPropsAndMeasurements(t.data,i,n);var r=t.baseData;if(h.isNullOrUndefined(r))return e.warnToConsole("Invalid input for dependency data"),null;var o=r.id,a=r.target,s=r.type,c=r.duration,u=r.success,l=r.responseCode,f=r.properties?r.properties["http.method"]:"GET",d=new xe(e,o,a,s,c,u,l,f,i,n),p=new Ce(xe.dataType,d);return Ge.createEnvelope(e,xe.envelopeType,t,p)},t.DependencyEnvelopeCreator=new t,t}(Ge),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n={},i={};t.baseType!==he.dataType&&Ge.extractPropsAndMeasurements(t.baseData,n,i),Ge.extractPropsAndMeasurements(t.data,n,i);var r=t.baseData.name,o=new he(e,r,n,i),a=new Ce(he.dataType,o);return Ge.createEnvelope(e,he.envelopeType,t,a)},t.EventEnvelopeCreator=new t,t}(Ge),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties,i=t.baseData.measurements,r=t.baseData.error,o=t.baseData.severityLevel,a=new ve(e,r,n,i,o),s=new Ce(ve.dataType,a);return Ge.createEnvelope(e,ve.envelopeType,t,s)},t.ExceptionEnvelopeCreator=new t,t}(Ge),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=Ge.extractProperties(t.data),i=t.baseData.name,r=t.baseData.average,o=t.baseData.sampleCount,a=t.baseData.min,s=t.baseData.max,c=new Ee(e,i,r,o,a,s,n),u=new Ce(Ee.dataType,c);return Ge.createEnvelope(e,Ee.envelopeType,t,u)},t.MetricEnvelopeCreator=new t,t}(Ge),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=void 0;h.isNullOrUndefined(t.baseData)||h.isNullOrUndefined(t.baseData.measurements)||(n=t.baseData.measurements.duration,delete t.baseData.measurements.duration);var i=t.baseData,r=i.name,o=i.uri,a=i.properties||{},s=i.measurements||{};if(h.isNullOrUndefined(i.refUri)||(a.refUri=i.refUri),h.isNullOrUndefined(i.pageType)||(a.pageType=i.pageType),h.isNullOrUndefined(i.isLoggedIn)||(a.isLoggedIn=i.isLoggedIn.toString()),!h.isNullOrUndefined(i.properties)){var c=i.properties;for(var u in c)c.hasOwnProperty(u)&&(a[u]=c[u])}var l=new be(e,r,o,n,a,s),f=new Ce(be.dataType,l);return Ge.createEnvelope(e,be.envelopeType,t,f)},t.PageViewEnvelopeCreator=new t,t}(Ge),Ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData,i=n.name,r=n.url,o=n.properties,a=n.measurements,s=new Ae(e,i,r,void 0,o,a),c=new Ce(Ae.dataType,s);return Ge.createEnvelope(e,Ae.envelopeType,t,c)},t.PageViewPerformanceEnvelopeCreator=new t,t}(Ge),Je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.Create=function(e,t){this._logger=e,h.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(g.CRITICAL,T,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,i=t.baseData.severityLevel,r=Ge.extractProperties(t.data),o=new Te(e,n,i,r),a=new Ce(Te.dataType,o);return Ge.createEnvelope(e,Te.envelopeType,t,a)},t.TraceEnvelopeCreator=new t,t}(Ge),Ze=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.EventValidator=new e,e}(),Qe=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.TraceValidator=new e,e}(),$e=function(){function e(){}return e.prototype.Validate=function(e){return!0},e._validateExceptions=function(e){return!0},e.ExceptionValidator=new e,e}(),et=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.MetricValidator=new e,e}(),tt=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewPerformanceValidator=new e,e}(),nt=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewValidator=new e,e}(),it=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.RemoteDepdencyValidator=new e,e}(),rt=function(){function e(e){this._logger=e}return e.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},e.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",i={};if(!e)return this._logger.throwInternal(g.CRITICAL,C,"cannot serialize object because it is null or undefined",{name:t},!0),i;if(e[n])return this._logger.throwInternal(g.WARNING,R,"Circular reference detected while serializing object",{name:t},!0),i;if(!e.aiDataContract){if("measurements"===t)i=this._serializeStringMap(e,"number",t);else if("properties"===t)i=this._serializeStringMap(e,"string",t);else if("tags"===t)i=this._serializeStringMap(e,"string",t);else if(oe.isArray(e))i=this._serializeArray(e,t);else{this._logger.throwInternal(g.WARNING,D,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),i=e}catch(e){this._logger.throwInternal(g.CRITICAL,C,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return i}for(var r in e[n]=!0,e.aiDataContract){var o,a=e.aiDataContract[r],s="function"==typeof a?a()&Q.Required:a&Q.Required,c="function"==typeof a?a()&Q.Hidden:a&Q.Hidden,u=a&Q.Array,l=void 0!==e[r],f="object"==typeof e[r]&&null!==e[r];if(!s||l||u){if(!c)void 0!==(o=f?u?this._serializeArray(e[r],r):this._serializeObject(e[r],r):e[r])&&(i[r]=o)}else this._logger.throwInternal(g.CRITICAL,_,"Missing required field specification. The field is required but not present on source",{field:r,name:t})}return delete e[n],i},e.prototype._serializeArray=function(e,t){var n=void 0;if(e)if(oe.isArray(e)){n=[];for(var i=0;i<e.length;i++){var r=e[i],o=this._serializeObject(r,t+"["+i+"]");n.push(o)}}else this._logger.throwInternal(g.CRITICAL,M,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},e.prototype._serializeStringMap=function(e,t,n){var i=void 0;if(e)for(var r in i={},e){var o=e[r];if("string"===t)void 0===o?i[r]="undefined":null===o?i[r]="null":o.toString?i[r]=o.toString():i[r]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===o)i[r]="undefined";else if(null===o)i[r]="null";else{var a=parseFloat(o);isNaN(a)?i[r]="NaN":i[r]=a}else i[r]="invalid field: "+n+" is of unknown type.",this._logger.throwInternal(g.CRITICAL,i[r],null,!0)}return i},e}(),ot=function(){function e(){this._onlineStatus=!0;try{"undefined"==typeof window?this.isListening=!1:window&&window.addEventListener?(window.addEventListener("online",this._setOnline.bind(this),!1),window.addEventListener("offline",this._setOffline.bind(this),!1),this.isListening=!0):document&&document.body?(document.body.ononline=this._setOnline.bind(this),document.body.onoffline=this._setOffline.bind(this),this.isListening=!0):document?(document.ononline=this._setOnline.bind(this),document.onoffline=this._setOffline.bind(this),this.isListening=!0):this.isListening=!1}catch(e){this.isListening=!1}}return e.prototype._setOnline=function(){this._onlineStatus=!0},e.prototype._setOffline=function(){this._onlineStatus=!1},e.prototype.isOnline=function(){return this.isListening?this._onlineStatus:!navigator||navigator.onLine},e.prototype.isOffline=function(){return!this.isOnline()},e.Offline=new e,e}().Offline,at=function(){function c(){this.priority=201,this._XMLHttpRequestSupported=!1,this.identifier="AppInsightsChannelPlugin"}return c.prototype.pause=function(){throw new Error("Method not implemented.")},c.prototype.resume=function(){throw new Error("Method not implemented.")},c.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(g.CRITICAL,p,"flush failed, telemetry will not be collected: "+oe.getExceptionName(e),{exception:oe.dump(e)})}},c.prototype.teardown=function(){throw new Error("Method not implemented.")},c.prototype.initialize=function(t,e,n){var i=this;this._logger=e.logger,this._serializer=new rt(e.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._sender=null;var r=c._getDefaultAppInsightsChannelConfig();this._config=c._getEmptyAppInsightsChannelConfig();var o=function(e){a._config[e]=function(){return De.getConfig(t,e,i.identifier,r[e]())}},a=this;for(var s in r)o(s);(this._buffer=this._config.enableSessionStorageBuffer&&oe.canUseSessionStorage()?new Be(this._logger,this._config):new qe(this._config),!this._config.isBeaconApiDisabled()&&oe.IsBeaconApiSupported())?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))},c.prototype.processTelemetry=function(e){var t=this;try{if(this._config.disableTelemetry())return;if(!e)return void this._logger.throwInternal(g.CRITICAL,s,"Cannot send empty telemetry");if(!this._sender)return void this._logger.throwInternal(g.CRITICAL,S,"Sender was not initialized");if(!c._validate(e))return void this._logger.throwInternal(g.CRITICAL,T,"Invalid telemetry envelope");var n=c.constructEnvelope(e,this._config.instrumentationKey(),this._logger);if(!n)return void this._logger.throwInternal(g.CRITICAL,A,"Unable to create an AppInsights envelope");var i=!1;if(e.tags&&e.tags[ue]&&(e.tags[ue].forEach(function(e){try{e&&!1===e(n)&&(i=!0,t._logger.warnToConsole("Telemetry processor check returns false"))}catch(e){t._logger.throwInternal(g.CRITICAL,V,"One of telemetry initializers failed, telemetry item will not be sent: "+oe.getExceptionName(e),{exception:oe.dump(e)},!0)}}),delete e.tags[ue]),i)return;var r=this._serializer.serialize(n),o=this._buffer.getItems(),a=this._buffer.batchPayloads(o);a&&a.length+r.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(r),this._setupTimer()}catch(e){this._logger.throwInternal(g.WARNING,d,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+oe.getExceptionName(e),{exception:oe.dump(e)})}h.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},c.prototype.setNextPlugin=function(e){this._nextPlugin=e},c.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var i=null;if(this._appId||(i=this._parseResponse(e.responseText||e.response))&&i.appId&&(this._appId=i.appId),(e.status<200||300<=e.status)&&0!==e.status)!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(g.WARNING,w,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e));else if(ot.isOffline()){if(!this._config.isRetryDisabled()){this._resendPayload(t,10),this._logger.throwInternal(g.WARNING,w,". Offline - Response Code: "+e.status+". Offline status: "+ot.isOffline()+". Will retry to send "+t.length+" items.")}}else 206===e.status?(i||(i=this._parseResponse(e.responseText||e.response)),i&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},c.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!oe.getIEVersion()||9<oe.getIEVersion())&&this._logger.throwInternal(g.CRITICAL,w,"Telemetry transmission failed, some telemetry will be lost: "+oe.getExceptionName(e),{exception:oe.dump(e)})}},c.prototype._onError=function(e,t,n){this._logger.throwInternal(g.WARNING,I,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},c.prototype._onPartialSuccess=function(e,t){for(var n=[],i=[],r=0,o=t.errors.reverse();r<o.length;r++){var a=o[r],s=e.splice(a.index,1)[0];this._isRetriable(a.statusCode)?i.push(s):n.push(s)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<i.length&&(this._resendPayload(i),this._logger.throwInternal(g.WARNING,w,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+i.length+" our of "+t.itemsReceived+" items"))},c.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},c.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},c.constructEnvelope=function(e,t,n){var i;switch((i=t===e.iKey||h.isNullOrUndefined(t)?e:ee({},e,{iKey:t})).baseType){case he.dataType:return He.EventEnvelopeCreator.Create(n,i);case Te.dataType:return Je.TraceEnvelopeCreator.Create(n,i);case be.dataType:return We.PageViewEnvelopeCreator.Create(n,i);case Ae.dataType:return Ye.PageViewPerformanceEnvelopeCreator.Create(n,i);case ve.dataType:return je.ExceptionEnvelopeCreator.Create(n,i);case Ee.dataType:return Ke.MetricEnvelopeCreator.Create(n,i);case xe.dataType:return Xe.DependencyEnvelopeCreator.Create(n,i);default:return He.EventEnvelopeCreator.Create(n,i)}},c._getDefaultAppInsightsChannelConfig=function(){var e={endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},instrumentationKey:function(){}};return e},c._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,instrumentationKey:void 0}},c._validate=function(e){switch(e.baseType){case he.dataType:return Ze.EventValidator.Validate(e);case Te.dataType:return Qe.TraceValidator.Validate(e);case ve.dataType:return $e.ExceptionValidator.Validate(e);case Ee.dataType:return et.MetricValidator.Validate(e);case be.dataType:return nt.PageViewValidator.Validate(e);case Ae.dataType:return tt.PageViewPerformanceValidator.Validate(e);case xe.dataType:return it.RemoteDepdencyValidator.Validate(e);default:return Ze.EventValidator.Validate(e)}},c.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),i=this._buffer.batchPayloads(e),r=new Blob([i],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,r)?this._buffer.markAsSent(e):this._logger.throwInternal(g.CRITICAL,w,". Failed to send telemetry with Beacon API.")},c.prototype._xhrSender=function(t,e){var n=this,i=new XMLHttpRequest;i.Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,i.open("POST",this._config.endpointUrl(),e),i.setRequestHeader("Content-type","application/json"),oe.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&i.setRequestHeader(ie.sdkContextHeader,ie.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return n._xhrReadyStateChange(i,t,t.length)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(i),e)};var r=this._buffer.batchPayloads(t);i.send(r),this._buffer.markAsSent(t)},c.prototype._parseResponse=function(t){try{if(t&&""!==t){var e=JSON.parse(t);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted==e.errors.length)return e}}catch(e){this._logger.throwInternal(g.CRITICAL,b,"Cannot parse the response. "+oe.getExceptionName(e),{response:t})}return null},c.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,i=e;n<i.length;n++){var r=i[n];this._buffer.enqueue(r)}this._setRetryTime(t),this._setupTimer()}},c.prototype._setRetryTime=function(e){var t;if(this._consecutiveErrors<=1)t=10;else{var n=(Math.pow(2,this._consecutiveErrors)-1)/2,i=Math.floor(Math.random()*n*10)+1;i*=e,t=Math.max(Math.min(i,3600),10)}var r=Date.now()+1e3*t;this._retryAt=r},c.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},c.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},c.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},c.prototype._xdrSender=function(t,e){var n=this,i=new XDomainRequest;i.onload=function(){return n._xdrOnLoad(i,t)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(i),e)};var r=window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(r,0))return this._logger.throwInternal(g.WARNING,w,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var o=this._config.endpointUrl().replace(/^(https?:)/,"");i.open("POST",o);var a=this._buffer.batchPayloads(t);i.send(a),this._buffer.markAsSent(t)},c.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},c}(),st=function(){function e(e){if(h.isNullOrUndefined(e)||h.isNullOrUndefined(e.instrumentationKey))throw new Error("Invalid input configuration");this.config=e,this.getSKUDefaults(),this.initialize()}return e.prototype.initialize=function(){this.core=new X;var e=[],t=new at;e.push(t),this.core.initialize(this.config,e),t.initialize(this.config,this.core,e),this.pollInternalLogs()},e.prototype.track=function(e){this.core.track(e)},e.prototype.flush=function(t){void 0===t&&(t=!0),this.core.getTransmissionControls().forEach(function(e){e.forEach(function(e){t?e.flush():e.triggerSend(t)})})},e.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},e.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4},e}();e.ApplicationInsights=st,e.AppInsightsCore=X,e.CoreUtils=h,e.Event=he,e.Exception=ve,e.Metric=Ee,e.PageView=be,e.PageViewPerformance=Ae,e.RemoteDependencyData=xe,e.Trace=Te,e.Sender=at,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-web-basic.min.js.map
{
"name": "@microsoft/applicationinsights-web-basic",
"version": "1.0.0-beta.12",
"version": "1.0.0-beta.14",
"description": "Microsoft Application Insights Javascript SDK core and channel",

@@ -25,6 +25,6 @@ "main": "dist/applicationinsights-web-basic.js",

"dependencies": {
"@microsoft/applicationinsights-common": "^1.0.0-beta.13",
"@microsoft/applicationinsights-channel-js": "^1.0.0-beta.11",
"@microsoft/applicationinsights-core-js": "^1.0.0-beta.3"
"@microsoft/applicationinsights-common": "^1.0.0-beta.15",
"@microsoft/applicationinsights-channel-js": "^1.0.0-beta.13",
"@microsoft/applicationinsights-core-js": "^1.0.0-beta.5"
}
}

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 too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc