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 2.2.0 to 2.2.1

browser/aib.2.2.1.js

4

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

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

"dependencies": {
"@microsoft/applicationinsights-common": "2.2.0",
"@microsoft/applicationinsights-channel-js": "2.2.0",
"@microsoft/applicationinsights-core-js": "2.2.0"
"@microsoft/applicationinsights-common": "2.2.1",
"@microsoft/applicationinsights-channel-js": "2.2.1",
"@microsoft/applicationinsights-core-js": "2.2.1"
},

@@ -30,0 +30,0 @@ "peerDependencies": {

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